commit bc722d18574a5805aca1ab1a03bf1ce323489506 Author: Z572 Date: Tue Aug 5 09:00:05 2025 +0000 Initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..cbafa434 --- /dev/null +++ b/LICENSE @@ -0,0 +1,130 @@ + +木兰宽松许可证, 第2版 + +木兰宽松许可证, 第2版 + +2020年1月 http://license.coscl.org.cn/MulanPSL2 + +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: + +0. 定义 + +“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 + +“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 + +“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 + +“法人实体” 是指提交贡献的机构及其“关联实体”。 + +“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 + +1. 授予版权许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 + +2. 授予专利许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 + +3. 无商标许可 + +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 + +4. 分发限制 + +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 + +5. 免责声明与责任限制 + +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 + +6. 语言 + +“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 + +条款结束 + +如何将木兰宽松许可证,第2版,应用到您的软件 + +如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: + +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; + +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; + +3, 请将如下声明文本放入每个源文件的头部注释中。 + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. + +Mulan Permissive Software License,Version 2 + +Mulan Permissive Software License,Version 2 (Mulan PSL v2) + +January 2020 http://license.coscl.org.cn/MulanPSL2 + +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: + +0. Definition + +Software means the program and related documents which are licensed under this License and comprise all Contribution(s). + +Contribution means the copyrightable work licensed by a particular Contributor under this License. + +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. + +Legal Entity means the entity making a Contribution and all its Affiliates. + +Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. + +1. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. + +2. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. + +3. No Trademark License + +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. + +4. Distribution Restriction + +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. + +5. Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +6. Language + +THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. + +END OF THE TERMS AND CONDITIONS + +How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software + +To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: + +i. Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +ii. Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package; +iii. Attach the statement to the appropriate annotated syntax at the beginning of each source file. + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt new file mode 100644 index 00000000..ea890afb --- /dev/null +++ b/LICENSES/BSD-3-Clause.txt @@ -0,0 +1,11 @@ +Copyright (c) . + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt new file mode 100644 index 00000000..0e259d42 --- /dev/null +++ b/LICENSES/CC0-1.0.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/LICENSES/GPL-2.0-or-later.txt b/LICENSES/GPL-2.0-or-later.txt new file mode 100644 index 00000000..17cb2864 --- /dev/null +++ b/LICENSES/GPL-2.0-or-later.txt @@ -0,0 +1,117 @@ +GNU GENERAL PUBLIC LICENSE +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the 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 a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE 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. + +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 convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. + +signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice diff --git a/LICENSES/GPL-3.0-only.txt b/LICENSES/GPL-3.0-only.txt new file mode 100644 index 00000000..f6cdd22a --- /dev/null +++ b/LICENSES/GPL-3.0-only.txt @@ -0,0 +1,232 @@ +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 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/LICENSES/LGPL-2.1-or-later.txt b/LICENSES/LGPL-2.1-or-later.txt new file mode 100644 index 00000000..c6487f4f --- /dev/null +++ b/LICENSES/LGPL-2.1-or-later.txt @@ -0,0 +1,176 @@ +GNU LESSER GENERAL PUBLIC LICENSE + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, 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 this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +GNU LESSER GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries + +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author + + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 00000000..d817195d --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSES/MulanPSL-2.0.txt b/LICENSES/MulanPSL-2.0.txt new file mode 100644 index 00000000..cbafa434 --- /dev/null +++ b/LICENSES/MulanPSL-2.0.txt @@ -0,0 +1,130 @@ + +木兰宽松许可证, 第2版 + +木兰宽松许可证, 第2版 + +2020年1月 http://license.coscl.org.cn/MulanPSL2 + +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: + +0. 定义 + +“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 + +“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 + +“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 + +“法人实体” 是指提交贡献的机构及其“关联实体”。 + +“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 + +1. 授予版权许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 + +2. 授予专利许可 + +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 + +3. 无商标许可 + +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 + +4. 分发限制 + +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 + +5. 免责声明与责任限制 + +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 + +6. 语言 + +“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 + +条款结束 + +如何将木兰宽松许可证,第2版,应用到您的软件 + +如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: + +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; + +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; + +3, 请将如下声明文本放入每个源文件的头部注释中。 + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. + +Mulan Permissive Software License,Version 2 + +Mulan Permissive Software License,Version 2 (Mulan PSL v2) + +January 2020 http://license.coscl.org.cn/MulanPSL2 + +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: + +0. Definition + +Software means the program and related documents which are licensed under this License and comprise all Contribution(s). + +Contribution means the copyrightable work licensed by a particular Contributor under this License. + +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. + +Legal Entity means the entity making a Contribution and all its Affiliates. + +Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. + +1. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. + +2. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. + +3. No Trademark License + +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. + +4. Distribution Restriction + +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. + +5. Disclaimer of Warranty and Limitation of Liability + +THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +6. Language + +THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. + +END OF THE TERMS AND CONDITIONS + +How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software + +To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: + +i. Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +ii. Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package; +iii. Attach the statement to the appropriate annotated syntax at the beginning of each source file. + +Copyright (c) [Year] [name of copyright holder] +[Software Name] is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. diff --git a/README.md b/README.md new file mode 100644 index 00000000..dd7fd4f7 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# openRuyi Repo + +This openRuyi Repo contains build configurations and scripts for all packages made available in the openRuyi repository. + +> [!NOTE] +> openRuyi is currently in active development. Expect breaking changes, and use at your own risk. + +## Further Readings + +Please check our project wiki. diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000..17c3f634 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,37 @@ +version = 1 +[[annotations]] +path = [ + "**.patch", + "**.diff", + "**.tmpfiles", + "**.sysusers", + "**.service", + "**.timer", + "**/_multibuild", + "**.pam", + "**.key", + "**/_manifest" + ] +SPDX-FileCopyrightText = "NONE" +SPDX-License-Identifier = "CC0-1.0" +[[annotations]] + +path = ["SPECS/library-python/pyproject-rpm-macros/*.py", + "SPECS/library-python/pyproject-rpm-macros/macros.*"] +SPDX-FileCopyrightText = "2019 pyproject-rpm-macros contributors" +SPDX-License-Identifier = "MIT" +[[annotations]] + +path = "SPECS/core/ca-certificates/update-ca-trust.8.txt" +SPDX-FileCopyrightText = "2013 Red Hat, Inc." +SPDX-License-Identifier = "GPL-2.0-or-later" +[[annotations]] + +path = "SPECS/core/pesign/pesign.py" +SPDX-FileCopyrightText = "2017 Peter Jones " +SPDX-License-Identifier = "GPL-3.0-only" + +[[annotations]] +path = "SPECS/library-python/python-rpm-generators/*" +SPDX-FileCopyrightText = "RPM " +SPDX-License-Identifier = "GPL-2.0-or-later AND LGPL-2.1-or-later" diff --git a/SPECS/Catch2/Catch2.spec b/SPECS/Catch2/Catch2.spec new file mode 100644 index 00000000..b5c20ca9 --- /dev/null +++ b/SPECS/Catch2/Catch2.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: Catch2 +Version: 3.10.0 +Release: %autorelease +Summary: A modern, C++-native test framework for TDD and BDD +License: BSL-1.0 +URL: https://github.com/catchorg/Catch2 +#!RemoteAsset +Source0: https://github.com/catchorg/Catch2/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz + +BuildSystem: cmake + +BuildOption(conf): -DBUILD_SHARED_LIBS=ON +BuildOption(conf): -DBUILD_TESTING=ON +BuildOption(conf): -DCATCH_ENABLE_WERROR=OFF +BuildOption(conf): -DCATCH_INSTALL_DOCS=OFF +BuildOption(conf): -DCATCH_INSTALL_EXTRAS=ON + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: python3 + +%description +Catch2 is a modern, C++-native, multi-paradigm test framework. +This package contains the runtime shared libraries for Catch2. + +%package devel +Summary: Development files for the Catch2 test framework +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +This package contains all necessary files to develop tests using Catch2, +including header files, CMake integration files, and pkg-config files. + +%ldconfig_scriptlets + +%files +%license LICENSE.txt +# The main package owns only the versioned, runtime shared libraries. +%{_libdir}/libCatch2.so.* +%{_libdir}/libCatch2Main.so.* + +%files devel +%doc README.md +%{_includedir}/catch2/ +%{_libdir}/libCatch2.so +%{_libdir}/libCatch2Main.so +%{_libdir}/cmake/Catch2/ +%{_datadir}/pkgconfig/catch2.pc +%{_datadir}/pkgconfig/catch2-with-main.pc +%{_datadir}/Catch2/ + +%changelog +%{?autochangelog} diff --git a/SPECS/abseil-cpp/abseil-cpp.spec b/SPECS/abseil-cpp/abseil-cpp.spec new file mode 100644 index 00000000..cd273f9b --- /dev/null +++ b/SPECS/abseil-cpp/abseil-cpp.spec @@ -0,0 +1,220 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: abseil-cpp +Version: 20250814.0 +Release: %autorelease +Summary: C++ Common Libraries +# The entire source is Apache-2.0, except: +# - The following files are LicenseRef-Fedora-Public-Domain: +# absl/time/internal/cctz/src/tzfile.h +# ** This file is in the public domain, so clarified as of +# ** 1996-06-05 by Arthur David Olson. +# absl/time/internal/cctz/testdata/zoneinfo/iso3166.tab +# # This file is in the public domain, so clarified as of +# # 2009-05-17 by Arthur David Olson. +# absl/time/internal/cctz/testdata/zoneinfo/zone1970.tab +# # This file is in the public domain. +License: Apache-2.0 AND LicenseRef-Fedora-Public-Domain +URL: https://abseil.io +#!RemoteAsset +Source: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz +# didn't bring i386 specific patch along with this spec +# we didn't add support for s390x and ppc64 either +BuildRequires: cmake +BuildRequires: ninja +BuildRequires: gcc-c++ +BuildRequires: gmock-devel gtest-devel +BuildSystem: cmake + +BuildOption(conf): -GNinja +BuildOption(conf): -DABSL_USE_EXTERNAL_GOOGLETEST:BOOL=ON +BuildOption(conf): -DABSL_FIND_GOOGLETEST:BOOL=ON +BuildOption(conf): -DABSL_ENABLE_INSTALL:BOOL=ON +BuildOption(conf): -DABSL_BUILD_TESTING:BOOL=ON +BuildOption(conf): -DABSL_BUILD_TEST_HELPERS:BOOL=ON +BuildOption(conf): -DCMAKE_BUILD_TYPE:STRING=None +BuildOption(conf): -DCMAKE_CXX_STANDARD:STRING=17 + +# The contents of absl/time/internal/cctz are derived from +# https://github.com/google/cctz (https://src.fedoraproject.org/rpms/cctz), but +# have been forked with Abseil-specific changes. It is not obvious from which +# particular version of CCTZ these sources are derived. Upstream was asked +# about a path to supporting a system copy as required by bundling guidelines: +# Please comment on CCTZ bundling +# https://github.com/abseil/abseil-cpp/discussions/1415 +# They refused, for the time being, as follows: +# “[…] we have no plans to change this decision, but we reserve the right to +# change our minds.” +Provides: bundled(cctz) + +%description +Abseil is an open-source collection of C++ library code designed to augment +the C++ standard library. The Abseil library code is collected from +Google's own C++ code base, has been extensively tested and used in +production, and is the same code we depend on in our daily coding lives. + +In some cases, Abseil provides pieces missing from the C++ standard; in +others, Abseil provides alternatives to the standard for special needs we've +found through usage in the Google code base. We denote those cases clearly +within the library code we provide you. + +Abseil is not meant to be a competitor to the standard library; we've just +found that many of these utilities serve a purpose within our code base, +and we now want to provide those resources to the C++ community as a whole. + +%package testing +Summary: Libraries needed for running tests on the installed %{name} +Requires: %{name} = %{version}-%{release} + +Provides: bundled(cctz) + +%description testing +%{summary}. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: %{name}-testing = %{version}-%{release} + +# Some of the headers from CCTZ are part of the -devel subpackage. See the +# corresponding virtual Provides in the base package for full details. +Provides: bundled(cctz) + +%description devel +Development headers for %{name} + +%files +%global lib_version 2508.0.0 +%license LICENSE +%doc FAQ.md README.md UPGRADES.md +# All shared libraries except installed TESTONLY libraries; see the %%files +# list for the -testing subpackage for those. +%{_libdir}/libabsl_base.so.%{lib_version} +%{_libdir}/libabsl_city.so.%{lib_version} +%{_libdir}/libabsl_civil_time.so.%{lib_version} +%{_libdir}/libabsl_cord.so.%{lib_version} +%{_libdir}/libabsl_cord_internal.so.%{lib_version} +%{_libdir}/libabsl_cordz_functions.so.%{lib_version} +%{_libdir}/libabsl_cordz_handle.so.%{lib_version} +%{_libdir}/libabsl_cordz_info.so.%{lib_version} +%{_libdir}/libabsl_cordz_sample_token.so.%{lib_version} +%{_libdir}/libabsl_crc32c.so.%{lib_version} +%{_libdir}/libabsl_crc_cord_state.so.%{lib_version} +%{_libdir}/libabsl_crc_cpu_detect.so.%{lib_version} +%{_libdir}/libabsl_crc_internal.so.%{lib_version} +%{_libdir}/libabsl_debugging_internal.so.%{lib_version} +%{_libdir}/libabsl_decode_rust_punycode.so.%{lib_version} +%{_libdir}/libabsl_demangle_internal.so.%{lib_version} +%{_libdir}/libabsl_demangle_rust.so.%{lib_version} +%{_libdir}/libabsl_die_if_null.so.%{lib_version} +%{_libdir}/libabsl_examine_stack.so.%{lib_version} +%{_libdir}/libabsl_exponential_biased.so.%{lib_version} +%{_libdir}/libabsl_failure_signal_handler.so.%{lib_version} +%{_libdir}/libabsl_flags_commandlineflag.so.%{lib_version} +%{_libdir}/libabsl_flags_commandlineflag_internal.so.%{lib_version} +%{_libdir}/libabsl_flags_config.so.%{lib_version} +%{_libdir}/libabsl_flags_internal.so.%{lib_version} +%{_libdir}/libabsl_flags_marshalling.so.%{lib_version} +%{_libdir}/libabsl_flags_parse.so.%{lib_version} +%{_libdir}/libabsl_flags_private_handle_accessor.so.%{lib_version} +%{_libdir}/libabsl_flags_program_name.so.%{lib_version} +%{_libdir}/libabsl_flags_reflection.so.%{lib_version} +%{_libdir}/libabsl_flags_usage.so.%{lib_version} +%{_libdir}/libabsl_flags_usage_internal.so.%{lib_version} +%{_libdir}/libabsl_graphcycles_internal.so.%{lib_version} +%{_libdir}/libabsl_hash.so.%{lib_version} +%{_libdir}/libabsl_hashtable_profiler.so.%{lib_version} +%{_libdir}/libabsl_hashtablez_sampler.so.%{lib_version} +%{_libdir}/libabsl_int128.so.%{lib_version} +%{_libdir}/libabsl_kernel_timeout_internal.so.%{lib_version} +%{_libdir}/libabsl_leak_check.so.%{lib_version} +%{_libdir}/libabsl_log_flags.so.%{lib_version} +%{_libdir}/libabsl_log_globals.so.%{lib_version} +%{_libdir}/libabsl_log_initialize.so.%{lib_version} +%{_libdir}/libabsl_log_internal_check_op.so.%{lib_version} +%{_libdir}/libabsl_log_internal_conditions.so.%{lib_version} +%{_libdir}/libabsl_log_internal_fnmatch.so.%{lib_version} +%{_libdir}/libabsl_log_internal_format.so.%{lib_version} +%{_libdir}/libabsl_log_internal_globals.so.%{lib_version} +%{_libdir}/libabsl_log_internal_log_sink_set.so.%{lib_version} +%{_libdir}/libabsl_log_internal_message.so.%{lib_version} +%{_libdir}/libabsl_log_internal_nullguard.so.%{lib_version} +%{_libdir}/libabsl_log_internal_proto.so.%{lib_version} +%{_libdir}/libabsl_log_internal_structured_proto.so.%{lib_version} +%{_libdir}/libabsl_log_severity.so.%{lib_version} +%{_libdir}/libabsl_log_sink.so.%{lib_version} +%{_libdir}/libabsl_log_entry.so.%{lib_version} +%{_libdir}/libabsl_malloc_internal.so.%{lib_version} +%{_libdir}/libabsl_periodic_sampler.so.%{lib_version} +%{_libdir}/libabsl_poison.so.%{lib_version} +%{_libdir}/libabsl_profile_builder.so.%{lib_version} +%{_libdir}/libabsl_random_distributions.so.%{lib_version} +%{_libdir}/libabsl_random_internal_distribution_test_util.so.%{lib_version} +%{_libdir}/libabsl_random_internal_entropy_pool.so.%{lib_version} +%{_libdir}/libabsl_random_internal_platform.so.%{lib_version} +%{_libdir}/libabsl_random_internal_randen.so.%{lib_version} +%{_libdir}/libabsl_random_internal_randen_hwaes.so.%{lib_version} +%{_libdir}/libabsl_random_internal_randen_hwaes_impl.so.%{lib_version} +%{_libdir}/libabsl_random_internal_randen_slow.so.%{lib_version} +%{_libdir}/libabsl_random_internal_seed_material.so.%{lib_version} +%{_libdir}/libabsl_random_seed_gen_exception.so.%{lib_version} +%{_libdir}/libabsl_random_seed_sequences.so.%{lib_version} +%{_libdir}/libabsl_raw_hash_set.so.%{lib_version} +%{_libdir}/libabsl_raw_logging_internal.so.%{lib_version} +%{_libdir}/libabsl_scoped_set_env.so.%{lib_version} +%{_libdir}/libabsl_spinlock_wait.so.%{lib_version} +%{_libdir}/libabsl_stacktrace.so.%{lib_version} +%{_libdir}/libabsl_status.so.%{lib_version} +%{_libdir}/libabsl_statusor.so.%{lib_version} +%{_libdir}/libabsl_str_format_internal.so.%{lib_version} +%{_libdir}/libabsl_strerror.so.%{lib_version} +%{_libdir}/libabsl_strings.so.%{lib_version} +%{_libdir}/libabsl_strings_internal.so.%{lib_version} +%{_libdir}/libabsl_string_view.so.%{lib_version} +%{_libdir}/libabsl_symbolize.so.%{lib_version} +%{_libdir}/libabsl_synchronization.so.%{lib_version} +%{_libdir}/libabsl_throw_delegate.so.%{lib_version} +%{_libdir}/libabsl_time.so.%{lib_version} +%{_libdir}/libabsl_time_zone.so.%{lib_version} +%{_libdir}/libabsl_tracing_internal.so.%{lib_version} +%{_libdir}/libabsl_utf8_for_code_point.so.%{lib_version} +%{_libdir}/libabsl_vlog_config_internal.so.%{lib_version} + +%files testing +# TESTONLY libraries (that are actually installed): +# absl/base/CMakeLists.txt +%{_libdir}/libabsl_exception_safety_testing.so.%{lib_version} +%{_libdir}/libabsl_atomic_hook_test_helper.so.%{lib_version} +%{_libdir}/libabsl_spinlock_test_common.so.%{lib_version} +# absl/container/CMakeLists.txt +%{_libdir}/libabsl_test_instance_tracker.so.%{lib_version} +%{_libdir}/libabsl_hash_generator_testing.so.%{lib_version} +# absl/debugging/CMakeLists.txt +%{_libdir}/libabsl_stack_consumption.so.%{lib_version} +# absl/log/CMakeLists.txt +%{_libdir}/libabsl_log_internal_test_actions.so.%{lib_version} +%{_libdir}/libabsl_log_internal_test_helpers.so.%{lib_version} +%{_libdir}/libabsl_log_internal_test_matchers.so.%{lib_version} +%{_libdir}/libabsl_scoped_mock_log.so.%{lib_version} +# absl/status/CMakeLists.txt +%{_libdir}/libabsl_status_matchers.so.%{lib_version} +# absl/strings/CMakeLists.txt +%{_libdir}/libabsl_pow10_helper.so.%{lib_version} +# absl/synchronization/CMakeLists.txt +%{_libdir}/libabsl_per_thread_sem_test_common.so.%{lib_version} +# absl/time/CMakeLists.txt +%{_libdir}/libabsl_time_internal_test_util.so.%{lib_version} + +%files devel +%{_includedir}/absl +%{_libdir}/libabsl_*.so +%{_libdir}/cmake/absl +%{_libdir}/pkgconfig/absl_*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/acl/acl.spec b/SPECS/acl/acl.spec new file mode 100644 index 00000000..56ae7601 --- /dev/null +++ b/SPECS/acl/acl.spec @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: acl +Summary: Commands for Manipulating POSIX Access Control Lists +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Version: 2.3.2 +Release: %autorelease +URL: https://savannah.nongnu.org/projects/acl +#!RemoteAsset +Source: https://download.savannah.nongnu.org/releases/acl/acl-%{version}.tar.xz +#!RemoteAsset +Source1: https://download.savannah.nongnu.org/releases/acl/acl-%{version}.tar.xz.sig +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gettext-devel +BuildRequires: libattr-devel +BuildRequires: libtool +BuildRequires: pkg-config + +BuildOption(conf): --disable-static --docdir=%_defaultdocdir/%name + +%description +getfacl and setfacl commands for retrieving and setting POSIX access +control lists. + +%package devel +Summary: Header files for the POSIX ACL library +Requires: %name = %version +Requires: glibc-devel +Provides: acl-devel = %version +Obsoletes: acl-devel < %version + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that require libacl. + +%conf -p +autoreconf -fiv + +%install -p +rm -rvf %buildroot/%_defaultdocdir/%name + +%install -a +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets + +%files +%license doc/COPYING +%doc doc/extensions.txt doc/libacl.txt doc/CHANGES +%{_docdir}/acl +%license doc/COPYING.LGPL +%_libdir/libacl.so.1* +%_bindir/chacl +%_bindir/getfacl +%_bindir/setfacl +%_mandir/man1/*.1* +%_mandir/man5/*.5* + +%files devel +%_includedir/acl/ +%_includedir/sys/acl.h +%_libdir/libacl.so +%_mandir/man3/*.3* +%_libdir/pkgconfig/libacl.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/alsa-lib/alsa-lib.spec b/SPECS/alsa-lib/alsa-lib.spec new file mode 100644 index 00000000..38a5b4d6 --- /dev/null +++ b/SPECS/alsa-lib/alsa-lib.spec @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: alsa-lib +Version: 1.2.14 +Release: %autorelease +Summary: The Advanced Linux Sound Architecture (ALSA) library +License: LGPL-2.1-or-later +URL: http://www.alsa-project.org/ +#!RemoteAsset +Source0: https://www.alsa-project.org/files/pub/lib/%{name}-%{version}.tar.bz2 +Source1: asound.conf +Source2: modprobe-dist-alsa.conf +Source3: modprobe-dist-oss.conf + +BuildSystem: autotools + +# configure options +BuildOption(conf): --disable-aload +BuildOption(conf): --with-plugindir=%{_libdir}/alsa-lib +BuildOption(conf): --disable-alisp +BuildOption(build): V=1 +BuildOption(install): DESTDIR=%{buildroot} +BuildRequires: doxygen +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +BuildRequires: gcc + +%description +The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI +functionality to the Linux operating system. + +This package includes the ALSA runtime libraries to simplify application +programming and provide higher level functionality as well as support for +the older OSS API, providing binary compatibility for most OSS programs. + +%package devel +Summary: Development files from the ALSA library +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI +functionality to the Linux operating system. + +This package includes the ALSA development libraries for developing +against the ALSA libraries and interfaces. + +%prep +%autosetup -p1 + +%conf -p +autoreconf -vif + +%build -p +# Set custom LTO flags (needed for symbol versioning) +%define _lto_cflags -flto -ffat-lto-objects -flto-partition=none + +# fix libtool rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool || : +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool || : + +%build -a +%make_build doc + +%install -a +# Install global configuration files +mkdir -p -m 755 %{buildroot}/etc +install -p -m 644 %{SOURCE1} %{buildroot}/etc + +# Install the modprobe files for ALSA +mkdir -p -m 755 %{buildroot}%{_prefix}/lib/modprobe.d +install -p -m 644 %{SOURCE2} %{buildroot}%{_prefix}/lib/modprobe.d/dist-alsa.conf +# bug#926973, place this file to the doc directory +install -p -m 644 %{SOURCE3} . + +# Remove libtool archives +find %{buildroot} -name '*.la' -delete + +# Remove /usr/include/asoundlib.h +rm -f %{buildroot}%{_includedir}/asoundlib.h + +%ldconfig_scriptlets + +%files +%license COPYING +%doc doc/asoundrc.txt modprobe-dist-oss.conf +%config %{_sysconfdir}/asound.conf +%{_libdir}/libasound.so.* +%{_libdir}/libatopology.so.* +%{_bindir}/aserver +#{_libdir}/alsa-lib/ +%{_datadir}/alsa/ +%exclude %{_datadir}/alsa/ucm +%exclude %{_datadir}/alsa/ucm2 +%exclude %{_datadir}/alsa/topology +%{_prefix}/lib/modprobe.d/dist-* + +%files devel +%doc TODO doc/doxygen/ +%{_includedir}/alsa/ +%{_includedir}/sys/asoundlib.h +%{_libdir}/libasound.so +%{_libdir}/libatopology.so +%{_libdir}/pkgconfig/alsa.pc +%{_libdir}/pkgconfig/alsa-topology.pc +%{_datadir}/aclocal/alsa.m4 + +%changelog +%{?autochangelog} diff --git a/SPECS/alsa-lib/asound.conf b/SPECS/alsa-lib/asound.conf new file mode 100644 index 00000000..da7ab7c2 --- /dev/null +++ b/SPECS/alsa-lib/asound.conf @@ -0,0 +1,3 @@ +# +# Place your global alsa-lib configuration here... +# diff --git a/SPECS/alsa-lib/modprobe-dist-alsa.conf b/SPECS/alsa-lib/modprobe-dist-alsa.conf new file mode 100644 index 00000000..cf31fa65 --- /dev/null +++ b/SPECS/alsa-lib/modprobe-dist-alsa.conf @@ -0,0 +1,9 @@ +# ALSA Sound Support +# +# We want to ensure that snd-seq is always loaded for those who want to use +# the sequencer interface, but we can't do this automatically through udev +# at the moment...so we have this rule (just for the moment). +# +# Remove the following line if you don't want the sequencer. + +install snd-pcm /sbin/modprobe --ignore-install snd-pcm && /sbin/modprobe snd-seq diff --git a/SPECS/alsa-lib/modprobe-dist-oss.conf b/SPECS/alsa-lib/modprobe-dist-oss.conf new file mode 100644 index 00000000..21f93cc4 --- /dev/null +++ b/SPECS/alsa-lib/modprobe-dist-oss.conf @@ -0,0 +1,8 @@ +# OSS Sound Support +# This has been disabled in F11 onwards because it can interfere with the +# PulseAudio sound service (a legacy OSS application can prevent PulseAudio +# applications from playing sound by preventing PulseAudio from (re-)opening +# the sound device). To re-enable support, copy this file to +# the /etc/modprobe.d directory. +# +install snd-pcm /sbin/modprobe --ignore-install snd-pcm && /sbin/modprobe snd-pcm-oss && /sbin/modprobe snd-seq-device && /sbin/modprobe snd-seq-oss diff --git a/SPECS/argon2/argon2.spec b/SPECS/argon2/argon2.spec new file mode 100644 index 00000000..28db5605 --- /dev/null +++ b/SPECS/argon2/argon2.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +%global libname libargon2 +Name: argon2 +Version: 20190702 +Release: %autorelease +Summary: The password-hashing tools +License: CC0-1.0 OR Apache-2.0 +URL: https://github.com/P-H-C/phc-winner-argon2 +#!RemoteAsset +Source: https://github.com/P-H-C/phc-winner-argon2/archive/refs/tags/%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): -j1 +BuildOption(build): CFLAGS="%{optflags} -Iinclude" + +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): LIBRARY_REL=%{_lib} + +BuildRequires: gcc +BuildRequires: make +Requires: %{libname} = %{version} + +%description +Argon2 is a password-hashing function that can be used to hash passwords +for credential storage, key derivation, or other applications. + +%package -n %{libname} +Summary: The password-hashing library + +%description -n %{libname} +This package contains the shared library for the Argon2 password-hashing function. + +%package -n %{libname}-devel +Summary: Development files for %{libname} +Requires: %{libname} = %{version} + +%description -n %{libname}-devel +This package contains libraries and header files for +developing applications that use %{libname}. + +%prep -a +# Honours default RPM build options and library path, do not use -march=native +sed -e '/^CFLAGS/s:^CFLAGS:LDFLAGS=%{build_ldflags}\nCFLAGS:' \ + -e 's:-O3 -Wall:%{optflags}:' \ + -e '/^LIBRARY_REL/s:lib:%{_lib}:' \ + -e 's:-march=\$(OPTTARGET) :${CFLAGS} :' \ + -e 's:CFLAGS += -march=\$(OPTTARGET)::' \ + -i Makefile + +# Fix pkgconfig file +sed -e 's:lib/@HOST_MULTIARCH@:%{_lib}:;s/@UPSTREAM_VER@/%{version}/' -i %{libname}.pc.in + +# No configure +%conf + +%install -a +rm %{buildroot}%{_libdir}/%{libname}.a +install -Dpm 644 %{libname}.pc %{buildroot}%{_libdir}/pkgconfig/%{libname}.pc +chmod -x %{buildroot}%{_includedir}/%{name}.h + +%ldconfig_scriptlets -n %{libname} + +%files +%{_bindir}/argon2 + +%files -n %{libname} +%license LICENSE +%{_libdir}/libargon2.so.* + +%files -n %{libname}-devel +%doc *md +%{_includedir}/%{name}.h +%{_libdir}/libargon2.so +%{_libdir}/pkgconfig/%{libname}.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/asn1c/asn1c.spec b/SPECS/asn1c/asn1c.spec new file mode 100644 index 00000000..e5801128 --- /dev/null +++ b/SPECS/asn1c/asn1c.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: asn1c +Version: 0.9.28 +Release: %autorelease +Summary: ASN.1 Compiler +License: BSD-2-Clause +URL: http://lionet.info/asn1c/ +#!RemoteAsset +Source: https://github.com/vlm/asn1c/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bison flex +BuildRequires: libtool +BuildRequires: gcc + +%description +Compiles ASN.1 data structures into C source structures that can be +simply marshalled to/unmarshalled from various encoding rules. + +%conf -p +autoreconf -fiv + +%files +%license LICENSE +%doc BUGS ChangeLog FAQ README.md TODO doc/asn1c-quick.pdf doc/asn1c-usage.pdf +%{_bindir}/* +%{_datadir}/asn1c +%{_mandir}/man1/* +%doc %{_docdir}/asn1c + +%changelog +%{?autochangelog} diff --git a/SPECS/atf/atf.spec b/SPECS/atf/atf.spec new file mode 100644 index 00000000..86f2cfa4 --- /dev/null +++ b/SPECS/atf/atf.spec @@ -0,0 +1,146 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global common_description The Automated Testing Framework (ATF) is a collection of libraries to implement test programs in a variety of languages. + +Name: atf +Version: 0.23 +Release: %autorelease +Summary: Automated Testing Framework (metapackage) +License: BSD-2-Clause +URL: https://github.com/freebsd/atf +#!RemoteAsset +Source: https://github.com/freebsd/atf/archive/refs/tags/atf-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): INSTALL="install -p" +BuildOption(conf): --disable-static + +BuildOption(build): pkgtestsdir=%{_libexecdir}/atf/tests +BuildOption(build): testsdir=%{_libexecdir}/atf/tests +BuildOption(install): pkgtestsdir=%{_libexecdir}/atf/tests +BuildOption(install): testsdir=%{_libexecdir}/atf/tests + +BuildRequires: automake gcc-c++ libtool make + +%description +This is a metapackage for the Automated Testing Framework (ATF). +It ensures all core components are installed. + + +%package tests +Summary: Automated Testing Framework - Test suite +Requires: libatf-c = %{version} +Requires: libatf-c++ = %{version} +Requires: libatf-sh = %{version} +Requires: libatf-c-devel = %{version} +Requires: libatf-c++-devel = %{version} +Requires: libatf-sh-devel = %{version} + +%description tests +%{common_description} +This package installs the run-time tests for all the components of ATF. + +%package -n libatf-c +Summary: Automated Testing Framework - C bindings + +%description -n libatf-c +%{common_description} +This package provides the run-time libraries for tests using the ATF C bindings. + +%package -n libatf-c-devel +Summary: Development files for ATF C bindings +Requires: libatf-c = %{version} +%description -n libatf-c-devel +%{common_description} +This package provides the files to develop tests using the ATF C bindings. + +%package -n libatf-c++ +Summary: Automated Testing Framework - C++ bindings + +%description -n libatf-c++ +%{common_description} +This package provides the run-time libraries for tests using the ATF C++ bindings. + +%package -n libatf-c++-devel +Summary: Development files for ATF C++ bindings +Requires: libatf-c-devel = %{version} +Requires: libatf-c++ = %{version} + +%description -n libatf-c++-devel +%{common_description} +This package provides the files to develop tests using the ATF C++ bindings. + +%package -n libatf-sh +Summary: Automated Testing Framework - POSIX shell bindings +Requires: libatf-c++ = %{version} + +%description -n libatf-sh +%{common_description} +This package provides the run-time libraries for tests using the ATF shell bindings. + +%package -n libatf-sh-devel +Summary: Development files for ATF POSIX shell bindings +Requires: libatf-sh = %{version} + +%description -n libatf-sh-devel +%{common_description} +This package provides the files to develop tests using the ATF shell bindings. + +%conf -p +autoreconf -is + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%files +%doc %{_docdir}/atf + +%files tests +%{_libexecdir}/atf/tests +%{_mandir}/man7/atf.7* + +%files -n libatf-c +%{_libdir}/libatf-c.so.1* +%{_mandir}/man1/atf-test-program.1* +%{_mandir}/man4/atf-test-case.4* +%{_mandir}/man3/atf-c.3* + +%files -n libatf-c-devel +%{_datadir}/aclocal/atf-c.m4 +%{_datadir}/aclocal/atf-common.m4 +%{_includedir}/atf-c.h +%{_includedir}/atf-c/ +%{_libdir}/libatf-c.so +%{_libdir}/pkgconfig/atf-c.pc + +%files -n libatf-c++ +%{_libdir}/libatf-c++.so.2* +%{_mandir}/man3/atf-c++.3* + +%files -n libatf-c++-devel +%{_datadir}/aclocal/atf-c++.m4 +%{_includedir}/atf-c++.hpp +%{_includedir}/atf-c++/ +%{_libdir}/libatf-c++.so +%{_libdir}/pkgconfig/atf-c++.pc + +%files -n libatf-sh +%{_bindir}/atf-sh +%dir %{_datadir}/atf +%{_datadir}/atf/ +%{_libexecdir}/atf-check +%{_mandir}/man1/atf-sh.1* +%{_mandir}/man3/atf-sh.3* + +%files -n libatf-sh-devel +%{_datadir}/aclocal/atf-sh.m4 +%{_libdir}/pkgconfig/atf-sh.pc +%{_mandir}/man1/atf-check.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/attr/0001-bypass-wrong-output-when-enabled-selinux.patch b/SPECS/attr/0001-bypass-wrong-output-when-enabled-selinux.patch new file mode 100644 index 00000000..a9ce9d33 --- /dev/null +++ b/SPECS/attr/0001-bypass-wrong-output-when-enabled-selinux.patch @@ -0,0 +1,55 @@ +From 20576addae44d7256617806e4504524e0d1c9b13 Mon Sep 17 00:00:00 2001 +From: Shijie Luo +Date: Sun, 15 Mar 2020 14:15:42 -0400 +Subject: [PATCH 7/7] bypass wrong output when enabled selinux + +When enforced selinux, excuting command getfattr may output something +about selinux. Bypass these messages to make testcases go success. + +Signed-off-by: Shijie Luo +--- + test/run | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/test/run b/test/run +index 07e916c..7e46a70 100755 +--- a/test/run ++++ b/test/run +@@ -160,21 +160,27 @@ sub process_test($$$$) { + map { s/\s/\\$&/g; $_ } @$p), " -- "; + my $result = exec_test($prog, $in); + my @good = (); +- my $nmax = (@$out > @$result) ? @$out : @$result; +- for (my $n=0; $n < $nmax; $n++) { ++ my $nmax = @$out; ++ my $mmax = @$result; ++ for (my $n=0, my $m=0; $n < $nmax; $n++, $m++) { + my $use_re; ++ + if (defined $out->[$n] && $out->[$n] =~ /^~ /) { + $use_re = 1; + $out->[$n] =~ s/^~ //g; + } + +- if (!defined($out->[$n]) || !defined($result->[$n]) || +- (!$use_re && $result->[$n] ne $out->[$n]) || +- ( $use_re && $result->[$n] !~ /^$out->[$n]/)) { +- push @good, ($use_re ? '!~' : '!='); ++ while ($m < $mmax && ++ (!$use_re && $result->[$m] ne $out->[$n]) || ++ ( $use_re && $result->[$m] !~ /^$out->[$n]/)) { ++ $m++; ++ } ++ ++ if (!defined($result->[$m])) { ++ push @good, ($use_re ? '!~' : '!='); + } + else { +- push @good, ($use_re ? '=~' : '=='); ++ push @good, ($use_re ? '=~' : '=='); + } + } + my $good = !(grep /!/, @good); +-- +1.8.3.1 + diff --git a/SPECS/attr/0002-dont-skip-security.evm-when-copy-xattr.patch b/SPECS/attr/0002-dont-skip-security.evm-when-copy-xattr.patch new file mode 100644 index 00000000..c0ce82b3 --- /dev/null +++ b/SPECS/attr/0002-dont-skip-security.evm-when-copy-xattr.patch @@ -0,0 +1,27 @@ +From 0aa9a1568fc318345c4123fc19f825933f8dcb66 Mon Sep 17 00:00:00 2001 +From: zhangtianxing3 +Date: Mon, 24 Jan 2022 11:39:36 +0800 +Subject: [PATCH] dont skip security.evm when copy xattr + +IMA feature need to use security.evm, so we should not skip + +Signed-off-by: lixiaokeng +Signed-off-by: volcanodragon +--- + xattr.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xattr.conf b/xattr.conf +index 1affac5..07d3403 100644 +--- a/xattr.conf ++++ b/xattr.conf +@@ -18,5 +18,5 @@ trusted.SGI_DMI_* skip # xfs specific + trusted.SGI_MAC_FILE skip # xfs specific + xfsroot.* skip # xfs specific; obsolete + user.Beagle.* skip # ignore Beagle index data +-security.evm skip # may only be written by kernel ++#security.evm skip # may only be written by kernel + afs.* skip # AFS metadata and ACLs +-- +1.8.3.1 + diff --git a/SPECS/attr/attr.spec b/SPECS/attr/attr.spec new file mode 100644 index 00000000..8c6bf63c --- /dev/null +++ b/SPECS/attr/attr.spec @@ -0,0 +1,105 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define lname libattr1 +Name: attr +Version: 2.5.2 +Release: %autorelease +Summary: Commands for Manipulating Extended Attributes +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Group: System/Filesystems +URL: https://savannah.nongnu.org/projects/attr/ +#!RemoteAsset +Source: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{version}.tar.gz + +Patch1: 0001-bypass-wrong-output-when-enabled-selinux.patch +Patch2: 0002-dont-skip-security.evm-when-copy-xattr.patch +BuildRequires: pkgconfig +BuildRequires: perl +Conflicts: xfsdump < 2.0.0 +BuildSystem: autotools +BuildOption(conf): --enable-static +BuildOption(conf): --disable-silent-rules + +%description +A set of tools for manipulating extended attributes on file system +objects, in particular getfattr(1) and setfattr(1). An attr(1) command +is also provided, which is largely compatible with the SGI IRIX tool of +the same name. + +%package -n %{lname} +Summary: A dynamic library for filesystem extended attribute support +Group: System/Libraries +Obsoletes: libattr < %{version}-%{release} +Provides: libattr = %{version}-%{release} + +%description -n %{lname} +This package contains the libattr.so dynamic library, which contains +the extended attribute library functions. + +%package -n libattr-devel +Summary: Header files for libattr +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} +Requires: glibc-devel +Provides: attr-devel = %{version}-%{release} +Obsoletes: attr-devel < %{version}-%{release} + +%description -n libattr-devel +This package contains the libraries and header files needed to develop +programs which make use of extended attributes. For Linux programs, the +documented system call API is the recommended interface, but an SGI +IRIX compatibility interface is also provided. + +%package -n libattr-devel-static +Summary: Static libraries for libattr development +Group: Development/Libraries/C and C++ +Requires: libattr-devel = %{version} +Provides: libattr-devel:%{_libdir}/libattr.a + +%description -n libattr-devel-static +This package contains the static library of libattr which is needed for +staticallly linking to programs that make use of extended attributes. + +%check +%make_build check + +%install -a +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets -n %{lname} + +%files +%license doc/COPYING* +%doc doc/CHANGES +%exclude %{_docdir}/%{name}/CHANGES +%exclude %{_docdir}/%{name}/COPYING +%exclude %{_docdir}/%{name}/COPYING.LGPL +%{_mandir}/man1/*.1* +%{_bindir}/attr +%{_bindir}/getfattr +%{_bindir}/setfattr + +%files -n %{lname} +%license doc/COPYING* +%{_libdir}/libattr.so.1* +%config %{_sysconfdir}/xattr.conf + +%files -n libattr-devel +%license doc/COPYING* +%{_includedir}/attr/ +%{_libdir}/pkgconfig/libattr.pc +%{_libdir}/libattr.so +%{_mandir}/man3/*.3* + +%files -n libattr-devel-static +%license doc/COPYING* +%{_libdir}/libattr.a + +%changelog +%{?autochangelog} diff --git a/SPECS/audit/audit.spec b/SPECS/audit/audit.spec new file mode 100644 index 00000000..1cfcc5a3 --- /dev/null +++ b/SPECS/audit/audit.spec @@ -0,0 +1,111 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: audit +Version: 4.0.2 +Release: %autorelease +Summary: Linux kernel audit subsystem utilities +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: https://people.redhat.com/sgrubb/audit/ +#!RemoteAsset +Source: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --libexecdir=%{_libexecdir}/%{name} +BuildOption(conf): --with-apparmor +BuildOption(conf): --with-libcap-ng=no +BuildOption(conf): --disable-static +BuildOption(conf): --with-python3=no +BuildOption(conf): --disable-zos-remote + +BuildRequires: autoconf >= 2.12 +BuildRequires: linux-headers >= 2.6.30 +BuildRequires: libtool +BuildRequires: pkgconfig +Requires: gawk + +%description +The audit package contains the user space utilities for storing and +processing the records generated by the audit subsystem in the +Linux kernel. This package contains the runtime libraries and user space tools. + +%package devel +Summary: Header files for the audit framework +License: LGPL-2.1-or-later +Requires: %{name} = %{version} + +%description devel +The audit-devel package contains the header files and development libraries +needed for developing applications that use the audit framework. + +%conf -p +autoreconf -fi +export CFLAGS="%{optflags} -fno-strict-aliasing" +export CXXFLAGS="$CFLAGS" +export LDFLAGS="-Wl,-z,relro,-z,now" + +%install -a +rm -rf %{buildroot}/%{_mandir}/man[578] +mkdir -p %{buildroot}/%{_mandir}/man5 +install -m 0644 docs/libaudit.conf.5 %{buildroot}/%{_mandir}/man5 +install -m 0644 init.d/libaudit.conf %{buildroot}%{_sysconfdir} +install -D -m 0644 ./m4/audit.m4 %{buildroot}%{_datadir}/aclocal/audit.m4 + +install -d -m 750 %{buildroot}%{_sysconfdir}/audisp/plugins.d + +find %{buildroot} -type f -name "*.la" -delete -print + +# TODO: make test pass. +%check + +%ldconfig_scriptlets + +%files +%license COPYING +# Merged files from libaudit1 +%{_libdir}/libaudit.so.1 +%{_libdir}/libaudit.so.1.* +%config(noreplace) %attr(640,root,root) %{_sysconfdir}/libaudit.conf +%{_libdir}/libauparse.so.0 +%{_libdir}/libauparse.so.0.* + +%{_sbindir}/* +%{_libexecdir}/%{name}/* +%config(noreplace) %{_sysconfdir}/audit/* +%attr(750,root,root) %dir %{_sysconfdir}/audisp +%attr(750,root,root) %dir %{_sysconfdir}/audisp/plugins.d + +%{_bindir}/aulast +%{_bindir}/aulastlog +%{_bindir}/ausyscall + +%{_unitdir}/audit-rules.service +%{_unitdir}/auditd.service + +%dir %{_datadir}/audit-rules +%{_datadir}/audit-rules/*.rules +%{_datadir}/audit-rules/README-rules + +%{_mandir}/man*/* + +%files devel +%doc contrib/plugin +%{_libdir}/libaudit.so +%{_libdir}/libauparse.so +%{_includedir}/libaudit.h +%{_includedir}/audit_logging.h +%{_includedir}/audit-records.h +%{_includedir}/auparse.h +%{_includedir}/auparse-defs.h +%{_datadir}/aclocal/audit.m4 +%{_libdir}/pkgconfig/audit.pc +%{_libdir}/pkgconfig/auparse.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/authselect/authselect.spec b/SPECS/authselect/authselect.spec new file mode 100644 index 00000000..b3c15f0c --- /dev/null +++ b/SPECS/authselect/authselect.spec @@ -0,0 +1,108 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: authselect +Version: 1.6.1 +Release: %autorelease +Summary: A tool to select system authentication and identity sources +License: GPL-3.0-or-later +URL: https://github.com/authselect/authselect +#!RemoteAsset +Source: https://github.com/authselect/authselect/archive/%{version}/authselect-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --disable-static +BuildOption(conf): --with-completion-dir=%{bash_completions_dir} +BuildOption(conf): --with-pythonbin=%{__python3} +BuildOption(conf): --disable-nls + +BuildRequires: autoconf automake libtool popt-devel cmocka-devel +BuildRequires: m4 python3-devel libselinux-devel chrpath +Requires: grep sed systemd gawk coreutils findutils pam >= 1.3.1 + +%description +Authselect is a tool to configure system authentication and identity sources +from a list of supported profiles. It replaces the legacy authconfig tool. + +%package devel +Summary: Development files for the authselect library +Requires: %{name} = %{version} + +%description devel +This package contains the development library files and headers for the +authselect tool, used for developing front-ends. + + +%conf -p +autoreconf -ivf + +%install -a +# fix error 0001: file '/usr/bin/authselect' contains a standard runpath '/usr/lib64' in [/usr/lib64] +chrpath -d %{buildroot}%{_bindir}/authselect + +find %{buildroot} -type f -name "*.la" -delete -print +rm -fr %{buildroot}%{_datadir}/doc/%{name} + +%ldconfig_scriptlets + +%preun +# This script must be executed before any files are removed. +if [ $1 == 0 ] ; then + # Remove authselect symbolic links so all authselect files can be + # deleted safely. If this fail, the uninstallation must fail to avoid + # breaking the system by removing PAM files. However, the command can + # only fail if it can not write to the file system. + %{_bindir}/authselect opt-out || exit 1 +fi + +%posttrans +# If this is a new installation select the default configuration. +if [ $1 == 1 ] ; then + %{_bindir}/authselect select local --force --nobackup &> /dev/null + exit 0 +fi +# Apply any changes to profiles (validates configuration first internally) +%{_bindir}/authselect apply-changes &> /dev/null +exit 0 + +%files +%license COPYING +%doc README.md +%dir %{_sysconfdir}/authselect +%dir %{_sysconfdir}/authselect/custom +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/authselect.conf +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/dconf-db +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/dconf-locks +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/fingerprint-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/nsswitch.conf +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/password-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/postlogin +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/smartcard-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/system-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/nsswitch.conf +%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/fingerprint-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/password-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/postlogin +%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/smartcard-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/pam.d/system-auth +%dir %{_localstatedir}/lib/authselect +%ghost %attr(0755,root,root) %{_localstatedir}/lib/authselect/backups/ +%dir %{_datadir}/authselect +%dir %{_datadir}/authselect/vendor +%dir %{_datadir}/authselect/default +%{_datadir}/authselect/default/* +%{_bindir}/authselect +%{_libdir}/libauthselect.so.* + +%files devel +%{_includedir}/authselect.h +%{_libdir}/libauthselect.so +%{_libdir}/pkgconfig/authselect.pc + +%changelog +%{?autochangelog} \ No newline at end of file diff --git a/SPECS/autoconf-archive/autoconf-archive.spec b/SPECS/autoconf-archive/autoconf-archive.spec new file mode 100644 index 00000000..d6fb922a --- /dev/null +++ b/SPECS/autoconf-archive/autoconf-archive.spec @@ -0,0 +1,34 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: autoconf-archive +Version: 2024.10.16 +Release: %autorelease +Summary: A Collection of macros for GNU autoconf +License: GPL-3.0-or-later WITH Autoconf-exception-3.0 +URL: https://www.gnu.org/software/autoconf-archive/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/autoconf-archive/autoconf-archive-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/autoconf-archive/autoconf-archive-%{version}.tar.xz.sig +BuildSystem: autotools + +%description +The GNU Autoconf Archive is a collection of more than 450 macros for +GNU Autoconf that have been contributed as free software by friendly +supporters of the cause from all over the Internet. + +%files +%doc AUTHORS NEWS README TODO +%license COPYING* +%{_datadir}/aclocal/*.m4 +%{_infodir}/autoconf-archive.info* +%{_docdir}/autoconf-archive + +%changelog +%{?autochangelog} diff --git a/SPECS/autoconf/autoconf.spec b/SPECS/autoconf/autoconf.spec new file mode 100644 index 00000000..e0d0ec87 --- /dev/null +++ b/SPECS/autoconf/autoconf.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: autoconf +Version: 2.72 +Release: %autorelease +Summary: A GNU Tool for Automatically Configuring Source Code +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/autoconf +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/autoconf/autoconf-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/autoconf/autoconf-%{version}.tar.xz.sig +Patch0: autoreconf-ltdl.diff +BuildRequires: help2man +BuildRequires: m4 >= 1.4.16 +BuildArch: noarch +Requires: m4 >= 1.4.16 +Requires: perl >= 5.10 +BuildRequires: perl >= 5.10 +BuildSystem: autotools +%description +GNU Autoconf is a tool for configuring source code and makefiles. Using +autoconf, programmers can create portable and configurable packages, +because the person building the package is allowed to specify various +configuration options. + +You should install autoconf if you are developing software and would +like to create shell scripts to configure your source code packages. + +Note that the autoconf package is not required for the end user who may +be configuring software with an autoconf-generated script; autoconf is +only required for the generation of the scripts, not their use. + +%files +%doc AUTHORS NEWS README TODO +%license COPYING +%{_bindir}/* +%{_datadir}/autoconf +%{_infodir}/*.gz +%{_mandir}/man1/*.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/autoconf/autoreconf-ltdl.diff b/SPECS/autoconf/autoreconf-ltdl.diff new file mode 100644 index 00000000..f02decb6 --- /dev/null +++ b/SPECS/autoconf/autoreconf-ltdl.diff @@ -0,0 +1,21 @@ +diff -Pdpru autoconf-2.72/bin/autoreconf.in autoconf-2.72-new/bin/autoreconf.in +--- autoconf-2.72/bin/autoreconf.in 2023-12-19 22:13:19.000000000 +0100 ++++ autoconf-2.72-new/bin/autoreconf.in 2024-02-19 11:01:32.513106786 +0100 +@@ -595,6 +595,8 @@ sub autoreconf_current_directory ($) + 'AC_CONFIG_AUX_DIR', + 'AC_CONFIG_HEADERS', + 'AC_CONFIG_SUBDIRS', ++ 'AC_LIBLTDL_CONVENIENCE', ++ 'AC_LIBLTDL_INSTALLABLE', + 'AC_INIT', + 'AC_REQUIRE_AUX_FILE', + 'AC_PROG_LIBTOOL', +@@ -620,6 +622,8 @@ sub autoreconf_current_directory ($) + || $macro eq "AM_PROG_LIBTOOL" + || $macro eq "LT_INIT"; + $uses_libltdl = 1 if $macro eq "LT_CONFIG_LTDL_DIR"; ++ $uses_libltdl = 1 if $macro eq "AC_LIBLTDL_CONVENIENCE"; ++ $uses_libltdl = 1 if $macro eq "AC_LIBLTDL_INSTALLABLE"; + $uses_autoheader = 1 if $macro eq "AC_CONFIG_HEADERS"; + $uses_automake = 1 if $macro eq "AM_INIT_AUTOMAKE"; + $uses_intltool = 1 if $macro eq "IT_PROG_INTLTOOL"; diff --git a/SPECS/autofs/autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch b/SPECS/autofs/autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch new file mode 100644 index 00000000..497f68cb --- /dev/null +++ b/SPECS/autofs/autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch @@ -0,0 +1,54 @@ +autofs-5.1.9 - Fix incompatible function pointer types in cyrus-sasl module + +From: Florian Weimer + +Add casts to SASL callbacks to avoid incompatible-pointer-types +errors. Avoids a build failure with stricter compilers. + +Signed-off-by: Florian Weimer +Signed-off-by: Ian Kent +--- + CHANGELOG | 2 ++ + modules/cyrus-sasl.c | 14 +++++++------- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/CHANGELOG b/CHANGELOG +index 3e47daa12..fd9d8614a 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -1,4 +1,6 @@ + ++- Fix incompatible function pointer types in cyrus-sasl module. ++ + 02/11/2023 autofs-5.1.9 + - fix kernel mount status notification. + - fix fedfs build flags. +diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c +index e742eaf8e..78b77942b 100644 +--- a/modules/cyrus-sasl.c ++++ b/modules/cyrus-sasl.c +@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **); + static int getuser_func(void *, int, const char **, unsigned *); + + static sasl_callback_t callbacks[] = { +- { SASL_CB_USER, &getuser_func, NULL }, +- { SASL_CB_AUTHNAME, &getuser_func, NULL }, +- { SASL_CB_PASS, &getpass_func, NULL }, ++ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL }, + { SASL_CB_LIST_END, NULL, NULL }, + }; + + static sasl_callback_t debug_callbacks[] = { +- { SASL_CB_LOG, &sasl_log_func, NULL }, +- { SASL_CB_USER, &getuser_func, NULL }, +- { SASL_CB_AUTHNAME, &getuser_func, NULL }, +- { SASL_CB_PASS, &getpass_func, NULL }, ++ { SASL_CB_LOG, (int(*)(void)) &sasl_log_func, NULL }, ++ { SASL_CB_USER, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL }, ++ { SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL }, + { SASL_CB_LIST_END, NULL, NULL }, + }; + diff --git a/SPECS/autofs/autofs.spec b/SPECS/autofs/autofs.spec new file mode 100644 index 00000000..af8a830d --- /dev/null +++ b/SPECS/autofs/autofs.spec @@ -0,0 +1,103 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Summary: A tool from automatically mounting and umounting filesystems. +Name: autofs +Version: 5.1.9 +Release: %autorelease +License: GPL-2.0-or-later +#!RemoteAsset +Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz +Patch0: autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch + +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libtirpc) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(libnsl) +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: make +BuildRequires: m4 +BuildRequires: bison +BuildRequires: flex +#BuildRequires: openldap2-devel +BuildRequires: cyrus-sasl-devel +BuildRequires: openssl-devel +BuildRequires: util-linux +BuildRequires: krb5-devel +Requires: /bin/bash sed grep /bin/ps + +BuildSystem: autotools +BuildOption(conf): --with-systemd +BuildOption(conf): --disable-mount-locking +BuildOption(conf): --enable-ignore-busy +BuildOption(conf): --enable-force-shutdown +BuildOption(conf): --without-hesiod +BuildOption(conf): --with-libtirpc +BuildOption(build): DONTSTRIP=1 + +%description +autofs is a daemon which automatically mounts filesystems when you use +them, and unmounts them later when you are not using them. This can +include network filesystems, CD-ROMs, floppies, and so forth. + +%conf -p +autoreconf -fiv + +%install +install -d -m 755 $RPM_BUILD_ROOT%{_unitdir} +mkdir -p -m755 $RPM_BUILD_ROOT%{_sbindir} +mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir}/autofs +mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/{man5,man8} +mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/auto.master.d + +make install mandir=%{_mandir} INSTALLROOT=$RPM_BUILD_ROOT +echo make -C redhat +make -C redhat +install -m 644 redhat/autofs.service $RPM_BUILD_ROOT%{_unitdir}/autofs.service +install -m 644 redhat/autofs.conf $RPM_BUILD_ROOT%{_sysconfdir}/autofs.conf +install -m 644 redhat/autofs.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/autofs +install -m 644 samples/auto.master $RPM_BUILD_ROOT%{_sysconfdir}/auto.master +install -m 644 samples/auto.misc $RPM_BUILD_ROOT%{_sysconfdir}/auto.misc +install -m 755 samples/auto.net $RPM_BUILD_ROOT%{_sysconfdir}/auto.net +install -m 755 samples/auto.smb $RPM_BUILD_ROOT%{_sysconfdir}/auto.smb +install -m 600 samples/autofs_ldap_auth.conf $RPM_BUILD_ROOT%{_sysconfdir}/autofs_ldap_auth.conf + +# No tests. +%check + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%files +%defattr(-,root,root) +%doc CREDITS CHANGELOG INSTALL COPY* README* samples/ldap* samples/*.schema +%doc samples/am-utils-ldap-id.txt samples/autofs_ldap_auth.conf +%config %{_unitdir}/autofs.service +%config(noreplace) %{_sysconfdir}/auto.master +%config(noreplace) %{_sysconfdir}/autofs.conf +%config(noreplace,missingok) %{_sysconfdir}/auto.misc +%config(noreplace,missingok) %{_sysconfdir}/auto.net +%config(noreplace,missingok) %{_sysconfdir}/auto.smb +%config(noreplace) %{_sysconfdir}/sysconfig/autofs +%config(noreplace) %{_sysconfdir}/autofs_ldap_auth.conf +%{_sbindir}/automount +%{_libdir}/libautofs.so +%dir %{_libdir}/autofs +%{_libdir}/autofs/* +%{_mandir}/*/* +%dir %{_sysconfdir}/auto.master.d + +%changelog +%{?autochangelog} diff --git a/SPECS/automake/automake.spec b/SPECS/automake/automake.spec new file mode 100644 index 00000000..ae46bc2e --- /dev/null +++ b/SPECS/automake/automake.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: automake +Version: 1.18.1 +Release: %autorelease +Summary: A Program for Automatically Generating GNU-Style Makefile.in Files +# docs ~> GFDL, sources ~> GPLv2+, mkinstalldirs ~> PD and install-sh ~> MIT +License: GFDL-1.3-or-later AND GPL-2.0-or-later AND Public-Domain AND MIT +URL: https://www.gnu.org/software/automake +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/automake/automake-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/automake/automake-%{version}.tar.xz.sig + +BuildSystem: autotools +BuildRequires: autoconf >= 2.69 +BuildRequires: bison +BuildRequires: perl +BuildRequires: xz +Requires: autoconf >= 2.69 +Requires: perl +BuildArch: noarch + +%description +Automake is a tool for automatically generating "Makefile.in" files +from "Makefile.am" files. "Makefile.am" is a series of "make" macro +definitions (with rules occasionally thrown in). The generated +"Makefile.in" files are compatible with the GNU Makefile standards. + +%files +%license COPYING +%doc %{_docdir}/%{name} +%{_bindir}/* +%{_infodir}/* +%{_mandir}/man1/* +%{_datadir}/aclocal* +%{_datadir}/automake-* + +%changelog +%{?autochangelog} diff --git a/SPECS/bash-completion/bash-completion.spec b/SPECS/bash-completion/bash-completion.spec new file mode 100644 index 00000000..41cb397c --- /dev/null +++ b/SPECS/bash-completion/bash-completion.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: bash-completion +Version: 2.16.0 +Release: %autorelease +Summary: Programmable completion for Bash +License: GPL-2.0-or-later +URL: https://github.com/scop/bash-completion +#!RemoteAsset +Source0: https://github.com/scop/bash-completion/releases/download/%{version}/%{name}-%{version}.tar.xz +Source1: macros.bash-completion +BuildSystem: autotools +BuildArch: noarch + +BuildRequires: automake +BuildRequires: make + +Requires: bash + +%description +bash-completion is a collection of shell functions that take advantage +of the programmable completion feature of bash. + + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + +%install -a +# Install macros +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.bash-completion + +%files +%license COPYING +%doc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md +%doc doc/configuration.md doc/styleguide.md +%config(noreplace) %{_sysconfdir}/profile.d/bash_completion.sh +%{_sysconfdir}/bash_completion.d/000_bash_completion_compat.bash +%{_datadir}/bash-completion/ +%{_rpmconfigdir}/macros.d/macros.bash-completion + +%files devel +%{_datadir}/cmake/ +%{_datadir}/pkgconfig/bash-completion.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/bash-completion/macros.bash-completion b/SPECS/bash-completion/macros.bash-completion new file mode 100644 index 00000000..010f4d49 --- /dev/null +++ b/SPECS/bash-completion/macros.bash-completion @@ -0,0 +1,2 @@ +# Do not use %%bash_completion_dir, use %%bash_completions_dir instead!!! +%bash_completions_dir %{_datadir}/bash-completion/completions diff --git a/SPECS/bash/0001-bash-5.3-patch-1.patch b/SPECS/bash/0001-bash-5.3-patch-1.patch new file mode 100644 index 00000000..ac8fd621 --- /dev/null +++ b/SPECS/bash/0001-bash-5.3-patch-1.patch @@ -0,0 +1,38 @@ +From af693115e5bade86cc3a79b3fe7f12f88651c657 Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Thu, 28 Aug 2025 17:59:07 +0800 +Subject: [PATCH 1/3] bash-5.3 patch 1 + +--- + jobs.c | 2 +- + patchlevel.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/jobs.c b/jobs.c +index 528c90f..cbcc2c1 100644 +--- a/jobs.c ++++ b/jobs.c +@@ -3538,7 +3538,7 @@ return_procsub: + /* There aren't any dead jobs in the jobs table, but let's see if there's + one in bgpids. We can do this in posix mode because we'll remove any + one we find from the table, preserving existing semantics. */ +- if (posixly_correct && (t = bgp_findone ())) ++ if (posixly_correct && (flags & JWAIT_WAITING) == 0 && (t = bgp_findone ())) + { + pid = t->pid; + r = t->status; +diff --git a/patchlevel.h b/patchlevel.h +index 4075274..e473bd5 100644 +--- a/patchlevel.h ++++ b/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 0 ++#define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ +-- +2.50.1 + diff --git a/SPECS/bash/0002-bash-5.3-patch-2.patch b/SPECS/bash/0002-bash-5.3-patch-2.patch new file mode 100644 index 00000000..6310547a --- /dev/null +++ b/SPECS/bash/0002-bash-5.3-patch-2.patch @@ -0,0 +1,102 @@ +From 54d213daa7f6ddd46823e6f5919cfd6916886e0b Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Thu, 28 Aug 2025 17:59:22 +0800 +Subject: [PATCH 2/3] bash-5.3 patch 2 + +--- + lib/sh/anonfile.c | 37 +++---------------------------------- + patchlevel.h | 2 +- + 2 files changed, 4 insertions(+), 35 deletions(-) + +diff --git a/lib/sh/anonfile.c b/lib/sh/anonfile.c +index c3c3c69..4fe56bd 100644 +--- a/lib/sh/anonfile.c ++++ b/lib/sh/anonfile.c +@@ -25,7 +25,7 @@ + #endif + #include + +-#if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_OPEN) || defined (HAVE_SHM_MKSTEMP) ++#if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_MKSTEMP) + # include + #endif + #include +@@ -41,17 +41,7 @@ static int anonunlink (const char *); + # define MFD_NOEXEC_SEAL 0 + #endif + +-#if defined (HAVE_SHM_OPEN) +-#ifndef O_NOFOLLOW +-# define O_NOFOLLOW 0 +-#endif +- +-static int +-anonshmunlink (const char *fn) +-{ +- return (shm_unlink (fn)); +-} +- ++#if defined (HAVE_SHM_MKSTEMP) + static int + anonshmopen (const char *name, int flags, char **fn) + { +@@ -62,35 +52,14 @@ anonshmopen (const char *name, int flags, char **fn) + if (fn) + *fn = 0; + +-#if defined (HAVE_SHM_MKSTEMP) + fname = savestring ("/shm-XXXXXXXXXX"); + fd = shm_mkstemp (fname); +- if (fd < 0) +- free (fname); +-#endif +- +- if (fd < 0) +- { +- fname = sh_mktmpname (name, flags); +- fd = shm_open (fname, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600); +- } +- + if (fd < 0) + { + free (fname); + return fd; + } + +- if (shm_unlink (fname) < 0) +- { +- int o; +- o = errno; +- free (fname); +- close (fd); +- errno = o; +- return -1; +- } +- + if (fn) + *fn = fname; + else +@@ -122,7 +91,7 @@ anonopen (const char *name, int flags, char **fn) + /* Heuristic */ + flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR; + +-#if defined (HAVE_SHM_OPEN) ++#if defined (HAVE_SHM_MKSTEMP) + fd = anonshmopen (name, flag, fn); + if (fd >= 0) + return fd; /* anonshmopen sets *FN appropriately */ +diff --git a/patchlevel.h b/patchlevel.h +index e473bd5..ceabc70 100644 +--- a/patchlevel.h ++++ b/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 1 ++#define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ +-- +2.50.1 + diff --git a/SPECS/bash/0003-bash-5.3-patch-3.patch b/SPECS/bash/0003-bash-5.3-patch-3.patch new file mode 100644 index 00000000..cedacebe --- /dev/null +++ b/SPECS/bash/0003-bash-5.3-patch-3.patch @@ -0,0 +1,71 @@ +From 310f258fbe98de6ce2ed4fbadf2e72c5b6c5cc99 Mon Sep 17 00:00:00 2001 +From: misaka00251 +Date: Thu, 28 Aug 2025 17:59:30 +0800 +Subject: [PATCH 3/3] bash-5.3 patch 3 + +--- + patchlevel.h | 2 +- + subst.c | 14 +++++++++++--- + tests/quotearray.right | 2 +- + 3 files changed, 13 insertions(+), 5 deletions(-) + +diff --git a/patchlevel.h b/patchlevel.h +index ceabc70..a1609dc 100644 +--- a/patchlevel.h ++++ b/patchlevel.h +@@ -25,6 +25,6 @@ + regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh + looks for to find the patch level (for the sccs version string). */ + +-#define PATCHLEVEL 2 ++#define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ +diff --git a/subst.c b/subst.c +index e9d3e75..a8ae174 100644 +--- a/subst.c ++++ b/subst.c +@@ -3795,9 +3795,9 @@ pos_params (const char *string, int start, int end, int quoted, int pflags) + #define EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~') + #endif + +-/* We don't perform process substitution in arithmetic expressions, so don't +- bother checking for it. */ +-#define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~') ++/* We don't perform process substitution or tilde expansion in arithmetic ++ expressions, so don't bother checking for them. */ ++#define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC) + + /* If there are any characters in STRING that require full expansion, + then call FUNC to expand STRING; otherwise just perform quote +@@ -12215,6 +12215,14 @@ string_quote_removal (const char *string, int quoted) + *r++ = '\\'; + break; + } ++#if defined (ARRAY_VARS) ++ /* The only special characters that matter here are []~, since those ++ are backslash-quoted in expand_array_subscript but not dequoted ++ by the statement following this one. */ ++ if ((quoted & Q_ARITH) && (c == LBRACK || c == RBRACK || c == '~')) ++ ; /* placeholder here */ ++ else ++#endif + if (((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) && (sh_syntaxtab[c] & CBSDQUOTE) == 0) + *r++ = '\\'; + /* FALLTHROUGH */ +diff --git a/tests/quotearray.right b/tests/quotearray.right +index a3cc93a..a75ef52 100644 +--- a/tests/quotearray.right ++++ b/tests/quotearray.right +@@ -44,7 +44,7 @@ declare -A assoc=(["\` echo >&2 foo\`"]="128" [0]="0" ["]"]="12" ["x],b[\$(echo + foo + 0 + 0 +-./quotearray1.sub: line 68: 0\],b\[1: arithmetic syntax error: invalid arithmetic operator (error token is "\],b\[1") ++./quotearray1.sub: line 68: 0],b[1: arithmetic syntax error: invalid arithmetic operator (error token is "],b[1") + declare -a array + 0 + 0 +-- +2.50.1 + diff --git a/SPECS/bash/bash.spec b/SPECS/bash/bash.spec new file mode 100644 index 00000000..e81de5a8 --- /dev/null +++ b/SPECS/bash/bash.spec @@ -0,0 +1,108 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define baseversion 5.3 +%define patchlevel 3 + +Name: bash +Version: %{baseversion}.%{patchlevel} +Release: %autorelease +Summary: The GNU Bourne Again shell +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/bash +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{baseversion}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{baseversion}.tar.gz.sig +Source2: dot.bashrc +Source3: dot.bash_profile +Source4: dot.bash_logout +BuildSystem: autotools + +# Official upstream patches +# Patches are converted to apply with '-p1' +Patch1: 0001-bash-5.3-patch-1.patch +Patch2: 0002-bash-5.3-patch-2.patch +Patch3: 0003-bash-5.3-patch-3.patch + +# Other patches started from 1000 + +BuildOption(conf): --without-bash-malloc + +BuildRequires: autoconf +BuildRequires: texinfo +BuildRequires: ncurses-devel +BuildRequires: glibc-locale +BuildRequires: make + +Requires: filesystem +Provides: /bin/sh +Provides: /bin/bash + +%description +The GNU Bourne Again shell (Bash) is a shell or command language +interpreter that is compatible with the Bourne shell (sh). Bash +incorporates useful features from the Korn shell (ksh) and the C shell +(csh). Most sh scripts can be run by bash without modification. + +%package devel +Summary: Development headers for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains development headers for %{name}. + +%prep +%autosetup -n %{name}-%{baseversion} -p1 + +%conf -p +autoconf + +%build -p +bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/bin\"\' + -DSTANDARD_UTILS_PATH=\'\"/usr/bin\"\' + -DSYS_BASHRC=\'\"/etc/bash.bashrc\"\' + -DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\' + -DNON_INTERACTIVE_LOGIN_SHELLS + -std=gnu17) + +%install -a +ln -sf bash %{buildroot}%{_bindir}/sh +# user configuration file skeletons +mkdir -p %{buildroot}%{_sysconfdir}/skel +install -m 640 %{SOURCE2} %{buildroot}%{_sysconfdir}/skel/.bashrc +install -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/skel/.bash_profile +install -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/skel/.bash_logout +sed -ri '1{ s@/bin/sh@/bin/bash@ }' %{buildroot}%{_bindir}/bashbug +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + + +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%files +%config(noreplace) /etc/skel/.b* +%license COPYING +%{_bindir}/bash +%{_bindir}/sh +%{_bindir}/bashbug +%{_infodir}/bash.info* +%{_mandir}/*/* +%dir %{_datadir}/doc/* +%{_datadir}/doc/* +%{_datadir}/info/* +%doc RBASH README +%doc doc/{FAQ,INTRO,README,bash{,ref}.html} +%{_libdir}/bash/* + +%files devel +%{_includedir}/%{name} +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/bash/dot.bash_logout b/SPECS/bash/dot.bash_logout new file mode 100644 index 00000000..0e4e4f18 --- /dev/null +++ b/SPECS/bash/dot.bash_logout @@ -0,0 +1,3 @@ +# +# ~/.bash_logout +# diff --git a/SPECS/bash/dot.bash_profile b/SPECS/bash/dot.bash_profile new file mode 100644 index 00000000..5545f007 --- /dev/null +++ b/SPECS/bash/dot.bash_profile @@ -0,0 +1,5 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/SPECS/bash/dot.bashrc b/SPECS/bash/dot.bashrc new file mode 100644 index 00000000..5e6f6cc1 --- /dev/null +++ b/SPECS/bash/dot.bashrc @@ -0,0 +1,7 @@ +# +# ~/.bashrc +# + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +PS1='[\u@\h \W]\$ ' diff --git a/SPECS/bc/bc.spec b/SPECS/bc/bc.spec new file mode 100644 index 00000000..7f6754d8 --- /dev/null +++ b/SPECS/bc/bc.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: bc +Version: 1.08.2 +Release: %autorelease +Summary: GNU Command Line Calculator +License: GPL-2.0-or-later +URL: https://www.gnu.org/software/bc/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/bc/bc-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/bc/bc-%{version}.tar.gz.sig +BuildRequires: bison +BuildRequires: ed +BuildRequires: flex +BuildRequires: texinfo +BuildSystem: autotools + +%description +bc is an interpreter that supports numbers of arbitrary precision and +the interactive execution of statements. The syntax has some +similarities to the C programming language. A standard math library is +available through command line options. When used, the math library is +read in before any other input files. bc then reads in all other files +from the command line, evaluating their contents. Then bc reads from +standard input (usually the keyboard). + +The dc program is also included. dc is a calculator that supports +reverse-polish notation and allows unlimited precision arithmetic. +Macros can also be defined. Normally, dc reads from standard input but +can also read in files specified on the command line. A calculator with +reverse-polish notation saves numbers to a stack. Arguments to +mathematical operations (operands) are "pushed" onto the stack until +the next operator is read in, which "pops" its arguments off the stack +and "pushes" its results back onto the stack. + +%files +%defattr(-,root,root) +%license COPYING.LIB COPYING +%doc NEWS README FAQ +%{_bindir}/bc +%{_bindir}/dc +%{_infodir}/bc.info* +%{_infodir}/dc.info* +%{_mandir}/man1/bc.1* +%{_mandir}/man1/dc.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/beakerlib/beakerlib-tmpfiles.conf b/SPECS/beakerlib/beakerlib-tmpfiles.conf new file mode 100644 index 00000000..bf6b6192 --- /dev/null +++ b/SPECS/beakerlib/beakerlib-tmpfiles.conf @@ -0,0 +1 @@ +x /var/tmp/beakerlib-* \ No newline at end of file diff --git a/SPECS/beakerlib/beakerlib.spec b/SPECS/beakerlib/beakerlib.spec new file mode 100644 index 00000000..a61759b1 --- /dev/null +++ b/SPECS/beakerlib/beakerlib.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: beakerlib +Version: 1.31.6 +Release: %autorelease +Summary: A shell-level integration testing library +License: GPL-2.0-only +URL: https://github.com/%{name} +#!RemoteAsset +Source0: https://github.com/beakerlib/beakerlib/archive/refs/tags/1.31.6.tar.gz +Source1: %{name}-tmpfiles.conf +BuildSystem: autotools + +BuildOption(build): build +BuildOption(install): DESTDIR=%{buildroot}/usr + +BuildRequires: perl +BuildRequires: util-linux +BuildRequires: make + +Requires: /bin/bash +Requires: /bin/sh +Requires: coreutils grep gzip iproute sed tar util-linux which +Requires: /usr/bin/bc /usr/bin/time +Requires: (wget or curl) +Requires: nfs-utils +Recommends: /usr/bin/perl python3-lxml /usr/bin/xmllint + +%description +The BeakerLib project provides a library of shell functions to be used for +writing operating system level integration tests. + +%package vim-syntax +Summary: Files for syntax highlighting BeakerLib tests in VIM editor +Requires: vim +BuildRequires: vim +BuildRequires: make + +%description vim-syntax +Files for syntax highlighting BeakerLib tests in VIM editor + +# No configure +%conf + +%install -a +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf + +%files +%dir %{_datadir}/beakerlib +%dir %{_datadir}/beakerlib/xslt-templates +%{_datadir}/beakerlib/dictionary.vim +%{_datadir}/beakerlib/*.sh +%{_datadir}/beakerlib/xslt-templates/* +%{_bindir}/beakerlib-* +%{_mandir}/man1/beakerlib*1* +%doc %{_docdir}/beakerlib +%config %{_tmpfilesdir}/beakerlib.conf + +%files vim-syntax +%{_datadir}/vim/vimfiles/after/ftdetect/beakerlib.vim +%{_datadir}/vim/vimfiles/after/syntax/beakerlib.vim + +%changelog +%{?autochangelog} diff --git a/SPECS/bindfs/bindfs.spec b/SPECS/bindfs/bindfs.spec new file mode 100644 index 00000000..f64911bf --- /dev/null +++ b/SPECS/bindfs/bindfs.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: bindfs +Version: 1.17.7 +Release: %autorelease +Summary: A FUSE filesystem for mirroring a directory with altered permissions +License: GPL-2.0-or-later +URL: https://bindfs.org/ +#!RemoteAsset +Source: https://bindfs.org/downloads/bindfs-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: fuse-devel +BuildRequires: gcc +BuildRequires: make +BuildRequires: autoconf automake + +Requires: fuse + +%description +bindfs is a FUSE filesystem for mirroring a directory to another directory +and altering permission bits in the mirror. + +# TODO: enabel when we have ruby. +%check + + +%files +%doc ChangeLog README.md +%license COPYING +%{_bindir}/bindfs +%{_mandir}/man1/bindfs.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/binutils/binutils.spec b/SPECS/binutils/binutils.spec new file mode 100644 index 00000000..5d526936 --- /dev/null +++ b/SPECS/binutils/binutils.spec @@ -0,0 +1,174 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# disable libalternatives for now until it's changed to not +# introduce cmake/cunit-tests into the bootstrap cycle +%bcond libalternatives 0 + +%bcond bootstrap 1 + +Name: binutils +Summary: GNU Binutils +License: GFDL-1.3-only AND GPL-3.0-or-later +Version: 2.45 +Release: %autorelease +URL: https://www.gnu.org/software/binutils/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2 +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2.sig +BuildRequires: gcc-c++ +BuildRequires: bison +BuildRequires: dejagnu +BuildRequires: flex +# for the testsuite +BuildRequires: glibc-static +BuildRequires: texinfo +BuildRequires: zlib-devel-static +BuildRequires: libzstd-devel +%if %{with libalternatives} +Requires: alts +%else +PreReq: update-alternatives +%endif + +BuildSystem: autotools +BuildOption(build): -C build-dir + +%description +C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib, +size, strings, and strip. These utilities are needed whenever you want +to compile a program or kernel. + +%package devel +Summary: GNU binutils (BFD development files) +License: GPL-3.0-or-later +Group: Development/Libraries/C and C++ +Requires: binutils = %{version}-%{release} +Requires: zlib-devel +Requires: libzstd-devel +Provides: binutils:${%_includedir}/bfd.h + +%description devel +This package includes header files and static libraries necessary to +build programs which use the GNU BFD library, which is part of +binutils. + +%conf +%define _configure ../configure +mkdir build-dir +cd build-dir +%configure --with-bugurl=%{_vendor_bug_url} \ + --with-separate-debug-dir=%{_prefix}/lib/debug \ + --with-pic --with-system-zlib \ + --enable-plugins \ + --enable-threads \ + --enable-compressed-debug-sections=gas \ + --enable-new-dtags \ + --enable-default-hash-style=both \ + --enable-compressed-debug-sections=all \ + --enable-shared \ +%if %{with bootstrap} && 0%{?do_profiling} + --enable-pgo-build=lto \ +%endif + --enable-colored-disassembly +%undefine _configure + + +%install +cd build-dir +make DESTDIR=%{buildroot} install-info install +make DESTDIR=%{buildroot} install-bfd install-opcodes +if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then + mv "%{buildroot}/%_bindir"/{ld,ld.bfd}; +else + rm -f "%{buildroot}/%_bindir/ld"; +fi +%if ! 0%{with libalternatives} +mkdir -p "%{buildroot}/%_sysconfdir/alternatives"; +# Keep older versions of brp-symlink happy +ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld"; +%else +ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld"; +mkdir -p %{buildroot}%{_datadir}/libalternatives/ld; +cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf < +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: bison +Version: 3.8.2 +Release: %autorelease +Summary: The GNU Parser Generator +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +URL: https://www.gnu.org/software/bison/bison.html +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/bison/bison-%{version}.tar.xz +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/bison/bison-%{version}.tar.xz.sig + +BuildSystem: autotools + +BuildRequires: flex +BuildRequires: gcc-c++ +Requires: m4 + +%description +Bison is a parser generator similar to yacc(1). + +%install -a +%find_lang bison-runtime --all-name --generate-subpackages + +%files +%license COPYING +%doc AUTHORS NEWS README THANKS TODO +%exclude %{_docdir}/%{name}/COPYING +%exclude %{_docdir}/%{name}/AUTHORS +%exclude %{_docdir}/%{name}/NEWS +%exclude %{_docdir}/%{name}/README +%exclude %{_docdir}/%{name}/THANKS +%exclude %{_docdir}/%{name}/TODO +%doc %{_docdir}/%{name}/examples +%dir %{_datadir}/aclocal +%{_bindir}/bison +%{_bindir}/yacc +%{_libdir}/liby.a +%{_datadir}/bison +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/bison-i18n.m4 +%{_infodir}/bison.info*.gz +%{_mandir}/man1/bison.1%{?ext_man} +%{_mandir}/man1/yacc.1%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/blake3/blake3.spec b/SPECS/blake3/blake3.spec new file mode 100644 index 00000000..19bb5efd --- /dev/null +++ b/SPECS/blake3/blake3.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: blake3 +Version: 1.8.2 +Release: %autorelease +Summary: Official C implementation of the BLAKE3 cryptographic hash function + +License: Apache-2.0 +URL: https://github.com/BLAKE3-team/BLAKE3/ +#!RemoteAsset +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libasan8 libubsan1 +# tbb is not enabled, will be supported in the future +BuildSystem: cmake +BuildOption(conf): -S c + +%description +BLAKE3 is a cryptographic hash function that is: +- Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2. +- Secure, unlike MD5 and SHA-1. And secure against length extension, unlike + SHA-2. +- Highly parallelizable across any number of threads and SIMD lanes, because + it's a Merkle tree on the inside. +- Capable of verified streaming and incremental updates, again because it's a + Merkle tree. +- A PRF, MAC, KDF, and XOF, as well as a regular hash. +- One algorithm with no variants, which is fast on x86-64 and also on smaller + architectures. + +%package devel +Summary: %{summary} - development files +Requires: %{name} + +%description devel +Development files for the %{name} library. + +%build -p +export ASMFLAGS="%{build_cflags}" + +%files +%license LICENSE_A2 +%{_libdir}/libblake3.so.0 +%{_libdir}/libblake3.so.%{version} + +%files devel +%doc c/example.c +%doc c/README.md +%{_includedir}/blake3.h +%{_libdir}/libblake3.so +%{_libdir}/cmake/blake3/ +%{_libdir}/pkgconfig/libblake3.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/bluez/bluez.spec b/SPECS/bluez/bluez.spec new file mode 100644 index 00000000..4097695d --- /dev/null +++ b/SPECS/bluez/bluez.spec @@ -0,0 +1,232 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond deprecated 0 + +Name: bluez +Version: 5.84 +Release: %autorelease +Summary: Bluetooth tools and daemons +License: GPL-2.0-or-later +URL: http://www.bluez.org/ +#!RemoteAsset +Source: https://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --enable-tools --enable-library --enable-external-ell +BuildOption(conf): --disable-optimization +%if %{with deprecated} +BuildOption(conf): --enable-deprecated +%endif +BuildOption(conf): --enable-sixaxis --enable-cups --enable-nfc --enable-mesh +BuildOption(conf): --enable-hid2hci --enable-testing --enable-experimental +BuildOption(conf): --enable-bap --enable-bass --enable-mcp --enable-micp +BuildOption(conf): --enable-csip --enable-vcp +BuildOption(conf): --with-systemdsystemunitdir=%{_unitdir} +BuildOption(conf): --with-systemduserunitdir=%{_userunitdir} +BuildOption(conf): --disable-manpages + +BuildRequires: dbus-devel >= 1.6 glib-devel libical-devel +BuildRequires: make readline-devel json-c-devel systemd-devel systemd +BuildRequires: cups-devel libtool automake autoconf pkgconfig +BuildRequires: pkgconfig(ell) +BuildRequires: systemd-rpm-macros + +Requires: dbus >= 1.6 +%systemd_requires + +%description +Utilities for use in Bluetooth applications. This is the main package containing +the core daemon and utilities. + +%package cups +Summary: CUPS printer backend for Bluetooth printers +Requires: %{name} = %{version} +%description cups +This package contains the CUPS backend for Bluetooth printers. + +%if %{with deprecated} +%package deprecated +Summary: Deprecated Bluetooth applications +Requires: %{name} = %{version} +%description deprecated +Deprecated Bluetooth utilities like hciconfig, hcitool, etc. +%endif + +%package devel +Summary: Development libraries for Bluetooth applications +Requires: %{name} = %{version} + +%description devel +Development libraries and headers for use in Bluetooth applications. + +%package hid2hci +Summary: Put HID proxying bluetooth HCI's into HCI mode +Requires: %{name} = %{version} + +%description hid2hci +Utility to switch supported Bluetooth devices into regular HCI mode. + +%package mesh +Summary: Bluetooth mesh services +Requires: %{name} = %{version} + +%description mesh +Services for Bluetooth mesh networking. + +%package obexd +Summary: Object Exchange daemon for sharing content +Requires: %{name} = %{version} + +%description obexd +Object Exchange daemon for sharing files, contacts etc over Bluetooth. + +%conf -p +autoreconf -vif + +%install -a + +# "make install" fails to install gatttool, necessary for Bluetooth Low Energy +# Red Hat Bugzilla bug #1141909, Debian bug #720486 +%if %{with deprecated} +install -m0755 attrib/gatttool %{buildroot}%{_bindir} +%endif + +# "make install" fails to install avinfo +# Red Hat Bugzilla bug #1699680 +install -m0755 tools/avinfo %{buildroot}%{_bindir} + +# btmgmt is not installed by "make install", but it is useful for debugging +# some issues and to set the MAC address on HCIs which don't have their +# MAC address configured +install -m0755 tools/btmgmt %{buildroot}%{_bindir} + +find %{buildroot} -name '*.la' -delete + +# Remove the cups backend from libdir, and install it in /usr/lib whatever the install +if test -d %{buildroot}/usr/lib64/cups ; then + install -D -m0755 %{buildroot}/usr/lib64/cups/backend/bluetooth %{buildroot}%_cups_serverbin/backend/bluetooth + rm -rf %{buildroot}%{_libdir}/cups +fi + +rm -f ${RPM_BUILD_ROOT}/%{_sysconfdir}/udev/*.rules ${RPM_BUILD_ROOT}/usr/lib/udev/rules.d/*.rules +install -D -p -m0644 tools/hid2hci.rules %{buildroot}/%{_udevrulesdir}/97-hid2hci.rules +install -d -m0755 %{buildroot}/%{_localstatedir}/lib/bluetooth/mesh + +#copy bluetooth config files +install -D -p -m0644 src/main.conf %{buildroot}/etc/bluetooth/main.conf +install -D -p -m0644 mesh/mesh-main.conf %{buildroot}/etc/bluetooth/mesh-main.conf +install -D -p -m0644 profiles/input/input.conf %{buildroot}/etc/bluetooth/input.conf +install -D -p -m0644 profiles/network/network.conf %{buildroot}/etc/bluetooth/network.conf +install -d -m 755 %{buildroot}%{_libexecdir}/bluetooth/ + +# Install the HCI emulator, useful for testing +install emulator/btvirt %{buildroot}/%{_libexecdir}/bluetooth/ + +%post +/sbin/ldconfig +%systemd_post bluetooth.service + +%preun +%systemd_preun bluetooth.service + +%postun +/sbin/ldconfig +%systemd_postun_with_restart bluetooth.service + +%post hid2hci +/sbin/udevadm trigger --subsystem-match=usb + +%post mesh +%systemd_user_post bluetooth-mesh.service + +%preun mesh +%systemd_user_preun bluetooth-mesh.service + +%post obexd +%systemd_user_post obex.service + +%preun obexd +%systemd_user_preun obex.service + +%files +%license COPYING +%doc AUTHORS ChangeLog +%attr(0555, root, root) %dir %{_sysconfdir}/bluetooth +%config(noreplace) %{_sysconfdir}/bluetooth/main.conf +%config(noreplace) %{_sysconfdir}/bluetooth/input.conf +%config(noreplace) %{_sysconfdir}/bluetooth/network.conf +%{_bindir}/avinfo +%{_bindir}/bluemoon +%{_bindir}/bluetoothctl +%{_bindir}/btattach +%{_bindir}/btmgmt +%{_bindir}/btmon +%{_bindir}/hex2hcd +%{_bindir}/mpris-proxy +%dir %{_libexecdir}/bluetooth +%{_libexecdir}/bluetooth/bluetoothd +%attr(0700, root, root) %dir %{_localstatedir}/lib/bluetooth +%dir %{_localstatedir}/lib/bluetooth/mesh +%{_datadir}/dbus-1/system.d/bluetooth.conf +%{_datadir}/dbus-1/system-services/org.bluez.service +%{_unitdir}/bluetooth.service +%{_userunitdir}/mpris-proxy.service +%{_datadir}/zsh/site-functions/_bluetoothctl +%{_libdir}/libbluetooth.so.* + +%if %{with deprecated} +%files deprecated +%{_bindir}/ciptool +%{_bindir}/gatttool +%{_bindir}/hciattach +%{_bindir}/hciconfig +%{_bindir}/hcidump +%{_bindir}/hcitool +%{_bindir}/meshctl +%{_bindir}/rfcomm +%{_bindir}/sdptool +%endif + + +%files devel +%doc doc/*txt +%{_bindir}/isotest +%{_bindir}/l2test +%{_bindir}/l2ping +%{_bindir}/rctest +%{_libdir}/libbluetooth.so +%{_includedir}/bluetooth +%{_libdir}/pkgconfig/bluez.pc +%dir %{_libexecdir}/bluetooth +%{_libexecdir}/bluetooth/btvirt + +%files cups +%_cups_serverbin/backend/bluetooth +%files hid2hci +/usr/lib/udev/hid2hci +%{_udevrulesdir}/97-hid2hci.rules + +%files mesh +%config(noreplace) %{_sysconfdir}/bluetooth/mesh-main.conf +%{_bindir}/mesh-cfgclient +%{_bindir}/mesh-cfgtest +%{_datadir}/dbus-1/system.d/bluetooth-mesh.conf +%{_datadir}/dbus-1/system-services/org.bluez.mesh.service +%{_libexecdir}/bluetooth/bluetooth-meshd +%{_unitdir}/bluetooth-mesh.service +%{_localstatedir}/lib/bluetooth/mesh + +%files obexd +%{_libexecdir}/bluetooth/obexd +%{_datadir}/dbus-1/services/org.bluez.obex.service +/usr/lib/systemd/user/dbus-org.bluez.obex.service +%{_datadir}/dbus-1/system.d/obex.conf +%{_userunitdir}/obex.service + +%changelog +%{?autochangelog} diff --git a/SPECS/boost/0001-boost-1.81.0-build-optflags.patch b/SPECS/boost/0001-boost-1.81.0-build-optflags.patch new file mode 100644 index 00000000..23d1099a --- /dev/null +++ b/SPECS/boost/0001-boost-1.81.0-build-optflags.patch @@ -0,0 +1,71 @@ +From ebc90bc3e372dc8e5db21f79d2a79e4f5c4d01ee Mon Sep 17 00:00:00 2001 +From: Patrick Palka +Date: Mon, 4 Dec 2023 09:24:20 -0500 +Subject: [PATCH] Adjust options for Fedora package build + +--- + tools/build/src/tools/gcc.jam | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index 834f5e1bf..c753afc23 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -513,7 +513,7 @@ rule compile.fortran ( targets * : sources * : properties * ) + + actions compile.c++ bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) $(INCLUDE-GCH)$(_)"$(PCH_FILE:S=)" $(INCLUDE-PCH)$(_)"$(PCH_FILE)" -I"$(INCLUDES)" -include$(_)"$(FORCE_INCLUDES)" -c -o "$(<)" "$(>:T)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) $(INCLUDE-GCH)$(_)"$(PCH_FILE:S=)" $(INCLUDE-PCH)$(_)"$(PCH_FILE)" -I"$(INCLUDES)" -include$(_)"$(FORCE_INCLUDES)" -c -o "$(<)" "$(>:T)" + } + + actions compile.c bind PCH_FILE +@@ -523,7 +523,7 @@ actions compile.c bind PCH_FILE + + actions compile.c++.preprocess bind PCH_FILE + { +- "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-$(TEMPLATE_DEPTH) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) $(INCLUDE-GCH)$(_)"$(PCH_FILE:S=)" $(INCLUDE-PCH)$(_)"$(PCH_FILE)" -I"$(INCLUDES)" -include$(_)"$(FORCE_INCLUDES)" "$(>:T)" -E >"$(<)" ++ "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) $(INCLUDE-GCH)$(_)"$(PCH_FILE:S=)" $(INCLUDE-PCH)$(_)"$(PCH_FILE)" -I"$(INCLUDES)" -include$(_)"$(FORCE_INCLUDES)" "$(>:T)" -E >"$(<)" + } + + actions compile.c.preprocess bind PCH_FILE +@@ -627,22 +627,22 @@ actions compile.c.pch + ### + + # Declare flags and action for compilation. +-toolset.flags gcc.compile OPTIONS off : -O0 ; +-toolset.flags gcc.compile OPTIONS speed : -O3 ; +-toolset.flags gcc.compile OPTIONS space : -Os ; +-toolset.flags gcc.compile OPTIONS minimal : -O1 ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS speed : ; ++toolset.flags gcc.compile OPTIONS space : ; ++toolset.flags gcc.compile OPTIONS minimal : ; + toolset.flags gcc.compile OPTIONS debug : -Og ; + +-toolset.flags gcc.compile OPTIONS off : -fno-inline ; +-toolset.flags gcc.compile OPTIONS on : -Wno-inline ; +-toolset.flags gcc.compile OPTIONS full : -finline-functions -Wno-inline ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS full : ; + +-toolset.flags gcc.compile OPTIONS off : -w ; +-toolset.flags gcc.compile OPTIONS on : -Wall ; +-toolset.flags gcc.compile OPTIONS all : -Wall ; +-toolset.flags gcc.compile OPTIONS extra : -Wall -Wextra ; +-toolset.flags gcc.compile OPTIONS pedantic : -Wall -Wextra -pedantic ; +-toolset.flags gcc.compile OPTIONS on : -Werror ; ++toolset.flags gcc.compile OPTIONS off : ; ++toolset.flags gcc.compile OPTIONS on : ; ++toolset.flags gcc.compile OPTIONS all : ; ++toolset.flags gcc.compile OPTIONS extra : ; ++toolset.flags gcc.compile OPTIONS pedantic : ; ++toolset.flags gcc.compile OPTIONS on : ; + + toolset.flags gcc.compile OPTIONS on : -g ; + toolset.flags gcc.compile OPTIONS on : -pg ; +-- +2.43.0 + + diff --git a/SPECS/boost/0002-boost-1.78.0-no-rpath.patch b/SPECS/boost/0002-boost-1.78.0-no-rpath.patch new file mode 100644 index 00000000..fe67421a --- /dev/null +++ b/SPECS/boost/0002-boost-1.78.0-no-rpath.patch @@ -0,0 +1,29 @@ +--- boost_1_73_0/tools/boost_install/boost-install.jam~ 2020-04-24 20:21:50.330267122 +0100 ++++ boost_1_73_0/tools/boost_install/boost-install.jam 2020-04-24 20:22:16.818360540 +0100 +@@ -652,25 +652,6 @@ + "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)" + : true ; + +- if [ path.is-rooted $(cmakedir) ] +- { +- local cmakedir-native = [ path-native-fwd $(cmakedir) ] ; +- +- print.text +- +- "" +- "# If the computed and the original directories are symlink-equivalent, use original" +- "if(EXISTS \"$(cmakedir-native)\")" +- " get_filename_component(_BOOST_CMAKEDIR_ORIGINAL \"$(cmakedir-native)\" REALPATH)" +- " if(_BOOST_CMAKEDIR STREQUAL _BOOST_CMAKEDIR_ORIGINAL)" +- " set(_BOOST_CMAKEDIR \"$(cmakedir-native)\")" +- " endif()" +- " unset(_BOOST_CMAKEDIR_ORIGINAL)" +- "endif()" +- "" +- : true ; +- } +- + get-dir "_BOOST_INCLUDEDIR" : $(includedir) ; + + if $(library-type) = INTERFACE + diff --git a/SPECS/boost/0003-boost-1.78.0-b2-build-flags.patch b/SPECS/boost/0003-boost-1.78.0-b2-build-flags.patch new file mode 100644 index 00000000..a845cf5c --- /dev/null +++ b/SPECS/boost/0003-boost-1.78.0-b2-build-flags.patch @@ -0,0 +1,26 @@ +From 1ded9b9c219542442b3c10af815e5413a2a89c75 Mon Sep 17 00:00:00 2001 +From: Thomas W Rodgers +Date: Tue, 1 Mar 2022 10:03:34 -0800 +Subject: [PATCH] Adjust b2 build flags for Fedora Packaging + +--- + src/engine/build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh +index f1ad08cb..ab58deba 100755 +--- a/tools/build/src/engine/build.sh ++++ b/tools/build/src/engine/build.sh +@@ -323,7 +323,7 @@ case "${B2_TOOLSET}" in + + gcc|gcc-*) + CXX_VERSION_OPT=${CXX_VERSION_OPT:---version} +- B2_CXXFLAGS_RELEASE="-O2 -s" ++ B2_CXXFLAGS_RELEASE="${CXXFLAGS} ${LDFLAGS}" + B2_CXXFLAGS_DEBUG="-O0 -g" + ;; + +-- +2.35.1 + + diff --git a/SPECS/boost/b2.1 b/SPECS/boost/b2.1 new file mode 100644 index 00000000..130814b9 --- /dev/null +++ b/SPECS/boost/b2.1 @@ -0,0 +1,144 @@ +.TH "b2" 1 "Sat Nov 19 2011" "Doxygen" \" -*- nroff -*- +.ad l +.nh +.SH NAME +b2 \- Command-line utility to build Boost-related C++ projects with Boost\&.Build +.SH "SYNOPSIS" +.PP +\fBb2\fP \fC[-a] [-dx] [-fx] [-jx] [-lx] [-n] [-ox] [-px] [-q] [-sx=y] [-tx] [-v] [--x]\fP +.PP +\fIb2\fP accepts the following options: +.PP +\fB-a\fP +.br + Build all targets, even if they are current +.PP +\fB-dx\fP +.br + Set the debug level to x (0-9) +.PP +\fB-fx\fP +.br + Read x instead of Jambase +.PP +\fB-jx\fP +.br + Run up to x shell commands concurrently +.PP +\fB-lx\fP +.br + Limit actions to x number of seconds after which they are stopped +.PP +\fB-n\fP +.br + Don't actually execute the updating actions +.PP +\fB-ox\fP +.br + Write the updating actions to file x +.PP +\fB-px\fP +.br + x=0, pipes action stdout and stderr merged into action output +.PP +\fB-q\fP +.br + Quit quickly as soon as a target fails +.PP +\fB-sx=y\fP +.br + Set variable x=y, overriding environment +.PP +\fB-tx\fP +.br + Rebuild x, even if it is up-to-date +.PP +\fB-v\fP +.br + Print the version of b2 and exit +.PP +\fB--x\fP +.br + Option is ignored +.SH "DESCRIPTION" +.PP +This section provides the information necessary to create your own projects using \fIBoost\&.Build\fP The information provided here is relatively high-level, and Chapter 6, Reference as well as the on-line help system must be used to obtain low-level documentation (see --help) +.PP +\fIBoost\&.Build\fP actually consists of two parts - \fIBoost\&.Jam\fP, a build engine with its own interpreted language, and \fIBoost\&.Build\fP itself, implemented in \fIBoost\&.Jam's\fP language\&. The chain of events when you type b2 on the command line is as follows: +.IP "\(bu" 2 +\fIBoost\&.Jam\fP tries to find \fIBoost\&.Build\fP and loads the top-level module\&. The exact process is described in the section called “Initialization” +.PP +.PP +.IP "\(bu" 2 +The top-level module loads user-defined configuration files, \fIuser-config\&.jam\fP and \fIsite-config\&.jam\fP, which define available toolsets +.PP +.PP +.IP "\(bu" 2 +The \fIJamfile\fP in the current directory is read That in turn might cause reading of further Jamfiles\&. As a result, a tree of projects is created, with targets inside projects +.PP +.PP +.IP "\(bu" 2 +Finally, using the build request specified on the command line, \fIBoost\&.Build\fP decides which targets should be built and how\&. That information is passed back to \fIBoost\&.Jam\fP, which takes care of actually running the scheduled build action commands +.PP +.PP +So, to be able to successfully use \fIBoost\&.Build\fP, you need to know only four things: +.IP "\(bu" 2 +How to configure \fIBoost\&.Build\fP (http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html) +.IP "\(bu" 2 +How to declare targets in Jamfiles (http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html) +.IP "\(bu" 2 +How the build process works (http://www.boost.org/boost-build2/doc/html/bbv2/overview/build_process.html) +.PP +.PP +Some Basics about the \fIBoost\&.Jam\fP language\&. See the section called “Boost\&.Jam Language” (http://www.boost.org/boost-build2/doc/html/bbv2/overview/jam_language.html) +.SH "CONCEPTS" +.PP +\fIBoost\&.Build\fP has a few unique concepts that are introduced in this section\&. The best way to explain the concepts is by comparison with more classical build tools +.PP +When using any flavour of make, you directly specify targets and commands that are used to create them from other target\&. The below example creates a\&.o from a\&.c using a hardcoded compiler invocation command +.PP +a\&.o: a\&.c +.br + g++ -o a\&.o -g a\&.c +.PP +This is rather low-level description mechanism and it is hard to adjust commands, options, and sets of created targets depending on the used compiler and operating system\&. +.PP +To improve portability, most modern build system provide a set of higher-level functions that can be used in build description files\&. Consider this example: +.PP +add_program ('a', 'a\&.c') +.br +.PP +This is a function call that creates targets necessary to create executable file from source file a\&.c\&. Depending on configured properties, different commands line may be used\&. However, \fIadd_program\fP is higher-level, but rather thin level All targets are created immediately when build description is parsed, which makes it impossible to perform multi-variant builds\&. Often, change in any build property requires complete reconfiguration of the build tree +.PP +In order to support true multivariant builds, Boost\&.Build introduces the concept of metatarget—object that is created when build description is parsed and can be later called with specific build properties to generate actual targets +.PP +Consider an example: +.PP +exe a : a\&.cpp ; +.br +.PP +When this declaration is parsed, \fIBoost\&.Build\fP creates a metatarget, but does not yet decides what files must be created, or what commands must be used\&. After all build files are parsed, Boost\&.Build considers properties requested on the command line\&. Supposed you have invoked \fIBoost\&.Build\fP with: +.PP +\fIb2\fP toolset=gcc toolset=msvc +.br +.PP +In that case, the metatarget will be called twice, once with toolset=gcc and once with toolset=msvc\&. Both invocations will produce concrete targets, that will have different extensions and use different command lines\&. Another key concept is build property\&. Build property is a variable that affects the build process\&. It can be specified on the command line, and is passed when calling a metatarget +.PP +While all build tools have a similar mechanism, \fIBoost\&.Build\fP differs by requiring that all build properties are declared in advance, and providing a large set of properties with portable semantics +.PP +The final concept is property propagation\&. Boost\&.Build does not require that every metatarget is called with the same properties\&. Instead, the 'top-level' metatargets are called with the properties specified on the command line Each metatarget can elect to augment or override some properties (in particular, using the requirements mechanism, see the section called “Requirements”: http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html#bbv2.overview.targets.requirements) Then, the dependency metatargets are called with modified properties and produce concrete targets that are then used in build process Of course, dependency metatargets maybe in turn modify build properties and have dependencies of their own\&. +.PP +For more in-depth treatment of the requirements and concepts, you may refer to SYRCoSE 2009 Boost\&.Build article (http://syrcose.ispras.ru/2009/files/04_paper.pdf)\&. +.SH "SEE ALSO" +.PP +\fBboost-libraries\fP(3) +.SH "SUPPORT" +.PP +Please report any bugs to https://svn.boost.org/trac/boost/ +.SH "COPYRIGHT" +.PP +Boost Software License - Version 1\&.0 - August 17th, 2003 +.PP +See the LICENSE_1_0\&.txt file for more information on that license, or directly on Internet: +.br + http://www.boost.org/LICENSE_1_0.txt diff --git a/SPECS/boost/boost.spec b/SPECS/boost/boost.spec new file mode 100644 index 00000000..fcf8902e --- /dev/null +++ b/SPECS/boost/boost.spec @@ -0,0 +1,141 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: haswell +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# works strangely if implemented with: +# %define version_enc %(echo "%{version}"|tr \. _) +%define version_enc 1_89_0 + +Name: boost +Summary: The free peer-reviewed portable C++ source libraries +Version: 1.89.0 +Release: %autorelease +License: BSL-1.0 AND MIT AND Python-2.0.1 +URL: http://www.boost.org +#!RemoteAsset +Source0: https://archives.boost.io/release/%{version}/source/%{name}_%{version_enc}.tar.gz +Source1: b2.1 +# Adjusting build optimization flags for rpm build +Patch0: 0001-boost-1.81.0-build-optflags.patch +# Remove rpath from builds +Patch1: 0002-boost-1.78.0-no-rpath.patch +# Modify b2 build flags +Patch2: 0003-boost-1.78.0-b2-build-flags.patch + +# to make this package usable ASAP, boost-mpi, boost-numpy +# boost-mpich is not built +BuildRequires: gcc-c++ +BuildRequires: libstdc++-devel +BuildRequires: bzip2-devel +BuildRequires: zlib-devel +BuildRequires: xz-devel +BuildRequires: python3-devel +BuildRequires: icu4c-devel +BuildRequires: bison +BuildRequires: zstd-devel +# use autotools to reduce abundant % procedures +# boost uses its own build system called b2, however +BuildSystem: autotools + +%description +Boost provides free peer-reviewed portable C++ source libraries. The +emphasis is on libraries which work well with the C++ Standard +Library, in the hopes of establishing "existing practice" for +extensions and providing reference implementations so that the Boost +libraries are suitable for eventual standardization. (Some of the +libraries have already been included in the C++ 2011 standard and +others have been proposed to the C++ Standards Committee for inclusion +in future standards.) + +%package build +Summary: Cross platform build system for C++ projects + +%description build +Boost.Build is an easy way to build C++ projects, everywhere. You name +your pieces of executable and libraries and list their sources. Boost.Build +takes care about compiling your sources with the right options, +creating static and shared libraries, making pieces of executable, and other +chores -- whether you are using GCC, MSVC, or a dozen more supported +C++ compilers -- on Windows, OSX, Linux and commercial UNIX systems. + +%package devel +Summary: The Boost C++ headers and shared development libraries +Requires: %{name} +Requires: icu4c-devel + +%description devel +Headers and shared object symbolic links for the Boost C++ libraries. + +%conf +./bootstrap.sh --with-icu +%set_build_flags +cat > ./tools/build/src/user-config.jam << EOF +import os ; +# use build system flags +local CXXFLAGS = [ os.environ CXXFLAGS ] ; +local LDFLAGS = [ os.environ LDFLAGS ] ; +using gcc : : : %(CXXFLAGS) %(LDFLAGS) ; +# help build system to find python3 +using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version} : : : ; +EOF + +%build +./b2 -d+2 -q %{?_smp_mflags} \ + --without-mpi --without-graph_parallel --build-dir=out \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} \ + stage +# build Boost.build +pushd tools/build +./bootstrap.sh +popd + +%install +./b2 -d+2 -q %{?_smp_mflags} \ + --without-mpi --without-graph_parallel --build-dir=out \ + --prefix=%{buildroot}%{_prefix} \ + --libdir=%{buildroot}%{_libdir} \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} \ + install + +# install Boost.build +pushd tools/build +./b2 --prefix=%{buildroot}%{_prefix} --bindir=%{buildroot}%{_bindir} install + +# rename b2 to boost-build while keeping a symlink +mv %{buildroot}%{_datadir}/b2 %{buildroot}%{_datadir}/boost-build +pushd %{buildroot}%{_datadir} +ln -s ./boost-build b2 +popd +popd + +# install b2 man pages +install -p -m 644 %{SOURCE1} -D %{buildroot}%{_mandir}/man1/b2.1 +mkdir -p %{buildroot}%{_docdir}/boost + +# cleanup unnecessary files +rm -rf %{buildroot}%{_libdir}/lib*.a +rm -rf %{buildroot}%{_datadir}/boost_predef + +%files +%license LICENSE_1_0.txt +%{_libdir}/lib*.so* + +%files build +%license LICENSE_1_0.txt +%{_datadir}/%{name}-build/ +%{_datadir}/b2 +%{_bindir}/b2 +%{_mandir}/man1/b2.1* + +%files devel +%license LICENSE_1_0.txt +%{_includedir}/%{name} +%{_libdir}/cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/boringssl/Fix-install-cmake-prefix-path.patch b/SPECS/boringssl/Fix-install-cmake-prefix-path.patch new file mode 100644 index 00000000..642a937f --- /dev/null +++ b/SPECS/boringssl/Fix-install-cmake-prefix-path.patch @@ -0,0 +1,12 @@ +--- boringssl-0.20251002.0/CMakeLists.txt ++++ boringssl-0.20251002.0/CMakeLists.txt +@@ -803,6 +803,6 @@ if(INSTALL_ENABLED) + install(EXPORT OpenSSLTargets + FILE OpenSSLTargets.cmake + NAMESPACE OpenSSL:: +- DESTINATION lib/cmake/OpenSSL) +- install(FILES cmake/OpenSSLConfig.cmake DESTINATION lib/cmake/OpenSSL) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenSSL) ++ install(FILES cmake/OpenSSLConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenSSL) + endif() + diff --git a/SPECS/boringssl/boringssl.spec b/SPECS/boringssl/boringssl.spec new file mode 100644 index 00000000..78e88555 --- /dev/null +++ b/SPECS/boringssl/boringssl.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Julian Zhu +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: boringssl +Version: 0.20251002.0 +Release: %autorelease +Summary: Fork of OpenSSL that is designed to meet Google's needs. +License: Apache-2.0 +URL: https://boringssl.googlesource.com/boringssl/ +#!RemoteAsset +Source: https://github.com/google/boringssl/releases/download/%{version}/%{name}-%{version}.tar.gz + +Patch1: Fix-install-cmake-prefix-path.patch + +BuildSystem: cmake + +BuildRequires: cmake +BuildRequires: ninja + +BuildOption(conf): -GNinja + +# FIXME: Avoid having warnings treated as errors on line asn1_test.cc:2441 +%global optflags %{optflags} -Wno-array-bounds + +%description +Although BoringSSL is an open source project, it is not intended for general +use, as OpenSSL is. We don't recommend that third parties depend upon it. +Doing so is likely to be frustrating because there are no guarantees of API +or ABI stability. + +%package devel +Summary: Fork of OpenSSL that is designed to meet Google's needs. + +%description devel +Fork of OpenSSL that is designed to meet Google's needs. + +Although BoringSSL is an open source project, it is not intended for general +use, as OpenSSL is. We don't recommend that third parties depend upon it. +Doing so is likely to be frustrating because there are no guarantees of API +or ABI stability. + + +%files +%{_bindir}/bssl +%{_libdir}/libcrypto.so +%{_libdir}/libssl.so +%license LICENSE + +%files devel +%{_includedir}/openssl +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/OpenSSL +%{_libdir}/cmake/OpenSSL/*.cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/brotli/brotli.spec b/SPECS/brotli/brotli.spec new file mode 100644 index 00000000..ff086f44 --- /dev/null +++ b/SPECS/brotli/brotli.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: brotli +Version: 1.1.0 +Release: %autorelease +Summary: Lossless Compression Algorithm +License: MIT +URL: https://github.com/google/brotli +#!RemoteAsset +Source: https://github.com/google/brotli/archive/v%version.tar.gz +BuildRequires: cmake >= 2.8.6 +BuildRequires: gcc-c++ +BuildRequires: gzip +BuildRequires: pkg-config +BuildSystem: cmake + +%description +This package contains the brotli command line utility to compress and +decompress data with the brotli compression algorithm. + +Brotli is a generic-purpose lossless compression algorithm that +compresses data using a combination of a modern variant of the LZ77 +algorithm, Huffman coding and 2nd order context modeling, with a +compression ratio comparable to the best currently available +general-purpose compression methods. It is similar in speed with +deflate but offers more dense compression. + +The specification of the Brotli Compressed Data Format is defined in +RFC 7932. + +%package devel +Summary: Development and Header Files for Brotli Compression +Requires: %{name} = %version-%release + +%description devel +Development and headers files for (de)compressing data using the +Brotli general purpose lossless compression algorithm. + +The specification of the Brotli Compressed Data Format is defined in +RFC 7932. + +%build -p +export CFLAGS="%{optflags} -DBROTLI_ENCODER_CLEANUP_ON_OOM" + +%install -a +mkdir -p "%buildroot/%{_mandir}/man1" "%buildroot/%{_mandir}/man3" +install -pm0644 docs/*.1 "%buildroot/%_mandir/man1/" +install -pm0644 docs/*.3 "%buildroot/%_mandir/man3/" + +%ldconfig_scriptlets + +%files +%license LICENSE +%_bindir/brotli +%_mandir/man1/brotli.1* +%_libdir/libbrotlicommon.so.* +%_libdir/libbrotlidec.so.* +%_libdir/libbrotlienc.so.* + +%files devel +%_includedir/brotli/ +%_libdir/libbrotlicommon.so +%_libdir/libbrotlidec.so +%_libdir/libbrotlienc.so +%_libdir/pkgconfig/*.pc +%_mandir/man3/*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/btrfs-progs/btrfs-progs.spec b/SPECS/btrfs-progs/btrfs-progs.spec new file mode 100644 index 00000000..234ef34d --- /dev/null +++ b/SPECS/btrfs-progs/btrfs-progs.spec @@ -0,0 +1,121 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: btrfs-progs +Version: 6.17 +Release: %autorelease +Summary: Userspace programs for btrfs +License: GPL-2.0-only AND LGPL-2.1-or-later +URL: https://btrfs.wiki.kernel.org/index.php/Main_Page +#!RemoteAsset +Source: https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-documentation +BuildOption(conf): CFLAGS="%{optflags} -fno-strict-aliasing" +BuildOption(conf): --with-crypto=libgcrypt + +BuildOption(install): mandir=%{_mandir} bindir=%{_sbindir} libdir=%{_libdir} incdir=%{_includedir} + +BuildRequires: gcc autoconf automake make +BuildRequires: pkgconfig(ext2fs) pkgconfig(libacl) lzo-devel +BuildRequires: util-linux-devel pkgconfig(zlib) pkgconfig(libudev) +BuildRequires: pkgconfig(libgcrypt) >= 1.8.0 +BuildRequires: pkgconfig(libzstd) >= 1.0.0 +BuildRequires: python3-devel >= 3.4 +BuildRequires: python3-setuptools python3-pip + +%description +The btrfs-progs package provides userspace programs needed to create, +check, and manage btrfs filesystems. + +%package -n libbtrfs +Summary: btrfs filesystem-specific runtime library +License: GPL-2.0-only + +%description -n libbtrfs +This package contains the main library used by btrfs programs. + +%package -n libbtrfsutil +Summary: btrfs filesystem-specific runtime utility library +License: LGPL-2.1-or-later + +%description -n libbtrfsutil +This package contains an alternative utility library for btrfs programs. + +%package devel +Summary: btrfs filesystem-specific libraries and headers +Requires: btrfs-progs = %{version} +Requires: libbtrfs = %{version} +Requires: libbtrfsutil = %{version} + +%description devel +This package contains the libraries and header files needed to +develop btrfs filesystem-specific programs. + +%package -n python3-btrfsutil +Summary: Python 3 bindings for libbtrfsutil +Requires: libbtrfsutil = %{version} + +%description -n python3-btrfsutil +This package contains Python 3 bindings to the libbtrfsutil library. + +%conf -p +./autogen.sh + +%build -a +cd libbtrfsutil/python +%pyproject_wheel + +%install -a +install -Dpm0644 btrfs-completion %{buildroot}%{_datadir}/bash-completion/completions/btrfs +# Nuke the static lib +rm -v %{buildroot}%{_libdir}/*.a + +cd libbtrfsutil/python +%pyproject_install +%pyproject_save_files -L btrfsutil + +%ldconfig_scriptlets -n libbtrfs +%ldconfig_scriptlets -n libbtrfsutil + +%files +%license COPYING +%{_sbindir}/btrfsck +%{_sbindir}/fsck.btrfs +%{_sbindir}/mkfs.btrfs +%{_sbindir}/btrfs-image +%{_sbindir}/btrfs-convert +%{_sbindir}/btrfs-select-super +%{_sbindir}/btrfstune +%{_sbindir}/btrfs +%{_sbindir}/btrfs-map-logical +%{_sbindir}/btrfs-find-root +%{_udevrulesdir}/64-btrfs-dm.rules +%{_udevrulesdir}/64-btrfs-zoned.rules +%{_datadir}/bash-completion/completions/btrfs + +%files -n libbtrfs +%license COPYING +%{_libdir}/libbtrfs.so.0* + +%files -n libbtrfsutil +%license libbtrfsutil/COPYING +%{_libdir}/libbtrfsutil.so.1* + +%files devel +%{_includedir}/btrfs/ +%{_includedir}/btrfsutil.h +%{_libdir}/libbtrfs.so +%{_libdir}/libbtrfsutil.so +%{_libdir}/pkgconfig/libbtrfsutil.pc + +%files -n python3-btrfsutil -f %{pyproject_files} +%license libbtrfsutil/COPYING + +%changelog +%{?autochangelog} diff --git a/SPECS/bubblewrap/bubblewrap.spec b/SPECS/bubblewrap/bubblewrap.spec new file mode 100644 index 00000000..aa02750a --- /dev/null +++ b/SPECS/bubblewrap/bubblewrap.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: bubblewrap +Version: 0.11.0 +Release: %autorelease +Summary: Core execution tool for unprivileged containers +License: LGPL-2.0-or-later +URL: https://github.com/containers/bubblewrap +#!RemoteAsset +Source: https://github.com/containers/bubblewrap/releases/download/v%{version}/bubblewrap-%{version}.tar.xz +BuildSystem: meson + +# Temporarily disable man page build since no doc tools are available +BuildOption(conf): -Dman=disabled +BuildRequires: gcc +BuildRequires: meson +BuildRequires: pkgconfig(libcap) +BuildRequires: pkgconfig(libselinux) + +%description +Bubblewrap (bwrap) is a low-level tool to create sandboxes, using Linux +namespaces to isolate processes. It is a core component of container +technologies like Flatpak. + +%files +%license COPYING +%doc README.md +%{_bindir}/bwrap +%{_datadir}/bash-completion/completions/bwrap +%{_datadir}/zsh/site-functions/_bwrap + +%changelog +%{?autochangelog} diff --git a/SPECS/busybox/busybox-1.36.1-no-cbq.patch b/SPECS/busybox/busybox-1.36.1-no-cbq.patch new file mode 100644 index 00000000..a0b06e84 --- /dev/null +++ b/SPECS/busybox/busybox-1.36.1-no-cbq.patch @@ -0,0 +1,49 @@ +diff -up busybox-1.36.1/networking/tc.c.no-cbq busybox-1.36.1/networking/tc.c +--- busybox-1.36.1/networking/tc.c.no-cbq 2024-01-29 10:24:09.135082923 -0500 ++++ busybox-1.36.1/networking/tc.c 2024-01-29 10:28:12.009502552 -0500 +@@ -31,7 +31,7 @@ + //usage: "qdisc [handle QHANDLE] [root|"IF_FEATURE_TC_INGRESS("ingress|")"parent CLASSID]\n" + /* //usage: "[estimator INTERVAL TIME_CONSTANT]\n" */ + //usage: " [[QDISC_KIND] [help|OPTIONS]]\n" +-//usage: " QDISC_KIND := [p|b]fifo|tbf|prio|cbq|red|etc.\n" ++//usage: " QDISC_KIND := [p|b]fifo|tbf|prio|red|etc.\n" + //usage: "qdisc show [dev STRING]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" + //usage: "class [classid CLASSID] [root|parent CLASSID]\n" + //usage: " [[QDISC_KIND] [help|OPTIONS] ]\n" +@@ -230,7 +230,7 @@ static int cbq_parse_opt(int argc, char + { + return 0; + } +-#endif ++ + static int cbq_print_opt(struct rtattr *opt) + { + struct rtattr *tb[TCA_CBQ_MAX+1]; +@@ -322,6 +322,7 @@ static int cbq_print_opt(struct rtattr * + done: + return 0; + } ++#endif + + static FAST_FUNC int print_qdisc( + const struct sockaddr_nl *who UNUSED_PARAM, +@@ -373,7 +374,8 @@ static FAST_FUNC int print_qdisc( + if (qqq == 0) { /* pfifo_fast aka prio */ + prio_print_opt(tb[TCA_OPTIONS]); + } else if (qqq == 1) { /* class based queuing */ +- cbq_print_opt(tb[TCA_OPTIONS]); ++ /* cbq_print_opt(tb[TCA_OPTIONS]); */ ++ printf("cbq not supported"); + } else { + /* don't know how to print options for this qdisc */ + printf("(options for %s)", name); +@@ -444,7 +446,8 @@ static FAST_FUNC int print_class( + /* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/ + } else if (qqq == 1) { /* class based queuing */ + /* cbq_print_copt() is identical to cbq_print_opt(). */ +- cbq_print_opt(tb[TCA_OPTIONS]); ++ /* cbq_print_opt(tb[TCA_OPTIONS]); */ ++ printf("cbq not supported"); + } else { + /* don't know how to print options for this class */ + printf("(options for %s)", name); diff --git a/SPECS/busybox/busybox-1.37.0-fix-conditional-for-sha1_process_block64_shaNI.patch b/SPECS/busybox/busybox-1.37.0-fix-conditional-for-sha1_process_block64_shaNI.patch new file mode 100644 index 00000000..b8c05e19 --- /dev/null +++ b/SPECS/busybox/busybox-1.37.0-fix-conditional-for-sha1_process_block64_shaNI.patch @@ -0,0 +1,13 @@ +diff -up busybox-1.37.0/libbb/hash_md5_sha.c.shaNI-fix busybox-1.37.0/libbb/hash_md5_sha.c +--- busybox-1.37.0/libbb/hash_md5_sha.c.shaNI-fix 2024-09-27 09:57:09.601487627 -0400 ++++ busybox-1.37.0/libbb/hash_md5_sha.c 2024-09-27 09:57:49.167153221 -0400 +@@ -1313,7 +1313,9 @@ unsigned FAST_FUNC sha1_end(sha1_ctx_t * + hash_size = 8; + if (ctx->process_block == sha1_process_block64 + #if ENABLE_SHA1_HWACCEL ++# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + || ctx->process_block == sha1_process_block64_shaNI ++# endif + #endif + ) { + hash_size = 5; diff --git a/SPECS/busybox/busybox.spec b/SPECS/busybox/busybox.spec new file mode 100644 index 00000000..dd784b7e --- /dev/null +++ b/SPECS/busybox/busybox.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: busybox +Version: 1.37.0 +Release: %autorelease +Summary: Minimalist variant of UNIX utilities linked in a single executable +License: GPL-2.0-or-later +URL: https://www.busybox.net/ +# https://busybox.net/ is down currently. A mirror site is used temporarily. +#!RemoteAsset +Source0: https://ftp.icm.edu.pl/packages/busybox/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source1: https://ftp.icm.edu.pl/packages/busybox/%{name}-%{version}.tar.bz2.sig +# All patches are from Fedora. +Patch1: busybox-1.36.1-no-cbq.patch +Patch2: busybox-1.37.0-fix-conditional-for-sha1_process_block64_shaNI.patch +BuildSystem: autotools + +%description +BusyBox combines tiny versions of many common UNIX utilities into a +single executable. It provides minimalist replacements for utilities +usually found in fileutils, shellutils, findutils, textutils, grep, +gzip, tar, and more. BusyBox provides a fairly complete POSIX +environment for small or embedded systems. The utilities in BusyBox +generally have fewer options than their GNU cousins. The options that +are included provide the expected functionality and behave much like +their GNU counterparts. +BusyBox is for emergency and special use cases. Replacing the standard +tools in a system is not supported. Some tools don't work out of the +box but need special configuration, like udhcpc, the dhcp client. + +%conf # BusyBox has no configuration script. + +%build -p +make defconfig # Create the maximum "sane" configuration. + +%install # BusyBox needs to be installed manually. + # Arch Linux for reference. +install -Dm0755 busybox %{buildroot}%{_bindir}/busybox +install -Dm644 docs/busybox.1 %{buildroot}%{_mandir}/man1/busybox.1 + +%files +%license LICENSE +%doc README examples +%{_bindir}/busybox +%{_mandir}/man1/busybox.* + +%changelog +%{?autochangelog} diff --git a/SPECS/byacc/byacc.spec b/SPECS/byacc/byacc.spec new file mode 100644 index 00000000..53d6a02e --- /dev/null +++ b/SPECS/byacc/byacc.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define byaccdate 20241231 + +Name: byacc +Version: 2.0.%{byaccdate} +Release: %autorelease +Summary: A parser generator +License: Public-Domain +URL: https://invisible-island.net/byacc/byacc.html +#!RemoteAsset +Source: https://invisible-mirror.net/archives/byacc/byacc-%{byaccdate}.tgz +BuildSystem: autotools + +BuildRequires: gcc + +%description +Berkeley Yacc is an LALR(1) parser generator, made as compatible as possible +with AT&T Yacc. It can accept any input specification that conforms to the +AT&T Yacc documentation. + +%prep -a +find . -type f -name \*.c -print0 | xargs -0 sed -i 's/YYSTACKSIZE 500/YYSTACKSIZE 10000/g' + +# as same as ncurses,configure: error: unrecognized option: --docdir=/usr/share/doc/byacc +%conf +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --disable-dependency-tracking + +%install -a +ln -s yacc %{buildroot}%{_bindir}/byacc +ln -s yacc.1 %{buildroot}%{_mandir}/man1/byacc.1 + +%files +%doc ACKNOWLEDGEMENTS NEW_FEATURES NO_WARRANTY README CHANGES NOTES +%license AUTHORS +%{_bindir}/* +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/bzip2/bzip2.pc b/SPECS/bzip2/bzip2.pc new file mode 100644 index 00000000..ff40d853 --- /dev/null +++ b/SPECS/bzip2/bzip2.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=/usr +bindir=/usr/bin +libdir= +includedir=/usr/include + +Name: bzip2 +Description: A file compression library +Version: 1.0.6 +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} diff --git a/SPECS/bzip2/bzip2.spec b/SPECS/bzip2/bzip2.spec new file mode 100644 index 00000000..89617ccd --- /dev/null +++ b/SPECS/bzip2/bzip2.spec @@ -0,0 +1,101 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: bzip2 +Version: 1.0.8 +Release: %autorelease +Summary: File compression utility +License: BSD-4-Clause +URL: https://sourceware.org/bzip2 +#!RemoteAsset +Source0: https://sourceware.org/pub/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://sourceware.org/pub/%{name}/%{name}-%{version}.tar.gz.sig +Source2: bzip2.pc +BuildSystem: autotools + +BuildOption(build): -f Makefile-libbz2_so + +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: pkgconfig + +%description +Bzip2 is a freely available, patent-free, high quality data compressor. +Bzip2 compresses files to within 10 to 15 percent of the capabilities +of the best techniques available. However, bzip2 has the added benefit +of being approximately two times faster at compression and six times +faster at decompression than those techniques. Bzip2 is not the +fastest compression utility, but it does strike a balance between speed +and compression capability. + +Install bzip2 if you need a compression utility. + +%package devel +Summary: Libraries and header files for apps which will use bzip2 +Requires: bzip2%{?_isa} = %{version}-%{release} + +%description devel +Header files and a library of bzip2 functions, for developing apps +which will use the library. + +# No configure +%conf + +%prep -a +# Use our own bzip2.pc +cp -a %{SOURCE2} . +sed -i "s|^libdir=|libdir=%{_libdir}|" bzip2.pc + +%build -a +# Build again +rm -f *.o +make bzip2 bzip2recover + +%install +# Why... +chmod 644 bzlib.h +mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/pkgconfig,%{_includedir}} +cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir} +install -m 755 libbz2.so.%{version} $RPM_BUILD_ROOT%{_libdir} +install -m 644 libbz2.a $RPM_BUILD_ROOT%{_libdir} +install -m 644 bzip2.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/bzip2.pc +install -m 755 bzip2-shared $RPM_BUILD_ROOT%{_bindir}/bzip2 +install -m 755 bzip2recover bzgrep bzdiff bzmore $RPM_BUILD_ROOT%{_bindir}/ +cp -p bzip2.1 bzdiff.1 bzgrep.1 bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +ln -s bzip2 $RPM_BUILD_ROOT%{_bindir}/bunzip2 +ln -s bzip2 $RPM_BUILD_ROOT%{_bindir}/bzcat +ln -s bzdiff $RPM_BUILD_ROOT%{_bindir}/bzcmp +ln -s bzmore $RPM_BUILD_ROOT%{_bindir}/bzless +ln -s bzgrep $RPM_BUILD_ROOT%{_bindir}/bzegrep +ln -s bzgrep $RPM_BUILD_ROOT%{_bindir}/bzfgrep +ln -s libbz2.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libbz2.so.1 +ln -s libbz2.so.1 $RPM_BUILD_ROOT%{_libdir}/libbz2.so +ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzip2recover.1 +ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bunzip2.1 +ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcat.1 +ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1 +ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1 +ln -s bzgrep.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzegrep.1 +ln -s bzgrep.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzfgrep.1 + +%files +%doc CHANGES README +%license LICENSE +%{_bindir}/* +%{_mandir}/*/* +%{_libdir}/libbz2.so.1* + +%files devel +%doc manual.html manual.pdf +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/bzip2.pc +%{_libdir}/libbz2.a + +%changelog +%{?autochangelog} diff --git a/SPECS/c-ares/c-ares.spec b/SPECS/c-ares/c-ares.spec new file mode 100644 index 00000000..08c7bddf --- /dev/null +++ b/SPECS/c-ares/c-ares.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: c-ares +Version: 1.34.5 +Release: %autorelease +Summary: Library for asynchronous name resolves +License: MIT +URL: https://c-ares.org/ +#!RemoteAsset +Source0: https://github.com/c-ares/c-ares/releases/download/v%{version}/c-ares-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/c-ares/c-ares/releases/download/v%{version}/c-ares-%{version}.tar.gz.asc + +BuildRequires: c++_compiler +BuildRequires: cmake +BuildRequires: pkgconfig + +BuildSystem: cmake + +%description +c-ares is a C library that performs DNS requests and name resolves +asynchronously. c-ares is a fork of the library named 'ares', written +by Greg Hudson at MIT. + +%package devel +Summary: Development files for c-ares +Requires: %{name} = %{version} +Requires: glibc-devel +Provides: c-ares-devel = %{version} +Obsoletes: c-ares-devel < %{version} + +%description devel +c-ares is a C library that performs DNS requests and name resolves +asynchronously. c-ares is a fork of the library named 'ares', written +by Greg Hudson at MIT. + +This package provides the development libraries and headers needed +to build packages that depend on c-ares. + +%ldconfig_scriptlets + +%files +%license LICENSE.md +%{_bindir}/adig +%{_bindir}/ahost +%{_mandir}/man1/adig.* +%{_mandir}/man1/ahost.* +%{_libdir}/libcares.so.* + +%files devel +%license LICENSE.md +%{_libdir}/libcares.so +%{_includedir}/*.h +%{_mandir}/man3/ares_* +%{_libdir}/pkgconfig/libcares.pc +%{_libdir}/cmake/c-ares/ + + +%changelog +%{?autochangelog} + diff --git a/SPECS/ca-certificates-mozilla/COPYING b/SPECS/ca-certificates-mozilla/COPYING new file mode 100644 index 00000000..b71596dc --- /dev/null +++ b/SPECS/ca-certificates-mozilla/COPYING @@ -0,0 +1,347 @@ +Mozilla Public License +Version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at + the time of the initial grant or subsequently, any and all of the rights + conveyed by this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, using, + selling, offering for sale, having made, import, or transfer of either its + Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public License, + Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this License. + For legal entities, “You” includes any entity that controls, is controlled + by, or is under common control with You. For purposes of this definition, + “control” means (a) the power, direct or indirect, to cause the direction + or management of such entity, whether by contract or otherwise, or (b) + ownership of more than fifty percent (50%) of the outstanding shares or + beneficial ownership of such entity. + +2. License Grants and Conditions + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive +license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, modify, + display, perform, distribute, and otherwise exploit its Contributions, + either on an unmodified basis, with Modifications, or as part of a Larger + Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for sale, + have made, import, and otherwise transfer either its Contributions or its + Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution become +effective for each Contribution on the date the Contributor first distributes +such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under this +License. No additional rights or licenses will be implied from the distribution +or licensing of Covered Software under this License. Notwithstanding +Section 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + +This License does not grant any rights in the trademarks, service marks, or +logos of any Contributor (except as may be necessary to comply with the notice +requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to distribute +the Covered Software under a subsequent version of this License (see +Section 10.2) or under the terms of a Secondary License (if permitted under the +terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its Contributions are +its original creation(s) or it has sufficient rights to grant the rights to its +Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under applicable +copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in +Section 2.1. + +3. Responsibilities + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under the +terms of this License. You must inform recipients that the Source Code Form of +the Covered Software is governed by the terms of this License, and how they can +obtain a copy of this License. You may not attempt to alter or restrict the +recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, as + described in Section 3.1, and You must inform recipients of the Executable + Form how they can obtain a copy of such Source Code Form by reasonable + means in a timely manner, at a charge no more than the cost of distribution + to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, or + sublicense it under different terms, provided that the license for the + Executable Form does not attempt to limit or alter the recipients’ rights + in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for the +Covered Software. If the Larger Work is a combination of Covered Software with +a work governed by one or more Secondary Licenses, and the Covered Software is +not Incompatible With Secondary Licenses, this License permits You to +additionally distribute such Covered Software under the terms of such Secondary +License(s), so that the recipient of the Larger Work may, at their option, +further distribute the Covered Software under the terms of either this License +or such Secondary License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices (including +copyright notices, patent notices, disclaimers of warranty, or limitations of +liability) contained within the Source Code Form of the Covered Software, +except that You may alter any license notices to the extent required to remedy +known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, indemnity +or liability obligations to one or more recipients of Covered Software. +However, You may do so only on Your own behalf, and not on behalf of any +Contributor. You must make it absolutely clear that any such warranty, support, +indemnity, or liability obligation is offered by You alone, and You hereby +agree to indemnify every Contributor for any liability incurred by such +Contributor as a result of warranty, support, indemnity or liability terms You +offer. You may include additional disclaimers of warranty and limitations of +liability specific to any jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + +If it is impossible for You to comply with any of the terms of this License +with respect to some or all of the Covered Software due to statute, judicial +order, or regulation then You must: (a) comply with the terms of this License +to the maximum extent possible; and (b) describe the limitations and the code +they affect. Such description must be placed in a text file included with all +distributions of the Covered Software under this License. Except to the extent +prohibited by statute or regulation, such description must be sufficiently +detailed for a recipient of ordinary skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You +fail to comply with any of its terms. However, if You become compliant, then +the rights granted under this License from a particular Contributor are +reinstated (a) provisionally, unless and until such Contributor explicitly and +finally terminates Your grants, and (b) on an ongoing basis, if such +Contributor fails to notify You of the non-compliance by some reasonable means +prior to 60 days after You have come back into compliance. Moreover, Your +grants from a particular Contributor are reinstated on an ongoing basis if such +Contributor notifies You of the non-compliance by some reasonable means, this +is the first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after Your +receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, counter-claims, and +cross-claims) alleging that a Contributor Version directly or indirectly +infringes any patent, then the rights granted to You by any and all +Contributors for the Covered Software under Section 2.1 of this License shall +terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user +license agreements (excluding distributors and resellers) which have been +validly granted by You or Your distributors under this License prior to +termination shall survive termination. + +6. Disclaimer of Warranty + +Covered Software is provided under this License on an “as is” basis, without +warranty of any kind, either expressed, implied, or statutory, including, +without limitation, warranties that the Covered Software is free of defects, +merchantable, fit for a particular purpose or non-infringing. The entire risk +as to the quality and performance of the Covered Software is with You. Should +any Covered Software prove defective in any respect, You (not any Contributor) +assume the cost of any necessary servicing, repair, or correction. This +disclaimer of warranty constitutes an essential part of this License. No use of +any Covered Software is authorized under this License except under this +disclaimer. + +7. Limitation of Liability + +Under no circumstances and under no legal theory, whether tort (including +negligence), contract, or otherwise, shall any Contributor, or anyone who +distributes Covered Software as permitted above, be liable to You for any +direct, indirect, special, incidental, or consequential damages of any +character including, without limitation, damages for lost profits, loss of +goodwill, work stoppage, computer failure or malfunction, or any and all other +commercial damages or losses, even if such party shall have been informed of +the possibility of such damages. This limitation of liability shall not apply +to liability for death or personal injury resulting from such party’s +negligence to the extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of incidental or +consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + +Any litigation relating to this License may be brought only in the courts of a +jurisdiction where the defendant maintains its principal place of business and +such litigation shall be governed by laws of that jurisdiction, without +reference to its conflict-of-law provisions. Nothing in this Section shall +prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + +This License represents the complete agreement concerning the subject matter +hereof. If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it +enforceable. Any law or regulation which provides that the language of a +contract shall be construed against the drafter shall not be used to construe +this License against a Contributor. + +10. Versions of the License + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section 10.3, +no one other than the license steward has the right to modify or publish new +versions of this License. Each version will be given a distinguishing version +number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version of the +License under which You originally received the Covered Software, or under the +terms of any subsequent version published by the license steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to create a +new license for such software, you may create and use a modified version of +this License if you rename the license and remove any references to the name of +the license steward (except to note that such modified license differs from +this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the notice +described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this file, + You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible With Secondary Licenses”, as defined + by the Mozilla Public License, v. 2.0. diff --git a/SPECS/ca-certificates-mozilla/ca-certificates-mozilla.spec b/SPECS/ca-certificates-mozilla/ca-certificates-mozilla.spec new file mode 100644 index 00000000..7ad3c8e3 --- /dev/null +++ b/SPECS/ca-certificates-mozilla/ca-certificates-mozilla.spec @@ -0,0 +1,92 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ca-certificates-mozilla +# Version number is NSS_BUILTINS_LIBRARY_VERSION in this file: +# http://hg.mozilla.org/projects/nss/file/default/lib/ckfw/builtins/nssckbi.h +Version: 2.82 +Release: %autorelease +Summary: CA certificates for OpenSSL +License: MPL-2.0 +URL: https://www.mozilla.org +#!RemoteAsset +Source0: https://hg.mozilla.org/projects/nss/raw-file/default/lib/ckfw/builtins/certdata.txt +#!RemoteAsset +Source1: https://hg.mozilla.org/projects/nss/raw-file/default/lib/ckfw/builtins/nssckbi.h +#!RemoteAsset +Source2: https://src.fedoraproject.org/rpms/ca-certificates/raw/rawhide/f/certdata2pem.py +Source3: COPYING +BuildRequires: ca-certificates +BuildRequires: openssl +BuildRequires: python3 +BuildRequires: python-rpm-macros + +# for update-ca-certificates +Requires(post): ca-certificates +Requires(postun): ca-certificates + +%description +This package contains some CA root certificates for OpenSSL extracted +from Mozilla Firefox + +%prep +%setup -qcT + +mkdir certs +cd certs +cp %{SOURCE0} . +cd .. + +install -m 644 %{SOURCE3} COPYING +# Notice the version number mismatch +ver=`sed -ne '/NSS_BUILTINS_LIBRARY_VERSION /s/.*"\(.*\)"/\1/p' < "%{SOURCE1}"` +if [ "%{version}" != "$ver" ]; then + echo "*** Version number mismatch: spec file should be version $ver" + false +fi + +%build +export LANG=en_US.UTF-8 +cd certs +%{__python3} %{SOURCE2} +cd .. +( + cat <<-EOF + # This is a bundle of X.509 certificates of public Certificate + # Authorities. It was generated from the Mozilla root CA list. + # These certificates and trust/distrust attributes use the file format accepted + # by the p11-kit-trust module. + # + # Source: nss/lib/ckfw/builtins/certdata.txt + # Source: nss/lib/ckfw/builtins/nssckbi.h + # + # Generated from: + EOF + awk '$2 == "NSS_BUILTINS_LIBRARY_VERSION" {print "# " $2 " " $3}' %{SOURCE1} + echo '#'; + ls -1 certs/*.tmp-p11-kit | sort | xargs cat +) > %{name}.trust.p11-kit + +%install +mkdir -p %{buildroot}%{_datadir}/pki/trust/ +install -m 644 %{name}.trust.p11-kit "%{buildroot}%{_datadir}/pki/trust/%{name}.trust.p11-kit" + +%post +update-ca-trust || true + +%postun +update-ca-trust || true + +%posttrans +update-ca-trust || true + +%files +%license COPYING +%{_datadir}/pki/trust/ + +%changelog +%{?autochangelog} diff --git a/SPECS/ca-certificates/README.etc b/SPECS/ca-certificates/README.etc new file mode 100644 index 00000000..2d9971c9 --- /dev/null +++ b/SPECS/ca-certificates/README.etc @@ -0,0 +1,4 @@ +This directory /etc/pki/ca-trust is used by a system of consolidated +CA certificates. + +Please refer to the update-ca-trust(8) manual page for additional information. diff --git a/SPECS/ca-certificates/README.etcssl b/SPECS/ca-certificates/README.etcssl new file mode 100644 index 00000000..e7d9f8cc --- /dev/null +++ b/SPECS/ca-certificates/README.etcssl @@ -0,0 +1,20 @@ +This directory (/etc/ssl) is provided as a courtesy attempt to provide +compatibility with software which assumes its existence. It is not a +supported or canonical location. Software which assumes and relies on +the existence and layout of this directory is making a wrong assumption +(this directory is not any kind of 'standard', it is a configuration +detail of Debian and its derivatives) and should be improved. No +software packaged in this distribution should use this directory. + +An attempt is made to make the layout of /etc/ssl/certs match that +provided by Debian: it is an OpenSSL 'CApath'-style hashed directory +of individual certificate files, and also contains a certificate bundle +file named ca-certificates.crt, as Debian does. It also contains a +bundle named ca-bundle.crt, as this distribution has long provided +such a file, and it is possible some software has come to expect its +existence. + +/etc/ssl/certs itself and the bundle files are in fact symlinks to +some of the output of the 'update-ca-trust' script which forms a part +of a system of consolidated CA certificates. Please refer to the +update-ca-trust(8) manual page for additional information. diff --git a/SPECS/ca-certificates/README.extr b/SPECS/ca-certificates/README.extr new file mode 100644 index 00000000..06905ba8 --- /dev/null +++ b/SPECS/ca-certificates/README.extr @@ -0,0 +1,12 @@ +This directory /etc/pki/ca-trust/extracted/ contains +CA certificate bundle files which are automatically created. + +If your application isn't able to load the PKCS#11 module p11-kit-trust.so, +then you can use these files in your application to load a list of global +root CA certificates. + +Please never manually edit the files stored in this directory, +because your changes will be lost and the files automatically overwritten, +each time the update-ca-trust command gets executed. + +Please refer to the update-ca-trust(8) manual page for additional information. diff --git a/SPECS/ca-certificates/README.java b/SPECS/ca-certificates/README.java new file mode 100644 index 00000000..457b00c5 --- /dev/null +++ b/SPECS/ca-certificates/README.java @@ -0,0 +1,17 @@ +This directory /etc/pki/ca-trust/extracted/java/ contains +CA certificate bundle files which are automatically created +based on the information found in the +/usr/share/pki/ca-trust-source/ and /etc/pki/ca-trust/source/ +directories. + +All files are in the java keystore file format. + +If your application isn't able to load the PKCS#11 module p11-kit-trust.so, +then you can use these files in your application to load a list of global +root CA certificates. + +Please never manually edit the files stored in this directory, +because your changes will be lost and the files automatically overwritten, +each time the update-ca-trust command gets executed. + +Please refer to the update-ca-trust(8) manual page for additional information. diff --git a/SPECS/ca-certificates/README.src b/SPECS/ca-certificates/README.src new file mode 100644 index 00000000..fe42b443 --- /dev/null +++ b/SPECS/ca-certificates/README.src @@ -0,0 +1,20 @@ +This directory /etc/pki/ca-trust/source/ contains CA certificates and +trust settings in the PEM file format. The trust settings found here will be +interpreted with a high priority - higher than the ones found in +/usr/share/pki/ca-trust-source/. + +============================================================================= +QUICK HELP: To add a certificate in the simple PEM or DER file formats to the + list of CAs trusted on the system: + + Copy it to the + /etc/pki/ca-trust/source/anchors/ + subdirectory, and run the + update-ca-trust + command. + + If your certificate is in the extended BEGIN TRUSTED file format, + then place it into the main source/ directory instead. +============================================================================= + +Please refer to the update-ca-trust(8) manual page for additional information. diff --git a/SPECS/ca-certificates/README.usr b/SPECS/ca-certificates/README.usr new file mode 100644 index 00000000..7a9a4ed3 --- /dev/null +++ b/SPECS/ca-certificates/README.usr @@ -0,0 +1,20 @@ +This directory /usr/share/pki/ca-trust-source/ contains CA certificates and +trust settings in the PEM file format. The trust settings found here will be +interpreted with a low priority - lower than the ones found in +/etc/pki/ca-trust/source/ . + +============================================================================= +QUICK HELP: To add a certificate in the simple PEM or DER file formats to the + list of CAs trusted on the system: + + Copy it to the + /usr/share/pki/ca-trust-source/anchors/ + subdirectory, and run the + update-ca-trust + command. + + If your certificate is in the extended BEGIN TRUSTED file format, + then place it into the main source/ directory instead. +============================================================================= + +Please refer to the update-ca-trust(8) manual page for additional information. diff --git a/SPECS/ca-certificates/ca-certificates.spec b/SPECS/ca-certificates/ca-certificates.spec new file mode 100644 index 00000000..84113398 --- /dev/null +++ b/SPECS/ca-certificates/ca-certificates.spec @@ -0,0 +1,154 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ca-certificates +# Date based, manually update from URL. Also no VCS. +Version: 20251015 +Release: %autorelease +Summary: Utilities for system wide CA certificate installation +License: GPL-2.0-or-later +URL: https://src.fedoraproject.org/rpms/ca-certificates +Source0: update-ca-trust +# TODO: convert this to man page once we have asciidoc +Source1: update-ca-trust.8.txt +Source2: README.etc +Source3: README.etcssl +Source4: README.extr +Source5: README.java +Source6: README.src +Source7: README.usr +BuildRequires: p11-kit-devel +BuildRequires: coreutils +BuildRequires: bash +BuildRequires: findutils + +Requires: p11-kit +Requires(post): p11-kit +Requires(post): bash +Requires(post): findutils +Requires(post): grep +Requires(post): sed + +Recommends: ca-certificates-mozilla + +%description +Update-ca-certificates is intended to keep the certificate stores of +SSL libraries like OpenSSL or GnuTLS in sync with the system's CA +certificate store that is managed by p11-kit. + +%prep + +%build + +%install +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/tls/certs +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/ssl +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/source +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/source/anchors +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/source/blocklist +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/directory-hash +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/java +mkdir -p -m 755 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/edk2 +mkdir -p -m 755 %{buildroot}%{_datadir}/pki/ca-trust-source +mkdir -p -m 755 %{buildroot}%{_datadir}/pki/ca-trust-source/anchors +mkdir -p -m 755 %{buildroot}%{_datadir}/pki/ca-trust-source/blocklist +mkdir -p -m 755 %{buildroot}%{_datadir}/pki/ca-trust-legacy +mkdir -p -m 755 %{buildroot}%{_bindir} + +install -p -m 755 %{SOURCE0} %{buildroot}%{_bindir}/update-ca-trust +install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pki/ca-trust/README +install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/ssl/README +install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/README +install -p -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/java/README +install -p -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pki/ca-trust/source/README +install -p -m 644 %{SOURCE7} %{buildroot}%{_datadir}/pki/ca-trust-source/README + + +# touch ghosted files that will be extracted dynamically +# Set chmod 444 to use identical permission +touch %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/tls-ca-bundle.pem +chmod 444 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/tls-ca-bundle.pem +touch %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/email-ca-bundle.pem +chmod 444 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/email-ca-bundle.pem +touch %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem +chmod 444 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem +touch %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/edk2/cacerts.bin +chmod 444 %{buildroot}%{_sysconfdir}/pki/ca-trust/extracted/edk2/cacerts.bin + +# Compatibility symlink +ln -s %{_sysconfdir}/pki/tls/certs %{buildroot}%{_sysconfdir}/ssl/certs +ln -s %{_sysconfdir}/pki/tls/openssl.cnf %{buildroot}%{_sysconfdir}/ssl/openssl.cnf +ln -s %{_sysconfdir}/pki/tls/ct_log_list.cnf %{buildroot}%{_sysconfdir}/ssl/ct_log_list.cnf + +%pre +if [ $1 -gt 1 ] ; then + # Remove the old symlinks + rm -f %{pkidir}/tls/cert.pem + rm -f %{pkidir}/tls/certs/ca-bundle.crt + rm -f %{pkidir}/tls/certs/ca-bundle.trust.crt + rm -f %{pkidir}/tls/certs/ca-certificates.crt + rm -f %{_sysconfdir}/ssl/cert.pem +fi + +%post +# if ln is available, go ahead and run the ca-legacy and update +# scripts. If not, wait until %posttrans. +if [ -x %{_bindir}/ln ]; then + %{_bindir}/update-ca-trust || true +fi + +%posttrans +# When coreutils is installing with ca-certificates +# we need to wait until coreutils install to +# run our update since update requires ln to complete. +# There is a circular dependency here where +# ca-certificates depends on coreutils +# coreutils depends on openssl +# openssl depends on ca-certificates +# so we run the scripts here too, in case we couldn't run them in +# post. If we *could* run them in post this is an unnecessary +# duplication, but it shouldn't hurt anything +%{_bindir}/update-ca-trust || true + +%files +%dir %{_sysconfdir}/ssl +%dir %{_sysconfdir}/pki/tls +%dir %{_sysconfdir}/pki/tls/certs +%dir %{_sysconfdir}/pki/ca-trust +%dir %{_sysconfdir}/pki/ca-trust/source +%dir %{_sysconfdir}/pki/ca-trust/source/anchors +%dir %{_sysconfdir}/pki/ca-trust/source/blocklist +%dir %{_sysconfdir}/pki/ca-trust/extracted +%dir %{_sysconfdir}/pki/ca-trust/extracted/pem +%dir %{_sysconfdir}/pki/ca-trust/extracted/java +%dir %{_sysconfdir}/pki/ca-trust/extracted/edk2 +%dir %{_datadir}/pki +%dir %{_datadir}/pki/ca-trust-source +%dir %{_datadir}/pki/ca-trust-source/anchors +%dir %{_datadir}/pki/ca-trust-source/blocklist +%dir %{_datadir}/pki/ca-trust-legacy +%dir %{_sysconfdir}/pki/ca-trust/extracted/pem/directory-hash +%{_sysconfdir}/ssl/certs +%{_sysconfdir}/ssl/README +%{_sysconfdir}/ssl/openssl.cnf +%{_sysconfdir}/ssl/ct_log_list.cnf +%{_bindir}/update-ca-trust +%{_datadir}/pki/ca-trust-source/README +%{_sysconfdir}/pki/ca-trust/README +%{_sysconfdir}/pki/ca-trust/extracted/README +%{_sysconfdir}/pki/ca-trust/extracted/java/README +%{_sysconfdir}/pki/ca-trust/source/README +# files extracted files +%ghost %{_sysconfdir}/pki/ca-trust/extracted/pem/tls-ca-bundle.pem +%ghost %{_sysconfdir}/pki/ca-trust/extracted/pem/email-ca-bundle.pem +%ghost %{_sysconfdir}/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem +%ghost %{_sysconfdir}/pki/ca-trust/extracted/edk2/cacerts.bin + +%changelog +%{?autochangelog} diff --git a/SPECS/ca-certificates/update-ca-trust b/SPECS/ca-certificates/update-ca-trust new file mode 100644 index 00000000..5a072601 --- /dev/null +++ b/SPECS/ca-certificates/update-ca-trust @@ -0,0 +1,183 @@ +#!/bin/sh + +#set -vx +set -eu + +# For backwards compatibility reasons, future versions of this script must +# support the syntax "update-ca-trust extract" trigger the generation of output +# files in $DEST. + +DEST=/etc/pki/ca-trust/extracted +DEST_CERTS=/etc/pki/tls/certs + +# Prevent p11-kit from reading user configuration files. +export P11_KIT_NO_USER_CONFIG=1 + +usage() { + fold -s -w 76 >&2 <<-EOF + Usage: $0 [extract] [-o DIR|--output DIR] + + Update the system trust store in $DEST. + + COMMANDS + (absent/empty command): Same as the extract command without arguments. + + extract: Instruct update-ca-trust to scan the source configuration in + /usr/share/pki/ca-trust-source and /etc/pki/ca-trust/source and produce + updated versions of the consolidated configuration files stored below + the $DEST directory hierarchy. + + EXTRACT OPTIONS + -o DIR, --output DIR: Write the extracted trust store into the given + directory instead of updating $DEST. (Note: This option will not + populate the ../pki/tls/certs with the directory-hash symbolic links.) + + --rhbz2387674: A temporary compatibility option that restores several + legacy certificate-bundle symlinks (e.g., /etc/ssl/cert.pem) to + address issues with older software. + These symlinks will be removed on ca-certificate updates or reinstalls, + so you'll have to re-run this command after ca-certificates updates if + the issue is still not fixed. + WARNING: Do not use in automation or build scripts. This flag + is going to be removed in a future release, and any scripts relying on + it will inevitably break! + EOF +} + +rhbz2387674_msg() { + fold -s -w 76 >&2 <<-EOF + ---------------------------------------------------------------------------- + ** DEPRECATION WARNING ** + ---------------------------------------------------------------------------- + The option --rhbz2387674 is a temporary workaround and will be removed in a + future release. Please do not use it in build scripts or automation. + + ---------------------------------------------------------------------------- + ** ACTION REQUIRED ** + ---------------------------------------------------------------------------- + To ensure the affected package works correctly in the future, a bug report must + be filed. + + 1. Check if a bug already exists for the affected package: https://bugzilla.redhat.com/buglist.cgi?component=ca-certificates&product=Fedora&short_desc=droppingOfCertPemFile%20package%3A&short_desc_type=allwordssubstr + + 2. If no bug exists, please file a new one using this template: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=ca-certificates&version=rawhide&short_desc=droppingOfCertPemFile+package:+<>+is+affected + + Thank you for helping improve Fedora. + EOF +} + +extract() { + USER_DEST= + compat= + + # can't use getopt here. ca-certificates can't depend on a lot + # of other libraries since openssl depends on ca-certificates + # just fail when we hand parse + + while [ $# -ne 0 ]; do + case "$1" in + "-o"|"--output") + if [ $# -lt 2 ]; then + echo >&2 "Error: missing argument for '$1' option. See 'update-ca-trust --help' for usage." + echo >&2 + exit 1 + fi + USER_DEST=$2 + shift 2 + continue + ;; + "--rhbz2387674") + compat="true" + shift + continue + ;; + "--") + shift + break + ;; + *) + echo >&2 "Error: unknown extract argument '$1'. See 'update-ca-trust --help' for usage." + exit 1 + ;; + esac + done + + if [[ "$compat" = "true" && -n "$USER_DEST" ]]; then + echo "Error: arguments '-o DIR|--output DIR' and '--rhbz2387674' can't be used together" + exit 1 + + fi + + if [ -n "$USER_DEST" ]; then + DEST=$USER_DEST + # Attempt to create the directories if they do not exist + # yet (rhbz#2241240) + /usr/bin/mkdir -p \ + "$DEST"/openssl \ + "$DEST"/pem \ + "$DEST"/java \ + "$DEST"/edk2 + fi + + + # Delete all directory hash symlinks from the cert directory + if [ -z "$USER_DEST" ]; then + find "$DEST_CERTS" -type l -regextype posix-extended \ + -regex '.*/[0-9a-f]{8}\.[0-9]+' -exec rm -f {} \; + fi + + # OpenSSL PEM bundle that includes trust flags + # (BEGIN TRUSTED CERTIFICATE) + /usr/bin/trust extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose server-auth "$DEST/pem/tls-ca-bundle.pem" + /usr/bin/trust extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose email "$DEST/pem/email-ca-bundle.pem" + /usr/bin/trust extract --format=pem-bundle --filter=ca-anchors --overwrite --comment --purpose code-signing "$DEST/pem/objsign-ca-bundle.pem" + /usr/bin/trust extract --format=java-cacerts --filter=ca-anchors --overwrite --purpose server-auth "$DEST/java/cacerts" + /usr/bin/trust extract --format=edk2-cacerts --filter=ca-anchors --overwrite --purpose=server-auth "$DEST/edk2/cacerts.bin" + # Hashed directory of BEGIN TRUSTED-style certs (usable as OpenSSL CApath and + # by GnuTLS) + /usr/bin/trust extract --format=pem-directory-hash --filter=ca-anchors --overwrite --purpose server-auth "$DEST/pem/directory-hash" + + + if [ -n "$compat" ]; then + # print warning message + rhbz2387674_msg + + # bring back bundle in openssl trust format + /usr/bin/trust extract --format=openssl-bundle --filter=certificates --overwrite --comment "$DEST_CERTS/ca-bundle.trust.crt" + + # create symlinks to /etc/pki/tls/.. + ln -sf "$DEST/pem/tls-ca-bundle.pem" "$DEST_CERTS/../cert.pem" + ln -sf "$DEST/pem/tls-ca-bundle.pem" "$DEST_CERTS/ca-certificates.crt" + ln -sf "$DEST/pem/tls-ca-bundle.pem" "$DEST_CERTS/ca-bundle.crt" + + # create symlinks to /etc/ssl/ the certs folder is already sym-linked + ln -sf "$DEST/pem/tls-ca-bundle.pem" "/etc/ssl/cert.pem" + fi + + if [ -z "$USER_DEST" ]; then + find "$DEST/pem/directory-hash" -type l -regextype posix-extended \ + -regex '.*/[0-9a-f]{8}\.[0-9]+' | while read link; do + target=$(readlink -f "$link") + new_link="$DEST_CERTS/$(basename "$link")" + ln -s "$target" "$new_link" + done + fi +} +if [ $# -lt 1 ]; then + set -- extract +fi + +case "$1" in + "extract") + shift + extract "$@" + ;; + "--help") + usage + exit 0 + ;; + *) + echo >&2 "Error: unknown command: '$1', see 'update-ca-trust --help' for usage." + exit 1 + ;; +esac diff --git a/SPECS/ca-certificates/update-ca-trust.8.txt b/SPECS/ca-certificates/update-ca-trust.8.txt new file mode 100644 index 00000000..0acc8719 --- /dev/null +++ b/SPECS/ca-certificates/update-ca-trust.8.txt @@ -0,0 +1,276 @@ +//// +Copyright (C) 2013 Red Hat, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +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. +//// + + +update-ca-trust(8) +================== +:doctype: manpage +:man source: update-ca-trust + + +NAME +---- +update-ca-trust - manage consolidated and dynamic configuration of CA +certificates and associated trust + + +SYNOPSIS +-------- +*update-ca-trust* [extract] [-o 'DIR'|--output='DIR'] + + +DESCRIPTION +----------- +update-ca-trust(8) is used to manage a consolidated and dynamic configuration +feature of Certificate Authority (CA) certificates and associated trust. + +The feature is available for new applications that read the +consolidated configuration files found in the /etc/pki/ca-trust/extracted directory +or that load the PKCS#11 module p11-kit-trust.so + +Parts of the new feature are also provided in a way to make it useful +for legacy applications. + +Many legacy applications expect CA certificates and trust configuration +in a fixed location, contained in files with particular path and name, +or by referring to a classic PKCS#11 trust module provided by the +NSS cryptographic library. + +The dynamic configuration feature provides functionally compatible replacements +for classic configuration files and for the classic NSS trust module named libnssckbi. + +In order to enable legacy applications, that read the classic files or +access the classic module, to make use of the new consolidated and dynamic configuration +feature, the classic filenames have been changed to symbolic links. +The symbolic links refer to dynamically created and consolidated +output stored below the /etc/pki/ca-trust/extracted directory hierarchy. + +The output is produced using the 'update-ca-trust' command (without parameters), +or using the 'update-ca-trust extract' command. +In order to produce the output, a flexible set of source configuration +is read, as described in section <>. + +In addition, the classic PKCS#11 module +is replaced with a new PKCS#11 module (p11-kit-trust.so) that dynamically +reads the same source configuration. + + +[[sourceconf]] +SOURCE CONFIGURATION +-------------------- +The dynamic configuration feature uses several source directories that +will be scanned for any number of source files. *It is important to select +the correct subdirectory for adding files, as the subdirectory defines how +contained certificates will be trusted or distrusted, and which file formats are read.* + +Files in *subdirectories below the directory hierarchy /usr/share/pki/ca-trust-source/* contain CA certificates and +trust settings in the PEM file format. The trust settings found here will be +interpreted with a *low priority*. + +Files in *subdirectories below the directory hierarchy /etc/pki/ca-trust/source/* contain CA certificates and +trust settings in the PEM file format. The trust settings found here will be +interpreted with a *high priority*. + +.You may use the following rules of thumb to decide, whether your configuration files should be added to the /etc or rather to the /usr directory hierarchy: +* If you are manually adding a configuration file to a system, you probably +want it to override any other default configuration, and you most likely should +add it to the respective subdirectory in the /etc hierarchy. +* If you are creating a package that provides additional root CA certificates, +that is intended for distribution to several computer systems, but you still +want to allow the administrator to override your list, then your package should +add your files to the respective subdirectory in the /usr hierarchy. +* If you are creating a package that is supposed to override the default system +trust settings, that is intended for distribution to several computer systems, then your package should install the files to the respective +subdirectory in the /etc hierarchy. + +.*QUICK HELP 1*: To add a certificate in the simple PEM or DER file formats to the list of CAs trusted on the system: +* add it as a new file to directory /etc/pki/ca-trust/source/anchors/ +* run 'update-ca-trust extract' + +.*QUICK HELP 2*: If your certificate is in the extended BEGIN TRUSTED file format (which may contain distrust/blocklist trust flags, or trust flags for usages other than TLS) then: +* add it as a new file to directory /etc/pki/ca-trust/source/ +* run 'update-ca-trust extract' + +.In order to offer simplicity and flexibility, the way certificate files are treated depends on the subdirectory they are installed to. +* simple trust anchors subdirectory: /usr/share/pki/ca-trust-source/anchors/ or /etc/pki/ca-trust/source/anchors/ +* simple blocklist (distrust) subdirectory: /usr/share/pki/ca-trust-source/blocklist/ or /etc/pki/ca-trust/source/blocklist/ +* extended format directory: /usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ + +.In the main directories /usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ you may install one or multiple files in the following file formats: +* certificate files that include trust flags, + in the BEGIN/END TRUSTED CERTIFICATE file format + (any file name), which have been created using the openssl x509 tool + and the -addreject -addtrust options. + Bundle files with multiple certificates are supported. +* files in the p11-kit file format using the .p11-kit file name + extension, which can (e.g.) be used to distrust certificates + based on serial number and issuer name, without having the + full certificate available. + (This is currently an undocumented format, to be extended later. + For examples of the supported formats, see the files + shipped with the ca-certificates package.) +* certificate files without trust flags in either the DER file format or in + the PEM (BEGIN/END CERTIFICATE) file format (any file name). Such files + will be added with neutral trust, neither trusted nor distrusted. + They will simply be known to the system, which might be helpful to + assist cryptographic software in constructing chains of certificates. + (If you want a CA certificate in these file formats to be trusted, you + should remove it from this directory and move it to the + ./anchors subdirectory instead.) + +In the anchors subdirectories /usr/share/pki/ca-trust-source/anchors/ or /etc/pki/ca-trust/source/anchors/ +you may install one or multiple certificates in either the DER file +format or in the PEM (BEGIN/END CERTIFICATE) file format. +Each certificate will be treated as *trusted* for all purposes. + +In the blocklist subdirectories /usr/share/pki/ca-trust-source/blocklist/ or /etc/pki/ca-trust/source/blocklist/ +you may install one or multiple certificates in either the DER file +format or in the PEM (BEGIN/END CERTIFICATE) file format. +Each certificate will be treated as *distrusted* for all purposes. + +Please refer to the x509(1) manual page for the documentation of the +BEGIN/END CERTIFICATE and BEGIN/END TRUSTED CERTIFICATE file formats. + +Applications that rely on a static file for a list of trusted CAs +may load one of the files found in the /etc/pki/ca-trust/extracted +directory. After modifying any file in the +/usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ +directories or in any of their subdirectories, or after adding a file, +it is necessary to run the 'update-ca-trust extract' command, +in order to update the consolidated files in /etc/pki/ca-trust/extracted/ . + +Applications that load the classic PKCS#11 module using filename libnssckbi.so +(which has been converted into a symbolic link pointing to the new module) +and any application capable of +loading PKCS#11 modules and loading p11-kit-trust.so, will benefit from +the dynamically merged set of certificates and trust information stored in the +/usr/share/pki/ca-trust-source/ and /etc/pki/ca-trust/source/ directories. + + +[[extractconf]] +EXTRACTED CONFIGURATION +----------------------- +The directory /etc/pki/ca-trust/extracted/ contains generated CA certificate +bundle files which are created and updated, based on the <> +by running the 'update-ca-trust extract' command. + +If your application isn't able to load the PKCS#11 module p11-kit-trust.so, +then you can use these files in your application to load a list of global +root CA certificates. + +Please never manually edit the files stored in this directory, +because your changes will be lost and the files automatically overwritten, +each time the 'update-ca-trust extract' command gets executed. + +In order to install new trusted or distrusted certificates, +please rather install them in the respective subdirectory below the +/usr/share/pki/ca-trust-source/ or /etc/pki/ca-trust/source/ +directories, as described in the <> section. + +The directory /etc/pki/ca-trust/extracted/java/ contains +a CA certificate bundle in the java keystore file format. +Distrust information cannot be represented in this file format, +and distrusted certificates are missing from these files. +File cacerts contains CA certificates trusted for TLS server authentication. + +The directory /etc/pki/ca-trust/extracted/openssl/ contains +CA certificate bundle files in the extended BEGIN/END TRUSTED CERTIFICATE file format, +as described in the x509(1) manual page. +File ca-bundle.trust.crt contains the full set of all trusted +or distrusted certificates, including the associated trust flags. + +The directory /etc/pki/ca-trust/extracted/pem/ contains +CA certificate bundle files in the simple BEGIN/END CERTIFICATE file format, +as described in the x509(1) manual page. +Distrust information cannot be represented in this file format, +and distrusted certificates are missing from these files. +File tls-ca-bundle.pem contains CA certificates +trusted for TLS server authentication. +File email-ca-bundle.pem contains CA certificates +trusted for E-Mail protection. +File objsign-ca-bundle.pem contains CA certificates +trusted for code signing. + +The directory /etc/pki/ca-trust/extracted/edk2/ contains a CA +certificate bundle ("cacerts.bin") in the "sequence of +EFI_SIGNATURE_LISTs" format, defined in the UEFI-2.7 specification, +sections "31.4.1 Signature Database" and +"EFI_CERT_X509_GUID". Distrust information cannot be represented in +this file format, and distrusted certificates are missing from these +files. File "cacerts.bin" contains CA certificates trusted for TLS +server authentication. + + +COMMANDS +-------- +(absent/empty command) +~~~~~~~~~~~~~~~~~~~~~~ +Same as the *extract* command described below. (However, the command may print +fewer warnings, as this command is being run during rpm package installation, +where non-fatal status output is undesired.) + +extract +~~~~~~~ +Instruct update-ca-trust to scan the <> and +produce updated versions of the consolidated configuration files stored below +the /etc/pki/ca-trust/extracted directory hierarchy. + +EXTRACT OPTIONS +^^^^^^^^^^^^^^^ +*-o DIR*, *--output=DIR*:: + Write the extracted trust store into the given directory instead of + updating /etc/pki/ca-trust/extracted. (Note: This option will not + populate the ../pki/tls/certs with the directory-hash symbolic links.) + +FILES +----- +/etc/pki/java/cacerts:: + Classic filename, file contains a list of CA certificates trusted for TLS server authentication usage, in the Java keystore file format, without distrust information. + This file is a symbolic link that refers to the consolidated output created by the update-ca-trust command. + +/usr/share/pki/ca-trust-source:: + Contains multiple, low priority source configuration files as explained in section <>. Please pay attention to the specific meanings of the respective subdirectories. + +/etc/pki/ca-trust/source:: + Contains multiple, high priority source configuration files as explained in section <>. Please pay attention to the specific meanings of the respective subdirectories. + +/etc/pki/ca-trust/extracted:: + Contains consolidated and automatically generated configuration files for consumption by applications, + which are created using the 'update-ca-trust extract' command. Don't edit files in this directory, because they will be overwritten. + See section <> for additional details. + +/etc/pki/tls/certs:: + Contains symbolic links to the directory-hash format certificates generated by update-ca-trust command, they are inteded as a internal format for OpenSSL and not to be used directly by the other crypto libraries or applications. + +LEGACY FILES +------------ +The following file paths were used in legacy versions of the utility +and have since been replaced. Scripts and configurations referencing +these old paths should be updated. + +/etc/pki/cert.pem:: + This file has been replaced by /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. + +/etc/pki/tls/certs/ca-certificates.crt:: + This file has been replaced by /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. + +/etc/pki/tls/certs/ca-bundle.crt:: + This file has been replaced by /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. + +/etc/pki/tls/certs/ca-bundle.trust.crt:: + This has been replaced by the directory-hash format certificates stored in /etc/pki/ca-trust/extracted/pem/directory-hash/ directory. + +AUTHOR +------ +Written by Kai Engert and Stef Walter. diff --git a/SPECS/cairo/cairo.spec b/SPECS/cairo/cairo.spec new file mode 100644 index 00000000..50f6ea40 --- /dev/null +++ b/SPECS/cairo/cairo.spec @@ -0,0 +1,158 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Change these to 1 once we have them +%bcond gtk_doc 0 + +Name: cairo +Version: 1.18.4 +Release: %autorelease +Summary: A 2D graphics library +License: LGPL-2.1-only OR MPL-1.1 +URL: https://cairographics.org +VCS: git:git://anongit.freedesktop.org/git/cairo +#!RemoteAsset +Source0: https://cairographics.org/releases/%{name}-%{version}.tar.xz +BuildSystem: meson + +BuildOption(conf): -Dfreetype=enabled +BuildOption(conf): -Dfontconfig=enabled +BuildOption(conf): -Dglib=enabled +%if %{with gtk_doc} +BuildOption(conf): -Dgtk_doc=true +%endif +BuildOption(conf): -Dspectre=disabled +BuildOption(conf): -Dsymbol-lookup=disabled +BuildOption(conf): -Dtee=enabled +BuildOption(conf): -Dtests=disabled +BuildOption(conf): -Dxcb=enabled +BuildOption(conf): -Dxlib=enabled + +BuildRequires: meson +%if %{with gtk_doc} +BuildRequires: gtk-doc +%endif +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(lzo2) +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xcb-render) +BuildRequires: pkgconfig(xrender) + +%description +Cairo is a 2D graphics library designed to provide high-quality display +and print output. Currently supported output targets include the X Window +System, in-memory image buffers, and image files (PDF, PostScript, and SVG). + +Cairo is designed to produce consistent output on all output media while +taking advantage of display hardware acceleration when available. + +%package devel +Summary: Development files for cairo +Requires: %{name} = %{version}-%{release} + +%description devel +Cairo is a 2D graphics library designed to provide high-quality display +and print output. + +This package contains libraries, header files and developer documentation +needed for developing software which uses the cairo graphics library. + +%package gobject +Summary: GObject bindings for cairo +Requires: %{name} = %{version}-%{release} + +%description gobject +Cairo is a 2D graphics library designed to provide high-quality display +and print output. + +This package contains functionality to make cairo graphics library +integrate well with the GObject object system used by GNOME. + +%package gobject-devel +Summary: Development files for cairo-gobject +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-gobject = %{version}-%{release} + +%description gobject-devel +Cairo is a 2D graphics library designed to provide high-quality display +and print output. + +This package contains libraries, header files and developer documentation +needed for developing software which uses the cairo Gobject library. + +%package tools +Summary: Development tools for cairo +Requires: %{name} = %{version}-%{release} + +%description tools +Cairo is a 2D graphics library designed to provide high-quality display +and print output. + +This package contains tools for working with the cairo graphics library. + * cairo-trace: Record cairo library calls for later playback + +%files +%license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1 +%doc AUTHORS BUGS NEWS README.md +%{_libdir}/libcairo.so.2* +%{_libdir}/libcairo-script-interpreter.so.2* + +%files devel +%dir %{_includedir}/cairo/ +%{_includedir}/cairo/cairo-deprecated.h +%{_includedir}/cairo/cairo-features.h +%{_includedir}/cairo/cairo-ft.h +%{_includedir}/cairo/cairo.h +%{_includedir}/cairo/cairo-pdf.h +%{_includedir}/cairo/cairo-ps.h +%{_includedir}/cairo/cairo-script-interpreter.h +%{_includedir}/cairo/cairo-svg.h +%{_includedir}/cairo/cairo-tee.h +%{_includedir}/cairo/cairo-version.h +%{_includedir}/cairo/cairo-xlib-xrender.h +%{_includedir}/cairo/cairo-xlib.h +%{_includedir}/cairo/cairo-script.h +%{_includedir}/cairo/cairo-xcb.h +%{_libdir}/libcairo.so +%{_libdir}/libcairo-script-interpreter.so +%{_libdir}/pkgconfig/cairo-fc.pc +%{_libdir}/pkgconfig/cairo-ft.pc +%{_libdir}/pkgconfig/cairo.pc +%{_libdir}/pkgconfig/cairo-pdf.pc +%{_libdir}/pkgconfig/cairo-png.pc +%{_libdir}/pkgconfig/cairo-ps.pc +%{_libdir}/pkgconfig/cairo-script-interpreter.pc +%{_libdir}/pkgconfig/cairo-svg.pc +%{_libdir}/pkgconfig/cairo-tee.pc +%{_libdir}/pkgconfig/cairo-xlib.pc +%{_libdir}/pkgconfig/cairo-xlib-xrender.pc +%{_libdir}/pkgconfig/cairo-script.pc +%{_libdir}/pkgconfig/cairo-xcb-shm.pc +%{_libdir}/pkgconfig/cairo-xcb.pc +%if %{with gtk_doc} +%{_datadir}/gtk-doc/html/cairo +%endif + +%files gobject +%{_libdir}/libcairo-gobject.so.2* + +%files gobject-devel +%{_includedir}/cairo/cairo-gobject.h +%{_libdir}/libcairo-gobject.so +%{_libdir}/pkgconfig/cairo-gobject.pc + +%files tools +%{_bindir}/cairo-trace +%{_libdir}/cairo/ + +%changelog +%{?autochangelog} diff --git a/SPECS/ccache/ccache.spec b/SPECS/ccache/ccache.spec new file mode 100644 index 00000000..4a29bcec --- /dev/null +++ b/SPECS/ccache/ccache.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond test 0 + +Name: ccache +Version: 4.12 +Release: %autorelease +Summary: A Fast C/C++ Compiler Cache +License: GPL-3.0-or-later +URL: https://ccache.dev/ +#!RemoteAsset +Source: https://github.com/ccache/ccache/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON +%if %{without test} +BuildOption(conf): -DENABLE_TESTING:BOOL=OFF +%endif +BuildOption(conf): -DREDIS_STORAGE_BACKEND:BOOL=OFF +BuildOption(conf): -DENABLE_DOCUMENTATION:BOOL=OFF + +BuildRequires: cmake +BuildRequires: fmt-devel +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libzstd-devel +BuildRequires: pkgconfig +BuildRequires: xxhash-devel +%if %{with test} +BuildRequires: doctest-devel +%endif + +Provides: distcc:%{_bindir}/ccache + +%description +ccache is a compiler cache. It speeds up recompilation by caching the +result of previous compilations and detecting when the same compilation is +being done again. + + +%install -a +# create the compat symlinks into /usr/libdir/ccache +mkdir -p %{buildroot}/%{_libdir}/ccache +cd %{buildroot}/%{_libdir}/ccache +ln -sf ../../bin/ccache gcc +ln -sf ../../bin/ccache g++ +# do the same for clang +ln -sf ../../bin/ccache clang +ln -sf ../../bin/ccache clang++ +# and regular cc +ln -sf ../../bin/ccache cc +ln -sf ../../bin/ccache c++ +# and for nvidia cuda +ln -sf ../../bin/ccache nvcc + +%files +%license LICENSE.* GPL-3.0.txt +%doc doc/AUTHORS.* doc/NEWS.* README.* +%{_bindir}/ccache +%{_libdir}/ccache + +%changelog +%{?autochangelog} diff --git a/SPECS/check/check.spec b/SPECS/check/check.spec new file mode 100644 index 00000000..7f1d431d --- /dev/null +++ b/SPECS/check/check.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: check +Version: 0.15.2 +Release: %autorelease +Summary: A unit testing framework for C +License: LGPL-2.1-or-later +URL: https://libcheck.github.io/check/ +#!RemoteAsset +Source: https://github.com/libcheck/check/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-option-checking MAKEINFO=true + +BuildRequires: autoconf automake libtool +BuildRequires: pkgconfig +BuildRequires: texinfo + +%description +Check is a unit testing framework for C. It features a simple interface for +defining unit tests, putting them into a test suite, and running them. +Tests can be run in a separate address space, so Check can catch segment faults. + +%package devel +Summary: Development files for the Check unit testing framework +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and pkg-config file +needed to develop applications and tests that use the Check framework. + +%conf -p +autoreconf -fi + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING.LESSER +%{_libdir}/libcheck.so.* + +%files devel +%doc AUTHORS ChangeLog NEWS README.md THANKS TODO +%doc %{_docdir}/check +%{_bindir}/checkmk +%{_includedir}/*.h +%{_libdir}/libcheck.so +%{_libdir}/libcheck.a +%{_libdir}/pkgconfig/check.pc +%{_datadir}/aclocal/check.m4 +%{_mandir}/man1/checkmk.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/chkconfig/chkconfig.spec b/SPECS/chkconfig/chkconfig.spec new file mode 100644 index 00000000..713a1108 --- /dev/null +++ b/SPECS/chkconfig/chkconfig.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global merged_sbin %["%{_sbindir}" == "%{_bindir}"] + +Name: chkconfig +Summary: A system tool for maintaining the /etc/rc*.d hierarchy +Version: 1.33 +Release: %autorelease +License: G-PL-2.0-only +URL: https://github.com/fedora-sysv/chkconfig +#!RemoteAsset +Source: https://github.com/fedora-sysv/chkconfig/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): RPM_OPT_FLAGS="%{build_cflags}" +BuildOption(build): LDFLAGS="%{build_ldflags}" +BuildOption(build): MERGED_SBIN=%{merged_sbin} + +BuildOption(install): MANDIR=%{_mandir} +BuildOption(install): SBINDIR=%{_sbindir} + +Provides: update-alternatives +Provides: alternatives +BuildRequires: newt-devel popt-devel libselinux-devel gcc make +BuildRequires: pkgconfig(systemd) + +%description +Chkconfig is a basic system utility. It updates and queries runlevel +information for system services. Chkconfig manipulates the numerous +symbolic links in /etc/rc.d, to relieve system administrators of some +of the drudgery of manually editing the symbolic links. + +# No configure +%conf + +# TODO: enable test when we have beakerlib +%check + +%install -a +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en_GB/ +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%dir %{_sysconfdir}/alternatives +%ghost %dir %attr(755, root, root) /etc/alternatives.admindir +%ghost %dir %attr(755, root, root) /var/lib/alternatives +%{_sbindir}/ntsysv +%{_sbindir}/update-alternatives +%{_sbindir}/alternatives +%{_sbindir}/chkconfig +%{_prefix}/lib/systemd/systemd-sysv-install +%{_mandir}/man8/* + +%changelog +%{?autochangelog} diff --git a/SPECS/chrony/0001-chrony-nm-dispatcher-dhcp.patch b/SPECS/chrony/0001-chrony-nm-dispatcher-dhcp.patch new file mode 100644 index 00000000..dd9fc2aa --- /dev/null +++ b/SPECS/chrony/0001-chrony-nm-dispatcher-dhcp.patch @@ -0,0 +1,39 @@ +From: Robert Fairley +Date: Wed, 17 Jun 2020 10:14:19 -0400 +Subject: [PATCH] examples/nm-dispatcher.dhcp: use sysconfig + +Use the PEERNTP and NTPSERVERARGS environment variables from +/etc/sysconfig/network{-scripts}. + +Co-Authored-By: Christian Glombek + +diff --git a/examples/chrony.nm-dispatcher.dhcp b/examples/chrony.nm-dispatcher.dhcp +index 6ea4c37..a6ad35a 100644 +--- a/examples/chrony.nm-dispatcher.dhcp ++++ b/examples/chrony.nm-dispatcher.dhcp +@@ -8,15 +8,23 @@ export LC_ALL=C + interface=$1 + action=$2 + ++[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network ++[ -f /etc/sysconfig/network-scripts/ifcfg-"${interface}" ] && \ ++ . /etc/sysconfig/network-scripts/ifcfg-"${interface}" ++ + chronyc=/usr/bin/chronyc +-server_options=iburst +-server_dir=/var/run/chrony-dhcp ++server_options=${NTPSERVERARGS:-iburst} ++server_dir=/run/chrony-dhcp + + dhcp_server_file=$server_dir/$interface.sources + dhcp_ntp_servers="$DHCP4_NTP_SERVERS $DHCP6_DHCP6_NTP_SERVERS" + + add_servers_from_dhcp() { + rm -f "$dhcp_server_file" ++ ++ # Don't add NTP servers if PEERNTP=no specified; return early. ++ [ "$PEERNTP" = "no" ] && return ++ + for server in $dhcp_ntp_servers; do + # Check for invalid characters (from the DHCPv6 NTP FQDN suboption) + len1=$(printf '%s' "$server" | wc -c) diff --git a/SPECS/chrony/chrony.dhclient b/SPECS/chrony/chrony.dhclient new file mode 100644 index 00000000..3fe9e92d --- /dev/null +++ b/SPECS/chrony/chrony.dhclient @@ -0,0 +1,27 @@ +#!/bin/bash + +CHRONY_SOURCEDIR=/run/chrony-dhcp +SERVERFILE=$CHRONY_SOURCEDIR/$interface.sources + +chrony_config() { + # Disable modifications if called from a NM dispatcher script + [ -n "$NM_DISPATCHER_ACTION" ] && return 0 + + rm -f "$SERVERFILE" + if [ "$PEERNTP" != "no" ]; then + mkdir -p $CHRONY_SOURCEDIR + for server in $new_ntp_servers; do + echo "server $server ${NTPSERVERARGS:-iburst}" >> "$SERVERFILE" + done + /usr/bin/chronyc reload sources > /dev/null 2>&1 || : + fi +} + +chrony_restore() { + [ -n "$NM_DISPATCHER_ACTION" ] && return 0 + + if [ -f "$SERVERFILE" ]; then + rm -f "$SERVERFILE" + /usr/bin/chronyc reload sources > /dev/null 2>&1 || : + fi +} diff --git a/SPECS/chrony/chrony.spec b/SPECS/chrony/chrony.spec new file mode 100644 index 00000000..711525a0 --- /dev/null +++ b/SPECS/chrony/chrony.spec @@ -0,0 +1,127 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: chrony +Version: 4.8 +Release: %autorelease +Summary: An NTP client/server +License: GPL-2.0-only +URL: https://chrony-project.org +#!RemoteAsset +Source0: %{url}/releases/chrony-%{version}.tar.gz +#!RemoteAsset +Source1: %{url}/releases/chrony-%{version}-tar-gz-asc.txt +Source2: chrony.dhclient +Source3: chrony.sysusers +Source4: chronyd.sysconfig +BuildSystem: autotools + +# let systemd create /var/lib/chrony and /var/log/chrony +Patch0: 0001-chrony-nm-dispatcher-dhcp.patch + +BuildOption(conf): --enable-ntp-signd +BuildOption(conf): --chronyrundir=%{_rundir}/%{name} +BuildOption(conf): --with-ntp-era=$(date -d '1970-01-01 00:00:00+00:00' +'%s') +BuildOption(conf): --with-user=chrony +BuildOption(conf): --with-hwclockfile=%{_sysconfdir}/adjtime +BuildOption(conf): --with-pidfile=%{_rundir}/%{name}/chronyd.pid +BuildOption(conf): --with-sendmail=%{_sbindir}/sendmail + +BuildRequires: make +BuildRequires: pkgconfig(libcap) +BuildRequires: pkgconfig(libedit) +BuildRequires: pkgconfig(nettle) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(libseccomp) + +Requires: tzdata + +Provides: group(chrony) +Provides: user(chrony) + +%description +chrony is a versatile implementation of the Network Time Protocol (NTP). +It can synchronise the system clock with NTP servers, reference clocks +(e.g. GPS receiver), and manual input using wristwatch and keyboard. It +can also operate as an NTPv4 (RFC 5905) server and peer to provide a time +service to other computers in the network. + +%prep -a +# use example chrony.conf as the default config +touch -r examples/chrony.conf.example2 chrony.conf + +%install -a +mkdir -p %{buildroot}%{_sysconfdir}/{sysconfig,logrotate.d} +mkdir -p %{buildroot}%{_localstatedir}/{lib,log}/chrony +mkdir -p %{buildroot}%{_sysconfdir}/dhcp/dhclient.d +mkdir -p %{buildroot}%{_libexecdir} +mkdir -p %{buildroot}%{_sysusersdir} +mkdir -p %{buildroot}%{_prefix}/lib/NetworkManager/dispatcher.d +mkdir -p %{buildroot}{%{_unitdir},%{_prefix}/lib/systemd/ntp-units.d} + +install -m 644 -p chrony.conf %{buildroot}%{_sysconfdir}/chrony.conf +install -m 755 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/dhcp/dhclient.d/chrony.sh +install -m 644 -p examples/chrony.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/chrony +install -m 644 -p examples/chronyd.service %{buildroot}%{_unitdir}/chronyd.service +install -m 644 -p examples/chronyd-restricted.service %{buildroot}%{_unitdir}/chronyd-restricted.service +install -m 755 -p examples/chrony.nm-dispatcher.onoffline %{buildroot}%{_prefix}/lib/NetworkManager/dispatcher.d/20-chrony-onoffline +install -m 755 -p examples/chrony.nm-dispatcher.dhcp %{buildroot}%{_prefix}/lib/NetworkManager/dispatcher.d/20-chrony-dhcp +install -m 644 -p examples/chrony-wait.service %{buildroot}%{_unitdir}/chrony-wait.service +install -m 644 -p %{SOURCE3} %{buildroot}%{_sysusersdir}/chrony.conf +install -Dpm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/chronyd + +touch %{buildroot}%{_sysconfdir}/chrony.keys +touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc} + +echo 'chronyd.service' > %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list + +%pre +%sysusers_create_compat %{SOURCE3} + +%post +# migrate from chrony-helper to sourcedir directive +if test -a %{_libexecdir}/chrony-helper; then + grep -qi 'sourcedir /run/chrony-dhcp$' %{_sysconfdir}/chrony.conf 2> /dev/null || \ + echo -e '\n# Use NTP servers from DHCP.\nsourcedir /run/chrony-dhcp' >> \ + %{_sysconfdir}/chrony.conf + mkdir -p /run/chrony-dhcp + for f in %{_localstatedir}/lib/dhclient/chrony.servers.*; do + sed 's|.*|server &|' < $f > /run/chrony-dhcp/"${f##*servers.}.sources" + done 2> /dev/null +fi +%systemd_post chronyd.service chronyd-restricted.service chrony-wait.service + +%preun +%systemd_preun chronyd.service chronyd-restricted.service chrony-wait.service + +%postun +%systemd_postun_with_restart chronyd.service chronyd-restricted.service + +%files +%{!?_licensedir:%global license %%doc} +%license COPYING +%doc FAQ NEWS README examples/chrony.keys.example +%config(noreplace) %{_sysconfdir}/chrony.conf +%ghost %config %attr(640,root,chrony) %{_sysconfdir}/chrony.keys +%config(noreplace) %{_sysconfdir}/logrotate.d/chrony +%config(noreplace) %{_sysconfdir}/sysconfig/chronyd +%{_sysconfdir}/dhcp/dhclient.d/chrony.sh +%{_bindir}/chronyc +%{_sbindir}/chronyd +%{_prefix}/lib/NetworkManager +%{_prefix}/lib/systemd/ntp-units.d/*.list +%{_unitdir}/chrony*.service +%{_sysusersdir}/chrony.conf +%{_mandir}/man[158]/%{name}*.[158]* +%ghost %dir %attr(750,chrony,chrony) %{_localstatedir}/lib/chrony +%ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/drift +%ghost %attr(-,chrony,chrony) %{_localstatedir}/lib/chrony/rtc +%ghost %dir %attr(750,chrony,chrony) %{_localstatedir}/log/chrony + +%changelog +%{?autochangelog} diff --git a/SPECS/chrony/chrony.sysusers b/SPECS/chrony/chrony.sysusers new file mode 100644 index 00000000..b02f5fe8 --- /dev/null +++ b/SPECS/chrony/chrony.sysusers @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u chrony - "chrony system user" /var/lib/chrony /sbin/nologin diff --git a/SPECS/chrony/chronyd.sysconfig b/SPECS/chrony/chronyd.sysconfig new file mode 100644 index 00000000..8c5a5d72 --- /dev/null +++ b/SPECS/chrony/chronyd.sysconfig @@ -0,0 +1,9 @@ +## Path: Network/Chrony +## Description: Chrony time synchronization settings +## Type: string +## Default: "" +## ServiceRestart: chronyd +# +# Command line options for chronyd +# +OPTIONS="" diff --git a/SPECS/chrpath/chrpath.spec b/SPECS/chrpath/chrpath.spec new file mode 100644 index 00000000..b35cf774 --- /dev/null +++ b/SPECS/chrpath/chrpath.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: chrpath +Version: 0.18 +Release: %autorelease +Summary: Modify rpath of compiled programs +License: GPL-2.0-or-later +URL: https://codeberg.org/pere/chrpath +#!RemoteAsset +Source0: %{url}/archive/release-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake + +%description +chrpath allows you to modify the dynamic library load path (rpath) of +compiled programs. Currently, only removing and modifying the rpath +is supported. + +%conf -p +autoreconf -fi + +%install -a +rm -fr %{buildroot}/usr/doc + +%files +%doc AUTHORS README NEWS ChangeLog* +%license COPYING +%{_bindir}/chrpath +%{_mandir}/man1/chrpath.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/cloud-hypervisor/cloud-hypervisor.spec b/SPECS/cloud-hypervisor/cloud-hypervisor.spec new file mode 100644 index 00000000..a63961d3 --- /dev/null +++ b/SPECS/cloud-hypervisor/cloud-hypervisor.spec @@ -0,0 +1,102 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Ruoqing He +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global gitver 48.0 +%global gitnum 0 +%global gitrev ge8886df3 + +%global obs_packaging_commit bac875451133f6b968f5487fe2322d9c1a46a8ef + +Name: cloud-hypervisor +Url: https://github.com/cloud-hypervisor/cloud-hypervisor +Summary: Cloud Hypervisor is a Virtual Machine Monitor (VMM) that runs on top of KVM +Version: %{gitver}.%{gitnum} +Release: %autorelease +License: ASL 2.0 or BSD-3-clause +Group: Applications/System +#!RemoteAsset +Source0: https://github.com/cloud-hypervisor/obs-packaging/raw/%{obs_packaging_commit}/cloud-hypervisor/src/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/cloud-hypervisor/obs-packaging/raw/%{obs_packaging_commit}/cloud-hypervisor/src/%{name}-%{version}-vendor.tar.gz +#!RemoteAsset +Source2: https://github.com/cloud-hypervisor/obs-packaging/raw/%{obs_packaging_commit}/cloud-hypervisor/src/config.toml +ExclusiveArch: riscv64 + +BuildRequires: gcc +BuildRequires: glibc-devel +BuildRequires: binutils +BuildRequires: openssl-devel + +BuildRequires: rust >= 1.88.0 +BuildRequires: cargo >= 1.88.0 + +Requires: bash +Requires: glibc +Requires: libcap + +# TODO: Use rva23 rust toolchain to compile +%define rust_def_target riscv64gc-unknown-linux-gnu +%define cargo_pkg_feature_opts --no-default-features --features "kvm" +%define cargo_offline --offline + +%description +Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on +top of KVM. The project focuses on exclusively running modern, cloud workloads, +on top of a limited set of hardware architectures and platforms. Cloud +workloads refers to those that are usually run by customers inside a cloud +provider. For our purposes this means modern Linux* distributions with most I/O +handled by paravirtualised devices (i.e. virtio), no requirement for legacy +devices and recent CPUs and KVM. + +%prep + +%setup -q +tar xf %{SOURCE1} +mkdir -p .cargo +cp %{SOURCE2} .cargo/ + +%build +cargo_version=$(cargo --version) +if [[ $? -ne 0 ]]; then + echo "Cargo not found, please install cargo. exiting" + exit 0 +fi + +export OPENSSL_NO_VENDOR=1 +cargo build --release --target=%{rust_def_target} %{cargo_pkg_feature_opts} %{cargo_offline} +cargo build --release --target=%{rust_def_target} --package vhost_user_net %{cargo_offline} +cargo build --release --target=%{rust_def_target} --package vhost_user_block %{cargo_offline} + +%install +rm -rf %{buildroot} +install -d %{buildroot}%{_bindir} +install -D -m755 ./target/%{rust_def_target}/release/cloud-hypervisor %{buildroot}%{_bindir} +install -D -m755 ./target/%{rust_def_target}/release/ch-remote %{buildroot}%{_bindir} +install -d %{buildroot}%{_libdir} +install -d %{buildroot}%{_libdir}/cloud-hypervisor +install -D -m755 target/%{rust_def_target}/release/vhost_user_block %{buildroot}%{_libdir}/cloud-hypervisor +install -D -m755 target/%{rust_def_target}/release/vhost_user_net %{buildroot}%{_libdir}/cloud-hypervisor + +%files +%defattr(-,root,root,-) +%{_bindir}/ch-remote +%caps(cap_net_admin=ep) %{_bindir}/cloud-hypervisor +%dir %{_libdir}/cloud-hypervisor +%{_libdir}/cloud-hypervisor/vhost_user_block +%caps(cap_net_admin=ep) %{_libdir}/cloud-hypervisor/vhost_user_net +%if 0%{?using_musl_libc} +%{_libdir}/cloud-hypervisor/static/ch-remote +%caps(cap_net_admim=ep) %{_libdir}/cloud-hypervisor/static/cloud-hypervisor +%{_libdir}/cloud-hypervisor/static/vhost_user_block +%caps(cap_net_admin=ep) %{_libdir}/cloud-hypervisor/static/vhost_user_net +%endif +%license LICENSES/Apache-2.0.txt +%license LICENSES/BSD-3-Clause.txt +%license LICENSES/CC-BY-4.0.txt + +%changelog +%{?autochangelog} diff --git a/SPECS/clzip/clzip.spec b/SPECS/clzip/clzip.spec new file mode 100644 index 00000000..efe3af21 --- /dev/null +++ b/SPECS/clzip/clzip.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: clzip +Version: 1.15 +Release: %autorelease +Summary: Small, stand-alone lzip compressor and decompressor +License: GPLv2+ AND BSD-2-Clause +URL: https://www.nongnu.org/lzip/clzip.html +#!RemoteAsset +Source0: https://download.savannah.nongnu.org/releases/lzip/clzip/clzip-%{version}.tar.gz +#!RemoteAsset +Source1: https://download.savannah.nongnu.org/releases/lzip/clzip/clzip-%{version}.tar.gz.sig +BuildSystem: autotools +BuildRequires: gcc +BuildRequires: texinfo + +%description +Clzip is a compressor and decompressor for files in the lzip compression +format (.lz), written as a single small C tool with no dependencies. This makes +it well-suited to embedded and other systems without a C++ compiler, or for use +in other applications like package managers. +Clzip is intended to be fully compatible with the regular lzip package. + +%install -a +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +%ldconfig_scriptlets + +%files +%doc README +%license COPYING +%{_bindir}/clzip +%{_mandir}/man1/* +%{_infodir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/cmake/0001-cmake-findruby.patch b/SPECS/cmake/0001-cmake-findruby.patch new file mode 100644 index 00000000..00449d0a --- /dev/null +++ b/SPECS/cmake/0001-cmake-findruby.patch @@ -0,0 +1,22 @@ +Index: cmake-4.1.0/Modules/FindRuby.cmake +=================================================================== +--- cmake-4.1.0.orig/Modules/FindRuby.cmake ++++ cmake-4.1.0/Modules/FindRuby.cmake +@@ -285,14 +285,9 @@ + _RUBY_CONFIG_VAR("sitearchdir" Ruby_SITEARCH_DIR) + _RUBY_CONFIG_VAR("sitelibdir" Ruby_SITELIB_DIR) + +- # vendor_ruby available ? +- execute_process(COMMAND ${Ruby_EXECUTABLE} -r vendor-specific -e "print 'true'" +- OUTPUT_VARIABLE Ruby_HAS_VENDOR_RUBY ERROR_QUIET) +- +- if (Ruby_HAS_VENDOR_RUBY) +- _RUBY_CONFIG_VAR("vendorlibdir" Ruby_VENDORLIB_DIR) +- _RUBY_CONFIG_VAR("vendorarchdir" Ruby_VENDORARCH_DIR) +- endif () ++ # vendor_ruby ++ _RUBY_CONFIG_VAR("vendorlibdir" Ruby_VENDORLIB_DIR) ++ _RUBY_CONFIG_VAR("vendorarchdir" Ruby_VENDORARCH_DIR) + + # save the results in the cache so we don't have to run ruby the next time again + set(_Ruby_EXECUTABLE_LAST_QUERIED "${Ruby_EXECUTABLE}" CACHE INTERNAL "The ruby executable last queried for version and path info") diff --git a/SPECS/cmake/cmake.spec b/SPECS/cmake/cmake.spec new file mode 100644 index 00000000..fcc7f33d --- /dev/null +++ b/SPECS/cmake/cmake.spec @@ -0,0 +1,137 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: jchzhou +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: cmake +Version: 4.1.0 +Release: %autorelease +Summary: Cross-platform make system +License: BSD and MIT and zlib +URL: http://www.cmake.org +#!RemoteAsset +Source0: https://www.cmake.org/files/v4.1/cmake-%{version}.tar.gz +Source1: macros.cmake +Source2: macros.buildsystem.cmake +# Patch for ruby to unconditionally check for vendordir +Patch0: 0001-cmake-findruby.patch +BuildSystem: autotools + +# qt-gui and emacs-lisp features are removed to make cmake usable ASAP +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc-c++ +Requires: cmake-data = %{version}-%{release} cmake-rpm-macros = %{version}-%{release} +Requires: cmake-filesystem = %{version}-%{release} +Provides: bundled(md5-deutsch) bundled(kwsys) bundled(cppdap) + +BuildOption(conf): --no-system-libs + +%description +CMake is used to control the software compilation process using simple +platform and compiler independent configuration files. CMake generates +native makefiles and workspaces that can be used in the compiler +environment of your choice. CMake is quite sophisticated: it is possible +to support complex environments requiring system configuration, preprocessor +generation, code generation, and template instantiation. + +%package data +Summary: Common data-files for cmake +Requires: cmake = %{version}-%{release} +Requires: cmake-rpm-macros = %{version}-%{release} +BuildArch: noarch + +%description data +This package contains common data-files for cmake. + +%package filesystem +Summary: Directories used by CMake modules + +%description filesystem +This package owns all directories used by CMake modules. + +%package rpm-macros +Summary: Common RPM macros for cmake +Requires: rpm +Conflicts: cmake-data < 3.10.1-2 +BuildArch: noarch + +%description rpm-macros +This package contains common RPM macros for cmake. + +%conf +# cmake also need openssl to make FetchContent() usable, but in rpm building +# process we should download all sources in advance +echo "set(CMAKE_USE_OPENSSL OFF)" | cat - CMakeLists.txt > tmpfile && mv tmpfile CMakeLists.txt +./bootstrap --prefix=%{_prefix} --datadir=/share/cmake \ + --docdir=/share/doc/cmake --mandir=/share/man \ + --no-system-libs \ + --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \ + --no-system-cppdap \ + --no-system-librhash + +%install -a +# install cmake rpm macros +install -p -m0644 -D %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.cmake +sed -i -e "s|@@CMAKE_VERSION@@|%{version}|" -e "s|@@CMAKE_MAJOR_VERSION@@|4|" %{buildroot}%{_rpmmacrodir}/macros.cmake +install -p -m0644 -D %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.buildsystem.cmake + +# update cmake rpm macro file timestamp +touch -r %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.cmake +touch -r %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.buildsystem.cmake + +# install Copyright and dependencies' Copyright +install -d %{buildroot}%{_libdir}/cmake +find Source Utilities -type f -iname copy\* +cp -p Source/kwsys/Copyright.txt ./Copyright_kwsys +cp -p Utilities/KWIML/Copyright.txt ./Copyright_KWIML +cp -p Utilities/cmlibarchive/COPYING ./COPYING_cmlibarchive +cp -p Utilities/cmliblzma/COPYING ./COPYING_cmliblzma +cp -p Utilities/cmcurl/COPYING ./COPYING_cmcurl +cp -p Utilities/cmlibrhash/COPYING ./COPYING_cmlibrhash +cp -p Utilities/cmzlib/Copyright.txt ./Copyright_cmzlib +cp -p Utilities/cmexpat/COPYING ./COPYING_cmexpat +cp -p Utilities/cmcppdap/LICENSE LICENSE.cppdap +cp -p Utilities/cmcppdap/NOTICE NOTICE.cppdap + +# install help files +install -d %{buildroot}%{_docdir}/cmake +cp -pr %{buildroot}%{_datadir}/cmake/Help %{buildroot}%{_docdir}/cmake + +# temporary files used to create cmake-filesystem package +find %{buildroot}%{_datadir}/cmake -type d | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > data_dirs.mf +find %{buildroot}%{_libdir}/cmake -type d | sed -e 's!^%{buildroot}!%%dir "!g' -e 's!$!"!g' > lib_dirs.mf + +# remove unnecessary emac lisp files +rm -rf %{buildroot}%{_datadir}/emacs + + +%files +%doc %dir %{_docdir}/cmake +%license Copyright_* COPYING* LICENSE.rst CONTRIBUTORS.rst +%license LICENSE.cppdap NOTICE.cppdap +%{_bindir}/cmake +%{_bindir}/cpack +%{_bindir}/ctest +%{_libdir}/cmake +%doc %{_docdir}/cmake/* + +%files filesystem -f data_dirs.mf -f lib_dirs.mf + +%files data +%{_datadir}/cmake +%{_datadir}/aclocal/cmake.m4 +%{_datadir}/bash-completion +%{_datadir}/vim/vimfiles/indent/%{name}.vim +%{_datadir}/vim/vimfiles/syntax/%{name}.vim +%exclude %{_datadir}/cmake/Templates/Windows/Windows_TemporaryKey.pfx + +%files rpm-macros +%{_rpmmacrodir}/macros.cmake +%{_rpmmacrodir}/macros.buildsystem.cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/cmake/macros.buildsystem.cmake b/SPECS/cmake/macros.buildsystem.cmake new file mode 100644 index 00000000..015bce57 --- /dev/null +++ b/SPECS/cmake/macros.buildsystem.cmake @@ -0,0 +1,6 @@ + +# Example buildsystem for cmake +%buildsystem_cmake_conf() %cmake %* +%buildsystem_cmake_build() %cmake_build %* +%buildsystem_cmake_install() %cmake_install %* +%buildsystem_cmake_check() %ctest %* \ No newline at end of file diff --git a/SPECS/cmake/macros.cmake b/SPECS/cmake/macros.cmake new file mode 100644 index 00000000..1acdfb36 --- /dev/null +++ b/SPECS/cmake/macros.cmake @@ -0,0 +1,65 @@ +# +# Macros for cmake +# +%_cmake_lib_suffix64 -DLIB_SUFFIX=64 +%_cmake_shared_libs -DBUILD_SHARED_LIBS:BOOL=ON +%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON +%_cmake_version @@CMAKE_VERSION@@ +%__cmake /usr/bin/cmake +%__ctest /usr/bin/ctest +%__cmake_builddir %{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.} + +# - Set default compile flags +# - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables +# and default to -O3 -DNDEBUG. Strip the -O3 so we can override with *FLAGS +# - Turn on verbose makefiles so we can see and verify compile flags +# - Turn off stripping by default so RPM can do it separately +# - Set default install prefixes and library install directories +# - Turn on shared libraries by default +%cmake \ + %{set_build_flags} \ + %__cmake \\\ + %{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \\\ + %{!?__cmake_in_source_build:-B "%{__cmake_builddir}"} \\\ + -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ + -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\ + -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\ + -DCMAKE_INSTALL_FULL_LIBDIR:PATH=%{_libdir} \\\ + -DCMAKE_INSTALL_LIBEXECDIR:PATH=%(s=%{_libexecdir}; echo ${s##*/}) \\\ + -DCMAKE_INSTALL_FULL_LIBEXECDIR:PATH=%{_libexecdir} \\\ + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ + -DCMAKE_INSTALL_FULL_SBINDIR:PATH=%{_sbindir} \\\ + -DCMAKE_INSTALL_SBINDIR:PATH=%(s=%{_sbindir}; echo ${s##*/}) \\\ + -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ + -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\ + -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ + -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ +%if "%{?_lib}" == "lib64" \ + %{?_cmake_lib_suffix64} \\\ +%endif \ + %{?_cmake_shared_libs} + +%cmake_build \ + %__cmake --build "%{__cmake_builddir}" %{?_smp_mflags} --verbose + +%cmake_install \ + DESTDIR="%{buildroot}" %__cmake --install "%{__cmake_builddir}" + +%ctest(:-:h:j:u:v:A:C:D:E:F:H:I:L:M:N:O:Q:R:S:T:U:V:) \ + %__ctest --test-dir "%{__cmake_builddir}" \\\ + --output-on-failure \\\ + --force-new-ctest-process \\\ +%ifarch riscv64 \ + --timeout 6000 \\\ +%endif \ + %{?_smp_mflags} \\\ + %{lua:print((string.gsub(rpm.expand('%{**}'),"%-%-%s","")))} + +%cmake@@CMAKE_MAJOR_VERSION@@ %cmake +%cmake@@CMAKE_MAJOR_VERSION@@_build %cmake_build +%cmake@@CMAKE_MAJOR_VERSION@@_install %cmake_install +%ctest@@CMAKE_MAJOR_VERSION@@(:-:h:j:u:v:A:C:D:E:F:H:I:L:M:N:O:Q:R:S:T:U:V:) \ + %ctest %{**} diff --git a/SPECS/cmocka/cmocka.spec b/SPECS/cmocka/cmocka.spec new file mode 100644 index 00000000..1a353968 --- /dev/null +++ b/SPECS/cmocka/cmocka.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: cmocka +Version: 1.1.7 +Release: %autorelease +Summary: Lightweight library to simplify and generalize unit tests for C +License: Apache-2.0 +URL: https://cmocka.org + +#!RemoteAsset +Source0: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz.asc + +BuildRequires: cmake +BuildRequires: pkg-config +BuildSystem: cmake + +%description +cmocka is an elegant unit testing framework for C with support for mock +objects. It only requires the standard C library, works on a range of computing +platforms (including embedded) and with different compilers. + +%package devel +Summary: Development headers for the cmocka library +Requires: cmocka = %{version} +Requires: pkg-config +Requires: (cmocka-cmake if cmake) + +%description devel +Development headers for the cmocka unit testing library. + +%package cmake +Summary: cmake support for the cmocka library +Requires: cmake +Requires: cmocka-devel = %{version} +Provides: cmocka-devel:%{_libdir}/cmake/cmocka + +%description cmake +cmake support for developing with the cmocka unit testing library. + +%ldconfig_scriptlets + +%files +%doc AUTHORS README.md ChangeLog +%license COPYING +%{_libdir}/libcmocka.so.* + +%files devel +%{_includedir}/cmocka.h +%{_includedir}/cmocka_pbc.h +%{_libdir}/libcmocka.so +%{_libdir}/pkgconfig/cmocka.pc + +%files cmake +%{_libdir}/cmake/cmocka + +%changelog +%{?autochangelog} diff --git a/SPECS/config/config.spec b/SPECS/config/config.spec new file mode 100644 index 00000000..b62a105d --- /dev/null +++ b/SPECS/config/config.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global commit a2287c3041a3f2a204eb942e09c015eab00dc7dd +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: config +Version: 20250710+git%{shortcommit} +Release: %autorelease +Summary: Ubiquitous config.guess and config.sub scripts +License: GPL-2.0-or-later +URL: https://savannah.gnu.org/projects/config +#!RemoteAsset +Source0: https://git.savannah.gnu.org/cgit/config.git/snapshot/config-%{commit}.tar.gz + +BuildRequires: make +BuildRequires: help2man + +%description +The `config.guess` script tries to guess a canonical system triple, and +`config.sub` validates and canonicalizes it. These are used as part of +configuration in nearly all GNU packages (and many others). + +%prep +%setup -q -n config-%{commit} +# Fix the shebang to use /usr/bin/env +sed -i '1s|^#!/bin/sh$|#!/usr/bin/env sh|' testsuite/config-guess.sh || true + +%build +make manpages + +%install +mkdir -p %{buildroot}%{_bindir} +install -m755 config.guess %{buildroot}%{_bindir}/config.guess +install -m755 config.sub %{buildroot}%{_bindir}/config.sub + +mkdir -p %{buildroot}%{_mandir}/man1 +install -m644 doc/config.guess.1 %{buildroot}%{_mandir}/man1/config.guess.1 +install -m644 doc/config.sub.1 %{buildroot}%{_mandir}/man1/config.sub.1 + +%files +%{_bindir}/config.guess +%{_bindir}/config.sub +%{_mandir}/man1/config.guess.1* +%{_mandir}/man1/config.sub.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/conntrack-tools/conntrack-tools.spec b/SPECS/conntrack-tools/conntrack-tools.spec new file mode 100644 index 00000000..58fc7704 --- /dev/null +++ b/SPECS/conntrack-tools/conntrack-tools.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond systemd 1 + +Name: conntrack-tools +Version: 1.4.8 +Release: %autorelease +Summary: Userspace tools for interacting with the Connection Tracking System +License: GPL-2.0-only +URL: http://conntrack-tools.netfilter.org/ +#!RemoteAsset +Source0: http://netfilter.org/projects/conntrack-tools/files/%{name}-%{version}.tar.xz +Source1: conntrackd.service +Source2: conntrackd.conf +BuildSystem: autotools + +BuildOption(conf): --disable-static +%if %{with systemd} +BuildOption(conf): --enable-systemd +%else +BuildOption(conf): --disable-systemd +%endif +BuildOption(build): CFLAGS='%{optflags} -Wl,-z,lazy -DCONNTRACKD_LIB_DIR=\"%{_libdir}/conntrack-tools\"' + +BuildRequires: libnfnetlink-devel libnetfilter_conntrack-devel libtirpc-devel +BuildRequires: libnetfilter_cttimeout-devel libnetfilter_cthelper-devel +BuildRequires: libmnl-devel libnetfilter_queue-devel pkgconfig bison flex +BuildRequires: gcc make +%if %{with systemd} +BuildRequires: systemd-devel +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif + +%description +The conntrack-tools are a set of userspace tools that allow system +administrators to interact with the Connection Tracking System. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +install -d %{buildroot}%{_sysconfdir}/conntrackd +install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/conntrackd/ +%if %{with systemd} +install -d 0755 %{buildroot}%{_unitdir} +install -m644 %{SOURCE1} %{buildroot}%{_unitdir}/ +%endif + +%if %{with systemd} +%post +%systemd_post conntrackd.service +%preun +%systemd_preun conntrackd.service +%postun +%systemd_postun conntrackd.service +%endif + +%files +%doc AUTHORS TODO COPYING +%dir %{_sysconfdir}/conntrackd +%config(noreplace) %{_sysconfdir}/conntrackd/conntrackd.conf +%if %{with systemd} +%{_unitdir}/conntrackd.service +%endif +%{_sbindir}/{conntrack,conntrackd,nfct} +%dir %{_libdir}/conntrack-tools +%{_libdir}/conntrack-tools/* +%doc doc +%{_mandir}/man5/* +%{_mandir}/man8/* + +%changelog +%{?autochangelog} diff --git a/SPECS/conntrack-tools/conntrackd.conf b/SPECS/conntrack-tools/conntrackd.conf new file mode 100644 index 00000000..3970e91b --- /dev/null +++ b/SPECS/conntrack-tools/conntrackd.conf @@ -0,0 +1,419 @@ + +# See also: http://conntrack-tools.netfilter.org/support.html +# +# There are 3 different modes of running conntrackd: "alarm", "notrack" and "ftfw" +# +# The default package ships with a FTFW configuration, see /usr/share/doc/conntrackd* +# for example configurations for other modes. + + +# +# Synchronizer settings +# +Sync { + Mode FTFW { + # + # Size of the resend queue (in objects). This is the maximum + # number of objects that can be stored waiting to be confirmed + # via acknoledgment. If you keep this value low, the daemon + # will have less chances to recover state-changes under message + # omission. On the other hand, if you keep this value high, + # the daemon will consume more memory to store dead objects. + # Default is 131072 objects. + # + # ResendQueueSize 131072 + + # + # This parameter allows you to set an initial fixed timeout + # for the committed entries when this node goes from backup + # to primary. This mechanism provides a way to purge entries + # that were not recovered appropriately after the specified + # fixed timeout. If you set a low value, TCP entries in + # Established states with no traffic may hang. For example, + # an SSH connection without KeepAlive enabled. If not set, + # the daemon uses an approximate timeout value calculation + # mechanism. By default, this option is not set. + # + # CommitTimeout 180 + + # + # If the firewall replica goes from primary to backup, + # the conntrackd -t command is invoked in the script. + # This command schedules a flush of the table in N seconds. + # This is useful to purge the connection tracking table of + # zombie entries and avoid clashes with old entries if you + # trigger several consecutive hand-overs. Default is 60 seconds. + # + # PurgeTimeout 60 + + # Set the acknowledgement window size. If you decrease this + # value, the number of acknowlegdments increases. More + # acknowledgments means more overhead as conntrackd has to + # handle more control messages. On the other hand, if you + # increase this value, the resend queue gets more populated. + # This results in more overhead in the queue releasing. + # The following value is based on some practical experiments + # measuring the cycles spent by the acknowledgment handling + # with oprofile. If not set, default window size is 300. + # + # ACKWindowSize 300 + + # + # This clause allows you to disable the external cache. Thus, + # the state entries are directly injected into the kernel + # conntrack table. As a result, you save memory in user-space + # but you consume slots in the kernel conntrack table for + # backup state entries. Moreover, disabling the external cache + # means more CPU consumption. You need a Linux kernel + # >= 2.6.29 to use this feature. By default, this clause is + # set off. If you are installing conntrackd for first time, + # please read the user manual and I encourage you to consider + # using the fail-over scripts instead of enabling this option! + # + # DisableExternalCache Off + } + + # + # Multicast IP and interface where messages are + # broadcasted (dedicated link). IMPORTANT: Make sure + # that iptables accepts traffic for destination + # 225.0.0.50, eg: + # + # iptables -I INPUT -d 225.0.0.50 -j ACCEPT + # iptables -I OUTPUT -d 225.0.0.50 -j ACCEPT + # + Multicast { + # + # Multicast address: The address that you use as destination + # in the synchronization messages. You do not have to add + # this IP to any of your existing interfaces. If any doubt, + # do not modify this value. + # + IPv4_address 225.0.0.50 + + # + # The multicast group that identifies the cluster. If any + # doubt, do not modify this value. + # + Group 3780 + + # + # IP address of the interface that you are going to use to + # send the synchronization messages. Remember that you must + # use a dedicated link for the synchronization messages. + # + IPv4_interface 192.168.100.100 + + # + # The name of the interface that you are going to use to + # send the synchronization messages. + # + Interface eth2 + + # The multicast sender uses a buffer to enqueue the packets + # that are going to be transmitted. The default size of this + # socket buffer is available at /proc/sys/net/core/wmem_default. + # This value determines the chances to have an overrun in the + # sender queue. The overrun results packet loss, thus, losing + # state information that would have to be retransmitted. If you + # notice some packet loss, you may want to increase the size + # of the sender buffer. The default size is usually around + # ~100 KBytes which is fairly small for busy firewalls. + # + SndSocketBuffer 1249280 + + # The multicast receiver uses a buffer to enqueue the packets + # that the socket is pending to handle. The default size of this + # socket buffer is available at /proc/sys/net/core/rmem_default. + # This value determines the chances to have an overrun in the + # receiver queue. The overrun results packet loss, thus, losing + # state information that would have to be retransmitted. If you + # notice some packet loss, you may want to increase the size of + # the receiver buffer. The default size is usually around + # ~100 KBytes which is fairly small for busy firewalls. + # + RcvSocketBuffer 1249280 + + # + # Enable/Disable message checksumming. This is a good + # property to achieve fault-tolerance. In case of doubt, do + # not modify this value. + # + Checksum on + } + # + # You can specify more than one dedicated link. Thus, if one dedicated + # link fails, conntrackd can fail-over to another. Note that adding + # more than one dedicated link does not mean that state-updates will + # be sent to all of them. There is only one active dedicated link at + # a given moment. The `Default' keyword indicates that this interface + # will be selected as the initial dedicated link. You can have + # up to 4 redundant dedicated links. Note: Use different multicast + # groups for every redundant link. + # + # Multicast Default { + # IPv4_address 225.0.0.51 + # Group 3781 + # IPv4_interface 192.168.100.101 + # Interface eth3 + # # SndSocketBuffer 1249280 + # # RcvSocketBuffer 1249280 + # Checksum on + # } + + # + # You can use Unicast UDP instead of Multicast to propagate events. + # Note that you cannot use unicast UDP and Multicast at the same + # time, you can only select one. + # + # UDP { + # + # UDP address that this firewall uses to listen to events. + # + # IPv4_address 192.168.2.100 + # + # or you may want to use an IPv6 address: + # + # IPv6_address fe80::215:58ff:fe28:5a27 + + # + # Destination UDP address that receives events, ie. the other + # firewall's dedicated link address. + # + # IPv4_Destination_Address 192.168.2.101 + # + # or you may want to use an IPv6 address: + # + # IPv6_Destination_Address fe80::2d0:59ff:fe2a:775c + + # + # UDP port used + # + # Port 3780 + + # + # The name of the interface that you are going to use to + # send the synchronization messages. + # + # Interface eth2 + + # + # The sender socket buffer size + # + # SndSocketBuffer 1249280 + + # + # The receiver socket buffer size + # + # RcvSocketBuffer 1249280 + + # + # Enable/Disable message checksumming. + # + # Checksum on + # } + + # + # Other unsorted options that are related to the synchronization. + # + # Options { + # + # TCP state-entries have window tracking disabled by default, + # you can enable it with this option. As said, default is off. + # This feature requires a Linux kernel >= 2.6.36. + # + # TCPWindowTracking Off + # } +} + +# +# General settings +# +General { + # + # Set the nice value of the daemon, this value goes from -20 + # (most favorable scheduling) to 19 (least favorable). Using a + # very low value reduces the chances to lose state-change events. + # Default is 0 but this example file sets it to most favourable + # scheduling as this is generally a good idea. See man nice(1) for + # more information. + # + Nice -20 + + # + # Select a different scheduler for the daemon, you can select between + # RR and FIFO and the process priority (minimum is 0, maximum is 99). + # See man sched_setscheduler(2) for more information. Using a RT + # scheduler reduces the chances to overrun the Netlink buffer. + # + # Scheduler { + # Type FIFO + # Priority 99 + # } + + # + # Number of buckets in the cache hashtable. The bigger it is, + # the closer it gets to O(1) at the cost of consuming more memory. + # Read some documents about tuning hashtables for further reference. + # + HashSize 32768 + + # + # Maximum number of conntracks, it should be double of: + # $ cat /proc/sys/net/netfilter/nf_conntrack_max + # since the daemon may keep some dead entries cached for possible + # retransmission during state synchronization. + # + HashLimit 131072 + + # + # Logfile: on (/var/log/conntrackd.log), off, or a filename + # Default: off + # + LogFile on + + # + # Syslog: on, off or a facility name (daemon (default) or local0..7) + # Default: off + # + #Syslog on + + # + # Lockfile + # + LockFile /var/lock/conntrack.lock + + # + # Unix socket configuration + # + UNIX { + Path /var/run/conntrackd.ctl + Backlog 20 + } + + # + # Netlink event socket buffer size. If you do not specify this clause, + # the default buffer size value in /proc/net/core/rmem_default is + # used. This default value is usually around 100 Kbytes which is + # fairly small for busy firewalls. This leads to event message dropping + # and high CPU consumption. This example configuration file sets the + # size to 2 MBytes to avoid this sort of problems. + # + NetlinkBufferSize 2097152 + + # + # The daemon doubles the size of the netlink event socket buffer size + # if it detects netlink event message dropping. This clause sets the + # maximum buffer size growth that can be reached. This example file + # sets the size to 8 MBytes. + # + NetlinkBufferSizeMaxGrowth 8388608 + + # + # If the daemon detects that Netlink is dropping state-change events, + # it automatically schedules a resynchronization against the Kernel + # after 30 seconds (default value). Resynchronizations are expensive + # in terms of CPU consumption since the daemon has to get the full + # kernel state-table and purge state-entries that do not exist anymore. + # Be careful of setting a very small value here. You have the following + # choices: On (enabled, use default 30 seconds value), Off (disabled) + # or Value (in seconds, to set a specific amount of time). If not + # specified, the daemon assumes that this option is enabled. + # + # NetlinkOverrunResync On + + # + # If you want reliable event reporting over Netlink, set on this + # option. If you set on this clause, it is a good idea to set off + # NetlinkOverrunResync. This option is off by default and you need + # a Linux kernel >= 2.6.31. + # + # NetlinkEventsReliable Off + + # + # By default, the daemon receives state updates following an + # event-driven model. You can modify this behaviour by switching to + # polling mode with the PollSecs clause. This clause tells conntrackd + # to dump the states in the kernel every N seconds. With regards to + # synchronization mode, the polling mode can only guarantee that + # long-lifetime states are recovered. The main advantage of this method + # is the reduction in the state replication at the cost of reducing the + # chances of recovering connections. + # + # PollSecs 15 + + # + # The daemon prioritizes the handling of state-change events coming + # from the core. With this clause, you can set the maximum number of + # state-change events (those coming from kernel-space) that the daemon + # will handle after which it will handle other events coming from the + # network or userspace. A low value improves interactivity (in terms of + # real-time behaviour) at the cost of extra CPU consumption. + # Default (if not set) is 100. + # + # EventIterationLimit 100 + + # + # Event filtering: This clause allows you to filter certain traffic, + # There are currently three filter-sets: Protocol, Address and + # State. The filter is attached to an action that can be: Accept or + # Ignore. Thus, you can define the event filtering policy of the + # filter-sets in positive or negative logic depending on your needs. + # You can select if conntrackd filters the event messages from + # user-space or kernel-space. The kernel-space event filtering + # saves some CPU cycles by avoiding the copy of the event message + # from kernel-space to user-space. The kernel-space event filtering + # is prefered, however, you require a Linux kernel >= 2.6.29 to + # filter from kernel-space. If you want to select kernel-space + # event filtering, use the keyword 'Kernelspace' instead of + # 'Userspace'. + # + Filter From Userspace { + # + # Accept only certain protocols: You may want to replicate + # the state of flows depending on their layer 4 protocol. + # + Protocol Accept { + TCP + SCTP + DCCP + # UDP + # ICMP # This requires a Linux kernel >= 2.6.31 + # IPv6-ICMP # This requires a Linux kernel >= 2.6.31 + } + + # + # Ignore traffic for a certain set of IP's: Usually all the + # IP assigned to the firewall since local traffic must be + # ignored, only forwarded connections are worth to replicate. + # Note that these values depends on the local IPs that are + # assigned to the firewall. + # + Address Ignore { + IPv4_address 127.0.0.1 # loopback + IPv4_address 192.168.0.100 # virtual IP 1 + IPv4_address 192.168.1.100 # virtual IP 2 + IPv4_address 192.168.0.1 + IPv4_address 192.168.1.1 + IPv4_address 192.168.100.100 # dedicated link ip + # + # You can also specify networks in format IP/cidr. + # IPv4_address 192.168.0.0/24 + # + # You can also specify an IPv6 address + # IPv6_address ::1 + } + + # + # Uncomment this line below if you want to filter by flow state. + # This option introduces a trade-off in the replication: it + # reduces CPU consumption at the cost of having lazy backup + # firewall replicas. The existing TCP states are: SYN_SENT, + # SYN_RECV, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, LAST_ACK, + # TIME_WAIT, CLOSED, LISTEN. + # + # State Accept { + # ESTABLISHED CLOSED TIME_WAIT CLOSE_WAIT for TCP + # } + } +} diff --git a/SPECS/conntrack-tools/conntrackd.service b/SPECS/conntrack-tools/conntrackd.service new file mode 100644 index 00000000..9c108d72 --- /dev/null +++ b/SPECS/conntrack-tools/conntrackd.service @@ -0,0 +1,13 @@ +[Unit] +Description=connection tracking daemon for debugging and High Availablity +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +# rhbz#1255578 daemon will not start if lock file is left dangling +ExecStartPre=/bin/rm -f /var/lock/conntrack.lock +ExecStart=/usr/sbin/conntrackd -C /etc/conntrackd/conntrackd.conf + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/console-setup/0001-fix-makefile.patch b/SPECS/console-setup/0001-fix-makefile.patch new file mode 100644 index 00000000..1ec55104 --- /dev/null +++ b/SPECS/console-setup/0001-fix-makefile.patch @@ -0,0 +1,143 @@ +diff --git a/Makefile b/Makefile +index 5c1012c..3ce30dc 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,71 +10,89 @@ include Fonts/Makefile + . := $(maindir) + ~ := main + +-prefix := /usr/local +-# etcdir must be either /etc or +-etcdir := $(prefix)/etc +-bootprefix := $(patsubst %/usr,%/,$(prefix:%/=%)) +-mandir := $(prefix)/share/man ++# ---- Installation Directories ---- ++# Allow these to be overridden from the command line, e.g., make prefix=/usr ++prefix ?= /usr ++exec_prefix ?= $(prefix) ++bindir ?= $(exec_prefix)/bin ++sbindir ?= $(exec_prefix)/sbin ++# Use a standard variable for /etc ++sysconfdir ?= /etc ++datarootdir ?= $(prefix)/share ++datadir ?= $(datarootdir) ++mandir ?= $(datarootdir)/man ++ ++# Define specific application directories based on the above ++# Use DESTDIR for staging installations (e.g., RPM builds) ++DESTDIR ?= ++install_root = $(DESTDIR) ++ ++# --- Original variables remapped to standard ones --- ++# etcdir is now sysconfdir ++# bootprefix/bin is now bindir or sbindir + + acmfiles := $(wildcard $./acm/*.acm) +- + gzipped_acmfiles := $(addsuffix .gz, $(acmfiles)) + +-gzipped-acmfiles : $(gzipped_acmfiles) ++gzipped-acmfiles: $(gzipped_acmfiles) + + build-common: gzipped-acmfiles + + .PHONY: install-common + install-common: build-common +- install -d $(bootprefix)/bin/ +- install setupcon $(bootprefix)/bin/ +- install -d $(etcdir)/default +- install -m 644 config/keyboard $(etcdir)/default/ +- install -m 644 config/console-setup $(etcdir)/default/ +- install -d $(mandir)/man1/ +- install -m 644 man/setupcon.1 $(mandir)/man1/ +- install -d $(mandir)/man5/ +- install -m 644 man/keyboard.5 $(mandir)/man5/ +- install -m 644 man/console-setup.5 $(mandir)/man5/ ++ install -d $(install_root)$(bindir)/ ++ install setupcon $(install_root)$(bindir)/ ++ install -d $(install_root)$(sysconfdir)/default ++ install -m 644 config/keyboard $(install_root)$(sysconfdir)/default/ ++ install -m 644 config/console-setup $(install_root)$(sysconfdir)/default/ ++ install -d $(install_root)$(mandir)/man1/ ++ install -m 644 man/setupcon.1 $(install_root)$(mandir)/man1/ ++ install -d $(install_root)$(mandir)/man5/ ++ install -m 644 man/keyboard.5 $(install_root)$(mandir)/man5/ ++ install -m 644 man/console-setup.5 $(install_root)$(mandir)/man5/ + + .PHONY: install-common-linux + install-common-linux: build-linux +- install -d $(prefix)/share/consolefonts/ +- install -m 644 Fonts/*.psf.gz $(prefix)/share/consolefonts/ +- install -d $(prefix)/share/consoletrans +- install -m 644 acm/*.acm.gz $(prefix)/share/consoletrans/ +- install -d $(etcdir)/console-setup +- install -m 644 Keyboard/compose.*.inc $(etcdir)/console-setup/ +- install -m 644 Keyboard/remap.inc $(etcdir)/console-setup/ ++ install -d $(install_root)$(datadir)/consolefonts/ ++ install -m 644 Fonts/*.psf.gz $(install_root)$(datadir)/consolefonts/ ++ install -d $(install_root)$(datadir)/consoletrans ++ install -m 644 acm/*.acm.gz $(install_root)$(datadir)/consoletrans/ ++ # As per spec, we do not install /etc/console-setup by default. ++ # The user can run a separate make target if they want it. ++ # install -d $(install_root)$(sysconfdir)/console-setup ++ # install -m 644 Keyboard/compose.*.inc $(install_root)$(sysconfdir)/console-setup/ ++ # install -m 644 Keyboard/remap.inc $(install_root)$(sysconfdir)/console-setup/ ++ + + .PHONY: install-ckbcomp + install-ckbcomp: +- if [ -z "$(xkbdir)" ]; then \ +- mkdir -p $(etcdir)/console-setup \ +- && cp -r Keyboard/ckb/ $(etcdir)/console-setup/ckb; \ +- fi +- install -d $(prefix)/bin/ +- install -m 755 Keyboard/ckbcomp $(prefix)/bin/ +- install -d $(mandir)/man1/ +- install -m 644 man/ckbcomp.1 $(mandir)/man1/ +- +-.PHONY : install-ckbcomp-mini +-install-ckbcomp-mini: build-mini-linux +- install -d $(prefix)/share/console-setup/ +- -install -m 644 Keyboard/*.ekmap.gz $(prefix)/share/console-setup/ +- install -m 644 Keyboard/charmap_functions.sh $(prefix)/share/console-setup/ +- install -d $(prefix)/bin/ +- install -m 755 Keyboard/ckbcomp-mini $(prefix)/bin/ +- ln -s ckbcomp-mini $(prefix)/bin/ckbcomp +- install -d $(mandir)/man1/ +- install -m 644 man/ckbcomp.1 $(mandir)/man1/ +- ln -s ckbcomp.1 $(mandir)/man1/ckbcomp-mini.1 +- ++ # As per spec, we do not install /etc/console-setup/ckb by default. ++ # if [ -z "$(xkbdir)" ]; then \ ++ # mkdir -p $(install_root)$(sysconfdir)/console-setup \ ++ # && cp -r Keyboard/ckb/ $(install_root)$(sysconfdir)/console-setup/ckb; \ ++ # fi ++ install -d $(install_root)$(bindir)/ ++ install -m 755 Keyboard/ckbcomp $(install_root)$(bindir)/ ++ install -d $(install_root)$(mandir)/man1/ ++ install -m 644 man/ckbcomp.1 $(install_root)$(mandir)/man1/ ++ ++# This target installs bdf2psf and its data ++.PHONY: install-bdf2psf ++install-bdf2psf: ++ install -d $(install_root)$(bindir) ++ install -m 755 Fonts/bdf2psf $(install_root)$(bindir)/ ++ install -d $(install_root)$(mandir)/man1 ++ install -m 644 man/bdf2psf.1 $(install_root)$(mandir)/man1/ ++ install -d $(install_root)$(datadir)/bdf2psf ++ cp -a Fonts/fontsets Fonts/*.equivalents Fonts/*.set $(install_root)$(datadir)/bdf2psf/ ++ ++# The main install target, now supporting DESTDIR ++.PHONY: install ++install: install-common install-common-linux install-ckbcomp install-bdf2psf ++ ++# An alias for backward compatibility with the spec file's old target + .PHONY: install-linux +-install-linux: install-common install-common-linux install-ckbcomp +- +-.PHONY : install-mini-linux +-install-mini-linux: install-common install-common-linux install-ckbcomp-mini ++install-linux: install + + common-uninstall: | build-linux build-mini-linux + -for font in Fonts/*.psf.gz; do \ diff --git a/SPECS/console-setup/console-setup.spec b/SPECS/console-setup/console-setup.spec new file mode 100644 index 00000000..0d446317 --- /dev/null +++ b/SPECS/console-setup/console-setup.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: console-setup +Version: 1.242 +Release: %autorelease +Summary: Tools for configuring the console font and keyboard +License: GPL-2.0-or-later AND MIT AND LicenseRef-Fedora-Public-Domain +URL: https://packages.debian.org/sid/console-setup +#!RemoteAsset +Source: https://ftp.debian.org/debian/pool/main/c/console-setup/console-setup_%{version}.tar.xz +BuildSystem: autotools +Patch: 0001-fix-makefile.patch + +BuildOption(install): prefix=%{_prefix} +BuildOption(install): exec_prefix=%{_exec_prefix} +BuildOption(install): bindir=%{_bindir} +BuildOption(install): sbindir=%{_sbindir} +BuildOption(install): sysconfdir=%{_sysconfdir} +BuildOption(install): datarootdir=%{_datadir} +BuildOption(install): mandir=%{_mandir} + +BuildRequires: perl +BuildRequires: make +Requires: kbd + +%description +This package provides tools to configure the console's font and keyboard layout, +often using settings derived from the X Window System. + +%package -n bdf2psf +Summary: Generate console fonts from BDF source fonts + +%description -n bdf2psf +This package provides a command-line converter to build console fonts from BDF +sources. + +# No configure +%conf + +# No tests +%check + +%files +%doc README COPYRIGHT CHANGES copyright.fonts copyright.xkb Fonts/copyright +%{_bindir}/ckbcomp +%{_bindir}/setupcon +%config(noreplace) %{_sysconfdir}/default/console-setup +%config(noreplace) %{_sysconfdir}/default/keyboard +%{_datadir}/consolefonts/ +%{_datadir}/consoletrans/ +%{_mandir}/man1/ckbcomp.1* +%{_mandir}/man1/setupcon.1* +%{_mandir}/man5/console-setup.5* +%{_mandir}/man5/keyboard.5* + +%files -n bdf2psf +%license GPL-2 +%{_bindir}/bdf2psf +%{_mandir}/man1/bdf2psf.1* +%{_datadir}/bdf2psf/ + +%changelog +%{?autochangelog} diff --git a/SPECS/coreutils/coreutils.spec b/SPECS/coreutils/coreutils.spec new file mode 100644 index 00000000..62d1c658 --- /dev/null +++ b/SPECS/coreutils/coreutils.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Summary: GNU Core Utilities +Name: coreutils +Version: 9.7 +Release: %autorelease +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/coreutils/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/coreutils/coreutils-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/coreutils/coreutils-%{version}.tar.xz.sig +BuildRequires: gmp-devel +BuildRequires: acl-devel +BuildRequires: libattr-devel +BuildRequires: libcap-devel +BuildRequires: texinfo +BuildRequires: autoconf +BuildRequires: automake + +BuildSystem: autotools +Provides: /bin/rm + +BuildOption(conf): DEFAULT_POSIX2_VERSION=200112 +BuildOption(conf): --enable-no-install-program=kill + +%description +These are the GNU core utilities. This package is the union of +the GNU fileutils, sh-utils, and textutils packages. + + [ arch b2sum base32 base64 basename basenc cat chcon chgrp chmod chown chroot + cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand + expr factor false fmt fold groups head hostid id install join + link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup + nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink + realpath rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum + shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee test + timeout touch tr true truncate tsort tty uname unexpand uniq unlink + uptime users vdir wc who whoami yes + +%install -a +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%files +%doc NEWS README THANKS +%{_bindir}/* +%{_libexecdir}/coreutils/libstdbuf.so +%{_mandir}/man1/* +%{_infodir}/coreutils.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/cpio/0001-fix-xstat-prototype.patch b/SPECS/cpio/0001-fix-xstat-prototype.patch new file mode 100644 index 00000000..eab467be --- /dev/null +++ b/SPECS/cpio/0001-fix-xstat-prototype.patch @@ -0,0 +1,39 @@ +# 0001-fix-xstat-prototype.patch +# Fix xstat prototype mismatch: include and use consistent function-pointer prototype +# - Add to src/extern.h so 'struct stat' is visible +# - Change extern declaration in src/extern.h to use (const char *, struct stat *) +# - Change definition in src/global.c to use (const char *, struct stat *) +# This prevents "conflicting types for 'xstat'" and "too many arguments to function 'xstat'" errors +# when compiling with stricter compilers (e.g. GCC 15+). +# +--- a/src/extern.h ++++ b/src/extern.h +@@ -20,6 +20,7 @@ + #include "quotearg.h" + #include "quote.h" + #include "inttostr.h" ++struct stat; + + enum archive_format + { +@@ -97,7 +98,7 @@ + extern char output_is_special; + extern char input_is_seekable; + extern char output_is_seekable; +-extern int (*xstat) (); ++extern int (*xstat) (const char *path, struct stat *buf); + extern void (*copy_function) (); + extern char *change_directory_option; + + +--- a/src/global.c ++++ b/src/global.c +@@ -185,7 +185,7 @@ + + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ +-int (*xstat) (); ++int (*xstat) (const char *, struct stat *); + + /* Which copy operation to perform. (-i, -o, -p) */ + void (*copy_function) () = 0; diff --git a/SPECS/cpio/cpio.spec b/SPECS/cpio/cpio.spec new file mode 100644 index 00000000..06fd918d --- /dev/null +++ b/SPECS/cpio/cpio.spec @@ -0,0 +1,78 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: cpio +Version: 2.15 +Release: %autorelease +Summary: A Backup and Archiving Utility +License: GPL-3.0-only +URL: https://www.gnu.org/software/cpio/cpio.html +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2.sig +BuildSystem: autotools + +# GCC15: give xstat a real prototype +Patch0: 0001-fix-xstat-prototype.patch + +BuildOption(conf): --with-rmt="%{_bindir}/rmt" +BuildOption(conf): --enable-mt +BuildOption(conf): --program-transform-name='s/^mt$/gnumt/' + +BuildRequires: autoconf +BuildRequires: automake + +Suggests: rmt +Suggests: %{name}-mt = %{version} + +%description +GNU cpio is a program to manage archives of files. Cpio copies files +into or out of a cpio or tar archive. An archive is a file that contains +other files plus information about them, such as their pathname, owner, +time stamps, and access permissions. The archive can be another file on +the disk, a magnetic tape, or a pipe. + +%package mt +Summary: Tape drive control utility +Requires: %{name} = %{version} +Requires(post): update-alternatives +Provides: mt +Conflicts: mt + +%description mt +This package includes the 'mt', a local tape drive control program. + +%conf -p +autoreconf -fiv + +%build -p +export CFLAGS="%{optflags} -D_LARGEFILE_SOURCE -fcommon -std=gnu11" + +%install -a +%find_lang %{name} --generate-subpackages + +%post mt +if [ ! -f %{_bindir}/gnumt ] ; then + "%{_sbindir}/update-alternatives" --remove mt %{_bindir}/gnumt +fi + +%files +%license COPYING +%doc NEWS ChangeLog +%{_bindir}/cpio +%{_infodir}/cpio.info* +%{_mandir}/man1/cpio.1* + +%files mt +%ghost %{_bindir}/mt +%{_bindir}/gnumt +%ghost %{_mandir}/man1/mt.1* +%{_mandir}/man1/gnumt.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/cppunit/cppunit.spec b/SPECS/cppunit/cppunit.spec new file mode 100644 index 00000000..dc786627 --- /dev/null +++ b/SPECS/cppunit/cppunit.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: cppunit +Version: 1.15.1 +Release: %autorelease +Summary: C++ port of JUnit testing framework +License: LGPL-2.1-or-later +URL: https://www.freedesktop.org/wiki/Software/cppunit/ +#!RemoteAsset +Source: http://dev-www.libreoffice.org/src/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --disable-doxygen + +BuildRequires: gcc-c++ + +%description +CppUnit is the C++ port of the famous JUnit framework for unit testing. +Test output can be in XML for automatic testing and GUI based for supervised tests. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the libraries, header files, and examples for developing +applications that use the CppUnit framework. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING AUTHORS +%doc NEWS README THANKS TODO BUGS +%doc %{_docdir}/%{name} +%{_bindir}/DllPlugInTester +%{_libdir}/lib*.so* + +%files devel +%{_includedir}/cppunit +%{_libdir}/libcppunit.so +%{_libdir}/pkgconfig/cppunit.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/cpuinfo/cpuinfo.spec b/SPECS/cpuinfo/cpuinfo.spec new file mode 100644 index 00000000..90407a1a --- /dev/null +++ b/SPECS/cpuinfo/cpuinfo.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global commit 877328f188a3c7d1fa855871a278eb48d530c4c0 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +Name: cpuinfo +Version: 20250915+git.%{shortcommit} +Release: %autorelease +Summary: Library for obtaining CPU information +License: BSD-2-Clause +URL: https://github.com/pytorch/cpuinfo +#!RemoteAsset +Source: https://github.com/pytorch/cpuinfo/archive/%{commit}/cpuinfo-%{commit}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCPUINFO_LIBRARY_TYPE:STRING=shared +BuildOption(conf): -DCPUINFO_BUILD_TOOLS:BOOL=ON +BuildOption(conf): -DCPUINFO_BUILD_UNIT_TESTS:BOOL=OFF +BuildOption(conf): -DCPUINFO_BUILD_MOCK_TESTS:BOOL=OFF +BuildOption(conf): -DCPUINFO_BUILD_BENCHMARKS:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc-c++ + +%description +cpuinfo is a library to detect essential for performance optimization +information about host CPU. + +%package devel +Summary: Development files for the cpuinfo library + +%description devel +This package contains the header files and development files for the +cpuinfo library. + +%files +%license LICENSE +%doc README.md +%{_bindir}/cache-info +%{_bindir}/cpu-info +%{_bindir}/isa-info + +%files devel +%{_includedir}/cpuinfo.h +%{_libdir}/libcpuinfo.so +%{_libdir}/pkgconfig/libcpuinfo.pc +%dir %{_datadir}/cpuinfo +%{_datadir}/cpuinfo/*.cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/cracklib/cracklib.spec b/SPECS/cracklib/cracklib.spec new file mode 100644 index 00000000..addd8cb9 --- /dev/null +++ b/SPECS/cracklib/cracklib.spec @@ -0,0 +1,139 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define dictdir %{_datadir}/cracklib +%define dictpath %{dictdir}/pw_dict + +Name: cracklib +Version: 2.10.3 +Release: %autorelease +Summary: A password-checking library +License: LGPL-2.1-or-later +URL: https://github.com/cracklib/cracklib +#!RemoteAsset +Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz +BuildSystem: autotools + +BuildOption(conf): --with-pic +BuildOption(conf): --without-python +BuildOption(conf): --with-default-dict=%{dictpath} +BuildOption(conf): --disable-static +BuildOption(install): 'pythondir=${pyexecdir}' + +BuildRequires: gettext +BuildRequires: zlib-devel +# The cracklib-format script calls gzip, but without a specific path. +Requires: gzip + +%description +CrackLib tests passwords to determine whether they match certain +security-oriented characteristics, with the purpose of stopping users +from choosing passwords that are easy to guess. CrackLib performs +several tests on passwords: it tries to generate words from a username +and gecos entry and checks those words against the password; it checks +for simplistic patterns in passwords; and it checks for the password +in a dictionary. + +CrackLib is actually a library containing a particular C function +which is used to check the password, as well as other C +functions. CrackLib is not a replacement for a passwd program; it must +be used in conjunction with an existing passwd program. + +Install the cracklib package if you need a program to check users' +passwords to see if they are at least minimally secure. If you install +CrackLib, you will also want to install the cracklib-dicts package. + +%package devel +Summary: Development files needed for building applications which use cracklib +Requires: %{name} = %{version}-%{release} + +%description devel +The cracklib-devel package contains the header files and libraries needed +for compiling applications which use cracklib. + +%package dicts +Summary: The standard CrackLib dictionaries +BuildRequires: make +Requires: cracklib = %{version}-%{release} + +%description dicts +The cracklib-dicts package includes the CrackLib dictionaries. +CrackLib will need to use the dictionary appropriate to your system, +which is normally put in /usr/share/dict/words. Cracklib-dicts also +contains the utilities necessary for the creation of new dictionaries. + +If you are installing CrackLib, you should also install cracklib-dicts. + +%conf -p +# Use the dictionary from the build to test +sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in + +%conf -a +# Update the .gmo files +make -C po update-gmo + +%install -a +./util/cracklib-format %{buildroot}%{dictdir}/cracklib-small | \ +./util/cracklib-packer %{buildroot}%{dictdir}/cracklib-small +rm -f %{buildroot}%{dictdir}/cracklib-small +sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > %{buildroot}%{_includedir}/crack.h +ln -s cracklib-format %{buildroot}%{_sbindir}/mkdict +# packer link removed as it clashes with hashicorp's packer binary. +#ln -s cracklib-packer %{buildroot}/%{_sbindir}/packer +touch %{buildroot}/top + +toprelpath=.. +touch %{buildroot}/top +while ! test -f %{buildroot}%{_libdir}/$toprelpath/top ; do + toprelpath=../$toprelpath +done +rm -f %{buildroot}/top +if test %{dictpath} != %{_libdir}/cracklib_dict ; then +ln -s $toprelpath%{dictpath}.hwm %{buildroot}%{_libdir}/cracklib_dict.hwm +ln -s $toprelpath%{dictpath}.pwd %{buildroot}%{_libdir}/cracklib_dict.pwd +ln -s $toprelpath%{dictpath}.pwi %{buildroot}%{_libdir}/cracklib_dict.pwi +fi +rm -f %{buildroot}%{_libdir}/python*/site-packages/_cracklib*.*a +rm -f %{buildroot}%{_libdir}/libcrack.la + +mkdir -p %{buildroot}%{_mandir}/man{3,8} +install -p -m644 doc/*.3 %{buildroot}%{_mandir}/man3/ +install -p -m644 doc/*.8 %{buildroot}%{_mandir}/man8/ +if ! test -s %{buildroot}%{_mandir}/man8/cracklib-packer.8 ; then + echo .so man8/cracklib-format.8 > %{buildroot}%{_mandir}/man8/cracklib-packer.8 +fi +if ! test -s %{buildroot}%{_mandir}/man8/cracklib-unpacker.8 ; then + echo .so man8/cracklib-format.8 > %{buildroot}%{_mandir}/man8/cracklib-unpacker.8 +fi + +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets + +%files +%doc README README-WORDS NEWS README-LICENSE AUTHORS +%license COPYING.LIB +%{_libdir}/libcrack.so.* +%dir %{_datadir}/cracklib +%{_datadir}/cracklib/cracklib.magic +%{_sbindir}/*cracklib* +%{_mandir}/man8/* + +%files devel +%{_includedir}/* +%{_libdir}/libcrack.so +%{_mandir}/man3/* + +%files dicts +%{_datadir}/cracklib/cracklib-small.* +%{_libdir}/cracklib_dict.* +%{_sbindir}/mkdict + +%changelog +%{?autochangelog} diff --git a/SPECS/createrepo_c/0001-fix-build-with-cmake-4.patch b/SPECS/createrepo_c/0001-fix-build-with-cmake-4.patch new file mode 100644 index 00000000..db1f81e9 --- /dev/null +++ b/SPECS/createrepo_c/0001-fix-build-with-cmake-4.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9a18393f..c4bf5252 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12) ++CMAKE_MINIMUM_REQUIRED (VERSION 3.7) + PROJECT (createrepo_c C) + + include(GNUInstallDirs) diff --git a/SPECS/createrepo_c/createrepo_c.spec b/SPECS/createrepo_c/createrepo_c.spec new file mode 100644 index 00000000..5cd983ad --- /dev/null +++ b/SPECS/createrepo_c/createrepo_c.spec @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: createrepo_c +Version: 1.2.1 +Release: %autorelease +Summary: Creates a common metadata repository +License: GPL-2.0-or-later +URL: https://github.com/rpm-software-management/createrepo_c +#!RemoteAsset +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +BuildSystem: cmake +Provides: createrepo = %{version}-%{release} +# Part of https://github.com/rpm-software-management/createrepo_c/pull/438 +Patch0: 0001-fix-build-with-cmake-4.patch + +BuildOption(conf): -DWITH_ZCHUNK=ON +BuildOption(conf): -DWITH_LIBMODULEMD=ON +BuildOption(conf): -DWITH_DRPM=ON + +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: libxml2-devel +BuildRequires: xz +BuildRequires: bash-completion-devel +BuildRequires: zchunk +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(zck) +BuildRequires: pkgconfig(modulemd-2.0) +BuildRequires: pkgconfig(rpm) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(drpm) + +%description +C implementation of Createrepo. +A set of utilities (createrepo_c, mergerepo_c, modifyrepo_c) +for generating a common metadata repository from a directory of +rpm packages and maintaining it. + +%package libs +Summary: Library for repodata manipulation + +%description libs +Libraries for applications using the createrepo_c library +for easy manipulation with a repodata. + +%package devel +Summary: Library for repodata manipulation +Requires: %{name}-libs = %{version}-%{release} + +%description devel +This package contains the createrepo_c C library and header files. +These development files are for easy manipulation with a repodata. + +%package -n python-%{name} +Summary: Python bindings for the createrepo_c library +%{?python_provide:%python_provide python3-%{name}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: %{name}-libs = %{version}-%{release} + +%description -n python-%{name} +Python bindings for the createrepo_c library. + +%build -a +# Build docs +%cmake_build -t doc-c + +%install -a +ln -sr %{buildroot}%{_bindir}/createrepo_c %{buildroot}%{_bindir}/createrepo +ln -sr %{buildroot}%{_bindir}/mergerepo_c %{buildroot}%{_bindir}/mergerepo +ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo + +%ldconfig_scriptlets libs + +%files +%doc README.md +%{_mandir}/man8/createrepo_c.8* +%{_mandir}/man8/mergerepo_c.8* +%{_mandir}/man8/modifyrepo_c.8* +%{_mandir}/man8/sqliterepo_c.8* +%{_datadir}/bash-completion/completions/ +%{_bindir}/createrepo_c +%{_bindir}/mergerepo_c +%{_bindir}/modifyrepo_c +%{_bindir}/sqliterepo_c +%{_bindir}/createrepo +%{_bindir}/mergerepo +%{_bindir}/modifyrepo + +%files libs +%license COPYING +%{_libdir}/libcreaterepo_c.so.* + +%files devel +%{_libdir}/libcreaterepo_c.so +%{_libdir}/pkgconfig/createrepo_c.pc +%{_includedir}/createrepo_c/ + +%files -n python-%{name} +%doc examples/python/* +%{python3_sitearch}/createrepo_c/ +%{python3_sitearch}/createrepo_c-*-py%{python3_version}.egg-info + +%changelog +%{?autochangelog} diff --git a/SPECS/cronie/0001-make_error_func_prototype_complete.patch b/SPECS/cronie/0001-make_error_func_prototype_complete.patch new file mode 100644 index 00000000..1988825f --- /dev/null +++ b/SPECS/cronie/0001-make_error_func_prototype_complete.patch @@ -0,0 +1,37 @@ +From 09c630c654b2aeff06a90a412cce0a60ab4955a4 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Mon, 18 Nov 2024 21:02:30 +0100 +Subject: [PATCH] load_entry(): Make error_func prototype complete + +Fixes #193 +--- + src/entry.c | 2 +- + src/funcs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/entry.c b/src/entry.c +index 586eb9d..a2077e8 100644 +--- a/src/entry.c ++++ b/src/entry.c +@@ -90,7 +90,7 @@ void free_entry(entry * e) { + /* return NULL if eof or syntax error occurs; + * otherwise return a pointer to a new entry. + */ +-entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw, ++entry *load_entry(FILE * file, void (*error_func) (const char *), struct passwd *pw, + char **envp) { + /* this function reads one crontab entry -- the next -- from a file. + * it skips any leading blank lines, ignores comments, and returns +diff --git a/src/funcs.h b/src/funcs.h +index 427e027..f28d634 100644 +--- a/src/funcs.h ++++ b/src/funcs.h +@@ -89,7 +89,7 @@ char *env_get(const char *, char **), + user *load_user(int, struct passwd *, const char *, const char *, const char *), + *find_user(cron_db *, const char *, const char *); + +-entry *load_entry(FILE *, void (*)(), struct passwd *, char **); ++entry *load_entry(FILE *, void (*)(const char *), struct passwd *, char **); + + FILE *cron_popen(char *, const char *, struct passwd *, char **); + diff --git a/SPECS/cronie/cronie.spec b/SPECS/cronie/cronie.spec new file mode 100644 index 00000000..20d9b488 --- /dev/null +++ b/SPECS/cronie/cronie.spec @@ -0,0 +1,154 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond selinux 1 +%bcond pam 1 +%bcond audit 1 + +Name: cronie +Version: 1.7.2 +Release: %autorelease +Summary: Cron daemon for executing programs at set times +License: GPL-2.0-or-later AND BSD-3-Clause AND BSD-2-Clause AND ISC AND LGPL-2.1-or-later +URL: https://github.com/cronie-crond/cronie +#!RemoteAsset +Source: %{url}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +# https://github.com/cronie-crond/cronie/issues/193 +Patch0: 0001-make_error_func_prototype_complete.patch + +BuildOption(conf): --with-selinux=%{?with_selinux:yes}%{!?with_selinux:no} +BuildOption(conf): --with-pam=%{?with_pam:yes}%{!?with_pam:no} +BuildOption(conf): --with-audit=%{?with_audit:yes}%{!?with_audit:no} +BuildOption(conf): --enable-anacron +BuildOption(conf): --enable-pie + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: systemd +BuildRequires: make +%if %{with selinux} +BuildRequires: pkgconfig(libselinux) +%endif +%if %{with pam} +BuildRequires: pkgconfig(pam) +%endif +%if %{with audit} +BuildRequires: audit-devel +%endif + +%if %{with selinux} +Requires: libselinux +%endif +%if %{with pam} +Requires: pam +%endif +%if %{with systemd} +%{?systemd_requires} +%endif +Requires(post): coreutils sed + +%description +Cronie contains the standard UNIX daemon crond that runs specified programs at +scheduled times and related tools. It is a fork of the original vixie-cron and +has security and configuration enhancements like the ability to use pam and +SELinux. + +%package anacron +Summary: Utility for running regular jobs +Requires(post): coreutils +Requires: %{name} = %{version}-%{release} + +%description anacron +Anacron is part of cronie that is used for running jobs with regular +periodicity which do not have exact time of day of execution. + +The default settings of anacron execute the daily, weekly, and monthly +jobs, but anacron allows setting arbitrary periodicity of jobs. + +Using anacron allows running the periodic jobs even if the system is often +powered off and it also allows randomizing the time of the job execution +for better utilization of resources shared among multiple systems. + +%install -a +mkdir -pm700 %{buildroot}%{_localstatedir}/spool/cron +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/ +mkdir -pm755 %{buildroot}%{_sysconfdir}/cron.d/ +%if ! %{with pam} + rm -f %{buildroot}%{_sysconfdir}/pam.d/crond +%endif +install -m 644 crond.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/crond +touch %{buildroot}%{_sysconfdir}/cron.deny +install -m 644 contrib/anacrontab %{buildroot}%{_sysconfdir}/anacrontab +install -c -m755 contrib/0hourly %{buildroot}%{_sysconfdir}/cron.d/0hourly +mkdir -pm 755 %{buildroot}%{_sysconfdir}/cron.hourly +install -c -m755 contrib/0anacron %{buildroot}%{_sysconfdir}/cron.hourly/0anacron +mkdir -p %{buildroot}/var/spool/anacron +touch %{buildroot}/var/spool/anacron/cron.daily +touch %{buildroot}/var/spool/anacron/cron.weekly +touch %{buildroot}/var/spool/anacron/cron.monthly +# install systemd initscript +install -m 644 -D contrib/cronie.systemd $RPM_BUILD_ROOT/usr/lib/systemd/system/crond.service +# TODO: Fix this once our /bin equals /sbin +cp %{buildroot}%{_sbindir}/crond %{buildroot}%{_bindir}/crond +cp %{buildroot}%{_sbindir}/anacron %{buildroot}%{_bindir}/anacron + +%post +%systemd_post crond.service + +%post anacron +[ -e /var/spool/anacron/cron.daily ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.daily 2>/dev/null || : +[ -e /var/spool/anacron/cron.weekly ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.weekly 2>/dev/null || : +[ -e /var/spool/anacron/cron.monthly ] || install -m 0600 -D /dev/null /var/spool/anacron/cron.monthly 2>/dev/null || : + +%preun +%systemd_preun crond.service + +%postun +%systemd_postun_with_restart crond.service + +%files +%doc AUTHORS README ChangeLog +%{!?_licensedir:%global license %%doc} +%license COPYING +%attr(755,root,root) %{_bindir}/crond +%attr(4755,root,root) %{_bindir}/crontab +%attr(755,root,root) %{_bindir}/cronnext +%{_mandir}/man8/crond.* +%{_mandir}/man8/cron.* +%{_mandir}/man5/crontab.* +%{_mandir}/man1/crontab.* +%{_mandir}/man1/cronnext.* +%dir %{_localstatedir}/spool/cron +%dir %{_sysconfdir}/cron.d +%if %{with pam} +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/crond +%endif +%config(noreplace) %{_sysconfdir}/sysconfig/crond +%config(noreplace,missingok) %{_sysconfdir}/cron.deny +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/cron.d/0hourly +%attr(0644,root,root) /usr/lib/systemd/system/crond.service +# TODO: Fix this once our /bin equals /sbin +%{_sbindir}/crond + +%files anacron +%{_bindir}/anacron +%attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron +%config(noreplace) %{_sysconfdir}/anacrontab +%dir /var/spool/anacron +%ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/spool/anacron/cron.daily +%ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/spool/anacron/cron.weekly +%ghost %attr(0600,root,root) %verify(not md5 size mtime) /var/spool/anacron/cron.monthly +%{_mandir}/man5/anacrontab.* +%{_mandir}/man8/anacron.* +# TODO: Fix this once our /bin equals /sbin +%{_sbindir}/anacron + +%changelog +%{?autochangelog} diff --git a/SPECS/crontabs/crontabs.spec b/SPECS/crontabs/crontabs.spec new file mode 100644 index 00000000..ac1d24af --- /dev/null +++ b/SPECS/crontabs/crontabs.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global snap_release 20190603 +Name: crontabs +Version: 1.11 +Release: %autorelease +Summary: Root crontab files used to schedule the execution of programs +License: Public Domain and GPLv2+ +URL: https://github.com/cronie-crond/crontabs +#!RemoteAsset +Source0: https://github.com/cronie-crond/crontabs/releases/download/%{name}-%{snap_release}/%{name}-%{version}-%{snap_release}git.tar.gz +BuildArch: noarch +Requires: sed +Recommends: cronie + +%description +A crontab file contains instructions to the cron daemon +of the general form: 'run this command at this time on +this date'. Each user has their own crontab, and com- +mands in any given crontab will be executed as the user +who owns the crontab. + +%prep +%autosetup -p1 + +%build + +%install +mkdir -p %{buildroot}%{_sysconfdir}/cron.{hourly,daily,weekly,monthly} +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_mandir}/man4/ + +install -m 644 ./crontab %{buildroot}%{_sysconfdir}/crontab +install -m 755 ./run-parts %{buildroot}%{_bindir}/run-parts +install -m 644 ./*.4 %{buildroot}%{_mandir}/man4/ + +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/ +touch %{buildroot}%{_sysconfdir}/sysconfig/run-parts + +%files +%license COPYING +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/{crontab,sysconfig/run-parts} +%dir %{_sysconfdir}/cron.{hourly,daily,weekly,monthly} +%{_bindir}/run-parts +%{_mandir}/man4/* + +%changelog +%{?autochangelog} diff --git a/SPECS/cryptsetup/cryptsetup.spec b/SPECS/cryptsetup/cryptsetup.spec new file mode 100644 index 00000000..9d601909 --- /dev/null +++ b/SPECS/cryptsetup/cryptsetup.spec @@ -0,0 +1,146 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# We don't have asciidoctor packaged - 251 +# If we have it in the future, change to 1 +%bcond asciidoc 0 + +%global upstream_main_version 2.8 + +Name: cryptsetup +Version: %{upstream_main_version}.1 +Release: %autorelease +Summary: Utility for setting up encrypted disks +License: GPL-2.0-or-later WITH cryptsetup-OpenSSL-exception AND LGPL-2.1-or-later WITH cryptsetup-OpenSSL-exception +URL: https://gitlab.com/cryptsetup/cryptsetup +#!RemoteAsset +Source0: https://www.kernel.org/pub/linux/utils/%{name}/v2.8/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --enable-fips +BuildOption(conf): --enable-pwquality +%if %{with asciidoc} +BuildOption(conf): --enable-asciidoc +%else +BuildOption(conf): --disable-asciidoc +%endif +BuildOption(conf): --enable-internal-sse-argon2 + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gettext-devel +BuildRequires: openssl-devel +BuildRequires: popt-devel +# We need libuuid.so also uuid.h - 251 +BuildRequires: util-linux-devel +BuildRequires: json-c-devel +BuildRequires: libpwquality-devel +BuildRequires: libblkid +BuildRequires: libssh-devel +BuildRequires: make +BuildRequires: device-mapper-devel +%if %{with asciidoc} +BuildRequires: asciidoctor +%endif + +Requires: cryptsetup-libs = %{version}-%{release} +Requires: libpwquality +Provides: %{name}-reencrypt = %{version} + +%description +The cryptsetup package contains a utility for setting up +disk encryption using dm-crypt kernel module. + +%package devel +Requires: %{name}-libs = %{version}-%{release} +Requires: pkgconfig +Summary: Headers and libraries for using encrypted file systems + +%description devel +The cryptsetup-devel package contains libraries and header files +used for writing code that makes use of disk encryption. + +%package libs +Summary: Cryptsetup shared library + +%description libs +This package contains the cryptsetup shared library, libcryptsetup. + +%package ssh +Summary: Cryptsetup LUKS2 SSH token +Requires: cryptsetup-libs = %{version}-%{release} + +%description ssh +This package contains the LUKS2 SSH token. + +%package -n veritysetup +Summary: A utility for setting up dm-verity volumes +Requires: cryptsetup-libs = %{version}-%{release} + +%description -n veritysetup +The veritysetup package contains a utility for setting up +disk verification using dm-verity kernel module. + +%package -n integritysetup +Summary: A utility for setting up dm-integrity volumes +Requires: cryptsetup-libs = %{version}-%{release} + +%description -n integritysetup +The integritysetup package contains a utility for setting up +disk integrity protection using dm-integrity kernel module. + +%ldconfig_scriptlets -n cryptsetup-libs + +%prep -a +./autogen.sh + +%install -a +%find_lang %{name} --generate-subpackages +# Don't want these - 251 +rm -rf %{buildroot}%{_libdir}/*.la +rm -rf %{buildroot}%{_libdir}/%{name}/*.la + + +%files +%license COPYING +%doc AUTHORS FAQ.md docs/*ReleaseNotes +%{_mandir}/man8/cryptsetup.8.gz +%{_mandir}/man8/cryptsetup-*.8.gz +%{_sbindir}/cryptsetup + +%files -n veritysetup +%license COPYING +%{_mandir}/man8/veritysetup.8.gz +%{_sbindir}/veritysetup + +%files -n integritysetup +%license COPYING +%{_mandir}/man8/integritysetup.8.gz +%{_sbindir}/integritysetup + +%files devel +%doc docs/examples/* +%{_includedir}/libcryptsetup.h +%{_libdir}/libcryptsetup.so +%{_libdir}/pkgconfig/libcryptsetup.pc + +%files libs +%license COPYING docs/licenses/COPYING.LGPL-2.1-or-later-WITH-cryptsetup-OpenSSL-exception +%{_libdir}/libcryptsetup.so.* +%dir %{_libdir}/%{name}/ +%{_tmpfilesdir}/cryptsetup.conf +%ghost %attr(700, -, -) %dir /run/cryptsetup + +%files ssh +%license COPYING docs/licenses/COPYING.LGPL-2.1-or-later-WITH-cryptsetup-OpenSSL-exception +%{_libdir}/%{name}/libcryptsetup-token-ssh.so +%{_mandir}/man8/cryptsetup-ssh.8.gz +%{_sbindir}/cryptsetup-ssh + +%changelog +%{?autochangelog} diff --git a/SPECS/cunit/0001-cunit-link-ncurses.patch b/SPECS/cunit/0001-cunit-link-ncurses.patch new file mode 100644 index 00000000..b0649753 --- /dev/null +++ b/SPECS/cunit/0001-cunit-link-ncurses.patch @@ -0,0 +1,48 @@ +From: Jan Engelhardt +Date: 2012-02-09 03:48:24.650731239 +0100 + +cunit uses ncurses, therefore, link with ncurses. Otherwise building +this can fail if e.g. -Wl,--no-undefined is used. + +And for -lncurses to trickle down into libcunit.la, libcunit.la must +use the .la files as objects, not the .lo files. + +--- + CUnit/Sources/Curses/Makefile.am | 1 + + CUnit/Sources/Makefile.am | 15 +++++---------- + 2 files changed, 6 insertions(+), 10 deletions(-) + +Index: cunit/CUnit/Sources/Curses/Makefile.am +=================================================================== +--- cunit.orig/CUnit/Sources/Curses/Makefile.am ++++ cunit/CUnit/Sources/Curses/Makefile.am +@@ -3,3 +3,4 @@ + noinst_LTLIBRARIES = libcunitcurses.la + libcunitcurses_la_SOURCES = \ + Curses.c ++libcunitcurses_la_LIBADD = -lncurses +Index: cunit/CUnit/Sources/Makefile.am +=================================================================== +--- cunit.orig/CUnit/Sources/Makefile.am ++++ cunit/CUnit/Sources/Makefile.am +@@ -1,15 +1,10 @@ + ## Process this file with automake to produce Makefile.in + +-BASIC_OBJECTS_SHARED = Basic/Basic.lo +-AUTOMATED_OBJECTS_SHARED = Automated/Automated.lo +-CONSOLE_OBJECTS_SHARED = Console/Console.lo +-CURSES_OBJECTS_SHARED = Curses/Curses.lo +-FRAMEWORK_OBJECTS_SHARED = \ +- Framework/CUError.lo \ +- Framework/MyMem.lo \ +- Framework/TestDB.lo \ +- Framework/TestRun.lo \ +- Framework/Util.lo ++BASIC_OBJECTS_SHARED = Basic/libcunitbasic.la ++AUTOMATED_OBJECTS_SHARED = Automated/libcunitautomated.la ++CONSOLE_OBJECTS_SHARED = Console/libcunitconsole.la ++CURSES_OBJECTS_SHARED = Curses/libcunitcurses.la ++FRAMEWORK_OBJECTS_SHARED = Framework/libcunitfmk.la + + FRAMEWORK_OBJECT_FILES_SHARED = $(FRAMEWORK_OBJECTS_SHARED) + FRAMEWORK_COMPILE_DIRS = Framework diff --git a/SPECS/cunit/0002-cunit-ncurses6.patch b/SPECS/cunit/0002-cunit-ncurses6.patch new file mode 100644 index 00000000..e6bd0f42 --- /dev/null +++ b/SPECS/cunit/0002-cunit-ncurses6.patch @@ -0,0 +1,49 @@ +Index: CUnit-2.1-3/CUnit/Sources/Curses/Curses.c +=================================================================== +--- CUnit-2.1-3.orig/CUnit/Sources/Curses/Curses.c ++++ CUnit-2.1-3/CUnit/Sources/Curses/Curses.c +@@ -256,10 +256,10 @@ static bool initialize_windows(void) + + start_color(); + +- f_nLeft = application_windows.pMainWin->_begx; +- f_nTop = application_windows.pMainWin->_begy; +- f_nWidth = application_windows.pMainWin->_maxx; +- f_nHeight = application_windows.pMainWin->_maxy; ++ f_nLeft = getbegx(application_windows.pMainWin); ++ f_nTop = getbegy(application_windows.pMainWin); ++ f_nWidth = getmaxx(application_windows.pMainWin); ++ f_nHeight = getmaxy(application_windows.pMainWin); + + if (NULL == (application_windows.pTitleWin = newwin(3, f_nWidth, 0, 0))) { + goto title_fail; +@@ -358,10 +358,10 @@ static void refresh_windows(void) + { + refresh(); + +- f_nLeft = application_windows.pMainWin->_begx; +- f_nTop = application_windows.pMainWin->_begy; +- f_nWidth = application_windows.pMainWin->_maxx; +- f_nHeight = application_windows.pMainWin->_maxy; ++ f_nLeft = getbegx(application_windows.pMainWin); ++ f_nTop = getbegy(application_windows.pMainWin); ++ f_nWidth = getmaxx(application_windows.pMainWin); ++ f_nHeight = getmaxy(application_windows.pMainWin); + + refresh_title_window(); + refresh_progress_window(); +@@ -907,10 +907,10 @@ static bool create_pad(APPPAD* pPad, WIN + pPad->uiColumns = uiCols; + pPad->uiPadRow = 0; + pPad->uiPadCol = 0; +- pPad->uiWinLeft = application_windows.pDetailsWin->_begx + 1; +- pPad->uiWinTop = application_windows.pDetailsWin->_begy + 1; +- pPad->uiWinColumns = application_windows.pDetailsWin->_maxx - 2; +- pPad->uiWinRows = application_windows.pDetailsWin->_maxy - 2; ++ pPad->uiWinLeft = getbegx(application_windows.pDetailsWin) + 1; ++ pPad->uiWinTop = getbegy(application_windows.pDetailsWin) + 1; ++ pPad->uiWinColumns = getmaxx(application_windows.pDetailsWin) - 2; ++ pPad->uiWinRows = getmaxy(application_windows.pDetailsWin) - 2; + + bStatus = true; + diff --git a/SPECS/cunit/cunit.spec b/SPECS/cunit/cunit.spec new file mode 100644 index 00000000..7ada2ac9 --- /dev/null +++ b/SPECS/cunit/cunit.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define _name CUnit +%define _version 2.1-3 +Name: cunit +Version: 2.1.3 +Release: %autorelease +Summary: A basic unit testing framework for C +License: LGPL-2.0-only +URL: https://cunit.sourceforge.net/ +#!RemoteAsset +Source: https://download.sourceforge.net/cunit/%{_name}-%{_version}.tar.bz2 +Patch1: 0001-cunit-link-ncurses.patch +Patch2: 0002-cunit-ncurses6.patch +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --enable-automated +BuildOption(conf): --enable-basic +BuildOption(conf): --enable-console +BuildOption(conf): --enable-curses + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: perl + +%description +CUnit is a unit testing framework for C. +This package installs the CUnit static library, +headers, and documentation files. + +%package devel +Summary: CUnit development files +Requires: ncurses-devel +Requires: pkgconfig + +%description devel +CUnit is a unit testing framework for C. +This package installs the CUnit development files. + +%package doc +Summary: CUnit documentation + +%description doc +CUnit is a unit testing framework for C. +This package installs the CUnit documentation files. + +%conf -p +autoreconf -fi + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README TODO +%{_libdir}/libcunit.so.1 +%{_libdir}/libcunit.so.1.* + +%files devel +%dir %{_includedir}/CUnit +%{_includedir}/CUnit/* +%{_libdir}/libcunit.so +%{_libdir}/pkgconfig/cunit.pc + +%files doc +%doc /usr/doc/CUnit +%{_datadir}/CUnit/* +%{_mandir}/man3/CUnit.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/curl/curl.spec b/SPECS/curl/curl.spec new file mode 100644 index 00000000..0297b3fb --- /dev/null +++ b/SPECS/curl/curl.spec @@ -0,0 +1,108 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond_with openssl + +Name: curl +Version: 8.15.0 +Release: %autorelease +Summary: A Tool for Transferring Data from URLs +License: curl +URL: https://curl.se +#!RemoteAsset +Source0: https://curl.se/download/curl-%{version}.tar.xz +#!RemoteAsset +Source1: https://curl.se/download/curl-%{version}.tar.xz.asc +#!RemoteAsset +Source2: https://daniel.haxx.se/mykey.asc#/curl.keyring +BuildSystem: autotools + +%if %{with openssl} +BuildOption(conf): --enable-hsts --enable-ipv6 --with-openssl --with-ca-fallback --without-ca-path --without-ca-bundle --with-libidn2 --with-nghttp2 --enable-docs --with-gssapi=$(krb5-config --prefix) --with-brotli --with-libssh --enable-symbol-hiding --disable-static --enable-threaded-resolver +%else +BuildOption(conf): --enable-hsts --enable-ipv6 --with-gnutls --with-libidn2 --with-nghttp2 --enable-docs --without-libssh --without-brotli --without-gssapi --enable-symbol-hiding --disable-static --enable-threaded-resolver --with-ca-bundle=%{_sysconfdir}/pki/ca-trust/extracted/pem/tls-ca-bundle.pem +%endif + +BuildRequires: groff +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libidn2) +BuildRequires: pkgconfig(libnghttp2) +BuildRequires: pkgconfig(libpsl) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(zlib) +%if %{with openssl} +BuildRequires: pkgconfig(libssl) +BuildRequires: openldap2-devel +BuildRequires: pkgconfig(krb5) +BuildRequires: pkgconfig(libbrotlidec) +BuildRequires: pkgconfig(libssh) +%else +BuildRequires: pkgconfig(gnutls) +%endif + +%description +Curl is a client to get documents and files from or send documents to a +server using any of the supported protocols (HTTP, HTTPS, FTP, FTPS, +TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work +without user interaction or any kind of interactivity. + +%package -n libcurl-devel +Summary: Development files for the curl library +Requires: glibc-devel +Requires: %{name} = %{version} +Provides: curl-devel = %{version} +Obsoletes: curl-devel < %{version} + +%description -n libcurl-devel +Curl is a client to get documents and files from or send documents to a +server using any of the supported protocols (HTTP, HTTPS, FTP, GOPHER, +DICT, TELNET, LDAP, or FILE). The command is designed to work without +user interaction or any kind of interactivity. + + +%build -p +CPPFLAGS="-D_FORTIFY_SOURCE=2" +CFLAGS=$(echo "%{optflags}" | sed -e 's/-D_FORTIFY_SOURCE=2//') +export CPPFLAGS +export CFLAGS="$CFLAGS -fPIE" +export LDFLAGS="$LDFLAGS -Wl,-z,defs,-z,now,-z,relro -pie" +autoreconf -fiv + +%install -a +rm -f %{buildroot}%{_libdir}/libcurl.la +install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot}%{_datadir}/aclocal/libcurl.m4 +pushd scripts +%make_install +popd + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README RELEASE-NOTES CHANGES.md +%doc docs/{BUGS.md,FAQ,FEATURES.md,TODO,TheArtOfHttpScripting.md} +%{_bindir}/curl +%{_bindir}/wcurl +%{_mandir}/man1/curl.* +%{_mandir}/man1/wcurl.* +%{_libdir}/libcurl.so.4* + +%files -n libcurl-devel +%license COPYING +%{_bindir}/curl-config +%{_includedir}/curl +%dir %{_datadir}/aclocal/ +%{_datadir}/aclocal/libcurl.m4 +%{_libdir}/libcurl.so +%{_libdir}/pkgconfig/libcurl.pc +%{_mandir}/man1/curl-config.* +%{_mandir}/man3/* +%doc docs/libcurl/symbols-in-versions + +%changelog +%{?autochangelog} diff --git a/SPECS/cyrus-sasl/0001-cyrus-sasl-lfs.patch b/SPECS/cyrus-sasl/0001-cyrus-sasl-lfs.patch new file mode 100644 index 00000000..6cdca710 --- /dev/null +++ b/SPECS/cyrus-sasl/0001-cyrus-sasl-lfs.patch @@ -0,0 +1,13 @@ +--- cyrus-sasl-2.1.27.orig/configure.ac 2018-10-09 16:58:04.000000000 +0200 ++++ cyrus-sasl-2.1.27/configure.ac 2018-11-17 13:05:26.475631124 +0100 +@@ -95,7 +95,9 @@ + enable_obsolete_digest_attr=$enableval, + enable_obsolete_digest_attr=yes) + +-AC_PROG_CC ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + AX_PROG_CC_FOR_BUILD + AC_PROG_CPP + AC_PROG_AWK diff --git a/SPECS/cyrus-sasl/0002-fix_libpq-fe_include.patch b/SPECS/cyrus-sasl/0002-fix_libpq-fe_include.patch new file mode 100644 index 00000000..1651ab0e --- /dev/null +++ b/SPECS/cyrus-sasl/0002-fix_libpq-fe_include.patch @@ -0,0 +1,11 @@ +--- cyrus-sasl-2.1.27.orig/plugins/sql.c 2016-12-10 16:45:55.000000000 +0100 ++++ cyrus-sasl-2.1.27/plugins/sql.c 2018-11-17 14:04:33.821540573 +0100 +@@ -188,7 +188,7 @@ + #endif /* HAVE_MYSQL */ + + #ifdef HAVE_PGSQL +-#include ++#include + + static void *_pgsql_open(char *host, char *port, int usessl, + const char *user, const char *password, diff --git a/SPECS/cyrus-sasl/0003-Fix-time.h-check.patch b/SPECS/cyrus-sasl/0003-Fix-time.h-check.patch new file mode 100644 index 00000000..84fb4b89 --- /dev/null +++ b/SPECS/cyrus-sasl/0003-Fix-time.h-check.patch @@ -0,0 +1,60 @@ +From 266f0acf7f5e029afbb3e263437039e50cd6c262 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 23 Feb 2022 00:45:15 +0000 +Subject: [PATCH 1/1] Fix check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We're conditionally including based on HAVE_TIME_H in a bunch of places, +but we're not actually checking for time.h, so that's never going to be defined. + +While at it, add in a missing include in the cram plugin. + +This fixes a bunch of implicit declaration warnings: +``` + * cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] + * cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration] + * cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] + * cyrus-sasl-2.1.28/lib/saslutil.c:280:3: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] + * cyrus-sasl-2.1.28/lib/saslutil.c:364:41: warning: implicit declaration of function ‘clock’ [-Wimplicit-function-declaration] + * cyrus-sasl-2.1.28/plugins/cram.c:132:7: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] +``` + +Signed-off-by: Sam James +--- + configure.ac | 2 +- + plugins/cram.c | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e1bf53b6..ad781830 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1290,7 +1290,7 @@ AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_HEADER_DIRENT + AC_HEADER_SYS_WAIT +-AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h) ++AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h time.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h) + + IPv6_CHECK_SS_FAMILY() + IPv6_CHECK_SA_LEN() +diff --git a/plugins/cram.c b/plugins/cram.c +index d02e9baa..695aaa91 100644 +--- a/plugins/cram.c ++++ b/plugins/cram.c +@@ -53,6 +53,10 @@ + #endif + #include + ++#ifdef HAVE_TIME_H ++#include ++#endif ++ + #include + #include + #include +-- +2.35.3 + diff --git a/SPECS/cyrus-sasl/0004-cyrus-sasl-make-digestmd5-work-ssl3.patch b/SPECS/cyrus-sasl/0004-cyrus-sasl-make-digestmd5-work-ssl3.patch new file mode 100644 index 00000000..851e0456 --- /dev/null +++ b/SPECS/cyrus-sasl/0004-cyrus-sasl-make-digestmd5-work-ssl3.patch @@ -0,0 +1,544 @@ +Index: cyrus-sasl-2.1.28/plugins/digestmd5.c +=================================================================== +--- cyrus-sasl-2.1.28.orig/plugins/digestmd5.c ++++ cyrus-sasl-2.1.28/plugins/digestmd5.c +@@ -80,6 +80,12 @@ + # endif + #endif /* WITH_DES */ + ++/* legacy provider with openssl 3.0 */ ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++# include ++# include ++#endif ++ + #ifdef WIN32 + # include + #else /* Unix */ +@@ -170,6 +176,12 @@ enum Context_type { SERVER = 0, CLIENT = + + typedef struct cipher_context cipher_context_t; + ++typedef struct crypto_context { ++ void *libctx; ++ cipher_context_t *enc_ctx; ++ cipher_context_t *dec_ctx; ++} crypto_context_t; ++ + /* cached auth info used for fast reauth */ + typedef struct reauth_entry { + char *authid; +@@ -254,12 +266,12 @@ typedef struct context { + decode_context_t decode_context; + + /* if privacy mode is used use these functions for encode and decode */ ++ char *cipher_name; + cipher_function_t *cipher_enc; + cipher_function_t *cipher_dec; + cipher_init_t *cipher_init; + cipher_free_t *cipher_free; +- struct cipher_context *cipher_enc_context; +- struct cipher_context *cipher_dec_context; ++ crypto_context_t crypto; + } context_t; + + struct digest_cipher { +@@ -888,7 +900,7 @@ static int dec_3des(context_t *text, + char *output, + unsigned *outputlen) + { +- des_context_t *c = (des_context_t *) text->cipher_dec_context; ++ des_context_t *c = (des_context_t *) text->crypto.dec_ctx; + int padding, p; + + des_ede2_cbc_encrypt((void *) input, +@@ -925,7 +937,7 @@ static int enc_3des(context_t *text, + char *output, + unsigned *outputlen) + { +- des_context_t *c = (des_context_t *) text->cipher_enc_context; ++ des_context_t *c = (des_context_t *) text->crypto.enc_ctx; + int len; + int paddinglen; + +@@ -973,7 +985,7 @@ static int init_3des(context_t *text, + return SASL_FAIL; + memcpy(c->ivec, ((char *) enckey) + 8, 8); + +- text->cipher_enc_context = (cipher_context_t *) c; ++ text->crypto.enc_ctx = (cipher_context_t *) c; + + /* setup dec context */ + c++; +@@ -987,7 +999,7 @@ static int init_3des(context_t *text, + + memcpy(c->ivec, ((char *) deckey) + 8, 8); + +- text->cipher_dec_context = (cipher_context_t *) c; ++ text->crypto.dec_ctx = (cipher_context_t *) c; + + return SASL_OK; + } +@@ -1006,7 +1018,7 @@ static int dec_des(context_t *text, + char *output, + unsigned *outputlen) + { +- des_context_t *c = (des_context_t *) text->cipher_dec_context; ++ des_context_t *c = (des_context_t *) text->crypto.dec_ctx; + int p, padding = 0; + + des_cbc_encrypt((void *) input, +@@ -1046,7 +1058,7 @@ static int enc_des(context_t *text, + char *output, + unsigned *outputlen) + { +- des_context_t *c = (des_context_t *) text->cipher_enc_context; ++ des_context_t *c = (des_context_t *) text->crypto.enc_ctx; + int len; + int paddinglen; + +@@ -1093,7 +1105,7 @@ static int init_des(context_t *text, + + memcpy(c->ivec, ((char *) enckey) + 8, 8); + +- text->cipher_enc_context = (cipher_context_t *) c; ++ text->crypto.enc_ctx = (cipher_context_t *) c; + + /* setup dec context */ + c++; +@@ -1102,60 +1114,139 @@ static int init_des(context_t *text, + + memcpy(c->ivec, ((char *) deckey) + 8, 8); + +- text->cipher_dec_context = (cipher_context_t *) c; ++ text->crypto.dec_ctx = (cipher_context_t *) c; + + return SASL_OK; + } + + static void free_des(context_t *text) + { +- /* free des contextss. only cipher_enc_context needs to be free'd, +- since cipher_dec_context was allocated at the same time. */ +- if (text->cipher_enc_context) text->utils->free(text->cipher_enc_context); ++ /* free des contextss. only enc_ctx needs to be free'd, ++ since dec_cxt was allocated at the same time. */ ++ if (text->crypto.enc_ctx) { ++ text->utils->free(text->crypto.enc_ctx); ++ } + } + + #endif /* WITH_DES */ + + #ifdef WITH_RC4 +-#ifdef HAVE_OPENSSL + #include + ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++typedef struct ossl3_library_context { ++ OSSL_LIB_CTX *libctx; ++ OSSL_PROVIDER *legacy_provider; ++ OSSL_PROVIDER *default_provider; ++} ossl3_context_t; ++ ++static int init_ossl3_ctx(context_t *text) ++{ ++ ossl3_context_t *ctx = text->utils->malloc(sizeof(ossl3_context_t)); ++ if (!ctx) return SASL_NOMEM; ++ ++ ctx->libctx = OSSL_LIB_CTX_new(); ++ if (!ctx->libctx) { ++ text->utils->free(ctx); ++ return SASL_FAIL; ++ } ++ ++ /* Load both legacy and default provider as both may be needed */ ++ /* if they fail keep going and an error will be raised when we try to ++ * fetch the cipher later */ ++ ctx->legacy_provider = OSSL_PROVIDER_load(ctx->libctx, "legacy"); ++ ctx->default_provider = OSSL_PROVIDER_load(ctx->libctx, "default"); ++ text->crypto.libctx = (void *)ctx; ++ ++ return SASL_OK; ++} ++ ++static void free_ossl3_ctx(context_t *text) ++{ ++ ossl3_context_t *ctx; ++ ++ if (!text->crypto.libctx) return; ++ ++ ctx = (ossl3_context_t *)text->crypto.libctx; ++ ++ if (ctx->legacy_provider) OSSL_PROVIDER_unload(ctx->legacy_provider); ++ if (ctx->default_provider) OSSL_PROVIDER_unload(ctx->default_provider); ++ if (ctx->libctx) OSSL_LIB_CTX_free(ctx->libctx); ++ ++ text->utils->free(ctx); ++ text->crypto.libctx = NULL; ++} ++#endif ++ + static void free_rc4(context_t *text) + { +- if (text->cipher_enc_context) { +- EVP_CIPHER_CTX_free((EVP_CIPHER_CTX *)text->cipher_enc_context); +- text->cipher_enc_context = NULL; +- } +- if (text->cipher_dec_context) { +- EVP_CIPHER_CTX_free((EVP_CIPHER_CTX *)text->cipher_dec_context); +- text->cipher_dec_context = NULL; ++ if (text->crypto.enc_ctx) { ++ EVP_CIPHER_CTX_free((EVP_CIPHER_CTX *)text->crypto.enc_ctx); ++ text->crypto.enc_ctx = NULL; ++ } ++ if (text->crypto.dec_ctx) { ++ EVP_CIPHER_CTX_free((EVP_CIPHER_CTX *)text->crypto.dec_ctx); ++ text->crypto.dec_ctx = NULL; + } ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ free_ossl3_ctx(text); ++#endif + } + + static int init_rc4(context_t *text, + unsigned char enckey[16], + unsigned char deckey[16]) + { ++ const EVP_CIPHER *cipher; + EVP_CIPHER_CTX *ctx; + int rc; + +- ctx = EVP_CIPHER_CTX_new(); +- if (ctx == NULL) return SASL_NOMEM; ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ ossl3_context_t *ossl3_ctx; + +- rc = EVP_EncryptInit_ex(ctx, EVP_rc4(), NULL, enckey, NULL); +- if (rc != 1) return SASL_FAIL; ++ rc = init_ossl3_ctx(text); ++ if (rc != SASL_OK) return rc; ++ ++ ossl3_ctx = (ossl3_context_t *)text->crypto.libctx; ++ cipher = EVP_CIPHER_fetch(ossl3_ctx->libctx, "RC4", ""); ++#else ++ cipher = EVP_rc4(); ++#endif + +- text->cipher_enc_context = (void *)ctx; + + ctx = EVP_CIPHER_CTX_new(); +- if (ctx == NULL) return SASL_NOMEM; ++ if (ctx == NULL) { ++ rc = SASL_NOMEM; ++ goto done; ++ } + +- rc = EVP_DecryptInit_ex(ctx, EVP_rc4(), NULL, deckey, NULL); +- if (rc != 1) return SASL_FAIL; ++ rc = EVP_EncryptInit_ex(ctx, cipher, NULL, enckey, NULL); ++ if (rc != 1) { ++ rc = SASL_FAIL; ++ goto done; ++ } ++ text->crypto.enc_ctx = (void *)ctx; ++ ++ ctx = EVP_CIPHER_CTX_new(); ++ if (ctx == NULL) { ++ rc = SASL_NOMEM; ++ goto done; ++ } ++ ++ rc = EVP_DecryptInit_ex(ctx, cipher, NULL, deckey, NULL); ++ if (rc != 1) { ++ rc = SASL_FAIL; ++ goto done; ++ } ++ text->crypto.dec_ctx = (void *)ctx; + +- text->cipher_dec_context = (void *)ctx; ++ rc = SASL_OK; + +- return SASL_OK; ++done: ++ if (rc != SASL_OK) { ++ free_rc4(text); ++ } ++ return rc; + } + + static int dec_rc4(context_t *text, +@@ -1169,14 +1260,14 @@ static int dec_rc4(context_t *text, + int rc; + + /* decrypt the text part & HMAC */ +- rc = EVP_DecryptUpdate((EVP_CIPHER_CTX *)text->cipher_dec_context, ++ rc = EVP_DecryptUpdate((EVP_CIPHER_CTX *)text->crypto.dec_ctx, + (unsigned char *)output, &len, + (const unsigned char *)input, inputlen); + if (rc != 1) return SASL_FAIL; + + *outputlen = len; + +- rc = EVP_DecryptFinal_ex((EVP_CIPHER_CTX *)text->cipher_dec_context, ++ rc = EVP_DecryptFinal_ex((EVP_CIPHER_CTX *)text->crypto.dec_ctx, + (unsigned char *)output + len, &len); + if (rc != 1) return SASL_FAIL; + +@@ -1198,7 +1289,7 @@ static int enc_rc4(context_t *text, + int len; + int rc; + /* encrypt the text part */ +- rc = EVP_EncryptUpdate((EVP_CIPHER_CTX *)text->cipher_enc_context, ++ rc = EVP_EncryptUpdate((EVP_CIPHER_CTX *)text->crypto.enc_ctx, + (unsigned char *)output, &len, + (const unsigned char *)input, inputlen); + if (rc != 1) return SASL_FAIL; +@@ -1206,14 +1297,14 @@ static int enc_rc4(context_t *text, + *outputlen = len; + + /* encrypt the `MAC part */ +- rc = EVP_EncryptUpdate((EVP_CIPHER_CTX *)text->cipher_enc_context, ++ rc = EVP_EncryptUpdate((EVP_CIPHER_CTX *)text->crypto.enc_ctx, + (unsigned char *)output + *outputlen, &len, + digest, 10); + if (rc != 1) return SASL_FAIL; + + *outputlen += len; + +- rc = EVP_EncryptFinal_ex((EVP_CIPHER_CTX *)text->cipher_enc_context, ++ rc = EVP_EncryptFinal_ex((EVP_CIPHER_CTX *)text->crypto.enc_ctx, + (unsigned char *)output + *outputlen, &len); + if (rc != 1) return SASL_FAIL; + +@@ -1221,187 +1312,6 @@ static int enc_rc4(context_t *text, + + return SASL_OK; + } +-#else +-/* quick generic implementation of RC4 */ +-struct rc4_context_s { +- unsigned char sbox[256]; +- int i, j; +-}; +- +-typedef struct rc4_context_s rc4_context_t; +- +-static void rc4_init(rc4_context_t *text, +- const unsigned char *key, +- unsigned keylen) +-{ +- int i, j; +- +- /* fill in linearly s0=0 s1=1... */ +- for (i=0;i<256;i++) +- text->sbox[i]=i; +- +- j=0; +- for (i = 0; i < 256; i++) { +- unsigned char tmp; +- /* j = (j + Si + Ki) mod 256 */ +- j = (j + text->sbox[i] + key[i % keylen]) % 256; +- +- /* swap Si and Sj */ +- tmp = text->sbox[i]; +- text->sbox[i] = text->sbox[j]; +- text->sbox[j] = tmp; +- } +- +- /* counters initialized to 0 */ +- text->i = 0; +- text->j = 0; +-} +- +-static void rc4_encrypt(rc4_context_t *text, +- const char *input, +- char *output, +- unsigned len) +-{ +- int tmp; +- int i = text->i; +- int j = text->j; +- int t; +- int K; +- const char *input_end = input + len; +- +- while (input < input_end) { +- i = (i + 1) % 256; +- +- j = (j + text->sbox[i]) % 256; +- +- /* swap Si and Sj */ +- tmp = text->sbox[i]; +- text->sbox[i] = text->sbox[j]; +- text->sbox[j] = tmp; +- +- t = (text->sbox[i] + text->sbox[j]) % 256; +- +- K = text->sbox[t]; +- +- /* byte K is Xor'ed with plaintext */ +- *output++ = *input++ ^ K; +- } +- +- text->i = i; +- text->j = j; +-} +- +-static void rc4_decrypt(rc4_context_t *text, +- const char *input, +- char *output, +- unsigned len) +-{ +- int tmp; +- int i = text->i; +- int j = text->j; +- int t; +- int K; +- const char *input_end = input + len; +- +- while (input < input_end) { +- i = (i + 1) % 256; +- +- j = (j + text->sbox[i]) % 256; +- +- /* swap Si and Sj */ +- tmp = text->sbox[i]; +- text->sbox[i] = text->sbox[j]; +- text->sbox[j] = tmp; +- +- t = (text->sbox[i] + text->sbox[j]) % 256; +- +- K = text->sbox[t]; +- +- /* byte K is Xor'ed with plaintext */ +- *output++ = *input++ ^ K; +- } +- +- text->i = i; +- text->j = j; +-} +- +-static void free_rc4(context_t *text) +-{ +- /* free rc4 context structures */ +- +- if (text->cipher_enc_context) { +- text->utils->free(text->cipher_enc_context); +- text->cipher_enc_context = NULL; +- } +- if (text->cipher_dec_context) { +- text->utils->free(text->cipher_dec_context); +- text->cipher_dec_context = NULL; +- } +-} +- +-static int init_rc4(context_t *text, +- unsigned char enckey[16], +- unsigned char deckey[16]) +-{ +- /* allocate rc4 context structures */ +- text->cipher_enc_context= +- (cipher_context_t *) text->utils->malloc(sizeof(rc4_context_t)); +- if (text->cipher_enc_context == NULL) return SASL_NOMEM; +- +- text->cipher_dec_context= +- (cipher_context_t *) text->utils->malloc(sizeof(rc4_context_t)); +- if (text->cipher_dec_context == NULL) return SASL_NOMEM; +- +- /* initialize them */ +- rc4_init((rc4_context_t *) text->cipher_enc_context, +- (const unsigned char *) enckey, 16); +- rc4_init((rc4_context_t *) text->cipher_dec_context, +- (const unsigned char *) deckey, 16); +- +- return SASL_OK; +-} +- +-static int dec_rc4(context_t *text, +- const char *input, +- unsigned inputlen, +- unsigned char digest[16] __attribute__((unused)), +- char *output, +- unsigned *outputlen) +-{ +- /* decrypt the text part & HMAC */ +- rc4_decrypt((rc4_context_t *) text->cipher_dec_context, +- input, output, inputlen); +- +- /* no padding so we just subtract the HMAC to get the text length */ +- *outputlen = inputlen - 10; +- +- return SASL_OK; +-} +- +-static int enc_rc4(context_t *text, +- const char *input, +- unsigned inputlen, +- unsigned char digest[16], +- char *output, +- unsigned *outputlen) +-{ +- /* pad is zero */ +- *outputlen = inputlen+10; +- +- /* encrypt the text part */ +- rc4_encrypt((rc4_context_t *) text->cipher_enc_context, +- input, +- output, +- inputlen); +- +- /* encrypt the HMAC part */ +- rc4_encrypt((rc4_context_t *) text->cipher_enc_context, +- (const char *) digest, +- (output)+inputlen, 10); +- +- return SASL_OK; +-} +-#endif /* HAVE_OPENSSL */ + #endif /* WITH_RC4 */ + + struct digest_cipher available_ciphers[] = +@@ -2821,6 +2731,7 @@ static int digestmd5_server_mech_step2(s + } + + if (cptr->name) { ++ text->cipher_name = cptr->name; + text->cipher_enc = cptr->cipher_enc; + text->cipher_dec = cptr->cipher_dec; + text->cipher_init = cptr->cipher_init; +@@ -2964,7 +2875,10 @@ static int digestmd5_server_mech_step2(s + if (text->cipher_init) { + if (text->cipher_init(text, enckey, deckey) != SASL_OK) { + sparams->utils->seterror(sparams->utils->conn, 0, +- "couldn't init cipher"); ++ "couldn't init cipher '%s'", ++ text->cipher_name); ++ result = SASL_FAIL; ++ goto FreeAllMem; + } + } + } +@@ -3515,6 +3429,7 @@ static int make_client_response(context_ + oparams->mech_ssf = ctext->cipher->ssf; + + nbits = ctext->cipher->n; ++ text->cipher_name = ctext->cipher->name; + text->cipher_enc = ctext->cipher->cipher_enc; + text->cipher_dec = ctext->cipher->cipher_dec; + text->cipher_free = ctext->cipher->cipher_free; +@@ -3739,7 +3654,13 @@ static int make_client_response(context_ + + /* initialize cipher if need be */ + if (text->cipher_init) { +- text->cipher_init(text, enckey, deckey); ++ if (text->cipher_init(text, enckey, deckey) != SASL_OK) { ++ params->utils->seterror(params->utils->conn, 0, ++ "internal error: failed to init cipher '%s'", ++ text->cipher_name); ++ result = SASL_FAIL; ++ goto FreeAllocatedMem; ++ } + } + } + diff --git a/SPECS/cyrus-sasl/cyrus-sasl.spec b/SPECS/cyrus-sasl/cyrus-sasl.spec new file mode 100644 index 00000000..db5541b6 --- /dev/null +++ b/SPECS/cyrus-sasl/cyrus-sasl.spec @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: cyrus-sasl +Version: 2.1.28 +Release: %autorelease +Summary: A framework for authentication and security in network protocols +License: BSD-4-Clause AND (GPL-2.0-or-later OR MPL-1.1) +URL: https://github.com/cyrusimap/cyrus-sasl/ +#!RemoteAsset +Source: https://github.com/cyrusimap/cyrus-sasl/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-cyrus-sasl-lfs.patch +Patch1: 0002-fix_libpq-fe_include.patch +Patch2: 0003-Fix-time.h-check.patch +Patch3: 0004-cyrus-sasl-make-digestmd5-work-ssl3.patch + +BuildSystem: autotools +BuildOption(conf): --with-pic --with-plugindir=%{_libdir}/sasl2 --with-configdir=%{_sysconfdir}/sasl2/ +BuildOption(conf): --with-saslauthd=/run/sasl2/ --with-dblib=gdbm --enable-login +BuildOption(conf): --enable-gssapi --enable-ntlm --with-devrandom=/dev/urandom + +BuildRequires: gdbm-devel +BuildRequires: krb5-devel +BuildRequires: libtool +BuildRequires: openssl-devel +BuildRequires: pkgconfig + +%description +The Cyrus SASL (Simple Authentication and Security Layer) is a framework for +authentication and data security in Internet protocols. It can be used on the +client or server side to provide authentication. This package contains the main +library and all standard authentication mechanism plugins. + +%package devel +Summary: Development files for the Cyrus SASL library +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config files, and development +documentation needed to build applications that use the Cyrus SASL API. + +%conf -p +autoreconf -fi +export CFLAGS="%{optflags} -fno-strict-aliasing -std=gnu17" + +%install -a +mkdir -p %{buildroot}%{_sysconfdir}/sasl2 +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libsasl2.so.* +%dir %{_libdir}/sasl2 +%{_libdir}/sasl2/*.so* +%dir %{_sysconfdir}/sasl2/ +%{_sbindir}/saslpasswd2 +%{_sbindir}/pluginviewer +%{_sbindir}/saslauthd +%{_sbindir}/sasldblistusers2 +%{_sbindir}/testsaslauthd +%{_mandir}/man8/saslpasswd2.8* +%{_mandir}/man8/pluginviewer.8* +%{_mandir}/man8/saslauthd.8* +%{_mandir}/man8/sasldblistusers2.8* +%{_mandir}/man8/testsaslauthd.8* + +%files devel +%license COPYING +%doc AUTHORS ChangeLog README doc +%{_includedir}/sasl/ +%{_mandir}/man3/sasl*.3* +%{_libdir}/libsasl2.so +%{_libdir}/pkgconfig/* + +%changelog +%{?autochangelog} diff --git a/SPECS/db/db.spec b/SPECS/db/db.spec new file mode 100644 index 00000000..26bce955 --- /dev/null +++ b/SPECS/db/db.spec @@ -0,0 +1,176 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Set 1 to enable +%bcond tcl 0 + +Name: db +Version: 6.2.32 +Release: %autorelease +Summary: The Berkeley DB database library for C +License: BSD-3-Clause AND LGPL-2.1-only AND Sleepycat +URL: https://www.oracle.com/database/berkeley-db/ +# This package does not have a VCS link +#!RemoteAsset +Source0: https://download.oracle.com/berkeley-db/db-%{version}.tar.gz +# I really don't want to use autotools here + +BuildRequires: make +BuildRequires: config +BuildRequires: libtool +BuildRequires: chrpath +BuildRequires: pkgconfig(zlib) +BuildRequires: gdbm-devel +BuildRequires: pkgconfig(lmdb) + +%description +The Berkeley Database (Berkeley DB) is a programmatic toolkit that +provides embedded database support for both traditional and +client/server applications. The Berkeley DB includes B+tree, Extended +Linear Hashing, Fixed and Variable-length record access methods, +transactions, locking, logging, shared memory caching, and database +recovery. The Berkeley DB supports C, C++, and Perl APIs. It is +used by many applications, including Python and Perl, so this should +be installed on all systems. + +%package utils +Summary: Command line tools for managing Berkeley DB databases +Requires: %{name} = %{version}-%{release} + +%description utils +The Berkeley Database (Berkeley DB) is a programmatic toolkit that +provides embedded database support for both traditional and +client/server applications. Berkeley DB includes B+tree, Extended +Linear Hashing, Fixed and Variable-length record access methods, +transactions, locking, logging, shared memory caching, and database +recovery. DB supports C, C++ and Perl APIs. + +%package devel +Summary: C development files for the Berkeley DB library +Requires: %{name} = %{version}-%{release} + +%description devel +The Berkeley Database (Berkeley DB) is a programmatic toolkit that +provides embedded database support for both traditional and +client/server applications. This package contains the header files, +libraries, and documentation for building programs which use the +Berkeley DB. + +%prep +%autosetup -n db-%{version} +cd dist +./s_config + + + +%conf +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -std=gnu99 -pthread" +export CXXFLAGS="$RPM_OPT_FLAGS -g -pthread" +export LDFLAGS="${LDFLAGS:+$LDFLAGS }-pthread" +export LIBS="${LIBS:+$LIBS }-lpthread" +install $(command -v config.guess) %{_builddir}/db-%{version}/dist/config.guess +install -m 755 $(command -v config.sub) %{_builddir}/db-%{version}/dist/config.sub +install $(command -v config.guess) %{_builddir}/db-%{version}/lang/sql/sqlite/config.guess +install -m 755 $(command -v config.sub) %{_builddir}/db-%{version}/lang/sql/sqlite/config.sub +pushd build_unix +%define _configure ../dist/configure +%configure -C \ + --with-mutex=POSIX/pthreads \ + --enable-compat185 \ + --disable-dump185 \ + --enable-shared \ + --disable-static \ +%if %{with tcl} + --enable-tcl --with-tcl=/usr/%{_lib} TCLSH_CMD=$(which tclsh%{__tclversion}) \ +%endif + --enable-cxx \ + --enable-sql \ + --disable-rpath +popd + +%build +pushd build_unix +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -std=gnu99" +%make_build +popd + +%install +%make_install STRIP=/bin/true -C build_unix +# These sucks +rm -f %{buildroot}%{_libdir}/{libdb.a,libdb_cxx.a,libdb_tcl.a,libdb_sql.a} +rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la +rm -rf docs/csharp +rm -rf examples/csharp +rm -rf docs/installation +# Don't need these docs +rm -rf ${RPM_BUILD_ROOT}%{_prefix}/docs +# Ensure shared libraries are executable +chmod +x %{buildroot}%{_libdir}/*.so* +# Move the header files to a subdirectory +mkdir -p %{buildroot}%{_includedir}/%{name} +mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/%{name}/ +# Create symlinks to includes +for i in db.h db_cxx.h db_185.h; do + ln -s %{name}/$i %{buildroot}%{_includedir} +done +# Avoid Permission denied +chmod u+w %{buildroot}%{_bindir} ${RPM_BUILD_ROOT}%{_bindir}/* +# remove rpath +chrpath -d %{buildroot}%{_libdir}/*.so ${RPM_BUILD_ROOT}%{_bindir}/* +# unify documentation and examples +mv examples docs + +%ldconfig_scriptlets + +# no tests +%check + + +%files +%license LICENSE +%doc README +%{_libdir}/libdb-*.so + +%files devel +%doc docs/* +%{_bindir}/dbsql +%dir %{_includedir}/%{name} +%{_includedir}/%{name}/db.h +%{_includedir}/%{name}/db_185.h +%{_includedir}/db.h +%{_includedir}/db_185.h +%{_includedir}/%{name}/db_cxx.h +%{_includedir}/db_cxx.h +%{_includedir}/%{name}/dbsql.h +%{_libdir}/libdb.so +%if %{with tcl} +%{_libdir}/libdb_tcl.so +%{_libdir}/libdb_tcl-*.so +%endif +%{_libdir}/libdb_sql.so +%{_libdir}/libdb_sql-*.so +%{_libdir}/libdb_cxx.so +%{_libdir}/libdb_cxx-*.so + +%files utils +%{_bindir}/db*_convert +%{_bindir}/db*_archive +%{_bindir}/db*_checkpoint +%{_bindir}/db*_deadlock +%{_bindir}/db*_dump* +%{_bindir}/db*_hotbackup +%{_bindir}/db*_load +%{_bindir}/db*_printlog +%{_bindir}/db*_recover +%{_bindir}/db*_replicate +%{_bindir}/db*_stat +%{_bindir}/db*_upgrade +%{_bindir}/db*_verify +%{_bindir}/db*_tuner + +%changelog +%{?autochangelog} diff --git a/SPECS/dbus-broker/dbus-broker.spec b/SPECS/dbus-broker/dbus-broker.spec new file mode 100644 index 00000000..44b7085d --- /dev/null +++ b/SPECS/dbus-broker/dbus-broker.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# default without launcher +%bcond launcher 0 + +Name: dbus-broker +Version: 37 +Release: %autorelease +Summary: D-Bus message bus implementation +License: Apache-2.0 +URL: https://github.com/bus1/dbus-broker +#!RemoteAsset +Source: https://github.com/bus1/dbus-broker/releases/download/v%{version}/%{name}-%{version}.tar.xz + +BuildSystem: meson + +BuildOption: -Daudit=true +BuildOption: -Dselinux=true +%if %{with launcher} +BuildOption: -Dlauncher=true +%else +BuildOption: -Dlauncher=false +%endif +BuildOption: -Dtests=false + +BuildRequires: linux-headers >= 4.17 +BuildRequires: meson +BuildRequires: python3 +BuildRequires: pkgconfig +BuildRequires: pkgconfig(audit) >= 3.0 +BuildRequires: pkgconfig(expat) >= 2.2.3 +BuildRequires: pkgconfig(glib-2.0) >= 2.50 +BuildRequires: pkgconfig(libcap-ng) >= 0.6 +BuildRequires: pkgconfig(libselinux) >= 3.2 + +%if %{with launcher} +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(systemd) +%endif + +%description +dbus-broker is an implementation of a message bus as defined by the D-Bus +specification. It offers improved performance and reliability compared +to the reference implementation. + +%files +%license LICENSE +%{_bindir}/dbus-broker +%if %{with launcher} +%{_bindir}/dbus-broker-launch +%{_journalcatalogdir}/* +%{_unitdir}/dbus-broker.service +%{_userunitdir}/dbus-broker.service +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/dbus-python/dbus-python.spec b/SPECS/dbus-python/dbus-python.spec new file mode 100644 index 00000000..663c353a --- /dev/null +++ b/SPECS/dbus-python/dbus-python.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dbus-python +Version: 1.4.0 +Release: %autorelease +Summary: D-Bus Python Bindings (metapackage) +License: MIT +URL: https://www.freedesktop.org/wiki/Software/DBusBindings/ +#!RemoteAsset +Source: https://dbus.freedesktop.org/releases/dbus-python/dbus-python-%{version}.tar.xz +BuildSystem: meson + +BuildRequires: meson ninja +BuildRequires: gcc +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: python3-devel +BuildRequires: python3-pygobject + +%description +D-Bus python bindings for use with python programs. +This is a metapackage that requires the main Python 3 package. + +%package -n python-dbus +Summary: D-Bus bindings for Python 3 +Requires: %{name}-devel = %{version} +Provides: python3-dbus +%python_provide python3-dbus + +%description -n python-dbus +This package contains the D-Bus bindings for Python 3. + +%package devel +Summary: Libraries and headers for dbus-python +Requires: python3-dbus = %{version} + +%description devel +This package contains the header files and static libraries needed for +hooking up custom mainloops to the D-Bus Python bindings. + +%files +%doc NEWS +%license COPYING + +%files -n python-dbus +%{python3_sitearch}/dbus/ +%{python3_sitearch}/*.so + +%files devel +%doc README ChangeLog doc/API_CHANGES.txt doc/tutorial.txt +%{_includedir}/dbus-1.0/dbus/dbus-python.h +%{_libdir}/pkgconfig/dbus-python.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/dbus/dbus.spec b/SPECS/dbus/dbus.spec new file mode 100644 index 00000000..b7fc6618 --- /dev/null +++ b/SPECS/dbus/dbus.spec @@ -0,0 +1,192 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# default without selinux +%bcond selinux 0 + +# default without systemd +%bcond systemd 0 + +Name: dbus +Version: 1.16.2 +Release: %autorelease +Summary: D-Bus Message Bus System +License: AFL-2.1 OR GPL-2.0-or-later +URL: https://dbus.freedesktop.org/ +#!RemoteAsset +Source0: https://dbus.freedesktop.org/releases/dbus/dbus-%{version}.tar.xz +Source1: messagebus.conf + +BuildSystem: meson + +BuildOption(conf): -Dasserts=false + +%if %{with systemd} +BuildOption(conf): -Dsystemd=enabled +BuildOption(conf): -Dsystemd_system_unitdir=%{_unitdir} +BuildOption(conf): -Dsystemd_user_unitdir=%{_userunitdir} +%else +BuildOption(conf): -Dsystemd=disabled +%endif + +%if %{with selinux} +BuildOption(conf): -Dselinux=enabled +%else +BuildOption(conf): -Dselinux=disabled +%endif + +BuildOption(conf): -Dx11_autolaunch=disabled +BuildOption(conf): -Dxml_docs=disabled +BuildOption(conf): -Ddoxygen_docs=disabled +BuildOption(conf): -Dducktype_docs=disabled +BuildOption(conf): -Dqt_help=disabled +BuildOption(conf): -Dlibaudit=enabled +BuildOption(conf): -Dapparmor=disabled +BuildOption(conf): -Dkqueue=disabled +BuildOption(conf): -Dlaunchd=disabled +BuildOption(conf): -Dmodular_tests=disabled + +BuildRequires: meson +BuildRequires: audit-devel libcap-ng-devel expat-devel >= 2.1.0 pkgconfig sysuser-tools xmlto +%if %{with systemd} +BuildRequires: pkgconfig(libsystemd) >= 209 +%endif +%if %{with selinux} +BuildRequires: libselinux-devel +%endif + +Requires(post): update-alternatives +Requires(preun):update-alternatives +Requires: dbus-common >= %{version} +Requires: dbus-tools >= %{version} +Requires: dbus-broker + +%description +D-Bus is a message bus system, a simple way for applications to talk to one another. +This package contains the core D-Bus components and runtime libraries. + +%package common +Summary: D-BUS message bus configuration +BuildArch: noarch +Requires: %{name} = %{version} +Provides: user(messagebus) +Provides: group(messagebus) +%if %{with systemd} +%sysusers_requires +%endif +%description common +This package provides the core configuration and setup files for D-Bus. + +%package tools +Summary: Command-line tools for D-Bus +Provides: dbus-daemon = %{version} +%description tools +This package contains command-line tools for interacting with and managing D-Bus, +including the original dbus-daemon. + +%package devel +Summary: Developer package for D-Bus +Requires: %{name} = %{version} +Requires: glibc-devel +%description devel +This package contains the header files and libraries needed for D-Bus development. + +%if %{with systemd} +%build -p +cp %{SOURCE1} bus/sysusers.d/dbus.conf +%sysusers_generate_pre %{SOURCE1} messagebus dbus.conf +%endif + +%install -a +mv -f %{buildroot}%{_bindir}/dbus-launch %{buildroot}%{_bindir}/dbus-launch.nox11 +install -d %{buildroot}/run/dbus +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +(cd %{buildroot}%{_bindir} && ln -sf ../../etc/alternatives/dbus-launch dbus-launch) +find %{buildroot} -type f -name "*.la" -delete + +%ldconfig_scriptlets + +%verifyscript +%{_sbindir}/update-alternatives --install %{_bindir}/dbus-launch dbus-launch %{_bindir}/dbus-launch.nox11 10 + +%preun +if [ "$1" = 0 ] ; then + %{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11 +fi + +/sbin/ldconfig + +%if %{with systemd} +%pre common -f messagebus.pre +%endif +%post common +if [ ! -L %{_localstatedir}/lib/dbus/machine-id ]; then + mkdir -p %{_localstatedir}/lib/dbus/ + ln -s %{_sysconfdir}/machine-id %{_localstatedir}/lib/dbus/machine-id +fi +%tmpfiles_create %{_prefix}/lib/tmpfiles.d/dbus.conf + +%files +%license COPYING +%doc AUTHORS NEWS README +%doc %{_docdir}/dbus +%attr(4750,root,messagebus) %verify(not mode) %{_libexecdir}/dbus-daemon-launch-helper +%ghost %{_sysconfdir}/alternatives/dbus-launch +%{_bindir}/dbus-launch.nox11 +%{_bindir}/dbus-launch +%{_libdir}/libdbus-1.so.* + +%files common +%dir %{_localstatedir}/lib/dbus +%ghost /run/dbus +%ghost %{_localstatedir}/lib/dbus/machine-id +%config(noreplace) %{_sysconfdir}/dbus-1/session.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.conf +%dir %{_sysconfdir}/dbus-1 +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system.d +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/session.conf +%{_datadir}/dbus-1/system.conf +%{_datadir}/xml/dbus-1/* + +%if %{with systemd} +%{_userunitdir}/dbus.service +%{_userunitdir}/dbus.socket +%dir %{_userunitdir}/sockets.target.wants +%{_userunitdir}/sockets.target.wants/dbus.socket +%{_tmpfilesdir}/dbus.conf +%{_sysusersdir}/dbus.conf +%{_unitdir}/dbus.service +%{_unitdir}/dbus.socket +%dir %{_unitdir}/multi-user.target.wants +%{_unitdir}/multi-user.target.wants/dbus.service +%dir %{_unitdir}/sockets.target.wants +%{_unitdir}/sockets.target.wants/dbus.socket +%endif + +%files tools +%{_bindir}/dbus-cleanup-sockets +%{_bindir}/dbus-daemon +%{_bindir}/dbus-run-session +%{_bindir}/dbus-test-tool +%{_bindir}/dbus-monitor +%{_bindir}/dbus-send +%{_bindir}/dbus-update-activation-environment +%{_bindir}/dbus-uuidgen + +%files devel +%{_includedir}/* +%{_libdir}/libdbus-1.so +%dir %{_libdir}/dbus-1.0 +%{_libdir}/dbus-1.0/include +%{_libdir}/pkgconfig/dbus-1.pc +%{_libdir}/cmake/DBus1 + +%changelog +%{?autochangelog} diff --git a/SPECS/dbus/messagebus.conf b/SPECS/dbus/messagebus.conf new file mode 100644 index 00000000..83cb3f2c --- /dev/null +++ b/SPECS/dbus/messagebus.conf @@ -0,0 +1,2 @@ +# Type Name ID GECOS [HOME] +u messagebus - "User for D-Bus" /run/dbus diff --git a/SPECS/debugedit/debugedit.keyring b/SPECS/debugedit/debugedit.keyring new file mode 100644 index 00000000..5a460ba1 Binary files /dev/null and b/SPECS/debugedit/debugedit.keyring differ diff --git a/SPECS/debugedit/debugedit.spec b/SPECS/debugedit/debugedit.spec new file mode 100644 index 00000000..2a94943f --- /dev/null +++ b/SPECS/debugedit/debugedit.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: debugedit +Version: 5.2 +Release: %autorelease +Summary: Debuginfo extraction +License: GPL-3.0-or-later +URL: https://www.sourceware.org/debugedit +#!RemoteAsset +Source0: https://sourceware.org/ftp/%{name}/%{version}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://sourceware.org/ftp/%{name}/%{version}/%{name}-%{version}.tar.xz.sig +Source2: %{name}.keyring + +BuildSystem: autotools +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: help2man +BuildRequires: pkgconfig(libdw) +BuildRequires: pkgconfig(libelf) +BuildRequires: pkgconfig(libxxhash) +BuildRequires: pkgconfig(libzstd) +Requires: binutils +Requires: coreutils +Requires: dwz +Requires: elfutils +Requires: findutils +Requires: gawk +Requires: grep +Requires: sed +Requires: xz + +%description +debugedit provides programs and scripts for creating debuginfo and source file distributions, +collect build-ids and rewrite source paths in DWARF data for debugging, tracing and profiling. + +%conf -p +autoreconf -fiv + +%install -a +mkdir -p %{buildroot}/usr/lib/rpm +mv %{buildroot}%{_bindir}/{find-debuginfo,sepdebugcrcfix} %{buildroot}/usr/lib/rpm +ln -s ../../bin/debugedit %{buildroot}/usr/lib/rpm + +%files +%license COPYING3 +%doc README +%{_bindir}/debugedit +/usr/lib/rpm/debugedit +/usr/lib/rpm/find-debuginfo +/usr/lib/rpm/sepdebugcrcfix +%{_mandir}/man1/debugedit.1%{?ext_man} +%{_mandir}/man1/find-debuginfo.1%{?ext_man} +%{_mandir}/man1/sepdebugcrcfix.1%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/dejagnu/dejagnu.spec b/SPECS/dejagnu/dejagnu.spec new file mode 100644 index 00000000..c1c196c2 --- /dev/null +++ b/SPECS/dejagnu/dejagnu.spec @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dejagnu +Version: 1.6.3 +Release: %autorelease +Summary: Framework for Running Test Suites on Software Tools +License: GPL-3.0-or-later +Group: Development/Tools/Building +URL: https://www.gnu.org/software/dejagnu/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +#!RemoteAsset +Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=dejagnu&download=1#/%{name}.keyring +Source3: site.exp +Patch0: testsuite-legacy.patch +Buildsystem: autotools +BuildRequires: expect +BuildRequires: fdupes +BuildRequires: gcc-c++ +Requires: expect +Requires: texinfo +Requires: tcl +BuildArch: noarch + +BuildOption(build): -C build +BuildOption(install): -C build DESTDIR=%{buildroot} +BuildOption(check): -C build +%description +DejaGnu is a framework for testing other programs. Its purpose is to +provide a single front-end for all tests. Beyond this, DejaGnu offers +several advantages for testing: + +1. The flexibility and consistency of the DejaGnu framework make it + easy to write tests for any program. + +1. DejaGnu provides a layer of abstraction that allows you to write + tests that are portable to any host or target where a program + must be tested. For instance, a test for GDB can run (from any + Unix-based host) on any target architecture that DejaGnu + supports. + +1. All tests have the same output format. This makes it easy to + integrate testing into other software development processes. + DejaGnu's output is designed to be parsed by other filtering + scripts and it is also human-readable. + +DejaGnu is written in expect, which in turn uses "Tcl"--Tool command +language. + +Running tests requires two things: the testing framework and the test +suites themselves. + +%conf +mkdir build +cd build +# 49078@debbugs.gnu.org: bug in Expect 5.45.4 triggers a testsuite failure +# when building in source directory +%define _configure ../configure +%configure + +%install -a +install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dejagnu/site.exp +ln -s -f %{_sysconfdir}/dejagnu/site.exp %{buildroot}%{_datadir}/dejagnu/site.exp + +%files +%defattr(-, root, root) +%license COPYING +%doc ChangeLog NEWS README AUTHORS TODO +%dir %{_datadir}/dejagnu +%dir %{_sysconfdir}/dejagnu +%{_bindir}/dejagnu +%{_bindir}/runtest +%{_mandir}/man1/dejagnu.1%{ext_man} +%{_mandir}/man1/dejagnu-help.1%{ext_man} +%{_mandir}/man1/dejagnu-report-card.1%{ext_man} +%{_mandir}/man1/runtest.1%{ext_man} +%{_infodir}/dejagnu.info%{ext_info} +%{_includedir}/* +%config(noreplace) %{_sysconfdir}/dejagnu/site.exp +%{_datadir}/dejagnu/* + +%changelog +%{?autochangelog} diff --git a/SPECS/dejagnu/site.exp b/SPECS/dejagnu/site.exp new file mode 100644 index 00000000..4c0990a6 --- /dev/null +++ b/SPECS/dejagnu/site.exp @@ -0,0 +1,30 @@ +# +# site.tmpl -- Sample template for a global config file. +# Add changes here to to work at your site. +# + +# +# transform -- transform a tool name to get the installed name. We only define +# this if there wasn't one. This was the global config file can +# override how the tool names are calculated. +# + +# +# uncomment this if you wish to redefine the transform procedure +# + +#if ![string match "transform" [info procs transform]] then { +# proc transform { name } { +# global target_triplet +# +# if [string match "" $target_triplet] then { +# return $name +# } else { +# return ${target_triplet}-$name +# } +# } +#} + +# +# Set a default target list for various target triplets. +# diff --git a/SPECS/dejagnu/testsuite-legacy.patch b/SPECS/dejagnu/testsuite-legacy.patch new file mode 100644 index 00000000..97522fb2 --- /dev/null +++ b/SPECS/dejagnu/testsuite-legacy.patch @@ -0,0 +1,50 @@ +From: Jacob Bachmeyer +Subject: bug#49250: dejagnu 1.6.3 breaks automake 1.16.3 testsuite +Date: Tue, 29 Jun 2021 23:49:09 -0500 + +The Automake tests are using a legacy layout that does not meet a +long-documented requirement. + +The DejaGnu manual has for years (including all available revision +history) stated that a DejaGnu testsuite is required to be in a +directory tree named "testsuite" at its root. Previous versions of +DejaGnu did not actually care, but this led to an ambiguity that made +integrating DejaGnu with non-recursive Automake build systems very +difficult. This caused significant difficulties with DejaGnu's own +testsuite, and fixing it was needed to actually run the DejaGnu +testsuite properly. + +The simple fix is to move the DejaGnu testsuites in the Automake test +cases into "testsuite" directories, but this causes the tests to fail +with older versions of DejaGnu. This broken legacy case is deprecated +in 1.6.3 but still supposed to be supported, even though the manual has +always said that DejaGnu testsuites are required to be in testsuite/ +directories. + +The code that detects this legacy case was written to match conditions +observed with DejaGnu's own testsuite, with an older version of Automake +in use at that time. As a result, that code branch fails to catch the +situations in the Automake 1.16.3 testsuite and DejaGnu falls back to a +"deep legacy" mode in which some features do not work. One of the +features that does not work in this mode is limiting testing to a single +tool at a time; this appears to cause most of the failures. + + +An experimental patch is attached. + + + +-- Jacob + +diff -urN -x '*~' dejagnu-1.6.3/runtest.exp dejagnu-1.6.3-patch/runtest.exp +--- dejagnu-1.6.3/runtest.exp 2021-06-16 21:15:25.000000000 -0500 ++++ dejagnu-1.6.3-patch/runtest.exp 2021-06-29 21:41:28.735667904 -0500 +@@ -741,7 +741,7 @@ + set testsuitedir $base_dir + set testbuilddir $base_dir + } else { +- if { $testsuitedir eq "testsuite" && $srcdir eq "." && $objdir eq "." } { ++ if { $testsuitedir eq "testsuite" && $testbuilddir eq "testsuite" } { + # Broken legacy case -- testsuite not actually in testsuite/ + # Produce a warning, but continue. + send_error "WARNING: testsuite is not in a testsuite/ directory.\n" diff --git a/SPECS/desktop-file-utils/0001-validate-Add-Phosh-to-list-of-valid-OnlyShowIn-envir.patch b/SPECS/desktop-file-utils/0001-validate-Add-Phosh-to-list-of-valid-OnlyShowIn-envir.patch new file mode 100644 index 00000000..f93ed469 --- /dev/null +++ b/SPECS/desktop-file-utils/0001-validate-Add-Phosh-to-list-of-valid-OnlyShowIn-envir.patch @@ -0,0 +1,34 @@ +From 673ec76e881b8dd7f710b846ae0418c09e6f5439 Mon Sep 17 00:00:00 2001 +From: Sam Day +Date: Fri, 31 Jan 2025 14:50:21 +0100 +Subject: [PATCH] validate: Add Phosh to list of valid OnlyShowIn= environments + +Signed-off-by: Sam Day +--- + src/validate.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/validate.c b/src/validate.c +index 3ccf866..89a17de 100644 +--- a/src/validate.c ++++ b/src/validate.c +@@ -386,7 +386,7 @@ static DesktopKeyDefinition registered_action_keys[] = { + + /* This should be the same list as in xdg-specs/menu/menu-spec.xml */ + static const char *show_in_registered[] = { +- "COSMIC", "GNOME", "GNOME-Classic", "GNOME-Flashback", "KDE", "LXDE", "LXQt", "MATE", "Razor", "ROX", "TDE", "Unity", "XFCE", "EDE", "Cinnamon", "Pantheon", "Budgie", "Enlightenment", "DDE", "Endless", "Old" ++ "COSMIC", "GNOME", "GNOME-Classic", "GNOME-Flashback", "KDE", "LXDE", "LXQt", "MATE", "Phosh", "Razor", "ROX", "TDE", "Unity", "XFCE", "EDE", "Cinnamon", "Pantheon", "Budgie", "Enlightenment", "DDE", "Endless", "Old" + }; + + static struct { +@@ -543,6 +543,7 @@ static struct { + { "COSMIC", FALSE, FALSE, FALSE, { NULL }, { NULL } }, + { "KDE", FALSE, FALSE, FALSE, { NULL }, { "Qt", NULL } }, + { "GNOME", FALSE, FALSE, FALSE, { NULL }, { "GTK", NULL } }, ++ { "Phosh", FALSE, FALSE, FALSE, { NULL }, { "GTK", NULL } }, + { "XFCE", FALSE, FALSE, FALSE, { NULL }, { "GTK", NULL } }, + { "DDE", FALSE, FALSE, FALSE, { NULL }, { "Qt", NULL } }, + { "LXQt", FALSE, FALSE, FALSE, { NULL }, { "Qt", NULL } }, +-- +2.47.1 + \ No newline at end of file diff --git a/SPECS/desktop-file-utils/desktop-file-utils.spec b/SPECS/desktop-file-utils/desktop-file-utils.spec new file mode 100644 index 00000000..3d7b0bf0 --- /dev/null +++ b/SPECS/desktop-file-utils/desktop-file-utils.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: desktop-file-utils +Version: 0.28 +Release: %autorelease +Summary: Utilities for manipulating .desktop files +License: GPL-2.0-or-later +URL: https://www.freedesktop.org/software/desktop-file-utils +#!RemoteAsset +Source: https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-%{version}.tar.xz +Patch: 0001-validate-Add-Phosh-to-list-of-valid-OnlyShowIn-envir.patch +BuildSystem: meson + +BuildRequires: gcc +BuildRequires: glib-devel +BuildRequires: meson + +%description +.desktop files are used to describe an application for inclusion in +GNOME or KDE menus. This package contains desktop-file-validate which +checks whether a .desktop file complies with the specification, and +desktop-file-install which installs a desktop file to the standard directory. + +%transfiletriggerin -- %{_datadir}/applications +update-desktop-database &> /null || : + +%transfiletriggerpostun -- %{_datadir}/applications +update-desktop-database &> /dev/null || : + +%files +%doc AUTHORS README NEWS +%license COPYING +%{_bindir}/* +%{_mandir}/man1/desktop-file-install.1* +%{_mandir}/man1/desktop-file-validate.1* +%{_mandir}/man1/update-desktop-database.1* +%{_mandir}/man1/desktop-file-edit.1* +%{_datadir}/emacs/site-lisp/desktop-entry-mode.el + +%changelog +%{?autochangelog} diff --git a/SPECS/dhcpcd/dhcpcd.service b/SPECS/dhcpcd/dhcpcd.service new file mode 100644 index 00000000..08099911 --- /dev/null +++ b/SPECS/dhcpcd/dhcpcd.service @@ -0,0 +1,8 @@ +[Unit] +Description=A minimalistic network configuration daemon with DHCPv4, rdisc and DHCPv6 support +Wants=network.target +Before=network.target +[Service] +ExecStart=/usr/sbin/dhcpcd -q --nobackground +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/SPECS/dhcpcd/dhcpcd.spec b/SPECS/dhcpcd/dhcpcd.spec new file mode 100644 index 00000000..d3d2eb7c --- /dev/null +++ b/SPECS/dhcpcd/dhcpcd.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: dhcpcd +Version: 10.2.4 +Release: %autorelease +Summary: A minimalistic network configuration daemon +License: BSD-2-Clause AND ISC AND MIT +URL: http://roy.marples.name/projects/dhcpcd/ +#!RemoteAsset +Source0: https://github.com/NetworkConfiguration/dhcpcd/releases/download/v%{version}/dhcpcd-%{version}.tar.xz +Source1: dhcpcd.service +Source2: dhcpcd@.service +Source3: systemd-sysusers.conf + +BuildSystem: autotools + +BuildOption(conf): --dbdir=%{_localstatedir}/lib/%{name} +BuildOption(conf): --runstatedir=%{_rundir} + +BuildRequires: gcc make +BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros + +%description +The dhcpcd package provides a minimalistic network configuration daemon +that supports IPv4, rdisc, and DHCPv6 protocols. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service +install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}@.service +install -D -m 644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf +install -d %{buildroot}%{_localstatedir}/lib/%{name} + +%post +%systemd_post dhcpcd.service + +%preun +%systemd_preun dhcpcd.service + +%postun +%systemd_postun_with_restart dhcpcd.service + +%files +%license LICENSE +%config(noreplace) %{_sysconfdir}/dhcpcd.conf +%dir %{_datadir}/dhcpcd +%dir %{_datadir}/dhcpcd/hooks +%{_datadir}/dhcpcd/hooks/* +%dir %{_libdir}/dhcpcd +%{_libdir}/dhcpcd/* +%{_libexecdir}/dhcpcd-hooks +%{_libexecdir}/dhcpcd-run-hooks +%{_mandir}/man5/dhcpcd.conf.5.gz +%{_mandir}/man8/dhcpcd-run-hooks.8.gz +%{_mandir}/man8/dhcpcd.8.gz +%{_sbindir}/dhcpcd +%{_sysusersdir}/%{name}.conf +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}@.service +%attr(0644,root,dhcpcd) %dir %{_localstatedir}/lib/%{name} + +%changelog +%{?autochangelog} diff --git a/SPECS/dhcpcd/dhcpcd@.service b/SPECS/dhcpcd/dhcpcd@.service new file mode 100644 index 00000000..495e1e1c --- /dev/null +++ b/SPECS/dhcpcd/dhcpcd@.service @@ -0,0 +1,13 @@ +[Unit] +Description=dhcpcd on %I +Wants=network.target +Before=network.target +BindsTo=sys-subsystem-net-devices-%i.device +After=sys-subsystem-net-devices-%i.device +[Service] +Type=forking +PIDFile=/run/dhcpcd/%I.pid +ExecStart=/usr/sbin/dhcpcd -q %I +ExecStop=/usr/sbin/dhcpcd -x %I +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/SPECS/dhcpcd/systemd-sysusers.conf b/SPECS/dhcpcd/systemd-sysusers.conf new file mode 100644 index 00000000..3b50d874 --- /dev/null +++ b/SPECS/dhcpcd/systemd-sysusers.conf @@ -0,0 +1 @@ +u dhcpcd - "Minimalistic DHCP client" /var/lib/dhcpcd \ No newline at end of file diff --git a/SPECS/diffstat/diffstat.spec b/SPECS/diffstat/diffstat.spec new file mode 100644 index 00000000..d8ceabe8 --- /dev/null +++ b/SPECS/diffstat/diffstat.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: diffstat +Version: 1.68 +Release: %autorelease +Summary: A utility for displaying a histogram of diff output +License: X11 +URL: https://invisible-island.net/diffstat +#!RemoteAsset +Source: https://invisible-mirror.net/archives/diffstat/diffstat-%{version}.tgz +BuildSystem: autotools + +BuildRequires: gcc libtool autoconf automake make + +%description +diffstat reads the output of the diff command and displays a histogram of the +insertions, deletions, and modifications in each file. It is commonly used +to provide a summary of changes in large, complex patch files. + +%conf -p +autoreconf -fiv + +%files +%license COPYING +%doc CHANGES README +%{_bindir}/diffstat +%{_mandir}/man1/diffstat.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/diffutils/diffutils.spec b/SPECS/diffutils/diffutils.spec new file mode 100644 index 00000000..11d7163f --- /dev/null +++ b/SPECS/diffutils/diffutils.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: diffutils +Version: 3.12 +Release: %autorelease +Summary: GNU diff Utilities +License: GFDL-1.2-only AND GPL-3.0-or-later +Group: Productivity/Text/Utilities +URL: https://www.gnu.org/software/diffutils/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig +#!RemoteAsset +Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=diffutils&download=1#/%{name}.keyring +BuildSystem: autotools + +%description +The GNU diff utilities find differences between files. diff is used to +make source code patches, for instance. + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%doc AUTHORS NEWS README THANKS +%{_bindir}/* +%{_infodir}/diffutils.info%{?ext_info} +%{_mandir}/man1/*.1%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/ding-libs/ding-libs.spec b/SPECS/ding-libs/ding-libs.spec new file mode 100644 index 00000000..d01f5639 --- /dev/null +++ b/SPECS/ding-libs/ding-libs.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ding-libs +Version: 0.6.2 +Release: %autorelease +Summary: 'Ding is not GLib' utility libraries +License: GPLv3+ and LGPLv3+ +URL: https://github.com/SSSD/ding-libs/releases +#!RemoteAsset +Source0: https://github.com/SSSD/ding-libs/releases/download/%{version}/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: libtool +BuildRequires: m4 +BuildRequires: pkgconfig + +%description +A meta-package that pulls in libcollection, libdhash, libini_config, +librefarray libbasicobjects, and libpath_utils. + +%package devel +Summary: Development files for ding-libs +Requires: ding-libs = %{version}-%{release} + +%description devel +This package provides development libraries and other development files. + +%conf -p +autoreconf -fiv + +%ldconfig_scriptlets + +%files +%defattr(-,root,root) +%doc COPYING COPYING.LESSER +%{_libdir}/lib*.so.* + +%files devel +%defattr(-,root,root) +%doc COPYING COPYING.LESSER README* +%{_includedir}/* +%{_libdir}/lib*.{a,la,so} +%{_libdir}/pkgconfig/* + +%changelog +%{?autochangelog} diff --git a/SPECS/dmidecode/dmidecode.spec b/SPECS/dmidecode/dmidecode.spec new file mode 100644 index 00000000..252860ed --- /dev/null +++ b/SPECS/dmidecode/dmidecode.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define d_version 3-6 +Name: dmidecode +Version: 3.6 +Release: %autorelease +Summary: DMI data report tool +License: GPL-2.0-or-later +URL: https://www.nongnu.org/dmidecode/ +#!RemoteAsset +Source: https://github.com/mirror/dmidecode/archive/refs/tags/%{name}-%{d_version}.tar.gz +BuildSystem: autotools + +BuildOption(build): CFLAGS="%{optflags}" +BuildOption(build): LDFLAGS="%{?build_ldflags}" +BuildOption(install): prefix=%{_prefix} +BuildOption(install): sbindir=%{_sbindir} +BuildRequires: make gcc xz + +%description +Dmidecode reports information about your system's hardware as described +in your system BIOS according to the SMBIOS/DMI standard. This information +typically includes system manufacturer, model name, serial number, BIOS +version, and asset tag. + +# No configure +%conf + +# No `check' target. +%check + + +%files +%{_docdir}/%{name} +%{_sbindir}/* +%{_mandir}/man8/*.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/dnf5/dnf5.spec b/SPECS/dnf5/dnf5.spec new file mode 100644 index 00000000..f89199c4 --- /dev/null +++ b/SPECS/dnf5/dnf5.spec @@ -0,0 +1,217 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dnf5 +Version: 5.2.17.0 +Release: %autorelease +Summary: Command-line package manager +License: GPL-2.0-or-later +URL: https://github.com/rpm-software-management/dnf5 +#!RemoteAsset +Source0: https://github.com/rpm-software-management/dnf5/archive/%{version}/dnf5-%{version}.tar.gz +BuildSystem: cmake +Provides: dnf +BuildOption(conf): -DVERSION_PRIME:STRING=5 +BuildOption(conf): -DVERSION_MAJOR:STRING=2 +BuildOption(conf): -DVERSION_MINOR:STRING=17 +BuildOption(conf): -DVERSION_MICRO:STRING=0 +BuildOption(conf): -DPACKAGE_VERSION:STRING=%{version} +BuildOption(conf): -DWITH_LIBDNF5_CLI:BOOL=ON +BuildOption(conf): -DWITH_DNF5_PLUGINS:BOOL=ON +BuildOption(conf): -DWITH_DNF5DAEMON_CLIENT:BOOL=OFF +BuildOption(conf): -DWITH_DNF5DAEMON_SERVER:BOOL=OFF +BuildOption(conf): -DWITH_COMPS:BOOL=OFF +BuildOption(conf): -DWITH_MODULEMD:BOOL=OFF +BuildOption(conf): -DWITH_SYSTEMD:BOOL=OFF +BuildOption(conf): -DWITH_HTML:BOOL=OFF +BuildOption(conf): -DWITH_MAN:BOOL=OFF +BuildOption(conf): -DWITH_GO:BOOL=OFF +BuildOption(conf): -DWITH_PERL5:BOOL=OFF +BuildOption(conf): -DWITH_PYTHON3:BOOL=ON +BuildOption(conf): -DWITH_RUBY:BOOL=OFF +BuildOption(conf): -DWITH_TESTS:BOOL=OFF +BuildOption(conf): -DWITH_PLUGIN_APPSTREAM:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc-c++ >= 10.1 +BuildRequires: pkgconfig(fmt) +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(sdbus-c++) +BuildRequires: pkgconfig(librepo) >= 1.20.0 +BuildRequires: pkgconfig(libsolv) >= 0.7.25 +BuildRequires: pkgconfig(libsolvext) >= 0.7.25 +BuildRequires: pkgconfig(rpm) >= 4.17.0 +BuildRequires: pkgconfig(sqlite3) >= 3.35.0 +BuildRequires: toml11 +BuildRequires: zlib-devel +BuildRequires: pkgconfig(smartcols) +BuildRequires: libcurl-devel +BuildRequires: swig +BuildRequires: python3-devel + +Requires: libdnf5 = %{version} +Requires: libdnf5-cli = %{version} +Requires: coreutils + +%description +DNF5 is a command-line package manager that automates the process of installing, +upgrading, configuring, and removing computer programs in a consistent manner. + +%package -n libdnf5 +Summary: Package management library +Requires: libsolv >= 0.7.25 +Requires: librepo >= 1.20.0 +Requires: sqlite >= 3.35.0 + +%description -n libdnf5 +Package management library. + +%package -n libdnf5-cli +Summary: Library for terminal interactions in dnf5 +Requires: libdnf5 = %{version} + +%description -n libdnf5-cli +Library for working with a terminal in a command-line package manager. + +%package plugins +Summary: Core plugins for dnf5 +Requires: %{name} = %{version} +Requires: curl + +%description plugins +Core DNF5 plugins that enhance dnf5 with commands like builddep, config-manager, copr, etc. + +%package -n python-libdnf5 +Summary: Python bindings for the libdnf5 library +Provides: python3-libdnf5 +Requires: libdnf5 = %{version}-%{release} + +%description -n python-libdnf5 +Python bindings for the libdnf library. + +%package -n python-libdnf5-cli +Summary: Python bindings for the libdnf5-cli library +Provides: python3-libdnf5-cli +Requires: libdnf5-cli = %{version}-%{release} + +%description -n python-libdnf5-cli +Python bindings for the libdnf5-cli library. + +%package -n python-libdnf5-python-plugins-loader +Summary: Libdnf5 plugin that allows loading Python plugins +Provides: python3-libdnf5-python-plugins-loader +Requires: libdnf5 = %{version}-%{release} +Requires: python3-libdnf5 = %{version}-%{release} + +%description -n python-libdnf5-python-plugins-loader +Libdnf5 plugin that allows loading Python plugins. + +%package devel +Summary: Development files for dnf5, libdnf5 and libdnf5-cli +Requires: %{name} = %{version} +Requires: libdnf5 = %{version} +Requires: libdnf5-cli = %{version} +Requires: libsolv-devel >= 0.7.25 + +%description devel +Development files for dnf5. + +%install -a +ln -sf dnf5 %{buildroot}%{_bindir}/dnf + +%find_lang %{name} --generate-subpackages --all-name + +%ldconfig_scriptlets -n libdnf5 +%ldconfig_scriptlets -n libdnf5-cli + +%files +%license COPYING.md gpl-2.0.txt +%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md README.md +%{_bindir}/dnf5 +%{_bindir}/dnf +%dir %{_sysconfdir}/dnf +%dir %{_sysconfdir}/dnf/dnf5-aliases.d +%doc %{_sysconfdir}/dnf/dnf5-aliases.d/README +%dir %{_datadir}/dnf5 +%dir %{_datadir}/dnf5/aliases.d +%{_datadir}/dnf5/aliases.d/compatibility.conf +%dir %{_datadir}/dnf5/dnf5-plugins +%dir %{_sysconfdir}/dnf/dnf5-plugins +%dir %{_libdir}/libdnf5/plugins +%{_sysconfdir}/bash_completion.d/dnf5 +%{_unitdir}/dnf5-makecache.service +%{_unitdir}/dnf5-makecache.timer +%{_datadir}/dnf5/aliases.d/compatibility-plugins.conf +%{_bindir}/dnf-automatic +%{_unitdir}/dnf-automatic.service +%{_unitdir}/dnf-automatic.timer +%{_unitdir}/dnf5-automatic.service +%{_unitdir}/dnf5-automatic.timer +%{_datadir}/dnf5/aliases.d/compatibility-reposync.conf + +%files -n libdnf5 +%license lgpl-2.1.txt +%config(noreplace) %{_sysconfdir}/dnf/dnf.conf +%dir %{_sysconfdir}/dnf/vars +%dir %{_sysconfdir}/dnf/protected.d +%ghost %attr(0644, root, root) %{_sysconfdir}/dnf/versionlock.toml +%dir %{_datadir}/dnf5/libdnf.conf.d +%dir %{_sysconfdir}/dnf/libdnf5.conf.d +%dir %{_datadir}/dnf5/repos.override.d +%dir %{_sysconfdir}/dnf/repos.override.d +%dir %{_datadir}/dnf5/repos.d +%dir %{_datadir}/dnf5/vars.d +%dir %{_libdir}/libdnf5 +%{_libdir}/libdnf5.so.* +%ghost %attr(0755, root, root) %dir %{_var}/cache/libdnf5 +%ghost %attr(0755, root, root) %dir %{_sharedstatedir}/dnf + +%files -n libdnf5-cli +%{_libdir}/libdnf5-cli.so.* + +%files plugins +%dir %{_sysconfdir}/dnf/libdnf5-plugins +%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/actions.conf +%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/expired-pgp-keys.conf +%dir %{_libdir}/dnf5 +%dir %{_libdir}/dnf5/plugins +%doc %{_libdir}/dnf5/plugins/README +%{_libdir}/libdnf5/plugins/*.so +%{_libdir}/dnf5/plugins/*.so +%{_datadir}/dnf5/dnf5-plugins/automatic.conf + +%files -n python-libdnf5 +%{python3_sitearch}/libdnf5 +%{python3_sitearch}/libdnf5-*.dist-info +%license COPYING.md +%license lgpl-2.1.txt + +%files -n python-libdnf5-cli +%{python3_sitearch}/libdnf5_cli +%{python3_sitearch}/libdnf5_cli-*.dist-info +%license COPYING.md +%license lgpl-2.1.txt + +%files -n python-libdnf5-python-plugins-loader +%{_libdir}/libdnf5/plugins/python_plugins_loader.* +%dir %{python3_sitelib}/libdnf_plugins/ +%doc %{python3_sitelib}/libdnf_plugins/README + +%files devel +%license COPYING.md lgpl-2.1.txt +%{_includedir}/dnf5/ +%{_includedir}/libdnf5/ +%{_includedir}/libdnf5-cli/ +%{_libdir}/libdnf5.so +%{_libdir}/libdnf5-cli.so +%{_libdir}/pkgconfig/libdnf5.pc +%{_libdir}/pkgconfig/libdnf5-cli.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/docbook-dtds/0001-docbook-dtd30-sgml-1.0.catalog.patch b/SPECS/docbook-dtds/0001-docbook-dtd30-sgml-1.0.catalog.patch new file mode 100644 index 00000000..7d3f8cff --- /dev/null +++ b/SPECS/docbook-dtds/0001-docbook-dtd30-sgml-1.0.catalog.patch @@ -0,0 +1,32 @@ +--- 3.0-sgml/docbook.cat Tue Dec 10 16:35:22 1996 ++++ 3.0-sgml/catalog Mon Jun 5 11:08:34 2000 +@@ -41,29 +41,6 @@ + PUBLIC "-//Davenport//ELEMENTS DocBook Information Pool V3.0//EN" "dbpool.mod" + PUBLIC "-//Davenport//ELEMENTS DocBook Document Hierarchy V3.0//EN" "dbhier.mod" + PUBLIC "-//Davenport//ENTITIES DocBook Additional General Entities V3.0//EN" "dbgenent.mod" +- +- -- ...................................................................... -- +- -- ISO entity sets ...................................................... -- +- +-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "iso-dia.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "iso-num.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" "iso-pub.gml" +-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" "iso-tech.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" "iso-lat2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" "iso-grk1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "iso-grk2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" "iso-grk3.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "iso-grk4.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "iso-amsa.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "iso-amsb.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "iso-amsc.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "iso-amsn.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "iso-amso.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "iso-amsr.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "iso-box.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "iso-cyr1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "iso-cyr2.gml" + + -- End of catalog data for DocBook V3.0 ................................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/0002-docbook-dtd31-sgml-1.0.catalog.patch b/SPECS/docbook-dtds/0002-docbook-dtd31-sgml-1.0.catalog.patch new file mode 100644 index 00000000..3d1410c1 --- /dev/null +++ b/SPECS/docbook-dtds/0002-docbook-dtd31-sgml-1.0.catalog.patch @@ -0,0 +1,32 @@ +--- 3.1-sgml/docbook.cat Tue Feb 2 06:53:32 1999 ++++ 3.1-sgml/catalog Thu May 25 11:45:01 2000 +@@ -35,29 +35,6 @@ + PUBLIC "-//OASIS//ENTITIES DocBook Additional General Entities V3.1//EN" "dbgenent.mod" + PUBLIC "-//OASIS//ENTITIES DocBook Notations V3.1//EN" "dbnotn.mod" + PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V3.1//EN" "dbcent.mod" +- +- -- ...................................................................... -- +- -- ISO entity sets ...................................................... -- +- +-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "iso-dia.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "iso-num.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" "iso-pub.gml" +-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" "iso-tech.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" "iso-lat2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" "iso-grk1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "iso-grk2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" "iso-grk3.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "iso-grk4.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "iso-amsa.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "iso-amsb.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "iso-amsc.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "iso-amsn.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "iso-amso.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "iso-amsr.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "iso-box.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "iso-cyr1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "iso-cyr2.gml" + + -- End of catalog data for DocBook V3.1 ................................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/0003-docbook-dtd40-sgml-1.0.catalog.patch b/SPECS/docbook-dtds/0003-docbook-dtd40-sgml-1.0.catalog.patch new file mode 100644 index 00000000..25fbbae7 --- /dev/null +++ b/SPECS/docbook-dtds/0003-docbook-dtd40-sgml-1.0.catalog.patch @@ -0,0 +1,32 @@ +--- 4.0-sgml/docbook.cat Mon May 22 22:38:05 2000 ++++ 4.0-sgml/catalog Mon May 22 22:12:36 2000 +@@ -35,29 +35,6 @@ + PUBLIC "-//OASIS//ENTITIES DocBook Additional General Entities V4.0//EN" "dbgenent.mod" + PUBLIC "-//OASIS//ENTITIES DocBook Notations V4.0//EN" "dbnotn.mod" + PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.0//EN" "dbcent.mod" +- +- -- ...................................................................... -- +- -- ISO entity sets ...................................................... -- +- +-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "iso-dia.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "iso-num.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" "iso-pub.gml" +-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" "iso-tech.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" "iso-lat2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" "iso-grk1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "iso-grk2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" "iso-grk3.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "iso-grk4.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "iso-amsa.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "iso-amsb.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "iso-amsc.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "iso-amsn.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "iso-amso.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "iso-amsr.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "iso-box.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "iso-cyr1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "iso-cyr2.gml" + + -- End of catalog data for DocBook V4.0 ................................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/0004-docbook-dtd41-sgml-1.0.catalog.patch b/SPECS/docbook-dtds/0004-docbook-dtd41-sgml-1.0.catalog.patch new file mode 100644 index 00000000..8e4daf96 --- /dev/null +++ b/SPECS/docbook-dtds/0004-docbook-dtd41-sgml-1.0.catalog.patch @@ -0,0 +1,32 @@ +--- 4.1-sgml/docbook.cat Mon May 22 22:38:05 2000 ++++ 4.1-sgml/catalog Mon May 22 22:12:36 2000 +@@ -35,29 +35,6 @@ + PUBLIC "-//OASIS//ENTITIES DocBook Additional General Entities V4.1//EN" "dbgenent.mod" + PUBLIC "-//OASIS//ENTITIES DocBook Notations V4.1//EN" "dbnotn.mod" + PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.1//EN" "dbcent.mod" +- +- -- ...................................................................... -- +- -- ISO entity sets ...................................................... -- +- +-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "iso-dia.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "iso-num.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" "iso-pub.gml" +-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" "iso-tech.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" "iso-lat2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" "iso-grk1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "iso-grk2.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" "iso-grk3.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "iso-grk4.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "iso-amsa.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "iso-amsb.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "iso-amsc.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "iso-amsn.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "iso-amso.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "iso-amsr.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "iso-box.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "iso-cyr1.gml" +-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "iso-cyr2.gml" + + -- End of catalog data for DocBook V4.1 ................................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/0005-docbook-dtd42-sgml-1.0.catalog.patch b/SPECS/docbook-dtds/0005-docbook-dtd42-sgml-1.0.catalog.patch new file mode 100644 index 00000000..6793950e --- /dev/null +++ b/SPECS/docbook-dtds/0005-docbook-dtd42-sgml-1.0.catalog.patch @@ -0,0 +1,68 @@ +--- 4.2-sgml/docbook.cat.orig 2002-07-17 17:14:28.000000000 +0100 ++++ 4.2-sgml/docbook.cat 2002-07-17 21:58:24.000000000 +0100 +@@ -49,65 +49,5 @@ + PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" + "dbcentx.mod" + +- -- ...................................................................... -- +- -- ISO entity sets ...................................................... -- +- +-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" +- "iso-dia.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" +- "iso-num.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" +- "iso-pub.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" +- "iso-tech.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" +- "iso-lat1.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" +- "iso-lat2.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" +- "iso-grk1.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" +- "iso-grk2.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" +- "iso-grk3.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" +- "iso-grk4.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" +- "iso-amsa.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" +- "iso-amsb.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" +- "iso-amsc.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" +- "iso-amsn.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" +- "iso-amso.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" +- "iso-amsr.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" +- "iso-box.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" +- "iso-cyr1.gml" +- +-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" +- "iso-cyr2.gml" +- + -- End of catalog data for DocBook V4.2 ................................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/0006-docbook-4.2-euro.patch b/SPECS/docbook-dtds/0006-docbook-4.2-euro.patch new file mode 100644 index 00000000..845cd93d --- /dev/null +++ b/SPECS/docbook-dtds/0006-docbook-4.2-euro.patch @@ -0,0 +1,22 @@ +--- 4.2-sgml/docbookx.dtd.euro 2003-07-15 09:07:58.000000000 +0100 ++++ 4.2-sgml/docbookx.dtd 2003-07-15 09:08:12.000000000 +0100 +@@ -106,7 +106,7 @@ + ++ + ]]> + +--- 4.2-xml/docbookx.dtd.euro 2003-07-15 09:08:02.000000000 +0100 ++++ 4.2-xml/docbookx.dtd 2003-07-15 09:08:21.000000000 +0100 +@@ -106,7 +106,7 @@ + ++ + ]]> + diff --git a/SPECS/docbook-dtds/0007-docbook-dtds-ents.patch b/SPECS/docbook-dtds/0007-docbook-dtds-ents.patch new file mode 100644 index 00000000..fe93aa23 --- /dev/null +++ b/SPECS/docbook-dtds/0007-docbook-dtds-ents.patch @@ -0,0 +1,53 @@ +--- 4.3-sgml/docbook.cat.ents 2005-12-13 13:14:24.000000000 +0000 ++++ 4.3-sgml/docbook.cat 2005-12-13 13:14:38.000000000 +0000 +@@ -51,6 +51,7 @@ + + -- ...................................................................... -- + -- ISO entity sets ...................................................... -- ++-- + + PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" + "iso-dia.gml" +@@ -109,5 +110,6 @@ + PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" + "iso-cyr2.gml" + ++-- + -- End of catalog data for DocBook V4.3 ................................. -- + -- ...................................................................... -- +--- 4.4-sgml/docbook.cat.ents 2005-12-13 13:14:51.000000000 +0000 ++++ 4.4-sgml/docbook.cat 2005-12-13 13:14:59.000000000 +0000 +@@ -54,6 +54,7 @@ + + -- ...................................................................... -- + -- ISO entity sets ...................................................... -- ++-- + + PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" + "iso-dia.gml" +@@ -112,5 +113,6 @@ + PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" + "iso-cyr2.gml" + ++-- + -- End of catalog data for DocBook V4.4 ................................. -- + -- ...................................................................... -- +diff -urNp docbook-dtds-1.0-orig/4.5-sgml/docbook.cat 4.5-sgml/docbook.cat +--- docbook-dtds-1.0-orig/4.5-sgml/docbook.cat 2009-02-19 13:45:22.000000000 +0100 ++++ 4.5-sgml/docbook.cat 2009-02-19 13:47:31.000000000 +0100 +@@ -60,6 +60,7 @@ PUBLIC "-//OASIS//ENTITIES DocBook Chara + + -- ...................................................................... -- + -- ISO entity sets ...................................................... -- ++-- + + PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" + "iso-dia.gml" +@@ -118,5 +119,7 @@ PUBLIC "ISO 8879:1986//ENTITIES Russian + PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" + "iso-cyr2.gml" + ++-- ++ + -- End of catalog data for DocBook V4.5 ................................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/0008-docbook-sgml-systemrewrite.patch b/SPECS/docbook-dtds/0008-docbook-sgml-systemrewrite.patch new file mode 100644 index 00000000..2c407fef --- /dev/null +++ b/SPECS/docbook-dtds/0008-docbook-sgml-systemrewrite.patch @@ -0,0 +1,209 @@ +diff -urNp 3.0-sgml/docbook.cat docbook-dtds-1.0/3.0-sgml/docbook.cat +--- 3.0-sgml/docbook.cat 2009-02-05 16:44:15.000000000 +0100 ++++ docbook-dtds-1.0/3.0-sgml/docbook.cat 2009-02-05 16:48:58.000000000 +0100 +@@ -30,6 +30,12 @@ + DTDDECL "-//Davenport//DTD DocBook V3.0//EN" "docbook.dcl" + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/3.0/docbook.dtd" ++ "docbook.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd" +diff -urNp 3.1-sgml/docbook.cat docbook-dtds-1.0/3.1-sgml/docbook.cat +--- 3.1-sgml/docbook.cat 2009-02-05 16:44:15.000000000 +0100 ++++ docbook-dtds-1.0/3.1-sgml/docbook.cat 2009-02-05 16:56:51.000000000 +0100 +@@ -22,6 +22,12 @@ + DTDDECL "-//OASIS//DTD DocBook V3.1//EN" "docbook.dcl" + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/3.1/docbook.dtd" ++ "docbook.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V3.1//EN" "docbook.dtd" +diff -urNp 4.0-sgml/docbook.cat docbook-dtds-1.0/4.0-sgml/docbook.cat +--- 4.0-sgml/docbook.cat 2009-02-05 16:44:16.000000000 +0100 ++++ docbook-dtds-1.0/4.0-sgml/docbook.cat 2009-02-05 16:49:06.000000000 +0100 +@@ -22,6 +22,12 @@ + DTDDECL "-//OASIS//DTD DocBook V4.0//EN" "docbook.dcl" + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/4.0/docbook.dtd" ++ "docbook.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd" +diff -urNp 4.1-sgml/docbook.cat docbook-dtds-1.0/4.1-sgml/docbook.cat +--- 4.1-sgml/docbook.cat 2009-02-05 16:44:16.000000000 +0100 ++++ docbook-dtds-1.0/4.1-sgml/docbook.cat 2009-02-05 16:49:27.000000000 +0100 +@@ -22,6 +22,12 @@ + DTDDECL "-//OASIS//DTD DocBook V4.1//EN" "docbook.dcl" + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++SYSTEM "http://www.oasis-open.org/docbook/sgml/4.1/docbook.dtd" ++ "docbook.dtd" ++ ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "docbook.dtd" +diff -urNp 4.1.2-xml/docbook.cat docbook-dtds-1.0/4.1.2-xml/docbook.cat +--- 4.1.2-xml/docbook.cat 2000-08-27 17:19:42.000000000 +0200 ++++ docbook-dtds-1.0/4.1.2-xml/docbook.cat 2009-02-05 16:52:16.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" ++ "docbookx.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbookx.dtd" +diff -urNp 4.2-sgml/docbook.cat docbook-dtds-1.0/4.2-sgml/docbook.cat +--- 4.2-sgml/docbook.cat 2009-02-05 16:44:17.000000000 +0100 ++++ docbook-dtds-1.0/4.2-sgml/docbook.cat 2009-02-05 16:50:10.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/4.2/docbook.dtd" ++ "docbook.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V4.2//EN" +diff -urNp 4.2-xml/docbook.cat docbook-dtds-1.0/4.2-xml/docbook.cat +--- 4.2-xml/docbook.cat 2002-07-17 18:14:41.000000000 +0200 ++++ docbook-dtds-1.0/4.2-xml/docbook.cat 2009-02-05 16:52:53.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" ++ "docbookx.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" +diff -urNp 4.3-sgml/docbook.cat docbook-dtds-1.0/4.3-sgml/docbook.cat +--- 4.3-sgml/docbook.cat 2009-02-05 16:44:18.000000000 +0100 ++++ docbook-dtds-1.0/4.3-sgml/docbook.cat 2009-02-05 16:50:37.000000000 +0100 +@@ -17,6 +17,13 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/4.3/docbook.dtd" ++ "docbook.dtd" ++ ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V4.3//EN" +diff -urNp 4.3-xml/docbook.cat docbook-dtds-1.0/4.3-xml/docbook.cat +--- 4.3-xml/docbook.cat 2004-03-31 13:22:18.000000000 +0200 ++++ docbook-dtds-1.0/4.3-xml/docbook.cat 2009-02-05 16:53:12.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" ++ "docbookx.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" +diff -urNp 4.4-sgml/docbook.cat docbook-dtds-1.0/4.4-sgml/docbook.cat +--- 4.4-sgml/docbook.cat 2009-02-05 16:44:18.000000000 +0100 ++++ docbook-dtds-1.0/4.4-sgml/docbook.cat 2009-02-05 16:50:57.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/4.4/docbook.dtd" ++ "docbook.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V4.4//EN" +diff -urNp 4.4-xml/docbook.cat docbook-dtds-1.0/4.4-xml/docbook.cat +--- 4.4-xml/docbook.cat 2005-01-27 14:57:19.000000000 +0100 ++++ docbook-dtds-1.0/4.4-xml/docbook.cat 2009-02-05 16:53:30.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" ++ "docbookx.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" +diff -urNp 4.5-sgml/docbook.cat docbook-dtds-1.0/4.5-sgml/docbook.cat +--- 4.5-sgml/docbook.cat 2006-10-03 15:27:50.000000000 +0200 ++++ docbook-dtds-1.0/4.5-sgml/docbook.cat 2009-02-05 16:51:22.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/sgml/4.5/docbook.dtd" ++ "docbook.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook V4.5//EN" +diff -urNp 4.5-xml/docbook.cat docbook-dtds-1.0/4.5-xml/docbook.cat +--- 4.5-xml/docbook.cat 2006-10-03 15:26:00.000000000 +0200 ++++ docbook-dtds-1.0/4.5-xml/docbook.cat 2009-02-05 16:55:45.000000000 +0100 +@@ -17,6 +17,12 @@ + -- + + -- ...................................................................... -- ++ -- SYSTEM rewrite of web URL .............. ............................. -- ++ ++SYSTEM "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" ++ "docbookx.dtd" ++ ++ -- ...................................................................... -- + -- DocBook driver file .................................................. -- + + PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" diff --git a/SPECS/docbook-dtds/0009-docbook-dtd412-entities.patch b/SPECS/docbook-dtds/0009-docbook-dtd412-entities.patch new file mode 100644 index 00000000..065c0f95 --- /dev/null +++ b/SPECS/docbook-dtds/0009-docbook-dtd412-entities.patch @@ -0,0 +1,48 @@ +diff -urNp docbook-dtds-1.0-orig/4.1.2-xml/docbook.cat docbook-dtds-1.0/4.1.2-xml/docbook.cat +--- 4.1.2-xml/docbook.cat 2009-02-19 13:49:08.000000000 +0100 ++++ 4.1.2-xml/docbook.cat 2009-02-19 13:50:59.000000000 +0100 +@@ -41,25 +41,25 @@ PUBLIC "-//OASIS//ENTITIES DocBook XML C + -- ...................................................................... -- + -- ISO entity sets ...................................................... -- + +-PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN" "ent/iso-dia.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" "ent/iso-num.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN" "ent/iso-pub.ent" +-PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN" "ent/iso-tech.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "ent/iso-lat1.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN" "ent/iso-lat2.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN" "ent/iso-grk1.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN" "ent/iso-grk2.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN" "ent/iso-grk3.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" "ent/iso-grk4.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" "ent/iso-amsa.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" "ent/iso-amsb.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" "ent/iso-amsc.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" "ent/iso-amsn.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" "ent/iso-amso.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" "ent/iso-amsr.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN" "ent/iso-box.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN" "ent/iso-cyr1.ent" +-PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" "ent/iso-cyr2.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML" "ent/iso-dia.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" "ent/iso-num.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN//XML" "ent/iso-pub.ent" ++PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN//XML" "ent/iso-tech.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" "ent/iso-lat1.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" "ent/iso-lat2.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN//XML" "ent/iso-grk1.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" "ent/iso-grk2.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" "ent/iso-grk3.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" "ent/iso-grk4.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" "ent/iso-amsa.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" "ent/iso-amsb.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" "ent/iso-amsc.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" "ent/iso-amsn.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" "ent/iso-amso.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" "ent/iso-amsr.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML" "ent/iso-box.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" "ent/iso-cyr1.ent" ++PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" "ent/iso-cyr2.ent" + + -- End of catalog data for DocBook XML V4.1.2 ............................. -- + -- ...................................................................... -- diff --git a/SPECS/docbook-dtds/docbook-dtds.spec b/SPECS/docbook-dtds/docbook-dtds.spec new file mode 100644 index 00000000..4c38c982 --- /dev/null +++ b/SPECS/docbook-dtds/docbook-dtds.spec @@ -0,0 +1,450 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global openjadever 1.3.2 +%global version_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml} 4.{2,3,4,5}-rng 4.{2,3,4,5}-xsd" +%global catalog_list "{3,4}.{0,1}-sgml 4.1.2-xml 4.{2,3,4,5}-{sgml,xml}" +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + +Name: docbook-dtds +Version: 1.0 +Release: %autorelease +Summary: SGML and XML document type definitions for DocBook +License: LicenseRef-docbook-dtds +URL: https://www.oasis-open.org/docbook/ +#!RemoteAsset +Source0: https://www.oasis-open.org/docbook/sgml/3.0/docbk30.zip +#!RemoteAsset +Source1: https://www.oasis-open.org/docbook/sgml/3.1/docbk31.zip +#!RemoteAsset +Source2: https://www.oasis-open.org/docbook/sgml/4.0/docbk40.zip +#!RemoteAsset +Source3: https://www.oasis-open.org/docbook/sgml/4.1/docbk41.zip +#!RemoteAsset +Source4: https://www.oasis-open.org/docbook/xml/4.1.2/docbkx412.zip +#!RemoteAsset +Source5: https://www.oasis-open.org/docbook/sgml/4.2/docbook-4.2.zip +#!RemoteAsset +Source6: https://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip +#!RemoteAsset +Source7: https://www.docbook.org/sgml/4.3/docbook-4.3.zip +#!RemoteAsset +Source8: https://www.docbook.org/xml/4.3/docbook-xml-4.3.zip +#!RemoteAsset +Source9: https://www.docbook.org/sgml/4.4/docbook-4.4.zip +#!RemoteAsset +Source10: https://www.docbook.org/xml/4.4/docbook-xml-4.4.zip +#!RemoteAsset +Source11: https://www.docbook.org/sgml/4.5/docbook-4.5.zip +#!RemoteAsset +Source12: https://www.docbook.org/xml/4.5/docbook-xml-4.5.zip +#!RemoteAsset +Source13: https://www.docbook.org/rng/4.2/docbook-rng-4.2.zip +#!RemoteAsset +Source14: https://www.docbook.org/rng/4.3/docbook-rng-4.3.zip +#!RemoteAsset +Source15: https://www.docbook.org/rng/4.4/docbook-rng-4.4.zip +#!RemoteAsset +Source16: https://www.docbook.org/xsd/4.2/docbook-xsd-4.2.zip +#!RemoteAsset +Source17: https://www.docbook.org/xsd/4.3/docbook-xsd-4.3.zip +#!RemoteAsset +Source18: https://www.docbook.org/xsd/4.4/docbook-xsd-4.4.zip +# http://www.docbook.org/rng/4.5/ upstream archive unavailable +#!RemoteAsset +Source100: https://www.docbook.org/rng/4.5/calstblx.rnc +#!RemoteAsset +Source101: https://www.docbook.org/rng/4.5/calstblx.rng +#!RemoteAsset +Source102: https://www.docbook.org/rng/4.5/dbhierx.rnc +#!RemoteAsset +Source103: https://www.docbook.org/rng/4.5/dbhierx.rng +#!RemoteAsset +Source104: https://www.docbook.org/rng/4.5/dbnotnx.rnc +#!RemoteAsset +Source105: https://www.docbook.org/rng/4.5/dbnotnx.rng +#!RemoteAsset +Source106: https://www.docbook.org/rng/4.5/dbpoolx.rnc +#!RemoteAsset +Source107: https://www.docbook.org/rng/4.5/dbpoolx.rng +#!RemoteAsset +Source108: https://www.docbook.org/rng/4.5/docbook.rnc +#!RemoteAsset +Source109: https://www.docbook.org/rng/4.5/docbook.rng +#!RemoteAsset +Source110: https://www.docbook.org/rng/4.5/htmltblx.rnc +#!RemoteAsset +Source111: https://www.docbook.org/rng/4.5/htmltblx.rng +# http://www.docbook.org/xsd/4.5/ upstream archive unavailable +#!RemoteAsset +Source200: https://www.docbook.org/xsd/4.5/calstblx.xsd +#!RemoteAsset +Source201: https://www.docbook.org/xsd/4.5/dbhierx.xsd +#!RemoteAsset +Source202: https://www.docbook.org/xsd/4.5/dbnotnx.xsd +#!RemoteAsset +Source203: https://www.docbook.org/xsd/4.5/dbpoolx.xsd +#!RemoteAsset +Source204: https://www.docbook.org/xsd/4.5/docbook.xsd +#!RemoteAsset +Source205: https://www.docbook.org/xsd/4.5/htmltblx.xsd +#!RemoteAsset +Source206: https://www.docbook.org/xsd/4.5/xml.xsd +BuildArch: noarch + +BuildRequires: unzip + +Requires(post): %{_bindir}/xmlcatalog +Requires(postun): %{_bindir}/xmlcatalog +Requires(post): %{_bindir}/chmod +Requires(post): sed +Requires(postun): sed +Requires: sgml-common +Requires: xml-common + +Provides: docbook-dtd-xml = %{version}-%{release} +Provides: docbook-dtd-sgml = %{version}-%{release} +Provides: docbook-dtd30-sgml = %{version}-%{release} +Provides: docbook-dtd31-sgml = %{version}-%{release} +Provides: docbook-dtd40-sgml = %{version}-%{release} +Provides: docbook-dtd41-sgml = %{version}-%{release} +Provides: docbook-dtd412-xml = %{version}-%{release} +Provides: docbook-dtd42-sgml = %{version}-%{release} +Provides: docbook-dtd42-xml = %{version}-%{release} +Provides: docbook-dtd43-sgml = %{version}-%{release} +Provides: docbook-dtd43-xml = %{version}-%{release} +Provides: docbook-dtd44-sgml = %{version}-%{release} +Provides: docbook-dtd44-xml = %{version}-%{release} +Provides: docbook-dtd45-sgml = %{version}-%{release} +Provides: docbook-dtd45-xml = %{version}-%{release} + +%patchlist +# Fix old catalog files +0001-docbook-dtd30-sgml-1.0.catalog.patch +0002-docbook-dtd31-sgml-1.0.catalog.patch +0003-docbook-dtd40-sgml-1.0.catalog.patch +0004-docbook-dtd41-sgml-1.0.catalog.patch +0005-docbook-dtd42-sgml-1.0.catalog.patch +# Fix euro sign in 4.2 dtds +0006-docbook-4.2-euro.patch +# Fix ISO entities in 4.3/4.4/4.5 SGML +0007-docbook-dtds-ents.patch +# Use system rewrite for web URL's in sgml catalogs to prevent reading from the network +0008-docbook-sgml-systemrewrite.patch +# Use XML at the end of public identificators of XML 4.1.2 ISO entities +0009-docbook-dtd412-entities.patch + +%description +The DocBook Document Type Definition (DTD) describes the syntax of +technical documentation texts (articles, books and manual pages). +This syntax is XML-compliant and is developed by the OASIS consortium. +This package contains SGML and XML versions of the DocBook DTD. + +%prep +%setup -c -T +eval mkdir %{version_list} + +unzip %{SOURCE0} -d 3.0-sgml +unzip %{SOURCE1} -d 3.1-sgml +unzip %{SOURCE2} -d 4.0-sgml +unzip %{SOURCE3} -d 4.1-sgml +unzip %{SOURCE4} -d 4.1.2-xml +unzip %{SOURCE5} -d 4.2-sgml +unzip %{SOURCE6} -d 4.2-xml +unzip %{SOURCE7} -d 4.3-sgml +unzip %{SOURCE8} -d 4.3-xml +unzip %{SOURCE9} -d 4.4-sgml +unzip %{SOURCE10} -d 4.4-xml +unzip %{SOURCE11} -d 4.5-sgml +unzip %{SOURCE12} -d 4.5-xml +unzip %{SOURCE13} -d 4.2-rng +unzip %{SOURCE14} -d 4.3-rng +unzip %{SOURCE15} -d 4.4-rng +unzip %{SOURCE16} -d 4.2-xsd +unzip %{SOURCE17} -d 4.3-xsd +unzip %{SOURCE18} -d 4.4-xsd +# No upstream archive for 4.5 rng, download individual files +cp %{SOURCE100} %{SOURCE101} %{SOURCE102} \ + %{SOURCE103} %{SOURCE104} %{SOURCE105} \ + %{SOURCE106} %{SOURCE107} %{SOURCE108} \ + %{SOURCE109} %{SOURCE110} %{SOURCE111} 4.5-rng/ +# No upstream archive for 4.5 xsd, download individual files +cp %{SOURCE200} %{SOURCE201} %{SOURCE202} \ + %{SOURCE203} %{SOURCE204} %{SOURCE205} \ + %{SOURCE206} 4.5-xsd/ + +# Apply patches +%patch -P 0 -p0 +%patch -P 1 -p0 +%patch -P 2 -p0 +%patch -P 3 -p0 +%patch -P 4 -p0 +%patch -P 5 -p0 +%patch -P 6 -p0 +%patch -P 7 -p0 +%patch -P 8 -p0 + +# Increase NAMELEN +sed -e's,\(NAMELEN\s\+\)44\(\s\*\)\?,\1256,' -i.namelen */docbook.dcl + +# Fix of \r\n issue from rpmlint +sed -i 's/\r//' */*.txt + +if [ `id -u` -eq 0 ]; then + %{_bindir}/chown -R root:root . + %{_bindir}/chmod -R a+rX,g-w,o-w . +fi + +%build +# Nothing to do + +%install +# Creating a directory for SGML +eval mkdir -p %{buildroot}/etc/sgml + +# Loop through sgml and xml formats +for fmt in sgml xml; do + # Creating symbolic links for docbook catalog files + ln -s $fmt-docbook-4.5.cat %{buildroot}/etc/sgml/$fmt-docbook.cat +done + +# Loop through different versions of docbook +eval set %{version_list} +for dir in $@; do + pushd $dir + fmt=${dir#*-} ver=${dir%%-*} # Formatting and versioning + + # Directory paths for different formats + case $fmt in + sgml|xml) DESTDIR=%{buildroot}/usr/share/sgml/docbook/$fmt-dtd-$ver ;; + rng|xsd) DESTDIR=%{buildroot}/usr/share/sgml/docbook/$fmt-$ver ;; + esac + + # Installing files to the corresponding directories + case $fmt in + sgml) mkdir -p $DESTDIR ; install *.dcl $DESTDIR ;; + xml) mkdir -p $DESTDIR/ent ; install ent/* $DESTDIR/ent ;; + rng) mkdir -p $DESTDIR ; install *.r* $DESTDIR ;; + xsd) mkdir -p $DESTDIR ; install *.xsd $DESTDIR;; + esac + popd +done + +# Loop through different catalog versions +eval set %{catalog_list} +for dir in $@; do + pushd $dir + fmt=${dir#*-} ver=${dir%%-*} # Formatting and versioning + DESTDIR=%{buildroot}/usr/share/sgml/docbook/$fmt-dtd-$ver + + # Installing dtd and mod files, along with the catalog file + install *.dtd *.mod $DESTDIR + install docbook.cat $DESTDIR/catalog + popd + + # Creating ghost file for each format-version pair + touch %{buildroot}/etc/sgml/$fmt-docbook-$ver.cat +done + +# Workaround for missing support for --parents in rpm 4.11+ +mkdir -p %{buildroot}%{_pkgdocdir} + +# Copying text, ChangeLog, and README files to pkgdocdir with their parent directories +for i in */*.txt */ChangeLog */README; do + cp -pr --parents $i %{buildroot}%{_pkgdocdir} +done + +%post +catcmd='/usr/bin/xmlcatalog --noout' +xmlcatalog=%{_datadir}/sgml/docbook/xmlcatalog + +# Clean up pre-docbook-dtds mess caused by broken trigger. +for v in 3.0 3.1 4.0 4.1 4.2 4.3 4.4 4.5 +do + if [ -f %{_sysconfdir}/sgml/sgml-docbook-$v.cat ] + then + $catcmd --sgml --del %{_sysconfdir}/sgml/sgml-docbook-$v.cat \ + %{_datadir}/sgml/openjade-%{openjadever}/catalog 2>/dev/null + fi +done + +# The STYLESHEETS/catalog command is for the case in which the style sheets +# were installed after another DTD but before this DTD +for STYLESHEETS in %{_datadir}/sgml/docbook/dsssl-stylesheets-*; do : ; done +case $STYLESHEETS in + *-"*") STYLESHEETS= ;; +esac +eval set %{catalog_list} +for dir +do + fmt=${dir#*-} ver=${dir%%-*} + sgmldir=%{_datadir}/sgml/docbook/$fmt-dtd-$ver + # SGML catalog + # Update the centralized catalog corresponding to this version of the DTD + for cat_dir in %{_datadir}/sgml/sgml-iso-entities-8879.1986 $sgmldir $STYLESHEETS; do + $catcmd --sgml --add %{_sysconfdir}/sgml/$fmt-docbook-$ver.cat $cat_dir/catalog + done + # XML catalog + if [ $fmt = xml -a -w $xmlcatalog ]; then + while read f desc; do + case $ver in 4.[45]) f=${f/-/} ;; esac + $catcmd --add public "$desc" $sgmldir/$f $xmlcatalog + done < +# Fix up SGML super catalog so that there isn't an XML DTD before an +# SGML one. We need to do this (*sigh*) because xmlcatalog messes up +# the order of the lines, and SGML tools don't like to see XML things +# they aren't expecting. +# +# But the code that followed just found the first XML DTD and the first +# SGML DTD, swappinmg these two lines if the XML one preceded. +# But that only ensures that there is an SGML DTD before all XML ones. +# No one complained, so either this was enough, or the buggy SGML tools +# are long dead, or their users do not use bugzilla. +# Anyway, the following code, introduced in 1.0-46, does better: it ensures +# that all XML DTDs are after all SGML ones, by moving them to the end. +sed -ni ' + /xml-docbook/ H + /xml-docbook/ !p + $ { + g + s/^\n//p + } + ' %{_sysconfdir}/sgml/catalog + +# Finally, make sure everything in /etc/sgml is readable! +%{_bindir}/chmod a+r %{_sysconfdir}/sgml/* + +%postun +# Remove entries only on removal of package +if [ "$1" = 0 ]; then + catcmd='%{_bindir}/xmlcatalog --noout' + xmlcatalog=%{_datadir}/sgml/docbook/xmlcatalog + entities=" +ent/iso-pub.ent +ent/iso-grk1.ent +dbpoolx.mod +ent/iso-box.ent +docbookx.dtd +ent/iso-grk3.ent +ent/iso-amsn.ent +ent/iso-num.ent +dbcentx.mod +ent/iso-grk4.ent +dbnotnx.mod +ent/iso-dia.ent +ent/iso-grk2.ent +dbgenent.mod +dbhierx.mod +ent/iso-amsa.ent +ent/iso-amso.ent +ent/iso-cyr1.ent +ent/iso-tech.ent +ent/iso-amsc.ent +soextblx.dtd +calstblx.dtd +ent/iso-lat1.ent +ent/iso-amsb.ent +ent/iso-lat2.ent +ent/iso-amsr.ent +ent/iso-cyr2.ent + " + eval set %{catalog_list} + for dir + do + fmt=${dir#*-} ver=${dir%%-*} + sgmldir=%{_datadir}/sgml/docbook/$fmt-dtd-$ver + ## SGML catalog + # Update the centralized catalog corresponding to this version of the DTD + $catcmd --sgml --del %{_sysconfdir}/sgml/catalog %{_sysconfdir}/sgml/$fmt-docbook-$ver.cat >/dev/null + rm -f %{_sysconfdir}/sgml/$fmt-docbook-$ver.cat + ## XML catalog + if [ $fmt = xml -a -w $xmlcatalog ]; then + for f in $entities; do + case $ver in 4.[45]) f=${f/-/} ;; esac + $catcmd --del $sgmldir/$f $xmlcatalog >/dev/null + done + $catcmd --del $sgmldir $xmlcatalog >/dev/null + fi + done + + # See the comment attached to this command in the %%post scriptlet. + sed -ni ' + /xml-docbook/ H + /xml-docbook/ !p + $ { + g + s/^\n//p + } + ' %{_sysconfdir}/sgml/catalog +fi + +%triggerin -- openjade >= %{openjadever} +eval set %{catalog_list} +for dir +do + fmt=${dir#*-} ver=${dir%%-*} + %{_bindir}/xmlcatalog --sgml --noout --add %{_sysconfdir}/sgml/$fmt-docbook-$ver.cat \ + %{_datadir}/sgml/openjade-%{openjadever}/catalog +done + +%triggerun -- openjade >= %{openjadever} +[ $2 = 0 ] || exit 0 +eval set %{catalog_list} +for dir +do + fmt=${dir#*-} ver=${dir%%-*} + %{_bindir}/xmlcatalog --sgml --noout --del %{_sysconfdir}/sgml/$fmt-docbook-$ver.cat \ + %{_datadir}/sgml/openjade-%{openjadever}/catalog +done + +%files +%doc %{_pkgdocdir} +%{_datadir}/sgml/docbook/*ml-dtd-* +%{_datadir}/sgml/docbook/rng-* +%{_datadir}/sgml/docbook/xsd-* +%config(noreplace) %{_sysconfdir}/sgml/*ml-docbook.cat +%ghost %config(noreplace) %{_sysconfdir}/sgml/*ml-docbook-*.cat + +%changelog +%{?autochangelog} diff --git a/SPECS/docbook-style-dsssl/docbook-style-dsssl.Makefile b/SPECS/docbook-style-dsssl/docbook-style-dsssl.Makefile new file mode 100644 index 00000000..af1a1fb1 --- /dev/null +++ b/SPECS/docbook-style-dsssl/docbook-style-dsssl.Makefile @@ -0,0 +1,51 @@ +BINDIR = /usr/bin +DESTDIR = /usr/share/sgml/docbook/dsssl-stylesheets-1.74b +MANDIR= /usr/share/man + +all: install + +install: install-bin install-dtd install-dsl install-img install-misc install-man + +install-bin: + mkdir -p $(BINDIR) + install -p bin/collateindex.pl $(BINDIR) + +install-man: + mkdir -p $(MANDIR)/man1 + install -m 644 -p bin/collateindex.pl.1 $(MANDIR)/man1 + +install-dtd: + mkdir -p $(DESTDIR)/dtds/{decls,dbdsssl,html,imagelib,olink} + cp -p dtds/decls/docbook.dcl $(DESTDIR)/dtds/decls + cp -p dtds/decls/xml.dcl $(DESTDIR)/dtds/decls + cp -p dtds/dbdsssl/dbdsssl.dtd $(DESTDIR)/dtds/dbdsssl + cp -p dtds/html/dbhtml.dtd $(DESTDIR)/dtds/html + cp -p dtds/html/ISOlat1.gml $(DESTDIR)/dtds/html + cp -p dtds/imagelib/imagelib.dtd $(DESTDIR)/dtds/imagelib + cp -p dtds/olink/olinksum.dtd $(DESTDIR)/dtds/olink + +install-dsl: + mkdir -p $(DESTDIR)/{lib,common,html,print,olink} + cp -p lib/dblib.dsl $(DESTDIR)/lib + cp -p common/*.dsl $(DESTDIR)/common + cp -p common/*.ent $(DESTDIR)/common + cp -p html/*.dsl $(DESTDIR)/html + cp -p lib/dblib.dsl $(DESTDIR)/lib + cp -p print/*.dsl $(DESTDIR)/print + cp -p olink/*.dsl $(DESTDIR)/olink + +install-img: + mkdir -p $(DESTDIR)/images/callouts + cp -p images/*.gif $(DESTDIR)/images + cp -p images/callouts/*.gif $(DESTDIR)/images/callouts + +#install-test: +# mkdir -p $(DESTDIR)/test/{cases,imagelib,xml} +# cp test/*.* $(DESTDIR)/test +# cp test/cases/*.* $(DESTDIR)/test/cases +# cp test/imagelib/*.* $(DESTDIR)/test/imagelib +# cp test/xml/*.* $(DESTDIR)/test/xml + +install-misc: + cp -p catalog $(DESTDIR) + cp -p VERSION $(DESTDIR) diff --git a/SPECS/docbook-style-dsssl/docbook-style-dsssl.spec b/SPECS/docbook-style-dsssl/docbook-style-dsssl.spec new file mode 100644 index 00000000..74e4d849 --- /dev/null +++ b/SPECS/docbook-style-dsssl/docbook-style-dsssl.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: docbook-style-dsssl +Version: 1.79 +Release: %autorelease +Summary: Norman Walsh's modular stylesheets for DocBook +License: LicenseRef-DMIT +URL: http://docbook.sourceforge.net/ +#!RemoteAsset +Source0: http://prdownloads.sourceforge.net/docbook/docbook-dsssl-%{version}.tar.gz +Source1: %{name}.Makefile +BuildArch: noarch + +BuildRequires: perl +BuildRequires: make + +Requires: docbook-dtds +Requires: openjade +Requires: sgml-common +Requires(post): sgml-common +Requires(preun): sgml-common + +%description +These DSSSL stylesheets allow to convert any DocBook document to another +printed (for example, RTF or PostScript) or online (for example, HTML) format. +They are highly customizable. + +%prep +%setup -q -n docbook-dsssl-%{version} +cp %{SOURCE1} Makefile + +%build + +%install +DESTDIR=$RPM_BUILD_ROOT +make install BINDIR=$DESTDIR/usr/bin DESTDIR=$DESTDIR/usr/share/sgml/docbook/dsssl-stylesheets-%{version} MANDIR=$DESTDIR%{_mandir} +cd .. +ln -s dsssl-stylesheets-%{version} $DESTDIR/usr/share/sgml/docbook/dsssl-stylesheets + +%post +for centralized in /etc/sgml/*-docbook-*.cat +do + /usr/bin/install-catalog --add $centralized \ + /usr/share/sgml/docbook/dsssl-stylesheets-%{version}/catalog \ + > /dev/null 2>/dev/null +done + +%preun +if [ "$1" = "0" ]; then + for centralized in /etc/sgml/*-docbook-*.cat + do + /usr/bin/install-catalog --remove $centralized /usr/share/sgml/docbook/dsssl-stylesheets-%{version}/catalog > /dev/null 2>/dev/null + done +fi +exit 0 + +%files +%doc BUGS README ChangeLog WhatsNew +%{_bindir}/collateindex.pl +%{_mandir}/man1/collateindex.pl.1* +%{_datadir}/sgml/docbook/dsssl-stylesheets-%{version} +%{_datadir}/sgml/docbook/dsssl-stylesheets + +%changelog +%{?autochangelog} diff --git a/SPECS/docbook-utils/docbook-utils.spec b/SPECS/docbook-utils/docbook-utils.spec new file mode 100644 index 00000000..e1fa34bf --- /dev/null +++ b/SPECS/docbook-utils/docbook-utils.spec @@ -0,0 +1,135 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# I know this does not work but we don't have texlive yet +# So we disable & exclude anything related to pdf for now +# Change to 1 to enable building pdf related - 251 +%bcond pdf 0 + +Name: docbook-utils +Version: 0.6.15 +Release: %autorelease +Summary: Shell scripts for managing DocBook documents +License: GPL-2.0-or-later +URL: https://github.com/devexp-db/docbook-utils +#!RemoteAsset +Source0: https://github.com/devexp-db/docbook-utils/releases/download/v%{version}/docbook-utils-%{version}.tar.xz +BuildArch: noarch +BuildSystem: autotools + +BuildRequires: make +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: perl-SGMLSpm +BuildRequires: sgml-common +BuildRequires: openjade +BuildRequires: docbook-style-dsssl + +Requires: docbook-style-dsssl +Requires: docbook-dtds +Requires: perl-SGMLSpm +Requires: openjade + +%description +This package contains scripts are for easy conversion from DocBook +files to other formats (for example, HTML, RTF, and PostScript), and +for comparing SGML files. + +%if %{with pdf} +%package pdf +Requires: texlive-jadetex >= 7 +Requires: docbook-utils = %{version} +Requires: tex(dvips) +Requires: texlive-collection-fontsrecommended +Requires: texlive-collection-htmlxml +License: GPL-1.0-or-later +Obsoletes: stylesheets-db2pdf <= %{version}-%{release} +Provides: stylesheets-db2pdf = %{version}-%{release} +Summary: A script for converting DocBook documents to PDF format +URL: http://sources.redhat.com/docbook-tools/ + +%description pdf +This package contains a script for converting DocBook documents to +PDF format. +%endif + +%conf +# We need to write our own configure +./configure --prefix=%{_prefix} --mandir=%{_mandir} --libdir=%{_libdir} + +%install +export DESTDIR=$RPM_BUILD_ROOT +%make_install prefix=%{_prefix} mandir=%{_mandir} docdir=/tmp +for util in html rtf; do + ln -s docbook2$util %{buildroot}%{_bindir}/db2$util + ln -s jw.1.gz %{buildroot}%{_mandir}/man1/db2$util.1 +done + +%if %{with pdf} +for util in dvi pdf ps; do + ln -s docbook2$util %{buildroot}%{_bindir}/db2$util + ln -s jw.1.gz %{buildroot}%{_mandir}/man1/db2$util.1 +done +%endif + +ln -s jw.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/docbook2txt.1 + +rm -rf $RPM_BUILD_ROOT/tmp + +%files +%doc README COPYING TODO +%{_bindir}/jw +%{_bindir}/docbook2html +%{_bindir}/docbook2man +%{_bindir}/docbook2rtf +%{_bindir}/docbook2tex +%{_bindir}/docbook2texi +%{_bindir}/docbook2txt +%attr(0755,root,root) %{_bindir}/db2html +%{_bindir}/db2rtf +%{_bindir}/sgmldiff +%{_datadir}/sgml/docbook/utils-%{version} +%{_mandir}/*/db2html.* +%{_mandir}/*/db2rtf.* +%{_mandir}/*/docbook2html.* +%{_mandir}/*/docbook2rtf.* +%{_mandir}/*/docbook2man.* +%{_mandir}/*/docbook2tex.* +%{_mandir}/*/docbook2texi.* +%{_mandir}/*/docbook2txt.* +%{_mandir}/*/jw.* +%{_mandir}/*/sgmldiff.* +%{_mandir}/*/*-spec.* +# TODO: read the beginning of the file for explanation - 251 +#{_mandir}/*/db2dvi.* +#{_mandir}/*/db2ps.* +%if %{without pdf} +%exclude %{_bindir}/docbook2pdf +%exclude %{_bindir}/docbook2dvi +%exclude %{_bindir}/docbook2ps +%exclude %{_mandir}/*/docbook2pdf.* +%exclude %{_mandir}/*/docbook2dvi.* +%exclude %{_mandir}/*/docbook2ps.* +%endif + +%if %{with pdf} +%files pdf +%{_bindir}/docbook2pdf +%{_bindir}/docbook2dvi +%{_bindir}/docbook2ps +%{_bindir}/db2dvi +%{_bindir}/db2pdf +%{_bindir}/db2ps +%{_mandir}/*/db2pdf.* +%{_mandir}/*/docbook2pdf.* +%{_mandir}/*/docbook2dvi.* +%{_mandir}/*/docbook2ps.* +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/docbook-xsl/docbook-xsl.Makefile b/SPECS/docbook-xsl/docbook-xsl.Makefile new file mode 100644 index 00000000..281656de --- /dev/null +++ b/SPECS/docbook-xsl/docbook-xsl.Makefile @@ -0,0 +1,52 @@ +BINDIR = /usr/bin +DESTDIR = ..overridden in spec file.. + +all: install + +install: install-xsl install-img install-extensions install-misc install-epub + +install-xsl: + mkdir -p $(DESTDIR)/{common,eclipse,fo,html,htmlhelp/doc,javahelp,lib,template,xhtml,xhtml-1_1,manpages,profiling,highlighting,roundtrip,website} + cp common/*.dtd $(DESTDIR)/common + cp common/*.ent $(DESTDIR)/common + cp common/*.xml $(DESTDIR)/common + cp common/*.xsl $(DESTDIR)/common + cp eclipse/*.xsl $(DESTDIR)/eclipse + cp fo/*.xml $(DESTDIR)/fo + cp fo/*.xsl $(DESTDIR)/fo + cp html/*.xml $(DESTDIR)/html + cp html/*.xsl $(DESTDIR)/html + cp htmlhelp/*.xsl $(DESTDIR)/htmlhelp + cp javahelp/*.xsl $(DESTDIR)/javahelp + cp lib/*.xsl $(DESTDIR)/lib + cp template/*.xsl $(DESTDIR)/template + cp xhtml/*.xsl $(DESTDIR)/xhtml + cp xhtml-1_1/*.xsl $(DESTDIR)/xhtml-1_1 + cp manpages/*.xsl $(DESTDIR)/manpages + cp profiling/*.xsl $(DESTDIR)/profiling + cp highlighting/*.xml $(DESTDIR)/highlighting + cp highlighting/*.xsl $(DESTDIR)/highlighting + cp roundtrip/*.xml $(DESTDIR)/roundtrip + cp roundtrip/*.xsl $(DESTDIR)/roundtrip + cp roundtrip/*.dtd $(DESTDIR)/roundtrip + cp website/*.xsl $(DESTDIR)/website + +install-img: + mkdir -p $(DESTDIR)/images/callouts + cp images/*.gif $(DESTDIR)/images + cp images/*.png $(DESTDIR)/images + cp images/*.svg $(DESTDIR)/images + cp images/callouts/*.png $(DESTDIR)/images/callouts + cp images/callouts/*.gif $(DESTDIR)/images/callouts + cp images/callouts/*.svg $(DESTDIR)/images/callouts + +install-extensions: + mkdir -p $(DESTDIR)/extensions + cp -r extensions/* $(DESTDIR)/extensions + +install-epub: + mkdir -p $(DESTDIR)/epub + cp -r epub/* ${DESTDIR}/epub + +install-misc: + cp VERSION $(DESTDIR) diff --git a/SPECS/docbook-xsl/docbook-xsl.spec b/SPECS/docbook-xsl/docbook-xsl.spec new file mode 100644 index 00000000..cf46ef63 --- /dev/null +++ b/SPECS/docbook-xsl/docbook-xsl.spec @@ -0,0 +1,169 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: docbook-xsl +Version: 1.79.2 +Release: %autorelease +Summary: Norman Walsh's XSL stylesheets for DocBook XML & DocBook 5.X +License: LicenseRef-DMIT AND MIT AND MPL-1.1 +URL: https://github.com/docbook/xslt10-stylesheets +#!RemoteAsset +Source0: %{url}/releases/download/release/%{version}/docbook-xsl-%{version}.tar.bz2 +#!RemoteAsset +Source1: %{url}/releases/download/release/%{version}/docbook-xsl-doc-%{version}.tar.bz2 +# Build Script for convienience +Source2: %{name}.Makefile +BuildArch: noarch + +# For compatibility +Provides: docbook-xsl-ns + +Requires: xml-common +Requires(post): libxml2 +Requires(postun): libxml2 + +%description +These XSL stylesheets allow you to transform any DocBook XML document or +DocBook 5 document to other formats, such as HTML, FO, and XHMTL. They +are highly customizable. For more information see W3C page about XSL. + +%prep +%setup -c -T -n docbook-xsl-%{version} +tar jxf %{SOURCE0} +mv docbook-xsl-%{version}/* . +pushd .. +tar jxf %{SOURCE1} +popd + +# Remove .gitignore files +rm -rf $(find -name '.gitignore' -type f) + +# Remove ant buildsystem +find . -name build.xml -delete + +# Remove binary JAR files +rm -f extensions/*.jar +rm -fr tools/ + +# Make ruby scripts executable +chmod +x epub/bin/dbtoepub + +# Remove misc +rm slides/slidy/scripts/slidy.js.gz +rm roundtrip/template.dot + +# Copy our Makefile +cp -p %{SOURCE2} Makefile + +# fix of non UTF-8 files rpmlint warnings +for fhtml in $(find ./doc -name '*.html' -type f) +do + iconv -f ISO-8859-1 -t UTF-8 "$fhtml" -o "$fhtml".tmp + mv -f "$fhtml".tmp "$fhtml" + sed -i 's/charset=ISO-8859-1/charset=UTF-8/' "$fhtml" +done + +for f in $(find -name "*'*") +do + mv -v "$f" $(echo "$f" | tr -d "'") +done + +%build +# No build for ya + +%install +# Version 4 +make install BINDIR=%{buildroot}%{_bindir} DESTDIR=%{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version} +cp -a VERSION.xsl %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}/VERSION.xsl +ln -s xsl-stylesheets-%{version} \ + %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets +# Don't ship the extensions +rm -rf %{buildroot}%{_datadir}/sgml/docbook/xsl-stylesheets/extensions/* +# Version 5 +mkdir -p %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version} +cp -a [[:lower:]]* %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/ +cp -a VERSION %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/VERSION.xsl +ln -s VERSION.xsl \ +%{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}/VERSION +ln -s xsl-ns-stylesheets-%{version} \ + %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets +# Don't ship install shell script. +rm -rf %{buildroot}%{_datadir}/sgml/docbook/xsl-ns-stylesheets/install.sh + +%post +CATALOG=%{_sysconfdir}/xml/catalog +# Version 4 +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://cdn.docbook.org/release/xsl-nons/%{version}" \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://cdn.docbook.org/release/xsl-nons/%{version}" \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://cdn.docbook.org/release/xsl-nons/current/" \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://cdn.docbook.org/release/xsl-nons/current/" \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +#keep the old one sourceforge URIs at least temporarily +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl/current" \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl/current" \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +# Version 5 +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://cdn.docbook.org/release/xsl/%{version}" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://cdn.docbook.org/release/xsl/%{version}" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://cdn.docbook.org/release/xsl/current/" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://cdn.docbook.org/release/xsl/current/" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG + +%{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl-ns/current" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +%{_bindir}/xmlcatalog --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl-ns/current" \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG + +%postun +# Version 4 +# remove entries only on removal of package +if [ "$1" = 0 ]; then + CATALOG=%{_sysconfdir}/xml/catalog + %{_bindir}/xmlcatalog --noout --del \ + "file://%{_datadir}/sgml/docbook/xsl-stylesheets-%{version}" $CATALOG +fi +# Version 5 +# remove entries only on removal of package +if [ "$1" = 0 ]; then + CATALOG=%{_sysconfdir}/xml/catalog + %{_bindir}/xmlcatalog --noout --del \ + "file://%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version}" $CATALOG +fi + +%files +%doc BUGS +%doc README COPYING +%doc TODO NEWS +%doc RELEASE-NOTES.* +# Version 4 +%{_datadir}/sgml/docbook/xsl-stylesheets-%{version} +%{_datadir}/sgml/docbook/xsl-stylesheets +# Version 5 +%{_datadir}/sgml/docbook/xsl-ns-stylesheets-%{version} +%{_datadir}/sgml/docbook/xsl-ns-stylesheets + +%changelog +%{?autochangelog} diff --git a/SPECS/doctest/doctest.spec b/SPECS/doctest/doctest.spec new file mode 100644 index 00000000..23b712e8 --- /dev/null +++ b/SPECS/doctest/doctest.spec @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: doctest +Version: 2.4.12 +Release: %autorelease +Summary: C++ test framework +License: MIT +URL: https://github.com/doctest/doctest +#!RemoteAsset +Source0: https://github.com/doctest/doctest/archive/refs/tags/v%{version}.tar.gz +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildSystem: cmake + +%description +doctest is a single-header testing framework for C++11 and later. It +has been designed to be fast, light and unintrusive. + +%files +%license LICENSE.txt +%doc README.md +%{_includedir}/doctest/*.h +%{_includedir}/doctest/extensions/*.h +%{_libdir}/cmake/doctest/*.cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/dos2unix/dos2unix.spec b/SPECS/dos2unix/dos2unix.spec new file mode 100644 index 00000000..0914c31b --- /dev/null +++ b/SPECS/dos2unix/dos2unix.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dos2unix +Version: 7.5.3 +Release: %autorelease +Summary: Text file format converters +License: BSD-3-Clause +URL: https://waterlan.home.xs4all.nl/dos2unix.html +#!RemoteAsset +Source: https://waterlan.home.xs4all.nl/dos2unix/dos2unix-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): LDFLAGS="%{build_ldflags}" prefix=%{_prefix} +BuildOption(install): prefix=%{_prefix} + +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: make +Provides: unix2dos = %{version} + +%description +Convert text files with DOS or Mac line endings to Unix line endings and +vice versa. + +# No configure +%conf + +%install -a +# We add doc files manually to %%doc +rm -rf %{buildroot}%{_docdir} + +%find_lang %{name} --with-man --all-name --generate-subpackages + +%files +%license COPYING.txt +%doc ChangeLog.txt NEWS.txt README.txt TODO.txt +%{_bindir}/dos2unix +%{_bindir}/mac2unix +%{_bindir}/unix2dos +%{_bindir}/unix2mac +%{_mandir}/man1/*.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/dosfstools/0001-Fix-vasprintf-implementation.patch b/SPECS/dosfstools/0001-Fix-vasprintf-implementation.patch new file mode 100644 index 00000000..4d3d2bf8 --- /dev/null +++ b/SPECS/dosfstools/0001-Fix-vasprintf-implementation.patch @@ -0,0 +1,27 @@ +From 5564db86e9c082ef6d0f26cb23c92a0bcdc2b14a Mon Sep 17 00:00:00 2001 +From: wuyifeng +Date: Wed, 31 Jul 2024 15:17:04 +0800 +Subject: [PATCH] Fix vasprintf implementation + +A va_copy call must be followed by a va_end call. +--- + src/common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common.c b/src/common.c +index 6a2e396..c33cbea 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -123,8 +123,8 @@ static int vasprintf(char **strp, const char *fmt, va_list va) + va_list vacopy; + + va_copy(vacopy, va); +- + length = vsnprintf(NULL, 0, fmt, vacopy); ++ va_end(vacopy); + if (length < 0) + return length; + +-- +2.33.0 + diff --git a/SPECS/dosfstools/dosfstools.spec b/SPECS/dosfstools/dosfstools.spec new file mode 100644 index 00000000..fc3bd4a0 --- /dev/null +++ b/SPECS/dosfstools/dosfstools.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dosfstools +Version: 4.2 +Release: %autorelease +Summary: FAT file system userspace tools +License: GPLv3+ +URL: https://github.com/dosfstools/dosfstools +#!RemoteAsset +Source: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools +Patch: 0001-Fix-vasprintf-implementation.patch +BuildOption(conf): --enable-compat-symlinks + +BuildOption(build): CFLAGS="%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing" + + +BuildRequires: gcc autoconf automake + +%description +The dosfstools package contains programs mkfs.fat, fsck.fat and fatlabel to +create, check and label FAT family file systems. + +%files +%doc %{_docdir}/%{name} +%license COPYING +%{_sbindir}/* +%{_mandir}/man8/* + +%changelog +%{?autochangelog} diff --git a/SPECS/double-conversion/double-conversion.spec b/SPECS/double-conversion/double-conversion.spec new file mode 100644 index 00000000..6f9f1392 --- /dev/null +++ b/SPECS/double-conversion/double-conversion.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: double-conversion +Version: 3.3.1 +Release: %autorelease +Summary: Library for binary-decimal conversions of IEEE doubles +License: BSD-3-Clause +URL: https://github.com/google/double-conversion +#!RemoteAsset +Source: https://github.com/google/double-conversion/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DBUILD_TESTING:BOOL=ON +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: cmake + +%description +Provides binary-decimal and decimal-binary routines for IEEE doubles. +The library consists of efficient conversion routines that have been +extracted from the V8 JavaScript engine. + +%package devel +Summary: Development files for the %{name} library +Requires: %{name} = %{version} + +%description devel +Contains header files and CMake configuration for developing applications +that use the double-conversion library. + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md AUTHORS Changelog +%{_libdir}/libdouble-conversion.so.3 +%{_libdir}/libdouble-conversion.so.3.* + +%files devel +%{_libdir}/libdouble-conversion.so +%dir %{_libdir}/cmake/double-conversion +%{_libdir}/cmake/double-conversion/* +%{_includedir}/double-conversion/ + +%changelog +%{?autochangelog} diff --git a/SPECS/doxygen/doxygen-no-lowercase-man-names.patch b/SPECS/doxygen/doxygen-no-lowercase-man-names.patch new file mode 100644 index 00000000..4eaafa2a --- /dev/null +++ b/SPECS/doxygen/doxygen-no-lowercase-man-names.patch @@ -0,0 +1,12 @@ +Index: doxygen-1.10.0/src/fortranscanner.l +=================================================================== +--- doxygen-1.10.0.orig/src/fortranscanner.l ++++ doxygen-1.10.0/src/fortranscanner.l +@@ -2697,7 +2697,6 @@ static void initEntry(yyscan_t yyscanner + static void addCurrentEntry(yyscan_t yyscanner,bool case_insens) + { + struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; +- if (case_insens) yyextra->current->name = yyextra->current->name.lower(); + //printf("===Adding entry %s to %s\n", qPrint(yyextra->current->name), qPrint(yyextra->current_root->name)); + yyextra->last_entry = yyextra->current; + yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current); diff --git a/SPECS/doxygen/doxygen.spec b/SPECS/doxygen/doxygen.spec new file mode 100644 index 00000000..3c749cfd --- /dev/null +++ b/SPECS/doxygen/doxygen.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: doxygen +Version: 1.13.2 +Release: %autorelease +Summary: Automated C, C++, and Java Documentation Generator +# qtools are used for building and they are GPL-3.0 licensed +License: GPL-2.0-or-later +URL: https://www.doxygen.nl/ +#!RemoteAsset +Source0: https://www.doxygen.nl/files/doxygen-%{version}.src.tar.gz +Patch1: doxygen-no-lowercase-man-names.patch +Patch2: reproducible.patch +BuildRequires: bison +BuildRequires: cmake >= 3.14 +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: python3 +BuildSystem: cmake + +BuildOption(conf): -Dbuild_doc=OFF +BuildOption(conf): -Dbuild_search=OFF +BuildOption(conf): -Dbuild_wizard=OFF +BuildOption(conf): -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" +BuildOption(conf): -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" +BuildOption(conf): -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,relro,-z,now" +BuildOption(conf): -DBUILD_SHARED_LIBS=OFF +BuildOption(conf): -DBUILD_STATIC_LIBS=ON + +%description +Doxygen is the de facto standard tool for generating documentation +from annotated C++ sources, but it also supports other popular +programming languages such as C, Objective-C, C-sharp, PHP, Java, +Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, +and to some extent D. Doxygen also supports the hardware description +language VHDL. + +%install -a +mkdir -p %{buildroot}%{_mandir}/man1/ +install -m 644 doc/doxygen.1 %{buildroot}%{_mandir}/man1/ + +%files +%license LICENSE +%attr(644,root,root) %{_mandir}/man1/doxygen.* +%attr(755,root,root) %{_bindir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/doxygen/reproducible.patch b/SPECS/doxygen/reproducible.patch new file mode 100644 index 00000000..d393f5b7 --- /dev/null +++ b/SPECS/doxygen/reproducible.patch @@ -0,0 +1,75 @@ +Index: doxygen-1.10.0/deps/filesystem/filesystem.hpp +=================================================================== +--- doxygen-1.10.0.orig/deps/filesystem/filesystem.hpp ++++ doxygen-1.10.0/deps/filesystem/filesystem.hpp +@@ -5700,12 +5700,13 @@ public: + impl(const path& path, directory_options options) + : _base(path) + , _options(options) +- , _dir(nullptr) ++ , _namelist(nullptr) ++ , _namelisti(-1) + , _entry(nullptr) + { + if (!path.empty()) { +- do { _dir = ::opendir(path.native().c_str()); } while(errno == EINTR); +- if (!_dir) { ++ _namelisti = _namelistn = ::scandir(path.native().c_str(), &_namelist, NULL, alphasort); ++ if (_namelistn == -1) { + auto error = errno; + _base = filesystem::path(); + if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) { +@@ -5720,19 +5721,23 @@ public: + impl(const impl& other) = delete; + ~impl() + { +- if (_dir) { +- ::closedir(_dir); ++ if (_namelist) { ++ for (int i=_namelistn-1; i>=0; i--) { ++ free(_namelist[i]); ++ } ++ free(_namelist); ++ _namelist = nullptr; + } + } + void increment(std::error_code& ec) + { +- if (_dir) { ++ if (_namelist) { + bool skip; + do { + skip = false; + errno = 0; +- do { _entry = ::readdir(_dir); } while(errno == EINTR); +- if (_entry) { ++ if (_namelisti > 0 ) { ++ _entry = _namelist[--_namelisti]; + _dir_entry._path = _base; + _dir_entry._path.append_name(_entry->d_name); + copyToDirEntry(); +@@ -5742,8 +5747,11 @@ public: + } + } + else { +- ::closedir(_dir); +- _dir = nullptr; ++ for (int i=_namelistn-1; i>=0; i--) { ++ free(_namelist[i]); ++ } ++ free(_namelist); ++ _namelist = nullptr; + _dir_entry._path.clear(); + if (errno && errno != EINTR) { + ec = detail::make_system_error(); +@@ -5772,7 +5780,9 @@ public: + } + path _base; + directory_options _options; +- DIR* _dir; ++ int _namelisti; ++ int _namelistn; ++ struct dirent **_namelist; + struct ::dirent* _entry; + directory_entry _dir_entry; + std::error_code _ec; diff --git a/SPECS/dpdk/dpdk.spec b/SPECS/dpdk/dpdk.spec new file mode 100644 index 00000000..c227a243 --- /dev/null +++ b/SPECS/dpdk/dpdk.spec @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Sun Yuechi +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global version_suffix %{lua: \ + local v = rpm.expand("%{version}") \ + local _, count = v:gsub("%.", "") \ + print(count > 1 and "-stable" or "") \ +} + +Name: dpdk +Version: 25.07 +Release: %autorelease +Summary: Set of libraries and drivers for fast packet processing +URL: http://dpdk.org +#!RemoteAsset +Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz + +BuildSystem: meson + +BuildOption(prep): -p1 -n dpdk%{version_suffix}-%{version} +BuildOption(conf): -Dmachine=generic + +BuildRequires: meson +BuildRequires: python3-pyelftools +BuildRequires: gcc +BuildRequires: linux-headers +BuildRequires: libpcap-devel +BuildRequires: zlib-devel +BuildRequires: numactl-devel +BuildRequires: openssl-devel + +# Note that, while this is dual licensed, all code that is included with this +# Pakcage are BSD licensed. The only files that aren't licensed via BSD is the +# kni kernel module which is dual LGPLv2/BSD. +License: LicenseRef-Callaway-BSD AND LicenseRef-Callaway-LGPLv2 AND GPL-2.0-only + +%description +The Data Plane Development Kit is a set of libraries and drivers for +fast packet processing in the user space. + +%package devel +Summary: Data Plane Development Kit development files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the headers and other files needed for developing +applications with the Data Plane Development Kit. + +%package tools +Summary: Tools for setting up Data Plane Development Kit environment +Requires: %{name} = %{version}-%{release} +Requires: kmod +Requires: pciutils +Requires: iproute2 +Requires: python3-pyelftools + +%description tools +%{summary} + +%files +%{_bindir}/dpdk-testpmd +%{_bindir}/dpdk-proc-info +%{_libdir}/*.so.* +%{_libdir}/dpdk/pmds-*/*.so.* + +%files devel +%{_includedir}/ +%{_datadir}/%{name} +%{_libdir}/*.so +%{_libdir}/dpdk/pmds-*/*.so +%exclude %{_libdir}/*.a +%{_libdir}/pkgconfig/libdpdk.pc +%{_libdir}/pkgconfig/libdpdk-libs.pc + +%files tools +%exclude %{_bindir}/dpdk-*.py +%{_bindir}/dpdk-dumpcap +%{_bindir}/dpdk-pdump +%{_bindir}/dpdk-graph +%{_bindir}/dpdk-test +%{_bindir}/dpdk-test-* +%{_bindir}/dpdk-*.py + +%changelog +%{?autochangelog} diff --git a/SPECS/draco/0001-Use-system-gtest.patch b/SPECS/draco/0001-Use-system-gtest.patch new file mode 100644 index 00000000..42b76c5e --- /dev/null +++ b/SPECS/draco/0001-Use-system-gtest.patch @@ -0,0 +1,76 @@ +From 887cea73f798ab4b8947ed55f600fdfddc263915 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Mon, 16 Jan 2023 21:48:15 -0500 +Subject: [PATCH] Use system gtest + +--- + cmake/draco_tests.cmake | 29 ++++------------------------- + 1 file changed, 4 insertions(+), 25 deletions(-) + +diff --git a/cmake/draco_tests.cmake b/cmake/draco_tests.cmake +index 2d7f05e..b0a2977 100644 +--- a/cmake/draco_tests.cmake ++++ b/cmake/draco_tests.cmake +@@ -106,37 +106,8 @@ + + macro(draco_setup_test_targets) + if(DRACO_TESTS) +- draco_setup_googletest() +- +- if(NOT (EXISTS ${draco_gtest_all} AND EXISTS ${draco_gtest_main})) +- message(FATAL_ERROR "googletest missing, run git submodule update --init") +- endif() +- +- list(APPEND draco_test_defines GTEST_HAS_PTHREAD=0) +- +- draco_add_library( +- TEST +- NAME draco_test_common +- TYPE STATIC +- SOURCES ${draco_test_common_sources} +- DEFINES ${draco_defines} ${draco_test_defines} +- INCLUDES ${draco_test_include_paths}) +- +- draco_add_library( +- TEST +- NAME draco_gtest +- TYPE STATIC +- SOURCES ${draco_gtest_all} +- DEFINES ${draco_defines} ${draco_test_defines} +- INCLUDES ${draco_test_include_paths}) +- +- draco_add_library( +- TEST +- NAME draco_gtest_main +- TYPE STATIC +- SOURCES ${draco_gtest_main} +- DEFINES ${draco_defines} ${draco_test_defines} +- INCLUDES ${draco_test_include_paths}) ++ find_package(GTest REQUIRED) ++ list(APPEND draco_test_include_paths ${draco_include_paths}) + + set(DRACO_TEST_DATA_DIR "${draco_root}/testdata") + set(DRACO_TEST_TEMP_DIR "${draco_build}/draco_test_temp") +@@ -154,8 +125,7 @@ + SOURCES ${draco_test_sources} + DEFINES ${draco_defines} ${draco_test_defines} + INCLUDES ${draco_test_include_paths} +- LIB_DEPS ${draco_dependency} draco_gtest draco_gtest_main +- draco_test_common) ++ LIB_DEPS ${draco_dependency} GTest::gtest GTest::gtest_main) + + draco_add_executable( + TEST +@@ -163,8 +133,7 @@ + SOURCES ${draco_factory_test_sources} + DEFINES ${draco_defines} ${draco_test_defines} + INCLUDES ${draco_test_include_paths} +- LIB_DEPS ${draco_dependency} draco_gtest draco_gtest_main +- draco_test_common) ++ LIB_DEPS ${draco_dependency} GTest::gtest GTest::gtest_main) + + + endif() +-- +2.38.1 + \ No newline at end of file diff --git a/SPECS/draco/draco.spec b/SPECS/draco/draco.spec new file mode 100644 index 00000000..af3bfb6f --- /dev/null +++ b/SPECS/draco/draco.spec @@ -0,0 +1,98 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Disable test until a proper fix occurs +%global gtestflag 0 + +Name: draco +Version: 1.5.7 +Release: %autorelease +Summary: A library for compressing and decompressing 3D geometric meshes and point clouds +License: Apache-2.0 +URL: https://github.com/google/%{name} +#!RemoteAsset +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +BuildSystem: cmake +# Downstream-only patch that unconditionally links a system copy of gtest, +# rather than expecting a git submodule as upstream prefers (and gtest upstream +# would recommend). +Patch0: 0001-Use-system-gtest.patch + +BuildOption(conf): -GNinja +BuildOption(conf): -DBUILD_SHARED_LIBS=ON +BuildOption(conf): -DCMAKE_BUILD_TYPE=Release +BuildOption(conf): -DDRACO_TESTS=%{gtestflag} + +BuildRequires: cmake +%if %{?gtestflag} +BuildRequires: cmake(gtest) +%endif +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: help2man +BuildRequires: ninja +BuildRequires: pkgconfig(python3) + +%description +A library for compressing and decompressing 3D geometric meshes and point clouds + +%package devel +Summary: Development files for draco +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +%{summary}. + +%package static +Summary: Static files for draco +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +%{summary}. + +%prep -a + +# Remove precompiled CSS and Javascript along binaries +rm -fr {javascript,maya,docs/assets} + +%install -a +# Create missing man files downstream +mkdir -p %{buildroot}%{_mandir}/man1 +LD_LIBRARY_PATH=%{buildroot}%{_libdir} help2man -N --version-string=%{version} \ + -o %{buildroot}%{_mandir}/man1/%{name}_decoder-%{version}.1 \ + %{buildroot}%{_bindir}/%{name}_decoder +LD_LIBRARY_PATH=%{buildroot}%{_libdir} help2man -N --version-string=%{version} \ + -o %{buildroot}%{_mandir}/man1/%{name}_encoder-%{version}.1 \ + %{buildroot}%{_bindir}/%{name}_encoder + +%if %{?gtestflag} +%check +%endif + +%files +%license LICENSE AUTHORS +%doc README.md +%{_bindir}/draco_decoder +%{_bindir}/draco_decoder-%{version} +%{_bindir}/draco_encoder +%{_bindir}/draco_encoder-%{version} +%{_libdir}/libdraco.so.9 +%{_libdir}/libdraco.so.9.0.0 +%{_mandir}/man1/draco_decoder-%{version}.1* +%{_mandir}/man1/draco_encoder-%{version}.1* + +%files devel +%{_includedir}/draco/ +%{_datadir}/cmake/draco/ +%{_libdir}/libdraco.so +%{_libdir}/pkgconfig/draco.pc + +%files static +%{_libdir}/libdraco.a + +%changelog +%{?autochangelog} diff --git a/SPECS/dracut/dracut.spec b/SPECS/dracut/dracut.spec new file mode 100644 index 00000000..7a6e6220 --- /dev/null +++ b/SPECS/dracut/dracut.spec @@ -0,0 +1,277 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dracut +Version: 108 +Release: %autorelease +Summary: Library to create ISO 9660 disk images +License: GPL-2.0-or-later AND LGPL-2.0-or-later +URL: https://github.com/dracut-ng/dracut-ng +#!RemoteAsset +Source: %{url}/archive/refs/tags/%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --systemdsystemunitdir=%{_unitdir} +BuildOption(conf): --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) +BuildOption(conf): --libdir=%{_prefix}/lib +BuildOption(conf): --disable-dracut-cpio +BuildOption(conf): --disable-documentation + +BuildRequires: bash +BuildRequires: git-core + +BuildRequires: pkgconfig +BuildRequires: systemd +BuildRequires: bash-completion +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(libkmod) + +Requires: bash +Requires: coreutils +Requires: cpio +Requires: filesystem +Requires: findutils +Requires: grep +Requires: kmod +Requires: sed +Requires: zstd +Requires: xz +Requires: util-linux +Requires: systemd +Requires: systemd-udev + +%description +dracut contains tools to create bootable initramfses for the Linux +kernel. Unlike other implementations, dracut hard-codes as little +as possible into the initramfs. dracut contains various modules which +are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS +is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network +package. + +%package tools +Summary: dracut tools to build the local initramfs +Requires: %{name} = %{version}-%{release} + +%description tools +This package contains tools to assemble the local initrd and host configuration. + +%install -a +echo -e "#!/bin/bash\nDRACUT_VERSION=%{version}-%{rbrelease}" > %{buildroot}%{_prefix}/lib/dracut/dracut-version.sh + +# No dash for now +rm -fr -- %{buildroot}%{_prefix}/lib/dracut/modules.d/10dash + +# Remove obsolete modules +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/35network-legacy + +# Remove architecture specific modules +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/68cms +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/69cio_ignore +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/73zipl +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/74dasd +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/74dasd_mod +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/74dcssblk +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/74zfcp +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/modules.d/74znet + +# We don't want example configs +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d + +# We don't ship tests +rm -rf -- %{buildroot}%{_prefix}/lib/dracut/test +rm -rf -- %{buildroot}/%{_prefix}/lib/dracut/modules.d/80test* + +mkdir -p %{buildroot}/boot/dracut +mkdir -p %{buildroot}/var/lib/dracut/overlay +mkdir -p %{buildroot}%{_localstatedir}/log +touch %{buildroot}%{_localstatedir}/log/dracut.log +mkdir -p %{buildroot}%{_sharedstatedir}/initramfs +mkdir -p %{buildroot}%{_prefix}/lib/dracutdracut.conf.d + +rm -f %{buildroot}%{_mandir}/man?/*suse* + +# TODO: make tests pass. +%check + + +%files +%{_bindir}/dracut +%{_datadir}/bash-completion/completions/dracut +%{_datadir}/bash-completion/completions/lsinitrd +%{_bindir}/lsinitrd +%dir %{_prefix}/lib/dracut +%dir %{_prefix}/lib/dracut/modules.d +%{_prefix}/lib/dracut/dracut-functions.sh +%{_prefix}/lib/dracut/dracut-init.sh +%{_prefix}/lib/dracut/dracut-functions +%{_prefix}/lib/dracut/dracut-version.sh +%{_prefix}/lib/dracut/dracut-logger.sh +%{_prefix}/lib/dracut/dracut-initramfs-restore +%{_prefix}/lib/dracut/dracut-install +%{_prefix}/lib/dracut/dracut-util +%{_prefix}/lib/dracut/skipcpio +# %%{_prefix}/lib/dracut/dracut-cpio +%config(noreplace) %{_sysconfdir}/dracut.conf +%dir %{_sysconfdir}/dracut.conf.d +%dir %{_datadir}/pkgconfig +%{_datadir}/pkgconfig/dracut.pc +%{_prefix}/lib/dracut/modules.d/10bash +%{_prefix}/lib/dracut/modules.d/10systemd +%{_prefix}/lib/dracut/modules.d/10systemd-network-management +%{_prefix}/lib/dracut/modules.d/10warpclock +%{_prefix}/lib/dracut/modules.d/11fips +%{_prefix}/lib/dracut/modules.d/11fips-crypto-policies +%{_prefix}/lib/dracut/modules.d/11systemd-ac-power +%{_prefix}/lib/dracut/modules.d/11systemd-ask-password +%{_prefix}/lib/dracut/modules.d/11systemd-bsod +%{_prefix}/lib/dracut/modules.d/11systemd-battery-check +%{_prefix}/lib/dracut/modules.d/11systemd-coredump +%{_prefix}/lib/dracut/modules.d/11systemd-creds +%{_prefix}/lib/dracut/modules.d/11systemd-cryptsetup +%{_prefix}/lib/dracut/modules.d/11systemd-hostnamed +%{_prefix}/lib/dracut/modules.d/11systemd-initrd +%{_prefix}/lib/dracut/modules.d/11systemd-integritysetup +%{_prefix}/lib/dracut/modules.d/11systemd-journald +%{_prefix}/lib/dracut/modules.d/11systemd-ldconfig +%{_prefix}/lib/dracut/modules.d/11systemd-modules-load +%{_prefix}/lib/dracut/modules.d/11systemd-networkd +%{_prefix}/lib/dracut/modules.d/11systemd-pcrphase +%{_prefix}/lib/dracut/modules.d/11systemd-portabled +%{_prefix}/lib/dracut/modules.d/11systemd-pstore +%{_prefix}/lib/dracut/modules.d/11systemd-repart +%{_prefix}/lib/dracut/modules.d/11systemd-resolved +%{_prefix}/lib/dracut/modules.d/11systemd-sysext +%{_prefix}/lib/dracut/modules.d/11systemd-sysctl +%{_prefix}/lib/dracut/modules.d/68systemd-sysusers +%{_prefix}/lib/dracut/modules.d/11systemd-timedated +%{_prefix}/lib/dracut/modules.d/11systemd-timesyncd +%{_prefix}/lib/dracut/modules.d/11systemd-tmpfiles +%{_prefix}/lib/dracut/modules.d/11systemd-udevd +%{_prefix}/lib/dracut/modules.d/11systemd-veritysetup +%{_prefix}/lib/dracut/modules.d/12caps +%{_prefix}/lib/dracut/modules.d/13modsign +%{_prefix}/lib/dracut/modules.d/13rescue +%{_prefix}/lib/dracut/modules.d/14watchdog +%{_prefix}/lib/dracut/modules.d/14watchdog-modules +%{_prefix}/lib/dracut/modules.d/16dbus-broker +%{_prefix}/lib/dracut/modules.d/16dbus-daemon +%{_prefix}/lib/dracut/modules.d/16rngd +%{_prefix}/lib/dracut/modules.d/19dbus +%{_prefix}/lib/dracut/modules.d/20i18n +%{_prefix}/lib/dracut/modules.d/30convertfs +%{_prefix}/lib/dracut/modules.d/35connman +%{_prefix}/lib/dracut/modules.d/35network-manager +%{_prefix}/lib/dracut/modules.d/40network +%{_prefix}/lib/dracut/modules.d/45drm +%{_prefix}/lib/dracut/modules.d/45simpledrm +%{_prefix}/lib/dracut/modules.d/45net-lib +%{_prefix}/lib/dracut/modules.d/45plymouth +%{_prefix}/lib/dracut/modules.d/45url-lib +%{_prefix}/lib/dracut/modules.d/68lvmmerge +%{_prefix}/lib/dracut/modules.d/68lvmthinpool-monitor +%{_prefix}/lib/dracut/modules.d/70bluetooth +%{_prefix}/lib/dracut/modules.d/70btrfs +%{_prefix}/lib/dracut/modules.d/70crypt +%{_prefix}/lib/dracut/modules.d/70dm +%{_prefix}/lib/dracut/modules.d/70dmraid +%{_prefix}/lib/dracut/modules.d/70dmsquash-live +%{_prefix}/lib/dracut/modules.d/70dmsquash-live-autooverlay +%{_prefix}/lib/dracut/modules.d/70dmsquash-live-ntfs +%{_prefix}/lib/dracut/modules.d/70fs-lib +%{_prefix}/lib/dracut/modules.d/70img-lib +%{_prefix}/lib/dracut/modules.d/70kernel-modules +%{_prefix}/lib/dracut/modules.d/70kernel-modules-extra +%{_prefix}/lib/dracut/modules.d/70kernel-network-modules +%{_prefix}/lib/dracut/modules.d/70livenet +%{_prefix}/lib/dracut/modules.d/70lvm +%{_prefix}/lib/dracut/modules.d/70mdraid +%{_prefix}/lib/dracut/modules.d/70multipath +%{_prefix}/lib/dracut/modules.d/70nvdimm +%{_prefix}/lib/dracut/modules.d/70numlock +%{_prefix}/lib/dracut/modules.d/70overlayfs +%{_prefix}/lib/dracut/modules.d/70ppcmac +%{_prefix}/lib/dracut/modules.d/70pcmcia +%{_prefix}/lib/dracut/modules.d/70qemu +%{_prefix}/lib/dracut/modules.d/70qemu-net +%{_prefix}/lib/dracut/modules.d/70uefi-lib +%{_prefix}/lib/dracut/modules.d/73crypt-gpg +%{_prefix}/lib/dracut/modules.d/73crypt-loop +%{_prefix}/lib/dracut/modules.d/73fido2 +%{_prefix}/lib/dracut/modules.d/73pcsc +%{_prefix}/lib/dracut/modules.d/73pkcs11 +%{_prefix}/lib/dracut/modules.d/73tpm2-tss +%{_prefix}/lib/dracut/modules.d/74debug +%{_prefix}/lib/dracut/modules.d/74cifs +%{_prefix}/lib/dracut/modules.d/74fcoe +%{_prefix}/lib/dracut/modules.d/74fcoe-uefi +%{_prefix}/lib/dracut/modules.d/74fstab-sys +%{_prefix}/lib/dracut/modules.d/74hwdb +%{_prefix}/lib/dracut/modules.d/74iscsi +%{_prefix}/lib/dracut/modules.d/74lunmask +%{_prefix}/lib/dracut/modules.d/74nbd +%{_prefix}/lib/dracut/modules.d/74nfs +%{_prefix}/lib/dracut/modules.d/74nvmf +%{_prefix}/lib/dracut/modules.d/74resume +%{_prefix}/lib/dracut/modules.d/74rootfs-block +%{_prefix}/lib/dracut/modules.d/74rootfs-block-fallback +%{_prefix}/lib/dracut/modules.d/74ssh-client +%{_prefix}/lib/dracut/modules.d/74squash-erofs +%{_prefix}/lib/dracut/modules.d/74squash-squashfs +%{_prefix}/lib/dracut/modules.d/74terminfo +%{_prefix}/lib/dracut/modules.d/74udev-rules +%{_prefix}/lib/dracut/modules.d/74virtfs +%{_prefix}/lib/dracut/modules.d/74virtiofs +%{_prefix}/lib/dracut/modules.d/75securityfs +%{_prefix}/lib/dracut/modules.d/76masterkey +%{_prefix}/lib/dracut/modules.d/77integrity +%{_prefix}/lib/dracut/modules.d/76biosdevname +%{_prefix}/lib/dracut/modules.d/76systemd-emergency +%{_prefix}/lib/dracut/modules.d/77dracut-systemd +%{_prefix}/lib/dracut/modules.d/77ecryptfs +%{_prefix}/lib/dracut/modules.d/77pollcdrom +%{_prefix}/lib/dracut/modules.d/77selinux +%{_prefix}/lib/dracut/modules.d/77syslog +%{_prefix}/lib/dracut/modules.d/77usrmount +%{_prefix}/lib/dracut/modules.d/77initqueue +%{_prefix}/lib/dracut/modules.d/80base +%{_prefix}/lib/dracut/modules.d/81busybox +%{_prefix}/lib/dracut/modules.d/84memstrack +%{_prefix}/lib/dracut/modules.d/85shell-interpreter +%{_prefix}/lib/dracut/modules.d/86shutdown +%{_prefix}/lib/dracut/modules.d/87squash +%{_prefix}/lib/dracut/modules.d/88squash-lib +#{_prefix}/lib/dracut/modules.d/99openssl +%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log +%dir %{_sharedstatedir}/initramfs +%{_unitdir}/dracut-shutdown.service +%{_unitdir}/dracut-shutdown-onfailure.service +%{_unitdir}/sysinit.target.wants/dracut-shutdown.service +%{_unitdir}/dracut-cmdline.service +%{_unitdir}/dracut-initqueue.service +%{_unitdir}/dracut-mount.service +%{_unitdir}/dracut-pre-mount.service +%{_unitdir}/dracut-pre-pivot.service +%{_unitdir}/dracut-pre-trigger.service +%{_unitdir}/dracut-pre-udev.service +%{_unitdir}/initrd.target.wants/dracut-cmdline.service +%{_unitdir}/initrd.target.wants/dracut-initqueue.service +%{_unitdir}/initrd.target.wants/dracut-mount.service +%{_unitdir}/initrd.target.wants/dracut-pre-mount.service +%{_unitdir}/initrd.target.wants/dracut-pre-pivot.service +%{_unitdir}/initrd.target.wants/dracut-pre-trigger.service +%{_unitdir}/initrd.target.wants/dracut-pre-udev.service +%{_prefix}/lib/kernel/install.d/50-dracut.install +%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install + +%files tools +%{_bindir}/dracut-catimages +%dir /boot/dracut +%dir %{_localstatedir}/lib/dracut +%dir %{_localstatedir}/lib/dracut/overlay + +%changelog +%{?autochangelog} diff --git a/SPECS/drpm/drpm.spec b/SPECS/drpm/drpm.spec new file mode 100644 index 00000000..630ca24b --- /dev/null +++ b/SPECS/drpm/drpm.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: drpm +Version: 0.5.2 +Release: %autorelease +Summary: Delta RPM library +License: LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-BSD +URL: https://github.com/rpm-software-management/drpm +#!RemoteAsset +Source: https://github.com/rpm-software-management/drpm/releases/download/%{version}/drpm-%{version}.tar.bz2 + +BuildSystem: cmake + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: bzip2-devel +BuildRequires: cmocka-devel +BuildRequires: lzlib-devel +BuildRequires: openssl-devel +BuildRequires: popt-devel +BuildRequires: rpm-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel +BuildRequires: pkgconfig(libzstd) + +BuildRequires: pkgconfig + +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM:STRING=3.5 +%description +This package provides a library for making, reading and +applying deltarpms, compatible with the original deltarpm packages. + +%package devel +Summary: Header files for the drpm +License: LGPL-2.1-or-later +Requires: %{name} = %{version} + +%description devel +This subpackage contains libraries and header files for developing +applications that want to make use of drpm. + +%ldconfig_scriptlets + +%files +%license COPYING LICENSE.BSD +%{_libdir}/libdrpm.so.* + +%files devel +%{_libdir}/libdrpm.so +%{_includedir}/drpm.h +%{_libdir}/pkgconfig/drpm.pc +%changelog +%{?autochangelog} diff --git a/SPECS/dtc/backport-pylibfdt-libfdt.i-fix-backwards-compatibility-of-return-values.patch b/SPECS/dtc/backport-pylibfdt-libfdt.i-fix-backwards-compatibility-of-return-values.patch new file mode 100644 index 00000000..48317b82 --- /dev/null +++ b/SPECS/dtc/backport-pylibfdt-libfdt.i-fix-backwards-compatibility-of-return-values.patch @@ -0,0 +1,88 @@ +From 9a969f3b70b07bbf1c9df44a38d7f8d1d3a6e2a5 Mon Sep 17 00:00:00 2001 +From: Brandon Maier +Date: Sun, 24 Nov 2024 15:48:04 -0600 +Subject: pylibfdt/libfdt.i: fix backwards compatibility of return values + +When our Python functions wrap `fdt_getprop()` they return a list +containing `[*data, length]`. + +In SWIG v4.2 and earlier SWIG would discard `*data` if it is NULL/None. +Causing the return value to just be `length`. + +But starting in SWIG v4.3 it no longer discards `*data`. So the return +value is now `[None, length]`. + +Handle this compatibility issue in libfdt.i by checking if the return +value looks like the older 4.2 return value, and casting it to the newer +style. + +See https://github.com/swig/swig/pull/2907 + +Signed-off-by: Brandon Maier +Signed-off-by: David Gibson +--- + pylibfdt/libfdt.i | 25 ++++++++++++++----------- + 1 file changed, 14 insertions(+), 11 deletions(-) + +diff --git a/pylibfdt/libfdt.i b/pylibfdt/libfdt.i +index 9f5b6a9..bb9985c 100644 +--- a/pylibfdt/libfdt.i ++++ b/pylibfdt/libfdt.i +@@ -114,11 +114,14 @@ def check_err_null(val, quiet=()): + FdtException if val indicates an error was reported and the error + is not in @quiet. + """ +- # Normally a list is returned which contains the data and its length. +- # If we get just an integer error code, it means the function failed. ++ # Compatibility for SWIG v4.2 and earlier. SWIG 4.2 would drop the first ++ # item from the list if it was None, returning only the second item. + if not isinstance(val, list): +- if -val not in quiet: +- raise FdtException(val) ++ val = [None, val] ++ ++ if val[0] is None: ++ if -val[1] not in quiet: ++ raise FdtException(val[1]) + return val + + class FdtRo(object): +@@ -395,8 +398,8 @@ class FdtRo(object): + """ + pdata = check_err_null( + fdt_get_property_by_offset(self._fdt, prop_offset), quiet) +- if isinstance(pdata, (int)): +- return pdata ++ if pdata[0] is None: ++ return pdata[1] + return Property(pdata[0], pdata[1]) + + def getprop(self, nodeoffset, prop_name, quiet=()): +@@ -417,8 +420,8 @@ class FdtRo(object): + """ + pdata = check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name), + quiet) +- if isinstance(pdata, (int)): +- return pdata ++ if pdata[0] is None: ++ return pdata[1] + return Property(prop_name, bytearray(pdata[0])) + + def hasprop(self, nodeoffset, prop_name, quiet=()): +@@ -444,10 +447,10 @@ class FdtRo(object): + """ + pdata = check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name), + quiet + (NOTFOUND,)) +- if isinstance(pdata, (int)): +- if pdata == -NOTFOUND: ++ if pdata[0] is None: ++ if pdata[1] == -NOTFOUND: + return False +- return pdata ++ return pdata[1] + return True + + def get_phandle(self, nodeoffset): +-- +cgit 1.2.3-korg + diff --git a/SPECS/dtc/dtc.spec b/SPECS/dtc/dtc.spec new file mode 100644 index 00000000..9b52bcbe --- /dev/null +++ b/SPECS/dtc/dtc.spec @@ -0,0 +1,91 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dtc +Version: 1.7.2 +Release: %autorelease +Summary: Device Tree Compiler +License: GPL-2.0-or-later +URL: https://devicetree.org/ +#!RemoteAsset +Source0: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.sign +Patch1: backport-pylibfdt-libfdt.i-fix-backwards-compatibility-of-return-values.patch + +BuildRequires: gcc +BuildRequires: make +BuildRequires: flex +BuildRequires: bison +BuildRequires: swig +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: python3-wheel +Provides: libfdt = %{version}-%{release} +Obsoletes: libfdt < %{version}-%{release} +BuildSystem: autotools +BuildOption(install): V=1 DESTDIR=%{buildroot} PREFIX=%{buildroot}/%{_prefix} +BuildOption(install): LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} + +%description +The devicetree is a data structure for describing hardware. Rather than hard coding +every detail of a device into an operating system, many aspects of the hardware can +be described in a data structure that is passed to the operating system at boot time. +The devicetree is used by OpenFirmware, OpenPOWER Abstraction Layer (OPAL), Power +Architecture Platform Requirements (PAPR) and in the standalone Flattened Device +Tree (FDT) form. + +%package devel +Summary: Development headers for device tree library +Requires: libfdt = %{version}-%{release} +Provides: libfdt-static = %{version}-%{release} +Provides: libfdt-devel = %{version}-%{release} +Obsoletes: libfdt-static < %{version}-%{release} +Obsoletes: libfdt-devel < %{version}-%{release} + +%description devel +This package provides development files for dtc. + +%package -n python3-libfdt +Summary: Python 3 bindings for device tree library +%{?python_provide:%python_provide python3-libfdt} +Requires: %{name} = %{version}-%{release} + +%description -n python3-libfdt +This package provides python3 bindings for libfdt + +# no configure +%conf + +%build -p +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} + +%install -p +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} + + +%check -p +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} + +%files +%license GPL README.license +%doc Documentation/manual.txt +%{_bindir}/* +%{_libdir}/libfdt.so.* + +%files devel +%{_libdir}/libfdt.so +%{_includedir}/* +%{_libdir}/libfdt.a + +%files -n python3-libfdt +%{python3_sitearch}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/duktape/0001-duktape-link-m.patch b/SPECS/duktape/0001-duktape-link-m.patch new file mode 100644 index 00000000..f931809f --- /dev/null +++ b/SPECS/duktape/0001-duktape-link-m.patch @@ -0,0 +1,18 @@ +Index: duktape-2.7.0/Makefile.sharedlibrary +=================================================================== +--- duktape-2.7.0.orig/Makefile.sharedlibrary ++++ duktape-2.7.0/Makefile.sharedlibrary +@@ -71,11 +71,11 @@ all: libduktape.$(SO_REALNAME_SUFFIX) li + + libduktape.$(SO_REALNAME_SUFFIX): + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktape.$(SO_SONAME_SUFFIX) \ +- -o $@ $(DUKTAPE_SRCDIR)/duktape.c ++ -o $@ $(DUKTAPE_SRCDIR)/duktape.c -lm + + libduktaped.$(SO_REALNAME_SUFFIX): + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fPIC -g -Wall -Wextra -Os -Wl,$(LD_SONAME_ARG),libduktaped.$(SO_SONAME_SUFFIX) \ +- -o $@ $(DUKTAPE_SRCDIR)/duktape.c ++ -o $@ $(DUKTAPE_SRCDIR)/duktape.c -lm + + duktape.pc: + sed -e "s|@PREFIX@|$(INSTALL_PREFIX)|" \ diff --git a/SPECS/duktape/duktape.spec b/SPECS/duktape/duktape.spec new file mode 100644 index 00000000..123acefb --- /dev/null +++ b/SPECS/duktape/duktape.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: duktape +Version: 2.7.0 +Release: %autorelease +Summary: Embeddable Javascript engine +License: MIT +URL: https://duktape.org/ +#!RemoteAsset +Source: https://duktape.org/%name-%{version}.tar.xz +Patch: 0001-duktape-link-m.patch +BuildSystem: autotools + +BuildOption(build): -f Makefile.sharedlibrary +BuildOption(install): -f Makefile.sharedlibrary INSTALL_PREFIX=%{_prefix} + +BuildRequires: gcc +BuildRequires: make + +%description +Duktape is an embeddable Javascript engine, with a focus on portability and +compact footprint. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains header files and libraries needed to develop +applications that use %{name}. + +%conf -p +sed -i 's@/lib/@/%{_lib}/@g' Makefile.sharedlibrary +sed -i 's@/lib$@/%{_lib}@g' Makefile.sharedlibrary + +# No configure +%conf + +# no tests +%check + +%ldconfig_scriptlets + +%files +%doc AUTHORS.rst +%license LICENSE.txt +%{_libdir}/libduktape.so.* +%{_libdir}/libduktaped.so.* + +%files devel +%{_includedir}/duk_config.h +%{_includedir}/duktape.h +%{_libdir}/libduktape.so +%{_libdir}/libduktaped.so +%{_libdir}/pkgconfig/duktape.pc + +%changelog +%{?autochangelog} + diff --git a/SPECS/dwarves/dwarves.spec b/SPECS/dwarves/dwarves.spec new file mode 100644 index 00000000..f88102fc --- /dev/null +++ b/SPECS/dwarves/dwarves.spec @@ -0,0 +1,104 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define libname libdwarves + +Name: dwarves +Version: 1.30 +Release: %autorelease +Summary: Debugging Information Manipulation Tools (pahole & friends) +License: GPL-2.0-only +URL: https://git.kernel.org/pub/scm/devel/pahole/pahole.git +#!RemoteAsset +Source0: https://fedorapeople.org/~acme/%{name}/%{name}-%{version}.tar.xz + +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_INSTALL_PREFIX=%{_prefix} +BuildOption(conf): -DLIBBPF_EMBEDDED=OFF +BuildOption(conf): -DCMAKE_BUILD_TYPE=Release + +BuildRequires: make, gcc-c++, cmake +BuildRequires: zlib-devel, libelf-devel, libdw-devel +BuildRequires: python3-devel, openssl-devel +# For modern builds, it's good to have libbpf support. +BuildRequires: pkgconfig(libbpf) + +%description +This package contains the core dwarves toolset, including pahole, codiff, +pfunct, and their associated documentation and data files. + +Provides: pahole = %{version}-%{release} + +%package devel +Summary: Development files for the libdwarves library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries for +compiling applications that use the libdwarves API. + +%package -n ostra-cg +Summary: Generate call graphs from encoded traces +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n ostra-cg +The ostra-cg tool can be used to generate call graphs from traces +encoded by pahole. + +%install -p +rm -Rf %{buildroot} + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README NEWS +# Core libraries +%{_libdir}/%{libname}.so.* +%{_libdir}/%{libname}_emit.so.* +%{_libdir}/%{libname}_reorganize.so.* +# Core CLI tools +%{_bindir}/btfdiff +%{_bindir}/codiff +%{_bindir}/ctracer +%{_bindir}/dtagnames +%{_bindir}/fullcircle +%{_bindir}/pahole +%{_bindir}/pdwtags +%{_bindir}/pfunct +%{_bindir}/pglobal +%{_bindir}/prefcnt +%{_bindir}/scncopy +%{_bindir}/syscse +# Man pages for the core tools +%{_mandir}/man1/* +# Exclude files that belong to the ostra-cg subpackage. +%exclude %{_bindir}/ostra-cg + +%files devel +%{_includedir}/dwarves/*.h +# Development symlinks +%{_libdir}/%{libname}.so +%{_libdir}/%{libname}_emit.so +%{_libdir}/%{libname}_reorganize.so + +%files -n ostra-cg +%{_bindir}/ostra-cg +%dir %{_datadir}/dwarves/ +%dir %{_datadir}/dwarves/runtime/ +%dir %{_datadir}/dwarves/runtime/python/ +%defattr(0644,root,root,0755) +%{_datadir}/dwarves/runtime/Makefile +%{_datadir}/dwarves/runtime/linux.blacklist.cu +%{_datadir}/dwarves/runtime/ctracer_relay.c +%{_datadir}/dwarves/runtime/ctracer_relay.h +%attr(0755,root,root) %{_datadir}/dwarves/runtime/python/ostra.py* + +%changelog +%{?autochangelog} + diff --git a/SPECS/dwz/dwz.spec b/SPECS/dwz/dwz.spec new file mode 100644 index 00000000..cd3d92e6 --- /dev/null +++ b/SPECS/dwz/dwz.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: dwz +Version: 0.16 +Release: %autorelease +Summary: A DWARF optimization and duplicate removal tool +License: GPLv2+ and GPLv3+ +URL: https://sourceware.org/dwz/ +#!RemoteAsset +Source0:https://sourceware.org/ftp/dwz/releases/%{name}-%{version}.tar.xz +BuildRequires: gcc gcc-c++ dejagnu +BuildRequires: xxhash-devel libelf-devel +BuildSystem: autotools +BuildOption(build): prefix=%{_prefix} mandir=%{_mandir} bindir=%{_bindir} +BuildOption(install): prefix=%{_prefix} mandir=%{_mandir} bindir=%{_bindir} + +%description +The package contains a program that attempts to optimize DWARF debugging +information contained in ELF shared libraries and ELF executables for size, +by replacing DWARF information representation with equivalent smaller +representation where possible and by reducing the amount of duplication +using techniques from DWARF standard appendix E - creating +DW_TAG_partial_unit compilation units (CUs) for duplicated information and +using DW_TAG_imported_unit to import it into each CU that needs it. + +# no configure scripts. +%conf +: + +%files +%defattr(-,root,root,-) +%license COPYING COPYING3 COPYING.RUNTIME +%{_bindir}/dwz +%{_mandir}/man1/dwz* + +%changelog +%{?autochangelog} diff --git a/SPECS/e2fsprogs/e2fsprogs.spec b/SPECS/e2fsprogs/e2fsprogs.spec new file mode 100644 index 00000000..28270695 --- /dev/null +++ b/SPECS/e2fsprogs/e2fsprogs.spec @@ -0,0 +1,178 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# default without systemd +%bcond systemd 0 + +Name: e2fsprogs +Version: 1.47.3 +Release: %autorelease +Summary: Utilities for the Second Extended File System +License: GPL-2.0-only +URL: http://e2fsprogs.sourceforge.net +#!RemoteAsset +Source0: http://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v%{version}/e2fsprogs-%{version}.tar.xz +#!RemoteAsset +Source1: https://thunk.org/tytso/tytso-key.asc#/%{name}.keyring +BuildSystem: autotools + +BuildOption(conf): --with-root-prefix='' +BuildOption(conf): --enable-elf-shlibs +BuildOption(conf): --disable-libblkid +BuildOption(conf): --disable-libuuid +BuildOption(conf): --disable-uuidd +BuildOption(conf): --disable-fsck +BuildOption(conf): --without-crond-dir + +%if %{with systemd} +BuildOption(conf): --with-systemd-unit-dir=%{_unitdir} +%endif +BuildOption(build): CFLAGS="%{optflags}" + +BuildRequires: libarchive-devel util-linux-devel pkg-config xz texinfo +BuildRequires: perl +%if %{with systemd} +BuildRequires: systemd-rpm-macros +%endif +Requires(post): /usr/bin/mkdir /usr/bin/touch +Requires: libcom_err2 +Requires: libext2fs2 +Suggests: e2fsprogs-scrub + +%description +Utilities needed to create and maintain ext2, ext3, and ext4 file systems. + +%package -n e2fsprogs-scrub +Summary: Ext2fs scrubbing scripts and service files +License: GPL-2.0-only +%if %{with systemd} +%{?systemd_requires} +%endif +Requires: e2fsprogs +Requires: lvm2 +Requires: postfix +Requires: util-linux + +%description -n e2fsprogs-scrub +Scripts and systemd service files for background scrubbing of LVM volumes +with ext2, ext3, and ext4 filesystems. + +%package -n libext2fs2 +Summary: Ext2fs library +License: LGPL-2.0-only + +%description -n libext2fs2 +The basic Ext2fs shared library. + +%package -n libext2fs-devel +Summary: Development files for libext2fs +License: LGPL-2.0-only +Requires: libcom_err-devel +Requires: libext2fs2 = %{version} + +%description -n libext2fs-devel +Development files for libext2fs. + +%package -n libcom_err2 +Summary: E2fsprogs error reporting library +License: MIT + +%description -n libcom_err2 +com_err is an error message display library. + +%package -n libcom_err-devel +Summary: Development files for libcom_err +License: MIT +Requires: glibc-devel +Requires: libcom_err2 = %{version} + +%description -n libcom_err-devel +Development files for the com_err error message display library. + +%build -a + +# Guarantee that tranlations match the source messages +make -C po update-po + +%install -a +find %{buildroot} -type f -name "*.a" -delete +rm -f %{buildroot}%{_libdir}/e2initrd_helper + +%find_lang e2fsprogs + +%if %{with systemd} +%pre -n e2fsprogs-scrub +%service_add_pre e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service +%post -n e2fsprogs-scrub +%service_add_post e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service +%preun -n e2fsprogs-scrub +%service_del_preun e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service +%postun -n e2fsprogs-scrub +%service_del_postun e2scrub@.service e2scrub_all.service e2scrub_all.timer e2scrub_fail@.service e2scrub_reap.service +%endif + +%ldconfig_scriptlets -n libext2fs2 +%ldconfig_scriptlets -n libcom_err2 + +%files -f e2fsprogs.lang +%doc doc/RelNotes/v%{version}.txt README +%license NOTICE +%config /etc/mke2fs.conf +%{_sbindir}/* +%{_bindir}/* +%{_infodir}/libext2fs.info.gz +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man8/* + +%files -n e2fsprogs-scrub +%config /etc/e2scrub.conf +%{_sbindir}/e2scrub +%{_sbindir}/e2scrub_all +%if %{with systemd} +%{_libexecdir}/e2fsprogs/ +%{_unitdir}/e2scrub@.service +%{_unitdir}/e2scrub_all.service +%{_unitdir}/e2scrub_all.timer +%{_unitdir}/e2scrub_fail@.service +%{_unitdir}/e2scrub_reap.service +%endif + +%files -n libext2fs2 +%{_libdir}/libext2fs.so.* +%{_libdir}/libe2p.so.* + +%files -n libext2fs-devel +%{_libdir}/libext2fs.so +%{_libdir}/libe2p.so +/usr/include/ext2fs +/usr/include/e2p +%{_libdir}/pkgconfig/e2p.pc +%{_libdir}/pkgconfig/ext2fs.pc + +%files -n libcom_err2 +%{_libdir}/libcom_err.so.* +%{_libdir}/libss.so.* + +%files -n libcom_err-devel +%{_bindir}/compile_et +%{_bindir}/mk_cmds +%{_libdir}/libcom_err.so +%{_libdir}/libss.so +%{_libdir}/pkgconfig/com_err.pc +%{_libdir}/pkgconfig/ss.pc +%{_includedir}/com_err.h +%{_includedir}/et +%{_includedir}/ss +%{_datadir}/et +%{_datadir}/ss +%{_mandir}/man1/compile_et.1.gz +%{_mandir}/man1/mk_cmds.1.gz +%{_mandir}/man3/com_err.3.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/ed/ed.spec b/SPECS/ed/ed.spec new file mode 100644 index 00000000..85db9df6 --- /dev/null +++ b/SPECS/ed/ed.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ed +Version: 1.21.1 +Release: %autorelease +Summary: A line-oriented text editor +License: GPL-3.0-or-later AND LGPL-2.1-or-later +Group: Productivity/Text/Editors +URL: https://www.gnu.org/software/ed/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/ed/ed-%{version}.tar.lz +BuildRequires: lzip +Buildsystem: autotools + +%description +GNU ed is a line-oriented text editor. It is used to create, display, +modify and otherwise manipulate text files, both interactively and via +shell scripts. A restricted version of ed, red, can only edit files in +the current directory and cannot execute shell commands. Ed is the +"standard" text editor in the sense that it is the original editor for +Unix, and thus widely available. For most purposes, however, it is +superseded by full-screen editors such as GNU Emacs or GNU Moe. + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/%{name} +%{_bindir}/r%{name} +%{_infodir}/%{name}.info%{?ext_info} +%{_mandir}/man1/%{name}.1%{?ext_man} +%{_mandir}/man1/r%{name}.1%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/efi-rpm-macros/0001-Add-riscv64-support.patch b/SPECS/efi-rpm-macros/0001-Add-riscv64-support.patch new file mode 100644 index 00000000..8a967a31 --- /dev/null +++ b/SPECS/efi-rpm-macros/0001-Add-riscv64-support.patch @@ -0,0 +1,50 @@ +From 5f43c283de0a5749afd1e48f2a6b6e239b00a270 Mon Sep 17 00:00:00 2001 +From: Ahei +Date: Fri, 19 Jul 2024 17:06:28 +0800 +Subject: [PATCH] add riscv64 support + +--- + Makefile | 2 +- + efi-rpm-macros.spec.in | 2 +- + macros.efi-srpm.in | 2 ++ + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 37e97a5..166ee97 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,7 +14,7 @@ override EFI_ESP_ROOT=/boot/efi + endif + EFI_ARCHES ?= $(call get-config,arches) + ifeq ($(EFI_ARCHES),) +-override EFI_ARCHES="x86_64 aarch64 %{arm} %{ix86}" ++override EFI_ARCHES="x86_64 aarch64 %{arm} %{ix86} riscv64" + endif + EFI_VENDOR ?= $(call get-config,vendor) + +diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in +index e03262e..64a7109 100644 +--- a/efi-rpm-macros.spec.in ++++ b/efi-rpm-macros.spec.in +@@ -36,7 +36,7 @@ machine bootloaders and tools. + %autosetup -S git_am -n %{name}-@@EFI_SOURCE_VERSION@@ + git config --local --add efi.vendor "%{_efi_vendor_}" + git config --local --add efi.esp-root /boot/efi +-git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}" ++git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86} riscv64" + + %build + %make_build clean all +diff --git a/macros.efi-srpm.in b/macros.efi-srpm.in +index 00503f1..7f258c7 100644 +--- a/macros.efi-srpm.in ++++ b/macros.efi-srpm.in +@@ -37,6 +37,8 @@ + return("aa64") + elseif arch("%{arm}") then + return("arm") ++ elseif arch("riscv64") then ++ return("riscv64") + else + return("none") + end diff --git a/SPECS/efi-rpm-macros/efi-rpm-macros.spec b/SPECS/efi-rpm-macros/efi-rpm-macros.spec new file mode 100644 index 00000000..f67c9ee8 --- /dev/null +++ b/SPECS/efi-rpm-macros/efi-rpm-macros.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global debug_package %{nil} +# The vendor name to use when installing EFI binaries. +%global _efi_vendor_ openruyi + +Name: efi-rpm-macros +Version: 5 +Release: %autorelease +Summary: Common RPM Macros for building EFI-related packages +License: GPL-3.0-or-later +URL: https://github.com/rhboot/efi-rpm-macros +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/%{name}-5.tar.bz2 +BuildSystem: autotools + +# https://github.com/rhboot/efi-rpm-macros/pull/3 +Patch0: 0001-Add-riscv64-support.patch + +BuildOption(build): EFI_ESP_ROOT="/boot/efi" EFI_ARCHES="riscv64" EFI_VENDOR="%{_efi_vendor_}" +BuildOption(install): EFI_ESP_ROOT="/boot/efi" EFI_ARCHES="riscv64" EFI_VENDOR="%{_efi_vendor_}" + +BuildRequires: make + +%description +efi-rpm-macros provides a set of RPM macros for use in EFI-related packages. + +%package -n efi-srpm-macros +Summary: Common SRPM Macros for building EFI-related packages +BuildArch: noarch +Requires: rpm + +%description -n efi-srpm-macros +efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages. + +%package -n efi-filesystem +Summary: The basic directory layout for EFI machines +BuildArch: noarch +Requires: filesystem + +%description -n efi-filesystem +The efi-filesystem package contains the basic directory layout for EFI +machine bootloaders and tools. + +%conf +# No conf + +%check +# no tests + +%files -n efi-srpm-macros +%license LICENSE +%doc README +%{_rpmmacrodir}/macros.efi-srpm +%{_rpmconfigdir}/brp-boot-efi-times + +%files -n efi-filesystem +%defattr(0700,root,root,-) +%dir /boot/efi +%dir /boot/efi/EFI +%dir /boot/efi/EFI/BOOT +%dir /boot/efi/EFI/%{_efi_vendor_} + +%changelog +%{?autochangelog} diff --git a/SPECS/efibootmgr/efibootmgr.spec b/SPECS/efibootmgr/efibootmgr.spec new file mode 100644 index 00000000..fa4f895d --- /dev/null +++ b/SPECS/efibootmgr/efibootmgr.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: jchzhou +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: efibootmgr +Version: 18 +Release: %autorelease +Summary: EFI Boot Manager +License: GPL-2.0-or-later +URL: https://github.com/rhinstaller/efibootmgr +#!RemoteAsset +Source: https://github.com/rhboot/efibootmgr/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.bz2 +BuildSystem: autotools +%global LOADER grub.efi +BuildOption(build): CFLAGS="%{optflags} -flto -fPIE -pie" OS_VENDOR="%{_vendor}" EFI_LOADER="%{LOADER}" EFIDIR="%{_vendor}" +BuildOption(install): DESTDIR=%{buildroot} sbindir=%{_sbindir} EFIDIR="%{_vendor}" + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(efiboot) >= 31 +BuildRequires: pkgconfig(efivar) >= 31 +BuildRequires: pkgconfig(libpci) +BuildRequires: pkgconfig(popt) +BuildRequires: pkgconfig(zlib) + +%description +The EFI Boot Manager allows the user to edit the Intel Extensible +Firmware Interface (EFI) Boot Manager variables. Additional +information about the EFI can be found at +. + +%prep -a +# removing hotfix function declaration: +# https://github.com/rhboot/efibootmgr/issues/128 +sed -e '/extern int efi_set_verbose/d' -i "src/efibootmgr.c" + +# no configure +%conf + +# no tests. +%check + +%files +%license COPYING +%doc README +%{_sbindir}/efiboot* +%{_mandir}/man8/*.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/efivar/efivar.spec b/SPECS/efivar/efivar.spec new file mode 100644 index 00000000..fc4e6da3 --- /dev/null +++ b/SPECS/efivar/efivar.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: efivar +Version: 39 +Release: %autorelease +Summary: Tools to manage UEFI variables +License: LGPL-2.1-only +URL: https://github.com/rhboot/efivar +#!RemoteAsset +Source: https://github.com/rhboot/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(install): libdir=%{_libdir} +BuildRequires: mandoc + +%description +efivar provides a simple command line interface to the UEFI variable facility. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +Development headers required to use libefivar. + +%conf +# efivar has no configuration script + +%files +%license COPYING +%{_bindir}/efivar +%{_bindir}/efisecdb +%{_libdir}/*.so.* +%{_mandir}/man1/* + +%files devel +%{_mandir}/man3/* +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/eigen3/eigen3.spec b/SPECS/eigen3/eigen3.spec new file mode 100644 index 00000000..d7507e52 --- /dev/null +++ b/SPECS/eigen3/eigen3.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: eigen3 +Version: 5.0.0 +Release: %autorelease +Summary: A lightweight C++ template library for vector and matrix math +License: MPL-2.0 AND LGPL-2.1-or-later AND BSD-3-Clause +URL: http://eigen.tuxfamily.org/index.php?title=Main_Page +#!RemoteAsset +Source0: https://gitlab.com/libeigen/eigen/-/archive/%{version}/eigen-%{version}.tar.bz2 +BuildSystem: cmake + +BuildOption(conf): -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/eigen3 + +BuildRequires: cmake +BuildRequires: gcc-c++ + +%description +Eigen is a C++ template library for linear algebra: matrices, vectors, +numerical solvers, and related algorithms. This package contains the +header files needed for development. + +%files +%license COPYING.README COPYING.BSD COPYING.MPL2 +%{_includedir}/eigen3/ +%dir %{_datadir}/eigen3 +%{_datadir}/eigen3/cmake/ +%{_datadir}/pkgconfig/eigen3.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/elfutils/elfutils.spec b/SPECS/elfutils/elfutils.spec new file mode 100644 index 00000000..2f399770 --- /dev/null +++ b/SPECS/elfutils/elfutils.spec @@ -0,0 +1,237 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: elfutils +Version: 0.193 +Release: %autorelease +Summary: Higher-level library to access ELF files +License: GPL-3.0-or-later +Group: Development/Tools/Building +URL: https://sourceware.org/elfutils/ +#!RemoteAsset +Source0: https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2 + +BuildSystem: autotools +BuildOption(conf): --program-prefix=eu- +BuildOption(conf): --disable-debuginfod +BuildOption(conf): --enable-libdebuginfod=dummy +BuildOption(conf): --enable-deterministic-archives + + +BuildRequires: autoconf, automake, bison, flex, gcc-c++, make, pkgconfig +BuildRequires: rpm-devel +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libmicrohttpd) + +%description +elfutils is a collection of utilities and libraries to read, create +and modify ELF binary files, find and handle DWARF debug data, +symbols, thread state and stacktraces for processes and core files. + +%package -n libasm1 +Summary: A collection of utilities and DSOs to handle compiled objects +Group: System/Libraries +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libasm1 +libasm contains the "asm" and "disasm" functions to assemble and +disassamble instructions. (There is only partial support for i686 and +BPF instructions.) This is part of the elfutils package. + +%package -n libasm-devel +Summary: A collection of utilities and DSOs to handle compiled objects +Group: Development/Libraries/C and C++ +Requires: libasm1 = %{version} +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libasm-devel +This package contains the headers and libraries needed to build +applications that require libasm. + +%package -n libelf1 +Summary: Library to read and write ELF files +Group: System/Libraries +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libelf1 +This package provides a high-level library to read and write ELF files. +This is part of the elfutils package. + +%package -n libelf-devel +Summary: Development files for libelf +Group: Development/Libraries/C and C++ +Requires: libelf1 = %{version} +Conflicts: libelf0-devel +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libelf-devel +This package contains the headers and libraries needed to build +applications that require libelf. + +%package -n libdw1 +Summary: Library to access DWARF debugging information +Group: System/Libraries +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libdw1 +This package provides a high-level library to access the DWARF debugging +information. This is part of the elfutils package. + +%package -n libdw-devel +Summary: Development files for libdw +Group: Development/Libraries/C and C++ +Requires: libdw1 = %{version} +Requires: libelf-devel = %{version} +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libdw-devel +This package contains the headers and libraries needed to build +applications that require libdw. + +%package -n libdebuginfod1-dummy +Summary: Library for build-id HTTP ELF/DWARF server +Group: System/Libraries +Provides: libdebuginfod1 = %{version} +License: GPL-2.0-or-later OR LGPL-3.0-or-later + +%description -n libdebuginfod1-dummy +The libdebuginfod1 package contains shared libraries +dynamically loaded from -ldw, which use a debuginfod service +to look up debuginfo and associated data. Also includes a +command-line frontend. +The package is dummy. + +%package -n libdebuginfod-dummy-devel +Summary: Libraries and headers to build debuginfod client applications +Group: Development/Libraries/C and C++ +Provides: libdebuginfod-devel = %{version} +License: GPL-2.0-or-later OR LGPL-3.0-or-later +Requires: libdebuginfod1-dummy = %{version} + +%description -n libdebuginfod-dummy-devel +The libdebuginfod-devel package contains the libraries +to create applications to use the debuginfod service. +The package is dummy. + +%package -n debuginfod-dummy-client +Summary: Command line client for build-id HTTP ELF/DWARF server +Group: Development/Tools/Building +Provides: debuginfod-client = %{version} + +%description -n debuginfod-dummy-client +The elfutils-debuginfod-client package contains a command-line frontend. +The package is dummy. + +%conf -p +autoreconf -fiv +chmod a+x tests/run*.sh + +%install -a +# remove unneeded files +rm -f %{buildroot}/%{_sysconfdir}/profile.d/debuginfod.*sh +rm -f %{buildroot}%{_datadir}/fish/vendor_conf.d/debuginfod.fish +rm -f %{buildroot}%{_mandir}/man8/debuginfod*.8* +rm -rf %{buildroot}/%{_datadir}/fish +ls -lR %{buildroot}/%{_libdir}/libelf* + +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets -n libelf1 +%ldconfig_scriptlets -n libdw1 +%ldconfig_scriptlets -n libasm1 +%ldconfig_scriptlets -n libdebuginfod1-dummy + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS NOTES README THANKS TODO +%{_bindir}/eu-addr2line +%{_bindir}/eu-ar +%{_bindir}/eu-elfclassify +%{_bindir}/eu-elfcmp +%{_bindir}/eu-elfcompress +%{_bindir}/eu-elflint +%{_bindir}/eu-findtextrel +%{_bindir}/eu-make-debug-archive +%{_bindir}/eu-nm +%{_bindir}/eu-objdump +%{_bindir}/eu-ranlib +%{_bindir}/eu-readelf +%{_bindir}/eu-size +%{_bindir}/eu-stack +%{_bindir}/eu-strings +%{_bindir}/eu-strip +%{_bindir}/eu-unstrip +%{_bindir}/eu-srcfiles +%{_mandir}/man1/*.1* + +%files -n libasm1 +%{_libdir}/libasm.so.* +%{_libdir}/libasm-%{version}.so + +%files -n libasm-devel +%{_libdir}/libasm.so +%{_libdir}/libasm.a +%dir %{_includedir}/elfutils +%{_includedir}/elfutils/libasm.h + +%files -n libelf1 +%{_libdir}/libelf.so.* +%{_libdir}/libelf-%{version}.so + +%files -n libelf-devel +%{_libdir}/libelf.so +%{_libdir}/libelf.a +%{_includedir}/libelf.h +%{_includedir}/gelf.h +%{_includedir}/nlist.h +%dir %{_includedir}/elfutils +%{_includedir}/elfutils/elf-knowledge.h +%{_includedir}/elfutils/version.h +%{_libdir}/pkgconfig/libelf.pc +%{_mandir}/man3/elf_*.3* +%{_mandir}/man3/elf32_*.3* +%{_mandir}/man3/elf64_*.3* +%{_mandir}/man3/libelf.3.gz + +%files -n libdw1 +%{_libdir}/libdw.so.* +%{_libdir}/libdw-%{version}.so + +%files -n libdw-devel +%{_libdir}/libdw.a +%{_libdir}/libdw.so +%{_includedir}/dwarf.h +%dir %{_includedir}/elfutils +%{_includedir}/elfutils/libdw.h +%{_includedir}/elfutils/libdwelf.h +%{_includedir}/elfutils/libdwfl.h +%{_includedir}/elfutils/libdwfl_stacktrace.h +%{_includedir}/elfutils/known-dwarf.h +%{_libdir}/pkgconfig/libdw.pc + +%files -n libdebuginfod1-dummy +%{_libdir}/libdebuginfod.so.* +%{_libdir}/libdebuginfod-%{version}.so + +%files -n libdebuginfod-dummy-devel +%{_mandir}/man3/debuginfod_*.3* +%dir %{_includedir}/elfutils +%{_includedir}/elfutils/debuginfod.h +%{_libdir}/libdebuginfod.so +%{_libdir}/pkgconfig/libdebuginfod.pc + +%files -n debuginfod-dummy-client +%{_bindir}/debuginfod-find +%{_mandir}/man1/debuginfod-find.1* +%{_mandir}/man7/debuginfod-client-config.7* + +%changelog +%{?autochangelog} diff --git a/SPECS/ell/ell.spec b/SPECS/ell/ell.spec new file mode 100644 index 00000000..4202b7b8 --- /dev/null +++ b/SPECS/ell/ell.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ell +Version: 0.80 +Release: %autorelease +Summary: Embedded Linux Library +License: LGPL-2.1-or-later +URL: https://01.org/ell +#!RemoteAsset +Source: https://mirrors.kernel.org/pub/linux/libs/ell/ell-%{version}.tar.xz +BuildSystem: autotools + +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: pkg-config +BuildRequires: xz +# for test +BuildRequires: procps-ng + +%description +The "Embedded Linux Library" (ELL) provides a comprehensive set of APIs for +asynchronous programming, event loops, and various utility functions. This package +contains the runtime shared library. + +%package devel +Summary: Development files for the Embedded Linux Library (ELL) +Requires: %{name} = %version + +%description devel +This package contains the header files, pkg-config files, and other development +files for the Embedded Linux Library (ELL). + + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libell.so.* + +%files devel +%{_libdir}/libell.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/ell/ + +%changelog +%{?autochangelog} diff --git a/SPECS/ethtool/0001-netlink-fix-missing-headers-in-text-output.patch b/SPECS/ethtool/0001-netlink-fix-missing-headers-in-text-output.patch new file mode 100644 index 00000000..44fbd7f9 --- /dev/null +++ b/SPECS/ethtool/0001-netlink-fix-missing-headers-in-text-output.patch @@ -0,0 +1,64 @@ +From b70c928661024cd07914feb49122275daab904ea Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Sat, 12 Jul 2025 07:51:05 -0700 +Subject: [PATCH 1/2] netlink: fix missing headers in text output + +The commit under fixes added a NULL-check which prevents us from +printing text headers. Conversions to add JSON support often use: + + print_string(PRINT_FP, NULL, "some text:\n", NULL); + +to print in plain text mode. + +Correct output: + + Channel parameters for vpn0: + Pre-set maximums: + RX: n/a + TX: n/a + Other: n/a + Combined: 1 + Current hardware settings: + RX: n/a + TX: n/a + Other: n/a + Combined: 0 + +With the buggy patch: + + Channel parameters for vpn0: + RX: n/a + TX: n/a + Other: n/a + Combined: 1 + RX: n/a + TX: n/a + Other: n/a + Combined: 0 + +Fixes: fd328ccb3cc0 ("json_print: add NULL check before jsonw_string_field() in print_string()") +Signed-off-by: Jakub Kicinski +--- + json_print.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/json_print.c b/json_print.c +index 4f61640..e07c651 100644 +--- a/json_print.c ++++ b/json_print.c +@@ -143,10 +143,11 @@ void print_string(enum output_type type, + } else if (_IS_FP_CONTEXT(type)) { + if (value) + fprintf(stdout, fmt, value); ++ else ++ fprintf(stdout, fmt); + } + } + +- + /* + * value's type is bool. When using this function in FP context you can't pass + * a value to it, you will need to use "is_json_context()" to have different +-- +2.34.1 + diff --git a/SPECS/ethtool/0002-netlink-fix-print_string-when-the-value-is-NULL.patch b/SPECS/ethtool/0002-netlink-fix-print_string-when-the-value-is-NULL.patch new file mode 100644 index 00000000..b3bb45eb --- /dev/null +++ b/SPECS/ethtool/0002-netlink-fix-print_string-when-the-value-is-NULL.patch @@ -0,0 +1,45 @@ +From 41d6105250c8293eddeb5f9332434728e7da4335 Mon Sep 17 00:00:00 2001 +From: Michel Lind +Date: Thu, 24 Jul 2025 19:48:11 -0500 +Subject: [PATCH 2/2] netlink: fix print_string when the value is NULL + +The previous fix in commit b70c92866102 ("netlink: fix missing headers +in text output") handles the case when value is NULL by still using +`fprintf` but passing no value. + +This fails if `-Werror=format-security` is passed to gcc, as is the +default in distros like Fedora. + +``` +json_print.c: In function 'print_string': +json_print.c:147:25: error: format not a string literal and no format arguments [-Werror=format-security] + 147 | fprintf(stdout, fmt); + | +``` + +Use `fprintf(stdout, "%s", fmt)` instead, using the format string as the +value, since in this case we know it is just a string without format +chracters. + +Reviewed-by: Jakub Kicinski +Signed-off-by: Michel Lind +--- + json_print.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/json_print.c b/json_print.c +index e07c651..75e6cd9 100644 +--- a/json_print.c ++++ b/json_print.c +@@ -144,7 +144,7 @@ void print_string(enum output_type type, + if (value) + fprintf(stdout, fmt, value); + else +- fprintf(stdout, fmt); ++ fprintf(stdout, "%s", fmt); + } + } + +-- +2.34.1 + diff --git a/SPECS/ethtool/ethtool.spec b/SPECS/ethtool/ethtool.spec new file mode 100644 index 00000000..8a86585d --- /dev/null +++ b/SPECS/ethtool/ethtool.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global appstream_id org.kernel.software.network.ethtool + +Name: ethtool +Version: 6.15 +Release: %autorelease +Summary: Settings tool for Ethernet NICs +License: GPL-2.0-only AND GPL-2.0-or-later +URL: https://www.kernel.org/pub/software/network/ethtool +#!RemoteAsset +Source0: https://www.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.sign +Patch1: 0001-netlink-fix-missing-headers-in-text-output.patch +Patch2: 0002-netlink-fix-print_string-when-the-value-is-NULL.patch + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: xz +BuildRequires: gcc +BuildRequires: libmnl-devel + +%description +Ethtool is the standard Linux utility for controlling network drivers and +hardware, particularly for wired Ethernet devices. It can be used to: + + - Get identification and diagnostic information + - Get extended device statistics + - Control speed, duplex, autonegotiation and flow control for Ethernet devices + - Control checksum offload and other hardware offload features + - Control DMA ring sizes and interrupt moderation + - Control receive queue selection for multiqueue devices + - Upgrade firmware in flash memory + +# TODO: make test pass. +%check + +%files +%defattr(-,root,root) +%license COPYING LICENSE +%doc AUTHORS ChangeLog* NEWS README +%{_sbindir}/ethtool +%dir %{_datadir}/bash-completion/ +%dir %{_datadir}/bash-completion/completions/ +%{_datadir}/bash-completion/completions/ethtool +%{_mandir}/man8/ethtool.8* +%{_datadir}/metainfo/%{appstream_id}.metainfo.xml + +%changelog +%{?autochangelog} diff --git a/SPECS/exfatprogs/exfatprogs.spec b/SPECS/exfatprogs/exfatprogs.spec new file mode 100644 index 00000000..92579b74 --- /dev/null +++ b/SPECS/exfatprogs/exfatprogs.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: exfatprogs +Version: 1.2.9 +Release: %autorelease +Summary: Userspace utilities for exFAT filesystems +License: GPL-2.0-only +URL: https://github.com/exfatprogs/exfatprogs +#!RemoteAsset +Source: https://github.com/exfatprogs/exfatprogs/archive/refs/tags/%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --enable-shared=yes +BuildOption(conf): --enable-static=no + +BuildRequires: autoconf automake gcc libtool make + +%description +Utilities for creating, checking, and repairing exFAT filesystems. +This package contains the command-line tools. + +%conf -p +autoreconf -vif + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README.md +%{_sbindir}/dump.exfat +%{_sbindir}/exfat2img +%{_sbindir}/exfatlabel +%{_sbindir}/fsck.exfat +%{_sbindir}/mkfs.exfat +%{_sbindir}/tune.exfat +%{_mandir}/man8/dump.exfat.* +%{_mandir}/man8/exfat2img.* +%{_mandir}/man8/exfatlabel.* +%{_mandir}/man8/fsck.exfat.* +%{_mandir}/man8/mkfs.exfat.* +%{_mandir}/man8/tune.exfat.* + +%changelog +%{?autochangelog} diff --git a/SPECS/expat/expat.spec b/SPECS/expat/expat.spec new file mode 100644 index 00000000..1c680bd3 --- /dev/null +++ b/SPECS/expat/expat.spec @@ -0,0 +1,72 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global unversion 2_7_1 + +Name: expat +Version: 2.7.1 +Release: %autorelease +Summary: XML Parser Toolkit +License: MIT +URL: https://libexpat.github.io +#!RemoteAsset +Source0: https://github.com/libexpat/libexpat/releases/download/R_%{unversion}/expat-%{version}.tar.xz +#!RemoteAsset +Source1: https://github.com/libexpat/libexpat/releases/download/R_%{unversion}/expat-%{version}.tar.xz.asc +# https://www.gentoo.org/inside-gentoo/developers/index.html#sping +# https://github.com/libexpat/libexpat/issues/537#issuecomment-1003796884 +#!RemoteAsset +Source4: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3176ef7db2367f1fca4f306b1f9b0e909af37285#/expat.keyring +BuildSystem: autotools + +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --without-docbook +BuildOption(conf): --disable-static + +BuildRequires: gcc-c++ +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: make +BuildRequires: pkgconfig + +%description +Expat is an XML parser library written in C. It is a stream-oriented +parser in which an application registers handlers for things the +parser might find in the XML document (like start tags). + +%package devel +Summary: Development files for expat, an XML parser toolkit +Requires: expat%{?_isa} = %{version}-%{release} + +%description devel +Expat is an XML parser library written in C. It is a stream-oriented +parser in which an application registers handlers for things the +parser might find in the XML document (like start tags). + +This package contains the development headers for the library found +in libexpat. + +%ldconfig_scriptlets + +%files +%license COPYING +%{_bindir}/* +%{_libdir}/libexpat.so.1 +%{_libdir}/libexpat.so.1.* +%{_mandir}/*/* +%{_datadir}/doc/* + +%files devel +%doc doc/reference.html doc/*.css examples/*.c +%{_libdir}/libexpat.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/*.h +%{_libdir}/cmake/expat-%{version} +%exclude %{_libdir}/libexpat.la + +%changelog +%{?autochangelog} diff --git a/SPECS/expect/0001-expect.patch b/SPECS/expect/0001-expect.patch new file mode 100644 index 00000000..ed1550c7 --- /dev/null +++ b/SPECS/expect/0001-expect.patch @@ -0,0 +1,62 @@ +Index: Makefile.in +=================================================================== +--- Makefile.in.orig ++++ Makefile.in +@@ -331,7 +331,7 @@ pkgIndex.tcl: + pkgIndex.tcl-hand: + (echo 'if {![package vsatisfies [package provide Tcl] @TCL_VERSION@]} {return}' ; \ + echo 'package ifneeded Expect $(PACKAGE_VERSION) \ +- [list load [file join $$dir $(PKG_LIB_FILE)]]'\ ++ [list load $(PKG_LIB_FILE)]'\ + ) > pkgIndex.tcl + + #======================================================================== +@@ -524,29 +524,30 @@ distclean: clean + #======================================================================== + + install-lib-binaries: +- @mkdir -p $(DESTDIR)$(pkglibdir) ++ @mkdir -p $(DESTDIR)$(libdir) + @list='$(lib_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ +- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ +- $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ ++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p"; \ ++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ +- echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ +- $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ ++ echo " $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p"; \ ++ $(RANLIB_STUB) $(DESTDIR)$(libdir)/$$p; \ + else \ +- echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ +- $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ ++ echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \ ++ $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ + fi; \ + ext=`echo $$p|sed -e "s/.*\.//"`; \ + if test "x$$ext" = "xdll"; then \ + lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ + if test -f $$lib; then \ +- echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ +- $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ ++ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \ ++ $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \ + fi; \ + fi; \ + fi; \ + done ++ @mkdir -p $(DESTDIR)$(pkglibdir) + @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + destp=`basename $$p`; \ +@@ -585,7 +586,7 @@ Makefile: $(srcdir)/Makefile.in $(top_b + + uninstall-binaries: + list='$(lib_BINARIES)'; for p in $$list; do \ +- rm -f $(DESTDIR)$(pkglibdir)/$$p; \ ++ rm -f $(DESTDIR)$(libdir)/$$p; \ + done + list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ + p=`basename $$p`; \ diff --git a/SPECS/expect/0002-expect-fixes.patch b/SPECS/expect/0002-expect-fixes.patch new file mode 100644 index 00000000..7713d3b0 --- /dev/null +++ b/SPECS/expect/0002-expect-fixes.patch @@ -0,0 +1,91 @@ +Index: exp_clib.c +=================================================================== +--- exp_clib.c.orig ++++ exp_clib.c +@@ -9,6 +9,7 @@ would appreciate credit if this program + + #include "expect_cf.h" + #include ++#include + #include + #ifdef HAVE_INTTYPES_H + # include +Index: exp_trap.c +=================================================================== +--- exp_trap.c.orig ++++ exp_trap.c +@@ -13,6 +13,7 @@ would appreciate credit if this program + #include + #include + #include ++#include + + #ifdef HAVE_SYS_WAIT_H + #include +Index: exp_win.c +=================================================================== +--- exp_win.c.orig ++++ exp_win.c +@@ -78,7 +78,7 @@ typedef struct { + static exp_winsize winsize = {0, 0}; + static exp_winsize win2size = {0, 0}; + +-int exp_window_size_set(fd) ++void exp_window_size_set(fd) + int fd; + { + #ifdef TIOCSWINSZ +@@ -89,7 +89,7 @@ int fd; + #endif + } + +-int exp_window_size_get(fd) ++void exp_window_size_get(fd) + int fd; + { + #ifdef TIOCGWINSZ +@@ -142,7 +142,7 @@ exp_win_columns_get() + * separate copy of everything above - used for handling user stty requests + */ + +-int exp_win2_size_set(fd) ++void exp_win2_size_set(fd) + int fd; + { + #ifdef TIOCSWINSZ +@@ -153,7 +153,7 @@ int fd; + #endif + } + +-int exp_win2_size_get(fd) ++void exp_win2_size_get(fd) + int fd; + { + #ifdef TIOCGWINSZ +Index: exp_win.h +=================================================================== +--- exp_win.h.orig ++++ exp_win.h +@@ -8,8 +8,8 @@ would appreciate credit if you use this + + #include /* For _ANSI_ARGS_ */ + +-int exp_window_size_set(); +-int exp_window_size_get(); ++void exp_window_size_set(); ++void exp_window_size_get(); + + void exp_win_rows_set _ANSI_ARGS_ ((char* rows)); + char* exp_win_rows_get _ANSI_ARGS_ ((void)); +Index: pty_termios.c +=================================================================== +--- pty_termios.c.orig ++++ pty_termios.c +@@ -9,6 +9,7 @@ would appreciate credit if you use this + + #include + #include ++#include + + #if defined(SIGCLD) && !defined(SIGCHLD) + #define SIGCHLD SIGCLD diff --git a/SPECS/expect/0003-expect-log.patch b/SPECS/expect/0003-expect-log.patch new file mode 100644 index 00000000..f89e90b9 --- /dev/null +++ b/SPECS/expect/0003-expect-log.patch @@ -0,0 +1,20 @@ +--- exp_log.c ++++ exp_log.c +@@ -374,7 +374,7 @@ expDiagChannelOpen(interp,filename) + Tcl_DStringAppend(&tsdPtr->diagFilename,filename,-1); + } + +- tsdPtr->diagChannel = Tcl_OpenFileChannel(interp,newfilename,"a",0777); ++ tsdPtr->diagChannel = Tcl_OpenFileChannel(interp,newfilename,"a",0666); + if (!tsdPtr->diagChannel) { + Tcl_DStringFree(&tsdPtr->diagFilename); + return TCL_ERROR; +@@ -499,7 +499,7 @@ expLogChannelOpen(interp,filename,append + Tcl_DStringAppend(&tsdPtr->logFilename,filename,-1); + } + +- tsdPtr->logChannel = Tcl_OpenFileChannel(interp,newfilename,mode,0777); ++ tsdPtr->logChannel = Tcl_OpenFileChannel(interp,newfilename,mode,0666); + if (!tsdPtr->logChannel) { + Tcl_DStringFree(&tsdPtr->logFilename); + return TCL_ERROR; diff --git a/SPECS/expect/0004-config-guess-sub-update.patch b/SPECS/expect/0004-config-guess-sub-update.patch new file mode 100644 index 00000000..644839c5 --- /dev/null +++ b/SPECS/expect/0004-config-guess-sub-update.patch @@ -0,0 +1,2697 @@ +Index: tclconfig/config.guess +=================================================================== +--- tclconfig/config.guess.orig ++++ tclconfig/config.guess +@@ -1,13 +1,14 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ++# 2011, 2012, 2013 Free Software Foundation, Inc. + +-timestamp='2003-10-07' ++timestamp='2012-12-30' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or ++# 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 +@@ -16,24 +17,22 @@ timestamp='2003-10-07' + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. +- +-# Originally written by Per Bothner . +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). ++# ++# Originally written by Per Bothner. + # +-# This script attempts to guess a canonical system name similar to +-# config.sub. If it succeeds, it prints the system name on stdout, and +-# exits with 0. Otherwise, it exits with 1. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. ++ + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -53,8 +52,9 @@ version="\ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, ++2012, 2013 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -66,11 +66,11 @@ Try \`$me --help' for more information." + while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) +- echo "$timestamp" ; exit 0 ;; ++ echo "$timestamp" ; exit ;; + --version | -v ) +- echo "$version" ; exit 0 ;; ++ echo "$version" ; exit ;; + --help | --h* | -h ) +- echo "$usage"; exit 0 ;; ++ echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. +@@ -104,7 +104,7 @@ set_cc_for_build=' + trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; + trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; + : ${TMPDIR=/tmp} ; +- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || ++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +@@ -123,7 +123,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +-esac ;' ++esac ; set_cc_for_build= ;' + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 1994-08-24) +@@ -141,7 +141,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` | + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -158,6 +158,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; ++ sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched +@@ -166,7 +167,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -176,7 +177,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -196,50 +197,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" +- exit 0 ;; +- amiga:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- arc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- hp300:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mac68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- macppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme68k:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvme88k:OpenBSD:*:*) +- echo m88k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- mvmeppc:OpenBSD:*:*) +- echo powerpc-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- pmax:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sgi:OpenBSD:*:*) +- echo mipseb-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- sun3:OpenBSD:*:*) +- echo m68k-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; +- wgrisc:OpenBSD:*:*) +- echo mipsel-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) +- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} +- exit 0 ;; ++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} ++ exit ;; ++ *:ekkoBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} ++ exit ;; ++ *:SolidBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} ++ exit ;; ++ macppc:MirBSD:*:*) ++ echo powerpc-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; ++ *:MirBSD:*:*) ++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} ++ exit ;; + alpha:OSF1:*:*) +- if test $UNAME_RELEASE = "V4.0"; then ++ case $UNAME_RELEASE in ++ *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` +- fi ++ ;; ++ *5.*) ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ ;; ++ esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU +@@ -277,42 +264,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac ++ # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. +- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit 0 ;; +- Alpha*:OpenVMS:*:*) +- echo alpha-hp-vms +- exit 0 ;; ++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix +- exit 0 ;; ++ exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 +- exit 0 ;; ++ exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 +- exit 0;; ++ exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos +- exit 0 ;; ++ exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos +- exit 0 ;; ++ exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition +- exit 0 ;; ++ exit ;; ++ *:z/VM:*:*) ++ echo s390-ibm-zvmoe ++ exit ;; ++ *:OS400:*:*) ++ echo powerpc-ibm-os400 ++ exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} +- exit 0;; ++ exit ;; ++ arm*:riscos:*:*|arm*:RISCOS:*:*) ++ echo arm-unknown-riscos ++ exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp +- exit 0;; ++ exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then +@@ -320,32 +317,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + else + echo pyramid-pyramid-bsd + fi +- exit 0 ;; ++ exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 +- exit 0 ;; ++ exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 +- exit 0 ;; +- DRS?6000:UNIX_SV:4.2*:7*) ++ exit ;; ++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in +- sparc) echo sparc-icl-nx7 && exit 0 ;; ++ sparc) echo sparc-icl-nx7; exit ;; + esac ;; ++ s390x:SunOS:*:*) ++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; +- i86pc:SunOS:5.*:*) +- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; ++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ++ eval $set_cc_for_build ++ SUN_ARCH="i386" ++ # If there is a compiler, see if it is configured for 64-bit objects. ++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ++ # This test works for both compilers. ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ SUN_ARCH="x86_64" ++ fi ++ fi ++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ++ exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) +@@ -354,10 +370,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` +- exit 0 ;; ++ exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 +@@ -369,10 +385,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac +- exit 0 ;; ++ exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor +@@ -382,38 +398,41 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-atari-mint${UNAME_RELEASE} ++ exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) +- echo m68k-milan-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) +- echo m68k-hades-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) +- echo m68k-unknown-mint${UNAME_RELEASE} +- exit 0 ;; ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; ++ m68k:machten:*:*) ++ echo m68k-apple-machten${UNAME_RELEASE} ++ exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 +- exit 0 ;; ++ exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -437,35 +456,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + exit (-1); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c \ +- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ +- && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && ++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && ++ SYSTEM_NAME=`$dummy $dummyarg` && ++ { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax +- exit 0 ;; ++ exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax +- exit 0 ;; ++ exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix +- exit 0 ;; ++ exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 +- exit 0 ;; ++ exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 +- exit 0 ;; ++ exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + AViiON:dgux:*:*) +- # DG/UX returns AViiON for all architectures +- UNAME_PROCESSOR=`/usr/bin/uname -p` ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ +@@ -478,29 +498,29 @@ EOF + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 +- exit 0 ;; ++ exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 +- exit 0 ;; ++ exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 +- exit 0 ;; ++ exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd +- exit 0 ;; ++ exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` +- exit 0 ;; ++ exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. +- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id +- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id ++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix +- exit 0 ;; ++ exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` +@@ -508,7 +528,7 @@ EOF + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build +@@ -523,15 +543,19 @@ EOF + exit(0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 +- echo rs6000-ibm-aix3.2.5 ++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` ++ then ++ echo "$SYSTEM_NAME" ++ else ++ echo rs6000-ibm-aix3.2.5 ++ fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi +- exit 0 ;; +- *:AIX:*:[45]) ++ exit ;; ++ *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -544,28 +568,28 @@ EOF + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} +- exit 0 ;; ++ exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix +- exit 0 ;; ++ exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 +- exit 0 ;; ++ exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to +- exit 0 ;; # report: romp-ibm BSD 4.3 ++ exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx +- exit 0 ;; ++ exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 +- exit 0 ;; ++ exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd +- exit 0 ;; ++ exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 +- exit 0 ;; ++ exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in +@@ -574,52 +598,52 @@ EOF + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` +- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` +- case "${sc_cpu_version}" in +- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 +- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 +- 532) # CPU_PA_RISC2_0 +- case "${sc_kernel_bits}" in +- 32) HP_ARCH="hppa2.0n" ;; +- 64) HP_ARCH="hppa2.0w" ;; ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 +- esac ;; +- esac ++ esac ;; ++ esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c ++ sed 's/^ //' << EOF >$dummy.c + +- #define _HPUX_SOURCE +- #include +- #include +- +- int main () +- { +- #if defined(_SC_KERNEL_BITS) +- long bits = sysconf(_SC_KERNEL_BITS); +- #endif +- long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) +- { +- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; +- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: +- #if defined(_SC_KERNEL_BITS) +- switch (bits) +- { +- case 64: puts ("hppa2.0w"); break; +- case 32: puts ("hppa2.0n"); break; +- default: puts ("hppa2.0"); break; +- } break; +- #else /* !defined(_SC_KERNEL_BITS) */ +- puts ("hppa2.0"); break; +- #endif +- default: puts ("hppa1.0"); break; +- } +- exit (0); +- } ++ #define _HPUX_SOURCE ++ #include ++ #include ++ ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); ++ ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa +@@ -627,9 +651,19 @@ EOF + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then +- # avoid double evaluation of $set_cc_for_build +- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build +- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null ++ eval $set_cc_for_build ++ ++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating ++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler ++ # generating 64-bit code. GNU and HP use different nomenclature: ++ # ++ # $ CC_FOR_BUILD=cc ./config.guess ++ # => hppa2.0w-hp-hpux11.23 ++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess ++ # => hppa64-hp-hpux11.23 ++ ++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ++ grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else +@@ -637,11 +671,11 @@ EOF + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} +- exit 0 ;; ++ exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +@@ -669,216 +703,269 @@ EOF + exit (0); + } + EOF +- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 ++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 +- exit 0 ;; ++ exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd +- exit 0 ;; ++ exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd +- exit 0 ;; ++ exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix +- exit 0 ;; ++ exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf +- exit 0 ;; ++ exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf +- exit 0 ;; ++ exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi +- exit 0 ;; ++ exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites +- exit 0 ;; ++ exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ exit ;; + *:UNICOS/mp:*:*) +- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' +- exit 0 ;; ++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' ++ exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit 0 ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; ++ 5000:UNIX_System_V:4.*:*) ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:FreeBSD:*:*) +- # Determine whether the default compiler uses glibc. +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #if __GLIBC__ >= 2 +- LIBC=gnu +- #else +- LIBC= +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- # GNU/KFreeBSD systems have a "k" prefix to indicate we are using +- # FreeBSD's kernel, but not the complete OS. +- case ${LIBC} in gnu) kernel_only='k' ;; esac +- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} +- exit 0 ;; ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ case ${UNAME_PROCESSOR} in ++ amd64) ++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ *) ++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ esac ++ exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin +- exit 0 ;; +- i*:MINGW*:*) ++ exit ;; ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; ++ *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 +- exit 0 ;; ++ exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; ++ i*:windows32*:*) ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 ++ exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 +- exit 0 ;; +- x86:Interix*:[34]*) +- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' +- exit 0 ;; ++ exit ;; ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in ++ x86) ++ echo i586-pc-interix${UNAME_RELEASE} ++ exit ;; ++ authenticamd | genuineintel | EM64T) ++ echo x86_64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ IA64) ++ echo ia64-unknown-interix${UNAME_RELEASE} ++ exit ;; ++ esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks +- exit 0 ;; ++ exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix +- exit 0 ;; ++ exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin +- exit 0 ;; ++ exit ;; ++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) ++ echo x86_64-unknown-cygwin ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin +- exit 0 ;; ++ exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` +- exit 0 ;; ++ exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` +- exit 0 ;; ++ exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu +- exit 0 ;; ++ exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix +- exit 0 ;; ++ exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; + arm*:Linux:*:*) ++ eval $set_cc_for_build ++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_EABI__ ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ else ++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_PCS_VFP ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf ++ fi ++ fi ++ exit ;; ++ avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu +- exit 0 ;; +- ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-axis-linux-gnu ++ exit ;; ++ crisv32:Linux:*:*) ++ echo ${UNAME_MACHINE}-axis-linux-gnu ++ exit ;; ++ frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- m68*:Linux:*:*) ++ exit ;; ++ hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; +- mips:Linux:*:*) ++ exit ;; ++ i*86:Linux:*:*) ++ LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +- #undef CPU +- #undef mips +- #undef mipsel +- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel +- #else +- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips +- #else +- CPU= +- #endif ++ #ifdef __dietlibc__ ++ LIBC=dietlibc + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 +- ;; +- mips64:Linux:*:*) ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ;; ++ ia64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m32r*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ m68*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips64 +- #undef mips64el ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mips64el ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips64 ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` +- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit 0 ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu +- exit 0 ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +- exit 0 ;; ++ or32:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ padre:Linux:*:*) ++ echo sparc-unknown-linux-gnu ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +@@ -886,112 +973,71 @@ EOF + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac +- exit 0 ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu ++ exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux +- exit 0 ;; ++ exit ;; + sh64*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +- exit 0 ;; ++ exit ;; ++ tile*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ vax:Linux:*:*) ++ echo ${UNAME_MACHINE}-dec-linux-gnu ++ exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu +- exit 0 ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit 0 ;; +- coff-i386) +- echo "${UNAME_MACHINE}-pc-linux-gnucoff" +- exit 0 ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit 0 ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #ifdef __INTEL_COMPILER +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` +- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 +- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 +- ;; ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ xtensa*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 +- exit 0 ;; ++ exit ;; + i*86:UNIX_SV:4.2MP:2.*) +- # Unixware is an offshoot of SVR4, but it has its own version +- # number series starting with 2... +- # I am not positive that other SVR4 systems won't match this, ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. +- # Use sysv4.2uw... so that sysv4* matches it. ++ # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx +- exit 0 ;; ++ exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop +- exit 0 ;; ++ exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos +- exit 0 ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ exit ;; ++ i*86:syllable:*:*) ++ echo ${UNAME_MACHINE}-pc-syllable ++ exit ;; ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp +- exit 0 ;; ++ exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then +@@ -999,15 +1045,16 @@ EOF + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi +- exit 0 ;; +- i*86:*:5:[78]*) ++ exit ;; ++ i*86:*:5:[678]*) ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} +- exit 0 ;; ++ exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi +- exit 0 ;; ++ exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv +- exit 0 ;; ++ exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv +- exit 0 ;; ++ exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix +- exit 0 ;; +- M68*:*:R3V[567]*:*) +- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; +- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) ++ exit ;; ++ M68*:*:R3V[5678]*:*) ++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; ++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ +- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) +- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && echo i486-ncr-sysv4 && exit 0 ;; ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; ++ NCR*:*:4.2:* | MPRAS*:*:4.2:*) ++ OS_REL='.3' ++ test -r /etc/.relid \ ++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 +- exit 0 ;; ++ exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ exit ;; ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 +- exit 0 ;; ++ exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` +@@ -1099,68 +1159,97 @@ EOF + else + echo ns32k-sni-sysv + fi +- exit 0 ;; +- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says +- echo i586-unisys-sysv4 +- exit 0 ;; ++ exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says ++ echo i586-unisys-sysv4 ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 +- exit 0 ;; ++ exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 +- exit 0 ;; ++ exit ;; ++ i*86:VOS:*:*) ++ # From Paul.Green@stratus.com. ++ echo ${UNAME_MACHINE}-stratus-vos ++ exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos +- exit 0 ;; ++ exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 +- exit 0 ;; ++ exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then +- echo mips-nec-sysv${UNAME_RELEASE} ++ echo mips-nec-sysv${UNAME_RELEASE} + else +- echo mips-unknown-sysv${UNAME_RELEASE} ++ echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit 0 ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos +- exit 0 ;; ++ exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos +- exit 0 ;; ++ exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos +- exit 0 ;; ++ exit ;; ++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ++ echo i586-pc-haiku ++ exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; ++ SX-7:SUPER-UX:*:*) ++ echo sx7-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8:SUPER-UX:*:*) ++ echo sx8-nec-superux${UNAME_RELEASE} ++ exit ;; ++ SX-8R:SUPER-UX:*:*) ++ echo sx8r-nec-superux${UNAME_RELEASE} ++ exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Darwin:*:*) +- case `uname -p` in +- *86) UNAME_PROCESSOR=i686 ;; +- powerpc) UNAME_PROCESSOR=powerpc ;; ++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown ++ case $UNAME_PROCESSOR in ++ i386) ++ eval $set_cc_for_build ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ UNAME_PROCESSOR="x86_64" ++ fi ++ fi ;; ++ unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then +@@ -1168,22 +1257,28 @@ EOF + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:QNX:*:4*) + echo i386-pc-qnx +- exit 0 ;; +- NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) ++ exit ;; ++ NEO-?:NONSTOP_KERNEL:*:*) ++ echo neo-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSE-*:NONSTOP_KERNEL:*:*) ++ echo nse-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux +- exit 0 ;; ++ exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv +- exit 0 ;; ++ exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} +- exit 0 ;; ++ exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 +@@ -1194,33 +1289,55 @@ EOF + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 +- exit 0 ;; ++ exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 +- exit 0 ;; ++ exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex +- exit 0 ;; ++ exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 +- exit 0 ;; ++ exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 +- exit 0 ;; ++ exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 +- exit 0 ;; ++ exit ;; + *:ITS:*:*) + echo pdp10-unknown-its +- exit 0 ;; ++ exit ;; + SEI:*:*:SEIUX) +- echo mips-sei-seiux${UNAME_RELEASE} +- exit 0 ;; ++ echo mips-sei-seiux${UNAME_RELEASE} ++ exit ;; ++ *:DragonFly:*:*) ++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ++ exit ;; ++ *:*VMS:*:*) ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ case "${UNAME_MACHINE}" in ++ A*) echo alpha-dec-vms ; exit ;; ++ I*) echo ia64-dec-vms ; exit ;; ++ V*) echo vax-dec-vms ; exit ;; ++ esac ;; ++ *:XENIX:*:SysV) ++ echo i386-pc-xenix ++ exit ;; ++ i*86:skyos:*:*) ++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' ++ exit ;; ++ i*86:rdos:*:*) ++ echo ${UNAME_MACHINE}-pc-rdos ++ exit ;; ++ i*86:AROS:*:*) ++ echo ${UNAME_MACHINE}-pc-aros ++ exit ;; ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx ++ exit ;; + esac + +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- + eval $set_cc_for_build + cat >$dummy.c < + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 +- "4" ++ "4" + #else +- "" ++ "" + #endif +- ); exit (0); ++ ); exit (0); + #endif + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix"); exit (0); ++ printf ("arm-acorn-riscix\n"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) +@@ -1336,11 +1453,12 @@ main () + } + EOF + +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } + + # Apollos put the system type in the environment. + +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + + # Convex versions that predate uname can use getsysinfo(1) + +@@ -1349,22 +1467,22 @@ then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd +- exit 0 ;; ++ exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit 0 ;; ++ exit ;; + c34*) + echo c34-convex-bsd +- exit 0 ;; ++ exit ;; + c38*) + echo c38-convex-bsd +- exit 0 ;; ++ exit ;; + c4*) + echo c4-convex-bsd +- exit 0 ;; ++ exit ;; + esac + fi + +@@ -1375,7 +1493,9 @@ This script, last modified $timestamp, h + the operating system you are using. It is advised that you + download the most up to date version of the config scripts from + +- ftp://ftp.gnu.org/pub/gnu/config/ ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++and ++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + + If the version you run ($0) is already up to date, please + send the following data and any information you think might be +Index: tclconfig/config.sub +=================================================================== +--- tclconfig/config.sub.orig ++++ tclconfig/config.sub +@@ -1,42 +1,42 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ++# 2011, 2012, 2013 Free Software Foundation, Inc. + +-timestamp='2003-10-07' ++timestamp='2013-01-23' + +-# This file is (in principle) common to ALL GNU software. +-# The presence of a machine in this file suggests that SOME GNU software +-# can handle that machine. It does not imply ALL GNU software can. +-# +-# This file is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or ++# This file 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. ++# 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, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, +-# Boston, MA 02111-1307, USA. +- ++# along with this program; if not, see . ++# + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++ ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -70,8 +70,9 @@ Report bugs and patches to +-main() { ++int main() { + #ifndef WNOHANG + return 0; + #else +@@ -489,7 +489,7 @@ rm -rf wnohang + AC_TRY_RUN([ + #include + #include +-main() { ++int main() { + #ifdef WNOHANG + FILE *fp = fopen("wnohang","w"); + fprintf(fp,"%d",WNOHANG); +@@ -536,6 +536,7 @@ dnl AC_HEADER_EGREP([(void|sighandler_t) + AC_MSG_CHECKING([if signals need to be re-armed]) + AC_TRY_RUN([ + #include ++#include + #define RETSIGTYPE $retsigtype + + int signal_rearms = 0; +@@ -553,7 +554,7 @@ int n; + signal_rearms++; + } + +-main() ++int main() + { + signal(SIGINT,parent_sigint_handler); + +@@ -714,7 +715,8 @@ fi + AC_MSG_CHECKING([for struct sgttyb]) + AC_TRY_RUN([ + #include +-main() ++#include ++int main() + { + struct sgttyb tmp; + exit(0); +@@ -738,7 +740,8 @@ if test $mach -eq 0 ; then + # pty_termios.c is set up to handle pty_termio. + AC_MSG_CHECKING([for struct termio]) + AC_TRY_RUN([#include +- main() ++ #include ++ int main() + { + struct termio tmp; + exit(0); +@@ -760,7 +763,8 @@ if test $mach -eq 0 ; then + # include + # endif + # include +- main() ++# include ++ int main() + { + struct termios tmp; + exit(0); +@@ -782,7 +786,7 @@ AC_TRY_RUN([ + #include + #endif + #include +-main() { ++int main() { + #if defined(TCGETS) || defined(TCGETA) + return 0; + #else +@@ -804,7 +808,7 @@ AC_TRY_RUN([ + #include + #endif + #include +-main() { ++int main() { + #ifdef TIOCGWINSZ + return 0; + #else +@@ -823,7 +827,7 @@ main() { + AC_MSG_CHECKING([for Cray-style ptys]) + SETUID=":" + AC_TRY_RUN([ +-main(){ ++int main(){ + #ifdef CRAY + return 0; + #else +@@ -876,9 +880,10 @@ AC_FUNC_SETPGRP + # + AC_MSG_CHECKING([for SV-style timezone]) + AC_TRY_RUN([ ++void exit(int); + extern char *tzname[2]; + extern int daylight; +-main() ++int main() + { + int *x = &daylight; + char **y = tzname; +Index: exp_tty.h +=================================================================== +--- exp_tty.h.orig ++++ exp_tty.h +@@ -25,5 +25,6 @@ int exp_isecho(void); + void exp_tty_set(Tcl_Interp *interp, exp_tty *tty, int raw, int echo); + int exp_tty_set_simple(exp_tty *tty); + int exp_tty_get_simple(exp_tty *tty); ++int exp_tty_cooked_echo( Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo); + + #endif /* __EXP_TTY_H__ */ +Index: exp_clib.c +=================================================================== +--- exp_clib.c.orig ++++ exp_clib.c +@@ -57,6 +57,8 @@ would appreciate credit if this program + + #include + ++#include "exp_command.h" ++ + #ifdef NO_STDLIB_H + + /* +Index: exp_chan.c +=================================================================== +--- exp_chan.c.orig ++++ exp_chan.c +@@ -35,10 +35,11 @@ + #include "exp_prog.h" + #include "exp_command.h" + #include "exp_log.h" ++#include "exp_event.h" + #include "tcldbg.h" /* Dbg_StdinMode */ + + extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode)); +-static int ExpBlockModeProc _ANSI_ARGS_((ClientData instanceData, ++static int ExpBlockModeProc _ANSI_ARGS_((void* instanceData, + int mode)); + static int ExpCloseProc _ANSI_ARGS_((ClientData instanceData, + Tcl_Interp *interp)); +@@ -58,7 +59,7 @@ static int ExpGetHandleProc _ANSI_ARGS_ + + Tcl_ChannelType expChannelType = { + "exp", /* Type name. */ +- ExpBlockModeProc, /* Set blocking/nonblocking mode.*/ ++ TCL_CHANNEL_VERSION_2, /* version */ + ExpCloseProc, /* Close proc. */ + ExpInputProc, /* Input proc. */ + ExpOutputProc, /* Output proc. */ +@@ -68,6 +69,7 @@ Tcl_ChannelType expChannelType = { + ExpWatchProc, /* Initialize notifier. */ + ExpGetHandleProc, /* Get OS handles out of channel. */ + NULL, /* Close2 proc */ ++ ExpBlockModeProc, /* Set blocking/nonblocking mode.*/ + }; + + typedef struct ThreadSpecificData { +@@ -104,7 +106,7 @@ static Tcl_ThreadDataKey dataKey; + /* ARGSUSED */ + static int + ExpBlockModeProc(instanceData, mode) +- ClientData instanceData; /* Exp state. */ ++ void* instanceData; /* Exp state. */ + int mode; /* The mode to set. Can be one of + * TCL_MODE_BLOCKING or + * TCL_MODE_NONBLOCKING. */ +Index: pty_termios.c +=================================================================== +--- pty_termios.c.orig ++++ pty_termios.c +@@ -98,11 +98,14 @@ with openpty which supports 4000 while p + # include + #endif + ++#include ++ + #include "exp_win.h" + + #include "exp_tty_in.h" + #include "exp_rename.h" + #include "exp_pty.h" ++#include "exp_int.h" + + void expDiagLog(); + void expDiagLogPtr(); diff --git a/SPECS/expect/expect.spec b/SPECS/expect/expect.spec new file mode 100644 index 00000000..d038da3c --- /dev/null +++ b/SPECS/expect/expect.spec @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: expect +Version: 5.45.4 +Release: %autorelease +Summary: A Tool for Automating Interactive Programs +License: OpenRuyi-Public-Domain +URL: https://core.tcl-lang.org/expect/ +#!RemoteAsset +Source: https://downloads.sourceforge.net/expect/expect%{version}.tar.gz +Patch1: 0001-expect.patch +Patch2: 0002-expect-fixes.patch +Patch3: 0003-expect-log.patch +Patch4: 0004-config-guess-sub-update.patch +Patch5: 0005-expect-errorfd.patch +Patch6: 0006-expect-5.45-format-security.patch +Patch7: 0007-expect-fix-implicit.patch +BuildSystem: autotools + +BuildOption(prep): -p0 -n %{name}%{version} +BuildOption(conf): --with-tcl=%{_libdir} +BuildOption(conf): --with-tk=no_tk +BuildOption(conf): --with-tclinclude=%{_includedir} +BuildOption(conf): --enable-shared + +BuildOption(build): CFLAGS="%{optflags} -fPIC -pie -std=gnu89" +BuildOption(build): SHLIB_LD="gcc -shared" +BuildOption(build): pkglibdir=%{_libdir}/tcl/%{name}%{version} + +BuildOption(install): pkglibdir=%{_libdir}/tcl/%{name}%{version} + +BuildRequires: autoconf +BuildRequires: tcl-devel + +%description +Expect is a tool for automating interactive applications like telnet, ftp, passwd, +and more. It is also useful for testing these applications. + +%package devel +Summary: Header Files and C API Documentation for expect +Requires: %{name} = %{version} + +%description devel +This package contains header files and documentation needed for linking to expect +from compiled languages like C or C++. + +%conf -p +autoreconf -fiv + +%install -a +# remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668). +rm -f %{buildroot}%{_bindir}/{cryptdir,decryptdir} +rm -f %{buildroot}%{_mandir}/man1/{cryptdir,decryptdir}.1* +rm -f %{buildroot}%{_bindir}/autopasswd + +ln -s libexpect%{version}.so %{buildroot}%{_libdir}/libexpect.so + +# TODO: Fix tests. +%check + +%ldconfig_scriptlets + +%files +%doc ChangeLog HISTORY INSTALL FAQ NEWS README +%{_bindir}/* +%{_libdir}/tcl/* +%{_libdir}/lib*.so +%exclude %{_libdir}/libexpect.so +%{_mandir}/man1/* + +%files devel +%{_libdir}/libexpect.so +%{_includedir}/* +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/f2fs-tools/0001-f2fs-tools-1.16.0-c23.patch b/SPECS/f2fs-tools/0001-f2fs-tools-1.16.0-c23.patch new file mode 100644 index 00000000..7c785813 --- /dev/null +++ b/SPECS/f2fs-tools/0001-f2fs-tools-1.16.0-c23.patch @@ -0,0 +1,22 @@ +diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h +index f890634..a968380 100644 +--- a/include/f2fs_fs.h ++++ b/include/f2fs_fs.h +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_CONFIG_H + #include +@@ -103,9 +104,6 @@ typedef uint16_t u16; + typedef uint8_t u8; + typedef u32 block_t; + typedef u32 nid_t; +-#ifndef bool +-typedef u8 bool; +-#endif + typedef unsigned long pgoff_t; + typedef unsigned short umode_t; + diff --git a/SPECS/f2fs-tools/f2fs-tools.spec b/SPECS/f2fs-tools/f2fs-tools.spec new file mode 100644 index 00000000..813beddc --- /dev/null +++ b/SPECS/f2fs-tools/f2fs-tools.spec @@ -0,0 +1,74 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: f2fs-tools +Version: 1.16.0 +Release: %autorelease +Summary: Tools for the Flash-Friendly File System (F2FS) +License: GPL-2.0-or-later +URL: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git +#!RemoteAsset +Source: https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/f2fs-tools-%{version}.tar.gz +Patch0: 0001-f2fs-tools-1.16.0-c23.patch +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: m4 +BuildRequires: util-linux-devel +BuildRequires: libtool +BuildRequires: libselinux-devel +BuildRequires: make gcc + +%description +This package provides tools for the Flash-Friendly File System (F2FS), +a filesystem designed for NAND flash memory-based storage devices. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the libraries and header files needed to develop +applications that use the F2FS library. + +%conf -p +autoreconf -fiv + + +%install -a +install -m 644 mkfs/f2fs_format_utils.h %{buildroot}%{_includedir} + +find %{buildroot} -type f -name "*.la" -delete + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS ChangeLog +%{_sbindir}/mkfs.f2fs +%{_sbindir}/fibmap.f2fs +%{_sbindir}/fsck.f2fs +%{_sbindir}/dump.f2fs +%{_sbindir}/parse.f2fs +%{_sbindir}/defrag.f2fs +%{_sbindir}/resize.f2fs +%{_sbindir}/sload.f2fs +%{_sbindir}/f2fs_io +%{_sbindir}/f2fscrypt +%{_sbindir}/f2fslabel +%{_libdir}/*.so.* +%{_mandir}/man8/*f2*.gz + +%files devel +%{_includedir}/*.h +%{_libdir}/*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/fastfetch/fastfetch.spec b/SPECS/fastfetch/fastfetch.spec new file mode 100644 index 00000000..fcd370f2 --- /dev/null +++ b/SPECS/fastfetch/fastfetch.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: fastfetch +Version: 2.54.0 +Release: %autorelease +Summary: Display system information in a stylized manner +URL: https://github.com/fastfetch-cli/fastfetch +#!RemoteAsset +Source: https://github.com/fastfetch-cli/fastfetch/archive/refs/tags/%{version}.tar.gz +License: MIT + +BuildRequires: pkg-config +BuildRequires: python3 +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildSystem: cmake + +# TODO: Add package yyjson. +# BuildOption(conf): -DENABLE_SYSTEM_YYJSON=ON +BuildOption(conf): -DBUILD_FLASHFETCH=OFF +BuildOption(conf): -DBUILD_TESTS=ON +BuildOption(conf): -DINSTALL_LICENSE=OFF +Provides: bundled(yyjson) + +%description +Fastfetch is a tool for fetching system information and displaying it in +a stylized way. Fastfetch displays this information next to a logo of the +system distribution, akin to many similar tools. + +%files +%license LICENSE +%{_bindir}/fastfetch +%{_datadir}/fastfetch/* +%{_datadir}/bash-completion/completions/fastfetch +%{_datadir}/fish/vendor_completions.d/fastfetch.fish +%{_datadir}/zsh/site-functions/_fastfetch +%{_mandir}/man1/fastfetch.1* +%changelog +%{?autochangelog} diff --git a/SPECS/fcoe-utils/0001-fcoemon-add-snprintf-string-precision-modifiers-in-f.patch b/SPECS/fcoe-utils/0001-fcoemon-add-snprintf-string-precision-modifiers-in-f.patch new file mode 100644 index 00000000..acf2b833 --- /dev/null +++ b/SPECS/fcoe-utils/0001-fcoemon-add-snprintf-string-precision-modifiers-in-f.patch @@ -0,0 +1,95 @@ +From c54147b3ada8c37a536a4df90e8707538021ed20 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Fri, 4 Feb 2022 09:21:47 -0800 +Subject: [PATCH 1/1] fcoemon: add snprintf string precision modifiers in + fcm_netif_advance + +GCC 12 is warning of potential snprintf truncations + +fcm_netif.ifname is an IFNAMSIZ array, but formating with %s doesn't +understand that, so add a precision modifier every time we print it to +limit the output. This allows the compiler to verify that the output +buffer is of sufficient length to never truncate. + +Signed-off-by: Chris Leech +--- + fcoemon.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/fcoemon.c b/fcoemon.c +index 8c08bc5a032..b85f276c7df 100644 +--- a/fcoemon.c ++++ b/fcoemon.c +@@ -3135,55 +3135,55 @@ static void fcm_netif_advance(struct fcm_netif *ff) + case FCD_ERROR: + break; + case FCD_GET_DCB_STATE: +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_GET_CONFIG, FEATURE_DCB, 0, +- (u_int) strlen(ff->ifname), ff->ifname); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_SEND_CONF: + snprintf(params, sizeof(params), "%x1%x02", + ff->ff_app_info.enable, + ff->ff_app_info.willing); +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_SET_CONFIG, FEATURE_APP, APP_FCOE_STYPE, +- (u_int) strlen(ff->ifname), ff->ifname, params); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, params); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_GET_PFC_CONFIG: +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_GET_CONFIG, FEATURE_PFC, 0, +- (u_int) strlen(ff->ifname), ff->ifname, ""); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, ""); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_GET_APP_CONFIG: +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_GET_CONFIG, FEATURE_APP, APP_FCOE_STYPE, +- (u_int) strlen(ff->ifname), ff->ifname, ""); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, ""); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_GET_PFC_OPER: +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_GET_OPER, FEATURE_PFC, 0, +- (u_int) strlen(ff->ifname), ff->ifname, ""); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, ""); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_GET_APP_OPER: +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_GET_OPER, FEATURE_APP, APP_FCOE_STYPE, +- (u_int) strlen(ff->ifname), ff->ifname, ""); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, ""); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_GET_PEER: +- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s", ++ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s", + DCB_CMD, CLIF_RSP_VERSION, + CMD_GET_PEER, FEATURE_APP, APP_FCOE_STYPE, +- (u_int) strlen(ff->ifname), ff->ifname, ""); ++ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, ""); + ff->response_pending = fcm_dcbd_request(buf); + break; + case FCD_DONE: +-- +2.34.1 + \ No newline at end of file diff --git a/SPECS/fcoe-utils/0002-Don-t-attempt-to-memcpy-zero-bytes.patch b/SPECS/fcoe-utils/0002-Don-t-attempt-to-memcpy-zero-bytes.patch new file mode 100644 index 00000000..78f4c571 --- /dev/null +++ b/SPECS/fcoe-utils/0002-Don-t-attempt-to-memcpy-zero-bytes.patch @@ -0,0 +1,33 @@ +From 78a5e2e17bba531b41101ca036a5bb1a0d5caca5 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Tue, 6 Feb 2024 21:15:33 -0500 +Subject: [PATCH 2/2] Don't attempt to memcpy() zero bytes + +add_rtattr_nest() is called in several places in the code. As part of +its operation, it calls add_rtattr(nm type, NULL, 0) which results in +NULL and 0 being passed to memcpy(). This fails with -Werror=nonnull +on recent GCC. + +Signed-off-by: Stephen Gallagher +--- + lib/rtnetlink.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c +index 3b8413718997568a20752791807b19c1f299955e..faa60d7c12f68af175d223b6c3c3257a982e4f37 100644 +--- a/lib/rtnetlink.c ++++ b/lib/rtnetlink.c +@@ -172,7 +172,10 @@ static void add_rtattr(struct nlmsghdr *n, int type, const void *data, int alen) + + rta->rta_type = type; + rta->rta_len = len; +- memcpy(RTA_DATA(rta), data, alen); ++ if (alen > 0) ++ { ++ memcpy(RTA_DATA(rta), data, alen); ++ } + n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len); + } + +-- +2.43.0 \ No newline at end of file diff --git a/SPECS/fcoe-utils/fcoe-utils.spec b/SPECS/fcoe-utils/fcoe-utils.spec new file mode 100644 index 00000000..ed4a4eaf --- /dev/null +++ b/SPECS/fcoe-utils/fcoe-utils.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global commit b233050 + +Name: fcoe-utils +Version: 1.0.34 +Release: %autorelease +Summary: Fibre Channel over Ethernet utilities +License: GPL-2.0-only +URL: http://www.open-fcoe.org +#!RemoteAsset +Source: https://github.com/openSUSE/fcoe-utils/archive/%{commit}.tar.gz +Patch0: 0001-fcoemon-add-snprintf-string-precision-modifiers-in-f.patch +Patch1: 0002-Don-t-attempt-to-memcpy-zero-bytes.patch +BuildSystem: autotools + +BuildOption(conf): --with-systemdsystemunitdir=%{_unitdir} + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig(pciaccess) +BuildRequires: pkgconfig(lldpad) +BuildRequires: systemd-rpm-macros +BuildRequires: make gcc +Requires: lldpad +Requires: iproute +Requires: device-mapper-multipath +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +Fibre Channel over Ethernet utilities: fcoeadm for configuration and +fcoemon service for DCB Ethernet QOS filter management. + +%conf -p +./bootstrap.sh + +%install -a +rm -rf %{buildroot}/etc/init.d +install -d %{buildroot}%{_libexecdir}/fcoe +for file in contrib/*.sh debug/*sh; do + install -m 755 ${file} %{buildroot}%{_libexecdir}/fcoe/ +done + +%post +%systemd_post fcoe.service fcoemon.socket + +%preun +%systemd_preun fcoe.service fcoemon.socket + +%postun +%systemd_postun_with_restart fcoe.service fcoemon.socket + +%files +%doc README COPYING QUICKSTART +%{_sbindir}/* +%{_mandir}/man8/* +%{_unitdir}/fcoe.service +%{_unitdir}/fcoemon.socket +%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx +%config(noreplace) %{_sysconfdir}/fcoe/config +%{_datadir}/bash-completion/completions/* +%{_libexecdir}/fcoe/ + +%changelog +%{?autochangelog} diff --git a/SPECS/fdupes/fdupes.spec b/SPECS/fdupes/fdupes.spec new file mode 100644 index 00000000..aa2e2023 --- /dev/null +++ b/SPECS/fdupes/fdupes.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: fdupes +Version: 2.4.0 +Release: %autorelease +Summary: Tool to identify or delete duplicate files +License: MIT +URL: https://github.com/adrianlopezroche/fdupes +#!RemoteAsset +Source0: https://github.com/adrianlopezroche/fdupes/releases/download/v%{version}/fdupes-%{version}.tar.gz +Source1: macros.fdupes +Source2: fdupes_wrapper.cpp +BuildSystem: autotools +BuildOption(conf): --without-ncurses +BuildOption(conf): --without-sqlite + +BuildRequires: gcc-c++ + +%description +FDUPES is a program for identifying or deleting duplicate files +residing within specified directories. + +%build -a +g++ -O2 %{SOURCE2} -o fdupes_wrapper + +%install -a +install -D -m644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.%{name} +install -D -m755 fdupes_wrapper %{buildroot}/usr/lib/rpm/fdupes_wrapper + +%files +%{_bindir}/fdupes +%{_mandir}/man1/fdupes.1* +%{_rpmmacrodir}/macros.%{name} +/usr/lib/rpm/fdupes_wrapper + +%changelog +%{?autochangelog} diff --git a/SPECS/fdupes/fdupes_wrapper.cpp b/SPECS/fdupes/fdupes_wrapper.cpp new file mode 100644 index 00000000..4588d075 --- /dev/null +++ b/SPECS/fdupes/fdupes_wrapper.cpp @@ -0,0 +1,240 @@ +/* + * A little helper to wrap around fdupes and create hard/soft links of the + * dups found. Used in openSUSE rpm. + * + * Copyright 2022 Jiri Slaby + * 2022 Stephan Kulow + * 2022 Stefan Brüns + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +struct file_entry +{ + ino_t inode; + nlink_t link_count; + string path; + + file_entry(ino_t i, nlink_t n, string&& p) + : inode(i), link_count(n), path(move(p)) {} +}; +using dup_set = vector; + +enum class Operation { + Symlink, + Hardlink, + DryRun, +}; + +vector split_paths(const string& path) +{ + string token; + vector paths; + stringstream ss(path); + while (getline(ss, token, '/')) { + if (token == "..") { + paths.pop_back(); + } else if (token != "." || ss.eof()) { + paths.push_back(token); + } + } + return paths; +} + +string merge_paths(const vector& paths) +{ + string path; + for (const auto& s : paths) { + if (s.empty()) + continue; + if (!path.empty()) + path += "/"; + path += s; + } + + return path; +} + +string relative(const string& p1, const string& p2) +{ + vector paths1 = split_paths(p1); + paths1.pop_back(); + vector paths2 = split_paths(p2); + vector paths; + vector::const_iterator it1 = paths1.begin(); + vector::const_iterator it2 = paths2.begin(); + // first remove the common parts + while (it1 != paths1.end() && *it1 == *it2) { + it1++; + it2++; + } + for (; it1 != paths1.end(); ++it1) { + paths.push_back(".."); + } + for (; it2 != paths2.end(); ++it2) { + paths.push_back(*it2); + } + + return merge_paths(paths); +} + +void link_file(const std::string& file, const std::string& target, Operation op) +{ + std::cout << "Linking " << file << " -> " << target << std::endl; + if (op == Operation::DryRun) + return; + + if (unlink(file.c_str())) { + std::cerr << "Removing '" << file << "' failed." << std::endl; + exit(1); + } + int ret; + if (op == Operation::Symlink) { + ret = ::symlink(target.c_str(), file.c_str()); + } else { + ret = link(target.c_str(), file.c_str()); + } + if (ret) { + std::cerr << "Linking '" << file << "' failed." << std::endl; + exit(1); + } +} + +std::string target_for_link(string target, const std::string &file, Operation op) +{ + if (op == Operation::Hardlink) // hardlinks don't care + return target; + + return relative(file, target); +} + +void handle_dups(dup_set& dups, Operation op) +{ + // calculate number of hardlinked duplicates found, for each file + // this may be different than the st_nlink value + std::sort(dups.begin(), dups.end(), [](const file_entry& a, const file_entry& b) { + return a.inode < b.inode; + }); + auto first = dups.begin(); + while (first != dups.end()) { + auto r = equal_range(first, dups.end(), *first, [](const file_entry& a, const file_entry& b) { + return a.inode < b.inode; + }); + for (auto i = r.first; i != r.second; ++i) { + i->link_count = std::distance(r.first, r.second); + } + first = r.second; + } + + // use the file with most hardlinks as target + // in case of ties, sort by name to get a stable order for reproducible builds + std::sort(dups.begin(), dups.end(), [](const file_entry& a, const file_entry& b) { + if (a.link_count == b.link_count) + return a.path > b.path; + return a.link_count > b.link_count; + }); + + const string& target = dups[0].path; + + for (const file_entry& e : dups) { + // skip duplicates hardlinked to first entry + if (e.inode == dups[0].inode) + continue; + + link_file(e.path, target_for_link(target, e.path, op), op); + } +} + +int main(int argc, char** argv) +{ + Operation op = Operation::Hardlink; + std::vector roots; + while (1) { + int result = getopt(argc, argv, "sn"); + if (result == -1) + break; /* end of list */ + switch (result) { + case 's': + op = Operation::Symlink; + break; + case 'n': + op = Operation::DryRun; + break; + default: /* unknown */ + break; + } + } + while (optind < argc) { + std::string root = argv[optind++]; + if (root.front() != '/') { + char buffer[PATH_MAX]; + root = std::string(getcwd(buffer, PATH_MAX)) + '/' + root; + } + roots.push_back(root); + } + + if (roots.empty()) { + std::cerr << "Missing directory argument."; + return 1; + } + /* fdupes options used: + -q: hide progress indicator + -p: don't consider files with different owner/group or permission bits as duplicates + -n: exclude zero-length files from consideration + -r: follow subdirectories + -H: also report hard links as duplicates + */ + std::string command = "fdupes -q -p -r -n"; + if (op != Operation::Symlink) { + /* if we create symlinks, avoid looking at hard links being duplicated. This way + fdupes is faster and won't break them up anyway */ + command += " -H"; + } + for (auto it = roots.begin(); it != roots.end(); ++it) { + command += " '" + *it + "'"; + } + FILE* pipe = popen(command.c_str(), "r"); + if (!pipe) { + throw std::runtime_error("popen() failed!"); + } + std::vector buffer; + buffer.resize(MAXPATHLEN); + + dup_set dups; + while (fgets(buffer.data(), buffer.size(), pipe) != nullptr) { + std::string line = buffer.data(); + if (line.length() < 2) { + handle_dups(dups, op); + dups.clear(); + continue; + } + if (line.back() != '\n') { + std::cerr << "Too long lines? '" << line << "'" << std::endl; + return 1; + } + line.pop_back(); + + struct stat sb; + if (stat(line.c_str(), &sb)) { + std::cerr << "Stat on '" << buffer.data() << "' failed" << std::endl; + return 1; + } + dups.emplace_back(sb.st_ino, 0, std::move(line)); + } + pclose(pipe); + + return 0; +} + diff --git a/SPECS/fdupes/macros.fdupes b/SPECS/fdupes/macros.fdupes new file mode 100644 index 00000000..07bea908 --- /dev/null +++ b/SPECS/fdupes/macros.fdupes @@ -0,0 +1 @@ +%fdupes /usr/lib/rpm/fdupes_wrapper diff --git a/SPECS/file/file.spec b/SPECS/file/file.spec new file mode 100644 index 00000000..eac6fa27 --- /dev/null +++ b/SPECS/file/file.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: file +Buildsystem: autotools +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-fsect-man5 +BuildRequires: bash >= 4.0 +BuildRequires: libtool +BuildRequires: autoconf +BuildRequires: make +URL: http://www.darwinsys.com/file/ +# +# Set Version also in python-magic.spec +Version: 5.46 +Release: %autorelease +Summary: A Tool to Determine File Types +License: BSD-2-Clause +#!RemoteAsset +Source0: https://www.astron.com/pub/file/file-%{version}.tar.gz +#!RemoteAsset +Source4: https://www.astron.com/pub/file/file-%{version}.tar.gz.asc + +%description +With the file command, you can obtain information on the file type of a +specified file. File type recognition is controlled by the file +/etc/magic, which contains the classification criteria. This command is +used by apsfilter to permit automatic printing of different file types. + + +%package devel +Summary: Development files for libmagic, a library to determine file types +Requires: %{name} = %{version} +Requires: glibc-devel + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that require the magic "file" interface. + +%conf -p +autoreconf -fiv + +%ldconfig_scriptlets + +%files +%defattr (-,root,root) +%attr(755,root,root) %{_bindir}/file +%{_libdir}/lib*.so.* +%{_datadir}/misc/magic.mgc +%doc %{_mandir}/man1/file.1.gz +%license COPYING +%doc AUTHORS NEWS ChangeLog + +%files devel +%defattr (-,root,root) +%{_libdir}/lib*.so +%{_includedir}/magic.h +%{_libdir}/pkgconfig/libmagic.pc +%doc %{_mandir}/man3/libmagic.3.gz +%defattr (-,root,root) +%doc %{_mandir}/man5/magic.5.gz +%license COPYING +%doc README.DEVELOPER AUTHORS NEWS ChangeLog + +%changelog +%{?autochangelog} diff --git a/SPECS/filesystem/filesystem.spec b/SPECS/filesystem/filesystem.spec new file mode 100644 index 00000000..70e7c3e9 --- /dev/null +++ b/SPECS/filesystem/filesystem.spec @@ -0,0 +1,316 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: filesystem +Version: 3.18 +Release: %autorelease +Summary: The basic directory layout for a Linux system +License: LicenseRef-openruyi-Public-Domain +URL: https://pagure.io/filesystem +#!RemoteAsset +Source0: https://pagure.io/filesystem/raw/master/f/lang-exceptions +Source1: iso_639.sed +Source2: iso_3166.sed + +BuildRequires: iso-codes +Requires(pre): setup + +Provides: filesystem-afs = %{version}-%{release} +Obsoletes: filesystem-afs <= 3.14-2 + +%description +The filesystem package is one of the basic packages that is installed +on a Linux system. Filesystem contains the basic directory layout +for a Linux operating system, including the correct permissions for +the directories. + +%package content +Summary: Directory ownership content of the filesystem package +License: LicenseRef-openruyi-Public-Domain + +%description content +This subpackage of filesystem package contains just the file with +the directories owned by the filesystem package. This can be used +during the build process instead of calling rpm -ql filesystem. + +%prep +rm -f $RPM_BUILD_DIR/filelist + +%build + +%install +rm -rf %{buildroot} +mkdir %{buildroot} +install -p -c -m755 %SOURCE1 %{buildroot}/iso_639.sed +install -p -c -m755 %SOURCE2 %{buildroot}/iso_3166.sed + +cd %{buildroot} + +Paths=( + afs boot dev \ + etc/{X11/{applnk,fontpath.d,xinit/{xinitrc,xinput}.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},skel,sysconfig,pki,bash_completion.d,rwtab.d,statetab.d} \ + home media mnt opt root run srv tmp \ + usr/{bin,games,include,lib,libexec,%{_lib}/{bpf,games,X11,pm-utils/{module.d,power.d,sleep.d},debug/{.dwz,usr},games,locale,modules,sysimage},local/{bin,etc,games,lib,%{_lib}/bpf,sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},share/{aclocal,appdata,applications,augeas/lenses,backgrounds,bash-completion{,/completions,/helpers},desktop-directories,dict,doc,empty,fish/vendor_completions.d,games,gnome,help,icons,idl,info,licenses,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},metainfo,mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11/fonts,wayland-sessions,zsh/site-functions},src,src/kernels,src/debug} \ + var/{adm,empty,ftp,lib/{games,misc,rpm-state},local,log,nis,preserve,spool/{mail,lpd},tmp,db,cache/bpf,opt,games,yp} +) +for i in "${Paths[@]}"; do + mkdir -p "$i" +done + +ln -snf ../var/tmp usr/tmp +ln -snf spool/mail var/mail +ln -snf usr/bin bin +ln -snf bin usr/sbin +ln -snf usr/sbin sbin +ln -snf usr/lib lib +ln -snf usr/%{_lib} %{_lib} +ln -snf ../run var/run +ln -snf ../run/lock var/lock +ln -snf usr/bin usr/%{_lib}/debug/bin +ln -snf usr/lib usr/%{_lib}/debug/lib +ln -snf ../.dwz usr/%{_lib}/debug/usr/.dwz +ln -snf usr/sbin usr/%{_lib}/debug/sbin + +sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \ + >%{buildroot}/iso_639.tab +sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \ + >%{buildroot}/iso_3166.tab + +grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do + [[ "$d" =~ "^Reserved" ]] && continue + [[ "$d" =~ "^No linguistic" ]] && continue + + locale=$c + if [ "$locale" = "XX" ]; then + locale=$b + fi + echo "%lang(${locale}) /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist + echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${locale}" >>$RPM_BUILD_DIR/filelist +done +cat %{SOURCE0} | grep -v "^#" | grep -v "^$" | while read loc ; do + locale=$loc + locality= + special= + [[ "$locale" =~ "@" ]] && locale=${locale%%%%@*} + [[ "$locale" =~ "_" ]] && locality=${locale##*_} + [[ "$locality" =~ "." ]] && locality=${locality%%%%.*} + [[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc + + # If the locality is not official, skip it + if [ -n "$locality" ]; then + grep -q "^$locality" %{buildroot}/iso_3166.tab || continue + fi + # If the locale is not official and not special, skip it + if [ -z "$special" ]; then + egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \ + %{buildroot}/iso_639.tab || continue + fi + echo "%lang(${locale}) /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist + echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${loc}" >> $RPM_BUILD_DIR/filelist +done + +rm -f %{buildroot}/iso_639.tab +rm -f %{buildroot}/iso_639.sed +rm -f %{buildroot}/iso_3166.tab +rm -f %{buildroot}/iso_3166.sed + +cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do + mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES +done + +cat $RPM_BUILD_DIR/filelist | grep "/share/man" | while read a b c d; do + mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p} +done + +for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do + echo "/usr/share/man/$i" >>$RPM_BUILD_DIR/filelist +done + +mkdir -p %{buildroot}/usr/share/filesystem +#find all dirs in the buildroot owned by filesystem and store them +find %{buildroot} -mindepth 0 | sed -e 's|%{buildroot}|/|' -e 's|//|/|' \ + | LC_ALL=C sort | grep -v filesystem >%{buildroot}%{_datadir}/filesystem/paths + +%pretrans -p +--# If we are running in pretrans in a fresh root, there is no /usr and +--# symlinks. We cannot be sure, to be the very first rpm in the +--# transaction list. Let's create the needed base directories and symlinks +--# here, to place the files from other packages in the right locations. +--# When our rpm is unpacked by cpio, it will set all permissions and modes +--# later. +posix.mkdir("/usr") +posix.mkdir("/usr/bin") +posix.symlink("bin", "/usr/sbin") +posix.mkdir("/usr/lib") +posix.mkdir("/usr/lib/debug") +posix.mkdir("/usr/lib/debug/usr/") +posix.mkdir("/usr/lib/debug/usr/bin") +posix.mkdir("/usr/lib/debug/usr/sbin") +posix.mkdir("/usr/lib/debug/usr/lib") +posix.mkdir("/usr/lib/debug/usr/%{_lib}") +posix.mkdir("/usr/%{_lib}") +posix.symlink("usr/bin", "/bin") +posix.symlink("usr/sbin", "/sbin") +posix.symlink("usr/lib", "/lib") +posix.symlink("usr/bin", "/usr/%{_lib}/debug/bin") +posix.symlink("usr/lib", "/usr/%{_lib}/debug/lib") +posix.symlink("usr/%{_lib}", "/usr/%{_lib}/debug/%{_lib}") +posix.symlink("../.dwz", "/usr/%{_lib}/debug/usr/.dwz") +posix.symlink("usr/sbin", "/usr/%{_lib}/debug/sbin") +posix.symlink("usr/%{_lib}", "/%{_lib}") +posix.mkdir("/run") +posix.mkdir("/proc") +posix.mkdir("/sys") +posix.chmod("/proc", 0555) +posix.chmod("/sys", 0555) +st = posix.stat("/media") +if st and st.type == "link" then + os.remove("/media") +end +posix.mkdir("/var") +posix.symlink("../run", "/var/run") +posix.symlink("../run/lock", "/var/lock") +return 0 + +%posttrans -p +--# we need to restorecon on some dirs created in %pretrans or by other packages +if posix.access ("/usr/sbin/restorecon", "x") then + rpm.execute("/usr/sbin/restorecon", "/var", "/var/run", "/var/lock", "/sys", "/boot", "/dev", "/media", "/afs") + rpm.execute("/usr/sbin/restorecon", "-r", "/usr/lib/debug") +end + +%files content +%dir %{_datadir}/filesystem +%{_datadir}/filesystem/paths + + + +%files -f filelist +%defattr(0755,root,root,0755) +%dir %attr(555,root,root) / +/bin +%attr(555,root,root) /boot +%attr(555,root,root) /afs +/dev +%dir /etc +/etc/X11 +/etc/xdg +/etc/opt +/etc/pm +/etc/skel +/etc/sysconfig +/etc/pki +/etc/bash_completion.d/ +%dir /etc/rwtab.d +%dir /etc/statetab.d +/home +/lib +%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64 +/%{_lib} +%endif +/media +%dir /mnt +%dir /opt +%ghost %attr(555,root,root) /proc +%attr(550,root,root) /root +/run +/sbin +/srv +%ghost %attr(555,root,root) /sys +%attr(1777,root,root) /tmp +%dir /usr +%attr(555,root,root) /usr/bin +/usr/games +/usr/include +%dir %attr(555,root,root) /usr/%{_lib} +%dir /usr/%{_lib}/sysimage +%dir /usr/%{_lib}/locale +%dir /usr/%{_lib}/modules +%dir /usr/%{_lib}/debug +%dir /usr/%{_lib}/debug/.dwz +%ghost /usr/%{_lib}/debug/bin +%ghost /usr/%{_lib}/debug/%{_lib} +%ghost %dir /usr/%{_lib}/debug/usr +%ghost /usr/%{_lib}/debug/usr/bin +%ghost /usr/%{_lib}/debug/usr/sbin +%ghost /usr/%{_lib}/debug/usr/%{_lib} +%ghost /usr/%{_lib}/debug/usr/.dwz +%ghost /usr/%{_lib}/debug/sbin +%attr(555,root,root) /usr/%{_lib}/games +%ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64 +%attr(555,root,root) /usr/%{_lib} +%attr(555,root,root) /usr/lib +%else +%attr(555,root,root) /usr/%{_lib}/bpf +%attr(555,root,root) /usr/%{_lib}/X11 +%attr(555,root,root) /usr/%{_lib}/pm-utils +%endif +/usr/libexec +/usr/local +%attr(555,root,root) /usr/sbin +%dir /usr/share +/usr/share/aclocal +/usr/share/appdata +/usr/share/applications +/usr/share/augeas +/usr/share/backgrounds +%dir /usr/share/bash-completion +/usr/share/bash-completion/completions +/usr/share/bash-completion/helpers +/usr/share/desktop-directories +/usr/share/dict +/usr/share/doc +%attr(555,root,root) %dir /usr/share/empty +/usr/share/fish +/usr/share/games +/usr/share/gnome +/usr/share/help +/usr/share/icons +/usr/share/idl +/usr/share/info +%dir /usr/share/licenses +%dir /usr/share/locale +%dir /usr/share/man +/usr/share/metainfo +/usr/share/mime-info +/usr/share/misc +/usr/share/omf +/usr/share/pixmaps +/usr/share/sounds +/usr/share/themes +/usr/share/xsessions +%dir /usr/share/X11 +/usr/share/X11/fonts +/usr/share/wayland-sessions +/usr/share/zsh +/usr/src +/usr/tmp +%dir /var +/var/adm +%dir /var/cache +/var/cache/bpf +/var/db +/var/empty +/var/ftp +/var/games +/var/lib +/var/local +%ghost /var/lock +/var/log +/var/mail +/var/nis +/var/opt +/var/preserve +%ghost /var/run +%dir /var/spool +%attr(755,root,root) /var/spool/lpd +%attr(775,root,mail) /var/spool/mail +%attr(1777,root,root) /var/tmp +/var/yp + +%changelog +%{?autochangelog} diff --git a/SPECS/filesystem/iso_3166.sed b/SPECS/filesystem/iso_3166.sed new file mode 100644 index 00000000..705dbdbe --- /dev/null +++ b/SPECS/filesystem/iso_3166.sed @@ -0,0 +1,31 @@ +1,/\)!{ + x + s/^$// + # we are on the first iso-code--nothing to process here + t + # process and write to output + s/\s\+/ /g + s/!! + # use '%' as a separator of parsed and unparsed input + s/\(.*\)alpha_2_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/ + s/\([^%]\+\)%\(.*\)alpha_3_code="\([^"]\+\)"\(.*\)/\1% \2 \4/ + # clear subst. memory for the next t + t clear + :clear + s/\([^%]\+\)%\(.*\)numeric_code="\([^"]\+\)"\(.*\)/\1% \2 \4/ + t name + # no 3166 code--write xx + s/%/\tXX %/ + :name + s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/ + s/ \t/\t/g + p + b + :noout +} + +H diff --git a/SPECS/filesystem/iso_639.sed b/SPECS/filesystem/iso_639.sed new file mode 100644 index 00000000..e7e4d051 --- /dev/null +++ b/SPECS/filesystem/iso_639.sed @@ -0,0 +1,31 @@ +1,/\)!{ + x + s/^$// + # we are on the first iso-code--nothing to process here + t + # process and write to output + s/\s\+/ /g + s/!! + # use '%' as a separator of parsed and unparsed input + s/\(.*\)iso_639_2T_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/ + s/\([^%]\+\)%\(.*\)iso_639_2B_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/ + # clear subst. memory for the next t + t clear + :clear + s/\([^%]\+\)%\(.*\)iso_639_1_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/ + t name + # no 639-1 code--write xx + s/%/\tXX %/ + :name + s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/ + s/ \t/\t/g + p + b + :noout +} + +H diff --git a/SPECS/filesystem/lang-exceptions b/SPECS/filesystem/lang-exceptions new file mode 100644 index 00000000..f4892e0f --- /dev/null +++ b/SPECS/filesystem/lang-exceptions @@ -0,0 +1,213 @@ +# This file contains a list of locality-specifc locales for which we ship +# translations. +# +# The easiest way to generate this file is something along the lines of: +# +# repoquery -qal | awk -F '/' '/^\/usr\/share\/locale\/[a-z]*[_@]+/ { print $5 }' | sort -u +# +# and then sorting out the various invalid entires. (all_languages, locales +# with charset definitions (.UTF-8, etc.)) +af_ZA +agr +aln +ar_DZ +ar_SY +ayc +aym +az_AZ +az_IR +be@latin +bg_BG +bn_BD +bn_IN +brx +bs_BA +ca.us-ascii +ca@valencia +ca_AD +ca_ES +ca_FR +ca_IT +cgg +ckb +cmn +cn +cs.cp1250 +cs_CZ +da_DK +de-CH +de.us-ascii +de@hebrew +de_AT +de_CH +de_DE +el_GR +en@arabic +en@boldquot +en@cyrillic +en@greek +en@hebrew +en@piglatin +en@quot +en@shaw +en_AU +en_CA +en_CZ +en_GB +en_IE +en_NZ +en_US +en_US@piglatin +en_ZA +es.us-ascii +es_419 +es_AR +es_CL +es_CO +es_CR +es_DO +es_EC +es_ES +es_GT +es_HN +es_MX +es_NI +es_PA +es_PE +es_PR +es_PY +es_SV +es_US +es_UY +es_VE +et_EE +eu_ES +fa_AF +fa_IR +fi_FI +fr.us-ascii +fr_CA +fr_CH +fr_FR +frp +gl_ES +gom +gom@latin +gos +guc +he_IL +hi_IN +hne +hr_HR +hu_HU +hus +ibo +id_ID +it_IT +ja.euc-jp +ja_JP +ka_GE +km_KH +ko_KO +ko_KR +kok@latin +ks@aran +ks@devanagari +ksw +ku_IQ +kw@kkcor +kw@uccor +kw_GB +l10n +lo_LA +lt_LT +ltg +lv_LV +mhr +mk_MK +ml_IN +mni@beng +mni@bengali +mni@meiteimayek +mnk +mr_IN +ms_MY +mvo +my_MM +nan +nb_NO +nl.us-ascii +nl_BE +nl_NL +nn_NO +no.us-ascii +no_NO +or_IN +pbs +pis +pl_PL +pms +pt.us-ascii +pt_BR +pt_BR.us-ascii +pt_PT +quy +quz +ro_RO +ru_RU +ru_RU.KOI8-R +rue +sat@deva +sat@olchiki +sd@deva +shs +si_LK +sk.cp1250 +sk_SK +sl_SI +sp +sq_AL +sr@Latn +sr@ije +sr@ijekavian +sr@ijekavianlatin +sr@latin +sr_Cyrl +sr_Latn +sr_ME +sr_RS +sr_RS@latin +srd +sv_SE +szl +ta_IN +ta_LK +th_TH +tl_PH +ton +tr_TR +tt@iqtelif +tt_RU +tzm +tzo +ua +uk_UA +ur_PK +uz@Cyrl +uz@Latn +uz@cyrillic +vec +ven +vi_VN +wae +wba +zam +zh-Hans +zh-Hant +zh_CN +zh_CN.GB2312 +zh_HK +zh_Hans_CN +zh_Hant_TW +zh_TW +zh_TW.Big5 diff --git a/SPECS/findutils/findutils-avoid-crash-system-loop.patch b/SPECS/findutils/findutils-avoid-crash-system-loop.patch new file mode 100644 index 00000000..d5290f27 --- /dev/null +++ b/SPECS/findutils/findutils-avoid-crash-system-loop.patch @@ -0,0 +1,56 @@ +Index: findutils-4.10.0/find/ftsfind.c +=================================================================== +--- findutils-4.10.0.orig/find/ftsfind.c ++++ findutils-4.10.0/find/ftsfind.c +@@ -188,27 +188,6 @@ visit (FTS *p, FTSENT *ent, struct stat + } + } + +-static const char* +-partial_quotearg_n (int n, char *s, size_t len, enum quoting_style style) +-{ +- if (0 == len) +- { +- return quotearg_n_style (n, style, ""); +- } +- else +- { +- char saved; +- const char *result; +- +- saved = s[len]; +- s[len] = 0; +- result = quotearg_n_style (n, style, s); +- s[len] = saved; +- return result; +- } +-} +- +- + /* We've detected a file system loop. This is caused by one of + * two things: + * +@@ -218,7 +197,7 @@ partial_quotearg_n (int n, char *s, size + * + * 2. We have hit a real cycle in the directory hierarchy. In this + * case, we issue a diagnostic message (POSIX requires this) and we +- * skip that directory entry. ++ * will skip that directory entry. + */ + static void + issue_loop_warning (FTSENT * ent) +@@ -241,12 +220,8 @@ issue_loop_warning (FTSENT * ent) + */ + error (0, 0, + _("File system loop detected; " +- "%s is part of the same file system loop as %s."), +- safely_quote_err_filename (0, ent->fts_path), +- partial_quotearg_n (1, +- ent->fts_cycle->fts_path, +- ent->fts_cycle->fts_pathlen, +- options.err_quoting_style)); ++ "the following directory is part of the cycle: %s"), ++ safely_quote_err_filename (0, ent->fts_path)); + } + } + diff --git a/SPECS/findutils/findutils-xautofs.patch b/SPECS/findutils/findutils-xautofs.patch new file mode 100644 index 00000000..6a0e302f --- /dev/null +++ b/SPECS/findutils/findutils-xautofs.patch @@ -0,0 +1,128 @@ +--- + doc/find.texi | 4 ++++ + find/defs.h | 3 +++ + find/find.1 | 3 +++ + find/ftsfind.c | 6 ++++++ + find/parser.c | 12 ++++++++++++ + find/util.c | 4 +++- + 6 files changed, 31 insertions(+), 1 deletion(-) + +Index: doc/find.texi +=================================================================== +--- a/doc/find.texi.orig ++++ b/doc/find.texi +@@ -1607,6 +1607,10 @@ them. + There are two ways to avoid searching certain filesystems. One way is + to tell @code{find} to only search one filesystem: + ++@deffn Option -xautofs ++Don't descend directories on autofs filesystems. ++@end deffn ++ + @deffn Option -xdev + @deffnx Option -mount + Don't descend directories on other filesystems. These options are +Index: find/defs.h +=================================================================== +--- a/find/defs.h.orig ++++ b/find/defs.h +@@ -557,6 +557,9 @@ struct options + /* If true, don't cross filesystem boundaries. */ + bool stay_on_filesystem; + ++ /* If true, don't descend directores on autofs filesystems */ ++ bool bypass_autofs; ++ + /* If true, we ignore the problem where we find that a directory entry + * no longer exists by the time we get around to processing it. + */ +Index: find/find.1 +=================================================================== +--- a/find/find.1.orig ++++ b/find/find.1 +@@ -654,6 +654,9 @@ to stat them; this gives a significant i + .IP "\-version, \-\-version" + Print the \fBfind\fR version number and exit. + ++.IP \-xautofs ++Don't descend directories on autofs filesystems. ++ + .IP \-xdev + Don't descend directories on other filesystems. + +Index: find/ftsfind.c +=================================================================== +--- a/find/ftsfind.c.orig ++++ b/find/ftsfind.c +@@ -433,6 +433,12 @@ consider_visiting (FTS *p, FTSENT *ent) + } + } + ++ if (options.bypass_autofs && ++ 0 == strcmp ("autofs", filesystem_type (&statbuf, ent->fts_name))) ++ { ++ fts_set(p, ent, FTS_SKIP); /* descend no further */ ++ } ++ + if ( (ent->fts_info == FTS_D) && !options.do_dir_first ) + { + /* this is the preorder visit, but user said -depth */ +Index: find/parser.c +=================================================================== +--- a/find/parser.c.orig ++++ b/find/parser.c +@@ -150,6 +150,7 @@ static bool parse_used (const s + static bool parse_user (const struct parser_table*, char *argv[], int *arg_ptr); + static bool parse_wholename (const struct parser_table*, char *argv[], int *arg_ptr); + static bool parse_xdev (const struct parser_table*, char *argv[], int *arg_ptr); ++static bool parse_xautofs (const struct parser_table*, char *argv[], int *arg_ptr); + static bool parse_ignore_race (const struct parser_table*, char *argv[], int *arg_ptr); + static bool parse_noignore_race (const struct parser_table*, char *argv[], int *arg_ptr); + static bool parse_warn (const struct parser_table*, char *argv[], int *arg_ptr); +@@ -309,6 +310,7 @@ static struct parser_table const parse_t + PARSE_TEST_NP ("wholename", wholename), /* GNU, replaced -path, but now -path is standardized since POSIX 2008 */ + {ARG_TEST, "writable", parse_accesscheck, pred_writable}, /* GNU, 4.3.0+ */ + PARSE_OPTION ("xdev", xdev), /* POSIX */ ++ PARSE_OPTION ("xautofs", xautofs), + PARSE_TEST ("xtype", xtype), /* GNU */ + #ifdef UNIMPLEMENTED_UNIX + /* It's pretty ugly for find to know about archive formats. +@@ -2490,6 +2492,16 @@ parse_xdev (const struct parser_table* e + } + + static bool ++parse_xautofs(const struct parser_table* entry, char **argv, int *arg_ptr) ++{ ++ (void) argv; ++ (void) arg_ptr; ++ (void) entry; ++ options.bypass_autofs = true; ++ return true; ++} ++ ++static bool + parse_ignore_race (const struct parser_table* entry, char **argv, int *arg_ptr) + { + options.ignore_readdir_race = true; +Index: find/util.c +=================================================================== +--- a/find/util.c.orig ++++ b/find/util.c +@@ -181,7 +181,8 @@ Positional options (always true):\n\ + HTL (_("\n\ + Normal options (always true, specified before other expressions):\n\ + -depth -files0-from FILE -maxdepth LEVELS -mindepth LEVELS\n\ +- -mount -noleaf -xdev -ignore_readdir_race -noignore_readdir_race\n")); ++ -mount -noleaf -xdev -ignore_readdir_race -noignore_readdir_race\n\ ++ -xautofs\n")); + HTL (_("\n\ + Tests (N can be +N or -N or N):\n\ + -amin N -anewer FILE -atime N -cmin N -cnewer FILE -context CONTEXT\n\ +@@ -1027,6 +1028,7 @@ set_option_defaults (struct options *p) + + p->full_days = false; + p->stay_on_filesystem = false; ++ p->bypass_autofs = false; + p->ignore_readdir_race = false; + + if (p->posixly_correct) diff --git a/SPECS/findutils/findutils.spec b/SPECS/findutils/findutils.spec new file mode 100644 index 00000000..82143d69 --- /dev/null +++ b/SPECS/findutils/findutils.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: findutils +Version: 4.10.0 +Release: %autorelease +Summary: The GNU versions of find utilities (find and xargs) +License: GPL-3.0-or-later +Group: Productivity/File utilities +URL: https://www.gnu.org/software/findutils/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig +#!RemoteAsset +Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=%{name}&download=1&file=./%{name}.keyring +# adds a new option -xautofs to find to not descend into directories on autofs file systems +Patch0: findutils-xautofs.patch +# https://git.savannah.gnu.org/cgit/findutils.git/commit/?id=e5d6eb919b9 +Patch1: findutils-avoid-crash-system-loop.patch + +BuildRequires: automake + +BuildSystem: autotools +BuildOption(conf): --libexecdir=%{_libdir}/find +BuildOption(conf): --localstatedir=%{_localstatedir}/lib + +# BuildRequire dejagnu for 'runtest' to execute all tests. +BuildRequires: dejagnu +BuildRequires: texinfo +Provides: find = %{version} +Obsoletes: find < %{version} +BuildRequires: libselinux-devel + +%description +The findutils package contains programs which will help you locate +files on your system. The find utility searches through a hierarchy +of directories looking for files which match a certain set of criteria +(such as a file name pattern). The xargs utility builds and executes +command lines from standard input arguments (usually lists of file +names generated by the find command). + +You should install findutils because it includes tools that are very +useful for finding things on your system. + +%install -a +rm -f %{buildroot}%{_infodir}/find-maint* + +rm %{buildroot}%{_bindir}/locate +rm %{buildroot}%{_bindir}/updatedb +rm -r %{buildroot}%{_libdir}/find +rm %{buildroot}%{_mandir}/man1/locate.1* +rm %{buildroot}%{_mandir}/man1/updatedb.1* +rm %{buildroot}%{_mandir}/man5/locatedb.5* +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%doc AUTHORS NEWS README THANKS TODO +%{_bindir}/find +%{_bindir}/xargs +%{_infodir}/find.info*.gz +%{_mandir}/man1/find.1%{?ext_man} +%{_mandir}/man1/xargs.1%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/fio/fio.spec b/SPECS/fio/fio.spec new file mode 100644 index 00000000..62a0433b --- /dev/null +++ b/SPECS/fio/fio.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: fio +Version: 3.41 +Release: %autorelease +Summary: Multithreaded IO generation tool +License: GPL-2.0-only +URL: http://git.kernel.dk/?p=fio.git;a=summary +#!RemoteAsset +Source0: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(build): LDFLAGS="%{build_ldflags}" +BuildOption(install): prefix=%{_prefix} +BuildOption(install): mandir=%{_mandir} +BuildOption(install): libdir=%{_libdir}/fio +BuildOption(install): INSTALL="install -p" + +BuildRequires: gcc make +BuildRequires: pkgconfig(libaio) +BuildRequires: libaio-devel libaio +BuildRequires: zlib-devel +BuildRequires: python3-devel +BuildRequires: libcurl-devel +BuildRequires: openssl-devel + +%description +fio is an I/O tool that will spawn a number of threads or processes doing +a particular type of io action as specified by the user. fio takes a +number of global parameters, each inherited by the thread unless +otherwise parameters given to them overriding that setting is given. +The typical use of fio is to write a job file matching the io load +one wants to simulate. + +%prep -a +sed -e 's,/usr/local/lib/,%{_libdir}/,g' -i os/os-linux.h + +%conf +# it's not a regular configure +./configure --disable-optimizations + +%files +%doc COPYING REPORTING-BUGS examples MORAL-LICENSE GFIO-TODO SERVER-TODO STEADYSTATE-TODO +%{_bindir}/* +%{_datadir}/%{name} +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/flex/flex.spec b/SPECS/flex/flex.spec new file mode 100644 index 00000000..d5bfa258 --- /dev/null +++ b/SPECS/flex/flex.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: flex +Version: 2.6.4 +Release: %autorelease +Summary: Fast Lexical Analyzer Generator +License: BSD-3-Clause +URL: https://github.com/westes/flex +#!RemoteAsset +Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.gz +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: help2man +BuildRequires: libtool +BuildRequires: m4 +Requires: m4 +BuildSystem: autotools + +%description +FLEX is a tool for generating scanners: programs that recognize lexical +patterns in text. + +%package devel +Summary: Development files for flex +Requires: flex = %{version} + +%description devel +FLEX is a tool for generating scanners: programs that recognize lexical +patterns in text. + +This package contains files required to build programs with flex libraries. + +%install -a +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%post -n %{name} -p /sbin/ldconfig +%postun -n %{name} -p /sbin/ldconfig + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS ONEWS README.md THANKS +%exclude %_docdir/%{name}/COPYING +%exclude %_docdir/%{name}/NEWS +%exclude %_docdir/%{name}/ONEWS +%exclude %_docdir/%{name}/README.md +%exclude %_docdir/%{name}/AUTHORS +%{_bindir}/flex +%{_bindir}/flex++ +%{_mandir}/man1/* +%{_infodir}/* +%{_libdir}/libfl.so.* + +%files -n flex-devel +%license COPYING +%doc AUTHORS ChangeLog NEWS ONEWS README.md THANKS +%{_includedir}/FlexLexer.h +%{_libdir}/libfl.so +%{_libdir}/libfl.a +%changelog +%{?autochangelog} diff --git a/SPECS/fmt/fmt.spec b/SPECS/fmt/fmt.spec new file mode 100644 index 00000000..27372677 --- /dev/null +++ b/SPECS/fmt/fmt.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: fmt +Version: 12.0.0 +Release: %autorelease +Summary: Small, safe and fast formatting library for C++ +License: MIT +URL: https://github.com/fmtlib/fmt +#!RemoteAsset +Source0: https://github.com/fmtlib/fmt/archive/%{version}/fmt-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_BUILD_TYPE=RelWithDebInfo +BuildOption(conf): -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON +BuildOption(conf): -DFMT_CMAKE_DIR:STRING=%{_libdir}/cmake/%{name} +BuildOption(conf): -DFMT_LIB_DIR:STRING=%{_libdir} + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: ninja + +%description +fmt is an open-source formatting library for C++. It can be used as a +safe alternative to printf or as a fast alternative to IOStreams. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and CMake/pkg-config files +for developing applications that use the fmt library. + +%ldconfig_scriptlets + +%files +%{_libdir}/libfmt.so* + +%files devel +%{_includedir}/fmt/ +%{_libdir}/libfmt.so +%{_libdir}/cmake/fmt/ +%{_libdir}/pkgconfig/fmt.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/fontconfig/fontconfig.spec b/SPECS/fontconfig/fontconfig.spec new file mode 100644 index 00000000..c3f0d010 --- /dev/null +++ b/SPECS/fontconfig/fontconfig.spec @@ -0,0 +1,136 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: fontconfig +Version: 2.17.1 +Release: %autorelease +Summary: Font configuration and customization library +License: HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016 +URL: https://www.freedesktop.org/wiki/Software/fontconfig/ +#!RemoteAsset +Source: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/%{version}/fontconfig-%{version}.tar.gz + +BuildSystem: meson + +BuildOption(conf): -Ddoc-pdf=disabled +BuildOption(conf): -Ddoc-txt=disabled +BuildOption(conf): -Dxml-backend=libxml2 +BuildOption(conf): --default-library=shared +BuildOption(conf): -Dtemplate-dir=%{_datadir}/%{name}/conf.avail +BuildOption(conf): -Dconfig-dir=%{_sysconfdir}/fonts/conf.d +BuildOption(conf): -Dbaseconfig-dir=%{_datadir}/fonts +BuildOption(conf): -Dcache-dir=/usr/lib/fontconfig/cache + +BuildRequires: gcc +BuildRequires: gperf +BuildRequires: make, meson +BuildRequires: pkgconfig +BuildRequires: python3 +BuildRequires: docbook-utils +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(json-c) + +%description +Fontconfig is a library designed to locate fonts within the system and select +them according to requirements specified by applications. This package contains +the runtime library and essential command-line tools. + +%package devel +Summary: Development files for fontconfig +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig(freetype2) + +%description devel +This package includes the header files, pkgconfig files, and developer docs +for the fontconfig library. Install it if you want to develop programs that +use fontconfig. + +%package doc +Summary: Documentation for fontconfig +BuildArch: noarch + +%description doc +Contains detailed user and developer documentation for fontconfig. + +%install -a +# Clean up unnecessary .la files, create required config and cache directories, +# and add a symbolic link. +# This keeps system-wide configuration consistent with upstream fontconfig layout, +# ensuring all applications reference the same canonical fonts.conf location. +rm -f %{buildroot}%{_libdir}/*.la +install -d -m 755 %{buildroot}%{_sysconfdir}/fonts +install -d -m 755 %{buildroot}%{_localstatedir}/cache/fontconfig +ln -sf ../../usr/share/fonts/fonts.conf %{buildroot}%{_sysconfdir}/fonts/fonts.conf +%find_lang %{name} --generate-subpackages --all-name + +%pretrans +mkdir -p %{_localstatedir}/cache/fontconfig + +%post +if [ "$1" -eq 1 ]; then + rm -rf %{_localstatedir}/cache/fontconfig/* 2>/dev/null || : +fi +%{_bindir}/fc-cache -fs + +%postun +if [ $1 -eq 0 ]; then + rm -rf %{_localstatedir}/cache/fontconfig +fi + +%posttrans +if [ -e %{_sysconfdir}/xml/catalog ]; then + %{_bindir}/xmlcatalog --noout --add system \ + "urn:fontconfig:fonts.dtd" \ + "file://%{_datadir}/xml/fontconfig/fonts.dtd" \ + %{_sysconfdir}/xml/catalog +fi + +%postuntrans +if [ $1 -eq 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then + %{_bindir}/xmlcatalog --noout --del "urn:fontconfig:fonts.dtd" %{_sysconfdir}/xml/catalog +fi + +%transfiletriggerin -- /usr/share/fonts +%{_bindir}/fc-cache -s + +%transfiletriggerpostun -- /usr/share/fonts +%{_bindir}/fc-cache -s + +%files +%license COPYING +%doc README.md AUTHORS +%{_bindir}/fc-* +%{_libdir}/libfontconfig.so.* +%dir %{_datadir}/fontconfig +%{_datadir}/fontconfig/conf.avail/ +%{_datadir}/fonts/fonts.conf +%dir %{_sysconfdir}/fonts +%dir %{_sysconfdir}/fonts/conf.d +%config(noreplace) %{_sysconfdir}/fonts/conf.d/*.conf +%{_sysconfdir}/fonts/conf.d/README +%{_sysconfdir}/fonts/fonts.conf +%{_datadir}/xml/fontconfig/ +%dir %{_localstatedir}/cache/fontconfig +%{_mandir}/man1/fc-*.1* +%{_mandir}/man5/fonts-conf.5* +%{_datadir}/gettext/its/fontconfig.its +%{_datadir}/gettext/its/fontconfig.loc + +%files devel +%{_libdir}/libfontconfig.so +%{_libdir}/pkgconfig/fontconfig.pc +%{_includedir}/fontconfig/ +%{_mandir}/man3/Fc*.3* + +%files doc +%doc %{_docdir}/%{name}/fontconfig-*.html + +%changelog +%{?autochangelog} diff --git a/SPECS/fontforge/fontforge.spec b/SPECS/fontforge/fontforge.spec new file mode 100644 index 00000000..cd897f4a --- /dev/null +++ b/SPECS/fontforge/fontforge.spec @@ -0,0 +1,117 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Change these to 1 once we have them +%bcond gui 0 +%bcond doc 0 + +Name: fontforge +Version: 20251009 +Release: %autorelease +Summary: Outline and bitmap font editor +License: GPL-3.0-or-later +URL: https://fontforge.org/ +VCS: git:https://github.com/fontforge/fontforge +#!RemoteAsset +Source0: https://github.com/fontforge/fontforge/releases/download/%{version}/%{name}-%{version}.tar.xz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_BUILD_TYPE=Release +BuildOption(conf): -DENABLE_WOFF2=ON +%if %{without gui} +BuildOption(conf): -DENABLE_GUI=OFF +%endif +%if %{without doc} +BuildOption(conf): -DENABLE_DOCS=OFF +%endif +BuildOption(conf): -DPYHOOK_INSTALL_DIR=%{python3_sitearch} +BuildOption(conf): -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name}/html + +BuildRequires: make +BuildRequires: cmake +BuildRequires: giflib-devel +BuildRequires: python3-devel +BuildRequires: gettext +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libtiff-4) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(xt) +BuildRequires: pkgconfig(xproto) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(libspiro) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(libwoff2common) +%if %{with gui} +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtkmm-3.0) +%endif +%if %{with doc} +BuildRequires: python3-sphinx +%endif + +%description +FontForge (former PfaEdit) is a font editor for outline and bitmap +fonts. It supports a range of font formats, including PostScript +(ASCII and binary Type 1, some Type 3 and Type 0), TrueType, OpenType +(Type2) and CID-keyed fonts. + +%package devel +Summary: Development files for fontforge +Requires: %{name} = %{version}-%{release} +Requires: %{name}-doc = %{version}-%{release} + +%description devel +This package includes the library files you will need to compile +applications against fontforge. + +%if %{with doc} +%package doc +Summary: Documentation files for %{name} +BuildArch: noarch + +%description doc +This package contains documentation files for %{name}. +%endif + +%install -a +# remove unneeded .a files +find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' + +rm -f %{buildroot}%{_datadir}/doc/fontforge/{.buildinfo,.nojekyll} + +# XXX: Find out why find_lang doesn't generate the en_GB package +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en_GB/ +%find_lang FontForge --generate-subpackages + +%files +%doc AUTHORS +%license LICENSE COPYING.gplv3 +%{_bindir}/* +%{_libdir}/lib*.so.* +%{_datadir}/fontforge +%if %{with gui} +%{_datadir}/applications/*FontForge.desktop +%{_datadir}/mime/packages/fontforge.xml +%{_datadir}/icons/hicolor/*/apps/org.fontforge.FontForge* +%endif +%{_mandir}/man1/*.1* +%{python3_sitearch}/fontforge.so +%{python3_sitearch}/psMat.so + +%files devel +%{_libdir}/lib*.so + +%if %{with doc} +%files doc +%doc %{_docdir}/%{name}/html +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/fonts-dejavu/fonts-dejavu.spec b/SPECS/fonts-dejavu/fonts-dejavu.spec new file mode 100644 index 00000000..5aec29e0 --- /dev/null +++ b/SPECS/fonts-dejavu/fonts-dejavu.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define majver 2 +%define minver 37 + +Name: fonts-dejavu +Version: %{majver}.%{minver} +Release: %autorelease +Summary: The DejaVu font families +License: Bitstream-Vera AND LicenseRef-openRuyi-Public-Domain +URL: https://dejavu-fonts.github.io/ +VCS: git:https://github.com/dejavu-fonts/dejavu-fonts +#!RemoteAsset +Source0: https://github.com/dejavu-fonts/dejavu-fonts/archive/refs/tags/version_%{majver}_%{minver}.zip + +BuildRequires: unzip +BuildRequires: fontforge +BuildRequires: make +BuildRequires: perl(Font::TTF) +BuildRequires: perl(IO::String) +BuildRequires: unicode-ucd + +%description +The DejaVu font set is based on the “Bitstream Vera” fonts, release 1.10. Its +purpose is to provide a wider range of characters, while maintaining the +original style, using an open collaborative development process. + +%prep +%autosetup -n dejavu-fonts-version_%{majver}_%{minver} + +%build +%make_build VERSION=%{version} FC-LANG="" \ + BLOCKS=%{_datadir}/unicode/ucd/Blocks.txt \ + UNICODEDATA=%{_datadir}/unicode/ucd/UnicodeData.txt \ + full-ttf + +%install +mkdir -p %{buildroot}%{_datadir}/fonts/truetype/ +install -D -m 644 %{_builddir}/dejavu-fonts-version_%{majver}_%{minver}/build/*.ttf %{buildroot}%{_datadir}/fonts/truetype/ +mkdir -p %{buildroot}%{_datadir}/fontconfig/conf.avail/ +install -D -m 644 %{_builddir}/dejavu-fonts-version_%{majver}_%{minver}/fontconfig/*.conf %{buildroot}%{_datadir}/fontconfig/conf.avail/ + +%files +%license README.md +%doc AUTHORS NEWS +%dir %{_datadir}/fonts/truetype +%{_datadir}/fonts/truetype/*.ttf +%dir %{_datadir}/fontconfig/conf.avail +%{_datadir}/fontconfig/conf.avail/*.conf + +%changelog +%{?autochangelog} diff --git a/SPECS/freetype/freetype-2.10.0-internal-outline.patch b/SPECS/freetype/freetype-2.10.0-internal-outline.patch new file mode 100644 index 00000000..a3e7b4d1 --- /dev/null +++ b/SPECS/freetype/freetype-2.10.0-internal-outline.patch @@ -0,0 +1,86 @@ +From 2e6bf149908d61c2b2121dad36f2caef260a2053 Mon Sep 17 00:00:00 2001 +From: Marek Kasik +Date: May 28 2019 12:56:55 +0000 +Subject: Keep FT_Outline_New_Internal() and FT_Outline_Done_Internal() +for ABI compatibility but make them just throw +Unimplemented_Feature error. + +Remove them once soname has been bumped! + +Resolves: #1689117 + +Conflict:NA +Reference:https://src.fedoraproject.org/rpms/freetype/c/2e6bf149908d61c2b2121dad36f2caef260a2053 + +--- freetype-2.10.0/include/freetype/ftoutln.h ++++ freetype-2.10.0/include/freetype/ftoutln.h +@@ -165,6 +165,15 @@ FT_BEGIN_HEADER + FT_Int numContours, + FT_Outline *anoutline ); + ++ /* ++ * Kept downstream for ABI compatibility only. ++ * It just throws error now. Remove once soname has been bumped. ++ */ ++ FT_EXPORT( FT_Error ) ++ FT_Outline_New_Internal( FT_Memory memory, ++ FT_UInt numPoints, ++ FT_Int numContours, ++ FT_Outline *anoutline ); + + /************************************************************************** + * +@@ -192,6 +201,13 @@ FT_BEGIN_HEADER + FT_Outline_Done( FT_Library library, + FT_Outline* outline ); + ++ /* ++ * Kept downstream for ABI compatibility only. ++ * It just throws error now. Remove once soname has been bumped. ++ */ ++ FT_EXPORT( FT_Error ) ++ FT_Outline_Done_Internal( FT_Memory memory, ++ FT_Outline* outline ); + + /************************************************************************** + * +--- freetype-2.10.0/src/base/ftoutln.c ++++ freetype-2.10.0/src/base/ftoutln.c +@@ -291,6 +291,19 @@ + + /* documentation is in ftoutln.h */ + ++ /* ++ * Kept downstream for ABI compatibility only. ++ * It just throws error now. Remove once soname has been bumped. ++ */ ++ FT_EXPORT_DEF( FT_Error ) ++ FT_Outline_New_Internal( FT_Memory memory, ++ FT_UInt numPoints, ++ FT_Int numContours, ++ FT_Outline *anoutline ) ++ { ++ return FT_THROW( Unimplemented_Feature ); ++ } ++ + FT_EXPORT_DEF( FT_Error ) + FT_Outline_New( FT_Library library, + FT_UInt numPoints, +@@ -423,6 +436,17 @@ + + /* documentation is in ftoutln.h */ + ++ /* ++ * Kept downstream for ABI compatibility only. ++ * It just throws error now. Remove once soname has been bumped. ++ */ ++ FT_EXPORT_DEF( FT_Error ) ++ FT_Outline_Done_Internal( FT_Memory memory, ++ FT_Outline* outline ) ++ { ++ return FT_THROW( Unimplemented_Feature ); ++ } ++ + FT_EXPORT_DEF( FT_Error ) + FT_Outline_Done( FT_Library library, + FT_Outline* outline ) diff --git a/SPECS/freetype/freetype-2.10.1-debughook.patch b/SPECS/freetype/freetype-2.10.1-debughook.patch new file mode 100644 index 00000000..58af2d53 --- /dev/null +++ b/SPECS/freetype/freetype-2.10.1-debughook.patch @@ -0,0 +1,21 @@ +From ac07a003d7f75321346188eb9618d418d2b2decb Mon Sep 17 00:00:00 2001 +From: Michael Kuhn +Date: Oct 17 2019 19:06:50 +0000 +Subject: Revert FT_DebugHook_Func ABI/API changes + +Conflict:NA +Reference:https://src.fedoraproject.org/rpms/freetype/c/ac07a003d7f75321346188eb9618d418d2b2decb + +diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h +index 8d039c4f3..88488bfe8 100644 +--- a/include/freetype/ftmodapi.h ++++ b/include/freetype/ftmodapi.h +@@ -623,7 +623,7 @@ FT_BEGIN_HEADER + * it is bytecode interpreter's execution context, `TT_ExecContext`, + * which is declared in FreeType's internal header file `tttypes.h`. + */ +- typedef FT_Error ++ typedef void + (*FT_DebugHook_Func)( void* arg ); + + diff --git a/SPECS/freetype/freetype-2.2.1-enable-valid.patch b/SPECS/freetype/freetype-2.2.1-enable-valid.patch new file mode 100644 index 00000000..4f61e60f --- /dev/null +++ b/SPECS/freetype/freetype-2.2.1-enable-valid.patch @@ -0,0 +1,30 @@ +From cbf2c99f7813750cb82deb367a37e50dbb709395 Mon Sep 17 00:00:00 2001 +From: besfahbo +Date: Jul 08 2006 01:07:01 +0000 +Subject: - Enable modules gxvalid and otvalid + +Enable modules gxvalid and otvalid + +Conflict:NA +Reference:https://src.fedoraproject.org/rpms/freetype/c/cbf2c99f7813750cb82deb367a37e50dbb709395 + +--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400 ++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400 +@@ -110,7 +110,7 @@ + + # TrueType GX/AAT table validation. Needs `ftgxval.c' below. + # +-# AUX_MODULES += gxvalid ++AUX_MODULES += gxvalid + + # Support for streams compressed with gzip (files with suffix .gz). + # +@@ -124,7 +124,7 @@ + + # OpenType table validation. Needs `ftotval.c' below. + # +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # diff --git a/SPECS/freetype/freetype-2.3.0-enable-spr.patch b/SPECS/freetype/freetype-2.3.0-enable-spr.patch new file mode 100644 index 00000000..c873bece --- /dev/null +++ b/SPECS/freetype/freetype-2.3.0-enable-spr.patch @@ -0,0 +1,19 @@ +From c1c64f8cf9264592bca747c9463814a805150346 Mon Sep 17 00:00:00 2001 +From: besfahbo +Date: Jan 18 2007 19:42:34 +0000 +Subject: - Add without_subpixel_rendering. + +Conflict:NA +Reference:https://src.fedoraproject.org/rpms/freetype/c/c1c64f8cf9264592bca747c9463814a805150346 + +--- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500 ++++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500 +@@ -92,7 +92,7 @@ + * When this macro is not defined, FreeType offers alternative LCD + * rendering technology that produces excellent output. + */ +-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ ++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING + + + /************************************************************************** diff --git a/SPECS/freetype/freetype-2.6.5-libtool.patch b/SPECS/freetype/freetype-2.6.5-libtool.patch new file mode 100644 index 00000000..4e0c2cb9 --- /dev/null +++ b/SPECS/freetype/freetype-2.6.5-libtool.patch @@ -0,0 +1,11 @@ +--- freetype-2.8/builds/unix/freetype-config.in.orig 2017-03-30 12:20:23.000000001 +0200 ++++ freetype-2.8/builds/unix/freetype-config.in 2017-05-16 13:25:39.223041128 +0200 +@@ -205,7 +205,7 @@ if test "$echo_libs" = "yes" ; then + fi + + if test "$echo_libtool" = "yes" ; then +- echo ${SYSROOT}$libdir/libfreetype.la ++ echo "" + fi + + # EOF diff --git a/SPECS/freetype/freetype-2.8-multilib.patch b/SPECS/freetype/freetype-2.8-multilib.patch new file mode 100644 index 00000000..3ffd146b --- /dev/null +++ b/SPECS/freetype/freetype-2.8-multilib.patch @@ -0,0 +1,65 @@ +--- freetype-2.9/builds/unix/freetype-config.in ++++ freetype-2.9/builds/unix/freetype-config.in +@@ -13,45 +13,25 @@ LC_ALL=C + export LC_ALL + + +-# if `pkg-config' is available, use values from `freetype2.pc' +-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1 +-if test $? -eq 0 ; then +- # note that option `--variable' is not affected by the +- # PKG_CONFIG_SYSROOT_DIR environment variable +- if test "x$SYSROOT" != "x" ; then +- PKG_CONFIG_SYSROOT_DIR="$SYSROOT" +- export PKG_CONFIG_SYSROOT_DIR +- fi +- +- prefix=`%PKG_CONFIG% --variable prefix freetype2` +- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2` +- +- includedir=`%PKG_CONFIG% --variable includedir freetype2` +- libdir=`%PKG_CONFIG% --variable libdir freetype2` +- +- version=`%PKG_CONFIG% --modversion freetype2` +- +- cflags=`%PKG_CONFIG% --cflags freetype2` +- dynamic_libs=`%PKG_CONFIG% --libs freetype2` +- static_libs=`%PKG_CONFIG% --static --libs freetype2` +-else +- prefix="%prefix%" +- exec_prefix="%exec_prefix%" +- +- includedir="%includedir%" +- libdir="%libdir%" +- +- version=%ft_version% +- +- cflags="-I${SYSROOT}$includedir/freetype2" +- dynamic_libs="-lfreetype" +- static_libs="%LIBSSTATIC_CONFIG%" +- if test "${SYSROOT}$libdir" != "/usr/lib" && +- test "${SYSROOT}$libdir" != "/usr/lib64" ; then +- libs_L="-L${SYSROOT}$libdir" +- fi ++# note that option `--variable' is not affected by the ++# PKG_CONFIG_SYSROOT_DIR environment variable ++if test "x$SYSROOT" != "x" ; then ++ PKG_CONFIG_SYSROOT_DIR="$SYSROOT" ++ export PKG_CONFIG_SYSROOT_DIR + fi + ++prefix=`pkgconf --variable prefix freetype2` ++exec_prefix=`pkgconf --variable exec_prefix freetype2` ++ ++includedir=`pkgconf --variable includedir freetype2` ++libdir=`pkgconf --variable libdir freetype2` ++ ++version=`pkgconf --modversion freetype2` ++ ++cflags=`pkgconf --cflags freetype2` ++dynamic_libs=`pkgconf --libs freetype2` ++static_libs=`pkgconf --static --libs freetype2` ++ + orig_prefix=$prefix + orig_exec_prefix=$exec_prefix + diff --git a/SPECS/freetype/freetype.spec b/SPECS/freetype/freetype.spec new file mode 100644 index 00000000..6e203f18 --- /dev/null +++ b/SPECS/freetype/freetype.spec @@ -0,0 +1,131 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond bootstrap 1 + +Name: freetype +Version: 2.13.3 +Release: %autorelease +Summary: A free and portable font rendering engine +License: (FTL OR GPL-2.0-or-later) AND BSD-3-Clause AND MIT AND MIT-Modern-Variant AND LicenseRef-Fedora-Public-Domain AND Zlib +URL: https://www.freetype.org +#!RemoteAsset +Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz +#!RemoteAsset +Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz +Source2: ftconfig.h + +BuildSystem: autotools + +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libbrotlidec) +%if %{without bootstrap} +BuildRequires: pkgconfig(harfbuzz) +%endif +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +BuildOption(conf): --disable-static +BuildOption(conf): --with-zlib=yes +BuildOption(conf): --with-bzip2=yes +BuildOption(conf): --with-png=yes +BuildOption(conf): --enable-freetype-config +%if %{without bootstrap} +BuildOption(conf): --with-harfbuzz=yes +%else +BuildOption(conf): --with-harfbuzz=no +%endif +BuildOption(conf): --with-brotli=yes + +BuildOption(install): gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale + +Provides: %{name}-bytecode +Provides: %{name}-subpixel +Obsoletes: freetype-freeworld < 2.9.1-2 + +%patchlist +freetype-2.3.0-enable-spr.patch +freetype-2.2.1-enable-valid.patch +freetype-2.6.5-libtool.patch +freetype-2.8-multilib.patch +freetype-2.10.0-internal-outline.patch +freetype-2.10.1-debughook.patch + +%description +The FreeType engine is a free and portable font rendering +engine, developed to provide advanced font support for a variety of +platforms and environments. FreeType is a library which can open and +manage font files as well as efficiently load, hint and render +individual glyphs. FreeType is not a font server or a complete +text-rendering library. + +%prep -a +tar xf %{SOURCE1} -C .. + +%conf -p +# fix libtool rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool || : +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool || : + + +%package devel +Summary: FreeType development libraries and header files +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The freetype-devel package includes the static libraries and header files +for the FreeType font rendering engine. + +Install freetype-devel if you want to develop programs which will use +FreeType. + +%install -a +# fix multilib issues +%define wordsize %{__isa_bits} +mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \ + $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h +install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h + +# clean .a / .la +rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} + +%triggerpostun -- freetype < 2.0.5-3 +{ + for I in %{_datadir}/fonts/*/TrueType /usr/share/X11/fonts/TTF; do + [ -d $I ] && [ -f $I/fonts.scale ] && [ -f $I/fonts.dir ] && touch $I/fonts.scale + done + exit 0 +} + +%ldconfig_scriptlets + +%files +%license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT +%{_libdir}/libfreetype.so.* +%doc README + +%files devel +%doc docs/CHANGES docs/formats.txt docs/ft2faq.html +%dir %{_includedir}/freetype2 +%{_datadir}/aclocal/freetype2.m4 +%{_includedir}/freetype2/* +%{_libdir}/libfreetype.so +%{_bindir}/freetype-config +%{_libdir}/pkgconfig/freetype2.pc +%doc docs/design +%doc docs/glyphs +%doc docs/reference +%doc docs/tutorial +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/freetype/ftconfig.h b/SPECS/freetype/ftconfig.h new file mode 100644 index 00000000..8d4a074b --- /dev/null +++ b/SPECS/freetype/ftconfig.h @@ -0,0 +1,14 @@ +#ifndef __FTCONFIG_H__MULTILIB +#define __FTCONFIG_H__MULTILIB + +#include + +#if __WORDSIZE == 32 +# include "ftconfig-32.h" +#elif __WORDSIZE == 64 +# include "ftconfig-64.h" +#else +# error "unexpected value for __WORDSIZE macro" +#endif + +#endif diff --git a/SPECS/fribidi/fribidi.spec b/SPECS/fribidi/fribidi.spec new file mode 100644 index 00000000..6ae9614d --- /dev/null +++ b/SPECS/fribidi/fribidi.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: fribidi +Version: 1.0.16 +Release: %autorelease +Summary: Library implementing the Unicode Bidirectional Algorithm +License: LGPL-2.1-or-later +URL: https://github.com/fribidi/fribidi +#!RemoteAsset +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz +BuildSystem: meson + +BuildOption(conf): -Ddocs=false + +BuildRequires: meson + +%description +A library to handle bidirectional scripts (for example Hebrew, Arabic), +so that the display is done in the proper way; while the text data itself +is always written in logical order. + +%package devel +Summary: Libraries and include files for FriBidi +Requires: %{name} = %{version}-%{release} + +%description devel +Include files and libraries needed for developing applications which use +FriBidi. + +%ldconfig_scriptlets +%files +%doc README AUTHORS ChangeLog THANKS NEWS TODO +%license COPYING +%{_bindir}/fribidi +%{_libdir}/libfribidi.so.0* + +%files devel +%{_includedir}/fribidi +%{_libdir}/libfribidi.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/fuse/0001-fuse-install-fix.patch b/SPECS/fuse/0001-fuse-install-fix.patch new file mode 100644 index 00000000..269631f9 --- /dev/null +++ b/SPECS/fuse/0001-fuse-install-fix.patch @@ -0,0 +1,32 @@ +--- fuse-2.9.2.orig/util/Makefile.am 2012-07-19 07:33:49.000000000 -0500 ++++ fuse-2.9.2/util/Makefile.am 2013-03-04 09:23:23.000000000 -0600 +@@ -20,14 +20,6 @@ + ulockmgr_server_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_REENTRANT + ulockmgr_server_LDFLAGS = -pthread + +-install-exec-hook: +- -chmod u+s $(DESTDIR)$(bindir)/fusermount +- @if test ! -e $(DESTDIR)/dev/fuse; then \ +- $(MKDIR_P) $(DESTDIR)/dev; \ +- echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true"; \ +- mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true; \ +- fi +- + EXTRA_DIST = udev.rules init_script + + MOUNT_FUSE_PATH = @MOUNT_FUSE_PATH@ +@@ -39,14 +31,8 @@ + $(INSTALL_PROGRAM) $(builddir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse + $(MKDIR_P) $(DESTDIR)$(INIT_D_PATH) + $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse +- @if test -x /usr/sbin/update-rc.d; then \ +- echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \ +- /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \ +- fi + + install-data-local: +- $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_PATH) +- $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/99-fuse.rules + + uninstall-local: + rm -f $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse diff --git a/SPECS/fuse/0002-fusermount-compile-as-pie.patch b/SPECS/fuse/0002-fusermount-compile-as-pie.patch new file mode 100644 index 00000000..0f7288e0 --- /dev/null +++ b/SPECS/fuse/0002-fusermount-compile-as-pie.patch @@ -0,0 +1,13 @@ +Index: fuse-2.9.0/util/Makefile.am +=================================================================== +--- fuse-2.9.0.orig/util/Makefile.am 2012-07-02 09:27:27.057828998 +0200 ++++ fuse-2.9.0/util/Makefile.am 2012-07-02 09:28:25.920068349 +0200 +@@ -10,6 +10,8 @@ noinst_PROGRAMS = mount.fuse + # copying it over. + fusermount_SOURCES = fusermount.c mount_util.c + fusermount_CPPFLAGS = -I$(top_srcdir)/lib ++fusermount_CFLAGS = -fPIE $(AM_CFLAGS) ++fusermount_LDFLAGS = -pie $(AM_LDFLAGS) + BUILT_SOURCES = mount_util.c + mount_util.c: $(top_srcdir)/lib/mount_util.c + @cp $(top_srcdir)/lib/mount_util.c . diff --git a/SPECS/fuse/0003-closefrom.patch b/SPECS/fuse/0003-closefrom.patch new file mode 100644 index 00000000..50fd101c --- /dev/null +++ b/SPECS/fuse/0003-closefrom.patch @@ -0,0 +1,32 @@ +From: Jan Engelhardt +Date: 2021-08-23 14:47:30.341142824 +0200 +References: https://bugzilla.opensuse.org/show_bug.cgi?id=1189086 +References: https://bugzilla.redhat.com/show_bug.cgi?id=1984776 + +glibc-2.34 added closefrom. Rename fuse functions to work around the collision. +--- + util/ulockmgr_server.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: fuse-2.9.9/util/ulockmgr_server.c +=================================================================== +--- fuse-2.9.9.orig/util/ulockmgr_server.c ++++ fuse-2.9.9/util/ulockmgr_server.c +@@ -124,7 +124,7 @@ static int receive_message(int sock, voi + return res; + } + +-static int closefrom(int minfd) ++static int fuse_closefrom(int minfd) + { + DIR *dir = opendir("/proc/self/fd"); + if (dir) { +@@ -384,7 +384,7 @@ int main(int argc, char *argv[]) + dup2(nullfd, 1); + } + close(3); +- closefrom(5); ++ fuse_closefrom(5); + while (1) { + char c; + int sock; diff --git a/SPECS/fuse/fuse.conf b/SPECS/fuse/fuse.conf new file mode 100644 index 00000000..c8d907e5 --- /dev/null +++ b/SPECS/fuse/fuse.conf @@ -0,0 +1,18 @@ +# The file /etc/fuse.conf allows for the following parameters: +# +# user_allow_other - Using the allow_other mount option works fine as root, in +# order to have it work as user you need user_allow_other in /etc/fuse.conf as +# well. (This option allows users to use the allow_other option.) You need +# allow_other if you want users other than the owner to access a mounted fuse. +# This option must appear on a line by itself. There is no value, just the +# presence of the option. + +#user_allow_other + + +# mount_max = n - this option sets the maximum number of mounts. +# Currently (2014) it must be typed exactly as shown +# (with a single space before and after the equals sign). + +#mount_max = 1000 + diff --git a/SPECS/fuse/fuse.spec b/SPECS/fuse/fuse.spec new file mode 100644 index 00000000..590566f7 --- /dev/null +++ b/SPECS/fuse/fuse.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: fuse +Version: 2.9.9 +Release: %autorelease +Summary: Filesystem in Userspace (FUSE) utilities and libraries +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Group: System/Filesystems +URL: https://github.com/libfuse/libfuse +#!RemoteAsset +Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz +Source1: fuse.conf +Patch0: 0001-fuse-install-fix.patch +Patch1: 0002-fusermount-compile-as-pie.patch +Patch2: 0003-closefrom.patch +BuildSystem: autotools + +BuildOption(conf): --with-pkgconfigdir=%{_libdir}/pkgconfig +BuildOption(conf): --enable-lib +BuildOption(conf): --enable-util +BuildOption(conf): --enable-example + +BuildOption(build): CFLAGS="%{optflags} -g -fno-strict-aliasing" + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +Requires(pre): group(trusted) +Requires: util-linux >= 2.18 +Supplements: filesystem(fuse) + +%description +FUSE (Filesystem in Userspace) is an interface by the Linux kernel +for userspace programs to export a filesystem to the kernel. +This package contains helper programs and runtime libraries for using FUSE mounts. + +%package devel +Summary: Development files for FUSE (userspace filesystem) +Group: Development/Languages/C and C++ +Requires: %{name} = %{version} +Requires: glibc-devel + +%description devel +This package contains all include files, libraries, and configuration +files needed to develop programs that use the FUSE library. + + +%conf -p +export MOUNT_FUSE_PATH=%{_sbindir} +autoreconf -fi -I%{_datadir}/gettext/m4 + +%install -a +rm -rf %{buildroot}/%{_sysconfdir}/init.d +install -m644 -D %{SOURCE1} %{buildroot}/%{_sysconfdir}/fuse.conf +find %{buildroot} -type f -name "*.la" -delete -print +rm -f %{buildroot}/%{_libdir}/libfuse.a +rm -f %{buildroot}/%{_libdir}/libulockmgr.a + +(cd example && make clean) +rm -rf example/.deps example/Makefile.am example/Makefile.in +rm -rf doc/Makefile.am doc/Makefile.in doc/Makefile + +%ldconfig_scriptlets + +%files +%license COPYING* +%doc AUTHORS ChangeLog NEWS README* example doc +%verify(not mode) %attr(4750,root,trusted) %{_bindir}/fusermount +%{_sbindir}/mount.fuse +%config %{_sysconfdir}/fuse.conf +%{_bindir}/ulockmgr_server +%{_mandir}/man1/fusermount.1%{?ext_man} +%{_mandir}/man1/ulockmgr_server.1%{?ext_man} +%{_mandir}/man8/mount.fuse.8%{?ext_man} +%{_libdir}/lib*.so.* + +%files devel +%{_libdir}/libfuse.so +%{_libdir}/libulockmgr.so +%{_includedir}/fuse.h +%{_includedir}/fuse +%{_libdir}/pkgconfig/*.pc +%{_includedir}/ulockmgr.h + +%changelog +%{?autochangelog} diff --git a/SPECS/fuse3/fuse.conf b/SPECS/fuse3/fuse.conf new file mode 100644 index 00000000..cd4c6bda --- /dev/null +++ b/SPECS/fuse3/fuse.conf @@ -0,0 +1,2 @@ +# mount_max = 1000 +# user_allow_other diff --git a/SPECS/fuse3/fuse3.spec b/SPECS/fuse3/fuse3.spec new file mode 100644 index 00000000..6aae9a92 --- /dev/null +++ b/SPECS/fuse3/fuse3.spec @@ -0,0 +1,112 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global xyz_version 3.17.4 +%global xy_version %(sed 's/\\(.*\\)\\..*/\\1/'<<<%{xyz_version}) + +Name: fuse3 +Version: %{xyz_version} +Release: %autorelease +Summary: File System in Userspace (FUSE) v3 utilities +License: GPL-1.0-or-later +URL: http://fuse.sf.net +#!RemoteAsset +Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz.sig +# Our little stupid config file +Source2: fuse.conf +BuildSystem: meson + +BuildOption(conf): -D udevrulesdir=%{_udevrulesdir} +BuildOption(conf): -D useroot=false + +BuildRequires: libselinux-devel +BuildRequires: ninja +BuildRequires: meson + +Requires: fuse-common +Requires: %{name}-libs = %{version}-%{release} + +%description +With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v3 userspace tools to +mount a FUSE filesystem. + +%package libs +Summary: File System in Userspace (FUSE) v3 libraries +License: LGPL-2.1-or-later + +%description libs +Devel With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v3 libraries. + +%package devel +Summary: File System in Userspace (FUSE) v3 devel files +Requires: %{name}-libs = %{version}-%{release} +Requires: pkgconfig +License: LGPL-2.1-or-later + +%description devel +With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains development files (headers, +pgk-config) to develop FUSE v3 based applications/filesystems. + + +%package -n fuse-common +Summary: Common files for File System in Userspace (FUSE) v2 and v3 +License: GPL-1.0-or-later + +%description -n fuse-common +Common files for FUSE v2 and FUSE v3. + +%prep +%autosetup -p1 -n fuse-%{version} + +%conf -p +export LC_ALL=en_US.UTF-8 + +%install -a +find %{buildroot} . +# change from 4755 to 0755 to allow stripping -- fixed later in files +chmod 0755 %{buildroot}/%{_bindir}/fusermount3 + +# No need to create init-script +rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3 +# This path is hardcoded: +# https://github.com/libfuse/libfuse/blob/master/util/install_helper.sh#L43 +# We also don't need this +rm -f %{buildroot}/etc/init.d/fuse3 + +# Install config-file +install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir} + +# Delete pointless udev rules +rm -f %{buildroot}%{_udevrulesdir}/99-fuse3.rules + +%files +%license LICENSE GPL2.txt +%doc AUTHORS ChangeLog.rst README.md +%{_sbindir}/mount.fuse3 +%attr(4755,root,root) %{_bindir}/fusermount3 +%{_mandir}/man1/* +%{_mandir}/man8/* + +%files libs +%license LGPL2.txt +%{_libdir}/libfuse3.so.* + +%files devel +%{_libdir}/libfuse3.so +%{_libdir}/pkgconfig/fuse3.pc +%{_includedir}/fuse3/ + +%files -n fuse-common +%config(noreplace) %{_sysconfdir}/fuse.conf + +%changelog +%{?autochangelog} diff --git a/SPECS/gawk/gawk.spec b/SPECS/gawk/gawk.spec new file mode 100644 index 00000000..29061046 --- /dev/null +++ b/SPECS/gawk/gawk.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gawk +Version: 5.3.2 +Release: %autorelease +Summary: Domain-specific language for text processing +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/gawk/ +#!RemoteAsset +Source: http://ftpmirror.gnu.org/gnu/gawk/gawk-%{version}.tar.xz +#!RemoteAsset +Source2: http://ftpmirror.gnu.org/gnu/gawk/gawk-%{version}.tar.xz.sig +BuildRequires: mpfr-devel + +BuildSystem: autotools + +Provides: awk +Provides: /bin/gawk + +%description +AWK is a domain-specific language designed for text processing and +typically used as a data extraction and reporting tool. + +GNU awk is upwardly compatible with the System V Release 4 awk. It is +almost completely POSIX 1003.2 compliant. + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%config %{_sysconfdir}/profile.d/gawk.csh +%config %{_sysconfdir}/profile.d/gawk.sh +%{_bindir}/awk +%license COPYING* +%doc AUTHORS NEWS POSIX.STD README ChangeLog* +%{_bindir}/gawk +%{_bindir}/gawk* +%{_bindir}/gawkbug +%{_libexecdir}/awk +%{_libdir}/gawk +%{_datadir}/awk +%{_includedir}/gawkapi.h +%{_infodir}/*.info* +%{_infodir}/gawk_* +%{_mandir}/man1/gawk.1* +%{_mandir}/man1/gawkbug.1* +%{_mandir}/man1/pm-gawk.1* +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/gc/gc.spec b/SPECS/gc/gc.spec new file mode 100644 index 00000000..b898dbd9 --- /dev/null +++ b/SPECS/gc/gc.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gc +Version: 8.2.8 +Release: %autorelease +Summary: A garbage collector for C and C++ +License: BSD and GPLv1+ +Url: http://www.hboehm.info/gc/ +#!RemoteAsset +Source0: https://github.com/bdwgc/bdwgc/releases/download/v%{version}/gc-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gcc gcc-c++ libtool +BuildOption(conf): --disable-static --disable-docs --enable-cplusplus --enable-large-config --enable-threads=posix + +%description +The Boehm-Demers-Weiser conservative garbage collector can be +used as a garbage collecting replacement for C malloc or C++ new. + +%package devel +Summary: Libraries and header files for %{name} development +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +%{summary}. + +%install -a +install -p -D -m644 doc/gc.man %{buildroot}%{_mandir}/man3/gc.3 +## Delete unpackaged files +rm -rfv %{buildroot}%{_datadir}/gc/ + +%files +%doc AUTHORS ChangeLog README.md +%{_libdir}/libcord.so.1* +%{_libdir}/libgc.so.1* +%{_libdir}/libgccpp.so.1* +%{_libdir}/libgctba.so* + +%files devel +%doc doc/README.environment doc/README.linux +%{_includedir}/gc.h +%{_includedir}/gc_cpp.h +%{_includedir}/gc/ +%{_libdir}/libcord.so +%{_libdir}/libgc.so +%{_libdir}/libgccpp.so +%{_libdir}/pkgconfig/bdw-gc.pc +%{_mandir}/man3/gc.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/gcc/cpp b/SPECS/gcc/cpp new file mode 100755 index 00000000..83a36851 --- /dev/null +++ b/SPECS/gcc/cpp @@ -0,0 +1,3 @@ +#!/bin/sh +# Traditionally, /lib/cpp only knew about C. +exec /usr/bin/cpp -xc "$@" diff --git a/SPECS/gcc/gcc.spec b/SPECS/gcc/gcc.spec new file mode 100644 index 00000000..966962b9 --- /dev/null +++ b/SPECS/gcc/gcc.spec @@ -0,0 +1,680 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define gccsuffix %{nil} +%define gcc_version 15 +%define gcc_suffix 15 + +Name: gcc%{gccsuffix} +%define separate_bi32 0 +%define separate_bi64 0 +%if 0%{!?disable_32bit:1} +%ifarch ppc sparcv9 +%define separate_bi64 1 +%endif +%ifarch x86_64 s390x ppc64 sparc64 +%define separate_bi32 1 +%endif +%endif +# Ada currently fails to build on a few platforms, enable it only +# on those that work +# Note that AdaCore only supports %%ix86, x86_64 and ia64 +%ifarch %ix86 x86_64 ppc ppc64 ppc64le s390 s390x ia64 aarch64 riscv64 +%define build_ada 0 +%else +# alpha hppa arm +%define build_ada 0 +%endif +%ifarch x86_64 %ix86 %arm aarch64 riscv64 s390x +%define build_d 0 +%else +%define build_d 0 +%endif +%define quadmath_arch %ix86 x86_64 ia64 ppc64le +%define libgccjit_sover 0 + +URL: http://gcc.gnu.org/ +Version: %{gcc_version} +Release: %autorelease +Summary: The system GNU C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: c_compiler +%if "%{gccsuffix}" != "" +Provides: gcc = %{version} +Conflicts: gcc +%endif +Requires: cpp%{gccsuffix} +Requires: gcc%{gcc_version} +BuildRequires: gcc%{gcc_version} +BuildRequires: gcc%{gcc_version}-c++ +BuildRequires: gcc%{gcc_version}-fortran +BuildRequires: gcc%{gcc_version}-go +%if %{build_ada} +BuildRequires: gcc%{gcc_version}-ada +%endif +%if %{build_d} +BuildRequires: gcc%{gcc_version}-d +%endif +Source: cpp +%if "%{gccsuffix}" != "" +ExclusiveArch: do-not-build +%endif + +%description -n gcc%{gccsuffix} +The system GNU C Compiler. + +%package -n gcc%{gccsuffix}-32bit +Summary: The system GNU C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-32bit = %{version} +Conflicts: gcc-32bit +%endif +Requires: gcc%{gcc_version}-32bit +Requires: gcc%{gccsuffix} = %{version} + +%description -n gcc%{gccsuffix}-32bit +The system GNU C Compiler. + +%package -n gcc%{gccsuffix}-64bit +Summary: The system GNU C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-64bit = %{version} +Conflicts: gcc-64bit +%endif +Requires: gcc%{gcc_version}-64bit +Requires: gcc%{gccsuffix} = %{version} + +%description -n gcc%{gccsuffix}-64bit +The system GNU C Compiler. + +%package -n cpp%{gccsuffix} +Summary: The system GNU Preprocessor +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Requires: cpp%{gcc_version} +# Only one of the symlink packages can be installed at the same time +Provides: cpp = %{version}-%{release} +Conflicts: cpp + +%description -n cpp%{gccsuffix} +The system GNU Preprocessor. + +%package -n gcc%{gccsuffix}-devel +Summary: The system GNU C Compiler Plugin development files +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-devel = %{version} +Conflicts: gcc-devel +%endif +Requires: gcc%{gcc_version}-devel +Requires: gcc%{gccsuffix} = %{version} + +%description -n gcc%{gccsuffix}-devel +The system GNU C Compiler Plugin development files. + +%package -n gcc%{gccsuffix}-locale +Summary: The system GNU Compiler locale files +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-locale = %{version} +Conflicts: gcc-locale +%endif +Requires: gcc%{gcc_version}-locale + +%description -n gcc%{gccsuffix}-locale +The system GNU Compiler locale files. + + + +%package -n gcc%{gccsuffix}-c++ +Summary: The system GNU C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: c++_compiler +%if "%{gccsuffix}" != "" +Provides: gcc-c++ = %{version} +Conflicts: gcc-c++ +%endif +Requires: gcc%{gcc_version}-c++ +Requires: gcc%{gccsuffix} = %{version} + +%description -n gcc%{gccsuffix}-c++ +The system GNU C++ Compiler. + +%package -n gcc%{gccsuffix}-c++-32bit +Summary: The system GNU C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-c++-32bit = %{version} +Conflicts: gcc-c++-32bit +%endif +Requires: gcc%{gcc_version}-c++-32bit +Requires: gcc%{gccsuffix}-32bit = %{version} +Requires: gcc%{gccsuffix}-c++ = %{version} + +%description -n gcc%{gccsuffix}-c++-32bit +The system GNU C++ Compiler 32 bit support. + +%package -n gcc%{gccsuffix}-c++-64bit +Summary: The system GNU C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-c++-64bit = %{version} +Conflicts: gcc-c++-64bit +%endif +Requires: gcc%{gcc_version}-c++-64bit +Requires: gcc%{gccsuffix}-64bit = %{version} +Requires: gcc%{gccsuffix}-c++ = %{version} + +%description -n gcc%{gccsuffix}-c++-64bit +The system GNU C++ Compiler 64 bit support. + +%package -n libstdc++%{gccsuffix}-devel +Summary: The system GNU C++ development files +License: GPL-3.0-only WITH GCC-exception-3.1 +Group: System/Libraries +%if "%{gccsuffix}" != "" +Provides: libstdc++-devel = %{version} +Conflicts: libstdc++-devel +%endif +Requires: libstdc++6-devel-gcc%{gcc_version} + +%description -n libstdc++%{gccsuffix}-devel +The system GNU C++ development files. + +%package -n libstdc++%{gccsuffix}-devel-32bit +Summary: The system GNU C++ 32bit development files +License: GPL-3.0-only WITH GCC-exception-3.1 +Group: System/Libraries +%if "%{gccsuffix}" != "" +Provides: libstdc++-devel-32bit = %{version} +Conflicts: libstdc++-devel-32bit +%endif +Requires: libstdc++%{gccsuffix}-devel +Requires: libstdc++6-devel-gcc%{gcc_version}-32bit + +%description -n libstdc++%{gccsuffix}-devel-32bit +The system GNU C++ 32bit development files. + +%package -n libstdc++%{gccsuffix}-devel-64bit +Summary: The system GNU C++ 64bit development files +License: GPL-3.0-only WITH GCC-exception-3.1 +Group: System/Libraries +%if "%{gccsuffix}" != "" +Provides: libstdc++-devel-64bit = %{version} +Conflicts: libstdc++-devel-64bit +%endif +Requires: libstdc++%{gccsuffix}-devel +Requires: libstdc++6-devel-gcc%{gcc_version}-64bit + +%description -n libstdc++%{gccsuffix}-devel-64bit +The system GNU C++ 64bit development files. + +%package -n gcc%{gccsuffix}-fortran +Summary: The system GNU Fortran Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Fortran +%if "%{gccsuffix}" != "" +Provides: gcc-fortran = %{version} +Conflicts: gcc-fortran +%endif +Requires: gcc%{gcc_version}-fortran +Requires: gcc%{gccsuffix} = %{version} + +%description -n gcc%{gccsuffix}-fortran +The system GNU Fortran Compiler. + +%package -n gcc%{gccsuffix}-fortran-32bit +Summary: The system GNU Fortran Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Fortran +%if "%{gccsuffix}" != "" +Provides: gcc-fortran-32bit = %{version} +Conflicts: gcc-fortran-32bit +%endif +Requires: gcc%{gcc_version}-fortran-32bit +Requires: gcc%{gccsuffix}-fortran = %{version} + +%description -n gcc%{gccsuffix}-fortran-32bit +The system GNU Fortran Compiler 32 bit support. + +%package -n gcc%{gccsuffix}-fortran-64bit +Summary: The system GNU Fortran Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Fortran +%if "%{gccsuffix}" != "" +Provides: gcc-fortran-64bit = %{version} +Conflicts: gcc-fortran-64bit +%endif +Requires: gcc%{gcc_version}-fortran-64bit +Requires: gcc%{gccsuffix}-fortran = %{version} + +%description -n gcc%{gccsuffix}-fortran-64bit +The system GNU Fortran Compiler 64 bit support. + +%package -n gcc%{gccsuffix}-objc +Summary: The system GNU Objective C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +%if "%{gccsuffix}" != "" +Provides: gcc-objc = %{version} +Conflicts: gcc-objc +%endif +Requires: gcc%{gcc_version}-objc +Requires: gcc%{gccsuffix} = %{version} +%ifarch ppc64 +Obsoletes: gcc%{gccsuffix}-objc-64bit +%endif + +%description -n gcc%{gccsuffix}-objc +The system GNU Objective C Compiler. + +%package -n gcc%{gccsuffix}-objc-32bit +Summary: The system GNU Objective C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +%if "%{gccsuffix}" != "" +Provides: gcc-objc-32bit = %{version} +Conflicts: gcc-objc-32bit +%endif +Requires: gcc%{gcc_version}-objc-32bit +Requires: gcc%{gccsuffix}-objc = %{version} + +%description -n gcc%{gccsuffix}-objc-32bit +The system GNU Objective C Compiler 32 bit support. + +%package -n gcc%{gccsuffix}-objc-64bit +Summary: The system GNU Objective C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +%if "%{gccsuffix}" != "" +Provides: gcc-objc-64bit = %{version} +Conflicts: gcc-objc-64bit +%endif +Requires: gcc%{gcc_version}-objc-64bit +Requires: gcc%{gccsuffix}-objc = %{version} + +%description -n gcc%{gccsuffix}-objc-64bit +The system GNU Objective C Compiler 64 bit support. + +%package -n gcc%{gccsuffix}-obj-c++ +Summary: The system GNU Objective C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +%if "%{gccsuffix}" != "" +Provides: gcc-objc-c++ = %{version} +Conflicts: gcc-objc-c++ +%endif +Requires: gcc%{gcc_version}-obj-c++ +Requires: gcc%{gccsuffix}-objc = %{version} + +%description -n gcc%{gccsuffix}-obj-c++ +The system GNU Objective C++ Compiler. + +%package -n gcc%{gccsuffix}-PIE +Summary: A default configuration to build all binaries in PIE mode +License: GPL-3.0-or-later +Group: Development/Languages/Other +%if "%{gccsuffix}" != "" +Provides: gcc-PIE = %{version} +Conflicts: gcc-PIE +%endif +Requires: gcc%{gcc_version}-PIE + +%description -n gcc%{gccsuffix}-PIE +This package contains a configuration file (spec) that changes the +compilers default setting to build all ELF binaries in the Position +Independend Executable (PIE) variant. This enables better address +space randomization (ASLR). + +%package -n gcc%{gccsuffix}-ada +Summary: The system GNU Ada Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-ada = %{version} +Conflicts: gcc-ada +%endif +Requires: gcc%{gcc_version}-ada +Requires: gcc%{gccsuffix} = %{version} + +%description -n gcc%{gccsuffix}-ada +The system GNU Ada Compiler. + +%package -n gcc%{gccsuffix}-ada-32bit +Summary: The system GNU Ada Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-ada-32bit = %{version} +Conflicts: gcc-ada-32bit +%endif +Requires: gcc%{gcc_version}-ada-32bit +Requires: gcc%{gccsuffix}-ada = %{version} + +%description -n gcc%{gccsuffix}-ada-32bit +The system GNU Ada Compiler 32 bit support. + +%package -n gcc%{gccsuffix}-ada-64bit +Summary: The system GNU Ada Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-ada-64bit = %{version} +Conflicts: gcc-ada-64bit +%endif +Requires: gcc%{gcc_version}-ada-64bit +Requires: gcc%{gccsuffix}-ada = %{version} + +%description -n gcc%{gccsuffix}-ada-64bit +The system GNU Ada Compiler 64 bit support. + +%package -n gcc%{gccsuffix}-go +Summary: The system GNU Go Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-go = %{version} +Conflicts: gcc-go +%endif +Requires: gcc%{gcc_version}-go +Requires: gcc%{gccsuffix} = %{version} +Requires(post): update-alternatives +Requires(postun):update-alternatives + +%description -n gcc%{gccsuffix}-go +The system GNU Go Compiler. + +%package -n gcc%{gccsuffix}-go-32bit +Summary: The system GNU Go Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-go-32bit = %{version} +Conflicts: gcc-go-32bit +%endif +Requires: gcc%{gcc_version}-go-32bit +Requires: gcc%{gccsuffix}-go = %{version} + +%description -n gcc%{gccsuffix}-go-32bit +The system GNU Go Compiler 32bit support. + +%package -n gcc%{gccsuffix}-go-64bit +Summary: The system GNU Go Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-go-64bit = %{version} +Conflicts: gcc-go-64bit +%endif +Requires: gcc%{gcc_version}-go-64bit +Requires: gcc%{gccsuffix}-go = %{version} + +%description -n gcc%{gccsuffix}-go-64bit +The system GNU Go Compiler 64bit support. + +%package -n gcc%{gccsuffix}-d +Summary: The system GNU D Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-d = %{version} +Conflicts: gcc-d +%endif +Requires: gcc%{gcc_version}-d +Requires: gcc%{gccsuffix} = %{version} +Requires(post): update-alternatives +Requires(postun):update-alternatives + +%description -n gcc%{gccsuffix}-d +The system GNU D Compiler. + +%package -n gcc%{gccsuffix}-d-32bit +Summary: The system GNU D Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-d-32bit = %{version} +Conflicts: gcc-d-32bit +%endif +Requires: gcc%{gcc_version}-d-32bit +Requires: gcc%{gccsuffix}-d = %{version} + +%description -n gcc%{gccsuffix}-d-32bit +The system GNU D Compiler 32bit support. + +%package -n gcc%{gccsuffix}-d-64bit +Summary: The system GNU D Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: gcc-d-64bit = %{version} +Conflicts: gcc-d-64bit +%endif +Requires: gcc%{gcc_version}-d-64bit +Requires: gcc%{gccsuffix}-d = %{version} + +%description -n gcc%{gccsuffix}-d-64bit +The system GNU D Compiler 64bit support. + +%package -n libgccjit%{gccsuffix}-devel +Summary: Support for embedding GCC inside programs and libraries +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +%if "%{gccsuffix}" != "" +Provides: libgccjit-devel = %{version} +Conflicts: libgccjit-devel +%endif +Requires: libgccjit%{libgccjit_sover}-devel-gcc%{gcc_version} + +%description -n libgccjit%{gccsuffix}-devel +Package contains header files and documentation for GCC JIT front-end. + +%package -n libquadmath%{gccsuffix}-devel +Summary: Development files for the quadprecision math library +License: LGPL-2.1-only +Group: Development/Languages/Fortran +%if "%{gccsuffix}" != "" +Provides: libquadmath-devel = %{version} +Conflicts: libquadmath-devel +%endif +Requires: libquadmath0-devel-gcc%{gcc_version} + +%description -n libquadmath%{gccsuffix}-devel +Development files for the quadprecision math library. + +%prep + +%install +mkdir -p $RPM_BUILD_ROOT/lib +mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +mkdir -p $RPM_BUILD_ROOT%{_infodir} +mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-objc/ +mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-obj-c++/ +# Link all the binaries +for program in \ + gcc gcov gcov-dump gcov-tool lto-dump \ + g++ \ + cpp \ + gfortran \ + gccgo \ +%if %{build_ada} + gnat gnatbind gnatchop gnatclean gnatkr \ + gnatlink gnatls gnatmake gnatname gnatprep \ +%endif +%if %{build_d} + gdc \ +%endif + gcc-ar gcc-nm gcc-ranlib \ + ; do + ln -sf $program-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/$program +done +# For go and gofmt use alternatives since they are shared with golang +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -sf %{_sysconfdir}/alternatives/go %{buildroot}%{_bindir}/go +ln -sf %{_sysconfdir}/alternatives/gofmt %{buildroot}%{_bindir}/gofmt +# Link section 1 manpages +for man1 in \ + gcc gcov gcov-dump gcov-tool lto-dump \ + g++ \ + cpp \ + gfortran \ + gccgo \ +%if %{build_d} + gdc \ +%endif + ; do + ln -sf $man1-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/$man1.1.gz +done + +# Provide the traditional /lib/cpp (as /usr/lib/cpp on usrmerged systems) +# that only handles C +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib +cp %{SOURCE0} $RPM_BUILD_ROOT%{_prefix}/lib/ +chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/cpp +# Provide extra symlinks +ln -sf g++-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/c++ +ln -sf gcc-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/cc +ln -sf g++-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/c++.1.gz +ln -sf gcc-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/cc.1.gz +# Install the LTO linker plugin so it is auto-loaded by BFD +mkdir -p $RPM_BUILD_ROOT%{_libdir}/bfd-plugins +ln -s `gcc-%{gcc_suffix} -print-file-name=liblto_plugin.so` $RPM_BUILD_ROOT%{_libdir}/bfd-plugins/liblto_plugin.so + +%post -n gcc%{gccsuffix}-go +# we don't want a BuildRequires on gccN-go but otherwise the install +# step of the build fails, so simply skip the script when gccN-go isn't there +if [ -f %{_bindir}/go-%{gcc_suffix} ] ; then +update-alternatives \ + --install %{_bindir}/go go %{_bindir}/go-%{gcc_suffix} 100 \ + --slave %{_bindir}/gofmt gofmt %{_bindir}/gofmt-%{gcc_suffix} +fi + +%postun -n gcc%{gccsuffix}-go +if [ $1 -eq 0 ] ; then + update-alternatives --remove go %{_bindir}/go-%{gcc_suffix} +fi + +%files -n gcc%{gccsuffix} +%defattr(-,root,root) +%{_prefix}/bin/gcc +%{_prefix}/bin/cc +%{_prefix}/bin/gcov +%{_prefix}/bin/gcov-dump +%{_prefix}/bin/gcov-tool +%{_prefix}/bin/lto-dump +%{_prefix}/bin/gcc-ar +%{_prefix}/bin/gcc-nm +%{_prefix}/bin/gcc-ranlib +%dir %{_libdir}/bfd-plugins +%{_libdir}/bfd-plugins/liblto_plugin.so +%doc %{_mandir}/man1/gcc.1.gz +%doc %{_mandir}/man1/cc.1.gz +%doc %{_mandir}/man1/gcov.1.gz +%doc %{_mandir}/man1/gcov-dump.1.gz +%doc %{_mandir}/man1/gcov-tool.1.gz +%doc %{_mandir}/man1/lto-dump.1.gz + +%files -n cpp%{gccsuffix} +%defattr(-,root,root) +%{_prefix}/lib/cpp +%{_prefix}/bin/cpp +%doc %{_mandir}/man1/cpp.1.gz + +# Plugins are only enabled for mainline +%if 0%{?is_openruyi} +%files -n gcc%{gccsuffix}-devel +%defattr(-,root,root) +# empty - only for the dependency +%endif + +%files -n gcc%{gccsuffix}-c++ +%defattr(-,root,root) +%{_prefix}/bin/g++ +%{_prefix}/bin/c++ +%doc %{_mandir}/man1/g++.1.gz +%doc %{_mandir}/man1/c++.1.gz + +%files -n gcc%{gccsuffix}-fortran +%defattr(-,root,root) +%{_prefix}/bin/gfortran +%doc %{_mandir}/man1/gfortran.1.gz + +%files -n gcc%{gccsuffix}-objc +%defattr(-,root,root) +# empty - only for the dependency + +%files -n gcc%{gccsuffix}-obj-c++ +%defattr(-,root,root) +# empty - only for the dependency + +%files -n gcc%{gccsuffix}-PIE +%defattr(-,root,root) +# empty - only for the dependency + +%files -n gcc%{gccsuffix}-locale +%defattr(-,root,root) +# empty - only for the dependency + +%if %{build_ada} +%files -n gcc%{gccsuffix}-ada +%defattr(-,root,root) +%{_prefix}/bin/gnat +%{_prefix}/bin/gnatbind +%{_prefix}/bin/gnatchop +%{_prefix}/bin/gnatclean +%{_prefix}/bin/gnatkr +%{_prefix}/bin/gnatlink +%{_prefix}/bin/gnatls +%{_prefix}/bin/gnatmake +%{_prefix}/bin/gnatname +%{_prefix}/bin/gnatprep +%endif + +%files -n libstdc++%{gccsuffix}-devel +%defattr(-,root,root) +# empty - only for the dependency + +%files -n gcc%{gccsuffix}-go +%defattr(-,root,root) +%{_bindir}/gccgo +%{_bindir}/go +%{_bindir}/gofmt +%ghost %{_sysconfdir}/alternatives/go +%ghost %{_sysconfdir}/alternatives/gofmt +%doc %{_mandir}/man1/gccgo.1.gz + +%if %{build_d} +%files -n gcc%{gccsuffix}-d +%defattr(-,root,root) +%{_bindir}/gdc +%doc %{_mandir}/man1/gdc.1.gz +%endif + +%files -n libgccjit%{gccsuffix}-devel +%defattr(-,root,root) +# empty - only for the dependency + +%if %{gcc_version} >= 14 +%ifarch %quadmath_arch +%files -n libquadmath%{gccsuffix}-devel +%defattr(-,root,root) +# empty - only for the dependency +%endif +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/gcc15/0001-PATCH-RISC-V-Imply-C-from-Zca-whenever-possible-PR11.patch b/SPECS/gcc15/0001-PATCH-RISC-V-Imply-C-from-Zca-whenever-possible-PR11.patch new file mode 100644 index 00000000..cadafa67 --- /dev/null +++ b/SPECS/gcc15/0001-PATCH-RISC-V-Imply-C-from-Zca-whenever-possible-PR11.patch @@ -0,0 +1,297 @@ +From dc628f44be23dce7a3a2e2cd8fc1d3b467132d37 Mon Sep 17 00:00:00 2001 +From: Yuriy Kolerov +Date: Thu, 24 Apr 2025 21:22:16 -0600 +Subject: [PATCH 01/35] [PATCH] RISC-V: Imply C from Zca whenever possible + [PR119122] + +GCC must imply C extension from Zca extension when it's +possible. It's necessary for achieving compatibility +between different march strings which in fact may be +the same. + +E.g., if rv32ic multilib configuration is presented in +GCC, then GCC will not choose this configuration for +linking if -march=rv32i_zca is passed. + +Here is a more practical example. From RISC-V +Instruction Set Manual: + + Therefore common ISA strings can be updated as follows + to include the relevant Zc extensions, for example: + - RV32IMC becomes RV32IM_Zce + - RV32IMCF becomes RV32IMF_Zce + +With current implication rules this will not work well +if rv32imc configuration is presented and a user +passes -march=rv32im_zce. This is how we can check +this with a simple empty test.c source file: + +$ riscv64-unknown-elf-gcc -march=rv32ic -mabi=ilp32 -mriscv-attribute -S test.c +$ grep "attribute arch" test.s + .attribute arch, "rv32i2p1_c2p0_zca1p0" +$ riscv64-unknown-elf-gcc -march=rv32i_zce -mabi=ilp32 -mriscv-attribute -S test.c +$ grep "attribute arch" test.s + .attribute arch, "rv32i2p1_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0" + +According to current GCC these march strings are +incompatible: the first one contains c2p0 and the +second on doesn't. + +To introduce such implication rule we need to carefully +cover all possible combinations with these extensions: +zca, zcf, zcd, F and D. + +According to the same manual: + + As C defines the same instructions as Zca, Zcf and + Zcd, the rule is that: + - C always implies Zca + - C+F implies Zcf (RV32 only) + - C+D implies Zcd + +Here is a full list of cases: + + 1. rv32i_zca implies C. + 2. rv32if_zca_zcf implies C. + 3. rv32ifd_zca_zcf_zcd implies C. + 4. rv64i_zca implies C. + 5. rv64ifd_zca_zcd implies C. + + PR target/119122 + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_implied_info): Add a rule + for Zca to C implication. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-25.c: Fix dg-error expectation. + * gcc.target/riscv/attribute-c-1.c: New test. + * gcc.target/riscv/attribute-c-2.c: New test. + * gcc.target/riscv/attribute-c-3.c: New test. + * gcc.target/riscv/attribute-c-4.c: New test. + * gcc.target/riscv/attribute-c-5.c: New test. + * gcc.target/riscv/attribute-c-6.c: New test. + * gcc.target/riscv/attribute-c-7.c: New test. + * gcc.target/riscv/attribute-c-8.c: New test. + * gcc.target/riscv/attribute-zce-1.c: Update Zce tests. + * gcc.target/riscv/attribute-zce-2.c: Likewise. + * gcc.target/riscv/attribute-zce-3.c: Likewise + * gcc.target/riscv/attribute-zce-4.c: Likewise. +--- + gcc/common/config/riscv/riscv-common.cc | 31 +++++++++++++++++++ + gcc/testsuite/gcc.target/riscv/arch-25.c | 2 +- + .../gcc.target/riscv/attribute-c-1.c | 6 ++++ + .../gcc.target/riscv/attribute-c-2.c | 6 ++++ + .../gcc.target/riscv/attribute-c-3.c | 6 ++++ + .../gcc.target/riscv/attribute-c-4.c | 6 ++++ + .../gcc.target/riscv/attribute-c-5.c | 6 ++++ + .../gcc.target/riscv/attribute-c-6.c | 6 ++++ + .../gcc.target/riscv/attribute-c-7.c | 6 ++++ + .../gcc.target/riscv/attribute-c-8.c | 6 ++++ + .../gcc.target/riscv/attribute-zce-1.c | 2 +- + .../gcc.target/riscv/attribute-zce-2.c | 2 +- + .../gcc.target/riscv/attribute-zce-3.c | 2 +- + .../gcc.target/riscv/attribute-zce-4.c | 2 +- + 14 files changed, 84 insertions(+), 5 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-1.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-2.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-3.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-4.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-5.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-6.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-7.c + create mode 100644 gcc/testsuite/gcc.target/riscv/attribute-c-8.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index b34409adf39..15df22d5377 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -218,6 +218,37 @@ static const riscv_implied_info_t riscv_implied_info[] = + { + return subset_list->xlen () == 32 && subset_list->lookup ("f"); + }}, ++ {"zca", "c", ++ [] (const riscv_subset_list *subset_list) -> bool ++ { ++ /* For RV32 Zca implies C for one of these combinations of ++ extensions: Zca, F_Zca_Zcf and FD_Zca_Zcf_Zcd. */ ++ if (subset_list->xlen () == 32) ++ { ++ if (subset_list->lookup ("d")) ++ return subset_list->lookup ("zcf") && subset_list->lookup ("zcd"); ++ ++ if (subset_list->lookup ("f")) ++ return subset_list->lookup ("zcf"); ++ ++ return true; ++ } ++ ++ /* For RV64 Zca implies C for one of these combinations of ++ extensions: Zca and FD_Zca_Zcd (Zcf is not available ++ for RV64). */ ++ if (subset_list->xlen () == 64) ++ { ++ if (subset_list->lookup ("d")) ++ return subset_list->lookup ("zcd"); ++ ++ return true; ++ } ++ ++ /* Do nothing for future RV128 specification. Behaviour ++ for this case is not yet well defined. */ ++ return false; ++ }}, + + {"smaia", "ssaia"}, + {"smstateen", "ssstateen"}, +diff --git a/gcc/testsuite/gcc.target/riscv/arch-25.c b/gcc/testsuite/gcc.target/riscv/arch-25.c +index 3be4ade65a7..9201883dfb3 100644 +--- a/gcc/testsuite/gcc.target/riscv/arch-25.c ++++ b/gcc/testsuite/gcc.target/riscv/arch-25.c +@@ -2,4 +2,4 @@ + /* { dg-options "-march=rv64i_zcf -mabi=lp64" } */ + int foo() {} + /* { dg-error "'-march=rv64i_zcf': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */ +-/* { dg-error "'-march=rv64i_zca_zcf': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv64ic_zca_zcf': zcf extension supports in rv32 only" "" { target *-*-* } 0 } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-1.c b/gcc/testsuite/gcc.target/riscv/attribute-c-1.c +new file mode 100644 +index 00000000000..5627e16f671 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-1.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv32i_zca -mabi=ilp32" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_c2p0_zca1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-2.c b/gcc/testsuite/gcc.target/riscv/attribute-c-2.c +new file mode 100644 +index 00000000000..4c7d5f902e3 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-2.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv32if_zca -mabi=ilp32" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_f2p2_zicsr2p0_zca1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-3.c b/gcc/testsuite/gcc.target/riscv/attribute-c-3.c +new file mode 100644 +index 00000000000..7ff68f7749e +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-3.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv32if_zca_zcf -mabi=ilp32" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_f2p2_c2p0_zicsr2p0_zca1p0_zcf1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-4.c b/gcc/testsuite/gcc.target/riscv/attribute-c-4.c +new file mode 100644 +index 00000000000..ef59b6580e4 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-4.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv32ifd_zca_zcf -mabi=ilp32" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcf1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-5.c b/gcc/testsuite/gcc.target/riscv/attribute-c-5.c +new file mode 100644 +index 00000000000..14e95516cc5 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-5.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv32ifd_zca_zcf_zcd -mabi=ilp32" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_f2p2_d2p2_c2p0_zicsr2p0_zca1p0_zcd1p0_zcf1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-6.c b/gcc/testsuite/gcc.target/riscv/attribute-c-6.c +new file mode 100644 +index 00000000000..30cda5512a0 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-6.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv64i_zca -mabi=lp64" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_c2p0_zca1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-7.c b/gcc/testsuite/gcc.target/riscv/attribute-c-7.c +new file mode 100644 +index 00000000000..b06388b0ce3 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-7.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv64ifd_zca -mabi=lp64" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_f2p2_d2p2_zicsr2p0_zca1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-c-8.c b/gcc/testsuite/gcc.target/riscv/attribute-c-8.c +new file mode 100644 +index 00000000000..fa760505d44 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/attribute-c-8.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mriscv-attribute -march=rv64ifd_zca_zcd -mabi=lp64" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_f2p2_d2p2_c2p0_zicsr2p0_zca1p0_zcd1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-zce-1.c b/gcc/testsuite/gcc.target/riscv/attribute-zce-1.c +index e477414d4d5..fc86dbe2a00 100644 +--- a/gcc/testsuite/gcc.target/riscv/attribute-zce-1.c ++++ b/gcc/testsuite/gcc.target/riscv/attribute-zce-1.c +@@ -3,4 +3,4 @@ + + void foo(){} + +-/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0\"" } } */ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_c2p0_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-zce-2.c b/gcc/testsuite/gcc.target/riscv/attribute-zce-2.c +index 7008eb5ea1f..4504158dab1 100644 +--- a/gcc/testsuite/gcc.target/riscv/attribute-zce-2.c ++++ b/gcc/testsuite/gcc.target/riscv/attribute-zce-2.c +@@ -3,4 +3,4 @@ + + void foo(){} + +-/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_f2p2_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcf1p0_zcmp1p0_zcmt1p0\"" } } */ ++/* { dg-final { scan-assembler ".attribute arch, \"rv32i2p1_f2p2_c2p0_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcf1p0_zcmp1p0_zcmt1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-zce-3.c b/gcc/testsuite/gcc.target/riscv/attribute-zce-3.c +index 89ebaaf4063..4ffc05119e6 100644 +--- a/gcc/testsuite/gcc.target/riscv/attribute-zce-3.c ++++ b/gcc/testsuite/gcc.target/riscv/attribute-zce-3.c +@@ -3,4 +3,4 @@ + + void foo(){} + +-/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0\"" } } */ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_c2p0_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/attribute-zce-4.c b/gcc/testsuite/gcc.target/riscv/attribute-zce-4.c +index cacbcaac35f..7ee8de2e308 100644 +--- a/gcc/testsuite/gcc.target/riscv/attribute-zce-4.c ++++ b/gcc/testsuite/gcc.target/riscv/attribute-zce-4.c +@@ -3,4 +3,4 @@ + + void foo(){} + +-/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_f2p2_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0\"" } } */ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_f2p2_c2p0_zicsr2p0_zca1p0_zcb1p0_zce1p0_zcmp1p0_zcmt1p0\"" } } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0002-RISC-V-Fix-missing-implied-Zicsr-from-Zve32x.patch b/SPECS/gcc15/0002-RISC-V-Fix-missing-implied-Zicsr-from-Zve32x.patch new file mode 100644 index 00000000..96087e3c --- /dev/null +++ b/SPECS/gcc15/0002-RISC-V-Fix-missing-implied-Zicsr-from-Zve32x.patch @@ -0,0 +1,107 @@ +From 00e9a58ec50878134fd5d2c88d4af045e21fabbd Mon Sep 17 00:00:00 2001 +From: Jerry Zhang Jian +Date: Wed, 30 Apr 2025 15:34:07 +0800 +Subject: [PATCH 02/35] RISC-V: Fix missing implied Zicsr from Zve32x + +The Zve32x extension depends on the Zicsr extension. +Currently, enabling Zve32x alone does not automatically imply Zicsr in GCC. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc: Add Zve32x depends on Zicsr + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/predef-19.c: set the march to rv64im_zve32x + instead of rv64gc_zve32x to avoid Zicsr implied by g. Extra m is + added to avoid current 'V' extension requires 'M' extension + +Signed-off-by: Jerry Zhang Jian +--- + gcc/common/config/riscv/riscv-common.cc | 1 + + gcc/testsuite/gcc.target/riscv/predef-19.c | 34 +++++----------------- + 2 files changed, 8 insertions(+), 27 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 15df22d5377..145a0f2bd95 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -137,6 +137,7 @@ static const riscv_implied_info_t riscv_implied_info[] = + {"zve64f", "f"}, + {"zve64d", "d"}, + ++ {"zve32x", "zicsr"}, + {"zve32x", "zvl32b"}, + {"zve32f", "zve32x"}, + {"zve32f", "zvl32b"}, +diff --git a/gcc/testsuite/gcc.target/riscv/predef-19.c b/gcc/testsuite/gcc.target/riscv/predef-19.c +index 2b90702192b..ca3d57abca9 100644 +--- a/gcc/testsuite/gcc.target/riscv/predef-19.c ++++ b/gcc/testsuite/gcc.target/riscv/predef-19.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -march=rv64gc_zve32x -mabi=lp64d -mcmodel=medlow -misa-spec=2.2" } */ ++/* { dg-options "-O2 -march=rv64im_zve32x -mabi=lp64 -mcmodel=medlow -misa-spec=2.2" } */ + + int main () { + +@@ -15,50 +15,30 @@ int main () { + #error "__riscv_i" + #endif + +-#if !defined(__riscv_c) +-#error "__riscv_c" +-#endif +- + #if defined(__riscv_e) + #error "__riscv_e" + #endif + +-#if !defined(__riscv_a) +-#error "__riscv_a" +-#endif +- + #if !defined(__riscv_m) + #error "__riscv_m" + #endif + +-#if !defined(__riscv_f) +-#error "__riscv_f" +-#endif +- +-#if !defined(__riscv_d) +-#error "__riscv_d" +-#endif +- +-#if defined(__riscv_v) +-#error "__riscv_v" ++#if !defined(__riscv_zicsr) ++#error "__riscv_zicsr" + #endif + +-#if defined(__riscv_zvl128b) +-#error "__riscv_zvl128b" ++#if !defined(_riscv_zmmul) ++#error "__riscv_zmmul" + #endif + +-#if defined(__riscv_zvl64b) +-#error "__riscv_zvl64b" ++#if !defined(__riscv_zve32x) ++#error "__riscv_zve32x" + #endif + + #if !defined(__riscv_zvl32b) + #error "__riscv_zvl32b" + #endif + +-#if !defined(__riscv_zve32x) +-#error "__riscv_zve32x" +-#endif +- + #if !defined(__riscv_vector) + #error "__riscv_vector" + #endif +-- +2.51.0 + diff --git a/SPECS/gcc15/0003-RISC-V-Add-new-option-param-gpr2vr-cost-for-rvv-insn.patch b/SPECS/gcc15/0003-RISC-V-Add-new-option-param-gpr2vr-cost-for-rvv-insn.patch new file mode 100644 index 00000000..e502714d --- /dev/null +++ b/SPECS/gcc15/0003-RISC-V-Add-new-option-param-gpr2vr-cost-for-rvv-insn.patch @@ -0,0 +1,57 @@ +From 04216280295782354a50c60f69352ed7fc0a34f6 Mon Sep 17 00:00:00 2001 +From: Pan Li +Date: Tue, 6 May 2025 16:26:06 +0800 +Subject: [PATCH 03/35] RISC-V: Add new option --param=gpr2vr-cost= for rvv + insn + +During investigate the combine from vec_dup and vop.vv into +vop.vx, we need to depend on the cost of the insn operate +from the gpr to vr, for example, vadd.vx. Thus, for better +control and test, we introduce a new option, aka below: + +--param=gpr2vr-cost= + +To specific the cost value of the insn that operate from +the gpr to vr. + +gcc/ChangeLog: + + * config/riscv/riscv-opts.h (RVV_GR2VR_COST_UNPROVIDED): Add + new macro to indicate the param is not provided. + * config/riscv/riscv.opt: Add new option --pararm=gpr2vr-cost. + +Signed-off-by: Pan Li +--- + gcc/config/riscv/riscv-opts.h | 2 ++ + gcc/config/riscv/riscv.opt | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h +index 26fe228e0f8..9766b89b2df 100644 +--- a/gcc/config/riscv/riscv-opts.h ++++ b/gcc/config/riscv/riscv-opts.h +@@ -162,4 +162,6 @@ enum riscv_tls_type { + #define TARGET_VECTOR_AUTOVEC_SEGMENT \ + (TARGET_VECTOR && riscv_mautovec_segment) + ++#define GPR2VR_COST_UNPROVIDED -1 ++ + #endif /* ! GCC_RISCV_OPTS_H */ +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index 7515c8ea13d..710248099b3 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -579,6 +579,10 @@ Inline strlen calls if possible. + Target RejectNegative Joined UInteger Var(riscv_strcmp_inline_limit) Init(64) + Max number of bytes to compare as part of inlined strcmp/strncmp routines (default: 64). + ++-param=gpr2vr-cost= ++Target RejectNegative Joined UInteger Var(gpr2vr_cost) Init(GPR2VR_COST_UNPROVIDED) ++Set the cost value of the rvv instruction when operate from GPR to VR. ++ + Enum + Name(rvv_max_lmul) Type(enum rvv_max_lmul_enum) + The RVV possible LMUL (-mrvv-max-lmul=): +-- +2.51.0 + diff --git a/SPECS/gcc15/0004-PATCH-RISC-V-Recognized-svadu-and-svade-extension.patch b/SPECS/gcc15/0004-PATCH-RISC-V-Recognized-svadu-and-svade-extension.patch new file mode 100644 index 00000000..44f2e2b3 --- /dev/null +++ b/SPECS/gcc15/0004-PATCH-RISC-V-Recognized-svadu-and-svade-extension.patch @@ -0,0 +1,118 @@ +From d88d308a8dca86d5c2ed09907245687dec19faf1 Mon Sep 17 00:00:00 2001 +From: Mingzhu Yan +Date: Tue, 6 May 2025 16:59:09 -0600 +Subject: [PATCH 04/35] [PATCH] RISC-V: Recognized svadu and svade extension + +This patch support svadu and svade extension. +To enable GCC to recognize and process svadu and svade extension correctly at compile time. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_ext_version_table): New + extension. + (riscv_ext_flag_table) Ditto. + * config/riscv/riscv.opt: New mask. + + * doc/invoke.texi (RISC-V Options): New extension + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-45.c: New test. + * gcc.target/riscv/arch-46.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 10 +++++++--- + gcc/config/riscv/riscv.opt | 4 ++++ + gcc/doc/invoke.texi | 8 ++++++++ + gcc/testsuite/gcc.target/riscv/arch-45.c | 5 +++++ + gcc/testsuite/gcc.target/riscv/arch-46.c | 5 +++++ + 5 files changed, 29 insertions(+), 3 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-45.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-46.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 145a0f2bd95..58c7d205b33 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -441,6 +441,8 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {"ssstateen", ISA_SPEC_CLASS_NONE, 1, 0}, + {"sstc", ISA_SPEC_CLASS_NONE, 1, 0}, + ++ {"svade", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"svadu", ISA_SPEC_CLASS_NONE, 1, 0}, + {"svinval", ISA_SPEC_CLASS_NONE, 1, 0}, + {"svnapot", ISA_SPEC_CLASS_NONE, 1, 0}, + {"svpbmt", ISA_SPEC_CLASS_NONE, 1, 0}, +@@ -1764,9 +1766,11 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("zcmp", x_riscv_zc_subext, MASK_ZCMP), + RISCV_EXT_FLAG_ENTRY ("zcmt", x_riscv_zc_subext, MASK_ZCMT), + +- RISCV_EXT_FLAG_ENTRY ("svinval", x_riscv_sv_subext, MASK_SVINVAL), +- RISCV_EXT_FLAG_ENTRY ("svnapot", x_riscv_sv_subext, MASK_SVNAPOT), +- RISCV_EXT_FLAG_ENTRY ("svvptc", x_riscv_sv_subext, MASK_SVVPTC), ++ RISCV_EXT_FLAG_ENTRY ("svade", x_riscv_sv_subext, MASK_SVADE), ++ RISCV_EXT_FLAG_ENTRY ("svadu", x_riscv_sv_subext, MASK_SVADU), ++ RISCV_EXT_FLAG_ENTRY ("svinval", x_riscv_sv_subext, MASK_SVINVAL), ++ RISCV_EXT_FLAG_ENTRY ("svnapot", x_riscv_sv_subext, MASK_SVNAPOT), ++ RISCV_EXT_FLAG_ENTRY ("svvptc", x_riscv_sv_subext, MASK_SVVPTC), + + RISCV_EXT_FLAG_ENTRY ("ztso", x_riscv_ztso_subext, MASK_ZTSO), + +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index 710248099b3..9e471be4055 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -466,6 +466,10 @@ Mask(XCVBI) Var(riscv_xcv_subext) + TargetVariable + int riscv_sv_subext + ++Mask(SVADE) Var(riscv_sv_subext) ++ ++Mask(SVADU) Var(riscv_sv_subext) ++ + Mask(SVINVAL) Var(riscv_sv_subext) + + Mask(SVNAPOT) Var(riscv_sv_subext) +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 64a3131c190..54dba7ed580 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -31515,6 +31515,14 @@ to @samp{zvks} and @samp{zvkg}. + @tab 1.0 + @tab Supervisor-mode timer interrupts extension. + ++@item svade ++@tab 1.0 ++@tab Cause exception when hardware updating of A/D bits is disabled ++ ++@item svadu ++@tab 1.0 ++@tab Hardware Updating of A/D Bits extension. ++ + @item svinval + @tab 1.0 + @tab Fine-grained address-translation cache invalidation extension. +diff --git a/gcc/testsuite/gcc.target/riscv/arch-45.c b/gcc/testsuite/gcc.target/riscv/arch-45.c +new file mode 100644 +index 00000000000..afffb995578 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-45.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_svadu -mabi=lp64" } */ ++int foo() ++{ ++} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-46.c b/gcc/testsuite/gcc.target/riscv/arch-46.c +new file mode 100644 +index 00000000000..2a062172e75 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-46.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_svade -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0005-PATCH-RISC-V-Minimal-support-for-sdtrig-and-ssstrict.patch b/SPECS/gcc15/0005-PATCH-RISC-V-Minimal-support-for-sdtrig-and-ssstrict.patch new file mode 100644 index 00000000..d542b6c7 --- /dev/null +++ b/SPECS/gcc15/0005-PATCH-RISC-V-Minimal-support-for-sdtrig-and-ssstrict.patch @@ -0,0 +1,60 @@ +From 0a641ffeb5852adf43bdfd86eecc32d1b3cca2ca Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Tue, 6 May 2025 17:09:54 -0600 +Subject: [PATCH 05/35] [PATCH] RISC-V: Minimal support for sdtrig and ssstrict + extensions. + +This patch support sdtrig and ssstrict extensions[1]. +To enable GCC to recognize and process sdtrig and ssstrict extensions correctly +at compile time. + +[1] https://github.com/riscv/riscv-profiles/blob/main/src/rva23-profile.adoc + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc: New extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-47.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 3 +++ + gcc/testsuite/gcc.target/riscv/arch-47.c | 5 +++++ + 2 files changed, 8 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-47.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 58c7d205b33..0233e1a108b 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -432,6 +432,8 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {"zcmp", ISA_SPEC_CLASS_NONE, 1, 0}, + {"zcmt", ISA_SPEC_CLASS_NONE, 1, 0}, + ++ {"sdtrig", ISA_SPEC_CLASS_NONE, 1, 0}, ++ + {"smaia", ISA_SPEC_CLASS_NONE, 1, 0}, + {"smepmp", ISA_SPEC_CLASS_NONE, 1, 0}, + {"smstateen", ISA_SPEC_CLASS_NONE, 1, 0}, +@@ -440,6 +442,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {"sscofpmf", ISA_SPEC_CLASS_NONE, 1, 0}, + {"ssstateen", ISA_SPEC_CLASS_NONE, 1, 0}, + {"sstc", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"ssstrict", ISA_SPEC_CLASS_NONE, 1, 0}, + + {"svade", ISA_SPEC_CLASS_NONE, 1, 0}, + {"svadu", ISA_SPEC_CLASS_NONE, 1, 0}, +diff --git a/gcc/testsuite/gcc.target/riscv/arch-47.c b/gcc/testsuite/gcc.target/riscv/arch-47.c +new file mode 100644 +index 00000000000..06bc80fe780 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-47.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_sdtrig_ssstrict -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0006-PATCH-RISC-V-Minimal-support-for-zama16b-extension.patch b/SPECS/gcc15/0006-PATCH-RISC-V-Minimal-support-for-zama16b-extension.patch new file mode 100644 index 00000000..081b85b1 --- /dev/null +++ b/SPECS/gcc15/0006-PATCH-RISC-V-Minimal-support-for-zama16b-extension.patch @@ -0,0 +1,72 @@ +From 4c733eaca5a47de7749376bd3bc63701248bffe1 Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Wed, 7 May 2025 11:33:06 -0600 +Subject: [PATCH 06/35] [PATCH] RISC-V: Minimal support for zama16b extension. + +This patch support zama16b extension[1]. +To enable GCC to recognize and process zama16b extension correctly at compile time. + +[1] https://github.com/riscv/riscv-profiles/blob/main/src/rva23-profile.adoc + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc: New extension. + * config/riscv/riscv.opt: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-48.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 2 ++ + gcc/config/riscv/riscv.opt | 2 ++ + gcc/testsuite/gcc.target/riscv/arch-48.c | 5 +++++ + 3 files changed, 9 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-48.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 0233e1a108b..ca14eb96b25 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -327,6 +327,7 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {"zalrsc", ISA_SPEC_CLASS_NONE, 1, 0}, + {"zabha", ISA_SPEC_CLASS_NONE, 1, 0}, + {"zacas", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"zama16b", ISA_SPEC_CLASS_NONE, 1, 0}, + + {"zba", ISA_SPEC_CLASS_NONE, 1, 0}, + {"zbb", ISA_SPEC_CLASS_NONE, 1, 0}, +@@ -1657,6 +1658,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("zalrsc", x_riscv_za_subext, MASK_ZALRSC), + RISCV_EXT_FLAG_ENTRY ("zabha", x_riscv_za_subext, MASK_ZABHA), + RISCV_EXT_FLAG_ENTRY ("zacas", x_riscv_za_subext, MASK_ZACAS), ++ RISCV_EXT_FLAG_ENTRY ("zama16b", x_riscv_za_subext, MASK_ZAMA16B), + + RISCV_EXT_FLAG_ENTRY ("zba", x_riscv_zb_subext, MASK_ZBA), + RISCV_EXT_FLAG_ENTRY ("zbb", x_riscv_zb_subext, MASK_ZBB), +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index 9e471be4055..80593ee139c 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -274,6 +274,8 @@ Mask(ZA64RS) Var(riscv_za_subext) + + Mask(ZA128RS) Var(riscv_za_subext) + ++Mask(ZAMA16B) Var(riscv_za_subext) ++ + TargetVariable + int riscv_zb_subext + +diff --git a/gcc/testsuite/gcc.target/riscv/arch-48.c b/gcc/testsuite/gcc.target/riscv/arch-48.c +new file mode 100644 +index 00000000000..58a558ec192 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-48.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_zama16b -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0007-RISC-V-Support-RISC-V-Profiles-20-22.patch b/SPECS/gcc15/0007-RISC-V-Support-RISC-V-Profiles-20-22.patch new file mode 100644 index 00000000..9dc2298b --- /dev/null +++ b/SPECS/gcc15/0007-RISC-V-Support-RISC-V-Profiles-20-22.patch @@ -0,0 +1,280 @@ +From 6ccd79728a5d75bd66d7757fce62068ac9c2a94d Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Sat, 10 May 2025 20:25:52 +0800 +Subject: [PATCH 07/35] RISC-V: Support RISC-V Profiles 20/22. + +This patch introduces support for RISC-V Profiles RV20 and RV22 [1], +enabling developers to utilize these profiles through the -march option. + +[1] https://github.com/riscv/riscv-profiles/releases/tag/v1.0 + +Version log: +Using lowercase letters to present Profiles. +Using '_' as divsor between Profiles and other RISC-V extension. +Add descriptions in invoke.texi. +Checking if there exist '_' between Profiles and additional extensions. +Using std::string to avoid memory problems. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (struct riscv_profiles): New struct. + (riscv_subset_list::parse_profiles): New parser. + (riscv_subset_list::parse_base_ext): Ditto. + * config/riscv/riscv-subset.h: New def. + * doc/invoke.texi: New option descriptions. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-49.c: New test. + * gcc.target/riscv/arch-50.c: New test. + * gcc.target/riscv/arch-51.c: New test. + * gcc.target/riscv/arch-52.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 85 +++++++++++++++++++++++- + gcc/config/riscv/riscv-subset.h | 2 + + gcc/doc/invoke.texi | 17 +++-- + gcc/testsuite/gcc.target/riscv/arch-49.c | 5 ++ + gcc/testsuite/gcc.target/riscv/arch-50.c | 12 ++++ + gcc/testsuite/gcc.target/riscv/arch-51.c | 12 ++++ + gcc/testsuite/gcc.target/riscv/arch-52.c | 6 ++ + 7 files changed, 130 insertions(+), 9 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-49.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-50.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-51.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-52.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index ca14eb96b25..0fa2e21f272 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -274,6 +274,12 @@ struct riscv_ext_version + int minor_version; + }; + ++struct riscv_profiles ++{ ++ const char *profile_name; ++ const char *profile_string; ++}; ++ + /* All standard extensions defined in all supported ISA spec. */ + static const struct riscv_ext_version riscv_ext_version_table[] = + { +@@ -502,6 +508,31 @@ static const struct riscv_ext_version riscv_combine_info[] = + {NULL, ISA_SPEC_CLASS_NONE, 0, 0} + }; + ++/* This table records the mapping form RISC-V Profiles into march string. */ ++static const riscv_profiles riscv_profiles_table[] = ++{ ++ /* RVI20U only contains the base extension 'i' as mandatory extension. */ ++ {"rvi20u64", "rv64i"}, ++ {"rvi20u32", "rv32i"}, ++ ++ /* RVA20U contains the 'i,m,a,f,d,c,zicsr,zicntr,ziccif,ziccrse,ziccamoa, ++ zicclsm,za128rs' as mandatory extensions. */ ++ {"rva20u64", "rv64imafdc_zicsr_zicntr_ziccif_ziccrse_ziccamoa" ++ "_zicclsm_za128rs"}, ++ ++ /* RVA22U contains the 'i,m,a,f,d,c,zicsr,zihintpause,zba,zbb,zbs,zicntr, ++ zihpm,ziccif,ziccrse,ziccamoa, zicclsm,zic64b,za64rs,zicbom,zicbop,zicboz, ++ zfhmin,zkt' as mandatory extensions. */ ++ {"rva22u64", "rv64imafdc_zicsr_zicntr_ziccif_ziccrse_ziccamoa" ++ "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" ++ "_zicboz_zfhmin_zkt"}, ++ ++ /* Currently we do not define S/M mode Profiles in gcc part. */ ++ ++ /* Terminate the list. */ ++ {NULL, NULL} ++}; ++ + static const riscv_cpu_info riscv_cpu_tables[] = + { + #define RISCV_CORE(CORE_NAME, ARCH, TUNE) \ +@@ -1109,6 +1140,52 @@ riscv_subset_list::parsing_subset_version (const char *ext, + return p; + } + ++/* Parsing RISC-V Profiles in -march string. ++ Return string with mandatory extensions of Profiles. */ ++std::string ++riscv_subset_list::parse_profiles (const char *arch) ++{ ++ /* Checking if input string contains a Profiles. ++ There are two cases use Profiles in -march option: ++ ++ 1. Only use Profiles in '-march' as input ++ 2. Mixed Profiles with other extensions ++ ++ Use '_' to split Profiles and other extension. */ ++ std::string p(arch); ++ const size_t p_len = p.size(); ++ ++ for (int i = 0; riscv_profiles_table[i].profile_name != nullptr; ++i) ++ { ++ const std::string& p_name = riscv_profiles_table[i].profile_name; ++ const std::string& p_str = riscv_profiles_table[i].profile_string; ++ size_t pos = p.find(p_name); ++ /* Find profile at the begin. */ ++ if (pos == 0 && pos + p_name.size() <= p_len) ++ { ++ size_t after_pos = pos + p_name.size(); ++ std::string after_part = p.substr(after_pos); ++ ++ /* If there're only profile, return the profile_string directly. */ ++ if (after_part[0] == '\0') ++ return p_str; ++ ++ /* If isn't '_' after profile, need to add it and mention the user. */ ++ if (after_part[0] != '_') ++ { ++ warning_at (m_loc, 0, "Should use \"%c\" to contact Profiles with other " ++ "extensions", '_'); ++ return p_str + "_" + after_part; ++ } ++ ++ /* Return 'profiles_additional' extensions. */ ++ return p_str + after_part; ++ } ++ } ++ /* Not found profile, return directly. */ ++ return p; ++} ++ + /* Parsing function for base extensions, rv[32|64][i|e|g] + + Return Value: +@@ -1135,8 +1212,8 @@ riscv_subset_list::parse_base_ext (const char *p) + } + else + { +- error_at (m_loc, "%<-march=%s%>: ISA string must begin with rv32 or rv64", +- m_arch); ++ error_at (m_loc, "%<-march=%s%>: ISA string must begin with rv32, rv64 " ++ "or Profiles", m_arch); + return NULL; + } + +@@ -1527,8 +1604,10 @@ riscv_subset_list::parse (const char *arch, location_t loc) + return NULL; + + riscv_subset_list *subset_list = new riscv_subset_list (arch, loc); ++ + const char *p = arch; +- p = subset_list->parse_base_ext (p); ++ std::string a = subset_list->parse_profiles(p); ++ p = subset_list->parse_base_ext (a.c_str()); + if (p == NULL) + goto fail; + +diff --git a/gcc/config/riscv/riscv-subset.h b/gcc/config/riscv/riscv-subset.h +index 559e7085016..7b3fdaeb3e4 100644 +--- a/gcc/config/riscv/riscv-subset.h ++++ b/gcc/config/riscv/riscv-subset.h +@@ -82,6 +82,8 @@ private: + const char *parse_single_multiletter_ext (const char *, const char *, + const char *, bool); + ++ std::string parse_profiles (const char*); ++ + void handle_implied_ext (const char *); + bool check_implied_ext (); + void handle_combine_ext (); +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 54dba7ed580..026685122bf 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -1267,7 +1267,7 @@ See RS/6000 and PowerPC Options. + -mfence-tso -mno-fence-tso + -mdiv -mno-div + -misa-spec=@var{ISA-spec-string} +--march=@var{ISA-string} ++-march=@var{ISA-string|Profiles|Profiles_ISA-string} + -mtune=@var{processor-string} + -mpreferred-stack-boundary=@var{num} + -msmall-data-limit=@var{N-bytes} +@@ -31082,11 +31082,16 @@ The default is @option{-misa-spec=20191213} unless GCC has been configured + with @option{--with-isa-spec=} specifying a different default version. + + @opindex march +-@item -march=@var{ISA-string} +-Generate code for given RISC-V ISA (e.g.@: @samp{rv64im}). ISA strings must be +-lower-case. Examples include @samp{rv64i}, @samp{rv32g}, @samp{rv32e}, and +-@samp{rv32imaf}. Additionally, a special value @option{help} +-(@option{-march=help}) is accepted to list all supported extensions. ++@item -march=@var{ISA-string|Profiles|Profile_ISA-string} ++Generate code for given RISC-V ISA or Profiles or a combination of them ++(e.g.@: @samp{rv64im} @samp{rvi20u64} @samp{rvi20u64_zbb}). ISA strings and ++Profiles must be lower-case. Examples include @samp{rv64i}, @samp{rv32g}, ++@samp{rv32e}, @samp{rv32imaf}, @samp{rva22u64} and @samp{rva23u64}. ++To combine Profiles and optional RISC-V ISA extention, the profile should start ++at the beginning of the option, then use underline connect ISA-string (e.g.@: ++@samp{rvi20u64_zca_zcb} @samp{rva23u64_zacas}). Additionally, a special value ++@option{help} (@option{-march=help}) is accepted to list all supported ++extensions. + + The syntax of the ISA string is defined as follows: + +diff --git a/gcc/testsuite/gcc.target/riscv/arch-49.c b/gcc/testsuite/gcc.target/riscv/arch-49.c +new file mode 100644 +index 00000000000..6b86ae9fb3f +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-49.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rvi20u64 -mabi=lp64" } */ ++int ++foo () ++{} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-50.c b/gcc/testsuite/gcc.target/riscv/arch-50.c +new file mode 100644 +index 00000000000..072180d4f1f +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-50.c +@@ -0,0 +1,12 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rvi20u64_mafdc -mabi=lp64d" } */ ++#if !(defined __riscv_mul) || \ ++ !(defined __riscv_atomic) || \ ++ !(defined __riscv_flen) || \ ++ !(defined __riscv_div) || \ ++ !(defined __riscv_compressed) ++#error "Feature macros not defined" ++#endif ++int ++foo () ++{} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-51.c b/gcc/testsuite/gcc.target/riscv/arch-51.c +new file mode 100644 +index 00000000000..5af983cbca9 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-51.c +@@ -0,0 +1,12 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rva20u64 -mabi=lp64d" } */ ++#if !(defined __riscv_mul) || \ ++ !(defined __riscv_atomic) || \ ++ !(defined __riscv_flen) || \ ++ !(defined __riscv_div) || \ ++ !(defined __riscv_compressed) ++#error "Feature macros not defined" ++#endif ++int ++foo () ++{} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-52.c b/gcc/testsuite/gcc.target/riscv/arch-52.c +new file mode 100644 +index 00000000000..da6aea8fd94 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-52.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rva22u64v -mabi=lp64" } */ ++/* { dg-warning "*Should use \"_\" to contact Profiles with other extensions" } */ ++int ++foo () ++{} +-- +2.51.0 + diff --git a/SPECS/gcc15/0008-RISC-V-Support-RISC-V-Profiles-23.patch b/SPECS/gcc15/0008-RISC-V-Support-RISC-V-Profiles-23.patch new file mode 100644 index 00000000..37002ba1 --- /dev/null +++ b/SPECS/gcc15/0008-RISC-V-Support-RISC-V-Profiles-23.patch @@ -0,0 +1,92 @@ +From 5125391047f6f47efd519834111cd7a25ded6766 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Sat, 10 May 2025 19:26:35 +0800 +Subject: [PATCH 08/35] RISC-V: Support RISC-V Profiles 23. + +This patch introduces support for RISC-V Profiles RV23A and RV23B [1], +enabling developers to utilize these profiles through the -march option. + +[1] https://github.com/riscv/riscv-profiles/releases/tag/rva23-rvb23-ratified + +Version log: +Update the testcases, using lowercase letter. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc: New profile. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-53.c: New test. + * gcc.target/riscv/arch-54.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 16 ++++++++++++++++ + gcc/testsuite/gcc.target/riscv/arch-53.c | 11 +++++++++++ + gcc/testsuite/gcc.target/riscv/arch-54.c | 10 ++++++++++ + 3 files changed, 37 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-53.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-54.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 0fa2e21f272..e06cd5fa576 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -527,6 +527,22 @@ static const riscv_profiles riscv_profiles_table[] = + "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" + "_zicboz_zfhmin_zkt"}, + ++ /* RVA23 contains all mandatory base ISA for RVA22U64 and the new extension ++ 'v,zihintntl,zvfhmin,zvbb,zvkt,zicond,zimop,zcmop,zfa,zawrs' as mandatory ++ extensions. */ ++ {"rva23u64", "rv64imafdcv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" ++ "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" ++ "_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb" ++ "_zfa_zawrs"}, ++ ++ /* RVB23 contains all mandatory base ISA for RVA22U64 and the new extension ++ 'zihintntl,zicond,zimop,zcmop,zfa,zawrs' as mandatory ++ extensions. */ ++ {"rvb23u64", "rv64imafdc_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" ++ "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" ++ "_zicboz_zfhmin_zkt_zihintntl_zicond_zimop_zcmop_zcb" ++ "_zfa_zawrs"}, ++ + /* Currently we do not define S/M mode Profiles in gcc part. */ + + /* Terminate the list. */ +diff --git a/gcc/testsuite/gcc.target/riscv/arch-53.c b/gcc/testsuite/gcc.target/riscv/arch-53.c +new file mode 100644 +index 00000000000..8210978ee8b +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-53.c +@@ -0,0 +1,11 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rva23u64 -mabi=lp64d" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0" ++"_b1p0_v1p0_zic64b1p0_zicbom1p0_zicbop1p0_zicboz1p0_ziccamoa1p0_ziccif1p0_zicclsm1p0" ++_ziccrse1p0_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0" ++_za64rs1p0_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0" ++_zba1p0_zbb1p0_zbs1p0_zkt1p0_zvbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0" ++_zvfhmin1p0_zvkb1p0_zvkt1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/arch-54.c b/gcc/testsuite/gcc.target/riscv/arch-54.c +new file mode 100644 +index 00000000000..6d242dfba50 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-54.c +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rvb23u64 -mabi=lp64d" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0" ++"_b1p0_zic64b1p0_zicbom1p0_zicbop1p0_zicboz1p0_ziccamoa1p0_ziccif1p0_zicclsm1p0_ziccrse1p0" ++"_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0_za64rs1p0" ++"_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0_zba1p0" ++"_zbb1p0_zbs1p0_zkt1p0\"" } } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0009-RISC-V-Support-for-zilsd-and-zclsd-extensions.patch b/SPECS/gcc15/0009-RISC-V-Support-for-zilsd-and-zclsd-extensions.patch new file mode 100644 index 00000000..c2340c43 --- /dev/null +++ b/SPECS/gcc15/0009-RISC-V-Support-for-zilsd-and-zclsd-extensions.patch @@ -0,0 +1,155 @@ +From bcf16e21ab178fd3f62d6295bc77fef770e46c51 Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Mon, 17 Mar 2025 22:23:18 +0800 +Subject: [PATCH 09/35] RISC-V: Support for zilsd and zclsd extensions. + +This patch support zilsd and zclsd[1] extensions. +To enable GCC to recognize and process zilsd and zclsd extension correctly at compile time. + +[1] https://github.com/riscv/riscv-zilsd + +Changes for v2: +- Remove the addition of zilsd extension in gcc/common/config/riscv/riscv-ext-bitmask.def +- Fix a bug with zilsd and zclsd extension dependency in gcc/common/config/riscv/riscv-common.cc + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc + (riscv_subset_list::check_conflict_ext): New extension. + * config/riscv/riscv.opt: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-zilsd-1.c: New. + * gcc.target/riscv/arch-zilsd-2.c: New. + * gcc.target/riscv/arch-zilsd-3.c: New. +--- + gcc/common/config/riscv/riscv-common.cc | 16 ++++++++++++++++ + gcc/config/riscv/riscv.opt | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c | 5 +++++ + gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c | 7 +++++++ + gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c | 9 +++++++++ + 5 files changed, 41 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index e06cd5fa576..c89931aaf86 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -115,6 +115,9 @@ static const riscv_implied_info_t riscv_implied_info[] = + {"zicfiss", "zimop"}, + {"zicfilp", "zicsr"}, + ++ {"zclsd", "zilsd"}, ++ {"zclsd", "zca"}, ++ + {"zk", "zkn"}, + {"zk", "zkr"}, + {"zk", "zkt"}, +@@ -377,6 +380,9 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {"zicntr", ISA_SPEC_CLASS_NONE, 2, 0}, + {"zihpm", ISA_SPEC_CLASS_NONE, 2, 0}, + ++ {"zilsd", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"zclsd", ISA_SPEC_CLASS_NONE, 1, 0}, ++ + {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, + {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, + {"zks", ISA_SPEC_CLASS_NONE, 1, 0}, +@@ -1439,6 +1445,14 @@ riscv_subset_list::check_conflict_ext () + if (lookup ("zcf") && m_xlen == 64) + error_at (m_loc, "%<-march=%s%>: zcf extension supports in rv32 only", + m_arch); ++ ++ if (lookup ("zilsd") && m_xlen == 64) ++ error_at (m_loc, "%<-march=%s%>: zilsd extension supports in rv32 only", ++ m_arch); ++ ++ if (lookup ("zclsd") && m_xlen == 64) ++ error_at (m_loc, "%<-march=%s%>: zclsd extension supports in rv32 only", ++ m_arch); + + if (lookup ("zfinx") && lookup ("f")) + error_at (m_loc, +@@ -1782,6 +1796,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("ziccif", x_riscv_zi_subext, MASK_ZICCIF), + RISCV_EXT_FLAG_ENTRY ("zicclsm", x_riscv_zi_subext, MASK_ZICCLSM), + RISCV_EXT_FLAG_ENTRY ("ziccrse", x_riscv_zi_subext, MASK_ZICCRSE), ++ RISCV_EXT_FLAG_ENTRY ("zilsd", x_riscv_zi_subext, MASK_ZILSD), + + RISCV_EXT_FLAG_ENTRY ("zicboz", x_riscv_zicmo_subext, MASK_ZICBOZ), + RISCV_EXT_FLAG_ENTRY ("zicbom", x_riscv_zicmo_subext, MASK_ZICBOM), +@@ -1865,6 +1880,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("zcd", x_riscv_zc_subext, MASK_ZCD), + RISCV_EXT_FLAG_ENTRY ("zcmp", x_riscv_zc_subext, MASK_ZCMP), + RISCV_EXT_FLAG_ENTRY ("zcmt", x_riscv_zc_subext, MASK_ZCMT), ++ RISCV_EXT_FLAG_ENTRY ("zclsd", x_riscv_zc_subext, MASK_ZCLSD), + + RISCV_EXT_FLAG_ENTRY ("svade", x_riscv_sv_subext, MASK_SVADE), + RISCV_EXT_FLAG_ENTRY ("svadu", x_riscv_sv_subext, MASK_SVADU), +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index 80593ee139c..ba5805e9545 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -257,6 +257,8 @@ Mask(ZICFISS) Var(riscv_zi_subext) + + Mask(ZICFILP) Var(riscv_zi_subext) + ++Mask(ZILSD) Var(riscv_zi_subext) ++ + TargetVariable + int riscv_za_subext + +@@ -463,6 +465,8 @@ Mask(ZCMP) Var(riscv_zc_subext) + + Mask(ZCMT) Var(riscv_zc_subext) + ++Mask(ZCLSD) Var(riscv_zc_subext) ++ + Mask(XCVBI) Var(riscv_xcv_subext) + + TargetVariable +diff --git a/gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c b/gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c +new file mode 100644 +index 00000000000..452c04e42f6 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv32gc_zilsd_zclsd -mabi=ilp32d" } */ ++int foo() ++{ ++} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c b/gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c +new file mode 100644 +index 00000000000..5d6185d0d36 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c +@@ -0,0 +1,7 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_zilsd -mabi=ilp32d" } */ ++int foo() ++{ ++} ++/* { dg-error "'-march=rv64gc_zilsd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv64imafdc_zicsr_zifencei_zilsd_zmmul_zaamo_zalrsc_zca_zcd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ +diff --git a/gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c b/gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c +new file mode 100644 +index 00000000000..3cda12030c9 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c +@@ -0,0 +1,9 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_zclsd -mabi=ilp32d" } */ ++int foo() ++{ ++} ++/* { dg-error "'-march=rv64gc_zclsd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv64gc_zclsd': zclsd extension supports in rv32 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv64imafdc_zicsr_zifencei_zilsd_zmmul_zaamo_zalrsc_zca_zcd_zclsd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv64imafdc_zicsr_zifencei_zilsd_zmmul_zaamo_zalrsc_zca_zcd_zclsd': zclsd extension supports in rv32 only" "" { target *-*-* } 0 } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0010-RISC-V-Minimal-support-for-ssnpm-smnpm-and-smmpm-ext.patch b/SPECS/gcc15/0010-RISC-V-Minimal-support-for-ssnpm-smnpm-and-smmpm-ext.patch new file mode 100644 index 00000000..4d1aabfc --- /dev/null +++ b/SPECS/gcc15/0010-RISC-V-Minimal-support-for-ssnpm-smnpm-and-smmpm-ext.patch @@ -0,0 +1,175 @@ +From 252ddf9dff53841b69b04ff6271b31a8e1482e04 Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Mon, 12 May 2025 17:19:24 +0800 +Subject: [PATCH 10/35] RISC-V: Minimal support for ssnpm, smnpm and smmpm + extensions. + +This patch support ssnpm, smnpm, smmpm, sspm and supm extensions[1]. +To enable GCC to recognize and process ssnpm, smnpm, smmpm, sspm and +supm extensions correctly at compile time. + +[1]https://github.com/riscv/riscv-j-extension/blob/master/zjpm/instructions.adoc + +Changes for v5: +- Fix the testsuite error in arch-50.c. +Changes for v4: +- Fix the code based on the commit id 9b13bea07706a7cae0185f8a860d67209308c050. +Changes for v3: +- Fix the error messages in gcc/testsuite/gcc.target/riscv/arch-46.c +Changes for v2: +- Add the sspm and supm extensions. +- Add the check_conflict_ext function to check the compatibility of ssnpm, smnpm, smmpm, sspm and supm extensions. +- Add the test cases for ssnpm, smnpm, smmpm, sspm and supm extensions. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc + (riscv_subset_list::check_conflict_ext): New extension. + * config/riscv/riscv.opt: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-ss-1.c: New test. + * gcc.target/riscv/arch-ss-2.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 36 ++++++++++++++++++++++ + gcc/config/riscv/riscv.opt | 19 ++++++++++++ + gcc/testsuite/gcc.target/riscv/arch-ss-1.c | 5 +++ + gcc/testsuite/gcc.target/riscv/arch-ss-2.c | 15 +++++++++ + 4 files changed, 75 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-ss-1.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-ss-2.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index c89931aaf86..d3240f79240 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -262,6 +262,10 @@ static const riscv_implied_info_t riscv_implied_info[] = + {"ssstateen", "zicsr"}, + {"sstc", "zicsr"}, + ++ {"ssnpm", "zicsr"}, ++ {"smnpm", "zicsr"}, ++ {"smmpm", "zicsr"}, ++ + {"xsfvcp", "zve32x"}, + + {NULL, NULL} +@@ -457,6 +461,12 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {"sstc", ISA_SPEC_CLASS_NONE, 1, 0}, + {"ssstrict", ISA_SPEC_CLASS_NONE, 1, 0}, + ++ {"ssnpm", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"smnpm", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"smmpm", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"sspm", ISA_SPEC_CLASS_NONE, 1, 0}, ++ {"supm", ISA_SPEC_CLASS_NONE, 1, 0}, ++ + {"svade", ISA_SPEC_CLASS_NONE, 1, 0}, + {"svadu", ISA_SPEC_CLASS_NONE, 1, 0}, + {"svinval", ISA_SPEC_CLASS_NONE, 1, 0}, +@@ -1454,6 +1464,26 @@ riscv_subset_list::check_conflict_ext () + error_at (m_loc, "%<-march=%s%>: zclsd extension supports in rv32 only", + m_arch); + ++ if (lookup ("ssnpm") && m_xlen == 32) ++ error_at (m_loc, "%<-march=%s%>: ssnpm extension supports in rv64 only", ++ m_arch); ++ ++ if (lookup ("smnpm") && m_xlen == 32) ++ error_at (m_loc, "%<-march=%s%>: smnpm extension supports in rv64 only", ++ m_arch); ++ ++ if (lookup ("smmpm") && m_xlen == 32) ++ error_at (m_loc, "%<-march=%s%>: smmpm extension supports in rv64 only", ++ m_arch); ++ ++ if (lookup ("sspm") && m_xlen == 32) ++ error_at (m_loc, "%<-march=%s%>: sspm extension supports in rv64 only", ++ m_arch); ++ ++ if (lookup ("supm") && m_xlen == 32) ++ error_at (m_loc, "%<-march=%s%>: supm extension supports in rv64 only", ++ m_arch); ++ + if (lookup ("zfinx") && lookup ("f")) + error_at (m_loc, + "%<-march=%s%>: z*inx conflicts with floating-point " +@@ -1888,6 +1918,12 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("svnapot", x_riscv_sv_subext, MASK_SVNAPOT), + RISCV_EXT_FLAG_ENTRY ("svvptc", x_riscv_sv_subext, MASK_SVVPTC), + ++ RISCV_EXT_FLAG_ENTRY ("ssnpm", x_riscv_ss_subext, MASK_SSNPM), ++ RISCV_EXT_FLAG_ENTRY ("smnpm", x_riscv_sm_subext, MASK_SMNPM), ++ RISCV_EXT_FLAG_ENTRY ("smmpm", x_riscv_sm_subext, MASK_SMMPM), ++ RISCV_EXT_FLAG_ENTRY ("sspm", x_riscv_ss_subext, MASK_SSPM), ++ RISCV_EXT_FLAG_ENTRY ("supm", x_riscv_su_subext, MASK_SUPM), ++ + RISCV_EXT_FLAG_ENTRY ("ztso", x_riscv_ztso_subext, MASK_ZTSO), + + RISCV_EXT_FLAG_ENTRY ("xcvmac", x_riscv_xcv_subext, MASK_XCVMAC), +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index ba5805e9545..9480dc54cbb 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -482,6 +482,25 @@ Mask(SVNAPOT) Var(riscv_sv_subext) + + Mask(SVVPTC) Var(riscv_sv_subext) + ++TargetVariable ++int riscv_ss_subext ++ ++Mask(SSNPM) Var(riscv_ss_subext) ++ ++Mask(SSPM) Var(riscv_ss_subext) ++ ++TargetVariable ++int riscv_sm_subext ++ ++Mask(SMNPM) Var(riscv_sm_subext) ++ ++Mask(SMMPM) Var(riscv_sm_subext) ++ ++TargetVariable ++int riscv_su_subext ++ ++Mask(SUPM) Var(riscv_su_subext) ++ + TargetVariable + int riscv_ztso_subext + +diff --git a/gcc/testsuite/gcc.target/riscv/arch-ss-1.c b/gcc/testsuite/gcc.target/riscv/arch-ss-1.c +new file mode 100644 +index 00000000000..8f95737b248 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-ss-1.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gc_ssnpm_smnpm_smmpm_sspm_supm -mabi=lp64" } */ ++int foo() ++{ ++} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-ss-2.c b/gcc/testsuite/gcc.target/riscv/arch-ss-2.c +new file mode 100644 +index 00000000000..f1d7724fcee +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-ss-2.c +@@ -0,0 +1,15 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm -mabi=ilp32d" } */ ++int foo() ++{ ++} ++/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': ssnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': smnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': smmpm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': sspm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': supm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': ssnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': smnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': smmpm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': sspm extension supports in rv64 only" "" { target *-*-* } 0 } */ ++/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': supm extension supports in rv64 only" "" { target *-*-* } 0 } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0011-RISC-V-Introduce-riscv-ext-.def-to-define-extensions.patch b/SPECS/gcc15/0011-RISC-V-Introduce-riscv-ext-.def-to-define-extensions.patch new file mode 100644 index 00000000..be822cea --- /dev/null +++ b/SPECS/gcc15/0011-RISC-V-Introduce-riscv-ext-.def-to-define-extensions.patch @@ -0,0 +1,2302 @@ +From ba947c5b6b3c2e8207e0d70650264165d84168a0 Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 18:02:10 +0800 +Subject: [PATCH 11/35] RISC-V: Introduce riscv-ext*.def to define extensions + +Adding a new ISA extension to RISC-V GCC requires modifying several places: +1. riscv_ext_version_table for the extension version. +2. riscv.opt for the target option and variable. +3. riscv_ext_flag_table to bind the extension to its target option. +4. riscv_combine_info if this extension is just a macro extension. +5. riscv_implied_info if this extension implies other extensions. +6. invoke.texi for documentation (this one is often forgotten - even by me...). +7. riscv-ext-bitmask.def if this extension has been allocated a bitmask in + `__riscv_feature_bits`. + +And now, we've integrated all the information into riscv-ext.def and generate +(almost) everything from that! + +Some of the fields, like URL, are not used yet. They are planned to be updated +later and used for improving the documentation. + +Changes since v1: +- Rebase for including new extensions +- Fix MASK_VECTOR handling + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New file; define extension metadata table. + * config/riscv/riscv-ext-corev.def: New. + * config/riscv/riscv-ext-sifive.def: New. + * config/riscv/riscv-ext-thead.def: New. + * config/riscv/riscv-ext-ventana.def: New. +--- + gcc/config/riscv/riscv-ext-corev.def | 87 ++ + gcc/config/riscv/riscv-ext-sifive.def | 87 ++ + gcc/config/riscv/riscv-ext-thead.def | 191 +++ + gcc/config/riscv/riscv-ext-ventana.def | 35 + + gcc/config/riscv/riscv-ext.def | 1824 ++++++++++++++++++++++++ + 5 files changed, 2224 insertions(+) + create mode 100644 gcc/config/riscv/riscv-ext-corev.def + create mode 100644 gcc/config/riscv/riscv-ext-sifive.def + create mode 100644 gcc/config/riscv/riscv-ext-thead.def + create mode 100644 gcc/config/riscv/riscv-ext-ventana.def + create mode 100644 gcc/config/riscv/riscv-ext.def + +diff --git a/gcc/config/riscv/riscv-ext-corev.def b/gcc/config/riscv/riscv-ext-corev.def +new file mode 100644 +index 00000000000..eb97399403c +--- /dev/null ++++ b/gcc/config/riscv/riscv-ext-corev.def +@@ -0,0 +1,87 @@ ++/* CORE-V extension definition file for RISC-V. ++ Copyright (C) 2025 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, or (at your option) ++any later version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. ++ ++Please run `make riscv-regen` in build folder to make sure updated anything. ++ ++Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xcvalu, ++ /* UPPERCAE_NAME */ XCVALU, ++ /* FULL_NAME */ "Core-V miscellaneous ALU extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xcv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xcvbi, ++ /* UPPERCAE_NAME */ XCVBI, ++ /* FULL_NAME */ "xcvbi extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xcv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xcvelw, ++ /* UPPERCAE_NAME */ XCVELW, ++ /* FULL_NAME */ "Core-V event load word extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xcv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xcvmac, ++ /* UPPERCAE_NAME */ XCVMAC, ++ /* FULL_NAME */ "Core-V multiply-accumulate extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xcv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xcvsimd, ++ /* UPPERCAE_NAME */ XCVSIMD, ++ /* FULL_NAME */ "xcvsimd extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xcv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) +diff --git a/gcc/config/riscv/riscv-ext-sifive.def b/gcc/config/riscv/riscv-ext-sifive.def +new file mode 100644 +index 00000000000..c8d79da479c +--- /dev/null ++++ b/gcc/config/riscv/riscv-ext-sifive.def +@@ -0,0 +1,87 @@ ++/* SiFive extension definition file for RISC-V. ++ Copyright (C) 2025 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, or (at your option) ++any later version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. ++ ++Please run `make riscv-regen` in build folder to make sure updated anything. ++ ++Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xsfcease, ++ /* UPPERCAE_NAME */ XSFCEASE, ++ /* FULL_NAME */ "xsfcease extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xsf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xsfvcp, ++ /* UPPERCAE_NAME */ XSFVCP, ++ /* FULL_NAME */ "xsfvcp extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xsf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xsfvfnrclipxfqf, ++ /* UPPERCAE_NAME */ XSFVFNRCLIPXFQF, ++ /* FULL_NAME */ "xsfvfnrclipxfqf extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xsf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xsfvqmaccdod, ++ /* UPPERCAE_NAME */ XSFVQMACCDOD, ++ /* FULL_NAME */ "xsfvqmaccdod extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xsf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xsfvqmaccqoq, ++ /* UPPERCAE_NAME */ XSFVQMACCQOQ, ++ /* FULL_NAME */ "xsfvqmaccqoq extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xsf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) +diff --git a/gcc/config/riscv/riscv-ext-thead.def b/gcc/config/riscv/riscv-ext-thead.def +new file mode 100644 +index 00000000000..327d2ae0d39 +--- /dev/null ++++ b/gcc/config/riscv/riscv-ext-thead.def +@@ -0,0 +1,191 @@ ++/* T-head extension definition file for RISC-V. ++ Copyright (C) 2025 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, or (at your option) ++any later version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. ++ ++Please run `make riscv-regen` in build folder to make sure updated anything. ++ ++Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadba, ++ /* UPPERCAE_NAME */ XTHEADBA, ++ /* FULL_NAME */ "T-head address calculation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadbb, ++ /* UPPERCAE_NAME */ XTHEADBB, ++ /* FULL_NAME */ "T-head basic bit-manipulation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadbs, ++ /* UPPERCAE_NAME */ XTHEADBS, ++ /* FULL_NAME */ "T-head single-bit instructions extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadcmo, ++ /* UPPERCAE_NAME */ XTHEADCMO, ++ /* FULL_NAME */ "T-head cache management operations extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadcondmov, ++ /* UPPERCAE_NAME */ XTHEADCONDMOV, ++ /* FULL_NAME */ "T-head conditional move extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadfmemidx, ++ /* UPPERCAE_NAME */ XTHEADFMEMIDX, ++ /* FULL_NAME */ "T-head indexed memory operations for floating-point registers extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadfmv, ++ /* UPPERCAE_NAME */ XTHEADFMV, ++ /* FULL_NAME */ "T-head double floating-point high-bit data transmission extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadint, ++ /* UPPERCAE_NAME */ XTHEADINT, ++ /* FULL_NAME */ "T-head acceleration interruption extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadmac, ++ /* UPPERCAE_NAME */ XTHEADMAC, ++ /* FULL_NAME */ "T-head multiply-accumulate extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadmemidx, ++ /* UPPERCAE_NAME */ XTHEADMEMIDX, ++ /* FULL_NAME */ "T-head indexed memory operation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadmempair, ++ /* UPPERCAE_NAME */ XTHEADMEMPAIR, ++ /* FULL_NAME */ "T-head two-GPR memory operation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadsync, ++ /* UPPERCAE_NAME */ XTHEADSYNC, ++ /* FULL_NAME */ "T-head multi-core synchronization extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xtheadvector, ++ /* UPPERCAE_NAME */ XTHEADVECTOR, ++ /* FULL_NAME */ "xtheadvector extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xthead, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) +diff --git a/gcc/config/riscv/riscv-ext-ventana.def b/gcc/config/riscv/riscv-ext-ventana.def +new file mode 100644 +index 00000000000..deed47f112a +--- /dev/null ++++ b/gcc/config/riscv/riscv-ext-ventana.def +@@ -0,0 +1,35 @@ ++/* Ventana extension definition file for RISC-V. ++ Copyright (C) 2025 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, or (at your option) ++any later version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. ++ ++Please run `make riscv-regen` in build folder to make sure updated anything. ++ ++Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ xventanacondops, ++ /* UPPERCAE_NAME */ XVENTANACONDOPS, ++ /* FULL_NAME */ "Ventana integer conditional operations extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ xventana, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +new file mode 100644 +index 00000000000..34742d912f8 +--- /dev/null ++++ b/gcc/config/riscv/riscv-ext.def +@@ -0,0 +1,1824 @@ ++/* RISC-V extension definition file for RISC-V. ++ Copyright (C) 2025 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, or (at your option) ++any later version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. ++ ++Please run `make riscv-regen` in build folder to make sure updated anything. ++ ++Format of DEFINE_RISCV_EXT: ++ NAME: ++ The name of the extension, e.g. "i". ++ UPPERCASE_NAME: ++ The name of the extension in uppercase, e.g. "ZBA", this used ++ for generate TARGET_ marco and MASK_ macro. ++ For those extension only named with single letter, it should also come with ++ 'RV', e.g. 'v' should use 'RVV' here. ++ Some of old extension like 'i' and 'm' are not follow the rule. ++ FULL_NAME: ++ The full name of the extension, e.g. "Base integer extension". ++ DESC: ++ A short description of the extension, this will used during generating ++ documentation, GNU Texinfo format can be used this field. ++ URL: ++ A URL for the extension. ++ DEP_EXTS: ++ A list of dependent extensions, this is a list of strings or ++ a list of tuples. The first element of the tuple is the name ++ of the extension and the second element is a function that ++ takes a subset_list and returns true if the extension should be added as ++ a dependent extension, `c` and `zca` are examples of this. ++ SUPPORTED_VERSIONS: ++ A list of tuples, each tuple contains the major version number, minor ++ version number and the class of the specification. The version number is a ++ list of integers, e.g. {2, 0} for version 2.0. The class is ++ a string, e.g. "ISA_SPEC_CLASS_20191213", the class of the ++ specification is not required for any new extension. ++ FLAG_GROUP: ++ The group of the extension, this is used to group extensions ++ together. The group is a string, e.g. "base", "zi", "zm", "za", "zf", ++ "zc", "zb", "zk" and "zi". ++ This should be auto generated in theory in some day... ++ BITMASK_GROUP_ID: ++ The group id of the extension for the __riscv_feature_bits. ++ this field should sync with riscv-c-api-doc, and keep BITMASK_NOT_YET_ALLOCATED ++ if not got allocated. ++ https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc#extension-bitmask-definitions ++ BITMASK_BIT_POSITION: ++ The bit position of the extension for the __riscv_feature_bits. ++ this field should sync with riscv-c-api-doc, and keep BITMASK_NOT_YET_ALLOCATED ++ if not got allocated. ++ https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc#extension-bitmask-definitions ++ EXTRA_EXTENSION_FLAGS: ++ Extra flags for the extension, this is a bitmask of the ++ extra flags. The extra flags are: ++ - EXT_FLAG_MACRO: Set this flag if this extension is just a macro of set of ++ extensions, and not define any new instrcutions, new CSRs or new ++ behaviors, the example is `b` extension is just a macro of `zba`, `zbb` ++ and `zbs`. ++*/ ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ e, ++ /* UPPERCAE_NAME */ RVE, ++ /* FULL_NAME */ "Reduced base integer extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ i, ++ /* UPPERCAE_NAME */ RVI, ++ /* FULL_NAME */ "Base integer extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 1, ISA_SPEC_CLASS_20191213}, ++ {2, 1, ISA_SPEC_CLASS_20190608}, ++ {2, 0, ISA_SPEC_CLASS_2P2}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 8, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ m, ++ /* UPPERCAE_NAME */ MUL, ++ /* FULL_NAME */ "Integer multiplication and division extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zmmul"}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 12, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ a, ++ /* UPPERCAE_NAME */ ATOMIC, ++ /* FULL_NAME */ "Atomic extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zaamo", "zalrsc"}), ++ /* SUPPORTED_VERSIONS */ ({{2, 1, ISA_SPEC_CLASS_20191213}, ++ {2, 0, ISA_SPEC_CLASS_20190608}, ++ {2, 0, ISA_SPEC_CLASS_2P2}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 0, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ f, ++ /* UPPERCAE_NAME */ HARD_FLOAT, ++ /* FULL_NAME */ "Single-precision floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{2, 2, ISA_SPEC_CLASS_20191213}, ++ {2, 2, ISA_SPEC_CLASS_20190608}, ++ {2, 0, ISA_SPEC_CLASS_2P2}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 5, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ d, ++ /* UPPERCAE_NAME */ DOUBLE_FLOAT, ++ /* FULL_NAME */ "Double-precision floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"f", "zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{2, 2, ISA_SPEC_CLASS_20191213}, ++ {2, 2, ISA_SPEC_CLASS_20190608}, ++ {2, 0, ISA_SPEC_CLASS_2P2}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 3, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ c, ++ /* UPPERCAE_NAME */ RVC, ++ /* FULL_NAME */ "Compressed extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca", ++ {"zcf", ++ [] (const riscv_subset_list *subset_list) -> bool ++ { ++ return subset_list->xlen () == 32 ++ && subset_list->lookup ("f"); ++ }}, ++ {"zcd", ++ [] (const riscv_subset_list *subset_list) -> bool ++ { ++ return subset_list->lookup ("d"); ++ }}}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 2, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ b, ++ /* UPPERCAE_NAME */ RVB, ++ /* FULL_NAME */ "b extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zba", "zbb", "zbs"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ v, ++ /* UPPERCAE_NAME */ RVV, ++ /* FULL_NAME */ "Vector extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl128b", "zve64d"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 21, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ h, ++ /* UPPERCAE_NAME */ RVH, ++ /* FULL_NAME */ "Hypervisor extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ base, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zic64b, ++ /* UPPERCAE_NAME */ ZIC64B, ++ /* FULL_NAME */ "Cache block size isf 64 bytes", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicbom, ++ /* UPPERCAE_NAME */ ZICBOM, ++ /* FULL_NAME */ "Cache-block management extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicbop, ++ /* UPPERCAE_NAME */ ZICBOP, ++ /* FULL_NAME */ "Cache-block prefetch extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicboz, ++ /* UPPERCAE_NAME */ ZICBOZ, ++ /* FULL_NAME */ "Cache-block zero extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 37, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ziccamoa, ++ /* UPPERCAE_NAME */ ZICCAMOA, ++ /* FULL_NAME */ "Main memory supports all atomics in A", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ziccif, ++ /* UPPERCAE_NAME */ ZICCIF, ++ /* FULL_NAME */ "Main memory supports instruction fetch with atomicity requirement", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicclsm, ++ /* UPPERCAE_NAME */ ZICCLSM, ++ /* FULL_NAME */ "Main memory supports misaligned loads/stores", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ziccrse, ++ /* UPPERCAE_NAME */ ZICCRSE, ++ /* FULL_NAME */ "Main memory supports forward progress on LR/SC sequences", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicfilp, ++ /* UPPERCAE_NAME */ ZICFILP, ++ /* FULL_NAME */ "zicfilp extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicfiss, ++ /* UPPERCAE_NAME */ ZICFISS, ++ /* FULL_NAME */ "zicfiss extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr", "zimop"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicntr, ++ /* UPPERCAE_NAME */ ZICNTR, ++ /* FULL_NAME */ "Standard extension for base counters and timers", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicond, ++ /* UPPERCAE_NAME */ ZICOND, ++ /* FULL_NAME */ "Integer conditional operations extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 38, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zicsr, ++ /* UPPERCAE_NAME */ ZICSR, ++ /* FULL_NAME */ "Control and status register access extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zifencei, ++ /* UPPERCAE_NAME */ ZIFENCEI, ++ /* FULL_NAME */ "Instruction-fetch fence extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zihintntl, ++ /* UPPERCAE_NAME */ ZIHINTNTL, ++ /* FULL_NAME */ "Non-temporal locality hints extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 39, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zihintpause, ++ /* UPPERCAE_NAME */ ZIHINTPAUSE, ++ /* FULL_NAME */ "Pause hint extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 40, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zihpm, ++ /* UPPERCAE_NAME */ ZIHPM, ++ /* FULL_NAME */ "Standard extension for hardware performance counters", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{2, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zimop, ++ /* UPPERCAE_NAME */ ZIMOP, ++ /* FULL_NAME */ "zimop extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 1, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zilsd, ++ /* UPPERCAE_NAME */ ZILSD, ++ /* FULL_NAME */ "Load/Store pair instructions extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zi, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 1, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zmmul, ++ /* UPPERCAE_NAME */ ZMMUL, ++ /* FULL_NAME */ "Integer multiplication extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ za128rs, ++ /* UPPERCAE_NAME */ ZA128RS, ++ /* FULL_NAME */ "Reservation set size of 128 bytes", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ za64rs, ++ /* UPPERCAE_NAME */ ZA64RS, ++ /* FULL_NAME */ "Reservation set size of 64 bytes", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zaamo, ++ /* UPPERCAE_NAME */ ZAAMO, ++ /* FULL_NAME */ "zaamo extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zabha, ++ /* UPPERCAE_NAME */ ZABHA, ++ /* FULL_NAME */ "zabha extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zaamo"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zacas, ++ /* UPPERCAE_NAME */ ZACAS, ++ /* FULL_NAME */ "zacas extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zaamo"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 26, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zalrsc, ++ /* UPPERCAE_NAME */ ZALRSC, ++ /* FULL_NAME */ "zalrsc extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zawrs, ++ /* UPPERCAE_NAME */ ZAWRS, ++ /* FULL_NAME */ "Wait-on-reservation-set extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zalrsc"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 7, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zama16b, ++ /* UPPERCAE_NAME */ ZAMA16B, ++ /* FULL_NAME */ "Zama16b extension", ++ /* DESC */ "Misaligned loads, stores, and AMOs to main memory regions that do" ++ " not cross a naturally aligned 16-byte boundary are atomic.", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ za, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zfa, ++ /* UPPERCAE_NAME */ ZFA, ++ /* FULL_NAME */ "Additional floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"f"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zf, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 34, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zfbfmin, ++ /* UPPERCAE_NAME */ ZFBFMIN, ++ /* FULL_NAME */ "zfbfmin extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zfhmin"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zfh, ++ /* UPPERCAE_NAME */ ZFH, ++ /* FULL_NAME */ "Half-precision floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zfhmin"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zf, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 35, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zfhmin, ++ /* UPPERCAE_NAME */ ZFHMIN, ++ /* FULL_NAME */ "Minimal half-precision floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"f"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zf, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 36, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zfinx, ++ /* UPPERCAE_NAME */ ZFINX, ++ /* FULL_NAME */ "Single-precision floating-point in integer registers extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zinx, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zdinx, ++ /* UPPERCAE_NAME */ ZDINX, ++ /* FULL_NAME */ "Double-precision floating-point in integer registers extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zfinx", "zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zinx, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zca, ++ /* UPPERCAE_NAME */ ZCA, ++ /* FULL_NAME */ "Integer compressed instruction extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({{"c", ++[] (const riscv_subset_list *subset_list) -> bool ++{ ++ /* For RV32 Zca implies C for one of these combinations of ++ extensions: Zca, F_Zca_Zcf and FD_Zca_Zcf_Zcd. */ ++ if (subset_list->xlen () == 32) ++ { ++ if (subset_list->lookup ("d")) ++ return subset_list->lookup ("zcf") && subset_list->lookup ("zcd"); ++ ++ if (subset_list->lookup ("f")) ++ return subset_list->lookup ("zcf"); ++ ++ return true; ++ } ++ ++ /* For RV64 Zca implies C for one of these combinations of ++ extensions: Zca and FD_Zca_Zcd (Zcf is not available ++ for RV64). */ ++ if (subset_list->xlen () == 64) ++ { ++ if (subset_list->lookup ("d")) ++ return subset_list->lookup ("zcd"); ++ ++ return true; ++ } ++ ++ /* Do nothing for future RV128 specification. Behaviour ++ for this case is not yet well defined. */ ++ return false; ++ ++}}}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 2, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zcb, ++ /* UPPERCAE_NAME */ ZCB, ++ /* FULL_NAME */ "Simple compressed instruction extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 3, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zcd, ++ /* UPPERCAE_NAME */ ZCD, ++ /* FULL_NAME */ "Compressed double-precision floating point loads and stores extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 4, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zce, ++ /* UPPERCAE_NAME */ ZCE, ++ /* FULL_NAME */ "Compressed instruction extensions for embedded processors", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca", "zcb", "zcmp", "zcmt", ++ {"zcf", ++ [] (const riscv_subset_list *subset_list) -> bool ++ { ++ return subset_list->xlen () == 32 ++ && subset_list->lookup ("f"); ++ }}}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zcf, ++ /* UPPERCAE_NAME */ ZCF, ++ /* FULL_NAME */ "Compressed single-precision floating point loads and stores extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 5, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zcmop, ++ /* UPPERCAE_NAME */ ZCMOP, ++ /* FULL_NAME */ "zcmop extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 6, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zcmp, ++ /* UPPERCAE_NAME */ ZCMP, ++ /* FULL_NAME */ "Compressed push pop extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zcmt, ++ /* UPPERCAE_NAME */ ZCMT, ++ /* FULL_NAME */ "Table jump instruction extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca", "zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zclsd, ++ /* UPPERCAE_NAME */ ZCLSD, ++ /* FULL_NAME */ "Compressed load/store pair instructions extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zca", "zilsd"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zc, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zba, ++ /* UPPERCAE_NAME */ ZBA, ++ /* FULL_NAME */ "Address calculation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 27, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zbb, ++ /* UPPERCAE_NAME */ ZBB, ++ /* FULL_NAME */ "Basic bit manipulation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 28, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zbc, ++ /* UPPERCAE_NAME */ ZBC, ++ /* FULL_NAME */ "Carry-less multiplication extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 29, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zbkb, ++ /* UPPERCAE_NAME */ ZBKB, ++ /* FULL_NAME */ "Cryptography bit-manipulation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 30, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zbkc, ++ /* UPPERCAE_NAME */ ZBKC, ++ /* FULL_NAME */ "Cryptography carry-less multiply extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 31, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zbkx, ++ /* UPPERCAE_NAME */ ZBKX, ++ /* FULL_NAME */ "Cryptography crossbar permutation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 32, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zbs, ++ /* UPPERCAE_NAME */ ZBS, ++ /* FULL_NAME */ "Single-bit operation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 33, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zk, ++ /* UPPERCAE_NAME */ ZK, ++ /* FULL_NAME */ "Standard scalar cryptography extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zkn", "zkr", "zkt"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zkn, ++ /* UPPERCAE_NAME */ ZKN, ++ /* FULL_NAME */ "NIST algorithm suite extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zbkb", "zbkc", "zbkx", "zkne", "zknd", "zknh"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zknd, ++ /* UPPERCAE_NAME */ ZKND, ++ /* FULL_NAME */ "AES Decryption extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 41, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zkne, ++ /* UPPERCAE_NAME */ ZKNE, ++ /* FULL_NAME */ "AES Encryption extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 42, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zknh, ++ /* UPPERCAE_NAME */ ZKNH, ++ /* FULL_NAME */ "Hash function extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 43, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zkr, ++ /* UPPERCAE_NAME */ ZKR, ++ /* FULL_NAME */ "Entropy source extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zks, ++ /* UPPERCAE_NAME */ ZKS, ++ /* FULL_NAME */ "ShangMi algorithm suite extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zbkb", "zbkc", "zbkx", "zksed", "zksh"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zksed, ++ /* UPPERCAE_NAME */ ZKSED, ++ /* FULL_NAME */ "SM4 block cipher extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 44, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zksh, ++ /* UPPERCAE_NAME */ ZKSH, ++ /* FULL_NAME */ "SM3 hash function extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 45, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zkt, ++ /* UPPERCAE_NAME */ ZKT, ++ /* FULL_NAME */ "Data independent execution latency extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 46, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ztso, ++ /* UPPERCAE_NAME */ ZTSO, ++ /* FULL_NAME */ "Total store ordering extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zt, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 47, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvbb, ++ /* UPPERCAE_NAME */ ZVBB, ++ /* FULL_NAME */ "Vector basic bit-manipulation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvkb"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 48, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvbc, ++ /* UPPERCAE_NAME */ ZVBC, ++ /* FULL_NAME */ "Vector carryless multiplication extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve64x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvb, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 49, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zve32f, ++ /* UPPERCAE_NAME */ ZVE32F, ++ /* FULL_NAME */ "Vector extensions for embedded processors", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"f", "zve32x", "zvl32b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zve, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 61, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zve32x, ++ /* UPPERCAE_NAME */ ZVE32X, ++ /* FULL_NAME */ "Vector extensions for embedded processors", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr", "zvl32b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zve, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 60, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zve64d, ++ /* UPPERCAE_NAME */ ZVE64D, ++ /* FULL_NAME */ "Vector extensions for embedded processors", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"d", "zve64f", "zvl64b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zve, ++ /* BITMASK_GROUP_ID */ 1, ++ /* BITMASK_BIT_POSITION*/ 0, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zve64f, ++ /* UPPERCAE_NAME */ ZVE64F, ++ /* FULL_NAME */ "Vector extensions for embedded processors", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"f", "zve32f", "zve64x", "zvl64b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zve, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 63, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zve64x, ++ /* UPPERCAE_NAME */ ZVE64X, ++ /* FULL_NAME */ "Vector extensions for embedded processors", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x", "zvl64b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zve, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 62, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvfbfmin, ++ /* UPPERCAE_NAME */ ZVFBFMIN, ++ /* FULL_NAME */ "Vector BF16 converts extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32f"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvfbfwma, ++ /* UPPERCAE_NAME */ ZVFBFWMA, ++ /* FULL_NAME */ "zvfbfwma extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvfbfmin", "zfbfmin"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvf, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvfh, ++ /* UPPERCAE_NAME */ ZVFH, ++ /* FULL_NAME */ "Vector half-precision floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32f", "zfhmin"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvf, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 50, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvfhmin, ++ /* UPPERCAE_NAME */ ZVFHMIN, ++ /* FULL_NAME */ "Vector minimal half-precision floating-point extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32f"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvf, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 51, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvkb, ++ /* UPPERCAE_NAME */ ZVKB, ++ /* FULL_NAME */ "Vector cryptography bit-manipulation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 52, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvkg, ++ /* UPPERCAE_NAME */ ZVKG, ++ /* FULL_NAME */ "Vector GCM/GMAC extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 53, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvkn, ++ /* UPPERCAE_NAME */ ZVKN, ++ /* FULL_NAME */ "Vector NIST Algorithm Suite extension", ++ /* DESC */ "@samp{zvkn} will expand to", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvkned", "zvknhb", "zvkb", "zvkt"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvknc, ++ /* UPPERCAE_NAME */ ZVKNC, ++ /* FULL_NAME */ "Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc}", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvkn", "zvbc"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvkned, ++ /* UPPERCAE_NAME */ ZVKNED, ++ /* FULL_NAME */ "Vector AES block cipher extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 54, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvkng, ++ /* UPPERCAE_NAME */ ZVKNG, ++ /* FULL_NAME */ "Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvkn", "zvkg"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvknha, ++ /* UPPERCAE_NAME */ ZVKNHA, ++ /* FULL_NAME */ "Vector SHA-2 secure hash extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 55, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvknhb, ++ /* UPPERCAE_NAME */ ZVKNHB, ++ /* FULL_NAME */ "Vector SHA-2 secure hash extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve64x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 56, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvks, ++ /* UPPERCAE_NAME */ ZVKS, ++ /* FULL_NAME */ "Vector ShangMi algorithm suite extension, @samp{zvks} will expand", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvksed", "zvksh", "zvkb", "zvkt"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvksc, ++ /* UPPERCAE_NAME */ ZVKSC, ++ /* FULL_NAME */ "Vector ShangMi algorithm suite with carryless multiplication extension,", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvks", "zvbc"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvksed, ++ /* UPPERCAE_NAME */ ZVKSED, ++ /* FULL_NAME */ "Vector SM4 Block Cipher extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 57, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvksg, ++ /* UPPERCAE_NAME */ ZVKSG, ++ /* FULL_NAME */ "Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvks", "zvkg"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvksh, ++ /* UPPERCAE_NAME */ ZVKSH, ++ /* FULL_NAME */ "Vector SM3 Secure Hash extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zve32x"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 58, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvkt, ++ /* UPPERCAE_NAME */ ZVKT, ++ /* FULL_NAME */ "Vector data independent execution latency extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvk, ++ /* BITMASK_GROUP_ID */ 0, ++ /* BITMASK_BIT_POSITION*/ 59, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl1024b, ++ /* UPPERCAE_NAME */ ZVL1024B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl512b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl128b, ++ /* UPPERCAE_NAME */ ZVL128B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl64b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl16384b, ++ /* UPPERCAE_NAME */ ZVL16384B, ++ /* FULL_NAME */ "zvl16384b extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl8192b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl2048b, ++ /* UPPERCAE_NAME */ ZVL2048B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl1024b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl256b, ++ /* UPPERCAE_NAME */ ZVL256B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl128b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl32768b, ++ /* UPPERCAE_NAME */ ZVL32768B, ++ /* FULL_NAME */ "zvl32768b extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl16384b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl32b, ++ /* UPPERCAE_NAME */ ZVL32B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl4096b, ++ /* UPPERCAE_NAME */ ZVL4096B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl2048b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl512b, ++ /* UPPERCAE_NAME */ ZVL512B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl256b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl64b, ++ /* UPPERCAE_NAME */ ZVL64B, ++ /* FULL_NAME */ "Minimum vector length standard extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl32b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl65536b, ++ /* UPPERCAE_NAME */ ZVL65536B, ++ /* FULL_NAME */ "zvl65536b extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl32768b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zvl8192b, ++ /* UPPERCAE_NAME */ ZVL8192B, ++ /* FULL_NAME */ "zvl8192b extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zvl4096b"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zvl, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zhinx, ++ /* UPPERCAE_NAME */ ZHINX, ++ /* FULL_NAME */ "Half-precision floating-point in integer registers extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zhinxmin"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zinx, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ zhinxmin, ++ /* UPPERCAE_NAME */ ZHINXMIN, ++ /* FULL_NAME */ "Minimal half-precision floating-point in integer registers extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zfinx"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ zinx, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ sdtrig, ++ /* UPPERCAE_NAME */ SDTRIG, ++ /* FULL_NAME */ "sdtrig extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sd, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ smaia, ++ /* UPPERCAE_NAME */ SMAIA, ++ /* FULL_NAME */ "Advanced interrupt architecture extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"ssaia"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ smepmp, ++ /* UPPERCAE_NAME */ SMEPMP, ++ /* FULL_NAME */ "PMP Enhancements for memory access and execution prevention on Machine mode", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ smmpm, ++ /* UPPERCAE_NAME */ SMMPM, ++ /* FULL_NAME */ "smmpm extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ smnpm, ++ /* UPPERCAE_NAME */ SMNPM, ++ /* FULL_NAME */ "smnpm extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ smstateen, ++ /* UPPERCAE_NAME */ SMSTATEEN, ++ /* FULL_NAME */ "State enable extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"ssstateen"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ssaia, ++ /* UPPERCAE_NAME */ SSAIA, ++ /* FULL_NAME */ "Advanced interrupt architecture extension for supervisor-mode", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ sscofpmf, ++ /* UPPERCAE_NAME */ SSCOFPMF, ++ /* FULL_NAME */ "Count overflow & filtering extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ssnpm, ++ /* UPPERCAE_NAME */ SSNPM, ++ /* FULL_NAME */ "ssnpm extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ sspm, ++ /* UPPERCAE_NAME */ SSPM, ++ /* FULL_NAME */ "sspm extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ssstateen, ++ /* UPPERCAE_NAME */ SSSTATEEN, ++ /* FULL_NAME */ "State-enable extension for supervisor-mode", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ sstc, ++ /* UPPERCAE_NAME */ SSTC, ++ /* FULL_NAME */ "Supervisor-mode timer interrupts extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ ssstrict, ++ /* UPPERCAE_NAME */ SSSTRICT, ++ /* FULL_NAME */ "ssstrict extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ supm, ++ /* UPPERCAE_NAME */ SUPM, ++ /* FULL_NAME */ "supm extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ su, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ svinval, ++ /* UPPERCAE_NAME */ SVINVAL, ++ /* FULL_NAME */ "Fine-grained address-translation cache invalidation extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ svnapot, ++ /* UPPERCAE_NAME */ SVNAPOT, ++ /* FULL_NAME */ "NAPOT translation contiguity extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ svpbmt, ++ /* UPPERCAE_NAME */ SVPBMT, ++ /* FULL_NAME */ "Page-based memory types extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ svvptc, ++ /* UPPERCAE_NAME */ SVVPTC, ++ /* FULL_NAME */ "svvptc extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ svadu, ++ /* UPPERCAE_NAME */ SVADU, ++ /* FULL_NAME */ "Hardware Updating of A/D Bits extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ svade, ++ /* UPPERCAE_NAME */ SVADE, ++ /* FULL_NAME */ "Cause exception when hardware updating of A/D bits is disabled", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++#include "riscv-ext-corev.def" ++#include "riscv-ext-sifive.def" ++#include "riscv-ext-thead.def" ++#include "riscv-ext-ventana.def" +-- +2.51.0 + diff --git a/SPECS/gcc15/0012-RISC-V-Use-riscv-ext.def-to-generate-target-options-.patch b/SPECS/gcc15/0012-RISC-V-Use-riscv-ext.def-to-generate-target-options-.patch new file mode 100644 index 00000000..418ec22f --- /dev/null +++ b/SPECS/gcc15/0012-RISC-V-Use-riscv-ext.def-to-generate-target-options-.patch @@ -0,0 +1,1253 @@ +From d5fa269f81c8d164beaefce2ebecda1f717f2d2e Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 18:28:18 +0800 +Subject: [PATCH 12/35] RISC-V: Use riscv-ext.def to generate target options + and variables + +Leverage the centralized riscv-ext.def definitions to auto-generate +the target option parsing and associated internal flags, replacing +manual listings in riscv.opt; `riscv_ext_flag_table` part will remove in +later patch. + +gcc/ChangeLog: + + * config/riscv/gen-riscv-ext-opt.cc: New. + * config/riscv/riscv.opt: Drop manual entries for target + options, and include riscv-ext.opt. + * config/riscv/riscv-ext.opt: New. + * config/riscv/riscv-ext.opt.urls: New. + * config.gcc: Add riscv-ext.opt to the list of target options files. + * common/config/riscv/riscv-common.cc (riscv_ext_flag_table): Adjsut target + option variable entry. + (riscv_set_arch_by_subset_list): Adjust target option variable. + * config/riscv/riscv-c.cc (riscv_ext_flag_table): Adjust target + option variable entry. + * config/riscv/riscv-vector-builtins.cc (pragma_intrinsic_flags): + Adjust variable name. + (riscv_pragma_intrinsic_flags_pollute): Adjust variable name. + (riscv_pragma_intrinsic_flags_restore): Ditto. + * config/riscv/t-riscv: Add the rule for generating + riscv-ext.opt. + * config/riscv/riscv-opts.h (TARGET_MIN_VLEN): Update. + (TARGET_MIN_VLEN_OPTS): Update. +--- + gcc/common/config/riscv/riscv-common.cc | 102 +++--- + gcc/config.gcc | 1 + + gcc/config/riscv/gen-riscv-ext-opt.cc | 105 ++++++ + gcc/config/riscv/riscv-c.cc | 16 +- + gcc/config/riscv/riscv-ext.opt | 404 ++++++++++++++++++++++ + gcc/config/riscv/riscv-ext.opt.urls | 0 + gcc/config/riscv/riscv-opts.h | 12 +- + gcc/config/riscv/riscv-vector-builtins.cc | 20 +- + gcc/config/riscv/riscv.opt | 336 +----------------- + gcc/config/riscv/t-riscv | 13 + + 10 files changed, 603 insertions(+), 406 deletions(-) + create mode 100644 gcc/config/riscv/gen-riscv-ext-opt.cc + create mode 100644 gcc/config/riscv/riscv-ext.opt + create mode 100644 gcc/config/riscv/riscv-ext.opt.urls + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index d3240f79240..d84aa9d78dd 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -1777,14 +1777,14 @@ struct riscv_ext_flag_table_t { + /* Mapping table between extension to internal flag. */ + static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + { +- RISCV_EXT_FLAG_ENTRY ("e", x_target_flags, MASK_RVE), +- RISCV_EXT_FLAG_ENTRY ("m", x_target_flags, MASK_MUL), +- RISCV_EXT_FLAG_ENTRY ("a", x_target_flags, MASK_ATOMIC), +- RISCV_EXT_FLAG_ENTRY ("f", x_target_flags, MASK_HARD_FLOAT), +- RISCV_EXT_FLAG_ENTRY ("d", x_target_flags, MASK_DOUBLE_FLOAT), +- RISCV_EXT_FLAG_ENTRY ("c", x_target_flags, MASK_RVC), +- RISCV_EXT_FLAG_ENTRY ("v", x_target_flags, MASK_FULL_V), +- RISCV_EXT_FLAG_ENTRY ("v", x_target_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("e", x_riscv_base_subext, MASK_RVE), ++ RISCV_EXT_FLAG_ENTRY ("m", x_riscv_base_subext, MASK_MUL), ++ RISCV_EXT_FLAG_ENTRY ("a", x_riscv_base_subext, MASK_ATOMIC), ++ RISCV_EXT_FLAG_ENTRY ("f", x_riscv_base_subext, MASK_HARD_FLOAT), ++ RISCV_EXT_FLAG_ENTRY ("d", x_riscv_base_subext, MASK_DOUBLE_FLOAT), ++ RISCV_EXT_FLAG_ENTRY ("c", x_riscv_base_subext, MASK_RVC), ++ RISCV_EXT_FLAG_ENTRY ("v", x_riscv_isa_flags, MASK_FULL_V), ++ RISCV_EXT_FLAG_ENTRY ("v", x_riscv_isa_flags, MASK_VECTOR), + + RISCV_EXT_FLAG_ENTRY ("zicsr", x_riscv_zi_subext, MASK_ZICSR), + RISCV_EXT_FLAG_ENTRY ("zifencei", x_riscv_zi_subext, MASK_ZIFENCEI), +@@ -1828,22 +1828,22 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("ziccrse", x_riscv_zi_subext, MASK_ZICCRSE), + RISCV_EXT_FLAG_ENTRY ("zilsd", x_riscv_zi_subext, MASK_ZILSD), + +- RISCV_EXT_FLAG_ENTRY ("zicboz", x_riscv_zicmo_subext, MASK_ZICBOZ), +- RISCV_EXT_FLAG_ENTRY ("zicbom", x_riscv_zicmo_subext, MASK_ZICBOM), +- RISCV_EXT_FLAG_ENTRY ("zicbop", x_riscv_zicmo_subext, MASK_ZICBOP), +- RISCV_EXT_FLAG_ENTRY ("zic64b", x_riscv_zicmo_subext, MASK_ZIC64B), ++ RISCV_EXT_FLAG_ENTRY ("zicboz", x_riscv_zi_subext, MASK_ZICBOZ), ++ RISCV_EXT_FLAG_ENTRY ("zicbom", x_riscv_zi_subext, MASK_ZICBOM), ++ RISCV_EXT_FLAG_ENTRY ("zicbop", x_riscv_zi_subext, MASK_ZICBOP), ++ RISCV_EXT_FLAG_ENTRY ("zic64b", x_riscv_zi_subext, MASK_ZIC64B), + + RISCV_EXT_FLAG_ENTRY ("zicfiss", x_riscv_zi_subext, MASK_ZICFISS), + RISCV_EXT_FLAG_ENTRY ("zicfilp", x_riscv_zi_subext, MASK_ZICFILP), + +- RISCV_EXT_FLAG_ENTRY ("zimop", x_riscv_mop_subext, MASK_ZIMOP), +- RISCV_EXT_FLAG_ENTRY ("zcmop", x_riscv_mop_subext, MASK_ZCMOP), ++ RISCV_EXT_FLAG_ENTRY ("zimop", x_riscv_zi_subext, MASK_ZIMOP), ++ RISCV_EXT_FLAG_ENTRY ("zcmop", x_riscv_zc_subext, MASK_ZCMOP), + +- RISCV_EXT_FLAG_ENTRY ("zve32x", x_target_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve32f", x_target_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve64x", x_target_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve64f", x_target_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve64d", x_target_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("zve32x", x_riscv_isa_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("zve32f", x_riscv_isa_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("zve64x", x_riscv_isa_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("zve64f", x_riscv_isa_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("zve64d", x_riscv_isa_flags, MASK_VECTOR), + + /* We don't need to put complete ELEN/ELEN_FP info here, due to the + implication relation of vector extension. +@@ -1877,28 +1877,28 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("zvksg", x_riscv_zvk_subext, MASK_ZVKSG), + RISCV_EXT_FLAG_ENTRY ("zvkt", x_riscv_zvk_subext, MASK_ZVKT), + +- RISCV_EXT_FLAG_ENTRY ("zvl32b", x_riscv_zvl_flags, MASK_ZVL32B), +- RISCV_EXT_FLAG_ENTRY ("zvl64b", x_riscv_zvl_flags, MASK_ZVL64B), +- RISCV_EXT_FLAG_ENTRY ("zvl128b", x_riscv_zvl_flags, MASK_ZVL128B), +- RISCV_EXT_FLAG_ENTRY ("zvl256b", x_riscv_zvl_flags, MASK_ZVL256B), +- RISCV_EXT_FLAG_ENTRY ("zvl512b", x_riscv_zvl_flags, MASK_ZVL512B), +- RISCV_EXT_FLAG_ENTRY ("zvl1024b", x_riscv_zvl_flags, MASK_ZVL1024B), +- RISCV_EXT_FLAG_ENTRY ("zvl2048b", x_riscv_zvl_flags, MASK_ZVL2048B), +- RISCV_EXT_FLAG_ENTRY ("zvl4096b", x_riscv_zvl_flags, MASK_ZVL4096B), +- RISCV_EXT_FLAG_ENTRY ("zvl8192b", x_riscv_zvl_flags, MASK_ZVL8192B), +- RISCV_EXT_FLAG_ENTRY ("zvl16384b", x_riscv_zvl_flags, MASK_ZVL16384B), +- RISCV_EXT_FLAG_ENTRY ("zvl32768b", x_riscv_zvl_flags, MASK_ZVL32768B), +- RISCV_EXT_FLAG_ENTRY ("zvl65536b", x_riscv_zvl_flags, MASK_ZVL65536B), ++ RISCV_EXT_FLAG_ENTRY ("zvl32b", x_riscv_zvl_subext, MASK_ZVL32B), ++ RISCV_EXT_FLAG_ENTRY ("zvl64b", x_riscv_zvl_subext, MASK_ZVL64B), ++ RISCV_EXT_FLAG_ENTRY ("zvl128b", x_riscv_zvl_subext, MASK_ZVL128B), ++ RISCV_EXT_FLAG_ENTRY ("zvl256b", x_riscv_zvl_subext, MASK_ZVL256B), ++ RISCV_EXT_FLAG_ENTRY ("zvl512b", x_riscv_zvl_subext, MASK_ZVL512B), ++ RISCV_EXT_FLAG_ENTRY ("zvl1024b", x_riscv_zvl_subext, MASK_ZVL1024B), ++ RISCV_EXT_FLAG_ENTRY ("zvl2048b", x_riscv_zvl_subext, MASK_ZVL2048B), ++ RISCV_EXT_FLAG_ENTRY ("zvl4096b", x_riscv_zvl_subext, MASK_ZVL4096B), ++ RISCV_EXT_FLAG_ENTRY ("zvl8192b", x_riscv_zvl_subext, MASK_ZVL8192B), ++ RISCV_EXT_FLAG_ENTRY ("zvl16384b", x_riscv_zvl_subext, MASK_ZVL16384B), ++ RISCV_EXT_FLAG_ENTRY ("zvl32768b", x_riscv_zvl_subext, MASK_ZVL32768B), ++ RISCV_EXT_FLAG_ENTRY ("zvl65536b", x_riscv_zvl_subext, MASK_ZVL65536B), + + RISCV_EXT_FLAG_ENTRY ("zfbfmin", x_riscv_zf_subext, MASK_ZFBFMIN), + RISCV_EXT_FLAG_ENTRY ("zfhmin", x_riscv_zf_subext, MASK_ZFHMIN), + RISCV_EXT_FLAG_ENTRY ("zfh", x_riscv_zf_subext, MASK_ZFH), +- RISCV_EXT_FLAG_ENTRY ("zvfbfmin", x_riscv_zf_subext, MASK_ZVFBFMIN), +- RISCV_EXT_FLAG_ENTRY ("zvfbfwma", x_riscv_zf_subext, MASK_ZVFBFWMA), +- RISCV_EXT_FLAG_ENTRY ("zvfhmin", x_riscv_zf_subext, MASK_ZVFHMIN), +- RISCV_EXT_FLAG_ENTRY ("zvfh", x_riscv_zf_subext, MASK_ZVFH), ++ RISCV_EXT_FLAG_ENTRY ("zvfbfmin", x_riscv_zvf_subext, MASK_ZVFBFMIN), ++ RISCV_EXT_FLAG_ENTRY ("zvfbfwma", x_riscv_zvf_subext, MASK_ZVFBFWMA), ++ RISCV_EXT_FLAG_ENTRY ("zvfhmin", x_riscv_zvf_subext, MASK_ZVFHMIN), ++ RISCV_EXT_FLAG_ENTRY ("zvfh", x_riscv_zvf_subext, MASK_ZVFH), + +- RISCV_EXT_FLAG_ENTRY ("zfa", x_riscv_zfa_subext, MASK_ZFA), ++ RISCV_EXT_FLAG_ENTRY ("zfa", x_riscv_zf_subext, MASK_ZFA), + + RISCV_EXT_FLAG_ENTRY ("zmmul", x_riscv_zm_subext, MASK_ZMMUL), + +@@ -1924,7 +1924,7 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("sspm", x_riscv_ss_subext, MASK_SSPM), + RISCV_EXT_FLAG_ENTRY ("supm", x_riscv_su_subext, MASK_SUPM), + +- RISCV_EXT_FLAG_ENTRY ("ztso", x_riscv_ztso_subext, MASK_ZTSO), ++ RISCV_EXT_FLAG_ENTRY ("ztso", x_riscv_zt_subext, MASK_ZTSO), + + RISCV_EXT_FLAG_ENTRY ("xcvmac", x_riscv_xcv_subext, MASK_XCVMAC), + RISCV_EXT_FLAG_ENTRY ("xcvalu", x_riscv_xcv_subext, MASK_XCVALU), +@@ -1950,21 +1950,21 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_32), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_64), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_16), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_flags, MASK_ZVL32B), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_flags, MASK_ZVL64B), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_flags, MASK_ZVL128B), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zf_subext, MASK_ZVFHMIN), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zf_subext, MASK_ZVFH), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_target_flags, MASK_FULL_V), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_target_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_subext, MASK_ZVL32B), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_subext, MASK_ZVL64B), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_subext, MASK_ZVL128B), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvf_subext, MASK_ZVFHMIN), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvf_subext, MASK_ZVFH), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_isa_flags, MASK_FULL_V), ++ RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_isa_flags, MASK_VECTOR), + + RISCV_EXT_FLAG_ENTRY ("xventanacondops", x_riscv_xventana_subext, MASK_XVENTANACONDOPS), + +- RISCV_EXT_FLAG_ENTRY ("xsfvcp", x_riscv_sifive_subext, MASK_XSFVCP), +- RISCV_EXT_FLAG_ENTRY ("xsfcease", x_riscv_sifive_subext, MASK_XSFCEASE), +- RISCV_EXT_FLAG_ENTRY ("xsfvqmaccqoq", x_riscv_sifive_subext, MASK_XSFVQMACCQOQ), +- RISCV_EXT_FLAG_ENTRY ("xsfvqmaccdod", x_riscv_sifive_subext, MASK_XSFVQMACCDOD), +- RISCV_EXT_FLAG_ENTRY ("xsfvfnrclipxfqf", x_riscv_sifive_subext, MASK_XSFVFNRCLIPXFQF), ++ RISCV_EXT_FLAG_ENTRY ("xsfvcp", x_riscv_xsf_subext, MASK_XSFVCP), ++ RISCV_EXT_FLAG_ENTRY ("xsfcease", x_riscv_xsf_subext, MASK_XSFCEASE), ++ RISCV_EXT_FLAG_ENTRY ("xsfvqmaccqoq", x_riscv_xsf_subext, MASK_XSFVQMACCQOQ), ++ RISCV_EXT_FLAG_ENTRY ("xsfvqmaccdod", x_riscv_xsf_subext, MASK_XSFVQMACCDOD), ++ RISCV_EXT_FLAG_ENTRY ("xsfvfnrclipxfqf", x_riscv_xsf_subext, MASK_XSFVFNRCLIPXFQF), + + {NULL, NULL, NULL, 0} + }; +@@ -2002,9 +2002,9 @@ riscv_set_arch_by_subset_list (riscv_subset_list *subset_list, + opts->*arch_ext_flag_tab->var_ref &= ~arch_ext_flag_tab->mask; + + if (subset_list->xlen () == 32) +- opts->x_target_flags &= ~MASK_64BIT; ++ opts->x_riscv_isa_flags &= ~MASK_64BIT; + else if (subset_list->xlen () == 64) +- opts->x_target_flags |= MASK_64BIT; ++ opts->x_riscv_isa_flags |= MASK_64BIT; + + for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; + arch_ext_flag_tab->ext; +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 087aaa7be37..8fef5418b92 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -557,6 +557,7 @@ riscv*) + extra_headers="riscv_vector.h riscv_crypto.h riscv_bitmanip.h riscv_th_vector.h sifive_vector.h" + target_gtfiles="$target_gtfiles \$(srcdir)/config/riscv/riscv-vector-builtins.cc" + target_gtfiles="$target_gtfiles \$(srcdir)/config/riscv/riscv-vector-builtins.h" ++ extra_options="${extra_options} riscv/riscv-ext.opt" + ;; + rs6000*-*-*) + extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt" +diff --git a/gcc/config/riscv/gen-riscv-ext-opt.cc b/gcc/config/riscv/gen-riscv-ext-opt.cc +new file mode 100644 +index 00000000000..17b8f5bb1c0 +--- /dev/null ++++ b/gcc/config/riscv/gen-riscv-ext-opt.cc +@@ -0,0 +1,105 @@ ++#include ++#include ++#include ++#include ++#include "riscv-opts.h" ++ ++struct version_t ++{ ++ int major; ++ int minor; ++ version_t (int major, int minor, ++ enum riscv_isa_spec_class spec = ISA_SPEC_CLASS_NONE) ++ : major (major), minor (minor) ++ {} ++ bool operator<(const version_t &other) const ++ { ++ if (major != other.major) ++ return major < other.major; ++ return minor < other.minor; ++ } ++ ++ bool operator== (const version_t &other) const ++ { ++ return major == other.major && minor == other.minor; ++ } ++}; ++ ++static void ++print_ext_doc_entry (const std::string &ext_name, const std::string &full_name, ++ const std::string &desc, ++ const std::vector &supported_versions) ++{ ++ // Implementation of the function to print the documentation entry ++ // for the extension. ++ std::set unique_versions; ++ for (const auto &version : supported_versions) ++ unique_versions.insert (version); ++ printf ("@item %s\n", ext_name.c_str ()); ++ printf ("@tab"); ++ for (const auto &version : unique_versions) ++ { ++ printf (" %d.%d", version.major, version.minor); ++ } ++ printf ("\n"); ++ printf ("@tab %s", full_name.c_str ()); ++ if (desc.size ()) ++ printf (", %s", desc.c_str ()); ++ printf ("\n\n"); ++} ++ ++int ++main () ++{ ++ puts ("; Target options for the RISC-V port of the compiler"); ++ puts (";"); ++ puts ("; Copyright (C) 2025 Free Software Foundation, Inc."); ++ puts (";"); ++ puts ("; This file is part of GCC."); ++ puts (";"); ++ puts ( ++ "; GCC is free software; you can redistribute it and/or modify it under"); ++ puts ( ++ "; the terms of the GNU General Public License as published by the Free"); ++ puts ( ++ "; Software Foundation; either version 3, or (at your option) any later"); ++ puts ("; version."); ++ puts (";"); ++ puts ("; GCC is distributed in the hope that it will be useful, but WITHOUT"); ++ puts ("; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); ++ puts ("; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public"); ++ puts ("; License for more details."); ++ puts (";"); ++ puts ("; You should have received a copy of the GNU General Public License"); ++ puts ("; along with GCC; see the file COPYING3. If not see "); ++ puts ("; ."); ++ ++ puts ("; This file is generated automatically using"); ++ puts ("; gcc/config/riscv/gen-riscv-ext-opt.cc from:"); ++ puts ("; gcc/config/riscv/riscv-ext.def"); ++ puts (""); ++ puts ("; Please *DO NOT* edit manually."); ++ ++ std::set all_vars; ++#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ ++ SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ ++ BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ ++ all_vars.insert ("riscv_" #FLAG_GROUP "_subext"); ++#include "riscv-ext.def" ++#undef DEFINE_RISCV_EXT ++ ++ for (auto var : all_vars) ++ { ++ puts ("TargetVariable"); ++ printf ("int %s\n\n", var.c_str ()); ++ } ++ ++#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ ++ SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ ++ BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ ++ puts ("Mask(" #UPPERCAE_NAME ") Var(riscv_" #FLAG_GROUP "_subext)\n"); ++#include "riscv-ext.def" ++#undef DEFINE_RISCV_EXT ++ ++ return 0; ++} +diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc +index 7912b1069f7..eedb9f3a621 100644 +--- a/gcc/config/riscv/riscv-c.cc ++++ b/gcc/config/riscv/riscv-c.cc +@@ -36,10 +36,10 @@ along with GCC; see the file COPYING3. If not see + + struct pragma_intrinsic_flags + { +- int intrinsic_target_flags; ++ int intrinsic_riscv_isa_flags; + + int intrinsic_riscv_vector_elen_flags; +- int intrinsic_riscv_zvl_flags; ++ int intrinsic_riscv_zvl_subext; + int intrinsic_riscv_zvb_subext; + int intrinsic_riscv_zvk_subext; + }; +@@ -47,16 +47,16 @@ struct pragma_intrinsic_flags + static void + riscv_pragma_intrinsic_flags_pollute (struct pragma_intrinsic_flags *flags) + { +- flags->intrinsic_target_flags = target_flags; ++ flags->intrinsic_riscv_isa_flags = riscv_isa_flags; + flags->intrinsic_riscv_vector_elen_flags = riscv_vector_elen_flags; +- flags->intrinsic_riscv_zvl_flags = riscv_zvl_flags; ++ flags->intrinsic_riscv_zvl_subext = riscv_zvl_subext; + flags->intrinsic_riscv_zvb_subext = riscv_zvb_subext; + flags->intrinsic_riscv_zvk_subext = riscv_zvk_subext; + +- target_flags = target_flags ++ riscv_isa_flags = riscv_isa_flags + | MASK_VECTOR; + +- riscv_zvl_flags = riscv_zvl_flags ++ riscv_zvl_subext = riscv_zvl_subext + | MASK_ZVL32B + | MASK_ZVL64B + | MASK_ZVL128B +@@ -97,10 +97,10 @@ riscv_pragma_intrinsic_flags_pollute (struct pragma_intrinsic_flags *flags) + static void + riscv_pragma_intrinsic_flags_restore (struct pragma_intrinsic_flags *flags) + { +- target_flags = flags->intrinsic_target_flags; ++ riscv_isa_flags = flags->intrinsic_riscv_isa_flags; + + riscv_vector_elen_flags = flags->intrinsic_riscv_vector_elen_flags; +- riscv_zvl_flags = flags->intrinsic_riscv_zvl_flags; ++ riscv_zvl_subext = flags->intrinsic_riscv_zvl_subext; + riscv_zvb_subext = flags->intrinsic_riscv_zvb_subext; + riscv_zvk_subext = flags->intrinsic_riscv_zvk_subext; + } +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +new file mode 100644 +index 00000000000..0c56dc9b271 +--- /dev/null ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -0,0 +1,404 @@ ++; Target options for the RISC-V port of the compiler ++; ++; Copyright (C) 2025 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC 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, or (at your option) any later ++; version. ++; ++; GCC 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 GCC; see the file COPYING3. If not see ++; . ++; This file is generated automatically using ++; gcc/config/riscv/gen-riscv-ext-opt.cc from: ++; gcc/config/riscv/riscv-ext.def ++ ++; Please *DO NOT* edit manually. ++TargetVariable ++int riscv_base_subext ++ ++TargetVariable ++int riscv_sd_subext ++ ++TargetVariable ++int riscv_sm_subext ++ ++TargetVariable ++int riscv_ss_subext ++ ++TargetVariable ++int riscv_su_subext ++ ++TargetVariable ++int riscv_sv_subext ++ ++TargetVariable ++int riscv_xcv_subext ++ ++TargetVariable ++int riscv_xsf_subext ++ ++TargetVariable ++int riscv_xthead_subext ++ ++TargetVariable ++int riscv_xventana_subext ++ ++TargetVariable ++int riscv_za_subext ++ ++TargetVariable ++int riscv_zb_subext ++ ++TargetVariable ++int riscv_zc_subext ++ ++TargetVariable ++int riscv_zf_subext ++ ++TargetVariable ++int riscv_zi_subext ++ ++TargetVariable ++int riscv_zinx_subext ++ ++TargetVariable ++int riscv_zk_subext ++ ++TargetVariable ++int riscv_zm_subext ++ ++TargetVariable ++int riscv_zt_subext ++ ++TargetVariable ++int riscv_zvb_subext ++ ++TargetVariable ++int riscv_zve_subext ++ ++TargetVariable ++int riscv_zvf_subext ++ ++TargetVariable ++int riscv_zvk_subext ++ ++TargetVariable ++int riscv_zvl_subext ++ ++Mask(RVE) Var(riscv_base_subext) ++ ++Mask(RVI) Var(riscv_base_subext) ++ ++Mask(MUL) Var(riscv_base_subext) ++ ++Mask(ATOMIC) Var(riscv_base_subext) ++ ++Mask(HARD_FLOAT) Var(riscv_base_subext) ++ ++Mask(DOUBLE_FLOAT) Var(riscv_base_subext) ++ ++Mask(RVC) Var(riscv_base_subext) ++ ++Mask(RVB) Var(riscv_base_subext) ++ ++Mask(RVV) Var(riscv_base_subext) ++ ++Mask(RVH) Var(riscv_base_subext) ++ ++Mask(ZIC64B) Var(riscv_zi_subext) ++ ++Mask(ZICBOM) Var(riscv_zi_subext) ++ ++Mask(ZICBOP) Var(riscv_zi_subext) ++ ++Mask(ZICBOZ) Var(riscv_zi_subext) ++ ++Mask(ZICCAMOA) Var(riscv_zi_subext) ++ ++Mask(ZICCIF) Var(riscv_zi_subext) ++ ++Mask(ZICCLSM) Var(riscv_zi_subext) ++ ++Mask(ZICCRSE) Var(riscv_zi_subext) ++ ++Mask(ZICFILP) Var(riscv_zi_subext) ++ ++Mask(ZICFISS) Var(riscv_zi_subext) ++ ++Mask(ZICNTR) Var(riscv_zi_subext) ++ ++Mask(ZICOND) Var(riscv_zi_subext) ++ ++Mask(ZICSR) Var(riscv_zi_subext) ++ ++Mask(ZIFENCEI) Var(riscv_zi_subext) ++ ++Mask(ZIHINTNTL) Var(riscv_zi_subext) ++ ++Mask(ZIHINTPAUSE) Var(riscv_zi_subext) ++ ++Mask(ZIHPM) Var(riscv_zi_subext) ++ ++Mask(ZIMOP) Var(riscv_zi_subext) ++ ++Mask(ZILSD) Var(riscv_zi_subext) ++ ++Mask(ZMMUL) Var(riscv_zm_subext) ++ ++Mask(ZA128RS) Var(riscv_za_subext) ++ ++Mask(ZA64RS) Var(riscv_za_subext) ++ ++Mask(ZAAMO) Var(riscv_za_subext) ++ ++Mask(ZABHA) Var(riscv_za_subext) ++ ++Mask(ZACAS) Var(riscv_za_subext) ++ ++Mask(ZALRSC) Var(riscv_za_subext) ++ ++Mask(ZAWRS) Var(riscv_za_subext) ++ ++Mask(ZAMA16B) Var(riscv_za_subext) ++ ++Mask(ZFA) Var(riscv_zf_subext) ++ ++Mask(ZFBFMIN) Var(riscv_zf_subext) ++ ++Mask(ZFH) Var(riscv_zf_subext) ++ ++Mask(ZFHMIN) Var(riscv_zf_subext) ++ ++Mask(ZFINX) Var(riscv_zinx_subext) ++ ++Mask(ZDINX) Var(riscv_zinx_subext) ++ ++Mask(ZCA) Var(riscv_zc_subext) ++ ++Mask(ZCB) Var(riscv_zc_subext) ++ ++Mask(ZCD) Var(riscv_zc_subext) ++ ++Mask(ZCE) Var(riscv_zc_subext) ++ ++Mask(ZCF) Var(riscv_zc_subext) ++ ++Mask(ZCMOP) Var(riscv_zc_subext) ++ ++Mask(ZCMP) Var(riscv_zc_subext) ++ ++Mask(ZCMT) Var(riscv_zc_subext) ++ ++Mask(ZCLSD) Var(riscv_zc_subext) ++ ++Mask(ZBA) Var(riscv_zb_subext) ++ ++Mask(ZBB) Var(riscv_zb_subext) ++ ++Mask(ZBC) Var(riscv_zb_subext) ++ ++Mask(ZBKB) Var(riscv_zb_subext) ++ ++Mask(ZBKC) Var(riscv_zb_subext) ++ ++Mask(ZBKX) Var(riscv_zb_subext) ++ ++Mask(ZBS) Var(riscv_zb_subext) ++ ++Mask(ZK) Var(riscv_zk_subext) ++ ++Mask(ZKN) Var(riscv_zk_subext) ++ ++Mask(ZKND) Var(riscv_zk_subext) ++ ++Mask(ZKNE) Var(riscv_zk_subext) ++ ++Mask(ZKNH) Var(riscv_zk_subext) ++ ++Mask(ZKR) Var(riscv_zk_subext) ++ ++Mask(ZKS) Var(riscv_zk_subext) ++ ++Mask(ZKSED) Var(riscv_zk_subext) ++ ++Mask(ZKSH) Var(riscv_zk_subext) ++ ++Mask(ZKT) Var(riscv_zk_subext) ++ ++Mask(ZTSO) Var(riscv_zt_subext) ++ ++Mask(ZVBB) Var(riscv_zvb_subext) ++ ++Mask(ZVBC) Var(riscv_zvb_subext) ++ ++Mask(ZVE32F) Var(riscv_zve_subext) ++ ++Mask(ZVE32X) Var(riscv_zve_subext) ++ ++Mask(ZVE64D) Var(riscv_zve_subext) ++ ++Mask(ZVE64F) Var(riscv_zve_subext) ++ ++Mask(ZVE64X) Var(riscv_zve_subext) ++ ++Mask(ZVFBFMIN) Var(riscv_zvf_subext) ++ ++Mask(ZVFBFWMA) Var(riscv_zvf_subext) ++ ++Mask(ZVFH) Var(riscv_zvf_subext) ++ ++Mask(ZVFHMIN) Var(riscv_zvf_subext) ++ ++Mask(ZVKB) Var(riscv_zvk_subext) ++ ++Mask(ZVKG) Var(riscv_zvk_subext) ++ ++Mask(ZVKN) Var(riscv_zvk_subext) ++ ++Mask(ZVKNC) Var(riscv_zvk_subext) ++ ++Mask(ZVKNED) Var(riscv_zvk_subext) ++ ++Mask(ZVKNG) Var(riscv_zvk_subext) ++ ++Mask(ZVKNHA) Var(riscv_zvk_subext) ++ ++Mask(ZVKNHB) Var(riscv_zvk_subext) ++ ++Mask(ZVKS) Var(riscv_zvk_subext) ++ ++Mask(ZVKSC) Var(riscv_zvk_subext) ++ ++Mask(ZVKSED) Var(riscv_zvk_subext) ++ ++Mask(ZVKSG) Var(riscv_zvk_subext) ++ ++Mask(ZVKSH) Var(riscv_zvk_subext) ++ ++Mask(ZVKT) Var(riscv_zvk_subext) ++ ++Mask(ZVL1024B) Var(riscv_zvl_subext) ++ ++Mask(ZVL128B) Var(riscv_zvl_subext) ++ ++Mask(ZVL16384B) Var(riscv_zvl_subext) ++ ++Mask(ZVL2048B) Var(riscv_zvl_subext) ++ ++Mask(ZVL256B) Var(riscv_zvl_subext) ++ ++Mask(ZVL32768B) Var(riscv_zvl_subext) ++ ++Mask(ZVL32B) Var(riscv_zvl_subext) ++ ++Mask(ZVL4096B) Var(riscv_zvl_subext) ++ ++Mask(ZVL512B) Var(riscv_zvl_subext) ++ ++Mask(ZVL64B) Var(riscv_zvl_subext) ++ ++Mask(ZVL65536B) Var(riscv_zvl_subext) ++ ++Mask(ZVL8192B) Var(riscv_zvl_subext) ++ ++Mask(ZHINX) Var(riscv_zinx_subext) ++ ++Mask(ZHINXMIN) Var(riscv_zinx_subext) ++ ++Mask(SDTRIG) Var(riscv_sd_subext) ++ ++Mask(SMAIA) Var(riscv_sm_subext) ++ ++Mask(SMEPMP) Var(riscv_sm_subext) ++ ++Mask(SMMPM) Var(riscv_sm_subext) ++ ++Mask(SMNPM) Var(riscv_sm_subext) ++ ++Mask(SMSTATEEN) Var(riscv_sm_subext) ++ ++Mask(SSAIA) Var(riscv_ss_subext) ++ ++Mask(SSCOFPMF) Var(riscv_ss_subext) ++ ++Mask(SSNPM) Var(riscv_ss_subext) ++ ++Mask(SSPM) Var(riscv_ss_subext) ++ ++Mask(SSSTATEEN) Var(riscv_ss_subext) ++ ++Mask(SSTC) Var(riscv_ss_subext) ++ ++Mask(SSSTRICT) Var(riscv_ss_subext) ++ ++Mask(SUPM) Var(riscv_su_subext) ++ ++Mask(SVINVAL) Var(riscv_sv_subext) ++ ++Mask(SVNAPOT) Var(riscv_sv_subext) ++ ++Mask(SVPBMT) Var(riscv_sv_subext) ++ ++Mask(SVVPTC) Var(riscv_sv_subext) ++ ++Mask(SVADU) Var(riscv_sv_subext) ++ ++Mask(SVADE) Var(riscv_sv_subext) ++ ++Mask(XCVALU) Var(riscv_xcv_subext) ++ ++Mask(XCVBI) Var(riscv_xcv_subext) ++ ++Mask(XCVELW) Var(riscv_xcv_subext) ++ ++Mask(XCVMAC) Var(riscv_xcv_subext) ++ ++Mask(XCVSIMD) Var(riscv_xcv_subext) ++ ++Mask(XSFCEASE) Var(riscv_xsf_subext) ++ ++Mask(XSFVCP) Var(riscv_xsf_subext) ++ ++Mask(XSFVFNRCLIPXFQF) Var(riscv_xsf_subext) ++ ++Mask(XSFVQMACCDOD) Var(riscv_xsf_subext) ++ ++Mask(XSFVQMACCQOQ) Var(riscv_xsf_subext) ++ ++Mask(XTHEADBA) Var(riscv_xthead_subext) ++ ++Mask(XTHEADBB) Var(riscv_xthead_subext) ++ ++Mask(XTHEADBS) Var(riscv_xthead_subext) ++ ++Mask(XTHEADCMO) Var(riscv_xthead_subext) ++ ++Mask(XTHEADCONDMOV) Var(riscv_xthead_subext) ++ ++Mask(XTHEADFMEMIDX) Var(riscv_xthead_subext) ++ ++Mask(XTHEADFMV) Var(riscv_xthead_subext) ++ ++Mask(XTHEADINT) Var(riscv_xthead_subext) ++ ++Mask(XTHEADMAC) Var(riscv_xthead_subext) ++ ++Mask(XTHEADMEMIDX) Var(riscv_xthead_subext) ++ ++Mask(XTHEADMEMPAIR) Var(riscv_xthead_subext) ++ ++Mask(XTHEADSYNC) Var(riscv_xthead_subext) ++ ++Mask(XTHEADVECTOR) Var(riscv_xthead_subext) ++ ++Mask(XVENTANACONDOPS) Var(riscv_xventana_subext) ++ +diff --git a/gcc/config/riscv/riscv-ext.opt.urls b/gcc/config/riscv/riscv-ext.opt.urls +new file mode 100644 +index 00000000000..e69de29bb2d +diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h +index 9766b89b2df..fc3963c96bc 100644 +--- a/gcc/config/riscv/riscv-opts.h ++++ b/gcc/config/riscv/riscv-opts.h +@@ -136,16 +136,16 @@ enum rvv_vector_bits_enum { + /* Bit of riscv_zvl_flags will set continually, N-1 bit will set if N-bit is + set, e.g. MASK_ZVL64B has set then MASK_ZVL32B is set, so we can use + popcount to calculate the minimal VLEN. */ +-#define TARGET_MIN_VLEN \ +- ((riscv_zvl_flags == 0) \ +- ? 0 \ +- : 32 << (__builtin_popcount (riscv_zvl_flags) - 1)) ++#define TARGET_MIN_VLEN \ ++ ((riscv_zvl_subext == 0) \ ++ ? 0 \ ++ : 32 << (__builtin_popcount (riscv_zvl_subext) - 1)) + + /* Same as TARGET_MIN_VLEN, but take an OPTS as gcc_options. */ + #define TARGET_MIN_VLEN_OPTS(opts) \ +- ((opts->x_riscv_zvl_flags == 0) \ ++ ((opts->x_riscv_zvl_subext == 0) \ + ? 0 \ +- : 32 << (__builtin_popcount (opts->x_riscv_zvl_flags) - 1)) ++ : 32 << (__builtin_popcount (opts->x_riscv_zvl_subext) - 1)) + + /* The maximum LMUL according to user configuration. */ + #define TARGET_MAX_LMUL \ +diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc +index 61dcdabbb40..d86e662f6e6 100644 +--- a/gcc/config/riscv/riscv-vector-builtins.cc ++++ b/gcc/config/riscv/riscv-vector-builtins.cc +@@ -3504,26 +3504,26 @@ check_required_extensions (const function_instance &instance) + required_extensions |= RVV_REQUIRE_RV64BIT; + } + +- uint64_t riscv_isa_flags = 0; ++ uint64_t isa_flags = 0; + + if (TARGET_VECTOR_ELEN_BF_16) +- riscv_isa_flags |= RVV_REQUIRE_ELEN_BF_16; ++ isa_flags |= RVV_REQUIRE_ELEN_BF_16; + if (TARGET_VECTOR_ELEN_FP_16) +- riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_16; ++ isa_flags |= RVV_REQUIRE_ELEN_FP_16; + if (TARGET_VECTOR_ELEN_FP_32) +- riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_32; ++ isa_flags |= RVV_REQUIRE_ELEN_FP_32; + if (TARGET_VECTOR_ELEN_FP_64) +- riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_64; ++ isa_flags |= RVV_REQUIRE_ELEN_FP_64; + if (TARGET_VECTOR_ELEN_64) +- riscv_isa_flags |= RVV_REQUIRE_ELEN_64; ++ isa_flags |= RVV_REQUIRE_ELEN_64; + if (TARGET_64BIT) +- riscv_isa_flags |= RVV_REQUIRE_RV64BIT; ++ isa_flags |= RVV_REQUIRE_RV64BIT; + if (TARGET_FULL_V) +- riscv_isa_flags |= RVV_REQUIRE_FULL_V; ++ isa_flags |= RVV_REQUIRE_FULL_V; + if (TARGET_MIN_VLEN > 32) +- riscv_isa_flags |= RVV_REQUIRE_MIN_VLEN_64; ++ isa_flags |= RVV_REQUIRE_MIN_VLEN_64; + +- uint64_t missing_extensions = required_extensions & ~riscv_isa_flags; ++ uint64_t missing_extensions = required_extensions & ~isa_flags; + if (missing_extensions != 0) + return false; + return true; +diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt +index 9480dc54cbb..527e09549a8 100644 +--- a/gcc/config/riscv/riscv.opt ++++ b/gcc/config/riscv/riscv.opt +@@ -168,23 +168,14 @@ momit-leaf-frame-pointer + Target Mask(OMIT_LEAF_FRAME_POINTER) Save + Omit the frame pointer in leaf functions. + +-Mask(64BIT) +- +-Mask(MUL) +- +-Mask(ATOMIC) +- +-Mask(HARD_FLOAT) +- +-Mask(DOUBLE_FLOAT) +- +-Mask(RVC) ++TargetVariable ++int riscv_isa_flags + +-Mask(RVE) ++Mask(64BIT) Var(riscv_isa_flags) + +-Mask(VECTOR) ++Mask(VECTOR) Var(riscv_isa_flags) + +-Mask(FULL_V) ++Mask(FULL_V) Var(riscv_isa_flags) + + mriscv-attribute + Target Var(riscv_emit_attribute_p) Init(-1) +@@ -232,97 +223,6 @@ Use the given offset for addressing the stack-protector guard. + TargetVariable + long riscv_stack_protector_guard_offset = 0 + +-TargetVariable +-int riscv_zi_subext +- +-Mask(ZICSR) Var(riscv_zi_subext) +- +-Mask(ZIFENCEI) Var(riscv_zi_subext) +- +-Mask(ZIHINTNTL) Var(riscv_zi_subext) +- +-Mask(ZIHINTPAUSE) Var(riscv_zi_subext) +- +-Mask(ZICOND) Var(riscv_zi_subext) +- +-Mask(ZICCAMOA) Var(riscv_zi_subext) +- +-Mask(ZICCIF) Var(riscv_zi_subext) +- +-Mask(ZICCLSM) Var(riscv_zi_subext) +- +-Mask(ZICCRSE) Var(riscv_zi_subext) +- +-Mask(ZICFISS) Var(riscv_zi_subext) +- +-Mask(ZICFILP) Var(riscv_zi_subext) +- +-Mask(ZILSD) Var(riscv_zi_subext) +- +-TargetVariable +-int riscv_za_subext +- +-Mask(ZAWRS) Var(riscv_za_subext) +- +-Mask(ZAAMO) Var(riscv_za_subext) +- +-Mask(ZALRSC) Var(riscv_za_subext) +- +-Mask(ZABHA) Var(riscv_za_subext) +- +-Mask(ZACAS) Var(riscv_za_subext) +- +-Mask(ZA64RS) Var(riscv_za_subext) +- +-Mask(ZA128RS) Var(riscv_za_subext) +- +-Mask(ZAMA16B) Var(riscv_za_subext) +- +-TargetVariable +-int riscv_zb_subext +- +-Mask(ZBA) Var(riscv_zb_subext) +- +-Mask(ZBB) Var(riscv_zb_subext) +- +-Mask(ZBC) Var(riscv_zb_subext) +- +-Mask(ZBS) Var(riscv_zb_subext) +- +-TargetVariable +-int riscv_zinx_subext +- +-Mask(ZFINX) Var(riscv_zinx_subext) +- +-Mask(ZDINX) Var(riscv_zinx_subext) +- +-Mask(ZHINX) Var(riscv_zinx_subext) +- +-Mask(ZHINXMIN) Var(riscv_zinx_subext) +- +-TargetVariable +-int riscv_zk_subext +- +-Mask(ZBKB) Var(riscv_zk_subext) +- +-Mask(ZBKC) Var(riscv_zk_subext) +- +-Mask(ZBKX) Var(riscv_zk_subext) +- +-Mask(ZKNE) Var(riscv_zk_subext) +- +-Mask(ZKND) Var(riscv_zk_subext) +- +-Mask(ZKNH) Var(riscv_zk_subext) +- +-Mask(ZKR) Var(riscv_zk_subext) +- +-Mask(ZKSED) Var(riscv_zk_subext) +- +-Mask(ZKSH) Var(riscv_zk_subext) +- +-Mask(ZKT) Var(riscv_zk_subext) +- + TargetVariable + int riscv_vector_elen_flags + +@@ -338,232 +238,6 @@ Mask(VECTOR_ELEN_FP_16) Var(riscv_vector_elen_flags) + + Mask(VECTOR_ELEN_BF_16) Var(riscv_vector_elen_flags) + +-TargetVariable +-int riscv_zvl_flags +- +-Mask(ZVL32B) Var(riscv_zvl_flags) +- +-Mask(ZVL64B) Var(riscv_zvl_flags) +- +-Mask(ZVL128B) Var(riscv_zvl_flags) +- +-Mask(ZVL256B) Var(riscv_zvl_flags) +- +-Mask(ZVL512B) Var(riscv_zvl_flags) +- +-Mask(ZVL1024B) Var(riscv_zvl_flags) +- +-Mask(ZVL2048B) Var(riscv_zvl_flags) +- +-Mask(ZVL4096B) Var(riscv_zvl_flags) +- +-Mask(ZVL8192B) Var(riscv_zvl_flags) +- +-Mask(ZVL16384B) Var(riscv_zvl_flags) +- +-Mask(ZVL32768B) Var(riscv_zvl_flags) +- +-Mask(ZVL65536B) Var(riscv_zvl_flags) +- +-TargetVariable +-int riscv_zvb_subext +- +-Mask(ZVBB) Var(riscv_zvb_subext) +- +-Mask(ZVBC) Var(riscv_zvb_subext) +- +-Mask(ZVKB) Var(riscv_zvb_subext) +- +-TargetVariable +-int riscv_zvk_subext +- +-Mask(ZVKG) Var(riscv_zvk_subext) +- +-Mask(ZVKNED) Var(riscv_zvk_subext) +- +-Mask(ZVKNHA) Var(riscv_zvk_subext) +- +-Mask(ZVKNHB) Var(riscv_zvk_subext) +- +-Mask(ZVKSED) Var(riscv_zvk_subext) +- +-Mask(ZVKSH) Var(riscv_zvk_subext) +- +-Mask(ZVKN) Var(riscv_zvk_subext) +- +-Mask(ZVKNC) Var(riscv_zvk_subext) +- +-Mask(ZVKNG) Var(riscv_zvk_subext) +- +-Mask(ZVKS) Var(riscv_zvk_subext) +- +-Mask(ZVKSC) Var(riscv_zvk_subext) +- +-Mask(ZVKSG) Var(riscv_zvk_subext) +- +-Mask(ZVKT) Var(riscv_zvk_subext) +- +-TargetVariable +-int riscv_zicmo_subext +- +-Mask(ZICBOZ) Var(riscv_zicmo_subext) +- +-Mask(ZICBOM) Var(riscv_zicmo_subext) +- +-Mask(ZICBOP) Var(riscv_zicmo_subext) +- +-Mask(ZIC64B) Var(riscv_zicmo_subext) +- +-TargetVariable +-int riscv_mop_subext +- +-Mask(ZIMOP) Var(riscv_mop_subext) +- +-Mask(ZCMOP) Var(riscv_mop_subext) +- +-TargetVariable +-int riscv_zf_subext +- +-Mask(ZFBFMIN) Var(riscv_zf_subext) +- +-Mask(ZFHMIN) Var(riscv_zf_subext) +- +-Mask(ZFH) Var(riscv_zf_subext) +- +-Mask(ZVFBFMIN) Var(riscv_zf_subext) +- +-Mask(ZVFBFWMA) Var(riscv_zf_subext) +- +-Mask(ZVFHMIN) Var(riscv_zf_subext) +- +-Mask(ZVFH) Var(riscv_zf_subext) +- +-TargetVariable +-int riscv_zfa_subext +- +-Mask(ZFA) Var(riscv_zfa_subext) +- +-TargetVariable +-int riscv_zm_subext +- +-Mask(ZMMUL) Var(riscv_zm_subext) +- +-TargetVariable +-int riscv_zc_subext +- +-Mask(ZCA) Var(riscv_zc_subext) +- +-Mask(ZCB) Var(riscv_zc_subext) +- +-Mask(ZCE) Var(riscv_zc_subext) +- +-Mask(ZCF) Var(riscv_zc_subext) +- +-Mask(ZCD) Var(riscv_zc_subext) +- +-Mask(ZCMP) Var(riscv_zc_subext) +- +-Mask(ZCMT) Var(riscv_zc_subext) +- +-Mask(ZCLSD) Var(riscv_zc_subext) +- +-Mask(XCVBI) Var(riscv_xcv_subext) +- +-TargetVariable +-int riscv_sv_subext +- +-Mask(SVADE) Var(riscv_sv_subext) +- +-Mask(SVADU) Var(riscv_sv_subext) +- +-Mask(SVINVAL) Var(riscv_sv_subext) +- +-Mask(SVNAPOT) Var(riscv_sv_subext) +- +-Mask(SVVPTC) Var(riscv_sv_subext) +- +-TargetVariable +-int riscv_ss_subext +- +-Mask(SSNPM) Var(riscv_ss_subext) +- +-Mask(SSPM) Var(riscv_ss_subext) +- +-TargetVariable +-int riscv_sm_subext +- +-Mask(SMNPM) Var(riscv_sm_subext) +- +-Mask(SMMPM) Var(riscv_sm_subext) +- +-TargetVariable +-int riscv_su_subext +- +-Mask(SUPM) Var(riscv_su_subext) +- +-TargetVariable +-int riscv_ztso_subext +- +-Mask(ZTSO) Var(riscv_ztso_subext) +- +-TargetVariable +-int riscv_xcv_subext +- +-Mask(XCVMAC) Var(riscv_xcv_subext) +- +-Mask(XCVALU) Var(riscv_xcv_subext) +- +-Mask(XCVELW) Var(riscv_xcv_subext) +- +-Mask(XCVSIMD) Var(riscv_xcv_subext) +- +-TargetVariable +-int riscv_xthead_subext +- +-Mask(XTHEADBA) Var(riscv_xthead_subext) +- +-Mask(XTHEADBB) Var(riscv_xthead_subext) +- +-Mask(XTHEADBS) Var(riscv_xthead_subext) +- +-Mask(XTHEADCMO) Var(riscv_xthead_subext) +- +-Mask(XTHEADCONDMOV) Var(riscv_xthead_subext) +- +-Mask(XTHEADFMEMIDX) Var(riscv_xthead_subext) +- +-Mask(XTHEADFMV) Var(riscv_xthead_subext) +- +-Mask(XTHEADINT) Var(riscv_xthead_subext) +- +-Mask(XTHEADMAC) Var(riscv_xthead_subext) +- +-Mask(XTHEADMEMIDX) Var(riscv_xthead_subext) +- +-Mask(XTHEADMEMPAIR) Var(riscv_xthead_subext) +- +-Mask(XTHEADSYNC) Var(riscv_xthead_subext) +- +-Mask(XTHEADVECTOR) Var(riscv_xthead_subext) +- +-TargetVariable +-int riscv_xventana_subext +- +-Mask(XVENTANACONDOPS) Var(riscv_xventana_subext) +- +-TargetVariable +-int riscv_sifive_subext +- +-Mask(XSFVCP) Var(riscv_sifive_subext) +- +-Mask(XSFCEASE) Var(riscv_sifive_subext) +- +-Mask(XSFVQMACCQOQ) Var(riscv_sifive_subext) +- +-Mask(XSFVQMACCDOD) Var(riscv_sifive_subext) +- +-Mask(XSFVFNRCLIPXFQF) Var(riscv_sifive_subext) +- + TargetVariable + int riscv_fmv_priority = 0 + +diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv +index 6493087fe51..32b467b601a 100644 +--- a/gcc/config/riscv/t-riscv ++++ b/gcc/config/riscv/t-riscv +@@ -180,3 +180,16 @@ s-riscv-vector-type-indexer.gen.defs: build/genrvv-type-indexer$(build_exeext) + $(STAMP) s-riscv-vector-type-indexer.gen.defs + + genprog+=rvv-type-indexer ++ ++$(srcdir)/config/riscv/riscv-ext.opt: $(srcdir)/config/riscv/riscv-ext.def ++ ++$(srcdir)/config/riscv/riscv-ext.opt: s-riscv-ext.opt ; @true ++ ++build/gen-riscv-ext-opt$(build_exeext): $(srcdir)/config/riscv/gen-riscv-ext-opt.cc \ ++ $(srcdir)/config/riscv/riscv-ext.def ++ $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ ++ ++s-riscv-ext.opt: build/gen-riscv-ext-opt$(build_exeext) ++ $(RUN_GEN) build/gen-riscv-ext-opt$(build_exeext) > tmp-riscv-ext.opt ++ $(SHELL) $(srcdir)/../move-if-change tmp-riscv-ext.opt $(srcdir)/config/riscv/riscv-ext.opt ++ $(STAMP) s-riscv-ext.opt +-- +2.51.0 + diff --git a/SPECS/gcc15/0013-RISC-V-Generate-extension-table-in-documentation-fro.patch b/SPECS/gcc15/0013-RISC-V-Generate-extension-table-in-documentation-fro.patch new file mode 100644 index 00000000..50da9fc0 --- /dev/null +++ b/SPECS/gcc15/0013-RISC-V-Generate-extension-table-in-documentation-fro.patch @@ -0,0 +1,1345 @@ +From 2758d1b289a7ec2516f9b27fcddab8efb0779ef3 Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 21:10:53 +0800 +Subject: [PATCH 13/35] RISC-V: Generate extension table in documentation from + riscv-ext.def +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Automatically build the ISA extension reference table in invoke.texi from +the unified riscv-ext.def metadata, ensuring documentation stays in sync +with extension definitions and reducing manual maintenance. + +gcc/ChangeLog: + + * doc/invoke.texi: Replace hand‑written extension table with + `@include riscv-ext.texi` to pull in auto‑generated entries. + * doc/riscv-ext.texi: New generated definition file + containing formatted documentation entries for each extension. + * Makefile.in: Add riscv-ext.texi to the list of files to be + processed by the Texinfo generator. + * config/riscv/gen-riscv-ext-texi.cc: New. + * config/riscv/t-riscv: Add rule for generating riscv-ext.texi. +--- + gcc/Makefile.in | 2 +- + gcc/config/riscv/gen-riscv-ext-texi.cc | 88 ++++ + gcc/config/riscv/t-riscv | 34 +- + gcc/doc/invoke.texi | 495 +------------------ + gcc/doc/riscv-ext.texi | 637 +++++++++++++++++++++++++ + 5 files changed, 759 insertions(+), 497 deletions(-) + create mode 100644 gcc/config/riscv/gen-riscv-ext-texi.cc + create mode 100644 gcc/doc/riscv-ext.texi + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 55b4cd7dbed..0fa5d0c925a 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3702,7 +3702,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \ + contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi \ + fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi \ + implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \ +- lto-dump.texi ++ lto-dump.texi riscv-ext.texi + + # we explicitly use $(srcdir)/doc/tm.texi here to avoid confusion with + # the generated tm.texi; the latter might have a more recent timestamp, +diff --git a/gcc/config/riscv/gen-riscv-ext-texi.cc b/gcc/config/riscv/gen-riscv-ext-texi.cc +new file mode 100644 +index 00000000000..e15fdbf36f6 +--- /dev/null ++++ b/gcc/config/riscv/gen-riscv-ext-texi.cc +@@ -0,0 +1,88 @@ ++#include ++#include ++#include ++#include ++#include "riscv-opts.h" ++ ++struct version_t ++{ ++ int major; ++ int minor; ++ version_t (int major, int minor, ++ enum riscv_isa_spec_class spec = ISA_SPEC_CLASS_NONE) ++ : major (major), minor (minor) ++ {} ++ bool operator<(const version_t &other) const ++ { ++ if (major != other.major) ++ return major < other.major; ++ return minor < other.minor; ++ } ++ ++ bool operator== (const version_t &other) const ++ { ++ return major == other.major && minor == other.minor; ++ } ++}; ++ ++static void ++print_ext_doc_entry (const std::string &ext_name, const std::string &full_name, ++ const std::string &desc, ++ const std::vector &supported_versions) ++{ ++ // Implementation of the function to print the documentation entry ++ // for the extension. ++ std::set unique_versions; ++ for (const auto &version : supported_versions) ++ unique_versions.insert (version); ++ printf ("@item %s\n", ext_name.c_str ()); ++ printf ("@tab"); ++ for (const auto &version : unique_versions) ++ { ++ printf (" %d.%d", version.major, version.minor); ++ } ++ printf ("\n"); ++ printf ("@tab %s", full_name.c_str ()); ++ if (desc.size ()) ++ printf (", %s", desc.c_str ()); ++ printf ("\n\n"); ++} ++ ++int ++main () ++{ ++ puts ("@c Copyright (C) 2025 Free Software Foundation, Inc."); ++ puts ("@c This is part of the GCC manual."); ++ puts ("@c For copying conditions, see the file gcc/doc/include/fdl.texi."); ++ puts (""); ++ puts ("@c This file is generated automatically using"); ++ puts ("@c gcc/config/riscv/gen-riscv-ext-texi.cc from:"); ++ puts ("@c gcc/config/riscv/riscv-ext.def"); ++ puts ("@c gcc/config/riscv/riscv-opts.h"); ++ puts (""); ++ puts ("@c Please *DO NOT* edit manually."); ++ puts (""); ++ puts ("@multitable @columnfractions .10 .10 .80"); ++ puts ("@headitem Extension Name @tab Supported Version @tab Description"); ++ puts (""); ++ ++ /* g extension is a very speical extension that no clear version... */ ++ puts ("@item g"); ++ puts ("@tab -"); ++ puts ( ++ "@tab General-purpose computing base extension, @samp{g} will expand to"); ++ puts ("@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and"); ++ puts ("@samp{zifencei}."); ++ puts (""); ++ ++#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ ++ SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ ++ BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ ++ print_ext_doc_entry (#NAME, FULL_NAME, DESC, \ ++ std::vector SUPPORTED_VERSIONS); ++#include "riscv-ext.def" ++#undef DEFINE_RISCV_EXT ++ ++ puts ("@end multitable"); ++ return 0; ++} +diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv +index 32b467b601a..d0684efe391 100644 +--- a/gcc/config/riscv/t-riscv ++++ b/gcc/config/riscv/t-riscv +@@ -181,15 +181,45 @@ s-riscv-vector-type-indexer.gen.defs: build/genrvv-type-indexer$(build_exeext) + + genprog+=rvv-type-indexer + +-$(srcdir)/config/riscv/riscv-ext.opt: $(srcdir)/config/riscv/riscv-ext.def ++RISCV_EXT_DEFS = \ ++ $(srcdir)/config/riscv/riscv-ext.def \ ++ $(srcdir)/config/riscv/riscv-ext-corev.def \ ++ $(srcdir)/config/riscv/riscv-ext.def \ ++ $(srcdir)/config/riscv/riscv-ext-sifive.def \ ++ $(srcdir)/config/riscv/riscv-ext-thead.def \ ++ $(srcdir)/config/riscv/riscv-ext-ventana.def ++ ++$(srcdir)/config/riscv/riscv-ext.opt: $(RISCV_EXT_DEFS) + + $(srcdir)/config/riscv/riscv-ext.opt: s-riscv-ext.opt ; @true + + build/gen-riscv-ext-opt$(build_exeext): $(srcdir)/config/riscv/gen-riscv-ext-opt.cc \ +- $(srcdir)/config/riscv/riscv-ext.def ++ $(RISCV_EXT_DEFS) + $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ + + s-riscv-ext.opt: build/gen-riscv-ext-opt$(build_exeext) + $(RUN_GEN) build/gen-riscv-ext-opt$(build_exeext) > tmp-riscv-ext.opt + $(SHELL) $(srcdir)/../move-if-change tmp-riscv-ext.opt $(srcdir)/config/riscv/riscv-ext.opt + $(STAMP) s-riscv-ext.opt ++ ++build/gen-riscv-ext-texi$(build_exeext): $(srcdir)/config/riscv/gen-riscv-ext-texi.cc \ ++ $(RISCV_EXT_DEFS) ++ $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ ++ ++ ++$(srcdir)/doc/riscv-ext.texi: $(RISCV_EXT_DEFS) ++$(srcdir)/doc/riscv-ext.texi: s-riscv-ext.texi ; @true ++ ++# Generate the doc when generating option file. ++$(srcdir)/config/riscv/riscv-ext.opt: s-riscv-ext.texi ; @true ++ ++s-riscv-ext.texi: build/gen-riscv-ext-texi$(build_exeext) ++ $(RUN_GEN) build/gen-riscv-ext-texi$(build_exeext) > tmp-riscv-ext.texi ++ $(SHELL) $(srcdir)/../move-if-change tmp-riscv-ext.texi $(srcdir)/doc/riscv-ext.texi ++ $(STAMP) s-riscv-ext.texi ++ ++# Run `riscv-regen' after you changed or added anything from riscv-ext*.def ++ ++.PHONY: riscv-regen ++ ++riscv-regen: s-riscv-ext.texi s-riscv-ext.opt +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index 026685122bf..f8b06e7d509 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -31110,501 +31110,8 @@ syntax @samp{p} or @samp{}, (e.g.@: @samp{m2p1} or + @end table + + Supported extension are listed below: +-@multitable @columnfractions .10 .10 .80 +-@headitem Extension Name @tab Supported Version @tab Description +-@item i +-@tab 2.0, 2.1 +-@tab Base integer extension. +- +-@item e +-@tab 2.0 +-@tab Reduced base integer extension. +- +-@item g +-@tab - +-@tab General-purpose computing base extension, @samp{g} will expand to +-@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and +-@samp{zifencei}. +- +-@item m +-@tab 2.0 +-@tab Integer multiplication and division extension. +- +-@item a +-@tab 2.0, 2.1 +-@tab Atomic extension. +- +-@item f +-@tab 2.0, 2.2 +-@tab Single-precision floating-point extension. +- +-@item d +-@tab 2.0, 2.2 +-@tab Double-precision floating-point extension. +- +-@item c +-@tab 2.0 +-@tab Compressed extension. +- +-@item h +-@tab 1.0 +-@tab Hypervisor extension. +- +-@item v +-@tab 1.0 +-@tab Vector extension. +- +-@item zicsr +-@tab 2.0 +-@tab Control and status register access extension. +- +-@item zifencei +-@tab 2.0 +-@tab Instruction-fetch fence extension. +- +-@item zicond +-@tab 1.0 +-@tab Integer conditional operations extension. +- +-@item za64rs +-@tab 1.0 +-@tab Reservation set size of 64 bytes. +- +-@item za128rs +-@tab 1.0 +-@tab Reservation set size of 128 bytes. +- +-@item zawrs +-@tab 1.0 +-@tab Wait-on-reservation-set extension. +- +-@item zba +-@tab 1.0 +-@tab Address calculation extension. +- +-@item zbb +-@tab 1.0 +-@tab Basic bit manipulation extension. +- +-@item zbc +-@tab 1.0 +-@tab Carry-less multiplication extension. +- +-@item zbs +-@tab 1.0 +-@tab Single-bit operation extension. +- +-@item zfinx +-@tab 1.0 +-@tab Single-precision floating-point in integer registers extension. +- +-@item zdinx +-@tab 1.0 +-@tab Double-precision floating-point in integer registers extension. +- +-@item zhinx +-@tab 1.0 +-@tab Half-precision floating-point in integer registers extension. +- +-@item zhinxmin +-@tab 1.0 +-@tab Minimal half-precision floating-point in integer registers extension. +- +-@item zbkb +-@tab 1.0 +-@tab Cryptography bit-manipulation extension. +- +-@item zbkc +-@tab 1.0 +-@tab Cryptography carry-less multiply extension. +- +-@item zbkx +-@tab 1.0 +-@tab Cryptography crossbar permutation extension. +- +-@item zkne +-@tab 1.0 +-@tab AES Encryption extension. +- +-@item zknd +-@tab 1.0 +-@tab AES Decryption extension. +- +-@item zknh +-@tab 1.0 +-@tab Hash function extension. +- +-@item zkr +-@tab 1.0 +-@tab Entropy source extension. +- +-@item zksed +-@tab 1.0 +-@tab SM4 block cipher extension. +- +-@item zksh +-@tab 1.0 +-@tab SM3 hash function extension. +- +-@item zkt +-@tab 1.0 +-@tab Data independent execution latency extension. +- +-@item zk +-@tab 1.0 +-@tab Standard scalar cryptography extension. +- +-@item zkn +-@tab 1.0 +-@tab NIST algorithm suite extension. +- +-@item zks +-@tab 1.0 +-@tab ShangMi algorithm suite extension. + +-@item zihintntl +-@tab 1.0 +-@tab Non-temporal locality hints extension. +- +-@item zihintpause +-@tab 1.0 +-@tab Pause hint extension. +- +-@item zicboz +-@tab 1.0 +-@tab Cache-block zero extension. +- +-@item zicbom +-@tab 1.0 +-@tab Cache-block management extension. +- +-@item zicbop +-@tab 1.0 +-@tab Cache-block prefetch extension. +- +-@item zic64b +-@tab 1.0 +-@tab Cache block size isf 64 bytes. +- +-@item ziccamoa +-@tab 1.0 +-@tab Main memory supports all atomics in A. +- +-@item ziccif +-@tab 1.0 +-@tab Main memory supports instruction fetch with atomicity requirement. +- +-@item zicclsm +-@tab 1.0 +-@tab Main memory supports misaligned loads/stores. +- +-@item ziccrse +-@tab 1.0 +-@tab Main memory supports forward progress on LR/SC sequences. +- +-@item zicntr +-@tab 2.0 +-@tab Standard extension for base counters and timers. +- +-@item zihpm +-@tab 2.0 +-@tab Standard extension for hardware performance counters. +- +-@item ztso +-@tab 1.0 +-@tab Total store ordering extension. +- +-@item zve32x +-@tab 1.0 +-@tab Vector extensions for embedded processors. +- +-@item zve32f +-@tab 1.0 +-@tab Vector extensions for embedded processors. +- +-@item zve64x +-@tab 1.0 +-@tab Vector extensions for embedded processors. +- +-@item zve64f +-@tab 1.0 +-@tab Vector extensions for embedded processors. +- +-@item zve64d +-@tab 1.0 +-@tab Vector extensions for embedded processors. +- +-@item zvl32b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl64b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl128b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl256b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl512b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl1024b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl2048b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvl4096b +-@tab 1.0 +-@tab Minimum vector length standard extensions +- +-@item zvbb +-@tab 1.0 +-@tab Vector basic bit-manipulation extension. +- +-@item zvbc +-@tab 1.0 +-@tab Vector carryless multiplication extension. +- +-@item zvkb +-@tab 1.0 +-@tab Vector cryptography bit-manipulation extension. +- +-@item zvkg +-@tab 1.0 +-@tab Vector GCM/GMAC extension. +- +-@item zvkned +-@tab 1.0 +-@tab Vector AES block cipher extension. +- +-@item zvknha +-@tab 1.0 +-@tab Vector SHA-2 secure hash extension. +- +-@item zvknhb +-@tab 1.0 +-@tab Vector SHA-2 secure hash extension. +- +-@item zvksed +-@tab 1.0 +-@tab Vector SM4 Block Cipher extension. +- +-@item zvksh +-@tab 1.0 +-@tab Vector SM3 Secure Hash extension. +- +-@item zvkn +-@tab 1.0 +-@tab Vector NIST Algorithm Suite extension, @samp{zvkn} will expand to +-@samp{zvkned}, @samp{zvknhb}, @samp{zvkb} and @samp{zvkt}. +- +-@item zvknc +-@tab 1.0 +-@tab Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc} +-will expand to @samp{zvkn} and @samp{zvbc}. +- +-@item zvkng +-@tab 1.0 +-@tab Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand +-to @samp{zvkn} and @samp{zvkg}. +- +-@item zvks +-@tab 1.0 +-@tab Vector ShangMi algorithm suite extension, @samp{zvks} will expand +-to @samp{zvksed}, @samp{zvksh}, @samp{zvkb} and @samp{zvkt}. +- +-@item zvksc +-@tab 1.0 +-@tab Vector ShangMi algorithm suite with carryless multiplication extension, +-@samp{zvksc} will expand to @samp{zvks} and @samp{zvbc}. +- +-@item zvksg +-@tab 1.0 +-@tab Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand +-to @samp{zvks} and @samp{zvkg}. +- +-@item zvkt +-@tab 1.0 +-@tab Vector data independent execution latency extension. +- +-@item zfh +-@tab 1.0 +-@tab Half-precision floating-point extension. +- +-@item zfhmin +-@tab 1.0 +-@tab Minimal half-precision floating-point extension. +- +-@item zvfh +-@tab 1.0 +-@tab Vector half-precision floating-point extension. +- +-@item zvfhmin +-@tab 1.0 +-@tab Vector minimal half-precision floating-point extension. +- +-@item zvfbfmin +-@tab 1.0 +-@tab Vector BF16 converts extension. +- +-@item zfa +-@tab 1.0 +-@tab Additional floating-point extension. +- +-@item zmmul +-@tab 1.0 +-@tab Integer multiplication extension. +- +-@item zca +-@tab 1.0 +-@tab Integer compressed instruction extension. +- +-@item zcf +-@tab 1.0 +-@tab Compressed single-precision floating point loads and stores extension. +- +-@item zcd +-@tab 1.0 +-@tab Compressed double-precision floating point loads and stores extension. +- +-@item zcb +-@tab 1.0 +-@tab Simple compressed instruction extension. +- +-@item zce +-@tab 1.0 +-@tab Compressed instruction extensions for embedded processors. +- +-@item zcmp +-@tab 1.0 +-@tab Compressed push pop extension. +- +-@item zcmt +-@tab 1.0 +-@tab Table jump instruction extension. +- +-@item smaia +-@tab 1.0 +-@tab Advanced interrupt architecture extension. +- +-@item smepmp +-@tab 1.0 +-@tab PMP Enhancements for memory access and execution prevention on Machine mode. +- +-@item smstateen +-@tab 1.0 +-@tab State enable extension. +- +-@item ssaia +-@tab 1.0 +-@tab Advanced interrupt architecture extension for supervisor-mode. +- +-@item sscofpmf +-@tab 1.0 +-@tab Count overflow & filtering extension. +- +-@item ssstateen +-@tab 1.0 +-@tab State-enable extension for supervisor-mode. +- +-@item sstc +-@tab 1.0 +-@tab Supervisor-mode timer interrupts extension. +- +-@item svade +-@tab 1.0 +-@tab Cause exception when hardware updating of A/D bits is disabled +- +-@item svadu +-@tab 1.0 +-@tab Hardware Updating of A/D Bits extension. +- +-@item svinval +-@tab 1.0 +-@tab Fine-grained address-translation cache invalidation extension. +- +-@item svnapot +-@tab 1.0 +-@tab NAPOT translation contiguity extension. +- +-@item svpbmt +-@tab 1.0 +-@tab Page-based memory types extension. +- +-@item xcvmac +-@tab 1.0 +-@tab Core-V multiply-accumulate extension. +- +-@item xcvalu +-@tab 1.0 +-@tab Core-V miscellaneous ALU extension. +- +-@item xcvelw +-@tab 1.0 +-@tab Core-V event load word extension. +- +-@item xtheadba +-@tab 1.0 +-@tab T-head address calculation extension. +- +-@item xtheadbb +-@tab 1.0 +-@tab T-head basic bit-manipulation extension. +- +-@item xtheadbs +-@tab 1.0 +-@tab T-head single-bit instructions extension. +- +-@item xtheadcmo +-@tab 1.0 +-@tab T-head cache management operations extension. +- +-@item xtheadcondmov +-@tab 1.0 +-@tab T-head conditional move extension. +- +-@item xtheadfmemidx +-@tab 1.0 +-@tab T-head indexed memory operations for floating-point registers extension. +- +-@item xtheadfmv +-@tab 1.0 +-@tab T-head double floating-point high-bit data transmission extension. +- +-@item xtheadint +-@tab 1.0 +-@tab T-head acceleration interruption extension. +- +-@item xtheadmac +-@tab 1.0 +-@tab T-head multiply-accumulate extension. +- +-@item xtheadmemidx +-@tab 1.0 +-@tab T-head indexed memory operation extension. +- +-@item xtheadmempair +-@tab 1.0 +-@tab T-head two-GPR memory operation extension. +- +-@item xtheadsync +-@tab 1.0 +-@tab T-head multi-core synchronization extension. +- +-@item xventanacondops +-@tab 1.0 +-@tab Ventana integer conditional operations extension. +- +-@end multitable ++@include riscv-ext.texi + + When @option{-march=} is not specified, use the setting from @option{-mcpu}. + +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +new file mode 100644 +index 00000000000..968654bc39b +--- /dev/null ++++ b/gcc/doc/riscv-ext.texi +@@ -0,0 +1,637 @@ ++@c Copyright (C) 2025 Free Software Foundation, Inc. ++@c This is part of the GCC manual. ++@c For copying conditions, see the file gcc/doc/include/fdl.texi. ++ ++@c This file is generated automatically using ++@c gcc/config/riscv/gen-riscv-ext-texi.cc from: ++@c gcc/config/riscv/riscv-ext.def ++@c gcc/config/riscv/riscv-opts.h ++ ++@c Please *DO NOT* edit manually. ++ ++@multitable @columnfractions .10 .10 .80 ++@headitem Extension Name @tab Supported Version @tab Description ++ ++@item g ++@tab - ++@tab General-purpose computing base extension, @samp{g} will expand to ++@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and ++@samp{zifencei}. ++ ++@item e ++@tab 2.0 ++@tab Reduced base integer extension ++ ++@item i ++@tab 2.0 2.1 ++@tab Base integer extension ++ ++@item m ++@tab 2.0 ++@tab Integer multiplication and division extension ++ ++@item a ++@tab 2.0 2.1 ++@tab Atomic extension ++ ++@item f ++@tab 2.0 2.2 ++@tab Single-precision floating-point extension ++ ++@item d ++@tab 2.0 2.2 ++@tab Double-precision floating-point extension ++ ++@item c ++@tab 2.0 ++@tab Compressed extension ++ ++@item b ++@tab 1.0 ++@tab b extension ++ ++@item v ++@tab 1.0 ++@tab Vector extension ++ ++@item h ++@tab 1.0 ++@tab Hypervisor extension ++ ++@item zic64b ++@tab 1.0 ++@tab Cache block size isf 64 bytes ++ ++@item zicbom ++@tab 1.0 ++@tab Cache-block management extension ++ ++@item zicbop ++@tab 1.0 ++@tab Cache-block prefetch extension ++ ++@item zicboz ++@tab 1.0 ++@tab Cache-block zero extension ++ ++@item ziccamoa ++@tab 1.0 ++@tab Main memory supports all atomics in A ++ ++@item ziccif ++@tab 1.0 ++@tab Main memory supports instruction fetch with atomicity requirement ++ ++@item zicclsm ++@tab 1.0 ++@tab Main memory supports misaligned loads/stores ++ ++@item ziccrse ++@tab 1.0 ++@tab Main memory supports forward progress on LR/SC sequences ++ ++@item zicfilp ++@tab 1.0 ++@tab zicfilp extension ++ ++@item zicfiss ++@tab 1.0 ++@tab zicfiss extension ++ ++@item zicntr ++@tab 2.0 ++@tab Standard extension for base counters and timers ++ ++@item zicond ++@tab 1.0 ++@tab Integer conditional operations extension ++ ++@item zicsr ++@tab 2.0 ++@tab Control and status register access extension ++ ++@item zifencei ++@tab 2.0 ++@tab Instruction-fetch fence extension ++ ++@item zihintntl ++@tab 1.0 ++@tab Non-temporal locality hints extension ++ ++@item zihintpause ++@tab 2.0 ++@tab Pause hint extension ++ ++@item zihpm ++@tab 2.0 ++@tab Standard extension for hardware performance counters ++ ++@item zimop ++@tab 1.0 ++@tab zimop extension ++ ++@item zilsd ++@tab 1.0 ++@tab Load/Store pair instructions extension ++ ++@item zmmul ++@tab 1.0 ++@tab Integer multiplication extension ++ ++@item za128rs ++@tab 1.0 ++@tab Reservation set size of 128 bytes ++ ++@item za64rs ++@tab 1.0 ++@tab Reservation set size of 64 bytes ++ ++@item zaamo ++@tab 1.0 ++@tab zaamo extension ++ ++@item zabha ++@tab 1.0 ++@tab zabha extension ++ ++@item zacas ++@tab 1.0 ++@tab zacas extension ++ ++@item zalrsc ++@tab 1.0 ++@tab zalrsc extension ++ ++@item zawrs ++@tab 1.0 ++@tab Wait-on-reservation-set extension ++ ++@item zama16b ++@tab 1.0 ++@tab Zama16b extension, Misaligned loads, stores, and AMOs to main memory regions that do not cross a naturally aligned 16-byte boundary are atomic. ++ ++@item zfa ++@tab 1.0 ++@tab Additional floating-point extension ++ ++@item zfbfmin ++@tab 1.0 ++@tab zfbfmin extension ++ ++@item zfh ++@tab 1.0 ++@tab Half-precision floating-point extension ++ ++@item zfhmin ++@tab 1.0 ++@tab Minimal half-precision floating-point extension ++ ++@item zfinx ++@tab 1.0 ++@tab Single-precision floating-point in integer registers extension ++ ++@item zdinx ++@tab 1.0 ++@tab Double-precision floating-point in integer registers extension ++ ++@item zca ++@tab 1.0 ++@tab Integer compressed instruction extension ++ ++@item zcb ++@tab 1.0 ++@tab Simple compressed instruction extension ++ ++@item zcd ++@tab 1.0 ++@tab Compressed double-precision floating point loads and stores extension ++ ++@item zce ++@tab 1.0 ++@tab Compressed instruction extensions for embedded processors ++ ++@item zcf ++@tab 1.0 ++@tab Compressed single-precision floating point loads and stores extension ++ ++@item zcmop ++@tab 1.0 ++@tab zcmop extension ++ ++@item zcmp ++@tab 1.0 ++@tab Compressed push pop extension ++ ++@item zcmt ++@tab 1.0 ++@tab Table jump instruction extension ++ ++@item zclsd ++@tab 1.0 ++@tab Compressed load/store pair instructions extension ++ ++@item zba ++@tab 1.0 ++@tab Address calculation extension ++ ++@item zbb ++@tab 1.0 ++@tab Basic bit manipulation extension ++ ++@item zbc ++@tab 1.0 ++@tab Carry-less multiplication extension ++ ++@item zbkb ++@tab 1.0 ++@tab Cryptography bit-manipulation extension ++ ++@item zbkc ++@tab 1.0 ++@tab Cryptography carry-less multiply extension ++ ++@item zbkx ++@tab 1.0 ++@tab Cryptography crossbar permutation extension ++ ++@item zbs ++@tab 1.0 ++@tab Single-bit operation extension ++ ++@item zk ++@tab 1.0 ++@tab Standard scalar cryptography extension ++ ++@item zkn ++@tab 1.0 ++@tab NIST algorithm suite extension ++ ++@item zknd ++@tab 1.0 ++@tab AES Decryption extension ++ ++@item zkne ++@tab 1.0 ++@tab AES Encryption extension ++ ++@item zknh ++@tab 1.0 ++@tab Hash function extension ++ ++@item zkr ++@tab 1.0 ++@tab Entropy source extension ++ ++@item zks ++@tab 1.0 ++@tab ShangMi algorithm suite extension ++ ++@item zksed ++@tab 1.0 ++@tab SM4 block cipher extension ++ ++@item zksh ++@tab 1.0 ++@tab SM3 hash function extension ++ ++@item zkt ++@tab 1.0 ++@tab Data independent execution latency extension ++ ++@item ztso ++@tab 1.0 ++@tab Total store ordering extension ++ ++@item zvbb ++@tab 1.0 ++@tab Vector basic bit-manipulation extension ++ ++@item zvbc ++@tab 1.0 ++@tab Vector carryless multiplication extension ++ ++@item zve32f ++@tab 1.0 ++@tab Vector extensions for embedded processors ++ ++@item zve32x ++@tab 1.0 ++@tab Vector extensions for embedded processors ++ ++@item zve64d ++@tab 1.0 ++@tab Vector extensions for embedded processors ++ ++@item zve64f ++@tab 1.0 ++@tab Vector extensions for embedded processors ++ ++@item zve64x ++@tab 1.0 ++@tab Vector extensions for embedded processors ++ ++@item zvfbfmin ++@tab 1.0 ++@tab Vector BF16 converts extension ++ ++@item zvfbfwma ++@tab 1.0 ++@tab zvfbfwma extension ++ ++@item zvfh ++@tab 1.0 ++@tab Vector half-precision floating-point extension ++ ++@item zvfhmin ++@tab 1.0 ++@tab Vector minimal half-precision floating-point extension ++ ++@item zvkb ++@tab 1.0 ++@tab Vector cryptography bit-manipulation extension ++ ++@item zvkg ++@tab 1.0 ++@tab Vector GCM/GMAC extension ++ ++@item zvkn ++@tab 1.0 ++@tab Vector NIST Algorithm Suite extension, @samp{zvkn} will expand to ++ ++@item zvknc ++@tab 1.0 ++@tab Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc} ++ ++@item zvkned ++@tab 1.0 ++@tab Vector AES block cipher extension ++ ++@item zvkng ++@tab 1.0 ++@tab Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand ++ ++@item zvknha ++@tab 1.0 ++@tab Vector SHA-2 secure hash extension ++ ++@item zvknhb ++@tab 1.0 ++@tab Vector SHA-2 secure hash extension ++ ++@item zvks ++@tab 1.0 ++@tab Vector ShangMi algorithm suite extension, @samp{zvks} will expand ++ ++@item zvksc ++@tab 1.0 ++@tab Vector ShangMi algorithm suite with carryless multiplication extension, ++ ++@item zvksed ++@tab 1.0 ++@tab Vector SM4 Block Cipher extension ++ ++@item zvksg ++@tab 1.0 ++@tab Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand ++ ++@item zvksh ++@tab 1.0 ++@tab Vector SM3 Secure Hash extension ++ ++@item zvkt ++@tab 1.0 ++@tab Vector data independent execution latency extension ++ ++@item zvl1024b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl128b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl16384b ++@tab 1.0 ++@tab zvl16384b extension ++ ++@item zvl2048b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl256b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl32768b ++@tab 1.0 ++@tab zvl32768b extension ++ ++@item zvl32b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl4096b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl512b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl64b ++@tab 1.0 ++@tab Minimum vector length standard extensions ++ ++@item zvl65536b ++@tab 1.0 ++@tab zvl65536b extension ++ ++@item zvl8192b ++@tab 1.0 ++@tab zvl8192b extension ++ ++@item zhinx ++@tab 1.0 ++@tab Half-precision floating-point in integer registers extension ++ ++@item zhinxmin ++@tab 1.0 ++@tab Minimal half-precision floating-point in integer registers extension ++ ++@item sdtrig ++@tab 1.0 ++@tab sdtrig extension ++ ++@item smaia ++@tab 1.0 ++@tab Advanced interrupt architecture extension ++ ++@item smepmp ++@tab 1.0 ++@tab PMP Enhancements for memory access and execution prevention on Machine mode ++ ++@item smmpm ++@tab 1.0 ++@tab smmpm extension ++ ++@item smnpm ++@tab 1.0 ++@tab smnpm extension ++ ++@item smstateen ++@tab 1.0 ++@tab State enable extension ++ ++@item ssaia ++@tab 1.0 ++@tab Advanced interrupt architecture extension for supervisor-mode ++ ++@item sscofpmf ++@tab 1.0 ++@tab Count overflow & filtering extension ++ ++@item ssnpm ++@tab 1.0 ++@tab ssnpm extension ++ ++@item sspm ++@tab 1.0 ++@tab sspm extension ++ ++@item ssstateen ++@tab 1.0 ++@tab State-enable extension for supervisor-mode ++ ++@item sstc ++@tab 1.0 ++@tab Supervisor-mode timer interrupts extension ++ ++@item ssstrict ++@tab 1.0 ++@tab ssstrict extension ++ ++@item supm ++@tab 1.0 ++@tab supm extension ++ ++@item svinval ++@tab 1.0 ++@tab Fine-grained address-translation cache invalidation extension ++ ++@item svnapot ++@tab 1.0 ++@tab NAPOT translation contiguity extension ++ ++@item svpbmt ++@tab 1.0 ++@tab Page-based memory types extension ++ ++@item svvptc ++@tab 1.0 ++@tab svvptc extension ++ ++@item svadu ++@tab 1.0 ++@tab Hardware Updating of A/D Bits extension ++ ++@item svade ++@tab 1.0 ++@tab Cause exception when hardware updating of A/D bits is disabled ++ ++@item xcvalu ++@tab 1.0 ++@tab Core-V miscellaneous ALU extension ++ ++@item xcvbi ++@tab 1.0 ++@tab xcvbi extension ++ ++@item xcvelw ++@tab 1.0 ++@tab Core-V event load word extension ++ ++@item xcvmac ++@tab 1.0 ++@tab Core-V multiply-accumulate extension ++ ++@item xcvsimd ++@tab 1.0 ++@tab xcvsimd extension ++ ++@item xsfcease ++@tab 1.0 ++@tab xsfcease extension ++ ++@item xsfvcp ++@tab 1.0 ++@tab xsfvcp extension ++ ++@item xsfvfnrclipxfqf ++@tab 1.0 ++@tab xsfvfnrclipxfqf extension ++ ++@item xsfvqmaccdod ++@tab 1.0 ++@tab xsfvqmaccdod extension ++ ++@item xsfvqmaccqoq ++@tab 1.0 ++@tab xsfvqmaccqoq extension ++ ++@item xtheadba ++@tab 1.0 ++@tab T-head address calculation extension ++ ++@item xtheadbb ++@tab 1.0 ++@tab T-head basic bit-manipulation extension ++ ++@item xtheadbs ++@tab 1.0 ++@tab T-head single-bit instructions extension ++ ++@item xtheadcmo ++@tab 1.0 ++@tab T-head cache management operations extension ++ ++@item xtheadcondmov ++@tab 1.0 ++@tab T-head conditional move extension ++ ++@item xtheadfmemidx ++@tab 1.0 ++@tab T-head indexed memory operations for floating-point registers extension ++ ++@item xtheadfmv ++@tab 1.0 ++@tab T-head double floating-point high-bit data transmission extension ++ ++@item xtheadint ++@tab 1.0 ++@tab T-head acceleration interruption extension ++ ++@item xtheadmac ++@tab 1.0 ++@tab T-head multiply-accumulate extension ++ ++@item xtheadmemidx ++@tab 1.0 ++@tab T-head indexed memory operation extension ++ ++@item xtheadmempair ++@tab 1.0 ++@tab T-head two-GPR memory operation extension ++ ++@item xtheadsync ++@tab 1.0 ++@tab T-head multi-core synchronization extension ++ ++@item xtheadvector ++@tab 1.0 ++@tab xtheadvector extension ++ ++@item xventanacondops ++@tab 1.0 ++@tab Ventana integer conditional operations extension ++ ++@end multitable +-- +2.51.0 + diff --git a/SPECS/gcc15/0014-RISC-V-Adjust-riscv_can_inline_p.patch b/SPECS/gcc15/0014-RISC-V-Adjust-riscv_can_inline_p.patch new file mode 100644 index 00000000..99233e29 --- /dev/null +++ b/SPECS/gcc15/0014-RISC-V-Adjust-riscv_can_inline_p.patch @@ -0,0 +1,82 @@ +From d717bffe747d1466f3f69267a7e5a675d4878fbc Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 18:30:34 +0800 +Subject: [PATCH 14/35] RISC-V: Adjust riscv_can_inline_p + +We don't hold any extenison flags in `target_flags`, so no need to +gather the extenison flags in `target_flags`. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_can_inline_p): Drop + extension flags check from `target_flags`. + * config/riscv/riscv-subset.h (riscv_x_target_flags_isa_mask): + Remove. + * config/riscv/riscv.cc (riscv_x_target_flags_isa_mask): Remove. +--- + gcc/common/config/riscv/riscv-common.cc | 17 ----------------- + gcc/config/riscv/riscv-subset.h | 1 - + gcc/config/riscv/riscv.cc | 8 +++----- + 3 files changed, 3 insertions(+), 23 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index d84aa9d78dd..ff34a315caf 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -2036,23 +2036,6 @@ riscv_ext_is_subset (struct cl_target_option *opts, + return true; + } + +-/* Return the mask of ISA extension in x_target_flags of gcc_options. */ +- +-int +-riscv_x_target_flags_isa_mask (void) +-{ +- int mask = 0; +- const riscv_ext_flag_table_t *arch_ext_flag_tab; +- for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; +- arch_ext_flag_tab->ext; +- ++arch_ext_flag_tab) +- { +- if (arch_ext_flag_tab->var_ref == &gcc_options::x_target_flags) +- mask |= arch_ext_flag_tab->mask; +- } +- return mask; +-} +- + /* Get the minimal feature bits in Linux hwprobe of the given ISA string. + + Used for generating Function Multi-Versioning (FMV) dispatcher for RISC-V. +diff --git a/gcc/config/riscv/riscv-subset.h b/gcc/config/riscv/riscv-subset.h +index 7b3fdaeb3e4..c5d9fab4de9 100644 +--- a/gcc/config/riscv/riscv-subset.h ++++ b/gcc/config/riscv/riscv-subset.h +@@ -129,6 +129,5 @@ extern bool riscv_minimal_hwprobe_feature_bits (const char *, + location_t); + extern bool + riscv_ext_is_subset (struct cl_target_option *, struct cl_target_option *); +-extern int riscv_x_target_flags_isa_mask (void); + + #endif /* ! GCC_RISCV_SUBSET_H */ +diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc +index bd0046ad2e8..d763edf72bd 100644 +--- a/gcc/config/riscv/riscv.cc ++++ b/gcc/config/riscv/riscv.cc +@@ -7863,11 +7863,9 @@ riscv_can_inline_p (tree caller, tree callee) + struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree); + struct cl_target_option *caller_opts = TREE_TARGET_OPTION (caller_tree); + +- int isa_flag_mask = riscv_x_target_flags_isa_mask (); +- +- /* Callee and caller should have the same target options except for ISA. */ +- int callee_target_flags = callee_opts->x_target_flags & ~isa_flag_mask; +- int caller_target_flags = caller_opts->x_target_flags & ~isa_flag_mask; ++ /* Callee and caller should have the same target options. */ ++ int callee_target_flags = callee_opts->x_target_flags; ++ int caller_target_flags = caller_opts->x_target_flags; + + if (callee_target_flags != caller_target_flags) + return false; +-- +2.51.0 + diff --git a/SPECS/gcc15/0015-RISC-V-Introduce-riscv_ext_info_t-to-hold-extension-.patch b/SPECS/gcc15/0015-RISC-V-Introduce-riscv_ext_info_t-to-hold-extension-.patch new file mode 100644 index 00000000..035ae693 --- /dev/null +++ b/SPECS/gcc15/0015-RISC-V-Introduce-riscv_ext_info_t-to-hold-extension-.patch @@ -0,0 +1,304 @@ +From b451552b9cb0936d48e8f09066046f98b9a3d5ed Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 20:59:15 +0800 +Subject: [PATCH 15/35] RISC-V: Introduce riscv_ext_info_t to hold extension + metadata + +Define a new riscv_ext_info_t struct to aggregate all ISA extension fields +(name, version, flags, implied extensions, bitmask and extra flags) generated +from riscv-ext.def. + +Also adjust riscv_ext_flag_table_t and riscv_implied_info_t to make it +able to not hold extension name, this part will refactor in later +patchs. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_ext_info_t): New + struct. + (opt_var_ref_t): Adjust order. + (cl_opt_var_ref_t): Ditto. + (riscv_ext_flag_table_t): Adjust order, and add a new construct + that not hold the extension name. + (riscv_version_t): New struct. + (riscv_implied_info_t): Adjust order, and add a new construct that not + hold the extension name. + (apply_extra_extension_flags): New function. + (riscv_ext_infos): New. + (riscv_implied_info): Adjust. + * config/riscv/riscv-opts.h (EXT_FLAG_MACRO): New macro. + (BITMASK_NOT_YET_ALLOCATED): New macro. +--- + gcc/common/config/riscv/riscv-common.cc | 191 ++++++++++++++++++++++-- + gcc/config/riscv/riscv-opts.h | 8 + + 2 files changed, 185 insertions(+), 14 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index ff34a315caf..5430da76d11 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see + + #include + #include ++#include + #include + + #define INCLUDE_STRING +@@ -41,11 +42,62 @@ along with GCC; see the file COPYING3. If not see + #define TARGET_DEFAULT_TARGET_FLAGS (MASK_BIG_ENDIAN) + #endif + ++/* Type for pointer to member of gcc_options and cl_target_option. */ ++typedef int (gcc_options::*opt_var_ref_t); ++typedef int (cl_target_option::*cl_opt_var_ref_t); ++ ++/* Types for recording extension to internal flag. */ ++struct riscv_ext_flag_table_t ++{ ++ riscv_ext_flag_table_t (const char *ext, opt_var_ref_t var_ref, ++ cl_opt_var_ref_t cl_var_ref, int mask) ++ : ext (ext), var_ref (var_ref), cl_var_ref (cl_var_ref), mask (mask) ++ {} ++ riscv_ext_flag_table_t (opt_var_ref_t var_ref, ++ cl_opt_var_ref_t cl_var_ref, int mask) ++ : ext (nullptr), var_ref (var_ref), cl_var_ref (cl_var_ref), mask (mask) ++ {} ++ ++ const char *ext; ++ opt_var_ref_t var_ref; ++ cl_opt_var_ref_t cl_var_ref; ++ int mask; ++ ++ void clean (gcc_options *opts) const { opts->*var_ref &= ~mask; } ++ ++ void set (gcc_options *opts) const { opts->*var_ref |= mask; } ++ ++ bool check (cl_target_option *opts) const ++ { ++ return (opts->*cl_var_ref & mask); ++ } ++}; ++ ++/* Type for hold RISC-V extension version. */ ++struct riscv_version_t ++{ ++ riscv_version_t (int major_version, int minor_version, ++ enum riscv_isa_spec_class isa_spec_class ++ = ISA_SPEC_CLASS_NONE) ++ : major_version (major_version), minor_version (minor_version), ++ isa_spec_class (isa_spec_class) ++ {} ++ int major_version; ++ int minor_version; ++ enum riscv_isa_spec_class isa_spec_class; ++}; ++ + typedef bool (*riscv_implied_predicator_t) (const riscv_subset_list *); + + /* Type for implied ISA info. */ + struct riscv_implied_info_t + { ++ constexpr riscv_implied_info_t (const char *implied_ext, ++ riscv_implied_predicator_t predicator ++ = nullptr) ++ : ext (nullptr), implied_ext (implied_ext), predicator (predicator) ++ {} ++ + constexpr riscv_implied_info_t (const char *ext, const char *implied_ext, + riscv_implied_predicator_t predicator + = nullptr) +@@ -53,7 +105,7 @@ struct riscv_implied_info_t + + bool match (const riscv_subset_list *subset_list, const char *ext_name) const + { +- if (strcmp (ext_name, ext) != 0) ++ if (ext_name && strcmp (ext_name, ext) != 0) + return false; + + if (predicator && !predicator (subset_list)) +@@ -73,6 +125,111 @@ struct riscv_implied_info_t + riscv_implied_predicator_t predicator; + }; + ++static void ++apply_extra_extension_flags (const char *ext, ++ std::vector &flag_table); ++ ++/* Class for hold the extension info. */ ++class riscv_ext_info_t ++{ ++public: ++ riscv_ext_info_t (const char *ext, ++ const std::vector &implied_exts, ++ const std::vector &supported_versions, ++ const std::vector &flag_table, ++ int bitmask_group_id, int bitmask_group_bit_pos, ++ unsigned extra_extension_flags) ++ : m_ext (ext), m_implied_exts (implied_exts), ++ m_supported_versions (supported_versions), m_flag_table (flag_table), ++ m_bitmask_group_id (bitmask_group_id), ++ m_bitmask_group_bit_pos (bitmask_group_bit_pos), ++ m_extra_extension_flags (extra_extension_flags) ++ { ++ apply_extra_extension_flags (ext, m_flag_table); ++ } ++ ++ /* Return true if any change. */ ++ bool apply_implied_ext (riscv_subset_list *subset_list) const; ++ ++ const std::vector implied_exts () const ++ { ++ return m_implied_exts; ++ } ++ ++ bool need_combine_p () const ++ { ++ return m_extra_extension_flags & EXT_FLAG_MACRO; ++ } ++ ++ riscv_version_t default_version () const ++ { ++ if (m_supported_versions.size () == 1) ++ { ++ return *m_supported_versions.begin (); ++ } ++ ++ for (const riscv_version_t &ver : m_supported_versions) ++ { ++ if (ver.isa_spec_class == riscv_isa_spec ++ || ver.isa_spec_class == ISA_SPEC_CLASS_NONE) ++ return ver; ++ } ++ gcc_unreachable (); ++ } ++ ++ void clean_opts (gcc_options *opts) const ++ { ++ for (auto &flag : m_flag_table) ++ flag.clean (opts); ++ } ++ ++ void set_opts (gcc_options *opts) const ++ { ++ for (auto &flag : m_flag_table) ++ flag.set (opts); ++ } ++ ++ bool check_opts (cl_target_option *opts) const ++ { ++ bool result = true; ++ for (auto &flag : m_flag_table) ++ result = result && flag.check (opts); ++ return result; ++ } ++ ++ const std::vector &supported_versions () const ++ { ++ return m_supported_versions; ++ } ++ ++private: ++ const char *m_ext; ++ std::vector m_implied_exts; ++ std::vector m_supported_versions; ++ std::vector m_flag_table; ++ int m_bitmask_group_id; ++ int m_bitmask_group_bit_pos; ++ unsigned m_extra_extension_flags; ++}; ++ ++static const std::unordered_map riscv_ext_infos ++ = { ++#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ ++ SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ ++ BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ ++ {std::string (#NAME), \ ++ riscv_ext_info_t (#NAME, std::vector DEP_EXTS, \ ++ std::vector SUPPORTED_VERSIONS, \ ++ std::vector ( \ ++ {{&gcc_options::x_riscv_##FLAG_GROUP##_subext, \ ++ &cl_target_option::x_riscv_##FLAG_GROUP##_subext, \ ++ MASK_##UPPERCAE_NAME}}), \ ++ BITMASK_GROUP_ID, BITMASK_BIT_POSITION, \ ++ EXTRA_EXTENSION_FLAGS)}, ++#include "../../../config/riscv/riscv-ext.def" ++#undef DEFINE_RISCV_EXT ++}; ++ + /* Implied ISA info, must end with NULL sentinel. */ + static const riscv_implied_info_t riscv_implied_info[] = + { +@@ -268,7 +425,7 @@ static const riscv_implied_info_t riscv_implied_info[] = + + {"xsfvcp", "zve32x"}, + +- {NULL, NULL} ++ {NULL, NULL, NULL} + }; + + /* This structure holds version information for specific ISA version. */ +@@ -1759,18 +1916,6 @@ riscv_arch_str (bool version_p) + return std::string(); + } + +-/* Type for pointer to member of gcc_options and cl_target_option. */ +-typedef int (gcc_options::*opt_var_ref_t); +-typedef int (cl_target_option::*cl_opt_var_ref_t); +- +-/* Types for recording extension to internal flag. */ +-struct riscv_ext_flag_table_t { +- const char *ext; +- opt_var_ref_t var_ref; +- cl_opt_var_ref_t cl_var_ref; +- int mask; +-}; +- + #define RISCV_EXT_FLAG_ENTRY(NAME, VAR, MASK) \ + {NAME, &gcc_options::VAR, &cl_target_option::VAR, MASK} + +@@ -1969,6 +2114,24 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + {NULL, NULL, NULL, 0} + }; + ++/* Add extra extension flags into FLAG_TABLE for EXT. */ ++static void ++apply_extra_extension_flags (const char *ext, ++ std::vector &flag_table) ++{ ++ const riscv_ext_flag_table_t *arch_ext_flag_tab; ++ for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; arch_ext_flag_tab->ext; ++ ++arch_ext_flag_tab) ++ { ++ if (strcmp (arch_ext_flag_tab->ext, ext) == 0) ++ { ++ flag_table.push_back ({arch_ext_flag_tab->var_ref, ++ arch_ext_flag_tab->cl_var_ref, ++ arch_ext_flag_tab->mask}); ++ } ++ } ++} ++ + /* Types for recording extension to RISC-V C-API bitmask. */ + struct riscv_ext_bitmask_table_t { + const char *ext; +diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h +index fc3963c96bc..0f3bca5bb7c 100644 +--- a/gcc/config/riscv/riscv-opts.h ++++ b/gcc/config/riscv/riscv-opts.h +@@ -164,4 +164,12 @@ enum riscv_tls_type { + + #define GPR2VR_COST_UNPROVIDED -1 + ++/* Extra extension flags, used for carry extra info for a RISC-V extension. */ ++enum ++{ ++ EXT_FLAG_MACRO = 1 << 0, ++}; ++ ++#define BITMASK_NOT_YET_ALLOCATED -1 ++ + #endif /* ! GCC_RISCV_OPTS_H */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0016-RISC-V-Drop-riscv_implied_info-and-riscv_combine_inf.patch b/SPECS/gcc15/0016-RISC-V-Drop-riscv_implied_info-and-riscv_combine_inf.patch new file mode 100644 index 00000000..cf689cf1 --- /dev/null +++ b/SPECS/gcc15/0016-RISC-V-Drop-riscv_implied_info-and-riscv_combine_inf.patch @@ -0,0 +1,470 @@ +From 480e42a17621e31aa451125bc0cd2a59d80e12fd Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 21:21:01 +0800 +Subject: [PATCH 16/35] RISC-V: Drop riscv_implied_info and riscv_combine_info + in favor of riscv_ext_info_t data + +Consolidate implied-extension logic by removing the old `riscv_implied_info` +array and using the `implied_exts` field in the unified riscv_ext_info_t +structures generated from `riscv-ext.def`. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc + (riscv_implied_info::riscv_implied_info_t): Remove unused + variant. + (struct riscv_implied_info_t): Remove unsued field. + (riscv_implied_info::match): Remove unused variant, and adjust + the logic. + (get_riscv_ext_info): New. + (riscv_implied_info): Remove. + (riscv_ext_info_t::apply_implied_ext): New. + (riscv_combine_info). Remove. + (riscv_subset_list::handle_implied_ext): Use riscv_ext_info_t + rather than riscv_implied_info. + (riscv_subset_list::check_implied_ext): Ditto. + (riscv_subset_list::handle_combine_ext): Use riscv_ext_info_t + rather than riscv_combine_info. + (riscv_minimal_hwprobe_feature_bits): Use riscv_ext_info_t + rather than riscv_implied_info. +--- + gcc/common/config/riscv/riscv-common.cc | 351 +++++------------------- + 1 file changed, 66 insertions(+), 285 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 5430da76d11..c6ae649802c 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -95,32 +95,17 @@ struct riscv_implied_info_t + constexpr riscv_implied_info_t (const char *implied_ext, + riscv_implied_predicator_t predicator + = nullptr) +- : ext (nullptr), implied_ext (implied_ext), predicator (predicator) ++ : implied_ext (implied_ext), predicator (predicator) + {} + +- constexpr riscv_implied_info_t (const char *ext, const char *implied_ext, +- riscv_implied_predicator_t predicator +- = nullptr) +- : ext (ext), implied_ext (implied_ext), predicator (predicator){}; +- +- bool match (const riscv_subset_list *subset_list, const char *ext_name) const ++ bool match (const riscv_subset_list *subset_list) const + { +- if (ext_name && strcmp (ext_name, ext) != 0) +- return false; +- + if (predicator && !predicator (subset_list)) + return false; + + return true; + } + +- bool match (const riscv_subset_list *subset_list, +- const riscv_subset_t *subset) const +- { +- return match (subset_list, subset->name.c_str()); +- } +- +- const char *ext; + const char *implied_ext; + riscv_implied_predicator_t predicator; + }; +@@ -230,203 +215,43 @@ static const std::unordered_map riscv_ext_infos + #undef DEFINE_RISCV_EXT + }; + +-/* Implied ISA info, must end with NULL sentinel. */ +-static const riscv_implied_info_t riscv_implied_info[] = +-{ +- {"m", "zmmul"}, +- +- {"d", "f"}, +- {"f", "zicsr"}, +- {"d", "zicsr"}, +- +- {"a", "zaamo"}, +- {"a", "zalrsc"}, +- +- {"c", "zca"}, +- {"c", "zcf", +- [] (const riscv_subset_list *subset_list) -> bool +- { +- return subset_list->xlen () == 32 && subset_list->lookup ("f"); +- }}, +- {"c", "zcd", +- [] (const riscv_subset_list *subset_list) -> bool +- { +- return subset_list->lookup ("d"); +- }}, +- +- {"zabha", "zaamo"}, +- {"zacas", "zaamo"}, +- {"zawrs", "zalrsc"}, +- +- {"zcmop", "zca"}, +- +- {"b", "zba"}, +- {"b", "zbb"}, +- {"b", "zbs"}, +- +- {"zdinx", "zfinx"}, +- {"zfinx", "zicsr"}, +- {"zdinx", "zicsr"}, +- +- {"zicfiss", "zicsr"}, +- {"zicfiss", "zimop"}, +- {"zicfilp", "zicsr"}, +- +- {"zclsd", "zilsd"}, +- {"zclsd", "zca"}, +- +- {"zk", "zkn"}, +- {"zk", "zkr"}, +- {"zk", "zkt"}, +- {"zkn", "zbkb"}, +- {"zkn", "zbkc"}, +- {"zkn", "zbkx"}, +- {"zkn", "zkne"}, +- {"zkn", "zknd"}, +- {"zkn", "zknh"}, +- {"zks", "zbkb"}, +- {"zks", "zbkc"}, +- {"zks", "zbkx"}, +- {"zks", "zksed"}, +- {"zks", "zksh"}, +- +- {"v", "zvl128b"}, +- {"v", "zve64d"}, +- +- {"zve32f", "f"}, +- {"zve64f", "f"}, +- {"zve64d", "d"}, +- +- {"zve32x", "zicsr"}, +- {"zve32x", "zvl32b"}, +- {"zve32f", "zve32x"}, +- {"zve32f", "zvl32b"}, +- +- {"zve64x", "zve32x"}, +- {"zve64x", "zvl64b"}, +- {"zve64f", "zve32f"}, +- {"zve64f", "zve64x"}, +- {"zve64f", "zvl64b"}, +- {"zve64d", "zve64f"}, +- {"zve64d", "zvl64b"}, +- +- {"zvl64b", "zvl32b"}, +- {"zvl128b", "zvl64b"}, +- {"zvl256b", "zvl128b"}, +- {"zvl512b", "zvl256b"}, +- {"zvl1024b", "zvl512b"}, +- {"zvl2048b", "zvl1024b"}, +- {"zvl4096b", "zvl2048b"}, +- {"zvl8192b", "zvl4096b"}, +- {"zvl16384b", "zvl8192b"}, +- {"zvl32768b", "zvl16384b"}, +- {"zvl65536b", "zvl32768b"}, +- +- {"zvkn", "zvkned"}, +- {"zvkn", "zvknhb"}, +- {"zvkn", "zvkb"}, +- {"zvkn", "zvkt"}, +- {"zvknc", "zvkn"}, +- {"zvknc", "zvbc"}, +- {"zvkng", "zvkn"}, +- {"zvkng", "zvkg"}, +- {"zvks", "zvksed"}, +- {"zvks", "zvksh"}, +- {"zvks", "zvkb"}, +- {"zvks", "zvkt"}, +- {"zvksc", "zvks"}, +- {"zvksc", "zvbc"}, +- {"zvksg", "zvks"}, +- {"zvksg", "zvkg"}, +- {"zvbb", "zvkb"}, +- {"zvbc", "zve64x"}, +- {"zvkb", "zve32x"}, +- {"zvkg", "zve32x"}, +- {"zvkned", "zve32x"}, +- {"zvknha", "zve32x"}, +- {"zvknhb", "zve64x"}, +- {"zvksed", "zve32x"}, +- {"zvksh", "zve32x"}, +- +- {"zfbfmin", "zfhmin"}, +- {"zfh", "zfhmin"}, +- {"zfhmin", "f"}, +- +- {"zfa", "f"}, +- +- {"zvfbfmin", "zve32f"}, +- {"zvfbfwma", "zvfbfmin"}, +- {"zvfbfwma", "zfbfmin"}, +- {"zvfhmin", "zve32f"}, +- {"zvfh", "zve32f"}, +- {"zvfh", "zfhmin"}, +- +- {"zhinx", "zhinxmin"}, +- {"zhinxmin", "zfinx"}, +- +- {"zce", "zca"}, +- {"zce", "zcb"}, +- {"zce", "zcmp"}, +- {"zce", "zcmt"}, +- {"zcf", "zca"}, +- {"zcd", "zca"}, +- {"zcb", "zca"}, +- {"zcmp", "zca"}, +- {"zcmt", "zca"}, +- {"zcmt", "zicsr"}, +- {"zce", "zcf", +- [] (const riscv_subset_list *subset_list) -> bool +- { +- return subset_list->xlen () == 32 && subset_list->lookup ("f"); +- }}, +- {"zca", "c", +- [] (const riscv_subset_list *subset_list) -> bool +- { +- /* For RV32 Zca implies C for one of these combinations of +- extensions: Zca, F_Zca_Zcf and FD_Zca_Zcf_Zcd. */ +- if (subset_list->xlen () == 32) +- { +- if (subset_list->lookup ("d")) +- return subset_list->lookup ("zcf") && subset_list->lookup ("zcd"); +- +- if (subset_list->lookup ("f")) +- return subset_list->lookup ("zcf"); +- +- return true; +- } +- +- /* For RV64 Zca implies C for one of these combinations of +- extensions: Zca and FD_Zca_Zcd (Zcf is not available +- for RV64). */ +- if (subset_list->xlen () == 64) +- { +- if (subset_list->lookup ("d")) +- return subset_list->lookup ("zcd"); +- +- return true; +- } +- +- /* Do nothing for future RV128 specification. Behaviour +- for this case is not yet well defined. */ +- return false; +- }}, +- +- {"smaia", "ssaia"}, +- {"smstateen", "ssstateen"}, +- {"smepmp", "zicsr"}, +- {"ssaia", "zicsr"}, +- {"sscofpmf", "zicsr"}, +- {"ssstateen", "zicsr"}, +- {"sstc", "zicsr"}, +- +- {"ssnpm", "zicsr"}, +- {"smnpm", "zicsr"}, +- {"smmpm", "zicsr"}, +- +- {"xsfvcp", "zve32x"}, +- +- {NULL, NULL, NULL} +-}; ++static const riscv_ext_info_t & ++get_riscv_ext_info (const std::string &ext) ++{ ++ auto itr = riscv_ext_infos.find (ext); ++ if (itr == riscv_ext_infos.end ()) ++ { ++ gcc_unreachable (); ++ } ++ return itr->second; ++} ++ ++/* Return true if any change. */ ++bool ++riscv_ext_info_t::apply_implied_ext (riscv_subset_list *subset_list) const ++{ ++ bool any_change = false; ++ for (const riscv_implied_info_t &implied_info : m_implied_exts) ++ { ++ /* Skip if implied extension already present. */ ++ if (subset_list->lookup (implied_info.implied_ext)) ++ continue; ++ ++ any_change = true; ++ if (!implied_info.match (subset_list)) ++ continue; ++ ++ /* Version of implied extension will get from current ISA spec ++ version. */ ++ subset_list->add (implied_info.implied_ext, true); ++ ++ /* Recursively add implied extension by implied_info->implied_ext. */ ++ const riscv_ext_info_t &implied_ext_info ++ = get_riscv_ext_info (implied_info.implied_ext); ++ implied_ext_info.apply_implied_ext (subset_list); ++ } ++ return any_change; ++} + + /* This structure holds version information for specific ISA version. */ + +@@ -663,24 +488,6 @@ static const struct riscv_ext_version riscv_ext_version_table[] = + {NULL, ISA_SPEC_CLASS_NONE, 0, 0} + }; + +-/* Combine extensions defined in this table */ +-static const struct riscv_ext_version riscv_combine_info[] = +-{ +- {"a", ISA_SPEC_CLASS_20191213, 2, 1}, +- {"b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zks", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkn", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvknc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkng", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvks", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvksc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvksg", ISA_SPEC_CLASS_NONE, 1, 0}, +- /* Terminate the list. */ +- {NULL, ISA_SPEC_CLASS_NONE, 0, 0} +-}; +- + /* This table records the mapping form RISC-V Profiles into march string. */ + static const riscv_profiles riscv_profiles_table[] = + { +@@ -1510,25 +1317,8 @@ riscv_subset_list::parse_single_std_ext (const char *p, bool exact_single_p) + void + riscv_subset_list::handle_implied_ext (const char *ext) + { +- const riscv_implied_info_t *implied_info; +- for (implied_info = &riscv_implied_info[0]; +- implied_info->ext; +- ++implied_info) +- { +- if (!implied_info->match (this, ext)) +- continue; +- +- /* Skip if implied extension already present. */ +- if (lookup (implied_info->implied_ext)) +- continue; +- +- /* Version of implied extension will get from current ISA spec +- version. */ +- add (implied_info->implied_ext, true); +- +- /* Recursively add implied extension by implied_info->implied_ext. */ +- handle_implied_ext (implied_info->implied_ext); +- } ++ const riscv_ext_info_t &ext_info = get_riscv_ext_info (ext); ++ ext_info.apply_implied_ext (this); + + /* For RISC-V ISA version 2.2 or earlier version, zicsr and zifence is + included in the base ISA. */ +@@ -1549,14 +1339,13 @@ riscv_subset_list::check_implied_ext () + riscv_subset_t *itr; + for (itr = m_head; itr != NULL; itr = itr->next) + { +- const riscv_implied_info_t *implied_info; +- for (implied_info = &riscv_implied_info[0]; implied_info->ext; +- ++implied_info) ++ auto &ext = *itr; ++ auto &ext_info = get_riscv_ext_info (ext.name); ++ for (auto &implied_ext : ext_info.implied_exts ()) + { +- if (!implied_info->match (this, itr)) ++ if (!implied_ext.match (this)) + continue; +- +- if (!lookup (implied_info->implied_ext)) ++ if (lookup (implied_ext.implied_ext) == NULL) + return false; + } + } +@@ -1567,27 +1356,23 @@ riscv_subset_list::check_implied_ext () + void + riscv_subset_list::handle_combine_ext () + { +- const riscv_ext_version *combine_info; +- const riscv_implied_info_t *implied_info; +- bool is_combined = false; +- +- for (combine_info = &riscv_combine_info[0]; combine_info->name; +- ++combine_info) ++ for (const auto &[ext_name, ext_info] : riscv_ext_infos) + { +- /* Skip if combine extensions are present */ +- if (lookup (combine_info->name)) ++ bool is_combined = true; ++ /* Skip if this extension don't need to combine. */ ++ if (!ext_info.need_combine_p ()) ++ continue; ++ /* Skip if combine extensions are present. */ ++ if (lookup (ext_name.c_str ())) + continue; + +- /* Find all extensions of the combine extension */ +- for (implied_info = &riscv_implied_info[0]; implied_info->ext; +- ++implied_info) ++ /* Check all implied extensions is present. */ ++ for (const auto &implied_ext : ext_info.implied_exts ()) + { +- if (!implied_info->match (this, combine_info->name)) ++ if (!implied_ext.match (this)) + continue; + +- if (lookup (implied_info->implied_ext)) +- is_combined = true; +- else ++ if (!lookup (implied_ext.implied_ext)) + { + is_combined = false; + break; +@@ -1597,11 +1382,9 @@ riscv_subset_list::handle_combine_ext () + /* Add combine extensions */ + if (is_combined) + { +- if (lookup (combine_info->name) == NULL) +- { +- add (combine_info->name, combine_info->major_version, +- combine_info->minor_version, false, true); +- } ++ riscv_version_t ver = ext_info.default_version(); ++ add (ext_name.c_str (), ver.major_version, ++ ver.minor_version, false, true); + } + } + } +@@ -2253,20 +2036,18 @@ riscv_minimal_hwprobe_feature_bits (const char *isa, + search_q.pop (); + + /* Iterate through the implied extension table. */ +- const riscv_implied_info_t *implied_info; +- for (implied_info = &riscv_implied_info[0]; +- implied_info->ext; +- ++implied_info) ++ auto &ext_info = get_riscv_ext_info (search_ext); ++ for (const auto &implied_ext : ext_info.implied_exts ()) + { + /* When the search extension matches the implied extension and + the implied extension has not been visited, mark the implied + extension in the implied_exts set and push it into the + queue. */ +- if (implied_info->match (subset_list, search_ext) +- && implied_exts.count (implied_info->implied_ext) == 0) ++ if (implied_ext.match (subset_list) ++ && implied_exts.count (implied_ext.implied_ext) == 0) + { +- implied_exts.insert (implied_info->implied_ext); +- search_q.push (implied_info->implied_ext); ++ implied_exts.insert (implied_ext.implied_ext); ++ search_q.push (implied_ext.implied_ext); + } + } + } +-- +2.51.0 + diff --git a/SPECS/gcc15/0017-RISC-V-Drop-riscv_ext_version_table-in-favor-of-risc.patch b/SPECS/gcc15/0017-RISC-V-Drop-riscv_ext_version_table-in-favor-of-risc.patch new file mode 100644 index 00000000..e5cf6006 --- /dev/null +++ b/SPECS/gcc15/0017-RISC-V-Drop-riscv_ext_version_table-in-favor-of-risc.patch @@ -0,0 +1,330 @@ +From df273e25a444bf7cd45075ff0119241b7520e800 Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Thu, 8 May 2025 16:23:29 +0800 +Subject: [PATCH 17/35] RISC-V: Drop riscv_ext_version_table in favor of + riscv_ext_info_t data + +This commit drops the riscv_ext_version_table and instead uses the +riscv_ext_info_t data structure to provide the version information +for RISC-V extensions. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_ext_version_table): + Remove. + (standard_extensions_p): Use riscv_ext_info_t. + (get_default_version): Use riscv_ext_info_t. + (riscv_arch_help): Ditto. +--- + gcc/common/config/riscv/riscv-common.cc | 272 ++---------------------- + 1 file changed, 22 insertions(+), 250 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index c6ae649802c..d50aff4ae34 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -269,225 +269,6 @@ struct riscv_profiles + const char *profile_string; + }; + +-/* All standard extensions defined in all supported ISA spec. */ +-static const struct riscv_ext_version riscv_ext_version_table[] = +-{ +- /* name, ISA spec, major version, minor_version. */ +- {"e", ISA_SPEC_CLASS_20191213, 2, 0}, +- {"e", ISA_SPEC_CLASS_20190608, 2, 0}, +- {"e", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"i", ISA_SPEC_CLASS_20191213, 2, 1}, +- {"i", ISA_SPEC_CLASS_20190608, 2, 1}, +- {"i", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"m", ISA_SPEC_CLASS_20191213, 2, 0}, +- {"m", ISA_SPEC_CLASS_20190608, 2, 0}, +- {"m", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"a", ISA_SPEC_CLASS_20191213, 2, 1}, +- {"a", ISA_SPEC_CLASS_20190608, 2, 0}, +- {"a", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"f", ISA_SPEC_CLASS_20191213, 2, 2}, +- {"f", ISA_SPEC_CLASS_20190608, 2, 2}, +- {"f", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"d", ISA_SPEC_CLASS_20191213, 2, 2}, +- {"d", ISA_SPEC_CLASS_20190608, 2, 2}, +- {"d", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"c", ISA_SPEC_CLASS_20191213, 2, 0}, +- {"c", ISA_SPEC_CLASS_20190608, 2, 0}, +- {"c", ISA_SPEC_CLASS_2P2, 2, 0}, +- +- {"b", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"h", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"v", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zicsr", ISA_SPEC_CLASS_20191213, 2, 0}, +- {"zicsr", ISA_SPEC_CLASS_20190608, 2, 0}, +- +- {"zifencei", ISA_SPEC_CLASS_20191213, 2, 0}, +- {"zifencei", ISA_SPEC_CLASS_20190608, 2, 0}, +- +- {"zicond", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"za64rs", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"za128rs", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zawrs", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zaamo", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zalrsc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zabha", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zacas", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zama16b", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zba", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zbb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zbc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zbs", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zfinx", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zdinx", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zhinx", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zhinxmin", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zbkb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zbkc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zbkx", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zkne", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zknd", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zknh", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zkr", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zksed", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zksh", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zkt", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zihintntl", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zihintpause", ISA_SPEC_CLASS_NONE, 2, 0}, +- +- {"zicboz",ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zicbom",ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zicbop",ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zic64b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"ziccamoa", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"ziccif", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zicclsm", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"ziccrse", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zicfiss", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zicfilp", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zimop", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zcmop", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zicntr", ISA_SPEC_CLASS_NONE, 2, 0}, +- {"zihpm", ISA_SPEC_CLASS_NONE, 2, 0}, +- +- {"zilsd", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zclsd", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zks", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"ztso", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zve32x", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zve32f", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zve64x", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zve64f", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zve64d", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zvbb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvbc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkg", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkned", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvknha", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvknhb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvksed", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvksh", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkn", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvknc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkng", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvks", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvksc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvksg", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvkt", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zvl32b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl64b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl128b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl256b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl512b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl1024b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl2048b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl4096b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl8192b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl16384b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl32768b", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvl65536b", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zfbfmin", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zfh", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zfhmin", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvfbfmin", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvfbfwma", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvfhmin", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zvfh", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zfa", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zmmul", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"zca", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zcb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zce", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zcf", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zcd", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zcmp", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"zcmt", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"sdtrig", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"smaia", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"smepmp", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"smstateen", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"ssaia", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"sscofpmf", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"ssstateen", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"sstc", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"ssstrict", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"ssnpm", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"smnpm", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"smmpm", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"sspm", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"supm", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"svade", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"svadu", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"svinval", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"svnapot", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"svpbmt", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"svvptc", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"xcvmac", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xcvalu", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xcvelw", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xcvsimd", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xcvbi", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"xtheadba", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadbb", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadbs", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadcmo", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadcondmov", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadfmemidx", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadfmv", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadint", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadmac", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadmemidx", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadmempair", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadsync", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xtheadvector", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"xventanacondops", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- {"xsfvcp", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xsfcease", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xsfvqmaccqoq", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xsfvqmaccdod", ISA_SPEC_CLASS_NONE, 1, 0}, +- {"xsfvfnrclipxfqf", ISA_SPEC_CLASS_NONE, 1, 0}, +- +- /* Terminate the list. */ +- {NULL, ISA_SPEC_CLASS_NONE, 0, 0} +-}; +- + /* This table records the mapping form RISC-V Profiles into march string. */ + static const riscv_profiles riscv_profiles_table[] = + { +@@ -762,11 +543,8 @@ subset_cmp (const std::string &a, const std::string &b) + static bool + standard_extensions_p (const char *ext) + { +- const riscv_ext_version *ext_ver; +- for (ext_ver = &riscv_ext_version_table[0]; ext_ver->name != NULL; ++ext_ver) +- if (strcmp (ext, ext_ver->name) == 0) +- return true; +- return false; ++ auto itr = riscv_ext_infos.find (ext); ++ return itr != riscv_ext_infos.end (); + } + + /* Add new subset to list. */ +@@ -896,24 +674,19 @@ get_default_version (const char *ext, + unsigned int *major_version, + unsigned int *minor_version) + { +- const riscv_ext_version *ext_ver; +- for (ext_ver = &riscv_ext_version_table[0]; +- ext_ver->name != NULL; +- ++ext_ver) +- if (strcmp (ext, ext_ver->name) == 0) +- { +- if ((ext_ver->isa_spec_class == riscv_isa_spec) || +- (ext_ver->isa_spec_class == ISA_SPEC_CLASS_NONE)) +- { +- *major_version = ext_ver->major_version; +- *minor_version = ext_ver->minor_version; +- return; +- } +- } ++ auto itr = riscv_ext_infos.find (ext); ++ if (itr == riscv_ext_infos.end ()) ++ { ++ /* Not found version info. */ ++ *major_version = 0; ++ *minor_version = 0; ++ return; ++ } + +- /* Not found version info. */ +- *major_version = 0; +- *minor_version = 0; ++ riscv_version_t ver = itr->second.default_version (); ++ /* Get the version info from riscv_ext_infos. */ ++ *major_version = ver.major_version; ++ *minor_version = ver.minor_version; + } + + /* Add new subset to list, but using default version from ISA spec version. */ +@@ -2601,16 +2374,15 @@ riscv_arch_help (int, const char **) + } + }; + std::map, extension_comparator> all_exts; +- for (const riscv_ext_version &ext : riscv_ext_version_table) ++ for (const auto &[ext_name, ext_info] : riscv_ext_infos) + { +- if (!ext.name) +- break; +- if (ext.name[0] == 'g') +- continue; +- unsigned version_value = (ext.major_version * RISCV_MAJOR_VERSION_BASE) +- + (ext.minor_version +- * RISCV_MINOR_VERSION_BASE); +- all_exts[ext.name].insert(version_value); ++ for (auto &supported_version : ext_info.supported_versions ()) ++ { ++ unsigned version_value ++ = (supported_version.major_version * RISCV_MAJOR_VERSION_BASE) ++ + (supported_version.minor_version * RISCV_MINOR_VERSION_BASE); ++ all_exts[ext_name].insert (version_value); ++ } + } + + printf("All available -march extensions for RISC-V:\n"); +-- +2.51.0 + diff --git a/SPECS/gcc15/0018-RISC-V-Drop-riscv_ext_flag_table-in-favor-of-riscv_e.patch b/SPECS/gcc15/0018-RISC-V-Drop-riscv_ext_flag_table-in-favor-of-riscv_e.patch new file mode 100644 index 00000000..f0c3d360 --- /dev/null +++ b/SPECS/gcc15/0018-RISC-V-Drop-riscv_ext_flag_table-in-favor-of-riscv_e.patch @@ -0,0 +1,316 @@ +From e5d162642bba6783621fd185158ce41b8f78e081 Mon Sep 17 00:00:00 2001 +From: Kito Cheng +Date: Wed, 7 May 2025 21:27:20 +0800 +Subject: [PATCH 18/35] RISC-V: Drop riscv_ext_flag_table in favor of + riscv_ext_info_t data + +Refactor extension flag handling by removing the old riscv_ext_flag_table and +sourcing all flag definitions directly from the flags field of the unified +riscv_ext_info_t structures generated from riscv-ext.def. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_extra_ext_flag_table_t): + New. + (riscv_ext_flag_table): Rename to ... + (riscv_extra_ext_flag_table): this, and drop most of definitions + that can obtained from the flags field of the riscv_ext_info_t + structures. + (apply_extra_extension_flags): Use riscv_ext_info_t. + (riscv_ext_is_subset): Ditto. +--- + gcc/common/config/riscv/riscv-common.cc | 221 +++--------------------- + 1 file changed, 27 insertions(+), 194 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index d50aff4ae34..3d3ca110699 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -47,21 +47,20 @@ typedef int (gcc_options::*opt_var_ref_t); + typedef int (cl_target_option::*cl_opt_var_ref_t); + + /* Types for recording extension to internal flag. */ +-struct riscv_ext_flag_table_t ++struct riscv_extra_ext_flag_table_t + { +- riscv_ext_flag_table_t (const char *ext, opt_var_ref_t var_ref, +- cl_opt_var_ref_t cl_var_ref, int mask) +- : ext (ext), var_ref (var_ref), cl_var_ref (cl_var_ref), mask (mask) +- {} +- riscv_ext_flag_table_t (opt_var_ref_t var_ref, +- cl_opt_var_ref_t cl_var_ref, int mask) +- : ext (nullptr), var_ref (var_ref), cl_var_ref (cl_var_ref), mask (mask) +- {} +- + const char *ext; + opt_var_ref_t var_ref; + cl_opt_var_ref_t cl_var_ref; + int mask; ++}; ++ ++/* Types for recording extension to internal flag. */ ++struct riscv_ext_flag_table_t ++{ ++ opt_var_ref_t var_ref; ++ cl_opt_var_ref_t cl_var_ref; ++ int mask; + + void clean (gcc_options *opts) const { opts->*var_ref &= ~mask; } + +@@ -1475,76 +1474,12 @@ riscv_arch_str (bool version_p) + #define RISCV_EXT_FLAG_ENTRY(NAME, VAR, MASK) \ + {NAME, &gcc_options::VAR, &cl_target_option::VAR, MASK} + +-/* Mapping table between extension to internal flag. */ +-static const riscv_ext_flag_table_t riscv_ext_flag_table[] = ++/* Mapping table between extension to internal flag, ++ this table is not needed to add manually unless there is speical rule. */ ++static const riscv_extra_ext_flag_table_t riscv_extra_ext_flag_table[] = + { +- RISCV_EXT_FLAG_ENTRY ("e", x_riscv_base_subext, MASK_RVE), +- RISCV_EXT_FLAG_ENTRY ("m", x_riscv_base_subext, MASK_MUL), +- RISCV_EXT_FLAG_ENTRY ("a", x_riscv_base_subext, MASK_ATOMIC), +- RISCV_EXT_FLAG_ENTRY ("f", x_riscv_base_subext, MASK_HARD_FLOAT), +- RISCV_EXT_FLAG_ENTRY ("d", x_riscv_base_subext, MASK_DOUBLE_FLOAT), +- RISCV_EXT_FLAG_ENTRY ("c", x_riscv_base_subext, MASK_RVC), +- RISCV_EXT_FLAG_ENTRY ("v", x_riscv_isa_flags, MASK_FULL_V), +- RISCV_EXT_FLAG_ENTRY ("v", x_riscv_isa_flags, MASK_VECTOR), +- +- RISCV_EXT_FLAG_ENTRY ("zicsr", x_riscv_zi_subext, MASK_ZICSR), +- RISCV_EXT_FLAG_ENTRY ("zifencei", x_riscv_zi_subext, MASK_ZIFENCEI), +- RISCV_EXT_FLAG_ENTRY ("zicond", x_riscv_zi_subext, MASK_ZICOND), +- +- RISCV_EXT_FLAG_ENTRY ("za64rs", x_riscv_za_subext, MASK_ZA64RS), +- RISCV_EXT_FLAG_ENTRY ("za128rs", x_riscv_za_subext, MASK_ZA128RS), +- RISCV_EXT_FLAG_ENTRY ("zawrs", x_riscv_za_subext, MASK_ZAWRS), +- RISCV_EXT_FLAG_ENTRY ("zaamo", x_riscv_za_subext, MASK_ZAAMO), +- RISCV_EXT_FLAG_ENTRY ("zalrsc", x_riscv_za_subext, MASK_ZALRSC), +- RISCV_EXT_FLAG_ENTRY ("zabha", x_riscv_za_subext, MASK_ZABHA), +- RISCV_EXT_FLAG_ENTRY ("zacas", x_riscv_za_subext, MASK_ZACAS), +- RISCV_EXT_FLAG_ENTRY ("zama16b", x_riscv_za_subext, MASK_ZAMA16B), +- +- RISCV_EXT_FLAG_ENTRY ("zba", x_riscv_zb_subext, MASK_ZBA), +- RISCV_EXT_FLAG_ENTRY ("zbb", x_riscv_zb_subext, MASK_ZBB), +- RISCV_EXT_FLAG_ENTRY ("zbc", x_riscv_zb_subext, MASK_ZBC), +- RISCV_EXT_FLAG_ENTRY ("zbs", x_riscv_zb_subext, MASK_ZBS), +- +- RISCV_EXT_FLAG_ENTRY ("zfinx", x_riscv_zinx_subext, MASK_ZFINX), +- RISCV_EXT_FLAG_ENTRY ("zdinx", x_riscv_zinx_subext, MASK_ZDINX), +- RISCV_EXT_FLAG_ENTRY ("zhinx", x_riscv_zinx_subext, MASK_ZHINX), +- RISCV_EXT_FLAG_ENTRY ("zhinxmin", x_riscv_zinx_subext, MASK_ZHINXMIN), +- +- RISCV_EXT_FLAG_ENTRY ("zbkb", x_riscv_zk_subext, MASK_ZBKB), +- RISCV_EXT_FLAG_ENTRY ("zbkc", x_riscv_zk_subext, MASK_ZBKC), +- RISCV_EXT_FLAG_ENTRY ("zbkx", x_riscv_zk_subext, MASK_ZBKX), +- RISCV_EXT_FLAG_ENTRY ("zknd", x_riscv_zk_subext, MASK_ZKND), +- RISCV_EXT_FLAG_ENTRY ("zkne", x_riscv_zk_subext, MASK_ZKNE), +- RISCV_EXT_FLAG_ENTRY ("zknh", x_riscv_zk_subext, MASK_ZKNH), +- RISCV_EXT_FLAG_ENTRY ("zkr", x_riscv_zk_subext, MASK_ZKR), +- RISCV_EXT_FLAG_ENTRY ("zksed", x_riscv_zk_subext, MASK_ZKSED), +- RISCV_EXT_FLAG_ENTRY ("zksh", x_riscv_zk_subext, MASK_ZKSH), +- RISCV_EXT_FLAG_ENTRY ("zkt", x_riscv_zk_subext, MASK_ZKT), +- +- RISCV_EXT_FLAG_ENTRY ("zihintntl", x_riscv_zi_subext, MASK_ZIHINTNTL), +- RISCV_EXT_FLAG_ENTRY ("zihintpause", x_riscv_zi_subext, MASK_ZIHINTPAUSE), +- RISCV_EXT_FLAG_ENTRY ("ziccamoa", x_riscv_zi_subext, MASK_ZICCAMOA), +- RISCV_EXT_FLAG_ENTRY ("ziccif", x_riscv_zi_subext, MASK_ZICCIF), +- RISCV_EXT_FLAG_ENTRY ("zicclsm", x_riscv_zi_subext, MASK_ZICCLSM), +- RISCV_EXT_FLAG_ENTRY ("ziccrse", x_riscv_zi_subext, MASK_ZICCRSE), +- RISCV_EXT_FLAG_ENTRY ("zilsd", x_riscv_zi_subext, MASK_ZILSD), +- +- RISCV_EXT_FLAG_ENTRY ("zicboz", x_riscv_zi_subext, MASK_ZICBOZ), +- RISCV_EXT_FLAG_ENTRY ("zicbom", x_riscv_zi_subext, MASK_ZICBOM), +- RISCV_EXT_FLAG_ENTRY ("zicbop", x_riscv_zi_subext, MASK_ZICBOP), +- RISCV_EXT_FLAG_ENTRY ("zic64b", x_riscv_zi_subext, MASK_ZIC64B), +- +- RISCV_EXT_FLAG_ENTRY ("zicfiss", x_riscv_zi_subext, MASK_ZICFISS), +- RISCV_EXT_FLAG_ENTRY ("zicfilp", x_riscv_zi_subext, MASK_ZICFILP), +- +- RISCV_EXT_FLAG_ENTRY ("zimop", x_riscv_zi_subext, MASK_ZIMOP), +- RISCV_EXT_FLAG_ENTRY ("zcmop", x_riscv_zc_subext, MASK_ZCMOP), +- + RISCV_EXT_FLAG_ENTRY ("zve32x", x_riscv_isa_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve32f", x_riscv_isa_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve64x", x_riscv_isa_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve64f", x_riscv_isa_flags, MASK_VECTOR), +- RISCV_EXT_FLAG_ENTRY ("zve64d", x_riscv_isa_flags, MASK_VECTOR), ++ RISCV_EXT_FLAG_ENTRY ("v", x_riscv_isa_flags, MASK_FULL_V), + + /* We don't need to put complete ELEN/ELEN_FP info here, due to the + implication relation of vector extension. +@@ -1561,91 +1496,6 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("zvfhmin", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_16), + RISCV_EXT_FLAG_ENTRY ("zvfh", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_16), + +- RISCV_EXT_FLAG_ENTRY ("zvbb", x_riscv_zvb_subext, MASK_ZVBB), +- RISCV_EXT_FLAG_ENTRY ("zvbc", x_riscv_zvb_subext, MASK_ZVBC), +- RISCV_EXT_FLAG_ENTRY ("zvkb", x_riscv_zvb_subext, MASK_ZVKB), +- RISCV_EXT_FLAG_ENTRY ("zvkg", x_riscv_zvk_subext, MASK_ZVKG), +- RISCV_EXT_FLAG_ENTRY ("zvkned", x_riscv_zvk_subext, MASK_ZVKNED), +- RISCV_EXT_FLAG_ENTRY ("zvknha", x_riscv_zvk_subext, MASK_ZVKNHA), +- RISCV_EXT_FLAG_ENTRY ("zvknhb", x_riscv_zvk_subext, MASK_ZVKNHB), +- RISCV_EXT_FLAG_ENTRY ("zvksed", x_riscv_zvk_subext, MASK_ZVKSED), +- RISCV_EXT_FLAG_ENTRY ("zvksh", x_riscv_zvk_subext, MASK_ZVKSH), +- RISCV_EXT_FLAG_ENTRY ("zvkn", x_riscv_zvk_subext, MASK_ZVKN), +- RISCV_EXT_FLAG_ENTRY ("zvknc", x_riscv_zvk_subext, MASK_ZVKNC), +- RISCV_EXT_FLAG_ENTRY ("zvkng", x_riscv_zvk_subext, MASK_ZVKNG), +- RISCV_EXT_FLAG_ENTRY ("zvks", x_riscv_zvk_subext, MASK_ZVKS), +- RISCV_EXT_FLAG_ENTRY ("zvksc", x_riscv_zvk_subext, MASK_ZVKSC), +- RISCV_EXT_FLAG_ENTRY ("zvksg", x_riscv_zvk_subext, MASK_ZVKSG), +- RISCV_EXT_FLAG_ENTRY ("zvkt", x_riscv_zvk_subext, MASK_ZVKT), +- +- RISCV_EXT_FLAG_ENTRY ("zvl32b", x_riscv_zvl_subext, MASK_ZVL32B), +- RISCV_EXT_FLAG_ENTRY ("zvl64b", x_riscv_zvl_subext, MASK_ZVL64B), +- RISCV_EXT_FLAG_ENTRY ("zvl128b", x_riscv_zvl_subext, MASK_ZVL128B), +- RISCV_EXT_FLAG_ENTRY ("zvl256b", x_riscv_zvl_subext, MASK_ZVL256B), +- RISCV_EXT_FLAG_ENTRY ("zvl512b", x_riscv_zvl_subext, MASK_ZVL512B), +- RISCV_EXT_FLAG_ENTRY ("zvl1024b", x_riscv_zvl_subext, MASK_ZVL1024B), +- RISCV_EXT_FLAG_ENTRY ("zvl2048b", x_riscv_zvl_subext, MASK_ZVL2048B), +- RISCV_EXT_FLAG_ENTRY ("zvl4096b", x_riscv_zvl_subext, MASK_ZVL4096B), +- RISCV_EXT_FLAG_ENTRY ("zvl8192b", x_riscv_zvl_subext, MASK_ZVL8192B), +- RISCV_EXT_FLAG_ENTRY ("zvl16384b", x_riscv_zvl_subext, MASK_ZVL16384B), +- RISCV_EXT_FLAG_ENTRY ("zvl32768b", x_riscv_zvl_subext, MASK_ZVL32768B), +- RISCV_EXT_FLAG_ENTRY ("zvl65536b", x_riscv_zvl_subext, MASK_ZVL65536B), +- +- RISCV_EXT_FLAG_ENTRY ("zfbfmin", x_riscv_zf_subext, MASK_ZFBFMIN), +- RISCV_EXT_FLAG_ENTRY ("zfhmin", x_riscv_zf_subext, MASK_ZFHMIN), +- RISCV_EXT_FLAG_ENTRY ("zfh", x_riscv_zf_subext, MASK_ZFH), +- RISCV_EXT_FLAG_ENTRY ("zvfbfmin", x_riscv_zvf_subext, MASK_ZVFBFMIN), +- RISCV_EXT_FLAG_ENTRY ("zvfbfwma", x_riscv_zvf_subext, MASK_ZVFBFWMA), +- RISCV_EXT_FLAG_ENTRY ("zvfhmin", x_riscv_zvf_subext, MASK_ZVFHMIN), +- RISCV_EXT_FLAG_ENTRY ("zvfh", x_riscv_zvf_subext, MASK_ZVFH), +- +- RISCV_EXT_FLAG_ENTRY ("zfa", x_riscv_zf_subext, MASK_ZFA), +- +- RISCV_EXT_FLAG_ENTRY ("zmmul", x_riscv_zm_subext, MASK_ZMMUL), +- +- /* Code-size reduction extensions. */ +- RISCV_EXT_FLAG_ENTRY ("zca", x_riscv_zc_subext, MASK_ZCA), +- RISCV_EXT_FLAG_ENTRY ("zcb", x_riscv_zc_subext, MASK_ZCB), +- RISCV_EXT_FLAG_ENTRY ("zce", x_riscv_zc_subext, MASK_ZCE), +- RISCV_EXT_FLAG_ENTRY ("zcf", x_riscv_zc_subext, MASK_ZCF), +- RISCV_EXT_FLAG_ENTRY ("zcd", x_riscv_zc_subext, MASK_ZCD), +- RISCV_EXT_FLAG_ENTRY ("zcmp", x_riscv_zc_subext, MASK_ZCMP), +- RISCV_EXT_FLAG_ENTRY ("zcmt", x_riscv_zc_subext, MASK_ZCMT), +- RISCV_EXT_FLAG_ENTRY ("zclsd", x_riscv_zc_subext, MASK_ZCLSD), +- +- RISCV_EXT_FLAG_ENTRY ("svade", x_riscv_sv_subext, MASK_SVADE), +- RISCV_EXT_FLAG_ENTRY ("svadu", x_riscv_sv_subext, MASK_SVADU), +- RISCV_EXT_FLAG_ENTRY ("svinval", x_riscv_sv_subext, MASK_SVINVAL), +- RISCV_EXT_FLAG_ENTRY ("svnapot", x_riscv_sv_subext, MASK_SVNAPOT), +- RISCV_EXT_FLAG_ENTRY ("svvptc", x_riscv_sv_subext, MASK_SVVPTC), +- +- RISCV_EXT_FLAG_ENTRY ("ssnpm", x_riscv_ss_subext, MASK_SSNPM), +- RISCV_EXT_FLAG_ENTRY ("smnpm", x_riscv_sm_subext, MASK_SMNPM), +- RISCV_EXT_FLAG_ENTRY ("smmpm", x_riscv_sm_subext, MASK_SMMPM), +- RISCV_EXT_FLAG_ENTRY ("sspm", x_riscv_ss_subext, MASK_SSPM), +- RISCV_EXT_FLAG_ENTRY ("supm", x_riscv_su_subext, MASK_SUPM), +- +- RISCV_EXT_FLAG_ENTRY ("ztso", x_riscv_zt_subext, MASK_ZTSO), +- +- RISCV_EXT_FLAG_ENTRY ("xcvmac", x_riscv_xcv_subext, MASK_XCVMAC), +- RISCV_EXT_FLAG_ENTRY ("xcvalu", x_riscv_xcv_subext, MASK_XCVALU), +- RISCV_EXT_FLAG_ENTRY ("xcvelw", x_riscv_xcv_subext, MASK_XCVELW), +- RISCV_EXT_FLAG_ENTRY ("xcvsimd", x_riscv_xcv_subext, MASK_XCVSIMD), +- RISCV_EXT_FLAG_ENTRY ("xcvbi", x_riscv_xcv_subext, MASK_XCVBI), +- +- RISCV_EXT_FLAG_ENTRY ("xtheadba", x_riscv_xthead_subext, MASK_XTHEADBA), +- RISCV_EXT_FLAG_ENTRY ("xtheadbb", x_riscv_xthead_subext, MASK_XTHEADBB), +- RISCV_EXT_FLAG_ENTRY ("xtheadbs", x_riscv_xthead_subext, MASK_XTHEADBS), +- RISCV_EXT_FLAG_ENTRY ("xtheadcmo", x_riscv_xthead_subext, MASK_XTHEADCMO), +- RISCV_EXT_FLAG_ENTRY ("xtheadcondmov", x_riscv_xthead_subext, MASK_XTHEADCONDMOV), +- RISCV_EXT_FLAG_ENTRY ("xtheadfmemidx", x_riscv_xthead_subext, MASK_XTHEADFMEMIDX), +- RISCV_EXT_FLAG_ENTRY ("xtheadfmv", x_riscv_xthead_subext, MASK_XTHEADFMV), +- RISCV_EXT_FLAG_ENTRY ("xtheadint", x_riscv_xthead_subext, MASK_XTHEADINT), +- RISCV_EXT_FLAG_ENTRY ("xtheadmac", x_riscv_xthead_subext, MASK_XTHEADMAC), +- RISCV_EXT_FLAG_ENTRY ("xtheadmemidx", x_riscv_xthead_subext, MASK_XTHEADMEMIDX), +- RISCV_EXT_FLAG_ENTRY ("xtheadmempair", x_riscv_xthead_subext, MASK_XTHEADMEMPAIR), +- RISCV_EXT_FLAG_ENTRY ("xtheadsync", x_riscv_xthead_subext, MASK_XTHEADSYNC), +- RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_xthead_subext, MASK_XTHEADVECTOR), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_32), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_64), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_32), +@@ -1659,14 +1509,6 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_isa_flags, MASK_FULL_V), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_isa_flags, MASK_VECTOR), + +- RISCV_EXT_FLAG_ENTRY ("xventanacondops", x_riscv_xventana_subext, MASK_XVENTANACONDOPS), +- +- RISCV_EXT_FLAG_ENTRY ("xsfvcp", x_riscv_xsf_subext, MASK_XSFVCP), +- RISCV_EXT_FLAG_ENTRY ("xsfcease", x_riscv_xsf_subext, MASK_XSFCEASE), +- RISCV_EXT_FLAG_ENTRY ("xsfvqmaccqoq", x_riscv_xsf_subext, MASK_XSFVQMACCQOQ), +- RISCV_EXT_FLAG_ENTRY ("xsfvqmaccdod", x_riscv_xsf_subext, MASK_XSFVQMACCDOD), +- RISCV_EXT_FLAG_ENTRY ("xsfvfnrclipxfqf", x_riscv_xsf_subext, MASK_XSFVFNRCLIPXFQF), +- + {NULL, NULL, NULL, 0} + }; + +@@ -1675,9 +1517,9 @@ static void + apply_extra_extension_flags (const char *ext, + std::vector &flag_table) + { +- const riscv_ext_flag_table_t *arch_ext_flag_tab; +- for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; arch_ext_flag_tab->ext; +- ++arch_ext_flag_tab) ++ const riscv_extra_ext_flag_table_t *arch_ext_flag_tab; ++ for (arch_ext_flag_tab = &riscv_extra_ext_flag_table[0]; ++ arch_ext_flag_tab->ext; ++arch_ext_flag_tab) + { + if (strcmp (arch_ext_flag_tab->ext, ext) == 0) + { +@@ -1714,24 +1556,21 @@ riscv_set_arch_by_subset_list (riscv_subset_list *subset_list, + { + if (opts) + { +- const riscv_ext_flag_table_t *arch_ext_flag_tab; + /* Clean up target flags before we set. */ +- for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; arch_ext_flag_tab->ext; +- ++arch_ext_flag_tab) +- opts->*arch_ext_flag_tab->var_ref &= ~arch_ext_flag_tab->mask; ++ for (const auto &[ext_name, ext_info] : riscv_ext_infos) ++ ext_info.clean_opts (opts); + + if (subset_list->xlen () == 32) + opts->x_riscv_isa_flags &= ~MASK_64BIT; + else if (subset_list->xlen () == 64) + opts->x_riscv_isa_flags |= MASK_64BIT; + +- for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; +- arch_ext_flag_tab->ext; +- ++arch_ext_flag_tab) +- { +- if (subset_list->lookup (arch_ext_flag_tab->ext)) +- opts->*arch_ext_flag_tab->var_ref |= arch_ext_flag_tab->mask; +- } ++ for (const auto &[ext_name, ext_info] : riscv_ext_infos) ++ if (subset_list->lookup (ext_name.c_str ())) ++ { ++ /* Set the extension flag. */ ++ ext_info.set_opts (opts); ++ } + } + } + +@@ -1741,16 +1580,10 @@ bool + riscv_ext_is_subset (struct cl_target_option *opts, + struct cl_target_option *subset) + { +- const riscv_ext_flag_table_t *arch_ext_flag_tab; +- for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; +- arch_ext_flag_tab->ext; +- ++arch_ext_flag_tab) ++ for (const auto &[ext_name, ext_info] : riscv_ext_infos) + { +- if (subset->*arch_ext_flag_tab->cl_var_ref & arch_ext_flag_tab->mask) +- { +- if (!(opts->*arch_ext_flag_tab->cl_var_ref & arch_ext_flag_tab->mask)) +- return false; +- } ++ if (ext_info.check_opts (opts) && !ext_info.check_opts (subset)) ++ return false; + } + return true; + } +-- +2.51.0 + diff --git a/SPECS/gcc15/0019-RISC-V-Add-augmented-hypervisor-series-extensions.patch b/SPECS/gcc15/0019-RISC-V-Add-augmented-hypervisor-series-extensions.patch new file mode 100644 index 00000000..c660ee88 --- /dev/null +++ b/SPECS/gcc15/0019-RISC-V-Add-augmented-hypervisor-series-extensions.patch @@ -0,0 +1,228 @@ +From 76f97d5887607a194cfd6b2466ea7b0a7d412640 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Tue, 13 May 2025 15:23:39 +0800 +Subject: [PATCH 19/35] RISC-V: Add augmented hypervisor series extensions. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The augmented hypervisor series extensions 'sha'[1] is a new profile-defined +extension series that captures the full set of features that are mandated to +be supported along with the 'H' extension. + +[1] https://github.com/riscv/riscv-profiles/blob/main/src/rva23-profile.adoc#rva23s64-profile + +Version log: Update implements, fix testcase format. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension defs. + * config/riscv/riscv-ext.opt: Ditto. + * doc/riscv-ext.texi: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-55.c: New test. +--- + gcc/config/riscv/riscv-ext.def | 91 ++++++++++++++++++++++++ + gcc/config/riscv/riscv-ext.opt | 17 +++++ + gcc/doc/riscv-ext.texi | 28 ++++++++ + gcc/testsuite/gcc.target/riscv/arch-55.c | 9 +++ + 4 files changed, 145 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-55.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 34742d912f8..97b576617ad 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1571,6 +1571,97 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ sha, ++ /* UPPERCAE_NAME */ SHA, ++ /* FULL_NAME */ "The augmented hypervisor extension", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h", "shcounterenw", "shgatpa", "shtvala", "shvstvala", "shvstvecd", "shvsatpa", "ssstateen"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ shcounterenw, ++ /* UPPERCAE_NAME */ SHCOUNTERENW, ++ /* FULL_NAME */ "Support writeable enables for any supported counter", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h", "zihpm"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ shgatpa, ++ /* UPPERCAE_NAME */ SHGATPA, ++ /* FULL_NAME */ "SvNNx4 mode supported for all modes supported by satp", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h", "ssstateen"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ shtvala, ++ /* UPPERCAE_NAME */ SHTVALA, ++ /* FULL_NAME */ "The htval register provides all needed values", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ shvstvala, ++ /* UPPERCAE_NAME */ SHVSTVALA, ++ /* FULL_NAME */ "The vstval register provides all needed values", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ shvstvecd, ++ /* UPPERCAE_NAME */ SHVSTVECD, ++ /* FULL_NAME */ "The vstvec register supports Direct mode", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ ++DEFINE_RISCV_EXT( ++ /* NAME */ shvsatpa, ++ /* UPPERCAE_NAME */ SHVSATPA, ++ /* FULL_NAME */ "The vsatp register supports all modes supported by satp", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ smaia, + /* UPPERCAE_NAME */ SMAIA, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 0c56dc9b271..9199aa31b42 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -28,6 +28,9 @@ int riscv_base_subext + TargetVariable + int riscv_sd_subext + ++TargetVariable ++int riscv_sh_subext ++ + TargetVariable + int riscv_sm_subext + +@@ -316,6 +319,20 @@ Mask(ZHINXMIN) Var(riscv_zinx_subext) + + Mask(SDTRIG) Var(riscv_sd_subext) + ++Mask(SHA) Var(riscv_sh_subext) ++ ++Mask(SHCOUNTERENW) Var(riscv_sh_subext) ++ ++Mask(SHGATPA) Var(riscv_sh_subext) ++ ++Mask(SHTVALA) Var(riscv_sh_subext) ++ ++Mask(SHVSTVALA) Var(riscv_sh_subext) ++ ++Mask(SHVSTVECD) Var(riscv_sh_subext) ++ ++Mask(SHVSATPA) Var(riscv_sh_subext) ++ + Mask(SMAIA) Var(riscv_sm_subext) + + Mask(SMEPMP) Var(riscv_sm_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 968654bc39b..bd3d29c75ab 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -462,6 +462,34 @@ + @tab 1.0 + @tab sdtrig extension + ++@item sha ++@tab 1.0 ++@tab The augmented hypervisor extension ++ ++@item shcounterenw ++@tab 1.0 ++@tab Support writeable enables for any supported counter ++ ++@item shgatpa ++@tab 1.0 ++@tab SvNNx4 mode supported for all modes supported by satp ++ ++@item shtvala ++@tab 1.0 ++@tab The htval register provides all needed values ++ ++@item shvstvala ++@tab 1.0 ++@tab The vstval register provides all needed values ++ ++@item shvstvecd ++@tab 1.0 ++@tab The vstvec register supports Direct mode ++ ++@item shvsatpa ++@tab 1.0 ++@tab The vsatp register supports all modes supported by satp ++ + @item smaia + @tab 1.0 + @tab Advanced interrupt architecture extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-55.c b/gcc/testsuite/gcc.target/riscv/arch-55.c +new file mode 100644 +index 00000000000..0e8a2940b58 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-55.c +@@ -0,0 +1,9 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64g_sha -mabi=lp64d" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2" ++"_d2p2_h1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_sha1p0" ++"_shcounterenw1p0_shgatpa1p0_shtvala1p0_shvsatpa1p0_shvstvala1p0_shvstvecd1p0" ++"_ssstateen1p0\"" } } */ +\ No newline at end of file +-- +2.51.0 + diff --git a/SPECS/gcc15/0020-RISC-V-Support-CPUs-in-march.patch b/SPECS/gcc15/0020-RISC-V-Support-CPUs-in-march.patch new file mode 100644 index 00000000..00c8df61 --- /dev/null +++ b/SPECS/gcc15/0020-RISC-V-Support-CPUs-in-march.patch @@ -0,0 +1,130 @@ +From a7897202e8e474e4a1fdfcde1512b9cc2dbfd91f Mon Sep 17 00:00:00 2001 +From: Robin Dapp +Date: Thu, 8 May 2025 09:51:45 +0200 +Subject: [PATCH 20/35] RISC-V: Support CPUs in -march. + +This patch allows an -march string like + + -march=sifive-p670 + +in order override a previous -march in a simple way. + +Suppose we have a Makefile that specifies -march=rv64gc by default. +A user-specified -mcpu=sifive-p670 would be after the -march in the +options string and thus only set -mtune=sifive-p670 (as -mcpu does not +override a previously specified -march or -mtune). + +So if we wanted to override we would need to specify the full, lengthy +-march=rv64gcv_... string instead of a simple -mcpu=... + +Therefore this patch always first tries to interpret -march= as CPU +string. If it is a supported CPU we use its march properties and let it +override previously specified options. Otherwise the behavior is as +before. This enables the "last-specified option wins" behavior GCC +normally employs. + +Note that -march does not imply -mtune like on x86 or other targets. +So an -march=CPU won't override a previously specified -mtune=other-CPU. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc (riscv_subset_list::parse_base_ext): + Adjust error message. + (riscv_handle_option): Parse as CPU string first. + (riscv_expand_arch): Ditto. + * doc/invoke.texi: Document. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-56.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 19 ++++++++++++------- + gcc/doc/invoke.texi | 2 +- + gcc/testsuite/gcc.target/riscv/arch-56.c | 13 +++++++++++++ + 3 files changed, 26 insertions(+), 8 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-56.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 3d3ca110699..6fdefd82e83 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -980,8 +980,9 @@ riscv_subset_list::parse_base_ext (const char *p) + } + else + { +- error_at (m_loc, "%<-march=%s%>: ISA string must begin with rv32, rv64 " +- "or Profiles", m_arch); ++ error_at (m_loc, "%<-march=%s%>: ISA string must begin with rv32, rv64," ++ " a supported RVA profile or refer to a supported CPU", ++ m_arch); + return NULL; + } + +@@ -1708,7 +1709,8 @@ riscv_handle_option (struct gcc_options *opts, + switch (decoded->opt_index) + { + case OPT_march_: +- riscv_parse_arch_string (decoded->arg, opts, loc); ++ if (riscv_find_cpu (decoded->arg) == NULL) ++ riscv_parse_arch_string (decoded->arg, opts, loc); + return true; + + case OPT_mcpu_: +@@ -1725,15 +1727,18 @@ riscv_handle_option (struct gcc_options *opts, + /* Expand arch string with implied extensions. */ + + const char * +-riscv_expand_arch (int argc ATTRIBUTE_UNUSED, ++riscv_expand_arch (int argc, + const char **argv) + { + gcc_assert (argc == 1); + location_t loc = UNKNOWN_LOCATION; +- riscv_parse_arch_string (argv[0], NULL, loc); ++ /* Try to interpret the arch as CPU first. */ ++ const char *arch_str = riscv_expand_arch_from_cpu (argc, argv); ++ if (!strlen (arch_str)) ++ riscv_parse_arch_string (argv[0], NULL, loc); + const std::string arch = riscv_arch_str (false); +- if (arch.length()) +- return xasprintf ("-march=%s", arch.c_str()); ++ if (arch.length ()) ++ return xasprintf ("-march=%s", arch.c_str ()); + else + return ""; + } +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index f8b06e7d509..4f5d23e237d 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -1267,7 +1267,7 @@ See RS/6000 and PowerPC Options. + -mfence-tso -mno-fence-tso + -mdiv -mno-div + -misa-spec=@var{ISA-spec-string} +--march=@var{ISA-string|Profiles|Profiles_ISA-string} ++-march=@var{ISA-string|Profiles|Profiles_ISA-string|CPU/processor string} + -mtune=@var{processor-string} + -mpreferred-stack-boundary=@var{num} + -msmall-data-limit=@var{N-bytes} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-56.c b/gcc/testsuite/gcc.target/riscv/arch-56.c +new file mode 100644 +index 00000000000..e075f9661ee +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-56.c +@@ -0,0 +1,13 @@ ++/* Check whether the second -march overrides the first. */ ++/* { dg-do compile { target rv64 } } */ ++/* { dg-options "-O3 -march=rv64gc -march=sifive-p670" } */ ++ ++void ++foo (char *a, char *b, int n) ++{ ++ for (int i = 0; i < n; i++) ++ a[i] = b[i] + 1; ++} ++ ++/* { dg-final { scan-assembler "vset" } } */ ++/* { dg-final { scan-assembler "zvl128b" } } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0021-RISC-V-Add-minimal-support-of-double-trap-extension-.patch b/SPECS/gcc15/0021-RISC-V-Add-minimal-support-of-double-trap-extension-.patch new file mode 100644 index 00000000..a31aaa7a --- /dev/null +++ b/SPECS/gcc15/0021-RISC-V-Add-minimal-support-of-double-trap-extension-.patch @@ -0,0 +1,156 @@ +From 176a78d2297ec756c78137fdedae68675da50723 Mon Sep 17 00:00:00 2001 +From: Jerry Zhang Jian +Date: Wed, 28 May 2025 10:17:36 +0800 +Subject: [PATCH 21/35] RISC-V: Add minimal support of double trap extension + 1.0 + +Add support of double trap extension [1], enabling GCC +to recognize the following extensions at compile time. + +New extensions: + - ssdbltrp + - smdbltrp + +[1] https://github.com/riscv/riscv-double-trap/releases/download/v1.0/riscv-double-trap.pdf + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extensions + * config/riscv/riscv-ext.opt: Auto re-generated + * doc/riscv-ext.texi: Auto re-generated + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-57.c: New test + * gcc.target/riscv/arch-58.c: New test + +Signed-off-by: Jerry Zhang Jian +--- + gcc/config/riscv/riscv-ext.def | 26 ++++++++++++++++++++++++ + gcc/config/riscv/riscv-ext.opt | 4 ++++ + gcc/doc/riscv-ext.texi | 8 ++++++++ + gcc/testsuite/gcc.target/riscv/arch-57.c | 6 ++++++ + gcc/testsuite/gcc.target/riscv/arch-58.c | 6 ++++++ + 5 files changed, 50 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-57.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-58.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 97b576617ad..dbda8ded397 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1727,6 +1727,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ smdbltrp, ++ /* UPPERCAE_NAME */ SMDBLTRP, ++ /* FULL_NAME */ "Double Trap Extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ ssaia, + /* UPPERCAE_NAME */ SSAIA, +@@ -1818,6 +1831,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ ssdbltrp, ++ /* UPPERCAE_NAME */ SSDBLTRP, ++ /* FULL_NAME */ "Double Trap Extensions", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ supm, + /* UPPERCAE_NAME */ SUPM, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 9199aa31b42..5e9c5f56ad6 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -343,6 +343,8 @@ Mask(SMNPM) Var(riscv_sm_subext) + + Mask(SMSTATEEN) Var(riscv_sm_subext) + ++Mask(SMDBLTRP) Var(riscv_sm_subext) ++ + Mask(SSAIA) Var(riscv_ss_subext) + + Mask(SSCOFPMF) Var(riscv_ss_subext) +@@ -357,6 +359,8 @@ Mask(SSTC) Var(riscv_ss_subext) + + Mask(SSSTRICT) Var(riscv_ss_subext) + ++Mask(SSDBLTRP) Var(riscv_ss_subext) ++ + Mask(SUPM) Var(riscv_su_subext) + + Mask(SVINVAL) Var(riscv_sv_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index bd3d29c75ab..7a22d841d1b 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -510,6 +510,10 @@ + @tab 1.0 + @tab State enable extension + ++@item smdbltrp ++@tab 1.0 ++@tab Double Trap Extensions ++ + @item ssaia + @tab 1.0 + @tab Advanced interrupt architecture extension for supervisor-mode +@@ -538,6 +542,10 @@ + @tab 1.0 + @tab ssstrict extension + ++@item ssdbltrp ++@tab 1.0 ++@tab Double Trap Extensions ++ + @item supm + @tab 1.0 + @tab supm extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-57.c b/gcc/testsuite/gcc.target/riscv/arch-57.c +new file mode 100644 +index 00000000000..08d3761a470 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-57.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_smdbltrp -mabi=lp64" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_zicsr2p0_smdbltrp1p0\"" } } */ +diff --git a/gcc/testsuite/gcc.target/riscv/arch-58.c b/gcc/testsuite/gcc.target/riscv/arch-58.c +new file mode 100644 +index 00000000000..1481da5ecdb +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-58.c +@@ -0,0 +1,6 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_ssdbltrp -mabi=lp64" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_zicsr2p0_ssdbltrp1p0\"" } } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0022-PATCH-RISC-V-Add-smcntrpmf-extension.patch b/SPECS/gcc15/0022-PATCH-RISC-V-Add-smcntrpmf-extension.patch new file mode 100644 index 00000000..1b3ed360 --- /dev/null +++ b/SPECS/gcc15/0022-PATCH-RISC-V-Add-smcntrpmf-extension.patch @@ -0,0 +1,93 @@ +From aaf29c2a00fa53004891ed433626820aad16439e Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Mon, 2 Jun 2025 13:30:29 -0600 +Subject: [PATCH 22/35] [PATCH] RISC-V: Add smcntrpmf extension. + +This patch support smcntrpmf extension[1]. +To enable GCC to recognize and process smcntrpmf extension correctly at compile time. + +[1]https://github.com/riscvarchive/riscv-smcntrpmf + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension defs. + * config/riscv/riscv-ext.opt: Ditto. + * doc/riscv-ext.texi: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-59.c: New test. +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-59.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-59.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index dbda8ded397..d0adc2b6569 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1675,6 +1675,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ smcntrpmf, ++ /* UPPERCAE_NAME */ SMCNTRPMF, ++ /* FULL_NAME */ "Cycle and instret privilege mode filtering", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ smepmp, + /* UPPERCAE_NAME */ SMEPMP, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 5e9c5f56ad6..c0dcde65293 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -335,6 +335,8 @@ Mask(SHVSATPA) Var(riscv_sh_subext) + + Mask(SMAIA) Var(riscv_sm_subext) + ++Mask(SMCNTRPMF) Var(riscv_sm_subext) ++ + Mask(SMEPMP) Var(riscv_sm_subext) + + Mask(SMMPM) Var(riscv_sm_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 7a22d841d1b..e64c0d653a9 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -494,6 +494,10 @@ + @tab 1.0 + @tab Advanced interrupt architecture extension + ++@item smcntrpmf ++@tab 1.0 ++@tab Cycle and instret privilege mode filtering ++ + @item smepmp + @tab 1.0 + @tab PMP Enhancements for memory access and execution prevention on Machine mode +diff --git a/gcc/testsuite/gcc.target/riscv/arch-59.c b/gcc/testsuite/gcc.target/riscv/arch-59.c +new file mode 100644 +index 00000000000..511cf22106b +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-59.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_smcntrpmf -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0023-RISC-V-Add-Shlcofideleg-extension.patch b/SPECS/gcc15/0023-RISC-V-Add-Shlcofideleg-extension.patch new file mode 100644 index 00000000..d4625ded --- /dev/null +++ b/SPECS/gcc15/0023-RISC-V-Add-Shlcofideleg-extension.patch @@ -0,0 +1,95 @@ +From 79ae3a44d73afcf9d37c70117aa8c76bb0f38a98 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Tue, 27 May 2025 14:37:03 +0800 +Subject: [PATCH 23/35] RISC-V: Add Shlcofideleg extension. + +This patch add the RISC-V Shlcofideleg extension. It supports delegating +LCOFI interrupts(the count-overflow interrupts) to VS-mode.[1] + +[1] https://riscv.github.io/riscv-isa-manual/snapshot/privileged + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension defs. + * config/riscv/riscv-ext.opt: Ditto. + * doc/riscv-ext.texi: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-shlocofideleg.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-shlocofideleg.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-shlocofideleg.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index d0adc2b6569..2d052c15206 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1610,6 +1610,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ shlcofideleg, ++ /* UPPERCASE_NAME */ SHLCOFIDELEG, ++ /* FULL_NAME */ "Delegating LCOFI interrupts to VS-mode", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"h"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sh, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ shtvala, + /* UPPERCAE_NAME */ SHTVALA, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index c0dcde65293..e0314430ffb 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -325,6 +325,8 @@ Mask(SHCOUNTERENW) Var(riscv_sh_subext) + + Mask(SHGATPA) Var(riscv_sh_subext) + ++Mask(SHLCOFIDELEG) Var(riscv_sh_subext) ++ + Mask(SHTVALA) Var(riscv_sh_subext) + + Mask(SHVSTVALA) Var(riscv_sh_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index e64c0d653a9..e7e1f75cca6 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -474,6 +474,10 @@ + @tab 1.0 + @tab SvNNx4 mode supported for all modes supported by satp + ++@item shlcofideleg ++@tab 1.0 ++@tab Delegating LCOFI interrupts to VS-mode ++ + @item shtvala + @tab 1.0 + @tab The htval register provides all needed values +diff --git a/gcc/testsuite/gcc.target/riscv/arch-shlocofideleg.c b/gcc/testsuite/gcc.target/riscv/arch-shlocofideleg.c +new file mode 100644 +index 00000000000..de9f9fc6e53 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-shlocofideleg.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_shlcofideleg -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0024-PATCH-v2-RISC-V-Add-svbare-extension.patch b/SPECS/gcc15/0024-PATCH-v2-RISC-V-Add-svbare-extension.patch new file mode 100644 index 00000000..a45de677 --- /dev/null +++ b/SPECS/gcc15/0024-PATCH-v2-RISC-V-Add-svbare-extension.patch @@ -0,0 +1,91 @@ +From 0e6e8d3a12308d3af675c29deb4071b60be16359 Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Wed, 4 Jun 2025 07:57:01 -0600 +Subject: [PATCH 24/35] [PATCH v2] RISC-V: Add svbare extension. + +This patch support svbare extension, which is an extension in RVA23 profile. +To enable GCC to recognize and process svbare extension correctly at compile time. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension defs. + * config/riscv/riscv-ext.opt: Ditto. + * doc/riscv-ext.texi: Ditto. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-60.c: New test. +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-60.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-60.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 2d052c15206..c3d0bd42b20 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1961,6 +1961,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ svbare, ++ /* UPPERCAE_NAME */ SVBARE, ++ /* FULL_NAME */ "Satp mode bare is supported", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sv, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + #include "riscv-ext-corev.def" + #include "riscv-ext-sifive.def" + #include "riscv-ext-thead.def" +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index e0314430ffb..3e5cbb34898 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -379,6 +379,8 @@ Mask(SVADU) Var(riscv_sv_subext) + + Mask(SVADE) Var(riscv_sv_subext) + ++Mask(SVBARE) Var(riscv_sv_subext) ++ + Mask(XCVALU) Var(riscv_xcv_subext) + + Mask(XCVBI) Var(riscv_xcv_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index e7e1f75cca6..3e6541ac732 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -582,6 +582,10 @@ + @tab 1.0 + @tab Cause exception when hardware updating of A/D bits is disabled + ++@item svbare ++@tab 1.0 ++@tab Satp mode bare is supported ++ + @item xcvalu + @tab 1.0 + @tab Core-V miscellaneous ALU extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-60.c b/gcc/testsuite/gcc.target/riscv/arch-60.c +new file mode 100644 +index 00000000000..ea599f20522 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-60.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_svbare -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0025-PATCH-RISC-V-Imply-zicsr-for-svade-and-svadu-extensi.patch b/SPECS/gcc15/0025-PATCH-RISC-V-Imply-zicsr-for-svade-and-svadu-extensi.patch new file mode 100644 index 00000000..1204042c --- /dev/null +++ b/SPECS/gcc15/0025-PATCH-RISC-V-Imply-zicsr-for-svade-and-svadu-extensi.patch @@ -0,0 +1,42 @@ +From 5b2c399cb9fc86c6cd62e903f4df87b327744199 Mon Sep 17 00:00:00 2001 +From: Dongyan Chen +Date: Wed, 4 Jun 2025 08:03:31 -0600 +Subject: [PATCH 25/35] [PATCH] RISC-V: Imply zicsr for svade and svadu + extensions. + +This patch implies zicsr for svade and svadu extensions. +According to the riscv-privileged spec, the svade and svadu extensions +are privileged instructions, so they should imply zicsr. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: Imply zicsr. +--- + gcc/config/riscv/riscv-ext.def | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index c3d0bd42b20..0e989e12219 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1941,7 +1941,7 @@ DEFINE_RISCV_EXT( + /* FULL_NAME */ "Hardware Updating of A/D Bits extension", + /* DESC */ "", + /* URL */ , +- /* DEP_EXTS */ ({}), ++ /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, +@@ -1954,7 +1954,7 @@ DEFINE_RISCV_EXT( + /* FULL_NAME */ "Cause exception when hardware updating of A/D bits is disabled", + /* DESC */ "", + /* URL */ , +- /* DEP_EXTS */ ({}), ++ /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, +-- +2.51.0 + diff --git a/SPECS/gcc15/0026-RISC-V-Update-extension-defination.patch b/SPECS/gcc15/0026-RISC-V-Update-extension-defination.patch new file mode 100644 index 00000000..35b8535d --- /dev/null +++ b/SPECS/gcc15/0026-RISC-V-Update-extension-defination.patch @@ -0,0 +1,1292 @@ +From 0e179c1d79b20e05bd7e1470cd2622c021ae4b00 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 09:38:40 +0800 +Subject: [PATCH 26/35] RISC-V: Update extension defination. + +Update the defination of RISC-V extensions in riscv-ext.def. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: Update declaration. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 282 ++++++++++++++++----------------- + 1 file changed, 141 insertions(+), 141 deletions(-) + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 0e989e12219..0d715a163c7 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -73,7 +73,7 @@ Format of DEFINE_RISCV_EXT: + + DEFINE_RISCV_EXT( + /* NAME */ e, +- /* UPPERCAE_NAME */ RVE, ++ /* UPPERCASE_NAME */ RVE, + /* FULL_NAME */ "Reduced base integer extension", + /* DESC */ "", + /* URL */ , +@@ -86,7 +86,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ i, +- /* UPPERCAE_NAME */ RVI, ++ /* UPPERCASE_NAME */ RVI, + /* FULL_NAME */ "Base integer extension", + /* DESC */ "", + /* URL */ , +@@ -101,7 +101,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ m, +- /* UPPERCAE_NAME */ MUL, ++ /* UPPERCASE_NAME */ MUL, + /* FULL_NAME */ "Integer multiplication and division extension", + /* DESC */ "", + /* URL */ , +@@ -114,7 +114,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ a, +- /* UPPERCAE_NAME */ ATOMIC, ++ /* UPPERCASE_NAME */ ATOMIC, + /* FULL_NAME */ "Atomic extension", + /* DESC */ "", + /* URL */ , +@@ -129,7 +129,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ f, +- /* UPPERCAE_NAME */ HARD_FLOAT, ++ /* UPPERCASE_NAME */ HARD_FLOAT, + /* FULL_NAME */ "Single-precision floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -144,7 +144,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ d, +- /* UPPERCAE_NAME */ DOUBLE_FLOAT, ++ /* UPPERCASE_NAME */ DOUBLE_FLOAT, + /* FULL_NAME */ "Double-precision floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -159,7 +159,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ c, +- /* UPPERCAE_NAME */ RVC, ++ /* UPPERCASE_NAME */ RVC, + /* FULL_NAME */ "Compressed extension", + /* DESC */ "", + /* URL */ , +@@ -183,7 +183,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ b, +- /* UPPERCAE_NAME */ RVB, ++ /* UPPERCASE_NAME */ RVB, + /* FULL_NAME */ "b extension", + /* DESC */ "", + /* URL */ , +@@ -196,7 +196,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ v, +- /* UPPERCAE_NAME */ RVV, ++ /* UPPERCASE_NAME */ RVV, + /* FULL_NAME */ "Vector extension", + /* DESC */ "", + /* URL */ , +@@ -209,7 +209,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ h, +- /* UPPERCAE_NAME */ RVH, ++ /* UPPERCASE_NAME */ RVH, + /* FULL_NAME */ "Hypervisor extension", + /* DESC */ "", + /* URL */ , +@@ -222,7 +222,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zic64b, +- /* UPPERCAE_NAME */ ZIC64B, ++ /* UPPERCASE_NAME */ ZIC64B, + /* FULL_NAME */ "Cache block size isf 64 bytes", + /* DESC */ "", + /* URL */ , +@@ -235,7 +235,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicbom, +- /* UPPERCAE_NAME */ ZICBOM, ++ /* UPPERCASE_NAME */ ZICBOM, + /* FULL_NAME */ "Cache-block management extension", + /* DESC */ "", + /* URL */ , +@@ -248,7 +248,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicbop, +- /* UPPERCAE_NAME */ ZICBOP, ++ /* UPPERCASE_NAME */ ZICBOP, + /* FULL_NAME */ "Cache-block prefetch extension", + /* DESC */ "", + /* URL */ , +@@ -261,7 +261,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicboz, +- /* UPPERCAE_NAME */ ZICBOZ, ++ /* UPPERCASE_NAME */ ZICBOZ, + /* FULL_NAME */ "Cache-block zero extension", + /* DESC */ "", + /* URL */ , +@@ -274,7 +274,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ziccamoa, +- /* UPPERCAE_NAME */ ZICCAMOA, ++ /* UPPERCASE_NAME */ ZICCAMOA, + /* FULL_NAME */ "Main memory supports all atomics in A", + /* DESC */ "", + /* URL */ , +@@ -287,7 +287,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ziccif, +- /* UPPERCAE_NAME */ ZICCIF, ++ /* UPPERCASE_NAME */ ZICCIF, + /* FULL_NAME */ "Main memory supports instruction fetch with atomicity requirement", + /* DESC */ "", + /* URL */ , +@@ -300,7 +300,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicclsm, +- /* UPPERCAE_NAME */ ZICCLSM, ++ /* UPPERCASE_NAME */ ZICCLSM, + /* FULL_NAME */ "Main memory supports misaligned loads/stores", + /* DESC */ "", + /* URL */ , +@@ -313,7 +313,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ziccrse, +- /* UPPERCAE_NAME */ ZICCRSE, ++ /* UPPERCASE_NAME */ ZICCRSE, + /* FULL_NAME */ "Main memory supports forward progress on LR/SC sequences", + /* DESC */ "", + /* URL */ , +@@ -326,7 +326,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicfilp, +- /* UPPERCAE_NAME */ ZICFILP, ++ /* UPPERCASE_NAME */ ZICFILP, + /* FULL_NAME */ "zicfilp extension", + /* DESC */ "", + /* URL */ , +@@ -339,7 +339,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicfiss, +- /* UPPERCAE_NAME */ ZICFISS, ++ /* UPPERCASE_NAME */ ZICFISS, + /* FULL_NAME */ "zicfiss extension", + /* DESC */ "", + /* URL */ , +@@ -352,7 +352,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicntr, +- /* UPPERCAE_NAME */ ZICNTR, ++ /* UPPERCASE_NAME */ ZICNTR, + /* FULL_NAME */ "Standard extension for base counters and timers", + /* DESC */ "", + /* URL */ , +@@ -365,7 +365,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicond, +- /* UPPERCAE_NAME */ ZICOND, ++ /* UPPERCASE_NAME */ ZICOND, + /* FULL_NAME */ "Integer conditional operations extension", + /* DESC */ "", + /* URL */ , +@@ -378,7 +378,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zicsr, +- /* UPPERCAE_NAME */ ZICSR, ++ /* UPPERCASE_NAME */ ZICSR, + /* FULL_NAME */ "Control and status register access extension", + /* DESC */ "", + /* URL */ , +@@ -391,7 +391,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zifencei, +- /* UPPERCAE_NAME */ ZIFENCEI, ++ /* UPPERCASE_NAME */ ZIFENCEI, + /* FULL_NAME */ "Instruction-fetch fence extension", + /* DESC */ "", + /* URL */ , +@@ -404,7 +404,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zihintntl, +- /* UPPERCAE_NAME */ ZIHINTNTL, ++ /* UPPERCASE_NAME */ ZIHINTNTL, + /* FULL_NAME */ "Non-temporal locality hints extension", + /* DESC */ "", + /* URL */ , +@@ -417,7 +417,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zihintpause, +- /* UPPERCAE_NAME */ ZIHINTPAUSE, ++ /* UPPERCASE_NAME */ ZIHINTPAUSE, + /* FULL_NAME */ "Pause hint extension", + /* DESC */ "", + /* URL */ , +@@ -430,7 +430,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zihpm, +- /* UPPERCAE_NAME */ ZIHPM, ++ /* UPPERCASE_NAME */ ZIHPM, + /* FULL_NAME */ "Standard extension for hardware performance counters", + /* DESC */ "", + /* URL */ , +@@ -443,7 +443,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zimop, +- /* UPPERCAE_NAME */ ZIMOP, ++ /* UPPERCASE_NAME */ ZIMOP, + /* FULL_NAME */ "zimop extension", + /* DESC */ "", + /* URL */ , +@@ -456,7 +456,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zilsd, +- /* UPPERCAE_NAME */ ZILSD, ++ /* UPPERCASE_NAME */ ZILSD, + /* FULL_NAME */ "Load/Store pair instructions extension", + /* DESC */ "", + /* URL */ , +@@ -469,7 +469,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zmmul, +- /* UPPERCAE_NAME */ ZMMUL, ++ /* UPPERCASE_NAME */ ZMMUL, + /* FULL_NAME */ "Integer multiplication extension", + /* DESC */ "", + /* URL */ , +@@ -482,7 +482,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ za128rs, +- /* UPPERCAE_NAME */ ZA128RS, ++ /* UPPERCASE_NAME */ ZA128RS, + /* FULL_NAME */ "Reservation set size of 128 bytes", + /* DESC */ "", + /* URL */ , +@@ -495,7 +495,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ za64rs, +- /* UPPERCAE_NAME */ ZA64RS, ++ /* UPPERCASE_NAME */ ZA64RS, + /* FULL_NAME */ "Reservation set size of 64 bytes", + /* DESC */ "", + /* URL */ , +@@ -508,7 +508,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zaamo, +- /* UPPERCAE_NAME */ ZAAMO, ++ /* UPPERCASE_NAME */ ZAAMO, + /* FULL_NAME */ "zaamo extension", + /* DESC */ "", + /* URL */ , +@@ -521,7 +521,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zabha, +- /* UPPERCAE_NAME */ ZABHA, ++ /* UPPERCASE_NAME */ ZABHA, + /* FULL_NAME */ "zabha extension", + /* DESC */ "", + /* URL */ , +@@ -534,7 +534,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zacas, +- /* UPPERCAE_NAME */ ZACAS, ++ /* UPPERCASE_NAME */ ZACAS, + /* FULL_NAME */ "zacas extension", + /* DESC */ "", + /* URL */ , +@@ -547,7 +547,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zalrsc, +- /* UPPERCAE_NAME */ ZALRSC, ++ /* UPPERCASE_NAME */ ZALRSC, + /* FULL_NAME */ "zalrsc extension", + /* DESC */ "", + /* URL */ , +@@ -560,7 +560,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zawrs, +- /* UPPERCAE_NAME */ ZAWRS, ++ /* UPPERCASE_NAME */ ZAWRS, + /* FULL_NAME */ "Wait-on-reservation-set extension", + /* DESC */ "", + /* URL */ , +@@ -573,7 +573,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zama16b, +- /* UPPERCAE_NAME */ ZAMA16B, ++ /* UPPERCASE_NAME */ ZAMA16B, + /* FULL_NAME */ "Zama16b extension", + /* DESC */ "Misaligned loads, stores, and AMOs to main memory regions that do" + " not cross a naturally aligned 16-byte boundary are atomic.", +@@ -587,7 +587,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zfa, +- /* UPPERCAE_NAME */ ZFA, ++ /* UPPERCASE_NAME */ ZFA, + /* FULL_NAME */ "Additional floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -600,7 +600,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zfbfmin, +- /* UPPERCAE_NAME */ ZFBFMIN, ++ /* UPPERCASE_NAME */ ZFBFMIN, + /* FULL_NAME */ "zfbfmin extension", + /* DESC */ "", + /* URL */ , +@@ -613,7 +613,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zfh, +- /* UPPERCAE_NAME */ ZFH, ++ /* UPPERCASE_NAME */ ZFH, + /* FULL_NAME */ "Half-precision floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -626,7 +626,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zfhmin, +- /* UPPERCAE_NAME */ ZFHMIN, ++ /* UPPERCASE_NAME */ ZFHMIN, + /* FULL_NAME */ "Minimal half-precision floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -639,7 +639,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zfinx, +- /* UPPERCAE_NAME */ ZFINX, ++ /* UPPERCASE_NAME */ ZFINX, + /* FULL_NAME */ "Single-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , +@@ -652,7 +652,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zdinx, +- /* UPPERCAE_NAME */ ZDINX, ++ /* UPPERCASE_NAME */ ZDINX, + /* FULL_NAME */ "Double-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , +@@ -665,7 +665,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zca, +- /* UPPERCAE_NAME */ ZCA, ++ /* UPPERCASE_NAME */ ZCA, + /* FULL_NAME */ "Integer compressed instruction extension", + /* DESC */ "", + /* URL */ , +@@ -709,7 +709,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zcb, +- /* UPPERCAE_NAME */ ZCB, ++ /* UPPERCASE_NAME */ ZCB, + /* FULL_NAME */ "Simple compressed instruction extension", + /* DESC */ "", + /* URL */ , +@@ -722,7 +722,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zcd, +- /* UPPERCAE_NAME */ ZCD, ++ /* UPPERCASE_NAME */ ZCD, + /* FULL_NAME */ "Compressed double-precision floating point loads and stores extension", + /* DESC */ "", + /* URL */ , +@@ -735,7 +735,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zce, +- /* UPPERCAE_NAME */ ZCE, ++ /* UPPERCASE_NAME */ ZCE, + /* FULL_NAME */ "Compressed instruction extensions for embedded processors", + /* DESC */ "", + /* URL */ , +@@ -754,7 +754,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zcf, +- /* UPPERCAE_NAME */ ZCF, ++ /* UPPERCASE_NAME */ ZCF, + /* FULL_NAME */ "Compressed single-precision floating point loads and stores extension", + /* DESC */ "", + /* URL */ , +@@ -767,7 +767,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zcmop, +- /* UPPERCAE_NAME */ ZCMOP, ++ /* UPPERCASE_NAME */ ZCMOP, + /* FULL_NAME */ "zcmop extension", + /* DESC */ "", + /* URL */ , +@@ -780,7 +780,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zcmp, +- /* UPPERCAE_NAME */ ZCMP, ++ /* UPPERCASE_NAME */ ZCMP, + /* FULL_NAME */ "Compressed push pop extension", + /* DESC */ "", + /* URL */ , +@@ -793,7 +793,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zcmt, +- /* UPPERCAE_NAME */ ZCMT, ++ /* UPPERCASE_NAME */ ZCMT, + /* FULL_NAME */ "Table jump instruction extension", + /* DESC */ "", + /* URL */ , +@@ -806,7 +806,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zclsd, +- /* UPPERCAE_NAME */ ZCLSD, ++ /* UPPERCASE_NAME */ ZCLSD, + /* FULL_NAME */ "Compressed load/store pair instructions extension", + /* DESC */ "", + /* URL */ , +@@ -819,7 +819,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zba, +- /* UPPERCAE_NAME */ ZBA, ++ /* UPPERCASE_NAME */ ZBA, + /* FULL_NAME */ "Address calculation extension", + /* DESC */ "", + /* URL */ , +@@ -832,7 +832,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zbb, +- /* UPPERCAE_NAME */ ZBB, ++ /* UPPERCASE_NAME */ ZBB, + /* FULL_NAME */ "Basic bit manipulation extension", + /* DESC */ "", + /* URL */ , +@@ -845,7 +845,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zbc, +- /* UPPERCAE_NAME */ ZBC, ++ /* UPPERCASE_NAME */ ZBC, + /* FULL_NAME */ "Carry-less multiplication extension", + /* DESC */ "", + /* URL */ , +@@ -858,7 +858,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zbkb, +- /* UPPERCAE_NAME */ ZBKB, ++ /* UPPERCASE_NAME */ ZBKB, + /* FULL_NAME */ "Cryptography bit-manipulation extension", + /* DESC */ "", + /* URL */ , +@@ -871,7 +871,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zbkc, +- /* UPPERCAE_NAME */ ZBKC, ++ /* UPPERCASE_NAME */ ZBKC, + /* FULL_NAME */ "Cryptography carry-less multiply extension", + /* DESC */ "", + /* URL */ , +@@ -884,7 +884,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zbkx, +- /* UPPERCAE_NAME */ ZBKX, ++ /* UPPERCASE_NAME */ ZBKX, + /* FULL_NAME */ "Cryptography crossbar permutation extension", + /* DESC */ "", + /* URL */ , +@@ -897,7 +897,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zbs, +- /* UPPERCAE_NAME */ ZBS, ++ /* UPPERCASE_NAME */ ZBS, + /* FULL_NAME */ "Single-bit operation extension", + /* DESC */ "", + /* URL */ , +@@ -910,7 +910,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zk, +- /* UPPERCAE_NAME */ ZK, ++ /* UPPERCASE_NAME */ ZK, + /* FULL_NAME */ "Standard scalar cryptography extension", + /* DESC */ "", + /* URL */ , +@@ -923,7 +923,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zkn, +- /* UPPERCAE_NAME */ ZKN, ++ /* UPPERCASE_NAME */ ZKN, + /* FULL_NAME */ "NIST algorithm suite extension", + /* DESC */ "", + /* URL */ , +@@ -936,7 +936,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zknd, +- /* UPPERCAE_NAME */ ZKND, ++ /* UPPERCASE_NAME */ ZKND, + /* FULL_NAME */ "AES Decryption extension", + /* DESC */ "", + /* URL */ , +@@ -949,7 +949,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zkne, +- /* UPPERCAE_NAME */ ZKNE, ++ /* UPPERCASE_NAME */ ZKNE, + /* FULL_NAME */ "AES Encryption extension", + /* DESC */ "", + /* URL */ , +@@ -962,7 +962,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zknh, +- /* UPPERCAE_NAME */ ZKNH, ++ /* UPPERCASE_NAME */ ZKNH, + /* FULL_NAME */ "Hash function extension", + /* DESC */ "", + /* URL */ , +@@ -975,7 +975,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zkr, +- /* UPPERCAE_NAME */ ZKR, ++ /* UPPERCASE_NAME */ ZKR, + /* FULL_NAME */ "Entropy source extension", + /* DESC */ "", + /* URL */ , +@@ -988,7 +988,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zks, +- /* UPPERCAE_NAME */ ZKS, ++ /* UPPERCASE_NAME */ ZKS, + /* FULL_NAME */ "ShangMi algorithm suite extension", + /* DESC */ "", + /* URL */ , +@@ -1001,7 +1001,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zksed, +- /* UPPERCAE_NAME */ ZKSED, ++ /* UPPERCASE_NAME */ ZKSED, + /* FULL_NAME */ "SM4 block cipher extension", + /* DESC */ "", + /* URL */ , +@@ -1014,7 +1014,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zksh, +- /* UPPERCAE_NAME */ ZKSH, ++ /* UPPERCASE_NAME */ ZKSH, + /* FULL_NAME */ "SM3 hash function extension", + /* DESC */ "", + /* URL */ , +@@ -1027,7 +1027,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zkt, +- /* UPPERCAE_NAME */ ZKT, ++ /* UPPERCASE_NAME */ ZKT, + /* FULL_NAME */ "Data independent execution latency extension", + /* DESC */ "", + /* URL */ , +@@ -1040,7 +1040,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ztso, +- /* UPPERCAE_NAME */ ZTSO, ++ /* UPPERCASE_NAME */ ZTSO, + /* FULL_NAME */ "Total store ordering extension", + /* DESC */ "", + /* URL */ , +@@ -1053,7 +1053,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvbb, +- /* UPPERCAE_NAME */ ZVBB, ++ /* UPPERCASE_NAME */ ZVBB, + /* FULL_NAME */ "Vector basic bit-manipulation extension", + /* DESC */ "", + /* URL */ , +@@ -1066,7 +1066,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvbc, +- /* UPPERCAE_NAME */ ZVBC, ++ /* UPPERCASE_NAME */ ZVBC, + /* FULL_NAME */ "Vector carryless multiplication extension", + /* DESC */ "", + /* URL */ , +@@ -1079,7 +1079,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zve32f, +- /* UPPERCAE_NAME */ ZVE32F, ++ /* UPPERCASE_NAME */ ZVE32F, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , +@@ -1092,7 +1092,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zve32x, +- /* UPPERCAE_NAME */ ZVE32X, ++ /* UPPERCASE_NAME */ ZVE32X, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , +@@ -1105,7 +1105,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zve64d, +- /* UPPERCAE_NAME */ ZVE64D, ++ /* UPPERCASE_NAME */ ZVE64D, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , +@@ -1118,7 +1118,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zve64f, +- /* UPPERCAE_NAME */ ZVE64F, ++ /* UPPERCASE_NAME */ ZVE64F, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , +@@ -1131,7 +1131,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zve64x, +- /* UPPERCAE_NAME */ ZVE64X, ++ /* UPPERCASE_NAME */ ZVE64X, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , +@@ -1144,7 +1144,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvfbfmin, +- /* UPPERCAE_NAME */ ZVFBFMIN, ++ /* UPPERCASE_NAME */ ZVFBFMIN, + /* FULL_NAME */ "Vector BF16 converts extension", + /* DESC */ "", + /* URL */ , +@@ -1157,7 +1157,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvfbfwma, +- /* UPPERCAE_NAME */ ZVFBFWMA, ++ /* UPPERCASE_NAME */ ZVFBFWMA, + /* FULL_NAME */ "zvfbfwma extension", + /* DESC */ "", + /* URL */ , +@@ -1170,7 +1170,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvfh, +- /* UPPERCAE_NAME */ ZVFH, ++ /* UPPERCASE_NAME */ ZVFH, + /* FULL_NAME */ "Vector half-precision floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -1183,7 +1183,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvfhmin, +- /* UPPERCAE_NAME */ ZVFHMIN, ++ /* UPPERCASE_NAME */ ZVFHMIN, + /* FULL_NAME */ "Vector minimal half-precision floating-point extension", + /* DESC */ "", + /* URL */ , +@@ -1196,7 +1196,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvkb, +- /* UPPERCAE_NAME */ ZVKB, ++ /* UPPERCASE_NAME */ ZVKB, + /* FULL_NAME */ "Vector cryptography bit-manipulation extension", + /* DESC */ "", + /* URL */ , +@@ -1209,7 +1209,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvkg, +- /* UPPERCAE_NAME */ ZVKG, ++ /* UPPERCASE_NAME */ ZVKG, + /* FULL_NAME */ "Vector GCM/GMAC extension", + /* DESC */ "", + /* URL */ , +@@ -1222,7 +1222,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvkn, +- /* UPPERCAE_NAME */ ZVKN, ++ /* UPPERCASE_NAME */ ZVKN, + /* FULL_NAME */ "Vector NIST Algorithm Suite extension", + /* DESC */ "@samp{zvkn} will expand to", + /* URL */ , +@@ -1235,7 +1235,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvknc, +- /* UPPERCAE_NAME */ ZVKNC, ++ /* UPPERCASE_NAME */ ZVKNC, + /* FULL_NAME */ "Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc}", + /* DESC */ "", + /* URL */ , +@@ -1248,7 +1248,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvkned, +- /* UPPERCAE_NAME */ ZVKNED, ++ /* UPPERCASE_NAME */ ZVKNED, + /* FULL_NAME */ "Vector AES block cipher extension", + /* DESC */ "", + /* URL */ , +@@ -1261,7 +1261,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvkng, +- /* UPPERCAE_NAME */ ZVKNG, ++ /* UPPERCASE_NAME */ ZVKNG, + /* FULL_NAME */ "Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand", + /* DESC */ "", + /* URL */ , +@@ -1274,7 +1274,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvknha, +- /* UPPERCAE_NAME */ ZVKNHA, ++ /* UPPERCASE_NAME */ ZVKNHA, + /* FULL_NAME */ "Vector SHA-2 secure hash extension", + /* DESC */ "", + /* URL */ , +@@ -1287,7 +1287,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvknhb, +- /* UPPERCAE_NAME */ ZVKNHB, ++ /* UPPERCASE_NAME */ ZVKNHB, + /* FULL_NAME */ "Vector SHA-2 secure hash extension", + /* DESC */ "", + /* URL */ , +@@ -1300,7 +1300,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvks, +- /* UPPERCAE_NAME */ ZVKS, ++ /* UPPERCASE_NAME */ ZVKS, + /* FULL_NAME */ "Vector ShangMi algorithm suite extension, @samp{zvks} will expand", + /* DESC */ "", + /* URL */ , +@@ -1313,7 +1313,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvksc, +- /* UPPERCAE_NAME */ ZVKSC, ++ /* UPPERCASE_NAME */ ZVKSC, + /* FULL_NAME */ "Vector ShangMi algorithm suite with carryless multiplication extension,", + /* DESC */ "", + /* URL */ , +@@ -1326,7 +1326,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvksed, +- /* UPPERCAE_NAME */ ZVKSED, ++ /* UPPERCASE_NAME */ ZVKSED, + /* FULL_NAME */ "Vector SM4 Block Cipher extension", + /* DESC */ "", + /* URL */ , +@@ -1339,7 +1339,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvksg, +- /* UPPERCAE_NAME */ ZVKSG, ++ /* UPPERCASE_NAME */ ZVKSG, + /* FULL_NAME */ "Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand", + /* DESC */ "", + /* URL */ , +@@ -1352,7 +1352,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvksh, +- /* UPPERCAE_NAME */ ZVKSH, ++ /* UPPERCASE_NAME */ ZVKSH, + /* FULL_NAME */ "Vector SM3 Secure Hash extension", + /* DESC */ "", + /* URL */ , +@@ -1365,7 +1365,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvkt, +- /* UPPERCAE_NAME */ ZVKT, ++ /* UPPERCASE_NAME */ ZVKT, + /* FULL_NAME */ "Vector data independent execution latency extension", + /* DESC */ "", + /* URL */ , +@@ -1378,7 +1378,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl1024b, +- /* UPPERCAE_NAME */ ZVL1024B, ++ /* UPPERCASE_NAME */ ZVL1024B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1391,7 +1391,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl128b, +- /* UPPERCAE_NAME */ ZVL128B, ++ /* UPPERCASE_NAME */ ZVL128B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1404,7 +1404,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl16384b, +- /* UPPERCAE_NAME */ ZVL16384B, ++ /* UPPERCASE_NAME */ ZVL16384B, + /* FULL_NAME */ "zvl16384b extension", + /* DESC */ "", + /* URL */ , +@@ -1417,7 +1417,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl2048b, +- /* UPPERCAE_NAME */ ZVL2048B, ++ /* UPPERCASE_NAME */ ZVL2048B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1430,7 +1430,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl256b, +- /* UPPERCAE_NAME */ ZVL256B, ++ /* UPPERCASE_NAME */ ZVL256B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1443,7 +1443,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl32768b, +- /* UPPERCAE_NAME */ ZVL32768B, ++ /* UPPERCASE_NAME */ ZVL32768B, + /* FULL_NAME */ "zvl32768b extension", + /* DESC */ "", + /* URL */ , +@@ -1456,7 +1456,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl32b, +- /* UPPERCAE_NAME */ ZVL32B, ++ /* UPPERCASE_NAME */ ZVL32B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1469,7 +1469,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl4096b, +- /* UPPERCAE_NAME */ ZVL4096B, ++ /* UPPERCASE_NAME */ ZVL4096B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1482,7 +1482,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl512b, +- /* UPPERCAE_NAME */ ZVL512B, ++ /* UPPERCASE_NAME */ ZVL512B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1495,7 +1495,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl64b, +- /* UPPERCAE_NAME */ ZVL64B, ++ /* UPPERCASE_NAME */ ZVL64B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , +@@ -1508,7 +1508,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl65536b, +- /* UPPERCAE_NAME */ ZVL65536B, ++ /* UPPERCASE_NAME */ ZVL65536B, + /* FULL_NAME */ "zvl65536b extension", + /* DESC */ "", + /* URL */ , +@@ -1521,7 +1521,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zvl8192b, +- /* UPPERCAE_NAME */ ZVL8192B, ++ /* UPPERCASE_NAME */ ZVL8192B, + /* FULL_NAME */ "zvl8192b extension", + /* DESC */ "", + /* URL */ , +@@ -1534,7 +1534,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zhinx, +- /* UPPERCAE_NAME */ ZHINX, ++ /* UPPERCASE_NAME */ ZHINX, + /* FULL_NAME */ "Half-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , +@@ -1547,7 +1547,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ zhinxmin, +- /* UPPERCAE_NAME */ ZHINXMIN, ++ /* UPPERCASE_NAME */ ZHINXMIN, + /* FULL_NAME */ "Minimal half-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , +@@ -1560,7 +1560,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ sdtrig, +- /* UPPERCAE_NAME */ SDTRIG, ++ /* UPPERCASE_NAME */ SDTRIG, + /* FULL_NAME */ "sdtrig extension", + /* DESC */ "", + /* URL */ , +@@ -1573,7 +1573,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ sha, +- /* UPPERCAE_NAME */ SHA, ++ /* UPPERCASE_NAME */ SHA, + /* FULL_NAME */ "The augmented hypervisor extension", + /* DESC */ "", + /* URL */ , +@@ -1586,7 +1586,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ shcounterenw, +- /* UPPERCAE_NAME */ SHCOUNTERENW, ++ /* UPPERCASE_NAME */ SHCOUNTERENW, + /* FULL_NAME */ "Support writeable enables for any supported counter", + /* DESC */ "", + /* URL */ , +@@ -1599,7 +1599,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ shgatpa, +- /* UPPERCAE_NAME */ SHGATPA, ++ /* UPPERCASE_NAME */ SHGATPA, + /* FULL_NAME */ "SvNNx4 mode supported for all modes supported by satp", + /* DESC */ "", + /* URL */ , +@@ -1625,7 +1625,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ shtvala, +- /* UPPERCAE_NAME */ SHTVALA, ++ /* UPPERCASE_NAME */ SHTVALA, + /* FULL_NAME */ "The htval register provides all needed values", + /* DESC */ "", + /* URL */ , +@@ -1638,7 +1638,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ shvstvala, +- /* UPPERCAE_NAME */ SHVSTVALA, ++ /* UPPERCASE_NAME */ SHVSTVALA, + /* FULL_NAME */ "The vstval register provides all needed values", + /* DESC */ "", + /* URL */ , +@@ -1651,7 +1651,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ shvstvecd, +- /* UPPERCAE_NAME */ SHVSTVECD, ++ /* UPPERCASE_NAME */ SHVSTVECD, + /* FULL_NAME */ "The vstvec register supports Direct mode", + /* DESC */ "", + /* URL */ , +@@ -1664,7 +1664,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ shvsatpa, +- /* UPPERCAE_NAME */ SHVSATPA, ++ /* UPPERCASE_NAME */ SHVSATPA, + /* FULL_NAME */ "The vsatp register supports all modes supported by satp", + /* DESC */ "", + /* URL */ , +@@ -1677,7 +1677,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smaia, +- /* UPPERCAE_NAME */ SMAIA, ++ /* UPPERCASE_NAME */ SMAIA, + /* FULL_NAME */ "Advanced interrupt architecture extension", + /* DESC */ "", + /* URL */ , +@@ -1690,7 +1690,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smcntrpmf, +- /* UPPERCAE_NAME */ SMCNTRPMF, ++ /* UPPERCASE_NAME */ SMCNTRPMF, + /* FULL_NAME */ "Cycle and instret privilege mode filtering", + /* DESC */ "", + /* URL */ , +@@ -1703,7 +1703,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smepmp, +- /* UPPERCAE_NAME */ SMEPMP, ++ /* UPPERCASE_NAME */ SMEPMP, + /* FULL_NAME */ "PMP Enhancements for memory access and execution prevention on Machine mode", + /* DESC */ "", + /* URL */ , +@@ -1716,7 +1716,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smmpm, +- /* UPPERCAE_NAME */ SMMPM, ++ /* UPPERCASE_NAME */ SMMPM, + /* FULL_NAME */ "smmpm extension", + /* DESC */ "", + /* URL */ , +@@ -1729,7 +1729,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smnpm, +- /* UPPERCAE_NAME */ SMNPM, ++ /* UPPERCASE_NAME */ SMNPM, + /* FULL_NAME */ "smnpm extension", + /* DESC */ "", + /* URL */ , +@@ -1742,7 +1742,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smstateen, +- /* UPPERCAE_NAME */ SMSTATEEN, ++ /* UPPERCASE_NAME */ SMSTATEEN, + /* FULL_NAME */ "State enable extension", + /* DESC */ "", + /* URL */ , +@@ -1755,7 +1755,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ smdbltrp, +- /* UPPERCAE_NAME */ SMDBLTRP, ++ /* UPPERCASE_NAME */ SMDBLTRP, + /* FULL_NAME */ "Double Trap Extensions", + /* DESC */ "", + /* URL */ , +@@ -1768,7 +1768,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ssaia, +- /* UPPERCAE_NAME */ SSAIA, ++ /* UPPERCASE_NAME */ SSAIA, + /* FULL_NAME */ "Advanced interrupt architecture extension for supervisor-mode", + /* DESC */ "", + /* URL */ , +@@ -1781,7 +1781,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ sscofpmf, +- /* UPPERCAE_NAME */ SSCOFPMF, ++ /* UPPERCASE_NAME */ SSCOFPMF, + /* FULL_NAME */ "Count overflow & filtering extension", + /* DESC */ "", + /* URL */ , +@@ -1794,7 +1794,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ssnpm, +- /* UPPERCAE_NAME */ SSNPM, ++ /* UPPERCASE_NAME */ SSNPM, + /* FULL_NAME */ "ssnpm extension", + /* DESC */ "", + /* URL */ , +@@ -1807,7 +1807,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ sspm, +- /* UPPERCAE_NAME */ SSPM, ++ /* UPPERCASE_NAME */ SSPM, + /* FULL_NAME */ "sspm extension", + /* DESC */ "", + /* URL */ , +@@ -1820,7 +1820,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ssstateen, +- /* UPPERCAE_NAME */ SSSTATEEN, ++ /* UPPERCASE_NAME */ SSSTATEEN, + /* FULL_NAME */ "State-enable extension for supervisor-mode", + /* DESC */ "", + /* URL */ , +@@ -1833,7 +1833,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ sstc, +- /* UPPERCAE_NAME */ SSTC, ++ /* UPPERCASE_NAME */ SSTC, + /* FULL_NAME */ "Supervisor-mode timer interrupts extension", + /* DESC */ "", + /* URL */ , +@@ -1846,7 +1846,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ssstrict, +- /* UPPERCAE_NAME */ SSSTRICT, ++ /* UPPERCASE_NAME */ SSSTRICT, + /* FULL_NAME */ "ssstrict extension", + /* DESC */ "", + /* URL */ , +@@ -1859,7 +1859,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ ssdbltrp, +- /* UPPERCAE_NAME */ SSDBLTRP, ++ /* UPPERCASE_NAME */ SSDBLTRP, + /* FULL_NAME */ "Double Trap Extensions", + /* DESC */ "", + /* URL */ , +@@ -1872,7 +1872,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ supm, +- /* UPPERCAE_NAME */ SUPM, ++ /* UPPERCASE_NAME */ SUPM, + /* FULL_NAME */ "supm extension", + /* DESC */ "", + /* URL */ , +@@ -1885,7 +1885,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svinval, +- /* UPPERCAE_NAME */ SVINVAL, ++ /* UPPERCASE_NAME */ SVINVAL, + /* FULL_NAME */ "Fine-grained address-translation cache invalidation extension", + /* DESC */ "", + /* URL */ , +@@ -1898,7 +1898,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svnapot, +- /* UPPERCAE_NAME */ SVNAPOT, ++ /* UPPERCASE_NAME */ SVNAPOT, + /* FULL_NAME */ "NAPOT translation contiguity extension", + /* DESC */ "", + /* URL */ , +@@ -1911,7 +1911,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svpbmt, +- /* UPPERCAE_NAME */ SVPBMT, ++ /* UPPERCASE_NAME */ SVPBMT, + /* FULL_NAME */ "Page-based memory types extension", + /* DESC */ "", + /* URL */ , +@@ -1924,7 +1924,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svvptc, +- /* UPPERCAE_NAME */ SVVPTC, ++ /* UPPERCASE_NAME */ SVVPTC, + /* FULL_NAME */ "svvptc extension", + /* DESC */ "", + /* URL */ , +@@ -1937,7 +1937,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svadu, +- /* UPPERCAE_NAME */ SVADU, ++ /* UPPERCASE_NAME */ SVADU, + /* FULL_NAME */ "Hardware Updating of A/D Bits extension", + /* DESC */ "", + /* URL */ , +@@ -1950,7 +1950,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svade, +- /* UPPERCAE_NAME */ SVADE, ++ /* UPPERCASE_NAME */ SVADE, + /* FULL_NAME */ "Cause exception when hardware updating of A/D bits is disabled", + /* DESC */ "", + /* URL */ , +@@ -1963,7 +1963,7 @@ DEFINE_RISCV_EXT( + + DEFINE_RISCV_EXT( + /* NAME */ svbare, +- /* UPPERCAE_NAME */ SVBARE, ++ /* UPPERCASE_NAME */ SVBARE, + /* FULL_NAME */ "Satp mode bare is supported", + /* DESC */ "", + /* URL */ , +-- +2.51.0 + diff --git a/SPECS/gcc15/0027-RISC-V-Support-Sm-scsrind-extensions.patch b/SPECS/gcc15/0027-RISC-V-Support-Sm-scsrind-extensions.patch new file mode 100644 index 00000000..f736053d --- /dev/null +++ b/SPECS/gcc15/0027-RISC-V-Support-Sm-scsrind-extensions.patch @@ -0,0 +1,133 @@ +From a40b6ef27887ee313a232a8c0c14c68b15e304de Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 10:16:19 +0800 +Subject: [PATCH 27/35] RISC-V: Support Sm/scsrind extensions. + +Support the Sm/scsrind extensions, which provide indirect access to +machine-level CSRs. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-smcsrind.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 26 +++++++++++++++++++ + gcc/config/riscv/riscv-ext.opt | 4 +++ + gcc/doc/riscv-ext.texi | 8 ++++++ + .../gcc.target/riscv/arch-smcsrind.c | 5 ++++ + 4 files changed, 43 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-smcsrind.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 0d715a163c7..6c122c3987b 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1701,6 +1701,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ smcsrind, ++ /* UPPERCASE_NAME */ SMCSRIND, ++ /* FULL_NAME */ "Machine-Level Indirect CSR Access", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr", "sscsrind"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ smepmp, + /* UPPERCASE_NAME */ SMEPMP, +@@ -1792,6 +1805,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ sscsrind, ++ /* UPPERCASE_NAME */ SSCSRIND, ++ /* FULL_NAME */ "Supervisor-Level Indirect CSR Access", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ ssnpm, + /* UPPERCASE_NAME */ SSNPM, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 3e5cbb34898..725dc879349 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -339,6 +339,8 @@ Mask(SMAIA) Var(riscv_sm_subext) + + Mask(SMCNTRPMF) Var(riscv_sm_subext) + ++Mask(SMCSRIND) Var(riscv_sm_subext) ++ + Mask(SMEPMP) Var(riscv_sm_subext) + + Mask(SMMPM) Var(riscv_sm_subext) +@@ -353,6 +355,8 @@ Mask(SSAIA) Var(riscv_ss_subext) + + Mask(SSCOFPMF) Var(riscv_ss_subext) + ++Mask(SSCSRIND) Var(riscv_ss_subext) ++ + Mask(SSNPM) Var(riscv_ss_subext) + + Mask(SSPM) Var(riscv_ss_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 3e6541ac732..ca7414e0c7a 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -502,6 +502,10 @@ + @tab 1.0 + @tab Cycle and instret privilege mode filtering + ++@item smcsrind ++@tab 1.0 ++@tab Machine-Level Indirect CSR Access ++ + @item smepmp + @tab 1.0 + @tab PMP Enhancements for memory access and execution prevention on Machine mode +@@ -530,6 +534,10 @@ + @tab 1.0 + @tab Count overflow & filtering extension + ++@item sscsrind ++@tab 1.0 ++@tab Supervisor-Level Indirect CSR Access ++ + @item ssnpm + @tab 1.0 + @tab ssnpm extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-smcsrind.c b/gcc/testsuite/gcc.target/riscv/arch-smcsrind.c +new file mode 100644 +index 00000000000..4d1c1045399 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-smcsrind.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_smcsrind -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0028-RISC-V-Support-Smrnmi-extension.patch b/SPECS/gcc15/0028-RISC-V-Support-Smrnmi-extension.patch new file mode 100644 index 00000000..d7a6086a --- /dev/null +++ b/SPECS/gcc15/0028-RISC-V-Support-Smrnmi-extension.patch @@ -0,0 +1,93 @@ +From b1b5af5ce58c1a19fc358b4334ac515215fcbedf Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 11:24:43 +0800 +Subject: [PATCH 28/35] RISC-V: Support Smrnmi extension. + +Support the Smrnmi extension, which provides new CSRs +for Machine mode Non-Maskable Interrupts. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-smrnmi.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-smrnmi.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-smrnmi.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 6c122c3987b..98e7b82c8d1 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1753,6 +1753,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ smrnmi, ++ /* UPPERCASE_NAME */ SMRNMI, ++ /* FULL_NAME */ "Resumable non-maskable interrupts", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ sm, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ smstateen, + /* UPPERCASE_NAME */ SMSTATEEN, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 725dc879349..73868798db6 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -347,6 +347,8 @@ Mask(SMMPM) Var(riscv_sm_subext) + + Mask(SMNPM) Var(riscv_sm_subext) + ++Mask(SMRNMI) Var(riscv_sm_subext) ++ + Mask(SMSTATEEN) Var(riscv_sm_subext) + + Mask(SMDBLTRP) Var(riscv_sm_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index ca7414e0c7a..2d2631e726d 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -518,6 +518,10 @@ + @tab 1.0 + @tab smnpm extension + ++@item smrnmi ++@tab 1.0 ++@tab Resumable Non-Maskable Interrupts ++ + @item smstateen + @tab 1.0 + @tab State enable extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-smrnmi.c b/gcc/testsuite/gcc.target/riscv/arch-smrnmi.c +new file mode 100644 +index 00000000000..8e6254043fa +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-smrnmi.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_smrnmi -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0029-RISC-V-Support-Ssccptr-extension.patch b/SPECS/gcc15/0029-RISC-V-Support-Ssccptr-extension.patch new file mode 100644 index 00000000..7b38df20 --- /dev/null +++ b/SPECS/gcc15/0029-RISC-V-Support-Ssccptr-extension.patch @@ -0,0 +1,93 @@ +From 47f9cf198a6159930ecec5671d157f53e6b8340a Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 13:15:02 +0800 +Subject: [PATCH 29/35] RISC-V: Support Ssccptr extension. + +Support the Ssccptr extension, which allows the main memory to support +page table reads. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-ssccptr.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-ssccptr.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-ssccptr.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 98e7b82c8d1..ec0a08c3282 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1805,6 +1805,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ ssccptr, ++ /* UPPERCASE_NAME */ SSCCPTR, ++ /* FULL_NAME */ "Main memory supports page table reads", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ sscofpmf, + /* UPPERCASE_NAME */ SSCOFPMF, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 73868798db6..f851678236b 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -355,6 +355,8 @@ Mask(SMDBLTRP) Var(riscv_sm_subext) + + Mask(SSAIA) Var(riscv_ss_subext) + ++Mask(SSCCPTR) Var(riscv_ss_subext) ++ + Mask(SSCOFPMF) Var(riscv_ss_subext) + + Mask(SSCSRIND) Var(riscv_ss_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 2d2631e726d..83aa436b466 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -534,6 +534,10 @@ + @tab 1.0 + @tab Advanced interrupt architecture extension for supervisor-mode + ++@item ssccptr ++@tab 1.0 ++@tab Main memory supports page table reads ++ + @item sscofpmf + @tab 1.0 + @tab Count overflow & filtering extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-ssccptr.c b/gcc/testsuite/gcc.target/riscv/arch-ssccptr.c +new file mode 100644 +index 00000000000..902155a0818 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-ssccptr.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_ssccptr -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0030-RISC-V-Support-Sscounterenw-extension.patch b/SPECS/gcc15/0030-RISC-V-Support-Sscounterenw-extension.patch new file mode 100644 index 00000000..f6486b13 --- /dev/null +++ b/SPECS/gcc15/0030-RISC-V-Support-Sscounterenw-extension.patch @@ -0,0 +1,93 @@ +From b04a07b04e32e61a309656da74be2749b101dac9 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 13:33:21 +0800 +Subject: [PATCH 30/35] RISC-V: Support Sscounterenw extension. + +Support the Sscounterenw extension, which allows writeable enables for any +supported counter. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-sscounterenw.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-sscounterenw.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-sscounterenw.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index ec0a08c3282..dab8cb8d69d 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1831,6 +1831,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ sscounterenw, ++ /* UPPERCASE_NAME */ SSCOUNTERENW, ++ /* FULL_NAME */ "Support writeable enables for any supported counter", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ sscsrind, + /* UPPERCASE_NAME */ SSCSRIND, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index f851678236b..ad9e1d68069 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -359,6 +359,8 @@ Mask(SSCCPTR) Var(riscv_ss_subext) + + Mask(SSCOFPMF) Var(riscv_ss_subext) + ++Mask(SSCOUNTERENW) Var(riscv_ss_subext) ++ + Mask(SSCSRIND) Var(riscv_ss_subext) + + Mask(SSNPM) Var(riscv_ss_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 83aa436b466..2b23366607d 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -542,6 +542,10 @@ + @tab 1.0 + @tab Count overflow & filtering extension + ++@item sscounterenw ++@tab 1.0 ++@tab Support writeable enables for any supported counter ++ + @item sscsrind + @tab 1.0 + @tab Supervisor-Level Indirect CSR Access +diff --git a/gcc/testsuite/gcc.target/riscv/arch-sscounterenw.c b/gcc/testsuite/gcc.target/riscv/arch-sscounterenw.c +new file mode 100644 +index 00000000000..901b6bc6c9e +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-sscounterenw.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_sscounterenw -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0031-RISC-V-Support-Sstvala-extension.patch b/SPECS/gcc15/0031-RISC-V-Support-Sstvala-extension.patch new file mode 100644 index 00000000..7bb5cdee --- /dev/null +++ b/SPECS/gcc15/0031-RISC-V-Support-Sstvala-extension.patch @@ -0,0 +1,93 @@ +From 80c719ffbaffc126f7c72210f085e8f36df2e3fe Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 13:46:39 +0800 +Subject: [PATCH 31/35] RISC-V: Support Sstvala extension. + +Support the Sstvala extension, which provides all needed values in +Supervisor Trap Value register (stval). + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-sstvala.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-sstvala.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-sstvala.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index dab8cb8d69d..69ff712d8e5 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1909,6 +1909,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ sstvala, ++ /* UPPERCASE_NAME */ SSTVALA, ++ /* FULL_NAME */ "Stval provides all needed values", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ ssstrict, + /* UPPERCASE_NAME */ SSSTRICT, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index ad9e1d68069..115a1c5de8d 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -371,6 +371,8 @@ Mask(SSSTATEEN) Var(riscv_ss_subext) + + Mask(SSTC) Var(riscv_ss_subext) + ++Mask(SSTVALA) Var(riscv_ss_subext) ++ + Mask(SSSTRICT) Var(riscv_ss_subext) + + Mask(SSDBLTRP) Var(riscv_ss_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 2b23366607d..075cef2c7d8 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -566,6 +566,10 @@ + @tab 1.0 + @tab Supervisor-mode timer interrupts extension + ++@item sstvala ++@tab 1.0 ++@tab Stval provides all needed values ++ + @item ssstrict + @tab 1.0 + @tab ssstrict extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-sstvala.c b/gcc/testsuite/gcc.target/riscv/arch-sstvala.c +new file mode 100644 +index 00000000000..21ea8a6360c +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-sstvala.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_sstvala -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0032-RISC-V-Support-Sstvecd-extension.patch b/SPECS/gcc15/0032-RISC-V-Support-Sstvecd-extension.patch new file mode 100644 index 00000000..fac7e97e --- /dev/null +++ b/SPECS/gcc15/0032-RISC-V-Support-Sstvecd-extension.patch @@ -0,0 +1,93 @@ +From d226c97d591c27897bd8e8c56b48d0f7e5d0be9a Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 13:52:08 +0800 +Subject: [PATCH 32/35] RISC-V: Support Sstvecd extension. + +Support the Sstvecd extension, which allows Supervisor Trap Vector +Base Address register (stvec) to support Direct mode. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-sstvecd.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-sstvecd.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-sstvecd.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 69ff712d8e5..2b34276fb95 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1922,6 +1922,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ sstvecd, ++ /* UPPERCASE_NAME */ SSTVECD, ++ /* FULL_NAME */ "Stvec supports Direct mode", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ ssstrict, + /* UPPERCASE_NAME */ SSSTRICT, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 115a1c5de8d..8eb447c2dc0 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -373,6 +373,8 @@ Mask(SSTC) Var(riscv_ss_subext) + + Mask(SSTVALA) Var(riscv_ss_subext) + ++Mask(SSTVECD) Var(riscv_ss_subext) ++ + Mask(SSSTRICT) Var(riscv_ss_subext) + + Mask(SSDBLTRP) Var(riscv_ss_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index 075cef2c7d8..fd9cbef1d9d 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -570,6 +570,10 @@ + @tab 1.0 + @tab Stval provides all needed values + ++@item sstvecd ++@tab 1.0 ++@tab Stvec supports Direct mode ++ + @item ssstrict + @tab 1.0 + @tab ssstrict extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-sstvecd.c b/gcc/testsuite/gcc.target/riscv/arch-sstvecd.c +new file mode 100644 +index 00000000000..e76f78818ee +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-sstvecd.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_sstvecd -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0033-RISC-V-Support-Ssu64xl-extension.patch b/SPECS/gcc15/0033-RISC-V-Support-Ssu64xl-extension.patch new file mode 100644 index 00000000..b09c04c9 --- /dev/null +++ b/SPECS/gcc15/0033-RISC-V-Support-Ssu64xl-extension.patch @@ -0,0 +1,92 @@ +From f8985ad5aa90ef9cb3f5cb89e031788cf5ce63ee Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Thu, 5 Jun 2025 13:59:14 +0800 +Subject: [PATCH 33/35] RISC-V: Support Ssu64xl extension. + +Support the Ssu64xl extension, which requires UXLEN to be 64. + +gcc/ChangeLog: + + * config/riscv/riscv-ext.def: New extension definition. + * config/riscv/riscv-ext.opt: New extension mask. + * doc/riscv-ext.texi: Document the new extension. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-ssu64xl.c: New test. + +Signed-off-by: Jiawei +--- + gcc/config/riscv/riscv-ext.def | 13 +++++++++++++ + gcc/config/riscv/riscv-ext.opt | 2 ++ + gcc/doc/riscv-ext.texi | 4 ++++ + gcc/testsuite/gcc.target/riscv/arch-ssu64xl.c | 5 +++++ + 4 files changed, 24 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-ssu64xl.c + +diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def +index 2b34276fb95..816acaa34f4 100644 +--- a/gcc/config/riscv/riscv-ext.def ++++ b/gcc/config/riscv/riscv-ext.def +@@ -1961,6 +1961,19 @@ DEFINE_RISCV_EXT( + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + ++DEFINE_RISCV_EXT( ++ /* NAME */ ssu64xl, ++ /* UPPERCASE_NAME */ SSU64XL, ++ /* FULL_NAME */ "UXLEN=64 must be supported", ++ /* DESC */ "", ++ /* URL */ , ++ /* DEP_EXTS */ ({"zicsr"}), ++ /* SUPPORTED_VERSIONS */ ({{1, 0}}), ++ /* FLAG_GROUP */ ss, ++ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, ++ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, ++ /* EXTRA_EXTENSION_FLAGS */ 0) ++ + DEFINE_RISCV_EXT( + /* NAME */ supm, + /* UPPERCASE_NAME */ SUPM, +diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt +index 8eb447c2dc0..9f8c5451d49 100644 +--- a/gcc/config/riscv/riscv-ext.opt ++++ b/gcc/config/riscv/riscv-ext.opt +@@ -379,6 +379,8 @@ Mask(SSSTRICT) Var(riscv_ss_subext) + + Mask(SSDBLTRP) Var(riscv_ss_subext) + ++Mask(SSU64XL) Var(riscv_ss_subext) ++ + Mask(SUPM) Var(riscv_su_subext) + + Mask(SVINVAL) Var(riscv_sv_subext) +diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi +index fd9cbef1d9d..e69a2df768d 100644 +--- a/gcc/doc/riscv-ext.texi ++++ b/gcc/doc/riscv-ext.texi +@@ -582,6 +582,10 @@ + @tab 1.0 + @tab Double Trap Extensions + ++@item ssu64xl ++@tab 1.0 ++@tab UXLEN=64 must be supported ++ + @item supm + @tab 1.0 + @tab supm extension +diff --git a/gcc/testsuite/gcc.target/riscv/arch-ssu64xl.c b/gcc/testsuite/gcc.target/riscv/arch-ssu64xl.c +new file mode 100644 +index 00000000000..6e151c14f9b +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-ssu64xl.c +@@ -0,0 +1,5 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64i_ssu64xl -mabi=lp64" } */ ++int foo() ++{ ++} +-- +2.51.0 + diff --git a/SPECS/gcc15/0034-RISC-V-Update-Profiles-string-in-RV23.patch b/SPECS/gcc15/0034-RISC-V-Update-Profiles-string-in-RV23.patch new file mode 100644 index 00000000..96c4384a --- /dev/null +++ b/SPECS/gcc15/0034-RISC-V-Update-Profiles-string-in-RV23.patch @@ -0,0 +1,56 @@ +From 382c9cf8e06e72397b20dae300ee12f9b3539067 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Mon, 16 Jun 2025 11:21:29 +0800 +Subject: [PATCH 34/35] RISC-V: Update Profiles string in RV23. + +Add b-ext in RVA/B23 as independent extension flags and add supm in +RVA23. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc: Add b-ext and supm. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-53.c: Update testcase. +--- + gcc/common/config/riscv/riscv-common.cc | 6 +++--- + gcc/testsuite/gcc.target/riscv/arch-53.c | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 6fdefd82e83..74307689411 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -290,15 +290,15 @@ static const riscv_profiles riscv_profiles_table[] = + /* RVA23 contains all mandatory base ISA for RVA22U64 and the new extension + 'v,zihintntl,zvfhmin,zvbb,zvkt,zicond,zimop,zcmop,zfa,zawrs' as mandatory + extensions. */ +- {"rva23u64", "rv64imafdcv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" ++ {"rva23u64", "rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" + "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" + "_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb" +- "_zfa_zawrs"}, ++ "_zfa_zawrs_supm"}, + + /* RVB23 contains all mandatory base ISA for RVA22U64 and the new extension + 'zihintntl,zicond,zimop,zcmop,zfa,zawrs' as mandatory + extensions. */ +- {"rvb23u64", "rv64imafdc_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" ++ {"rvb23u64", "rv64imafdcb_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" + "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" + "_zicboz_zfhmin_zkt_zihintntl_zicond_zimop_zcmop_zcb" + "_zfa_zawrs"}, +diff --git a/gcc/testsuite/gcc.target/riscv/arch-53.c b/gcc/testsuite/gcc.target/riscv/arch-53.c +index 8210978ee8b..43ab23aee4d 100644 +--- a/gcc/testsuite/gcc.target/riscv/arch-53.c ++++ b/gcc/testsuite/gcc.target/riscv/arch-53.c +@@ -8,4 +8,4 @@ void foo(){} + _ziccrse1p0_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0" + _za64rs1p0_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0" + _zba1p0_zbb1p0_zbs1p0_zkt1p0_zvbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0" +-_zvfhmin1p0_zvkb1p0_zvkt1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0\"" } } */ ++_zvfhmin1p0_zvkb1p0_zvkt1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_supm1p0\"" } } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0035-RISC-V-Add-Profiles-RVA-B23S64-support.patch b/SPECS/gcc15/0035-RISC-V-Add-Profiles-RVA-B23S64-support.patch new file mode 100644 index 00000000..1034833b --- /dev/null +++ b/SPECS/gcc15/0035-RISC-V-Add-Profiles-RVA-B23S64-support.patch @@ -0,0 +1,100 @@ +From b09208e40167b9e0218e20e639236a1b48de8fb9 Mon Sep 17 00:00:00 2001 +From: Jiawei +Date: Tue, 24 Jun 2025 17:34:05 +0800 +Subject: [PATCH 35/35] RISC-V: Add Profiles RVA/B23S64 support. + +This patch adds support for the RISC-V Profiles RVA23S64 and RVB23S64. + +gcc/ChangeLog: + + * common/config/riscv/riscv-common.cc: New Profiles. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/arch-rva23s.c: New test. + * gcc.target/riscv/arch-rvb23s.c: New test. +--- + gcc/common/config/riscv/riscv-common.cc | 18 +++++++++++++++++- + gcc/testsuite/gcc.target/riscv/arch-rva23s.c | 14 ++++++++++++++ + gcc/testsuite/gcc.target/riscv/arch-rvb23s.c | 12 ++++++++++++ + 3 files changed, 43 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-rva23s.c + create mode 100644 gcc/testsuite/gcc.target/riscv/arch-rvb23s.c + +diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc +index 74307689411..c714c02fd74 100644 +--- a/gcc/common/config/riscv/riscv-common.cc ++++ b/gcc/common/config/riscv/riscv-common.cc +@@ -295,6 +295,15 @@ static const riscv_profiles riscv_profiles_table[] = + "_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb" + "_zfa_zawrs_supm"}, + ++ /* RVA23S contains all mandatory base ISA for RVA23U64 and the privileged ++ extensions as mandatory extensions. */ ++ {"rva23s64", "rv64imafdcbv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" ++ "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" ++ "_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb" ++ "_zfa_zawrs_svbare_svade_ssccptr_sstvecd_sstvala_sscounterenw_svpbmt" ++ "_svinval_svnapot_sstc_sscofpmf_ssnpm_ssu64xl_sha_supm" ++ }, ++ + /* RVB23 contains all mandatory base ISA for RVA22U64 and the new extension + 'zihintntl,zicond,zimop,zcmop,zfa,zawrs' as mandatory + extensions. */ +@@ -303,7 +312,14 @@ static const riscv_profiles riscv_profiles_table[] = + "_zicboz_zfhmin_zkt_zihintntl_zicond_zimop_zcmop_zcb" + "_zfa_zawrs"}, + +- /* Currently we do not define S/M mode Profiles in gcc part. */ ++ /* RVB23S contains all mandatory base ISA for RVB23U64 and the privileged ++ extensions as mandatory extensions. */ ++ {"rvb23s64", "rv64imafdcb_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" ++ "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" ++ "_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb" ++ "_zfa_zawrs_svbare_svade_ssccptr_sstvecd_sstvala_sscounterenw_svpbmt" ++ "_svinval_svnapot_sstc_sscofpmf_ssu64xl_supm" ++ }, + + /* Terminate the list. */ + {NULL, NULL} +diff --git a/gcc/testsuite/gcc.target/riscv/arch-rva23s.c b/gcc/testsuite/gcc.target/riscv/arch-rva23s.c +new file mode 100644 +index 00000000000..215249d52b1 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-rva23s.c +@@ -0,0 +1,14 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rva23s64 -mabi=lp64d" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler-times ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0" ++"_b1p0_v1p0_zic64b1p0_zicbom1p0_zicbop1p0_zicboz1p0_ziccamoa1p0_ziccif1p0_zicclsm1p0" ++"_ziccrse1p0_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0" ++"_za64rs1p0_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0" ++"_zba1p0_zbb1p0_zbs1p0_zkt1p0_zvbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0" ++"_zvfhmin1p0_zvkb1p0_zvkt1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0_sha1p0_shcounterenw1p0" ++"_shgatpa1p0_shtvala1p0_shvsatpa1p0_shvstvala1p0_shvstvecd1p0_ssccptr1p0_sscofpmf1p0" ++"_sscounterenw1p0_ssnpm1p0_ssstateen1p0_sstc1p0_sstvala1p0_sstvecd1p0_ssu64xl1p0_supm1p0" ++"_svade1p0_svbare1p0_svinval1p0_svnapot1p0_svpbmt1p0\" 1} } */ +diff --git a/gcc/testsuite/gcc.target/riscv/arch-rvb23s.c b/gcc/testsuite/gcc.target/riscv/arch-rvb23s.c +new file mode 100644 +index 00000000000..aa71f7dad7d +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/arch-rvb23s.c +@@ -0,0 +1,12 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rvb23s64 -mabi=lp64d" } */ ++ ++void foo(){} ++ ++/* { dg-final { scan-assembler-times ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0" ++"_b1p0_zic64b1p0_zicbom1p0_zicbop1p0_zicboz1p0_ziccamoa1p0_ziccif1p0_zicclsm1p0_ziccrse1p0" ++"_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0_zmmul1p0" ++"_za64rs1p0_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0" ++"_zba1p0_zbb1p0_zbs1p0_zkt1p0_zvbb1p0_zve32f1p0_zve32x1p0_zvfhmin1p0_zvkb1p0_zvkt1p0" ++"_zvl32b1p0_ssccptr1p0_sscofpmf1p0_sscounterenw1p0_sstc1p0_sstvala1p0_sstvecd1p0" ++"_ssu64xl1p0_supm1p0_svade1p0_svbare1p0_svinval1p0_svnapot1p0_svpbmt1p0\" 1} } */ +-- +2.51.0 + diff --git a/SPECS/gcc15/0036-RISC-V-check-if-we-can-vec_extract.patch b/SPECS/gcc15/0036-RISC-V-check-if-we-can-vec_extract.patch new file mode 100644 index 00000000..f9ae2756 --- /dev/null +++ b/SPECS/gcc15/0036-RISC-V-check-if-we-can-vec_extract.patch @@ -0,0 +1,65 @@ +From 833b327ad40d6a4ef3abcdc1a8417c3641114945 Mon Sep 17 00:00:00 2001 +From: Robin Dapp +Date: Fri, 5 Sep 2025 09:35:46 +0200 +Subject: [PATCH] RISC-V: Check if we can vec_extract [PR121510]. + +For Zvfhmin a vector mode exists but the corresponding vec_extract does +not. This patch checks that a vec_extract is available and otherwise +falls back to standard handling. + + PR target/121510 + +gcc/ChangeLog: + + * config/riscv/riscv.cc (riscv_legitimize_move): Check if we can + vec_extract. + +gcc/testsuite/ChangeLog: + + * gcc.target/riscv/rvv/autovec/pr121510.c: New test. + +(cherry picked from commit a6bf07653cd272add46a2218ec141c95d7f02427) +--- + gcc/config/riscv/riscv.cc | 3 ++- + .../gcc.target/riscv/rvv/autovec/pr121510.c | 18 ++++++++++++++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/pr121510.c + +diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc +index bd0046ad2e8..be0ae46aac1 100644 +--- a/gcc/config/riscv/riscv.cc ++++ b/gcc/config/riscv/riscv.cc +@@ -3596,7 +3596,8 @@ riscv_legitimize_move (machine_mode mode, rtx dest, rtx src) + /* This test can fail if (for example) we want a HF and Z[v]fh is + not enabled. In that case we just want to let the standard + expansion path run. */ +- if (riscv_vector::get_vector_mode (smode, nunits).exists (&vmode)) ++ if (riscv_vector::get_vector_mode (smode, nunits).exists (&vmode) ++ && convert_optab_handler (vec_extract_optab, vmode, smode)) + { + rtx v = gen_lowpart (vmode, SUBREG_REG (src)); + rtx int_reg = dest; +diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr121510.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr121510.c +new file mode 100644 +index 00000000000..8e1728608d3 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr121510.c +@@ -0,0 +1,18 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=rv64gcv_zvfhmin -mabi=lp64d -O3" } */ ++ ++long *print_bfloat_block; ++void ftoastr(float); ++void print_bfloat() { ++ for (;;) { ++ long j; ++ union { ++ _Float16 x; ++ char b[] ++ } u; ++ j = 0; ++ for (; j < sizeof 0; j++) ++ u.b[j] = print_bfloat_block[j]; ++ ftoastr(u.x); ++ } ++} diff --git a/SPECS/gcc15/gcc-add-defaultsspec.diff b/SPECS/gcc15/gcc-add-defaultsspec.diff new file mode 100644 index 00000000..08b0ad42 --- /dev/null +++ b/SPECS/gcc15/gcc-add-defaultsspec.diff @@ -0,0 +1,51 @@ +Index: gcc/gcc.cc +=================================================================== +--- gcc/gcc.cc.orig 2013-11-26 15:41:59.000000000 +0100 ++++ gcc/gcc.cc 2013-11-26 16:40:35.780548125 +0100 +@@ -258,6 +258,7 @@ static const char *replace_outfile_spec_ + static const char *remove_outfile_spec_function (int, const char **); + static const char *version_compare_spec_function (int, const char **); + static const char *include_spec_function (int, const char **); ++static const char *include_noerr_spec_function (int, const char **); + static const char *find_file_spec_function (int, const char **); + static const char *find_plugindir_spec_function (int, const char **); + static const char *print_asm_header_spec_function (int, const char **); +@@ -1357,6 +1358,7 @@ static const struct spec_function static + { "remove-outfile", remove_outfile_spec_function }, + { "version-compare", version_compare_spec_function }, + { "include", include_spec_function }, ++ { "include_noerr", include_noerr_spec_function }, + { "find-file", find_file_spec_function }, + { "find-plugindir", find_plugindir_spec_function }, + { "print-asm-header", print_asm_header_spec_function }, +@@ -6480,6 +6482,8 @@ main (int argc, char **argv) + if (access (specs_file, R_OK) == 0) + read_specs (specs_file, true, false); + ++ do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)"); ++ + /* Process any configure-time defaults specified for the command line + options, via OPTION_DEFAULT_SPECS. */ + for (i = 0; i < ARRAY_SIZE (option_default_specs); i++) +@@ -8401,6 +8405,21 @@ get_random_number (void) + return ret ^ getpid (); + } + ++static const char * ++include_noerr_spec_function (int argc, const char **argv) ++{ ++ char *file; ++ ++ if (argc != 1) ++ abort (); ++ ++ file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0); ++ if (file) ++ read_specs (file, FALSE, TRUE); ++ ++ return NULL; ++} ++ + /* %:compare-debug-dump-opt spec function. Save the last argument, + expected to be the last -fdump-final-insns option, or generate a + temporary. */ diff --git a/SPECS/gcc15/gcc15.spec b/SPECS/gcc15/gcc15.spec new file mode 100644 index 00000000..7ee67b7f --- /dev/null +++ b/SPECS/gcc15/gcc15.spec @@ -0,0 +1,3707 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: jchzhou +# +# SPDX-License-Identifier: MulanPSL-2.0 + +#!BuildConstraint: hardware:jobs 32 + +%define _slibdir %{_libdir} +%define slibdir %{_prefix}/lib +%define slibdir64 %{_prefix}/lib64 +%define usrmerged 1 + +%bcond_without bootstrap + +# Ada currently fails to build on a few platforms, enable it only +# on those that work +%define ada_arch x86_64 aarch64 riscv64 + +%ifarch %ada_arch +%define build_ada 0 +%else +%define build_ada 0 +%endif + +%define quadmath_arch x86_64 +%define tsan_arch x86_64 aarch64 riscv64 +%define asan_arch x86_64 aarch64 riscv64 +%define hwasan_arch aarch64 x86_64 +%define itm_arch x86_64 aarch64 riscv64 +%define atomic_arch x86_64 aarch64 riscv64 +%define lsan_arch x86_64 aarch64 riscv64 +%define ubsan_arch x86_64 aarch64 riscv64 +%if 0%{?build_libvtv:1} +%define vtv_arch x86_64 +%endif + +%define build_cp 1 +%define build_fortran 1 +%define build_objc 1 +%define build_objcp 1 +%define build_go 1 +%ifarch x86_64 aarch64 riscv64 +%define build_d 0 +%else +%define build_d 0 +%endif + +%define build_m2 1 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 +%endif + +# rust is still experimental +%define build_rust 0 + +# For optional compilers only build C, C++, Fortran, Ada and Go +%if 0%{?build_optional_compiler_languages:1} +%define build_objc 0 +%define build_objcp 0 +%define build_d 0 +%define build_rust 0 +%define build_m2 0 +%endif + +%define use_lto_bootstrap 0 +%ifarch x86_64 aarch64 +%define use_lto_bootstrap %{with bootstrap} +%endif + +%define enable_plugins 0 +%define build_jit 0 + +# Shared library SONAME versions +%define libgcc_s 1 +%define libgomp_sover 1 +%define libstdcxx_sover 6 +%define libobjc_sover 4 +%define libgfortran_sover 5 +%define libquadmath_sover 0 +%define libasan_sover 8 +%define libtsan_sover 2 +%define libhwasan_sover 0 +%define libatomic_sover 1 +%define libitm_sover 1 +%define libubsan_sover 1 +%define liblsan_sover 0 +%define libvtv_sover 0 +%define libgo_sover 24 +%define libgphobos_sover 5 +%define libgdruntime_sover 5 +%define libgccjit_sover 0 +%define libm2_sover 20 + +# Shared library package suffix +# This is used for the "non-standard" set of libraries, the standard +# being defined by %%product_libs_gcc_ver, the GCC version that should +# provide un-suffixed shared library packages following the shared-library +# policy. Even suffixed variants should provide the shared-library policy +# mandated names and ensure they conflict with each other. +# Individual shared libraries can be directed to be built from individual +# gcc versions by defining %%product_libs_gcc_ver_libgcc_s1 for example, +# generally %%product_libs_gcc_ver_%%name%%sover, similarly. + +%define itsme15 1 +%define plv_ %{!?product_libs_gcc_ver:15}%{?product_libs_gcc_ver} +%define plv() %{expand:%%{!?itsme%{expand:%%{!?product_libs_gcc_ver_%{1}%{2}:%%{plv_}}%%{?product_libs_gcc_ver_%{1}%{2}}}:-gcc15}} + +%define libgcc_s_suffix %{plv libgcc_s %{libgcc_s}} +%define libgomp_suffix %{plv libgomp %{libgomp_sover}} +%define libstdcxx_suffix %{plv libstdcxx %{libstdcxx_sover}} +%define libobjc_suffix %{plv libobjc %{libobjc_sover}} +%define libgfortran_suffix %{plv libgfortran %{libgfortran_sover}} +%define libquadmath_suffix %{plv libquadmath %{libquadmath_sover}} +%define libasan_suffix %{plv libasan %{libasan_sover}} +%define libtsan_suffix %{plv libtsan %{libtsan_sover}} +%define libhwasan_suffix %{plv libhwasan %{libhwasan_sover}} +%define libatomic_suffix %{plv libatomic %{libatomic_sover}} +%define libitm_suffix %{plv libitm %{libitm_sover}} +%define libubsan_suffix %{plv libubsan %{libubsan_sover}} +%define liblsan_suffix %{plv liblsan %{liblsan_sover}} +%define libvtv_suffix %{plv libvtv %{libvtv_sover}} +%define libgo_suffix %{plv libgo %{libgo_sover}} +%define libgphobos_suffix %{plv libgphobos %{libgphobos_sover}} +%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}} +%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}} +%define libm2_suffix %{plv libm2 %{libm2_sover}} + +# libFOO-devel package suffix +%define libdevel_suffix -gcc15 +%global disable_32bit 1 +%define biarch_targets x86_64 + +URL: https://gcc.gnu.org/ +Version: 15.2.0 +Release: %autorelease +%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) +%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') +%define binsuffix -15 + +Name: gcc15 +BuildRequires: xz +BuildRequires: libzstd-devel +# With generated files in src we could drop the following +BuildRequires: bison +BuildRequires: flex +BuildRequires: gettext-devel +BuildRequires: texinfo +# until here, but at least renaming and patching info files breaks this +BuildRequires: gcc-c++ +BuildRequires: mpc-devel +BuildRequires: mpfr-devel +BuildRequires: perl +BuildRequires: zlib-devel +# for SDT markers in the C++ unwinder and gdb breakpoints on exceptions +BuildRequires: (systemtap-headers or systemtap-sdt-devel) +BuildRequires: isl-devel +%define hostsuffix %{nil} +%if %{build_ada} +%if 0%{?gcc_version:%{gcc_version}} > 14 +%define hostsuffix %{binsuffix} +BuildRequires: gcc15-ada +BuildRequires: gcc15-c++ +%else +%define hostsuffix %{nil} +BuildRequires: gcc-ada +%endif +%endif +%if %{build_d} +BuildRequires: gcc-d +%endif +%if 0%{?run_tests:1} +BuildRequires: dejagnu +BuildRequires: expect +BuildRequires: gdb +BuildRequires: timezone +%if %{build_go} +BuildRequires: netcfg +BuildRequires: procps +%endif +%endif +#!BuildIgnore: gcc-PIE + +%define separate_bi32 0 +%define separate_bi64 0 +%if 0%{!?disable_32bit:1} +%ifarch x86_64 +%define separate_bi32 1 +%endif +%define disable_multilib_arch %{nil} +%else +%define disable_multilib_arch x86_64 +%endif + +# Define two macros to trigger -32bit or -64bit package variants +%define separate_biarch 0 +%if %{separate_bi32} +%define separate_biarch 1 +%define separate_biarch_suffix -32bit +%endif +%if %{separate_bi64} +%define separate_biarch 1 +%define separate_biarch_suffix -64bit +%endif + +%ifarch aarch64 x86_64 riscv64 +# 64-bit is primary build target +%define build_primary_64bit 1 +%else +%define build_primary_64bit 0 +%endif + +%if !0%{?building_testsuite:1} +Requires: binutils +Requires: cpp15 = %{version}-%{release} +Requires: glibc-devel +Requires: libgcc_s%{libgcc_s} >= %{version}-%{release} +Requires: libgomp%{libgomp_sover} >= %{version}-%{release} +%ifarch %asan_arch +Requires: libasan%{libasan_sover} >= %{version}-%{release} +%endif +%ifarch %tsan_arch +%if %{build_primary_64bit} +Requires: libtsan%{libtsan_sover} >= %{version}-%{release} +%endif +%endif +%ifarch %hwasan_arch +Requires: libhwasan%{libhwasan_sover} >= %{version}-%{release} +%endif +%ifarch %atomic_arch +Requires: libatomic%{libatomic_sover} >= %{version}-%{release} +%endif +%ifarch %itm_arch +Requires: libitm%{libitm_sover} >= %{version}-%{release} +%endif +%ifarch %lsan_arch +%if %{build_primary_64bit} +Requires: liblsan%{liblsan_sover} >= %{version}-%{release} +%endif +%endif +%ifarch %ubsan_arch +Requires: libubsan%{libubsan_sover} >= %{version}-%{release} +%endif +%ifarch %vtv_arch +Requires: libvtv%{libvtv_sover} >= %{version}-%{release} +%endif +Suggests: gcc15-info gcc15-locale +%endif + +Group: Development/Languages/C and C++ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz +Patch2: gcc-add-defaultsspec.diff +Patch60: gcc44-textdomain.patch +Patch61: gcc44-rename-info-files.patch + +# RVA23 Enablement Patches +# Rebased against 15.2, 20250910 +Patch1001: 0001-PATCH-RISC-V-Imply-C-from-Zca-whenever-possible-PR11.patch +Patch1002: 0002-RISC-V-Fix-missing-implied-Zicsr-from-Zve32x.patch +Patch1003: 0003-RISC-V-Add-new-option-param-gpr2vr-cost-for-rvv-insn.patch +Patch1004: 0004-PATCH-RISC-V-Recognized-svadu-and-svade-extension.patch +Patch1005: 0005-PATCH-RISC-V-Minimal-support-for-sdtrig-and-ssstrict.patch +Patch1006: 0006-PATCH-RISC-V-Minimal-support-for-zama16b-extension.patch +Patch1007: 0007-RISC-V-Support-RISC-V-Profiles-20-22.patch +Patch1008: 0008-RISC-V-Support-RISC-V-Profiles-23.patch +Patch1009: 0009-RISC-V-Support-for-zilsd-and-zclsd-extensions.patch +Patch1010: 0010-RISC-V-Minimal-support-for-ssnpm-smnpm-and-smmpm-ext.patch +Patch1011: 0011-RISC-V-Introduce-riscv-ext-.def-to-define-extensions.patch +Patch1012: 0012-RISC-V-Use-riscv-ext.def-to-generate-target-options-.patch +Patch1013: 0013-RISC-V-Generate-extension-table-in-documentation-fro.patch +Patch1014: 0014-RISC-V-Adjust-riscv_can_inline_p.patch +Patch1015: 0015-RISC-V-Introduce-riscv_ext_info_t-to-hold-extension-.patch +Patch1016: 0016-RISC-V-Drop-riscv_implied_info-and-riscv_combine_inf.patch +Patch1017: 0017-RISC-V-Drop-riscv_ext_version_table-in-favor-of-risc.patch +Patch1018: 0018-RISC-V-Drop-riscv_ext_flag_table-in-favor-of-riscv_e.patch +Patch1019: 0019-RISC-V-Add-augmented-hypervisor-series-extensions.patch +Patch1020: 0020-RISC-V-Support-CPUs-in-march.patch +Patch1021: 0021-RISC-V-Add-minimal-support-of-double-trap-extension-.patch +Patch1022: 0022-PATCH-RISC-V-Add-smcntrpmf-extension.patch +Patch1023: 0023-RISC-V-Add-Shlcofideleg-extension.patch +Patch1024: 0024-PATCH-v2-RISC-V-Add-svbare-extension.patch +Patch1025: 0025-PATCH-RISC-V-Imply-zicsr-for-svade-and-svadu-extensi.patch +Patch1026: 0026-RISC-V-Update-extension-defination.patch +Patch1027: 0027-RISC-V-Support-Sm-scsrind-extensions.patch +Patch1028: 0028-RISC-V-Support-Smrnmi-extension.patch +Patch1029: 0029-RISC-V-Support-Ssccptr-extension.patch +Patch1030: 0030-RISC-V-Support-Sscounterenw-extension.patch +Patch1031: 0031-RISC-V-Support-Sstvala-extension.patch +Patch1032: 0032-RISC-V-Support-Sstvecd-extension.patch +Patch1033: 0033-RISC-V-Support-Ssu64xl-extension.patch +Patch1034: 0034-RISC-V-Update-Profiles-string-in-RV23.patch +Patch1035: 0035-RISC-V-Add-Profiles-RVA-B23S64-support.patch +Patch1036: 0036-RISC-V-check-if-we-can-vec_extract.patch + +License: GPL-3.0-or-later +Summary: The GNU C Compiler and Support Files + +%description +Core package for the GNU Compiler Collection, including the C language +frontend. + +Language frontends other than C are split to different sub-packages, +namely gcc-ada, gcc-c++, gcc-fortran, gcc-obj, gcc-obj-c++, gcc-go, +gcc-rust and gcc-m2. + +%package -n gcc15-32bit +Summary: The GNU C Compiler 32bit support +Group: Development/Languages/C and C++ +Requires: gcc15 = %{version}-%{release} +Requires: libgcc_s%{libgcc_s}-32bit >= %{version}-%{release} +Requires: libgomp%{libgomp_sover}-32bit >= %{version}-%{release} +%ifarch %asan_arch +Requires: libasan%{libasan_sover}-32bit >= %{version}-%{release} +%endif +%ifarch %atomic_arch +Requires: libatomic%{libatomic_sover}-32bit >= %{version}-%{release} +%endif +%ifarch %itm_arch +Requires: libitm%{libitm_sover}-32bit >= %{version}-%{release} +%endif +%ifarch %ubsan_arch +Requires: libubsan%{libubsan_sover}-32bit >= %{version}-%{release} +%endif +%ifarch %vtv_arch +Requires: libvtv%{libvtv_sover}-32bit >= %{version}-%{release} +%endif +Requires: glibc-devel-32bit glibc-32bit + +%description -n gcc15-32bit +This package contains 32bit support for the GNU Compiler Collection. + +%package -n gcc15-64bit +Summary: The GNU C Compiler 64bit support +Group: Development/Languages/C and C++ +Requires: gcc15 = %{version}-%{release} +Requires: libgcc_s%{libgcc_s}-64bit >= %{version}-%{release} +Requires: libgomp%{libgomp_sover}-64bit >= %{version}-%{release} +%ifarch %asan_arch +Requires: libasan%{libasan_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %tsan_arch +Requires: libtsan%{libtsan_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %hwasan_arch +Requires: libhwasan%{libhwasan_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %atomic_arch +Requires: libatomic%{libatomic_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %itm_arch +Requires: libitm%{libitm_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %lsan_arch +Requires: liblsan%{liblsan_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %ubsan_arch +Requires: libubsan%{libubsan_sover}-64bit >= %{version}-%{release} +%endif +%ifarch %vtv_arch +Requires: libvtv%{libvtv_sover}-64bit >= %{version}-%{release} +%endif +Requires: glibc-devel-64bit + +%description -n gcc15-64bit +This package contains 64bit support for the GNU Compiler Collection. + +%package devel +Summary: GCC plugins development enviroment +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Requires: gcc15 = %{version}-%{release} +Requires: gmp-devel +Requires: mpc-devel + +%description devel +Files required for developing and compiling GCC plugins. + +%package locale +Summary: Locale Data for the GNU Compiler Collection +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Requires: gcc15 = %{version}-%{release} + +%description locale +Locale data for the GNU Compiler Collection (GCC) to give error message +in the current locale. + +%package PIE +Summary: A default configuration to build all binaries in PIE mode +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} + +%description PIE +This package contains a configuration file (spec) that changes the +compilers default setting to build all ELF binaries in the Position +Independend Executable (PIE) variant. This enables better address +space randomization (ASLR). + +%package c++ +Summary: The GNU C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-c++ = %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} = %{version}-%{release} + +%description c++ +This package contains the GNU compiler for C++. + +%package c++-32bit +Summary: The GNU C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-c++ = %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit = %{version}-%{release} + +%description c++-32bit +This package contains the GNU compiler for C++. + +%package c++-64bit +Summary: The GNU C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-c++ = %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit = %{version}-%{release} + +%description c++-64bit +This package contains the GNU compiler for C++. + +%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} +Summary: Include Files and Libraries mandatory for Development +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/C and C++ +Requires: glibc-devel +Requires: libstdc++%{libstdcxx_sover} >= %{version}-%{release} + +%description -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} +This package contains all the headers and libraries of the standard C++ +library. It is needed for compiling C++ code. + +%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit +Summary: Include Files and Libraries mandatory for Development +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/C and C++ +Requires: glibc-devel-32bit glibc-32bit +Requires: libstdc++%{libstdcxx_sover}-32bit >= %{version}-%{release} + +%description -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit +This package contains all the headers and libraries of the standard C++ +library. It is needed for compiling C++ code. + +%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit +Summary: Include Files and Libraries mandatory for Development +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/C and C++ +Requires: glibc-devel-64bit +Requires: libstdc++%{libstdcxx_sover}-64bit >= %{version}-%{release} + +%description -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit +This package contains all the headers and libraries of the standard C++ +library. It is needed for compiling C++ code. + +%package -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix} +Summary: GDB pretty printers for the C++ standard library +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +# The -pp packages are tied to a specific shared library +Requires: libstdc++%{libstdcxx_sover} = %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix} = %{version}-%{release} +Provides: libstdc++%{libstdcxx_sover}-pp = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover}-pp +# packageand() does not work with versioned specifications so the fallback +# is a Requires from libstdc++-devel to preserve previous behavior. +Supplements: (gdb and libstdc++%{libstdcxx_sover} = %{version}-%{release}) + +%description -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix} +This package contains pretty printers for the C++ standard library usable +from GDB. + +%package -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix}-32bit +Summary: GDB pretty printers for the C++ standard library +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +# The -pp packages are tied to a specific shared library +Requires: libstdc++%{libstdcxx_sover}-32bit = %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix} = %{version}-%{release} +Provides: libstdc++%{libstdcxx_sover}-pp-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover}-pp-32bit +# packageand() does not work with versioned specifications so the fallback +# is a Requires from libstdc++-devel to preserve previous behavior. +Supplements: (gdb and libstdc++%{libstdcxx_sover}-32bit = %{version}-%{release}) + +%description -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix}-32bit +This package contains pretty printers for the C++ standard library usable +from GDB. + +%package -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix}-64bit +Summary: GDB pretty printers for the C++ standard library +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +# The -pp packages are tied to a specific shared library +Requires: libstdc++%{libstdcxx_sover}-64bit = %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix} = %{version}-%{release} +Provides: libstdc++%{libstdcxx_sover}-pp-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover}-pp-64bit +# packageand() does not work with versioned specifications so the fallback +# is a Requires from libstdc++-devel to preserve previous behavior. +Supplements: (gdb and libstdc++%{libstdcxx_sover}-64bit = %{version}-%{release}) + +%description -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix}-64bit +This package contains pretty printers for the C++ standard library usable +from GDB. + +%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} +Summary: C compiler runtime library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Base +Provides: libgcc_s%{libgcc_s} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgcc_s%{libgcc_s} + +%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} +Libgcc is needed for dynamically linked C programs. + +%post -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} -p /sbin/ldconfig + +%postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} -p /sbin/ldconfig + +%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit +Summary: C compiler runtime library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Base +Provides: libgcc_s%{libgcc_s}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgcc_s%{libgcc_s}-32bit + +%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit +Libgcc is needed for dynamically linked C programs. + +%post -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit -p /sbin/ldconfig + +%postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit -p /sbin/ldconfig + +%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit +Summary: C compiler runtime library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Base +Provides: libgcc_s%{libgcc_s}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgcc_s%{libgcc_s}-64bit + +%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit +Libgcc is needed for dynamically linked C programs. + +%post -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit -p /sbin/ldconfig + +%postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit -p /sbin/ldconfig + +%package -n libgomp%{libgomp_sover}%{libgomp_suffix} +Summary: The GNU compiler collection OpenMP runtime library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Base +Provides: libgomp%{libgomp_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgomp%{libgomp_sover} + +%description -n libgomp%{libgomp_sover}%{libgomp_suffix} +This is the OpenMP runtime library needed by OpenMP enabled programs +that were built with the -fopenmp compiler option and by programs that +were auto-parallelized via the -ftree-parallelize-loops compiler +option. + + +%post -n libgomp%{libgomp_sover}%{libgomp_suffix} -p /sbin/ldconfig + +%postun -n libgomp%{libgomp_sover}%{libgomp_suffix} -p /sbin/ldconfig + +%package -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit +Summary: The GNU compiler collection OpenMP runtime library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Base +Provides: libgomp%{libgomp_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgomp%{libgomp_sover}-32bit + +%description -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit +This is the OpenMP runtime library needed by OpenMP enabled programs +that were built with the -fopenmp compiler option and by programs that +were auto-parallelized via the -ftree-parallelize-loops compiler +option. + + +%post -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit -p /sbin/ldconfig + +%postun -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit -p /sbin/ldconfig + +%package -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit +Summary: The GNU compiler collection OpenMP runtime library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Base +Provides: libgomp%{libgomp_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgomp%{libgomp_sover}-64bit + +%description -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit +This is the OpenMP runtime library needed by OpenMP enabled programs +that were built with the -fopenmp compiler option and by programs that +were auto-parallelized via the -ftree-parallelize-loops compiler +option. + + +%post -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit -p /sbin/ldconfig + +%postun -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit -p /sbin/ldconfig + +%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} +Summary: The standard C++ shared library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Suggests: libstdc++%{libstdcxx_sover}-locale +Provides: libstdc++%{libstdcxx_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover} +# The std::chrono timezone database is provided by timezone +# (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, + +%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} +The standard C++ library, needed for dynamically linked C++ programs. + + +%post -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} -p /sbin/ldconfig + +%postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} -p /sbin/ldconfig + +%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit +Summary: The standard C++ shared library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Suggests: libstdc++%{libstdcxx_sover}-locale +Provides: libstdc++%{libstdcxx_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover}-32bit +# The std::chrono timezone database is provided by timezone +# (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, + +%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit +The standard C++ library, needed for dynamically linked C++ programs. + + +%post -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit -p /sbin/ldconfig + +%postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit -p /sbin/ldconfig + +%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit +Summary: The standard C++ shared library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Suggests: libstdc++%{libstdcxx_sover}-locale +Provides: libstdc++%{libstdcxx_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover}-64bit +# The std::chrono timezone database is provided by timezone +# (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, + +%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit +The standard C++ library, needed for dynamically linked C++ programs. + + +%post -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit -p /sbin/ldconfig + +%postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit -p /sbin/ldconfig + +%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale +Summary: Standard C++ Library Locales +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Provides: libstdc++%{libstdcxx_sover}-locale = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libstdc++%{libstdcxx_sover}-locale + +%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale +The standard C++ library locale data. + +%package info +Summary: Documentation for the GNU compiler collection +License: GFDL-1.2-only +Group: Documentation/Other +PreReq: texinfo +BuildArch: noarch + +%description info +GNU info-pages for the GNU compiler collection covering both user-level +and internals documentation. + +%package objc +Summary: GNU Objective C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-objc = %{version}-%{release} +Requires: libobjc%{libobjc_sover} >= %{version}-%{release} + +%description objc +This package contains the GNU Objective C compiler. Objective C is an +object oriented language, created by Next Inc. and used in their +Nextstep OS. The source code is available in the gcc package. + +%package objc-32bit +Summary: GNU Objective C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-objc = %{version}-%{release} +Requires: libobjc%{libobjc_sover}-32bit >= %{version}-%{release} + +%description objc-32bit +This package contains the GNU Objective C compiler. Objective C is an +object oriented language, created by Next Inc. and used in their +Nextstep OS. The source code is available in the gcc package. + +%package objc-64bit +Summary: GNU Objective C Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-objc = %{version}-%{release} +Requires: libobjc%{libobjc_sover}-64bit >= %{version}-%{release} + +%description objc-64bit +This package contains the GNU Objective C compiler. Objective C is an +object oriented language, created by Next Inc. and used in their +Nextstep OS. The source code is available in the gcc package. + +%package -n libobjc%{libobjc_sover}%{libobjc_suffix} +Summary: Library for the GNU Objective C Compiler +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Libraries/Other +Provides: libobjc%{libobjc_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libobjc%{libobjc_sover} + +%description -n libobjc%{libobjc_sover}%{libobjc_suffix} +The library for the GNU Objective C compiler. + +%post -n libobjc%{libobjc_sover}%{libobjc_suffix} -p /sbin/ldconfig + +%postun -n libobjc%{libobjc_sover}%{libobjc_suffix} -p /sbin/ldconfig + +%package -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit +Summary: Library for the GNU Objective C Compiler +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Libraries/Other +Provides: libobjc%{libobjc_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libobjc%{libobjc_sover}-32bit + +%description -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit +The library for the GNU Objective C compiler. + +%post -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit -p /sbin/ldconfig + +%postun -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit -p /sbin/ldconfig + +%package -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit +Summary: Library for the GNU Objective C Compiler +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Libraries/Other +Provides: libobjc%{libobjc_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libobjc%{libobjc_sover}-64bit + +%description -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit +The library for the GNU Objective C compiler. + +%post -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit -p /sbin/ldconfig + +%postun -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit -p /sbin/ldconfig + +%package obj-c++ +Summary: GNU Objective C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-c++ = %{version}-%{release} +Requires: gcc15-obj-c++ = %{version}-%{release} +Requires: gcc15-objc = %{version}-%{release} + +%description obj-c++ +This package contains the GNU Objective C++ compiler. Objective C++ is an +object oriented language, created by Next Inc. and used in their +Nextstep OS. The source code is available in the gcc package. + +%package obj-c++-32bit +Summary: GNU Objective C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-c++-32bit = %{version}-%{release} +Requires: gcc15-obj-c++ = %{version}-%{release} +Requires: gcc15-objc-32bit = %{version}-%{release} + +%description obj-c++-32bit +This package contains the GNU Objective C++ compiler. Objective C++ is an +object oriented language, created by Next Inc. and used in their +Nextstep OS. The source code is available in the gcc package. + +%package obj-c++-64bit +Summary: GNU Objective C++ Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-c++-64bit = %{version}-%{release} +Requires: gcc15-obj-c++ = %{version}-%{release} +Requires: gcc15-objc-64bit = %{version}-%{release} + +%description obj-c++-64bit +This package contains the GNU Objective C++ compiler. Objective C++ is an +object oriented language, created by Next Inc. and used in their +Nextstep OS. The source code is available in the gcc package. + +%package -n cpp15 +Summary: The GCC Preprocessor +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ + +%description -n cpp15 +This Package contains just the preprocessor that is used by the X11 +packages. + +%package ada +Summary: GNU Ada Compiler Based on GCC (GNAT) +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-ada = %{version}-%{release} +Requires: libada15 = %{version}-%{release} + +%description ada +This package contains an Ada compiler and associated development +tools based on the GNU GCC technology. + +%package ada-32bit +Summary: GNU Ada Compiler Based on GCC (GNAT) +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-ada = %{version}-%{release} +Requires: libada15-32bit = %{version}-%{release} + +%description ada-32bit +This package contains an Ada compiler and associated development +tools based on the GNU GCC technology. + +%package ada-64bit +Summary: GNU Ada Compiler Based on GCC (GNAT) +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-ada = %{version}-%{release} +Requires: libada15-64bit = %{version}-%{release} + +%description ada-64bit +This package contains an Ada compiler and associated development +tools based on the GNU GCC technology. + +%package -n libada15 +Summary: GNU Ada Runtime Libraries +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Provides: libgnarl-15 = %{version}-%{release} +Conflicts: libgnarl-15 +Provides: libgnat-15 = %{version}-%{release} +Conflicts: libgnat-15 + +%description -n libada15 +This package contains the shared libraries required to run programs +compiled with the GNU Ada compiler (GNAT) if they are compiled to use +shared libraries. It also contains the shared libraries for the +Implementation of the Ada Semantic Interface Specification (ASIS), the +implementation of Distributed Systems Programming (GLADE) and the Posix +1003.5 Binding (Florist). + +%post -n libada15 -p /sbin/ldconfig + +%postun -n libada15 -p /sbin/ldconfig + +%package -n libada15-32bit +Summary: GNU Ada Runtime Libraries +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Provides: libgnarl-15-32bit = %{version}-%{release} +Conflicts: libgnarl-15-32bit +Provides: libgnat-15-32bit = %{version}-%{release} +Conflicts: libgnat-15-32bit + +%description -n libada15-32bit +This package contains the shared libraries required to run programs +compiled with the GNU Ada compiler (GNAT) if they are compiled to use +shared libraries. It also contains the shared libraries for the +Implementation of the Ada Semantic Interface Specification (ASIS), the +implementation of Distributed Systems Programming (GLADE) and the Posix +1003.5 Binding (Florist). + +%post -n libada15-32bit -p /sbin/ldconfig + +%postun -n libada15-32bit -p /sbin/ldconfig + +%package -n libada15-64bit +Summary: GNU Ada Runtime Libraries +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: System/Libraries +Provides: libgnarl-15-64bit = %{version}-%{release} +Conflicts: libgnarl-15-64bit +Provides: libgnat-15-64bit = %{version}-%{release} +Conflicts: libgnat-15-64bit + +%description -n libada15-64bit +This package contains the shared libraries required to run programs +compiled with the GNU Ada compiler (GNAT) if they are compiled to use +shared libraries. It also contains the shared libraries for the +Implementation of the Ada Semantic Interface Specification (ASIS), the +implementation of Distributed Systems Programming (GLADE) and the Posix +1003.5 Binding (Florist). + +%post -n libada15-64bit -p /sbin/ldconfig + +%postun -n libada15-64bit -p /sbin/ldconfig + +%package fortran +Summary: The GNU Fortran Compiler and Support Files +License: GPL-3.0-or-later +Group: Development/Languages/Fortran +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-fortran = %{version}-%{release} +Requires: libgfortran%{libgfortran_sover} >= %{version}-%{release} +%ifarch %quadmath_arch +Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix} = %{version}-%{release} +%endif + +%description fortran +This is the Fortran compiler of the GNU Compiler Collection (GCC). + +%package fortran-32bit +Summary: The GNU Fortran Compiler and Support Files +License: GPL-3.0-or-later +Group: Development/Languages/Fortran +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-fortran = %{version}-%{release} +Requires: libgfortran%{libgfortran_sover}-32bit >= %{version}-%{release} +%ifarch %quadmath_arch +Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-32bit = %{version}-%{release} +%endif + +%description fortran-32bit +This is the Fortran compiler of the GNU Compiler Collection (GCC). + +%package fortran-64bit +Summary: The GNU Fortran Compiler and Support Files +License: GPL-3.0-or-later +Group: Development/Languages/Fortran +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-fortran = %{version}-%{release} +Requires: libgfortran%{libgfortran_sover}-64bit >= %{version}-%{release} +%ifarch %quadmath_arch +Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-64bit = %{version}-%{release} +%endif + +%description fortran-64bit +This is the Fortran compiler of the GNU Compiler Collection (GCC). + +%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} +Summary: The GNU Fortran Compiler Runtime Library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/Fortran +%ifarch %quadmath_arch +Requires: libquadmath%{libquadmath_sover} >= %{version}-%{release} +%endif +Provides: libgfortran%{libgfortran_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgfortran%{libgfortran_sover} + +%description -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} +The runtime library needed to run programs compiled with the Fortran compiler +of the GNU Compiler Collection (GCC). + +%post -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} -p /sbin/ldconfig + +%postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} -p /sbin/ldconfig + +%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit +Summary: The GNU Fortran Compiler Runtime Library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/Fortran +%ifarch %quadmath_arch +Requires: libquadmath%{libquadmath_sover}-32bit >= %{version}-%{release} +%endif +Provides: libgfortran%{libgfortran_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgfortran%{libgfortran_sover}-32bit + +%description -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit +The runtime library needed to run programs compiled with the Fortran compiler +of the GNU Compiler Collection (GCC). + +%post -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit -p /sbin/ldconfig + +%postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit -p /sbin/ldconfig + +%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit +Summary: The GNU Fortran Compiler Runtime Library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/Fortran +%ifarch %quadmath_arch +Requires: libquadmath%{libquadmath_sover}-64bit >= %{version}-%{release} +%endif +Provides: libgfortran%{libgfortran_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgfortran%{libgfortran_sover}-64bit + +%description -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit +The runtime library needed to run programs compiled with the Fortran compiler +of the GNU Compiler Collection (GCC). + +%post -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit -p /sbin/ldconfig + +%postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit -p /sbin/ldconfig + +%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} +Summary: The GNU Fortran Compiler Quadmath Runtime Library +License: LGPL-2.1-only +Group: Development/Languages/Fortran +Provides: libquadmath%{libquadmath_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libquadmath%{libquadmath_sover} + +%description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} +The runtime library needed to run programs compiled with the Fortran compiler +of the GNU Compiler Collection (GCC) and quadruple precision floating point +operations. + +%post -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} -p /sbin/ldconfig + +%postun -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} -p /sbin/ldconfig + +%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit +Summary: The GNU Fortran Compiler Quadmath Runtime Library +License: LGPL-2.1-only +Group: Development/Languages/Fortran +Provides: libquadmath%{libquadmath_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libquadmath%{libquadmath_sover}-32bit + +%description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit +The runtime library needed to run programs compiled with the Fortran compiler +of the GNU Compiler Collection (GCC) and quadruple precision floating point +operations. + +%post -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit -p /sbin/ldconfig + +%postun -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit -p /sbin/ldconfig + +%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit +Summary: The GNU Fortran Compiler Quadmath Runtime Library +License: LGPL-2.1-only +Group: Development/Languages/Fortran +Provides: libquadmath%{libquadmath_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libquadmath%{libquadmath_sover}-64bit + +%description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit +The runtime library needed to run programs compiled with the Fortran compiler +of the GNU Compiler Collection (GCC) and quadruple precision floating point +operations. + +%post -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit -p /sbin/ldconfig + +%postun -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit -p /sbin/ldconfig + +%package -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix} +Summary: The GNU Fortran Compiler Quadmath Runtime Library Development Files +License: LGPL-2.1-only +Group: Development/Languages/Fortran +Requires: libquadmath%{libquadmath_sover} >= %{version}-%{release} + +%description -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix} +The libquadmatah runtime library development files. + +%package -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-32bit +Summary: The GNU Fortran Compiler Quadmath Runtime Library Development Files +License: LGPL-2.1-only +Group: Development/Languages/Fortran +Requires: libquadmath%{libquadmath_sover}-32bit >= %{version}-%{release} + +%description -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-32bit +The libquadmatah runtime library development files. + +%package -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-64bit +Summary: The GNU Fortran Compiler Quadmath Runtime Library Development Files +License: LGPL-2.1-only +Group: Development/Languages/Fortran +Requires: libquadmath%{libquadmath_sover}-64bit >= %{version}-%{release} + +%description -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-64bit +The libquadmatah runtime library development files. + +%package -n libitm%{libitm_sover}%{libitm_suffix} +Summary: The GNU Compiler Transactional Memory Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libitm%{libitm_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libitm%{libitm_sover} + +%description -n libitm%{libitm_sover}%{libitm_suffix} +The runtime library needed to run programs compiled with the +-fgnu-tm option of the GNU Compiler Collection (GCC). + +%post -n libitm%{libitm_sover}%{libitm_suffix} -p /sbin/ldconfig + +%postun -n libitm%{libitm_sover}%{libitm_suffix} -p /sbin/ldconfig + +%package -n libitm%{libitm_sover}%{libitm_suffix}-32bit +Summary: The GNU Compiler Transactional Memory Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libitm%{libitm_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libitm%{libitm_sover}-32bit + +%description -n libitm%{libitm_sover}%{libitm_suffix}-32bit +The runtime library needed to run programs compiled with the +-fgnu-tm option of the GNU Compiler Collection (GCC). + +%post -n libitm%{libitm_sover}%{libitm_suffix}-32bit -p /sbin/ldconfig + +%postun -n libitm%{libitm_sover}%{libitm_suffix}-32bit -p /sbin/ldconfig + +%package -n libitm%{libitm_sover}%{libitm_suffix}-64bit +Summary: The GNU Compiler Transactional Memory Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libitm%{libitm_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libitm%{libitm_sover}-64bit + +%description -n libitm%{libitm_sover}%{libitm_suffix}-64bit +The runtime library needed to run programs compiled with the +-fgnu-tm option of the GNU Compiler Collection (GCC). + +%post -n libitm%{libitm_sover}%{libitm_suffix}-64bit -p /sbin/ldconfig + +%postun -n libitm%{libitm_sover}%{libitm_suffix}-64bit -p /sbin/ldconfig + +%package -n libasan%{libasan_sover}%{libasan_suffix} +Summary: The GNU Compiler Address Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libasan%{libasan_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libasan%{libasan_sover} + +%description -n libasan%{libasan_sover}%{libasan_suffix} +The runtime library needed to run programs compiled with the +-fsanitize=address option of the GNU Compiler Collection (GCC). + +%post -n libasan%{libasan_sover}%{libasan_suffix} -p /sbin/ldconfig + +%postun -n libasan%{libasan_sover}%{libasan_suffix} -p /sbin/ldconfig + +%package -n libasan%{libasan_sover}%{libasan_suffix}-32bit +Summary: The GNU Compiler Address Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libasan%{libasan_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libasan%{libasan_sover}-32bit + +%description -n libasan%{libasan_sover}%{libasan_suffix}-32bit +The runtime library needed to run programs compiled with the +-fsanitize=address option of the GNU Compiler Collection (GCC). + +%post -n libasan%{libasan_sover}%{libasan_suffix}-32bit -p /sbin/ldconfig + +%postun -n libasan%{libasan_sover}%{libasan_suffix}-32bit -p /sbin/ldconfig + +%package -n libasan%{libasan_sover}%{libasan_suffix}-64bit +Summary: The GNU Compiler Address Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libasan%{libasan_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libasan%{libasan_sover}-64bit + +%description -n libasan%{libasan_sover}%{libasan_suffix}-64bit +The runtime library needed to run programs compiled with the +-fsanitize=address option of the GNU Compiler Collection (GCC). + +%post -n libasan%{libasan_sover}%{libasan_suffix}-64bit -p /sbin/ldconfig + +%postun -n libasan%{libasan_sover}%{libasan_suffix}-64bit -p /sbin/ldconfig + +%package -n libtsan%{libtsan_sover}%{libtsan_suffix} +Summary: The GNU Compiler Thread Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libtsan%{libtsan_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libtsan%{libtsan_sover} + +%description -n libtsan%{libtsan_sover}%{libtsan_suffix} +The runtime library needed to run programs compiled with the +-fsanitize=thread option of the GNU Compiler Collection (GCC). + +%post -n libtsan%{libtsan_sover}%{libtsan_suffix} -p /sbin/ldconfig + +%postun -n libtsan%{libtsan_sover}%{libtsan_suffix} -p /sbin/ldconfig + +%package -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit +Summary: The GNU Compiler Thread Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libtsan%{libtsan_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libtsan%{libtsan_sover}-32bit + +%description -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit +The runtime library needed to run programs compiled with the +-fsanitize=thread option of the GNU Compiler Collection (GCC). + +%post -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit -p /sbin/ldconfig + +%postun -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit -p /sbin/ldconfig + +%package -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit +Summary: The GNU Compiler Thread Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libtsan%{libtsan_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libtsan%{libtsan_sover}-64bit + +%description -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit +The runtime library needed to run programs compiled with the +-fsanitize=thread option of the GNU Compiler Collection (GCC). + +%post -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit -p /sbin/ldconfig + +%postun -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit -p /sbin/ldconfig + +%package -n libhwasan%{libhwasan_sover}%{libhwasan_suffix} +Summary: The GNU Compiler Hardware-assisted Address Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libhwasan%{libhwasan_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libhwasan%{libhwasan_sover} + +%description -n libhwasan%{libhwasan_sover}%{libhwasan_suffix} +The runtime library needed to run programs compiled with the +-fsanitize=hwaddress option of the GNU Compiler Collection (GCC). + +%post -n libhwasan%{libhwasan_sover}%{libhwasan_suffix} -p /sbin/ldconfig + +%postun -n libhwasan%{libhwasan_sover}%{libhwasan_suffix} -p /sbin/ldconfig + +%package -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-32bit +Summary: The GNU Compiler Hardware-assisted Address Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libhwasan%{libhwasan_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libhwasan%{libhwasan_sover}-32bit + +%description -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-32bit +The runtime library needed to run programs compiled with the +-fsanitize=hwaddress option of the GNU Compiler Collection (GCC). + +%post -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-32bit -p /sbin/ldconfig + +%postun -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-32bit -p /sbin/ldconfig + +%package -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-64bit +Summary: The GNU Compiler Hardware-assisted Address Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libhwasan%{libhwasan_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libhwasan%{libhwasan_sover}-64bit + +%description -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-64bit +The runtime library needed to run programs compiled with the +-fsanitize=hwaddress option of the GNU Compiler Collection (GCC). + +%post -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-64bit -p /sbin/ldconfig + +%postun -n libhwasan%{libhwasan_sover}%{libhwasan_suffix}-64bit -p /sbin/ldconfig + +%package -n libatomic%{libatomic_sover}%{libatomic_suffix} +Summary: The GNU Compiler Atomic Operations Runtime Library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/C and C++ +Provides: libatomic%{libatomic_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libatomic%{libatomic_sover} + +%description -n libatomic%{libatomic_sover}%{libatomic_suffix} +The runtime library for atomic operations of the GNU Compiler Collection (GCC). + +%post -n libatomic%{libatomic_sover}%{libatomic_suffix} -p /sbin/ldconfig + +%postun -n libatomic%{libatomic_sover}%{libatomic_suffix} -p /sbin/ldconfig + +%package -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit +Summary: The GNU Compiler Atomic Operations Runtime Library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/C and C++ +Provides: libatomic%{libatomic_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libatomic%{libatomic_sover}-32bit + +%description -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit +The runtime library for atomic operations of the GNU Compiler Collection (GCC). + +%post -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit -p /sbin/ldconfig + +%postun -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit -p /sbin/ldconfig + +%package -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit +Summary: The GNU Compiler Atomic Operations Runtime Library +License: GPL-3.0-or-later WITH GCC-exception-3.1 +Group: Development/Languages/C and C++ +Provides: libatomic%{libatomic_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libatomic%{libatomic_sover}-64bit + +%description -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit +The runtime library for atomic operations of the GNU Compiler Collection (GCC). + +%post -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit -p /sbin/ldconfig + +%postun -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit -p /sbin/ldconfig + +%package -n liblsan%{liblsan_sover}%{liblsan_suffix} +Summary: The GNU Compiler Leak Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: liblsan%{liblsan_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: liblsan%{liblsan_sover} + +%description -n liblsan%{liblsan_sover}%{liblsan_suffix} +The runtime library needed to run programs compiled with the +-fsanitize=leak option of the GNU Compiler Collection (GCC). + +%post -n liblsan%{liblsan_sover}%{liblsan_suffix} -p /sbin/ldconfig + +%postun -n liblsan%{liblsan_sover}%{liblsan_suffix} -p /sbin/ldconfig + +%package -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit +Summary: The GNU Compiler Leak Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: liblsan%{liblsan_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: liblsan%{liblsan_sover}-32bit + +%description -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit +The runtime library needed to run programs compiled with the +-fsanitize=leak option of the GNU Compiler Collection (GCC). + +%post -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit -p /sbin/ldconfig + +%postun -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit -p /sbin/ldconfig + +%package -n liblsan%{liblsan_sover}%{liblsan_suffix}-64bit +Summary: The GNU Compiler Leak Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: liblsan%{liblsan_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: liblsan%{liblsan_sover}-64bit + +%description -n liblsan%{liblsan_sover}%{liblsan_suffix}-64bit +The runtime library needed to run programs compiled with the +-fsanitize=leak option of the GNU Compiler Collection (GCC). + +%post -n liblsan%{liblsan_sover}%{liblsan_suffix}-64bit -p /sbin/ldconfig + +%postun -n liblsan%{liblsan_sover}%{liblsan_suffix}-64bit -p /sbin/ldconfig + +%package -n libubsan%{libubsan_sover}%{libubsan_suffix} +Summary: The GNU Compiler Undefined Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libubsan%{libubsan_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libubsan%{libubsan_sover} + +%description -n libubsan%{libubsan_sover}%{libubsan_suffix} +The runtime library needed to run programs compiled with the +-fsanitize=undefined option of the GNU Compiler Collection (GCC). + +%post -n libubsan%{libubsan_sover}%{libubsan_suffix} -p /sbin/ldconfig + +%postun -n libubsan%{libubsan_sover}%{libubsan_suffix} -p /sbin/ldconfig + +%package -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit +Summary: The GNU Compiler Undefined Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libubsan%{libubsan_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libubsan%{libubsan_sover}-32bit + +%description -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit +The runtime library needed to run programs compiled with the +-fsanitize=undefined option of the GNU Compiler Collection (GCC). + +%post -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit -p /sbin/ldconfig + +%postun -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit -p /sbin/ldconfig + +%package -n libubsan%{libubsan_sover}%{libubsan_suffix}-64bit +Summary: The GNU Compiler Undefined Sanitizer Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libubsan%{libubsan_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libubsan%{libubsan_sover}-64bit + +%description -n libubsan%{libubsan_sover}%{libubsan_suffix}-64bit +The runtime library needed to run programs compiled with the +-fsanitize=undefined option of the GNU Compiler Collection (GCC). + +%post -n libubsan%{libubsan_sover}%{libubsan_suffix}-64bit -p /sbin/ldconfig + +%postun -n libubsan%{libubsan_sover}%{libubsan_suffix}-64bit -p /sbin/ldconfig + +%package -n libvtv%{libvtv_sover}%{libvtv_suffix} +Summary: The GNU Compiler Vtable Verifier Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libvtv%{libvtv_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libvtv%{libvtv_sover} + +%description -n libvtv%{libvtv_sover}%{libvtv_suffix} +The runtime library needed to run programs compiled with the +-fvtable-verify option of the GNU Compiler Collection (GCC). + +%post -n libvtv%{libvtv_sover}%{libvtv_suffix} -p /sbin/ldconfig + +%postun -n libvtv%{libvtv_sover}%{libvtv_suffix} -p /sbin/ldconfig + +%package -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit +Summary: The GNU Compiler Vtable Verifier Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libvtv%{libvtv_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libvtv%{libvtv_sover}-32bit + +%description -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit +The runtime library needed to run programs compiled with the +-fvtable-verify option of the GNU Compiler Collection (GCC). + +%post -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit -p /sbin/ldconfig + +%postun -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit -p /sbin/ldconfig + +%package -n libvtv%{libvtv_sover}%{libvtv_suffix}-64bit +Summary: The GNU Compiler Vtable Verifier Runtime Library +License: MIT +Group: Development/Languages/C and C++ +Provides: libvtv%{libvtv_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libvtv%{libvtv_sover}-64bit + +%description -n libvtv%{libvtv_sover}%{libvtv_suffix}-64bit +The runtime library needed to run programs compiled with the +-fvtable-verify option of the GNU Compiler Collection (GCC). + +%post -n libvtv%{libvtv_sover}%{libvtv_suffix}-64bit -p /sbin/ldconfig + +%postun -n libvtv%{libvtv_sover}%{libvtv_suffix}-64bit -p /sbin/ldconfig + +%package go +Summary: GNU Go Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-go = %{version}-%{release} +Requires: libgo%{libgo_sover} >= %{version}-%{release} + +%description go +This package contains a Go compiler and associated development +files based on the GNU GCC technology. + +%package go-32bit +Summary: GNU Go Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-go = %{version}-%{release} +Requires: libgo%{libgo_sover}-32bit >= %{version}-%{release} + +%description go-32bit +This package contains a Go compiler and associated development +files based on the GNU GCC technology. + +%package go-64bit +Summary: GNU Go Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-go = %{version}-%{release} +Requires: libgo%{libgo_sover}-64bit >= %{version}-%{release} + +%description go-64bit +This package contains a Go compiler and associated development +files based on the GNU GCC technology. + +%package -n libgo%{libgo_sover}%{libgo_suffix} +Summary: GNU Go compiler runtime library +License: BSD-3-Clause +Group: Development/Languages/Other +Provides: libgo%{libgo_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgo%{libgo_sover} + +%description -n libgo%{libgo_sover}%{libgo_suffix} +Runtime library for the GNU Go language. + +%post -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig + +%postun -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig + +%package -n libgo%{libgo_sover}%{libgo_suffix}-32bit +Summary: GNU Go compiler runtime library +License: BSD-3-Clause +Group: Development/Languages/Other +Provides: libgo%{libgo_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgo%{libgo_sover}-32bit + +%description -n libgo%{libgo_sover}%{libgo_suffix}-32bit +Runtime library for the GNU Go language. + +%post -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig + +%postun -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig + +%package -n libgo%{libgo_sover}%{libgo_suffix}-64bit +Summary: GNU Go compiler runtime library +License: BSD-3-Clause +Group: Development/Languages/Other +Provides: libgo%{libgo_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgo%{libgo_sover}-64bit + +%description -n libgo%{libgo_sover}%{libgo_suffix}-64bit +Runtime library for the GNU Go language. + +%post -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig + +%postun -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig + +%package d +Summary: GNU D Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-d = %{version}-%{release} +Requires: libgdruntime%{libgdruntime_sover} >= %{version}-%{release} +Requires: libgphobos%{libgphobos_sover} >= %{version}-%{release} + +%description d +This package contains a D compiler and associated development +files based on the GNU GCC technology. + +%package d-32bit +Summary: GNU D Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-d = %{version}-%{release} +Requires: libgdruntime%{libgdruntime_sover}-32bit >= %{version}-%{release} +Requires: libgphobos%{libgphobos_sover}-32bit >= %{version}-%{release} + +%description d-32bit +This package contains a D compiler and associated development +files based on the GNU GCC technology. + +%package d-64bit +Summary: GNU D Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-d = %{version}-%{release} +Requires: libgdruntime%{libgdruntime_sover}-64bit >= %{version}-%{release} +Requires: libgphobos%{libgphobos_sover}-64bit >= %{version}-%{release} + +%description d-64bit +This package contains a D compiler and associated development +files based on the GNU GCC technology. + +%package -n libgphobos%{libgphobos_sover}%{libgphobos_suffix} +Summary: GNU D compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libgphobos%{libgphobos_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgphobos%{libgphobos_sover} + +%description -n libgphobos%{libgphobos_sover}%{libgphobos_suffix} +Runtime library for the GNU D language. + +%post -n libgphobos%{libgphobos_sover}%{libgphobos_suffix} -p /sbin/ldconfig + +%postun -n libgphobos%{libgphobos_sover}%{libgphobos_suffix} -p /sbin/ldconfig + +%package -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-32bit +Summary: GNU D compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libgphobos%{libgphobos_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgphobos%{libgphobos_sover}-32bit + +%description -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-32bit +Runtime library for the GNU D language. + +%post -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-32bit -p /sbin/ldconfig + +%postun -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-32bit -p /sbin/ldconfig + +%package -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-64bit +Summary: GNU D compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libgphobos%{libgphobos_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgphobos%{libgphobos_sover}-64bit + +%description -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-64bit +Runtime library for the GNU D language. + +%post -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-64bit -p /sbin/ldconfig + +%postun -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}-64bit -p /sbin/ldconfig + +%package -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix} +Summary: GNU D compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libgdruntime%{libgdruntime_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgdruntime%{libgdruntime_sover} + +%description -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix} +Runtime library for the GNU D language. + +%post -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix} -p /sbin/ldconfig + +%postun -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix} -p /sbin/ldconfig + +%package -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-32bit +Summary: GNU D compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libgdruntime%{libgdruntime_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgdruntime%{libgdruntime_sover}-32bit + +%description -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-32bit +Runtime library for the GNU D language. + +%post -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-32bit -p /sbin/ldconfig + +%postun -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-32bit -p /sbin/ldconfig + +%package -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-64bit +Summary: GNU D compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libgdruntime%{libgdruntime_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgdruntime%{libgdruntime_sover}-64bit + +%description -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-64bit +Runtime library for the GNU D language. + +%post -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-64bit -p /sbin/ldconfig + +%postun -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-64bit -p /sbin/ldconfig + +%package -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +Summary: The GNU Compiler Collection JIT library +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: libgccjit%{libgccjit_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libgccjit%{libgccjit_sover} +# At runtime the JIT needs to be able to invoke the assembler and +# linker and find startfiles and libgcc. The built-in driver knows +# the compilers version install directory only so we require the +# respective compiler libgccjit was built from. +Requires: gcc15 + +%description -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +Support for embedding GCC inside programs and libraries + +%post -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} -p /sbin/ldconfig + +%postun -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} -p /sbin/ldconfig + +%package -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +Summary: Support for embedding GCC inside programs and libraries +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: libgccjit%{libgccjit_sover}-devel = %{version}-%{release} +# Only one gccjit package can be installed at the same time since +# header files conflict +Conflicts: libgccjit%{libgccjit_sover}-devel +Requires: libgccjit%{libgccjit_sover} >= %{version}-%{release} + +%description -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +Package contains header files and documentation for GCC JIT front-end. + +%package rust +Summary: GNU Rust Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-rust = %{version}-%{release} + +%description rust +This package contains a Rust compiler. + +%package rust-32bit +Summary: GNU Rust Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-rust = %{version}-%{release} + +%description rust-32bit +This package contains a Rust compiler. + +%package rust-64bit +Summary: GNU Rust Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-rust = %{version}-%{release} + +%description rust-64bit +This package contains a Rust compiler. + +%package m2 +Summary: GNU Modula-2 Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15 = %{version}-%{release} +Requires: gcc15-m2 = %{version}-%{release} +Requires: libm2cor%{libm2_sover} >= %{version}-%{release} +Requires: libm2iso%{libm2_sover} >= %{version}-%{release} +Requires: libm2log%{libm2_sover} >= %{version}-%{release} +Requires: libm2min%{libm2_sover} >= %{version}-%{release} +Requires: libm2pim%{libm2_sover} >= %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} = %{version}-%{release} + +%description m2 +This package contains a Modula-2 compiler. + +%package m2-32bit +Summary: GNU Modula-2 Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-32bit = %{version}-%{release} +Requires: gcc15-m2 = %{version}-%{release} +Requires: libm2cor%{libm2_sover}-32bit >= %{version}-%{release} +Requires: libm2iso%{libm2_sover}-32bit >= %{version}-%{release} +Requires: libm2log%{libm2_sover}-32bit >= %{version}-%{release} +Requires: libm2min%{libm2_sover}-32bit >= %{version}-%{release} +Requires: libm2pim%{libm2_sover}-32bit >= %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit = %{version}-%{release} + +%description m2-32bit +This package contains a Modula-2 compiler. + +%package m2-64bit +Summary: GNU Modula-2 Compiler +License: GPL-3.0-or-later +Group: Development/Languages/Other +Requires: gcc15-64bit = %{version}-%{release} +Requires: gcc15-m2 = %{version}-%{release} +Requires: libm2cor%{libm2_sover}-64bit >= %{version}-%{release} +Requires: libm2iso%{libm2_sover}-64bit >= %{version}-%{release} +Requires: libm2log%{libm2_sover}-64bit >= %{version}-%{release} +Requires: libm2min%{libm2_sover}-64bit >= %{version}-%{release} +Requires: libm2pim%{libm2_sover}-64bit >= %{version}-%{release} +Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit = %{version}-%{release} + +%description m2-64bit +This package contains a Modula-2 compiler. + +%package -n libm2log%{libm2_sover}%{libm2_suffix} +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2log%{libm2_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2log%{libm2_sover} + +%description -n libm2log%{libm2_sover}%{libm2_suffix} +Runtime library for the GNU Modula-2 language. + +%post -n libm2log%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%postun -n libm2log%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%package -n libm2log%{libm2_sover}%{libm2_suffix}-32bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2log%{libm2_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2log%{libm2_sover}-32bit + +%description -n libm2log%{libm2_sover}%{libm2_suffix}-32bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2log%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%postun -n libm2log%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%package -n libm2log%{libm2_sover}%{libm2_suffix}-64bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2log%{libm2_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2log%{libm2_sover}-64bit + +%description -n libm2log%{libm2_sover}%{libm2_suffix}-64bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2log%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%postun -n libm2log%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%package -n libm2cor%{libm2_sover}%{libm2_suffix} +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2cor%{libm2_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2cor%{libm2_sover} + +%description -n libm2cor%{libm2_sover}%{libm2_suffix} +Runtime library for the GNU Modula-2 language. + +%post -n libm2cor%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%postun -n libm2cor%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%package -n libm2cor%{libm2_sover}%{libm2_suffix}-32bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2cor%{libm2_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2cor%{libm2_sover}-32bit + +%description -n libm2cor%{libm2_sover}%{libm2_suffix}-32bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2cor%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%postun -n libm2cor%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%package -n libm2cor%{libm2_sover}%{libm2_suffix}-64bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2cor%{libm2_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2cor%{libm2_sover}-64bit + +%description -n libm2cor%{libm2_sover}%{libm2_suffix}-64bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2cor%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%postun -n libm2cor%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%package -n libm2iso%{libm2_sover}%{libm2_suffix} +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2iso%{libm2_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2iso%{libm2_sover} + +%description -n libm2iso%{libm2_sover}%{libm2_suffix} +Runtime library for the GNU Modula-2 language. + +%post -n libm2iso%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%postun -n libm2iso%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%package -n libm2iso%{libm2_sover}%{libm2_suffix}-32bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2iso%{libm2_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2iso%{libm2_sover}-32bit + +%description -n libm2iso%{libm2_sover}%{libm2_suffix}-32bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2iso%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%postun -n libm2iso%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%package -n libm2iso%{libm2_sover}%{libm2_suffix}-64bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2iso%{libm2_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2iso%{libm2_sover}-64bit + +%description -n libm2iso%{libm2_sover}%{libm2_suffix}-64bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2iso%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%postun -n libm2iso%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%package -n libm2pim%{libm2_sover}%{libm2_suffix} +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2pim%{libm2_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2pim%{libm2_sover} + +%description -n libm2pim%{libm2_sover}%{libm2_suffix} +Runtime library for the GNU Modula-2 language. + +%post -n libm2pim%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%postun -n libm2pim%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%package -n libm2pim%{libm2_sover}%{libm2_suffix}-32bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2pim%{libm2_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2pim%{libm2_sover}-32bit + +%description -n libm2pim%{libm2_sover}%{libm2_suffix}-32bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2pim%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%postun -n libm2pim%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%package -n libm2pim%{libm2_sover}%{libm2_suffix}-64bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2pim%{libm2_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2pim%{libm2_sover}-64bit + +%description -n libm2pim%{libm2_sover}%{libm2_suffix}-64bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2pim%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%postun -n libm2pim%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%package -n libm2min%{libm2_sover}%{libm2_suffix} +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2min%{libm2_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2min%{libm2_sover} + +%description -n libm2min%{libm2_sover}%{libm2_suffix} +Runtime library for the GNU Modula-2 language. + +%post -n libm2min%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%postun -n libm2min%{libm2_sover}%{libm2_suffix} -p /sbin/ldconfig + +%package -n libm2min%{libm2_sover}%{libm2_suffix}-32bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2min%{libm2_sover}-32bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2min%{libm2_sover}-32bit + +%description -n libm2min%{libm2_sover}%{libm2_suffix}-32bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2min%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%postun -n libm2min%{libm2_sover}%{libm2_suffix}-32bit -p /sbin/ldconfig + +%package -n libm2min%{libm2_sover}%{libm2_suffix}-64bit +Summary: GNU Modula-2 compiler runtime library +License: BSL-1.0 +Group: Development/Languages/Other +Provides: libm2min%{libm2_sover}-64bit = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: libm2min%{libm2_sover}-64bit + +%description -n libm2min%{libm2_sover}%{libm2_suffix}-64bit +Runtime library for the GNU Modula-2 language. + +%post -n libm2min%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%postun -n libm2min%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig + +%package -n gcc15-testresults +Summary: Testsuite results +License: Public-Domain +Group: Development/Languages/C and C++ + +%description -n gcc15-testresults +Results from running the gcc and target library testsuites. + + + + +# Define the canonical target and host architecture +# %%gcc_target_arch is supposed to be the full target triple +# %%cross_arch is supposed to be the rpm target variant arch +# %%TARGET_ARCH will be the canonicalized target CPU part +# %%HOST_ARCH will be the canonicalized host CPU part +%if 0%{?gcc_target_arch:1} +%define TARGET_ARCH %(echo %{cross_arch}) +%else +%define TARGET_ARCH %(echo %{_target_cpu}) +%endif +%if 0%{?disable_32bit:1} +%define biarch 0 +%else +%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%endif + +%define HOST_ARCH %(echo %{_target_cpu}) +%define GCCDIST %{HOST_ARCH}-openruyi-linux + +%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} +%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} + +# Versionspecific directories +%define versmainlibdir %{libsubdir} +%define versmainlibdirbi32 %{libsubdir}/32 +%define versmainlibdirbi64 %{libsubdir}/64 +%if %{build_primary_64bit} +%define versmainlibdirbi %{versmainlibdirbi32} +%else +%define versmainlibdirbi %{versmainlibdirbi64} +%endif + +%define mainlibdir %{_libdir} +%define mainlibdirbi32 %{_prefix}/lib +%define mainlibdirbi64 %{_prefix}/lib64 +%if %{build_primary_64bit} +%define mainlibdirbi %{mainlibdirbi32} +%else +%define mainlibdirbi %{mainlibdirbi64} +%endif + +# Now define a few macros that make it easy to package libs and +# related files just to the right package, without caring for the +# exact path the files are in. +# %%mainlib package X from all dirs that belong to the main package +# %%biarchlib package X from all dirs that belong to the -32/64bit package +%define mainlib() %{mainlibdir}/%1\ +%{nil} +%define biarchlib() %{nil} +%if %{biarch} +%if !%{separate_biarch} +%define mainlib() %{mainlibdir}/%1\ +%{mainlibdirbi}/%1\ +%{nil} +%else +%define biarchlib() %{mainlibdirbi}/%1\ +%{nil} +%endif +%endif + +%define versmainlib() %{versmainlibdir}/%1\ +%{nil} +%define versbiarchlib() %{nil} +%if %{biarch} +%if !%{separate_biarch} +%define versmainlib() %{versmainlibdir}/%1\ +%{versmainlibdirbi}/%1\ +%{nil} +%else +%define versbiarchlib() %{versmainlibdirbi}/%1\ +%{nil} +%endif +%endif + +# Synchronize output by lines, useful for configure output +%define make_output_sync -Oline + +%prep +%setup -q -n gcc-%{version} + +#test patching start + +%patch -P 2 +%patch -p1 -P 60 -P 61 +%autopatch -p1 -m 1000 + +#test patching end + +%build +%define _lto_cflags %{nil} +# Avoid rebuilding of generated files +contrib/gcc_update --touch + +rm -rf obj-%{GCCDIST} +mkdir obj-%{GCCDIST} +cd obj-%{GCCDIST} +# Filter out unwanted flags from $RPM_OPT_FLAGS +optflags= +optflags_d= +for flag in $RPM_OPT_FLAGS; do + add_flag= + case $flag in + -U_FORTIFY_SOURCE|-D_FORTIFY_SOURCE=*) ;; + -fno-rtti|-fno-exceptions|-Wmissing-format-attribute|-fstack-protector*) ;; + -ffortify=*|-Wall|-m32|-m64) ;; + -Werror=format-security) ;; +%if 0%{?gcc_target_arch:1} + # Kill all -march/tune/cpu because that screws building the target libs + -march=*|-mtune=*|-mcpu=*) ;; +%endif + *) add_flag=$flag ;; + esac + if test -n "$add_flag"; then + optflags+=" $add_flag" + case $add_flag in + # Filter out -Werror=return-type for D (only valid for C and C++) + -Werror=return-type) ;; + *) optflags_d+=" $add_flag" ;; + esac + fi +done + +languages=c +%if %{build_cp} +languages=$languages,c++ +%endif +%if %{build_objc} +languages=$languages,objc +%endif +%if %{build_fortran} +languages=$languages,fortran +%endif +%if %{build_objcp} +languages=$languages,obj-c++ +%endif +%if %{build_ada} +languages=$languages,ada +%endif +%if %{build_go} +languages=$languages,go +%endif +%if %{build_d} +languages=$languages,d +%endif +%if %{build_jit} +languages=$languages,jit +%endif +%if %{build_rust} +languages=$languages,rust +%endif +%if %{build_m2} +languages=$languages,m2 +%endif + +# In general we want to ship release checking enabled compilers +# which is the default for released compilers +#ENABLE_CHECKING="--enable-checking=yes" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" + +# Work around tail/head -1 changes +export _POSIX2_VERSION=199209 + +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin +# Using the host gnatmake like +# CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" +# GNATMAKE="gnatmake%%{hostsuffix}" +# doesn't work due to PR33857, so an un-suffixed gnatmake has to be +# available +%if %{build_ada} +cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake +cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink +cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif +cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc +cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +ln -sf /usr/%{_lib} host-tools/%{_lib} +export PATH="`pwd`/host-tools/bin:$PATH" +%endif + +# libsanitizer needs and since the glibc/libxcrypt split +# we don't have that yet in a pure cross environment +%if 0%{?gcc_target_arch:1} + CONFARGS="$CONFARGS --disable-libsanitizer" +%endif + +export CARGO=/bin/true + +../configure \ + CFLAGS="$optflags" \ + CXXFLAGS="$optflags" \ + XCFLAGS="$optflags" \ + TCFLAGS="$optflags" \ + GDCFLAGS="$optflags_d" \ + --prefix=%{_prefix} \ + --infodir=%{_infodir} \ + --mandir=%{_mandir} \ + --libdir=%{_libdir} \ + --libexecdir=%{_libdir} \ + --enable-languages=$languages \ +%if %{build_jit} + --enable-host-shared \ +%endif + $ENABLE_CHECKING \ + --disable-werror \ + --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ + --with-libstdcxx-zoneinfo=%{_datadir}/zoneinfo \ + --enable-ssp \ + --disable-libssp \ +%if 0%{!?build_libvtv:1} + --disable-libvtv \ +%endif + --enable-cet=auto \ + --disable-libcc1 \ +%if %{enable_plugins} + --enable-plugin \ +%else + --disable-plugin \ +%endif + --with-bugurl="%{_vendor_bug_url}" \ + --with-pkgversion="%{_vendor_name}" \ +%if 0%{?sysroot:1} + --with-slibdir=%{sysroot}/%{_lib} \ +%else + --with-slibdir=/%{_lib} \ +%endif + --with-system-zlib \ + --enable-libstdcxx-allocator=new \ + --disable-libstdcxx-pch \ +%if %{build_d} + --enable-libphobos \ +%endif + --enable-version-specific-runtime-libs \ + --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} + --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif + --enable-linux-futex \ +%ifarch x86_64 aarch64 + --enable-gnu-indirect-function \ +%endif + --program-suffix=%{binsuffix} \ +%ifarch %{disable_multilib_arch} + --disable-multilib \ +%endif +%if 0%{!?gcc_target_arch:1} + --without-system-libunwind \ +%endif +%if 0%{?gcc_target_arch:1} + --program-prefix=%{gcc_target_arch}- \ + --target=%{gcc_target_arch} \ + --disable-nls \ +%if 0%{?sysroot:1} + --with-sysroot=%sysroot \ +%endif +%if 0%{?build_sysroot:1} + --with-build-sysroot=%{build_sysroot} \ +%else +%if 0%{?sysroot:1} + --with-build-sysroot=%{sysroot} \ +%endif +%endif +%if 0%{?binutils_os:1} + --with-build-time-tools=/usr/%{binutils_os}/bin \ +%endif +%if 0%{?gcc_target_newlib} + --with-newlib \ +%if 0%{?gcc_libc_bootstrap:1} + --disable-gcov \ +%endif +%else +%if 0%{?gcc_libc_bootstrap:1} + --disable-gcov --disable-threads --disable-shared \ + --disable-libmudflap --disable-libssp --disable-libgomp \ + --disable-libquadmath --disable-libatomic \ + --without-headers --with-newlib \ +%endif +%endif +%endif +%if "%{TARGET_ARCH}" == "aarch64" + --enable-fix-cortex-a53-835769 \ + --enable-fix-cortex-a53-843419 \ +%endif +%if "%{TARGET_ARCH}" == "x86_64" +%ifnarch %{disable_multilib_arch} + --enable-multilib \ + --with-arch-32=x86-64-v2 \ +%endif + --with-arch=x86-64-v2 \ + --with-tune=generic \ +%endif +%if "%{TARGET_ARCH}" == "riscv64" + --disable-multilib \ +%endif +%if %{with bootstrap} +%if %{use_lto_bootstrap} && !0%{?building_testsuite:1} + --with-build-config=bootstrap-lto-lean \ +%endif +%else + --disable-bootstrap \ +%endif + --enable-link-serialization \ + $CONFARGS \ + --build=%{GCCDIST} \ + --host=%{GCCDIST} || \ + { + rc=$?; + echo "------- BEGIN config.log ------"; + %{__cat} config.log; + echo "------- END config.log ------"; + exit $rc; + } + +STAGE1_FLAGS="-g -O2" +%if 0%{?do_profiling} && !0%{?building_testsuite:1} +%ifarch x86_64 aarch64 +%if %{with bootstrap} +%define use_pgo_bootstrap 1 +%endif +%endif +%endif +%{?use_pgo_bootstrap:setarch `arch` -R} make %{?make_output_sync} %{?use_pgo_bootstrap:profiledbootstrap} STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$optflags" %{?_smp_mflags} +make info +%if 0%{?run_tests:1} +echo "Run testsuite" +(make -C %{GCCDIST}/libstdc++-v3 check-abi || true) +mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log +mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum +# asan needs a whole shadow address space +ulimit -v unlimited || true +make -k check %{?_smp_mflags} || true +mkdir ../testresults +../contrib/test_summary | tee ../testresults/test_summary.txt +%endif + +%install +export NO_BRP_CHECK_BYTECODE_VERSION=true +cd obj-%{GCCDIST} +# Work around tail/head -1 changes +export _POSIX2_VERSION=199209 +export LIBRARY_PATH=%{buildroot}/%{libsubdir}:%{buildroot}/%{mainlibdirbi} + +%make_install + +# verify libasan really ended up with libstdc++ as NEEDED. +%ifarch %asan_arch + readelf -d %{buildroot}/%{versmainlibdir}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 +%if %{biarch} + readelf -d %{buildroot}/%{versmainlibdirbi}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 +%endif +%endif + +# Remove some useless .la files +for lib in libobjc libgfortran libquadmath libcaf_single \ + libgomp libgomp-plugin-hsa libstdc++ libsupc++ \ + libgo libasan libhwasan libatomic libitm libtsan liblsan libubsan libvtv \ + libstdc++fs libgdruntime libgphobos libstdc++exp \ + libm2cor libm2iso libm2log libm2min libm2pim; do + rm -f %{buildroot}/%{versmainlibdir}/$lib.la +%if %{biarch} + rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la +%endif +done + +mkdir -p %{buildroot}/%{_libdir} +%if %{biarch} +%if %{build_primary_64bit} +mkdir -p %{buildroot}/%{_prefix}/lib +%else +mkdir -p %{buildroot}/%{_prefix}/lib64 +%endif +%endif + +%if %{build_cp} +# Merge multilib c++config.h to allow omitting the duplicate and +# identical other arch specific headers +dir_ml= +cxxconfig="`find %{GCCDIST}/libstdc++-v3/include -name c++config.h`" +for i in `find %{GCCDIST}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do + if ! diff -up $cxxconfig $i; then + file_32=x + file_64=x + case $i in + %{GCCDIST}/32/*) + file_32=$i + file_64=$cxxconfig + dir_ml=32 + ;; + %{GCCDIST}/64/*) + file_32=$cxxconfig + file_64=$i + dir_ml=64 + ;; + esac + if ! ( test -f "$file_32" && test -f "$file_64" ); then + echo "Urgs?" + exit 1 + fi + + cat > %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h < +#if __WORDSIZE == 32 +`cat $file_32` +#else +`cat $file_64` +#endif +#endif +EOF + break + fi +done +rm -rf %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]* +if ! test -z "$dir_ml"; then + ln -s . %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml +fi +%endif + +# move shared libs from versionspecific dir to main libdir +for libname in \ +%if %{build_fortran} + libgfortran \ +%endif +%ifarch %quadmath_arch + libquadmath \ +%endif +%if %{build_objc} + libobjc \ +%endif +%if %{build_cp} + libstdc++ \ +%endif +%if %{build_go} + libgo \ +%endif +%if %{build_d} + libgdruntime \ + libgphobos \ +%endif + libgomp \ +%if %{build_m2} + libm2log \ + libm2cor \ + libm2iso \ + libm2pim \ + libm2min \ +%endif +%ifarch %atomic_arch + libatomic \ +%endif +%ifarch %itm_arch + libitm \ +%endif +%ifarch %asan_arch + libasan \ +%endif +%ifarch %tsan_arch + libtsan \ +%endif +%ifarch %lsan_arch + liblsan \ +%endif +%ifarch %ubsan_arch + libubsan \ +%endif +%ifarch %hwasan_arch + libhwasan \ +%endif +%ifarch %vtv_arch + libvtv \ +%endif + ; do + for lib in `find %{buildroot}/%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do + mv $lib %{buildroot}/%{mainlibdir}/ + done + if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then + ln -sf %{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ + %{buildroot}/%{versmainlibdir}/$libname.so + fi +%if %{biarch} + if test -d %{buildroot}/%{versmainlibdirbi}; then + for lib in `find %{buildroot}/%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do + mv $lib %{buildroot}/%{mainlibdirbi}/ + done + if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then + ln -sf %{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ + %{buildroot}/%{versmainlibdirbi}/$libname.so + fi + fi +%endif +done +%if %{build_cp} +# And we want to move the shlib gdb pretty printers to a more sane +# place so ldconfig does not complain +mkdir -p %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir} +mv %{buildroot}/%{mainlibdir}/libstdc++.so.*-gdb.py %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir}/ +sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py +%if %{biarch} + if test -d %{buildroot}/%{versmainlibdirbi}; then + mkdir -p %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi} + mv %{buildroot}/%{mainlibdirbi}/libstdc++.so.*-gdb.py %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi}/ + sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py + fi +%endif +%endif + +# Move libgcc_s around +if test -L %{buildroot}/%{_lib}/libgcc_s.so; then + rm -f %{buildroot}/%{_lib}/libgcc_s.so + ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so +else + mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/ +fi +chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} +%if 0%{?usrmerged} +mv %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{_slibdir}/libgcc_s.so.%{libgcc_s} +%endif +%if %{biarch} +%if %{build_primary_64bit} +if test -L %{buildroot}/lib/libgcc_s.so; then + rm -f %{buildroot}/lib/libgcc_s.so + ln -sf /lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so +else + mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/ +fi +ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so +chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s} +%if 0%{?usrmerged} +mv %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir}/libgcc_s.so.%{libgcc_s} +%endif +%else +# 32-bit biarch systems +if test -L %{buildroot}/lib64/libgcc_s.so; then + rm -f %{buildroot}/lib64/libgcc_s.so + ln -sf /lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so +else + mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/ +fi +ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so +chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} +%if 0%{?usrmerged} +mv %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir64}/libgcc_s.so.%{libgcc_s} +%endif +%endif +%endif + +%if %{build_ada} +mv %{buildroot}/%{libsubdir}/adalib/lib*-*.so %{buildroot}/%{_libdir} +ln -sf %{_libdir}/libgnarl%{binsuffix}.so %{buildroot}/%{libsubdir}/adalib/libgnarl.so +ln -sf %{_libdir}/libgnat%{binsuffix}.so %{buildroot}/%{libsubdir}/adalib/libgnat.so +chmod a+x %{buildroot}/%{_libdir}/libgna*-*.so +%if %{biarch} +mv %{buildroot}/%{versmainlibdirbi}/adalib/lib*-*.so %{buildroot}/%{mainlibdirbi}/ +ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so %{buildroot}/%{versmainlibdirbi}/adalib/libgnarl.so +ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so %{buildroot}/%{versmainlibdirbi}/adalib/libgnat.so +chmod a+x %{buildroot}/%{mainlibdirbi}/libgna*-*.so +%endif +%endif + +rm -f %{buildroot}/%{_prefix}/bin/c++%{binsuffix} + +# Remove some crap from the .la files: +for l in `find %{buildroot} -name '*.la'`; do + echo "changing $l" + sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \ + -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \ + -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \ + -e '/^dependency_libs/s|-L[^ ]* ||g' \ +%if %{biarch} +%if %{build_primary_64bit} + -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \ + -e '/^libdir/s|lib64/\.\./||' \ +%else + -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \ +%endif +%endif + < $l > $l.new + mv $l.new $l +done + +# The spec for the PIE subpackage +cat > %{buildroot}/%{libsubdir}/defaults.spec < ../floatn-fixes.list +# Whether floatn.h is fixed depends on the glibc version and architecture. +# For now keep it if it's there but in the end we want to fix glibc itself +# everywhere. +if test -f %{buildroot}/%{libsubdir}/include-fixed/bits/floatn.h; then + cat >> ../floatn-fixes.list <> ../floatn-fixes.list < gcc15-locale.lang + +%files -f floatn-fixes.list +%defattr(-,root,root) +%dir %{_libdir}/gcc +%dir %{_libdir}/gcc/%{GCCDIST} +%dir %{libsubdir} +%dir %{libsubdir}/include +%dir %{libsubdir}/include-fixed +%if %{biarch} +%if %{build_primary_64bit} +%dir %{libsubdir}/32 +%else +%dir %{libsubdir}/64 +%endif +%endif +%{_prefix}/bin/gcc%{binsuffix} +%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} +%{_prefix}/bin/gcov%{binsuffix} +%{_prefix}/bin/gcov-dump%{binsuffix} +%{_prefix}/bin/gcov-tool%{binsuffix} +%{_prefix}/bin/gcc-ar%{binsuffix} +%{_prefix}/bin/gcc-nm%{binsuffix} +%{_prefix}/bin/gcc-ranlib%{binsuffix} +%{_prefix}/bin/lto-dump%{binsuffix} +%{libsubdir}/collect2 +%{libsubdir}/lto1 +%{libsubdir}/lto-wrapper +%{libsubdir}/liblto_plugin.so* +%{libsubdir}/include/limits.h +%{libsubdir}/include/syslimits.h +%{libsubdir}/include-fixed/README +%{libsubdir}/include/omp.h +%{libsubdir}/include/float.h +%{libsubdir}/include/iso646.h +%{libsubdir}/include/stdarg.h +%{libsubdir}/include/stdbool.h +%{libsubdir}/include/stdfix.h +%{libsubdir}/include/stddef.h +%{libsubdir}/include/unwind.h +%{libsubdir}/include/varargs.h +%{libsubdir}/include/stdint.h +%{libsubdir}/include/stdint-gcc.h +%{libsubdir}/include/stdckdint.h +%{libsubdir}/include/stdnoreturn.h +%{libsubdir}/include/stdalign.h +%{libsubdir}/include/stdatomic.h +%{libsubdir}/include/openacc.h +%{libsubdir}/include/gcov.h +%{libsubdir}/include/acc_prof.h +%ifarch aarch64 +%{libsubdir}/include/arm_neon.h +%{libsubdir}/include/arm_acle.h +%{libsubdir}/include/arm_fp16.h +%{libsubdir}/include/arm_bf16.h +%{libsubdir}/include/arm_sve.h +%{libsubdir}/include/arm_sme.h +%{libsubdir}/include/arm_neon_sve_bridge.h +%endif +%ifarch riscv64 +%{libsubdir}/include/riscv_vector.h +%{libsubdir}/include/riscv_bitmanip.h +%{libsubdir}/include/riscv_crypto.h +%{libsubdir}/include/riscv_th_vector.h +%{libsubdir}/include/sifive_vector.h +%endif +%ifarch x86_64 +%{libsubdir}/include/cross-stdarg.h +%{libsubdir}/include/cpuid.h +%{libsubdir}/include/mm3dnow.h +%{libsubdir}/include/mmintrin.h +%{libsubdir}/include/ammintrin.h +%{libsubdir}/include/bmmintrin.h +%{libsubdir}/include/emmintrin.h +%{libsubdir}/include/immintrin.h +%{libsubdir}/include/avxintrin.h +%{libsubdir}/include/pmmintrin.h +%{libsubdir}/include/xmmintrin.h +%{libsubdir}/include/tmmintrin.h +%{libsubdir}/include/nmmintrin.h +%{libsubdir}/include/smmintrin.h +%{libsubdir}/include/wmmintrin.h +%{libsubdir}/include/x86intrin.h +%{libsubdir}/include/ia32intrin.h +%{libsubdir}/include/mm_malloc.h +%{libsubdir}/include/fma4intrin.h +%{libsubdir}/include/xopintrin.h +%{libsubdir}/include/lwpintrin.h +%{libsubdir}/include/popcntintrin.h +%{libsubdir}/include/bmiintrin.h +%{libsubdir}/include/tbmintrin.h +%{libsubdir}/include/avx2intrin.h +%{libsubdir}/include/bmi2intrin.h +%{libsubdir}/include/fmaintrin.h +%{libsubdir}/include/lzcntintrin.h +%{libsubdir}/include/f16cintrin.h +%{libsubdir}/include/adxintrin.h +%{libsubdir}/include/fxsrintrin.h +%{libsubdir}/include/prfchwintrin.h +%{libsubdir}/include/rdseedintrin.h +%{libsubdir}/include/rtmintrin.h +%{libsubdir}/include/xsaveintrin.h +%{libsubdir}/include/xsaveoptintrin.h +%{libsubdir}/include/xtestintrin.h +%{libsubdir}/include/avx512cdintrin.h +%{libsubdir}/include/avx512erintrin.h +%{libsubdir}/include/avx512fintrin.h +%{libsubdir}/include/avx512pfintrin.h +%{libsubdir}/include/shaintrin.h +%{libsubdir}/include/avx512bwintrin.h +%{libsubdir}/include/avx512dqintrin.h +%{libsubdir}/include/avx512vlbwintrin.h +%{libsubdir}/include/avx512vldqintrin.h +%{libsubdir}/include/avx512vlintrin.h +%{libsubdir}/include/avx512ifmaintrin.h +%{libsubdir}/include/avx512ifmavlintrin.h +%{libsubdir}/include/avx512vbmiintrin.h +%{libsubdir}/include/avx512vbmivlintrin.h +%{libsubdir}/include/avx5124fmapsintrin.h +%{libsubdir}/include/avx5124vnniwintrin.h +%{libsubdir}/include/avx512vpopcntdqintrin.h +%{libsubdir}/include/avx512vbmi2intrin.h +%{libsubdir}/include/avx512vbmi2vlintrin.h +%{libsubdir}/include/avx512vnniintrin.h +%{libsubdir}/include/avx512vnnivlintrin.h +%{libsubdir}/include/avx512bitalgintrin.h +%{libsubdir}/include/avx512vpopcntdqvlintrin.h +%{libsubdir}/include/avx512bf16intrin.h +%{libsubdir}/include/avx512bf16vlintrin.h +%{libsubdir}/include/avx512vp2intersectintrin.h +%{libsubdir}/include/avx512vp2intersectvlintrin.h +%{libsubdir}/include/vpclmulqdqintrin.h +%{libsubdir}/include/enqcmdintrin.h +%{libsubdir}/include/cet.h +%{libsubdir}/include/vaesintrin.h +%{libsubdir}/include/clwbintrin.h +%{libsubdir}/include/clflushoptintrin.h +%{libsubdir}/include/xsavecintrin.h +%{libsubdir}/include/xsavesintrin.h +%{libsubdir}/include/mwaitxintrin.h +%{libsubdir}/include/clzerointrin.h +%{libsubdir}/include/pkuintrin.h +%{libsubdir}/include/sgxintrin.h +%{libsubdir}/include/cetintrin.h +%{libsubdir}/include/gfniintrin.h +%{libsubdir}/include/pconfigintrin.h +%{libsubdir}/include/wbnoinvdintrin.h +%{libsubdir}/include/movdirintrin.h +%{libsubdir}/include/cldemoteintrin.h +%{libsubdir}/include/waitpkgintrin.h +%{libsubdir}/include/serializeintrin.h +%{libsubdir}/include/tsxldtrkintrin.h +%{libsubdir}/include/amxbf16intrin.h +%{libsubdir}/include/amxint8intrin.h +%{libsubdir}/include/amxtileintrin.h +%{libsubdir}/include/x86gprintrin.h +%{libsubdir}/include/hresetintrin.h +%{libsubdir}/include/uintrintrin.h +%{libsubdir}/include/keylockerintrin.h +%{libsubdir}/include/avxvnniintrin.h +%{libsubdir}/include/mwaitintrin.h +%{libsubdir}/include/avx512fp16intrin.h +%{libsubdir}/include/avx512fp16vlintrin.h +%{libsubdir}/include/avxifmaintrin.h +%{libsubdir}/include/avxvnniint8intrin.h +%{libsubdir}/include/avxneconvertintrin.h +%{libsubdir}/include/amxfp16intrin.h +%{libsubdir}/include/cmpccxaddintrin.h +%{libsubdir}/include/prfchiintrin.h +%{libsubdir}/include/raointintrin.h +%{libsubdir}/include/amxcomplexintrin.h +%{libsubdir}/include/avxvnniint16intrin.h +%{libsubdir}/include/sha512intrin.h +%{libsubdir}/include/sm3intrin.h +%{libsubdir}/include/sm4intrin.h +%{libsubdir}/include/avx512bitalgvlintrin.h +%{libsubdir}/include/usermsrintrin.h +%endif +%ifarch %asan_arch +%{libsubdir}/include/sanitizer +%endif +%if %{build_fortran} +%{libsubdir}/include/ISO_Fortran_binding.h +%endif +%versmainlib *crt*.o +%versmainlib libgcc*.a +%versmainlib libgcov.a +%versmainlib libgcc_s*.so +%versmainlib libgomp.so +%versmainlib libgomp.a +%versmainlib libgomp.spec +%ifarch %itm_arch +%versmainlib libitm.so +%versmainlib libitm.a +%versmainlib libitm.spec +%endif +%ifarch %atomic_arch +%versmainlib libatomic.so +%versmainlib libatomic.a +%endif +%ifarch %asan_arch +%versmainlib libasan.so +%versmainlib libasan.a +%versmainlib libasan_preinit.o +%endif +%ifarch %tsan_arch +%if %build_primary_64bit +%versmainlib libtsan.so +%versmainlib libtsan.a +%versmainlib libtsan_preinit.o +%endif +%endif +%ifarch %lsan_arch +%if %build_primary_64bit +%versmainlib liblsan.so +%versmainlib liblsan.a +%versmainlib liblsan_preinit.o +%endif +%endif +%ifarch %ubsan_arch +%versmainlib libubsan.so +%versmainlib libubsan.a +%endif +%ifarch %hwasan_arch +%versmainlib libhwasan.so +%versmainlib libhwasan.a +%versmainlib libhwasan_preinit.o +%endif +%ifarch %asan_arch %ubsan_arch %tsan_arch %lsan_arch %hwasan_arch +%versmainlib libsanitizer.spec +%endif +%ifarch %vtv_arch +%versmainlib libvtv.so +%versmainlib libvtv.a +%endif +%doc %{_mandir}/man1/gcc%{binsuffix}.1.gz +%doc %{_mandir}/man1/gcov%{binsuffix}.1.gz +%doc %{_mandir}/man1/gcov-dump%{binsuffix}.1.gz +%doc %{_mandir}/man1/gcov-tool%{binsuffix}.1.gz +%doc %{_mandir}/man1/lto-dump%{binsuffix}.1.gz + +%if %{separate_biarch} +%files -n gcc15%{separate_biarch_suffix} +%defattr(-,root,root) +%versbiarchlib *crt*.o +%versbiarchlib libgcc*.a +%versbiarchlib libgcov.a +%versbiarchlib libgcc_s*.so +%versbiarchlib libgomp.so +%versbiarchlib libgomp.a +%versbiarchlib libgomp.spec +%ifarch %itm_arch +%versbiarchlib libitm.so +%versbiarchlib libitm.a +%versbiarchlib libitm.spec +%endif +%ifarch %atomic_arch +%versbiarchlib libatomic.a +%versbiarchlib libatomic.so +%endif +%ifarch %asan_arch +%versbiarchlib libasan.a +%versbiarchlib libasan.so +%versbiarchlib libasan_preinit.o +%endif +%ifarch %ubsan_arch +%versbiarchlib libubsan.a +%versbiarchlib libubsan.so +%endif +%ifarch %tsan_arch +%if %separate_bi64 +%versbiarchlib libtsan.a +%versbiarchlib libtsan.so +%versbiarchlib libtsan_preinit.o +%endif +%endif +%ifarch %lsan_arch +%if %separate_bi64 +%versbiarchlib liblsan.a +%versbiarchlib liblsan.so +%versbiarchlib liblsan_preinit.o +%endif +%endif +# libhwasan.{a,so} is not built in 32-bit mode +%ifarch %asan_arch %ubsan_arch %tsan_arch %lsan_arch %hwasan_arch +%versbiarchlib libsanitizer.spec +%endif +%ifarch %vtv_arch +%versbiarchlib libvtv.a +%versbiarchlib libvtv.so +%endif +%endif + +%if %{enable_plugins} +%files devel +%defattr(-,root,root) +%dir %{libsubdir}/plugin +%{libsubdir}/plugin +%if %{build_m2} +%exclude %{libsubdir}/plugin/m2rte.so +%endif +%endif + +%files locale -f gcc15-locale.lang + +%files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale -f libstdc++.lang + +%files PIE +%defattr(-,root,root) +%dir %{libsubdir} +%{libsubdir}/defaults.spec + +%if %{build_cp} +%files c++ +%defattr(-,root,root) +%dir %{_libdir}/gcc +%dir %{_libdir}/gcc/%{GCCDIST} +%dir %{libsubdir} +%{_prefix}/bin/g++%{binsuffix} +%doc %{_mandir}/man1/g++%{binsuffix}.1.gz +%{libsubdir}/cc1plus +%{libsubdir}/g++-mapper-server + +%if %{separate_biarch} +%files c++%{separate_biarch_suffix} +%defattr(-,root,root) +# empty - only for the dependency +%endif + +%files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} +%defattr(-,root,root) +%mainlib libstdc++.so.%{libstdcxx_sover}* + +%if %{separate_biarch} +%files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libstdc++.so.%{libstdcxx_sover}* +%endif + +%files -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} +%defattr(-,root,root) +%dir %{_libdir}/gcc +%dir %{_libdir}/gcc/%{GCCDIST} +%dir %{libsubdir} +%versmainlib libstdc++.a +%versmainlib libstdc++fs.a +%versmainlib libstdc++exp.a +%versmainlib libstdc++.so +%versmainlib libsupc++.a +%versmainlib libstdc++.modules.json +%{_prefix}/include/c++ + +%files -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix} +%defattr(-,root,root) +%dir %{_datadir}/gdb +%dir %{_datadir}/gdb/auto-load +%dir %{_datadir}/gdb/auto-load%{_prefix} +%dir %{_datadir}/gdb/auto-load/%{mainlibdir} +%{_datadir}/gdb/auto-load/%{mainlibdir}/libstdc++.so.*-gdb.py +%{_datadir}/gcc%{binsuffix} + +%if %{separate_biarch} +%files -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%dir %{_libdir}/gcc +%dir %{_libdir}/gcc/%{GCCDIST} +%dir %{libsubdir} +%versbiarchlib libstdc++.a +%versbiarchlib libstdc++fs.a +%versbiarchlib libstdc++exp.a +%versbiarchlib libstdc++.so +%versbiarchlib libsupc++.a +%versbiarchlib libstdc++.modules.json + +%files -n libstdc++%{libstdcxx_sover}-pp%{libstdcxx_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%dir %{_datadir}/gdb/auto-load/%{mainlibdirbi} +%{_datadir}/gdb/auto-load/%{mainlibdirbi}/libstdc++.so.*-gdb.py +%endif +%endif + +%files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} +%defattr(-,root,root) +%{_slibdir}/libgcc_s.so.%{libgcc_s} +%if %{biarch} +%if %{build_primary_64bit} +%if !%{separate_bi32} +%{slibdir}/libgcc_s.so.%{libgcc_s} +%endif +%else +%if !%{separate_bi64} +%{slibdir64}/libgcc_s.so.%{libgcc_s} +%endif +%endif +%endif + +%if %{separate_bi64} +%files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit +%defattr(-,root,root) +%{slibdir64}/libgcc_s.so.%{libgcc_s} +%endif + +%if %{separate_bi32} +%files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit +%defattr(-,root,root) +%{slibdir}/libgcc_s.so.%{libgcc_s} +%endif + +%files -n libgomp%{libgomp_sover}%{libgomp_suffix} +%defattr(-,root,root) +%mainlib libgomp.so.%{libgomp_sover}* + +%if %{separate_biarch} +%files -n libgomp%{libgomp_sover}%{libgomp_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libgomp.so.%{libgomp_sover}* +%endif + +%ifarch %asan_arch +%files -n libasan%{libasan_sover}%{libasan_suffix} +%defattr(-,root,root) +%mainlib libasan.so.%{libasan_sover}* + +%if %{separate_biarch} +%files -n libasan%{libasan_sover}%{libasan_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libasan.so.%{libasan_sover}* +%endif +%endif + +%ifarch %lsan_arch +%if %build_primary_64bit +%files -n liblsan%{liblsan_sover}%{liblsan_suffix} +%defattr(-,root,root) +%mainlib liblsan.so.%{liblsan_sover}* +%endif + +%if %{separate_biarch} && %{separate_bi64} +%files -n liblsan%{liblsan_sover}%{liblsan_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib liblsan.so.%{liblsan_sover}* +%endif +%endif + +%ifarch %tsan_arch +%if %build_primary_64bit +%files -n libtsan%{libtsan_sover}%{libtsan_suffix} +%defattr(-,root,root) +%mainlib libtsan.so.%{libtsan_sover}* +%endif + +%if %{separate_biarch} && %{separate_bi64} +%files -n libtsan%{libtsan_sover}%{libtsan_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libtsan.so.%{libtsan_sover}* +%endif +%endif + +%ifarch %hwasan_arch +%files -n libhwasan%{libhwasan_sover}%{libhwasan_suffix} +%defattr(-,root,root) +%mainlib libhwasan.so.%{libhwasan_sover}* +%endif + +%ifarch %atomic_arch +%files -n libatomic%{libatomic_sover}%{libatomic_suffix} +%defattr(-,root,root) +%mainlib libatomic.so.%{libatomic_sover}* + +%if %{separate_biarch} +%files -n libatomic%{libatomic_sover}%{libatomic_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libatomic.so.%{libatomic_sover}* +%endif +%endif + +%ifarch %itm_arch +%files -n libitm%{libitm_sover}%{libitm_suffix} +%defattr(-,root,root) +%mainlib libitm.so.%{libitm_sover}* + +%if %{separate_biarch} +%files -n libitm%{libitm_sover}%{libitm_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libitm.so.%{libitm_sover}* +%endif +%endif + +%ifarch %ubsan_arch +%files -n libubsan%{libubsan_sover}%{libubsan_suffix} +%defattr(-,root,root) +%mainlib libubsan.so.%{libubsan_sover}* + +%if %{separate_biarch} +%files -n libubsan%{libubsan_sover}%{libubsan_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libubsan.so.%{libubsan_sover}* +%endif +%endif + +%ifarch %vtv_arch +%files -n libvtv%{libvtv_sover}%{libvtv_suffix} +%defattr(-,root,root) +%mainlib libvtv.so.%{libvtv_sover}* + +%if %{separate_biarch} +%files -n libvtv%{libvtv_sover}%{libvtv_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libvtv.so.%{libvtv_sover}* +%endif + +%endif + +%if %{build_fortran} +%files fortran +%defattr(-,root,root) +%dir %{libsubdir}/finclude +%{_prefix}/bin/gfortran%{binsuffix} +%{libsubdir}/f951 +%{libsubdir}/finclude/* +%versmainlib libgfortran.a +%versmainlib libgfortran.so +%versmainlib libgfortran.spec +%versmainlib libcaf_single.a +%doc %{_mandir}/man1/gfortran%{binsuffix}.1.gz + +%if %{separate_biarch} +%files fortran%{separate_biarch_suffix} +%defattr(-,root,root) +%dir %{versmainlibdirbi}/finclude +%{versmainlibdirbi}/finclude/* +%versbiarchlib libgfortran.a +%versbiarchlib libgfortran.so +%versbiarchlib libgfortran.spec +%versbiarchlib libcaf_single.a +%endif + +%files -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} +%defattr(-,root,root) +%mainlib libgfortran.so.%{libgfortran_sover}* + +%if %{separate_biarch} +%files -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libgfortran.so.%{libgfortran_sover}* +%endif + +%ifarch %quadmath_arch +%files -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} +%defattr(-,root,root) +%mainlib libquadmath.so.%{libquadmath_sover}* + +%if %{separate_biarch} +%files -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libquadmath.so.%{libquadmath_sover}* +%endif + +%files -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix} +%defattr(-,root,root) +%{libsubdir}/include/quadmath.h +%{libsubdir}/include/quadmath_weak.h +%versmainlib libquadmath.a +%versmainlib libquadmath.so + +%if %{separate_biarch} +%files -n libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%versbiarchlib libquadmath.a +%versbiarchlib libquadmath.so +%endif +%endif +%endif + +%files info +%defattr(-,root,root) +%doc %{_infodir}/cpp%{binsuffix}.info*.gz +%doc %{_infodir}/cppinternals%{binsuffix}.info*.gz +%doc %{_infodir}/gcc%{binsuffix}.info*.gz +%doc %{_infodir}/gccint%{binsuffix}.info*.gz +%doc %{_infodir}/gccinstall%{binsuffix}.info*.gz +%doc %{_infodir}/libgomp%{binsuffix}.info*.gz +%ifarch %itm_arch +%doc %{_infodir}/libitm%{binsuffix}.info*.gz +%endif +%if %{build_fortran} +%doc %{_infodir}/gfortran%{binsuffix}.info*.gz +%ifarch %quadmath_arch +%doc %{_infodir}/libquadmath%{binsuffix}.info*.gz +%endif +%endif +%if %{build_ada} +%doc %{_infodir}/gnat-style%{binsuffix}.info*gz +%doc %{_infodir}/gnat_rm%{binsuffix}.info*gz +%doc %{_infodir}/gnat_ugn%{binsuffix}.info*gz +%endif +%if %{build_d} +%doc %{_infodir}/gdc%{binsuffix}.info*gz +%endif +%if %{build_m2} +%doc %{_infodir}/m2%{binsuffix}.info*gz +%endif + +%files -n cpp15 +%defattr(-,root,root) +%dir %{_libdir}/gcc +%dir %{_libdir}/gcc/%{GCCDIST} +%dir %{libsubdir} +%{_prefix}/bin/cpp%{binsuffix} +%{libsubdir}/cc1 +%doc %{_mandir}/man1/cpp%{binsuffix}.1.gz + +%if %{build_objc} +%files objc +%defattr(-,root,root) +%{libsubdir}/cc1obj +%{libsubdir}/include/objc +%versmainlib libobjc.a +%versmainlib libobjc.so + +%if %{separate_biarch} +%files objc%{separate_biarch_suffix} +%defattr(-,root,root) +%versbiarchlib libobjc.a +%versbiarchlib libobjc.so +%endif + +%files -n libobjc%{libobjc_sover}%{libobjc_suffix} +%defattr(-,root,root) +%mainlib libobjc.so.%{libobjc_sover}* + +%if %{separate_biarch} +%files -n libobjc%{libobjc_sover}%{libobjc_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libobjc.so.%{libobjc_sover}* +%endif +%endif + +%if %{build_objcp} +%files obj-c++ +%defattr(-,root,root) +%{libsubdir}/cc1objplus + +%if %{separate_biarch} +%files obj-c++%{separate_biarch_suffix} +%defattr(-,root,root) +# empty - only for the dependency +%endif +%endif + +%if %{build_ada} +%files ada +%defattr(-,root,root) +%dir %{_libdir}/gcc +%dir %{_libdir}/gcc/%{GCCDIST} +%dir %{libsubdir} +%{_prefix}/bin/gnat* +%dir %{versmainlibdir}/adalib +%{versmainlibdir}/adainclude +%{versmainlibdir}/adalib/*.ali +%{versmainlibdir}/adalib/*.a +%{versmainlibdir}/adalib/libgnarl.so +%{versmainlibdir}/adalib/libgnat.so +%{versmainlibdir}/gnat1 +%{versmainlibdir}/ada_target_properties + +%if %{separate_biarch} +%files ada%{separate_biarch_suffix} +%defattr(-,root,root) +%dir %{versmainlibdirbi}/adalib +%{versmainlibdirbi}/adainclude +%{versmainlibdirbi}/adalib/*.ali +%{versmainlibdirbi}/adalib/*.a +%{versmainlibdirbi}/adalib/libgnarl.so +%{versmainlibdirbi}/adalib/libgnat.so +%{versmainlibdirbi}/ada_target_properties +%endif + +%files -n libada15 +%defattr(-,root,root) +%mainlib libgnarl%{binsuffix}.so +%mainlib libgnat%{binsuffix}.so + +%if %{separate_biarch} +%files -n libada15%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libgnarl%{binsuffix}.so +%biarchlib libgnat%{binsuffix}.so +%endif +%endif + +%if %{build_go} +%files go +%defattr(-,root,root) +%{_prefix}/bin/gccgo%{binsuffix} +%{_prefix}/bin/go%{binsuffix} +%{_prefix}/bin/gofmt%{binsuffix} +%{libsubdir}/go1 +%versmainlib libgo.a +%versmainlib libgo.so +%versmainlib libgobegin.a +%versmainlib libgolibbegin.a +%versmainlibdir/buildid +%versmainlibdir/cgo +%dir %mainlibdir/go +%dir %mainlibdir/go/%{gcc_dir_version} +%mainlibdir/go/%{gcc_dir_version}/%{GCCDIST} +%doc %{_mandir}/man1/gccgo%{binsuffix}.1.gz +%doc %{_mandir}/man1/go%{binsuffix}.1.gz +%doc %{_mandir}/man1/gofmt%{binsuffix}.1.gz + +%if %{separate_biarch} +%files go%{separate_biarch_suffix} +%defattr(-,root,root) +%versbiarchlib libgo.a +%versbiarchlib libgo.so +%versbiarchlib libgobegin.a +%versbiarchlib libgolibbegin.a +%dir %mainlibdirbi/go +%dir %mainlibdirbi/go/%{gcc_dir_version} +%mainlibdirbi/go/%{gcc_dir_version}/%{GCCDIST} +%endif + +%files -n libgo%{libgo_sover}%{libgo_suffix} +%defattr(-,root,root) +%mainlib libgo.so.%{libgo_sover}* + +%if %{separate_biarch} +%files -n libgo%{libgo_sover}%{libgo_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libgo.so.%{libgo_sover}* +%endif +%endif + +%if %{build_d} +%files d +%defattr(-,root,root) +%{_prefix}/bin/gdc%{binsuffix} +%{libsubdir}/d21 +%versmainlib libgphobos.a +%versmainlib libgphobos.so +%versmainlib libgdruntime.a +%versmainlib libgdruntime.so +%versmainlib libgphobos.spec +%{versmainlibdir}/include/d +%doc %{_mandir}/man1/gdc%{binsuffix}.1.gz + +%if %{separate_biarch} +%files d%{separate_biarch_suffix} +%defattr(-,root,root) +%versbiarchlib libgphobos.a +%versbiarchlib libgphobos.so +%versbiarchlib libgdruntime.a +%versbiarchlib libgdruntime.so +%versbiarchlib libgphobos.spec +%endif + +%files -n libgphobos%{libgphobos_sover}%{libgphobos_suffix} +%defattr(-,root,root) +%mainlib libgphobos.so.%{libgphobos_sover}* + +%if %{separate_biarch} +%files -n libgphobos%{libgphobos_sover}%{libgphobos_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libgphobos.so.%{libgphobos_sover}* +%endif + +%files -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix} +%defattr(-,root,root) +%mainlib libgdruntime.so.%{libgdruntime_sover}* + +%if %{separate_biarch} +%files -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libgdruntime.so.%{libgdruntime_sover}* +%endif +%endif + +%if %{build_jit} +%files -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +%defattr(-,root,root) +%{_prefix}/%{_lib}/libgccjit.so.%{libgccjit_sover}* + +%files -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +%defattr(-,root,root) +%doc gcc/jit/docs/examples +%{_prefix}/%{_lib}/libgccjit.so +%{_prefix}/include/libgccjit.h +%{_prefix}/include/libgccjit++.h +%{_infodir}/libgccjit.info.gz +%endif + +%if %{build_rust} +%files rust +%defattr(-,root,root) +%{_prefix}/bin/gccrs%{binsuffix} +%{libsubdir}/crab1 +%endif + +%if %{build_m2} +%files m2 +%defattr(-,root,root) +%{_prefix}/bin/gm2%{binsuffix} +%{libsubdir}/cc1gm2 +%if %{enable_plugins} +%{libsubdir}/plugin/m2rte.so +%endif +%{versmainlibdir}/m2 +%versmainlib libm2log.a +%versmainlib libm2log.so +%versmainlib libm2cor.a +%versmainlib libm2cor.so +%versmainlib libm2iso.a +%versmainlib libm2iso.so +%versmainlib libm2pim.a +%versmainlib libm2pim.so +%versmainlib libm2min.a +%versmainlib libm2min.so +%doc %{_mandir}/man1/gm2%{binsuffix}.1.gz + +%if %{separate_biarch} +%files m2%{separate_biarch_suffix} +%defattr(-,root,root) +%{versmainlibdirbi}/m2 +%versbiarchlib libm2log.a +%versbiarchlib libm2log.so +%versbiarchlib libm2cor.a +%versbiarchlib libm2cor.so +%versbiarchlib libm2iso.a +%versbiarchlib libm2iso.so +%versbiarchlib libm2pim.a +%versbiarchlib libm2pim.so +%versbiarchlib libm2min.a +%versbiarchlib libm2min.so +%endif + +%files -n libm2log%{libm2_sover}%{libm2_suffix} +%defattr(-,root,root) +%mainlib libm2log.so.%{libm2_sover}* + +%if %{separate_biarch} +%files -n libm2log%{libm2_sover}%{libm2_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libm2log.so.%{libm2_sover}* +%endif + +%files -n libm2cor%{libm2_sover}%{libm2_suffix} +%defattr(-,root,root) +%mainlib libm2cor.so.%{libm2_sover}* + +%if %{separate_biarch} +%files -n libm2cor%{libm2_sover}%{libm2_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libm2cor.so.%{libm2_sover}* +%endif + +%files -n libm2iso%{libm2_sover}%{libm2_suffix} +%defattr(-,root,root) +%mainlib libm2iso.so.%{libm2_sover}* + +%if %{separate_biarch} +%files -n libm2iso%{libm2_sover}%{libm2_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libm2iso.so.%{libm2_sover}* +%endif + +%files -n libm2pim%{libm2_sover}%{libm2_suffix} +%defattr(-,root,root) +%mainlib libm2pim.so.%{libm2_sover}* + +%if %{separate_biarch} +%files -n libm2pim%{libm2_sover}%{libm2_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libm2pim.so.%{libm2_sover}* +%endif + +%files -n libm2min%{libm2_sover}%{libm2_suffix} +%defattr(-,root,root) +%mainlib libm2min.so.%{libm2_sover}* + +%if %{separate_biarch} +%files -n libm2min%{libm2_sover}%{libm2_suffix}%{separate_biarch_suffix} +%defattr(-,root,root) +%biarchlib libm2min.so.%{libm2_sover}* +%endif +%endif + +%if 0%{?run_tests:1} +%files -n gcc15-testresults +%defattr(-,root,root) +%doc testresults/test_summary.txt +%doc testresults/*.sum +%doc testresults/*.log +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/gcc15/gcc44-rename-info-files.patch b/SPECS/gcc15/gcc44-rename-info-files.patch new file mode 100644 index 00000000..65cc7974 --- /dev/null +++ b/SPECS/gcc15/gcc44-rename-info-files.patch @@ -0,0 +1,708 @@ +#! /bin/sh -e + +# DP: Allow transformations on info file names. Reference the +# DP: transformed info file names in the texinfo files. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + + +gcc/ChangeLog: + +2004-02-17 Matthias Klose + + * Makefile.in: Allow transformations on info file names. + Define MAKEINFODEFS, macros to pass transformated info file + names to makeinfo. + * doc/cpp.texi: Use macros defined in MAKEINFODEFS for references. + * doc/cppinternals.texi: Likewise. + * doc/extend.texi: Likewise. + * doc/gcc.texi: Likewise. + * doc/gccint.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/libgcc.texi: Likewise. + * doc/makefile.texi: Likewise. + * doc/passes.texi: Likewise. + * doc/sourcebuild.texi: Likewise. + * doc/standards.texi: Likewise. + * doc/trouble.texi: Likewise. + +gcc/fortran/ChangeLog: + * Make-lang.in: Allow transformations on info file names. + Pass macros of transformated info file defined in MAKEINFODEFS + names to makeinfo. + * gfortran.texi: Use macros defined in MAKEINFODEFS for references. + +gcc/java/ChangeLog: + * Make-lang.in: Allow transformations on info file names. + Pass macros of transformated info file defined in MAKEINFODEFS + names to makeinfo. + * gcj.texi: Use macros defined in MAKEINFODEFS for references. + + +--- + gcc/Makefile.in | 74 ++++++++++++++++++++++++++++++++++++---------- + gcc/ada/gnat-style.texi | 2 - + gcc/ada/gnat_rm.texi | 2 - + gcc/ada/gnat_ugn.texi | 2 - + gcc/doc/cpp.texi | 2 - + gcc/doc/cppinternals.texi | 2 - + gcc/doc/extend.texi | 2 - + gcc/doc/gcc.texi | 8 ++-- + gcc/doc/gccint.texi | 4 +- + gcc/doc/install.texi | 2 - + gcc/doc/invoke.texi | 10 +++--- + gcc/doc/libgcc.texi | 2 - + gcc/doc/makefile.texi | 2 - + gcc/doc/passes.texi | 2 - + gcc/doc/standards.texi | 4 +- + gcc/fortran/Make-lang.in | 11 +++--- + gcc/fortran/gfortran.texi | 2 - + gcc/java/Make-lang.in | 19 +++++++++-- + gcc/java/gcj.texi | 20 ++++++------ + libgomp/Makefile.am | 13 ++++---- + libgomp/Makefile.in | 14 ++++---- + libgomp/libgomp.texi | 2 - + 22 files changed, 131 insertions(+), 70 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index d8b76d83d68..4f9c274ee38 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3333,8 +3333,29 @@ install-no-fixedincludes: + no-info: info + endif + +-INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \ +- doc/gccinstall.info doc/cppinternals.info ++INFO_CPP_NAME = $(shell echo cpp|sed '$(program_transform_name)') ++INFO_GCC_NAME = $(shell echo gcc|sed '$(program_transform_name)') ++INFO_GXX_NAME = $(shell echo g++|sed '$(program_transform_name)') ++INFO_GCCINT_NAME = $(shell echo gccint|sed '$(program_transform_name)') ++INFO_GCCINSTALL_NAME = $(shell echo gccinstall|sed '$(program_transform_name)') ++INFO_CPPINT_NAME = $(shell echo cppinternals|sed '$(program_transform_name)') ++ ++INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)') ++INFO_GCJ_NAME = $(shell echo gcj|sed '$(program_transform_name)') ++INFO_GDC_NAME = $(shell echo gdc|sed '$(program_transform_name)') ++ ++INFOFILES = doc/$(INFO_CPP_NAME).info doc/$(INFO_GCC_NAME).info \ ++ doc/$(INFO_GCCINT_NAME).info \ ++ doc/$(INFO_GCCINSTALL_NAME).info doc/$(INFO_CPPINT_NAME).info ++ ++MAKEINFODEFS = -D 'fncpp $(INFO_CPP_NAME)' -D 'fngcc $(INFO_GCC_NAME)' \ ++ -D 'fngxx $(INFO_GXX_NAME)' \ ++ -D 'fngccint $(INFO_GCCINT_NAME)' \ ++ -D 'fngccinstall $(INFO_GCCINSTALL_NAME)' \ ++ -D 'fncppint $(INFO_CPPINT_NAME)' \ ++ -D 'fngfortran $(INFO_FORTRAN_NAME)' \ ++ -D 'fngcj $(INFO_GCJ_NAME)' \ ++ -D 'fngdc $(INFO_GDC_NAME)' + + info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo + +@@ -3390,21 +3411,41 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE) + # patterns. To use them, put each of the specific targets with its + # specific dependencies but no build commands. + +-doc/cpp.info: $(TEXI_CPP_FILES) +-doc/gcc.info: $(TEXI_GCC_FILES) +-doc/gccint.info: $(TEXI_GCCINT_FILES) +-doc/cppinternals.info: $(TEXI_CPPINT_FILES) +- ++# Generic entry to handle info files, which are not renamed (currently Ada) + doc/%.info: %.texi + if [ x$(BUILD_INFO) = xinfo ]; then \ + $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ + -I $(gcc_docdir)/include -o $@ $<; \ + fi + ++doc/$(INFO_CPP_NAME).info: $(TEXI_CPP_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ ++doc/$(INFO_GCC_NAME).info: $(TEXI_GCC_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ ++doc/$(INFO_GCCINT_NAME).info: $(TEXI_GCCINT_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ ++doc/$(INFO_CPPINT_NAME).info: $(TEXI_CPPINT_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ + # Duplicate entry to handle renaming of gccinstall.info +-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) ++doc/$(INFO_GCCINSTALL_NAME).info: $(TEXI_GCCINSTALL_FILES) + if [ x$(BUILD_INFO) = xinfo ]; then \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ + -I $(gcc_docdir)/include -o $@ $<; \ + fi + +@@ -3815,11 +3856,11 @@ install-driver: installdirs xgcc$(exeext) + # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir + # to do the install. + install-info:: doc installdirs \ +- $(DESTDIR)$(infodir)/cpp.info \ +- $(DESTDIR)$(infodir)/gcc.info \ +- $(DESTDIR)$(infodir)/cppinternals.info \ +- $(DESTDIR)$(infodir)/gccinstall.info \ +- $(DESTDIR)$(infodir)/gccint.info \ ++ $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info \ + lang.install-info + + $(DESTDIR)$(infodir)/%.info: doc/%.info installdirs +@@ -4058,8 +4099,11 @@ uninstall: lang.uninstall + -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext) + -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) + -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext) +- -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* +- -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info* + for i in ar nm ranlib ; do \ + install_name=`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ;\ + target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ; \ +diff --git a/gcc/ada/gnat-style.texi b/gcc/ada/gnat-style.texi +index f3b1c29a24f..46bd21535cf 100644 +--- a/gcc/ada/gnat-style.texi ++++ b/gcc/ada/gnat-style.texi +@@ -12,7 +12,7 @@ + @finalout + @dircategory GNU Ada Tools + @direntry +-* gnat-style: (gnat-style.info). gnat-style ++* gnat-style: (gnat-style-15.info). gnat-style + @end direntry + + @c %**end of header +diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi +index 212ed3df9d8..bed8ce40548 100644 +--- a/gcc/ada/gnat_rm.texi ++++ b/gcc/ada/gnat_rm.texi +@@ -12,7 +12,7 @@ + @finalout + @dircategory GNU Ada Tools + @direntry +-* gnat_rm: (gnat_rm.info). gnat_rm ++* GNAT Reference Manual: (gnat_rm-15). Reference Manual for GNU Ada tools. + @end direntry + + @c %**end of header +diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi +index a1daff92fbe..514931ec139 100644 +--- a/gcc/ada/gnat_ugn.texi ++++ b/gcc/ada/gnat_ugn.texi +@@ -12,7 +12,7 @@ + @finalout + @dircategory GNU Ada Tools + @direntry +-* gnat_ugn: (gnat_ugn.info). gnat_ugn ++* User's Guide: (gnat_ugn-15). + @end direntry + + @c %**end of header +diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in +index 1679fb81097..6845aa67d43 100644 +--- a/gcc/d/Make-lang.in ++++ b/gcc/d/Make-lang.in +@@ -247,10 +247,11 @@ D_TEXI_FILES = \ + $(gcc_docdir)/include/gcc-common.texi \ + gcc-vers.texi + +-doc/gdc.info: $(D_TEXI_FILES) ++INFO_GDC_NAME = $(shell echo gdc|sed '$(program_transform_name)') ++doc/$(INFO_GDC_NAME).info: $(D_TEXI_FILES) + if test "x$(BUILD_INFO)" = xinfo; then \ +- rm -f doc/gdc.info*; \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ ++ rm -f doc/$(INFO_GDC_NAME).info*; \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ + -I $(gcc_docdir)/include -o $@ $<; \ + else true; fi + +@@ -275,11 +276,11 @@ gdc.pod: d/gdc.texi + d.all.cross: gdc-cross$(exeext) + d.start.encap: gdc$(exeext) + d.rest.encap: +-d.info: doc/gdc.info ++d.info: doc/$(INFO_GDC_NAME).info + d.dvi: doc/gdc.dvi + d.pdf: doc/gdc.pdf + d.html: $(build_htmldir)/gdc/index.html +-d.srcinfo: doc/gdc.info ++d.srcinfo: doc/$(INFO_GDC_NAME).info + -cp -p $^ $(srcdir)/doc + d.srcextra: + +@@ -320,7 +321,7 @@ d.install-common: installdirs + + d.install-plugin: + +-d.install-info: $(DESTDIR)$(infodir)/gdc.info ++d.install-info: $(DESTDIR)$(infodir)/$(INFO_GDC_NAME).info + + d.install-pdf: doc/gdc.pdf + @$(NORMAL_INSTALL) +@@ -370,7 +371,7 @@ d.uninstall: + -rm -rf $(DESTDIR)$(bindir)/$(D_INSTALL_NAME)$(exeext) + -rm -rf $(DESTDIR)$(man1dir)/$(D_INSTALL_NAME)$(man1ext) + -rm -rf $(DESTDIR)$(bindir)/$(D_TARGET_INSTALL_NAME)$(exeext) +- -rm -rf $(DESTDIR)$(infodir)/gdc.info* ++ -rm -rf $(DESTDIR)$(infodir)/$(INFO_GDC_NAME).info* + + # Clean hooks. + +diff --git a/gcc/d/gdc.texi b/gcc/d/gdc.texi +index 24b6ee00478..1a35bb099e6 100644 +--- a/gcc/d/gdc.texi ++++ b/gcc/d/gdc.texi +@@ -38,7 +38,7 @@ man page gfdl(7). + @format + @dircategory Software development + @direntry +-* gdc: (gdc). A GCC-based compiler for the D language ++* @value{fngdc}: (@value{fngdc}). A GCC-based compiler for the D language + @end direntry + @end format + +diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi +index b0a2ce3ac6b..922a1c95181 100644 +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -50,7 +50,7 @@ This manual contains no Invariant Sections. The Front-Cover Texts are + @ifinfo + @dircategory Software development + @direntry +-* Cpp: (cpp). The GNU C preprocessor. ++* @value{fncpp}: (@value{fncpp}). The GNU C preprocessor. + @end direntry + @end ifinfo + +diff --git a/gcc/doc/cppinternals.texi b/gcc/doc/cppinternals.texi +index a8ddb5c190e..e8fe1fcf2d8 100644 +--- a/gcc/doc/cppinternals.texi ++++ b/gcc/doc/cppinternals.texi +@@ -7,7 +7,7 @@ + @ifinfo + @dircategory Software development + @direntry +-* Cpplib: (cppinternals). Cpplib internals. ++* @value{fncppint}: (@value{fncppint}). Cpplib internals. + @end direntry + @end ifinfo + +diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi +index 3adb67aa47a..0fae318cade 100644 +--- a/gcc/doc/extend.texi ++++ b/gcc/doc/extend.texi +@@ -24488,7 +24488,7 @@ want to write code that checks whether these features are available, you can + test for the GNU compiler the same way as for C programs: check for a + predefined macro @code{__GNUC__}. You can also use @code{__GNUG__} to + test specifically for GNU C++ (@pxref{Common Predefined Macros,, +-Predefined Macros,cpp,The GNU C Preprocessor}). ++Predefined Macros,@value{fncpp},The GNU C Preprocessor}). + + @menu + * C++ Volatiles:: What constitutes an access to a volatile object. +diff --git a/gcc/doc/gcc.texi b/gcc/doc/gcc.texi +index b3d500d4f47..d58e57dd480 100644 +--- a/gcc/doc/gcc.texi ++++ b/gcc/doc/gcc.texi +@@ -70,12 +70,12 @@ Texts being (a) (see below), and with the Back-Cover Texts being (b) + @ifnottex + @dircategory Software development + @direntry +-* gcc: (gcc). The GNU Compiler Collection. +-* g++: (gcc). The GNU C++ compiler. +-* gcov: (gcc) Gcov. @command{gcov}---a test coverage program. +-* gcov-tool: (gcc) Gcov-tool. @command{gcov-tool}---an offline gcda profile processing program. +-* gcov-dump: (gcc) Gcov-dump. @command{gcov-dump}---an offline gcda and gcno profile dump tool. +-* lto-dump: (gcc) lto-dump. @command{lto-dump}---Tool for ++* @value{fngcc}: (@value{fngcc}). The GNU Compiler Collection. ++* @value{fngxx}: (@value{fngcc}). The GNU C++ compiler. ++* gcov: (@value{fngcc}) Gcov. @command{gcov}---a test coverage program. ++* gcov-tool: (@value{fngcc}) Gcov-tool. @command{gcov-tool}---an offline gcda profile processing program. ++* gcov-dump: (@value{fngcc}) Gcov-dump. @command{gcov-dump}---an offline gcda and gcno profile dump tool. ++* lto-dump: (@value{fngcc}) Lto-dump. @command{lto-dump}---Tool for + dumping LTO object files. + @end direntry + @sp 1 +@@ -135,7 +135,7 @@ version @value{version-GCC}. + The internals of the GNU compilers, including how to port them to new + targets and some information about how to write front ends for new + languages, are documented in a separate manual. @xref{Top,, +-Introduction, gccint, GNU Compiler Collection (GCC) Internals}. ++Introduction, @value{fngccint}, GNU Compiler Collection (GCC) Internals}. + + @menu + * G++ and GCC:: You can compile C or C++ programs. +diff --git a/gcc/doc/gccint.texi b/gcc/doc/gccint.texi +index 33cf7fdafce..8c76bf8a0c6 100644 +--- a/gcc/doc/gccint.texi ++++ b/gcc/doc/gccint.texi +@@ -49,7 +49,7 @@ Texts being (a) (see below), and with the Back-Cover Texts being (b) + @ifnottex + @dircategory Software development + @direntry +-* gccint: (gccint). Internals of the GNU Compiler Collection. ++* @value{fngccint}: (@value{fngccint}). Internals of the GNU Compiler Collection. + @end direntry + This file documents the internals of the GNU compilers. + @sp 1 +@@ -81,7 +81,7 @@ write front ends for new languages. It corresponds to the compilers + @value{VERSION_PACKAGE} + @end ifset + version @value{version-GCC}. The use of the GNU compilers is documented in a +-separate manual. @xref{Top,, Introduction, gcc, Using the GNU ++separate manual. @xref{Top,, Introduction, @value{fngcc}, Using the GNU + Compiler Collection (GCC)}. + + This manual is mainly a reference manual rather than a tutorial. It +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index 63fc949b447..a5a1b01fc55 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -89,7 +89,7 @@ Free Documentation License}''. + @end ifinfo + @dircategory Software development + @direntry +-* gccinstall: (gccinstall). Installing the GNU Compiler Collection. ++* @value{fngccinstall}: (@value{fngccinstall}). Installing the GNU Compiler Collection. + @end direntry + + @c Part 3 Titlepage and Copyright +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index def2df4584b..e5385a6140f 100644 +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -17722,7 +17722,7 @@ One of the standard libraries bypassed by @option{-nostdlib} and + @option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines + which GCC uses to overcome shortcomings of particular machines, or special + needs for some languages. +-(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler ++(@xref{Interface,,Interfacing to GCC Output,@value{fngccint},GNU Compiler + Collection (GCC) Internals}, + for more discussion of @file{libgcc.a}.) + In most cases, you need @file{libgcc.a} even when you want to avoid +@@ -17731,7 +17731,7 @@ or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well. + This ensures that you have no unresolved references to internal GCC + library subroutines. + (An example of such an internal subroutine is @code{__main}, used to ensure C++ +-constructors are called; @pxref{Collect2,,@code{collect2}, gccint, ++constructors are called; @pxref{Collect2,,@code{collect2}, @value{fngccint}, + GNU Compiler Collection (GCC) Internals}.) + + @opindex nostdlib++ +@@ -35109,7 +35109,7 @@ Note that you can also specify places to search using options such as + @option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}). These + take precedence over places specified using environment variables, which + in turn take precedence over those specified by the configuration of GCC@. +-@xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint, ++@xref{Driver,, Controlling the Compilation Driver @file{gcc}, @value{fngccint}, + GNU Compiler Collection (GCC) Internals}. + + @table @env +@@ -35289,7 +35289,7 @@ the headers it contains change. + + A precompiled header file is searched for when @code{#include} is + seen in the compilation. As it searches for the included file +-(@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the ++(@pxref{Search Path,,Search Path,@value{fncpp},The C Preprocessor}) the + compiler looks for a precompiled header in each directory just before it + looks for the include file in that directory. The name searched for is + the name specified in the @code{#include} with @samp{.gch} appended. If +diff --git a/gcc/doc/libgcc.texi b/gcc/doc/libgcc.texi +index 73aa803f97b..e005588b88e 100644 +--- a/gcc/doc/libgcc.texi ++++ b/gcc/doc/libgcc.texi +@@ -24,7 +24,7 @@ that needs them. + GCC will also generate calls to C library routines, such as + @code{memcpy} and @code{memset}, in some cases. The set of routines + that GCC may possibly use is documented in @ref{Other +-Builtins,,,gcc, Using the GNU Compiler Collection (GCC)}. ++Builtins,,,@value{fngcc}, Using the GNU Compiler Collection (GCC)}. + + These routines take arguments and return values of a specific machine + mode, not a specific C type. @xref{Machine Modes}, for an explanation +diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in +index 1666fd8f0ff..96ec8861a3d 100644 +--- a/gcc/fortran/Make-lang.in ++++ b/gcc/fortran/Make-lang.in +@@ -116,7 +116,8 @@ fortran.tags: force + cd $(srcdir)/fortran; $(ETAGS) -o TAGS.sub *.cc *.h; \ + $(ETAGS) --include TAGS.sub --include ../TAGS.sub + +-fortran.info: doc/gfortran.info doc/gfc-internals.info ++INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)') ++fortran.info: doc/$(INFO_FORTRAN_NAME).info + + F95_DVIFILES = doc/gfortran.dvi + +@@ -199,10 +200,10 @@ GFORTRAN_TEXI = \ + $(srcdir)/doc/include/gcc-common.texi \ + gcc-vers.texi + +-doc/gfortran.info: $(GFORTRAN_TEXI) ++doc/$(INFO_FORTRAN_NAME).info: $(GFORTRAN_TEXI) + if [ x$(BUILD_INFO) = xinfo ]; then \ + rm -f doc/gfortran.info-*; \ +- $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \ ++ $(MAKEINFO) $(MAKEINFODEFS) -I $(srcdir)/doc/include -I $(srcdir)/fortran \ + -o $@ $<; \ + else true; fi + +@@ -267,7 +268,7 @@ fortran.install-common: install-finclude-dir installdirs + + fortran.install-plugin: + +-fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info ++fortran.install-info: $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info + + fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext) + +@@ -285,7 +286,7 @@ fortran.uninstall: + rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \ + rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \ + rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \ +- rm -rf $(DESTDIR)$(infodir)/gfortran.info* ++ rm -rf $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info* + + # + # Clean hooks: +diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi +index b96712987e1..55ed2a540c2 100644 +--- a/gcc/fortran/gfortran.texi ++++ b/gcc/fortran/gfortran.texi +@@ -101,7 +101,7 @@ Texts being (a) (see below), and with the Back-Cover Texts being (b) + @ifinfo + @dircategory Software development + @direntry +-* gfortran: (gfortran). The GNU Fortran Compiler. ++* @value{fngfortran}: (@value{fngfortran}). The GNU Fortran Compiler. + @end direntry + This file documents the use and the internals of + the GNU Fortran compiler, (@command{gfortran}). +diff --git a/libffi/Makefile.am b/libffi/Makefile.am +index c6d6f849c53..6fbf374a2e7 100644 +--- a/libffi/Makefile.am ++++ b/libffi/Makefile.am +@@ -28,6 +28,8 @@ TEXINFO_TEX = ../gcc/doc/include/texinfo.tex + # Defines info, dvi, pdf and html targets + MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include + info_TEXINFOS = doc/libffi.texi ++INFO_LIBFFI_NAME = $(shell echo libffi | sed '${program_transform_name}') ++INFO_DEPS = doc/$(INFO_LIBFFI_NAME).info + + # AM_CONDITIONAL on configure option --generated-files-in-srcdir + if GENINSRC +@@ -45,14 +47,14 @@ endif + + all-local: $(STAMP_GENINSRC) + +-stamp-geninsrc: doc/libffi.info +- cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info ++stamp-geninsrc: doc/$(INFO_LIBFFI_NAME).info ++ cp -p $(top_builddir)/doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.info + @touch $@ + +-doc/libffi.info: $(STAMP_BUILD_INFO) ++doc/$(INFO_LIBFFI_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp) +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibffi $(INFO_LIBFFI_NAME)' -I $(srcdir)/doc -o doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.texi + @touch $@ + + CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) +diff --git a/libffi/Makefile.in b/libffi/Makefile.in +index 5524a6a571e..1898ffee446 100644 +--- a/libffi/Makefile.in ++++ b/libffi/Makefile.in +@@ -249,7 +249,8 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) + am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) + am__v_texidevnull_0 = > /dev/null + am__v_texidevnull_1 = +-INFO_DEPS = doc/libffi.info ++INFO_LIBFFI_NAME = $(shell echo libffi | sed '${program_transform_name}') ++INFO_DEPS = doc/$(INFO_LIBFFI_NAME).info + am__TEXINFO_TEX_DIR = $(srcdir)/../gcc/doc/include + DVIS = doc/libffi.dvi + PDFS = doc/libffi.pdf +@@ -473,6 +474,8 @@ TEXINFO_TEX = ../gcc/doc/include/texinfo.tex + # Defines info, dvi, pdf and html targets + MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include + info_TEXINFOS = doc/libffi.texi ++INFO_LIBFFI_NAME = $(shell echo libffi | sed '${program_transform_name}') ++INFO_DEPS = doc/$(INFO_LIBFFI_NAME).info + @GENINSRC_FALSE@STAMP_GENINSRC = + + # AM_CONDITIONAL on configure option --generated-files-in-srcdir +@@ -1906,14 +1909,15 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + + all-local: $(STAMP_GENINSRC) + +-stamp-geninsrc: doc/libffi.info +- cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info ++$(srcdir)/doc/libffi.info: stamp-geninsrc ++stamp-geninsrc: doc/$(INFO_LIBFFI_NAME).info ++ cp -p $(top_builddir)/doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.info + @touch $@ + +-doc/libffi.info: $(STAMP_BUILD_INFO) ++doc/$(INFO_LIBFFI_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp) +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibffi $(INFO_LIBFFI_NAME)' -I $(srcdir)/doc -o doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.texi + @touch $@ + @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \ + @LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@ $(libffi_la_OBJECTS) $(libffi_la_LIBADD) +diff --git a/libffi/doc/libffi.texi b/libffi/doc/libffi.texi +index 7fd3625d992..62dc76d6d64 100644 +--- a/libffi/doc/libffi.texi ++++ b/libffi/doc/libffi.texi +@@ -43,7 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @dircategory Development + @direntry +-* libffi: (libffi). Portable foreign function interface library. ++* libffi: (@value{fnlibffi}). Portable foreign-function interface library. + @end direntry + + @titlepage +diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am +index 428f7a9dab5..cce97d85bc8 100644 +--- a/libgomp/Makefile.am ++++ b/libgomp/Makefile.am +@@ -129,14 +129,17 @@ endif + + all-local: $(STAMP_GENINSRC) + +-stamp-geninsrc: libgomp.info +- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info ++INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)') ++stamp-geninsrc: $(INFO_LIBGOMP_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info + @touch $@ + +-libgomp.info: $(STAMP_BUILD_INFO) ++libgomp.info: $(INFO_LIBGOMP_NAME).info ++ cp $(INFO_LIBGOMP_NAME).info libgomp.info ++$(STAMP_BUILD_INFO).info: $(STAMP_BUILD_INFO) + + stamp-build-info: libgomp.texi +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi + @touch $@ + + +diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in +index 2c81ccacc1d..0fb67876733 100644 +--- a/libgomp/Makefile.in ++++ b/libgomp/Makefile.in +@@ -612,6 +612,7 @@ info_TEXINFOS = libgomp.texi + + # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO]) + @BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info ++INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)') + CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) + MAINTAINERCLEANFILES = $(srcdir)/libgomp.info + MULTISRCTOP = +@@ -1392,15 +1393,16 @@ env.lo: libgomp_f.h + env.o: libgomp_f.h + + all-local: $(STAMP_GENINSRC) +- +-stamp-geninsrc: libgomp.info +- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info ++stamp-geninsrc: $(INFO_LIBGOMP_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info + @touch $@ + +-libgomp.info: $(STAMP_BUILD_INFO) ++libgomp.info: $(INFO_LIBGOMP_NAME).info ++ cp $(INFO_LIBGOMP_NAME).info libgomp.info ++$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: libgomp.texi +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi + @touch $@ + + # target overrides +diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi +index 5bcb84a1d6f..60715911924 100644 +--- a/libgomp/libgomp.texi ++++ b/libgomp/libgomp.texi +@@ -31,7 +31,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) + @ifinfo + @dircategory GNU Libraries + @direntry +-* libgomp: (libgomp). GNU Offloading and Multi Processing Runtime Library. ++* @value{fnlibgomp}: (@value{fnlibgomp}). GNU Offloading and Multi Processing Runtime Library. + @end direntry + + This manual documents libgomp, the GNU Offloading and Multi Processing +diff --git a/libitm/libitm.texi b/libitm/libitm.texi +index 9bb818fa53f..e62a90231f5 100644 +--- a/libitm/libitm.texi ++++ b/libitm/libitm.texi +@@ -20,7 +20,7 @@ Free Documentation License''. + @ifinfo + @dircategory GNU Libraries + @direntry +-* libitm: (libitm). GNU Transactional Memory Library ++* libitm: (libitm-6). GNU Transactional Memory Library + @end direntry + + This manual documents the GNU Transactional Memory Library. +diff --git a/libquadmath/libquadmath.texi b/libquadmath/libquadmath.texi +index 2e3a62511b1..ac658f5f2a7 100644 +--- a/libquadmath/libquadmath.texi ++++ b/libquadmath/libquadmath.texi +@@ -25,7 +25,7 @@ copy and modify this GNU manual. + @ifinfo + @dircategory GNU Libraries + @direntry +-* libquadmath: (libquadmath). GCC Quad-Precision Math Library ++* libquadmath: (libquadmath-6). GCC Quad-Precision Math Library + @end direntry + + This manual documents the GCC Quad-Precision Math Library API. diff --git a/SPECS/gcc15/gcc44-textdomain.patch b/SPECS/gcc15/gcc44-textdomain.patch new file mode 100644 index 00000000..627f6230 --- /dev/null +++ b/SPECS/gcc15/gcc44-textdomain.patch @@ -0,0 +1,115 @@ +#! /bin/sh -e + +# DP: Set gettext's domain and textdomain to the versioned package name. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 0fe2ba241..86e5fb9e7 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -4303,8 +4303,8 @@ install-po: + dir=$(localedir)/$$lang/LC_MESSAGES; \ + echo $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \ +- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ +- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ ++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-15.mo; \ ++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-15.mo; \ + done + + # Rule for regenerating the message template (gcc.pot). +diff --git a/gcc/intl.cc b/gcc/intl.cc +index e8108b7dc..62895c11f 100644 +--- a/gcc/intl.cc ++++ b/gcc/intl.cc +@@ -55,8 +55,8 @@ gcc_init_libintl (void) + setlocale (LC_ALL, ""); + #endif + +- (void) bindtextdomain ("gcc", LOCALEDIR); +- (void) textdomain ("gcc"); ++ (void) bindtextdomain ("gcc-15", LOCALEDIR); ++ (void) textdomain ("gcc-15"); + + /* Opening quotation mark. */ + open_quote = _("`"); +diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in +index 5fbba9b9c..c37bc6bcf 100644 +--- a/libcpp/Makefile.in ++++ b/libcpp/Makefile.in +@@ -49,6 +49,7 @@ LDFLAGS = @LDFLAGS@ + LIBICONV = @LIBICONV@ + LIBINTL = @LIBINTL@ + PACKAGE = @PACKAGE@ ++PACKAGE_SUFFIX = -15 + RANLIB = @RANLIB@ + SHELL = @SHELL@ + USED_CATALOGS = @USED_CATALOGS@ +@@ -76,8 +77,10 @@ INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \ + + ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG) \ + $(CET_HOST_FLAGS) ++ALL_CFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\" + ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \ + $(CPPFLAGS) $(PICFLAG) $(CET_HOST_FLAGS) ++ALL_CXXFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\" + + # The name of the compiler to use. + COMPILER = $(CXX) +@@ -166,8 +169,8 @@ install-strip install: all installdirs + else continue; \ + fi; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ +- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ +- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ ++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ ++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ + done + + mostlyclean: +diff --git a/libcpp/init.cc b/libcpp/init.cc +index 63124c816..4471ff358 100644 +--- a/libcpp/init.cc ++++ b/libcpp/init.cc +@@ -167,7 +167,7 @@ init_library (void) + init_trigraph_map (); + + #ifdef ENABLE_NLS +- (void) bindtextdomain (PACKAGE, LOCALEDIR); ++ (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR); + #endif + } + } +diff --git a/libcpp/system.h b/libcpp/system.h +index 0a0629d55..6fc28a651 100644 +--- a/libcpp/system.h ++++ b/libcpp/system.h +@@ -284,7 +284,7 @@ extern int errno; + #endif + + #ifndef _ +-# define _(msgid) dgettext (PACKAGE, msgid) ++# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid) + #endif + + #ifndef N_ diff --git a/SPECS/gdb/gdb.spec b/SPECS/gdb/gdb.spec new file mode 100644 index 00000000..0fd9d36b --- /dev/null +++ b/SPECS/gdb/gdb.spec @@ -0,0 +1,228 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Disable LTO until upstream fixes GDB's ODR woes. +%define _lto_cflags %{nil} + +Name: gdb +Version: 16.3 +Release: %autorelease +Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages +License: GPL-3.0-only WITH GCC-exception-3.1 AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND MIT +URL: https://www.gnu.org/software/gdb/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +# /etc/gdbinit (from Debian but with openRuyi compliant location). +Source2: gdbinit +BuildSystem: autotools + +BuildOption(conf): --disable-nls +BuildOption(conf): --disable-sim +BuildOption(conf): --with-system-readline +BuildOption(conf): --with-python=%{__python3} +BuildOption(conf): --with-gdb-datadir=%{_datadir}/gdb +BuildOption(conf): --with-system-gdbinit=%{_sysconfdir}/gdbinit +BuildOption(conf): --enable-source-highlight +BuildOption(conf): --enable-tui +BuildOption(conf): --enable-languages=all +BuildOption(conf): --enable-multilib +BuildOption(conf): --enable-build-with-cxx + +BuildRequires: texinfo +BuildRequires: flex +BuildRequires: python3-devel +BuildRequires: boost-devel +BuildRequires: pkgconfig(mpfr) +BuildRequires: pkgconfig(libxxhash) +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(source-highlight) + +%description +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Fortran, Go, and other languages, by executing them in a controlled +fashion and printing their data. + +If you want to use GDB for development purposes, you should install +the 'gdb' package which will install 'gdb-headless' and possibly other +useful packages too. + +%package gdbserver +Summary: A standalone server for GDB (the GNU source-level debugger) + +%description gdbserver +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Fortran, Go, and other languages, by executing them in a controlled +fashion and printing their data. + +This package provides a program that allows you to run GDB on a different +machine than the one which is running the program being debugged. + +%package doc +Summary: Documentation for GDB (the GNU source-level debugger) +License: GFDL +BuildArch: noarch +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info + +%description doc +GDB, the GNU debugger, allows you to debug programs written in C, C++, +Java, and other languages, by executing them in a controlled fashion +and printing their data. + +This package provides INFO, HTML and PDF user manual for GDB. + +%install -a +# Copy the /gdb/NEWS file to the directory above it. +cp $RPM_BUILD_DIR/%{name}-%{version}/gdb/NEWS $RPM_BUILD_DIR/%{name}-%{version}/ + +mkdir -p %{buildroot}%{_prefix}/libexec +mv -f %{buildroot}%{_bindir}/gdb %{buildroot}%{_prefix}/libexec/gdb +ln -s -r %{buildroot}%{_prefix}/libexec/gdb %{buildroot}%{_bindir}/gdb + +mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d +touch -r %{SOURCE2} %{buildroot}%{_sysconfdir}/gdbinit.d +sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE2} >%{buildroot}%{_sysconfdir}/gdbinit +touch -r %{SOURCE2} %{buildroot}%{_sysconfdir}/gdbinit + +for i in `find %{buildroot}%{_datadir}/gdb/python/gdb -name "*.py"` +do + # Files could be also patched getting the current time. + touch -r $RPM_BUILD_DIR/%{name}-%{version}/gdb/version.in $i +done + +%py_byte_compile %{__python3} %{buildroot}%{_datadir}/gdb/python/gdb + +# /usr/share/gdb/auto-load/ needs filesystem symlinks +for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do + # mkdir to satisfy dangling symlinks build check. + mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_root_prefix}/$i + ln -s $(echo %{_root_prefix}|sed 's#^/*##')/$i \ + %{buildroot}%{_datadir}/gdb/auto-load/$i +done +for i in `find %{buildroot}%{_datadir}/gdb -name "*.py"`; do + # Files are installed by install(1) not preserving the timestamps. + touch -r $RPM_BUILD_DIR/%{name}-%{version}/gdb/version.in $i +done + +# Create the folder where GDB expects to find custom JIT readers. +mkdir -p %{buildroot}%{_libdir}/gdb + +# Remove the files that are part of a gdb build but that are owned and +# provided by other packages. +# These are part of binutils +rm -rf %{buildroot}%{_datadir}/locale/ +rm -f %{buildroot}%{_infodir}/bfd* +rm -f %{buildroot}%{_infodir}/standard* +rm -f %{buildroot}%{_infodir}/configure* +rm -f %{buildroot}%{_infodir}/sframe-spec* +# Just exclude the header files in the top directory, and don't exclude +# the gdb/ directory, as it contains jit-reader.h. +rm -rf %{buildroot}%{_includedir}/*.h +rm -rf %{buildroot}/%{_libdir}/lib{bfd*,opcodes*,iberty*,ctf*,sframe*} + +# pstack obsoletion +ln -s gstack.1 %{buildroot}%{_mandir}/man1/pstack.1 +ln -s gstack %{buildroot}%{_bindir}/pstack + +# Packaged GDB is not a cross-target one. +(cd %{buildroot}%{_datadir}/gdb/syscalls +rm -f mips*.xml +rm -f sparc*.xml +rm -f amd64-linux.xml +rm -f i386-linux.xml +rm -f s390*.xml +rm -f ppc*.xml +rm -f aarch64-linux.xml +rm -f arm-linux.xml +rm -f freebsd.xml +rm -f loongarch-linux.xml +rm -f freebsd.xml +) + +# Documentation only for development. +rm -f %{buildroot}%{_infodir}/gdbint* +rm -f %{buildroot}%{_infodir}/stabs* +rm -f %{buildroot}%{_infodir}/ctf-spec* + +# Delete this too because the dir file will be updated at rpm install time. +# We don't want a gdb specific one overwriting the system wide one. +rm -f %{buildroot}%{_infodir}/dir + +%pre +for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do + src="%{_datadir}/gdb/auto-load/$i" + dst="%{_datadir}/gdb/auto-load/%{_root_prefix}/$i" + if test -d $src -a ! -L $src;then + if ! rmdir 2>/dev/null $src;then + mv -n $src/* $dst/ + rmdir $src + fi + fi +done + +%post doc +# This step is part of the installation of the RPM. Not to be confused +# with the 'make install ' of the build (rpmbuild) process. + +# For --excludedocs: +if [ -e %{_infodir}/gdb.info.gz ] +then + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || : + /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || : +fi + +%preun doc +if [ $1 = 0 ] +then + # For --excludedocs: + if [ -e %{_infodir}/gdb.info.gz ] + then + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || : + /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || : + fi +fi + +%files +%license COPYING3 COPYING COPYING.LIB COPYING3.LIB +%doc README NEWS +%{_bindir}/gdb +%{_bindir}/gcore +%{_mandir}/*/gcore.1* +%{_bindir}/gstack +%{_mandir}/*/gstack.1* +%{_bindir}/pstack +%{_mandir}/*/pstack.1* +# Provide gdb/jit-reader.h so that users are able to write their own GDB JIT +# plugins. +%{_includedir}/gdb +# Export the folder where JIT readers should be placed. +%dir %{_libdir}/gdb +%{_prefix}/libexec/gdb +%config(noreplace) %{_sysconfdir}/gdbinit +%{_mandir}/*/gdb.1* +%{_sysconfdir}/gdbinit.d +%{_mandir}/*/gdbinit.5* +%{_bindir}/gdb-add-index +%{_mandir}/*/gdb-add-index.1* +%{_datadir}/gdb + +%files gdbserver +%{_bindir}/gdbserver +%{_mandir}/*/gdbserver.1* + +%files doc +%{_infodir}/annotate.info* +%{_infodir}/gdb.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/gdb/gdbinit b/SPECS/gdb/gdbinit new file mode 100644 index 00000000..b59fb0da --- /dev/null +++ b/SPECS/gdb/gdbinit @@ -0,0 +1,9 @@ +# System-wide GDB initialization file. +python +import glob +# glob.iglob is not available in python-2.4 (RHEL-5). +for f in glob.glob('%{_sysconfdir}/gdbinit.d/*.gdb'): + gdb.execute('source %s' % f) +for f in glob.glob('%{_sysconfdir}/gdbinit.d/*.py'): + gdb.execute('source %s' % f) +end diff --git a/SPECS/gdbm/gdbm-no-build-date.patch b/SPECS/gdbm/gdbm-no-build-date.patch new file mode 100644 index 00000000..ce437a4f --- /dev/null +++ b/SPECS/gdbm/gdbm-no-build-date.patch @@ -0,0 +1,14 @@ +Index: gdbm-1.24/src/version.c +=================================================================== +--- gdbm-1.26.orig/src/version.c ++++ gdbm-1.26/src/version.c +@@ -24,9 +24,6 @@ + making the distdir. */ + const char * gdbm_version = "GDBM version " PACKAGE_VERSION ". " + "30/07/2025" +-#if defined(__STDC__) && defined(__DATE__) && defined(__TIME__) +- " (built " __DATE__ " " __TIME__ ")" +-#endif + ; + int const gdbm_version_number[3] = { + GDBM_VERSION_MAJOR, diff --git a/SPECS/gdbm/gdbm.spec b/SPECS/gdbm/gdbm.spec new file mode 100644 index 00000000..33404568 --- /dev/null +++ b/SPECS/gdbm/gdbm.spec @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define lname libgdbm6 +%define lcompat libgdbm_compat4 +Name: gdbm +Version: 1.26 +Release: %autorelease +Summary: GNU dbm key/data database +License: GPL-3.0-or-later +Group: Development/Libraries/C and C++ +URL: https://www.gnu.org/software/gdbm/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +Patch1: gdbm-no-build-date.patch +BuildRequires: libtool +BuildRequires: texinfo +BuildRequires: readline-devel + +BuildSystem: autotools +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-libgdbm-compat +BuildOption(conf): --enable-nls +BuildOption(conf): --with-readline + +%description +GNU dbm is a library of database functions that use extensible +hashing and work similar to the standard UNIX dbm. These routines are +provided to a programmer needing to create and manipulate a hashed +database. + +The basic use of GDBM is to store key/data pairs in a data file. Each +key must be unique and each key is paired with only one data item. + +The library provides primitives for storing key/data pairs, searching +and retrieving the data by its key and deleting a key along with its +data. It also supports sequential iteration over all key/data pairs in +a database. + +%package -n %{lname} +Summary: GNU dbm key/data database +# O/P added in 12.2 +License: GPL-3.0-or-later +Group: System/Libraries +Obsoletes: gdbm < %{version}-%{release} +Provides: gdbm = %{version}-%{release} +Provides: %{name} = %{version} + +%description -n %{lname} +GNU dbm is a library of database functions that use extensible +hashing and work similar to the standard UNIX dbm. These routines are +provided to a programmer needing to create and manipulate a hashed +database. + +The basic use of GDBM is to store key/data pairs in a data file. Each +key must be unique and each key is paired with only one data item. + +The library provides primitives for storing key/data pairs, searching +and retrieving the data by its key and deleting a key along with its +data. It also supports sequential iteration over all key/data pairs in +a database. + +%package -n %{lcompat} +Summary: GNU dbm key/data database compat wrapper +# Was provided in older sonames +License: GPL-3.0-or-later +Group: System/Libraries +Conflicts: libgdbm4 + +%description -n %{lcompat} +GNU dbm is a library of database functions that use extensible +hashing and work similar to the standard UNIX dbm. These routines are +provided to a programmer needing to create and manipulate a hashed +database. + +This library is providing compatibility wrappers. + +%package devel +Summary: Development files for the dbm key/data database library +License: GPL-3.0-or-later AND LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +Requires: %{lcompat} = %{version} +Requires: %{lname} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that require these. + +%check +%make_build check + +%install -a +echo "/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +GROUP ( %{_libdir}/libgdbm.so %{_libdir}/libgdbm_compat.so )" > %{buildroot}/%{_libdir}/libndbm.so +%find_lang %{name} --generate-subpackages + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig +%post -n %{lcompat} -p /sbin/ldconfig +%postun -n %{lcompat} -p /sbin/ldconfig + +%files -n %{lname} +%license COPYING +%{_libdir}/libgdbm.so.* + +%files -n %{lcompat} +%license COPYING +%{_libdir}/libgdbm_compat.so.* + +%files devel +%doc README NEWS +%{_bindir}/* +%{_includedir}/dbm.h +%{_includedir}/gdbm.h +%{_includedir}/ndbm.h +%{_infodir}/gdbm.info%{?ext_info} +%{_libdir}/libgdbm.so +%{_libdir}/libgdbm_compat.so +%{_libdir}/libndbm.so +%{_mandir}/man1/*%{ext_man} +%{_mandir}/man3/gdbm.3%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/genext2fs/genext2fs.spec b/SPECS/genext2fs/genext2fs.spec new file mode 100644 index 00000000..ccce51ab --- /dev/null +++ b/SPECS/genext2fs/genext2fs.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: genext2fs +Version: 1.5.0 +Release: %autorelease +Summary: ext2 filesystem generator +License: GPL-2.0-only +URL: https://github.com/bestouff/genext2fs/ +#!RemoteAsset +Source0: https://github.com/bestouff/genext2fs/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: autoconf automake gcc make libtool + +%description +genext2fs generates an ext2 filesystem as a normal (non-root) user. +It does not require you to mount the image file to copy files on it, +nor does it require that you become the superuser to make device nodes. + +%conf -p +autoreconf -fi + +%files +%license COPYING +%doc AUTHORS NEWS README.md +%{_bindir}/genext2fs +%{_mandir}/man8/genext2fs.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/genimage/genimage.spec b/SPECS/genimage/genimage.spec new file mode 100644 index 00000000..fd69baf2 --- /dev/null +++ b/SPECS/genimage/genimage.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: genimage +Version: 19 +Release: %autorelease +Summary: A tool to generate filesystem and disk images +License: GPL-2.0-only +URL: https://github.com/pengutronix/genimage/ +#!RemoteAsset +Source: https://github.com/pengutronix/genimage/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: libconfuse-devel +BuildRequires: libtool + +%description +genimage is a tool to generate multiple filesystem and flash/disk +images from a given root filesystem tree. + +%conf -p +autoreconf -fiv + +# TODO: enable tests when we have fakeroot. +%check + + +%files +%license COPYING +%doc README.rst +%{_bindir}/genimage + +%changelog +%{?autochangelog} diff --git a/SPECS/gettext/gettext-fix-nls-stub.patch b/SPECS/gettext/gettext-fix-nls-stub.patch new file mode 100644 index 00000000..68fee76d --- /dev/null +++ b/SPECS/gettext/gettext-fix-nls-stub.patch @@ -0,0 +1,26 @@ +diff --git a/libtextstyle/gnulib-local/lib/iconv-ostream.oo.c b/libtextstyle/gnulib-local/lib/iconv-ostream.oo.c +index 60cb174..5c94cff 100644 +--- a/libtextstyle/gnulib-local/lib/iconv-ostream.oo.c ++++ b/libtextstyle/gnulib-local/lib/iconv-ostream.oo.c +@@ -245,7 +245,7 @@ iconv_ostream::write_mem (iconv_ostream_t stream, const void *data, size_t len) + } + + static void +-iconv_ostream::flush (iconv_ostream_t stream) ++iconv_ostream::flush (iconv_ostream_t stream, ostream_flush_scope_t scope) + { + abort (); + } +diff --git a/libtextstyle/lib/iconv-ostream.oo.c b/libtextstyle/lib/iconv-ostream.oo.c +index 60cb174..5c94cff 100644 +--- a/libtextstyle/lib/iconv-ostream.oo.c ++++ b/libtextstyle/lib/iconv-ostream.oo.c +@@ -245,7 +245,7 @@ iconv_ostream::write_mem (iconv_ostream_t stream, const void *data, size_t len) + } + + static void +-iconv_ostream::flush (iconv_ostream_t stream) ++iconv_ostream::flush (iconv_ostream_t stream, ostream_flush_scope_t scope) + { + abort (); + } diff --git a/SPECS/gettext/gettext.spec b/SPECS/gettext/gettext.spec new file mode 100644 index 00000000..fd0a86b3 --- /dev/null +++ b/SPECS/gettext/gettext.spec @@ -0,0 +1,204 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond nls 1 + +Name: gettext +Version: 0.26 +Release: %autorelease +Summary: GNU Internationalization (i18n) and Localization (l10n) library and tools +License: (GPL-3.0-or-later AND LGPL-2.1-or-later) +URL: https://www.gnu.org/software/gettext/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz + +Patch0: gettext-fix-nls-stub.patch + +BuildSystem: autotools + +BuildOption(conf): --disable-csharp +BuildOption(conf): --with-xz +BuildOption(conf): --without-included-gettext +BuildOption(conf): --without-included-libunistring +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-rpath +%if %{with nls} +BuildOption(conf): --enable-nls +%else +BuildOption(conf): --disable-nls +%endif + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bison +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: make +BuildRequires: libunistring-devel +BuildRequires: ncurses-devel +BuildRequires: acl-devel +BuildRequires: libxml2-devel +BuildRequires: libattr-devel +BuildRequires: xz-devel +%if %{with nls} +BuildRequires: gettext-tools +%endif + +%description +Meta-package that installs the GNU gettext runtime and developer tools. + +Provides: bundled(gnulib) +Requires: %{name}-tools = %{version}-%{release} +Requires: libtextstyle%{?_isa} = %{version}-%{release} + +%package devel +Summary: Development files for the entire GNU gettext eco-system +Requires: %{name}-runtime%{?_isa} = %{version}-%{release} +Requires: %{name}-tools%{?_isa} = %{version}-%{release} +Requires: libtextstyle%{?_isa} = %{version}-%{release} +%description devel +This is the one-stop package for developing internationalized applications. +It provides all headers, pkgconfig files, and development libraries for +gettext-runtime, gettext-tools, and libtextstyle. + +%package runtime +Summary: Runtime components for gettext +Requires: envsubst = %{version}-%{release} +%description runtime +Contains runtime libraries (like libasprintf) and essential commands +(like gettext, ngettext) needed to run internationalized programs. + +%package tools +Summary: Tools for creating and managing message catalogs +Requires: %{name}-runtime = %{version}-%{release} +%description tools +Contains tools for developers and translators to create and manage +translation files (.po, .mo), such as msgfmt and xgettext. + +%package -n envsubst +Summary: Substitutes the values of environment variables +%description -n envsubst +A standalone utility to substitute environment variables in shell scripts. + +%package -n libtextstyle +Summary: Library for styling text on terminal emulators +License: LGPL-2.1-or-later +%description -n libtextstyle +Provides the libtextstyle library for styling console output. + +%package -n libtextstyle-devel +Summary: Development files for libtextstyle +Requires: libtextstyle%{?_isa} = %{version}-%{release} +%description -n libtextstyle-devel +Contains development files for the libtextstyle library. + +%package doc +Summary: Documentation and examples for gettext +BuildArch: noarch + +%description doc +Contains detailed documentation (info, html) and extensive examples. + +%if %{with nls} +%lang_package -n %{name}-runtime +%lang_package -n %{name}-tools +%endif + +%conf -p +autoreconf -fiv + +%install -a +rm -f %{buildroot}%{_infodir}/dir +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/*.a + +%if %{with nls} +%find_lang %{name}-runtime +%find_lang %{name}-tools +%endif + +%ldconfig_scriptlets -n gettext-runtime +%ldconfig_scriptlets -n gettext-tools +%ldconfig_scriptlets -n libtextstyle + +%files +%license COPYING +%doc AUTHORS NEWS README + +%files runtime +%{_bindir}/gettext +%{_bindir}/ngettext +%{_bindir}/gettext.sh +%{_libdir}/libasprintf.so.* +%{_libdir}/libasprintf.so +%{_libdir}/preloadable_libintl.so +%{_mandir}/man1/gettext.1* +%{_mandir}/man1/ngettext.1* + +%files tools +%{_bindir}/msg* +%{_bindir}/xgettext +%{_bindir}/autopoint +%{_bindir}/gettextize +%{_bindir}/printf_gettext +%{_bindir}/printf_ngettext +%{_bindir}/recode-sr-latin +%{_libdir}/libgettextlib-%{version}.so +%{_libdir}/libgettextsrc-%{version}.so +%{_libdir}/libgettextpo.so.* +%{_datadir}/aclocal/nls.m4 +%{_datadir}/gettext/ +%{_libexecdir}/gettext/ +%{_mandir}/man1/msg*.1* +%{_mandir}/man1/xgettext.1* +%{_mandir}/man1/gettextize.1* +%{_mandir}/man1/autopoint.1* +%{_mandir}/man1/recode*.1* +%{_mandir}/man1/printf_gettext.1* +%{_mandir}/man1/printf_ngettext.1* + +%files devel +# Development files for gettext-runtime +%{_includedir}/autosprintf.h +%{_libdir}/libasprintf.so +# Development files for gettext-tools +%{_includedir}/gettext-po.h +%{_libdir}/libgettextlib.so +%{_libdir}/libgettextsrc.so +%{_libdir}/libgettextpo.so +# Common development files +%{_datadir}/aclocal/nls.m4 +%{_datadir}/%{name}-%{version}/ +# API documentation +%{_mandir}/man3/* + +%files -n libtextstyle +%license COPYING +%{_libdir}/libtextstyle.so.* + +%files -n libtextstyle-devel +%{_includedir}/textstyle.h +%{_includedir}/textstyle/ +%{_libdir}/libtextstyle.so + +%files -n envsubst +%{_bindir}/envsubst +%{_mandir}/man1/envsubst.1* + +%files doc +%doc AUTHORS NEWS README +%doc %{_docdir}/%{name}/ +%{_infodir}/*.info* + +%if %{with nls} +%files -n %{name}-runtime-lang -f %{name}-runtime.lang +%files -n %{name}-tools-lang -f %{name}-tools.lang +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/gflags/0001-gflags-fix_pkgconfig.patch b/SPECS/gflags/0001-gflags-fix_pkgconfig.patch new file mode 100644 index 00000000..c0d33ec2 --- /dev/null +++ b/SPECS/gflags/0001-gflags-fix_pkgconfig.patch @@ -0,0 +1,12 @@ +diff -up gflags-2.2.2/cmake/package.pc.in.orig gflags-2.2.2/cmake/package.pc.in +--- gflags-2.2.2/cmake/package.pc.in.orig 2018-11-11 22:21:00.000000000 +0100 ++++ gflags-2.2.2/cmake/package.pc.in 2020-03-09 13:54:40.797884193 +0100 +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} + bindir=${prefix}/@RUNTIME_INSTALL_DIR@ +-libdir=${prefix}/@LIBRARY_INSTALL_DIR@ ++libdir=@LIBRARY_INSTALL_DIR@ + includedir=${prefix}/@INCLUDE_INSTALL_DIR@ + + Name: @PACKAGE_NAME@ diff --git a/SPECS/gflags/gflags.spec b/SPECS/gflags/gflags.spec new file mode 100644 index 00000000..21598512 --- /dev/null +++ b/SPECS/gflags/gflags.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gflags +Version: 2.2.2 +Release: %autorelease +Summary: Library for commandline flag processing +License: BSD-3-Clause +URL: https://gflags.github.io/gflags/ +#!RemoteAsset +Source0: https://github.com/gflags/gflags/archive/v%{version}/gflags-%{version}.tar.gz +Patch0: 0001-gflags-fix_pkgconfig.patch +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildSystem: cmake +BuildOption(conf): -DBUILD_TESTING=ON +BuildOption(conf): -DINSTALL_HEADERS=ON +BuildOption(conf): -DREGISTER_BUILD_DIR=OFF +BuildOption(conf): -DREGISTER_INSTALL_PREFIX=OFF +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +%description +The gflags package contains a library that implements commandline +flags processing. As such it's a replacement for getopt(). It has +increased flexibility, including built-in support for C++ types like +string, and the ability to define flags in the source file in which +they're used. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + +%files +%license COPYING.txt +%doc AUTHORS.txt ChangeLog.txt README.md +%{_bindir}/gflags_completions.sh +%{_libdir}/libgflags.so.* +%{_libdir}/libgflags_nothreads.so.* + +%files devel +%dir %{_includedir}/gflags +%{_includedir}/gflags/*.h +%{_libdir}/libgflags.so +%{_libdir}/pkgconfig/gflags.pc +%{_libdir}/libgflags_nothreads.so +%{_libdir}/cmake/gflags + +%changelog +%{?autochangelog} diff --git a/SPECS/gi-docgen/gi-docgen.spec b/SPECS/gi-docgen/gi-docgen.spec new file mode 100644 index 00000000..60f89c6b --- /dev/null +++ b/SPECS/gi-docgen/gi-docgen.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gi-docgen +Version: 2025.4 +Release: %autorelease +Summary: Documentation tool for GObject-based libraries +License: (Apache-2.0 OR GPL-3.0-or-later) AND CC0-1.0 AND MIT AND OFL-1.1 +URL: https://gitlab.gnome.org/GNOME/gi-docgen +#!RemoteAsset +Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2 +BuildSystem: pyproject + +BuildOption(install): gidocgen + +BuildRequires: make +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(wheel) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(jinja2) +BuildRequires: python3dist(markdown) +BuildRequires: python3dist(markupsafe) +BuildRequires: python3dist(pygments) +BuildRequires: python3dist(typogrify) + +Requires: python3dist(jinja2) +Requires: python3dist(markdown) +Requires: python3dist(markupsafe) +Requires: python3dist(packaging) +Requires: python3dist(pygments) +Requires: python3dist(typogrify) + +Provides: bundled(js-fzy) + +%description +GI-DocGen is a document generator for GObject-based libraries. GObject is the +base type system of the GNOME project. GI-Docgen reuses the introspection data +generated by GObject-based libraries to generate the API reference of these +libraries, as well as other ancillary documentation. + +GI-DocGen is not a general purpose documentation tool for C libraries. + +While GI-DocGen can be used to generate API references for most GObject/C +libraries that expose introspection data, its main goal is to generate the +reference for GTK and its immediate dependencies. Any and all attempts at +making this tool more generic, or to cover more use cases, will be weighted +heavily against its primary goal. + +GI-DocGen is still in development. The recommended use of GI-DocGen is to add +it as a sub-project to your Meson build system, and vendor it when releasing +dist archives. + +You should not depend on a system-wide installation until GI-DocGen is declared +stable. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSES/ .reuse/dep5 +%{_bindir}/gi-docgen +%{_mandir}/man1/gi-docgen.1* +# Should we split this into a -devel package in the future? - 251 +%{_datadir}/pkgconfig/gi-docgen.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/giflib/0001-disable-doc.patch b/SPECS/giflib/0001-disable-doc.patch new file mode 100644 index 00000000..1782e31b --- /dev/null +++ b/SPECS/giflib/0001-disable-doc.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile b/Makefile +index 87966a9..7f70d63 100644 +--- a/Makefile ++++ b/Makefile +@@ -90,7 +90,6 @@ endif + all: $(LIBGIFSO) libgif.a $(LIBUTILSO) libutil.a $(UTILS) + ifeq ($(UNAME), Darwin) + else +- $(MAKE) -C doc + endif + + $(UTILS):: libgif.a libutil.a diff --git a/SPECS/giflib/giflib.spec b/SPECS/giflib/giflib.spec new file mode 100644 index 00000000..9f9426fe --- /dev/null +++ b/SPECS/giflib/giflib.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: giflib +Version: 5.2.2 +Release: %autorelease +Summary: A Library for Working with GIF Images +License: MIT +URL: https://giflib.sourceforge.net/ +#!RemoteAsset +Source: https://downloads.sf.net/giflib/giflib-%{version}.tar.gz +Patch: 0001-disable-doc.patch +BuildSystem: autotools + +BuildOption(install): PREFIX="%{_prefix}" +BuildOption(install): LIBDIR="%{_libdir}" +BuildOption(install): INCDIR="%{_includedir}" +BuildOption(install): BINDIR="%{_bindir}" + +BuildRequires: fdupes +BuildRequires: libtool >= 2 +BuildRequires: gcc make + +%description +A library for manipulating GIF image files. With the expiration of the LZW +patent, giflib can be used as a replacement for libungif. + +%package devel +Summary: Development files for the giflib library +Requires: %{name} = %{version} + +%description devel +This package contains the header files and symbolic links needed to develop +applications that use the giflib library. + +# No configure +%conf + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +install -d -m 755 %{buildroot}%{_mandir}/man1 +for i in doc/*.1; do + install -pm 0644 ${i} %{buildroot}%{_mandir}/man1/ +done + +%fdupes -s doc + +rm -f %{buildroot}%{_libdir}/libgif.a + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/lib*.so.* +%doc NEWS README doc +%{_bindir}/* +%{_mandir}/man1/* + +%files devel +%{_includedir}/gif_lib.h +%{_libdir}/lib*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/git/0001-git-2.51-sanitize-sideband-channel-messages.patch b/SPECS/git/0001-git-2.51-sanitize-sideband-channel-messages.patch new file mode 100644 index 00000000..c43072d7 --- /dev/null +++ b/SPECS/git/0001-git-2.51-sanitize-sideband-channel-messages.patch @@ -0,0 +1,273 @@ +From 247950ec070cef60c45a877d24a4770991d1eefc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= +Date: Wed, 20 Aug 2025 09:35:47 +0200 +Subject: [PATCH] sideband: mask control characters +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The output of `git clone` is a vital component for understanding what +has happened when things go wrong. However, these logs are partially +under the control of the remote server (via the "sideband", which +typically contains what the remote `git pack-objects` process sends to +`stderr`), and is currently not sanitized by Git. + +This makes Git susceptible to ANSI escape sequence injection (see +CWE-150, https://cwe.mitre.org/data/definitions/150.html), which allows +attackers to corrupt terminal state, to hide information, and even to +insert characters into the input buffer (i.e. as if the user had typed +those characters). + +To plug this vulnerability, disallow any control character in the +sideband, replacing them instead with the common `^` +(e.g. `^[` for `\x1b`, `^A` for `\x01`). + +There is likely a need for more fine-grained controls instead of using a +"heavy hammer" like this, which will be introduced subsequently. + +Signed-off-by: Johannes Schindelin + +sideband: introduce an "escape hatch" to allow control characters + +The preceding commit fixed the vulnerability whereas sideband messages +(that are under the control of the remote server) could contain ANSI +escape sequences that would be sent to the terminal verbatim. + +However, this fix may not be desirable under all circumstances, e.g. +when remote servers deliberately add coloring to their messages to +increase their urgency. + +To help with those use cases, give users a way to opt-out of the +protections: `sideband.allowControlCharacters`. + +Signed-off-by: Johannes Schindelin + +sideband: do allow ANSI color sequences by default + +The preceding two commits introduced special handling of the sideband +channel to neutralize ANSI escape sequences before sending the payload +to the terminal, and `sideband.allowControlCharacters` to override that +behavior. + +However, some `pre-receive` hooks that are actively used in practice +want to color their messages and therefore rely on the fact that Git +passes them through to the terminal. + +In contrast to other ANSI escape sequences, it is highly unlikely that +coloring sequences can be essential tools in attack vectors that mislead +Git users e.g. by hiding crucial information. + +Therefore we can have both: Continue to allow ANSI coloring sequences to +be passed to the terminal, and neutralize all other ANSI escape +sequences. + +Signed-off-by: Johannes Schindelin + +sideband: default to allowControlCharacters=true + +We don't want to change the default Git behaviour, just add the option +to filter control characters. + +Signed-off-by: Ondřej Pohořelský +--- + Documentation/config.adoc | 2 + + Documentation/config/sideband.adoc | 16 ++++++ + sideband.c | 78 ++++++++++++++++++++++++++++- + t/t5409-colorize-remote-messages.sh | 31 ++++++++++++ + 4 files changed, 125 insertions(+), 2 deletions(-) + create mode 100644 Documentation/config/sideband.adoc + +diff --git a/Documentation/config.adoc b/Documentation/config.adoc +index cc769251be..a8b04c4e51 100644 +--- a/Documentation/config.adoc ++++ b/Documentation/config.adoc +@@ -522,6 +522,8 @@ include::config/sequencer.adoc[] + + include::config/showbranch.adoc[] + ++include::config/sideband.adoc[] ++ + include::config/sparse.adoc[] + + include::config/splitindex.adoc[] +diff --git a/Documentation/config/sideband.adoc b/Documentation/config/sideband.adoc +new file mode 100644 +index 0000000000..a809e2de89 +--- /dev/null ++++ b/Documentation/config/sideband.adoc +@@ -0,0 +1,16 @@ ++sideband.allowControlCharacters:: ++ By default, control characters that are delivered via the sideband ++ are NOT masked. Use this config setting to prevent potentially ++ unwanted ANSI escape sequences from being sent to the terminal: +++ ++-- ++ color:: ++ Allow ANSI color sequences, line feeds and horizontal tabs, ++ but mask all other control characters. ++ false:: ++ Mask all control characters other than line feeds and ++ horizontal tabs. ++ true:: ++ Allow all control characters to be sent to the terminal. ++ This is the default. ++-- +diff --git a/sideband.c b/sideband.c +index 8f15b98a65..461eea0a51 100644 +--- a/sideband.c ++++ b/sideband.c +@@ -26,6 +26,12 @@ static struct keyword_entry keywords[] = { + { "error", GIT_COLOR_BOLD_RED }, + }; + ++static enum { ++ ALLOW_NO_CONTROL_CHARACTERS = 0, ++ ALLOW_ALL_CONTROL_CHARACTERS = 1, ++ ALLOW_ANSI_COLOR_SEQUENCES = 2 ++} allow_control_characters = ALLOW_ALL_CONTROL_CHARACTERS; ++ + /* Returns a color setting (GIT_COLOR_NEVER, etc). */ + static int use_sideband_colors(void) + { +@@ -39,6 +45,25 @@ static int use_sideband_colors(void) + if (use_sideband_colors_cached >= 0) + return use_sideband_colors_cached; + ++ switch (repo_config_get_maybe_bool(the_repository, "sideband.allowcontrolcharacters", &i)) { ++ case 0: /* Boolean value */ ++ allow_control_characters = i ? ALLOW_ALL_CONTROL_CHARACTERS : ++ ALLOW_NO_CONTROL_CHARACTERS; ++ break; ++ case -1: /* non-Boolean value */ ++ if (repo_config_get_string_tmp(the_repository, "sideband.allowcontrolcharacters", ++ &value)) ++ ; /* huh? `get_maybe_bool()` returned -1 */ ++ else if (!strcmp(value, "color")) ++ allow_control_characters = ALLOW_ANSI_COLOR_SEQUENCES; ++ else ++ warning(_("unrecognized value for `sideband." ++ "allowControlCharacters`: '%s'"), value); ++ break; ++ default: ++ break; /* not configured */ ++ } ++ + if (!repo_config_get_string_tmp(the_repository, key, &value)) + use_sideband_colors_cached = git_config_colorbool(key, value); + else if (!repo_config_get_string_tmp(the_repository, "color.ui", &value)) +@@ -66,6 +91,55 @@ void list_config_color_sideband_slots(struct string_list *list, const char *pref + list_config_item(list, prefix, keywords[i].keyword); + } + ++static int handle_ansi_color_sequence(struct strbuf *dest, const char *src, int n) ++{ ++ int i; ++ ++ /* ++ * Valid ANSI color sequences are of the form ++ * ++ * ESC [ [ [; ]*] m ++ */ ++ ++ if (allow_control_characters != ALLOW_ANSI_COLOR_SEQUENCES || ++ n < 3 || src[0] != '\x1b' || src[1] != '[') ++ return 0; ++ ++ for (i = 2; i < n; i++) { ++ if (src[i] == 'm') { ++ strbuf_add(dest, src, i + 1); ++ return i; ++ } ++ if (!isdigit(src[i]) && src[i] != ';') ++ break; ++ } ++ ++ return 0; ++} ++ ++static void strbuf_add_sanitized(struct strbuf *dest, const char *src, int n) ++{ ++ int i; ++ ++ if (allow_control_characters == ALLOW_ALL_CONTROL_CHARACTERS) { ++ strbuf_add(dest, src, n); ++ return; ++ } ++ ++ strbuf_grow(dest, n); ++ for (; n && *src; src++, n--) { ++ if (!iscntrl(*src) || *src == '\t' || *src == '\n') ++ strbuf_addch(dest, *src); ++ else if ((i = handle_ansi_color_sequence(dest, src, n))) { ++ src += i; ++ n -= i; ++ } else { ++ strbuf_addch(dest, '^'); ++ strbuf_addch(dest, 0x40 + *src); ++ } ++ } ++} ++ + /* + * Optionally highlight one keyword in remote output if it appears at the start + * of the line. This should be called for a single line only, which is +@@ -81,7 +155,7 @@ static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n) + int i; + + if (!want_color_stderr(use_sideband_colors())) { +- strbuf_add(dest, src, n); ++ strbuf_add_sanitized(dest, src, n); + return; + } + +@@ -114,7 +188,7 @@ static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n) + } + } + +- strbuf_add(dest, src, n); ++ strbuf_add_sanitized(dest, src, n); + } + + +diff --git a/t/t5409-colorize-remote-messages.sh b/t/t5409-colorize-remote-messages.sh +index fa5de4500a..2d40d8c640 100755 +--- a/t/t5409-colorize-remote-messages.sh ++++ b/t/t5409-colorize-remote-messages.sh +@@ -98,4 +98,35 @@ test_expect_success 'fallback to color.ui' ' + grep "error: error" decoded + ' + ++test_expect_success 'disallow (color) control sequences in sideband' ' ++ write_script .git/color-me-surprised <<-\EOF && ++ printf "error: Have you \\033[31mread\\033[m this?\\a\\n" >&2 ++ exec "$@" ++ EOF ++ test_config_global uploadPack.packObjectshook ./color-me-surprised && ++ test_commit need-at-least-one-commit && ++ ++ git -c sideband.allowControlCharacters=color \ ++ clone --no-local . throw-away 2>stderr && ++ test_decode_color decoded && ++ test_grep RED decoded && ++ test_grep "\\^G" stderr && ++ tr -dc "\\007" actual && ++ test_must_be_empty actual && ++ ++ rm -rf throw-away && ++ git -c sideband.allowControlCharacters=false \ ++ clone --no-local . throw-away 2>stderr && ++ test_decode_color decoded && ++ test_grep ! RED decoded && ++ test_grep "\\^G" stderr && ++ ++ rm -rf throw-away && ++ git -c sideband.allowControlCharacters clone --no-local . throw-away 2>stderr && ++ test_decode_color decoded && ++ test_grep RED decoded && ++ tr -dc "\\007" actual && ++ test_file_not_empty actual ++' ++ + test_done +-- +2.50.1 diff --git a/SPECS/git/git.socket b/SPECS/git/git.socket new file mode 100644 index 00000000..3dec01d2 --- /dev/null +++ b/SPECS/git/git.socket @@ -0,0 +1,9 @@ +[Unit] +Description=Git Activation Socket + +[Socket] +ListenStream=9418 +Accept=true + +[Install] +WantedBy=sockets.target diff --git a/SPECS/git/git.spec b/SPECS/git/git.spec new file mode 100644 index 00000000..c69b7432 --- /dev/null +++ b/SPECS/git/git.spec @@ -0,0 +1,520 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# We can't build these right now +# Change these to 1 once we can +%bcond docs 0 +%bcond cvs 0 +%bcond libsecret 0 + +Name: git +Version: 2.51.0 +Release: %autorelease +Summary: Fast Version Control System +License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +URL: https://git-scm.com/ +VCS: git:https://github.com/git/git +#!RemoteAsset +Source0: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.sign +Source2: gitweb-httpd.conf +Source3: gitweb.conf.in +Source4: git@.service.in +Source5: git.socket +BuildSystem: autotools + +# CVE-2024-52005: https://github.com/gitgitgadget/git/pull/1853 +Patch0: 0001-git-2.51-sanitize-sideband-channel-messages.patch + +BuildOption(build): all + +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-macros +BuildRequires: pcre2-devel +BuildRequires: xz +BuildRequires: systemd-rpm-macros +BuildRequires: perl(Error) +BuildRequires: perl(lib) +BuildRequires: perl(Test) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(python) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(bash-completion) +%if %{with docs} +BuildRequires: docbook-style-dsssl +BuildRequires: rubygem-asciidoctor +BuildRequires: perl(File::Compare) +BuildRequires: xmlto +BuildRequires: linkchecker +%endif +%if %{with cvs} +BuildRequires: cvs +BuildRequires: cvsps +%endif + +Requires: git-core = %{version}-%{release} +Requires: git-core-doc = %{version}-%{release} +Requires: perl-Git = %{version}-%{release} + +%description +Git is a fast, scalable, distributed revision control system with an +unusually rich command set that provides both high-level operations +and full access to internals. + +The git rpm installs common set of tools which are usually using with +small amount of dependencies. To install all git packages, including +tools for integrating with other SCMs, install the git-all meta-package. + +%package core +Summary: Core package of git with minimal functionality +Requires: less +Requires: openssh-clients +Requires: zlib + +%description core +Git is a fast, scalable, distributed revision control system with an +unusually rich command set that provides both high-level operations +and full access to internals. + +The git-core rpm installs really the core tools with minimal +dependencies. Install git package for common set of tools. +To install all git packages, including tools for integrating with +other SCMs, install the git-all meta-package. + +%package core-doc +Summary: Documentation files for git-core +BuildArch: noarch +Requires: git-core = %{version}-%{release} + +%description core-doc +Documentation files for git-core package including man pages. + +%if %{with libsecret} +%package credential-libsecret +Summary: Git helper for accessing credentials via libsecret +BuildRequires: libsecret-devel +Requires: git = %{version}-%{release} + +%description credential-libsecret +Git helper for accessing credentials via libsecret. +%endif + +%if %{with cvs} +%package cvs +Summary: Git tools for importing CVS repositories +BuildArch: noarch +Requires: git = %{version}-%{release} +Requires: cvs +Requires: cvsps +Requires: perl(DBD::SQLite) + +%description cvs +Git tools for importing CVS repositories. +%endif + +%package daemon +Summary: Git protocol daemon +Requires: git-core = %{version}-%{release} +%{?systemd_requires} + +%description daemon +The git daemon for supporting git:// access to git repositories. + +%package email +Summary: Git tools for sending patches via email +BuildArch: noarch +Requires: git = %{version}-%{release} +Requires: perl(Authen::SASL) +Requires: perl(Cwd) +Requires: perl(Email::Valid) +Requires: perl(File::Spec) +Requires: perl(File::Spec::Functions) +Requires: perl(File::Temp) +Requires: perl(IO::Socket::SSL) +Requires: perl(Mail::Address) +Requires: perl(MIME::Base64) +Requires: perl(MIME::QuotedPrint) +Requires: perl(Net::Domain) +Requires: perl(Net::SMTP) +Requires: perl(Net::SMTP::SSL) +Requires: perl(POSIX) +Requires: perl(Sys::Hostname) +Requires: perl(Term::ANSIColor) +Requires: perl(Term::ReadLine) +Requires: perl(Text::ParseWords) + +%description email +Git tools for sending patches via email. + +%package -n gitk +Summary: Git repository browser +BuildArch: noarch +Requires: git = %{version}-%{release} +Requires: git-gui = %{version}-%{release} +Requires: tk + +%description -n gitk +Git repository browser. + +%package -n gitweb +Summary: Simple web interface to git repositories +BuildArch: noarch +Requires: git = %{version}-%{release} + +%description -n gitweb +Simple web interface to git repositories. + +%package gui +Summary: Graphical interface to Git +BuildArch: noarch +Requires: gitk = %{version}-%{release} +Requires: tk + +%description gui +Graphical interface to Git. + +%package p4 +Summary: Git tools for working with Perforce depots +BuildArch: noarch +BuildRequires: pkgconfig(python) +Requires: git = %{version}-%{release} + +%description p4 +Git tools for working with Perforce depots. + +%package -n perl-Git +Summary: Perl interface to Git +BuildArch: noarch +Requires: git = %{version}-%{release} + +%description -n perl-Git +Perl interface to Git. + +%package -n perl-Git-SVN +Summary: Perl interface to Git::SVN +BuildArch: noarch +Requires: git = %{version}-%{release} + +%description -n perl-Git-SVN +Perl interface to Git::SVN. + +%package subtree +Summary: Git tools to merge and split repositories +BuildArch: noarch +Requires: git-core = %{version}-%{release} + +%description subtree +Git subtrees allow subprojects to be included within a subdirectory +of the main project, optionally including the subproject's entire +history. + +%package svn +Summary: Git tools for interacting with Subversion repositories +BuildArch: noarch +Requires: git = %{version}-%{release} +Requires: perl(Digest::MD5) +Requires: perl(Term::ReadKey) +Requires: subversion + +%description svn +Git tools for interacting with Subversion repositories. + +%prep -a +%if %{without cvs} +# Remove git-cvs* from command list +sed -i '/^git-cvs/d' command-list.txt +%endif + +# Use these same options for every invocation of 'make'. +# Otherwise it will rebuild in %%install due to flags changes. +cat << \EOF | tee config.mak +CFLAGS = %{optflags} +GITWEB_CONFIG = "%{_sysconfdir}/gitweb.conf" +GITWEB_PROJECTROOT = "%{_localstatedir}/lib/git" +%if %{with docs} +USE_ASCIIDOCTOR = YesPlease +%endif +PYTHON_PATH = %{_bindir}/python3 +USE_LIBPCRE2 = YesPlease +NO_PERL_CPAN_FALLBACKS = 1 +prefix = %{_prefix} +mandir = %{_mandir} +htmldir = %{_docdir}/git +perllibdir = %{perl_vendorlib} +gitexecdir = %{_libexecdir}/git +gitwebdir = %{_localstatedir}/www/git +V = 1 +EOF + +# Move contrib/{contacts,subtree} docs to Documentation so they build with the +# proper asciidoc/docbook/xmlto options +mv contrib/{contacts,subtree}/git-*.adoc Documentation/ + +%conf +# No conf + +%build -p +# Improve build reproducibility +export TZ=UTC +export SOURCE_DATE_EPOCH=$(date -r version +%%s 2>/dev/null) + +%build -a +%make_build -C contrib/contacts/ all +%if %{with libsecret} +%make_build -C contrib/credential/libsecret/ +%endif +%make_build -C contrib/credential/netrc/ +%make_build -C contrib/diff-highlight/ +%make_build -C contrib/subtree/ all + +# Remove contrib/fast-import/import-zips.py which requires python2. +rm -rf contrib/fast-import/import-zips.py + +%install -a +%make_install -C contrib/contacts +%if %{with libsecret} +install -pm 755 contrib/credential/libsecret/git-credential-libsecret \ + %{buildroot}%{_libexecdir}/git +%endif + +install -pm 755 contrib/credential/netrc/git-credential-netrc \ + %{buildroot}%{_libexecdir}/git + +%make_install -C contrib/subtree + +mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d +install -pm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{gitweb_httpd_conf} +sed "s|@PROJECTROOT@|%{_localstatedir}/lib/git|g" \ + %{SOURCE3} > %{buildroot}%{_sysconfdir}/gitweb.conf + +# install contrib/diff-highlight +install -Dpm 0755 contrib/diff-highlight/diff-highlight \ + %{buildroot}%{_datadir}/git/contrib/diff-highlight + +%if %{without cvs} +# Remove git-cvs* and gitcvs* +find %{buildroot} Documentation \( -type f -o -type l \) \ + \( -name 'git-cvs*' -o -name 'gitcvs*' \) -exec rm -f {} ';' +%endif + +mkdir -p %{buildroot}%{_localstatedir}/lib/git +install -Dp -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/git.socket +perl -p \ + -e "s|\@GITEXECDIR\@|%{_libexecdir}/git|g;" \ + -e "s|\@BASE_PATH\@|%{_localstatedir}/lib/git|g;" \ + %{SOURCE4} > %{buildroot}%{_unitdir}/git@.service + +# Remove unneeded git-remote-testsvn so git-svn can be noarch +rm -f %{buildroot}%{_libexecdir}/git/git-remote-testsvn + +# Generate %%files list for convinience of packagers +exclude_re="email|git-(citool|credential-libsecret|cvs|daemon|gui|instaweb|p4|subtree|svn)|gitk|gitweb|p4merge" +(find %{buildroot}{%{_bindir},%{_libexecdir}} -type f -o -type l | grep -vE "$exclude_re" | sed -e s@^%{buildroot}@@) > bin-man-doc-files +(find %{buildroot}{%{_bindir},%{_libexecdir}} -mindepth 1 -type d | grep -vE "$exclude_re" | sed -e 's@^%{buildroot}@%dir @') >> bin-man-doc-files +(find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) > perl-git-files +(find %{buildroot}%{perl_vendorlib} -mindepth 1 -type d | sed -e 's@^%{buildroot}@%dir @') >> perl-git-files +# Split out Git::SVN files +grep Git/SVN perl-git-files > perl-git-svn-files +sed -i "/Git\/SVN/ d" perl-git-files +%if %{with docs} +(find %{buildroot}%{_mandir} -type f | grep -vE "$exclude_re|Git" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files +%else +rm -rf %{buildroot}%{_mandir} +%endif + +# Setup bash completion +install -Dpm 644 contrib/completion/git-completion.bash %{buildroot}%{bash_completions_dir}/git +ln -s git %{buildroot}%{bash_completions_dir}/gitk + +# Install tcsh completion +mkdir -p %{buildroot}%{_datadir}/git/contrib/completion +install -pm 644 contrib/completion/git-completion.tcsh \ + %{buildroot}%{_datadir}/git/contrib/completion/ + +# Install git-prompt.sh +mkdir -p %{buildroot}%{_datadir}/git/contrib/completion +install -pm 644 contrib/completion/git-prompt.sh \ + %{buildroot}%{_datadir}/git/contrib/completion/ + +# find translations +%find_lang %{name} %{name}.lang +cat %{name}.lang >> bin-man-doc-files + +# Delete unwanted files +find . -regex '.*/\.\(git\(attributes\|ignore\)\|perlcriticrc\)' -delete +chmod a-x Documentation/technical/api-index.sh +find contrib -type f -print0 | xargs -r0 chmod -x + +# Split core files +not_core_re="git-(add--interactive|contacts|credential-netrc|filter-branch|instaweb|request-pull|send-mail)|gitweb" +grep -vE "$not_core_re|%{_mandir}" bin-man-doc-files > bin-files-core +touch man-doc-files-core +%if %{with docs} +grep -vE "$not_core_re" bin-man-doc-files | grep "%{_mandir}" > man-doc-files-core +%endif +grep -E "$not_core_re" bin-man-doc-files > bin-man-doc-git-files + +# Install docs +mkdir -p "%{buildroot}/%{_docdir}/git" "%{buildroot}/%{_docdir}/git/howto" "%{buildroot}/%{_docdir}/git/technical" +cp -a README.md Documentation/*.adoc "%{buildroot}/%{_docdir}/git/" +cp -a Documentation/howto/*.adoc "%{buildroot}/%{_docdir}/git/howto/" +cp -a Documentation/technical/*.adoc "%{buildroot}/%{_docdir}/git/technical/" +%if %{with docs} +cp -a Documentation/*.html "%{buildroot}/%{_docdir}/git/" +cp -a Documentation/howto/*.html "%{buildroot}/%{_docdir}/git/howto/" +cp -a Documentation/technical/*.html "%{buildroot}/%{_docdir}/git/technical/" +%endif + +cp -p gitweb/INSTALL %{buildroot}%{_docdir}/git/INSTALL.gitweb +cp -p gitweb/README %{buildroot}%{_docdir}/git/README.gitweb +cp -pr CODE_OF_CONDUCT.md README.md Documentation/*.adoc Documentation/RelNotes contrib %{buildroot}%{_docdir}/git/ +# place doc files into %{_docdir}/git and split them into expected packages +not_core_doc_re="(git-(cvs|gui|citool|daemon|instaweb|subtree))|p4|svn|email|gitk|gitweb" +{ + find %{buildroot}%{_docdir}/git -type f -maxdepth 1 \ + | grep -o "%{_docdir}/git.*$" \ + | grep -vE "$not_core_doc_re" + find %{buildroot}%{_docdir}/git/{contrib,RelNotes,howto,technical} -type f \ + | grep -o "%{_docdir}/git.*$" + find %{buildroot}%{_docdir}/git -type d | grep -o "%{_docdir}/git.*$" \ + | sed "s/^/\%dir /" +} >> man-doc-files-core + +%post daemon +%systemd_post git.socket + +%preun daemon +%systemd_preun git.socket + +%postun daemon +%systemd_postun_with_restart git.socket + +%files -f bin-man-doc-git-files +%{_datadir}/git/contrib/diff-highlight + +%files core -f bin-files-core +%license COPYING +# exclude is best way here because of troubles with symlinks inside git/ +%exclude %{_datadir}/git/contrib/diff-highlight +%{bash_completions_dir}/git +%{_datadir}/git/ +%{_datadir}/git-core/ + +%files core-doc -f man-doc-files-core + +%if %{with libsecret} +%files credential-libsecret +%{_libexecdir}/git/git-credential-libsecret +%endif + +%if %{with cvs} +%files cvs +%{_docdir}/git/*git-cvs*.adoc +%{_bindir}/git-cvsserver +%{_libexecdir}/git/*cvs* +%if %{with docs} +%{_mandir}/man1/*cvs*.1* +%{_docdir}/git/*git-cvs*.html +%endif +%endif + +%files daemon +%{_docdir}/git/git-daemon*.adoc +%{_unitdir}/git.socket +%config(noreplace) %{_unitdir}/git@.service +%{_libexecdir}/git/git-daemon +%{_localstatedir}/lib/git +%if %{with docs} +%{_mandir}/man1/git-daemon*.1* +%{_docdir}/git/git-daemon*.html +%endif + +%files email +%{_docdir}/git/*email*.adoc +%{_libexecdir}/git/*email* +%if %{with docs} +%{_mandir}/man1/*email*.1* +%{_docdir}/git/*email*.html +%endif + +%files -n gitk +%{_docdir}/git/*gitk*.adoc +%{_bindir}/*gitk* +%{_datadir}/gitk +%{bash_completions_dir}/gitk +%if %{with docs} +%{_mandir}/man1/*gitk*.1* +%{_docdir}/git/*gitk*.html +%endif + +%files -n gitweb +%{_docdir}/git/*.gitweb +%{_docdir}/git/gitweb*.adoc +%{_libexecdir}/git/git-instaweb +%{_docdir}/git/git-instaweb.adoc +%if %{with docs} +%{_mandir}/man1/gitweb.1* +%{_mandir}/man5/gitweb.conf.5* +%{_docdir}/git/gitweb*.html +%{_mandir}/man1/git-instaweb.1* +%{_docdir}/git/git-instaweb.html +%endif +%config(noreplace)%{_sysconfdir}/gitweb.conf +%config(noreplace)%{_sysconfdir}/httpd/conf.d/%{gitweb_httpd_conf} +%{_localstatedir}/www/git/ + +%files gui +%{_libexecdir}/git/git-gui* +%{_libexecdir}/git/git-citool +%{_datadir}/git-gui/ +%{_docdir}/git/git-gui.adoc +%{_docdir}/git/git-citool.adoc +%if %{with docs} +%{_mandir}/man1/git-gui.1* +%{_docdir}/git/git-gui.html +%{_mandir}/man1/git-citool.1* +%{_docdir}/git/git-citool.html +%endif + +%files p4 +%{_libexecdir}/git/*p4* +%{_libexecdir}/git/mergetools/p4merge +%{_docdir}/git/*p4*.adoc +%if %{with docs} +%{_mandir}/man1/*p4*.1* +%{_docdir}/git/*p4*.html +%endif + +%files -n perl-Git -f perl-git-files +%if %{with docs} +%{_mandir}/man3/Git.3pm* +%endif + +%files -n perl-Git-SVN -f perl-git-svn-files + +%files subtree +%{_libexecdir}/git/git-subtree +%{_docdir}/git/git-subtree.adoc +%if %{with docs} +%{_mandir}/man1/git-subtree.1* +%{_docdir}/git/git-subtree.html +%endif + +%files svn +%{_libexecdir}/git/git-svn +%{_docdir}/git/git-svn.adoc +%if %{with docs} +%{_mandir}/man1/git-svn.1* +%{_docdir}/git/git-svn.html +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/git/git@.service.in b/SPECS/git/git@.service.in new file mode 100644 index 00000000..7abcfeb3 --- /dev/null +++ b/SPECS/git/git@.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=Git Repositories Server Daemon +Documentation=man:git-daemon(1) + +[Service] +User=nobody +ExecStart=-@GITEXECDIR@/git-daemon --base-path=@BASE_PATH@ --export-all \ + --user-path=public_git --inetd --log-destination=stderr --verbose +StandardInput=socket +StandardError=journal diff --git a/SPECS/git/gitweb-httpd.conf b/SPECS/git/gitweb-httpd.conf new file mode 100644 index 00000000..4f4eac7c --- /dev/null +++ b/SPECS/git/gitweb-httpd.conf @@ -0,0 +1,7 @@ +Alias /git /var/www/git + + + Options +ExecCGI + AddHandler cgi-script .cgi + DirectoryIndex gitweb.cgi + diff --git a/SPECS/git/gitweb.conf.in b/SPECS/git/gitweb.conf.in new file mode 100644 index 00000000..c04a96bf --- /dev/null +++ b/SPECS/git/gitweb.conf.in @@ -0,0 +1,53 @@ +# The gitweb config file is a fragment of perl code. You can set variables +# using "our $variable = value"; text from "#" character until the end of a +# line is ignored. See perlsyn(1) man page for details. +# +# See /usr/share/doc/gitweb-*/README and /usr/share/doc/gitweb-*/INSTALL for +# more details and available configuration variables. + +# Set the path to git projects. This is an absolute filesystem path which will +# be prepended to the project path. +#our $projectroot = "@PROJECTROOT@"; + +# Set the list of git base URLs used for URL to where fetch project from, i.e. +# the full URL is "$git_base_url/$project". By default this is empty +#our @git_base_url_list = qw(git://git.example.com +# ssh://git.example.com@PROJECTROOT@); + +# Enable the 'blame' blob view, showing the last commit that modified +# each line in the file. This can be very CPU-intensive. Disabled by default +#$feature{'blame'}{'default'} = [1]; +# +# Allow projects to override the default setting via git config file. +# Example: gitweb.blame = 0|1; +#$feature{'blame'}{'override'} = 1; + +# Disable the 'snapshot' link, providing a compressed archive of any tree. This +# can potentially generate high traffic if you have large project. Enabled for +# .tar.gz snapshots by default. +# +# Value is a list of formats defined in %known_snapshot_formats that you wish +# to offer. +#$feature{'snapshot'}{'default'} = []; +# +# Allow projects to override the default setting via git config file. +# Example: gitweb.snapshot = tbz2,zip; (use "none" to disable) +#$feature{'snapshot'}{'override'} = 1; + +# Disable grep search, which will list the files in currently selected tree +# containing the given string. This can be potentially CPU-intensive, of +# course. Enabled by default. +#$feature{'grep'}{'default'} = [0]; +# +# Allow projects to override the default setting via git config file. +# Example: gitweb.grep = 0|1; +#$feature{'grep'}{'override'} = 1; + +# Disable the pickaxe search, which will list the commits that modified a given +# string in a file. This can be practical and quite faster alternative to +# 'blame', but still potentially CPU-intensive. Enabled by default. +#$feature{'pickaxe'}{'default'} = [0]; +# +# Allow projects to override the default setting via git config file. +# Example: gitweb.pickaxe = 0|1; +#$feature{'pickaxe'}{'override'} = 1; diff --git a/SPECS/glib/_multibuild b/SPECS/glib/_multibuild new file mode 100644 index 00000000..2eb4fdaf --- /dev/null +++ b/SPECS/glib/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/SPECS/glib/glib.spec b/SPECS/glib/glib.spec new file mode 100644 index 00000000..981f96ea --- /dev/null +++ b/SPECS/glib/glib.spec @@ -0,0 +1,238 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "bootstrap" +%bcond bootstrap 1 +%else +%bcond bootstrap 0 +%endif + +%bcond static 0 +%bcond tests 0 +%bcond doc 0 +%bcond man 0 + +%if "%{flavor}" == "bootstrap" +Name: glib-bootstrap +%else +Name: glib +%endif +Version: 2.86.0 +release: 1 +Summary: A core application building block and utility library +License: LGPL-2.1-or-later +URL: https://www.gtk.org +#!RemoteAsset +Source0: https://download.gnome.org/sources/glib/2.86/glib-%{version}.tar.xz + +Patch0: meson.build-Avoid-linking-with-libatomic-when-unneed.patch + +BuildSystem: meson + +# --- Declarative Build Options --- +# These options are derived directly from analyzing the meson.build files. +BuildOption(conf): --default-library=%{?with_static:both}%{!?with_static:shared} +# Upstream recommendation: distros should disable glib_debug for production. +BuildOption(conf): -Dglib_debug=disabled +# Use the upstream-provided multiarch support for helper binaries. +BuildOption(conf): -Dmultiarch=true +BuildOption(conf): -Dselinux=%{?with_bootstrap:disabled}%{!?with_bootstrap:enabled} +BuildOption(conf): -Dlibmount=enabled +# Handle bootstrap mode by disabling features with circular/heavy dependencies. +BuildOption(conf): -Dintrospection=%{?with_bootstrap:disabled}%{!?with_bootstrap:enabled} +BuildOption(conf): -Dinstalled_tests=%{?with_tests:true}%{!?with_tests:false} +BuildOption(conf): -Ddocumentation=%{?with_doc:true}%{!?with_doc:false} +BuildOption(conf): -Ddtrace=disabled +BuildOption(conf): -Dsystemtap=disabled +BuildOption(conf): -Dsysprof=disabled +BuildOption(conf): -Dman-pages=%{?with_man:enabled}%{!?with_man:disabled} +BuildOption(conf): -Dxattr=true + +BuildRequires: gcc-c++ +BuildRequires: gettext +BuildRequires: meson +BuildRequires: libelf-devel +BuildRequires: libffi-devel +BuildRequires: pcre2-devel +BuildRequires: pkgconfig(mount) +BuildRequires: zlib-devel +BuildRequires: python3-devel +BuildRequires: libattr-devel +# Conditional dependencies, disabled during bootstrap +%if %{without bootstrap} +BuildRequires: gobject-introspection-devel +BuildRequires: libselinux-devel +%endif +# Conditional dependencies for documentation +%if %{with doc} +BuildRequires: pkgconfig(gi-docgen) +%endif +# Conditional dependencies for tests +%if %{with tests} +BuildRequires: dbus-daemon +BuildRequires: shared-mime-info +%endif +%if %{with man} +BuildRequires: python3-docutils +%endif + +%description +GLib is the low-level core library that forms the basis of GTK and GNOME. +It provides data structure handling for C, portability wrappers, and interfaces +for an event loop, threads, dynamic loading, and an object system. +This package contains the essential runtime libraries and tools. + +%package devel +Summary: Development files for the GLib library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +This package contains the header files, libraries, and developer tools +needed to build applications that use GLib. + +%if %{with doc} +%package doc +Summary: Documentation for the GLib library +BuildArch: noarch +%description doc +This package contains the API documentation for the GLib library. +%endif + +%if %{with tests} +%package tests +Summary: Tests for the GLib library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description tests +Contains installed tests that can be used to verify the functionality +of the installed GLib package. +%endif + +%install -a +# Fix broken absolute symlinks created by meson -Dmultiarch=true --- +rm -f %{buildroot}%{_bindir}/gio-querymodules +rm -f %{buildroot}%{_bindir}/glib-compile-schemas + +ln -sf ../%{_lib}/glib-2.0/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules +ln -sf ../%{_lib}/glib-2.0/glib-compile-schemas %{buildroot}%{_bindir}/glib-compile-schemas + +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +# XXX: Why doesn't find_lang pack them up? +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en_CA +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en_GB +%find_lang glib20 --generate-subpackages --all-name + +# handle GIO/GSettings cache updates. +%transfiletriggerin -- %{_libdir}/gio/modules +# Use the multiarch path for the query tool +%{_libdir}/glib-2.0/gio-querymodules %{_libdir}/gio/modules &> /dev/null || : + +%transfiletriggerpostun -- %{_libdir}/gio/modules +%{_libdir}/glib-2.0/gio-querymodules %{_libdir}/gio/modules &> /dev/null || : + +%transfiletriggerin -- %{_datadir}/glib-2.0/schemas +glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + +%transfiletriggerpostun -- %{_datadir}/glib-2.0/schemas +glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + + +%files +%license LICENSES/LGPL-2.1-or-later.txt +%doc NEWS README.md +# Runtime libraries +%{_libdir}/libglib-2.0.so.* +%{_libdir}/libgthread-2.0.so.* +%{_libdir}/libgmodule-2.0.so.* +%{_libdir}/libgobject-2.0.so.* +%{_libdir}/libgio-2.0.so.* +%{_libdir}/libgirepository-2.0.so.* +%if %{without bootstrap} +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/*.typelib +%endif +# Runtime tools, data, and multiarch helpers +%{_bindir}/gio +%{_bindir}/gsettings +%{_bindir}/gdbus +%{_bindir}/gapplication +# Added: The symlink for glib-compile-schemas +%{_bindir}/glib-compile-schemas +# Added: The symlink for gio-querymodules +%{_bindir}/gio-querymodules +# The actual binaries installed by Meson with -Dmultiarch=true +%{_libdir}/glib-2.0/gio-querymodules +%{_libdir}/glib-2.0/glib-compile-schemas +%{_libdir}/glib-2.0/gio-launch-desktop +%{_datadir}/bash-completion/completions/gapplication +%{_datadir}/bash-completion/completions/gdbus +%{_datadir}/bash-completion/completions/gio +%{_datadir}/bash-completion/completions/gsettings + +%files devel +%{_libdir}/lib*.so +%dir %{_libdir}/glib-2.0 +%dir %{_libdir}/glib-2.0/include +%{_libdir}/glib-2.0/include/glibconfig.h +%{_includedir}/glib-2.0/ +%{_includedir}/gio-unix-2.0/ +%{_libdir}/pkgconfig/*.pc +%{_datadir}/aclocal/*.m4 +# Added: GDB helper scripts for better debugging experience +%dir %{_datadir}/gdb +%dir %{_datadir}/gdb/auto-load +%dir %{_datadir}/gdb/auto-load/usr +%dir %{_datadir}/gdb/auto-load/usr/%{_lib} +%{_datadir}/gdb/auto-load/usr/%{_lib}/libglib-2.0.so.*-gdb.py +%{_datadir}/gdb/auto-load/usr/%{_lib}/libgobject-2.0.so.*-gdb.py +# Added: gettext integration files +%dir %{_datadir}/gettext +%dir %{_datadir}/gettext/its +%{_datadir}/gettext/its/gschema.its +%{_datadir}/gettext/its/gschema.loc +# Added: codegen scripts, DTDs, and valgrind suppressions +%{_datadir}/glib-2.0/gdb/ +%{_datadir}/glib-2.0/gettext/ +%{_datadir}/glib-2.0/schemas/gschema.dtd +%{_datadir}/glib-2.0/codegen/ +%{_datadir}/glib-2.0/dtds/ +%{_datadir}/glib-2.0/valgrind/ +%{_datadir}/bash-completion/completions/gresource +%if %{without bootstrap} +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/*.gir +%endif +# Devel tools +%{_bindir}/glib-genmarshal +%{_bindir}/glib-gettextize +%{_bindir}/glib-mkenums +%{_bindir}/gobject-query +%{_bindir}/gtester +# Added: gtester-report tool +%{_bindir}/gtester-report +%{_bindir}/gdbus-codegen +%{_bindir}/glib-compile-resources +%{_bindir}/gresource +%{_bindir}/gi-compile-repository +%{_bindir}/gi-decompile-typelib +%{_bindir}/gi-inspect-typelib + +%if %{with doc} +%files doc +%{_datadir}/doc/glib-2.0/ +%{_datadir}/doc/gobject-2.0/ +%{_datadir}/doc/gio-2.0/ +%endif + +%if %{with tests} +%files tests +%{_libexecdir}/installed-tests/glib/ +%{_datadir}/installed-tests/glib/ +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/glib/meson.build-Avoid-linking-with-libatomic-when-unneed.patch b/SPECS/glib/meson.build-Avoid-linking-with-libatomic-when-unneed.patch new file mode 100644 index 00000000..144acdbe --- /dev/null +++ b/SPECS/glib/meson.build-Avoid-linking-with-libatomic-when-unneed.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Thu, 4 Sep 2025 20:43:05 +0200 +Subject: [PATCH] meson.build: Avoid linking with libatomic when unneeded + +Arch Linux doesn't need it and the lack of a static libatomic is causing +trouble for downstream builds using a static GLib. + +See: https://gitlab.archlinux.org/archlinux/packaging/packages/qemu/-/issues/6 +--- + meson.build | 29 +++++++++++++++++++++++------ + 1 file changed, 23 insertions(+), 6 deletions(-) + +diff --git a/meson.build b/meson.build +index acaf447594ab..f7cf636b37aa 100644 +--- a/meson.build ++++ b/meson.build +@@ -2290,13 +2290,30 @@ libffi_dep = dependency('libffi', version : '>= 3.0.0') + + libz_dep = dependency('zlib') + +-libatomic_test_code = ''' +- int main (int argc, char ** argv) { +- return 0; +- }''' + atomic_dep = [] +-if cc.links(libatomic_test_code, args : '-latomic', name : 'check for -latomic') +- atomic_dep = cc.find_library('atomic') ++if threads_implementation == 'posix' ++ stdatomic_test_code = ''' ++ #include ++ int main (int argc, char ** argv) { ++ atomic_uint atomic = 2; ++ unsigned int old = 2; ++ atomic_compare_exchange_strong_explicit(&atomic, &old, 3, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED); ++ }''' ++ __atomic_test_code = ''' ++ int main (int argc, char ** argv) { ++ int atomic = 2; ++ int old = 2; ++ __atomic_compare_exchange_4 (&atomic, &old, 3, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED); ++ return 0; ++ }''' ++ if not cc.links(stdatomic_test_code, name: 'built-in stdatomic') and \ ++ not cc.links(__atomic_test_code, name: 'built-in __atomic') ++ atomic_dep = cc.find_library('atomic', required: true) ++ if not cc.links(stdatomic_test_code, dependencies: atomic_dep, name: '-latomic stdatomic') and \ ++ not cc.links(__atomic_test_code, dependencies: atomic_dep, name: '-latomic __atomic') ++ error('libatomic is unusable') ++ endif ++ endif + endif + + # First check in libc, fallback to libintl, and as last chance build diff --git a/SPECS/glibc/glibc-2.4-china.diff b/SPECS/glibc/glibc-2.4-china.diff new file mode 100644 index 00000000..02e68f57 --- /dev/null +++ b/SPECS/glibc/glibc-2.4-china.diff @@ -0,0 +1,22 @@ +Index: glibc-2.27/localedata/locales/zh_TW +=================================================================== +--- glibc-2.27.orig/localedata/locales/zh_TW ++++ glibc-2.27/localedata/locales/zh_TW +@@ -8,7 +8,7 @@ escape_char / + % exempt you from the conditions of the license if your use would + % otherwise be governed by that license. + +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % + % Original Author: + % Ming-Che Chuang +@@ -23,7 +23,7 @@ escape_char / + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" diff --git a/SPECS/glibc/glibc.spec b/SPECS/glibc/glibc.spec new file mode 100644 index 00000000..10b756f0 --- /dev/null +++ b/SPECS/glibc/glibc.spec @@ -0,0 +1,747 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Run with --with=fast_build to have a shorter turnaround +# It will avoid building some parts of glibc +%bcond_with fast_build + +%define flavor @BUILD_FLAVOR@%{nil} + +%bcond build_all 0 +%define build_main 1 +%define build_utils %{with build_all} +%define build_testsuite %{with build_all} +%if "%flavor" == "utils" +%define build_main 0 +%define build_utils 1 +%define build_testsuite 0 +%endif +%if "%flavor" == "testsuite" +%define build_main 0 +%define build_utils 0 +%define build_testsuite 1 +%endif +%define host_arch %{_target_cpu} + +%if %{build_main} +%define name_suffix %{nil} +%else +%define name_suffix -%{flavor}-src +%endif + +%define __filter_GLIBC_PRIVATE 1 +%if %{with fast_build} || %{build_utils} && %{without build_all} +%else +%endif + +%define build_variants %{build_main} + +%define disable_assert 0 +%define enable_stackguard_randomization 1 + + +Name: glibc%{name_suffix} +Summary: Standard Shared Libraries (from the GNU C Library) +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 +Version: 2.42 +Release: %autorelease +URL: https://www.gnu.org/software/libc/libc.html +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/glibc/glibc-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/glibc/glibc-%{version}.tar.xz.sig +Source5: nsswitch.conf +# For systemd +Source20: nscd.conf +Source21: nscd.service +Source22: nscd.sysusers + +%if %{build_main} +Requires(pre): filesystem +Recommends: glibc-extra +Recommends: glibc-gconv-modules-extra +Provides: rtld(GNU_HASH) +Provides: /sbin/ldconfig +%endif +%if %{build_utils} +Requires: glibc = %{version} +%endif +BuildRequires: audit-devel +BuildRequires: bison +BuildRequires: libcap-devel +BuildRequires: libselinux-devel +BuildRequires: texinfo +BuildRequires: python3 +BuildRequires: systemd-rpm-macros +BuildRequires: systemtap-sdt-devel +BuildRequires: sysuser-tools +BuildRequires: xz +%if 0%{?with_gcc:1} +BuildRequires: gcc%{with_gcc} +%endif +%if %{build_testsuite} +BuildRequires: gcc%{?with_gcc}-c++ +BuildRequires: gdb +BuildRequires: glibc-static +BuildRequires: libidn2-0 +BuildRequires: libstdc++-devel +BuildRequires: python3-pexpect +%endif +%if %{build_utils} +BuildRequires: gdb-devel +BuildRequires: zlib-devel +%endif + +Patch100: glibc-2.4-china.diff + +%description +The GNU C Library provides the most important standard libraries used +by nearly all programs: the standard C library, the standard math +library, and the POSIX thread library. A system is not functional +without these libraries. + +%package -n glibc-utils +Summary: Development utilities from the GNU C Library +License: LGPL-2.1-or-later +Requires: glibc = %{version} + +%description -n glibc-utils +The glibc-utils package contains mtrace, a memory leak tracer and +xtrace, a function call tracer which can be helpful during program +debugging. + +If you are unsure if you need this, do not install this package. + +%package -n glibc-testsuite +Summary: Testsuite results from the GNU C Library +License: LGPL-2.1-or-later + +%description -n glibc-testsuite +This package contains the testsuite results from the GNU C Library. + +%if %{build_main} + +%package info +Summary: Info Files for the GNU C Library +License: GFDL-1.1-only +Group: Documentation/Other +BuildArch: noarch + +%description info +This package contains the documentation for the GNU C library stored as +info files. Due to a lack of resources, this documentation is not +complete and is partially out of date. + + +%package i18ndata +Summary: Database Sources for 'locale' +License: GPL-2.0-or-later AND MIT +BuildArch: noarch + +%description i18ndata +This package contains the data needed to build the locale data files to +use the internationalization features of the GNU libc. It is normally +not necessary to install this packages, the data files are already +created. + +%package locale-base +Summary: en_US Locale Data for Localized Programs +License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later +Requires: glibc = %{version} + +%description locale-base +Locale data for the internationalisation features of the GNU C library. +This package contains only the U.S. English locale. + +%package locale +Summary: Locale Data for Localized Programs +License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later +Requires: glibc-locale-base = %{version} + +%description locale +Locale data for the internationalisation features of the GNU C library. + +%package -n nscd +Summary: Name Service Caching Daemon +License: GPL-2.0-or-later +Provides: glibc:/usr/sbin/nscd +Requires: glibc = %{version} +Obsoletes: unscd <= 0.48 +%{?sysusers_requires} +%{?systemd_requires} + +%description -n nscd +Nscd caches name service lookups and can dramatically improve +performance with NIS, NIS+, and LDAP. + +%package gconv-modules-extra +Summary: Non-essential gconv modules +License: LGPL-2.1-or-later +Requires: glibc = %{version} +Provides: glibc-locale-base:%{_libdir}/gconv/BIG5.so + +%description gconv-modules-extra +Modules for use by the iconv facility, to support encodings other than +Latin-1 and UTF based. + +%package devel +Summary: Include Files and Libraries Mandatory for Development +License: BSD-3-Clause AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later +Obsoletes: epoll = 1.0 +Provides: epoll < 1.0 +Requires: glibc = %{version} +Requires: libxcrypt-devel +Requires: linux-headers + +%description devel +These libraries are needed to develop programs which use the standard C +library. + +%package static +Summary: C library static libraries for -static linking +License: BSD-3-Clause AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later +Requires: %{name}-devel = %{version} +Requires: libxcrypt-static +Provides: %{name}-static = %{version} + +%description static +The glibc-static package contains the C library static libraries +for -static linking. You don't need these, unless you link statically, +which is highly discouraged. + +%package extra +# makedb requires libselinux. We add this program in a separate +# package so that glibc does not require libselinux. +Summary: Extra binaries from GNU C Library +License: LGPL-2.1-or-later +Requires: glibc = %{version} + +%description extra +The glibc-extra package contains some extra binaries for glibc that +are not essential but recommend for use. + +makedb: A program to create a database for nss + +%endif + +%package -n libnsl1 +Summary: Legacy Network Support Library (NIS) +License: LGPL-2.1-or-later + +%description -n libnsl1 +Network Support Library for legacy architectures. This library does not +have support for IPv6. + +%define make_output_sync -Oline + +%prep +%autosetup -n glibc-%{version} -p1 + +%build +# Disable LTO due to a usage of top-level assembler that causes LTO issues +%define _lto_cflags %{nil} +if [ -x /bin/uname.bin ]; then + /bin/uname.bin -a +else + uname -a +fi +uptime || : +ulimit -a +nice +# We do not want configure to figure out the system its building one +# to support a common ground and thus set build and host ourself. +target="%{host_arch}-openruyi-linux" +%define build %{_target_cpu}-openruyi-linux +# Default CFLAGS and Compiler +# +enable_stack_protector= +BuildFlags= +tmp="%{optflags}" +for opt in $tmp; do + case $opt in + -fstack-protector-*) enable_stack_protector=${opt#-fstack-protector-} ;; + -fstack-protector) enable_stack_protector=yes ;; + -D_FORTIFY_SOURCE=*) enable_fortify_source=${opt#-D_FORTIFY_SOURCE=} ;; + -ffortify=* | *_FORTIFY_SOURCE*) ;; + *) BuildFlags+=" $opt" ;; + esac +done +%if 0%{?with_gcc:1} +BuildCC="gcc-%{with_gcc}" +BuildCCplus="g++-%{with_gcc}" +%else +BuildCC="%__cc" +BuildCCplus="%__cxx" +%endif + +# +#now overwrite for some architectures +# +%if %{disable_assert} + BuildFlags="$BuildFlags -DNDEBUG=1" +%endif + +# +# Build base glibc +# +mkdir cc-base +cd cc-base + +../configure \ + CFLAGS="$BuildFlags" BUILD_CFLAGS="$BuildFlags" \ + CC="$BuildCC" CXX="$BuildCCplus" \ + --prefix=%{_prefix} \ + --libexecdir=%{_libexecdir} --infodir=%{_infodir} \ + $profile \ + --build=%{build} --host=${target} \ + --enable-systemtap \ +%if %{enable_stackguard_randomization} + --enable-stackguard-randomization \ +%endif + ${enable_stack_protector:+--enable-stack-protector=$enable_stack_protector} \ + ${enable_fortify_source:+--enable-fortify-source=$enable_fortify_source} \ + --enable-tunables \ + --enable-kernel=4.15 \ + --with-bugurl=%{_vendor_bug_url} \ + --enable-bind-now \ + --disable-timezone-tools \ + --disable-crypt || \ + { + rc=$?; + echo "------- BEGIN config.log ------"; + %{__cat} config.log; + echo "------- END config.log ------"; + exit $rc; + } + +%make_build +cd .. + + +# sysusers.d +%sysusers_generate_pre %{SOURCE22} nscd nscd.conf + +%check +%if %{build_testsuite} +export TIMEOUTFACTOR=16 +unset MALLOC_CHECK_ MALLOC_PERTURB_ +make %{?_smp_mflags} %{?make_output_sync} -C cc-base -k check || { + cd cc-base + o=$- + set +x + for sum in subdir-tests.sum */subdir-tests.sum; do + while read s t; do + case $s in + XPASS:|PASS:) + echo ++++++ $s $t ++++++ + ;; + *) # X?FAIL: + echo ------ $s $t ------ + test ! -f $t.out || cat $t.out + ;; + esac + done < $sum + done + set -$o + # Fail build if there where compilation errors during testsuite run + test -f tests.sum +} +%else +# This has to pass on all platforms! +# Exceptions: +# None! +make %{?_smp_mflags} %{?make_output_sync} -C cc-base check-abi +make %{?_smp_mflags} %{?make_output_sync} -C cc-base test t=elf/check-localplt +%endif + +%define rtldlib %{_lib} +# Each architecture has a different name for the dynamic linker: +%define rtld_name ld-linux.so.3 +%ifarch riscv64 +%define rtldlib lib +%define rtld_name ld-linux-riscv64-lp64d.so.1 +%endif + +%define rootsbindir %{_sbindir} +%define slibdir %{_libdir} +%define rtlddir %{_prefix}/%{rtldlib} + +%install +%if !%{build_testsuite} + +mkdir -p %{buildroot}%{_libdir} +ln -s %{buildroot}%{_libdir} %{buildroot}/%{_lib} +%if "%{rtldlib}" != "%{_lib}" +mkdir -p %{buildroot}%{rtlddir} +ln -s %{buildroot}%{rtlddir} %{buildroot}/%{rtldlib} +%endif +mkdir -p %{buildroot}%{_sbindir} +ln -s %{buildroot}%{_sbindir} %{buildroot}/sbin + +%ifarch riscv64 +mkdir -p %{buildroot}%{_libdir} +ln -s . %{buildroot}%{_libdir}/lp64d +%if "%{slibdir}" != "%{_libdir}" +mkdir -p %{buildroot}%{slibdir} +ln -s . %{buildroot}%{slibdir}/lp64d +%endif +%endif + +%if %{build_main} + +# We don't want to strip the .symtab from our libraries in find-debuginfo.sh, +# certainly not from libc.so.* because it is used by libthread_db to find +# some non-exported symbols in order to detect if threading support +# should be enabled. +export STRIP_KEEP_SYMTAB=*.so* + +# Install base glibc +%make_install install_root=%{buildroot} -C cc-base + +rm -rf %{buildroot}%{_datadir}/locale/en_GB/LC_MESSAGES +%find_lang libc --generate-subpackages + +install -m 644 %{SOURCE5} %{buildroot}/etc/nsswitch.conf + + +# nscd tools: + +cp nscd/nscd.conf %{buildroot}/etc +mkdir -p %{buildroot}/etc/init.d +ln -sf %{rootsbindir}/service %{buildroot}%{_sbindir}/rcnscd +mkdir -p %{buildroot}/run/nscd +mkdir -p %{buildroot}/var/lib/nscd + +# +# Create ld.so.conf +# +cat > %{buildroot}/etc/ld.so.conf < + +-- First, get rid of platform-optimized libraries. We remove any we have +-- ever built, since otherwise we might end up using some old leftover +-- libraries when new ones aren't installed in their place anymore. +libraries = { "libc.so.6", "libc.so.6.1", "libm.so.6", "libm.so.6.1", + "librt.so.1", "libpthread.so.0", "libthread_db.so.1" } +remove_dirs = { + "%{slibdir}/tls/" +} +for i, remove_dir in ipairs(remove_dirs) do + for j, library in ipairs(libraries) do + local file = remove_dir .. library + -- This file could be a symlink to library-%{version}.so, so check + -- this and don't remove only the link, but also the library itself. + local link = posix.readlink(file) + if link then + if link:sub(1, 1) ~= "/" then link = remove_dir .. link end + os.remove(link) + end + os.remove(file) + end +end +if posix.access("%{rootsbindir}/ldconfig", "x") then + rpm.execute("%{rootsbindir}/ldconfig", "-X") +end +if posix.utime("%{_libdir}/gconv/gconv-modules.cache") then + rpm.execute("%{_sbindir}/iconvconfig", "-o", "%{_libdir}/gconv/gconv-modules.cache", + "--nostdlib", "%{_libdir}/gconv") +end + +%postun -p %{rootsbindir}/ldconfig + +%post gconv-modules-extra -p %{_sbindir}/iconvconfig +%postun gconv-modules-extra -p %{_sbindir}/iconvconfig + +%pre -n nscd -f nscd.pre +%service_add_pre nscd.service + +%preun -n nscd +%service_del_preun nscd.service + +%post -n nscd +%service_add_post nscd.service +%tmpfiles_create /usr/lib/tmpfiles.d/nscd.conf +# Previously we had nscd.socket, remove it +test -x /usr/bin/systemctl && /usr/bin/systemctl stop nscd.socket 2>/dev/null || : +test -x /usr/bin/systemctl && /usr/bin/systemctl disable nscd.socket 2>/dev/null || : +# Hard removal in case the above did not work +rm -f /etc/systemd/system/sockets.target.wants/nscd.socket +exit 0 + +%postun -n nscd +%service_del_postun nscd.service +exit 0 + +%files +# glibc +%defattr(-,root,root) +%license LICENSES +%config /etc/ld.so.conf +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache +%config(noreplace) /etc/rpc +%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf +%doc posix/gai.conf + +%{_bindir}/ld.so +%attr(755,root,root) %{rtlddir}/%{rtld_name} +%if 0%{?rtld_oldname:1} +%attr(755,root,root) %{rtlddir}/%{rtld_oldname} +%endif + +%ifarch riscv64 +%{_libdir}/lp64d +%if "%{slibdir}" != "%{_libdir}" +%{slibdir}/lp64d +%endif +%endif + +%{slibdir}/libBrokenLocale.so.1 +%{slibdir}/libanl.so.1 +%{slibdir}/libc.so.6* +%{slibdir}/libc_malloc_debug.so.0 +%{slibdir}/libdl.so.2* +%{slibdir}/libm.so.6* +%{slibdir}/libnss_compat.so.2 +%{slibdir}/libnss_db.so.2 +%{slibdir}/libnss_dns.so.2 +%{slibdir}/libnss_files.so.2 +%{slibdir}/libnss_hesiod.so.2 +%{slibdir}/libpthread.so.0 +%{slibdir}/libresolv.so.2 +%{slibdir}/librt.so.1 +%{slibdir}/libthread_db.so.1 +%{slibdir}/libutil.so.1 +%dir %attr(0700,root,root) /var/cache/ldconfig +%{rootsbindir}/ldconfig +%{_bindir}/gencat +%{_bindir}/getconf +%{_bindir}/getent +%{_bindir}/iconv +%attr(755,root,root) %{_bindir}/ldd +%{_bindir}/locale +%{_bindir}/localedef +%dir %attr(0755,root,root) %{_libexecdir}/getconf +%{_libexecdir}/getconf/* +%{_sbindir}/iconvconfig +%dir %{_libdir}/gconv +%{_libdir}/gconv/ANSI_X3.110.so +%{_libdir}/gconv/CP1252.so +%{_libdir}/gconv/ISO8859-1.so +%{_libdir}/gconv/ISO8859-15.so +%{_libdir}/gconv/UNICODE.so +%{_libdir}/gconv/UTF-16.so +%{_libdir}/gconv/UTF-32.so +%{_libdir}/gconv/UTF-7.so +%{_libdir}/gconv/gconv-modules +%dir %{_libdir}/gconv/gconv-modules.d +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %{_libdir}/gconv/gconv-modules.cache + +%files gconv-modules-extra +%dir %{_libdir}/gconv +%dir %{_libdir}/gconv/gconv-modules.d +%{_libdir}/gconv/gconv-modules.d/*.conf +%{_libdir}/gconv/*.so +%exclude %{_libdir}/gconv/ANSI_X3.110.so +%exclude %{_libdir}/gconv/CP1252.so +%exclude %{_libdir}/gconv/ISO8859-1.so +%exclude %{_libdir}/gconv/ISO8859-15.so +%exclude %{_libdir}/gconv/UNICODE.so +%exclude %{_libdir}/gconv/UTF-16.so +%exclude %{_libdir}/gconv/UTF-32.so +%exclude %{_libdir}/gconv/UTF-7.so + +%files locale-base +%defattr(-,root,root) +%{_datadir}/locale/locale.alias + +%files locale +%defattr(-,root,root) + +%files devel +%defattr(-,root,root) +%license COPYING COPYING.LIB +%doc NEWS README +%{_bindir}/sprof +%{_includedir}/* +%{_libdir}/*.o +%{_libdir}/libBrokenLocale.so +%{_libdir}/libanl.so +%{_libdir}/libc.so +%{_libdir}/libc_malloc_debug.so +%{_libdir}/libm.so +%{_libdir}/libnss_compat.so +%{_libdir}/libnss_db.so +%{_libdir}/libnss_hesiod.so +%{_libdir}/libresolv.so +%{_libdir}/libthread_db.so +# These static libraries are needed even for shared builds +%{_libdir}/libc_nonshared.a +%{_libdir}/libdl.a +%{_libdir}/libg.a +%{_libdir}/libmcheck.a +%{_libdir}/libpthread.a +%{_libdir}/librt.a +%{_libdir}/libutil.a + +%files static +%defattr(-,root,root) +%{_libdir}/libBrokenLocale.a +%{_libdir}/libanl.a +%{_libdir}/libc.a +%{_libdir}/libm.a +%{_libdir}/libresolv.a + + +%files info +%defattr(-,root,root) +%doc %{_infodir}/libc.info.gz +%doc %{_infodir}/libc.info-?.gz +%doc %{_infodir}/libc.info-??.gz + + +%files i18ndata +%defattr(-,root,root) +%{_prefix}/share/i18n + +%files -n nscd +%defattr(-,root,root) +%config(noreplace) /etc/nscd.conf +%{_sbindir}/nscd +%{_sbindir}/rcnscd +/usr/lib/systemd/system/nscd.service +%dir /usr/lib/tmpfiles.d +/usr/lib/tmpfiles.d/nscd.conf +%dir /usr/lib/sysusers.d +/usr/lib/sysusers.d/nscd.conf +%dir %attr(0755,root,root) %ghost /run/nscd +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/nscd.pid +%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/socket +%dir %attr(0755,root,root) /var/lib/nscd +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/nscd/passwd +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/nscd/group +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/nscd/hosts +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/nscd/services +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/nscd/netgroup + + +%files extra +%defattr(-,root,root) +%{_bindir}/makedb +/var/db/Makefile + +%files -n libnsl1 +%{slibdir}/libnsl.so.1 + +%endif + +%if %{build_utils} +%files -n glibc-utils +%defattr(-,root,root) +%{slibdir}/libmemusage.so +%{slibdir}/libpcprofile.so +%dir %{_libdir}/audit +%{_libdir}/audit/sotruss-lib.so +%{_bindir}/memusage +%{_bindir}/memusagestat +%{_bindir}/mtrace +%{_bindir}/pcprofiledump +%{_bindir}/sotruss +%{_bindir}/xtrace +%{_bindir}/pldd +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/glibc/nscd.conf b/SPECS/glibc/nscd.conf new file mode 100644 index 00000000..8a24a785 --- /dev/null +++ b/SPECS/glibc/nscd.conf @@ -0,0 +1 @@ +d /run/nscd 0755 root root diff --git a/SPECS/glibc/nscd.service b/SPECS/glibc/nscd.service new file mode 100644 index 00000000..23b72c56 --- /dev/null +++ b/SPECS/glibc/nscd.service @@ -0,0 +1,22 @@ +# systemd service file for nscd + +[Unit] +Description=Name Service Cache Daemon +After=sysinit.target +Wants=nss-lookup.target nss-user-lookup.target +Before=nss-lookup.target nss-user-lookup.target + +[Service] +Type=forking +ExecStart=/usr/sbin/nscd +ExecStop=/usr/sbin/nscd --shutdown +ExecReload=/usr/sbin/nscd -i passwd +ExecReload=/usr/sbin/nscd -i group +ExecReload=/usr/sbin/nscd -i hosts +ExecReload=/usr/sbin/nscd -i services +ExecReload=/usr/sbin/nscd -i netgroup +Restart=always +PIDFile=/run/nscd/nscd.pid + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/glibc/nscd.sysusers b/SPECS/glibc/nscd.sysusers new file mode 100644 index 00000000..2badd0e0 --- /dev/null +++ b/SPECS/glibc/nscd.sysusers @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u nscd - "User for nscd" /run/nscd - diff --git a/SPECS/glibc/nsswitch.conf b/SPECS/glibc/nsswitch.conf new file mode 100644 index 00000000..194880a5 --- /dev/null +++ b/SPECS/glibc/nsswitch.conf @@ -0,0 +1,75 @@ +# +# /etc/nsswitch.conf +# +# An example Name Service Switch config file. This file should be +# sorted with the most-used services at the beginning. +# +# Valid databases are: aliases, ethers, group, gshadow, hosts, +# initgroups, netgroup, networks, passwd, protocols, publickey, +# rpc, services, and shadow. +# +# Valid service provider entries include (in alphabetical order): +# +# compat Use /etc files plus *_compat pseudo-db +# db Use the pre-processed /var/db files +# dns Use DNS (Domain Name Service) +# files Use the local files in /etc +# hesiod Use Hesiod (DNS) for user lookups +# nis Use NIS (NIS version 2), also called YP +# nisplus Use NIS+ (NIS version 3) +# +# See `info libc 'NSS Basics'` for more information. +# +# Commonly used alternative service providers (may need installation): +# +# ldap Use LDAP directory server +# myhostname Use systemd host names +# mymachines Use systemd machine names +# mdns*, mdns*_minimal Use Avahi mDNS/DNS-SD +# resolve Use systemd resolved resolver +# sss Use System Security Services Daemon (sssd) +# systemd Use systemd for dynamic user option +# winbind Use Samba winbind support +# wins Use Samba wins support +# wrapper Use wrapper module for testing +# +# Notes: +# +# 'sssd' performs its own 'files'-based caching, so it should generally +# come before 'files'. +# +# WARNING: Running nscd with a secondary caching service like sssd may +# lead to unexpected behaviour, especially with how long +# entries are cached. +# +# Installation instructions: +# +# To use 'db', install the appropriate package(s) (provide 'makedb' and +# libnss_db.so.*), and place the 'db' in front of 'files' for entries +# you want to be looked up first in the databases, like this: +# +# passwd: db files +# shadow: db files +# group: db files + +passwd: compat systemd +group: compat [SUCCESS=merge] systemd +shadow: compat systemd +# Allow initgroups to default to the setting for group. +# initgroups: compat + +hosts: files dns +networks: files dns + +aliases: files usrfiles +ethers: files usrfiles +gshadow: files usrfiles +netgroup: files nis +protocols: files usrfiles +publickey: files +rpc: files usrfiles +services: files usrfiles + +automount: files nis +bootparams: files +netmasks: files diff --git a/SPECS/gmp/gmp.spec b/SPECS/gmp/gmp.spec new file mode 100644 index 00000000..601e45e8 --- /dev/null +++ b/SPECS/gmp/gmp.spec @@ -0,0 +1,74 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gmp +Version: 6.3.0 +Release: %autorelease +URL: https://gmplib.org +#!RemoteAsset +Source0: https://gmplib.org/download/gmp/gmp-%{version}.tar.xz +License: (LGPL-3.0-or-later OR GPL-2.0-or-later OR (LGPL-3.0-or-later AND GPL-2.0-or-later)) AND GFDL-1.3-invariants-or-later +BuildRequires: gcc gcc-c++ make m4 +BuildSystem: autotools +BuildOption(conf): --enable-cxx + +Summary: A GNU multiple precision arithmetic library + +%description +GMP is a portable library written in C for arbitrary precision arithmetic +on integers, rational numbers, and floating-point numbers. It aims to provide +the fastest possible arithmetic for all applications that need higher +precision than is directly supported by the basic C types. + +%package devel +Summary: Development library package for GMP. +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-c++%{?_isa} = %{version}-%{release} +Conflicts: %{name}%{?_isa} < 1:6.3.0-3 +Conflicts: %{name}-c++%{?_isa} < 1:6.3.0-3 + +%description devel +Devel package include header files, documentation and libraries for GMP + +%package c++ +Summary: C++ development library package for GMP. +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description c++ +GMP dependent library for C++ applications. + +%conf -p +export CFLAGS="$CFLAGS -std=gnu17" + +%install -a +install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir} +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +%check -p +export LD_LIBRARY_PATH=`pwd`/.libs + + +%files +%license COPYING COPYING.LESSERv3 COPYINGv2 COPYINGv3 +%doc NEWS README +%{_libdir}/libgmp.so.* + +%files devel +%{_libdir}/libgmpxx.so +%{_libdir}/libgmp.so +%{_includedir}/*.h +%{_infodir}/gmp.info* +%{_libdir}/libgmpxx.a +%{_libdir}/libgmp.a +%{_libdir}/pkgconfig/gmp.pc +%{_libdir}/pkgconfig/gmpxx.pc + +%files c++ +%{_libdir}/libgmpxx.so.* + +%changelog +%{?autochangelog} diff --git a/SPECS/gnupg/gunpg.spec b/SPECS/gnupg/gunpg.spec new file mode 100644 index 00000000..0e312f22 --- /dev/null +++ b/SPECS/gnupg/gunpg.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gnupg +Version: 2.5.12 +Release: %autorelease +Summary: File encryption, decryption, signature creation and verification utility +License: GPL-3.0-or-later +URL: https://www.gnupg.org +#!RemoteAsset +Source0: https://gnupg.org/ftp/gcrypt/gnupg/gnupg-%{version}.tar.bz2 +Source1: scdaemon.udev +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --enable-g13 +BuildOption(conf): --enable-large-secmem +BuildOption(conf): --with-gnu-ld +BuildOption(conf): --with-default-trust-store-file=%{_sysconfdir}/ssl/ca-bundle.pem +BuildOption(conf): --docdir=%{_docdir}/%{name} + +BuildRequires: expect fdupes texinfo npth-devel openldap-devel pkgconfig readline-devel +BuildRequires: libassuan-devel +BuildRequires: glibc-devel +BuildRequires: libgcrypt-devel +BuildRequires: libgpg-error-devel +BuildRequires: libksba-devel libksba +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(zlib) + +Requires: pinentry +Recommends: dirmngr = %{version} + +%description +GnuPG is a hybrid-encryption software program for encrypting/decrypting +messages and/or signing and verifying them. + +%package -n dirmngr +Summary: Keyserver, CRL, and OCSP access for GnuPG + +%description -n dirmngr +Dirmngr handles access to OpenPGP keyservers, CRLs, and OCSP providers +for GnuPG. It is invoked internally by gpg and gpgsm. + +%install -a +install -Dm 0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/60-scdaemon.rules +install -d -m 755 %{buildroot}%{_userunitdir} +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang gnupg2 --generate-subpackages +%fdupes -s %{buildroot} + +%post +%udev_rules_update + +%files +%{_mandir}/*/[aghsw]*%{?ext_man} +%license COPYING* +%doc AUTHORS NEWS THANKS TODO ChangeLog +%{_infodir}/gnupg* +%doc %{_docdir}/%{name} +%{_bindir}/[gkw]* +%{_libexecdir}/[gks]* +%{_sbindir}/addgnupghome +%{_sbindir}/applygnupgdefaults +%{_sbindir}/g13-syshelp +%{_udevrulesdir}/60-scdaemon.rules +%{_datadir}/gnupg + +%files -n dirmngr +%{_mandir}/*/dirmngr*%{?ext_man} +%{_bindir}/dirmngr* +%{_libexecdir}/dirmngr_ldap + +%changelog +%{?autochangelog} diff --git a/SPECS/gnupg/scdaemon.udev b/SPECS/gnupg/scdaemon.udev new file mode 100644 index 00000000..8406264b --- /dev/null +++ b/SPECS/gnupg/scdaemon.udev @@ -0,0 +1,65 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="usb", GOTO="gnupg_rules_end" +ACTION!="add", GOTO="gnupg_rules_end" + +# USB SmartCard Readers +## Cherry GmbH (XX33, ST2000) +SUBSYSTEM=="usb", ATTR{idVendor}=="046a", ATTR{idProduct}=="0005", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="046a", ATTR{idProduct}=="0010", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="046a", ATTR{idProduct}=="003e", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## SCM Microsystems, Inc (SCR331-DI, SCR335, SCR3320, SCR331, SCR3310 and SPR532) +SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", ATTR{idProduct}=="5111", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", ATTR{idProduct}=="5115", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", ATTR{idProduct}=="5116", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", ATTR{idProduct}=="5117", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", ATTR{idProduct}=="e001", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="04e6", ATTR{idProduct}=="e003", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Omnikey AG (CardMan 3821, CardMan 6121) +SUBSYSTEM=="usb", ATTR{idVendor}=="076b", ATTR{idProduct}=="3821", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="076b", ATTR{idProduct}=="6622", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Gemalto +SUBSYSTEM=="usb", ATTR{idVendor}=="08e6", ATTR{idProduct}=="3437", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="08e6", ATTR{idProduct}=="3438", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="08e6", ATTR{idProduct}=="3478", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="08e6", ATTR{idProduct}=="34c2", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="08e6", ATTR{idProduct}=="34ec", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Reiner (SCT cyberJack) +SUBSYSTEM=="usb", ATTR{idVendor}=="0c4b", ATTR{idProduct}=="0500", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Kobil (KAAN) +SUBSYSTEM=="usb", ATTR{idVendor}=="0d46", ATTR{idProduct}=="2012", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## VASCO (DIGIPASS 920) +SUBSYSTEM=="usb", ATTR{idVendor}=="1a44", ATTR{idProduct}=="0920", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Crypto Stick +SUBSYSTEM=="usb", ATTR{idVendor}=="20a0", ATTR{idProduct}=="4107", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Nitrokey +SUBSYSTEM=="usb", ATTR{idVendor}=="20a0", ATTR{idProduct}=="4108", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="20a0", ATTR{idProduct}=="4109", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +SUBSYSTEM=="usb", ATTR{idVendor}=="20a0", ATTR{idProduct}=="4211", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Gnuk Token +SUBSYSTEM=="usb", ATTR{idVendor}=="234b", ATTR{idProduct}=="0000", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Alcor Micro Corp cardreader (in ThinkPad X250) +SUBSYSTEM=="usb", ATTR{idVendor}=="058f", ATTR{idProduct}=="9540", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Fujitsu Siemens +SUBSYSTEM=="usb", ATTR{idVendor}=="0bf8", ATTR{idProduct}=="1006", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Yubico +# Yubikey NEO OTP+CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0111", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey NEO CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0112", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey NEO U2F+CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0115", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey NEO OTP+U2F+CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0116", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey 4 CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0404", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey 4 OTP+CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0405", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey 4 U2F+CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0406", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +# Yubikey 4 OTP+U2F+CCID +SUBSYSTEM=="usb", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0407", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" +## Trustica Cryptoucan +SUBSYSTEM=="usb", ATTR{idVendor}=="1fc9", ATTR{idProduct}=="81e6", ENV{ID_SMARTCARD_READER}="1", ENV{ID_SMARTCARD_READER_DRIVER}="gnupg" + +LABEL="gnupg_rules_end" diff --git a/SPECS/gnutls/gnutls.spec b/SPECS/gnutls/gnutls.spec new file mode 100644 index 00000000..29c8e33c --- /dev/null +++ b/SPECS/gnutls/gnutls.spec @@ -0,0 +1,96 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gnutls +Version: 3.8.10 +Release: %autorelease +Summary: A TLS protocol implementation +License: GPL-3.0-or-later AND LGPL-2.1-or-later +URL: https://www.gnutls.org/ +#!RemoteAsset +Source0: https://www.gnupg.org/ftp/gcrypt/%{name}/v3.8/%{name}-%{version}.tar.xz + + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-openssl-compatibility +BuildOption(conf): --with-default-trust-store-pkcs11="pkcs11:" +BuildOption(conf): --disable-gtk-doc + +BuildRequires: gcc-c++ +BuildRequires: libidn2-devel +BuildRequires: libtasn1-devel +BuildRequires: libtool +BuildRequires: libunistring-devel +BuildRequires: make +BuildRequires: nettle-devel +BuildRequires: p11-kit-devel +BuildRequires: pkgconfig +BuildRequires: texinfo +BuildRequires: zlib-devel +BuildRequires: libzstd-devel +BuildRequires: bison +BuildRequires: cmocka-cmake +BuildRequires: brotli-devel +# trousers-devel for TPM 1.2 is optional, can be added if available +# BuildRequires: trousers-devel +BuildRequires: unbound-devel + +%description +GnuTLS is a secure communications library implementing the SSL, TLS and DTLS +protocols. This package contains the essential shared libraries needed by +applications, as well as the command-line tools for administration. + +%package devel +Summary: Development files for GnuTLS +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: libtasn1-devel +Requires: nettle-devel +Requires: p11-kit-devel + +%description devel +This package contains the header files, programming documentation, and +development libraries for GnuTLS. + +%install -a +rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%doc THANKS README.md NEWS ChangeLog AUTHORS +%doc %{_datadir}/doc/gnutls/*.png +%{_bindir}/certtool +%{_bindir}/gnutls-cli +%{_bindir}/gnutls-cli-debug +%{_bindir}/gnutls-serv +%{_bindir}/ocsptool +%{_bindir}/psktool +%{_bindir}/p11tool +%{_bindir}/danetool +%{_libdir}/libgnutls.so.30 +%{_libdir}/libgnutls.so.30.* +%{_libdir}/libgnutlsxx.so.30 +%{_libdir}/libgnutlsxx.so.30.* +%{_libdir}/libgnutls-dane.so.0 +%{_libdir}/libgnutls-dane.so.0.* +%{_mandir}/man1/* + +%files devel +%{_includedir}/gnutls/ +%{_libdir}/libgnutls.so +%{_libdir}/libgnutlsxx.so +%{_libdir}/libgnutls-dane.so +%{_libdir}/pkgconfig/gnutls.pc +%{_libdir}/pkgconfig/gnutls-dane.pc +%{_mandir}/man3/* +%{_infodir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/go/go.spec b/SPECS/go/go.spec new file mode 100644 index 00000000..27fd3614 --- /dev/null +++ b/SPECS/go/go.spec @@ -0,0 +1,195 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond bootstrap 1 + +%if %{with bootstrap} +%bcond race 0 +%bcond cshared 0 +%else +%bcond race 0 +%bcond shared 0 +%endif + +%global gohostarch riscv64 +# we are shipping the full contents of src in the data subpackage, which +# contains binary-like things (ELF data for tests, etc) +%global _binaries_in_noarch_packages_terminate_build 0 + +# Do not check any files in doc or src for requires +%global __requires_exclude_from ^(%{_datadir}|/usr/lib)/%{name}/(doc|src)/.*$ + +# Don't alter timestamps of especially the .a files (or else go will rebuild later) +# Actually, don't strip at all since we are not even building debug packages and this corrupts the dwarf testdata +%global __strip /bin/true + +# rpmbuild magic to keep from having meta dependency on libc.so.6 +%define _use_internal_dependency_generator 0 +%define __find_requires %{nil} +%global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \ + /usr/lib/rpm/brp-compress + +Name: go +Version: 1.25.1 +Release: %autorelease +Summary: The Go Programming Language toolchain +License: BSD-3-Clause +URL: https://go.dev/ +#!RemoteAsset +Source0: https://go.dev/dl/%{name}%{version}.src.tar.gz +%if %{with bootstrap} +#!RemoteAsset +Source1: https://go.dev/dl/%{name}%{version}.linux-%{gohostarch}.tar.gz +%endif +# Bootstrap from a pre-existing Go compiler. +%if %{without bootstrap} +BuildRequires: go +%endif +BuildRequires: gcc, make + +Provides: golang = %{version}-%{release} +Recommends: %{name}-cshared = %{version}-%{release} +Requires: glibc +%description +The Go Programming Language. This package contains the compiler, tools, +and standard library sources necessary for developing Go applications. + +%package doc +Summary: Go language documentation +BuildArch: noarch +%description doc +Contains the complete offline HTML documentation for the Go language. + +%package tests +Summary: Go toolchain and standard library test suite +BuildArch: noarch +Requires: %{name}%{?_isa} = %{version}-%{release} +%description tests +Contains the upstream test suite for Go, useful for toolchain validation. + +%if %{with shared} +%package shared +Summary: shared libraries for the Go standard library +%description cshared +Contains shared-object (.so) versions of the Go standard library. +%endif + +%if %{with race} +%package race +Summary: Race detector enabled standard library for Go +Requires: %{name}%{?_isa} = %{version}-%{release} +%description race +Contains the Go standard library pre-compiled with race detector support. +%endif + +%prep +%autosetup -p1 -n %{name} + +%if %{with bootstrap} +mkdir -p %{name}-bootstrap +tar -xf %{SOURCE1} -C %{name}-bootstrap --strip-components=1 +%endif + +%build +export GOROOT_FINAL=%{_libdir}/%{name}/ +export GOHOSTOS=linux +export GOHOSTARCH=%{gohostarch} +export CGO_ENABLED=1 +%if %{with bootstrap} +export GOROOT_BOOTSTRAP=%{_builddir}/%{name}/%{name}-bootstrap +%else +export GOROOT_BOOTSTRAP=%{_libdir}/golang +%endif + +pushd src +./make.bash -v +popd + +%if %{with shared} +# Building cshared standard library +GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -buildmode=shared -v std +%endif +%if %{with race} +# Building race-enabled standard library +GOROOT=$(pwd) PATH=$(pwd)/bin:$PATH go install -race -v std +%endif + +%install +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_libdir}/%{name}/ + +# Install all built artifacts. We will sort them into packages in %files. +cp -a api bin pkg src misc test VERSION %{buildroot}%{_libdir}/%{name}/ +cp -a doc %{buildroot}%{_datadir}/ + +# Link the main binaries into /usr/bin +ln -sf ../lib/go/bin/go %{buildroot}%{_bindir}/go +ln -sf ../lib/go/bin/gofmt %{buildroot}%{_bindir}/gofmt + +# Remove unnecessary bootstrap artifacts +rm -rf %{buildroot}%{_libdir}/%{name}/pkg/bootstrap + +# Move cshared libraries to their final destination +install -d %{buildroot}%{_libdir}/golang + +%if %{with shared} +mv %{buildroot}%{_libdir}/%{name}/pkg/linux_%{gohostarch}_dynlink/*.so %{buildroot}%{_libdir}/golang/ +%endif + +%check +# Run the test suite, but its files will be in the -devel package. +export GOROOT_FINAL=%{_libdir}/%{name}/ +export PATH="%{buildroot}%{_libdir}/%{name}/bin:$PATH" +export GOTOOLDIR="%{buildroot}%{_libdir}/%{name}/pkg/tool/linux_%{gohostarch}" +export GO_TEST_TIMEOUT_SCALE=20 +pushd src +./run.bash --no-rebuild -v -v -v -k -run "!cmd/cgo/internal/testsanitizers" +popd + +%files +%license LICENSE +%doc README.md +%{_bindir}/go +%{_bindir}/gofmt +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/api +%{_libdir}/%{name}/bin +%{_libdir}/%{name}/pkg +%{_libdir}/%{name}/src +%{_libdir}/%{name}/misc +%{_libdir}/%{name}/VERSION +%exclude %{_libdir}/%{name}/test +%exclude %{_libdir}/%{name}/src/**/*_test.go +%exclude %{_libdir}/%{name}/src/**/testdata +%if %{with cshared} +%exclude %{_libdir}/%{name}/pkg/linux_%{gohostarch}_dynlink +%endif +%if %{with race} +%exclude %{_libdir}/%{name}/pkg/linux_%{gohostarch}_race +%endif + +%files doc +%{_datadir}/* + +%files tests +%{_libdir}/%{name}/test +%{_libdir}/%{name}/src/**/*_test.go +%dir %{_libdir}/%{name}/src/**/testdata + +%if %{with shared} +%files shared +%{_libdir}/golang/*.so +%{_libdir}/%{name}/pkg/linux_%{gohostarch}_dynlink/ +%endif + +%if %{with race} +%files race +%{_libdir}/%{name}/pkg/linux_%{gohostarch}_race/ +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/gobject-introspection/gobject-introspection.spec b/SPECS/gobject-introspection/gobject-introspection.spec new file mode 100644 index 00000000..bc4273c0 --- /dev/null +++ b/SPECS/gobject-introspection/gobject-introspection.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond tests 0 +%bcond doc 0 + +%global major_version 1.86 + +Name: gobject-introspection +Version: %{major_version}.0 +Release: %autorelease +Summary: Introspection system for GObject-based libraries +License: GPL-2.0-or-later AND LGPL-2.0-or-later +URL: https://wiki.gnome.org/Projects/GObjectIntrospection +#!RemoteAsset +Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{version}.tar.xz + +BuildSystem: meson +BuildOption(conf): -Dgtk_doc=%{?with_doc:true}%{!?with_doc:false} +BuildOption(conf): -Ddoctool=%{?with_doc:enabled}%{!?with_doc:disabled} +BuildOption(conf): -Dcairo=%{?with_tests:enabled}%{!?with_tests:disabled} + + +BuildRequires: bison +BuildRequires: flex +BuildRequires: gcc +BuildRequires: meson +BuildRequires: libffi-devel +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: pkgconfig(glib-2.0) +%if %{with tests} +BuildRequires: pkgconfig(cairo-gobject) +%endif +%if %{with doc} +BuildRequires: gtk-doc +BuildRequires: python3-mako +BuildRequires: python3-markdown +%endif + +%description +GObject Introspection is a framework for generating and consuming API metadata +for GObject-based libraries. This package contains the core runtime library, +libgirepository, and the binary metadata (.typelib) files. + +%package devel +Summary: The GObject Introspection development toolchain +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python(abi) = %{python3_version} +Requires: pkgconfig(glib-2.0) >= 2.80.0 + +%description devel +This is the primary package for developers. It contains the essential +toolchain (g-ir-scanner, etc.), header files, and development metadata (.gir) +needed to generate introspection data for other GObject-based libraries. + +%ldconfig_scriptlets + +%files +%license COPYING.LGPL +# The main package owns only the runtime library and the binary typelib files. +%{_libdir}/libgirepository-1.0.so.* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/*.typelib + +%files devel +%license COPYING COPYING.GPL +%doc NEWS README.rst +%{_bindir}/g-ir-* +%{_includedir}/gobject-introspection-1.0/ +%{_libdir}/gobject-introspection/ +%{_libdir}/libgirepository-1.0.so +%{_libdir}/pkgconfig/gobject-introspection-1.0.pc +%{_libdir}/pkgconfig/gobject-introspection-no-export-1.0.pc +%dir %{_datadir}/gir-1.0 +# The XML .gir files are for development. +%{_datadir}/gir-1.0/*.gir +%{_datadir}/gir-1.0/gir-1.2.rnc +%{_datadir}/gobject-introspection-1.0/ +%{_datadir}/aclocal/introspection.m4 +%{_mandir}/man1/g-ir-*.1* +%if %{with doc} +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/gi/ +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/gperf/gperf.spec b/SPECS/gperf/gperf.spec new file mode 100644 index 00000000..bda68416 --- /dev/null +++ b/SPECS/gperf/gperf.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gperf +Version: 3.3 +Release: %autorelease +Summary: A Compiler Tool for Generating Perfect Hash Functions +License: GPL-3.0-or-later +URL: https://gnu.org/software/gperf/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/gperf/gperf-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/gperf/gperf-%{version}.tar.gz.sig +BuildRequires: c++_compiler +BuildSystem: autotools + +BuildOption(conf): --htmldir=%{_defaultdocdir}/%{name} +%description +A perfect hash function is simply: a hash function and a data structure +that allows recognition of a key word in a set of words using exactly +one probe into the data structure. + +%files +%license COPYING +%doc README NEWS AUTHORS ChangeLog doc/*.html +%{_docdir}/gperf/* +%{_bindir}/gperf +%{_infodir}/gperf.info* +%{_mandir}/man1/gperf.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/gpgme/gpgme.spec b/SPECS/gpgme/gpgme.spec new file mode 100644 index 00000000..1bbd5e1f --- /dev/null +++ b/SPECS/gpgme/gpgme.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gpgme +Version: 2.0.0 +Release: %autorelease +Summary: GnuPG Made Easy +License: LGPL-2.1-or-later AND MIT +URL: https://gnupg.org/related_software/gpgme/ +#!RemoteAsset +Source: https://gnupg.org/ftp/gcrypt/gpgme/gpgme-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --disable-glib-binding +BuildOption(conf): --disable-python-binding +BuildOption(conf): --disable-qt-binding + +BuildRequires: make gcc +BuildRequires: gnupg +BuildRequires: libassuan-devel >= 2.4.2 + +%description +GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG +easier for applications. It provides a high-level crypto API for +encryption, decryption, signing, signature verification and key +management. + +%package devel +Summary: Development headers and libraries for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the libraries, header files, documentation, and tools +needed for developing applications that use GPGME. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +rm -fv %{buildroot}%{_infodir}/dir + +%ldconfig_scriptlets + +%files +%license COPYING* +%doc AUTHORS ChangeLog NEWS README THANKS TODO VERSION +%{_bindir}/gpgme-json +%{_libdir}/libgpgme.so.45* + +%files devel +%{_bindir}/gpgme-config +%{_bindir}/gpgme-tool +%{_includedir}/gpgme.h +%{_libdir}/libgpgme.so +%{_libdir}/pkgconfig/gpgme.pc +%{_libdir}/pkgconfig/gpgme-glib.pc +%{_datadir}/aclocal/gpgme.m4 +%{_infodir}/gpgme.info* +%{_mandir}/man?/* +%dir %{_datadir}/common-lisp/ +%dir %{_datadir}/common-lisp/source/ +%{_datadir}/common-lisp/source/gpgme/ + +%changelog +%{?autochangelog} diff --git a/SPECS/gpm/0001-some-headers.patch b/SPECS/gpm/0001-some-headers.patch new file mode 100644 index 00000000..fea8a7f9 --- /dev/null +++ b/SPECS/gpm/0001-some-headers.patch @@ -0,0 +1,555 @@ +diff --git a/.gitignore b/.gitignore +index 87df93b..5f79b9d 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -11,6 +11,7 @@ Makefile + Makefile.include + /aclocal.m4 + /autom4te.cache ++/config.cache + /config.log + /config.status + /configure +@@ -29,7 +30,7 @@ Makefile.include + /src/gpm + /src/gpm2/tmp + /src/gpm2/out +-/src/lib/libgpm.so.* ++/src/lib/libgpm.so* + /src/prog/disable-paste + /src/prog/display-buttons + /src/prog/display-coords +diff --git a/Makefile.in b/Makefile.in +index 5412334..0aa6a78 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -102,19 +102,24 @@ TAGS: $(SRCS) $(HDRS) src/prog/gpm-root.y do-TAGS + + ### RELEASE STUFF + TARS =../gpm-$(release).tar.gz +-TARS +=../gpm-$(release).tar.bz2 ../gpm-$(release).tar.lzma ++TARS +=../gpm-$(release).tar.bz2 ../gpm-$(release).tar.xz + + M_HOST=arcana.linux.it + M_DIR=gpm/ + + tars: $(TARS) ++ chmod a+r $< + + # configure headers, produce new configure script + distconf: Makefile.in Makefile.include.in configure acinclude.m4 $(versionfiles) + + ../gpm-$(release).tar: $(srcdir) distclean distconf + # no exclude possible of .git with pax it seems, so the following is not possible: +- git archive --prefix "gpm-$(release)/" -o $@ HEAD ++ rm -rf "gpm-$(release)/" ++ git archive --prefix "gpm-$(release)/" HEAD | tar xf - ++ cd "gpm-$(release)/" && ./autogen.sh && rm -rf autom4te.cache ++ tar cf $@ "gpm-$(release)/" ++ rm -rf "gpm-$(release)/" + + ../gpm-$(release).tar.gz: ../gpm-$(release).tar + gzip -9 -c $< > $@ +@@ -122,11 +127,11 @@ distconf: Makefile.in Makefile.include.in configure acinclude.m4 $(versionfiles) + ../gpm-$(release).tar.bz2: ../gpm-$(release).tar + bzip2 -9 -c $< > $@ + +-../gpm-$(release).tar.lzma: ../gpm-$(release).tar +- lzma -9 -c $< > $@ ++../gpm-$(release).tar.xz: ../gpm-$(release).tar ++ xz -9 -c $< > $@ + + # 3. Put package together into .tar.gz and .tar.bz2 +-dist: disttest distclean distconf $(TARS) ++dist: disttest distclean distconf $(TARS) tars + scp $(TARS) $(M_HOST):$(M_DIR) + mv $(TARS) ~/niconetz/software/gpm/archives + +diff --git a/configure.ac.footer b/configure.ac.footer +index 89a4cd9..1e5e4da 100644 +--- a/configure.ac.footer ++++ b/configure.ac.footer +@@ -124,7 +124,7 @@ No|no|N|n) SHARED_LIBS=-lc ;; + done + TERMLIBS=$LIBS + LIBS= +- for i in ncurses curses; do ++ for i in ncurses curses ncursesw; do + if test x$LIBS = x; then + AC_CHECK_LIB($i, wgetch,,,$TERMLIBS) + else :; fi +diff --git a/doc/changelog b/doc/changelog +index de64bcf..1581fd1 100644 +--- a/doc/changelog ++++ b/doc/changelog +@@ -1,3 +1,7 @@ ++1.20.8: ++ * Remove lzma, use xz (Mike Frysinger) ++ * Install shared lib with +x perms (Mike Frysinger) ++ + 1.20.7: 2012-10-26 + * Fix inclusion of unwanted binary data + * Even more cleanups (Mike Frysinger) +@@ -5,7 +9,7 @@ + * Don't build static libgpm by default (Sean McGovern) + * autogen.sh is now required to create setup version in autoconf (Nico Schottelius) + +-1.20.5: 9th of February 2009 ++1.20.6: 9th of February 2009 + * Some cleanups (Mike Frysinger/Nico Schottelius) + * Pull in fcntl.h rather than unistd.h for open() (Mike Frysinger) + * Fix gcc warning "control reaches end of non-void function" (Mike Frysinger) +diff --git a/doc/doc.gpm.in b/doc/doc.gpm.in +index afd5a29..795b958 100644 +--- a/doc/doc.gpm.in ++++ b/doc/doc.gpm.in +@@ -88,7 +88,7 @@ by the Free Software Foundation. + @subtitle A general purpose mouse server for the Linux console + @subtitle @value{update-month} + +-@author by Nico Schottelius ++@author by Nico Schottelius + + @end titlepage + @setchapternewpage off +@@ -525,7 +525,7 @@ security risks when using them. + Andrew Haylett (the original selection code) + Ian Zimmerman (old maintainer) + Alessandro Rubini (old maintainer (still helps a lot)) +-Nico Schottelius (maintainer) ++Nico Schottelius (maintainer) + + Many many contributors, to both selection and gpm. + .fi +diff --git a/src/Makefile.in b/src/Makefile.in +index d3b1dcd..2f92989 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -79,7 +79,7 @@ prog/%: prog/%.o + # | $(SED) '\''s/\($*\)\.o\([ :]*\)/\1.o \1.lo\2/g'\'' > $(DEPDIR)/$@' + + # Do it all! +-all: gpm lib/libgpm.so.@abi_lev@ @LIBGPM_A@ $(PROG) ++all: gpm lib/libgpm.so.@abi_lev@ lib/libgpm.so @LIBGPM_A@ $(PROG) + + gpm: $(GOBJ) + $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $(GOBJ) @LIBS@ $(LIBS) -lm +@@ -96,7 +96,7 @@ $(DEPFILE) dep: prog/gpm-root.c + + # create dependencies + for DEPS in `echo *.c */*.c`; do \ +- $(CC) -I. -I $(srcdir) -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \ ++ $(CC) -I. -I $(srcdir) -I $(srcdir)/headers -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \ + $(SED) 's/^\(.*\)\.o\([ :]+\)/\1.o \1.lo\2/g' >> $(DEPFILE) ; done + + ### INSTALL +@@ -113,7 +113,7 @@ install: check + # 2.x goes along; unfortunately that means an additional + # headache in cases like this + if test "x@SHLIB@" != "x" ; then \ +- $(INSTALL_DATA) -m 644 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ; \ ++ $(INSTALL_DATA) -m 755 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ; \ + cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so.@abi_lev@ ; \ + echo "WARNING: We installed a lib, you should now call ldconfig" ; \ + echo "f.i.: ldconfig -n -l $(libdir)/libgpm.so.@abi_full@" ; \ +@@ -168,9 +168,8 @@ lib/libgpm.so.@abi_full@: $(PICS) + @LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ $(LIBS) + lib/libgpm.so.@abi_lev@: lib/libgpm.so.@abi_full@ + $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so.@abi_lev@ +-# unneeded, isn't it? +-#lib/libgpm.so: lib/libgpm.so.@abi_full@ +-# $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so ++lib/libgpm.so: lib/libgpm.so.@abi_full@ ++ $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so + + include $(DEPFILE) + +diff --git a/src/daemon/gpm.c b/src/daemon/gpm.c +index 771da5c..6806dce 100644 +--- a/src/daemon/gpm.c ++++ b/src/daemon/gpm.c +@@ -29,7 +29,7 @@ + #include /* SIGPIPE */ + #include /* time() */ + #include +-#include /* O_RDONLY */ ++#include /* O_RDONLY */ + #include /* wait() */ + #include /* mkdir() */ + #include /* timeval */ +diff --git a/src/daemon/old_main.c b/src/daemon/old_main.c +index 9cd4e56..ab7a87f 100644 +--- a/src/daemon/old_main.c ++++ b/src/daemon/old_main.c +@@ -25,6 +25,7 @@ + #include /* guess again */ + #include /* guess again */ + #include /* unlink */ ++#include /* strcpy, bzero */ + #include /* chmod */ + + #include /* linux hd* */ +@@ -192,10 +193,11 @@ int old_main() + * or to the default handler, if any + * or to the selection handler + */ /* FIXME -- check event.vc */ +- /* can't we please rewrite the following a bit nicer?*/ +- (cinfo[event.vc] && do_client(cinfo[event.vc], &event)) +- || (cinfo[0] && do_client(cinfo[0], &event)) +- || do_selection(&event); ++ if(!cinfo[event.vc] || !do_client(cinfo[event.vc], &event)) { ++ if(!cinfo[0] || !do_client(cinfo[0],&event)) { ++ do_selection(&event); ++ } ++ } + } + } + +diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c +index 98297c9..6dd43e6 100644 +--- a/src/daemon/open_console.c ++++ b/src/daemon/open_console.c +@@ -21,8 +21,13 @@ + + #include /* open and co. */ + #include /* stat() */ ++#include /* major() */ + #include /* ioctl */ + ++#ifdef HAVE_SYS_SYSMACROS_H ++#include /* major() w/newer glibc */ ++#endif ++ + /* Linux specific (to be outsourced in gpm2 */ + #include /* for serial console check */ + #include /* for serial console check */ +diff --git a/src/daemon/processconn.c b/src/daemon/processconn.c +index a5839a3..e92fa63 100644 +--- a/src/daemon/processconn.c ++++ b/src/daemon/processconn.c +@@ -67,7 +67,8 @@ int processConn(int fd) + return -1; + } + +- if((vc = request->vc) > MAX_VC) { ++ vc = request->vc; ++ if(vc > MAX_VC || vc < 0) { + gpm_report(GPM_PR_DEBUG, GPM_MESS_REQUEST_ON, vc, MAX_VC); + free(info); + close(newfd); +diff --git a/src/headers/daemon.h b/src/headers/daemon.h +index a8936ad..24a1a97 100644 +--- a/src/headers/daemon.h ++++ b/src/headers/daemon.h +@@ -180,7 +180,7 @@ extern struct mouse_features mouse_table[3], + extern Gpm_Type mice[]; + extern Gpm_Type *repeated_type; + +-time_t last_selection_time; ++extern time_t last_selection_time; + + + +diff --git a/src/headers/gpm.h b/src/headers/gpm.h +index 57dc618..fe52e53 100644 +--- a/src/headers/gpm.h ++++ b/src/headers/gpm.h +@@ -280,10 +280,16 @@ int Gpm_GetSnapshot(Gpm_Event *ePtr); + char *Gpm_get_console( void ); + int Gpm_x_high_y(int base, int pot_y); + int Gpm_cnt_digits(int number); +-void gpm_oops(int line, char *file, char *text, ... ); ++#ifdef __GNUC__ ++__attribute__((__format__(printf, 3, 4))) ++#endif ++void gpm_oops(int line, const char *file, const char *text, ... ); + + /* report.c / report-lib.c */ +-void gpm_report(int line, char *file, int stat, char *text, ... ); ++#ifdef __GNUC__ ++__attribute__((__format__(printf, 4, 5))) ++#endif ++void gpm_report(int line, const char *file, int stat, const char *text, ... ); + + #ifdef __cplusplus + }; +diff --git a/src/headers/message.h b/src/headers/message.h +index a0fed0e..4b60291 100644 +--- a/src/headers/message.h ++++ b/src/headers/message.h +@@ -226,7 +226,10 @@ + /* #define GPM_MESS_ "" */ + + /* functions */ +-void gpm_report(int line, char *file, int stat, char *text, ... ); ++#ifdef __GNUC__ ++__attribute__((__format__(printf, 4, 5))) ++#endif ++void gpm_report(int line, const char *file, int stat, const char *text, ... ); + + /* rest of wd.h */ + #ifdef HAVE_SYSLOG_H +diff --git a/src/lib/liblow.c b/src/lib/liblow.c +index e789d09..8b40b71 100644 +--- a/src/lib/liblow.c ++++ b/src/lib/liblow.c +@@ -29,11 +29,12 @@ + #include /* strncmp */ + #include /* select(); */ + #include ++#include /* O_RDONLY */ ++ + #include /* timeval */ + #include /* socket() */ + #include /* socket() */ + #include /* struct sockaddr_un */ +-#include /* O_RDONLY */ + #include /* stat() */ + + #ifdef SIGTSTP /* true if BSD system */ +@@ -173,7 +174,7 @@ static void gpm_suspend_hook (int signum) + /* Reincarnation. Prepare for another death early. */ + sigemptyset(&sa.sa_mask); + sa.sa_handler = gpm_suspend_hook; +- sa.sa_flags = SA_NOMASK; ++ sa.sa_flags = SA_NODEFER; + sigaction (SIGTSTP, &sa, 0); + + /* Pop the gpm stack by closing the useless connection */ +@@ -364,7 +365,7 @@ int Gpm_Open(Gpm_Connect *conn, int flag) + + /* if signal was originally ignored, job control is not supported */ + if (gpm_saved_suspend_hook.sa_handler != SIG_IGN) { +- sa.sa_flags = SA_NOMASK; ++ sa.sa_flags = SA_NODEFER; + sa.sa_handler = gpm_suspend_hook; + sigaction(SIGTSTP, &sa, 0); + } +diff --git a/src/lib/report-lib.c b/src/lib/report-lib.c +index c0ae086..03230b4 100644 +--- a/src/lib/report-lib.c ++++ b/src/lib/report-lib.c +@@ -24,9 +24,9 @@ + + #include "headers/message.h" + +-void gpm_report(int line, char *file, int stat, char *text, ... ) ++void gpm_report(int line, const char *file, int stat, const char *text, ... ) + { +- char *string = NULL; ++ const char *string = NULL; + int log_level; + va_list ap; + +@@ -47,7 +47,7 @@ void gpm_report(int line, char *file, int stat, char *text, ... ) + log_level = LOG_CRIT; break; + } + #ifdef HAVE_VSYSLOG +- syslog(log_level, string); ++ syslog(log_level, "%s", string); + vsyslog(log_level, text, ap); + #else + fprintf(stderr,"%s[%s(%d)]:\n",string,file,line); +diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c +index de8e5b2..38d2f11 100644 +--- a/src/prog/display-buttons.c ++++ b/src/prog/display-buttons.c +@@ -36,6 +36,7 @@ + #include /* printf() */ + #include /* time() */ + #include /* errno */ ++#include /* fd_set and FD_* */ + #include /* gpm information */ + + /* display resulting data */ +diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c +index ed15c8a..82afd12 100644 +--- a/src/prog/display-coords.c ++++ b/src/prog/display-coords.c +@@ -33,10 +33,12 @@ + */ + + #include /* write, read, open */ ++#include + #include /* strtol() */ + #include /* printf() */ + #include /* time() */ + #include /* errno */ ++#include /* fd_set and FD_* */ + #include /* gpm information */ + + /* display resulting data */ +@@ -50,7 +52,7 @@ int display_data(Gpm_Event *event, void *data) + last = now; + + /* display time, delta time */ +- printf("[%d] delta: %ds",now,delta); ++ printf("[%jd] delta: %ds",(intmax_t)now,delta); + + /* display mouse information */ + printf(": x=%2i, y=%2i, dx=%2i, dy=%2i\n", event->x, event->y, event->dx, event->dy); +diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y +index 069d801..76c896c 100644 +--- a/src/prog/gpm-root.y ++++ b/src/prog/gpm-root.y +@@ -443,6 +443,7 @@ void f__fix(struct passwd *pass) + } + + /*---------------------------------------------------------------------*/ ++#if 0 + static int f_debug_one(FILE *f, Draw *draw) + { + DrawItem *ip; +@@ -465,6 +466,7 @@ static int f_debug_one(FILE *f, Draw *draw) + #undef LINE + return 0; + } ++#endif + + int f_debug(int mode, DrawItem *self, int uid) + { +@@ -960,10 +962,8 @@ static inline void scr_dump(int fd, FILE *f, unsigned char *buffer, int vc) + /*------------*/ + static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc) + { +- int x,y, dumpfd; ++ int dumpfd; + char dumpname[20]; +- +- x=buffer[2]; y=buffer[3]; + + /* WILL NOT WORK WITH DEVFS! FIXME! */ + sprintf(dumpname,"/dev/vcsa%i",vc); +@@ -1196,12 +1196,8 @@ int main(int argc, char **argv) + LOG_DAEMON : LOG_USER); + /* reap your zombies */ + childaction.sa_handler=reap_children; +-#if defined(__GLIBC__) +- __sigemptyset(&childaction.sa_mask); +-#else /* __GLIBC__ */ +- childaction.sa_mask=0; +-#endif /* __GLIBC__ */ +- childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */ ++ sigemptyset(&childaction.sa_mask); ++ childaction.sa_flags=0; + sigaction(SIGCHLD,&childaction,NULL); + + /*....................................... Connect and get your buffer */ +diff --git a/src/prog/mouse-test.c b/src/prog/mouse-test.c +index 0bb1982..d7d1027 100644 +--- a/src/prog/mouse-test.c ++++ b/src/prog/mouse-test.c +@@ -182,14 +182,14 @@ Gpm_Type *(*I_serial)(int fd, unsigned short flags, struct Gpm_Type *type, + /*----------------------------------------------------------------------------- + Place the description here. + -----------------------------------------------------------------------------*/ +-int mousereopen(int oldfd, char *name, Gpm_Type *type) ++int mousereopen(int oldfd, const char *name, Gpm_Type *type) + { + int fd; + if (!type) type=mice+1; /* ms */ + close(oldfd); + usleep(100000); + fd=open(name,O_RDWR); +- if (fd < 0) gpm_report(GPM_PR_OOPS,name); ++ if (fd < 0) gpm_report(GPM_PR_OOPS, "%s", name); + (*I_serial)(fd,type->flags,type,1,&type->name); /* ms initialization */ + return fd; + } +diff --git a/src/report.c b/src/report.c +index 6c7c2ee..286c1b7 100644 +--- a/src/report.c ++++ b/src/report.c +@@ -69,7 +69,7 @@ + * + */ + +-void gpm_report(int line, char *file, int stat, char *text, ... ) ++void gpm_report(int line, const char *file, int stat, const char *text, ...) + { + FILE *console = NULL; + va_list ap, ap3; +diff --git a/src/synaptics.c b/src/synaptics.c +index 2418c75..a978ef0 100644 +--- a/src/synaptics.c ++++ b/src/synaptics.c +@@ -214,6 +214,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -2241,8 +2242,7 @@ static void syn_process_config (info_type ident, + + + +-static unsigned char tp_hextoint (unsigned char byte1, +- unsigned char byte2) ++static unsigned char tp_hextoint (unsigned byte1,unsigned byte2) + { + unsigned char bytes [3]; + int result; +@@ -2250,7 +2250,7 @@ static unsigned char tp_hextoint (unsigned char byte1, + bytes [0] = byte1; + bytes [1] = byte2; + bytes [2] = '\0'; +- sscanf (bytes, "%x", &result); ++ sscanf ((char *)bytes, "%x", &result); + return result; + } + +@@ -2311,8 +2311,7 @@ static void tp_serial_read (int fd, + } + + /* Write a string of commands */ +-static void tp_serial_send_cmd(int fd, +- unsigned char *cmd) ++static void tp_serial_send_cmd(int fd, const char *cmd) + { + unsigned char junk [15]; + +@@ -2329,7 +2328,7 @@ static void tp_serial_send_cmd(int fd, + static void syn_serial_set_mode (int fd, + unsigned char mode) + { +- unsigned char bytes [15]; ++ char bytes [15]; + + sprintf (bytes, "%%C3B%02X5555", mode); + #if DEBUG_SENT_DATA +diff --git a/src/twiddler.c b/src/twiddler.c +index 1d2bd50..972a616 100644 +--- a/src/twiddler.c ++++ b/src/twiddler.c +@@ -250,7 +250,6 @@ static inline int twiddler_use_item(char *item) + int twiddler_key(unsigned long message) + { + char **table = twiddler_get_table(message); +- char *val; + /* + * These two are needed to avoid transmitting single keys when typing + * chords. When the number of keys being held down decreases, data +@@ -269,7 +268,6 @@ int twiddler_key(unsigned long message) + + if (!table) return 0; + message &= 0xff; +- val = table[message]; + + if ((message < last_message) && !marked) { /* ok, do it */ + marked++; /* don't retransmit on release */ +@@ -428,8 +426,11 @@ char *twiddler_rest_to_value(char *s) + buf[ibuf]='\0'; + return strdup(buf); + } +- if (*ptr == '\\') +- return (char *)twiddler_escape_sequence(ptr+1, &len /* unused */); ++ if (*ptr == '\\') { ++ buf[ibuf++] = twiddler_escape_sequence(ptr+1, &len /* unused */); ++ buf[ibuf] = '\0'; ++ return strdup(buf); ++ } + + if (strlen(ptr)==1) return ((char *)((unsigned long)*ptr & 0xFF)); + diff --git a/SPECS/gpm/0002-gpm-1.20.6-multilib.patch b/SPECS/gpm/0002-gpm-1.20.6-multilib.patch new file mode 100644 index 00000000..820db884 --- /dev/null +++ b/SPECS/gpm/0002-gpm-1.20.6-multilib.patch @@ -0,0 +1,45 @@ +diff -up gpm-1.20.6/contrib/Makefile.in.multilib gpm-1.20.6/contrib/Makefile.in +--- gpm-1.20.6/contrib/Makefile.in.multilib 2008-06-19 07:48:48.000000000 +0200 ++++ gpm-1.20.6/contrib/Makefile.in 2009-02-24 10:36:09.000000000 +0100 +@@ -9,10 +9,10 @@ top_builddir = .. + + include $(top_builddir)/Makefile.include + +-all: $(srcdir)/$(ELISP) ++all: $(filter-out %.elc,$(srcdir)/$(ELISP)) + + install: all +- if [ -n "$(ELISP)" ]; then for i in `echo $(ELISP)`; do \ ++ if [ -n "$(filter-out %.elc,$(ELISP))" ]; then for i in `echo $(filter-out %.elc,$(ELISP))`; do \ + $(INSTALL_DATA) $(srcdir)/$$i $(lispdir)/`basename $$i` ;\ + done; fi + +@@ -20,7 +20,7 @@ install: all + $(EMACS) -batch -l $(srcdir)/emacs/exec.el -exec '(byte-compile-file "$<")' + + uninstall: +- if [ -n "$(ELISP)" ]; then for i in `echo $(ELISP)`; do \ ++ if [ -n "$(filter-out %.elc,$(ELISP))" ]; then for i in `echo $(filter-out %.elc,$(ELISP))`; do \ + rm -f $(lispdir)/$$i ;\ + done; fi + +@@ -28,4 +28,4 @@ dist: + $(CP) -r $(srcdir) $(top_builddir)/gpm-$(release)/ + + clean distclean: +- $(RM) -f $(srcdir)/emacs/*.elc Makefile ++ $(RM) $(srcdir)/emacs/*.elc Makefile +diff -up gpm-1.20.6/doc/Makefile.in.multilib gpm-1.20.6/doc/Makefile.in +--- gpm-1.20.6/doc/Makefile.in.multilib 2009-02-09 10:58:53.000000000 +0100 ++++ gpm-1.20.6/doc/Makefile.in 2009-02-24 10:36:09.000000000 +0100 +@@ -130,8 +130,8 @@ install: all installdirs + #i keep all my infopages compressed and i'm tired to do it by + #hand, so check if there are any compressed pages and do this + #one too +- -ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \ +- && gzip -f $(infodir)/gpm.info ++ #-ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \ ++ # && gzip -f $(infodir)/gpm.info + # Hmm.... shouldn't man pages be compressed too? + # maybe they should, but at least at my system they are not. + diff --git a/SPECS/gpm/0003-gpm-1.20.1-lib-silent.patch b/SPECS/gpm/0003-gpm-1.20.1-lib-silent.patch new file mode 100644 index 00000000..c12da410 --- /dev/null +++ b/SPECS/gpm/0003-gpm-1.20.1-lib-silent.patch @@ -0,0 +1,19 @@ +--- gpm-1.20.1/src/lib/report-lib.c.lib-silent 2002-12-24 23:57:16.000000000 +0100 ++++ gpm-1.20.1/src/lib/report-lib.c 2006-01-18 17:55:38.000000000 +0100 +@@ -24,8 +24,16 @@ + + #include "headers/message.h" + ++static int gpm_silent() { ++ if ( getenv( "GPM_VERBOSE" ) == NULL ) return 1; ++ return 0; ++} ++ + void gpm_report(int line, const char *file, int stat, const char *text, ... ) + { ++ if ( gpm_silent() && stat != GPM_STAT_OOPS ) ++ return; ++ + const char *string = NULL; + int log_level; + va_list ap; diff --git a/SPECS/gpm/0004-gpm-1.20.5-close-fds.patch b/SPECS/gpm/0004-gpm-1.20.5-close-fds.patch new file mode 100644 index 00000000..f33f07c5 --- /dev/null +++ b/SPECS/gpm/0004-gpm-1.20.5-close-fds.patch @@ -0,0 +1,17 @@ +diff -up gpm-1.20.5/src/daemon/startup.c.close-fds gpm-1.20.5/src/daemon/startup.c +--- gpm-1.20.5/src/daemon/startup.c.close-fds 2008-06-13 10:08:19.000000000 +0200 ++++ gpm-1.20.5/src/daemon/startup.c 2008-12-02 10:11:12.000000000 +0100 +@@ -135,6 +135,13 @@ void startup(int argc, char **argv) + check_uniqueness(); + gpm_report(GPM_PR_INFO,GPM_MESS_STARTED); + ++ // close extra fds ++ if (option.run_status == GPM_RUN_STARTUP ) { ++ close(0); ++ close(1); ++ close(2); ++ } ++ + //return mouse_table[1].fd; /* the second is handled in the main() */ + + /****************** OLD CODE from gpn.c END ***********************/ diff --git a/SPECS/gpm/0005-gpm-1.20.1-weak-wgetch.patch b/SPECS/gpm/0005-gpm-1.20.1-weak-wgetch.patch new file mode 100644 index 00000000..e1901a6c --- /dev/null +++ b/SPECS/gpm/0005-gpm-1.20.1-weak-wgetch.patch @@ -0,0 +1,26 @@ +--- gpm-1.20.1/src/lib/libcurses.c.weak-wgetch 2002-12-24 17:57:16.000000000 -0500 ++++ gpm-1.20.1/src/lib/libcurses.c 2004-03-22 15:51:24.000000000 -0500 +@@ -41,7 +41,12 @@ + #endif /* HAVE_NCURSES_CURSES_H */ + #endif /* HAVE_NCURSES_H */ + +-#define GET(win) ((win) ? wgetch(win) : getch()) ++/* If win != NULL, it must have been created by ncurses anyway. ++ Avoid circular library dependencies. */ ++#pragma weak wgetch ++#pragma weak stdscr ++ ++#define GET(win) ((win && wgetch) ? wgetch(win) : getch()) + + int Gpm_Wgetch(WINDOW *win) + { +--- gpm-1.20.1/configure.ac.weak-wgetch 2004-03-22 15:49:51.000000000 -0500 ++++ gpm-1.20.1/configure.ac.footer 2004-03-22 15:51:24.000000000 -0500 +@@ -115,7 +115,7 @@ + AC_CHECK_LIB($i, wgetch,,,$TERMLIBS) + else :; fi + done +- SHARED_LIBS="$LIBS $TERMLIBS -lc" ++ SHARED_LIBS="-lc" + LIBS=$SAVELIBS ;; + esac diff --git a/SPECS/gpm/0006-gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch b/SPECS/gpm/0006-gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch new file mode 100644 index 00000000..61994628 --- /dev/null +++ b/SPECS/gpm/0006-gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch @@ -0,0 +1,30 @@ +diff -Naur gpm-1.20.7.orig/doc/doc.gpm.in gpm-1.20.7/doc/doc.gpm.in +--- gpm-1.20.7.orig/doc/doc.gpm.in 2012-10-26 23:21:38.000000000 +0200 ++++ gpm-1.20.7/doc/doc.gpm.in 2013-07-19 19:40:33.374213536 +0200 +@@ -600,7 +600,7 @@ + that one of @t{\-o dtr}, @t{\-o rts}, @t{\-o both} can be specified to + toggle the control lines of the serial port. + +-The following mouse type are corrently recognized: ++The following mouse type are currently recognized: + + @table @code + @item bare Microsoft +@@ -621,7 +621,7 @@ + this is your case, use the @samp{bare} mouse type. Some new + two-button devices are ``plug and play'', and they don't play + fair at all; in this case try @t{\-t pnp}. Many (most) +- three-button devices that use the microsoft protocol fail to ++ three-button devices that use the Microsoft protocol fail to + report some middle-button events during mouse motion. Since + the protocol does not distinguish between the middle button + going up and the middle button going down it would be liable +@@ -649,7 +649,7 @@ + decoder gets into a confused state where it thinks the middle + button is up when it's down and vice versa. (If you get sick + of having to do this, please don't blame gpm; blame your buggy +- mouse! Note that most three-button mice that do the microsoft ++ mouse! Note that most three-button mice that do the Microsoft + protocol can be made to do the MouseSystems protocol + instead. The ``3 Button Serial Mouse mini-HOWTO'' has + information about this.) This mouse decoder accepts standard diff --git a/SPECS/gpm/0007-src-daemon-remove-obvious-use-of-unitialized-data.patch b/SPECS/gpm/0007-src-daemon-remove-obvious-use-of-unitialized-data.patch new file mode 100644 index 00000000..68f1da95 --- /dev/null +++ b/SPECS/gpm/0007-src-daemon-remove-obvious-use-of-unitialized-data.patch @@ -0,0 +1,38 @@ +From 49908db4943c3718a90b3d5f90b8f4aa622bc358 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 18 Jan 2025 12:09:11 +0100 +Subject: [PATCH 1/4] src/daemon: remove obvious use of unitialized data + +Previously the code would pseudorandomly omit the error message. +Emit it always. +--- + src/daemon/open_console.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c +index 6dd43e60c7..c84f7c6988 100644 +--- a/src/daemon/open_console.c ++++ b/src/daemon/open_console.c +@@ -42,7 +42,7 @@ int open_console(const int mode) + int maj; + int twelve = 12; + struct serial_struct si; +- struct stat sb; ++ struct stat sb = {}; + + fd = open(option.consolename, mode); + if (fd != -1) { +@@ -50,9 +50,7 @@ int open_console(const int mode) + maj = major(sb.st_rdev); + if (maj != 4 && (maj < 136 || maj > 143)) { + if (ioctl(fd, TIOCLINUX, &twelve) < 0) { +- if (si.line > 0) { +- gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN_SERIALCON); +- } ++ gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN_SERIALCON); + } + } + } else +-- +2.47.1 + diff --git a/SPECS/gpm/0008-src-daemon-reindent-switch-statement-to-avoid-compil.patch b/SPECS/gpm/0008-src-daemon-reindent-switch-statement-to-avoid-compil.patch new file mode 100644 index 00000000..0f660d73 --- /dev/null +++ b/SPECS/gpm/0008-src-daemon-reindent-switch-statement-to-avoid-compil.patch @@ -0,0 +1,183 @@ +From 558f94b786e731e208895588625cee6c46d32468 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 18 Jan 2025 12:16:49 +0100 +Subject: [PATCH 2/4] src/daemon: reindent switch statement to avoid compiler + warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Gcc reports that "warning: this ‘if’ clause does not guard..." for +every break statement squished at the end of the preceding logical +line. This just makes the code hard to read, use normal indentation. + +While at it, drop the pointless array. The variable is kept to allow the +option string to be defined on a separate line. +--- + src/daemon/cmdline.c | 141 ++++++++++++++++++++++++++++++------------- + 1 file changed, 98 insertions(+), 43 deletions(-) + +diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c +index 66c8ecc50e..6a89d69ec3 100644 +--- a/src/daemon/cmdline.c ++++ b/src/daemon/cmdline.c +@@ -32,58 +32,113 @@ + void cmdline(int argc, char **argv) + { + extern struct options option; +- char options[]="a:A::b:B:d:Dg:hi:kl:m:Mo:pr:R::s:S:t:Tuv23"; ++ const char *options="a:A::b:B:d:Dg:hi:kl:m:Mo:pr:R::s:S:t:Tuv23"; + int opt; + +- /* initialize for the dual mouse */ ++ /* initialize for the dual mouse */ + mouse_table[2]=mouse_table[1]=mouse_table[0]; /* copy defaults */ + which_mouse = mouse_table+1; /* use the first */ + + while ((opt = getopt(argc, argv, options)) != -1) { + switch (opt) { +- case 'a': (which_mouse->opt_accel) = atoi(optarg); break; +- case 'A': opt_aged++; +- if (optarg) +- opt_age_limit = atoi(optarg); break; +- case 'b': (which_mouse->opt_baud) = atoi(optarg); break; +- case 'B': (which_mouse->opt_sequence) = optarg; break; +- case 'd': (which_mouse->opt_delta) = atoi(optarg); break; +- case 'D': option.run_status = GPM_RUN_DEBUG; break; +- case 'g': (which_mouse->opt_glidepoint_tap)=atoi(optarg); break; +- case 'h': exit(usage(NULL)); +- case 'i': (which_mouse->opt_time)=atoi(optarg); break; +- case 'k': check_kill(); break; +- case 'l': opt_lut = optarg; break; +- case 'm': add_mouse(GPM_ADD_DEVICE,optarg); +- (which_mouse->opt_dev) = optarg; break; /* GO AWAY!*/ +- case 'M': opt_double++; option.repeater++; +- if (option.repeater_type == 0) +- option.repeater_type = "msc"; +- which_mouse=mouse_table+2; break; +- case 'o': add_mouse(GPM_ADD_OPTIONS,optarg); +- gpm_report(GPM_PR_DEBUG,"options: %s",optarg); +- (which_mouse->opt_options) = optarg; break; /* GO AWAY */ +- case 'p': opt_ptrdrag = 0; break; ++ case 'a': ++ (which_mouse->opt_accel) = atoi(optarg); ++ break; ++ case 'A': ++ opt_aged++; ++ if (optarg) ++ opt_age_limit = atoi(optarg); ++ break; ++ case 'b': ++ (which_mouse->opt_baud) = atoi(optarg); ++ break; ++ case 'B': ++ (which_mouse->opt_sequence) = optarg; ++ break; ++ case 'd': ++ (which_mouse->opt_delta) = atoi(optarg); ++ break; ++ case 'D': ++ option.run_status = GPM_RUN_DEBUG; ++ break; ++ case 'g': ++ (which_mouse->opt_glidepoint_tap)=atoi(optarg); ++ break; ++ case 'h': ++ exit(usage(NULL)); ++ break; ++ case 'i': ++ (which_mouse->opt_time)=atoi(optarg); ++ break; ++ case 'k': ++ check_kill(); ++ break; ++ case 'l': ++ opt_lut = optarg; ++ break; ++ case 'm': ++ add_mouse(GPM_ADD_DEVICE,optarg); ++ (which_mouse->opt_dev) = optarg; ++ break; /* GO AWAY!*/ ++ case 'M': ++ opt_double++; option.repeater++; ++ if (option.repeater_type == 0) ++ option.repeater_type = "msc"; ++ which_mouse=mouse_table+2; ++ break; ++ case 'o': ++ add_mouse(GPM_ADD_OPTIONS,optarg); ++ gpm_report(GPM_PR_DEBUG,"options: %s",optarg); ++ (which_mouse->opt_options) = optarg; ++ break; /* GO AWAY */ ++ case 'p': ++ opt_ptrdrag = 0; ++ break; + case 'r': +- /* being called responsiveness, I must take the inverse */ +- (which_mouse->opt_scale)=atoi(optarg); +- if(!(which_mouse->opt_scale) || (which_mouse->opt_scale) > 100) (which_mouse->opt_scale)=100; /* the maximum */ +- else (which_mouse->opt_scale)=100/(which_mouse->opt_scale); break; ++ /* being called responsiveness, I must take the inverse */ ++ (which_mouse->opt_scale)=atoi(optarg); ++ if(!(which_mouse->opt_scale) || (which_mouse->opt_scale) > 100) ++ (which_mouse->opt_scale)=100; /* the maximum */ ++ else ++ (which_mouse->opt_scale)=100/(which_mouse->opt_scale); ++ break; + case 'R': +- option.repeater++; +- if (optarg) option.repeater_type = optarg; +- else option.repeater_type = "msc"; break; +- case 's': (which_mouse->opt_sample) = atoi(optarg); break; +- case 'S': if (optarg) opt_special = optarg; +- else opt_special=""; break; +- case 't': add_mouse(GPM_ADD_TYPE,optarg); +- (which_mouse->opt_type) = optarg; break; /* GO AWAY */ +- case 'u': option.autodetect = 1; break; +- case 'T': opt_test++; break; +- case 'v': printf(GPM_MESS_VERSION "\n"); exit(0); +- case '2': (which_mouse->opt_three) = -1; break; +- case '3': (which_mouse->opt_three) = 1; break; +- default: exit(usage("commandline")); ++ option.repeater++; ++ if (optarg) ++ option.repeater_type = optarg; ++ else ++ option.repeater_type = "msc"; ++ break; ++ case 's': ++ (which_mouse->opt_sample) = atoi(optarg); ++ break; ++ case 'S': ++ if (optarg) ++ opt_special = optarg; ++ else ++ opt_special=""; ++ break; ++ case 't': ++ add_mouse(GPM_ADD_TYPE,optarg); ++ (which_mouse->opt_type) = optarg; ++ break; /* GO AWAY */ ++ case 'u': ++ option.autodetect = 1; ++ break; ++ case 'T': ++ opt_test++; ++ break; ++ case 'v': ++ printf(GPM_MESS_VERSION "\n"); ++ exit(0); ++ case '2': ++ (which_mouse->opt_three) = -1; ++ break; ++ case '3': ++ (which_mouse->opt_three) = 1; ++ break; ++ default: ++ exit(usage("commandline")); + } + } + } +-- +2.47.1 + diff --git a/SPECS/gpm/0009-configure-drop-broken-configure-code.patch b/SPECS/gpm/0009-configure-drop-broken-configure-code.patch new file mode 100644 index 00000000..641e8aeb --- /dev/null +++ b/SPECS/gpm/0009-configure-drop-broken-configure-code.patch @@ -0,0 +1,33 @@ +From 43fffd4acd90f8d6947cba869e01cf36bb116b3a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 18 Jan 2025 12:27:36 +0100 +Subject: [PATCH 3/4] configure: drop broken configure code + +Doesn't work on Fedora 41 or 42: +checking where to install Emacs Lisp files... ./configure: eval: line 12626: syntax error near unexpected token `(' +./configure: eval: line 12626: `itz_cv_path_site_lisp= mapbacktrace(#f(compiled-function (evald func args flags) #))' +--- + configure.ac.footer | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/configure.ac.footer b/configure.ac.footer +index 1e5e4da1e6..5c60a2ec9c 100644 +--- a/configure.ac.footer ++++ b/configure.ac.footer +@@ -59,12 +59,7 @@ else + ELISP="emacs/t-mouse.el emacs/t-mouse.elc" + fi + +-if test $EMACS != : ; then +- ITZ_PATH_SITE_LISP +- lispdir=${itz_cv_path_site_lisp} +-else +- lispdir='${datadir}/emacs/site-lisp' +-fi ++lispdir='${datadir}/emacs/site-lisp' + + # Header-checks + AC_CHECK_HEADERS(syslog.h linux/input.h linux/joystick.h ncurses.h ncurses/curses.h curses.h) +-- +2.47.1 + diff --git a/SPECS/gpm/gpm.service b/SPECS/gpm/gpm.service new file mode 100644 index 00000000..b4d8fe48 --- /dev/null +++ b/SPECS/gpm/gpm.service @@ -0,0 +1,31 @@ +[Unit] +Description=Console Mouse Manager +ConditionVirtualization=!container + +# This could probably benefit from socket activation, but honestly I think it +# is time for gpm to go away, and hence I am not planning to spend the time +# to add socket activation here. +[Service] +ExecStart=gpm -m /dev/input/mice -t exps2 +Type=forking +PIDFile=/run/gpm.pid + +ProtectSystem=full +ProtectHome=yes +ProtectProc=invisible +ProtectControlGroups=yes +ProtectKernelTunables=yes +PrivateNetwork=yes +CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_SYS_ADMIN +DeviceAllow=char-tty +DeviceAllow=char-input +# See also https://github.com/systemd/systemd/pull/21350 +SystemCallFilter=@basic-io @io-event @network-io @file-system @process @signal ioctl mprotect setsid +SystemCallArchitectures=native +SystemCallErrorNumber=EPERM +RestrictAddressFamilies=AF_UNIX + +# Note that "special commands" are disallowed by default. +# To enable, add '-S' to ExecStart= line, and tweak the SystemCallFilter= as appropriate. +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/SPECS/gpm/gpm.spec b/SPECS/gpm/gpm.spec new file mode 100644 index 00000000..1824bf8b --- /dev/null +++ b/SPECS/gpm/gpm.spec @@ -0,0 +1,96 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define LIBVER 2.1.0 + +Name: gpm +Version: 1.20.7 +Release: %autorelease +Summary: A mouse server for the Linux console +License: GPL-2.0-or-later AND LicenseRef-OFSFDL +URL: https://github.com/telmich/gpm +#!RemoteAsset +Source: https://github.com/telmich/gpm/archive/refs/tags/%{version}.tar.gz +Source1: gpm.service +Patch0: 0001-some-headers.patch +Patch1: 0002-gpm-1.20.6-multilib.patch +Patch2: 0003-gpm-1.20.1-lib-silent.patch +Patch3: 0004-gpm-1.20.5-close-fds.patch +Patch4: 0005-gpm-1.20.1-weak-wgetch.patch +Patch5: 0006-gpm-1.20.7-rhbz-668480-gpm-types-7-manpage-fixes.patch +Patch6: 0007-src-daemon-remove-obvious-use-of-unitialized-data.patch +Patch7: 0008-src-daemon-reindent-switch-statement-to-avoid-compil.patch +Patch8: 0009-configure-drop-broken-configure-code.patch +BuildSystem: autotools + +BuildOption(build): CFLAGS="%{optflags} -std=gnu17 -Wno-unused-result -Wno-sign-compare -Wno-pointer-sign" + +BuildRequires: autoconf automake libtool sed gawk texinfo bison +BuildRequires: ncurses-devel libcap-ng-devel systemd-rpm-macros make gcc + +%description +Gpm provides mouse support to text-based Linux applications. It provides +console cut-and-paste operations using the mouse and allows pop-up menus +to appear at the click of a mouse button. + + +%package devel +Summary: Development files for the GPM library +Requires: %{name} = %{version} + +%description devel +This package contains the header files and symbolic links needed to +develop applications that use the GPM library. + +%conf -p +./autogen.sh + +%install -a +chmod 0755 %{buildroot}/%{_libdir}/libgpm.so.%{LIBVER} +ln -sf libgpm.so.%{LIBVER} %{buildroot}/%{_libdir}/libgpm.so + +rm -f %{buildroot}%{_datadir}/emacs/site-lisp/t-mouse.el + +mkdir -p %{buildroot}%{_unitdir} +install -m 644 conf/gpm-* %{buildroot}%{_sysconfdir} + +# Systemd +mkdir -p %{buildroot}%{_unitdir} +install -m644 %{SOURCE1} %{buildroot}%{_unitdir} + +find %{buildroot} -type f -name "*.a" -delete -print + +%post +%systemd_post gpm.service +/sbin/ldconfig + +%preun +%systemd_preun gpm.service + +%postun +%systemd_postun_with_restart gpm.service +/sbin/ldconfig + +%files +%doc COPYING README TODO +%doc doc/README* doc/FAQ doc/Announce doc/changelog +%{_infodir}/gpm.info* +%config(noreplace) %{_sysconfdir}/gpm-* +%{_unitdir}/gpm.service +%{_bindir}/* +%if "%{_sbindir}" != "%{_bindir}" +%{_sbindir}/* +%endif +%{_mandir}/man?/* +%{_libdir}/libgpm.so.* + +%files devel +%{_includedir}/* +%{_libdir}/libgpm.so + +%changelog +%{?autochangelog} diff --git a/SPECS/graphite2/0001-graphite2-1.2.0-cmakepath.patch b/SPECS/graphite2/0001-graphite2-1.2.0-cmakepath.patch new file mode 100644 index 00000000..ee71cd6d --- /dev/null +++ b/SPECS/graphite2/0001-graphite2-1.2.0-cmakepath.patch @@ -0,0 +1,9 @@ +diff -urN graphite2-1.2.0.orig/src/CMakeLists.txt graphite2-1.2.0/src/CMakeLists.txt +--- graphite2-1.2.0.orig/src/CMakeLists.txt 2013-01-29 15:47:32.465841769 +0530 ++++ graphite2-1.2.0/src/CMakeLists.txt 2013-01-29 15:48:24.056843352 +0530 +@@ -136,4 +136,4 @@ + + + install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) +-install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_) ++install(EXPORT graphite2 DESTINATION lib${LIB_SUFFIX}/graphite2 NAMESPACE gr2_) diff --git a/SPECS/graphite2/0002-graphite2-1.3.14-gcc15.patch b/SPECS/graphite2/0002-graphite2-1.3.14-gcc15.patch new file mode 100644 index 00000000..dab230b8 --- /dev/null +++ b/SPECS/graphite2/0002-graphite2-1.3.14-gcc15.patch @@ -0,0 +1,11 @@ +diff -urN graphite2-1.3.14.orig/tests/featuremap/featuremaptest.cpp graphite2-1.3.14/tests/featuremap/featuremaptest.cpp +--- graphite2-1.3.14.orig/tests/featuremap/featuremaptest.cpp 2020-04-01 08:23:13.000000000 +0530 ++++ graphite2-1.3.14/tests/featuremap/featuremaptest.cpp 2025-01-23 16:27:12.648804481 +0530 +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/SPECS/graphite2/graphite2.spec b/SPECS/graphite2/graphite2.spec new file mode 100644 index 00000000..a234ebaf --- /dev/null +++ b/SPECS/graphite2/graphite2.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: graphite2 +Version: 1.3.14 +Release: %autorelease +Summary: Font rendering capabilities for complex non-Roman writing systems +License: LGPL-2.1-or-later OR MPL-2.0 OR GPL-2.0-or-later +URL: https://graphite.sil.org +VCS: git:https://github.com/silnrsi/graphite +#!RemoteAsset +Source0: https://github.com/silnrsi/graphite/releases/download/%{version}/%{name}-%{version}.tgz +BuildSystem: cmake + +# Let other package find the cmake files +Patch0: 0001-graphite2-1.2.0-cmakepath.patch +# This fixes compilation with gcc15 +Patch1: 0002-graphite2-1.3.14-gcc15.patch + +BuildOption(conf): -DGRAPHITE2_COMPARE_RENDERER=OFF +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +BuildRequires: cmake +BuildRequires: pkgconfig(freetype2) + +%description +Graphite2 is a project within SIL’s Non-Roman Script Initiative and Language +Software Development groups to provide rendering capabilities for complex +non-Roman writing systems. Graphite can be used to create “smart fonts” capable +of displaying writing systems with various complex behaviors. With respect to +the Text Encoding Model, Graphite handles the "Rendering" aspect of writing +system implementation. + +%package devel +Summary: Files for developing with graphite2 +Requires: %{name} = %{version}-%{release} + +%description devel +Includes and definitions for developing with graphite2. + +%files +%license LICENSE COPYING +%doc ChangeLog README.md +%{_bindir}/gr2fonttest +%{_libdir}/libgraphite2.so.3* + +%files devel +%dir %{_libdir}/graphite2/ +%{_includedir}/graphite2/ +%{_libdir}/graphite2/graphite2-release.cmake +%{_libdir}/graphite2/graphite2.cmake +%{_libdir}/libgraphite2.so +%{_libdir}/pkgconfig/graphite2.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/grep/grep.spec b/SPECS/grep/grep.spec new file mode 100644 index 00000000..844f92e2 --- /dev/null +++ b/SPECS/grep/grep.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: grep +Version: 3.12 +Release: %autorelease +Summary: Print lines matching a pattern +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/grep/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source2: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig + +Buildsystem: autotools +BuildOption(conf): --disable-silent-rules +BuildOption(conf): CONFIG_SHELL=/bin/sh + +BuildRequires: glibc-locale +BuildRequires: texinfo +BuildRequires: pkgconfig(libpcre2-8) +Provides: base:%{_bindir}/grep + +%install -a +%find_lang %{name} --generate-subpackages + +%description +The grep command searches one or more input files for lines containing a +match to a specified pattern. By default, grep prints the matching lines. + +%files +%license COPYING +%doc README AUTHORS NEWS THANKS TODO ChangeLog* +%{_bindir}/egrep +%{_bindir}/fgrep +%{_bindir}/grep +%{_mandir}/man1/grep.1%{?ext_man} +%{_infodir}/grep.info%{?ext_info} + +%changelog +%{?autochangelog} diff --git a/SPECS/groff/0001-don-t-use-usr-bin-env-in-shebang.patch b/SPECS/groff/0001-don-t-use-usr-bin-env-in-shebang.patch new file mode 100644 index 00000000..10f76760 --- /dev/null +++ b/SPECS/groff/0001-don-t-use-usr-bin-env-in-shebang.patch @@ -0,0 +1,25 @@ +From 6c997078a8f74429f58e4679b7630de7962e18b0 Mon Sep 17 00:00:00 2001 +From: Peter Schiffer +Date: Tue, 4 Nov 2014 14:49:57 +0100 +Subject: [PATCH 4/4] don't use /usr/bin/env in shebang + +There might be an issue that the script is executed with unwanted version of + if that language is provided by enabled dynamic software collection. + +Resolves: #987069 +--- + contrib/chem/chem.pl | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/contrib/chem/chem.pl b/contrib/chem/chem.pl +index 883907b..57e0216 100755 +--- a/contrib/chem/chem.pl ++++ b/contrib/chem/chem.pl +@@ -1,4 +1,4 @@ +-#! /usr/bin/env perl ++#! /usr/bin/perl + + # chem - a groff preprocessor for producing chemical structure diagrams + +-- +2.21.1 diff --git a/SPECS/groff/0002-do-not-overwrite-docdir.patch b/SPECS/groff/0002-do-not-overwrite-docdir.patch new file mode 100644 index 00000000..89e846e7 --- /dev/null +++ b/SPECS/groff/0002-do-not-overwrite-docdir.patch @@ -0,0 +1,27 @@ +From ad194a6cadbb4718d238c85925ab8c646a3afdf7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nikola=20Forr=C3=B3?= +Date: Fri, 6 Mar 2020 10:40:09 +0100 +Subject: [PATCH 5/5] do not overwrite docdir + +--- + Makefile.in | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 5331dd3..21522e3 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -3378,9 +3378,8 @@ doc_dist_target_ok = @doc_dist_target_ok@ + # `infodir' says where to install info files. + + # docdir +-# `docdir' says where to install documentation files. The default +-# location is ${datarootdir}/doc/${PACKAGE}, but we add the version +-docdir = $(datarootdir)/doc/${PACKAGE}-$(SHORT_VERSION) ++# `docdir' says where to install documentation files. ++docdir = @docdir@ + dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + g = @g@ +-- +2.21.1 diff --git a/SPECS/groff/0003-load-site-font-and-site-tmac-from-etc-groff.patch b/SPECS/groff/0003-load-site-font-and-site-tmac-from-etc-groff.patch new file mode 100644 index 00000000..45ba838d --- /dev/null +++ b/SPECS/groff/0003-load-site-font-and-site-tmac-from-etc-groff.patch @@ -0,0 +1,41 @@ +From c59b56642d10997a35553ae08e6b341b565794f7 Mon Sep 17 00:00:00 2001 +From: groff owner +Date: Mon, 10 Jul 2023 11:51:30 +0000 +Subject: [PATCH] load site-font and site-tmac from /etc/groff + +Move site-font and site-tmac configuration from /usr/share/groff to +/etc/groff. That allows permanent custom changes. (Symlinking brought +a lot of problems with RPM. This is safer and cleaner.) + +--- + Makefile.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index a47df30..e9618d1 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -3857,7 +3857,7 @@ fontdir = $(datasubdir)/font + oldfontdir = $(datasubdir)/oldfont + + # `localfontdir' says where local fonts will be installed (as dev*/*). +-localfontdir = $(dataprogramdir)/site-font ++localfontdir = @sysconfdir@/groff/site-font + + # `legacyfontdir' is for compatibility with AT&T/DWB troff. + legacyfontdir = /usr/lib/font +@@ -3869,10 +3869,10 @@ fontpath = $(localfontdir)$(RT_SEP)$(fontdir)$(RT_SEP)$(legacyfontdir) + tmacdir = $(datasubdir)/tmac + + # `systemtmacdir' says where to install platform-dependent macros. +-systemtmacdir = $(libprogramdir)/site-tmac ++systemtmacdir = @sysconfdir@/groff/site-tmac + + # `localtmacdir' says where local files will be installed. +-localtmacdir = $(dataprogramdir)/site-tmac ++localtmacdir = @sysconfdir@/groff/site-tmac + + # appdefdir + # `appdefdir' says where to install the application defaults file for +-- +2.41.0 diff --git a/SPECS/groff/groff.spec b/SPECS/groff/groff.spec new file mode 100644 index 00000000..a4135ba7 --- /dev/null +++ b/SPECS/groff/groff.spec @@ -0,0 +1,434 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# If we want to enable building with x, change this to 1 +%bcond x 0 + +Name: groff +Version: 1.23.0 +Release: %autorelease +Summary: A document formatting system +License: GPL-3.0-or-later AND GFDL-1.3-or-later AND BSD-4-Clause-UC AND MIT AND X11 AND LicenseRef-Fedora-Public-Domain +URL: http://www.gnu.org/software/groff/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +BuildSystem: autotools + +# avoid /usr/bin/env in shebang +Patch0: 0001-don-t-use-usr-bin-env-in-shebang.patch +# allow to specify custom docdir +Patch1: 0002-do-not-overwrite-docdir.patch +# Move site-font and site-tmac configuration from /usr/share/groff to /etc/groff. +Patch2: 0003-load-site-font-and-site-tmac-from-etc-groff.patch + +BuildOption(conf): --docdir=%{_docdir}/%{name} +%if %{with x} +BuildOption(conf): --with-x +BuildOption(conf): --with-appdefdir=%{_datadir}/X11/app-defaults +%endif +BuildOption(conf): --with-grofferdir=%{_datadir}/%{name}/%{version}/groffer + +BuildRequires: gcc-c++ +BuildRequires: bison +BuildRequires: texinfo +BuildRequires: perl +%if %{with x} +BuildRequires: netpbm-progs +%endif + +Provides: nroff-i18n = %{version}-%{release} +Provides: bundled(gnulib) + +Requires: coreutils +Requires: groff-base = %{version}-%{release} +Requires(post): /usr/sbin/update-alternatives +Requires(postun): /usr/sbin/update-alternatives +Requires(preun): /usr/sbin/update-alternatives + +Recommends: psutils + +%description +Groff is a document formatting system. Groff takes standard text and +formatting commands as input and produces formatted output. The +created documents can be shown on a display or printed on a printer. +Groff's formatting commands allow you to specify font type and size, +bold type, italic type, the number and size of columns on a page, and +more. + +Groff can also be used to format man pages. If you are going to use +groff with the X Window System, you will also need to install the +groff-x11 package. + +%package base +Summary: Parts of the groff formatting system required to display manual pages +Requires(post): /usr/sbin/update-alternatives +Requires(postun): /usr/sbin/update-alternatives +Requires(preun): /usr/sbin/update-alternatives + +%description base +The groff-base package contains only necessary parts of groff formatting +system which are required to display manual pages, and the groff's default +display device (PostScript). + +%package perl +Summary: Parts of the groff formatting system that require Perl +Requires: groff-base = %{version}-%{release} + +%description perl +The groff-perl package contains the parts of the groff text processor +package that require Perl. These include the afmtodit (font processor +for creating PostScript font files), groffer (tool for displaying groff +files), grog (utility that can be used to automatically determine groff +command-line options), chem (groff preprocessor for producing chemical +structure diagrams), mmroff (reference preprocessor) and roff2dvi +roff2html roff2pdf roff2ps roff2text roff2x (roff code converters). + +%if %{with x} +%package x11 +Summary: Parts of the groff formatting system that require X Windows System +Requires: groff-base = %{version}-%{release} +BuildRequires: libXaw-devel, libXmu-devel +BuildRequires: make +Provides: groff-gxditview = %{version}-%{release} + +%description x11 +The groff-x11 package contains the parts of the groff text processor +package that require X Windows System. These include gxditview (display +groff intermediate output files on X Window System display) and +xtotroff (converts X font metrics into groff font metrics). +%endif + +%package doc +Summary: Documentation for groff document formatting system +BuildArch: noarch +Requires: groff = %{version}-%{release} + +%description doc +The groff-doc package includes additional documentation for groff +text processor package. It contains examples, documentation for PIC +language and documentation for creating PDF files. + +%prep -a +for file in NEWS src/devices/grolbp/grolbp.1.man doc/webpage.ms \ + contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom,mom.vim}; do + iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" + mv "${file}_" "$file" +done + +%install -a +# rename files for alternative usage +mv %{buildroot}%{_bindir}/soelim %{buildroot}%{_bindir}/soelim.%{name} +touch %{buildroot}%{_bindir}/soelim +mv %{buildroot}%{_mandir}/man1/soelim.1 %{buildroot}%{_mandir}/man1/soelim.%{name}.1 +touch %{buildroot}%{_mandir}/man1/soelim.1 +mv %{buildroot}%{_mandir}/man7/roff.7 %{buildroot}%{_mandir}/man7/roff.%{name}.7 +touch %{buildroot}%{_mandir}/man7/roff.7 + +# some binaries need alias with 'g' or 'z' prefix +for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim; do + ln -s ${file#?} %{buildroot}%{_bindir}/${file} + ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz +done + +# TODO: what buildrequires are needed for these? +%if 0 +# fix absolute symlink to relative symlink +rm -f %{buildroot}%{_docdir}/pdf/mom-pdf.pdf +ln -s ../examples/mom/mom-pdf.pdf %{buildroot}%{_docdir}/pdf/mom-pdf.pdf +%endif + +# remove unnecessary files +rm -f %{buildroot}%{_infodir}/dir + +# move /bin/sed to /usr/bin/sed +sed --in-place 's|#! /bin/sed -f|#! /usr/bin/sed -f|' %{buildroot}%{_datadir}/groff/%{version}/font/devps/generate/symbol.sed + +%pre +# remove alternativized files if they are not symlinks +[ -L %{_mandir}/man7/roff.7.gz ] || %{__rm} -f %{_mandir}/man7/roff.7.gz >/dev/null 2>&1 || : + +%post +# set up the alternatives files +/usr/sbin/update-alternatives --install %{_mandir}/man7/roff.7.gz roff.7.gz %{_mandir}/man7/roff.%{name}.7.gz 300 \ + >/dev/null 2>&1 || : + +%preun +if [ $1 -eq 0 ]; then + /usr/sbin/update-alternatives --remove roff.7.gz %{_mandir}/man7/roff.%{name}.7.gz >/dev/null 2>&1 || : +fi + +%postun +if [ $1 -ge 1 ]; then + if [ "$(readlink /etc/alternatives/roff.7.gz)" == "%{_mandir}/man7/roff.%{name}.7.gz" ]; then + /usr/sbin/update-alternatives --set roff.7.gz %{_mandir}/man7/roff.%{name}.7.gz >/dev/null 2>&1 || : + fi +fi + +%pre base +# remove alternativized files if they are not symlinks +[ -L %{_bindir}/soelim ] || %{__rm} -f %{_bindir}/soelim >/dev/null 2>&1 || : +[ -L %{_mandir}/man1/soelim.1.gz ] || %{__rm} -f %{_mandir}/man1/soelim.1.gz >/dev/null 2>&1 || : + +%post base +# set up the alternatives files +/usr/sbin/update-alternatives --install %{_bindir}/soelim soelim %{_bindir}/soelim.%{name} 300 \ + --slave %{_mandir}/man1/soelim.1.gz soelim.1.gz %{_mandir}/man1/soelim.%{name}.1.gz \ + >/dev/null 2>&1 || : + +%preun base +if [ $1 -eq 0 ]; then + /usr/sbin/update-alternatives --remove soelim %{_bindir}/soelim.%{name} >/dev/null 2>&1 || : +fi + +%postun base +if [ $1 -ge 1 ]; then + if [ "$(readlink /etc/alternatives/soelim)" == "%{_bindir}/soelim.%{name}" ]; then + /usr/sbin/update-alternatives --set soelim %{_bindir}/soelim.%{name} >/dev/null 2>&1 || : + fi +fi + +%files +%{_datadir}/%{name}/%{version}/font/devcp1047/ +%{_datadir}/%{name}/%{version}/font/devdvi/ +%{_datadir}/%{name}/%{version}/font/devlbp/ +%{_datadir}/%{name}/%{version}/font/devlj4/ +%{_datadir}/%{name}/%{version}/oldfont/ +%{_datadir}/%{name}/%{version}/pic/ +%{_datadir}/%{name}/%{version}/tmac/62bit.tmac +%{_datadir}/%{name}/%{version}/tmac/dvi.tmac +%{_datadir}/%{name}/%{version}/tmac/e.tmac +%{_datadir}/%{name}/%{version}/tmac/ec.tmac +%{_datadir}/%{name}/%{version}/tmac/hdmisc.tmac +%{_datadir}/%{name}/%{version}/tmac/hdtbl.tmac +%{_datadir}/%{name}/%{version}/tmac/lbp.tmac +%{_datadir}/%{name}/%{version}/tmac/lj4.tmac +%{_datadir}/%{name}/%{version}/tmac/m.tmac +%{_datadir}/%{name}/%{version}/tmac/me.tmac +%{_datadir}/%{name}/%{version}/tmac/mm.tmac +%{_datadir}/%{name}/%{version}/tmac/mm/ +%{_datadir}/%{name}/%{version}/tmac/mmse.tmac +%{_datadir}/%{name}/%{version}/tmac/mom.tmac +%{_datadir}/%{name}/%{version}/tmac/ms.tmac +%{_datadir}/%{name}/%{version}/tmac/mse.tmac +%{_datadir}/%{name}/%{version}/tmac/om.tmac +%{_datadir}/%{name}/%{version}/tmac/pdfmark.tmac +%{_datadir}/%{name}/%{version}/tmac/refer-me.tmac +%{_datadir}/%{name}/%{version}/tmac/refer-mm.tmac +%{_datadir}/%{name}/%{version}/tmac/refer-ms.tmac +%{_datadir}/%{name}/%{version}/tmac/refer.tmac +%{_datadir}/%{name}/%{version}/tmac/s.tmac +%{_datadir}/%{name}/%{version}/tmac/spdf.tmac +%{_datadir}/%{name}/%{version}/tmac/trace.tmac +%{_datadir}/%{name}/%{version}/tmac/zh.tmac +%{_bindir}/addftinfo +%{_bindir}/eqn2graph +%{_bindir}/gdiffmk +%{_bindir}/grap2graph +%{_bindir}/grn +%{_bindir}/grodvi +%{_bindir}/grolbp +%{_bindir}/grolj4 +%{_bindir}/hpftodit +%{_bindir}/indxbib +%{_bindir}/lkbib +%{_bindir}/lookbib +%{_bindir}/pdfroff +%{_bindir}/pfbtops +%{_bindir}/pic2graph +%{_bindir}/refer +%{_bindir}/tfmtodit +%{_mandir}/man1/addftinfo.* +%{_mandir}/man1/eqn2graph.* +%{_mandir}/man1/gdiffmk.* +%{_mandir}/man1/grap2graph.* +%{_mandir}/man1/grn.* +%{_mandir}/man1/grodvi.* +%{_mandir}/man1/grohtml.* +%{_mandir}/man1/grolbp.* +%{_mandir}/man1/grolj4.* +%{_mandir}/man1/hpftodit.* +%{_mandir}/man1/indxbib.* +%{_mandir}/man1/lkbib.* +%{_mandir}/man1/lookbib.* +%{_mandir}/man1/pdfroff.* +%{_mandir}/man1/pfbtops.* +%{_mandir}/man1/pic2graph.* +%{_mandir}/man1/refer.* +%{_mandir}/man1/tfmtodit.* +%{_bindir}/grefer +%{_bindir}/glookbib +%{_bindir}/gindxbib +%{_mandir}/man1/grefer.* +%{_mandir}/man1/glookbib.* +%{_mandir}/man1/gindxbib.* +%{_mandir}/man5/* +%ghost %{_mandir}/man7/roff.7* +%{_mandir}/man7/* +%{_infodir}/groff.info* +%if %{without x} +%exclude %{_datadir}/%{name}/%{version}/tmac/X.tmac +%exclude %{_datadir}/%{name}/%{version}/tmac/Xps.tmac +%endif + +%files base +%license COPYING FDL LICENSES +%doc BUG-REPORT MORE.STUFF NEWS PROBLEMS +%dir %{_sysconfdir}/groff/ +%config(noreplace) %{_sysconfdir}/groff/* +%dir %{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/%{version}/ +%dir %{_datadir}/%{name}/%{version}/font/ +%dir %{_datadir}/%{name}/%{version}/tmac/ +%{_datadir}/%{name}/current +%{_datadir}/%{name}/%{version}/eign +%{_datadir}/%{name}/%{version}/font/devascii/ +%{_datadir}/%{name}/%{version}/font/devlatin1/ +%{_datadir}/%{name}/%{version}/font/devps/ +%{_datadir}/%{name}/%{version}/font/devutf8/ +%{_datadir}/%{name}/%{version}/font/devhtml/ +%{_datadir}/%{name}/%{version}/tmac/an-ext.tmac +%{_datadir}/%{name}/%{version}/tmac/an.tmac +%{_datadir}/%{name}/%{version}/tmac/andoc.tmac +%{_datadir}/%{name}/%{version}/tmac/composite.tmac +%{_datadir}/%{name}/%{version}/tmac/cp1047.tmac +%{_datadir}/%{name}/%{version}/tmac/cs.tmac +%{_datadir}/%{name}/%{version}/tmac/de.tmac +%{_datadir}/%{name}/%{version}/tmac/den.tmac +%{_datadir}/%{name}/%{version}/tmac/en.tmac +%{_datadir}/%{name}/%{version}/tmac/devtag.tmac +%{_datadir}/%{name}/%{version}/tmac/doc-old.tmac +%{_datadir}/%{name}/%{version}/tmac/doc.tmac +%{_datadir}/%{name}/%{version}/tmac/eqnrc +%{_datadir}/%{name}/%{version}/tmac/europs.tmac +%{_datadir}/%{name}/%{version}/tmac/fallbacks.tmac +%{_datadir}/%{name}/%{version}/tmac/fr.tmac +%{_datadir}/%{name}/%{version}/tmac/html-end.tmac +%{_datadir}/%{name}/%{version}/tmac/html.tmac +%{_datadir}/%{name}/%{version}/tmac/hyphen.cs +%{_datadir}/%{name}/%{version}/tmac/hyphen.den +%{_datadir}/%{name}/%{version}/tmac/hyphen.det +%{_datadir}/%{name}/%{version}/tmac/hyphen.fr +%{_datadir}/%{name}/%{version}/tmac/hyphen.sv +%{_datadir}/%{name}/%{version}/tmac/hyphen.en +%{_datadir}/%{name}/%{version}/tmac/hyphen.it +%{_datadir}/%{name}/%{version}/tmac/hyphenex.cs +%{_datadir}/%{name}/%{version}/tmac/hyphenex.en +%{_datadir}/%{name}/%{version}/tmac/ja.tmac +%{_datadir}/%{name}/%{version}/tmac/ptx.tmac +%{_datadir}/%{name}/%{version}/tmac/it.tmac +%{_datadir}/%{name}/%{version}/tmac/rfc1345.tmac +%{_datadir}/%{name}/%{version}/tmac/sanitize.tmac +%{_datadir}/%{name}/%{version}/tmac/sboxes.tmac +%{_datadir}/%{name}/%{version}/tmac/latin1.tmac +%{_datadir}/%{name}/%{version}/tmac/latin2.tmac +%{_datadir}/%{name}/%{version}/tmac/latin5.tmac +%{_datadir}/%{name}/%{version}/tmac/latin9.tmac +%{_datadir}/%{name}/%{version}/tmac/man.tmac +%{_datadir}/%{name}/%{version}/tmac/mandoc.tmac +%{_datadir}/%{name}/%{version}/tmac/mdoc.tmac +%{_datadir}/%{name}/%{version}/tmac/mdoc/ +%{_datadir}/%{name}/%{version}/tmac/papersize.tmac +%{_datadir}/%{name}/%{version}/tmac/pdfpic.tmac +%{_datadir}/%{name}/%{version}/tmac/pic.tmac +%{_datadir}/%{name}/%{version}/tmac/ps.tmac +%{_datadir}/%{name}/%{version}/tmac/psatk.tmac +%{_datadir}/%{name}/%{version}/tmac/psold.tmac +%{_datadir}/%{name}/%{version}/tmac/pspic.tmac +%{_datadir}/%{name}/%{version}/tmac/sv.tmac +%{_datadir}/%{name}/%{version}/tmac/trans.tmac +%{_datadir}/%{name}/%{version}/tmac/troffrc +%{_datadir}/%{name}/%{version}/tmac/troffrc-end +%{_datadir}/%{name}/%{version}/tmac/tty-char.tmac +%{_datadir}/%{name}/%{version}/tmac/tty.tmac +%{_datadir}/%{name}/%{version}/tmac/www.tmac +%{_bindir}/eqn +%{_bindir}/groff +%{_bindir}/grops +%{_bindir}/grotty +%{_bindir}/neqn +%{_bindir}/nroff +%{_bindir}/pic +%{_bindir}/post-grohtml +%{_bindir}/pre-grohtml +%{_bindir}/preconv +%ghost %{_bindir}/soelim +%{_bindir}/soelim.%{name} +%{_bindir}/tbl +%{_bindir}/troff +%{_mandir}/man1/eqn.* +%{_mandir}/man1/groff.* +%{_mandir}/man1/grops.* +%{_mandir}/man1/grotty.* +%{_mandir}/man1/neqn.* +%{_mandir}/man1/nroff.* +%{_mandir}/man1/pic.* +%{_mandir}/man1/preconv.* +%ghost %{_mandir}/man1/soelim.1* +%{_mandir}/man1/soelim.%{name}.* +%{_mandir}/man1/tbl.* +%{_mandir}/man1/troff.* +# compatibility symlinks +%{_bindir}/gnroff +%{_bindir}/gtroff +%{_bindir}/gtbl +%{_bindir}/gpic +%{_bindir}/geqn +%{_bindir}/gneqn +%{_bindir}/gsoelim +%{_bindir}/zsoelim +%{_mandir}/man1/gnroff.* +%{_mandir}/man1/gtroff.* +%{_mandir}/man1/gtbl.* +%{_mandir}/man1/gpic.* +%{_mandir}/man1/geqn.* +%{_mandir}/man1/gneqn.* +%{_mandir}/man1/gsoelim.* +%{_mandir}/man1/zsoelim.* + +%files perl +%{_datadir}/%{name}/%{version}/font/devpdf/ +%{_datadir}/%{name}/%{version}/tmac/pdf.tmac +%{_bindir}/afmtodit +%{_bindir}/chem +%{_bindir}/gperl +%{_bindir}/gpinyin +%{_bindir}/glilypond +%{_bindir}/grog +%{_bindir}/gropdf +%{_bindir}/mmroff +%{_bindir}/pdfmom +%{_mandir}/man1/afmtodit.* +%{_mandir}/man1/chem.* +%{_mandir}/man1/gperl.* +%{_mandir}/man1/gpinyin.* +%{_mandir}/man1/glilypond.* +%{_mandir}/man1/grog.* +%{_mandir}/man1/gropdf.* +%{_mandir}/man1/mmroff.* +%{_mandir}/man1/pdfmom.* + +%if %{with x} +%files x11 +%{_datadir}/%{name}/%{version}/font/devX*/ +%{_datadir}/%{name}/%{version}/tmac/X.tmac +%{_datadir}/%{name}/%{version}/tmac/Xps.tmac +%{_datadir}/X11/app-defaults/GXditview +%{_datadir}/X11/app-defaults/GXditview-color +%{_datadir}/%{name}/%{version}/font/FontMap-X11 +%{_bindir}/gxditview +%{_bindir}/xtotroff +%{_mandir}/man1/gxditview.* +%{_mandir}/man1/xtotroff.* +%endif + +%files doc +%doc %{_docdir}/groff* + +%changelog +%{?autochangelog} diff --git a/SPECS/grpc/grpc.spec b/SPECS/grpc/grpc.spec new file mode 100644 index 00000000..cc369dcd --- /dev/null +++ b/SPECS/grpc/grpc.spec @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: grpc +Version: 1.75.1 +Release: %autorelease +Summary: An HTTP/2-based Remote Procedure Call framework +License: Apache-2.0 +URL: https://grpc.io/ +#!RemoteAsset +Source: https://github.com/grpc/grpc/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DgRPC_INSTALL:BOOL=ON +BuildOption(conf): -DgRPC_INSTALL_LIBDIR:PATH="%_lib" +BuildOption(conf): -DgRPC_INSTALL_CMAKEDIR:PATH="%_libdir/cmake/grpc" + +BuildOption(conf): -DgRPC_ABSL_PROVIDER=package +BuildOption(conf): -DgRPC_CARES_PROVIDER=package +BuildOption(conf): -DgRPC_PROTOBUF_PROVIDER=package +BuildOption(conf): -DgRPC_RE2_PROVIDER=package +BuildOption(conf): -DgRPC_SSL_PROVIDER=package +BuildOption(conf): -DgRPC_ZLIB_PROVIDER=package +BuildOption(conf): -DCMAKE_CXX_STANDARD=17 +BuildOption(conf): -DgRPC_BENCHMARK_PROVIDER=none +BuildOption(conf): -DgRPC_BENCHMARK_PROVIDER=OFF +BuildOption(conf): -DgRPC_BUILD_TESTS=OFF +BuildOption(conf): -DgRPC_DOWNLOAD_ARCHIVES:BOOL=OFF + +BuildRequires: abseil-cpp-devel +BuildRequires: cmake +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: pkg-config +BuildRequires: pkgconfig(libcares) >= 1.19.1 +BuildRequires: pkgconfig(openssl) >= 1.0.1 +BuildRequires: pkgconfig(protobuf) >= 22 +BuildRequires: pkgconfig(re2) +BuildRequires: pkgconfig(zlib) + +%description +gRPC is a modern, open source, high-performance Remote Procedure Call (RPC) +framework that can run in any environment. + +%package devel +Summary: Development files for gRPC +Requires: %{name} = %{version} +Requires: pkgconfig(libcares) +Requires: pkgconfig(re2) + +%description devel +This package contains the libraries, header files, and tools needed to +develop applications that use the gRPC framework. + +%prep -a +find . -type f -regex ".*\.py\|.*\.sh" -exec sed -i -e 's|/usr/bin/env python.*|/usr/bin/python3|' -e 's|/usr/bin/python.*|/usr/bin/python3|' {} + +rm -Rf third_party/abseil-cpp/ + +%install -a +rm -Rf %{buildroot}%{_datadir}/grpc/*.pem +%fdupes %{buildroot}%{_prefix} +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libaddress_sorting.so.* +%{_libdir}/libgpr*.so.* +%{_libdir}/libgrpc*.so.* +%{_libdir}/libutf8_range_lib.so.* +%{_libdir}/libupb*.so.* + +%files devel +%{_bindir}/* +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%dir %{_libdir}/cmake +%{_libdir}/cmake/grpc/ + +%changelog +%{?autochangelog} diff --git a/SPECS/gsasl/gsasl.spec b/SPECS/gsasl/gsasl.spec new file mode 100644 index 00000000..71c5c5a0 --- /dev/null +++ b/SPECS/gsasl/gsasl.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gsasl +Version: 2.2.2 +Release: %autorelease +Summary: GNU SASL library +License: LGPL-2.1-or-later +URL: https://www.gnu.org/software/gsasl/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/gsasl/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/gsasl/%{name}-%{version}.tar.gz.sig + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-rpath +BuildOption(conf): --with-gssapi-impl=mit + +BuildRequires: gcc krb5-devel libgcrypt-devel libidn2-devel pkgconfig gettext + +%description +The GNU SASL library includes support for the SASL framework and various +mechanisms like CRAM-MD5, EXTERNAL, GSSAPI, ANONYMOUS, PLAIN, DIGEST-MD5, +LOGIN, and NTLM. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +This package contains libraries and header files for developing applications +that use the GNU SASL library. + + +%install -a +find %{buildroot} -name '*.la' -exec rm -f {} ';' +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets + +%files +%doc AUTHORS NEWS README THANKS +%license COPYING +%{_bindir}/gsasl +%{_libdir}/libgsasl.so.* + +%files devel +%{_includedir}/gsasl* +%{_libdir}/libgsasl.so +%{_libdir}/pkgconfig/libgsasl.pc +%{_infodir}/gsasl.info* +%{_mandir}/man1/gsasl.* +%{_mandir}/man3/gsasl*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/gtest/gtest.spec b/SPECS/gtest/gtest.spec new file mode 100644 index 00000000..0a8cd3e6 --- /dev/null +++ b/SPECS/gtest/gtest.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gtest +Version: 1.17.0 +Release: %autorelease +Summary: Google C++ testing framework +License: BSD-3-Clause and Apache-2.0 +URL: https://github.com/google/googletest +#!RemoteAsset +Source: https://github.com/google/googletest/releases/download/v%{version}/googletest-%{version}.tar.gz +BuildRequires: gcc-c++ cmake python3-devel +BuildSystem: cmake +BuildOption(conf): -DBUILD_SHARED_LIBS=ON -DPYTHON_EXECUTABLE=%{__python3} -Dgtest_build_tests=ON +%description +This package is Google C++ testing framework,It can be compiled for +a variety of platforms.Google Test is a unit testing library for +the C++ programming language, based on the xUnit architecture, +allowing unit-testing of C sources as well as C++ with minimal source modification. + +%package -n gtest-devel +Summary: Gtest development files +Requires: gtest = %{version}-%{release} +Requires: gmock = %{version}-%{release} +%description -n gtest-devel +This package is libraries and head files for google testing framework. + +%package -n gmock +Summary: Google framework for writing and using C++ mock classes +Requires: gtest = %{version}-%{release} +%description -n gmock +The package is Google's framework for writing and using C++ mock classes. +It can help you derive better designs of your system and write better tests. +Gmock is a suite of testing tools developed by Google. +It is often used in combination with GTest. + +%package -n gmock-devel +Summary: Gmock development files +Requires: gmock = %{version}-%{release} +%description -n gmock-devel +The package is libraries and head files for google mocking framework. + +%prep +%autosetup -p1 -n googletest-%{version} + +%files +%license LICENSE +%{_libdir}/libgtest*.%{version} + +%files -n gtest-devel +%doc CONTRIBUTORS README.md +%doc docs/ +%{_includedir}/gtest/ +%{_libdir}/libgtest*.so +%{_libdir}/cmake/GTest/ +%{_libdir}/pkgconfig/gtest* + +%files -n gmock +%license LICENSE +%{_libdir}/libgmock*.%{version} + +%files -n gmock-devel +%doc CONTRIBUTORS README.md +%doc docs/ +%{_includedir}/gmock/ +%{_libdir}/libgmock*.so +%{_libdir}/pkgconfig/gmock* + +%changelog +%{?autochangelog} diff --git a/SPECS/guile/guile.spec b/SPECS/guile/guile.spec new file mode 100644 index 00000000..591750f9 --- /dev/null +++ b/SPECS/guile/guile.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: guile +Version: 3.0.10 +Release: %autorelease +Summary: GNU's Ubiquitous Intelligent Language for Extension +License: GFDL-1.3-only AND GPL-3.0-or-later AND LGPL-3.0-or-later +URL: https://www.gnu.org/software/guile/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/guile/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/guile/%{name}-%{version}.tar.xz.sig + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: gc-devel +BuildRequires: gmp-devel +BuildRequires: ncurses-devel +BuildRequires: readline-devel +BuildRequires: libffi-devel +BuildRequires: libunistring-devel +BuildRequires: libxcrypt-devel + +%description +This is Guile, a portable, embeddable Scheme implementation written in +C. Guile provides a machine independent execution platform that can be +linked in as a library when building extensible programs. + +%package devel + +Summary: GNU's Ubiquitous Intelligent Language for Extension +License: LGPL-2.1-or-later + +Requires: %{name} = %{version} +Requires: gc-devel +Requires: gmp-devel +Requires: ncurses-devel +Requires: readline-devel +Requires: libffi-devel +Requires: libunistring-devel +Requires: libxcrypt-devel + +%description devel +This is Guile, a portable, embeddable Scheme implementation written in +C. Guile provides a machine independent execution platform that can be +linked in as a library when building extensible programs. + +%conf -p +export CFLAGS="$CFLAGS -std=gnu17" + +%files +%license LICENSE COPYING* +%doc ABOUT-NLS AUTHORS ChangeLog GUILE-VERSION HACKING +%doc NEWS README THANKS +%{_bindir}/guile-tools +%{_bindir}/guild +%{_bindir}/guile +%{_libdir}/*.so.* +%{_libdir}/guile +%{_datadir}/guile +%{_mandir}/man1/guile.1* + +%files devel +%{_bindir}/guile-snarf +%{_bindir}/guile-config +%{_includedir}/guile/* +%{_datadir}/aclocal/guile.m4 +%{_infodir}/*.info* +%{_libdir}/libguile-*.so +%{_libdir}/pkgconfig/guile-*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/gzip/gzip.spec b/SPECS/gzip/gzip.spec new file mode 100644 index 00000000..273016a4 --- /dev/null +++ b/SPECS/gzip/gzip.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: gzip +Version: 1.14 +Release: %autorelease +Summary: GNU Zip Compression Utilities +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/gzip/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source2: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig +Patch1: manpage-no-date.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: texinfo + +BuildSystem: autotools +# avoid build require "less" +BuildOption(conf): ac_cv_prog_LESS="less" +%description +Gzip reduces the size of the named files using Lempel-Ziv coding LZ77. +Whenever possible, each file is replaced by one with the extension .gz, +while keeping the same ownership modes and access and modification +times. + + +%files +%license COPYING +%doc README AUTHORS ChangeLog TODO NEWS THANKS +%{_bindir}/gunzip +%{_bindir}/gzexe +%{_bindir}/gzip +%{_bindir}/uncompress +%{_bindir}/zcat +%{_bindir}/zcmp +%{_bindir}/zdiff +%{_bindir}/zegrep +%{_bindir}/zfgrep +%{_bindir}/zforce +%{_bindir}/zgrep +%{_bindir}/zless +%{_bindir}/zmore +%{_bindir}/znew +%{_infodir}/gzip.info* +%{_mandir}/man1/gunzip.1* +%{_mandir}/man1/gzexe.1* +%{_mandir}/man1/gzip.1* +%{_mandir}/man1/zcat.1* +%{_mandir}/man1/zcmp.1* +%{_mandir}/man1/zdiff.1* +%{_mandir}/man1/zforce.1* +%{_mandir}/man1/zgrep.1* +%{_mandir}/man1/zless.1* +%{_mandir}/man1/zmore.1* +%{_mandir}/man1/znew.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/gzip/manpage-no-date.patch b/SPECS/gzip/manpage-no-date.patch new file mode 100644 index 00000000..b64ccee4 --- /dev/null +++ b/SPECS/gzip/manpage-no-date.patch @@ -0,0 +1,21 @@ +Index: gzip-1.14/doc/gzip.texi +=================================================================== +--- gzip-1.14.orig/doc/gzip.texi ++++ gzip-1.14/doc/gzip.texi +@@ -9,7 +9,7 @@ + @c %**end of header + @copying + This manual is for GNU Gzip +-(version @value{VERSION}, @value{UPDATED}), ++(version @value{VERSION}), + and documents commands for compressing and decompressing data. + + Copyright @copyright{} 1998--1999, 2001--2002, 2006--2007, 2009--2025 Free +@@ -47,7 +47,6 @@ Free Documentation License''. + @title GNU gzip + @subtitle The data compression program + @subtitle for Gzip version @value{VERSION} +-@subtitle @value{UPDATED} + @author by Jean-loup Gailly + + @page diff --git a/SPECS/harfbuzz/harfbuzz.spec b/SPECS/harfbuzz/harfbuzz.spec new file mode 100644 index 00000000..c4d8454f --- /dev/null +++ b/SPECS/harfbuzz/harfbuzz.spec @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Change these to 1 once we have them +%bcond gtk_doc 0 + +Name: harfbuzz +Version: 12.1.0 +Release: %autorelease +Summary: Text shaping library +License: MIT-Modern-Variant +URL: https://github.com/harfbuzz/harfbuzz/ +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/harfbuzz-%{version}.tar.xz +BuildSystem: meson + +BuildOption(conf): -Dgraphite2=enabled +BuildOption(conf): -Dchafa=disabled +%if %{without gtk_doc} +BuildOption(conf): -Ddocs=disabled +%endif + +BuildRequires: make +BuildRequires: meson +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(graphite2) +%if %{with gtk_doc} +BuildRequires: gtk-doc +%endif + +%description +HarfBuzz is an implementation of the OpenType Layout engine. + +%package devel +Summary: Development files for %{name} +Requires: %{name} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%files +%license COPYING +%doc NEWS AUTHORS README.md +%{_libdir}/libharfbuzz.so.0* +%{_libdir}/libharfbuzz-gobject.so.0* +%{_libdir}/libharfbuzz-subset.so.0* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/HarfBuzz-0.0.typelib +%{_libdir}/libharfbuzz-icu.so.* +%{_libdir}/libharfbuzz-cairo.so.* + +%files devel +%if %{with gtk_doc} +%doc %{_datadir}/gtk-doc +%endif +%{_bindir}/hb-info +%{_bindir}/hb-view +%{_bindir}/hb-shape +%{_bindir}/hb-subset +%{_includedir}/harfbuzz/ +%{_libdir}/libharfbuzz.so +%{_libdir}/libharfbuzz-gobject.so +%{_libdir}/libharfbuzz-cairo.so +%{_libdir}/libharfbuzz-icu.so +%{_libdir}/libharfbuzz-subset.so +%{_libdir}/pkgconfig/harfbuzz.pc +%{_libdir}/pkgconfig/harfbuzz-cairo.pc +%{_libdir}/pkgconfig/harfbuzz-gobject.pc +%{_libdir}/pkgconfig/harfbuzz-icu.pc +%{_libdir}/pkgconfig/harfbuzz-subset.pc +%{_libdir}/cmake/harfbuzz/ +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/HarfBuzz-0.0.gir + +%changelog +%{?autochangelog} diff --git a/SPECS/hdparm/hdparm.spec b/SPECS/hdparm/hdparm.spec new file mode 100644 index 00000000..9a97e347 --- /dev/null +++ b/SPECS/hdparm/hdparm.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: hdparm +Version: 9.65 +Release: %autorelease +Summary: A utility for displaying and/or setting hard disk parameters +License: LicenseRef-BSD AND GPL-3.0-or-later +URL: https://sourceforge.net/projects/%{name}/ +#!RemoteAsset +Source: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(install): sbindir=%{_sbindir} + +BuildRequires: make + +%description +Hdparm is a useful system utility for setting (E)IDE hard drive +parameters. For example, hdparm can be used to tweak hard drive +performance and to spin down hard drives for power conservation. + +%conf +# No configure + +# No test suite +%check + +%install -p +mkdir -p "%{buildroot}%{_mandir}/man8" + +%files +%doc hdparm.lsm Changelog README.acoustic TODO +%license LICENSE.TXT +%{_sbindir}/hdparm +%{_mandir}/man8/hdparm.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/help2man/help2man.spec b/SPECS/help2man/help2man.spec new file mode 100644 index 00000000..3f5b1df2 --- /dev/null +++ b/SPECS/help2man/help2man.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: help2man +Version: 1.49.3 +Release: %autorelease +Summary: Script for generating man pages from --help output +License: GPL-3.0-or-later +Group: Development/Tools/Doc Generators +URL: https://www.gnu.org/software/help2man/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/help2man/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/help2man/%{name}-%{version}.tar.xz.sig +BuildRequires: perl-gettext +BuildRequires: perl +Requires: perl-gettext +Requires: perl +BuildSystem: autotools +BuildOption(conf): --enable-nls + +%description +help2man is a script to create simple man pages from the --help and +--version output of programs. + +Since most GNU documentation is now in info format, this provides a way +to generate a placeholder man page pointing to that resource while +still providing some useful information. + +%install -a +%find_lang %{name} --with-man --generate-subpackages + +# no `check' target +%check + +%files +%license COPYING +%doc NEWS README THANKS debian/changelog +%{_bindir}/help2man +%{_libdir}/help2man/ +%{_infodir}/help2man.info%{?ext_info} +%{_mandir}/man1/help2man.1%{?ext_man} +%license COPYING +%{_infodir}/help2man-*.info%{?ext_info} +%dir %{_mandir}/?? +%dir %{_mandir}/??/man1 + +%changelog +%{?autochangelog} diff --git a/SPECS/hostname/hostname.spec b/SPECS/hostname/hostname.spec new file mode 100644 index 00000000..e4629391 --- /dev/null +++ b/SPECS/hostname/hostname.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: hostname +Version: 3.25 +Release: %autorelease +Summary: Utility to Set/Show the Host Name or Domain Name +License: GPL-2.0-or-later +URL: https://tracker.debian.org/pkg/hostname +#!RemoteAsset +Source0: http://http.debian.net/debian/pool/main/h/%{name}/%{name}_%{version}.tar.xz#/%{name}-%{version}.tar.xz +Source1: nis-domainname +Source2: nis-domainname.service.in +BuildSystem: autotools + +BuildOption(build): CFLAGS="%{optflags} -D_GNU_SOURCE" + +BuildOption(install): prefix=%{_prefix} +BuildOption(install): exec_prefix=%{_exec_prefix} +BuildOption(install): bindir=%{_bindir} +BuildOption(install): mandir=%{_mandir} + +BuildRequires: gcc +BuildRequires: systemd-rpm-macros + +%description +This package provides commands which can be used to display the system's DNS +name, and to display or set its hostname or NIS domain name. + +# No configure +%conf + +%install -a +sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" %{SOURCE2} > nis-domainname.service +install -m 0755 -d %{buildroot}%{_libexecdir}/%{name} +install -m 0755 -d %{buildroot}%{_unitdir} +install -p -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/%{name}/nis-domainname +install -p -m 0644 nis-domainname.service %{buildroot}%{_unitdir} + +%post +%systemd_post nis-domainname.service + +%preun +%systemd_preun nis-domainname.service + +%files +%license COPYRIGHT +%doc debian/changelog +%{_bindir}/%{name} +%{_bindir}/domainname +%{_bindir}/dnsdomainname +%{_bindir}/nisdomainname +%{_bindir}/ypdomainname +%{_mandir}/man1/%{name}.1%{?ext_man} +%{_mandir}/man1/domainname.1%{?ext_man} +%{_mandir}/man1/dnsdomainname.1%{?ext_man} +%{_mandir}/man1/nisdomainname.1%{?ext_man} +%{_mandir}/man1/ypdomainname.1%{?ext_man} +%{_unitdir}/nis-domainname.service +%{_libexecdir}/%{name}/ + +%changelog +%{?autochangelog} diff --git a/SPECS/hostname/nis-domainname b/SPECS/hostname/nis-domainname new file mode 100644 index 00000000..af6194ca --- /dev/null +++ b/SPECS/hostname/nis-domainname @@ -0,0 +1,10 @@ +#!/bin/bash + +source /etc/sysconfig/network/config + +if [ -n "${NETCONFIG_NIS_STATIC_DOMAIN}" ] && [ "${NETCONFIG_NIS_SETDOMAINNAME}" = "yes" ] && [ -x /usr/bin/nisdomainname ]; then + nisdomainname ${NETCONFIG_NIS_STATIC_DOMAIN} + exit $? +fi + +exit 0 diff --git a/SPECS/hostname/nis-domainname.service.in b/SPECS/hostname/nis-domainname.service.in new file mode 100644 index 00000000..46c5a143 --- /dev/null +++ b/SPECS/hostname/nis-domainname.service.in @@ -0,0 +1,14 @@ +[Unit] +Description=Read and set NIS domainname from /etc/sysconfig/network/config +Before=ypbind.service yppasswdd.service ypserv.service ypxfrd.service sysinit.target +DefaultDependencies=no +Conflicts=shutdown.target +ConditionPathExists=/etc/sysconfig/network/config + +[Service] +ExecStart=@LIBEXECDIR@/hostname/nis-domainname +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target diff --git a/SPECS/htop/htop.spec b/SPECS/htop/htop.spec new file mode 100644 index 00000000..8501b62c --- /dev/null +++ b/SPECS/htop/htop.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: htop +Version: 3.4.1 +Release: %autorelease +Summary: An interactive process viewer +License: GPL-2.0-or-later +URL: https://htop.dev +#!RemoteAsset +Source0: https://github.com/htop-dev/htop/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildRequires: ncurses-devel autoconf automake gcc + +%description +htop is a cross-platform interactive process viewer. It allows scrolling the +list of processes, and provides an overview of system resource consumption. +Tasks related to processes (e.g. killing and renicing) can be done without +entering their PIDs. + +%conf -p +./autogen.sh + +%files +%license COPYING +%{_bindir}/htop +%{_datadir}/applications/htop.desktop +%{_datadir}/icons/hicolor/scalable/apps/htop.svg +%{_datadir}/pixmaps/htop.png +%{_mandir}/man1/htop.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/hwdata/hwdata.spec b/SPECS/hwdata/hwdata.spec new file mode 100644 index 00000000..083bb2a9 --- /dev/null +++ b/SPECS/hwdata/hwdata.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: jchzhou +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: hwdata +Version: 0.398 +Release: %autorelease +Summary: Hardware identification and configuration data +License: GPL-2.0-or-later +URL: https://github.com/vcrhonek/hwdata +#!RemoteAsset +Source0: https://github.com/vcrhonek/hwdata/archive/v%{version}.tar.gz +BuildArch: noarch +BuildSystem: autotools +BuildOption(install): libdir=%{_libdir} + +BuildRequires: make + +%description +hwdata contains various hardware identification and configuration data, +such as the pci.ids and usb.ids databases. + +%files +%license COPYING +%doc LICENSE +%dir %{_datadir}/%{name} +%{_prefix}/lib/modprobe.d/dist-blacklist.conf +%{_datadir}/%{name}/* +%{_datadir}/pkgconfig/hwdata.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/i2c-tools/0001-i2ctransfer-Don-t-link-with-libi2c.patch b/SPECS/i2c-tools/0001-i2ctransfer-Don-t-link-with-libi2c.patch new file mode 100644 index 00000000..9cfd1737 --- /dev/null +++ b/SPECS/i2c-tools/0001-i2ctransfer-Don-t-link-with-libi2c.patch @@ -0,0 +1,33 @@ +From a22fda5ed0c84c669443794a1e02225907eb7cae Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 13 May 2025 13:35:51 +0200 +Subject: [PATCH] i2ctransfer: Don't link with libi2c + +i2ctransfer doesn't make use of any function from libi2c so it should +not link with that library. + +Fixes: 9fc53a7fc669 ("i2c-tools: add new tool 'i2ctransfer'") +Signed-off-by: Jean Delvare +Signed-off-by: Wolfram Sang +--- + tools/Module.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/Module.mk b/tools/Module.mk +index f5b133d..844e629 100644 +--- a/tools/Module.mk ++++ b/tools/Module.mk +@@ -36,8 +36,8 @@ $(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR) + $(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS) + $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) + +-$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS) +- $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) ++$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o ++ $(CC) $(LDFLAGS) -o $@ $^ + + # + # Objects +-- +2.34.1 + diff --git a/SPECS/i2c-tools/0002-i2ctransfer-Don-t-free-memory-which-was-never-alloca.patch b/SPECS/i2c-tools/0002-i2ctransfer-Don-t-free-memory-which-was-never-alloca.patch new file mode 100644 index 00000000..f48472ab --- /dev/null +++ b/SPECS/i2c-tools/0002-i2ctransfer-Don-t-free-memory-which-was-never-alloca.patch @@ -0,0 +1,46 @@ +From 4102d1e66e7d01414e2c6fcbe3918ef6727dc755 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 13 May 2025 17:21:19 +0200 +Subject: [PATCH] i2ctransfer: Don't free memory which was never allocated + +If an error occurs while msgs[] is been prepared for the transfer, +we jump to the clean-up path. How many buffers need to be freed +depends on the state. If we were parsing data, we should free up to +nmsgs. However, if we were parsing descriptors, we should free +up to nmsgs - 1 only. The code was unconditionally freeing up to +nmsgs, potentially freeing a non-allocated buffer. + +In most cases, it was not a problem, we would simply call free() on a +NULL pointer and that's a no-op. However, if msgs[] was full then we +would access memory beyond its end and call free() on a random +pointer. + +Fixes: 9fc53a7fc669 ("i2c-tools: add new tool 'i2ctransfer'") +Signed-off-by: Jean Delvare +Signed-off-by: Wolfram Sang +--- + tools/i2ctransfer.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/tools/i2ctransfer.c b/tools/i2ctransfer.c +index f204af4..a0c3d0f 100644 +--- a/tools/i2ctransfer.c ++++ b/tools/i2ctransfer.c +@@ -364,7 +364,13 @@ int main(int argc, char *argv[]) + err_out: + close(file); + +- for (i = 0; i <= nmsgs; i++) ++ /* ++ * If we were parsing data, the buffer for the last message was ++ * already allocated and nmsgs still points to it. ++ */ ++ if (state == PARSE_GET_DATA) ++ free(msgs[nmsgs].buf); ++ for (i = 0; i < nmsgs; i++) + free(msgs[i].buf); + + exit(1); +-- +2.34.1 + diff --git a/SPECS/i2c-tools/0003-i2ctransfer-Prevent-msgs-overflow-with-many-paramete.patch b/SPECS/i2c-tools/0003-i2ctransfer-Prevent-msgs-overflow-with-many-paramete.patch new file mode 100644 index 00000000..146718be --- /dev/null +++ b/SPECS/i2c-tools/0003-i2ctransfer-Prevent-msgs-overflow-with-many-paramete.patch @@ -0,0 +1,37 @@ +From 93fedbd9da2289674b51a3c982ea5cd3fd3f213c Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 13 May 2025 17:23:30 +0200 +Subject: [PATCH] i2ctransfer: Prevent msgs[] overflow with many parameters + +There's an off-by-one bug in the message count check to ensure that we +do not process more messages than the kernel allows. nmsgs points to +the index within msgs[] which would be used for the _next_ message. If +this index is equal the maximum number of messages then we must stop +already. + +This closes bug #220112: +https://bugzilla.kernel.org/show_bug.cgi?id=220112 + +Fixes: 9fc53a7fc669 ("i2c-tools: add new tool 'i2ctransfer'") +Signed-off-by: Jean Delvare +Signed-off-by: Wolfram Sang +--- + tools/i2ctransfer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/i2ctransfer.c b/tools/i2ctransfer.c +index a0c3d0f..8d40b49 100644 +--- a/tools/i2ctransfer.c ++++ b/tools/i2ctransfer.c +@@ -193,7 +193,7 @@ int main(int argc, char *argv[]) + __u8 data, *buf; + char *end; + +- if (nmsgs > I2C_RDRW_IOCTL_MAX_MSGS) { ++ if (nmsgs == I2C_RDRW_IOCTL_MAX_MSGS) { + fprintf(stderr, "Error: Too many messages (max: %d)\n", + I2C_RDRW_IOCTL_MAX_MSGS); + goto err_out; +-- +2.34.1 + diff --git a/SPECS/i2c-tools/0004-i2ctransfer-Zero-out-memory-passed-to-ioctl.patch b/SPECS/i2c-tools/0004-i2ctransfer-Zero-out-memory-passed-to-ioctl.patch new file mode 100644 index 00000000..6c45a419 --- /dev/null +++ b/SPECS/i2c-tools/0004-i2ctransfer-Zero-out-memory-passed-to-ioctl.patch @@ -0,0 +1,55 @@ +From ea51da725b743da00b894dfdc4ab189f5a51e90e Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 13 May 2025 17:35:39 +0200 +Subject: [PATCH] i2ctransfer: Zero out memory passed to ioctl() + +Valgrind complains that uninitialized memory may be passed to +ioctl(): + +== Syscall param ioctl(I2C_RDWR) points to uninitialised byte(s) +== at 0x499382B: ioctl (in /lib64/libc.so.6) +== by 0x401957: main (i2ctransfer.c:343) +== Address 0x1ffefff94c is on thread 1's stack +== in frame #1, created by main (i2ctransfer.c:144) +== +== Syscall param ioctl(I2C_RDWR).msgs points to uninitialised byte(s) +== at 0x499382B: ioctl (in /lib64/libc.so.6) +== by 0x401957: main (i2ctransfer.c:343) +== Address 0x1ffefff956 is on thread 1's stack +== in frame #1, created by main (i2ctransfer.c:144) + +Zero out the i2c_rdwr_ioctl_data struct as well as the msgs array to +guarantee that no uninitialized memory will ever be passed to the +kernel. + +Signed-off-by: Jean Delvare +Signed-off-by: Wolfram Sang +--- + tools/i2ctransfer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/i2ctransfer.c b/tools/i2ctransfer.c +index 8d40b49..4db98e3 100644 +--- a/tools/i2ctransfer.c ++++ b/tools/i2ctransfer.c +@@ -149,8 +149,7 @@ int main(int argc, char *argv[]) + enum parse_state state = PARSE_GET_DESC; + unsigned int buf_idx = 0; + +- for (i = 0; i < I2C_RDRW_IOCTL_MAX_MSGS; i++) +- msgs[i].buf = NULL; ++ memset(msgs, 0, sizeof(msgs)); + + /* handle (optional) flags first */ + while ((opt = getopt(argc, argv, "abfhvVy")) != -1) { +@@ -334,6 +333,7 @@ int main(int argc, char *argv[]) + struct i2c_rdwr_ioctl_data rdwr; + unsigned int print_flags = PRINT_READ_BUF; + ++ memset(&rdwr, 0, sizeof(rdwr)); + rdwr.msgs = msgs; + rdwr.nmsgs = nmsgs; + nmsgs_sent = ioctl(file, I2C_RDWR, &rdwr); +-- +2.34.1 + diff --git a/SPECS/i2c-tools/i2c-tools.spec b/SPECS/i2c-tools/i2c-tools.spec new file mode 100644 index 00000000..a59b4185 --- /dev/null +++ b/SPECS/i2c-tools/i2c-tools.spec @@ -0,0 +1,164 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: i2c-tools +Version: 4.4 +Release: %autorelease +Summary: A heterogeneous set of I2C tools for Linux +License: GPL-2.0-or-later +URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools +#!RemoteAsset +Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.sign + +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +Requires: systemd-udev +Requires: kmod +Requires: libi2c%{?_isa} = %{version}-%{release} + +BuildSystem: autotools +BuildOption(build): CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" +BuildOption(build): BUILD_STATIC_LIB=0 EXTRA=eeprog + +BuildOption(install): DESTDIR=%{buildroot} PREFIX=%{_prefix} BUILD_STATIC_LIB=0 +BuildOption(install): EXTRA=eeprog libdir=%{_libdir} bindir=%{_bindir} +BuildOption(install): sbindir=%{_sbindir} + +%patchlist +0001-i2ctransfer-Don-t-link-with-libi2c.patch +0002-i2ctransfer-Don-t-free-memory-which-was-never-alloca.patch +0003-i2ctransfer-Prevent-msgs-overflow-with-many-paramete.patch +0004-i2ctransfer-Zero-out-memory-passed-to-ioctl.patch + +%description +This package contains a heterogeneous set of I2C tools for Linux: a bus +probing tool, a chip dumper, register-level access helpers, EEPROM +decoding scripts, and more. + +%package -n python3-i2c-tools +Summary: Python 3 bindings for Linux SMBus access through i2c-dev +License: GPL-2.0-only +%{?python_provide:%python_provide python3-i2c-tools} +Requires: libi2c%{?_isa} = %{version}-%{release} + +%description -n python3-i2c-tools +Python 3 bindings for Linux SMBus access through i2c-dev. + +%package perl +Summary: i2c tools written in Perl +License: GPL-2.0-or-later +Requires: libi2c%{?_isa} = %{version}-%{release} + +%description perl +A collection of tools written in perl for use with i2c devices. + +%package -n libi2c +Summary: I2C/SMBus bus access library +License: LGPL-2.1-or-later + +%description -n libi2c +libi2c offers a way for applications to interact with the devices +connected to the I2C or SMBus buses of the system. + +%package -n libi2c-devel +Summary: Development files for the I2C library +License: LGPL-2.1-or-later +Requires: libi2c%{?_isa} = %{version}-%{release} + +%description -n libi2c-devel +%{summary}. + +# No configure script. +%conf + +%build -a +pushd py-smbus +CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \ + %{__python3} setup.py build -b build-py3 +popd + + +%install -a +pushd py-smbus +%{__python3} setup.py build -b build-py3 install --skip-build --root=%{buildroot} +popd + +# cleanup +rm -f %{buildroot}%{_bindir}/decode-edid.pl +# Remove unpleasant DDC tools. KMS already exposes the EDID block in sysfs, +# and edid-decode is a more complete tool than decode-edid. +rm -f %{buildroot}%{_bindir}/{ddcmon,decode-edid} + +# for i2c-dev ondemand loading through kmod +mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d +echo "alias char-major-89-* i2c-dev" > \ + %{buildroot}%{_sysconfdir}/modprobe.d/i2c-dev.conf +# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading) +mkdir -p %{buildroot}%{_sysconfdir}/udev/makedev.d +for (( i = 0 ; i < 8 ; i++ )) do + echo "i2c-$i" >> %{buildroot}%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes +done + +# auto-load i2c-dev after reboot +mkdir -p %{buildroot}%{_prefix}/lib/modules-load.d +echo 'i2c-dev' > %{buildroot}%{_prefix}/lib/modules-load.d/%{name}.conf + +# no tests. +%check + +#Install and uninstall scripts +%post +# load i2c-dev after the first install +if [ "$1" = 1 ] ; then + /usr/sbin/modprobe i2c-dev +fi +exit 0 + +%ldconfig_scriptlets -n libi2c + +%files +%license COPYING +%doc CHANGES README eeprog/README.eeprog +%config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev.conf +%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes +%{_prefix}/lib/modules-load.d/%{name}.conf +%{_sbindir}/i2c* +%{_sbindir}/eeprog +%exclude %{_sbindir}/i2c-stub* +%{_mandir}/man8/i2c*.8.* +%{_mandir}/man8/eeprog.8.* + +%files -n python3-i2c-tools +%doc py-smbus/README +%{python3_sitearch}/* + +%files perl +%doc eeprom/README +%{_bindir}/decode-* +%{_sbindir}/i2c-stub* +%{_mandir}/man1/decode-*.1.* +%{_mandir}/man8/i2c-stub-from-dump.8.* + +%files -n libi2c +%license COPYING.LGPL +%{_libdir}/libi2c.so.0* + +%files -n libi2c-devel +%dir %{_includedir}/i2c +%{_includedir}/i2c/smbus.h +%{_libdir}/libi2c.so +%{_mandir}/man3/libi2c.3.* + +%changelog +%{?autochangelog} diff --git a/SPECS/icu4c/0001-icu-fix-install-mode-files.patch b/SPECS/icu4c/0001-icu-fix-install-mode-files.patch new file mode 100644 index 00000000..396f0591 --- /dev/null +++ b/SPECS/icu4c/0001-icu-fix-install-mode-files.patch @@ -0,0 +1,53 @@ +From: Jan Engelhardt +Date: 2013-06-28 12:54:31.002040372 +0200 + +build: fix abort of install procedure with packaging=files + +When ./configure --with-data-packaging=files, make install aborts +because the previous developer did not test it with a normal +user account/DESTDIR install. + + make[1]: Entering directory `/home/abuild/rpmbuild/BUILD/icu/source/data' + LD_LIBRARY_PATH=../stubdata:../tools/ctestfw:../lib:$LD_LIBRARY_PATH ../bin/pkgdata -O ../data/icupkg.inc -q -c -s /home/abuild/rpmbuild/BUILD/icu/source/data/out/build/icudt51l -d ./out -e icudt51 -T ./out/tmp -p icudt51l -m files -r 51.2 ./out/tmp/icudata.lst + /bin/sh ../mkinstalldirs /home/abuild/rpmbuild/BUILDROOT/icu-51.2-0.x86_64/usr/share/icu/51.2 + mkdir /home/abuild/rpmbuild/BUILDROOT/icu-51.2-0.x86_64/usr/share/icu + mkdir /home/abuild/rpmbuild/BUILDROOT/icu-51.2-0.x86_64/usr/share/icu/51.2 + /bin/sh ../mkinstalldirs /usr/share/icu/51.2/icudt51l + mkdir /usr/share/icu + mkdir: cannot create directory '/usr/share/icu': Permission denied + +--- + source/data/Makefile.in | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +Index: icu/source/data/Makefile.in +=================================================================== +--- icu.orig/source/data/Makefile.in ++++ icu/source/data/Makefile.in +@@ -169,16 +169,16 @@ endif + install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata + $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR) + ifeq ($(PKGDATA_MODE),files) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(UNIT_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE) +- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(UNIT_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE) ++ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE) + endif + ifneq ($(ENABLE_STATIC),) + ifeq ($(PKGDATA_MODE),dll) diff --git a/SPECS/icu4c/0002-icu-error-reporting.patch b/SPECS/icu4c/0002-icu-error-reporting.patch new file mode 100644 index 00000000..e270a3e0 --- /dev/null +++ b/SPECS/icu4c/0002-icu-error-reporting.patch @@ -0,0 +1,64 @@ +Date: 2014-08-13 15:39:48.523887951 +0200 +From: Jan Engelhardt + +Error messages are totally useless without the actual error cause! +--- + source/tools/toolutil/package.cpp | 5 +++-- + source/tools/toolutil/writesrc.cpp | 6 ++++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +Index: icu/source/tools/toolutil/package.cpp +=================================================================== +--- icu.orig/source/tools/toolutil/package.cpp ++++ icu/source/tools/toolutil/package.cpp +@@ -35,6 +35,7 @@ + #include "package.h" + #include "cmemory.h" + ++#include + #include + #include + #include +@@ -748,7 +749,7 @@ Package::writePackage(const char *filena + // create the file and write its contents + file=fopen(filename, "wb"); + if(file==nullptr) { +- fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename); ++ fprintf(stderr, "icupkg: unable to create file \"%s\": %s\n", filename, strerror(errno)); + exit(U_FILE_ACCESS_ERROR); + } + +@@ -1169,7 +1170,7 @@ Package::extractItem(const char *filesPa + makeFullFilenameAndDirs(filesPath, outName, filename, static_cast(sizeof(filename))); + file=fopen(filename, "wb"); + if(file==nullptr) { +- fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename); ++ fprintf(stderr, "icupkg: unable to create file \"%s\": %s\n", filename, strerror(errno)); + exit(U_FILE_ACCESS_ERROR); + } + fileLength = static_cast(fwrite(pItem->data, 1, pItem->length, file)); +Index: icu/source/tools/toolutil/writesrc.cpp +=================================================================== +--- icu.orig/source/tools/toolutil/writesrc.cpp ++++ icu/source/tools/toolutil/writesrc.cpp +@@ -18,7 +18,9 @@ + * Helper functions for writing source code for data. + */ + ++#include + #include ++#include + #include + + // The C99 standard suggested that C++ implementations not define PRId64 etc. constants +@@ -75,8 +77,8 @@ usrc_createWithoutHeader(const char *pat + if (f==nullptr) { + fprintf( + stderr, +- "usrc_create(%s, %s): unable to create file\n", +- path!=nullptr ? path : "", filename); ++ "usrc_create(%s, %s): unable to create file: %s\n", ++ path!=nullptr ? path : "", filename, strerror(errno)); + } + return f; + } diff --git a/SPECS/icu4c/0003-icu-avoid-x87-excess-precision.patch b/SPECS/icu4c/0003-icu-avoid-x87-excess-precision.patch new file mode 100644 index 00000000..0043596c --- /dev/null +++ b/SPECS/icu4c/0003-icu-avoid-x87-excess-precision.patch @@ -0,0 +1,33 @@ +From: rguenther@suse.com +References: http://bugzilla.opensuse.org/1030253 + +Avoid FixedPrecision::initVisibleDigits failure on i586 with GCC 7. + +--- + source/test/intltest/dcfmapts.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Index: icu/source/test/intltest/dcfmapts.cpp +=================================================================== +--- icu.orig/source/test/intltest/dcfmapts.cpp ++++ icu/source/test/intltest/dcfmapts.cpp +@@ -875,7 +875,8 @@ void IntlTestDecimalFormatAPI::TestFixed + ASSERT_EQUAL(22, fd.getPluralOperand(PLURAL_OPERAND_V)); + ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_F)); + ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_T)); +- ASSERT_EQUAL(345678901234567890LL, fd.getPluralOperand(PLURAL_OPERAND_I)); ++ volatile double xxa = fd.getPluralOperand(PLURAL_OPERAND_I); ++ ASSERT_EQUAL(345678901234567890LL, xxa); + ASSERT_EQUAL(false, fd.hasIntegerValue()); + ASSERT_EQUAL(false, fd.isNegative()); + +@@ -970,7 +971,8 @@ void IntlTestDecimalFormatAPI::TestFixed + ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T)); + // note: going through DigitList path to FixedDecimal, which is trimming + // int64_t fields to 18 digits. See ticket Ticket #10374 +- ASSERT_EQUAL(223372036854775807LL, fd.getPluralOperand(PLURAL_OPERAND_I)); ++ volatile double xxb = fd.getPluralOperand(PLURAL_OPERAND_I); ++ ASSERT_EQUAL(223372036854775807LL, xxb); + ASSERT_EQUAL(true, fd.hasIntegerValue()); + ASSERT_EQUAL(false, fd.isNegative()); + diff --git a/SPECS/icu4c/0004-locale.patch b/SPECS/icu4c/0004-locale.patch new file mode 100644 index 00000000..80a12c7e --- /dev/null +++ b/SPECS/icu4c/0004-locale.patch @@ -0,0 +1,20 @@ +Execute POSIX behavior not just on Solaris but all POSIX platforms. + +References: https://bugzilla.opensuse.org/1162882 +--- + source/common/putil.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: icu/source/common/putil.cpp +=================================================================== +--- icu.orig/source/common/putil.cpp ++++ icu/source/common/putil.cpp +@@ -1616,7 +1616,7 @@ static const char *uprv_getPOSIXIDForCat + /* Solaris speaks POSIX - See IEEE Std 1003.1-2008 + * This is needed to properly handle empty env. variables + */ +-#if U_PLATFORM == U_PF_SOLARIS ++#if U_PLATFORM_IMPLEMENTS_POSIX + if ((posixID == 0) || (posixID[0] == '\0')) { + posixID = getenv(category == LC_MESSAGES ? "LC_MESSAGES" : "LC_CTYPE"); + if ((posixID == 0) || (posixID[0] == '\0')) { diff --git a/SPECS/icu4c/0005-nan-undefined-conversion.patch b/SPECS/icu4c/0005-nan-undefined-conversion.patch new file mode 100644 index 00000000..d4d81c47 --- /dev/null +++ b/SPECS/icu4c/0005-nan-undefined-conversion.patch @@ -0,0 +1,22 @@ +From 29f1188d191a7a75ac7ffa4bfa390f625da39c53 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Tue, 11 May 2021 19:04:24 +0200 +Subject: [PATCH] ICU-21613 Fix undefined behaviour in + ComplexUnitsConverter::applyRounder + +Index: icu/source/i18n/units_complexconverter.cpp +=================================================================== +--- icu.orig/source/i18n/units_complexconverter.cpp ++++ icu/source/i18n/units_complexconverter.cpp +@@ -242,6 +242,11 @@ void ComplexUnitsConverter::applyRounder + } + quantity = decimalQuantity.toDouble(); + ++ if (uprv_isNaN(quantity) || uprv_isInfinite(quantity)) { ++ // Do nothing for non-finite values, since conversion to int64_t is undefined ++ return; ++ } ++ + int32_t lastIndex = unitsConverters_.length() - 1; + if (lastIndex == 0) { + // Only one element, no need to bubble up the carry diff --git a/SPECS/icu4c/icu4c.spec b/SPECS/icu4c/icu4c.spec new file mode 100644 index 00000000..42676e4f --- /dev/null +++ b/SPECS/icu4c/icu4c.spec @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: icu4c +Version: 77.1 +Release: %autorelease +Summary: International Components for Unicode +License: Unicode-3.0 +URL: https://icu.unicode.org/ +#!RemoteAsset +Source0: https://github.com/unicode-org/icu/releases/download/release-77-1/%{name}-77_1-src.tgz +#!RemoteAsset +Source1: https://github.com/unicode-org/icu/releases/download/release-77-1/%{name}-77_1-docs.zip +BuildSystem: autotools +Patch0: 0001-icu-fix-install-mode-files.patch +Patch1: 0002-icu-error-reporting.patch +Patch2: 0003-icu-avoid-x87-excess-precision.patch +Patch3: 0004-locale.patch +Patch4: 0005-nan-undefined-conversion.patch + +BuildOption(conf): --disable-static +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-samples +BuildOption(conf): --with-data-packaging=archive + +BuildOption(build): -C source +BuildOption(install): -C source + +BuildRequires: gcc-c++ +BuildRequires: pkg-config +BuildRequires: python3 +BuildRequires: unzip +Provides: bundled(tzdata) = 2024b +Provides: icu +Requires: tzdata + +%description +ICU is a set of C and C++ libraries that provide extensive Unicode and locale +support. This package contains the runtime libraries, data files, and command-line +tools for ICU. + +%package devel +Summary: Development files for the ICU library +Requires: %{name} = %{version} + +%description devel +This package contains the headers, symbolic links, and other files needed to +develop applications that use the ICU libraries. + +%prep -a +mkdir html +cd html +unzip %SOURCE1 + +%conf +cd source +mkdir -p data/out/tmp +export CXXFLAGS="%{optflags} -DICU_DATA_DIR='\"%{_datadir}/icu/%{version}\"' -fexcess-precision=fast" +export CFLAGS="$CXXFLAGS" +%configure + +%build -a +cd source/data/ +%ifarch %armb hppa mips mips64 ppc ppc64 %sparc s390 s390x m68k + cp in/icudt77l.dat out/ +%else + LD_LIBRARY_PATH="../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH" \ + ../bin/icupkg -tb in/icudt77l.dat out/icudt77b.dat +%endif + + +%install -a +install -d -m 755 %{buildroot}%{_datadir}/icu/%{version} +install -m 644 source/data/out/icudt*.dat %{buildroot}%{_datadir}/icu/%{version}/ +install -d -m 755 %{buildroot}%{_docdir}/%{name} +cp -a html/* %{buildroot}%{_docdir}/%{name}/ +cp -a license.html readme.html %{buildroot}%{_docdir}/%{name}/ +find %{buildroot} -type f -name "*.la" -delete +chmod a+rx %{buildroot}%{_libdir}/lib*.so.* +rm -f %{buildroot}%{_libdir}/icu/%{version}/{Makefile.inc,pkgdata.inc} + +%ldconfig_scriptlets + +%files +%license license.html +%doc readme.html +%_bindir/* +%_sbindir/* +%_mandir/man*/* +%dir %_datadir/icu +%dir %_datadir/icu/%{version} +%_datadir/icu/%{version}/* +%_libdir/libicu*.so.* + +%files devel +%_libdir/libicu*.so +%_includedir/unicode/ +%dir %_libdir/icu/ +%dir %_libdir/icu/%{version}/ +%_libdir/pkgconfig/icu-*.pc +%_bindir/icu-config +%dir %_datadir/icu/ +%dir %_datadir/icu/%{version}/ +%_datadir/icu/%{version}/config/ +%doc %{_docdir}/%{name}/ +%{_libdir}/icu/Makefile.inc +%{_libdir}/icu/pkgdata.inc +%{_libdir}/icu/current + +%changelog +%{?autochangelog} + diff --git a/SPECS/ima-evm-utils/ima-evm-utils.spec b/SPECS/ima-evm-utils/ima-evm-utils.spec new file mode 100644 index 00000000..ad7af808 --- /dev/null +++ b/SPECS/ima-evm-utils/ima-evm-utils.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ima-evm-utils +Version: 1.6.2 +Release: %autorelease +Summary: IMA/EVM support utilities +License: GPL-2.0-or-later +URL: https://github.com/linux-integrity/ima-evm-utils +VCS: git:https://github.com/linux-integrity/ima-evm-utils +#!RemoteAsset +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: libxslt +BuildRequires: make +BuildRequires: tpm2-tss-devel +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(libkeyutils) + +# for tests. +BuildRequires: xxd +BuildRequires: e2fsprogs + +%description +The Trusted Computing Group(TCG) run-time Integrity Measurement Architecture +(IMA) maintains a list of hash values of executables and other sensitive +system files, as they are read or executed. These are stored in the file +systems extended attributes. The Extended Verification Module (EVM) prevents +unauthorized changes to these extended attributes on the file system. +ima-evm-utils is used to prepare the file system for these extended attributes. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +This package provides the header files for %{name} + +%conf -p +autoreconf -fiv + +%install -a +rm -rf %{buildroot}%{_datadir}/doc +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license LICENSES.txt COPYING +%doc NEWS README AUTHORS +%{_bindir}/evmctl +%{_libdir}/libimaevm.so.* + +%files devel +%{_includedir}/imaevm.h +%{_libdir}/libimaevm.so + +%changelog +%{?autochangelog} diff --git a/SPECS/inih/inih.spec b/SPECS/inih/inih.spec new file mode 100644 index 00000000..6f00838f --- /dev/null +++ b/SPECS/inih/inih.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: inih +Version: 61 +Release: %autorelease +Summary: Simple INI file parser library +License: BSD-3-Clause +URL: https://github.com/benhoyt/inih +#!RemoteAsset +Source0: https://github.com/benhoyt/inih/archive/refs/tags/r%{version}.tar.gz#/%{name}-r%{version}.tar.gz + +BuildSystem: meson +BuildOption: -Ddefault_library=shared +BuildOption: -Ddistro_install=true + +BuildRequires: gcc +BuildRequires: meson + +%description +The inih package provides a simple INI file parser which is only a couple +of pages of code. It was designed to be small and simple, so it's good for +embedded systems. This package contains the runtime shared libraries. + +%package devel +Summary: Development files for the inih library +Requires: %{name} = %{version} + +%description devel +This package contains header files, pkg-config files, and development +symlinks for the inih library. + + +%ldconfig_scriptlets + +%files +%license LICENSE.txt +%doc README.md +%{_libdir}/lib*.so.* + +%files devel +%{_includedir}/ini.h +%{_includedir}/INIReader.h +%{_libdir}/lib%{name}.so +%{_libdir}/libINIReader.so +%{_libdir}/pkgconfig/inih.pc +%{_libdir}/pkgconfig/INIReader.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/intltool/intltool.spec b/SPECS/intltool/intltool.spec new file mode 100644 index 00000000..3476da9f --- /dev/null +++ b/SPECS/intltool/intltool.spec @@ -0,0 +1,34 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: intltool +Version: 0.51.0 +Release: %autorelease +Summary: Utility scripts for internationalizing XML +License: GPL-2.0-or-later +URL: https://launchpad.net/intltool +#!RemoteAsset +Source: https://launchpad.net/intltool/trunk/%{version}/+download/intltool-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: perl perl(XML::Parser) +Requires: automake gettext-devel perl(XML::Parser) perl(Getopt::Long) patch + +%description +Intltool is a collection of scripts that helps with extracting translatable +strings from various source files, and merging them back into template files. + +%files +%doc README +%license COPYING AUTHORS +%{_bindir}/intltool* +%{_datadir}/intltool +%{_datadir}/aclocal/intltool* +%{_mandir}/man8/* + +%changelog +%{?autochangelog} diff --git a/SPECS/iotop/iotop.spec b/SPECS/iotop/iotop.spec new file mode 100644 index 00000000..ccda3e40 --- /dev/null +++ b/SPECS/iotop/iotop.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: iotop +Version: 1.30 +Release: %autorelease +Summary: Simple top-like I/O monitor (implemented in C) + +License: GPL-2.0-or-later +URL: https://github.com/Tomas-M/iotop/ +#!RemoteAsset +Source: https://github.com/Tomas-M/iotop/releases/download/v%{version}/iotop-%{version}.tar.xz + +BuildRequires: gcc +BuildRequires: make +BuildRequires: (pkgconfig(ncursesw) or pkgconfig(ncurses)) + +BuildSystem: autotools +BuildOption(build): NO_FLTO=1 +BuildOption(install): V=1 STRIP=: BINDIR=$RPM_BUILD_ROOT%{_bindir} + +%description +iotop does for I/O usage what top(1) does for CPU usage. It watches I/O +usage information output by the Linux kernel and displays a table of +current I/O usage by processes on the system. It is handy for answering +the question "Why is the disk churning so much?". + +iotop requires a Linux kernel built with the CONFIG_TASKSTATS, +CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING and +CONFIG_VM_EVENT_COUNTERS config options on. + +iotop is an alternative re-implementation of iotop in C, optimized for +performance. Normally a monitoring tool intended to be used on a system +under heavy stress should use the least additional resources as +possible. + +# no configure script +%conf + +# No tests. +%check + +%files +%license COPYING +%license LICENSE +%{_bindir}/iotop +%{_mandir}/man8/iotop.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/iperf/iperf.spec b/SPECS/iperf/iperf.spec new file mode 100644 index 00000000..176aa2d4 --- /dev/null +++ b/SPECS/iperf/iperf.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: iperf +Version: 3.19.1 +Release: %autorelease +Summary: A TCP, UDP, and SCTP network bandwidth measurement tool +License: BSD-3-Clause +URL: https://software.es.net/iperf/ +#!RemoteAsset +Source0: https://github.com/esnet/iperf/archive/%{version}/iperf-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: util-linux-devel +BuildRequires: gcc +BuildRequires: lksctp-tools-devel +BuildRequires: openssl-devel +BuildRequires: make + +%description +iperf is a tool for active measurements of the maximum achievable bandwidth +on IP networks. It supports tuning of various parameters related to timing, +protocols, and buffers. For each test it reports the measured throughput/bitrate, +loss, and other parameters. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%conf -a +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%install +%make_install -C src INSTALL_DIR="%{buildroot}%{_bindir}" +mkdir -p %{buildroot}%{_mandir}/man1 +rm -f %{buildroot}%{_libdir}/libiperf.la + +%files +%defattr(-,root,root) +%license LICENSE +%doc README.md RELNOTES.md +%{_bindir}/iperf3 +%{_libdir}/*.so.* +%{_mandir}/man1/iperf3.1.gz +%{_mandir}/man3/libiperf.3.gz + +%files devel +%defattr(-,root,root) +%{_includedir}/iperf_api.h +%{_libdir}/*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/iproute2/iproute2.spec b/SPECS/iproute2/iproute2.spec new file mode 100644 index 00000000..8402aa80 --- /dev/null +++ b/SPECS/iproute2/iproute2.spec @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: iproute2 +Version: 6.16.0 +Release: %autorelease +Summary: Advanced IP routing and network device configuration tools +License: BSD-4-Clause-UC AND GPL-2.0-or-later +URL: https://wiki.linuxfoundation.org/networking/iproute2 +VCS: git:https://git.kernel.org/pub/scm/network/iproute2/iproute2 +#!RemoteAsset +Source0: https://kernel.org/pub/linux/utils/net/iproute2/iproute2-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --color auto + +BuildRequires: bison +BuildRequires: flex +BuildRequires: pkgconfig +BuildRequires: libelf-devel +BuildRequires: pkgconfig(xtables) +BuildRequires: pkgconfig(libbpf) +BuildRequires: pkgconfig(libcap) +BuildRequires: pkgconfig(libmnl) +BuildRequires: pkgconfig(libselinux) + +%description +The iproute2 package contains networking utilities (ip and rtmon, for example) +which are designed to use the advanced networking capabilities of the Linux +kernel. + +%package devel +Summary: iproute2 development files +License: GPL-2.0-or-later +Requires: %{name} = %{version}-%{release} + +%description devel +The libnetlink static library. + +%build -p +echo -e "\nPREFIX=%{_prefix}\nSBINDIR=%{_sbindir}" >> config.mk + +%install -a +echo '.so man8/tc-cbq.8' > %{buildroot}%{_mandir}/man8/cbq.8 + +# For libnetlink +install -D -m644 include/libnetlink.h %{buildroot}%{_includedir}/libnetlink.h +install -D -m644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a + +# No docs +rm -rf %{buildroot}%{_docdir} + +# There is a test suite, but it wants network namespaces and sudo. +%check + +%files +%license COPYING +%dir %{_datadir}/iproute2 +%doc README README.devel +%{_mandir}/man7/* +%{_mandir}/man8/* +%attr(644,root,root) %config %{_datadir}/iproute2/* +%{_sbindir}/* +%{_libdir}/tc/* +%{_datadir}/bash-completion/completions/devlink +%{_datadir}/bash-completion/completions/tc + +%files devel +%license COPYING +%{_mandir}/man3/* +%{_libdir}/libnetlink.a +%{_includedir}/libnetlink.h +%{_includedir}/iproute2/bpf_elf.h + +%changelog +%{?autochangelog} diff --git a/SPECS/iprutils/iprutils.spec b/SPECS/iprutils/iprutils.spec new file mode 100644 index 00000000..97e7fb5b --- /dev/null +++ b/SPECS/iprutils/iprutils.spec @@ -0,0 +1,78 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# default without systemd +%bcond systemd 0 + +Name: iprutils +Version: 2.4.19 +Release: %autorelease +Summary: Utilities for the ipr +License: CPL-1.0 +URL: https://github.com/bjking1/iprutils +#!RemoteAsset +Source0: https://github.com/bjking1/iprutils/archive/rel-2-4-19/%{name}-%{version}.tar.gz +BuildSystem: autotools + +%if %{with systemd} +BuildOption(conf): --with-systemd +BuildOption(conf): --without-initscripts +%else +BuildOption(conf): --without-systemd +BuildOption(conf): --with-initscripts +%endif + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-sosreport + +BuildRequires: libtool libcap-devel linux-headers zlib-devel autoconf automake +BuildRequires: ncurses-devel +%if %{with systemd} +BuildRequires: systemd-rpm-macros +%endif + +%description +Provides a suite of utilities to manage and configure SCSI devices. + +%conf -p +export LDFLAGS="$LDFLAGS -lncursesw -ltinfo" +autoreconf -ivf + +%install -a + +%if %{with systemd} +%post +%systemd_post iprinit.service +%systemd_post iprdump.service +%systemd_post iprupdate.service +%systemd_post iprutils.target + +%preun +%systemd_preun iprinit.service +%systemd_preun iprdump.service +%systemd_preun iprupdate.service +%systemd_preun iprutils.target +%endif + +%files +%doc README +%license LICENSE +%{_sbindir}/* +%if %{with systemd} +%{_unitdir}/* +%{_udevrulesdir}/90-iprutils.rules +%else +/usr/etc/init.d/* +%endif +%dir %{_sysconfdir}/ha.d +%dir %{_sysconfdir}/ha.d/resource.d +%{_sysconfdir}/ha.d/resource.d/iprha +%dir %{_sysconfdir}/bash_completion.d/ +%{_sysconfdir}/bash_completion.d/* +%{_mandir}/man8/* +%changelog +%{?autochangelog} diff --git a/SPECS/ipset/ipset.service b/SPECS/ipset/ipset.service new file mode 100644 index 00000000..ebd421f1 --- /dev/null +++ b/SPECS/ipset/ipset.service @@ -0,0 +1,14 @@ +[Unit] +Description=Loading IP Sets +Before=network-pre.target iptables.service ip6tables.service +Wants=network-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/ipset -f /etc/ipset.conf restore +ExecReload=/usr/bin/ipset -f /etc/ipset.conf restore +ExecStop=/usr/bin/ipset destroy + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/ipset/ipset.spec b/SPECS/ipset/ipset.spec new file mode 100644 index 00000000..6db338f0 --- /dev/null +++ b/SPECS/ipset/ipset.spec @@ -0,0 +1,101 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ipset +Version: 7.24 +Release: %autorelease +Summary: Manage Linux IP sets +License: GPL-2.0-only +URL: http://ipset.netfilter.org/ +VCS: git:https://git.netfilter.org/ipset +#!RemoteAsset +Source0: %{url}/ipset-%{version}.tar.bz2 +Source1: ipset.service +BuildSystem: autotools + +BuildOption(conf): --enable-static=no +BuildOption(conf): --with-kmod=no + +BuildRequires: make +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: libmnl-devel + +%description +IP sets are a framework inside the Linux kernel since version 2.4.x, which can +be administered by the ipset utility. Depending on the type, currently an IP +set may store IP addresses, (TCP/UDP) port numbers or IP addresses with MAC +addresses in a way, which ensures lightning speed when matching an entry +against a set. + +If you want to: + - store multiple IP addresses or port numbers and match against the collection + by iptables at one swoop; + - dynamically update iptables rules against IP addresses or ports without + performance penalty; + - express complex IP address and ports based rulesets with one single iptables + rule and benefit from the speed of IP sets +then ipset may be the proper tool for you. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} == %{version}-%{release} +Requires: linux-headers + +%description devel +This package contains the files required to develop software using the %{name} +libraries. + +%conf -p +./autogen.sh + +%conf -a +# We don't build the bundled kernel module +rm -rf kernel +# Prevent libtool from defining rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%install -a +# install systemd unit file +install -d -m 755 %{buildroot}%{_unitdir} +install -c -m 644 %{SOURCE1} %{buildroot}%{_unitdir} + +find %{buildroot} -name '*.la' -exec rm -f '{}' \; + +%post +%systemd_post ipset.service +/sbin/ldconfig + +%preun +%systemd_preun ipset.service + +%postun +%systemd_postun_with_restart ipset.service +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /sbin/ldconfig +fi + +%files +%doc ChangeLog +%license COPYING +%{_mandir}/man8/ipset*.8.* +%{_libdir}/libipset.so.13* +%{_sbindir}/ipset +%{_sbindir}/ipset-translate +%{_unitdir}/ipset.service + +%files devel +%{_includedir}/libipset +%{_libdir}/libipset.so +%{_libdir}/pkgconfig/libipset.pc +%{_mandir}/man3/libipset.3.* + +%changelog +%{?autochangelog} diff --git a/SPECS/iptables/arptables.service b/SPECS/iptables/arptables.service new file mode 100644 index 00000000..df6c7d6a --- /dev/null +++ b/SPECS/iptables/arptables.service @@ -0,0 +1,12 @@ +[Unit] +Description=Automates a packet filtering firewall with arptables +After=network.target + +[Service] +Type=oneshot +ExecStart=/usr/libexec/arptables-helper start +ExecStop=/usr/libexec/arptables-helper stop +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/iptables/ebtables.service b/SPECS/iptables/ebtables.service new file mode 100644 index 00000000..b096f1d7 --- /dev/null +++ b/SPECS/iptables/ebtables.service @@ -0,0 +1,11 @@ +[Unit] +Description=Ethernet Bridge Filtering tables + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/ebtables-helper start +ExecStop=/usr/libexec/ebtables-helper stop + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/iptables/empty.rules b/SPECS/iptables/empty.rules new file mode 100644 index 00000000..e24e1aa3 --- /dev/null +++ b/SPECS/iptables/empty.rules @@ -0,0 +1,6 @@ +# Empty iptables rule file +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT diff --git a/SPECS/iptables/iptables.service b/SPECS/iptables/iptables.service new file mode 100644 index 00000000..6b996d1c --- /dev/null +++ b/SPECS/iptables/iptables.service @@ -0,0 +1,17 @@ +[Unit] +Description=IPv4 firewall with iptables +AssertPathExists=/etc/sysconfig/iptables +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/libexec/iptables/iptables.init start +ExecReload=/usr/libexec/iptables/iptables.init reload +ExecStop=/usr/libexec/iptables/iptables.init stop +Environment=BOOTUP=serial +Environment=CONSOLETYPE=serial + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/iptables/iptables.spec b/SPECS/iptables/iptables.spec new file mode 100644 index 00000000..f86b5803 --- /dev/null +++ b/SPECS/iptables/iptables.spec @@ -0,0 +1,358 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: iptables +Version: 1.8.11 +Release: %autorelease +Summary: Tools for managing Linux kernel packet filtering capabilities +License: GPL-2.0-only AND Artistic-2.0 AND ISC +URL: https://www.netfilter.org/projects/iptables +VCS: git:https://git.netfilter.org/iptables +#!RemoteAsset +Source0: %{url}/files/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: %{url}/files/%{name}-%{version}.tar.xz.sig +Source2: iptables.service +Source3: arptables.service +Source4: ebtables.service +Source5: empty.rules +BuildSystem: autotools + +BuildOption(conf): --enable-devel +BuildOption(conf): --enable-bpf-compiler +BuildOption(conf): --with-kernel=%{_prefix} +BuildOption(conf): --with-kbuild=%{_prefix} +BuildOption(conf): --with-ksource=%{_prefix} + +BuildRequires: bison +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: libtool +BuildRequires: pkg-config +BuildRequires: xz +BuildRequires: pkgconfig(libmnl) +BuildRequires: pkgconfig(libnetfilter_conntrack) +BuildRequires: pkgconfig(libnfnetlink) +BuildRequires: pkgconfig(libnftnl) +BuildRequires: pkgconfig(libpcap) + +# for tests +BuildRequires: python3 + +%description +The iptables utility controls the network packet filtering code in the +Linux kernel. If you need to set up firewalls and/or IP masquerading, +you should install this package. + +%package libs +Summary: libxtables and iptables extensions userspace support + +%description libs +libxtables and associated shared object files + +Libxtables provides unified access to iptables extensions in userspace. Data +and logic for those is kept in per-extension shared object files. + +%package devel +Summary: Development package for iptables +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +libxtables development headers and pkgconfig files + +%package utils +Summary: iptables and ip6tables misc utilities +Requires: %{name} = %{version}-%{release} + +%description utils +Utils for iptables + +This package provides nfnl_osf with the pf.os database and nfbpf_compile, +a bytecode generator for use with xt_bpf. Also included is iptables-apply, +a safer way to update iptables remotely. + +%package nft +Summary: nftables compatibility for iptables, arptables and ebtables +Requires: %{name}-libs = %{version}-%{release} +Requires(post): /usr/sbin/update-alternatives +Requires(post): /usr/bin/readlink +Requires(postun): /usr/sbin/update-alternatives +Provides: arptables-helper +Provides: iptables +Provides: arptables +Provides: ebtables + +%description nft +nftables compatibility for iptables, arptables and ebtables. + +%package services +Summary: iptables and ip6tables services for iptables +Requires: %{name} = %{version}-%{release} +Requires: %{name}-utils = %{version}-%{release} +%{?systemd_ordering} +Provides: arptables-services = %{version}-%{release} +Provides: ebtables-services = %{version}-%{release} +BuildArch: noarch + +%description services +iptables services for IPv4 and IPv6 + +This package provides the services iptables and ip6tables that have been split +out of the base package since they are not active by default anymore. + +%package legacy +Summary: Legacy tools for managing Linux kernel packet filtering capabilities +Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires(post): /usr/sbin/update-alternatives +Requires(postun): /usr/sbin/update-alternatives +Provides: %{name}-compat = %{version}-%{release} + +%description legacy +The iptables utility controls the network packet filtering code in the +Linux kernel. This package contains the legacy tools which are obsoleted by +nft-variants in iptables-nft package for backwards compatibility reasons. +If you need to set up firewalls and/or IP masquerading, you should not install +this package but either nftables or iptables-nft instead. + +%package legacy-libs +Summary: iptables legacy libraries + +%description legacy-libs +iptables libraries. + +Please remember that libip*tc libraries do neither have a stable API nor a real +so version. For more information about this, please have a look at + + http://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html#ss4.5 + +%package legacy-devel +Summary: Development package for legacy iptables +Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description legacy-devel +Legacy iptables development headers and pkgconfig files + +%conf -p +./autogen.sh +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" + +%build -p +# do not use rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +rm -f include/linux/types.h + +%install -a +# remove la file(s) +rm -f %{buildroot}%{_libdir}/*.la + +# install systemd service files +install -d -m 755 %{buildroot}/%{_unitdir} +install -c -m 644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{buildroot}/%{_unitdir} +sed -e 's;iptables;ip6tables;g' -e 's;IPv4;IPv6;g' -e 's;/usr/libexec/ip6tables;/usr/libexec/iptables;g' < %{SOURCE5} > ip6tables.service +install -c -m 644 ip6tables.service %{buildroot}/%{_unitdir} + +# install configuration files +install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig +install -c -m 600 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/iptables +install -c -m 600 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/ip6tables +echo '# Configure prior to use' > %{buildroot}%{_sysconfdir}/sysconfig/arptables +touch %{buildroot}%{_sysconfdir}/sysconfig/ebtables + +# Remove /etc/ethertypes (part of setup) +rm -f %{buildroot}%{_sysconfdir}/ethertypes + +# prepare for alternatives +touch %{buildroot}%{_mandir}/man8/arptables.8 +touch %{buildroot}%{_mandir}/man8/arptables-save.8 +touch %{buildroot}%{_mandir}/man8/arptables-restore.8 +touch %{buildroot}%{_mandir}/man8/ebtables.8 +rm %{buildroot}%{_sbindir}/{ip,ip6,arp,eb}tables{,-save,-restore} +touch %{buildroot}%{_sbindir}/{ip,ip6,arp,eb}tables{,-save,-restore} + +# fix absolute symlink +ln -sf --relative %{buildroot}%{_sbindir}/xtables-legacy-multi %{buildroot}%{_bindir}/iptables-xml + +# install legacy actions for service command +install -d %{buildroot}/%{legacy_actions}/iptables +install -d %{buildroot}/%{legacy_actions}/ip6tables + +# test require root +%check + +%ldconfig_scriptlets + +%post services +%systemd_post arptables.service ebtables.service +%systemd_post iptables.service ip6tables.service + +%preun services +%systemd_preun arptables.service ebtables.service +%systemd_preun iptables.service ip6tables.service + +%postun services +%?ldconfig +%systemd_postun arptables.service ebtables.service +%systemd_postun iptables.service ip6tables.service + +%post -e nft +[[ %%{_excludedocs} == 1 ]] || do_man=true + +# remove non-symlinks in spots managed by alternatives +# to cover for updates from not-yet-alternatived versions +for pfx in %{_prefix}/sbin/{eb,arp}tables; do + for sfx in "" "-restore" "-save"; do + if [ "$(readlink -e $pfx$sfx)" == $pfx$sfx ]; then + rm -f $pfx$sfx + fi + done +done +for manpfx in %{_mandir}/man8/{eb,arp}tables; do + for sfx in {,-restore,-save}.8.gz; do + if [ "$(readlink -e $manpfx$sfx)" == $manpfx$sfx ]; then + rm -f $manpfx$sfx + fi + done +done + +pfx=%{_sbindir}/iptables +pfx6=%{_sbindir}/ip6tables +update-alternatives --install \ + $pfx iptables $pfx-nft 10 \ + --follower $pfx6 ip6tables $pfx6-nft \ + --follower $pfx-restore iptables-restore $pfx-nft-restore \ + --follower $pfx-save iptables-save $pfx-nft-save \ + --follower $pfx6-restore ip6tables-restore $pfx6-nft-restore \ + --follower $pfx6-save ip6tables-save $pfx6-nft-save + +pfx=%{_sbindir}/ebtables +manpfx=%{_mandir}/man8/ebtables +update-alternatives --install \ + $pfx ebtables $pfx-nft 10 \ + --follower $pfx-save ebtables-save $pfx-nft-save \ + --follower $pfx-restore ebtables-restore $pfx-nft-restore \ + ${do_man:+--follower $manpfx.8.gz ebtables-man $manpfx-nft.8.gz} + +pfx=%{_sbindir}/arptables +manpfx=%{_mandir}/man8/arptables +update-alternatives --install \ + $pfx arptables $pfx-nft 10 \ + --follower $pfx-save arptables-save $pfx-nft-save \ + --follower $pfx-restore arptables-restore $pfx-nft-restore \ + ${do_man:+--follower $manpfx.8.gz arptables-man $manpfx-nft.8.gz} \ + ${do_man:+--follower $manpfx-save.8.gz arptables-save-man $manpfx-nft-save.8.gz} \ + ${do_man:+--follower $manpfx-restore.8.gz arptables-restore-man $manpfx-nft-restore.8.gz} + +# TODO: In the future we might merge %%%{_sbindir} and %%{_bindir}? - 251 +for name in ip{,6}tables{,-save,-restore} ebtables{,-save,-restore} arptables{,-save,-restore}; do + test -h /usr/sbin || ln -s ../bin/$name /usr/sbin/$name 2>/dev/null || : +done + +%postun nft +if [ $1 -eq 0 ]; then + for cmd in iptables ebtables arptables; do + update-alternatives --remove $cmd %{_sbindir}/$cmd-nft + done +fi + +%post legacy +pfx=%{_sbindir}/iptables +pfx6=%{_sbindir}/ip6tables +update-alternatives --install \ + $pfx iptables $pfx-legacy 10 \ + --follower $pfx6 ip6tables $pfx6-legacy \ + --follower $pfx-restore iptables-restore $pfx-legacy-restore \ + --follower $pfx-save iptables-save $pfx-legacy-save \ + --follower $pfx6-restore ip6tables-restore $pfx6-legacy-restore \ + --follower $pfx6-save ip6tables-save $pfx6-legacy-save + +# TODO: In the future we might merge %%%{_sbindir} and %%{_bindir}? - 251 +for name in ip{,6}tables{,-save,-restore}; do + test -h /usr/sbin || ln -s ../bin/$name /usr/sbin/$name 2>/dev/null || : +done + +%postun legacy +if [ $1 -eq 0 ]; then + update-alternatives --remove \ + iptables %{_sbindir}/iptables-legacy +fi + +%files libs +%{_libdir}/libxtables.so.12* +%dir %{_libdir}/xtables +%{_libdir}/xtables/lib{ip,ip6,x}t* +%{_mandir}/man8/ip{,6}tables.8.gz +%{_mandir}/man8/ip{,6}tables-{extensions,save,restore}.8.gz + +%files devel +%{_includedir}/xtables{,-version}.h +%{_libdir}/libxtables.so +%{_libdir}/pkgconfig/xtables.pc + +%files utils +%{_sbindir}/nfnl_osf +%{_sbindir}/nfbpf_compile +%{_sbindir}/ip{,6}tables-apply +%dir %{_datadir}/xtables +%{_datadir}/xtables/pf.os +%{_mandir}/man8/nfnl_osf* +%{_mandir}/man8/nfbpf_compile* +%{_mandir}/man8/ip{,6}tables-apply* + +%files nft +%{_sbindir}/ip{,6}tables-nft* +%{_sbindir}/ip{,6}tables{,-restore}-translate +%{_sbindir}/{eb,arp}tables-nft* +%{_sbindir}/xtables-nft-multi +%{_sbindir}/xtables-monitor +%{_sbindir}/ebtables-translate +%{_sbindir}/arptables-translate +%dir %{_libdir}/xtables +%{_libdir}/xtables/lib{arp,eb}t* +%{_mandir}/man8/xtables-monitor* +%{_mandir}/man8/xtables-translate* +%{_mandir}/man8/*-nft* +%{_mandir}/man8/ip{,6}tables{,-restore}-translate* +%{_mandir}/man8/ebtables-translate* +%{_mandir}/man8/arptables-translate* +%ghost %attr(0755,root,root) %{_sbindir}/ip{,6}tables{,-save,-restore} +%ghost %attr(0755,root,root) %{_sbindir}/{eb,arp}tables{,-save,-restore} +%ghost %{_mandir}/man8/arptables{,-save,-restore}.8.gz +%ghost %{_mandir}/man8/ebtables.8.gz + +%files services +%config(noreplace) %{_sysconfdir}/sysconfig/ip{,6}tables +%config(noreplace) %{_sysconfdir}/sysconfig/arptables +%ghost %{_sysconfdir}/sysconfig/ebtables +%{_unitdir}/{arp,eb,ip,ip6}tables.service + +%files legacy +%{_sbindir}/ip{,6}tables-legacy* +%{_sbindir}/xtables-legacy-multi +%{_bindir}/iptables-xml +%{_mandir}/man1/iptables-xml* +%{_mandir}/man8/xtables-legacy* +%dir %{_datadir}/xtables +%{_datadir}/xtables/iptables.xslt +%ghost %attr(0755,root,root) %{_sbindir}/ip{,6}tables{,-save,-restore} + +%files legacy-libs +%license COPYING +%{_libdir}/libip{4,6}tc.so.* + +%files legacy-devel +%dir %{_includedir}/libiptc +%{_includedir}/libiptc/*.h +%{_libdir}/libip*tc.so +%{_libdir}/pkgconfig/libip{,4,6}tc.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/iputils/iputils.spec b/SPECS/iputils/iputils.spec new file mode 100644 index 00000000..e4596633 --- /dev/null +++ b/SPECS/iputils/iputils.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: iputils +Version: 20250605 +Release: %autorelease +Summary: Network monitoring tools including ping +License: BSD-4-Clause-UC AND GPL-2.0-or-later +URL: https://github.com/iputils/iputils +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/iputils-%{version}.tar.xz +BuildSystem: meson + +BuildRequires: meson +BuildRequires: gettext +BuildRequires: pkgconfig(libidn2) +BuildRequires: pkgconfig(libcap) +BuildRequires: libxslt +BuildRequires: docbook-xsl +BuildRequires: systemd +BuildRequires: iproute2 + +%description +The iputils package contains basic utilities for monitoring a network, +including ping. The ping command sends a series of ICMP protocol +ECHO_REQUEST packets to a specified network host to discover whether +the target machine is alive and receiving network traffic. + +%install -a +# We don't want these +rm -fv %{buildroot}/usr/share/iputils/*.html + +%find_lang %{name} --generate-subpackages + +ln -sf --relative ${RPM_BUILD_ROOT}%{_bindir}/ping ${RPM_BUILD_ROOT}%{_bindir}/ping6 +ln -sf --relative ${RPM_BUILD_ROOT}%{_bindir}/tracepath ${RPM_BUILD_ROOT}%{_bindir}/tracepath6 +echo ".so man8/ping.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/ping6.8 +echo ".so man8/tracepath.8" > ${RPM_BUILD_ROOT}%{_mandir}/man8/tracepath6.8 + +%files +%attr(0755,root,root) %caps(cap_net_raw=p) %{_bindir}/clockdiff +%attr(0755,root,root) %caps(cap_net_raw=p) %{_bindir}/arping +%attr(0755,root,root) %caps(cap_net_raw=p) %{_bindir}/ping6 +%attr(0755,root,root) %caps(cap_net_raw=p) %{_bindir}/ping +%{_bindir}/tracepath +%{_bindir}/tracepath6 +%attr(644,root,root) %{_mandir}/man8/clockdiff.8* +%attr(644,root,root) %{_mandir}/man8/arping.8* +%attr(644,root,root) %{_mandir}/man8/ping.8* +%{_mandir}/man8/ping6.8* +%attr(644,root,root) %{_mandir}/man8/tracepath.8* +%{_mandir}/man8/tracepath6.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/irqbalance/0001-add-void-to-fix-strict_-_prototypes.patch b/SPECS/irqbalance/0001-add-void-to-fix-strict_-_prototypes.patch new file mode 100644 index 00000000..26939455 --- /dev/null +++ b/SPECS/irqbalance/0001-add-void-to-fix-strict_-_prototypes.patch @@ -0,0 +1,317 @@ +From b6a831d692ed7e12db7748db49b3b39516d151d2 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Sun, 31 Mar 2024 14:31:22 -0700 +Subject: [PATCH] add void to fix strict-prototypes + +This becomes a hard error with C23 + +Signed-off-by: Rosen Penev +--- + irqbalance.c | 2 +- + irqbalance.h | 2 +- + procinterrupts.c | 2 +- + ui/helpers.c | 2 +- + ui/helpers.h | 2 +- + ui/irqbalance-ui.c | 6 +++--- + ui/irqbalance-ui.h | 5 ++--- + ui/ui.c | 26 +++++++++++++------------- + ui/ui.h | 28 ++++++++++++++-------------- + 9 files changed, 37 insertions(+), 38 deletions(-) + +diff --git a/irqbalance.c b/irqbalance.c +index 12302d7..373161f 100644 +--- a/irqbalance.c ++++ b/irqbalance.c +@@ -544,7 +544,7 @@ gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attri + return TRUE; + } + +-int init_socket() ++int init_socket(void) + { + struct sockaddr_un addr; + memset(&addr, 0, sizeof(struct sockaddr_un)); +diff --git a/irqbalance.h b/irqbalance.h +index 7b47cd1..09daa3d 100644 +--- a/irqbalance.h ++++ b/irqbalance.h +@@ -36,7 +36,7 @@ extern char *classes[]; + extern void parse_cpu_tree(void); + extern void clear_work_stats(void); + extern void parse_proc_interrupts(void); +-extern GList* collect_full_irq_list(); ++extern GList* collect_full_irq_list(void); + extern void parse_proc_stat(void); + extern void set_interrupt_count(int number, uint64_t count); + extern void set_msi_interrupt_numa(int number); +diff --git a/procinterrupts.c b/procinterrupts.c +index dfa95c6..e7ba653 100644 +--- a/procinterrupts.c ++++ b/procinterrupts.c +@@ -206,7 +206,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq) + info->name = strdup(irq_fullname); + } + +-GList* collect_full_irq_list() ++GList* collect_full_irq_list(void) + { + GList *tmp_list = NULL; + FILE *file; +diff --git a/ui/helpers.c b/ui/helpers.c +index 0e9f76c..247f826 100644 +--- a/ui/helpers.c ++++ b/ui/helpers.c +@@ -165,7 +165,7 @@ void dump_node(cpu_node_t *node, void *data __attribute__((unused))) + } + } + +-void dump_tree() ++void dump_tree(void) + { + for_each_node(tree, dump_node, NULL); + } +diff --git a/ui/helpers.h b/ui/helpers.h +index b8d9fcc..922914b 100644 +--- a/ui/helpers.h ++++ b/ui/helpers.h +@@ -25,7 +25,7 @@ void for_each_node(GList *list, void (*fp)(cpu_node_t *node, void *data), void * + + void dump_irq(irq_t *irq, void *data __attribute__((unused))); + void dump_node(cpu_node_t *node, void *data __attribute__((unused))); +-void dump_tree(); ++void dump_tree(void); + + + #endif /* HELPERS_H */ +diff --git a/ui/irqbalance-ui.c b/ui/irqbalance-ui.c +index c26eff6..f5122ee 100644 +--- a/ui/irqbalance-ui.c ++++ b/ui/irqbalance-ui.c +@@ -28,7 +28,7 @@ setup_t setup; + GMainLoop *main_loop; + static int default_bufsz = 8192; + +-struct msghdr * create_credentials_msg() ++struct msghdr * create_credentials_msg(void) + { + struct ucred *credentials = malloc(sizeof(struct ucred)); + credentials->pid = getpid(); +@@ -51,7 +51,7 @@ struct msghdr * create_credentials_msg() + return msg; + } + +-int init_connection() ++int init_connection(void) + { + struct sockaddr_un addr; + memset(&addr, 0, sizeof(struct sockaddr_un)); +@@ -378,7 +378,7 @@ gboolean rescan_tree(gpointer data __attribute__((unused))) + free(irqbalance_data); + return TRUE; + } +-void scroll_window() { ++void scroll_window(void) { + switch(state) { + case STATE_TREE: + display_tree(); +diff --git a/ui/irqbalance-ui.h b/ui/irqbalance-ui.h +index dc24083..178be4b 100644 +--- a/ui/irqbalance-ui.h ++++ b/ui/irqbalance-ui.h +@@ -72,8 +72,8 @@ typedef struct setup { + + /* Function prototypes */ + +-struct msghdr * create_credentials_msg(); +-int init_connection(); ++struct msghdr * create_credentials_msg(void); ++int init_connection(void); + void send_settings(char *data); + char * get_data(char *string); + void parse_setup(char *setup_data); +@@ -83,7 +83,6 @@ void assign_cpu_lists(cpu_node_t *node, void *data); + void assign_cpu_mask(cpu_node_t *node, void *data); + void parse_into_tree(char *data); + gboolean rescan_tree(gpointer data); +-int main(); + + + #endif /* IRQBALANCE_UI_H */ +diff --git a/ui/ui.c b/ui/ui.c +index 8354fc6..9fa990a 100644 +--- a/ui/ui.c ++++ b/ui/ui.c +@@ -21,7 +21,7 @@ char *IRQ_CLASS_TO_STR[] = { + "10-Gigabit Ethernet", + "Virt Event"}; + +-void show_frame() ++void show_frame(void) + { + int i; + attrset(COLOR_PAIR(4)); +@@ -37,7 +37,7 @@ void show_frame() + } + } + +-void show_footer() ++void show_footer(void) + { + char footer[COLS]; + snprintf(footer, COLS - 1, +@@ -172,7 +172,7 @@ void print_cpu_line(cpu_ban_t *cpu, void *data __attribute__((unused))) + max_offset++; + } + +-void print_all_cpus() ++void print_all_cpus(void) + { + max_offset = 0; + if(all_cpus == NULL) { +@@ -193,7 +193,7 @@ void add_banned_cpu(int *banned_cpu, void *data) + snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu); + } + +-void display_banned_cpus() ++void display_banned_cpus(void) + { + char banned_cpus[1024] = "Banned CPU numbers: \0"; + if(g_list_length(setup.banned_cpus) > 0) { +@@ -247,7 +247,7 @@ void get_cpu(cpu_node_t *node, void *data __attribute__((unused))) + } + } + +-void handle_cpu_banning() ++void handle_cpu_banning(void) + { + GList *tmp = g_list_copy_deep(all_cpus, copy_cpu_ban, NULL); + attrset(COLOR_PAIR(5)); +@@ -504,7 +504,7 @@ void print_irq_line(irq_t *irq, void *data __attribute__((unused))) + mvprintw(line, 120, "%s", irq_name[line]); + } + +-void print_all_irqs() ++void print_all_irqs(void) + { + max_offset = 0; + attrset(COLOR_PAIR(0)); +@@ -555,13 +555,13 @@ void copy_irqs_from_nodes(cpu_node_t *node, void *data __attribute__((unused))) + } + } + +-void get_all_irqs() ++void get_all_irqs(void) + { + all_irqs = g_list_copy_deep(setup.banned_irqs, copy_irq, NULL); + for_each_node(tree, copy_irqs_from_nodes, NULL); + } + +-void handle_irq_banning() ++void handle_irq_banning(void) + { + GList *tmp = g_list_copy_deep(all_irqs, copy_irq, NULL); + attrset(COLOR_PAIR(5)); +@@ -670,7 +670,7 @@ void handle_irq_banning() + } + } + +-void handle_sleep_setting() ++void handle_sleep_setting(void) + { + char info[128] = "Current sleep interval between rebalancing: \0"; + uint8_t sleep_input_offset = strlen(info) + 3; +@@ -693,7 +693,7 @@ void handle_sleep_setting() + refresh(); + } + +-void init() ++void init(void) + { + signal(SIGINT, close_window); + initscr(); +@@ -732,7 +732,7 @@ void close_window(int sig __attribute__((unused))) + exit(EXIT_SUCCESS); + } + +-void settings() ++void settings(void) + { + clear(); + char *setup_data = get_data(SETUP); +@@ -751,7 +751,7 @@ void settings() + free(setup_data); + } + +-void setup_irqs() ++void setup_irqs(void) + { + clear(); + get_all_irqs(); +@@ -830,7 +830,7 @@ void display_tree_node(cpu_node_t *node, void *data) + } + } + +-void display_tree() ++void display_tree(void) + { + clear(); + char *setup_data = get_data(SETUP); +diff --git a/ui/ui.h b/ui/ui.h +index da5b4b9..f3485d4 100644 +--- a/ui/ui.h ++++ b/ui/ui.h +@@ -17,40 +17,40 @@ extern setup_t setup; + extern int offset; + extern int max_offset; + +-void show_frame(); +-void show_footer(); ++void show_frame(void); ++void show_footer(void); + + char * check_control_in_sleep_input(int max_len, int column_offest, int line_offset); + int get_valid_sleep_input(int column_offest); + + void get_banned_cpu(int *cpu, void *data); + void print_cpu_line(cpu_ban_t *cpu, void *data); +-void print_all_cpus(); ++void print_all_cpus(void); + void add_banned_cpu(int *banned_cpu, void *data); +-void display_banned_cpus(); ++void display_banned_cpus(void); + int toggle_cpu(GList *cpu_list, int cpu_number); + void get_new_cpu_ban_values(cpu_ban_t *cpu, void *data); +-void get_cpu(); +-void handle_sleep_setting(); +-void handle_cpu_banning(); ++void get_cpu(cpu_node_t *node, void *data); ++void handle_sleep_setting(void); ++void handle_cpu_banning(void); + + void copy_assigned_obj(int *number, void *data); + void print_assigned_objects_string(irq_t *irq, int *line_offset); + void print_irq_line(irq_t *irq, void *data); +-void print_all_irqs(); ++void print_all_irqs(void); + int toggle_irq(GList *irq_list, int position); + void get_new_irq_ban_values(irq_t *irq, void *data); + void copy_irqs_from_nodes(cpu_node_t *node, void *data); +-void get_all_irqs(); +-void handle_irq_banning(); ++void get_all_irqs(void); ++void handle_irq_banning(void); + +-void init(); ++void init(void); + void close_window(int sig); +-void settings(); +-void setup_irqs(); ++void settings(void); ++void setup_irqs(void); + void display_tree_node_irqs(irq_t *irq, void *data); + void display_tree_node(cpu_node_t *node, void *data); +-void display_tree(); ++void display_tree(void); + + + #endif /* UI_H */ diff --git a/SPECS/irqbalance/irqbalance.spec b/SPECS/irqbalance/irqbalance.spec new file mode 100644 index 00000000..cfbfec13 --- /dev/null +++ b/SPECS/irqbalance/irqbalance.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: irqbalance +Version: 1.9.4 +Release: %autorelease +Summary: IRQ balancing daemon +License: GPL-2.0-only +URL: https://github.com/Irqbalance/irqbalance +#!RemoteAsset +Source0: %{url}/archive/v%{version}/irqbalance-%{version}.tar.gz +BuildSystem: autotools + +# https://github.com/Irqbalance/irqbalance/commit/b6a831d692ed7e12db7748db49b3b39516d151d2 +Patch0: 0001-add-void-to-fix-strict_-_prototypes.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: libcap-ng +BuildRequires: make +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(libcap-ng) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(numa) + +Requires: numactl + +%description +irqbalance is a daemon that evenly distributes IRQ load across +multiple CPUs for enhanced performance. + +%conf -p +# Otherwise configure will not happy - 251 +./autogen.sh + +%install -a +install -D -p -m 0644 ./misc/irqbalance.service %{buildroot}/%{_unitdir}/irqbalance.service +install -D -p -m 0644 ./misc/irqbalance.env %{buildroot}%{_sysconfdir}/sysconfig/irqbalance + +%post +%systemd_post irqbalance.service + +%preun +%systemd_preun irqbalance.service + +%postun +%systemd_postun_with_restart irqbalance.service + +%files +%doc COPYING AUTHORS +%{_sbindir}/irqbalance +%{_unitdir}/irqbalance.service +%{_mandir}/man1/* +%config(noreplace) %{_sysconfdir}/sysconfig/irqbalance +# Should we include this? - 251 +%exclude %{_sbindir}/irqbalance-ui + +%changelog +%{?autochangelog} diff --git a/SPECS/isa-l/isa-l.spec b/SPECS/isa-l/isa-l.spec new file mode 100644 index 00000000..64b46cfe --- /dev/null +++ b/SPECS/isa-l/isa-l.spec @@ -0,0 +1,87 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: sunyuechi +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: isa-l +Version: 2.31.1 +Release: %autorelease +Summary: Intelligent Storage Acceleration Library +License: BSD-3-Clause +URL: https://github.com/intel/isa-l +#!RemoteAsset +Source0: https://github.com/intel/isa-l/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +%description +Collection of low-level functions used in storage applications. +Contains fast erasure codes that implement a general Reed-Solomon type +encoding for blocks of data that helps protect against erasure of +whole blocks. The general ISA-L library contains an expanded set of +functions used for data protection, hashing, encryption, etc. + +This package contains the shared library. + +%package devel +Summary: Intel(R) Intelligent Storage Acceleration Library - devel files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Collection of low-level functions used in storage applications. +Contains fast erasure codes that implement a general Reed-Solomon type +encoding for blocks of data that helps protect against erasure of +whole blocks. The general ISA-L library contains an expanded set of +functions used for data protection, hashing, encryption, etc. + +This package contains the development files needed to build against +the shared library. + +%package tools +Summary: Intel(R) Intelligent Storage Acceleration Library - tool +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tools +Collection of low-level functions used in storage applications. +Contains fast erasure codes that implement a general Reed-Solomon type +encoding for blocks of data that helps protect against erasure of +whole blocks. The general ISA-L library contains an expanded set of +functions used for data protection, hashing, encryption, etc. + +This package contains CLI tools. + +%prep -a +./autogen.sh + +%check +%make_build check +%make_build tests + +%ldconfig_scriptlets + +%files +%{_libdir}/libisal.so.2* +%license LICENSE + +%files devel +%{_includedir}/isa-l.h +%{_includedir}/isa-l +%{_libdir}/libisal.so +%{_libdir}/pkgconfig/libisal.pc +%doc examples + +%files tools +%{_bindir}/igzip +%{_mandir}/man1/igzip.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/isa-l_crypto/0001-fips-enable-aes-self-tests-only-on-x86-and-aarch64.patch b/SPECS/isa-l_crypto/0001-fips-enable-aes-self-tests-only-on-x86-and-aarch64.patch new file mode 100644 index 00000000..bebfb5be --- /dev/null +++ b/SPECS/isa-l_crypto/0001-fips-enable-aes-self-tests-only-on-x86-and-aarch64.patch @@ -0,0 +1,31 @@ +From 136d57acbe260427b6570190f1bc9721a6c1abe6 Mon Sep 17 00:00:00 2001 +From: Julian Zhu +Date: Wed, 23 Jul 2025 12:56:39 +0800 +Subject: [PATCH 1/3] fips: enable aes self tests only on x86 and aarch64 + +Since AES has no base aliases available for noarch, `aes_self_tests` will cause a link failure on non-x86 and non-aarch64 platforms. + +Signed-off-by: Julian Zhu +--- + fips/Makefile.am | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/fips/Makefile.am b/fips/Makefile.am +index ee5e278..685a6bd 100644 +--- a/fips/Makefile.am ++++ b/fips/Makefile.am +@@ -30,9 +30,8 @@ + src_include += -I $(srcdir)/fips + extern_hdrs += include/isal_crypto_api.h include/aes_xts.h include/aes_keyexp.h include/sha1_mb.h include/sha256_mb.h + +-lsrc_x86_64 += fips/self_tests.c +-lsrc_aarch64 += fips/self_tests_generic.c +-lsrc += fips/aes_self_tests.c ++lsrc_x86_64 += fips/self_tests.c fips/aes_self_tests.c ++lsrc_aarch64 += fips/self_tests_generic.c fips/aes_self_tests.c + lsrc += fips/sha_self_tests.c + + lsrc_x86_64 += fips/asm_self_tests.asm +-- +2.51.0 + diff --git a/SPECS/isa-l_crypto/0002-build-add-riscv64-support.patch b/SPECS/isa-l_crypto/0002-build-add-riscv64-support.patch new file mode 100644 index 00000000..87a1783a --- /dev/null +++ b/SPECS/isa-l_crypto/0002-build-add-riscv64-support.patch @@ -0,0 +1,233 @@ +From c824b2cae1367b8cd5b11d0ea74ac69d64d2580a Mon Sep 17 00:00:00 2001 +From: Julian Zhu +Date: Wed, 23 Jul 2025 13:13:59 +0800 +Subject: [PATCH 2/3] build: add riscv64 support + +Use the base alias implementations for most function. + +Signed-off-by: Julian Zhu +--- + Makefile.am | 11 +++++++++++ + configure.ac | 2 ++ + fips/Makefile.am | 1 + + md5_mb/Makefile.am | 3 +++ + mh_sha1/Makefile.am | 4 ++++ + mh_sha1_murmur3_x64_128/Makefile.am | 6 ++++++ + mh_sha256/Makefile.am | 7 +++++++ + rolling_hash/Makefile.am | 4 ++++ + sha1_mb/Makefile.am | 4 +++- + sha256_mb/Makefile.am | 3 +++ + sha512_mb/Makefile.am | 3 +++ + sm3_mb/Makefile.am | 2 ++ + 14 files changed, 54 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index c3ce316..005d148 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -27,6 +27,7 @@ lsrc32= + lsrc_x86_64= + lsrc_x86_32= + lsrc_aarch64= ++lsrc_riscv64= + lsrc_base_aliases= + unit_tests32= + perf_tests32= +@@ -73,6 +74,10 @@ if CPU_AARCH64 + libisal_crypto_la_SOURCES += ${lsrc_aarch64} + endif + ++if CPU_RISCV64 ++libisal_crypto_la_SOURCES += ${lsrc_riscv64} ++endif ++ + if CPU_UNDEFINED + libisal_crypto_la_SOURCES += ${lsrc_base_aliases} + endif +@@ -117,6 +122,9 @@ endif + if CPU_AARCH64 + as_filter = $(CC) -D__ASSEMBLY__ + endif ++if CPU_RISCV64 ++ as_filter = $(CC) -D__ASSEMBLY__ ++endif + CCAS = $(as_filter) + EXTRA_DIST += tools/nasm-filter.sh + EXTRA_DIST += tools/nasm-cet-filter.sh +@@ -127,6 +135,9 @@ AM_CCASFLAGS = ${asm_args} ${INCLUDE} $(src_include) ${D} + else + AM_CCASFLAGS = ${asm_args} ${INCLUDE} $(src_include) ${DEFS} ${D} + endif ++if CPU_RISCV64 ++AM_CCASFLAGS = ${asm_args} ${INCLUDE} $(src_include) ${D} ++endif + + .asm.s: + @echo " MKTMP " $@; +diff --git a/configure.ac b/configure.ac +index 79f367c..4929fad 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -29,10 +29,12 @@ AS_CASE([$host_cpu], + [i?86], [CPU="x86_32"], + [aarch64], [CPU="aarch64"], + [arm64], [CPU="aarch64"], ++ [riscv64], [CPU="riscv64"], + ) + AM_CONDITIONAL([CPU_X86_64], [test "$CPU" = "x86_64"]) + AM_CONDITIONAL([CPU_X86_32], [test "$CPU" = "x86_32"]) + AM_CONDITIONAL([CPU_AARCH64], [test "$CPU" = "aarch64"]) ++AM_CONDITIONAL([CPU_RISCV64], [test "$CPU" = "riscv64"]) + AM_CONDITIONAL([CPU_UNDEFINED], [test "x$CPU" = "x"]) + AM_CONDITIONAL([SAFE_PARAM], [test x"$SAFE_PARAM" = x"yes"]) + +diff --git a/fips/Makefile.am b/fips/Makefile.am +index 685a6bd..aa1b12b 100644 +--- a/fips/Makefile.am ++++ b/fips/Makefile.am +@@ -32,6 +32,7 @@ extern_hdrs += include/isal_crypto_api.h include/aes_xts.h include/aes_keyex + + lsrc_x86_64 += fips/self_tests.c fips/aes_self_tests.c + lsrc_aarch64 += fips/self_tests_generic.c fips/aes_self_tests.c ++lsrc_riscv64 += fips/self_tests_generic.c + lsrc += fips/sha_self_tests.c + + lsrc_x86_64 += fips/asm_self_tests.asm +diff --git a/md5_mb/Makefile.am b/md5_mb/Makefile.am +index c516a57..38618b4 100644 +--- a/md5_mb/Makefile.am ++++ b/md5_mb/Makefile.am +@@ -69,6 +69,9 @@ lsrc_aarch64 += md5_mb/md5_ctx_base.c \ + md5_mb/aarch64/md5_mb_sve.S \ + md5_mb/aarch64/md5_mb_multibinary.S + ++lsrc_riscv64 += md5_mb/md5_ctx_base.c \ ++ md5_mb/md5_ctx_base_aliases.c ++ + lsrc_base_aliases += md5_mb/md5_ctx_base.c \ + md5_mb/md5_ctx_base_aliases.c + +diff --git a/mh_sha1/Makefile.am b/mh_sha1/Makefile.am +index 42a3213..eeded3e 100644 +--- a/mh_sha1/Makefile.am ++++ b/mh_sha1/Makefile.am +@@ -57,6 +57,10 @@ lsrc_aarch64 += \ + mh_sha1/aarch64/mh_sha1_block_ce.S \ + mh_sha1/aarch64/mh_sha1_ce.c + ++lsrc_riscv64 += \ ++ $(lsrc_mh_sha1_base) \ ++ mh_sha1/mh_sha1_base_aliases.c ++ + lsrc_base_aliases += \ + $(lsrc_mh_sha1_base) \ + mh_sha1/mh_sha1_base_aliases.c +diff --git a/mh_sha1_murmur3_x64_128/Makefile.am b/mh_sha1_murmur3_x64_128/Makefile.am +index a6418ae..f7af4d2 100644 +--- a/mh_sha1_murmur3_x64_128/Makefile.am ++++ b/mh_sha1_murmur3_x64_128/Makefile.am +@@ -56,6 +56,12 @@ lsrc_aarch64 += $(lsrc_murmur) \ + mh_sha1_murmur3_x64_128/aarch64/mh_sha1_murmur3_block_asimd.S \ + mh_sha1_murmur3_x64_128/aarch64/mh_sha1_murmur3_multibinary.S + ++lsrc_riscv64 += $(lsrc_murmur) \ ++ mh_sha1_murmur3_x64_128/mh_sha1_murmur3_x64_128.c \ ++ mh_sha1_murmur3_x64_128/mh_sha1_murmur3_x64_128_finalize_base.c \ ++ mh_sha1_murmur3_x64_128/mh_sha1_murmur3_x64_128_update_base.c \ ++ mh_sha1_murmur3_x64_128/mh_sha1_murmur3_x64_128_base_aliases.c ++ + lsrc_base_aliases += $(lsrc_murmur) \ + mh_sha1_murmur3_x64_128/mh_sha1_murmur3_x64_128.c \ + mh_sha1_murmur3_x64_128/mh_sha1_murmur3_x64_128_finalize_base.c \ +diff --git a/mh_sha256/Makefile.am b/mh_sha256/Makefile.am +index b5f7cf6..615a505 100644 +--- a/mh_sha256/Makefile.am ++++ b/mh_sha256/Makefile.am +@@ -62,6 +62,13 @@ lsrc_aarch64 += $(lsrc_sha256) \ + mh_sha256/mh_sha256_update_base.c \ + mh_sha256/mh_sha256_block_base.c + ++lsrc_riscv64 += $(lsrc_sha256) \ ++ mh_sha256/mh_sha256_base_aliases.c \ ++ mh_sha256/mh_sha256.c \ ++ mh_sha256/mh_sha256_finalize_base.c \ ++ mh_sha256/mh_sha256_update_base.c \ ++ mh_sha256/mh_sha256_block_base.c ++ + lsrc_base_aliases += $(lsrc_sha256) \ + mh_sha256/mh_sha256_base_aliases.c \ + mh_sha256/mh_sha256.c \ +diff --git a/rolling_hash/Makefile.am b/rolling_hash/Makefile.am +index 0f69790..16a8d60 100644 +--- a/rolling_hash/Makefile.am ++++ b/rolling_hash/Makefile.am +@@ -46,6 +46,10 @@ lsrc_aarch64 += rolling_hash/rolling_hashx_base.c \ + rolling_hash/aarch64/rolling_hash2_aarch64_dispatcher.c \ + rolling_hash/aarch64/rolling_hash2_run_until_unroll.S + ++lsrc_riscv64 += rolling_hash/rolling_hashx_base.c \ ++ rolling_hash/rolling_hash2.c \ ++ rolling_hash/rolling_hash2_base_aliases.c ++ + src_include += -I $(srcdir)/rolling_hash + extern_hdrs += include/rolling_hashx.h + +diff --git a/sha1_mb/Makefile.am b/sha1_mb/Makefile.am +index 545e0f9..220afab 100644 +--- a/sha1_mb/Makefile.am ++++ b/sha1_mb/Makefile.am +@@ -79,7 +79,9 @@ lsrc_aarch64 += sha1_mb/sha1_ctx_base.c \ + sha1_mb/aarch64/sha1_mb_mgr_asimd.c \ + sha1_mb/aarch64/sha1_mb_aarch64_dispatcher.c + +- ++lsrc_riscv64 += sha1_mb/sha1_ctx_base_aliases.c \ ++ sha1_mb/sha1_ctx_base.c \ ++ sha1_mb/sha1_ref.c + + lsrc_base_aliases += sha1_mb/sha1_ctx_base_aliases.c \ + sha1_mb/sha1_ctx_base.c \ +diff --git a/sha256_mb/Makefile.am b/sha256_mb/Makefile.am +index 9a79645..57879fa 100644 +--- a/sha256_mb/Makefile.am ++++ b/sha256_mb/Makefile.am +@@ -79,6 +79,9 @@ lsrc_aarch64 += sha256_mb/aarch64/sha256_mb_multibinary.S \ + sha256_mb/aarch64/sha256_mb_x3_ce.S \ + sha256_mb/aarch64/sha256_mb_x4_ce.S + ++lsrc_riscv64 += sha256_mb/sha256_ctx_base_aliases.c \ ++ sha256_mb/sha256_ctx_base.c \ ++ sha256_mb/sha256_ref.c + + lsrc_base_aliases += sha256_mb/sha256_ctx_base_aliases.c \ + sha256_mb/sha256_ctx_base.c \ +diff --git a/sha512_mb/Makefile.am b/sha512_mb/Makefile.am +index de85bd5..6df2442 100644 +--- a/sha512_mb/Makefile.am ++++ b/sha512_mb/Makefile.am +@@ -74,6 +74,9 @@ lsrc_aarch64 += sha512_mb/sha512_ctx_base.c \ + sha512_mb/aarch64/sha512_mb_x1_ce.S \ + sha512_mb/aarch64/sha512_mb_x2_ce.S + ++lsrc_riscv64 += sha512_mb/sha512_ctx_base.c \ ++ sha512_mb/sha512_ctx_base_aliases.c ++ + lsrc_base_aliases += sha512_mb/sha512_ctx_base.c \ + sha512_mb/sha512_ctx_base_aliases.c + +diff --git a/sm3_mb/Makefile.am b/sm3_mb/Makefile.am +index b83a58e..54792c2 100644 +--- a/sm3_mb/Makefile.am ++++ b/sm3_mb/Makefile.am +@@ -54,6 +54,8 @@ lsrc_aarch64 += sm3_mb/sm3_ctx_base.c \ + sm3_mb/aarch64/sm3_mb_asimd_x1.S \ + sm3_mb/aarch64/sm3_mb_asimd_x4.S + ++lsrc_riscv64 += sm3_mb/sm3_ctx_base.c \ ++ sm3_mb/sm3_ctx_base_aliases.c + + src_include += -I $(srcdir)/sm3_mb + +-- +2.51.0 + diff --git a/SPECS/isa-l_crypto/0003-sha1_mb-Add-missing-ISAL_-prefixes-to-base-aliases.patch b/SPECS/isa-l_crypto/0003-sha1_mb-Add-missing-ISAL_-prefixes-to-base-aliases.patch new file mode 100644 index 00000000..ef4cf4c9 --- /dev/null +++ b/SPECS/isa-l_crypto/0003-sha1_mb-Add-missing-ISAL_-prefixes-to-base-aliases.patch @@ -0,0 +1,65 @@ +From 6e62643df9ed6c2c62e287d14f192057189dda8d Mon Sep 17 00:00:00 2001 +From: "Ivan A. Melnikov" +Date: Wed, 31 Jul 2024 17:44:29 +0400 +Subject: [PATCH 01/45] sha1_mb: Add missing ISAL_ prefixes to base aliases + +Commit 0106da915b7024075fc74900ff63fa931ac15475 somehow +missed updating the base aliases, which broke build +on architectures for which SHA1 routines were not +specifically optimized, e.g. loongarch64. + +This commit addresses that. + +Fixes: 0106da915b7024075fc74900ff63fa931ac15475 +Signed-off-by: Ivan A. Melnikov +--- + sha1_mb/sha1_ctx_base_aliases.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/sha1_mb/sha1_ctx_base_aliases.c b/sha1_mb/sha1_ctx_base_aliases.c +index 517cfc1..b0c7643 100644 +--- a/sha1_mb/sha1_ctx_base_aliases.c ++++ b/sha1_mb/sha1_ctx_base_aliases.c +@@ -32,28 +32,28 @@ + #include "memcpy_inline.h" + + extern void +-_sha1_ctx_mgr_init_base(SHA1_HASH_CTX_MGR *mgr); +-extern SHA1_HASH_CTX * +-_sha1_ctx_mgr_submit_base(SHA1_HASH_CTX_MGR *mgr, SHA1_HASH_CTX *ctx, const void *buffer, ++_sha1_ctx_mgr_init_base(ISAL_SHA1_HASH_CTX_MGR *mgr); ++extern ISAL_SHA1_HASH_CTX * ++_sha1_ctx_mgr_submit_base(ISAL_SHA1_HASH_CTX_MGR *mgr, ISAL_SHA1_HASH_CTX *ctx, const void *buffer, + uint32_t len, ISAL_HASH_CTX_FLAG flags); +-extern SHA1_HASH_CTX * +-_sha1_ctx_mgr_flush_base(SHA1_HASH_CTX_MGR *mgr); ++extern ISAL_SHA1_HASH_CTX * ++_sha1_ctx_mgr_flush_base(ISAL_SHA1_HASH_CTX_MGR *mgr); + + void +-_sha1_ctx_mgr_init(SHA1_HASH_CTX_MGR *mgr) ++_sha1_ctx_mgr_init(ISAL_SHA1_HASH_CTX_MGR *mgr) + { + return _sha1_ctx_mgr_init_base(mgr); + } + +-SHA1_HASH_CTX * +-_sha1_ctx_mgr_submit(SHA1_HASH_CTX_MGR *mgr, SHA1_HASH_CTX *ctx, const void *buffer, uint32_t len, +- ISAL_HASH_CTX_FLAG flags) ++ISAL_SHA1_HASH_CTX * ++_sha1_ctx_mgr_submit(ISAL_SHA1_HASH_CTX_MGR *mgr, ISAL_SHA1_HASH_CTX *ctx, const void *buffer, ++ uint32_t len, ISAL_HASH_CTX_FLAG flags) + { + return _sha1_ctx_mgr_submit_base(mgr, ctx, buffer, len, flags); + } + +-SHA1_HASH_CTX * +-_sha1_ctx_mgr_flush(SHA1_HASH_CTX_MGR *mgr) ++ISAL_SHA1_HASH_CTX * ++_sha1_ctx_mgr_flush(ISAL_SHA1_HASH_CTX_MGR *mgr) + { + return _sha1_ctx_mgr_flush_base(mgr); + } +-- +2.51.0 + diff --git a/SPECS/isa-l_crypto/isa-l_crypto.spec b/SPECS/isa-l_crypto/isa-l_crypto.spec new file mode 100644 index 00000000..248b5b16 --- /dev/null +++ b/SPECS/isa-l_crypto/isa-l_crypto.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Julian Zhu +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: isa-l_crypto +Version: 2.25.0 +Release: %autorelease +Summary: Intelligent Storage Acceleration Library with crypto +License: BSD-3-Clause +URL: https://github.com/intel/isa-l_crypto +#!RemoteAsset +Source0: https://github.com/intel/isa-l_crypto/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + + +Patch1: 0001-fips-enable-aes-self-tests-only-on-x86-and-aarch64.patch +Patch2: 0002-build-add-riscv64-support.patch +Patch3: 0003-sha1_mb-Add-missing-ISAL_-prefixes-to-base-aliases.patch + +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +# for tests. +BuildRequires: openssl-devel + +%description +ISA-L_crypto is a collection of optimized low-level functions +targeting storage applications. + +This package contains the shared library. + +%package devel +Summary: Intelligent Storage Acceleration Library with crypto - devel files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +ISA-L_crypto is a collection of optimized low-level functions targeting storage applications. + +This package contains the development files needed to build against the shared library. + +%prep -a +./autogen.sh + +%check +%make_build check +%make_build tests + +%ldconfig_scriptlets + +%files +%{_libdir}/libisal_crypto.so.2* +%license LICENSE + +%files devel +%{_includedir}/isa-l_crypto.h +%{_includedir}/isa-l_crypto +%{_libdir}/libisal_crypto.so +%{_libdir}/pkgconfig/libisal_crypto.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/isl/isl.spec b/SPECS/isl/isl.spec new file mode 100644 index 00000000..49d554e6 --- /dev/null +++ b/SPECS/isl/isl.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define islsover 23 +Name: isl +Version: 0.27 +Release: %autorelease +Summary: Integer Set Library +License: MIT +Group: Development/Languages/C and C++ +URL: https://libisl.sourceforge.io/ +#!RemoteAsset +Source: https://libisl.sourceforge.io/isl-%{version}.tar.xz +BuildRequires: gmp-devel +BuildRequires: pkgconfig + +BuildSystem: autotools +BuildOption(conf): --disable-static + +%description +ISL is a library for manipulating sets and relations of integer points +bounded by linear constraints. +It is used by Cloog and the GCC Graphite optimization framework. + +%package devel +Summary: Development tools for ISL +Group: Development/Languages/C and C++ +Requires: libisl%{islsover} = %{version}-%{release} + +%description devel +Development tools and headers for the ISL. + +%package -n libisl%{islsover} +Summary: The ISL shared library +Group: System/Libraries + +%description -n libisl%{islsover} +The shared library for the ISL. + +ISL is a library for manipulating sets and relations of integer points +bounded by linear constraints. + +%check +%make_build check + +%install -a +rm -f %{buildroot}%{_libdir}/libisl.so.*-gdb.py + +%post -n libisl%{islsover} -p /sbin/ldconfig +%postun -n libisl%{islsover} -p /sbin/ldconfig + +%files -n libisl%{islsover} +%{_libdir}/libisl.so.%{islsover}* + +%files devel +%{_includedir}/isl +%{_libdir}/libisl.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/iso-codes/iso-codes.spec b/SPECS/iso-codes/iso-codes.spec new file mode 100644 index 00000000..855153e1 --- /dev/null +++ b/SPECS/iso-codes/iso-codes.spec @@ -0,0 +1,56 @@ +# Copyright (C) 2025 openruyi +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: iso-codes +Version: 4.18.0 +Release: %autorelease +Summary: ISO Code Lists and Translations +License: LGPL-2.1-or-later +URL: https://salsa.debian.org/iso-codes-team/iso-codes +#!RemoteAsset +Source0: https://salsa.debian.org/iso-codes-team/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(install): INSTALL="%{__install} -p" + +BuildRequires: pkgconfig +BuildRequires: python3-devel +BuildRequires: python3-lxml + +BuildArch: noarch +Provides: iso-codes-lang = %{version} +Obsoletes: iso-codes-lang <= %{version} + +%description +This package provides the ISO-639 language code list, the ISO-3166 +territory code list, ISO-3166-2 subterritory lists, and all their +translations in gettext .po form. + +%package devel +Summary: ISO code lists and translations +Requires: %{name} = %{version} + +%description devel +This package provides the ISO-639 Language code list, the ISO-3166 +Territory code list, and ISO-3166-2 sub-territory lists, and all their + +%install -a +%find_lang %{name} --all-name + +%files -f %{name}.lang +%doc CHANGELOG.md README.md +%license COPYING +%dir %{_datadir}/xml/iso-codes +%{_datadir}/xml/iso-codes/*.xml +%{_datadir}/iso-codes + +%files devel +%{_datadir}/pkgconfig/iso-codes.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/jansson/jansson.spec b/SPECS/jansson/jansson.spec new file mode 100644 index 00000000..e37ca97a --- /dev/null +++ b/SPECS/jansson/jansson.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: jansson +Version: 2.14.1 +Release: %autorelease +Summary: A C library for encoding, decoding and manipulating JSON data +License: MIT +URL: https://www.digip.org/jansson/ +#!RemoteAsset +Source0: https://github.com/akheron/jansson/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +BuildRequires: gcc +BuildRequires: bzip2 +BuildSystem: autotools +BuildOption(conf): --disable-static + +%description +Jansson is a C library for encoding, decoding and manipulating JSON data. + +%package devel +Summary: files for jansson development +Requires: %{name} = %{version}-%{release} +%description devel +files for jansson development + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%files +%license LICENSE +%{_libdir}/libjansson.so.* + +%files devel +%license LICENSE +%doc CHANGES +%{_libdir}/libjansson.so +%{_libdir}/pkgconfig/jansson.pc +%{_includedir}/jansson*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/jitterentropy/jitterentropy.spec b/SPECS/jitterentropy/jitterentropy.spec new file mode 100644 index 00000000..9ef8a8d9 --- /dev/null +++ b/SPECS/jitterentropy/jitterentropy.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: jitterentropy +Version: 3.6.3 +Release: %autorelease +Summary: A library for hardware RNG based on CPU timing jitter +License: BSD-3-Clause OR GPL-2.0-only +URL: https://www.chronox.de/jent/ +#!RemoteAsset +Source0: https://www.chronox.de/jent/releases/%{version}/%{name}-library-%{version}.tar.xz + +BuildSystem: autotools + +BuildOption(build): LDFLAGS="-lpthread" +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): LIBDIR=%{_lib} + +BuildRequires: gcc +BuildRequires: make + +%description +The Jitter RNG provides a noise source using the CPU execution timing jitter. +This package contains the runtime shared library needed by applications. + +%package devel +Summary: Development files for the jitterentropy library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files, development symlinks, and static +library for compiling applications that use the jitterentropy library. + +%conf +# No configure + +%build -p +sed -e '/\tgzip .*\/man\// d' -i Makefile +sed -e 's/$(INSTALL_STRIP)/install/' -i Makefile + +# no tests +%check + +%ldconfig_scriptlets + +%files +%license LICENSE LICENSE.bsd LICENSE.gplv2 +%doc README.md +%{_libdir}/libjitterentropy.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/libjitterentropy.so +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/jose/jose.spec b/SPECS/jose/jose.spec new file mode 100644 index 00000000..024c10b1 --- /dev/null +++ b/SPECS/jose/jose.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: jose +Version: 14 +Release: %autorelease +Summary: A C-language implementation of Javascript Object Signing and Encryption +License: Apache-2.0 +URL: https://github.com/latchset/jose +#!RemoteAsset +Source0: https://github.com/latchset/jose/releases/download/v%{version}/jose-%{version}.tar.xz +BuildSystem: meson + +BuildOption(conf): -Ddocs=disabled + +BuildRequires: gcc meson ninja +BuildRequires: jansson-devel +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(zlib) + +%description +José is a C-language implementation of the Javascript Object Signing and +Encryption (JOSE) standards. It provides a command-line utility which +encompasses most of the JOSE features, allowing for easy integration into +projects and one-off scripts. + +%package devel +Summary: Development libraries and files for libjose +Requires: %{name} = %{version} +Requires: pkgconfig(jansson) + +%description devel +This package contains the libraries, header files, and documentation for +developing applications that use the José library. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +rm -f %{buildroot}%{_licensedir}/%{name}/COPYING + +%ldconfig_scriptlets + +%files +%license COPYING +%{_bindir}/jose +%{_libdir}/libjose.so.* + +%files devel +%doc COPYING +%dir %{_includedir}/jose +%{_includedir}/jose/*.h +%{_libdir}/libjose.so +%{_libdir}/pkgconfig/jose.pc +%{_mandir}/man3/jose*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/jq/jq.spec b/SPECS/jq/jq.spec new file mode 100644 index 00000000..d13308fa --- /dev/null +++ b/SPECS/jq/jq.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond valgrind 0 + +Name: jq +Version: 1.8.1 +Release: %autorelease +Summary: A lightweight and flexible command-line JSON processor +License: MIT AND ICU AND CC-BY-3.0 +URL: https://jqlang.org/ +#!RemoteAsset +Source0: https://github.com/jqlang/jq/releases/download/jq-%{version}/jq-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: flex +BuildRequires: bison +BuildRequires: chrpath +BuildRequires: oniguruma-devel +%if %{with valgrind} +BuildRequires: valgrind +%endif + +%description +jq is a lightweight and flexible command-line JSON processor. +You can use it to slice and filter and map and transform structured data. +It is written in portable C, and it has zero runtime dependencies. +It can mangle the data format that you have into the one that you want. + +%package devel +Summary: Development files for jq +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for jq. + +%package help +Summary: Documentation and man pages for jq +BuildArch: noarch + +%description help +Documentation (README, NEWS) and the jq(1) man page. + +%install -a +chrpath -d %{buildroot}%{_bindir}/%{name} + +%files +%license %{_docdir}/jq/COPYING +%doc %{_docdir}/jq/AUTHORS +%{_bindir}/jq +%{_libdir}/libjq.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/libjq.so +%{_libdir}/pkgconfig/libjq.pc + +%files help +%doc %{_docdir}/jq/README.md +%doc %{_docdir}/jq/NEWS.md +%{_mandir}/man1/jq.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/json-c/json-c.spec b/SPECS/json-c/json-c.spec new file mode 100644 index 00000000..f08c9b97 --- /dev/null +++ b/SPECS/json-c/json-c.spec @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define version_date 20240915 +Name: json-c +Version: 0.18 +Release: %autorelease +Summary: JSON implementation in C +License: MIT +URL: https://github.com/json-c/json-c +#!RemoteAsset +Source0: https://github.com/json-c/json-c/archive/json-c-%{version}-%{version_date}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_INSTALL_PREFIX=%{_prefix} +BuildOption(conf): -DENABLE_THREADING=ON +BuildOption(conf): -DENABLE_RDRAND=ON +BuildOption(conf): -DBUILD_STATIC_LIBS=ON +BuildOption(conf): -DBUILD_SHARED_LIBS=ON +# The json-c declaration depends on an outdated version of cmake. +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +BuildRequires: cmake +BuildRequires: libtool + +%description +JSON-C implements a reference counting object model that allows you to +easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C +representation of JSON objects. This package contains the runtime library +and documentation. + +%package devel +Summary: Development headers and libraries for json-c +Requires: %{name} = %{version} + +%description devel +This package includes header files, static libraries, and other files +needed for developing applications that use the json-c library. + +%prep +%autosetup -p1 -n json-c-json-c-%{version}-%{version_date} + +%check -p +export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}-build/%{_lib} + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +(cd %{buildroot}%{_libdir}/pkgconfig && ln -s json-c.pc json.pc) +mkdir -p "%{buildroot}%{_docdir}/%{name}" +cp -R doc/html "%{buildroot}%{_docdir}/%{name}/" + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS ChangeLog README.md +%{_docdir}/%{name}/ +%{_libdir}/libjson-c.so.* + +%files devel +%{_libdir}/libjson-c.so +%{_includedir}/json-c +%{_libdir}/pkgconfig/*.pc +%dir %{_libdir}/cmake/json-c +%{_libdir}/cmake/json-c/json-c-config.cmake +%{_libdir}/cmake/json-c/json-c-targets-*.cmake +%{_libdir}/cmake/json-c/json-c-targets.cmake +%{_libdir}/libjson-c.a + +%changelog +%{?autochangelog} diff --git a/SPECS/jsoncpp/jsoncpp.spec b/SPECS/jsoncpp/jsoncpp.spec new file mode 100644 index 00000000..665c0178 --- /dev/null +++ b/SPECS/jsoncpp/jsoncpp.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: jsoncpp +Version: 1.9.6 +Release: %autorelease +Summary: A C++ library for manipulating JSON values +License: MIT +URL: https://github.com/open-source-parsers/jsoncpp +#!RemoteAsset +Source0: https://github.com/open-source-parsers/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildSystem: meson + +BuildRequires: gcc-c++ +BuildRequires: meson >= 0.50.0 +BuildRequires: pkgconfig + +%description +JsonCpp is a C++ library that allows manipulating JSON values. This package +contains the runtime shared library. + +%package devel +Summary: Development files for the jsoncpp library +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and CMake files needed to +develop applications that use the JsonCpp library. + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libjsoncpp.so.* + +%files devel +%license LICENSE +%doc AUTHORS README.md +%dir %{_libdir}/cmake/jsoncpp/ +%dir %{_libdir}/cmake +%{_libdir}/pkgconfig/jsoncpp.pc +%{_libdir}/cmake/jsoncpp/jsoncppConfig.cmake +%{_libdir}/cmake/jsoncpp/jsoncpp-namespaced-targets.cmake +%{_libdir}/libjsoncpp.so +%{_includedir}/json/ + +%changelog +%{?autochangelog} diff --git a/SPECS/kbd/kbd.spec b/SPECS/kbd/kbd.spec new file mode 100644 index 00000000..96b57af6 --- /dev/null +++ b/SPECS/kbd/kbd.spec @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond nls 0 + +# It is traditionally used for kdb data (console fonts, keymaps, ...). +%global kbd_datadir %{_libdir}/kbd + +Name: kbd +Version: 2.8.0 +Release: %autorelease +Summary: Tools for configuring the console (keyboard, virtual terminals, etc.) +License: GPL-2.0-or-late +URL: http://www.kbd-project.org/ +#!RemoteAsset +Source0: https://www.kernel.org/pub/linux/utils/%{name}/%{name}-%{version}.tar.xz +Source1: vlock.pamd +BuildSystem: autotools + +BuildOption(conf): --prefix=%{_prefix} +BuildOption(conf): --datadir=%{kbd_datadir} +BuildOption(conf): --mandir=%{_mandir} +BuildOption(conf): --localedir=%{_datadir}/locale + +%if %{with nls} +BuildOption(conf): --enable-nls +%else +BuildOption(conf): --disable-nls +%endif + +BuildOption(conf): --disable-tests +BuildOption(build): KEYCODES_PROGS=yes +BuildOption(build): RESIZECONS_PROGS=yes +BuildOption(install): KEYCODES_PROGS=yes +BuildOption(install): RESIZECONS_PROGS=yes + +BuildRequires: bison +BuildRequires: flex + +%if %{with nls} +BuildRequires: gettext +%endif + +BuildRequires: pam-devel +BuildRequires: make +BuildRequires: automake + +%description +The %{name} package contains tools for managing a Linux +system's console's behavior, including the keyboard, the screen +fonts, the virtual terminals and font files. + +%prep -a +aclocal +autoconf -fiv + +%install -a +# Install PAM configuration for vlock +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d +install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/vlock +%if %{with nls} +%find_lang %{name} --generate-subpackages +%endif + +%files +%license COPYING +%doc ChangeLog AUTHORS README docs/doc/font-formats/*.html docs/doc/dvorak/* +%{_bindir}/* +%{_mandir}/*/* +%config(noreplace) %{_sysconfdir}/pam.d/vlock +%{kbd_datadir}/consolefonts/* +%{kbd_datadir}/consoletrans/* +%{kbd_datadir}/unimaps/* +%{kbd_datadir}/keymaps/* + +%changelog +%{?autochangelog} diff --git a/SPECS/kbd/vlock.pamd b/SPECS/kbd/vlock.pamd new file mode 100644 index 00000000..c6a7c9c9 --- /dev/null +++ b/SPECS/kbd/vlock.pamd @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include common-auth +account include common-account +password include common-password +session include common-session diff --git a/SPECS/keepalived/keepalived.service b/SPECS/keepalived/keepalived.service new file mode 100644 index 00000000..399f5cb1 --- /dev/null +++ b/SPECS/keepalived/keepalived.service @@ -0,0 +1,14 @@ +[Unit] +Description=LVS and VRRP High Availability Monitor +After=network-online.target syslog.target +Wants=network-online.target +[Service] +Type=notify +NotifyAccess=all +PIDFile=/run/keepalived.pid +KillMode=process +EnvironmentFile=-/etc/sysconfig/keepalived +ExecStart=/usr/sbin/keepalived --dont-fork $KEEPALIVED_OPTIONS +ExecReload=/bin/kill -HUP $MAINPID +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/SPECS/keepalived/keepalived.spec b/SPECS/keepalived/keepalived.spec new file mode 100644 index 00000000..66d32daa --- /dev/null +++ b/SPECS/keepalived/keepalived.spec @@ -0,0 +1,119 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond snmp 0 +%bcond vrrp 1 +%bcond sha1 1 +%bcond json 1 +%bcond nftables 1 +%bcond profile 1 +%bcond debug 1 + +Name: keepalived +Version: 2.2.8 +Release: %autorelease +Summary: High Availability monitor for LVS and VRRP +License: GPL-2.0-or-later +URL: http://www.keepalived.org/ +#!RemoteAsset +Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz +Source1: keepalived.service +BuildSystem: autotools + +%if %{with debug} +BuildOption(conf): --enable-debug +%endif +%if %{with profile} +BuildOption(conf): --enable-profile +%endif +%if %{without vrrp} +BuildOption(conf): --disable-vrrp +%endif +%if %{with snmp} +BuildOption(conf): --enable-snmp --enable-snmp-rfc +%endif +%if %{with nftables} +BuildOption(conf): --enable-nftables --disable-iptables +%endif +%if %{with json} +BuildOption(conf): --enable-json +%endif +%if %{with sha1} +BuildOption(conf): --enable-sha1 +%endif +BuildOption(conf): --with-init=systemd + +BuildOption(build): STRIP=/bin/true + +%if %{with snmp} +BuildRequires: net-snmp-devel +%endif +%if %{with nftables} +BuildRequires: libmnl-devel +BuildRequires: libnftnl-devel +%else +BuildRequires: ipset-devel +BuildRequires: iptables-devel +%endif +BuildRequires: gcc +BuildRequires: systemd-devel +BuildRequires: openssl-devel +BuildRequires: libnl-devel +BuildRequires: libnfnetlink-devel +BuildRequires: file-devel +BuildRequires: make + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +Keepalived provides simple and robust facilities for load balancing +and high availability to Linux systems. It implements a set of checkers to +dynamically manage a load-balanced server pool according to their health, +and uses the VRRP protocol for high availability. + +%install -a +rm -rf %{buildroot}%{_initrddir}/ +rm -rf %{buildroot}%{_sysconfdir}/keepalived/samples/ +mv %{buildroot}%{_sysconfdir}/keepalived/keepalived.conf.sample \ + %{buildroot}%{_sysconfdir}/keepalived/keepalived.conf +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/keepalived.service +mkdir -p %{buildroot}%{_libexecdir}/keepalived + +%post +%systemd_post keepalived.service + +%preun +%systemd_preun keepalived.service + +%postun +%systemd_postun_with_restart keepalived.service + +%files +%license COPYING +%doc AUTHOR ChangeLog CONTRIBUTORS TODO +%{_docdir}/%{name}/README +%doc doc/keepalived.conf.SYNOPSIS doc/samples/keepalived.conf.* +%attr(0755,root,root) %{_sbindir}/keepalived +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/keepalived +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/keepalived/keepalived.conf +%dir %{_sysconfdir}/keepalived/ +%dir %{_libexecdir}/keepalived/ +%if %{with snmp} +%{_datadir}/snmp/mibs/KEEPALIVED-MIB.txt +%{_datadir}/snmp/mibs/VRRP-MIB.txt +%{_datadir}/snmp/mibs/VRRPv3-MIB.txt +%endif +%{_bindir}/genhash +%{_unitdir}/keepalived.service +%{_mandir}/man1/genhash.1* +%{_mandir}/man5/keepalived.conf.5* +%{_mandir}/man8/keepalived.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/kexec-tools/add-riscv64-support.patch b/SPECS/kexec-tools/add-riscv64-support.patch new file mode 100644 index 00000000..332f7554 --- /dev/null +++ b/SPECS/kexec-tools/add-riscv64-support.patch @@ -0,0 +1,1537 @@ +From kexec Thu Oct 20 03:15:48 2022 +From: Xianting Tian +Date: Thu, 20 Oct 2022 03:15:48 +0000 +To: kexec +Subject: [PATCH V2] RISC-V: Add support for riscv kexec/kdump on kexec-tools +Message-Id: <20221020031548.47587-1-xianting.tian () linux ! alibaba ! com> +X-MARC-Message: https://marc.info/?l=kexec&m=166636009110699 + +From: Nick Kossifidis + +This patch adds support for loading the ELF kernel image. It parses +the current/provided device tree to determine the system's memory +layout, and /proc/iomem for the various kernel segments. + +This patch was firstly developed by Nick Kossifidis, and two fixes ( + 1: fail to find free memory area for dtb load when using initrd image, + lists.infradead.org/pipermail/linux-riscv/2022-August/018398.html; + 2: fix memory range size calculation, + kexec/arch/riscv/crashdump-riscv.c:line 85 +) are contributed by Yixun Lan, Xianting Tian. + +Tested on Qemu's rv64 virt machine and SoC of T-Head RISC-V Xuantie 910 CPU. + +Tested-by: Yixun Lan +Co-developed-by: Xianting Tian +Co-developed-by: Yixun Lan +Signed-off-by: Nick Kossifidis +--- +Changes + V1 -> V2: + 1, Rebase the patch to latest kexec code. + 2, Set patch author Nick Kossifidis. + + configure.ac | 3 + + include/elf.h | 1 + + kexec/Makefile | 1 + + kexec/arch/riscv/Makefile | 35 ++ + kexec/arch/riscv/crashdump-riscv.c | 140 ++++++++ + kexec/arch/riscv/include/arch/options.h | 43 +++ + kexec/arch/riscv/kexec-elf-riscv.c | 255 ++++++++++++++ + kexec/arch/riscv/kexec-riscv.c | 365 +++++++++++++++++++ + kexec/arch/riscv/kexec-riscv.h | 32 ++ + kexec/dt-ops.c | 442 +++++++++++++++++++++++- + kexec/dt-ops.h | 7 + + kexec/kexec-syscall.h | 4 + + purgatory/Makefile | 1 + + purgatory/arch/riscv/Makefile | 7 + + 14 files changed, 1335 insertions(+), 1 deletion(-) + create mode 100644 kexec/arch/riscv/Makefile + create mode 100644 kexec/arch/riscv/crashdump-riscv.c + create mode 100644 kexec/arch/riscv/include/arch/options.h + create mode 100644 kexec/arch/riscv/kexec-elf-riscv.c + create mode 100644 kexec/arch/riscv/kexec-riscv.c + create mode 100644 kexec/arch/riscv/kexec-riscv.h + create mode 100644 purgatory/arch/riscv/Makefile + +diff --git a/configure.ac b/configure.ac +index d081c82..9204c37 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,9 @@ case $target_cpu in + loongarch*) + ARCH="loongarch" + ;; ++ riscv32|riscv64) ++ ARCH="riscv" ++ ;; + * ) + AC_MSG_ERROR([unsupported architecture $target_cpu]) + ;; +diff --git a/include/elf.h b/include/elf.h +index 1c8d2cc..93a5ee5 100644 +--- a/include/elf.h ++++ b/include/elf.h +@@ -259,6 +259,7 @@ typedef struct + #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ + #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ + #define EM_AARCH64 183 /* ARM AARCH64 */ ++#define EM_RISCV 243 /* RISC-V */ + #define EM_LOONGARCH 258 /* Loongson Loongarch*/ + #define EM_NUM 184 + +diff --git a/kexec/Makefile b/kexec/Makefile +index 8a52e8d..405864a 100644 +--- a/kexec/Makefile ++++ b/kexec/Makefile +@@ -88,6 +88,7 @@ include $(srcdir)/kexec/arch/mips/Makefile + include $(srcdir)/kexec/arch/cris/Makefile + include $(srcdir)/kexec/arch/ppc/Makefile + include $(srcdir)/kexec/arch/ppc64/Makefile ++include $(srcdir)/kexec/arch/riscv/Makefile + include $(srcdir)/kexec/arch/s390/Makefile + include $(srcdir)/kexec/arch/sh/Makefile + include $(srcdir)/kexec/arch/x86_64/Makefile +diff --git a/kexec/arch/riscv/Makefile b/kexec/arch/riscv/Makefile +new file mode 100644 +index 0000000..f26cc90 +--- /dev/null ++++ b/kexec/arch/riscv/Makefile +@@ -0,0 +1,35 @@ ++# ++# kexec riscv ++# ++riscv_KEXEC_SRCS = kexec/arch/riscv/kexec-riscv.c ++riscv_KEXEC_SRCS += kexec/arch/riscv/kexec-elf-riscv.c ++riscv_KEXEC_SRCS += kexec/arch/riscv/crashdump-riscv.c ++ ++riscv_MEM_REGIONS = kexec/mem_regions.c ++ ++riscv_DT_OPS += kexec/dt-ops.c ++ ++riscv_ARCH_REUSE_INITRD = ++ ++riscv_CPPFLAGS += -I $(srcdir)/kexec/ ++ ++dist += kexec/arch/riscv/Makefile $(riscv_KEXEC_SRCS) \ ++ kexec/arch/riscv/kexec-riscv.h \ ++ kexec/arch/riscv/include/arch/options.h ++ ++ifdef HAVE_LIBFDT ++ ++LIBS += -lfdt ++ ++else ++ ++include $(srcdir)/kexec/libfdt/Makefile.libfdt ++ ++libfdt_SRCS += $(LIBFDT_SRCS:%=kexec/libfdt/%) ++ ++riscv_CPPFLAGS += -I$(srcdir)/kexec/libfdt ++ ++riscv_KEXEC_SRCS += $(libfdt_SRCS) ++ ++endif ++ +diff --git a/kexec/arch/riscv/crashdump-riscv.c b/kexec/arch/riscv/crashdump-riscv.c +new file mode 100644 +index 0000000..3ed4fe3 +--- /dev/null ++++ b/kexec/arch/riscv/crashdump-riscv.c +@@ -0,0 +1,140 @@ ++#include ++#include ++#include ++ ++#include "kexec.h" ++#include "crashdump.h" ++#include "kexec-elf.h" ++#include "mem_regions.h" ++ ++static struct crash_elf_info elf_info = { ++#if __riscv_xlen == 64 ++ .class = ELFCLASS64, ++#else ++ .class = ELFCLASS32, ++#endif ++ .data = ELFDATA2LSB, ++ .machine = EM_RISCV, ++}; ++ ++static struct memory_ranges crash_mem_ranges = {0}; ++struct memory_range elfcorehdr_mem = {0}; ++ ++static unsigned long long get_page_offset(struct kexec_info *info) ++{ ++ unsigned long long vaddr_off = 0; ++ unsigned long long page_size = sysconf(_SC_PAGESIZE); ++ unsigned long long init_start = get_kernel_sym("_sinittext"); ++ ++ /* ++ * Begining of init section is aligned to page size ++ */ ++ vaddr_off = init_start - page_size; ++ ++ return vaddr_off; ++} ++ ++int load_elfcorehdr(struct kexec_info *info) ++{ ++ struct memory_range crashkern_range = {0}; ++ struct memory_range *ranges = NULL; ++ unsigned long start = 0; ++ unsigned long end = 0; ++ unsigned long buf_size = 0; ++ unsigned long elfcorehdr_addr = 0; ++ void* buf = NULL; ++ int i = 0; ++ int ret = 0; ++ ++ ret = parse_iomem_single("Kernel code\n", &start, NULL); ++ if (ret) { ++ fprintf(stderr, "Cannot determine kernel physical base addr\n"); ++ return -EINVAL; ++ } ++ elf_info.kern_paddr_start = start; ++ ++ ret = parse_iomem_single("Kernel bss\n", NULL, &end); ++ if (ret) { ++ fprintf(stderr, "Cannot determine kernel physical bss addr\n"); ++ return -EINVAL; ++ } ++ elf_info.kern_paddr_start = start; ++ elf_info.kern_size = end - start; ++ ++ elf_info.kern_vaddr_start = get_kernel_sym("_text"); ++ if (!elf_info.kern_vaddr_start) { ++ elf_info.kern_vaddr_start = UINT64_MAX; ++ } ++ ++ elf_info.page_offset = get_page_offset(info); ++ dbgprintf("page_offset: %016llx\n", elf_info.page_offset); ++ ++ ret = parse_iomem_single("Crash kernel\n", &start, &end); ++ if (ret) { ++ fprintf(stderr, "Cannot determine kernel physical bss addr\n"); ++ return -EINVAL; ++ } ++ crashkern_range.start = start; ++ crashkern_range.end = end; ++ crashkern_range.type = RANGE_RESERVED; ++ ++ ranges = info->memory_range; ++ for (i = 0; i < info->memory_ranges; i++) { ++ ret = mem_regions_alloc_and_add(&crash_mem_ranges, ++ ranges[i].start, ++ ranges[i].end - ranges[i].start + 1, ++ ranges[i].type); ++ if (ret ) { ++ fprintf(stderr, "Could not create crash_mem_ranges\n"); ++ return ret; ++ } ++ } ++ ++ ret = mem_regions_alloc_and_exclude(&crash_mem_ranges, ++ &crashkern_range); ++ if (ret) { ++ fprintf(stderr, "Could not exclude crashkern_range\n"); ++ return ret; ++ } ++ ++#if __riscv_xlen == 64 ++ crash_create_elf64_headers(info, &elf_info, crash_mem_ranges.ranges, ++ crash_mem_ranges.size, &buf, &buf_size, ++ ELF_CORE_HEADER_ALIGN); ++ ++#else ++ crash_create_elf32_headers(info, &elf_info, crash_mem_ranges.ranges, ++ crash_mem_ranges.size, &buf, &buf_size, ++ ELF_CORE_HEADER_ALIGN); ++#endif ++ ++ ++ elfcorehdr_addr = add_buffer_phys_virt(info, buf, buf_size, ++ buf_size, 0, ++ crashkern_range.start, ++ crashkern_range.end, ++ -1, 0); ++ ++ elfcorehdr_mem.start = elfcorehdr_addr; ++ elfcorehdr_mem.end = elfcorehdr_addr + buf_size - 1; ++ ++ dbgprintf("%s: elfcorehdr 0x%llx-0x%llx\n", __func__, ++ elfcorehdr_mem.start, elfcorehdr_mem.end); ++ ++ return 0; ++} ++ ++int is_crashkernel_mem_reserved(void) ++{ ++ uint64_t start = 0; ++ uint64_t end = 0; ++ ++ return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ? ++ (start != end) : 0; ++} ++ ++int get_crash_kernel_load_range(uint64_t *start, uint64_t *end) ++{ ++ return parse_iomem_single("Crash kernel\n", start, end); ++} ++ +diff --git a/kexec/arch/riscv/include/arch/options.h b/kexec/arch/riscv/include/arch/options.h +new file mode 100644 +index 0000000..7c24184 +--- /dev/null ++++ b/kexec/arch/riscv/include/arch/options.h +@@ -0,0 +1,43 @@ ++#ifndef KEXEC_ARCH_RISCV_OPTIONS_H ++#define KEXEC_ARCH_RISCV_OPTIONS_H ++ ++#define OPT_APPEND ((OPT_MAX)+0) ++#define OPT_DTB ((OPT_MAX)+1) ++#define OPT_INITRD ((OPT_MAX)+2) ++#define OPT_CMDLINE ((OPT_MAX)+3) ++#define OPT_REUSE_CMDLINE ((OPT_MAX)+4) ++#define OPT_ARCH_MAX ((OPT_MAX)+5) ++ ++/* Options relevant to the architecture (excluding loader-specific ones), ++ * in this case none: ++ */ ++#define KEXEC_ARCH_OPTIONS \ ++ KEXEC_OPTIONS \ ++ { "append", 1, 0, OPT_APPEND}, \ ++ { "dtb", 1, 0, OPT_DTB }, \ ++ { "initrd", 1, 0, OPT_INITRD }, \ ++ { "command-line", 1, 0, OPT_CMDLINE}, \ ++ { "reuse-cmdline", 0, NULL, OPT_REUSE_CMDLINE }, \ ++ ++ ++#define KEXEC_ARCH_OPT_STR KEXEC_OPT_STR "" ++ ++/* The following two #defines list ALL of the options added by all of the ++ * architecture's loaders. ++ * o main() uses this complete list to scan for its options, ignoring ++ * arch-specific/loader-specific ones. ++ * o Then, arch_process_options() uses this complete list to scan for its ++ * options, ignoring general/loader-specific ones. ++ * o Then, the file_type[n].load re-scans for options, using ++ * KEXEC_ARCH_OPTIONS plus its loader-specific options subset. ++ * Any unrecognised options cause an error here. ++ * ++ * This is done so that main()'s/arch_process_options()'s getopt_long() calls ++ * don't choose a kernel filename from random arguments to options they don't ++ * recognise -- as they now recognise (if not act upon) all possible options. ++ */ ++#define KEXEC_ALL_OPTIONS KEXEC_ARCH_OPTIONS ++ ++#define KEXEC_ALL_OPT_STR KEXEC_ARCH_OPT_STR ++ ++#endif /* KEXEC_ARCH_RISCV_OPTIONS_H */ +diff --git a/kexec/arch/riscv/kexec-elf-riscv.c b/kexec/arch/riscv/kexec-elf-riscv.c +new file mode 100644 +index 0000000..f3c011c +--- /dev/null ++++ b/kexec/arch/riscv/kexec-elf-riscv.c +@@ -0,0 +1,255 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * Copyright (C) 2019 FORTH-ICS/CARV ++ * Nick Kossifidis ++ */ ++ ++#include "kexec.h" ++#include "dt-ops.h" /* For dtb_set/clear_initrd() */ ++#include /* For ELF header handling */ ++#include /* For EFBIG/EINVAL */ ++#include /* For getpagesize() */ ++#include "kexec-syscall.h" /* For KEXEC_ON_CRASH */ ++#include "kexec-riscv.h" ++ ++ ++/*********\ ++* HELPERS * ++\*********/ ++ ++/* ++ * Go through the available physical memory regions and ++ * find one that can hold an image of the specified size. ++ * Note: This is called after get_memory_ranges so ++ * info->memory_range[] should be populated. Also note that ++ * memory ranges are sorted, so we'll return the first region ++ * that's big enough for holding the image. ++ */ ++static int elf_riscv_find_pbase(struct kexec_info *info, off_t *addr, ++ off_t size) ++{ ++ int i = 0; ++ off_t start = 0; ++ off_t end = 0; ++ int ret = 0; ++ ++ /* ++ * If this image is for a crash kernel, use the region ++ * the primary kernel has already reserved for us. ++ */ ++ if (info->kexec_flags & KEXEC_ON_CRASH) { ++ ret = get_crash_kernel_load_range((uint64_t *) &start, ++ (uint64_t *) &end); ++ if (!ret) { ++ /* ++ * Kernel should be aligned to the nearest ++ * hugepage (2MB for RV64, 4MB for RV32). ++ */ ++#if __riscv_xlen == 64 ++ start = _ALIGN_UP(start, 0x200000); ++#else ++ start = _ALIGN_UP(start, 0x400000); ++#endif ++ if (end > start && ((end - start) >= size)) { ++ *addr = start; ++ return 0; ++ } ++ ++ return -EFBIG; ++ } else ++ return ENOCRASHKERNEL; ++ } ++ ++ for (i = 0; i < info->memory_ranges; i++) { ++ if (info->memory_range[i].type != RANGE_RAM) ++ continue; ++ ++ start = info->memory_range[i].start; ++ end = info->memory_range[i].end; ++ ++#if __riscv_xlen == 64 ++ start = _ALIGN_UP(start, 0x200000); ++#else ++ start = _ALIGN_UP(start, 0x400000); ++#endif ++ ++ if (end > start && ((end - start) >= size)) { ++ *addr = start; ++ return 0; ++ } ++ } ++ ++ return -EFBIG; ++} ++ ++/**************\ ++* ENTRY POINTS * ++\**************/ ++ ++int elf_riscv_probe(const char *buf, off_t len) ++{ ++ struct mem_ehdr ehdr = {0}; ++ int ret = 0; ++ ++ ret = build_elf_exec_info(buf, len, &ehdr, 0); ++ if (ret < 0) ++ goto cleanup; ++ ++ if (ehdr.e_machine != EM_RISCV) { ++ fprintf(stderr, "Not for this architecture.\n"); ++ ret = -EINVAL; ++ goto cleanup; ++ } ++ ++ ret = 0; ++ ++ cleanup: ++ free_elf_info(&ehdr); ++ return ret; ++} ++ ++void elf_riscv_usage(void) ++{ ++} ++ ++int elf_riscv_load(int argc, char **argv, const char *buf, off_t len, ++ struct kexec_info *info) ++{ ++ struct mem_ehdr ehdr = {0}; ++ struct mem_phdr *phdr = NULL; ++ off_t new_base_addr = 0; ++ off_t kernel_size = 0; ++ off_t page_size = getpagesize(); ++ off_t max_addr = 0; ++ off_t old_base_addr = 0; ++ off_t old_start_addr = 0; ++ int i = 0; ++ int ret = 0; ++ ++ if (info->file_mode) { ++ fprintf(stderr, "kexec_file not supported on this " ++ "architecture\n"); ++ return -EINVAL; ++ } ++ ++ /* Parse the ELF file */ ++ ret = build_elf_exec_info(buf, len, &ehdr, 0); ++ if (ret < 0) { ++ fprintf(stderr, "ELF exec parse failed\n"); ++ return -EINVAL; ++ } ++ ++ max_addr = elf_max_addr(&ehdr); ++ old_base_addr = max_addr; ++ old_start_addr = max_addr; ++ ++ /* ++ * Get the memory footprint, base physical ++ * and start address of the ELF image ++ */ ++ for (i = 0; i < ehdr.e_phnum; i++) { ++ phdr = &ehdr.e_phdr[i]; ++ if (phdr->p_type != PT_LOAD) ++ continue; ++ ++ /* ++ * Note: According to ELF spec the loadable regions ++ * are sorted on p_vaddr, not p_paddr. ++ */ ++ if (old_base_addr > phdr->p_paddr) ++ old_base_addr = phdr->p_paddr; ++ ++ if (phdr->p_vaddr == ehdr.e_entry || ++ phdr->p_paddr == ehdr.e_entry) ++ old_start_addr = phdr->p_paddr; ++ ++ kernel_size += _ALIGN_UP(phdr->p_memsz, page_size); ++ } ++ ++ if (old_base_addr == max_addr || kernel_size == 0) { ++ fprintf(stderr, "No loadable segments present on the " ++ "provided ELF image\n"); ++ return -EINVAL; ++ } ++ ++ if (old_start_addr == max_addr) { ++ fprintf(stderr, "Could not find the entry point address of " ++ "provided ELF image\n"); ++ return -EINVAL; ++ } ++ ++ dbgprintf("Got ELF with total memsz %luKB\n" ++ "Base paddr: 0x%lX, start_addr: 0x%lX\n", ++ kernel_size / 1024, old_base_addr, old_start_addr); ++ ++ /* Get a continuous physical region that can hold the kernel */ ++ ret = elf_riscv_find_pbase(info, &new_base_addr, kernel_size); ++ if (ret < 0) { ++ fprintf(stderr, "Could not find a memory region for the " ++ "provided ELF image\n"); ++ return ret; ++ } ++ ++ dbgprintf("New base paddr for the ELF: 0x%lX\n", new_base_addr); ++ ++ /* Re-set the base physical address of the ELF */ ++ for (i = 0; i < ehdr.e_phnum; i++) { ++ phdr = &ehdr.e_phdr[i]; ++ if (phdr->p_type != PT_LOAD) ++ continue; ++ ++ phdr->p_paddr -= old_base_addr; ++ phdr->p_paddr += new_base_addr; ++ } ++ ++ /* Re-set the entry point address */ ++ ehdr.e_entry = (old_start_addr - old_base_addr) + new_base_addr; ++ info->entry = (void *) ehdr.e_entry; ++ dbgprintf("New entry point for the ELF: 0x%llX\n", ehdr.e_entry); ++ ++ ++ /* Load the ELF executable */ ++ ret = elf_exec_load(&ehdr, info); ++ if (ret < 0) { ++ fprintf(stderr, "ELF exec load failed\n"); ++ return ret; ++ } ++ ++ ret = load_extra_segments(info, new_base_addr, ++ kernel_size, max_addr); ++ return ret; ++} ++ ++ ++/*******\ ++* STUBS * ++\*******/ ++ ++int machine_verify_elf_rel(struct mem_ehdr *ehdr) ++{ ++ if (ehdr->ei_data != ELFDATA2LSB) ++ return 0; ++#if __riscv_xlen == 64 ++ if (ehdr->ei_class != ELFCLASS64) ++#else ++ if (ehdr->ei_class != ELFCLASS32) ++#endif ++ return 0; ++ if (ehdr->e_machine != EM_RISCV) ++ return 0; ++ return 1; ++} ++ ++void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), ++ struct mem_sym *UNUSED(sym), ++ unsigned long r_type, ++ void *UNUSED(location), ++ unsigned long UNUSED(address), ++ unsigned long UNUSED(value)) ++{ ++ switch (r_type) { ++ default: ++ die("Unknown rela relocation: %lu\n", r_type); ++ break; ++ } ++} +diff --git a/kexec/arch/riscv/kexec-riscv.c b/kexec/arch/riscv/kexec-riscv.c +new file mode 100644 +index 0000000..fe5dd2d +--- /dev/null ++++ b/kexec/arch/riscv/kexec-riscv.c +@@ -0,0 +1,365 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * Copyright (C) 2019 FORTH-ICS/CARV ++ * Nick Kossifidis ++ */ ++ ++#include "kexec-syscall.h" /* For KEXEC_ARCH_RISCV */ ++#include "kexec.h" /* For OPT_MAX and concat_cmdline() */ ++#include "mem_regions.h" /* For mem_regions_sort() */ ++#include "dt-ops.h" /* For dtb_set_bootargs() */ ++#include /* For KEXEC_ARCH_OPTIONS */ ++#include /* For struct option */ ++#include /* For stat() and struct stat */ ++#include /* For free() */ ++#include /* For EINVAL */ ++#include /* For DeviceTree handling */ ++#include "kexec-riscv.h" ++ ++const struct arch_map_entry arches[] = { ++ { "riscv32", KEXEC_ARCH_RISCV }, ++ { "riscv64", KEXEC_ARCH_RISCV }, ++ { NULL, 0 }, ++}; ++ ++ ++struct file_type file_type[] = { ++ {"elf-riscv", elf_riscv_probe, elf_riscv_load, elf_riscv_usage}, ++}; ++int file_types = sizeof(file_type) / sizeof(file_type[0]); ++ ++static const char riscv_opts_usage[] = ++" --append=STRING Append STRING to the kernel command line.\n" ++" --dtb=FILE Use FILE as the device tree blob.\n" ++" --initrd=FILE Use FILE as the kernel initial ramdisk.\n" ++" --cmdline=STRING Use STRING as the kernel's command line.\n" ++" --reuse-cmdline Use kernel command line from running system.\n"; ++ ++static struct riscv_opts arch_options = {0}; ++static struct fdt_image provided_fdt = {0}; ++static struct memory_ranges sysmem_ranges = {0}; ++ ++/****************\ ++* COMMON HELPERS * ++\****************/ ++ ++int load_extra_segments(struct kexec_info *info, uint64_t kernel_base, ++ uint64_t kernel_size, uint64_t max_addr) ++{ ++ struct fdt_image *fdt = arch_options.fdt; ++ char *initrd_buf = NULL; ++ off_t initrd_size = 0; ++ uint64_t initrd_base = 0; ++ uint64_t start = 0; ++ uint64_t end = 0; ++ uint64_t min_usable = kernel_base + kernel_size; ++ uint64_t max_usable = max_addr; ++ int ret = 0; ++ ++ /* Prepare the device tree */ ++ if (info->kexec_flags & KEXEC_ON_CRASH) { ++ ret = load_elfcorehdr(info); ++ if (ret) { ++ fprintf(stderr, "Couldn't create elfcorehdr\n"); ++ return ret; ++ } ++ ++ ret = dtb_add_range_property(&fdt->buf, &fdt->size, ++ elfcorehdr_mem.start, elfcorehdr_mem.end, ++ "chosen", "linux,elfcorehdr"); ++ if (ret) { ++ fprintf(stderr, "Couldn't add elfcorehdr to fdt\n"); ++ return ret; ++ } ++ ++ ret = get_crash_kernel_load_range(&start, &end); ++ if (ret) { ++ fprintf(stderr, "Couldn't get crashkenel region\n"); ++ return ret; ++ } ++ ++ ret = dtb_add_range_property(&fdt->buf, &fdt->size, start, end, ++ "memory", "linux,usable-memory"); ++ if (ret) { ++ fprintf(stderr, "Couldn't add usable-memory to fdt\n"); ++ return ret; ++ } ++ ++ max_usable = end; ++ } else { ++ /* ++ * Make sure we remove elfcorehdr and usable-memory ++ * when switching from crash kernel to a normal one. ++ */ ++ dtb_delete_property(fdt->buf, "chosen", "linux,elfcorehdr"); ++ dtb_delete_property(fdt->buf, "memory", "linux,usable-memory"); ++ } ++ ++ /* Do we need to include an initrd image ? */ ++ if (!arch_options.initrd_path && !arch_options.initrd_end) ++ dtb_clear_initrd(&fdt->buf, &fdt->size); ++ else if (arch_options.initrd_path) { ++ if (arch_options.initrd_end) ++ fprintf(stderr, "Warning: An initrd image was provided" ++ ", will ignore reuseinitrd\n"); ++ ++ initrd_buf = slurp_file(arch_options.initrd_path, ++ &initrd_size); ++ if (!initrd_buf) { ++ fprintf(stderr, "Couldn't read provided initrd\n"); ++ return -EINVAL; ++ } ++ ++ initrd_base = add_buffer_phys_virt(info, initrd_buf, ++ initrd_size, ++ initrd_size, 0, ++ min_usable, ++ max_usable, -1, 0); ++ ++ dtb_set_initrd(&fdt->buf, &fdt->size, initrd_base, ++ initrd_base + initrd_size); ++ ++ dbgprintf("Base addr for initrd image: 0x%lX\n", initrd_base); ++ min_usable = initrd_base; ++ max_usable = initrd_base; ++ } ++ ++ /* Add device tree */ ++ add_buffer_phys_virt(info, fdt->buf, fdt->size, fdt->size, 0, ++ min_usable, max_usable, -1, 0); ++ ++ return 0; ++} ++ ++ ++/**************\ ++* ENTRY POINTS * ++\**************/ ++ ++void arch_usage(void) ++{ ++ printf(riscv_opts_usage); ++} ++ ++int arch_process_options(int argc, char **argv) ++{ ++ static const struct option options[] = { ++ KEXEC_ARCH_OPTIONS ++ { 0 }, ++ }; ++ static const char short_options[] = KEXEC_ARCH_OPT_STR; ++ struct stat st = {0}; ++ char *append = NULL; ++ char *cmdline = NULL; ++ void *tmp = NULL; ++ off_t tmp_size = 0; ++ int opt = 0; ++ int ret = 0; ++ ++ while ((opt = getopt_long(argc, argv, short_options, ++ options, 0)) != -1) { ++ switch (opt) { ++ case OPT_APPEND: ++ append = optarg; ++ break; ++ case OPT_CMDLINE: ++ if (cmdline) ++ fprintf(stderr, ++ "Warning: Kernel's cmdline " ++ "set twice !\n"); ++ cmdline = optarg; ++ break; ++ case OPT_REUSE_CMDLINE: ++ if (cmdline) ++ fprintf(stderr, ++ "Warning: Kernel's cmdline " ++ "set twice !\n"); ++ cmdline = get_command_line(); ++ break; ++ case OPT_DTB: ++ ret = stat(optarg, &st); ++ if (ret) { ++ fprintf(stderr, ++ "Could not find the provided dtb !\n"); ++ return -EINVAL; ++ } ++ arch_options.fdt_path = optarg; ++ break; ++ case OPT_INITRD: ++ ret = stat(optarg, &st); ++ if (ret) { ++ fprintf(stderr, ++ "Could not find the provided " ++ "initrd image !\n"); ++ return -EINVAL; ++ } ++ arch_options.initrd_path = optarg; ++ break; ++ default: ++ break; ++ } ++ } ++ ++ /* Handle Kernel's command line */ ++ if (append && !cmdline) ++ fprintf(stderr, "Warning: No cmdline provided, " ++ "using append string as cmdline\n"); ++ if (!append && !cmdline) ++ fprintf(stderr, "Warning: No cmdline or append string " ++ "provided\n"); ++ ++ if (append || cmdline) ++ /* ++ * Note that this also handles the case where "cmdline" ++ * or "append" is NULL. ++ */ ++ arch_options.cmdline = concat_cmdline(cmdline, append); ++ ++ /* Handle FDT image */ ++ if (!arch_options.fdt_path) { ++ ret = stat("/sys/firmware/fdt", &st); ++ if (ret) { ++ fprintf(stderr, "No dtb provided and " ++ "/sys/firmware/fdt is not present\n"); ++ return -EINVAL; ++ } ++ fprintf(stderr, "Warning: No dtb provided, " ++ "using /sys/firmware/fdt\n"); ++ arch_options.fdt_path = "/sys/firmware/fdt"; ++ } ++ ++ tmp = slurp_file(arch_options.fdt_path, &tmp_size); ++ if (!tmp) { ++ fprintf(stderr, "Couldn't read provided fdt\n"); ++ return -EINVAL; ++ } ++ ++ ret = fdt_check_header(tmp); ++ if (ret) { ++ fprintf(stderr, "Got an ivalid fdt image !\n"); ++ free(tmp); ++ return -EINVAL; ++ } ++ provided_fdt.buf = tmp; ++ provided_fdt.size = tmp_size; ++ ++ if (arch_options.cmdline) { ++ ret = dtb_set_bootargs(&provided_fdt.buf, &provided_fdt.size, ++ arch_options.cmdline); ++ if (ret < 0) { ++ fprintf(stderr, "Could not set bootargs on " ++ "the fdt image\n"); ++ return ret; ++ } ++ } ++ ++ arch_options.fdt = &provided_fdt; ++ ++ return 0; ++} ++ ++/* ++ * This one is called after arch_process_options so we already ++ * have an fdt image in place. ++ */ ++void arch_reuse_initrd(void) ++{ ++ const uint32_t *prop32 = NULL; ++ uint32_t addr_cells = 0; ++ const void *prop = 0; ++ int prop_size = 0; ++ uint64_t initrd_start = 0; ++ uint64_t initrd_end = 0; ++ int chosen_offset = 0; ++ struct fdt_image *fdt = &provided_fdt; ++ ++ chosen_offset = fdt_subnode_offset(fdt->buf, 0, "chosen"); ++ if (chosen_offset < 0) { ++ fprintf(stderr, "No /chosen node found on fdt image " ++ "unable to reuse initrd\n"); ++ return; ++ } ++ ++ prop32 = fdt_getprop(fdt->buf, 0, "#address-cells", NULL); ++ if (!prop32) { ++ fprintf(stderr, "No #address-cells property on root node\n"); ++ return; ++ } ++ addr_cells = be32_to_cpu(*prop32); ++ ++ prop = fdt_getprop(fdt->buf, chosen_offset, ++ "linux,initrd-start", &prop_size); ++ if (!prop) { ++ fprintf(stderr, "Could not get linux,initrd-start\n"); ++ return; ++ } ++ dtb_extract_int_property(&initrd_start, prop, addr_cells); ++ ++ prop = fdt_getprop(fdt->buf, chosen_offset, ++ "linux,initrd-end", &prop_size); ++ if (!prop) { ++ fprintf(stderr, "Could not get linux,initrd-end\n"); ++ return; ++ } ++ dtb_extract_int_property(&initrd_end, prop, addr_cells); ++ ++ arch_options.initrd_start = initrd_start; ++ arch_options.initrd_end = initrd_end; ++ dbgprintf("initrd_start: 0x%lX, initrd_end: 0x%lX\n", ++ initrd_start, initrd_end); ++ ++} ++ ++int get_memory_ranges(struct memory_range **range, int *num_ranges, ++ unsigned long kexec_flags) ++{ ++ const struct fdt_image *fdt = &provided_fdt; ++ struct memory_ranges *extra_ranges = NULL; ++ int i = 0; ++ int ret = 0; ++ ++ if (arch_options.initrd_start && arch_options.initrd_end) { ++ int initrd_size = arch_options.initrd_end - arch_options.initrd_start; ++ dbgprintf("Marking current intird image as reserved\n"); ++ ret = mem_regions_alloc_and_add(extra_ranges, ++ arch_options.initrd_start, ++ initrd_size, ++ RANGE_RESERVED); ++ if (ret) ++ return ret; ++ } ++ ++ ret = dtb_get_memory_ranges(fdt->buf, &sysmem_ranges, extra_ranges); ++ if (ret) { ++ fprintf(stderr, "Could not get memory ranges from device tree (%i) !\n", ret); ++ return ret; ++ } ++ ++ *range = sysmem_ranges.ranges; ++ *num_ranges = sysmem_ranges.size; ++ ++ dbgprintf("Memory regions:\n"); ++ for (i = 0; i < sysmem_ranges.size; i++) { ++ dbgprintf("\t0x%llx - 0x%llx : %s (%i)\n", ++ sysmem_ranges.ranges[i].start, ++ sysmem_ranges.ranges[i].end, ++ sysmem_ranges.ranges[i].type == RANGE_RESERVED ? ++ "RANGE_RESERVED" : "RANGE_RAM", ++ sysmem_ranges.ranges[i].type); ++ } ++ ++ return 0; ++} ++ ++/*******\ ++* STUBS * ++\*******/ ++ ++int arch_compat_trampoline(struct kexec_info *UNUSED(info)) ++{ ++ return 0; ++} ++ ++void arch_update_purgatory(struct kexec_info *UNUSED(info)) ++{ ++} +diff --git a/kexec/arch/riscv/kexec-riscv.h b/kexec/arch/riscv/kexec-riscv.h +new file mode 100644 +index 0000000..c4323a6 +--- /dev/null ++++ b/kexec/arch/riscv/kexec-riscv.h +@@ -0,0 +1,32 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * Copyright (C) 2019 FORTH-ICS/CARV ++ * Nick Kossifidis ++ */ ++ ++struct fdt_image { ++ char *buf; ++ off_t size; ++}; ++ ++struct riscv_opts { ++ char *cmdline; ++ char *fdt_path; ++ char *initrd_path; ++ uint64_t initrd_start; ++ uint64_t initrd_end; ++ struct fdt_image *fdt; ++}; ++ ++/* crashdump-riscv.c */ ++extern struct memory_range elfcorehdr_mem; ++int load_elfcorehdr(struct kexec_info *info); ++ ++/* kexec-riscv.c */ ++int load_extra_segments(struct kexec_info *info, uint64_t kernel_base, ++ uint64_t kernel_size, uint64_t max_addr); ++ ++int elf_riscv_probe(const char *buf, off_t len); ++void elf_riscv_usage(void); ++int elf_riscv_load(int argc, char **argv, const char *buf, off_t len, ++ struct kexec_info *info); +diff --git a/kexec/dt-ops.c b/kexec/dt-ops.c +index 0a96b75..3e285ab 100644 +--- a/kexec/dt-ops.c ++++ b/kexec/dt-ops.c +@@ -4,9 +4,11 @@ + #include + #include + #include ++#include + + #include "kexec.h" + #include "dt-ops.h" ++#include "mem_regions.h" + + static const char n_chosen[] = "chosen"; + +@@ -95,7 +97,7 @@ int dtb_set_property(char **dtb, off_t *dtb_size, const char *node, + + strcpy(new_node, "/"); + strcat(new_node, node); +- ++ + nodeoffset = fdt_path_offset(new_dtb, new_node); + + if (nodeoffset == -FDT_ERR_NOTFOUND) { +@@ -174,3 +176,441 @@ int dtb_delete_property(char *dtb, const char *node, const char *prop) + free(new_node); + return result; + } ++ ++static int dtb_get_num_cells(char *dtb, int nodeoffset, uint32_t *addr_cells, ++ uint32_t *size_cells, bool recursive) ++{ ++ const uint32_t *prop32 = NULL; ++ int curr_offset = nodeoffset; ++ int prop_len = 0; ++ *addr_cells = 0; ++ *size_cells = 0; ++ ++ do { ++ prop32 = fdt_getprop(dtb, curr_offset, "#address-cells", &prop_len); ++ curr_offset = fdt_parent_offset(dtb, curr_offset); ++ } while (!prop32 && prop_len == -FDT_ERR_NOTFOUND && recursive); ++ ++ if (!prop32) { ++ dbgprintf("Could not get #address-cells property for %s (%s)\n", ++ fdt_get_name(dtb, nodeoffset, NULL), fdt_strerror(nodeoffset)); ++ return -EINVAL; ++ } ++ *addr_cells = fdt32_to_cpu(*prop32); ++ ++ curr_offset = nodeoffset; ++ do { ++ prop32 = fdt_getprop(dtb, curr_offset, "#size-cells", &prop_len); ++ curr_offset = fdt_parent_offset(dtb, curr_offset); ++ } while (!prop32 && prop_len == -FDT_ERR_NOTFOUND && recursive); ++ ++ if (!prop32) { ++ dbgprintf("Could not get #size-cells property for %s (%s)\n", ++ fdt_get_name(dtb, nodeoffset, NULL), fdt_strerror(nodeoffset)); ++ return -EINVAL; ++ } ++ *size_cells = fdt32_to_cpu(*prop32); ++ ++ dbgprintf("%s: #address-cells:%d #size-cells:%d\n", ++ fdt_get_name(dtb, nodeoffset, NULL), *addr_cells, *size_cells); ++ ++ return 0; ++} ++ ++void dtb_extract_int_property(uint64_t *val, const void *buf, uint32_t cells) ++{ ++ const uint32_t *prop32 = NULL; ++ const uint64_t *prop64 = NULL; ++ ++ if (cells == 1) { ++ prop32 = (const uint32_t *) buf; ++ *val = (uint64_t) be32_to_cpu(*prop32); ++ } else { ++ /* Skip any leading cells */ ++ prop64 = (const uint64_t *) (uint32_t *)buf + cells - 2; ++ *val = (uint64_t) be64_to_cpu(*prop64); ++ } ++} ++ ++void dtb_fill_int_property(void *buf, uint64_t val, uint32_t cells) ++{ ++ uint32_t prop32 = 0; ++ uint64_t prop64 = 0; ++ ++ if (cells == 1) { ++ prop32 = cpu_to_fdt32((uint32_t) val); ++ memcpy(buf, &prop32, sizeof(uint32_t)); ++ } else { ++ prop64 = cpu_to_fdt64(val); ++ /* Skip any leading cells */ ++ memcpy((uint64_t *)(uint32_t *)buf + cells - 2, ++ &prop64, sizeof(uint64_t)); ++ } ++} ++ ++int dtb_add_range_property(char **dtb, off_t *dtb_size, uint64_t start, uint64_t end, ++ const char *parent, const char *name) ++{ ++ uint32_t addr_cells = 0; ++ uint32_t size_cells = 0; ++ char *nodepath = NULL; ++ void *prop = NULL; ++ int nodeoffset = 0; ++ int prop_size = 0; ++ int ret = 0; ++ ++ nodepath = malloc(strlen("/") + strlen(parent) + 1); ++ if (!nodepath) { ++ dbgprintf("%s: malloc failed\n", __func__); ++ return -ENOMEM; ++ } ++ ++ strcpy(nodepath, "/"); ++ strcat(nodepath, parent); ++ ++ nodeoffset = fdt_path_offset(*dtb, nodepath); ++ if (nodeoffset < 0) { ++ dbgprintf("%s: fdt_path_offset(%s) failed: %s\n", __func__, ++ nodepath, fdt_strerror(nodeoffset)); ++ free(nodepath); ++ return nodeoffset; ++ } ++ free(nodepath); ++ ++ ret = dtb_get_num_cells(*dtb, nodeoffset, &addr_cells, &size_cells, true); ++ if (ret < 0) ++ return ret; ++ ++ /* Can the range fit with the given address/size cells ? */ ++ if ((addr_cells == 1) && (start >= (1ULL << 32))) ++ return -EINVAL; ++ ++ if ((size_cells == 1) && ((end - start + 1) >= (1ULL << 32))) ++ return -EINVAL; ++ ++ prop_size = sizeof(uint32_t) * (addr_cells + size_cells); ++ prop = malloc(prop_size); ++ ++ dtb_fill_int_property(prop, start, addr_cells); ++ dtb_fill_int_property((void *)((uint32_t *)prop + addr_cells), ++ end - start + 1, size_cells); ++ ++ /* Add by node path name */ ++ return dtb_set_property(dtb, dtb_size, parent, name, prop, prop_size); ++} ++ ++/************************\ ++* MEMORY RANGES HANDLING * ++\************************/ ++ ++static int dtb_add_memory_range(struct memory_ranges *mem_ranges, uint64_t start, ++ uint64_t end, unsigned type) ++{ ++ struct memory_range this_region = {0}; ++ struct memory_range *ranges = mem_ranges->ranges; ++ int i = 0; ++ int ret = 0; ++ ++ if (start == end) { ++ dbgprintf("Ignoring empty region\n"); ++ return -EINVAL; ++ } ++ ++ /* Check if we are adding an existing region */ ++ for (i = 0; i < mem_ranges->size; i++) { ++ if (start == ranges[i].start && end == ranges[i].end) { ++ dbgprintf("Duplicate: 0x%lx - 0x%lx\n", start, end); ++ ++ if (type == ranges[i].type) ++ return 0; ++ else if (type == RANGE_RESERVED) { ++ ranges[i].type = RANGE_RESERVED; ++ return 0; ++ } ++ ++ dbgprintf("Conflicting types for region: 0x%lx - 0x%lx\n", ++ start, end); ++ return -EINVAL; ++ } ++ } ++ ++ /* ++ * Reserved regions may be part of an existing /memory ++ * region and shouldn't overlap according to spec, so ++ * since we add /memory regions first, we can exclude ++ * reserved regions here from the existing /memory regions ++ * included in ranges[], so that we don't have the same ++ * region twice. ++ */ ++ if (type == RANGE_RESERVED) { ++ this_region.start = start; ++ this_region.end = end - 1; ++ this_region.type = type; ++ ret = mem_regions_exclude(mem_ranges, &this_region); ++ if (ret) ++ return ret; ++ } ++ ++ ret = mem_regions_alloc_and_add(mem_ranges, start, ++ end - start, type); ++ ++ return ret; ++} ++ ++static int dtb_add_memory_region(char *dtb, int nodeoffset, ++ struct memory_ranges *mem_ranges, int type) ++{ ++ uint32_t root_addr_cells = 0; ++ uint32_t root_size_cells = 0; ++ uint64_t addr = 0; ++ uint64_t size = 0; ++ const char *reg = NULL; ++ int prop_size = 0; ++ int offset = 0; ++ int entry_size = 0; ++ int num_entries = 0; ++ int ret = 0; ++ ++ /* ++ * Get address-cells and size-cells properties (according to ++ * binding spec these are the same as in the root node) ++ */ ++ ret = dtb_get_num_cells(dtb, 0, &root_addr_cells, &root_size_cells, false); ++ if (ret < 0) { ++ dbgprintf("No address/size cells on root node !\n"); ++ return ret; ++ } ++ ++ /* ++ * Parse the reg array, acording to device tree spec it includes ++ * an arbitary number of
pairs ++ */ ++ entry_size = (root_addr_cells + root_size_cells) * sizeof(uint32_t); ++ reg = fdt_getprop(dtb, nodeoffset, "reg", &prop_size); ++ if (!reg) { ++ dbgprintf("Warning: Malformed memory region with no reg property (%s) !\n", ++ fdt_get_name(dtb, nodeoffset, NULL)); ++ return -EINVAL; ++ } ++ ++ num_entries = prop_size / entry_size; ++ dbgprintf("Got region with %i entries: %s\n", num_entries, ++ fdt_get_name(dtb, nodeoffset, NULL)); ++ ++ for (num_entries--; num_entries >= 0; num_entries--) { ++ offset = num_entries * entry_size; ++ ++ dtb_extract_int_property(&addr, reg + offset, ++ root_addr_cells); ++ offset += root_addr_cells * sizeof(uint32_t); ++ ++ dtb_extract_int_property(&size, reg + offset, ++ root_size_cells); ++ ++ ret = dtb_add_memory_range(mem_ranges, addr, ++ addr + size, type); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int dtb_parse_memory_reservations_table(char *dtb, struct memory_ranges *mem_ranges) ++{ ++ int total_memrsrv = 0; ++ uint64_t addr = 0; ++ uint64_t size = 0; ++ int ret = 0; ++ int i = 0; ++ ++ total_memrsrv = fdt_num_mem_rsv(dtb); ++ for (i = 0; i < total_memrsrv; i++) { ++ ret = fdt_get_mem_rsv(dtb, i, &addr, &size); ++ if (ret) ++ continue; ++ ret = dtb_add_memory_range(mem_ranges, addr, addr + size - 1, ++ RANGE_RESERVED); ++ if (ret) ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int dtb_get_reserved_memory_node(char *dtb) ++{ ++ uint32_t root_addr_cells = 0; ++ uint32_t root_size_cells = 0; ++ uint32_t addr_cells = 0; ++ uint32_t size_cells = 0; ++ int prop_size = 0; ++ int nodeoffset = 0; ++ int ret = 0; ++ ++ /* Get address / size cells from root node */ ++ ret = dtb_get_num_cells(dtb, 0, &root_addr_cells, &root_size_cells, false); ++ if (ret < 0) { ++ dbgprintf("No address/size cells on root node !\n"); ++ return ret; ++ } ++ ++ /* This calls fdt_next_node internaly */ ++ nodeoffset = fdt_subnode_offset(dtb, 0, "reserved-memory"); ++ if (nodeoffset == -FDT_ERR_NOTFOUND) { ++ return nodeoffset; ++ } else if (nodeoffset < 0) { ++ dbgprintf("Error while looking for reserved-memory: %s\n", ++ fdt_strerror(nodeoffset)); ++ return nodeoffset; ++ } ++ ++ /* Look for the ranges property */ ++ fdt_getprop(dtb, nodeoffset, "ranges", &prop_size); ++ if (prop_size < 0) { ++ fprintf(stderr, "Malformed reserved-memory node (no ranges property) !\n"); ++ return -EINVAL; ++ } ++ ++ /* Verify address-cells / size-cells */ ++ ret = dtb_get_num_cells(dtb, nodeoffset, &addr_cells, &size_cells, false); ++ if (ret < 0) { ++ dbgprintf("No address/size cells property on reserved-memory node\n"); ++ return ret; ++ } ++ ++ if (addr_cells != root_addr_cells) { ++ fprintf(stderr, "Invalid #address-cells property on reserved-memory node\n"); ++ return -EINVAL; ++ } ++ ++ if (size_cells != root_size_cells) { ++ fprintf(stderr, "Invalid #size-cells property on reserved-memory node\n"); ++ return -EINVAL; ++ ++ } ++ ++ return nodeoffset; ++} ++ ++static int dtb_parse_reserved_memory_node(char *dtb, struct memory_ranges *mem_ranges) ++{ ++ int nodeoffset = 0; ++ int node_depth = 0; ++ int parent_depth = 0; ++ int ret = 0; ++ ++ nodeoffset = dtb_get_reserved_memory_node(dtb); ++ if (nodeoffset == -FDT_ERR_NOTFOUND) ++ return 0; ++ else if (nodeoffset < 0) ++ return nodeoffset; ++ ++ /* Got the parent node, check for sub-nodes */ ++ ++ /* fdt_next_node() increases or decreases depth */ ++ node_depth = parent_depth; ++ nodeoffset = fdt_next_node(dtb, nodeoffset, &node_depth); ++ if (ret < 0) { ++ dbgprintf("Unable to get next node: %s\n", ++ fdt_strerror(ret)); ++ return -EINVAL; ++ } ++ ++ while (node_depth != parent_depth) { ++ ++ ret = dtb_add_memory_region(dtb, nodeoffset, ++ mem_ranges, RANGE_RESERVED); ++ if (ret) ++ return ret; ++ ++ nodeoffset = fdt_next_node(dtb, nodeoffset, &node_depth); ++ if (ret < 0) { ++ dbgprintf("Unable to get next node: %s\n", ++ fdt_strerror(ret)); ++ return -EINVAL; ++ } ++ } ++ ++ return 0; ++} ++ ++static int dtb_parse_memory_nodes(char *dtb, struct memory_ranges *mem_ranges) ++{ ++ int nodeoffset = 0; ++ int num_regions = 0; ++ const char* dev_type = 0; ++ int prop_size = 0; ++ int ret = 0; ++ ++ for (; ; num_regions++) { ++ nodeoffset = fdt_subnode_offset(dtb, nodeoffset, ++ "memory"); ++ if (nodeoffset < 0) ++ break; ++ ++ dbgprintf("Got memory node at depth: %i\n", fdt_node_depth(dtb, nodeoffset)); ++ ++ /* Look for the device_type property */ ++ dev_type = fdt_getprop(dtb, nodeoffset, "device_type", &prop_size); ++ if (prop_size < 0) { ++ fprintf(stderr, "Malformed /memory node (no device-type property) !\n"); ++ return -EINVAL; ++ } ++ ++ if (strncmp(dev_type, "memory", prop_size)) { ++ dbgprintf("Got unknown dev_type property: %s\n", dev_type); ++ continue; ++ } ++ ++ ret = dtb_add_memory_region(dtb, nodeoffset, mem_ranges, RANGE_RAM); ++ if (ret) ++ return ret; ++ } ++ ++ if (!num_regions) { ++ dbgprintf("Malformed dtb, no /memory nodes present !\n"); ++ return -EINVAL; ++ } ++ ++ dbgprintf("Got %i /memory nodes\n", num_regions); ++ ++ return 0; ++} ++ ++int dtb_get_memory_ranges(char *dtb, struct memory_ranges *mem_ranges, struct memory_ranges *extra_ranges) ++{ ++ int i = 0; ++ int ret = 0; ++ ++ /* Fill mem_ranges[] by parsing the device tree */ ++ ret = dtb_parse_memory_nodes(dtb, mem_ranges); ++ if (ret) ++ return ret; ++ ++ ret = dtb_parse_memory_reservations_table(dtb, mem_ranges); ++ if (ret) ++ return ret; ++ ++ ret = dtb_parse_reserved_memory_node(dtb, mem_ranges); ++ if (ret) ++ return ret; ++ ++ /* Append any extra ranges provided by the caller (e.g. initrd) */ ++ for (i = 0; extra_ranges != NULL && i < extra_ranges->size; i++) { ++ dbgprintf("Adding extra range: 0x%llx - 0x%llx (%s)\n", ++ extra_ranges->ranges[i].start, ++ extra_ranges->ranges[i].end, ++ extra_ranges->ranges[i].type == RANGE_RESERVED ? ++ "RANGE_RESERVED" : "RANGE_RAM"); ++ ++ ret = dtb_add_memory_range(mem_ranges, extra_ranges->ranges[i].start, ++ extra_ranges->ranges[i].end, extra_ranges->ranges[i].type); ++ if (ret) ++ return ret; ++ } ++ ++ mem_regions_sort(mem_ranges); ++ ++ return 0; ++} +diff --git a/kexec/dt-ops.h b/kexec/dt-ops.h +index 03659ce..3014205 100644 +--- a/kexec/dt-ops.h ++++ b/kexec/dt-ops.h +@@ -11,4 +11,11 @@ int dtb_set_property(char **dtb, off_t *dtb_size, const char *node, + + int dtb_delete_property(char *dtb, const char *node, const char *prop); + ++void dtb_extract_int_property(uint64_t *val, const void *buf, uint32_t cells); ++void dtb_fill_int_property(void *buf, uint64_t val, uint32_t cells); ++int dtb_add_range_property(char **dtb, off_t *dtb_size, uint64_t start, uint64_t end, ++ const char *node, const char* parent); ++int dtb_get_memory_ranges(char *dtb, struct memory_ranges *mem_ranges, ++ struct memory_ranges *extra_ranges); ++ + #endif +diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h +index be6ccd5..4cdae84 100644 +--- a/kexec/kexec-syscall.h ++++ b/kexec/kexec-syscall.h +@@ -137,6 +137,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd, + #define KEXEC_ARCH_MIPS_LE (10 << 16) + #define KEXEC_ARCH_MIPS ( 8 << 16) + #define KEXEC_ARCH_CRIS (76 << 16) ++#define KEXEC_ARCH_RISCV (243 << 16) + #define KEXEC_ARCH_LOONGARCH (258 << 16) + + #define KEXEC_MAX_SEGMENTS 16 +@@ -184,5 +185,8 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd, + #if defined(__loongarch__) + #define KEXEC_ARCH_NATIVE KEXEC_ARCH_LOONGARCH + #endif ++#if defined(__riscv__) || defined(__riscv) ++#define KEXEC_ARCH_NATIVE KEXEC_ARCH_RISCV ++#endif + + #endif /* KEXEC_SYSCALL_H */ +diff --git a/purgatory/Makefile b/purgatory/Makefile +index 4d2d071..7d1175f 100644 +--- a/purgatory/Makefile ++++ b/purgatory/Makefile +@@ -25,6 +25,7 @@ include $(srcdir)/purgatory/arch/ia64/Makefile + include $(srcdir)/purgatory/arch/mips/Makefile + include $(srcdir)/purgatory/arch/ppc/Makefile + include $(srcdir)/purgatory/arch/ppc64/Makefile ++include $(srcdir)/purgatory/arch/riscv/Makefile + include $(srcdir)/purgatory/arch/s390/Makefile + include $(srcdir)/purgatory/arch/sh/Makefile + include $(srcdir)/purgatory/arch/x86_64/Makefile +diff --git a/purgatory/arch/riscv/Makefile b/purgatory/arch/riscv/Makefile +new file mode 100644 +index 0000000..8bded71 +--- /dev/null ++++ b/purgatory/arch/riscv/Makefile +@@ -0,0 +1,7 @@ ++# ++# Purgatory riscv ++# ++ ++riscv_PURGATORY_SRCS = ++ ++dist += purgatory/arch/sh/Makefile $(riscv_PURGATORY_SRCS) +-- +2.17.1 + + +_______________________________________________ +kexec mailing list +kexec@lists.infradead.org +http://lists.infradead.org/mailman/listinfo/kexec diff --git a/SPECS/kexec-tools/kexec-tools.spec b/SPECS/kexec-tools/kexec-tools.spec new file mode 100644 index 00000000..d4c18af2 --- /dev/null +++ b/SPECS/kexec-tools/kexec-tools.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: kexec-tools +Version: 2.0.31 +Release: %autorelease +Summary: Tools for loading replacement kernels into memory +License: GPL-2.0-or-later +URL: https://projects.horms.net/projects/kexec/ +#!RemoteAsset +Source: https://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.sign +Patch1: add-riscv64-support.patch +Patch2: riscv-hotplug.patch +BuildSystem: autotools + +BuildOption(conf): --without-lzma + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: xz-devel +BuildRequires: zlib-devel +BuildRequires: libzstd-devel + +%description +Kexec is a user space utility for loading another kernel and asking the +currently running kernel to do something with it. A currently running +kernel may be asked to start the loaded kernel on reboot, or to start +the loaded kernel after it panics. + +%conf -p +autoreconf -fvi + +%files +%{_sbindir}/kexec +%{_mandir}/man8/kexec.8* +%{_sbindir}/vmcore-dmesg +%{_mandir}/man8/vmcore-dmesg.8* +%doc News +%license COPYING +%doc TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/kexec-tools/riscv-hotplug.patch b/SPECS/kexec-tools/riscv-hotplug.patch new file mode 100644 index 00000000..53adff40 --- /dev/null +++ b/SPECS/kexec-tools/riscv-hotplug.patch @@ -0,0 +1,23 @@ +From: Petr Tesarik +Subject: riscv: fix build with hotplug support +Upstream: not yet, blocked by base RISC-V patches + +Commit 3c47f384f1c4 ("kexec_load: Use new kexec flag for hotplug support") +adds a new architecture-specific function named arch_do_exclude_segment. +Since RISC-V does not yet implement hotplug updates in the kernel, add a +trivial definition of this function to kexec-tools. + +Signed-off-by: Petr Tesarik +Index: kexec-tools-2.0.29/kexec/arch/riscv/kexec-riscv.c +=================================================================== +--- kexec-tools-2.0.29.orig/kexec/arch/riscv/kexec-riscv.c ++++ kexec-tools-2.0.29/kexec/arch/riscv/kexec-riscv.c +@@ -362,3 +362,8 @@ int arch_compat_trampoline(struct kexec_ + void arch_update_purgatory(struct kexec_info *UNUSED(info)) + { + } ++ ++int arch_do_exclude_segment(struct kexec_info *UNUSED(info), struct kexec_segment *UNUSED(segment)) ++{ ++ return 0; ++} diff --git a/SPECS/keyutils/keyutils.spec b/SPECS/keyutils/keyutils.spec new file mode 100644 index 00000000..a053b97f --- /dev/null +++ b/SPECS/keyutils/keyutils.spec @@ -0,0 +1,72 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: keyutils +Version: 1.6.3 +Release: %autorelease +Summary: Linux Key Management Utilities and Libraries +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/ +#!RemoteAsset +Source: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): NO_ARLIB=1 CFLAGS="%{optflags}" +BuildOption(install): NO_ARLIB=1 DESTDIR=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} LIBDIR=%{_libdir} USRLIBDIR=%{_libdir} + +BuildRequires: gcc-c++ +BuildRequires: pkgconfig + +%description +Utilities to control the kernel key management facility. +This package contains the command-line tools and runtime libraries. + +%package devel +Requires: %{name} = %{version}-%{release} +Summary: Development package for building linux key management utilities + +%description devel +This package provides headers and libraries for building key utilities. + +# No configure +%conf + +%install -a +install -m 0750 -d \ + %{buildroot}%{_sysconfdir}/keys \ + %{buildroot}%{_sysconfdir}/keys/ima \ + %{buildroot}%{_sysconfdir}/keys/evm + +pushd %{buildroot}%{_libdir} +ln -sf libkeyutils.so.1 libkeyutils.so +popd + +%ldconfig_scriptlets + +%files +%license LICENCE.GPL LICENCE.LGPL +%doc README + +%{_sbindir}/* +%{_bindir}/* +%{_datadir}/keyutils +%{_mandir}/*/* +%config(noreplace) %{_sysconfdir}/request-key.conf +%dir %{_sysconfdir}/request-key.d/ +%dir %{_sysconfdir}/keys/ +%dir %{_sysconfdir}/keys/ima/ +%dir %{_sysconfdir}/keys/evm/ +%{_libdir}/libkeyutils.so.* + +%files devel +%{_libdir}/libkeyutils.so +%{_includedir}/* +%attr(0644, root, root) %{_libdir}/pkgconfig/libkeyutils.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/kmod/kmod.spec b/SPECS/kmod/kmod.spec new file mode 100644 index 00000000..f85be7b2 --- /dev/null +++ b/SPECS/kmod/kmod.spec @@ -0,0 +1,111 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: kmod +Version: 34.2 +Release: %autorelease +Summary: Linux kernel module management utilities +License: GPL-2.0-or-later AND GPL-3.0-or-later AND FSFUL AND FSFULLRWD AND LGPL-2.1-only AND LGPL-2.1-or-later AND X11 +URL: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git +#!RemoteAsset +Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --with-openssl +BuildOption(conf): --with-zlib +BuildOption(conf): --with-xz +BuildOption(conf): --with-zstd +BuildOption(conf): --enable-debug + +BuildRequires: chrpath +BuildRequires: zlib-devel +BuildRequires: xz-devel +BuildRequires: scdoc +BuildRequires: openssl-devel +BuildRequires: make +BuildRequires: automake +BuildRequires: libtool +BuildRequires: zstd-devel + +Provides: %{_sbindir}/modprobe + +%description +The kmod package provides various programs needed for automatic +loading and unloading of modules under 2.6, 3.x, and later kernels, as well +as other module management programs. Device drivers and filesystems are two +examples of loaded and unloaded modules. + +%package libs +Summary: Libraries to handle kernel module loading and unloading + +%description libs +The kmod-libs package provides runtime libraries for any application that +wishes to load or unload Linux kernel modules from the running system. + +%package devel +Summary: Header files for kmod development +Requires: %{name}-libs = %{version}-%{release} + +%description devel +The kmod-devel package provides header files used for development of +applications that wish to load or unload Linux kernel modules. + +%conf -p +# We do not want to add gtk-doc +rm -f m4/gtk-doc.m4 libkmod/docs/gtk-doc.make +touch m4/gtk-doc.m4 libkmod/docs/gtk-doc.make +autoreconf --install + +%install -a +pushd $RPM_BUILD_ROOT%{_mandir}/man5 +ln -s modprobe.d.5.gz modprobe.conf.5.gz +popd + +find %{buildroot} -type f -name "*.la" -delete + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d + +%files +%dir %{_sysconfdir}/depmod.d +%dir %{_sysconfdir}/modprobe.d +%dir %{_prefix}/lib/modprobe.d +%{_bindir}/kmod +%{_sbindir}/modprobe +%{_sbindir}/modinfo +%{_sbindir}/insmod +%{_sbindir}/rmmod +%{_sbindir}/lsmod +%{_sbindir}/depmod +%if %{with weak_modules} +%{_sbindir}/weak-modules +%endif +%{_datadir}/bash-completion/ +%{_datadir}/fish/vendor_functions.d/* +%{_datadir}/zsh/site-functions/* +%if %{with dist_conf} +%{_sysconfdir}/depmod.d/dist.conf +%endif +%{_datadir}/pkgconfig/kmod.pc +%attr(0644,root,root) %{_mandir}/man5/mod*.d*.5* +%attr(0644,root,root) %{_mandir}/man5/depmod.d.5* +%{_mandir}/man5/modprobe.conf.5* +%attr(0644,root,root) %{_mandir}/man8/*.8* +%doc NEWS README.md + +%files libs +%license COPYING +%{_libdir}/libkmod.so.* + +%files devel +%{_includedir}/libkmod.h +%{_libdir}/pkgconfig/libkmod.pc +%{_libdir}/libkmod.so + +%changelog +%{?autochangelog} diff --git a/SPECS/krb5/krb5.spec b/SPECS/krb5/krb5.spec new file mode 100644 index 00000000..3c38a1df --- /dev/null +++ b/SPECS/krb5/krb5.spec @@ -0,0 +1,140 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# default without systemd +%bcond systemd 0 + +Name: krb5 +Version: 1.22.1 +Release: %autorelease +Summary: The Kerberos 5 network authentication system +License: MIT +URL: https://web.mit.edu/kerberos/ +#!RemoteAsset +Source: https://kerberos.org/dist/krb5/1.22/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --without-ldap +BuildOption(conf): --disable-static --enable-dns-for-realm --disable-rpath +BuildOption(conf): --with-pam --enable-pkinit --with-crypto-impl=openssl --with-selinux +BuildOption(conf): --with-system-et --with-system-ss --with-system-verto --with-lmdb +BuildOption(conf): --localstatedir=%{_localstatedir} + +BuildOption(build): -C src +BuildOption(install): -C src + +BuildRequires: autoconf bison cyrus-sasl-devel keyutils-devel +BuildRequires: pam-devel pkgconfig pkgconfig(com_err) pkgconfig(libselinux) +BuildRequires: pkgconfig(libssl) pkgconfig(libverto) pkgconfig(lmdb) +BuildRequires: pkgconfig(ss) + +%if %{with systemd} +BuildRequires: systemd-rpm-macros +%endif + +%if %{with systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%endif + +%description +Kerberos is a network authentication system. This package contains all the +core libraries, clients, servers, and plugins. + +%package devel +Summary: Development files for MIT Kerberos 5 +Requires: %{name} = %{version} +Requires: keyutils-devel pkgconfig(com_err) pkgconfig(libverto) pkgconfig(ss) + +%description devel +This package contains the libraries, header files, and documentation needed +for developing applications that use Kerberos 5. + +%conf +cd src +export DEFCCNAME=DIR:/run/user/%%{uid}/krb5cc +autoreconf -fi +%configure + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +install -D -m 644 src/util/ac_check_krb5.m4 %{buildroot}%{_datadir}/aclocal/ac_check_krb5.m4 +install -d -m 755 %{buildroot}%{_sysconfdir}/krb5.conf.d + +install -d -m 700 %{buildroot}%{_localstatedir}/kerberos/krb5kdc + +install -m 644 src/config-files/krb5.conf %{buildroot}%{_sysconfdir}/krb5.conf +install -m 644 src/config-files/kdc.conf %{buildroot}%{_sysconfdir}/kdc.conf + +# remove some files should not in krb5 +rm -rf %{buildroot}%{_bindir}/compile_et +rm -rf %{buildroot}%{_includedir}/com_err.h +rm -rf %{buildroot}%{_libdir}/libcom_err.so +rm -rf %{buildroot}%{_datadir}/et/ + +%if %{with systemd} +%post +%systemd_post krb5kdc.service kadmind.service kpropd.service +/sbin/ldconfig +%preun +%systemd_preun krb5kdc.service kadmind.service kpropd.service +%postun +%systemd_postun_with_restart krb5kdc.service kadmind.service kpropd.service +/sbin/ldconfig +%else +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig +%endif + +%files +%license doc/notice.rst +%doc doc/ +%config(noreplace) %{_sysconfdir}/kdc.conf +%config(noreplace) %{_sysconfdir}/krb5.conf +%dir %{_sysconfdir}/krb5.conf.d +%dir %attr(0700,root,root) %{_localstatedir}/kerberos +%dir %attr(0700,root,root) %{_localstatedir}/kerberos/krb5kdc +%{_libdir}/lib*.so.* +%dir %{_libdir}/krb5 +%dir %{_libdir}/krb5/plugins +%{_libdir}/krb5/plugins/*/*.so +%{_bindir}/* +%{_sbindir}/* +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man7/* +%{_mandir}/man8/* +%exclude %{_mandir}/man1/compile_et.1.gz +%exclude %{_mandir}/man1/krb5-config.1* +%exclude %{_mandir}/man5/.k5identity.5.gz +%exclude %{_mandir}/man5/.k5login.5.gz +%{_datadir}/locale/*/LC_MESSAGES/mit-krb5.mo +%dir %{_datadir}/examples +%dir %{_datadir}/examples/krb5 +%{_datadir}/examples/krb5/* + +%files devel +%{_includedir}/gssapi/ +%{_includedir}/gssrpc/ +%{_includedir}/kadm5/ +%{_includedir}/kdb.h +%{_includedir}/krad.h +%{_includedir}/krb5.h +%{_includedir}/krb5/* +%{_includedir}/gssapi.h +%{_includedir}/profile.h +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/*.pc +%{_bindir}/krb5-config +%{_datadir}/aclocal/ac_check_krb5.m4 +%{_mandir}/man1/krb5-config.1* +%{_mandir}/man5/.k5identity.5.gz +%{_mandir}/man5/.k5login.5.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/kyua/kyua.spec b/SPECS/kyua/kyua.spec new file mode 100644 index 00000000..47223975 --- /dev/null +++ b/SPECS/kyua/kyua.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: kyua +Version: 0.14.1 +Release: %autorelease +Summary: A testing framework for infrastructure software +License: BSD-2-Clause +URL: https://github.com/jmmv/kyua +#!RemoteAsset +Source: https://github.com/freebsd/kyua/archive/refs/tags/kyua-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --with-atf=yes +BuildOption(conf): --without-doxygen + +BuildOption(build): pkgtestsdir=%{_libexecdir}/%{name}/tests +BuildOption(build): testsdir=%{_libexecdir}/%{name}/tests +BuildOption(install): pkgtestsdir=%{_libexecdir}/%{name}/tests +BuildOption(install): testsdir=%{_libexecdir}/%{name}/tests + +BuildRequires: make gcc-c++ autoconf automake libtool +BuildRequires: libatf-c++-devel >= 0.17 +BuildRequires: libatf-sh-devel >= 0.15 +BuildRequires: pkgconfig(lutok) >= 0.4 +BuildRequires: pkgconfig(sqlite3) >= 3.6.22 + +%description +Kyua is a testing framework for infrastructure software, originally designed +to equip BSD-based operating systems with a test suite. + +%conf -p +autoreconf -fiv + +%files +%license LICENSE +%doc %{_docdir}/kyua +%doc AUTHORS CONTRIBUTORS NEWS.md README.md +%{_bindir}/kyua +%{_datadir}/kyua/ +%{_mandir}/man1/kyua*.1* +%{_mandir}/man5/kyua*.5* + +%changelog +%{?autochangelog} diff --git a/SPECS/ldns/0001-ldns-1.8.4-swig-4.3.patch b/SPECS/ldns/0001-ldns-1.8.4-swig-4.3.patch new file mode 100644 index 00000000..9efcfd3e --- /dev/null +++ b/SPECS/ldns/0001-ldns-1.8.4-swig-4.3.patch @@ -0,0 +1,91 @@ +diff --git a/contrib/python/ldns_buffer.i b/contrib/python/ldns_buffer.i +index 5c2d583..0a3e389 100644 +--- a/contrib/python/ldns_buffer.i ++++ b/contrib/python/ldns_buffer.i +@@ -45,7 +45,7 @@ + /* Result generation, appends (ldns_buffer *) after the result. */ + %typemap(argout, noblock=1) (ldns_buffer **) + { +- $result = SWIG_Python_AppendOutput($result, ++ $result = SWIG_AppendOutput($result, + SWIG_NewPointerObj(SWIG_as_voidptr($1_buf), + SWIGTYPE_p_ldns_struct_buffer, SWIG_POINTER_OWN | 0)); + } +diff --git a/contrib/python/ldns_key.i b/contrib/python/ldns_key.i +index dc67e67..6a3c2db 100644 +--- a/contrib/python/ldns_key.i ++++ b/contrib/python/ldns_key.i +@@ -38,7 +38,7 @@ + /* result generation */ + %typemap(argout,noblock=1) (ldns_key **) + { +- $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 )); ++ $result = SWIG_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_key), SWIGTYPE_p_ldns_struct_key, SWIG_POINTER_OWN | 0 )); + } + + %typemap(argout) ldns_rdf *r "Py_INCREF($input);" +diff --git a/contrib/python/ldns_packet.i b/contrib/python/ldns_packet.i +index c2d7a3b..8309808 100644 +--- a/contrib/python/ldns_packet.i ++++ b/contrib/python/ldns_packet.i +@@ -45,7 +45,7 @@ + /* Result generation, appends (ldns_pkt *) after the result. */ + %typemap(argout,noblock=1) (ldns_pkt **) + { +- $result = SWIG_Python_AppendOutput($result, ++ $result = SWIG_AppendOutput($result, + SWIG_NewPointerObj(SWIG_as_voidptr($1_pkt), + SWIGTYPE_p_ldns_struct_pkt, SWIG_POINTER_OWN | 0 )); + } +diff --git a/contrib/python/ldns_rdf.i b/contrib/python/ldns_rdf.i +index 39f9af1..ed1f0d0 100644 +--- a/contrib/python/ldns_rdf.i ++++ b/contrib/python/ldns_rdf.i +@@ -45,7 +45,7 @@ + /* Result generation, appends (ldns_rdf *) after the result. */ + %typemap(argout, noblock=1) (ldns_rdf **) + { +- $result = SWIG_Python_AppendOutput($result, ++ $result = SWIG_AppendOutput($result, + SWIG_NewPointerObj(SWIG_as_voidptr($1_rdf), + SWIGTYPE_p_ldns_struct_rdf, SWIG_POINTER_OWN | 0)); + } +diff --git a/contrib/python/ldns_resolver.i b/contrib/python/ldns_resolver.i +index 8468cce..8d0abc6 100644 +--- a/contrib/python/ldns_resolver.i ++++ b/contrib/python/ldns_resolver.i +@@ -45,7 +45,7 @@ + /* Result generation, appends (ldns_resolver *) after the result. */ + %typemap(argout,noblock=1) (ldns_resolver **r) + { +- $result = SWIG_Python_AppendOutput($result, ++ $result = SWIG_AppendOutput($result, + SWIG_NewPointerObj(SWIG_as_voidptr($1_res), + SWIGTYPE_p_ldns_struct_resolver, SWIG_POINTER_OWN | 0 )); + } +diff --git a/contrib/python/ldns_rr.i b/contrib/python/ldns_rr.i +index 2e0a071..c53955c 100644 +--- a/contrib/python/ldns_rr.i ++++ b/contrib/python/ldns_rr.i +@@ -45,7 +45,7 @@ + /* Result generation, appends (ldns_rr *) after the result. */ + %typemap(argout, noblock=1) (ldns_rr **) + { +- $result = SWIG_Python_AppendOutput($result, ++ $result = SWIG_AppendOutput($result, + SWIG_NewPointerObj(SWIG_as_voidptr($1_rr), + SWIGTYPE_p_ldns_struct_rr, SWIG_POINTER_OWN | 0 )); + } +diff --git a/contrib/python/ldns_zone.i b/contrib/python/ldns_zone.i +index bbb8d8f..3459478 100644 +--- a/contrib/python/ldns_zone.i ++++ b/contrib/python/ldns_zone.i +@@ -39,7 +39,7 @@ + /* result generation */ + %typemap(argout,noblock=1) (ldns_zone **) + { +- $result = SWIG_Python_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_zone), SWIGTYPE_p_ldns_struct_zone, SWIG_POINTER_OWN | 0 )); ++ $result = SWIG_AppendOutput($result, SWIG_NewPointerObj(SWIG_as_voidptr($1_zone), SWIGTYPE_p_ldns_struct_zone, SWIG_POINTER_OWN | 0 )); + } + + %nodefaultctor ldns_struct_zone; //no default constructor & destructor diff --git a/SPECS/ldns/ldns.spec b/SPECS/ldns/ldns.spec new file mode 100644 index 00000000..8f4bddd6 --- /dev/null +++ b/SPECS/ldns/ldns.spec @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ldns +Version: 1.8.4 +Release: %autorelease +Summary: A library for developing the Domain Name System +License: BSD-3-Clause +URL: https://www.nlnetlabs.nl/projects/ldns/ +#!RemoteAsset +Source: https://www.nlnetlabs.nl/downloads/ldns/ldns-%{version}.tar.gz +Patch: 0001-ldns-1.8.4-swig-4.3.patch +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --disable-static +BuildOption(conf): --enable-rrtype-ninfo +BuildOption(conf): --enable-rrtype-rkey +BuildOption(conf): --enable-rrtype-cds +BuildOption(conf): --enable-rrtype-uri +BuildOption(conf): --enable-rrtype-ta +BuildOption(conf): --with-pyldns +BuildOption(conf): --with-pyldnsx +BuildOption(conf): --with-drill +BuildOption(conf): --with-examples +BuildOption(conf): --with-ca-path=%{_sysconfdir}/ssl/certs/ +BuildOption(conf): PYTHON_VERSION=3 + +BuildOption(install): install-drill +BuildOption(install): install-examples +BuildOption(install): install-pyldns +BuildOption(install): install-pyldnsx + +BuildRequires: doxygen libpcap-devel python3-devel python3 swig +BuildRequires: openssl-devel + +%description +ldns is a C library for DNS development, supporting DNSSEC and other RFCs. + +%package devel +Summary: Development files for ldns +Requires: %{name} = %{version} +Requires: pkgconfig openssl-devel + +%description devel +This package contains the header files and development files for ldns. + +%package -n python3-ldns +Summary: Python3 extensions for ldns +Requires: %{name} = %{version} + +%description -n python3-ldns +Python3 extensions for ldns + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +# no tests. +%check + +%files +%license LICENSE +%{_bindir}/* +%{_mandir}/man1/* + +%files devel +%license LICENSE +%doc libdns.vim README* +%{_bindir}/ldns-config +%{_includedir}/ldns/ +%{_libdir}/libldns.so* +%{_libdir}/pkgconfig/ldns.pc +%{_mandir}/man3/* + +%files -n python3-ldns +%license LICENSE +%{python3_sitearch}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/less/less.spec b/SPECS/less/less.spec new file mode 100644 index 00000000..0d2cf31d --- /dev/null +++ b/SPECS/less/less.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Summary: Text File Browser and Pager Similar to more +Name: less +Version: 679 +Release: %autorelease +License: BSD-2-Clause OR GPL-3.0-or-later +URL: https://www.greenwoodsoftware.com/less/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/less/%{name}-%{version}.tar.gz + +BuildRequires: automake +BuildRequires: ncurses-devel +BuildRequires: pkgconfig + +BuildSystem: autotools + +%description +less is a text file browser and pager similar to more. It allows +backward as well as forward movement within a file. Also, less does not +have to read the entire input file before starting. It is possible to +start an editor at any time from within less. + +%files +%license LICENSE COPYING +%doc NEWS +%{_mandir}/*/* +%{_bindir}/less +%{_bindir}/lessecho +%{_bindir}/lesskey +%changelog +%{?autochangelog} diff --git a/SPECS/leveldb/leveldb.spec b/SPECS/leveldb/leveldb.spec new file mode 100644 index 00000000..8da9fc22 --- /dev/null +++ b/SPECS/leveldb/leveldb.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: leveldb +Version: 1.23 +Release: %autorelease +Summary: A fast and lightweight key/value database library by Google +License: BSD-3-Clause +URL: https://github.com/google/leveldb +#!RemoteAsset +Source: https://github.com/google/leveldb/archive/refs/tags/%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DBUILD_SHARED_LIBS:BOOL=ON +BuildOption(conf): -DLEVELDB_BUILD_TESTS:BOOL=OFF +BuildOption(conf): -DLEVELDB_BUILD_BENCHMARKS:BOOL=OFF +BuildOption(conf): -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: snappy-devel + +%description +LevelDB is a fast key-value storage library written at Google that provides an +ordered mapping from string keys to string values. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files and development libraries for leveldb. + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc AUTHORS README.md NEWS +%{_libdir}/libleveldb.so.* + +%files devel +%doc CONTRIBUTING.md TODO +%{_includedir}/leveldb/ +%dir %{_libdir}/cmake +%{_libdir}/cmake/leveldb +%{_libdir}/libleveldb.so + +%changelog +%{?autochangelog} diff --git a/SPECS/libICE/libICE.spec b/SPECS/libICE/libICE.spec new file mode 100644 index 00000000..99a25f1d --- /dev/null +++ b/SPECS/libICE/libICE.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libICE +Version: 1.1.2 +Release: %autorelease +Summary: X.Org X11 ICE runtime library +License: MIT-open-group +URL: http://www.x.org +#!RemoteAsset +Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --without-fop +BuildOption(conf): --without-xmlto + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(xorg-macros) >= 1.12 +BuildRequires: pkgconfig(xproto) +BuildRequires: pkgconfig(xtrans) + +%description +The X.Org X11 ICE (Inter-Client Exchange) runtime library. + +%package devel +Summary: X.Org X11 ICE development package +Requires: %{name} = %{version}-%{release} + +%description devel +The X.Org X11 ICE (Inter-Client Exchange) development package. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%files +%{_libdir}/libICE.so.* +%doc AUTHORS ChangeLog COPYING + +%files devel +%{_includedir}/X11/ICE +%{_libdir}/libICE.so +%{_libdir}/pkgconfig/ice.pc +%{_docdir}/%{name}/*.xml + +%changelog +%{?autochangelog} diff --git a/SPECS/libSM/libSM.spec b/SPECS/libSM/libSM.spec new file mode 100644 index 00000000..699166c2 --- /dev/null +++ b/SPECS/libSM/libSM.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libSM +Version: 1.2.6 +Release: %autorelease +Summary: X.Org X11 SM runtime library +License: MIT AND MIT-open-group +URL: http://www.x.org +#!RemoteAsset +Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --with-libuuid +BuildOption(conf): --disable-static + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(ice) >= 1.0.5 +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(xproto) +BuildRequires: pkgconfig(xtrans) +BuildRequires: util-macros + +%description +The X.Org X11 SM (Session Management) runtime library. + +%package devel +Summary: X.Org X11 SM development package +Requires: %{name} = %{version}-%{release} + +%description devel +The X.Org X11 SM (Session Management) development package. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%files +%{_libdir}/libSM.so.6* +%doc %{_docdir}/%{name} + +%files devel +%{_includedir}/X11/* +%{_libdir}/libSM.so +%{_libdir}/pkgconfig/sm.pc +%license COPYING +%doc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/libX11/libX11.spec b/SPECS/libX11/libX11.spec new file mode 100644 index 00000000..984b25c4 --- /dev/null +++ b/SPECS/libX11/libX11.spec @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libX11 +Version: 1.8.12 +Release: %autorelease +Summary: Core X11 protocol client library +License: MIT +URL: https://www.x.org +#!RemoteAsset +Source0: https://www.x.org/releases/individual/lib/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-silent-rules + +BuildRequires: pkgconfig(inputproto) +BuildRequires: pkgconfig(kbproto) +BuildRequires: pkgconfig(xcb) >= 1.11.1 +BuildRequires: pkgconfig(xextproto) +BuildRequires: pkgconfig(xf86bigfontproto) >= 1.2.0 +BuildRequires: pkgconfig(xorg-macros) >= 1.15 +BuildRequires: pkgconfig(xproto) >= 7.0.25 +BuildRequires: pkgconfig(xtrans) +BuildRequires: xmlto >= 0.0.22 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +%description +Core X11 protocol client library. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libX11 development package + +%package doc +Summary: Documentation for %{name} + +%description doc +The %{name}-doc package contains documentation for the %{name} library. + +%conf -p +autoreconf -fiv + +%install -a +mkdir -p %{buildroot}/var/cache/libX11/compose + +# Don't install Xcms.txt +find %{buildroot} -name 'Xcms.txt' -delete +rm -rf %{buildroot}%{_docdir} + +%files +%doc AUTHORS +%license COPYING +%{_libdir}/*.so.* +%{_datadir}/X11/locale/* +%{_datadir}/X11/XErrorDB +%dir /var/cache/libX11 +%dir /var/cache/libX11/compose + +%files devel +%{_libdir}/*.a +%{_libdir}/*.so +%{_includedir}/X11/*.h +%{_libdir}/pkgconfig/*.pc +%{_includedir}/X11/extensions/XKBgeom.h + +%files doc +%{_mandir}/man3/*.3* +%{_mandir}/man5/*.5* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXau/libXau.spec b/SPECS/libXau/libXau.spec new file mode 100644 index 00000000..c32a0b36 --- /dev/null +++ b/SPECS/libXau/libXau.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXau +Version: 1.0.12 +Release: %autorelease +Summary: Sample Authorization Protocol for X +License: MIT-open-group +URL: http://www.x.org +#!RemoteAsset +Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: util-macros +BuildRequires: pkgconfig +BuildRequires: xorgproto + +%description +This is a very simple mechanism for providing individual access to an X Window +System display. It uses existing core protocol and library hooks for specifying +authorization data in the connection setup block to restrict use of the display +to only those clients that show that they know a server-specific key +called a "magic cookie". + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: xorgproto +Requires: pkgconfig +BuildRequires: xorgproto + +%description devel +X.Org X11 libXau development package + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%files +%doc AUTHORS COPYING README ChangeLog +%{_libdir}/libXau.so.* + +%files devel +%{_includedir}/X11/Xauth.h +%{_libdir}/libXau.so +%{_libdir}/pkgconfig/xau.pc +%{_mandir}/man3/*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXext/libXext.spec b/SPECS/libXext/libXext.spec new file mode 100644 index 00000000..32580bcf --- /dev/null +++ b/SPECS/libXext/libXext.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXext +Version: 1.3.6 +Release: %autorelease +Summary: X.Org X11 libXext runtime library +License: MIT +URL: https://xorg.freedesktop.org/ +#!RemoteAsset +Source0: https://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xextproto) +BuildRequires: pkgconfig(xorg-macros) >= 1.12 +BuildRequires: pkgconfig(xproto) >= 7.0.13 +BuildRequires: xmlto +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +Requires: libX11 + +%description +X.Org X11 libXext runtime library + +%package devel +Summary: X.Org X11 libXext development package +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libXext development package + +%package doc +Summary: Documentation for %{name} + +%description doc +The %{name}-doc package contains documentation for the %{name} library. + + +%conf -p +autoreconf -fiv + +%files +%doc AUTHORS +%license COPYING +%{_libdir}/libXext.so.* + +%files devel +%{_includedir}/X11/extensions/*.h +%{_libdir}/libXext.so +%{_libdir}/pkgconfig/*.pc + +%files doc +%{_docdir}/libXext/* +%{_mandir}/man3/*.3* + + +%changelog +%{?autochangelog} diff --git a/SPECS/libXfixes/libXfixes.spec b/SPECS/libXfixes/libXfixes.spec new file mode 100644 index 00000000..1acd2cc8 --- /dev/null +++ b/SPECS/libXfixes/libXfixes.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXfixes +Version: 6.0.2 +Release: %autorelease +Summary: X Fixes library +License: MIT +URL: https://www.x.org/ +#!RemoteAsset +Source0: https://www.x.org/archive/individual/lib/%{name}-%{version}.tar.xz + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: pkgconfig(fixesproto) >= 6.0 +BuildRequires: pkgconfig(x11) >= 1.6 +BuildRequires: pkgconfig(xextproto) +BuildRequires: pkgconfig(xorg-macros) >= 1.8 +BuildRequires: pkgconfig(xproto) >= 7.0.22 + +%description +X Fixes library. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +libXfixes development package + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS +%{_libdir}/libXfixes.so.* + +%files devel +%{_includedir}/X11/extensions/Xfixes.h +%{_libdir}/pkgconfig/*.pc +%{_libdir}/libXfixes.so +%if %{with static} +%{_libdir}/*.a +%endif +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXft/libXft.spec b/SPECS/libXft/libXft.spec new file mode 100644 index 00000000..1226c842 --- /dev/null +++ b/SPECS/libXft/libXft.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXft +Version: 2.3.8 +Release: %autorelease +Summary: X.Org X11 libXft runtime library +License: HPND-sell-variant +URL: https://xorg.freedesktop.org +VCS: git:https://gitlab.freedesktop.org/xorg/lib/libxft +#!RemoteAsset +Source0: %{url}/releases/individual/lib/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: %{url}/releases/individual/lib/%{name}-%{version}.tar.xz.sig +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig(xorg-macros) +BuildRequires: pkgconfig(xrender) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(fontconfig) + +%description +X.Org X11 libXft runtime library + +%package devel +Summary: X.Org X11 libXft development package +Requires: %{name} = %{version}-%{release} + +%description devel +X.Org X11 libXft development package + +%conf -p +autoconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%doc AUTHORS COPYING README.md ChangeLog +%{_libdir}/libXft.so.2* + +%files devel +%dir %{_includedir}/X11/Xft +%{_includedir}/X11/Xft/Xft.h +%{_includedir}/X11/Xft/XftCompat.h +%{_libdir}/libXft.so +%{_libdir}/pkgconfig/xft.pc +%{_mandir}/man3/Xft*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXi/libXi.spec b/SPECS/libXi/libXi.spec new file mode 100644 index 00000000..4940e41e --- /dev/null +++ b/SPECS/libXi/libXi.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond asciidoc 0 + +Name: libXi +Version: 1.8.2 +Release: %autorelease +Summary: X.Org X11 libXi runtime library +License: MIT +URL: https://www.x.org/ +#!RemoteAsset +Source0: https://www.x.org/releases/individual/lib/%{name}-%{version}.tar.xz + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-specs +%if %{with asciidoc} +BuildOption(conf): --with-asciidoc=yes +%else +BuildOption(conf): --with-asciidoc=no +%endif + +Requires: libX11 >= 1.6 +BuildRequires: pkgconfig(xorg-macros) >= 1.12 +BuildRequires: pkgconfig(x11) >= 1.6 +BuildRequires: pkgconfig(xext) >= 1.0.99.1 +BuildRequires: pkgconfig(xextproto) >= 7.0.3 +BuildRequires: pkgconfig(xfixes) >= 5 +BuildRequires: pkgconfig(inputproto) >= 2.3.99.1 +BuildRequires: pkgconfig(xproto) >= 7.0.13 +BuildRequires: xmlto +%if %{with asciidoc} +BuildRequires: asciidoc +%endif + +%description +X.Org X11 libXi runtime library + +%package devel +Summary: X.Org X11 libXi development package +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libXi development package + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libXi.so.* + +%files devel +%{_includedir}/X11/extensions/*.h +%{_libdir}/libXi.so +%{_libdir}/pkgconfig/xi.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXrandr/libXrandr.spec b/SPECS/libXrandr/libXrandr.spec new file mode 100644 index 00000000..5141c892 --- /dev/null +++ b/SPECS/libXrandr/libXrandr.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXrandr +Version: 1.5.4 +Release: %autorelease +Summary: X.Org X11 libXrandr runtime library +License: MIT +URL: https://www.x.org +#!RemoteAsset +Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: pkgconfig(xorg-macros) >= 1.12 +BuildRequires: pkgconfig(xproto) >= 7.0.13 +BuildRequires: pkgconfig(x11) >= 1.6.0 +BuildRequires: pkgconfig(xext) +BuildRequires: pkgconfig(xrender) + +Requires: libX11 >= 1.6.0 + +%description +X.Org X11 libXrandr runtime library + +%package devel +Summary: X.Org X11 libXrandr development package +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libXrandr development package + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS +%{_libdir}/libXrandr.so.2* + +%files devel +%{_includedir}/X11/extensions/*.h +%{_libdir}/libXrandr.so +%{_libdir}/pkgconfig/xrandr.pc +%{_mandir}/man3/*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXrender/libXrender.spec b/SPECS/libXrender/libXrender.spec new file mode 100644 index 00000000..f39c86b3 --- /dev/null +++ b/SPECS/libXrender/libXrender.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXrender +Version: 0.9.12 +Release: %autorelease +Summary: X.Org X11 libXrender runtime library +License: MIT +URL: https://www.x.org +#!RemoteAsset +Source0: https://www.x.org/releases/individual/lib/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: gcc +BuildRequires: pkgconfig(renderproto) >= 0.9 +BuildRequires: pkgconfig(x11) >= 1.6 +BuildRequires: pkgconfig(xorg-macros) +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +%description +X.Org X11 libXrender runtime library + +%package devel +Summary: X.Org X11 libXrender development package +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libXrender development package + +%conf -p +autoreconf -fiv + +%files +%doc AUTHORS +%license COPYING +%{_libdir}/*.so.* + +%files devel +%{_includedir}/X11/extensions/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_docdir}/libXrender/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXt/libXt.spec b/SPECS/libXt/libXt.spec new file mode 100644 index 00000000..fff24eb6 --- /dev/null +++ b/SPECS/libXt/libXt.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXt +Version: 1.3.1 +Release: %autorelease +Summary: X.Org X11 libXt runtime library +License: MIT +URL: https://www.x.org +#!RemoteAsset +Source0: https://www.x.org/releases/individual/lib/%{name}-%{version}.tar.xz + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: pkgconfig(ice) +BuildRequires: pkgconfig(kbproto) +BuildRequires: pkgconfig(sm) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xproto) +BuildRequires: pkgconfig(xorg-macros) +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gcc + +Requires: libX11 >= 1.6 + +%description +X.Org X11 libXt runtime library. + +%package devel +Summary: X.Org X11 libXt development package +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libXt development package + +%conf -p +autoreconf -fiv +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" + +%install -a +mkdir -p -m 0755 %{buildroot}%{_datadir}/X11/app-defaults + +%files +%license COPYING +%{_libdir}/*.so.* +%dir %{_datadir}/X11/app-defaults + +%files devel +%{_includedir}/X11/*.h +%{_libdir}/*.so +%if %{with static} +%{_libdir}/*.a +%endif +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man3/*.3* +%doc %{_datadir}/doc/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libXtst/libXtst.spec b/SPECS/libXtst/libXtst.spec new file mode 100644 index 00000000..de2ef830 --- /dev/null +++ b/SPECS/libXtst/libXtst.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libXtst +Version: 1.2.5 +Release: %autorelease +Summary: X.Org X11 libXtst runtime library +License: MIT +URL: https://www.x.org +#!RemoteAsset +Source0: https://www.x.org/releases/individual/lib/%{name}-%{version}.tar.xz + +BuildSystem: autotools + +BuildOption(conf): --disable-static + +Requires: libX11 >= 1.6 +BuildRequires: pkgconfig(xorg-macros) >= 1.12 +BuildRequires: pkgconfig(x11) >= 1.6 +BuildRequires: pkgconfig(xext) >= 1.0.99.4 +BuildRequires: pkgconfig(xextproto) >= 7.0.99.3 +BuildRequires: pkgconfig(recordproto) >= 1.13.99.1 +BuildRequires: pkgconfig(inputproto) +BuildRequires: pkgconfig(xi) + +%description +X.Org X11 libXtst runtime library + +%package devel +Summary: X.Org X11 libXtst development package +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +X.Org X11 libXtst development package + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libXtst.so.* + +%files devel +%doc %{_docdir}/libXtst/* +%{_includedir}/X11/extensions/*.h +%{_libdir}/libXtst.so +%{_libdir}/pkgconfig/xtst.pc +%{_mandir}/man3/XTest*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/libaio/libaio-fix-test-off64_t.patch b/SPECS/libaio/libaio-fix-test-off64_t.patch new file mode 100644 index 00000000..3ede8f98 --- /dev/null +++ b/SPECS/libaio/libaio-fix-test-off64_t.patch @@ -0,0 +1,22 @@ +submitted as https://pagure.io/libaio/issue/21 + +--- libaio-libaio-0.3.113.orig/harness/cases/23.t ++++ libaio-libaio-0.3.113/harness/cases/23.t +@@ -72,7 +72,7 @@ static void fail_errno(const char *forma + static void *thrproc2(void *arg) + { + for (;;) { +- off_t offset = 0; ++ off64_t offset = 0; + + pthread_barrier_wait(&barrier); + if (exiting) +@@ -92,7 +92,7 @@ static void *thrproc3(void *arg) + { + for (;;) { + char c; +- off_t offset = 0; ++ off64_t offset = 0; + + pthread_barrier_wait(&barrier); + if (exiting) diff --git a/SPECS/libaio/libaio.spec b/SPECS/libaio/libaio.spec new file mode 100644 index 00000000..ab5a7f8f --- /dev/null +++ b/SPECS/libaio/libaio.spec @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libaio +Version: 0.3.113 +Release: %autorelease +Summary: Linux-Native Asynchronous I/O Access Library +License: LGPL-2.1-or-later +URL: https://pagure.io/libaio +#!RemoteAsset +Source: https://releases.pagure.org/libaio/libaio-%{version}.tar.gz + +Patch0: libaio-fix-test-off64_t.patch + +BuildSystem: autotools + +BuildOption(install): libdir=%{_libdir} + +BuildRequires: gcc +BuildRequires: make + +%description +The Linux-native asynchronous I/O (AIO) facility has a richer API and +capability set than the POSIX AIO facility. This library provides the +Linux-native API for AIO. + +%package devel +Summary: Development Files for Linux-native Asynchronous I/O Access +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package provides the header files and libraries needed to develop +applications using the Linux-native asynchronous I/O facility. + +%conf + +%install -a + +mkdir -p %{buildroot}%{_libdir}/pkgconfig +cat > %{buildroot}%{_libdir}/pkgconfig/libaio.pc << EOF +prefix=%{_prefix} +libdir=%{_libdir} +includedir=%{_includedir} + +Name: libaio +Description: Linux-native asynchronous I/O access library +Version: %{version} +Libs: -laio +Cflags: -I\${includedir} +EOF + +rm %{buildroot}%{_libdir}/*.a +mkdir -p %{buildroot}%{_mandir}/man3 +install -p -m 0644 man/*.3 %{buildroot}%{_mandir}/man3/ + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libaio.so.1 +%{_libdir}/libaio.so.1.* + +%files devel +%doc TODO +%{_includedir}/libaio.h +%{_libdir}/libaio.so +%{_libdir}/pkgconfig/libaio.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libarchive/libarchive.spec b/SPECS/libarchive/libarchive.spec new file mode 100644 index 00000000..b7ef8b2a --- /dev/null +++ b/SPECS/libarchive/libarchive.spec @@ -0,0 +1,97 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libarchive +Version: 3.8.1 +Release: %autorelease +Summary: Utility and C library to create and read several streaming archive formats +License: BSD-2-Clause +URL: https://www.libarchive.org/ +#!RemoteAsset +Source0: https://github.com/libarchive/libarchive/releases/download/v%{version}/libarchive-%{version}.tar.xz +#!RemoteAsset +Source1: https://github.com/libarchive/libarchive/releases/download/v%{version}/libarchive-%{version}.tar.xz.asc + +BuildSystem: autotools +BuildOption(conf): --disable-static +# TODO: enable openssl +BuildOption(conf): --without-openssl + +BuildRequires: acl-devel +BuildRequires: bzip2-devel +BuildRequires: lz4-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: libzstd-devel +BuildRequires: pkgconfig +BuildRequires: xz-devel +BuildRequires: zlib-devel + +%description +Libarchive is a programming library that can create and read several +different streaming archive formats, including most popular tar +variants and several cpio formats. It can also write shar archives and +read ISO-9660 CDROM images. The bsdtar program is an implementation of +tar(1) that is built on top of libarchive. It started as a test +harness, but has grown and is now the standard system tar for FreeBSD 5 +and 6. + +This package contains the bsdtar cmdline utility. + +%package -n bsdtar +Summary: Utility to read several different streaming archive formats +Group: Productivity/Archiving/Compression +Requires: %{name} >= %{version} + +%description -n bsdtar +This package contains the bsdtar cmdline utility. + +%package devel +Summary: Development files for libarchive +Requires: %{name} = %{version} +Requires: glibc-devel + +%description devel +Libarchive is a programming library that can create and read several +different streaming archive formats, including most popular tar +variants and several cpio formats. It can also write shar archives and +read ISO-9660 CDROM images. The bsdtar program is an implementation of +tar(1) that is built on top of libarchive. It started as a test +harness, but has grown and is now the standard system tar for FreeBSD 5 +and 6. + +This package contains the development files. + +%install -a +rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5* +sed -i -e '/Libs.private/d' %{buildroot}%{_libdir}/pkgconfig/libarchive.pc + +%ldconfig_scriptlets + +%files -n bsdtar +%license COPYING +%{_bindir}/bsdcat +%{_bindir}/bsdcpio +%{_bindir}/bsdtar +%{_bindir}/bsdunzip +%{_mandir}/man1/* +%{_mandir}/man5/* + +%files +%license COPYING +%doc NEWS +%{_libdir}/libarchive.so.* + +%files devel +%license COPYING +%doc examples/ +%{_mandir}/man3/* +%{_libdir}/libarchive.so +%{_includedir}/archive* +%{_libdir}/pkgconfig/libarchive.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libassuan/libassuan.spec b/SPECS/libassuan/libassuan.spec new file mode 100644 index 00000000..92790dd6 --- /dev/null +++ b/SPECS/libassuan/libassuan.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libassuan +Version: 3.0.2 +Release: %autorelease +Summary: IPC library used by GnuPG version 2 +License: GPL-3.0-or-later AND LGPL-2.1-or-later +URL: https://www.gnupg.org/related_software/libassuan/index.en.html +#!RemoteAsset +Source0: https://www.gnupg.org/ftp/gcrypt/libassuan/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source2: https://www.gnupg.org/ftp/gcrypt/libassuan/%{name}-%{version}.tar.bz2.sig +# https://www.gnupg.org/signature_key.html +#!RemoteAsset +Source3: https://gnupg.org/signature_key.asc#/%{name}.keyring +BuildSystem: autotools + +BuildRequires: gcc +BuildRequires: flex +BuildRequires: make +BuildRequires: libtool +BuildRequires: pkgconfig(gpg-error) +BuildRequires: texinfo + +%description +Libassuan is the IPC library used by gpg2 (GnuPG version 2) + +%package devel +Summary: IPC library used by GnuPG version 2 +Requires: %{name} = %{version} +Requires: pkgconfig(gpg-error) + +%description devel +Libassuan is the IPC library used by gpg2 (GnuPG version 2) + +gpgme also uses libassuan to communicate with a libassuan-enabled GnuPG +v2 server, but it uses it's own copy of libassuan. + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%license COPYING COPYING.LIB +%{_libdir}/libassuan.so.* + +%files devel +%{_bindir}/libassuan-config +%{_includedir}/assuan.h +%{_libdir}/libassuan.so +%{_libdir}/pkgconfig/libassuan.pc +%{_infodir}/assuan.info* +%{_datadir}/aclocal/libassuan.m4 + +%changelog +%{?autochangelog} diff --git a/SPECS/libatomic_ops/libatomic_ops.spec b/SPECS/libatomic_ops/libatomic_ops.spec new file mode 100644 index 00000000..98e7a730 --- /dev/null +++ b/SPECS/libatomic_ops/libatomic_ops.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libatomic_ops +Version: 7.8.2 +Release: %autorelease +Summary: A portable library for atomic memory operations +License: GPL-2.0-or-later AND MIT +URL: https://github.com/ivmai/libatomic_ops +#!RemoteAsset +Source: https://github.com/ivmai/libatomic_ops/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools +BuildOption(conf): --docdir=%{_docdir}/%{name} + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig + +%description +Provides implementations for atomic memory update operations on a +number of architectures. This allows direct use of these in reasonably +portable code. Unlike earlier similar packages, this one explicitly +considers memory barrier semantics, and allows the construction of code +that involves minimum overhead across a variety of architectures. + +%package devel +Summary: A portable library for atomic memory operations + +%description devel +Provides implementations for atomic memory update operations on a +number of architectures. This allows direct use of these in reasonably +portable code. Unlike earlier similar packages, this one explicitly +considers memory barrier semantics, and allows the construction of code +that involves minimum overhead across a variety of architectures. + + +%build -p +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects + +%files devel +%license LICENSE COPYING +%doc ChangeLog README.md +%{_libdir}/libatomic_ops*.a +%{_includedir}/atomic_ops/ +%{_includedir}/atomic_ops*.h +%{_libdir}/pkgconfig/atomic_ops.pc +%{_docdir}/%{name}/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libbpf/libbpf.spec b/SPECS/libbpf/libbpf.spec new file mode 100644 index 00000000..f8813045 --- /dev/null +++ b/SPECS/libbpf/libbpf.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libbpf +Version: 1.6.2 +Release: %autorelease +Summary: C library for managing eBPF programs and maps +License: LGPL-2.1-only OR BSD-2-Clause +URL: https://github.com/libbpf/libbpf +#!RemoteAsset +Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): STATIC_LIBS= LIBDIR=%{_libdir} +BuildOption(build): -C src +BuildOption(install): STATIC_LIBS= LIBDIR=%{_libdir} +BuildOption(install): -C src + +BuildRequires: libelf-devel +BuildRequires: zlib-devel + +%description +libbpf is a C library which provides API for managing eBPF programs and maps. + +%package devel +Summary: Development files for libbpf +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +libbpf is a C library which provides API for managing eBPF programs and maps. + +%conf + +%check +# Upstream does not provide a 'make check' target. + +%files +%{_libdir}/libbpf.so.* + +%files devel +%{_libdir}/libbpf.so +%{_includedir}/bpf/ +%{_libdir}/pkgconfig/libbpf.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libburn/0001-libburn-1.5.6-c23.patch b/SPECS/libburn/0001-libburn-1.5.6-c23.patch new file mode 100644 index 00000000..97afab0b --- /dev/null +++ b/SPECS/libburn/0001-libburn-1.5.6-c23.patch @@ -0,0 +1,13 @@ +diff --git a/test/poll.c b/test/poll.c +index 660f384..cd5ff90 100644 +--- a/test/poll.c ++++ b/test/poll.c +@@ -14,7 +14,7 @@ static struct burn_drive_info *drives; + static unsigned int n_drives; + int NEXT; + +-static void catch_int () ++static void catch_int (int signum) + { + NEXT = 1; + } diff --git a/SPECS/libburn/libburn.spec b/SPECS/libburn/libburn.spec new file mode 100644 index 00000000..52506b0d --- /dev/null +++ b/SPECS/libburn/libburn.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libburn +Version: 1.5.6 +Release: %autorelease +Summary: Library for reading, mastering and writing optical discs +License: GPL-2.0-or-later +URL: https://libburnia-project.org/ +#!RemoteAsset +Source: https://files.libburnia-project.org/releases/libburn-%{version}.tar.gz +Patch: 0001-libburn-1.5.6-c23.patch +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-doxygen-docs +BuildOption(build): CFLAGS="%{optflags} -Wno-error=format-overflow" + +BuildRequires: gcc make intltool gettext autoconf automake libtool + +Requires(post): update-alternatives +Requires(preun): update-alternatives + +%description +Libburn is a library for writing and reading data to/from optical media like +CD, DVD, and Blu-Ray discs. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +This package contains the libraries, header files, API documentation, and +tools needed to develop applications that use libburn. + +%conf -p +autoreconf -fiv + +%install -a +touch %{buildroot}%{_bindir}/cdrecord +touch %{buildroot}%{_mandir}/man1/cdrecord.1.gz + +%post +/sbin/ldconfig +/usr/sbin/alternatives --install %{_bindir}/cdrecord cdrecord %{_bindir}/cdrskin 50 \ + --slave %{_mandir}/man1/cdrecord.1.gz cdrecord-man %{_mandir}/man1/cdrskin.1.gz + +%preun +if [ $1 -eq 0 ]; then + /usr/sbin/alternatives --remove cdrecord %{_bindir}/cdrskin +fi + +%postun +/sbin/ldconfig + +%files +%license COPYING +%doc AUTHORS COPYRIGHT README +%{_libdir}/libburn*.so.* +%{_bindir}/cdrskin +%ghost %{_bindir}/cdrecord +%{_mandir}/man1/cdrskin.1* +%ghost %{_mandir}/man1/cdrecord.1* + +%files devel +%{_includedir}/libburn +%{_libdir}/libburn*.so +%{_libdir}/pkgconfig/libburn*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libcap-ng/libcap-ng.spec b/SPECS/libcap-ng/libcap-ng.spec new file mode 100644 index 00000000..f4df7041 --- /dev/null +++ b/SPECS/libcap-ng/libcap-ng.spec @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libcap-ng +Version: 0.8.5 +Release: %autorelease +Summary: An alternate Linux/POSIX capabilities library +License: LGPL-2.1-or-later +URL: https://people.redhat.com/sgrubb/libcap-ng +#!RemoteAsset +Source: https://people.redhat.com/sgrubb/%{name}/%{name}-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --without-python + +BuildRequires: linux-headers +BuildRequires: pkgconfig + +%description +libcap-ng is a library providing an alternate mechanism to libcap to +make use of Linux process and file capabilities. It also contains utilities +for analysing and setting file capabilities. + +%package devel +Summary: Header files for the libcap-ng library +License: LGPL-2.1-or-later +Requires: %{name} = %{version} +Requires: linux-headers >= 2.6.11 +Requires: pkgconfig + +%description devel +The libcap-ng-devel package contains the files needed for developing +applications that need to use the libcap-ng library. + +%package utils +Summary: Utilities for analysing and setting file capabilities +License: GPL-2.0-or-later +Requires: %{name} = %{version} + +%description utils +The libcap-ng-utils package contains applications to analyse the +Linux process capabilities of programs running on a system. It also +lets you set the filesystem-based capabilities. + +%conf -p +export LDFLAGS="$LDFLAGS -lpthread" + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING.LIB +%{_libdir}/%{name}.so.0 +%{_libdir}/%{name}.so.0.* +%{_libdir}/libdrop_ambient.so.0 +%{_libdir}/libdrop_ambient.so.0.* + +%files devel +%{_mandir}/man3/*.3%{ext_man} +%{_mandir}/man7/libdrop_ambient.7%{ext_man} +%{_includedir}/cap-ng.h +%{_libdir}/%{name}.so +%{_libdir}/libdrop_ambient.so +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/cap-ng.m4 +%{_libdir}/pkgconfig/%{name}.pc + +%files utils +%license COPYING +%{_bindir}/captest +%{_bindir}/filecap +%{_bindir}/netcap +%{_bindir}/pscap +%{_mandir}/man8/*.8%{ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/libcap/libcap.spec b/SPECS/libcap/libcap.spec new file mode 100644 index 00000000..454c0807 --- /dev/null +++ b/SPECS/libcap/libcap.spec @@ -0,0 +1,99 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libcap +Version: 2.76 +Release: %autorelease +Summary: Library for Capabilities (linux-privs) Support +License: BSD-3-Clause OR GPL-2.0-only +URL: https://sites.google.com/site/fullycapable/ +#!RemoteAsset +Source: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign +#!RemoteAsset +Source2: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/plain/pgp.keys.asc#/%{name}.keyring + +BuildSystem: autotools +BuildRequires: glibc-static +BuildRequires: pkgconfig +BuildRequires: binutils + +%global buildvariables RAISE_SETFCAP=no prefix=%{_prefix} lib=%{_lib} SHARED=yes LIBDIR=%{_libdir} SBINDIR=%{_sbindir} PKGCONFIGDIR=%{_libdir}/pkgconfig/ INCDIR=%{_includedir} MANDIR=%{_mandir} SHARED=yes COPTS="%{optflags} %{_lto_cflags} -ffat-lto-objects" + +BuildOption(build): %{buildvariables} +BuildOption(install): %{buildvariables} + +%description +Capabilities are a measure to limit the omnipotence of the superuser. +Currently a program started by root or setuid root has the power to do +anything. Capabilities (Linux-Privs) provide a more fine-grained access +control. Without kernel patches, you can use this library to drop +capabilities within setuid binaries. If you use patches, this can be +done automatically by the kernel. + + +%package devel +Summary: Development files for libcap +Requires: glibc-devel +Requires: %{name} = %{version} + +%description devel +Development files (Headers, libraries for static linking, etc) for +libcap. + +libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) +draft 15 capabilities. + +Install libcap-devel if you want to develop or compile applications +using libcap. + +%package progs +Summary: Libcap utility programs +Requires: %{name} = %{version} + +%description progs +This package contains utility programs handling capabilities via +libcap. + +# No configure +%conf + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +rm %{buildroot}%{_libdir}/libcap.a + +%ldconfig_scriptlets + + +%files +%license License +%{_libdir}/libcap.so.* +%{_libdir}/libpsx.so.2* +%{_libdir}/security/pam_cap.so + +%files progs +%license License +%{_mandir}/man1/* +%{_mandir}/man8/* +%{_sbindir}/* + +%files devel +%license License +%doc README CHANGELOG +%{_includedir}/sys/capability.h +%{_includedir}/sys/psx_syscall.h +%{_libdir}/*.so +%{_libdir}/libpsx.a +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/libpsx.pc +%{_mandir}/man3/*.3%{?ext_man} +%{_mandir}/man5/*.5%{?ext_man} +%{_mandir}/man7/*.7* + +%changelog +%{?autochangelog} diff --git a/SPECS/libcbor/libcbor.spec b/SPECS/libcbor/libcbor.spec new file mode 100644 index 00000000..22560504 --- /dev/null +++ b/SPECS/libcbor/libcbor.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libcbor +Version: 0.11.0 +Release: %autorelease +Summary: Library for parsing Concise Binary Object Representation (CBOR) +License: MIT +URL: https://github.com/PJK/libcbor +#!RemoteAsset +Source0: https://github.com/PJK/libcbor/archive/v%{version}.tar.gz +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: cmocka-devel +BuildSystem: cmake +# The libcbor declaration depends on an outdated version of cmake. +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 +%description +libcbor is a C99 library for parsing and generating CBOR (RFC 7049), +a general-purpose schema-less binary data format. + +It supports flexible memory management, UTF-8, streams & incremental +processing, and has a layered architecture. + +%package devel +Summary: Development files for libcbor +Requires: %{name} = %{version} + +%description devel +libcbor is a C library for parsing and generating CBOR. +The libcbor-devel contains libraries and header files for libcbor. + +%ldconfig_scriptlets + +%files +%license LICENSE.md +%{_libdir}/*.so.* + +%files devel +%{_includedir}/cbor.h +%dir %{_includedir}/cbor +%{_includedir}/cbor/*.h +%dir %{_includedir}/cbor/internal +%{_includedir}/cbor/internal/*.h +%{_libdir}/libcbor.so +%{_libdir}/pkgconfig/libcbor.pc +%{_libdir}/cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/libcgroup/libcgroup.spec b/SPECS/libcgroup/libcgroup.spec new file mode 100644 index 00000000..ccee2860 --- /dev/null +++ b/SPECS/libcgroup/libcgroup.spec @@ -0,0 +1,96 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libcgroup +Version: 3.2.0 +Release: %autorelease +Summary: Library and tools for cgroup inspection and management +License: LGPLv2+ +URL: https://github.com/libcgroup/libcgroup +#!RemoteAsset +Source0: https://github.com/libcgroup/libcgroup/archive/refs/tags/v%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-daemon +BuildOption(conf): --enable-opaque-hierarchy="name=systemd" +BuildOption(conf): --disable-static +BuildOption(conf): --enable-pam-module-dir=%{_libdir}/security + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gcc-c++ +BuildRequires: bison +BuildRequires: flex +BuildRequires: pam-devel +BuildRequires: systemd-devel + +%description +The libcgroup library and associated tools for interacting with Linux +Control Groups. On openRuyi, these are primarily for inspection and +compatibility, as system-wide resource management is handled by systemd. + +%package tools +Summary: Command-line tools for inspecting control groups +Requires: %{name}%{?_isa} = %{version}-%{release} +%description tools +Contains tools like lscgroup, cgget, and cgexec for scripting and +manual interaction with the cgroup filesystem. + +%package pam +Summary: PAM module for classifying user sessions into cgroups +Requires: %{name}%{?_isa} = %{version}-%{release} +%description pam +The pam_cgroup PAM module, used to place user login sessions into +pre-configured control groups. + +%package devel +Summary: Development files for the libcgroup library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +Header files and libraries for developing applications that use libcgroup. + +%conf -p +autoreconf -fiv + +%install -a + +# Clean up artifacts related to the disabled legacy daemons. +rm -rf %{buildroot}%{_sysconfdir}/cgconfig.conf +rm -rf %{buildroot}%{_sysconfdir}/cgrules.conf +rm -rf %{buildroot}%{_sysconfdir}/cgsnapshot_blacklist.conf +rm -rf %{buildroot}%{_unitdir}/cgconfig.service +rm -rf %{buildroot}%{_unitdir}/cgrules.service + +# Remove libtool archives. +find %{buildroot} -type f -name "*.la" -delete + +%files +%license COPYING +%{_libdir}/libcgroup.so.* + +%files tools +%license COPYING +%doc README README_systemd +%{_bindir}/* +%{_sbindir}/* +%{_mandir}/man*/* + +%files pam +%license COPYING +%{_libdir}/security/pam_cgroup.so + +%files devel +%license COPYING +%{_includedir}/libcgroup.h +%{_includedir}/libcgroup/*.h +%{_libdir}/libcgroup.so +%{_libdir}/pkgconfig/libcgroup.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libcomps/libcomps.spec b/SPECS/libcomps/libcomps.spec new file mode 100644 index 00000000..cf2a3c89 --- /dev/null +++ b/SPECS/libcomps/libcomps.spec @@ -0,0 +1,111 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# No python docs for now, sorry! +# Change this to 1 once we have python-sphinx +%bcond sphinx 0 + +Name: libcomps +Version: 0.1.23 +Release: %autorelease +Summary: Comps XML file manipulation library +License: GPL-2.0-or-later +URL: https://github.com/rpm-software-management/libcomps +#!RemoteAsset +Source: %{url}/archive/%{version}/libcomps-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DPYTHON_DESIRED:STRING=3 libcomps + +BuildRequires: cmake +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(check) + +%description +Libcomps is library for structure-like manipulation with content of +comps XML files. Supports read/write XML file, structure(s) modification. + +%package devel +Summary: Development files for libcomps library +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for libcomps library. + +%package doc +Summary: Documentation files for libcomps library +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +BuildRequires: doxygen + +%description doc +Documentation files for libcomps library. + +%package -n python-%{name} +Summary: Python bindings for libcomps library +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: make +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +Requires: %{name} = %{version}-%{release} + +%description -n python-%{name} +Python3 bindings for libcomps library. + +%if %{with sphinx} +%package -n python-%{name}-doc +Summary: Documentation files for python bindings libcomps library +Requires: %{name} = %{version}-%{release} +BuildArch: noarch +BuildRequires: python3-sphinx + +%description -n python-%{name}-doc +Documentation files for python bindings libcomps library. +%endif + +%build -a +%cmake_build -t docs +%if %{with sphinx} +%cmake_build -t pydocs +%endif + +%install -a +%if %{with sphinx} +mkdir -p %{buildroot}%{_datadir}/doc/python-libcomps/ +rm %{__cmake_builddir}/src/python/docs/html/.doctrees/environment.pickle +cp -a %{__cmake_builddir}/src/python/docs/html %{buildroot}%{_datadir}/doc/python-libcomps/ +%endif + +%ldconfig_scriptlets + +%files +%{_libdir}/libcomps.so.* +%doc README.md +%license COPYING + +%files devel +%{_libdir}/libcomps.so +%{_libdir}/pkgconfig/libcomps.pc +%{_includedir}/libcomps/ + +%files doc +%{_datadir}/doc/* + +%files -n python-%{name} +%{python3_sitearch}/%{name}/ +%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info + +%if %{with sphinx} +%files -n python-%{name}-doc +%{_datadir}/doc/python-%{name}/html +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/libconfig/libconfig.spec b/SPECS/libconfig/libconfig.spec new file mode 100644 index 00000000..12fb3ed1 --- /dev/null +++ b/SPECS/libconfig/libconfig.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libconfig +Version: 1.8.1 +Release: %autorelease +Summary: C/C++ configuration file library +License: LGPL-2.1-or-later AND GPL-3.0-or-later WITH Bison-exception-2.2 +URL: https://hyperrealm.github.io/libconfig/ +#!RemoteAsset +Source: https://github.com/hyperrealm/libconfig/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DBUILD_TESTS:BOOL=OFF +BuildOption(conf): -DBUILD_EXAMPLES:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: bison +BuildRequires: flex +BuildRequires: make + +%description +Libconfig is a simple library for manipulating structured configuration files. +This format is more compact and more readable than XML, and unlike XML, it is +type-aware, so it is not necessary to do string parsing in application code. + +%package devel +Summary: Development files for libconfig +Requires: %{name} = %{version} + +%description devel +Development libraries and headers for developing software against libconfig. + +%ldconfig_scriptlets + +%files +%license COPYING.LIB +%doc AUTHORS ChangeLog README +%{_libdir}/libconfig*.so.* + +%files devel +%{_includedir}/libconfig* +%{_libdir}/cmake/libconfig +%{_libdir}/libconfig*.so +%{_libdir}/pkgconfig/libconfig*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libconfuse/libconfuse.spec b/SPECS/libconfuse/libconfuse.spec new file mode 100644 index 00000000..0623f578 --- /dev/null +++ b/SPECS/libconfuse/libconfuse.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libconfuse +Version: 3.3 +Release: %autorelease +Summary: A configuration file parser library +License: ISC +URL: https://github.com/martinh/libconfuse +#!RemoteAsset +Source0: https://github.com/martinh/libconfuse/releases/download/v%{version}/confuse-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-static + +BuildRequires: gcc check-devel pkgconfig make + +%description +libConfuse is an easy-to-use configuration file parser library written in C. +It supports sections, lists of values, and other features like environment +variable expansion and nested includes. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +This package contains the header files, libraries, and documentation +needed to develop applications that use libconfuse. + +%install -a +rm -f %{buildroot}%{_libdir}/*.la +mkdir -p %{buildroot}%{_mandir}/man3/ +cp -p doc/man/man3/*.3 %{buildroot}%{_mandir}/man3/ +mkdir -p ex2/examples +cp -p examples/{ftpconf.c,ftp.conf,simple.c,simple.conf,reread.c,reread.conf} \ + ex2/examples/ +rm -rf %{buildroot}%{_datadir}/doc/confuse +%find_lang confuse --generate-subpackages + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc %{_docdir}/%{name} +%doc doc/html +%{_libdir}/libconfuse.so.2* +%{_mandir}/man?/*.* + +%files devel +%doc ex2/examples +%{_includedir}/confuse.h +%{_libdir}/libconfuse.so +%{_libdir}/pkgconfig/libconfuse.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libdaemon/libdaemon.spec b/SPECS/libdaemon/libdaemon.spec new file mode 100644 index 00000000..34d6347c --- /dev/null +++ b/SPECS/libdaemon/libdaemon.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libdaemon +Version: 0.14 +Release: %autorelease +Summary: A lightweight daemon framework in C +License: LGPL-2.1-or-later +URL: https://0pointer.de/lennart/projects/libdaemon/ +#!RemoteAsset +Source: https://0pointer.de/lennart/projects/libdaemon/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: libtool + +%description +libdaemon is a lightweight C library that eases the writing of UNIX daemons. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, documentation, and other files needed +to develop applications that use the libdaemon framework. + +%conf -p +autoreconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%doc README +%license LICENSE +%{_libdir}/*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%doc doc/README.html doc/style.css +%{_datadir}/doc/%{name}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libdatrie/libdatrie.spec b/SPECS/libdatrie/libdatrie.spec new file mode 100644 index 00000000..38ef7448 --- /dev/null +++ b/SPECS/libdatrie/libdatrie.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libdatrie +Version: 0.2.13 +Release: %autorelease +Summary: Implementation of Double-Array structure for representing trie +License: LGPL-2.1-or-later +URL: https://linux.thai.net/~thep/datrie/datrie.html +VCS: git:https://github.com/tlwg/libdatrie +#!RemoteAsset +Source0: http://linux.thai.net/pub/thailinux/software/libthai/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --with-html-docdir=%{_docdir}/%{name}-devel + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: autoconf-archive +BuildRequires: doxygen + +%description +datrie is an implementation of double-array structure for representing trie. + +Trie is a kind of digital search tree, an efficient indexing method with O(1) +time complexity for searching. Comparably as efficient as hashing, trie also +provides flexibility on incremental matching and key spelling manipulation. +This makes it ideal for lexical analyzers, as well as spelling dictionaries. + +Details of the implementation: http://linux.thai.net/~thep/datrie/datrie.html + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains libraries and header files for +developing applications that use %{name}. + +%conf -p +autoconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libdatrie.so.* + +%files devel +%doc AUTHORS ChangeLog NEWS README* +%{_includedir}/datrie/ +%{_libdir}/libdatrie.so +%{_libdir}/pkgconfig/datrie-0.2.pc +%{_bindir}/trietool* +%{_mandir}/man1/trietool* +%{_docdir}/%{name}-devel/*.{html,css,png,js,svg} + +%changelog +%{?autochangelog} diff --git a/SPECS/libdrm/91-drm-modeset.rules b/SPECS/libdrm/91-drm-modeset.rules new file mode 100644 index 00000000..a75a96f8 --- /dev/null +++ b/SPECS/libdrm/91-drm-modeset.rules @@ -0,0 +1 @@ +KERNEL=="controlD[0-9]*", SUBSYSTEM=="drm", MODE="0600" \ No newline at end of file diff --git a/SPECS/libdrm/libdrm.spec b/SPECS/libdrm/libdrm.spec new file mode 100644 index 00000000..3cabd41b --- /dev/null +++ b/SPECS/libdrm/libdrm.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libdrm +Version: 2.4.125 +Release: %autorelease +License: MIT +Summary: Library for Direct Rendering Manager +URL: https://dri.freedesktop.org +#!RemoteAsset +Source0: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz +Source1: 91-drm-modeset.rules +BuildSystem: meson + +BuildOption(conf): -Dudev=true +BuildOption(conf): -Dvalgrind=disabled +BuildOption(conf): -Dman-pages=disabled +BuildOption(conf): -Dtests=false +BuildOption(conf): -Dcairo-tests=disabled + +BuildRequires: meson gcc linux-headers pixman-devel +BuildRequires: pkgconfig libatomic_ops-devel +BuildRequires: pkgconfig(udev) +BuildRequires: pkgconfig(pciaccess) + +%description +libdrm provides a user space library for accessing the DRM (Direct Rendering +Manager). It is a low-level library, typically used by graphics drivers such as +Mesa, X drivers, and libva. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: linux-headers + +%description devel +This package contains the header files and development libraries for libdrm. + +%install -a +install -D -m0644 -t %{buildroot}%{_udevrulesdir} %{SOURCE1} + +%ldconfig_scriptlets + +%files +%{_libdir}/lib*.so.* +%{_udevrulesdir}/91-drm-modeset.rules +%dir %{_datadir}/libdrm +%{_datadir}/libdrm/*.ids + +%files devel +%{_includedir}/* +%{_libdir}/libdrm.so +%{_libdir}/libdrm_*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libeconf/libeconf.spec b/SPECS/libeconf/libeconf.spec new file mode 100644 index 00000000..cfc2b5ac --- /dev/null +++ b/SPECS/libeconf/libeconf.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libeconf +Version: 0.7.8 +Release: %autorelease +Summary: Enhanced config file parser library +License: MIT +URL: https://github.com/openSUSE/libeconf +#!RemoteAsset +Source: https://github.com/openSUSE/libeconf/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Provides: libeconf0 +BuildSystem: meson + +BuildRequires: meson +BuildRequires: pkgconfig + +%description +Enhanced config file parser, which merges config files placed +in several locations into one. This package contains the runtime library. + + +%package devel +Summary: Development files for libeconf +Requires: %{name} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to develop applications that use libeconf. + +%package static +Summary: Static library for libeconf +Requires: %{name}-devel = %{version} +Provides: %{name}-devel-static = %{version} + +%description static +This package contains the libeconf.a static library. + +%package utils +Summary: Command line interface for libeconf +Requires: %{name} = %{version} + +%description utils +This package contains tools for handling configuration files. + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libeconf.so.0 +%{_libdir}/libeconf.so.0.* + +%files static +%{_libdir}/libeconf.a + +%files devel +%{_includedir}/*.h +%{_libdir}/libeconf.so +%{_libdir}/pkgconfig/libeconf.pc +%{_mandir}/man3/*.3* + +%files utils +%{_bindir}/econftool +%{_mandir}/man8/econftool.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/libedit/libedit.spec b/SPECS/libedit/libedit.spec new file mode 100644 index 00000000..cfcfd547 --- /dev/null +++ b/SPECS/libedit/libedit.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define pkg_version 20250104-3.1 +Name: libedit +Version: 20250104.3.1 +Release: %autorelease +Summary: Command Line Editing and History Library +License: BSD-3-Clause +URL: https://www.thrysoee.dk/editline/ +#!RemoteAsset +Source0: https://www.thrysoee.dk/editline/libedit-%{pkg_version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules + +BuildRequires: ncurses-devel + +%description +libedit is a command line editing and history library. It is designed +to be used by interactive programs that allow the user to type commands +at a terminal prompt. + +%package devel +Summary: Development files for libedit +Requires: %{name} = %{version} +Requires: glibc-devel + +%description devel +This package contains the header files, symbolic links, and documentation +needed to develop applications that use the libedit library. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc ChangeLog +%{_libdir}/libedit.so.0 +%{_libdir}/libedit.so.0.* +%{_mandir}/man5/editrc.5* + +%files devel +%{_libdir}/libedit.so +%{_includedir}/histedit.h +%{_includedir}/editline/ +%{_mandir}/man3/*.3* +%{_mandir}/man7/*.7* +%{_libdir}/pkgconfig/libedit.pc +%doc examples/*c THANKS + +%changelog +%{?autochangelog} diff --git a/SPECS/libestr/libestr.spec b/SPECS/libestr/libestr.spec new file mode 100644 index 00000000..02269992 --- /dev/null +++ b/SPECS/libestr/libestr.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libestr +Version: 0.1.11 +Release: %autorelease +Summary: String handling essentials library +License: LGPL-2.1-or-later +URL: http://libestr.adiscon.com/ +#!RemoteAsset +Source0: http://libestr.adiscon.com/files/download/libestr-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --with-pic + +BuildRequires: gcc + +%description +libestr is a library for some string essentials, used by projects like rsyslog. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%install -a +rm -f %{buildroot}%{_libdir}/*.{a,la} + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README AUTHORS ChangeLog +%{_libdir}/lib*.so.* + +%files devel +%{_includedir}/libestr.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/libestr.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libev/libev.pc b/SPECS/libev/libev.pc new file mode 100644 index 00000000..0026d84c --- /dev/null +++ b/SPECS/libev/libev.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib64 +includedir=${prefix}/include + +Name: libev +Description: high-performance event loop +Version: 4.33 +Libs: -L${libdir} -lev +Cflags: -I${includedir} \ No newline at end of file diff --git a/SPECS/libev/libev.spec b/SPECS/libev/libev.spec new file mode 100644 index 00000000..0488ee26 --- /dev/null +++ b/SPECS/libev/libev.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libev +Version: 4.33 +Release: %autorelease +Summary: An event loop library +License: BSD-2-Clause +URL: http://software.schmorp.de/pkg/libev.html +#!RemoteAsset +Source: http://dist.schmorp.de/%{name}/Attic/%{name}-%{version}.tar.gz +# Upstream has received patches to add pkg-config support for years but it always ignored them (yes, no answer at all). But since every distribution creates it we just follow. +Source1: libev.pc +#!RemoteAsset +Source2: http://dist.schmorp.de/%{name}/Attic/%{name}-%{version}.tar.gz.sig +#!RemoteAsset +Source3: http://dist.schmorp.de/signing-key.pub +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: pkgconfig + +%description +An event loop that is loosely modeled after libevent. + +%package devel +Summary: Development files for libev +Requires: %{name} = %{version} + +%description devel +An event loop that is loosely modeled after libevent. Features +include child/PID watchers, periodic timers based on wallclock +(absolute) time (in addition to timers using relative timeouts), as +well as epoll/kqueue/event ports/inotify/eventfd/signalfd support, +timer management, time jump detection and correction. + +It can be used as a libevent replacement using its emulation API, or +directly embedded into programs. An optional Perl interface is +available. + +This package holds the development files for libev. + +%package libevent-devel +Summary: Compatibility development header with libevent for %{name}. +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +# The event.h file actually conflicts with the one from libevent-devel +Conflicts: libevent-devel + +%description libevent-devel +This package contains a development header to make libev compatible with +libevent. + +%install -a +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/libev.pc + +%files +%license LICENSE +%doc README ev.pod Changes +%{_libdir}/libev.so.4 +%{_libdir}/libev.so.4.* + +%files devel +%{_includedir}/ev++.h +%{_includedir}/ev.h +%{_libdir}/libev.so +%{_mandir}/man3/ev.3* +%{_libdir}/pkgconfig/libev.pc + +%files libevent-devel +%{_includedir}/event.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libevent/0001-evwatch-Add-prepare-and-check-watchers.patch b/SPECS/libevent/0001-evwatch-Add-prepare-and-check-watchers.patch new file mode 100644 index 00000000..ff732c21 --- /dev/null +++ b/SPECS/libevent/0001-evwatch-Add-prepare-and-check-watchers.patch @@ -0,0 +1,1150 @@ +From ed07dfb510a830d9435a9a7a1af76256a4233b61 Mon Sep 17 00:00:00 2001 +From: Dan Rosen +Date: Tue, 26 Mar 2019 13:33:57 -0400 +Subject: [PATCH 1/2] evwatch: Add "prepare" and "check" watchers. + +Adds two new callbacks: "prepare" watchers, which fire immediately +before we poll for I/O, and "check" watchers, which fire immediately +after we finish polling and before we process events. This allows other +event loops to be embedded into libevent's, and enables certain +performance monitoring. + +Closes: #710 +--- + CMakeLists.txt | 9 +- + Makefile.am | 1 + + event-internal.h | 49 ++++++ + event.c | 34 +++- + include/event2/watch.h | 134 ++++++++++++++++ + include/include.am | 1 + + sample/include.am | 5 +- + sample/watch-timing.c | 344 +++++++++++++++++++++++++++++++++++++++++ + test/include.am | 1 + + test/regress.h | 1 + + test/regress_main.c | 1 + + test/regress_watch.c | 243 +++++++++++++++++++++++++++++ + watch.c | 82 ++++++++++ + 13 files changed, 902 insertions(+), 3 deletions(-) + create mode 100644 include/event2/watch.h + create mode 100644 sample/watch-timing.c + create mode 100644 test/regress_watch.c + create mode 100644 watch.c + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70acb696..b00af0b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -761,6 +761,7 @@ set(HDR_PUBLIC + include/event2/event.h + include/event2/event_compat.h + include/event2/event_struct.h ++ include/event2/watch.h + include/event2/http.h + include/event2/http_compat.h + include/event2/http_struct.h +@@ -789,6 +790,7 @@ set(SRC_CORE + evutil.c + evutil_rand.c + evutil_time.c ++ watch.c + listener.c + log.c + signal.c +@@ -977,11 +979,15 @@ if (NOT EVENT__DISABLE_SAMPLES) + hello-world + signal-test + http-connect +- time-test) ++ time-test ++ watch-timing) + + foreach(SAMPLE ${SAMPLES}) + add_sample_prog(OFF ${SAMPLE} sample/${SAMPLE}.c) + endforeach() ++ if (NOT WIN32) ++ target_link_libraries(watch-timing m) ++ endif() + + if (NOT EVENT__DISABLE_OPENSSL) + add_sample_prog(ON https-client +@@ -1084,6 +1090,7 @@ if (NOT EVENT__DISABLE_TESTS) + test/regress_testutils.c + test/regress_testutils.h + test/regress_util.c ++ test/regress_watch.c + test/tinytest.c) + + if (WIN32) +diff --git a/Makefile.am b/Makefile.am +index dd905026..2919df00 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -239,6 +239,7 @@ CORE_SRC = \ + evutil.c \ + evutil_rand.c \ + evutil_time.c \ ++ watch.c \ + listener.c \ + log.c \ + $(SYS_SRC) +diff --git a/event-internal.h b/event-internal.h +index 92941b71..ed36fb0b 100644 +--- a/event-internal.h ++++ b/event-internal.h +@@ -32,6 +32,7 @@ extern "C" { + #endif + + #include "event2/event-config.h" ++#include "event2/watch.h" + #include "evconfig-private.h" + + #include +@@ -205,6 +206,52 @@ struct event_once { + void *arg; + }; + ++/** Contextual information passed from event_base_loop to the "prepare" watcher ++ * callbacks. We define this as a struct rather than individual parameters to ++ * the callback function for the sake of future extensibility. */ ++struct evwatch_prepare_cb_info { ++ /** The timeout duration passed to the underlying implementation's `dispatch`. ++ * See evwatch_prepare_get_timeout. */ ++ const struct timeval *timeout; ++}; ++ ++/** Contextual information passed from event_base_loop to the "check" watcher ++ * callbacks. We define this as a struct rather than individual parameters to ++ * the callback function for the sake of future extensibility. */ ++struct evwatch_check_cb_info { ++ /** Placeholder, since empty struct is not allowed by some compilers. */ ++ void *unused; ++}; ++ ++/** Watcher types (prepare and check, perhaps others in the future). */ ++#define EVWATCH_PREPARE 0 ++#define EVWATCH_CHECK 1 ++#define EVWATCH_MAX 2 ++ ++/** Handle to a "prepare" or "check" callback, registered in event_base. */ ++union evwatch_cb { ++ evwatch_prepare_cb prepare; ++ evwatch_check_cb check; ++}; ++struct evwatch { ++ /** Tail queue pointers, called "next" by convention in libevent. ++ * See */ ++ TAILQ_ENTRY(evwatch) next; ++ ++ /** Pointer to owning event loop */ ++ struct event_base *base; ++ ++ /** Watcher type (see above) */ ++ unsigned type; ++ ++ /** Callback function */ ++ union evwatch_cb callback; ++ ++ /** User-defined argument for callback function */ ++ void *arg; ++}; ++TAILQ_HEAD(evwatch_list, evwatch); ++ + struct event_base { + /** Function pointers and other data to describe this event_base's + * backend. */ +@@ -346,6 +393,8 @@ struct event_base { + /** List of event_onces that have not yet fired. */ + LIST_HEAD(once_event_list, event_once) once_events; + ++ /** "Prepare" and "check" watchers. */ ++ struct evwatch_list watchers[EVWATCH_MAX]; + }; + + struct event_config_entry { +diff --git a/event.c b/event.c +index b2ad3410..5e41ae04 100644 +--- a/event.c ++++ b/event.c +@@ -59,6 +59,7 @@ + #include "event2/event.h" + #include "event2/event_struct.h" + #include "event2/event_compat.h" ++#include "event2/watch.h" + #include "event-internal.h" + #include "defer-internal.h" + #include "evthread-internal.h" +@@ -737,6 +738,10 @@ event_base_new_with_config(const struct event_config *cfg) + event_base_start_iocp_(base, cfg->n_cpus_hint); + #endif + ++ /* initialize watcher lists */ ++ for (i = 0; i < EVWATCH_MAX; ++i) ++ TAILQ_INIT(&base->watchers[i]); ++ + return (base); + } + +@@ -839,6 +844,7 @@ event_base_free_(struct event_base *base, int run_finalizers) + { + int i, n_deleted=0; + struct event *ev; ++ struct evwatch *watcher; + /* XXXX grab the lock? If there is contention when one thread frees + * the base, then the contending thread will be very sad soon. */ + +@@ -939,6 +945,15 @@ event_base_free_(struct event_base *base, int run_finalizers) + EVTHREAD_FREE_LOCK(base->th_base_lock, 0); + EVTHREAD_FREE_COND(base->current_event_cond); + ++ /* Free all event watchers */ ++ for (i = 0; i < EVWATCH_MAX; ++i) { ++ while (!TAILQ_EMPTY(&base->watchers[i])) { ++ watcher = TAILQ_FIRST(&base->watchers[i]); ++ TAILQ_REMOVE(&base->watchers[i], watcher, next); ++ mm_free(watcher); ++ } ++ } ++ + /* If we're freeing current_base, there won't be a current_base. */ + if (base == current_base) + current_base = NULL; +@@ -1932,9 +1947,12 @@ event_base_loop(struct event_base *base, int flags) + struct timeval tv; + struct timeval *tv_p; + int res, done, retval = 0; ++ struct evwatch_prepare_cb_info prepare_info; ++ struct evwatch_check_cb_info check_info; ++ struct evwatch *watcher; + + /* Grab the lock. We will release it inside evsel.dispatch, and again +- * as we invoke user callbacks. */ ++ * as we invoke watchers and user callbacks. */ + EVBASE_ACQUIRE_LOCK(base, th_base_lock); + + if (base->running_loop) { +@@ -1993,6 +2011,13 @@ event_base_loop(struct event_base *base, int flags) + + event_queue_make_later_events_active(base); + ++ /* Invoke prepare watchers before polling for events */ ++ EVBASE_RELEASE_LOCK(base, th_base_lock); ++ prepare_info.timeout = tv_p; ++ TAILQ_FOREACH(watcher, &base->watchers[EVWATCH_PREPARE], next) ++ (*watcher->callback.prepare)(watcher, &prepare_info, watcher->arg); ++ EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ + clear_time_cache(base); + + res = evsel->dispatch(base, tv_p); +@@ -2006,6 +2031,13 @@ event_base_loop(struct event_base *base, int flags) + + update_time_cache(base); + ++ /* Invoke check watchers after polling for events, and before ++ * processing them */ ++ EVBASE_RELEASE_LOCK(base, th_base_lock); ++ TAILQ_FOREACH(watcher, &base->watchers[EVWATCH_CHECK], next) ++ (*watcher->callback.check)(watcher, &check_info, watcher->arg); ++ EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ + timeout_process(base); + + if (N_ACTIVE_CALLBACKS(base)) { +diff --git a/include/event2/watch.h b/include/event2/watch.h +new file mode 100644 +index 00000000..e3a6e609 +--- /dev/null ++++ b/include/event2/watch.h +@@ -0,0 +1,134 @@ ++/* ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++#ifndef EVENT2_WATCH_H_INCLUDED_ ++#define EVENT2_WATCH_H_INCLUDED_ ++ ++/** @file event2/watch.h ++ ++ "Prepare" and "check" watchers. A "prepare" watcher is a callback that fires ++ immediately before polling for I/O. A "check" watcher is a callback that ++ fires immediately after polling and before processing any active events. This ++ may be useful for embedding other libraries' event loops (e.g. UI toolkits) ++ into libevent's. ++ ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++struct event_base; ++struct evwatch; ++struct evwatch_prepare_cb_info; ++struct evwatch_check_cb_info; ++struct timeval; ++ ++/** ++ Prepare callback, invoked by event_base_loop immediately before polling for ++ I/O. ++ ++ @param watcher the prepare watcher that invoked this callback. ++ @param info contextual information passed from event_base_loop. ++ @param arg additional user-defined argument, set in `evwatch_prepare_new`. ++ */ ++typedef void (*evwatch_prepare_cb)(struct evwatch *, const struct evwatch_prepare_cb_info *, void *); ++ ++/** ++ Check callback, invoked by event_base_loop immediately after polling for I/O ++ and before processing any active events. ++ ++ @param watcher the check watcher that invoked this callback. ++ @param info contextual information passed from event_base_loop. ++ @param arg additional user-defined argument, set in `evwatch_check_new`. ++ */ ++typedef void (*evwatch_check_cb)(struct evwatch *, const struct evwatch_check_cb_info *, void *); ++ ++/** ++ Register a new "prepare" watcher, to be called in the event loop prior to ++ polling for events. Watchers will be called in the order they were ++ registered. ++ ++ @param base the event_base to operate on. ++ @param callback the callback function to invoke. ++ @param arg additional user-defined argument provided to the callback. ++ @return a pointer to the newly allocated event watcher. ++ */ ++EVENT2_EXPORT_SYMBOL ++struct evwatch *evwatch_prepare_new(struct event_base *base, evwatch_prepare_cb callback, void *arg); ++ ++/** ++ Register a new "check" watcher, to be called in the event loop after polling ++ for events and before handling them. Watchers will be called in the order ++ they were registered. ++ ++ @param base the event_base to operate on. ++ @param callback the callback function to invoke. ++ @param arg additional user-defined argument provided to the callback. ++ @return a pointer to the newly allocated event watcher. ++ */ ++EVENT2_EXPORT_SYMBOL ++struct evwatch *evwatch_check_new(struct event_base *base, evwatch_check_cb callback, void *arg); ++ ++/** ++ Get the event_base that a given evwatch is registered with. ++ ++ @param watcher the watcher to get the event_base for. ++ @return the event_base for the given watcher. ++ */ ++EVENT2_EXPORT_SYMBOL ++struct event_base *evwatch_base(struct evwatch *watcher); ++ ++/** ++ Deregister and deallocate a watcher. Any watchers not freed using ++ evwatch_free will eventually be deallocated in event_base_free ++ (calling evwatch_free on a watcher after event_base_free has been ++ called on its corresponding event_base is an error). ++ ++ @param watcher the watcher to deregister and deallocate. ++ */ ++EVENT2_EXPORT_SYMBOL ++void evwatch_free(struct evwatch *watcher); ++ ++/** ++ Get the timeout (the expected polling duration) passed to the underlying ++ implementation's `dispatch`. This value will only be set if there are pending ++ EV_TIMEOUT events and if the event_base isn't in EVLOOP_NONBLOCK mode. It may ++ be a useful performance statistic to compare the expected polling duration ++ against the actual polling duration (that is, the time difference measured ++ between this prepare callback and the following check callback). ++ ++ @param info the "prepare" callback info. ++ @param timeout address of a timeval to write the polling duration to. ++ @return 1 if a value was written to *timeout, or 0 if not. ++ */ ++EVENT2_EXPORT_SYMBOL ++int evwatch_prepare_get_timeout(const struct evwatch_prepare_cb_info *info, struct timeval *timeout); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* EVENT2_WATCH_H_INCLUDED_ */ +diff --git a/include/include.am b/include/include.am +index aaa2042a..3f4a5522 100644 +--- a/include/include.am ++++ b/include/include.am +@@ -18,6 +18,7 @@ EVENT2_EXPORT = \ + include/event2/event.h \ + include/event2/event_compat.h \ + include/event2/event_struct.h \ ++ include/event2/watch.h \ + include/event2/http.h \ + include/event2/http_compat.h \ + include/event2/http_struct.h \ +diff --git a/sample/include.am b/sample/include.am +index cc003b78..f33e850b 100644 +--- a/sample/include.am ++++ b/sample/include.am +@@ -11,7 +11,8 @@ SAMPLES = \ + sample/http-server \ + sample/http-connect \ + sample/signal-test \ +- sample/time-test ++ sample/time-test \ ++ sample/watch-timing + + if OPENSSL + SAMPLES += sample/le-proxy +@@ -51,3 +52,5 @@ sample_http_server_SOURCES = sample/http-server.c + sample_http_server_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la + sample_http_connect_SOURCES = sample/http-connect.c + sample_http_connect_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la ++sample_watch_timing_SOURCES = sample/watch-timing.c ++sample_watch_timing_LDADD = $(LIBEVENT_GC_SECTIONS) libevent.la -lm +diff --git a/sample/watch-timing.c b/sample/watch-timing.c +new file mode 100644 +index 00000000..9babd32b +--- /dev/null ++++ b/sample/watch-timing.c +@@ -0,0 +1,344 @@ ++#include ++#include ++#include ++#include ++#ifdef EVENT__HAVE_SYS_TIME_H ++#include ++#endif ++#include ++ ++#include ++#include ++#include ++ ++/** ++ An approximate histogram in constant space, based on Ben-Haim & Yom-Tov, "A ++ Streaming Parallel Decision Tree Algorithm" [1] and a previous implementation ++ in Java by Dan Rosen [2]. The histogram is represented as an array of ++ contiguous bins of non-uniform width. Each bin is centered on a certain point, ++ called its "centroid," and summarizes some "count" of observations. The bins ++ are ordered in the array by their centroids; an array is used rather than a ++ linked structure for CPU cache friendliness. ++ ++ When the histogram is updated with a new observation, a new bin is created for ++ it, and then the pair of bins with the closest centroids are merged. Since ++ bins are stored in contiguous memory, this update process requires bins to be ++ shifted in worst-case linear time. The novel contribution of this ++ implementation is to maintain an insertion gap adjacent to the most recently ++ merged bin, such that for "well behaved" input (such as a normal ++ distribution), the number of shift operations required by an update should be ++ much less than the total number of bins on average. ++ ++ This implementation is almost entirely untested. Don't trust it for ++ production code. ++ ++ [1] http://www.jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf ++ [2] https://github.com/mergeconflict/histogram ++ */ ++ ++/** Compare two doubles for equality without the compiler warning. This is ++ * probably the wrong thing to do, but this is just sample code :) */ ++static inline int ++eq(double a, double b) ++{ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wfloat-equal" ++ return a == b; ++#pragma GCC diagnostic pop ++} ++ ++struct bin { ++ double centroid; ++ unsigned long count; ++}; ++ ++struct histogram { ++ struct bin *bins; ++ unsigned max_bins; ++ unsigned num_bins; ++ unsigned gap; ++ unsigned long count; ++ double min; ++ double max; ++}; ++ ++static struct histogram * ++histogram_new(unsigned max_bins) ++{ ++ struct histogram *h = malloc(sizeof(struct histogram)); ++ h->bins = calloc(max_bins + 1, sizeof(struct bin)); ++ h->max_bins = max_bins; ++ h->num_bins = 0; ++ h->gap = 0; ++ h->count = 0; ++ h->min = INFINITY; ++ h->max = -INFINITY; ++ return h; ++} ++ ++static void ++histogram_free(struct histogram *h) ++{ ++ free(h->bins); ++ free(h); ++} ++ ++static void ++histogram_update(struct histogram *h, double observation) ++{ ++ unsigned bin; ++ double delta; ++ double min_delta = INFINITY; ++ ++ /* Update population count, min and max */ ++ ++(h->count); ++ if (observation < h->min) ++ h->min = observation; ++ if (observation > h->max) ++ h->max = observation; ++ ++ /* Shift the insertion gap to the left or right so that the new bin ++ * containing the given observation as its centroid will be in the right ++ * order with respect to the other bins. */ ++ while (1) { ++ /* Look at the bin to the left of the gap... */ ++ if (h->gap != 0) { ++ /* If its centroid is greater than the observation, move ++ * the gap to the left and try again... */ ++ if (h->bins[h->gap - 1].centroid > observation) { ++ h->bins[h->gap] = h->bins[h->gap - 1]; ++ --(h->gap); ++ continue; ++ } ++ /* If its centroid is equal to the observation, just ++ * update its count in place. */ ++ if (eq(h->bins[h->gap - 1].centroid, observation)) { ++ ++(h->bins[h->gap - 1].count); ++ return; ++ } ++ } ++ ++ /* Look at the bin to the right of the gap... */ ++ if (h->gap != h->num_bins) { ++ /* If its centroid is less than the observation, move ++ * the gap to the right and try again... */ ++ if (h->bins[h->gap + 1].centroid < observation) { ++ h->bins[h->gap] = h->bins[h->gap + 1]; ++ ++(h->gap); ++ continue; ++ } ++ /* If its centroid is equal to the observation, just ++ * update its count in place. */ ++ if (eq(h->bins[h->gap + 1].centroid, observation)) { ++ ++(h->bins[h->gap + 1].count); ++ return; ++ } ++ } ++ ++ /* If the gap is in the right place, we're ready to insert. */ ++ break; ++ } ++ ++ /* Insert the observation into a new bin at the gap. */ ++ h->bins[h->gap].centroid = observation; ++ h->bins[h->gap].count = 1; ++ ++ /* If the histogram isn't full yet, don't bother merging bins, just ++ * stick the gap back at the end. */ ++ if (h->num_bins != h->max_bins) { ++ h->gap = ++(h->num_bins); ++ return; ++ } ++ ++ /* Find the two adjacent bins with the closest centroids and merge them. ++ * The choice whether to leave the gap on the left or right is ++ * arbitrary (we choose the left). */ ++ for (bin = 0; bin < h->num_bins; ++bin) { ++ delta = h->bins[bin + 1].centroid - h->bins[bin].centroid; ++ if (delta < min_delta) { ++ min_delta = delta; ++ h->gap = bin; ++ } ++ } ++ /* The merged centroid is the weighted average of the two, and the ++ * merged count is the sum of the two. */ ++ h->bins[h->gap + 1].centroid = ++ (h->bins[h->gap].centroid * h->bins[h->gap].count + ++ h->bins[h->gap + 1].centroid * h->bins[h->gap + 1].count) / ++ (h->bins[h->gap].count + h->bins[h->gap + 1].count); ++ h->bins[h->gap + 1].count += h->bins[h->gap].count; ++} ++ ++static double ++histogram_query(const struct histogram *h, double quantile) ++{ ++ unsigned lhs = 0, rhs = 0; ++ struct bin lhs_bin = { 0, 0 }, rhs_bin = { 0, 0 }; ++ double lhs_total = 0, rhs_total = 0; ++ double a = 0, b = 0, c = 0, z = 0; ++ ++ /* The "needle" is the n'th value represented by the histogram. For ++ * example, if the histogram summarizes 100 entries and we're querying ++ * for the 50th percentile, the needle is 50. */ ++ double needle = h->count * quantile; ++ if (quantile <= 0) ++ return h->min; ++ if (quantile >= 1) ++ return h->max; ++ ++ /* Divide the histogram into slices: the first slice starts at h->min ++ * and ends at h->bins[0].centroid, the last slice starts at ++ * h->bins[h->num_bins].centroid and ends at h->max, and the slices ++ * in the middle are between adjacent centroids (minding the gap). The ++ * "count" in each slice is the average of the count in the two bins ++ * that define it. Find the slice containing the needle by keeping a ++ * running total of the slice counts. */ ++ while (rhs_total < needle) { ++ /* Determine the left-hand side bin of the current slice. Note ++ * that the first slice has bin 0 on its right-hand side! */ ++ if (rhs == 0) { ++ lhs_bin.centroid = h->min; ++ lhs_bin.count = 0; ++ } else { ++ lhs_bin = h->bins[lhs]; ++ } ++ ++ /* Determine the right-hand side bin of the current slice... */ ++ if (rhs > h->num_bins) { ++ lhs_bin.centroid = h->max; ++ rhs_bin.count = 0; ++ } else { ++ rhs_bin = h->bins[rhs]; ++ } ++ ++ /* Update the running totals: the lhs total is whatever the rhs ++ * total was previously, and the new rhs total includes the ++ * count for this slice. */ ++ lhs_total = rhs_total; ++ rhs_total += 0.5 * (lhs_bin.count + rhs_bin.count); ++ ++ /* Next iteration's left-hand side is the current iteration's ++ * right-hand side, and next iteration's right-hand side is one ++ * bin further right (minding the gap). */ ++ lhs = rhs++; ++ if (rhs == h->gap) ++ rhs++; ++ } ++ ++ /* Approximate the value at the requested quantile... */ ++ a = rhs_bin.count - lhs_bin.count; ++ if (eq(a, 0)) { ++ b = rhs_total - lhs_total; ++ z = eq(b, 0) ? 0 : (needle - lhs_total) / b; ++ } else { ++ b = 2 * lhs_bin.count; ++ c = 2 * (lhs_total - needle); ++ z = (-b + sqrt(b * b - 4 * a * c)) / (2 * a); ++ } ++ return lhs_bin.centroid + (rhs_bin.centroid - lhs_bin.centroid) * z; ++} ++ ++/** ++ This is an example of one way in which "prepare" and "check" watchers can be ++ useful. We track histograms of two timing metrics: ++ ++ The first is "duration," which is the amount of time between a "check" and the ++ next "prepare" (in the next iteration of the event loop). This corresponds ++ pretty closely to the amount of time spent in event handlers (such as the ++ `on_timeout` handler in this example). In a real-world server, this would ++ provide a way to monitor whether any of your handlers are blocking or ++ otherwise performing heavy computation. ++ ++ The second is "delay," which is the difference between the actual and expected ++ polling duration. The actual polling duration is the amount of time between a ++ "prepare" and the next "check" (in the same iteration of the event loop), and ++ the expected duration is obtained from `evwatch_prepare_get_timeout`. In a ++ real-world server, this provides an indication of kernel scheduling delays. ++ For example, if your server is lightly loaded, this delay should usually be ++ close to your kernel's scheduling quantum (e.g. 1 millisecond). ++ */ ++ ++static struct event_base *base; ++static struct timeval ++ prepare_time = { 0, 0 }, ++ check_time = { 0, 0 }, ++ expected = { 0, 0 }; ++static struct histogram *durations, *delays; ++ ++static void on_prepare(struct evwatch *watcher, const struct evwatch_prepare_cb_info *info, void *arg) ++{ ++ struct timeval duration; ++ evutil_gettimeofday(&prepare_time, NULL); ++ evwatch_prepare_get_timeout(info, &expected); ++ if (check_time.tv_sec != 0) { ++ evutil_timersub(&prepare_time, &check_time, &duration); ++ histogram_update(durations, duration.tv_sec + duration.tv_usec / 1000000.0l); ++ } ++} ++ ++static void on_check(struct evwatch *watcher, const struct evwatch_check_cb_info *info, void *arg) ++{ ++ struct timeval actual, delay; ++ evutil_gettimeofday(&check_time, NULL); ++ evutil_timersub(&check_time, &prepare_time, &actual); ++ evutil_timersub(&actual, &expected, &delay); ++ if (delay.tv_sec >= 0) ++ histogram_update(delays, delay.tv_sec + delay.tv_usec / 1000000.0l); ++} ++ ++static void ++on_timeout(evutil_socket_t fd, short events, void *arg) ++{ ++ printf("durations: [p50 = %fs, p95 = %fs], delays: [p50 = %fs, p95 = %fs]\n", ++ histogram_query(durations, 0.5), ++ histogram_query(durations, 0.95), ++ histogram_query(delays, 0.5), ++ histogram_query(delays, 0.95)); ++} ++ ++ ++static void ++on_sigint(evutil_socket_t sig, short events, void *arg) ++{ ++ event_base_loopbreak(base); ++} ++ ++int ++main(int argc, char **argv) ++{ ++ struct timeval one_second = { 1, 0 }; ++ struct event *timeout_event, *sigint_event; ++ ++ base = event_base_new(); ++ durations = histogram_new(100); ++ delays = histogram_new(100); ++ ++ /* add prepare and check watchers; no need to hang on to their pointers, ++ * since they will be freed for us in event_base_free. */ ++ evwatch_prepare_new(base, &on_prepare, NULL); ++ evwatch_check_new(base, &on_check, NULL); ++ ++ /* set a persistent one second timeout */ ++ timeout_event = event_new(base, -1, EV_PERSIST, &on_timeout, NULL); ++ if (!timeout_event) ++ return EXIT_FAILURE; ++ event_add(timeout_event, &one_second); ++ ++ /* set a handler for interrupt, so we can quit cleanly */ ++ sigint_event = evsignal_new(base, SIGINT, &on_sigint, NULL); ++ if (!sigint_event) ++ return EXIT_FAILURE; ++ event_add(sigint_event, NULL); ++ ++ /* run the event loop until interrupted */ ++ event_base_dispatch(base); ++ ++ /* clean up */ ++ event_free(timeout_event); ++ event_free(sigint_event); ++ event_base_free(base); ++ histogram_free(durations); ++ histogram_free(delays); ++ ++ return EXIT_SUCCESS; ++} +diff --git a/test/include.am b/test/include.am +index 04375247..ec11b6bf 100644 +--- a/test/include.am ++++ b/test/include.am +@@ -120,6 +120,7 @@ test_regress_SOURCES = \ + test/regress_testutils.c \ + test/regress_testutils.h \ + test/regress_util.c \ ++ test/regress_watch.c \ + test/tinytest.c \ + $(regress_thread_SOURCES) \ + $(regress_zlib_SOURCES) +diff --git a/test/regress.h b/test/regress.h +index 643b82ba..8486e019 100644 +--- a/test/regress.h ++++ b/test/regress.h +@@ -53,6 +53,7 @@ extern struct testcase_t ssl_testcases[]; + extern struct testcase_t listener_testcases[]; + extern struct testcase_t listener_iocp_testcases[]; + extern struct testcase_t thread_testcases[]; ++extern struct testcase_t watch_testcases[]; + + extern struct evutil_weakrand_state test_weakrand_state; + +diff --git a/test/regress_main.c b/test/regress_main.c +index c9372825..6c64b0de 100644 +--- a/test/regress_main.c ++++ b/test/regress_main.c +@@ -380,6 +380,7 @@ struct testgroup_t testgroups[] = { + { "rpc/", rpc_testcases }, + { "thread/", thread_testcases }, + { "listener/", listener_testcases }, ++ { "watch/", watch_testcases }, + #ifdef _WIN32 + { "iocp/", iocp_testcases }, + { "iocp/bufferevent/", bufferevent_iocp_testcases }, +diff --git a/test/regress_watch.c b/test/regress_watch.c +new file mode 100644 +index 00000000..9e340618 +--- /dev/null ++++ b/test/regress_watch.c +@@ -0,0 +1,243 @@ ++/* ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include ++#ifdef EVENT__HAVE_SYS_TIME_H ++#include ++#endif ++#include ++ ++#include "event2/event.h" ++#include "event2/watch.h" ++#include "regress.h" ++ ++static int iteration = 0; ++static int prepare_callback_1_count = 0; ++static int prepare_callback_2_count = 0; ++static int check_callback_1_count = 0; ++static int check_callback_2_count = 0; ++static struct timeval start_time = { 0, 0 }; ++static struct timeval end_time = { 0, 0 }; ++static int user_arg = 8675309; ++ ++static void ++prepare_callback_1(struct evwatch *watcher, const struct evwatch_prepare_cb_info *info, void *arg) ++{ ++ struct timeval timeout; ++ int timeout_msec; ++ ++ /* user argument should be passed properly */ ++ tt_ptr_op(arg, ==, &user_arg); ++ ++ ++prepare_callback_1_count; ++ ++ /* prepare_callback_1 should always fire before prepare_callback_2, and ++ * before both check callbacks */ ++ tt_int_op(prepare_callback_1_count, >, prepare_callback_2_count); ++ tt_int_op(prepare_callback_1_count, >, check_callback_1_count); ++ tt_int_op(prepare_callback_1_count, >, check_callback_2_count); ++ ++ /* if we've just scheduled the timeout event at the beginning of the ++ * iteration, save the current time and assert that the timeout is ++ * roughly what we set (this won't be exact on some platforms) */ ++ if (start_time.tv_sec == 0) { ++ event_base_gettimeofday_cached(evwatch_base(watcher), &start_time); ++ tt_int_op(evwatch_prepare_get_timeout(info, &timeout), ==, 1); ++ ++ timeout_msec = (timeout.tv_sec * 1000) + (timeout.tv_usec / 1000); ++ tt_int_op(timeout_msec, >=, 995); ++ tt_int_op(timeout_msec, <=, 1005); ++ } ++end: ++ ; ++} ++ ++static void ++prepare_callback_2(struct evwatch *watcher, const struct evwatch_prepare_cb_info *info, void *arg) ++{ ++ /* user argument should be passed properly */ ++ tt_ptr_op(arg, ==, &user_arg); ++ ++ ++prepare_callback_2_count; ++ ++ /* prepare_callback_2 should only fire on the first iteration, and ++ * should fire before both check callbacks */ ++ tt_int_op(iteration, ==, 0); ++ tt_int_op(prepare_callback_2_count, >, check_callback_1_count); ++ tt_int_op(prepare_callback_2_count, >, check_callback_2_count); ++end: ++ ; ++} ++ ++static void ++check_callback_1(struct evwatch *watcher, const struct evwatch_check_cb_info *info, void *arg) ++{ ++ /* user argument should be passed properly */ ++ tt_ptr_op(arg, ==, &user_arg); ++ ++ ++check_callback_1_count; ++ ++ /* check_callback_1 should always fire before check_callback_2 */ ++ tt_int_op(check_callback_1_count, >, check_callback_2_count); ++ ++ /* save the end time, in case the timeout fires this time through the ++ * event loop */ ++ event_base_gettimeofday_cached(evwatch_base(watcher), &end_time); ++end: ++ ; ++} ++ ++static void ++check_callback_2(struct evwatch *watcher, const struct evwatch_check_cb_info *info, void *arg) ++{ ++ /* user argument should be passed properly */ ++ tt_ptr_op(arg, ==, &user_arg); ++ ++ ++check_callback_2_count; ++ ++ /* check_callback_2 should only fire on the first iteration */ ++ tt_int_op(iteration, ==, 0); ++end: ++ ; ++} ++ ++static void ++timeout_callback(evutil_socket_t fd, short events, void *arg) ++{ ++ /* the duration between the start and end times should be at least 1 ++ * second */ ++ tt_int_op(end_time.tv_sec, >=, start_time.tv_sec + 1); ++end: ++ ; ++} ++ ++/** ++ This tests a few important properties of "prepare" and "check" watchers: ++ - Watchers should be called in the order they were registered. ++ - Prepare watchers should be called before check watchers. ++ - Freeing a watcher will stop callbacks to it, but not to other watchers. ++ - Reported durations should align with the registered timeouts. ++ - It should be possible to call back into libevent from a callback without a ++ recursive lock. ++ - If this test is compiled with ASAN or similar, this test also illustrates ++ that event_base_free will free any watchers not previously freed by ++ evwatch_free. ++ */ ++static void ++test_callback_ordering(void *ptr) ++{ ++ struct basic_test_data *data = ptr; ++ struct event_base *base = data->base; ++ struct evwatch *prepare_callback_2_watcher; ++ struct evwatch *check_callback_2_watcher; ++ struct timeval timeout; ++ ++ /* install prepare and check watchers */ ++ evwatch_prepare_new(base, &prepare_callback_1, &user_arg); ++ evwatch_check_new(base, &check_callback_1, &user_arg); ++ prepare_callback_2_watcher = evwatch_prepare_new(base, &prepare_callback_2, &user_arg); ++ check_callback_2_watcher = evwatch_check_new(base, &check_callback_2, &user_arg); ++ ++ /* schedule an 1 second timeout event, and run the event loop until the ++ * timeout fires */ ++ timeout.tv_sec = 1; ++ timeout.tv_usec = 0; ++ event_base_once(base, -1, EV_TIMEOUT, &timeout_callback, 0, &timeout); ++ event_base_dispatch(base); ++ ++ /* second iteration: free two of the watchers, schedule a timeout and ++ * run the event loop again */ ++ iteration = 1; ++ start_time.tv_sec = 0; ++ evwatch_free(prepare_callback_2_watcher); ++ evwatch_free(check_callback_2_watcher); ++ event_base_once(base, -1, EV_TIMEOUT, &timeout_callback, 0, &timeout); ++ event_base_dispatch(base); ++} ++ ++static void ++prepare_callback_3(struct evwatch *watcher, const struct evwatch_prepare_cb_info *info, void *arg) ++{ ++ /* timeout should not be written to */ ++ struct timeval timeout = { 123, 456 }; ++ tt_int_op(evwatch_prepare_get_timeout(info, &timeout), ==, 0); ++ tt_int_op(timeout.tv_sec, ==, 123); ++ tt_int_op(timeout.tv_usec, ==, 456); ++end: ++ ; ++} ++ ++/** ++ Test that evwatch_prepare_get_timeout behaves correctly when there is no ++ timeout. ++ */ ++static void ++test_timeout_unavailable(void *ptr) ++{ ++ struct basic_test_data *data = ptr; ++ struct event_base *base = data->base; ++ ++ evwatch_prepare_new(base, &prepare_callback_3, NULL); ++ event_base_dispatch(base); ++} ++ ++#ifndef EVENT__DISABLE_MM_REPLACEMENT ++static void * ++bad_malloc(size_t sz) ++{ ++ return NULL; ++} ++ ++/** ++ Test that creating prepare and check watchers fails gracefully if we can't ++ allocate memory. ++ */ ++static void ++test_malloc_failure(void *ptr) ++{ ++ struct basic_test_data *data = ptr; ++ struct event_base *base = data->base; ++ struct evwatch *bad_prepare, *bad_check; ++ ++ event_set_mem_functions(bad_malloc, realloc, free); ++ bad_prepare = evwatch_prepare_new(base, &prepare_callback_1, NULL); ++ tt_ptr_op(bad_prepare, ==, NULL); ++ ++ bad_check = evwatch_check_new(base, &check_callback_1, NULL); ++ tt_ptr_op(bad_check, ==, NULL); ++ ++ event_set_mem_functions(malloc, realloc, free); ++end: ++ ; ++} ++#endif ++ ++struct testcase_t watch_testcases[] = { ++ BASIC(callback_ordering, TT_FORK|TT_NEED_BASE), ++ BASIC(timeout_unavailable, TT_FORK|TT_NEED_BASE), ++#ifndef EVENT__DISABLE_MM_REPLACEMENT ++ BASIC(malloc_failure, TT_FORK|TT_NEED_BASE), ++#endif ++ END_OF_TESTCASES ++}; +diff --git a/watch.c b/watch.c +new file mode 100644 +index 00000000..645cbd9a +--- /dev/null ++++ b/watch.c +@@ -0,0 +1,82 @@ ++/* ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The name of the author may not be used to endorse or promote products ++ * derived from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include "event2/watch.h" ++#include "event-internal.h" ++#include "evthread-internal.h" ++ ++static inline struct evwatch * ++evwatch_new(struct event_base *base, union evwatch_cb callback, void *arg, unsigned type) ++{ ++ struct evwatch *watcher = mm_malloc(sizeof(struct evwatch)); ++ if (!watcher) ++ return NULL; ++ watcher->base = base; ++ watcher->type = type; ++ watcher->callback = callback; ++ watcher->arg = arg; ++ EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ TAILQ_INSERT_TAIL(&base->watchers[type], watcher, next); ++ EVBASE_RELEASE_LOCK(base, th_base_lock); ++ return watcher; ++} ++ ++struct evwatch * ++evwatch_prepare_new(struct event_base *base, evwatch_prepare_cb callback, void *arg) ++{ ++ union evwatch_cb cb = { .prepare = callback }; ++ return evwatch_new(base, cb, arg, EVWATCH_PREPARE); ++} ++ ++struct evwatch * ++evwatch_check_new(struct event_base *base, evwatch_check_cb callback, void *arg) ++{ ++ union evwatch_cb cb = { .check = callback }; ++ return evwatch_new(base, cb, arg, EVWATCH_CHECK); ++} ++ ++struct event_base * ++evwatch_base(struct evwatch *watcher) ++{ ++ return watcher->base; ++} ++ ++void ++evwatch_free(struct evwatch *watcher) ++{ ++ EVBASE_ACQUIRE_LOCK(watcher->base, th_base_lock); ++ TAILQ_REMOVE(&watcher->base->watchers[watcher->type], watcher, next); ++ EVBASE_RELEASE_LOCK(watcher->base, th_base_lock); ++ mm_free(watcher); ++} ++ ++int ++evwatch_prepare_get_timeout(const struct evwatch_prepare_cb_info *info, struct timeval *timeout) ++{ ++ if (info->timeout) { ++ *timeout = *(info->timeout); ++ return 1; ++ } ++ return 0; ++} +-- +2.23.0 + diff --git a/SPECS/libevent/0002-evwatch-fix-race-condition.patch b/SPECS/libevent/0002-evwatch-fix-race-condition.patch new file mode 100644 index 00000000..0262e680 --- /dev/null +++ b/SPECS/libevent/0002-evwatch-fix-race-condition.patch @@ -0,0 +1,52 @@ +From 1eefbe38f6a7266e1489765317f4e89489856fc1 Mon Sep 17 00:00:00 2001 +From: Dan Rosen +Date: Wed, 17 Apr 2019 15:44:59 -0400 +Subject: [PATCH 2/2] evwatch: fix race condition + +There was a race between event_base_loop and evwatch_new (adding a +prepare/check watcher while iterating over the watcher list). Only +release the mutex immediately before invoking each watcher callback, +and reacquire it immediately afterwards (same as is done for normal +event handlers). +--- + event.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/event.c b/event.c +index 5e41ae04..c6eb175c 100644 +--- a/event.c ++++ b/event.c +@@ -2012,11 +2012,12 @@ event_base_loop(struct event_base *base, int flags) + event_queue_make_later_events_active(base); + + /* Invoke prepare watchers before polling for events */ +- EVBASE_RELEASE_LOCK(base, th_base_lock); + prepare_info.timeout = tv_p; +- TAILQ_FOREACH(watcher, &base->watchers[EVWATCH_PREPARE], next) ++ TAILQ_FOREACH(watcher, &base->watchers[EVWATCH_PREPARE], next) { ++ EVBASE_RELEASE_LOCK(base, th_base_lock); + (*watcher->callback.prepare)(watcher, &prepare_info, watcher->arg); +- EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ } + + clear_time_cache(base); + +@@ -2033,10 +2034,11 @@ event_base_loop(struct event_base *base, int flags) + + /* Invoke check watchers after polling for events, and before + * processing them */ +- EVBASE_RELEASE_LOCK(base, th_base_lock); +- TAILQ_FOREACH(watcher, &base->watchers[EVWATCH_CHECK], next) ++ TAILQ_FOREACH(watcher, &base->watchers[EVWATCH_CHECK], next) { ++ EVBASE_RELEASE_LOCK(base, th_base_lock); + (*watcher->callback.check)(watcher, &check_info, watcher->arg); +- EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ EVBASE_ACQUIRE_LOCK(base, th_base_lock); ++ } + + timeout_process(base); + +-- +2.23.0 + diff --git a/SPECS/libevent/libevent.spec b/SPECS/libevent/libevent.spec new file mode 100644 index 00000000..c5c5bb40 --- /dev/null +++ b/SPECS/libevent/libevent.spec @@ -0,0 +1,114 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libevent +Version: 2.1.12 +Release: %autorelease +Summary: An event notification library +License: BSD-3-Clause +URL: http://libevent.org/ +#!RemoteAsset +Source0: https://github.com/libevent/libevent/releases/download/release-%{version}-stable/libevent-%{version}-stable.tar.gz +#!RemoteAsset +Source1: https://github.com/libevent/libevent/releases/download/release-%{version}-stable/libevent-%{version}-stable.tar.gz.asc +# PATCH-FEATURE-UPSTREAM 0001-evwatch-Add-prepare-and-check-watchers.patch +Patch: 0001-evwatch-Add-prepare-and-check-watchers.patch +# PATCH-FEATURE-UPSTREAM 0002-evwatch-fix-race-condition.patch +Patch: 0002-evwatch-fix-race-condition.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: openssl-devel +BuildRequires: pkg-config +BuildRequires: zlib-devel + +BuildSystem: autotools +BuildOption(conf): --disable-libevent-regress + +%description +The libevent API provides a mechanism to execute a callback function +when a specific event occurs on a file descriptor or after a timeout +has been reached. Furthermore, libevent also support callbacks due to +signals or regular timeouts. + +%package devel +Summary: Development files for libevent2 +Requires: %{name} = %{version} +Requires: glibc-devel +# Both have /usr/include/event.h +Conflicts: libev-libevent-devel +Provides: %{name}:%{_includedir}/event.h + +%description devel +The libevent API provides a mechanism to execute a callback function +when a specific event occurs on a file descriptor or after a timeout +has been reached. Furthermore, libevent also support callbacks due to +signals or regular timeouts. + +This package holds the development files for libevent2. + +%package static +Summary: Static libraries for libevent2 +Requires: %{name}-devel = %{version} + +%description static +The libevent API provides a mechanism to execute a callback function +when a specific event occurs on a file descriptor or after a timeout +has been reached. Furthermore, libevent also support callbacks due to +signals or regular timeouts. + +This package holds the static libraries for libevent2. + +%conf -p +./autogen.sh +export ac_cv_func_select=no + +%install -a +find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%defattr(-,root,root,-) +%license LICENSE +%doc ChangeLog whatsnew-2.0.txt whatsnew-2.1.txt +%{_libdir}/%{name}-*.so.* +%{_libdir}/%{name}_core-*.so.* +%{_libdir}/%{name}_extra-*.so.* +%{_libdir}/%{name}_pthreads-*.so.* +%{_libdir}/%{name}_openssl-*.so.* + +%files devel +%defattr(-,root,root) +%{_bindir}/event_rpcgen.py +%{_includedir}/evdns.h +%{_includedir}/event.h +%{_includedir}/evhttp.h +%{_includedir}/evrpc.h +%{_includedir}/evutil.h +%{_includedir}/event2 +%{_libdir}/%{name}.so +%{_libdir}/%{name}_core.so +%{_libdir}/%{name}_extra.so +%{_libdir}/%{name}_pthreads.so +%{_libdir}/%{name}_openssl.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/%{name}_pthreads.pc +%{_libdir}/pkgconfig/%{name}_openssl.pc +%{_libdir}/pkgconfig/%{name}_core.pc +%{_libdir}/pkgconfig/%{name}_extra.pc + +%files static +%defattr(-,root,root) +%{_libdir}/%{name}.a +%{_libdir}/%{name}_core.a +%{_libdir}/%{name}_extra.a +%{_libdir}/%{name}_openssl.a +%{_libdir}/%{name}_pthreads.a + +%changelog +%{?autochangelog} diff --git a/SPECS/libfaketime/libfaketime.spec b/SPECS/libfaketime/libfaketime.spec new file mode 100644 index 00000000..436067c6 --- /dev/null +++ b/SPECS/libfaketime/libfaketime.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test + +Name: libfaketime +Version: 0.9.12 +Release: %autorelease +Summary: FakeTime Preload Library +License: GPL-2.0-only +URL: https://github.com/wolfcw/libfaketime +#!RemoteAsset +Source: https://github.com/wolfcw/libfaketime/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): PREFIX=%{_prefix} +BuildOption(build): LIBDIRNAME=%{_libdir}/%{name} +BuildOption(install): DESTDIR=%{buildroot} +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): LIBDIRNAME=/%{_lib} + +%description +libfaketime allows you to report a faked system time to programs without +having to change the system-wide time, using a preload library. + +# No configure +%conf + +%files +%doc NEWS README +%license COPYING +%{_bindir}/faketime +%{_mandir}/man1/faketime.1* +%doc %{_docdir}/faketime +%{_libdir}/lib*.so* + +%changelog +%{?autochangelog} diff --git a/SPECS/libfastjson/libfastjson.spec b/SPECS/libfastjson/libfastjson.spec new file mode 100644 index 00000000..b2820f10 --- /dev/null +++ b/SPECS/libfastjson/libfastjson.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libfastjson +Version: 1.2304.0 +Release: %autorelease +Summary: Fast JSON library for C +License: MIT +URL: https://github.com/rsyslog/libfastjson +#!RemoteAsset +Source0: https://download.rsyslog.com/libfastjson/libfastjson-%{version}.tar.gz +BuildSystem: autotools +BuildOption(conf): --disable-static +%description +libfastjson is a fork from json-c aiming to provide: a small library +with essential JSON handling functions, sufficiently good JSON support (not +100% standards compliant), and very fast processing. + +%package devel +Summary: Development files for libfastjson +Requires: libfastjson = %{version}-%{release} + +%description devel +provide development files for libfastjson + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%license COPYING +%doc AUTHORS ChangeLog README.html +%{_libdir}/libfastjson.so* + +%files devel +%{_includedir}/libfastjson +%{_libdir}/libfastjson.so +%{_libdir}/pkgconfig/libfastjson.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libffcall/libffcall.spec b/SPECS/libffcall/libffcall.spec new file mode 100644 index 00000000..1ea73909 --- /dev/null +++ b/SPECS/libffcall/libffcall.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Parallel compilation of this package will fail. +%global _smp_mflags -j1 + +Name: libffcall +Version: 2.5 +Release: %autorelease +Summary: Foreign function calls from interpreters +License: GPL-2.0-or-later +URL: https://www.gnu.org/software/libffcall/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/libffcall/libffcall-%{version}.tar.gz +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/libffcall/libffcall-%{version}.tar.gz.sig + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +BuildSystem: autotools +BuildOption(conf): --disable-static + +%description +GNU Libffcall is a collection of libraries that can be used to build +foreign function call interfaces in embedded interpreters. + +%package devel +Summary: Development files for the libffcall library +Requires: %{name} = %{version} + +%description devel +This package contains the C++ header files, libraries, and build system files +needed to develop applications that use the libffcall library. + +%install -a +find %{buildroot} -type f -name "*.a" -delete + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README +%{_libdir}/lib*.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/lib*.so +%{_mandir}/man3/*.3.* +%{_datadir}/html/*.html + +%changelog +%{?autochangelog} diff --git a/SPECS/libffi/libffi.spec b/SPECS/libffi/libffi.spec new file mode 100644 index 00000000..bfc71569 --- /dev/null +++ b/SPECS/libffi/libffi.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libffi +Version: 3.5.2 +Release: %autorelease +Summary: A Portable Foreign Function Interface Library +License: MIT +URL: https://sourceware.org/libffi +#!RemoteAsset +Source0: https://github.com/libffi/libffi/releases/download/v%{version}/%{name}-%{version}.tar.gz + +Buildsystem: autotools + +BuildRequires: gcc gcc-c++ dejagnu +BuildRequires: make + +BuildOption(conf): --disable-multi-os-directory --disable-static --disable-exec-static-tramp + +%description +Compilers for high level languages generate code that follows certain conventions. These +conventions are necessary, in part, for separate compilation to work. One such convention +is the "calling convention". The "calling convention" is a set of assumptions made by the +compiler about where function arguments will be found on entry to a function. A "calling +convention" also specifies where the return value for a function is found. + +Some programs may not know at the time of compilation what arguments are to be passed to a +function. For instance, an interpreter may be told at run-time about the number and types +of arguments used to call a given function. Libffi can be used in such programs to provide +a bridge from the interpreter program to compiled code. + +The libffi library provides a portable, high level programming interface to various calling +conventions. This allows a programmer to call any function specified by a call interface +description at run-time. + +FFI stands for Foreign Function Interface. A foreign function interface is the popular name +for the interface that allows code written in one language to call code written in another +language. The libffi library really only provides the lowest, machine dependent layer of a +fully featured foreign function interface. A layer must exist above libffi that handles type +conversions for values passed between the two languages. + +%package devel +Summary: Development files for libffi +Requires: %{name} = %{version}-%{release} + +%description devel +The devel package with header files and libraries is for developing apps which needs libffi. + +%install -a +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +%files +%license LICENSE +%{_libdir}/*.so.* + +%files devel +%{_libdir}/pkgconfig/*.pc +%{_includedir}/ffi*.h +%{_libdir}/*.so +%{_mandir}/man3/* +%{_infodir}/libffi.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/libgcrypt/libgcrypt.spec b/SPECS/libgcrypt/libgcrypt.spec new file mode 100644 index 00000000..bbf18f02 --- /dev/null +++ b/SPECS/libgcrypt/libgcrypt.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libgcrypt +Version: 1.11.2 +Release: %autorelease +Summary: The GNU Crypto Library +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-3.0-or-later +URL: https://gnupg.org/software/libgcrypt +#!RemoteAsset +Source: https://gnupg.org/ftp/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source1: https://gnupg.org/ftp/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2.sig +BuildSystem: autotools + +BuildRequires: libgpg-error-devel + +%description +Libgcrypt is a general purpose library of cryptographic building +blocks. It is originally based on code used by GnuPG. It does not +provide any implementation of OpenPGP or other protocols. Thorough +understanding of applied cryptography is required to use Libgcrypt. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +Libgcrypt is a general purpose library of cryptographic building +blocks. It is originally based on code used by GnuPG. It does not +provide any implementation of OpenPGP or other protocols. Thorough +understanding of applied cryptography is required to use Libgcrypt. + +This package contains needed files to compile and link against the +library. + +%files +%license COPYING COPYING.LIB LICENSES +%doc AUTHORS ChangeLog NEWS README THANKS TODO +%{_libdir}/libgcrypt.so.* + +%files devel +%license COPYING COPYING.LIB LICENSES +%{_bindir}/dumpsexp +%{_bindir}/hmac256 +%{_bindir}/mpicalc +%{_bindir}/libgcrypt-config +%{_libdir}/libgcrypt.so +%{_libdir}/pkgconfig/libgcrypt.pc +%{_datadir}/aclocal/libgcrypt.m4 +%{_includedir}/gcrypt*.h +%{_infodir}/gcrypt.info* +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libgit2/libgit2.spec b/SPECS/libgit2/libgit2.spec new file mode 100644 index 00000000..25c2388e --- /dev/null +++ b/SPECS/libgit2/libgit2.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libgit2 +Version: 1.9.1 +Release: %autorelease +Summary: C implementation of the Git core methods as a library with a solid API +License: LicenseRef-Callaway-GPLv2-with-exceptions +URL: https://libgit2.org/ +#!RemoteAsset +Source: https://github.com/libgit2/libgit2/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DREGEX_BACKEND=pcre2 +BuildOption(conf): -DBUILD_CLI=OFF +BuildOption(conf): -DUSE_HTTP_PARSER=llhttp +BuildOption(conf): -DUSE_SHA1=HTTPS +BuildOption(conf): -DUSE_HTTPS=OpenSSL +BuildOption(conf): -DUSE_NTLMCLIENT=OFF +BuildOption(conf): -DUSE_SSH=ON + +BuildRequires: gcc cmake ninja +BuildRequires: krb5-devel libcurl-devel llhttp-devel +BuildRequires: libssh2-devel +BuildRequires: openssl-devel pcre2-devel python3 zlib-devel + +%description +libgit2 is a portable, pure C implementation of the Git core methods +provided as a re-entrant linkable library with a solid API. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains libraries, header files, and examples for +developing applications that use %{name}. + +%prep -a +# Don't run "online" tests +sed -i '/-sonline/s/^/#/' tests/libgit2/CMakeLists.txt + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libgit2.so.1.9* + +%files devel +%doc AUTHORS docs examples README.md +%{_libdir}/libgit2.so +%{_libdir}/cmake/libgit2/ +%{_libdir}/pkgconfig/libgit2.pc +%{_includedir}/git2.h +%{_includedir}/git2/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libgpg-error/libgpg-error.spec b/SPECS/libgpg-error/libgpg-error.spec new file mode 100644 index 00000000..7033ff54 --- /dev/null +++ b/SPECS/libgpg-error/libgpg-error.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libgpg-error +Version: 1.55 +Release: %autorelease +Summary: Library That Defines Common Error Values for All GnuPG Components +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: https://www.gnupg.org/software/libgpg-error/ +#!RemoteAsset +Source0: https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-%{version}.tar.bz2 +#!RemoteAsset +Source1: https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-%{version}.tar.bz2.sig +BuildRequires: libtool +BuildRequires: pkgconfig +BuildSystem: autotools +BuildOption(conf): --enable-install-gpg-error-config + +%description +This is a library that defines common error values for all GnuPG +components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, +pinentry, SmartCard Daemon, and possibly more in the future. + +%package devel +Summary: Development package for libgpg-error +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +Requires: glibc-devel +Requires: libgpg-error = %{version} + +%description devel +Files needed for software development using libgpg-error. + +%conf -p +autoreconf -fiv + +%install -a +rm -r %{buildroot}%{_datadir}/common-lisp +%find_lang %{name} --generate-subpackages + +%post -n libgpg-error -p /sbin/ldconfig +%postun -n libgpg-error -p /sbin/ldconfig + +%files -n libgpg-error +%license COPYING.LIB COPYING +%doc README NEWS ChangeLog AUTHORS ABOUT-NLS +%{_libdir}/libgpg-error*.so.* + +%files devel +%{_bindir}/* +%{_libdir}/libgpg-error*.so +%{_libdir}/pkgconfig/gpg-error.pc +%{_includedir}/* +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/gpg-error.m4 +%{_datadir}/aclocal/gpgrt.m4 +%dir %{_datadir}/libgpg-error +%{_datadir}/libgpg-error/errorref.txt +%{_infodir}/gpgrt.info* +%{_mandir}/man1/gpg-error-config.* +%{_mandir}/man1/gpgrt-config.* + +%changelog +%{?autochangelog} diff --git a/SPECS/libical/libical.spec b/SPECS/libical/libical.spec new file mode 100644 index 00000000..5438a231 --- /dev/null +++ b/SPECS/libical/libical.spec @@ -0,0 +1,113 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libical +Version: 3.0.20 +Release: %autorelease +Summary: Reference implementation of the iCalendar data type and serialization format +License: LGPL-2.1-only OR MPL-2.0 +URL: https://libical.github.io/libical/ +#!RemoteAsset +Source: https://github.com/libical/libical/archive/v%{version}/libical-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DUSE_INTEROPERABLE_VTIMEZONES:BOOL=ON +BuildOption(conf): -DICAL_ALLOW_EMPTY_PROPERTIES:BOOL=ON +BuildOption(conf): -DGOBJECT_INTROSPECTION:BOOL=ON +BuildOption(conf): -DICAL_GLIB:BOOL=ON +BuildOption(conf): -DICAL_GLIB_VAPI:BOOL=ON +BuildOption(conf): -DSHARED_ONLY:BOOL=ON +BuildOption(conf): -DBUILD_DOCS:BOOL=OFF +BuildOption(conf): -DENABLE_GTK_DOC=OFF + +BuildRequires: gcc gcc-c++ cmake ninja pkgconfig +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(icu-uc) +BuildRequires: perl(Getopt::Std) +BuildRequires: perl(lib) +BuildRequires: python3 python3-pip python3-pygobject +BuildRequires: python3-setuptools +BuildRequires: vala +Requires: tzdata + +%description +Reference implementation of the iCalendar data type and serialization format +used in dozens of calendaring and scheduling products. + +%package devel +Summary: Development files for libical +Requires: %{name} = %{version} + +%description devel +The libical-devel package contains libraries and header files for developing +applications that use libical. + +%package glib +Summary: GObject wrapper for libical library +Requires: %{name} = %{version} + +%description glib +This package provides a GObject wrapper for libical library with support +of GObject Introspection. + +%package glib-devel +Summary: Development files for building against %{name}-glib +Requires: %{name}-devel = %{version} +Requires: %{name}-glib = %{version} + +%description glib-devel +Development files needed for building things which link against %{name}-glib. + +%ldconfig_scriptlets + +%ldconfig_scriptlets glib + +%files +%doc README.md ReleaseNotes.txt THANKS +%license LICENSE +%{_libdir}/libical.so.3 +%{_libdir}/libical.so.%{version} +%{_libdir}/libical_cxx.so.3 +%{_libdir}/libical_cxx.so.%{version} +%{_libdir}/libicalss.so.3 +%{_libdir}/libicalss.so.%{version} +%{_libdir}/libicalss_cxx.so.3 +%{_libdir}/libicalss_cxx.so.%{version} +%{_libdir}/libicalvcal.so.3 +%{_libdir}/libicalvcal.so.%{version} +%{_libdir}/girepository-1.0/ICal-3.0.typelib + +%files devel +%doc doc/UsingLibical.md +%{_libdir}/libical.so +%{_libdir}/libical_cxx.so +%{_libdir}/libicalss.so +%{_libdir}/libicalss_cxx.so +%{_libdir}/libicalvcal.so +%{_libdir}/pkgconfig/libical.pc +%{_libdir}/cmake/LibIcal/ +%{_includedir}/libical/ +%{_datadir}/gir-1.0/ICal-3.0.gir +%{_libexecdir}/libical/ical-glib-src-generator + +%files glib +%{_libdir}/libical-glib.so.3 +%{_libdir}/libical-glib.so.%{version} +%{_libdir}/girepository-1.0/ICalGLib-3.0.typelib + +%files glib-devel +%{_libdir}/libical-glib.so +%{_libdir}/pkgconfig/libical-glib.pc +%{_includedir}/libical-glib/ +%{_datadir}/gir-1.0/ICalGLib-3.0.gir +%{_datadir}/vala/vapi/libical-glib.vapi + +%changelog +%{?autochangelog} diff --git a/SPECS/libidl/libIDL-config-2.1 b/SPECS/libidl/libIDL-config-2.1 new file mode 100644 index 00000000..7fd8966f --- /dev/null +++ b/SPECS/libidl/libIDL-config-2.1 @@ -0,0 +1,38 @@ +.TH LIBIDL\-CONFIG\-2 "1" "February 2021" "" "User Commands" +.SH NAME +libIDL\-config\-2 \- prints information about a libIDL installation +.SH SYNOPSIS +.B libIDL\-config\-2 +.RB [ OPTIONS \ ...] +.SH DESCRIPTION +This program is mostly for use in build scripts. +Please consider using +.BR pkg\-config (1) +or +.BR pkgconf (1) +instead. +.SH OPTIONS +.TP +.BR \-\-prefix [=\fIDIR\fR] +Print the prefix for host-independent files for libIDL, e.g. \fB/usr\fR. +.TP +.BR \-\-exec\-prefix [=\fIDIR\fR] +Print the prefix for host-dependent files for libIDL, e.g. \fB/usr\fR. +.TP +.B \-\-version +Display the version of libIDL and exit. +.TP +.B \-\-libs +Display all linker flags: +.BR \-L , +.BR \-l , +and otherwise. +.TP +.B \-\-cflags +Display all +.BR CFLAGS : +.BR \-I , +and otherwise. +.SH "SEE\ ALSO" +.BR pkgconf (1), +.BR pkg\-config (1) \ No newline at end of file diff --git a/SPECS/libidl/libidl.spec b/SPECS/libidl/libidl.spec new file mode 100644 index 00000000..d2dcc3ec --- /dev/null +++ b/SPECS/libidl/libidl.spec @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libidl +Version: 0.8.14 +Release: %autorelease +Summary: Library for parsing IDL (Interface Definition Language) +License: LGPL-2.0-or-later AND GPL-3.0-or-later +URL: https://download.gnome.org/sources/libIDL/0.8/ +#!RemoteAsset +Source0: https://download.gnome.org/sources/libIDL/0.8/libIDL-%{version}.tar.bz2 +Source1: libIDL-config-2.1 +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: gcc +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: flex +BuildRequires: bison +BuildRequires: texinfo + +%description +libIDL is a library for parsing IDL (Interface Definition Language), used by +projects like ORBit2. It can be used for both COM-style and CORBA-style IDL. + +%package devel +Summary: Development files for libIDL +Requires: %{name} = %{version} +Requires: glib-devel + +%description devel +This package contains the header files, libraries, documentation, and tools +needed to develop applications that use libIDL. + +%conf -p +autoreconf -fiv + +%build -a +# We re-generate the info page, and also build PDF and HTML docs from the +# texinfo source. +rm libIDL2.info +make libIDL2.info libIDL2.html + +%install -a +install -D -p -m 0644 -t '%{buildroot}%{_datadir}/aclocal' libIDL.m4 +install -D -p -m 0644 '%{SOURCE1}' '%{buildroot}%{_mandir}/man1/libIDL-config-2.1' +install -d '%{buildroot}%{_docdir}/%{name}/html' +cp -rp libIDL2.html/* '%{buildroot}%{_docdir}/%{name}/html/' + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libIDL-2.so.0* +%{_infodir}/libIDL2.info* +%{_docdir}/libidl/ + +%files devel +%doc AUTHORS BUGS ChangeLog HACKING MAINTAINERS NEWS README +%{_libdir}/libIDL-2.so +%{_includedir}/libIDL-2.0/ +%{_libdir}/pkgconfig/libIDL-2.0.pc +%{_datadir}/aclocal/libIDL.m4 +%{_bindir}/libIDL-config-2 +%{_mandir}/man1/libIDL-config-2.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/libidn2/libidn2.spec b/SPECS/libidn2/libidn2.spec new file mode 100644 index 00000000..c4a92584 --- /dev/null +++ b/SPECS/libidn2/libidn2.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libidn2 +Version: 2.3.8 +Release: %autorelease +Summary: Support for Internationalized Domain Names (IDN) based on IDNA2008 +License: (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later +URL: https://www.gnu.org/software/libidn/#libidn2 +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz.sig +#!RemoteAsset +Source2: https://josefsson.org/key-20190320.txt#/%{name}.keyring +BuildRequires: libunistring-devel +BuildRequires: pkgconfig +BuildSystem: autotools + +%description +An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893) + +%package devel +Summary: Include Files and Libraries mandatory for Development +License: (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later +Requires: %{name} = %{version} + +%description devel +An implementation of the IDNA2008 specifications (RFCs 5890, 5891, 5892, 5893) + +%install -a +rm -rf %{buildroot}/%{_datadir}/gtk-doc/ + +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets -n %{name} + +%files +%license COPYING* +%{_libdir}/libidn2.so.* +%doc AUTHORS ChangeLog NEWS README.md +%{_infodir}/libidn* +%{_bindir}/idn2 +%{_mandir}/man1/idn2.1%{?ext_man} + +%files devel +%license COPYING* +%{_libdir}/libidn2* +%{_libdir}/pkgconfig/libidn2.pc +%{_includedir}/*.h +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libisoburn/libisoburn.spec b/SPECS/libisoburn/libisoburn.spec new file mode 100644 index 00000000..97bb4718 --- /dev/null +++ b/SPECS/libisoburn/libisoburn.spec @@ -0,0 +1,98 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libisoburn +Version: 1.5.6 +Release: %autorelease +Summary: Library for creating and expanding ISO-9660 filesystems +License: GPL-2.0-or-later +URL: https://libburnia-project.org/ +#!RemoteAsset +Source0: https://files.libburnia-project.org/releases/libisoburn-%{version}.tar.gz +Source1: xorriso_extract_iso_image.desktop +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-doxygen-docs + +BuildRequires: gcc gcc-c++ make readline-devel pkgconfig(libacl) zlib-devel +BuildRequires: libburn-devel >= %{version} +BuildRequires: libisofs-devel >= %{version} +BuildRequires: autoconf automake libtool + +%description +Libisoburn is a frontend for libburn and libisofs, enabling creation and expansion +of ISO-9660 filesystems on all optical media. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +This package contains libraries and header files for developing applications +that use libisoburn. + +%package -n xorriso +Summary: ISO-9660 and Rock Ridge image manipulation tool +URL: https://scdbackup.sourceforge.net/xorriso_eng.html +Requires: %{name} = %{version} +Requires(post): /usr/sbin/alternatives +Requires(preun): /usr/sbin/alternatives + +%description -n xorriso +Xorriso copies file objects into Rock Ridge enhanced ISO-9660 filesystems and +allows session-wise manipulation of such filesystems. + +%conf -p +autoreconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete +rm -f %{buildroot}%{_bindir}/xorriso-tcltk* +touch %{buildroot}%{_bindir}/cdrecord +touch %{buildroot}%{_bindir}/mkisofs +touch %{buildroot}%{_mandir}/man1/cdrecord.1.gz +touch %{buildroot}%{_mandir}/man1/mkisofs.1.gz + +%ldconfig_scriptlets + +%post -n xorriso +/usr/sbin/alternatives --install %{_bindir}/cdrecord cdrecord %{_bindir}/xorrecord 50 \ + --slave %{_mandir}/man1/cdrecord.1.gz cdrecord-man %{_mandir}/man1/xorrecord.1.gz +/usr/sbin/alternatives --install %{_bindir}/mkisofs mkisofs %{_bindir}/xorrisofs 50 \ + --slave %{_mandir}/man1/mkisofs.1.gz mkisofs-man %{_mandir}/man1/xorrisofs.1.gz + +%preun -n xorriso +if [ $1 -eq 0 ]; then + /usr/sbin/alternatives --remove cdrecord %{_bindir}/xorrecord + /usr/sbin/alternatives --remove mkisofs %{_bindir}/xorrisofs +fi + +%files +%license COPYING +%doc AUTHORS COPYRIGHT README ChangeLog +%{_libdir}/libisoburn*.so.* + +%files devel +%{_includedir}/libisoburn +%{_libdir}/libisoburn.so +%{_libdir}/pkgconfig/libisoburn*.pc + +%files -n xorriso +%ghost %{_bindir}/cdrecord +%ghost %{_bindir}/mkisofs +%{_bindir}/osirrox +%{_bindir}/xorrecord +%{_bindir}/xorriso +%{_bindir}/xorrisofs +%{_bindir}/xorriso-dd-target +%{_mandir}/man1/*.1* +%{_infodir}/*.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/libisoburn/xorriso_extract_iso_image.desktop b/SPECS/libisoburn/xorriso_extract_iso_image.desktop new file mode 100644 index 00000000..58e79cba --- /dev/null +++ b/SPECS/libisoburn/xorriso_extract_iso_image.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Service +X-KDE-ServiceTypes=KonqPopupMenu/Plugin +MimeType=application/x-cd-image; +Actions=xorrisoExtractHere; +[Desktop Action xorrisoExtractHere] +Name=Extract ISO image using Xorriso here +Name[de]=ISO-Abbild mit Xorriso hier entpacken +Icon=media-optical +Exec=/bin/nice -n 19 ionice -n7 -c3 xorriso -indev "%F" -osirrox on -cp_rx "*" "$(dirname %F)" diff --git a/SPECS/libisofs/libisofs.spec b/SPECS/libisofs/libisofs.spec new file mode 100644 index 00000000..a992efe4 --- /dev/null +++ b/SPECS/libisofs/libisofs.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libisofs +Version: 1.5.6 +Release: %autorelease +Summary: Library to create ISO 9660 disk images +License: GPL-2.0-or-later AND LGPL-2.0-or-later +URL: https://libburnia-project.org/ +#!RemoteAsset +Source: https://files.libburnia-project.org/releases/libisofs-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: gcc libtool automake autoconf +BuildRequires: make +BuildRequires: pkgconfig(libacl) +BuildRequires: pkgconfig(zlib) + +%description +Libisofs is a library to create an ISO-9660 filesystem and supports +extensions like RockRidge or Joliet. It supports zisofs compression as well. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%conf -p +autoreconf -fiv + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS COPYRIGHT README +%{_libdir}/libisofs*.so.* + +%files devel +%{_includedir}/libisofs/ +%{_libdir}/libisofs.so +%{_libdir}/pkgconfig/libisofs*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libjpeg-turbo/0001-libjpeg-turbo-cmake.patch b/SPECS/libjpeg-turbo/0001-libjpeg-turbo-cmake.patch new file mode 100644 index 00000000..fcd308c1 --- /dev/null +++ b/SPECS/libjpeg-turbo/0001-libjpeg-turbo-cmake.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c9b4281..43e7cce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2060,25 +2060,6 @@ if(WITH_TOOLS) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin) + endif() + +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg +- ${CMAKE_CURRENT_SOURCE_DIR}/README.md +- ${CMAKE_CURRENT_SOURCE_DIR}/src/example.c +- ${CMAKE_CURRENT_SOURCE_DIR}/src/tjcomp.c +- ${CMAKE_CURRENT_SOURCE_DIR}/src/tjdecomp.c +- ${CMAKE_CURRENT_SOURCE_DIR}/src/tjtran.c +- ${CMAKE_CURRENT_SOURCE_DIR}/doc/libjpeg.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/doc/structure.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/doc/usage.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/doc/wizard.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR} +- COMPONENT doc) +-if(WITH_JAVA) +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJComp.java +- ${CMAKE_CURRENT_SOURCE_DIR}/java/TJDecomp.java +- ${CMAKE_CURRENT_SOURCE_DIR}/java/TJTran.java +- DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc) +-endif() +- + if(UNIX OR MINGW) + if(WITH_TOOLS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/cjpeg.1 +@@ -2108,7 +2089,7 @@ install(EXPORT ${CMAKE_PROJECT_NAME}Targets + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/jerror.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/jmorecfg.h +- ${CMAKE_CURRENT_SOURCE_DIR}/src/jpeglib.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/src/jpeglib.h ${CMAKE_CURRENT_SOURCE_DIR}/src/jpegint.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT include) + + include(cmakescripts/BuildPackages.cmake) diff --git a/SPECS/libjpeg-turbo/libjpeg-turbo.spec b/SPECS/libjpeg-turbo/libjpeg-turbo.spec new file mode 100644 index 00000000..c669751c --- /dev/null +++ b/SPECS/libjpeg-turbo/libjpeg-turbo.spec @@ -0,0 +1,112 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libjpeg-turbo +Version: 3.1.2 +Release: %autorelease +Summary: A SIMD-accelerated library for manipulating JPEG image files +License: Zlib AND BSD-3-Clause AND MIT AND IJG +URL: https://github.com/libjpeg-turbo/libjpeg-turbo +#!RemoteAsset +Source: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/%{version}.tar.gz +Patch: 0001-libjpeg-turbo-cmake.patch +BuildSystem: cmake + +BuildOption(conf): -DENABLE_STATIC:BOOL=NO +BuildOption(conf): -DFLOATTEST:STRING="fp-contract" + +BuildRequires: gcc +BuildRequires: cmake +BuildRequires: libtool + +%description +The libjpeg-turbo package contains a library of functions for manipulating JPEG +images, accelerated with SIMD instructions. + +%package devel +Summary: Headers for the libjpeg-turbo library +Requires: libjpeg-turbo = %{version} + +%description devel +This package contains header files necessary for developing programs which use +the libjpeg-turbo library. + +%package utils +Summary: Utilities for manipulating JPEG images +Requires: libjpeg-turbo = %{version} + +%description utils +This package contains command-line utilities for creating, decompressing, and +transforming JPEG files. + +%package -n turbojpeg +Summary: TurboJPEG library +Requires: libjpeg-turbo = %{version} + +%description -n turbojpeg +This package contains the TurboJPEG shared library, a higher-level API for +JPEG compression and decompression. + +%package -n turbojpeg-devel +Summary: Headers for the TurboJPEG library +Requires: turbojpeg = %{version} +Requires: libjpeg-turbo-devel = %{version} + +%description -n turbojpeg-devel +This package contains header files for developing programs that use the +TurboJPEG library. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +rm -f %{buildroot}/%{_bindir}/tjbench + +%ldconfig_scriptlets +%ldconfig_scriptlets -n turbojpeg + +%files +%license LICENSE.md +%doc README.md README.ijg ChangeLog.md +%{_libdir}/libjpeg.so.62* + +%files devel +%doc doc/coderules.txt src/jconfig.txt doc/libjpeg.txt doc/structure.txt +%{_includedir}/jconfig.h +%{_includedir}/jerror.h +%{_includedir}/jmorecfg.h +%{_includedir}/jpeglib.h +%{_includedir}/jpegint.h +%{_libdir}/libjpeg.so +%{_libdir}/pkgconfig/libjpeg.pc +%dir %{_libdir}/cmake/libjpeg-turbo +%{_libdir}/cmake/libjpeg-turbo/*.cmake + +%files utils +%doc doc/usage.txt doc/wizard.txt +%{_bindir}/cjpeg +%{_bindir}/djpeg +%{_bindir}/jpegtran +%{_bindir}/rdjpgcom +%{_bindir}/wrjpgcom +%{_mandir}/man1/cjpeg.1* +%{_mandir}/man1/djpeg.1* +%{_mandir}/man1/jpegtran.1* +%{_mandir}/man1/rdjpgcom.1* +%{_mandir}/man1/wrjpgcom.1* + +%files -n turbojpeg +%license LICENSE.md +%doc README.md README.ijg ChangeLog.md +%{_libdir}/libturbojpeg.so.0* + +%files -n turbojpeg-devel +%{_includedir}/turbojpeg.h +%{_libdir}/libturbojpeg.so +%{_libdir}/pkgconfig/libturbojpeg.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libjwt/libjwt.spec b/SPECS/libjwt/libjwt.spec new file mode 100644 index 00000000..e805c8b7 --- /dev/null +++ b/SPECS/libjwt/libjwt.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libjwt +Version: 3.2.2 +Release: %autorelease +Summary: A Javascript Web Token library in C +License: MPL-2.0 +URL: https://github.com/benmcollins/libjwt +#!RemoteAsset +Source: https://github.com/benmcollins/libjwt/releases/download/v%{version}/libjwt-%{version}.tar.xz +BuildSystem: cmake + +BuildOption(conf): -DBUILD_SHARED_LIBS:BOOL=ON +BuildOption(conf): -DBUILD_STATIC_LIBS:BOOL=OFF +BuildOption(conf): -DBUILD_EXAMPLES:BOOL=OFF + +BuildRequires: cmake +BuildRequires: jansson-devel +BuildRequires: gcc +BuildRequires: make +BuildRequires: openssl-devel + +%description +A Javascript Web Token library in C. libjwt provides a simple API for creating, +signing, and verifying JWTs. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains libraries and header files for developing applications +that use the libjwt library. + +%install -a +find %{buildroot} -type f -name "*.a" -delete -print + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc %{_docdir} +%doc README.md +%{_libdir}/libjwt.so.* +%{_bindir}/jwk2key +%{_bindir}/jwt-generate +%{_bindir}/jwt-verify +%{_bindir}/key2jwk +%{_mandir}/man1/jwk2key.1* +%{_mandir}/man1/jwt-generate.1* +%{_mandir}/man1/jwt-verify.1* +%{_mandir}/man1/key2jwk.1* + +%files devel +%{_includedir}/jwt.h +%{_includedir}/jwt_export.h +%{_libdir}/libjwt.so +%{_libdir}/pkgconfig/libjwt.pc +%{_libdir}/cmake/LibJWT/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libkcapi/libkcapi.spec b/SPECS/libkcapi/libkcapi.spec new file mode 100644 index 00000000..433f7488 --- /dev/null +++ b/SPECS/libkcapi/libkcapi.spec @@ -0,0 +1,102 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond systemd 1 + +Name: libkcapi +Version: 1.5.0 +Release: %autorelease +Summary: Linux Kernel Crypto API User Space Interface Library +License: BSD-3-Clause OR GPL-2.0-only +URL: https://www.chronox.de/libkcapi/ +#!RemoteAsset +Source0: https://www.chronox.de/libkcapi/releases/%{version}/libkcapi-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-kcapi-encapp +BuildOption(conf): --enable-kcapi-dgstapp +BuildOption(conf): --enable-kcapi-hasher +BuildOption(conf): --enable-kcapi-rngapp +BuildOption(conf): --enable-kcapi-speed +BuildOption(conf): --enable-kcapi-test +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-static +BuildOption(conf): --enable-sum-prefix= +BuildOption(conf): --enable-sum-dir=%{_libdir} +BuildOption(conf): --with-pkgconfigdir=%{_libdir}/pkgconfig + +BuildRequires: coreutils gcc hardlink libtool openssl perl +BuildRequires: linux-headers >= 4.10.0 +%if %{with systemd} +BuildRequires: systemd +Requires: systemd +%endif + +%description +The Linux kernel exports a Netlink interface to allow user space to utilize +the kernel crypto API. libkcapi uses this interface and provides an easy to use +API for developers. + +%package devel +Summary: Development files for the %{name} package +Requires: %{name} = %{version} + +%description devel +Header files and development libraries for applications that use %{name}. + +%prep -a +%if %{with systemd} +cat << EOF > 50-%{name}-optmem_max.conf +net.core.optmem_max = 81920 +EOF +cat << EOF > README.preset +This package increases the kernel socket ancillary buffer size to 81920 bytes +via a sysctl.d preset file to improve performance for the Kernel Crypto API. +EOF +%endif + +%conf -p +autoreconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%if %{with systemd} +install -D -m 0644 -t %{buildroot}%{_sysctldir} 50-%{name}-optmem_max.conf +%endif + +install -d -m 755 %{buildroot}%{_docdir}/%{name} +%if %{with systemd} +install -m 0644 README.preset %{buildroot}%{_docdir}/%{name}/ +%endif + +# create symbolic link to /usr/bin/ +for app in sha1hmac sha224hmac sha256hmac sha384hmac sha512hmac sm3hmac fipscheck fipshmac; do + ln -s ../libexec/%{name}/$app %{buildroot}%{_bindir}/$app +done + +%files +%license COPYING* +%doc %{_docdir}/%{name} +%if %{with systemd} +%{_sysctldir}/50-libkcapi-optmem_max.conf +%endif +%{_libdir}/libkcapi.so.* +%dir %{_libdir}/hmaccalc +%{_libdir}/hmaccalc/*.hmac +%{_bindir}/* +%{_libexecdir}/libkcapi +%{_mandir}/man*/* + +%files devel +%{_includedir}/kcapi.h +%{_libdir}/libkcapi.so +%{_libdir}/pkgconfig/libkcapi.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libksba/libksba.spec b/SPECS/libksba/libksba.spec new file mode 100644 index 00000000..ed39881e --- /dev/null +++ b/SPECS/libksba/libksba.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libksba +Version: 1.6.7 +Release: %autorelease +Summary: A X.509 Library +License: (GPL-2.0-or-later OR LGPL-3.0-or-later) AND GPL-3.0-or-later AND MIT +URL: https://www.gnupg.org +#!RemoteAsset +Source: https://gnupg.org/ftp/gcrypt/libksba/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source2: https://gnupg.org/ftp/gcrypt/libksba/%{name}-%{version}.tar.bz2.sig +#!RemoteAsset +Source3: https://gnupg.org/signature_key.asc#/%{name}.keyring +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --with-pic + +BuildRequires: autoconf automake libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(gpg-error) + +%description +KSBA is a library to simplify the task of working with X.509 +certificates, CMS data, and related data. This package contains the +runtime shared libraries. + +%package devel +Summary: Development files for the libksba library +Requires: %{name} = %{version} + +%description devel +This package contains the header files, documentation, and other files needed +to develop applications that use the libksba library. + +%conf -p +autoreconf -vfi + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING* +%doc README AUTHORS ChangeLog NEWS THANKS TODO +%{_libdir}/libksba.so.8* + +%files devel +%{_bindir}/ksba-config +%{_libdir}/libksba.so +%{_libdir}/pkgconfig/ksba.pc +%{_includedir}/ksba.h +%{_datadir}/aclocal/ksba.m4 +%{_infodir}/ksba.info%{?ext_info} + +%changelog +%{?autochangelog} diff --git a/SPECS/liblognorm/0001-Port-pcre-dependency-to-pcre2.patch b/SPECS/liblognorm/0001-Port-pcre-dependency-to-pcre2.patch new file mode 100644 index 00000000..76efb6ff --- /dev/null +++ b/SPECS/liblognorm/0001-Port-pcre-dependency-to-pcre2.patch @@ -0,0 +1,184 @@ +From b5c595baa49360614ef531cb9621644e8cf5fec5 Mon Sep 17 00:00:00 2001 +From: alakatos +Date: Tue, 6 Jun 2023 15:13:17 +0200 +Subject: [PATCH] Port pcre dependency to pcre2 + +Fixes #366 +Upstream stopped the support for the old 'pcre' package. See +https://www.pcre.org/ +It only supports the new 'pcre2' version, we should replace +the current pcre with the newer pcre2. +--- + configure.ac | 5 ++--- + src/parser.c | 6 ------ + src/v1_parser.c | 50 +++++++++++++++++++++++++++++++++---------------- + 3 files changed, 36 insertions(+), 25 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b6f92f1b..752b7d93 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,7 +80,7 @@ AC_ARG_ENABLE(regexp, + ) + AM_CONDITIONAL(ENABLE_REGEXP, test x$enable_regexp = xyes) + if test "$enable_regexp" = "yes"; then +- PKG_CHECK_MODULES(PCRE, libpcre) ++ PKG_CHECK_MODULES(PCRE, [libpcre2-8 >= 10.00]) + AC_DEFINE(FEATURE_REGEXP, 1, [Regular expressions support enabled.]) + FEATURE_REGEXP=1 + else +@@ -194,5 +194,4 @@ echo "Testbench enabled: $enable_testbench" + echo "Valgrind enabled: $enable_valgrind" + echo "Debug mode enabled: $enable_debug" + echo "Tools enabled: $enable_tools" +-echo "Docs enabled: $enable_docs" +- ++echo "Docs enabled: $enable_docs" +\ No newline at end of file +diff --git a/src/parser.c b/src/parser.c +index 2d704246..dcd5b4ee 100644 +--- a/src/parser.c ++++ b/src/parser.c +@@ -42,12 +42,6 @@ + #include "samp.h" + #include "helpers.h" + +-#ifdef FEATURE_REGEXP +-#include +-#include +-#endif +- +- + /* how should output values be formatted? */ + enum FMT_MODE { + FMT_AS_STRING = 0, +diff --git a/src/v1_parser.c b/src/v1_parser.c +index 323ada0f..9fb3ccb2 100644 +--- a/src/v1_parser.c ++++ b/src/v1_parser.c +@@ -39,7 +39,8 @@ + #include "v1_samp.h" + + #ifdef FEATURE_REGEXP +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + #include + #endif + +@@ -1266,7 +1267,7 @@ void* tokenized_parser_data_constructor(ln_fieldList_t *node, ln_ctx ctx) { + * significantly slower than other field-types. + */ + struct regex_parser_data_s { +- pcre *re; ++ pcre2_code *re; + int consume_group; + int return_group; + int max_groups; +@@ -1276,17 +1277,33 @@ PARSER(Regex) + assert(str != NULL); + assert(offs != NULL); + assert(parsed != NULL); +- unsigned int* ovector = NULL; ++ PCRE2_SIZE *ovector; ++ pcre2_match_data *match_data = NULL; + + struct regex_parser_data_s *pData = (struct regex_parser_data_s*) node->parser_data; + if (pData != NULL) { +- ovector = calloc(pData->max_groups, sizeof(unsigned int) * 3); +- if (ovector == NULL) FAIL(LN_NOMEM); ++ match_data = pcre2_match_data_create_from_pattern(pData->re, NULL); ++ if (match_data == NULL) FAIL(LN_NOMEM); ++ ++ int result = pcre2_match( ++ pData->re, /* the compiled pattern */ ++ (PCRE2_SPTR)str, /* the subject string */ ++ (PCRE2_SIZE)strLen, /* the length of the subject */ ++ (PCRE2_SIZE)*offs, /* start at offset 0 in the subject */ ++ 0, /* default options */ ++ match_data, /* block for storing the result */ ++ NULL); /* use default match context */ + +- int result = pcre_exec(pData->re, NULL, str, strLen, *offs, 0, (int*) ovector, pData->max_groups * 3); + if (result == 0) result = pData->max_groups; + if (result > pData->consume_group) { +- /*please check 'man 3 pcreapi' for cryptic '2 * n' and '2 * n + 1' magic*/ ++ ovector = pcre2_get_ovector_pointer(match_data); ++ printf("Match succeeded at offset %d\n", (int)ovector[0]); ++ ++ /* please check 'man 3 pcre2api' for cryptic '2 * n' and '2 * n + 1' magic ++ * in a nutshell, within the ovector, the first in each pair of values is set to the ++ * offset of the first code unit of a substring, and the second is set to the ++ * offset of the first code unit after the end of a substring. ++ */ + if (ovector[2 * pData->consume_group] == *offs) { + *parsed = ovector[2 * pData->consume_group + 1] - ovector[2 * pData->consume_group]; + if (pData->consume_group != pData->return_group) { +@@ -1294,22 +1311,20 @@ PARSER(Regex) + if((val = strndup(str + ovector[2 * pData->return_group], + ovector[2 * pData->return_group + 1] - + ovector[2 * pData->return_group])) == NULL) { +- free(ovector); + FAIL(LN_NOMEM); + } + *value = json_object_new_string(val); + free(val); + if (*value == NULL) { +- free(ovector); + FAIL(LN_NOMEM); + } + } + } + } +- free(ovector); + } + r = 0; /* success */ + done: ++ pcre2_match_data_free(match_data); + return r; + } + +@@ -1346,8 +1361,8 @@ void* regex_parser_data_constructor(ln_fieldList_t *node, ln_ctx ctx) { + char* name = NULL; + struct regex_parser_data_s *pData = NULL; + const char *unescaped_exp = NULL; +- const char *error = NULL; +- int erroffset = 0; ++ PCRE2_SIZE erroffset = 0; ++ int errcode = 0; + + + CHKN(name = es_str2cstr(node->name, NULL)); +@@ -1365,7 +1380,7 @@ void* regex_parser_data_constructor(ln_fieldList_t *node, ln_ctx ctx) { + if ((grp_parse_err = regex_parser_configure_consume_and_return_group(args, pData)) != NULL) + FAIL(LN_BADCONFIG); + +- CHKN(pData->re = pcre_compile(exp, 0, &error, &erroffset, NULL)); ++ CHKN(pData->re = pcre2_compile((PCRE2_SPTR)exp, PCRE2_ZERO_TERMINATED, 0, &errcode, &erroffset, NULL)); + + pData->max_groups = ((pData->consume_group > pData->return_group) ? pData->consume_group : + pData->return_group) + 1; +@@ -1387,9 +1402,12 @@ void* regex_parser_data_constructor(ln_fieldList_t *node, ln_ctx ctx) { + ln_dbgprintf(ctx, "couldn't allocate memory for regex-string for field: '%s'", name); + else if (grp_parse_err != NULL) + ln_dbgprintf(ctx, "%s for: '%s'", grp_parse_err, name); +- else if (pData->re == NULL) ++ else if (pData->re == NULL) { ++ PCRE2_UCHAR errbuffer[256]; ++ pcre2_get_error_message(errcode, errbuffer, sizeof(errbuffer)); + ln_dbgprintf(ctx, "couldn't compile regex(encountered error '%s' at char '%d' in pattern) " +- "for regex-matched field: '%s'", error, erroffset, name); ++ "for regex-matched field: '%s'", errbuffer, (int)erroffset, name); ++ } + regex_parser_data_destructor((void**)&pData); + } + if (exp != NULL) free(exp); +@@ -1401,7 +1419,7 @@ void* regex_parser_data_constructor(ln_fieldList_t *node, ln_ctx ctx) { + void regex_parser_data_destructor(void** dataPtr) { + if ((*dataPtr) != NULL) { + struct regex_parser_data_s *pData = (struct regex_parser_data_s*) *dataPtr; +- if (pData->re != NULL) pcre_free(pData->re); ++ if (pData->re != NULL) pcre2_code_free(pData->re); + free(pData); + *dataPtr = NULL; + } diff --git a/SPECS/liblognorm/liblognorm.spec b/SPECS/liblognorm/liblognorm.spec new file mode 100644 index 00000000..6946355a --- /dev/null +++ b/SPECS/liblognorm/liblognorm.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: liblognorm +Version: 2.0.6 +Release: %autorelease +Summary: A tool to normalize log data +License: LGPL-2.1-or-later +URL: http://www.liblognorm.com +#!RemoteAsset +Source0: http://www.liblognorm.com/files/download/%{name}-%{version}.tar.gz +Patch: 0001-Port-pcre-dependency-to-pcre2.patch +BuildSystem: autotools + +BuildOption(conf): --enable-regexp +BuildOption(conf): --disable-docs +# Avoid contaminating the include directory +BuildOption(conf): --includedir=%{_includedir}/%{name}/ +BuildOption(conf): --disable-rpath + +BuildRequires: chrpath libfastjson-devel libestr-devel pcre2-devel gcc +BuildRequires: autoconf automake libtool +# sphinx-build is required to build documentation +# BuildRequires: python-sphinx + +%description +liblognorm is a tool to normalize log data. It can extract structured data +from different log formats into a common set of well-defined fields. + +%package devel +Summary: Development files for the liblognorm library +Requires: %{name} = %{version} +Requires: json-c-devel libestr-devel + +%description devel +This package provides the development tools, header files, and documentation +for programs using the liblognorm library. + +%conf -p +autoreconf -vfi + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +find %{buildroot} -type f -name "*.a" -delete -print + +%ldconfig_scriptlets + +%files +%doc AUTHORS ChangeLog README +%license COPYING +%{_libdir}/lib*.so.* +%{_bindir}/lognormalizer + +%files devel +%{_libdir}/lib*.so +%{_includedir}/%{name}/*.h +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libmd/libmd.keyring b/SPECS/libmd/libmd.keyring new file mode 100644 index 00000000..4c863043 --- /dev/null +++ b/SPECS/libmd/libmd.keyring @@ -0,0 +1,654 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2 + +mQINBEoFrhoBEADux/XveApDkVYu+IgGAxB3PgMZ4nDjNheHZ6YMCtqPUEAPgGYE +ac5juI0k2j+4fLUFuZxjt6oPi+SGX6j35hgUcMQ6bsSkIrMTxPvoCIeFlgKkSZ0H +cH4ishvTTZpBIGDIFVOeiNtLQCyrdW/rbjMNfx+SCQi8w44hJMvcO+0M4TIs+2MY +3CVojhffYZ8RAAGmj5rMJ0mx96xgCNEkPUJtRlH8EGPeOwWdFGIrOy2fg0vakdCv +33FMQQrHu1QwhhyZIQiaXEEKRjbZm7uUA3m+I0MvTbWxqn0OUv5FjwWBGETAIfFA +WBmMZ1w55+IpLQ6GRExtWVAIk+iHE9mphl/lgMMZPUD2kat3yqmGdgcZT8T2D5R8 +Pxb83IRMNFw1yUfvaeI4aj/ssU2Hy1IPh99A8tLsE3d0fCXaTielNbvXc2DzhuEb +ni4/mPE8bngSnAj9dYPvjgiWX8saq9keOBrjvJPm2N3pF65O3xFBja+vi6FwBFsP +LsghM+T9srEzLLQ6kodY/1kbRKlfVQWqwtB3NJmmHogyTY7BkWR7Z+Jf2D7R9EL3 +jv988mWC4ansUo/7v84yzx3zIdphCDW1oI8OjCcgx1gtMoLusulT6ZiVJyVsPUOP +PyQnX/9zB2i6LhMBpO+0UaxQrBjOekz3ajdqWiXVv8+w5Sc5fTMzx9+cIwARAQAB +tCJHdWlsbGVtIEpvdmVyIDxndWlsbGVtQGRlYmlhbi5vcmc+iEYEEBECAAYFAkpv +AnMACgkQvPbGD26BadJsSgCggv9Y+/0TSNfXarB2JOa/e4qQUqIAn3fK4BiRCh23 +A0shwwACexu6yXpFiEYEEBECAAYFAkpwMPMACgkQBg8odvzgParbJwCgm7iBeiQ3 +z2qkWB2QWY5G56GdbSEAoJJ4IidxZ9uxe9Qz5x7I+ZV/iRRWiEYEEBECAAYFAkpw +MxIACgkQ20zMSyow1ykDmACgj9ccn/pgsHcWBzpSnG8dY7EEQzEAoMv5g11JkgkG +PJ86PrP5gx1cjnK5iEYEEBECAAYFAkpwPwQACgkQ1OXtrMAUPS0YawCdHb6WkXlQ +LMu9U35NHE6hW3K8GjgAnRfZp6sD++fX4aNpw8XTZXJpMvqtiEYEEBECAAYFAkpw +b+EACgkQWgo5mup89a1pnQCfZcCpHP8yaTLgL2Ih0MRR9qA12o8An0qFqUo1Kj2u +8Jdwxxcxl8zKBzJwiEYEEBECAAYFAkpweO4ACgkQnQYz4bYlCYVYbQCfZTGpji1c +ns8janNmWA/qTLSSL48AoJ9Y4z8/JCG0c5a4ntvVkcBSNUVbiEYEEBECAAYFAkpw +7pQACgkQCjAO0JDlykbhLACeNlsLxJKvOC3vjxWLR1fXY/9yVRMAoM41zkngd/Ss +DsZFNK0mRrgQW6bPiEYEEBECAAYFAkpxu5UACgkQ2hliNwI7P0+uugCeIsmfDFrl +uHoyR7szq/Sw0LeUW9QAnRk1IpPg9Gu8L+JW65KzvDdLj1raiEYEEBECAAYFAkp1 +sycACgkQ5UTeB5t8Mo0ZcgCgmvxJXDgc1RAXIDyRPPSAiitUSmsAnjGjA1HH07b8 +kue7eZQttW8UvMTyiEYEEBEIAAYFAkpsjDwACgkQKb5dImj9VJ87WACfaCVeFFJf +q8q+aEb62A4uNI9jcegAoJLqcl1Fl14MpFXRfNxaAO59gn+miEYEEBEIAAYFAkpw +kzwACgkQKN6ufymYLlqYswCgyNu5ngE4rVyQ2EN0Uq3snOfVe6cAmwSwUrkkeuDI +7XmzKc1dQck5m8fliEYEEBEIAAYFAkp0H/4ACgkQd9Uuvj7yPNahjwCghtjbC+Y2 +9M6nfnIB9E4Q/As76WkAn0c/KrPLRNJXievv35HpdBSDjHwgiEYEEBEIAAYFAkp1 +jqcACgkQn3j4POjENGEFqwCffUb+2JbTP+rjUaW+wL2pQgSbLcIAn0FQ0YeThrHy ++hIk3Lnm+15APrJfiEYEEBEIAAYFAkp58pEACgkQ1OXtrMAUPS2QOQCgi+uH9LlT +JWqKSCcbM75DhLFHZnIAn25sIoHrQ7lryArfoTntbDTlNPI9iEYEEBEIAAYFAkp9 +NkkACgkQhImxTYgHUpuVXQCfSDLa/KS2HSUQQcCLm3GnPbtcd4gAnAuaAiuiqXNb +ObsHUz3HqX7CUXFFiEYEEBEKAAYFAkp8pPkACgkQ2hliNwI7P0/uAQCdE99LGGTH +i5Nd0hy433lkisDJAsoAn1CWn4/Ufn0Ar8K3qE7D1WWljCjeiEYEEBEKAAYFAkqC +DE4ACgkQUZSDC+wZs3gbvgCfURhwPlqXm3ICVrN6ZiY+4lUmGhoAn3LkaDhoFiRT +B4YeEz+r3ow2vXiIiEYEExEIAAYFAkpwlOIACgkQfDt5cIjHwfeIGwCfQjQZtzdh +zzhG+NJeRSuo7d+oOIkAoK5LhfwtIUaOaAqR8dDqOCUNLVPfiEYEExEIAAYFAlJQ +2+MACgkQuW9ciZ2SjJv5ogCeKa5RM+XSlm/XtHHbQhqC5DVJOSIAnjKSbIPCqQVc +HISpytyeS5ePJgyAiQEcBBABAgAGBQJKcDS0AAoJENIA6zCg+12mBSkIAMHQnWis +9X1uAg0Sf9tToqJtJDMYezb0hoPwL5e3+ihKC6Ix8cHcO6hn/1R47/BJGXCNa6dB +BRIK6ad6sMhGVSrdueh0FHx6wGF4MEM+p0WrfBC56HZT+K2wIfGrPBEgyoCV0eYd +qcoYfgvJ7Ey17X8CihUA6UjvCbv9FT7MbDhsSPfRsW3K8GQRHHrm09deEI676PNv +9p0RKbm5i6pySPDyxC/lyWER9GXvjmj81lPaWHLBPDuQNaW1Sku6mxbIcBFLWsh5 +OM+EWgqwMNk/R2luk1rCA5pEDke5b0s+e/o+ZEE7sm/2lFFIUg0+WUXM+QPHYe4s +Th8Xy29usOGq1lyJARwEEAEIAAYFAkp0H+8ACgkQQc5/C58bizLoOQf/eBu37BFq +VezIQRchtwL1Blrv2u9+SKfvijf+KceUjBQgf6d2PjHhiHqzHtWiZOexYtWx94TL +44+n2uq1hkAKQ7qk2sKdCNlIJDqA7qGpc9C9X3fmcKNoIyM7xLT5/bym63ors5lI +lIblORHR14ZhwQi/CRhMGX+8QcCTjF8IcaRtSyVgJduNTHTNQsr2OrZ5UtMXxaxf +pbJIJZGJuBxOZ89j1CXxKn2kXYZDQuRzKvNATaFUJQwWA1ffgTtqY5a+ZZRsGt+g +f81J6WmhlPsh+63inoen4LL+ec/nlJXmH0cvZHZcyAKSe3OjqWJO0aUYIA7yZCZL +l8on0JFzu1W6KokCHAQQAQIABgUCSm8CagAKCRDmGQRd8qxymrZ/D/9NQMRm0pyu +br9rz9gUDIaOOcEFGIXRZuGrHlW5mdrWvrScJ3zrFbO61KVPOKnTU04d2fS+6H7W ++iPNUZ5UKWc9PDgWYe//Zsg+yeomJYUg4p6QvMxUWKebN6n4F2z9QlolcN/EhDWC +QzWwXL8uGs277fUT/yTzNi2DrAicuBk+psdC+PpMDgwxByxLYbUyHg15iyEid70t +rutzozujF3Tui7yBW87mgcxuUGZqKoHUPIPMo2xxSX6pIyMUjxvYrpLpmCD6baNk +Uh8ReW7WioQSYwqSxWoNyN+yVmA4+RqlYUhsWXAGyqPh2kqC7BS8XGiEhD9NfuEq +xJrMmJw+tX4MPwk+n5eyvODd/Pd362hzMklbg/JcVarXv20apdAbQ6Uqajq2yBJF +WmI2jOMQWn452DGZSyRfcbQ26pGCngUqzyFlOY/l0OsPzpvHOl9PM1swoYvoYe81 +BQiSPg++AmHQhz69ehVs9lwO224O4ZsbTrM2UJ+G5+knE+kIf21/4+WiE09Yn7I1 +fluWQHJsMQgr/cvsBwEO4+dMDOIlzUIYloQwkUgmU2rHKq4YlGl2Y7Qys0e9t6W/ +/s6lFRjMdfT+FLaCzYLaU6nZ7CBNLd3tEgh3j2kOuyrwQWKwHJbcD0OMr6q0unfa +xQ4bjwGIQfEOnRE1UlHybqfQOQXbAs4tXIkCHAQQAQIABgUCSnAxDgAKCRB4U9pN +SYga0z5ND/0Xb5WGgX3Ccqde1+36hhh56WJMSDqCS/qrWXVTIxxUBeTmXVe7rnNM +boRHY6LAwioyUlfbXNUNGWykv1Zebh9+vYAAGT7r/xVpX00vDkd6JAkMtQWcNT+s +Lm4ds+tsnHNv59kK9V5IdYVu7WRdMmrhQyRqLjpmnCrNJjwen+AzcTZV9vD0WO5k +EFASefjmW4+OVW4K6cwP0bjs8AaFhkO+TIT+qWnedu6v1gCXi864xGEkQ6tqvQYz +6fVb5QP4sZtWkXcQ/wtkO8qT4H1JjKPq3sPreiAIZ+ZE2qIelPcRcuFcowdofw4d +QzgZ6PeHrNvZQ9yI/7NQYkiumQob0bxel2r+tYQpS2ej/lCKQid35GhoOXm9y6PV +fVQQ6XnimqK1q24iz1gCKJEviCJOCbt0+OUgFGJ5MW8VpSnSg66VyE4mD3kQf9Je +b+hftea2XZob6QVCfPkPFnHpcMAoy1YjAyVUylx+ij73zIGCHj+DgCMTnGI7hW2t +E66BeJiKp5eiuENMs5rLdCa5zkftq2r8cAX/SC7EiKC3xFG7i+YuDlsI7MfYKD7v +ZHFI3O7S+rFbjBR1os1Nj5/Cy3BnNRPRxu8NLkWo1VcslO/6MAtOJ07KO3nNx96s +4BRvBg2SNR7ALX35hGFqxX4YIG+6+NimBMr7pHQWEVMRSRJvyL9ob4kCHAQQAQIA +BgUCSnA+OAAKCRALAPts6+LQAorBD/47l6nBTmt+VqSEm92tAvOXFMiIZpKyNVWp +heI38dSUgX7lcEOamkmxrd/ChwC2gYyQKzy+fgKFgKAJMXtd7LhXgl6vRZE8z6wW +2FgjatkHxtW4juapqbOl4kcveRWlia1JDSVrtaiF0DYUA6LwVq60BsHDYyAM+mPl +EiWuc83a4I4LtLirRfVQ5tXdtZNWoy0WOi/NmUOxeDRTkHwH/an+kN3579SH7lJQ +VU6ekYXkgtUcYfkccaYA6kruCnQ4Bzx15rC0bJr2wtsT/Pqy5S6tZzoXineABSdC +EO/5uYKXEkP6J4K+3EneCdWM9liUhpfWFTMedZab3qEuWI0bIYfBNimIx9H0LANK +XFrqoNwHNRxWUcEfxe5c/SwRzYkKvMyvKpjfOTOQPXJkayAJIr6t+a8G1jPAWNK8 +iAGZlGCSGUHzNPsEtPM0MwSZQt7PPwyOGqs1SlH5YjsYieQNOBQoE74vL3PKNQ+7 +YEPuCcMkJYzuQnmoTy9imydh6+eRSjJtmkJHtMIC2H4YIuJ81rieJPaTe9XkmN9R +ATjZ+0oveA+VWFUjDwRfZB6Kv3Uvz/KGYmhcwm4kgtmGyl0O4qdR4mlghRLYdq1q +9gLaVFdVBMirVtZpCwlje4fIZ+GqIMeyFgpdifEkB0J+rkJ0LYxSdnVY9ADfvqeQ +f1Uok7ixs4kCHAQQAQIABgUCSnA/KAAKCRCHL3AsTW4lqPXfEACc7pviJlLG+nvs +r0MhMi/S2f2QNm1FcFRWq+2Sr5L04N3oa0xOgwZV3iFSIul4aTPuzXkApuuCWU2c +Ssbif2LXm4OddaG7jdpvY7wU2z+LeoUn4pwyaBks+nUDt2xuhJfwTgXaCdPOYkRz +Q1dpCjxCwc3ahtVEc2tJW3o+udisDT4RAnqV7ip0KCaUM3icHbdOOL3P2mlsEsni +sWORNtyCSX3VX0hvucGLbeCQ4D/TQ4d3rJ8BggiYGcwiCMDIwsdkAxUCXCDJLv+P +28//an5CGszFvBruxi8ONMIAe+3+0mOZVFkgUjpBp1azvvMTez0svxgQVpkxDa5s +miieD4d2nSJCTfxQKADhNg+Q7hOzR81CJvQHn1+R9r5QOs2zy8t6ySkgIjSSmdvt +8HdD+cWzO5HXMQdGHAKA0lkpr5CV0OUbzXzdSzM8NCpKo+B1SvYGnMwKIIl/2Pbv +gGy8uWPj/CVwVxVobQl4a9PJG6v6GbbUZCJLdhuWy9BpNPya1EN5BWfGjyZW64KM +wbnnD4ZNojUvJoXsKAXWs9/u6MmpDW1eRaiE0iDCgfDt+lHgB9TqElEfLtuZ8Sl1 +gG22hQT1Y6nKJs2PNn63dDGbvBneGY//jr+uSESP1y43HfuqIz8a67ACfHDMuynr +153vaXwNlj0m/9vaptp/3bj8n3sSfokCHAQQAQIABgUCSnCU9wAKCRAsfDFGwaAB +IeBCD/9DTJxEQeXpTvSKR72XxJoAh/+0c+SZ+QI8p8s8MLW9Yhhy42Ern+8uQCQ6 +LYf/25hlzK7IueTWAkVm4TPpfoIHilL0GRQ9pnlUMyttltLjKkfKWN7Oto4izmtn +uxJrUxZL0WiIq09iPQNVVmjEfpiAmUln0CctnUxqq2xA15kO5b+jXX4HKKeQDmMu +tIUKNPN6ftA+2Mtpn8zdbvCpatoG4FHOa1nFv6NeNDVsjP112kwnYhP/COzck22k +fi7n6pPCqRbPXSDoO18NuDlvAirwQmg5vyKJVOHMACdCixQq5ZXraEe5QuQqZSu4 +iOVLvX55kOam+ntfuJOlqQE5oVoxk592TfM1n3Jaf1LtgzC09+JFKedAw0mJ6U/S +4DSvgno5yJhFaubFC4hJqTUgxb9OLq4W758NdFTtUGeFES24sQNejBNE05cpG34y +tcW/rCMbi3hZHhwA6EzuFZqRX30Oq39aonS1NNtmAiQgbo2i1KsBqlFTJnnrlH4t +TMElkmkpKBw+FmJ6p7rxINfg/bkkhKtXh29iugBC7PWJXmkUCVCFe3gF/rvn++Cp +2gJ8uIC8vlxs8xYKGGWruay4dKsc42RDZbhYwQHbeShs+ShxLZIaojEYMAlRN3+A +tQopCA8bp9jTUwD0Y3rox8N0yodDthc+jLxhJU2cGcYzJQJcXYkCHAQQAQIABgUC +SnG7nwAKCRA5FLUy9N++mSp2EACCfZNKQNboe6cmxQP0pSo4FXrSVjN6nH3CyQkI +UwTSNmZuheNDZVPzahDLdaQfMixP0VRyCF1DVB9r4Nqv8rVYhWLuFkWP5p9YebeR +RI9RRtpTHdYtKXzDyeRHQos9W/Ui8XcHl8/wQF1wcz7QFUBjcEwz6i1/tLhvEvKY +q8Ye+LTmkYd5Kl1Tgy2pXOYXLPmsPE0cnIaGSTOyIsHfvg1ssm069EQ2/yAB2XGX +DKe4AYLbS253dOgZVKeIoFg7tdJzRhROb6lhNAXNPPbYRRInOJYzgzSZMkGsjS71 +k0A3EZM4u8IBNPWALV+m/50C8cAvwiS3axLhlnD87VEYZJOFZhF7Z27BYdhAQGkM +XYmgreMe0ngCvZ66Ut5gupwB3L2i+msElrtLPnel3/QhZCw24Qaj8dY0I+2dAcWB +9yd/88bWuCUm68ovgLnPw3l5vepEuB7H7BsZZY/zhj5krN2Wj3zb80Sf7A9lkU7w +MwDejNFp2XFud+L4XcbeCiGbPeqbNAufjsBnE5uEx1QE1YYDfO78ulXiekgjuNlW +lagNWgBcWvjUskP4VNkIHsY1aR5PsBC36WBj1UbEwqsKXH6pGVZEP4svnGWXB13h +0j8/lXy/tkH2nKWGK45h+cuTVdzj6rTeKlyan11icrPfi6SeahgM7mWkPIoZ7jrR +/u+ds4kCHAQQAQIABgUCSnSv6wAKCRC5ESBTbYUSjR4dEACTa0tZ+skZLZenIOzy +8wxNrZUE94NoP3OUAhirO9d16MCU7n3HM/bf2t4jdliB6f3VxjIxLjgJnT62xeVB +n5sTZwrdiZKxVNgG/yilfiimufjhs2Ho6XL0rQ7hqmRa2EpMFCGbw2C/Rae6nRAV +OgIfBQnQyW6hbRJdRArYVsTYsxL9rBlw9WqZT3p28KcG62DqvmJTwFUC6JxOpkzC +Q15fPa4bAJSXqHo9Fs8VxpVSO2jn3az/5DDbN9trbrQ+Z3nF4cN7SQ0cVpeDteYU +fOMIAoqS38kMcJmNesTHYZHN81TK44T2CcUljXZKC7aSKmV6QIM3pMPB01G07KJY +39Gp2sMvaU10VgBv+SU8ocTtOJ8HnI/aU+kErNGCfabP2tdJ0VqgFSaBCTNxtUVp +dA89Xiqp67WD5QdOGd7SUH+09AKsNU4pcfv/H1KKWDJwzvELWHMCcn6/3r1c65xu +Cc3U7ezTvl+/VerdXrlEXO+Xs27fivTtPlk/2ChKz8xdX5FJbRFKycDfEk1tBRso +qNWJpb3jcuPFPkQiieFjnMKzjI9w7uJce764aUMMSnL07CPceZKqtYnTv4aPmzTt +v70gwygsykErFlfVuffH5QyBE5SNzMKD2NuOxRUOAc5vRlDpOzFlvijfs1/a21LZ +JdSwpgBfQvA63ak/lolJ8OOcoYkCHAQQAQIABgUCSnWoHQAKCRCMv5oyKGGnkBj1 +D/0YglrxQWA5hvx0DSSh8N8sh1Z4cbXaP00ygynCbIX6WOa1S+iz0c5U+lh5HpUU +xHiC5w63tea9JY1ArEAr5051Q6/+7GWsnMw9YVWlSc7SnkkWsqHOUlFziYL5QOTl +tSO2kVFwm2oFqB8OA3tsrrX/+JUW1Mb94FlUBQ+IuOaoLdkNRKvgSKigQVE0TnEn +ZioSg5ZCoOjZNFrM6VnDn5dFNDI8mGWrmULf9HQqE1QYyIOKcS2TWjZxaMFuTNng +VXW4wzXWsez0VvSCwI951XYaosvEe65rA+Jsgx5oVik+xbPCqm0m2huC3Azh+ete +0zz/pAsiSgmvz2/AZaza+Goho1AyG3bIL9M00hMoPtbjBU6Gm1i1wOeQbg/i8pCm +AvNTBCocPD43cL8oeXQfUposWgs5+Juye3xqmyAE2hna6tv+xDxPEXNTW/OahWc4 +l3Q2ga0VIT7eiBSZTqVIdYLtSOUdOzT6kIHQkaVrzq9CyQSs3zH8OYh7sAO66UnF +2j5OnpKR46okJL2RhL0vFR2R94gn5Z8TuPooXkx+2Gh3cVmNMKUAB7xIwapNb0eu +tIMCF6G8lg4YZjNWJ+6uaVaaR1RuPTdWICVqOcXd0/UefLKJkFu7PTVvmNw7Ji3W +VitId9aWwgZtxUuvZg+vE8lZInd9PnsBihI4N9GuPeZQuIkCHAQQAQIABgUCSnWz +MgAKCRDq2TeZzVxWMu1OD/4opDO3eCe+Lcx9VBmuvfePqXLuBpsDKrFuapU9u7zE +SMHv4NU+RyOytkG2mjgAxbCW9gmZliX2xim4ph32xUvFnpDJ+BMvSwYlsXJVSYpz +Y7yELmzlCTcE6XSb3wHlroUBG0mK0k9O7QgflKIpD0Ta4QI6ZcRScKQ78idFl3bF +xnXhH1r2eo6v42gQI2tcurLivL2napBsq7A4m/VYlKLuLkW3DExBfuIG5hYExCx8 +xvRRlEXchjrrXqV6BLQAD7uFpD/JDUIg4Lg72cdxsg6dSUMY/OWeUuRvZBftjWQm +t5O7Mr/bRgVwxkAq6F4BBIisGSAgI+EySO43mua8hTIrjvEwYof3tT+L4aFhfmQh +4xSKY5s3yRqPo02zMrxmv7VnKCHQ/eCfhczyUvpISJ/gxAKZxYqENtpp//KnAUII +84iJIU8IpgV2c+8VdRu/0z6OhNQGqwLRPyQjIB2pqLfL5ra9houBt/b9VNFmRuqU +6RBpBxdFvm7EByRt6oHfd4+vY4mCoKVsfrcS5oIsh2s0CYSZEc/DagbeJQB+zWYd +ag84XmXf+M7qeRTIZ3umv6gvOoshsVCWi3CVIUxZLstA4PD6wHXS5pasGozL+dTK +byFpPxk66VVTJEYIw0WtYW0odty+o/UJr58+SJdxALfovwFwiYrk+D+4tKaFq6uF +sIkCHAQQAQIABgUCSnbQBgAKCRBHvliiSjy4WqCYD/9mF8f3mTYZdiRqshNVjxTV +OgjUiUZZ9U+hbG9NVWuxghI7EPg8LOVH4qztfON7OQheylksRhBT+CVw3+dWd29e +9s0ajCP/+TbJWZ8S3VTkxsJCoKp75hQ4TPC/YHn5D+MHB3MsasIUNAblcv49/+Mx +tptC3tMB5eIoQCaJQwwaZbTTlJb9Py2Dsea34EUxzBet6kE2PG7+m5NJkDkQZ3Xm +yCdIoP3kpApefKpvBZRzJG6kePnPjIJCOwgHW+34iKjwuwMINDXg66xEQBiBsgzp ++ly0l9V2YIcv7bHyryV8lyfE+MvYsbRViBBelJrXeIhA7tWvOPLaHZ8e5WeD+ifp +hvrztNecu75FXoKQeNijp45dmUy4G2yAKWKlfY9vI54GnNLUEmaOWyoYnJWY98hW +MAOYnFfeMBVheBlDM2DFvVobTFuKrOjVHDhxvswXWSWuNkFZa2eydSrrGn/j7vDj +xQdO0PKbI3AbPKOR5cVxcFN5LWKsiKJJX+iRq03drcPZhUdNWiFv8oceijeo1Au8 +R+TYfBWMLTGCaAnJL8TVLKXV3FpUBFW4VaIitEkKeH5MvJ1+Jsnvpbh1gRySytnp +/KrIMOtsmRVWf467zT5WtKo/MLfTGMN6y5IJmItaJth9rPulfVXl3aK+AUr9ryfg +ZDa62PLfasXk9Hay+b/W4okCHAQQAQgABgUCSmyMZgAKCRA9B4eqr2xh3RyTD/9J +5Q5MTkA9xWKS+TCykgKtiWN/w4JaelxAjM2ajhgJNE9GZ1jBnRgrX9rp0EGL1QSW +No6IspHqwdEL93AB4CYc2ckR+o5o1ndAA5AdXTyFydBQ5rG4Nekzd0fBkDpIHncx +mTagHKNZXRpetiaWWNa/u2S83qQTaGkoH/KqMCrAC5cCh5G2fotbX+08ILt/xHUm +iokASxHYlkc/pdvaqmgwseQ7csLc0YGjspQMBCP58TyaAgCR+V/DEkeT+Ghk5mCm +4y79+BUdZUMShB2IdHX8+tslwmOD7XLX9t/qJVxCQTaDzYVWWu61qOAGJcM7fiL0 +ycEhRBerQfxs+i7omu6EuGyPrTlMvTvLscg1TvIhuEE/9VVmGSwKaA3SbW9YKSxb +OdN0qgeOVjLPkUFT3Wu6B0XLVE2AEPlYZ9iZoR5rifiRgCNRxHrqyYI6yvNaCVO1 +tdrxLaOVoxGlpoIZ7dZWu3DBeSPy7IlfvU2UgSCqIeaDR5enilmT2/I56WSw1oIR +mpgCSHyf9LRSURQqz9Dz6RvO96k+8YFBJ4/uJ/LQ+FxcN0tb//RO7fce8XdZ+yao +Ihqqoj1oSGjiMIFU0YuPFnSK6laK061hjc17CB/vEM4K7DW6kQjS0jvpeWhjq79t +DwjveOHcX5t5fO6lf12IVpTiH78+/KiiqpAmj62XcYkCHAQQAQgABgUCSnAwDwAK +CRAGot6F0y0fqVwOD/4gvRv/b9kc+RH2FZOF9MJ/IThjSQLywgTwTnlt9SfPTzbA +PihWY/8FNY2/sJGIjXTRJXA79PnAU78RtDvHu/ZxnBHpqfnhBvCnFWftSbmPJ4dw +wZkRtbuK0F2guTqbZ/sys46/DzP7ldmsfWZlIvEfxe+YoCO7HThCbspRssmuEVIV +ej8EdlJ3ibKYjOktCo+JHxbmK2HCsMlhfTmrl+Law13S8wZC7nv6OP4gOwI4Sf5D +iteQt50xklILv2hMMo29ac07FEABdA5xCnIcvcj/3PpgEakuMjgg+fT4O3HdHuhp +SOInIltFQ1wV5UDEt+rwJiEpdM/TguNevZSjDsRhQt7HLbZg9mdcM2L0EZAgI2BZ +5Wv7/rPX/v/gZh9MsnVPZidPH6+Qm88QXCNcDFtACY2QydALsSdSwK4GxrTai04c +RaZXRyuh4LdAeYcmyEn/huvaPM02N6DAwQNuidSJ0QGwaiIYAqhJm/kTYLhuhxl0 +icp9NRXll/G0OPjIngUfBkll3fdyQU3ct0HHczmQgJpEsRbXJNzWejETjsFZhIlH +MHW2ozQ0sAJSODqOF8P/3ik6yrOJUXqm3wfuGn0UvOhkX1hpj/3uqFp+RGYQ/Mh1 +Bl7wD/DlkQTkyLC6jx3g2CnnyP/EbunxBOJt3PLj5peUEcQLwhrmQ97QAJnIq4kC +HAQQAQgABgUCSnCTUAAKCRBXWfNQAapKZHiaEACuW1kcxodJ18nuMB5hLqMnmafN +5JnCKcd6olp44/xmFUj4SN+6r+ZRbi+FGpcGSlRizrezCOu7MrIC3Nc+NVyHykeS +Hf0odSXeuC9ovp0BAnZ0LGTYE7xA7BSY2jRqJK3r+7u8851hmEbeYb4IcC0NTGFl +MRPiYbfZ1vcFvf7ePeZm4rVvQzVLQM0GZXooMSXsD9JPdStzr/d/DsZAXKuRR0fa +UgEQNl2zEnIbREY3D3kaa+IAUufaSQZbBJH1epqpD187+caQXJ2/UoIX2FpdBBCl +5PXyyjLuh4nzZ05f5kk/jE25P5zcBePVgdAEBp11/9rQHrizyDbAILNSctLmF4CM +1aTg/F6uQFUR8LKTvrFJU2Gj0yRZZSL+r13oaTK1sN+hJFKF7HPfdVbTMGtkDyQg +v1rb/JXEt08FeG1i684oc3vvE3L216t47w+g/wDH4OqHL0RgYCb59xeOXtSsL1YI +PFTSYX5DemahCXX3sOEzLxXkwN3rAzFaXsXUSwve3u80pFSBxnrwny14diPGXYDS +zT/oIEzM4q3l6SesYiAdyrivh6Y1Dmxv10VSSG7PWM3WSPhZR4A/F1hq1+En3wp/ +sslQ2ezqbfMDHGLLGm4k3U9xqqHvGo6kG4wGzK1ZPkDmc9Zgs9aKDZfqC+57qT6b +bueMKO+N83t6xAT554kCHAQQAQgABgUCSnWOzgAKCRCzRk+JaqFZSMq8D/9hCYzz +mbYr28qQqNWNOc636HBvC9iD2O9VgEc6W+5KhM6TkD2AXGoR6pyytGU41PZRVGf1 +MARSKT6SuLV80c1bKro7UWY+JAd51r6HULtfpDu0kCO4u/+aaQ7xKG3muzg82wax +SwqlWSnX2MTjOpnuZFVml8OxMFkTKAMLFVaBwhrOfBPvw13ZNNp87vRLMup8x/UW +AHaHuw/P8f1Pm3wKm3S10fA2l1n3uL3XND70+YofMa/Ze8/if8DoRXAp/80Q+cTs +vWdl7juNarYz5p2x6dPFCavA7cjpnCTVEUj3umMUCUkYFdibdfIvv9MnUi7lm8j2 +DhlO4dOlWqcJwjFeK35WOA5pm9zzdTqYDCiNFzmpLELLO1AcKUyPW1kWqNru3g36 +c46JA4xERwtsCyt1ZF+W8lYb7QLY1PJIrNJvXU2C37+I/cEsw0GLL/iDQycY30cx +GKef0dZCJRkxAqi3Ds+Ofu8KG0CkKkHajY8RA1DLvdyJWQAGP76mYUNeUbJDy0KU +9zHDVuK65RM6Ct/BYQEWm+NHMMd1I0+CTYO4w3LUJWmncXR7wpWq7C7UjFw5CO2W +HbHKXbVLZXa4iOovOhoO0nj6bWdpsqtyvLXOsNhIimuKyP9YEOlIQrUewg6EQs0M +G/EKxiG+PA6xShzVhgIznn/vUHbILcDJeVH4aokCHAQQAQgABgUCSnnylAAKCRCH +L3AsTW4lqD0ND/9NaHvrgA9HmcVB7kCmmZzGNqNKPGbidHgqOFlNGHYaPMiCduho +oekJRnvPd29JqubH0MsBX/8BQ7h1KvC8ZXEzF2NuhR4ZfQQqMouyzad2TXKWYLeZ +8MAj8gxLKVMvPm7/tRAyuGHJ5Xtv8llJgwur324e2o/7UjLuriLbspZ15fyG+J4+ +Dw5K8UQVoMnZZRvQTTRFWtSfHSE/4YXZq6ux1y58vtzwuy7bVH0Z+5NqYiEx7ntj +tL5hOXfvKjxc71COvdPrEDRILq9KpdqeX6zDESkzvftorEQU6ZuR/sZRr6G5QQ/4 +DIfZ52uAuEpYvDz2AUvE7ttanbPkzHJtwTKLmQJ6p9+zk78I0U5nzBqdm3LbkYt3 +hlmBya7t3ift8wJcbh+m1GXXrVekJtAivdsqpypQ3hnBPxA9iuIWkRJKVw0imlTg +fhiOS3GLWYclror6nzUB36znPEU7e/uxrJUKObEQvhDbJToppEADBDZR57aMxnEz +R++DhnEh6DpMhg581sHTUUeBI1Cli4PBMz9+ex2z/jOAHNlM/R/PrnEcpkc73iFT +JpF+ussnICO5UP0Alzot/zeAt6hF1jGPtRdzjV0/7vZ16rQAsmG5TmYKUZJL2wiR +XH0btJcAYxhpgERzT2xYr1anNR7YdLxJ1earVcaPqDP+c8cs24CvyIkkRokCHAQQ +AQgABgUCSn02UwAKCRBJw7+JJ1U9LqlUD/oCjXyGU8DC6/W96xVw/id3paKS9Qkh +fZwqno/hXLUPfkFYNQspC2xmTjJmx+GcJJ/eU+dTLPWPpKe9LBPGJVKONb81H5/J +Yx++qG+E8SjYDrNia5B8uFORtztqUwHxedkcGsfjGnNoh/yDmOLJRN8HWqXCOqSE +TT+yGI/7i5ZD08y1UxZjttn1O46Cm7Jz6KxvOw4UqwVskRGd/PxX/Jns2XB10Nx2 +YY729lP3g92p7s/VJeTi2MdaugmNGTSEosmGQyfiV9QRNC1TXHXgaZolZXxPQEHg +xLaaB2kwEVzsCDnMEZ3blrKD1BI2ntyeX177OV67HdS2xJT0rPe2ksStB6/dHZTf +zknjlW/JmeZE2G6s5qWEl+UkRKbb6HNmC1C98P/AzluXYnSxEyLadP/beOmOl0OK +6AVQtFZNPznTj2BLVerD6om/aoFGn43PzxQEK88SyAzkA6PnMgr2BAnx0XoTVR26 +TImW9fpN3Ypkbf+8HCPBMNG2n0bn0x2NO/hCxQsh43++kuv2hcgIjtoPurhMBase +i05K+YDTd4cbn5ucRylJ9UngsZRAC1BsbzW/WFc9vM+bL5G/FV3kJkSfLGLc31Jz +9DMeq1NrIs1tn3+osBciXxpKMe2DgMJbDdys8zcQEHDiHaN66YhdvCpQgM+rCEhT +5LEIlalz3lA/AYkCHAQQAQoABgUCSnXy6wAKCRCMv5oyKGGnkGzjEACNCK6XwoxZ +1TrY0Tyc2Qdh2RIGHk2gbEQSTEDAOMbvpE7v3Hu7Q6qN28YuZsfl7S86YvkE8VSA +ikhlR7+KFqTlS9rKpBSKnlAtMOlXTD7e2MHj+n5XeUstTS7z/WLEaL5GTuGdBjSM +JLiRCNr3UlUiqPZB5m40KMd46ydt3zZREkvLzYJC97Js52PXHJMt61wFZ6H8iPBr +pu5b6ptLokYxsDWMjbasMW+UD/LvqlDqyCS5gfcvcRhPmUI049XKrsuUCXrXq/Km +lrTNa1bgB+jHnyc9ur2OVOl/UKi89vDwC5Za/aSiySV6Yh8sHxV1FVHyoaocNHSr +FRbKqYL9mzgbLv2cM6hVQMehbmO96WscsJhK9Du+Dd1d+gwyBxzjkaNVe2txuPc8 +TDMaEjzAXLRL1N16SckoOiyLymTcREWP9jX0QEubd6NWhepPxRVvTuV1xyk1oLpL +MdIIXtOT4kmca7M0KnbhzsoWzBntv+FvO4Hp3I3FU1xBS4Qe4W/I5IcuxcCmYzdO +6t+H4F++F3qsAnkfg+TZotHphcCYk/GwRq9bHf3deQ6/h5jjhJ2zT31vJwRzNs65 +st8usWrE3uYM1pLHW6QpOZrzQg73pfzL08GRG+wz3EfJ6xRqZqtYBeblnu+stE27 +fw0NKCRNC6C7TjnM4dvr6mHl8zvDLYEmDIkCHAQQAQoABgUCSnyn+QAKCRA5FLUy +9N++mUkxD/98FOo8HsWCtp0euAVv6B0I097EMKu3ZaL33EaaGn7WdUdeqs5MXdBh +HYOEnV8VHteXbECZcFC9N/szfHHz4O8JwbjR13GKWN8U/3PmwyknYPajrfvgNt7T +kqqXd7yFV+I2R1PcdxPNBxpYI9qF/0uuYln/QZGOon4SlMhKHzUj8pf2gFP/h2VY +G5zkZOfief7GdCaytRl4UZo0AD8eJThLfaiqeNF/hXS2JQdjaF/jVB+7ltCbnlWK +dcahll0p/9xQ1uLOwrRU5patr7S/BrdtJUgpBiU6BFk48LoRbSLngxHn/bHqjbwG +00hsv0b2xTTV56RBbQk0NPcStaUTHIhobTVm4nFi3L8u+8bBLwoZZCL9EnLzl9p7 +GetJMVB41TISkm5hfxa8vGOS5LsVpML3dnLCMavPpVZO42Q+AbLuBFGLiqQx9nwr +7nuoHWDjbDwCOK7ZWNhbZ5oXKFPafXW0z8WihcLeFLd2Hjm3vr7eP7kNkN1pvQQD +1s8PteWCGmHyErdbXBcbKIudT4TgA3Sl7/ibyAQaIZj354iupUybHa6V+jtzzcXw +pxK7bo8aa5zeupFvj2UdxvnvI3ps5E5X7xv3ayF9YVzl2KV5OMGF/mDlSyXkcarA +++tZMVcPawDA1sC5kdB0ueFgHObQKPzSTb2clfbm65dhY8gw5p7iHIkCHAQQAQoA +BgUCSoIQNQAKCRATbpzxe100LTvYD/4wYDQguqv4HvLY3/Y7TeejRmv+SWTk6lkU +EHq94ILZyWkmZ0/zh+A6o8WUcjCKYzOOGkkg4I03bpOPMT/KrgFn8CkxST9tTzfL +C3Vm/4XmCkDTiiGGhtn3uty+EwnZX2sGf5CrmaFaCuiaeTveEIm7s/nqPoKUmZ/J +nsjpo58YDpeRSK4gH5yYkVEugE94G/BO01T+J7DAUoiE76n17ukBEg/TdNuYqNIb +KINCsSRH+X3cbhwBlFuV85ZF9fyq14N6rA5faW3McBgV3QHezAHlePSmEod5fOY7 +PW9HzKXqcONdT1kAmPOtgENMx5RUSTclv3ifpL3fjfB2FCc9qn8LYNwH122iu/sH +3QUG3G07ZUCg350RjBR96hbtuL8wZ6rD2RvgwKq/vMjXaOlp4cv4D5znbb6VA+GO +cRgeUnjhW01lzMCRxr6sEYnjFgYGmLa3R9cScDGe4qviGHSKGJKgjoNKa8daayvz +Th+Fn7o4mo9ZG2hVui429ec1RdIBMHoAdB8JZ0IthovU0PYvFGR2gYuZ9WUi+CoD +9mFk2vt+Vq6q6gbHVocZ2bWsV2NROD2BjDesv5lNN/SPLhTbrkHOxfITzsI7CJns +8cfR2kpH2wq3Wa+0n8hwKwT7R5w42QPr9nhc6rHOQtxk2yVw1a7ZBf1xr8+DDu+9 +xvniQJATDokCHAQSAQgABgUCSndCXAAKCRAoNoG6b+f0HRyxD/0dCr94bNUwuipr +O34/Mi70Y8h2Tll07OvrCFI6Xum6nRtAbh8ocBoL46T2nVa0X/5gCf++zuoYI7sw +W9gnB8P9Td6wv4q2r5KrcokvGpy0ocghpcPDho9qy04ZE20VbfMqAvW9VwDyGTq9 +SIX+VmNiwnHMyOq8niRwIfK5P+DqruFQHxUga7c1LlCBs9jcOR3EW24w1J7BDjHN +XxcJy7Cm068/VG9bufUb/S8JwGJB4dSUg0ZaC5tcqOA5OpH0Q/bSiu+G/xSWuL9P +bq7nmxAdrpqGj7u7SC80nRygm/JhpuY9eBi7XIcPLcB3zqdAkXb+hr7kEStETbDh +x5o4uLl2AJWjbrJ1fyHVZK+h07VQJE6hvhE8dUVRYucb9ZFNOi+/mB/F+XNJJBC6 +jZf9SVgBP3Ip+bPK1OTbL70CXa/Iw9ROp6pxk0JzSE054m6XheHrttvYm75/5tcy +9AaKpXdnboKfq3wCrTlMZPzmyh2uoGiCYU54kbggIZN/Xsili0SkiA8YPK9btApn +XNx5flAokF64J1fkYmm25OEC8z4NWNoWBTWWUNnsRAA2JE1O+fsVpFDqSxl00ALt +3RlEzJEgZC6pRZ231liypAeMHJFlsjJEVjCaHWnIxV/+oJB9RWcC8xw5lxSgQEGA +v87bLtin+HxPTFHeP2yLy+GzinNkrokCHAQTAQgABgUCSnCUxgAKCRBYeXlXNEJo +Tnv8EAC89gRmqQzArMerHQdGzjZ0NMhfIvtB0KhAMdTKi6/PV3ZrdnDUisfh0pp3 +mQFmoJY9UmoMjga/w+2OaylNwNAPmgkWbT8VZBqMuZkcrEHJotaNRj29RtmP3H9v +atCcIPjouFyn/M9qcXs4P9HWQG//4UoXrV3NR7B//F/WCQ+RZIUAxR0H+KDshIHT +/mI4rbzCehWJcAG7G9tmPwMehAPBHOjKJqHZA9ovuufNWaCIp1VCc/lQwGLERlbx +a/qKkr43RjD7qnUvq5GY2umoTZX9b/8QZFwAedCLu3+9YhGlslZyBfWbTJAzdCxb +cqB6qIol8qtvAw6v/top85FGyQ18/19JxONQJydSPyd3xVLlwdYPk1QS55ylGAZY +G7/lc03L3TmMqG1MuDmPN5wpyKVZ0mAo/DsyXwTqPJPcZWV819Lf+Y3bm41waprQ +ZPWiUQk2fjsjXCS6SwH05dl+iQk/N4fF/3a8kaItrUDuyHs6kZPuGeN0fj4yD1OV +opRjfL1Ka/OimhcGeHYcJvPyk9WpONH3ey5JTbgUNwuX6adnjjOKae1oHEH4S0Ec +Xhz++wETsDm0e7Um/eKGex82oJTKvdFltH186ogAbttpYEmL+mR1q4eTvkbe5MDN +35C/6YH+LMljhQhayR5DNDBKR4qRK21sOrDAXsFgSQatzoxY1okCIAQQAQgACgUC +SndypAMFATwACgkQLHwxRsGgASF6kw/+Mdtp3xBNGqCu7eAUGkV7Macw5vLM9snQ +Gpr1pjy2rJZfsQwFXNeDMEE2/2L7fDrFZ2d0lZvr+3+x6HluInv61Uz90U2U6CVi +qNyV/+PvWss1saBAcYnpY1FOKjJmkwJU9Uu25vMwlWx0nxzM4ajAvSMSzPg3d9p8 +haQR1o8sZksNQ+pUrK852S1+ubWaCDb0oq/8BZNwBlVeX6NKUBDBMpGp+I6IGDeS +Rfnu7UA+eyGGuDW0FXfyJQ6mtUxXNGvIUsnu60BEpBsMMZSOlzHi16QQ5INOn7J2 +Kuhq2Bdi62USxSFq1z9AsFQR+xdRpEMMQ44vUCML0f+5lMLZWJwIUbYVU6GBMk7c +Z6Gk5CwUWHy8R2MziZgrnln3THRHr+0hJCtA5i0+/SYKWLZstLDOC00wkVIA+FiA +vHpWkU8pZTPj3H7jAfSH395UsKlQKUYcA7tQ2D0CQO6eF0QyhH+4CEKxed+5Rn2G +EjuuVDa1X4YkXz+fWFo9HSAX0FAleqffA1/VPbpDh2LKY3yOpxwuq7r7dGCn5jHG +u2XGRUieYccwxiz75Qo1Vhm8KodTGZLVnNXaglkDfDqJlHj59kBhBJTlRrCH4gnu +em8AUwHUmGUoFpOpKv3NRc7jxks/WKu8SGN7MfnsrVoDzqnLL0Fl4mEpCvh1k4On +tH+SAe9N+w+JAjcEEwEIACEFAkoFz54CGwMFCwkIBwMFFQoJCAsFFgIDAQACHgEC +F4AACgkQuXK/PqSuV6OiQBAAzEPOnPB9ZkDRgVDCp7aAj3Jtdj7RNs7P7BkA7ds4 +UWRUkkCAY9uuVsW7rVfdgtuLYdD9jihpYk/UK64a4WAgy/ioHcnrv5/LlaDtt08U +2iYEejpaO9j6vFBXs1XQhWdIP8m3ixwNxmGD3RrWoZ9Lh557W33fVWjyN6OXmE3A +HtdulJVd6omDKYFzWeyMXNbwnSnbsFJimI02tk4mAavZ8IObhndGKgLpNfTIyw6W +o3EXfc780NzPNpuMUYw71oxHqMqFRvhUd4Rs/dsyqI8SPTwuYv2BXn7hwx4T57Jx +OYvDdiGJtsnZg9dXpnRAWZRC/wdD78ljompG8ntmAdWYuL+yiCzFzb9UxtM4ogCl +rBdMqOIFy9UWWTiGMnMewJZS/HaKximpll0rnxmxRllXHyvcnLfKhRB33Kxsg6qn +Sxtv3PmxYQEHcboiXChPjEgXSC9PaBrwakw8DGi6a8XO2PLer4larfCDqH28Dlh/ +T9cgKFSl2TvkEW6Pj73XRNgFSvRRvqUxwd1A5UHkIgSdEgBwXbHVpM1AgIe/JotE +r8q677vhN0s5rVJsNjWXttnMsAYT/MAA205V5ElNQXbSB3eCRhWUdRuAssGj1QXg +943FzHhSMfEkvVNVfLx/I2FqZ9PKV/aPboxi+atNytJWrHCS/4AVDq7aPSEtYbW6 +Zd20I0d1aWxsZW0gSm92ZXIgPGd1aWxsZW1AaGFkcm9ucy5vcmc+iEUEEBEIAAYF +Akp1jqcACgkQn3j4POjENGGoegCYsjtYI9TQ851nZz9/4BdhGjp/DACfa52o3Nxr +jeHtLhGl7aS2i6rAKCyIRgQQEQIABgUCSm8CcwAKCRC89sYPboFp0opBAJ9vebud +kKEJcRD6JvmCVfXlyXgNBwCfVVprSzCZ0eEFbflGYp+6IOWZpt2IRgQQEQIABgUC +SnAw8wAKCRAGDyh2/OA9qv22AKCCv3IZnZ55mD5rS/YsggZSourVowCgjxtqRld6 +V0a2DhrmWF3k7mAYrcaIRgQQEQIABgUCSnAzDwAKCRDbTMxLKjDXKRnxAKCWKJtk +g8Q/29IQXRPAvusAdFEZSgCffkTojOVPnJBWaY6h6EuKMs6abxmIRgQQEQIABgUC +SnA/BAAKCRDU5e2swBQ9LRBOAKCUjUZAQgQoBqq2sVzLzOchRdAzQACgpsrYkBZk +VWVKVZW/0joBglr/cWOIRgQQEQIABgUCSnBv4QAKCRBaCjma6nz1rcg1AJ0UhqA2 +izreqwaxH/GUMOa4WMAeqACffUGZu2cY56+OsvVw/JiKWHZbDfWIRgQQEQIABgUC +SnB47gAKCRCdBjPhtiUJhQ92AJ9ORcwItL6RASxevr233lwgQ+lG+ACdGAK9UP6H +KJXlbVAkMDHGZAzxiI2IRgQQEQIABgUCSnDulAAKCRAKMA7QkOXKRnKKAJ4o2zMR +em10ntL8aIo3josf/kZkPQCgluXgaZKi/PCSRsU0PKJVth5JaPKIRgQQEQIABgUC +SnG7lQAKCRDaGWI3Ajs/T5oPAKCmOMspX8+jo6KGV3xDHLLppLXg8wCfWspYC2rw +6K7eMRXUmJkdD+Zcae+IRgQQEQIABgUCSnWzJwAKCRDlRN4Hm3wyjZB0AJ0QPESr +cILtmn0YF7un4WU0yB+69wCgqulnELNa1k7gvGHBi5VOKlEKC+mIRgQQEQgABgUC +SmyMPAAKCRApvl0iaP1Un5sLAJ9E1MFPS79B3vMGJ0ac7DRYxA+LFACffer5sEcS +UuxK+xrrAHP3+R64EteIRgQQEQgABgUCSnCTPAAKCRAo3q5/KZguWt96AJ4sBVyF +vGY3IC5TMHEG3p7Z175qUACdHpFWTA4s9tLBSmvNNCQJLKV3BKWIRgQQEQgABgUC +SnQf/gAKCRB31S6+PvI81uCHAJ4nc8TbtKC+6KnvUc28EMz8Od0w9wCdFRUBwiQN +GZFLpuqRsFY9k3qxVT+IRgQQEQgABgUCSnnykQAKCRDU5e2swBQ9LZDiAJ4uZtuH +4XqxWE6n8RHDQ4heWD0nSgCeN7HLqLFNssTGfzUW1x/lLmbwf+OIRgQQEQgABgUC +Sn02SQAKCRCEibFNiAdSm1keAJ0VBImFC8Oi46eomr75H93ECdiJ1QCfc3uMqTgC +JAwj179NoYYmtU8LuGeIRgQQEQoABgUCSnyk+QAKCRDaGWI3Ajs/T5J4AKCPu0QB +Pi45RG9w7S3/7ZgxJIQRCQCgm+r93cQqZ+spq/PYTuMatLYRn/2IRgQQEQoABgUC +SoIMTgAKCRBRlIML7BmzeE9cAJ9ft6Gv4QAYObTEXuz7/SS8ybT1xgCfS1MvjhXy +7GywNeRgraudNcvHrJGIRgQTEQgABgUCSnCU3wAKCRB8O3lwiMfB9yHvAJ49tVvq +6uCAH5ZYOe6SB8mMv3BhZwCfffU5/Lo48Hho/t5AnbbO68kK2u2IRgQTEQgABgUC +UlDb4wAKCRC5b1yJnZKMm9w4AJ9ofmI+nvDa1zjbejLTz9IxI6EJRgCgvjcia46O +g3asOeWnLerJCRJEBVWJARwEEAECAAYFAkpwNLQACgkQ0gDrMKD7XaYTjQf+OFhY +Yj9cImFsCAf14Lf+WczYpLQ24kGmNjC5PD7kHwoEqDQVEp3mAhFOlulwubkE/zH7 +/uvFThi0E97CD4KudbX75SluUnzLDk8po88yGTeDhx0i8vvzTi7JudUXT6LR/5bj +rLsz4stGrDaOcXQ4kZyuHxlBhaJ3lrdNannLMIGj019KZWXowislvT+phbewsyGf +YPH1A7cod/EJQPNUu1MMl5fyb6q6T5VXQt0zizaI+iYWm4V1Lpb693VBiFRoLK29 +0EFgcpQjzjRMV0r5BQ2dB4DNBKG0bI47DwNDHs+yDUVs8zYU/SsPOWeU7RGjshB/ +4xskdPhLAT9mNQ+1iokBHAQQAQgABgUCSnQf7wAKCRBBzn8LnxuLMr+7B/900jZ+ +58c3ctFQwFvL9T/nFrb0XYjNEB6g0hYrljxegGJrEoVK9KW/fpJyg57D1Lz1qdN4 +ePJjwEJ47FA570Nfkbp++8aBvBUcaeNFJS4KpXCzgYF9f+99zKNERtnUiQtri6uh +DlMBnoT6sSKpM8TiI1WGoyglSMnZ6pf2O0rcUdUxKznTLwUf4C+ea6yzJ1oTschj +fmy4fB/XBpKaInQoMCqxJ1eZyA0uMSkn7WXDVPmUolgy1Q1ouipoyHM0dqlS+61H +oCtN002Qr+KAqiNifU6SNnoHw06WDxtPAvoB61eRrHPzwle8DXWlL5e6ZD37EdJc +CpyimFHIKUmXPlVviQIcBBABAgAGBQJKbwJqAAoJEOYZBF3yrHKamTcP/2o5JwDa +rYYc6+LkCwZTE8mNB39GtCe+90cRgdrhMVLHL3M8abrtvCNfHIFsbmSJxCzEnlBJ +/ktQl57ULVAWuHhfZ/cf/qtDSMzaojaV0j0wUfnWNKOFZh0XOW9Fnp5Dq6IivXHt +aAp1r+UCBaOglHuGrmA92NmbEOHqwAGYrTKagp05A9l3cwTVpMvvaLCO5gE28RVZ +sH20YyMMRjP3XzalAvWK/e0sdGfdj41qNkDVZ1TD4taNYxYOgW1RyI3201YcMGAX +v5WvM87zG+FCNE1ARehLqYZZBKgmfb3+jEBQ9owa6HcLIR+xqxOZk1ga2qzumK4B +AOMLnFVYPg8np7DT9EnTLO6rLtQ44kfFZR1bDInzzQY+VbdqnwD+Nk2M/JiGZ2Fx +ag5CdrwBLzWwpJcgc1HUEO1fsTG7m9scn9G1UcQIxxVFzE+Wgd50HKc+7S5/f6PK +gTuNuIYxIMogsBzfg5J1+B21l/PU5FvBB3ASeSxWeqhEqoNH6BQJHoudrrtJZ23W +XcOGOGxS91mcwJEjV0Pg1mZTQDpm+8IpUJEnTAcSi7X+3Eo1Ej2rJhwmNJYwBMM0 +dQKXqDdFD3NyKYeZ5E0vEe6hWEmgEktGxu1OBpJhuTpWNyqAgBgMkDcKvBqK018U +Gm//FsAT8NNH9YP3SeS8VVd9szWium4xA4PRiQIcBBABAgAGBQJKcDEOAAoJEHhT +2k1JiBrTVXwP/jmcPD+XXqriZA/etw0M1v5DJZ0K4u4N7MT2BsxuLYXoMCkE45Rj +ArMzM+7w0Z94ZfeuDrjEmMQu0REj71gnoUzogEyojKsx6+LZHxZd8oth6WwjHV7F ++g2l7ZOAzGP7WcvcnqBZJboQxVd52ox5juNgPbk5oE4C4JJfc7M+BP1k5VypzwDl ++TRrA+gu74a0nZKtRLDm+QG7HIDM+KH6e9587AaE2ZCOqX/1hkSFiS9NIvvSOas0 +cKpm/+xaKq+M++tyEDjhWr6a85GRihb3TEXhor2GF0fBQ/JrnbQYvjzYAE81Ojau +W6fG44/JwOoRVttC3kW4F1DJ/T5Kw2hOsZ2PO2tbXhiEhjWVp4RsDvyEaL2B3dA6 +XtgShvhZnd7LrHqXfnLsyBrFw4suwBFe8IyisaZUSPK06E0IDVv6zta7V/IZp8+4 +1IXXszFpbW1Xy2ec3p9+4YlJLnK3KzZSMYHLPsjedJjYOXGgOwGztqKD/y0CkxGi +JZdMoITfE+HI70CzAO0+CP4MqGNx6cWH7xsBO3GjssptFYzw0gLZl1f332wtpQ+d +5d9+LzSwM+wRveFxiE0BLduS9+n32acBM60HYD4alwKuJTJlYurncshQ/Ga4Kyvg +I5JO+b9tRZ8UcJvg13H+Z+383kSxszAam6aOkp5tI8x45nAP/tpYLH65iQIcBBAB +AgAGBQJKcDTvAAoJEB8PCojeW8ym6q8QALbBOX2Xf5KCSfHGEbdqOTWeNbFKIATa +0p9opSvzSDhMCD/o1SEA7exTqLTNqfHf/togA6s6LLJoRRvD8hHt06I8RL21v99j +hXqA418QqgXo6vhLdm/CnMYqqFMSZLho4/RJ2CBMSSJTCrf2l8eLQHmzn67hgFIW +LTVKYs0aYFuuegxrWW/b4AhIoVKH+BCQnm7+vUSBpNWjjAmRI2gpSiKuMcVAZTMo +ag+nixuYvU4mYPEFfMunccOetCE+voVgHKZtprsX4YCpNc33v7uht8+LK+lyhOmy +YJhmTnrgqjmr8mGYDO0HYIRBUQHkZSiLcrMx0EtUbaYJkdACh/u4JOnacOpcu4Ib +AAqDF8HsKI2UsR+5zg0hCe+tSzMtagyA4YRSRVweNoqmghrPgoQfzckqZDNEMF2u +zTJE5EieAoasHxVcFxsG008DsFR6dIt7RBXg/NrIZr4rDA7UNHEjJqalNtKY7+Ew +QvnHArb4Ah2Rnx98t+wP+ULalfWkDkkPXuJ26UuZDvWt/xnnzjvLwI4ex6Fi4Hg+ +Je2jjwmPtAdzpA+JiZb/lEQICCQL4tqzGUY/fog3nDznsXlNpzw9mD5/xaVWvSkG +vmgAhtpzvBfQ2kg5po4Zfe3Atj/VO09CTgfOeqZf0ttrmcq0z4Nmmd5UDxMj1QAq +688O1KkL3kRZiQIcBBABAgAGBQJKcD44AAoJEAsA+2zr4tACv4kP+wc2PcZsi06D +pjbW4lYZ+KqCMhJ31K1EHGMGS035/KwDg74PQ7qgXBy+gl3sXYucARncjLL98hmj +tSkm/+LFyTbZeFv1fS0y8jfkcDiXKL5xOkcJzp1BV8o5ADdQSHLwrdFSaZUZMPie +7YsX/XTr5mlAGk6F6JijHETW0SxjMZh9ElAxzsnaqsLVTx/8vi0il8Ivm2rigdYn +CcycTpHpADVkoZAfErzwbNgkU8wzPEHhAu84izeMbebwMgfBncLUPNuheUfNveZ3 +pLTBou8vj2SNrN+E3Yj7f5GLjjzrMQlMW7ooeu7I+N6OZNCtoa+Wii5aluhSjKzx +vbqRDvDr8jhe0PBvn+t4VFyG0829d+sFGcGd29zvcNWaWCAmw8DN7SKox48zlw7n +N+Z7ux3OIaIKCYwesjqwr8F4mikhea8HtNHM6b9YWwIm0o0MUlZOcWUwc8UnLs3G +4/stPBscCHyH9/98uLSkjNNAUlRz18QnTPE4OhtHvZURVZECQI0jUZ95al2epTU6 +Iv67hJl4GLD+NsnCvlhFVsN0dEimJcckjzkM0hpcXInao1LWiQ5UbRMFKP0xtGek +yMuC6gF4Jq56mkG/ZhZdQqqG/kJYSXisj/jOzQo6MvVa3npWCkuwRxS1ag1HKA3I +yCplkW2aA8nqsoa4wdS1f7up3mOWdKC+iQIcBBABAgAGBQJKcD8oAAoJEIcvcCxN +biWoVJQP/0fITbkysPbkd72sFlUDyTdrAl8VB5ayMM/qWk4E1/QIKtwDiBLcQGcC +iN+zfpxvUykLXC7NqUNxQiP6g0gsiIVds3CQODAfvSZB6KViwzLPWxJQy6jdWhBI +haYtp7tt02ubD/nuDyje38/B7eNeKzJx+qotbLRlmaQLsFJSkxUnhkSLQm4sWq9z +Ew8lGqdZ/PzJAILDXllKMKersVJcvT6UFU8+aQGQPc1wTRsRaKlp8INtF/aUSFse +s3P7pPirTFObn8RbufIE5CHJcDIT5QAkCoGw8pf6E6wrauNaWBCSvv0JQn20hIUM +teZMMWvMp10yOOu87NGN//CwKqPBjConh56odFszTgN9RN/EDKXotIrvV9jetWj4 +AX4/+6ldrpPS70x7eIR1MhFe3TSOL2JCbcNcveF7cd0hbaWRB9n4ZsuJl96OAJCE +0BwVYudyqoAN9hgJO4FE0WVUA9jjGy0khwZN0XFk2gBjz/V8tQi+/T1gpEql7bWQ +DXs47uVumGp+dWi/vyKHrxJGe2vrxSkmmhwHV+VtiniKvnXIwGMlD2Ma0buGaNNX +hFpB2kFzCVurN0O2NAB9Pc5U9xN3/NSNSaU5tJeNgy9vi/Wia7ZGR0mTaVDgqjh3 +b0QY5l6503q/HYfCqaMuhpqBO6rMAzf77o0NgfVXiKLNlW0aMm5PiQIcBBABAgAG +BQJKcJT3AAoJECx8MUbBoAEhc9YQAJmIhytrnI+20GAOAJXF2+5MpyidcY/PhuGP +6Ignk7hVJNC8YhQv1gWcKg+vFsrJc3SFzCcRoIkd4Yk2sUQOKfXQskV1rv0jNpx/ +EKAOWSgwlMDWBvb5DmyOwPCQvpiCXZClX/xJMlsO9bt802YV2V7GUXD4YbOnABv8 +Jinc3N17sJLF6X2uXE0CCy6vtrj6Ha3tk/GfCSwNq8pSlGDWR2iehMsXGRZhwdJQ +6hhdLNLr2zYhJWLA3ZVnc5VW2hcKv2q7YKVk2XZybHgF9FR5O4AjXPX+fhCrwVC6 +LLznB4v4G96qNeEjwrcO32/2eTesQdYRCelhH1N8pcNUw3lCD9OVmu5u5cM5fSDL +AAGy1b+I2vaRYkNyTJLvXnERVIagWYz/vO6xQ3yalX8ZNOCEqNFzHaCdmJC/pbDX ++TvuEYcOInhpjEHPf5s4FLk2oVUfGW1pBBa/GKpo+unHz5pXEIcpUpB7VzoMU4BL +66VSUOno44kVJHBdjsXBIGOSQeRQmthLdi0FpAfJ8IOrLKke1oJtdrED5q1wnD+x +8XkGUWVMJB6bQDP94dhU3jiVfxW34gVRWd/AuiaIO2fdqcKGrYIlRCEgN8bDxeul +ii8/CHsorz5Y7UNnPbXMQxY5lN6EgYKshNL2qAa9evNWyAinfd8zwFwd9Os9k93z +t8FSBIShiQIcBBABAgAGBQJKcbufAAoJEDkUtTL0376ZKjMP/2uRpuIcnTMq+3s0 +A0X121c+uzeMmQ73WvbynjASL6nodxatFHKHPUkKVfL80KBPqYCo6SLIStV2jR3v +hPQKtqC9LgOgqErMroe87yvqKsDSSz8t/LgT9chEMi6spGx3Ya3Ebw87q6yunJa8 +NANnF3NNwfXSkiNcvB9HvrQ5y6ohijFoyKZJrPxQRh0QoOx88UgA3jOx0dP4XpFF +g1UOQM92xJHiXljYiFtcMQ5dvCjTy/uY0OEVwGgTFnJ9XxSnIDsWoR5YLHZgDUOB +VU/k0Jl8NgHP6OiFv28pHlsmtAgLpnwmvRjFka4BEsxinMRKC3b6OWpm0QsrbPYs +ngblPEJZOSZXnTnBlNVLR6dEh3WZkcAVru+S2tmk3iMh6TYrX786ECsQ4/xi9T4j +tQQSh0gYG8iQfidmGn0YjXoVsxr7uKW8Qcm777xFeWx+54BmTl8q+6JNDs4fCZ7d +cZD2sw2NivXoha/Jcm42Of1t33Q9gyF2gn924/5KdGFOMz/orZItRbdKH7gAYkvg +z4fF10/GAyD/L4AEOW0jagY0numofAp4lu366V/xXcoWpkOyEkhagsjbn3JeGyjn +c7xvqRG97U8bCpLmipQQKqdvqyfHVTBuzf6W2UTIVKI4R8T/dvow/WL91b17bwey +ldvDiJjBNmiB97ahvO/Q4Ry7JT5RiQIcBBABAgAGBQJKdK/rAAoJELkRIFNthRKN +tloP+wf4gQ5jBEcuB9FnKR8td/fHQh9Vn0MiSdFbxn9Sf5UMVjhUBM8T/5zMghN7 +rilrGOQbDHm5+T01NQyw5PSkRnhJagfpJKjtUCAC4sCeZyajdFgicKI4R9k7d6aS +2BE10Lq3WtQ3dCCo0PJcgrlg3p1l/+lGiLL9MkZh9yNVc4/89z2KfAwSkGyWYRLx +MmPSInRPeDU8ckglIhtdTo1DRg7ALXmBEfotfkhHW8DhVtShsdwcQ+QLv/WuVN4F +QZz79h5fZjbWOhj3CS0RR3aFEFIPxdzYlN9NV8auErtsoohXJFf0z0bCOi5q2TgX +RRSt2xFqklQcT6ls5slD1L/zmop/TaHeEO1TJo/9p0UWkpbQH3kH7Moyz8ZsOy/6 +NToiAKTWoyH6h2oT87dwr0LgaMax1DaDwfsDdXby60o3VGL4QdSWx9NZJo3S6cVW +he3PzbyegFwKo65iXOAV5EwPx25RFpVcLO2QtEWew/LZtvhe3TWONS8LfCXQqj/c +ONxt3xtCNnV0mAmNaMgsqdC71D3xv1dKWF65dq0P1AK6f6tN1nh2TY4837zldAJO +QOi8nyUCO1+esuD/GSMHgmEajp/5BwXse0TJaGUopbKJnfQpHojVWgvh4P6k2ThZ +TqZ5libs3LMoICkB3UJXRiC0nmgNi2fuS2saYrYhEsQLgxNBiQIcBBABAgAGBQJK +dagdAAoJEIy/mjIoYaeQmOMP/iBHNcN4Yw09t/SzpDDWGmWL3SOnpdlGVGTi19SK +9bzXMzBLbuRilIGcFvNc4cReH3fakz1bAUZ1vtDs7hO+KV+Usd3IQhb0VKEZMctG +XEiW0ocC0ZSWx1+rbns4ueiM+uqbicE0U2VqzXDnlSLdCFCeHJDB30PO1LGSWV7O +q58E+UJpyRFnL3bIGzIP4wIZPy55Zx01vLUXlC5VELWr9vi07XSQyV4jyADbroRR +zaNTDqOgZOFaI0T1Qpwt1CTQN3PlY0PoPKPlOs8fRzTgFxAzv+1zi97yMhdUd5bw +oI6nOxCDsqss9YSCgJUmqJ+KLV6L5yPmRmtilv61vgwRYz+LgzQrzdtfErGPzzD1 +vYXJF6Z7rhu4muMj2BvDzG9+A07vr+xLxYQ3t6Vspfbq20wPZlR0KdsLPF6k94Fm +vjzjizuMtfJQsWrLB72FXL3WlEvdXdM0AZFyQ7ja6HqEqRj1PmdRz16psI3z0mGa +wkN1c35LwU7LJrj1z3cO5oiUl3wX2/y27M57HptMcyLT3wiVawl8AYNvD6lPP3gS +GrN6ys54iCk2+eus/nz0MV6+a/crISVxgHjwWQRceQVk5Sojk2JCcoyKuJX2oWxX +vaIH/rt9bQp1WIP1eaBoP+8Pdj74+9Ob1TR/SBsi+BHdT1k0EpOyKIJKw4lyDUbe +Aud5iQIcBBABAgAGBQJKdbMyAAoJEOrZN5nNXFYyGvsP/0VHZTVGt7XkT1TE+QBh +aKAq4JPFlruFmZ7l151Z1ACqqbiAS8ulct9qI8TRMa/Dxk26d3KCpD2mD10Fatcx +r3TNAf20JmooBzGvxeiaKa24O8IzCIjwh/HLORw59flOFu+TmvQG6s7tj/WWhxT1 +nlRzx+i8mWFFeNqYy5c4sB+oIGspDt9c6/IQIs6I6lG6CQZzjB084B2gi75q24NO +pF8I3HjgWK4F+EhUOTCf4GGvFU5OZDBKzQ0U1KVgKT66RyeWj/XMLLq8A3mFiy+E +6HhP3zmIg5oJLBm2qcSckfCylBs8thoEI6SOQtgBk2kBYNGicN08DS14tiO6a34P +ggYBwG9ye3Z3lF8gj++9fXhdNCbZ+jnszVjsBM6vrtQy1uCy9M3GX0X2DcXboqUO +wjJUFX1VbGSGwC2giVjc1FOpaL06e82q3SeU1D9eWlXA+QD0/onUr03m2DUFcy/J +8w0VP7yWiffvoPEtl+WDHXCtxdDq0GXyNgyB/bJxWehyoq2DWO/s0aI/wSXd3h+Y +w4Gao59ZDA9fcF9JSuwpM1jHDomyNEQds20bLvdOxVf/UuUon9gDDxAQd+Cil7wy +dSJWan3XDLYEPt951Jc8/hGW6z03e8XZe3WEo+FcVZfYXEajePLjHS2RpM7WuvuQ +XUMjLscWbp3EmBmrlGlN/zqQiQIcBBABAgAGBQJKdtAGAAoJEEe+WKJKPLhaKiQP +/RE4sUhiJWFesNGtDosneRXbQjwjBbY+0hCoofPqRi3Ilvru2h61uJtzWa3KNR22 +enAa6WeWVonzK0nRCuezexzjIHIYz8ehPaYgWo9EebvESF8c6MWbdo61/hNVecYE +TwlQqPFJqr+NsM15D2rFDziDQHjcfKF58mLyBsB3sKGpPh5RzebOuNvXnFusxRwJ +20gRCyNfR9f8jnL6WiBk3W41INKdFwI1JI9cVMEtfO+fnPvltMU1tQp75M/0Bm4G +jhGuUcVHDod74PsBZgq4mE4g29kzpIkmy3R8hv4zEXEM3/zmFS40hseI5QhWF/nn +OcIhh4p++KrNGAjfTmGS3x1F/X9el4MrFlkg4xyZC3EGFvimb9M+mDWjBnPvBMDp +SnMXOTWdTO9xlzt/emCpP5Ja0badLNb4hhCuMZAx/wkZWfrDs+WhQZFD0bKe2hMT +DBOujt9gy0rmvJUYcvxH3djTFJfWGwnctJafl1DfmOiESiBdIZYiWhJ1HmHgmef4 +KS2leKogh/ZHTMtsEVGBezsCYxmMI1vh3S40o8mLarFhfUhMwU/VcvWQVSn8DGNj +Eo+gcWKQM6XfNZQbrXDZrY/9fBqDhZP6cV4K4AzzjYC1pv7DmNoQjRqcyrVzIgvY +np3cXA4ybOXkq9joQpahufz+J7Gxz7C0fcvuo1uaeVIRiQIcBBABCAAGBQJKbIxm +AAoJED0Hh6qvbGHdG+gQAKdLJVUdbe6yVXUblRy0o9sNIpU+q67TGxrPx7/c/pOZ +kBRjqsSVpwlZcyyIiYlfl8IcjcS3Y3QWmkchoef8UaZ1ZrTuINQtn+fPly4+4ZjW +3Ch8ZeSVlaXIhT5zLT4X7n5ErrArKq5lLvE2DW+x6txvOanKe6R4EoP/h9+kJbsL +1vM52FlDJO+F75dsJIb2EP7wjZcR5/kDrIqe/AZodteb69ESgFDnOC/nx5U3pZJN +bqT8xpRQyiKxw48LBurp1zq/Y3dBbt/HRS/Uf9ndHCxvP5lOY1zoMJS3pnPstyAX +2K8NOPvjDXV1EcKNX2x+Zj2v1HEi/X4wmlt5n1oB/GfEFObe5TT3W2LjxONKL+xw +0oeviXkO7FvYHqH6PCh3qeReAtBfS9rhrJHzNYpA1WRSUasgQorHeTWzNPvCUr8r +8cV6GjNMgkL9eE9TVgF2jcyjFTAHE+E9DQGDr326jqci0EcCXZ3pr6Xi6oiH6bco ++wani9mdIur1Vt6bXmF/96B+eIVwVtW4Tv+/dUHAHayMLRKvzWDnQYrCImEh2bsp +Z8kt+CttuAo496DTw2r/wlHnBuzD5rrL86PiagBKkCuNe6pJOAe3RxFsEPCumtBD +aYDNpDnjOurJx+ivXZs8WyT2iVeDsXT08iOVeRuN7MMWWbYh75wlyH+I8WN9+z6P +iQIcBBABCAAGBQJKcDAPAAoJEAai3oXTLR+pHFEP+wezv8R5BDt7Xzme3hfEvdjU +KxwTY1MRDWdwu5oPs9EWyTpMoRyh/xj61ZoKYLTzgtKBzTqXzOHz2CAs68M4gNe8 ++zlx3OTEDRkq1E4vAzO4Q3K8p5A5/qzxKKeKrTEnTp/9Mlv5PDJrlJH+VyRXA6MP +H7JOZyBiUNleqXGMdS8oP+CRpodibJN/JGEijz6EoGYdF+mM3BEBIkY1o+nrCu0M +BKy1G/UCxQUK4On8ZFTIMrOkPK/qc+k6+0/FyZA34L6fM5dS9YmoyL6K+OYhQPdw +rnuYTkCdaC6xL0Sneul1cxIAiPWjxVTsTqHQFRGngE6mGENSYuBTheHO1FLyWg4K +q048JlG0tGh8OBc1dRWlcUSDO0gLxO9RlWQLoozX7AbUEbv+HRVprA58O2FPTB8X +i0m8/oS1Zhgz3H+ym27Vcb3y/t3/33xhs3c+oHob6wJdntrXIr0YTkcy7d3sgqlM +uFXKFRckOGK5Q2m/T+OWnYfZ+joQrTvk9iVsrpC/OtMq++73/QRITibtKIIrB96B +ZroCxcQGdGz0cvSlJqtQFuvXiIHinAKmBHs938n6pLrcpAE2VWrIB/O7BG/HLeYX +w+Gb+eLWnHS/TtlQM6TmgshSiUdROqug7x/UTnKWAh9JdHFL7sQXSR/9pGBK/HdT +wm/Vf94oU9kI4Iqq5MphiQIcBBABCAAGBQJKcJNQAAoJEFdZ81ABqkpkK9UQANEP +OJQswVJ5xtfqI0piNl764GoR13N0/gVevbyZT7bJlf3tb1Bg7hAzgSUA9sxxgAGV +PdNRzX0+7E32YSUTUmL1laY518Ne0j2fBqOOsOEbN/Z7fjldx4jrGLlh7sXtzIf5 +DH1iOlPU8Z5lY8BX1jpzdIbkb/Fh6wrI/7Tdspsr6fEo/bRyiDYhh2SymEeZkv7B +VlWPCc/dQUHIrXJ6Lweh1nqxHlbXO05zqeM5eehSHPN0O6lq4eocJD0gPo76vi1K +KbNVhgdZKGZgNe1pJOyLvFTJSTM0fCucb5xo457EnUNerg2A7cV0MoKH0Sd6hUcL +4haGEQFfnmV38q3z5/WyYfMbHwrtKbvj8/f4Gh4LLv3nBdASqc1AN7+bQgkKPOXc +GJDBT0S4CSFnKjDAXerF2ZXTwJRCFBCR1i5bR5h/Ad+EowPzdPWrL66Xs0SiCy+5 +yGZujMZn726nti4qO6DJXbN2oeAuDuxSLpAWkDfkD7GFxXHTy788PYgUDIXa5yf8 +zM7miKwsKdTtJaTxfpfJfkoHHxam7ldZYmrBSL12Ac1/I4Z46NC0HovEoebxW7if +ol9L7OGTYDR0nBFxhCDMwTKYaej2C3oS4hjHqBGt9DTyV4vCkVYNka2Ivy7xxA1+ +l0LeapfY40fp5jL7RMb+PHyhWaUGgkC1HX+8SEi/iQIcBBABCAAGBQJKdY7OAAoJ +ELNGT4lqoVlI8yEQAInHPbt6kUQtBLoTMkBzLc7hzini4FzzCH5ZKQH0qYNPlZA1 +xbmgI/CsGGUSPaDtVarziXynNLPQ5tmNMKML8hrY0/7m4F+dn27zBNET4STNntbB +iVngGtEOdc8JaFK0RFbAmzw0A/59DpQ/axZ/X6yO90Y90YEzLOsqGHBFX97I28QA +yxO7ajyibpTLdgBRGip0V60qrBKl8rXjNyCJBwOgEaAOzTQXBR1WMZr6pHdcBnUX +67Mb2LHuhKysmPE+7ZZZVZGLOjXLq1pv7iUNorkPcSAHSiiTvgVDLPsVmZ4NY87M +JI3vC60EXeHut+qpKFoiZCQHJhXaQNknmo8Pb16uv8akrBQVcuKQxLFQ08B3jfwc +7wPpSKiQsmysX2gPEmhvMM0JbMyryOGwVQ4+NuQx/tYLf18P5AsKQqo5UEs+iDpZ +5eVh6OllhCI+/JZVikN1eQkUIldXHFGipKREh1WX+uLNpgeSh/sv9xm6EqZtVANo +SV7fjMHZ4kW9qH4q4hDtm+zOFwPtEjWRtsL0DyhDdE1sJBeOgYE2lWoy3xbOBdYB +8XjXp0X+k7qw2iHkCzoFd8lZm8tDiVSDFH3+XUp+3VXI9vDt3aFMm2hyaVOW1qBA +gmu3h3UNr+qDJhgEYqlYqafltNmdOhhs6OIC9iyIORHqgEzfkk/KAHzpbplRiQIc +BBABCAAGBQJKefKUAAoJEIcvcCxNbiWo7HUP/24EwvyNMqbWEii5id/M+X25FdXR +IOTzV5GnW6oByTdTAhg3Ht/cXCs52cmHTNVhiFjrmCnM3YXcUsbrsviDi+dJYYop +OOQo7ohjglABGeoQHARZMn9PuR19J73VfVWAzCTIgQUVZDR/PyWxVvv3b1NChU2O +2RTPtOdpg8psOD9VSD8POzPVrEFFkfEE8jiu8SJeWUIq4+LgwK8p5YJqBCUlOupi +r/GKacWHkgW2I2C5HghXxi1XWJQXU3+otOBesctqLTAf1nsGoADGFBEZWXohxuX6 +OuLr+NYBKeCoPLXqMZX+QYoJDkkgy4uiO/6e+61MspNmZrfkDkpHQhj6V1V/KnOn +4qp9FMJiFoSb7g47IvtT3xpLfpyfSRAYkPC0452/hG/+GTFGbN3KVlo2bX9lAkTa +T3U8Qpbt+qXmRxtCWtXgxlh9oLa6SNQQn5+3TA/WH6jUdIJBlUjfbZzyDjjgA4y1 +nIWs9gydUy0l36F3BUI3wRR26anOOx1GpLCJgrJ5Rl0JgOpsuiqAmDuGcn+K8wx3 +8hWNn4lDjVie/D8eFtV9MhpX5njvgd4AZ/1tKK6SGyWXzzmHCb9CPAPXqOeX6+04 +8IGPjtk8icNzFTMk3g3q1Y4QskCCd8Y5EpH5LhJkipbj6mCybK4lbJFmPGuk/Weg +nQovgMDD4Hpn83o7iQIcBBABCAAGBQJKfTZTAAoJEEnDv4knVT0uSbsQAKj//GAj +B/DssK2FwfqOxu/X7OA8tJekcjUk9k/X6k6bs8TA+jk10/UJsishq4YSp9UYPrNt +dnKmRPCrwOO2XQ+7VLe1Ec4z3KeZYxOxzTuSDvf8Ft4OjJQ1ExYPpP3QI//ysZqR +NI0vv3u8FMVkN9DJIws453OXF4bsaCyoR2B3sJK/2HVqZuNeaFICzyf8zdm4qaVM +0yy70g86TIaJTmB1RfQNGBkGBjzk9iLwTfmLsup48Imn92VNCRTprdxDY2f/jdHv +FEacfp6rbolqJwDi1jpEnQsUHPvFtLI2cG9HLaEQ0xxXXrlRJ1YMIp7Z34At7HcP +tyif9+SoI+DlQEzgc5s8Wg8zOMzI1qsGmwMS77JI8x68eqE/hBDG5LmAVbDF62gc +d27Z6WDWkEby2SiyoBa1CaApdUMxjsaS61kHuOV6t5oq0Byt4/r4HAfUjIS8qpuR +509oOHJXHpg+VUyi+cnm52HaVF69dm2QS48qhlJtlLeJOvQVr1y0PwiH0Fyyrs+1 +KD+vcxVWpbrU3ADmCkKgR+NFBy9RFeuLOXENdWDUlCQz9AQPOj0+CXYaTVZ8p31b +omX9cJ8yXA1AbJfvItljRvWYWBNpI/k/vjjnS0gNq0nzPS/H0DCFcJzRCyT0UWNc +gt+HjHIKWdVunFMhtNtg0FbREwY1YKBKElCbiQIcBBABCgAGBQJKdfLrAAoJEIy/ +mjIoYaeQkqMQAJMzAfItsSXhG9G5MJZwkLnh5WQfqisY28/T0rzOnzBaR78Z+QEQ +65SwMdoxaCeIR0xoASJeLan3Dl1oXmCM9OxEYWgtg6cd6uo8NyMhWBUAQeulbJtv +MgHxU6r3QgzAbfib/2ZNifJd92PBVjo9xVKaWH/6LdW4IgfNQL7TnmoCTwtMm5Bm +kgzYVNUXXS4XPgno2gKQJoZMy9Mu0xIDpgmK6zqtjKzs3Gih7DqUcQ6mgo9BDv5G +NDoZzFfImPDb/JYzZvvVO4ypPHOEmFkR3+Fs9pDgc497ybPKw806e8R+I5pep+DB +7bchr9y/p+K/86ZPTuy33HyyE3YTREKqin7PIfE+FjTutjQ6fjxQaGw6AQmQMZ4V +vHXEtiaVU1dcNK5ZDsYn8WuUvJqQHBkCsY90hwZQEZB/Ftgk2tBmI7l0OnuhiCp+ +UeD1VV/9y9n215ID3honqnq+3ayjK+Gc+wppnnjaTv6j7bnaEhODio8tKBooiHnt +TYqfrmV17bWVyI90THJC5eq71TTvXFz3mBOIlAWLwWCKdRP7cNERPWRmTZROUHPy +Lk3q7YyieYGfuYHTw31DkNhDgbUyJ6vjo41c5Jh5hoXEBYBOEXWuWCkjOaXFnPtk +LzH/xGTjW7611RJjMAXQzk+95sja4eAPw8kMOBQFKbu7EZVFAidOY4LsiQIcBBAB +CgAGBQJKfKf5AAoJEDkUtTL0376ZucAP/1HV3xpr0aV+ml7soW/zjcmAOx7Xk++h +bUUEQ9ua05Ml/wlxUAyEBr2OcyUEy5nPRysRB45CofhHKo6G3khJncHIi3NwGgjF +gsUcpGQPRbucH93InHYQBUkIqC2bgT7/761SKHLWkW1NpufhDey6nLn8dG5HA5z7 +XH09Z5Pj/UtaCd01anycvnaROPH35Obla5XlGQddA9tsG7Gb6JHLhtSxjGox5ZBu +EOO8m2q8sEyEEwiMf21a4bsc42uTsT/YZATvO9GQZhTww4/FUGvxmzYWxqgt0lV2 +CwyX2DdsoTk/HXxL04f43MsUr861M9qZhVaC/iO/UqRWhDMaqOROcebSDkxOfXtc +yWrcvHgIMiMJxbbmSv5OIDMjaj2HVAS9rpksT1BVIXlKWm4tNMUxGb7rqmHDaEJ1 +bXSClfutSlLllxJR43zZh2J3wXoJcivKcaaRKeTywc0tjbYp/KGsgjAEJOFzaSHm +mDEVovXg+wpQWyzRKWoCF3de8wLsYBtiGLcpuik26RUHOH8yY8pZScTtmPi3+kyK +61clbXkXOMCEwT2EBYvutNvKi+E5nSflQtICogndBnvc3auwCcdWZ2L4lK3ErJ3z +KLUSXX5yvpr5EOPwxXzzc9HVXZr6fqU2h7Gno1s2MpawcnYYbcK+39msGHxsp9j7 +5g84jmvTFaWbiQIcBBABCgAGBQJKghA1AAoJEBNunPF7XTQt7G4P/0xPSNR6Lo+p +PGNiGRJxdjizyW0VV7D804yNuwdCBpIaYaJbZfq1vuFd3P+H+jMiV4o7esvkBBT7 +1B5MuApTcdfrkkY/avu8xPCnvVGo97SYBF530J/XB79SvRDWQtI2oIQ3tBOneEOX +4mtfiG5cyNO1I6UZ5bZw0MNVo8z0pv+YOlRwXOUEwyyiQB59Jq7ZD+Ab2TPkYkPr +do6isOxCv9TaRCPUsRp3nJIs023LvSFGL/3QVrmzbb1+B6yR8d9Pf4w1/j0g8u1F +UmxXcw6mcHqdeqr4T8+b/an9CLJYoe43PutjuYi3W9J/1eZzq5fFM1lbhXiXmw6i +oBOfpr0FaolzYeMLSnK60q4UI/LmYDglmsOvggz2VbfQuo9K2fJ0+8l+SMcevMNU +n8hVoP59ZOQkLV83PMvp+KtFVNOvcO10b5RhRLBpJODyudgIpXYP/fX5zGs2WcJB ++GHhYI91QGmZ16aT4uS5c7BhmMYMTErX7GbSsN1i+lyxb6caF+SqUIcm9rRdpWWM +V46UkdnBzGqJGWWZxrbxJ2eb8N9FqYHFUEqTbxHWbgercnuKtHqVEz+77hgRPtPv +uKlgTRRC7Xk3HeZnCymNkV5z3u4kFhc+7oLfGztJOhy+3FKbuNdIwajRuHQq63kE +FfIDmUPN/vWV5ro8/gXx8mQ1w4iSR1sViQIcBBIBCAAGBQJKd0JcAAoJECg2gbpv +5/QdY3MP+gMqBG69eg/CHgwjCSS7a/BnD/bWbq6Dzw3FnFNKDIiV68Y4CEHdTdfd +mm+qrI94mtXmp9TnHVaePrlnwFlhf9HJE37HB7kt/x2Whxm+sMdiaWIhADp+NB/i +bJGtEDRAdks6WXpuOV2i5bul+vt8iffLUcnHkS6yGZKl3ElDHCLniTNiWUqtAoJu +ydMBtmwTOwOsN+tWHf3q4ZfO3TeqxmDd/O51K8tGZKpqf4E2dzO9D3Pq/TeApYiZ +xnJckihoDb6pHrzOMyLJ/ie9lubUn04IJ60l8XGVTvM4I0dA8Gp8f+AADxRfoR0f +lMRBF28WpJTBjx8RbJLsMBxdtz0/2eH9Uji4mUUTWnpc3dQgKOhXBSHkADC/5cYw +ZXFk3colXOHVRVdjAj4tqqm1kL408c6fIuZkbR/bPYAAUNtPTtFgJP6n8mpmh9z+ +CKRoNGXU1d7KGqQwb5xsCt58m1sq4s+gk0YKSyTfL7vPEaPOz2XzOqoDgqxvbhwa +8XCgEvnTXg5m0cPEkS34UQPtLh+CkxTzvsBm/bk3kdBTlObbHONHSzuY7F7gtMuj +VYXEhuVXNiX9saSKjIJw3l0tB/o6STcCtNfhuQOo+x8om9NbJcWrnpa6fPVo/vxX +Uu6z+AGYaf1TJpZWdEYAqbdxw1kspZUtQ71MTHWzwm7c+lzJazMuiQIcBBMBCAAG +BQJKcJTCAAoJEFh5eVc0QmhOJXQQAMFSjStmoF/EZIw0w6rYf3pt4UTH1xWzPWF4 +TGsb3vGX1p2uhGXtkwkGlznLh9aqj9jGvl/2BOHoPak1WpHnLyY+S+l5aBWHEtiD +vQSvQPYvs3SP0mQpw3G6py/tEqRji5OX3tc5JW7LufEIyHa7vWbr48DZvTJ4vDSY +8+6rNo549X0SSGULD5U6JZ4Ctrco0zrTM6oJNGaGG0kqJDyoD9lDuXKJWLCUNzuM +946F6zB/owEJ4c3r4IjiI0lCJhCCofRk0YXLaRGMCp9fzS/Hhf7qDCs23JZ1eOe7 +X+UxKMgDILFjlvvFvT8YdF2jj0dOON+nvWK/VuzeFENhZfAxMgVrrpt3TAvDGhCQ ++/IHqJVTd+kz4W4hiRG4xNU1tu4dUvfG2ie+uKrC521h+j7xwyoVy4sPbM2zCpiJ +A0c3r7yL+1Jin927OBs70csHHLajnDBLV/bJJudHMKfoPd/hz7zjeI5G8yq4Z2kl +JCLlV6dVKM47z6e4WOGW+Ix8JN9LXNEfdkrsasofcbbOZ+Ioki7yacBiHTm+myY9 +PFBBg4IcmtmXTY559rcE32Fc1sbX6ZT2UYWF0VHGwOAZDxVS6kVXNyuFrHSwv1Mo +B8Bbbos3/wPUC22rNnj1bMxOYVU4O8LSVWaWejfscP68dBuM3e2zUJro3N+F/zP/ +Zb9iD+HDiQIgBBABCAAKBQJKd3KkAwUBPAAKCRAsfDFGwaABITVsD/oDS9T8VyUW +S9ApEymuAOM1AdeV/kCqwkecEtVfyo7sFV2MGMz6Bk9i/TjcYTyyWx3bZgfV7e95 +Udb8MTX7WsEP5H2EQOGjIhoHIAc28ivOzHlVfw1nmpsm37tIH6kcedrtTRvUsOt0 +BuPaMakrKpBlDuMqXa0ff64ihRAUEJw7fiOLgtBH52y5NbpsUuzdsO7/54jap3Hu +Q2bB7JwWPaP5hdxNtif08LsKcDs+GNY6bx6HIeNjfvwthb5q9k7p6UL8RCgpjS2A +pPhwoOUyEIfI74cPsuzt/VC0I3jv1ypVOVnoAn+TXqEhFo4YODKMmtwGHvTZCJCN +/rl2S6IzgNURDQxZxIt2DkkFS+ZWya3U9OvoVMKmZVOpLiYSFkeBFE8fmwOx0MpT +jpaEyYzowKVUca+V4tgkD6LwWTBxAiNfR5ECKQsEdaUxz7wiMY/+QglA0RMoaIf3 +z8BZJoujQu+ZVCbj7ocojhDAXTNavJQWf+1ZlPSJd0MVuQ5EO2kp0x67acZFysjW +7oeR/O4shyCtrG3Z5Zvw77f1Qu9YFwTc3xkha/GELBKX38/NWVeApJhKmt40+039 +xQjC/ak8TMo7qy0ISoZcurpK856jMoiEJ/JZkCx/qAC9jqwphjh9ylrnFv3udfUO +fNLVzfM+3yZWJ6R6g7+dUg45pQhYhUC9W4kCOgQTAQgAJAIbAwIeAQIXgAULCQgH +AwUVCgkICwUWAgMBAAUCSgXPyQIZAQAKCRC5cr8+pK5Xo4lhD/44Kmk9X3G4wHQr +TwdXNEx/Fj1MYtTEl/2IPKXymUEVlf7D/pNMxr7K1xgagzW+/q7AjPj+bLdiyot2 +Fpn9TlNy2mwnO17fJOktBVrJhjx+5Zhy6QZwY9vz1QdMULKQce+IjvN+HMhi5RtF +aVFjzbrOCZrKq2li6pMaOMPGgYQ9NbVWrR6c2ehPdilAXWOnpdWZpuZUbpb2fwBZ +66PUKEESS+98bvlgNDwgWAdNhvbwaK6Q9ib8E9eh8BjFrBKKQeF6Hufyzna4TGaO +mwzmIjbFsg4dsJ1zgOGd+gxAV2kawIdU4Ipz0dauu6umZhBzJZni9D+z3aLU6bmW +15x3r6pqz/8N4V1Ha78pyxSOyMzemA4+O26LoTnW7BZgp5lP7nwBSuttCKSVml8d +6cNJTzsOQbu/WAP4NhVYSIEDIyiPsLYeswAYCDITVhkP+xRdZ+q11DlIgOsoc1DT +W9+WKedySEB/XeUB6UPJ4RJqakGNqxuJeoCJKWrkHptGfQWREP3uj041pR/FoDOs +hxNcQx5bYIVgrdQLb4snTU5ZxfWWd/Icqz278qhSawaDaf0jRwvwM+y0c6QikduV +wfhT+5fkFjQC730ufoe+M5BTL5oAnMNZyxeh6M1NFHHyQGzHkNWBuUmVRpFL6Ik3 +2Hf1KJm49QA9yzHtYQ0Nz0I1v/bN2bkCDQRKBc6ZARAAp5V1y9eVYbkApCmO9JSB +tRV1Pflj2HmzSYjuIwa3tkWMYLLQ5Tw5rEf5aPRAN77yCm224uEZVxhhAkG4PGlR +ydoptNk/eBC2tPhGGa8n18C0AxmE6QHo19jMv75fprf8ixOD74phbx8kh6eA3x4+ +AbC4BunAVzVVuzHNpNR67cD6Eor3gxcTV2/eIqkJ6FuaoZdiTBD1hBIzmPQ36d2s +czl/9n/FfOTQjoGpu/eEL3a00rAC72Fa38FyLHzA6/rJ7dh5FjMoR6+iDJiWS6Ir +J5vfQMX3d4+szwjcvQurOo862qpaN2QVrQWeQTOm8pAElOvjhLdgGZ/jPTCeAvq2 +Xwtyaohv9rru77fwkrlqKNAgCObFpGxI4IzvCOANJYJmN01jNkoav8R5GodpCBGo +EeKmLAvJ1O1kPSfvenQMEjgou0ZZJMpKJMQjRtOclNyQQjSHPlUbJfjBJRMRHHps +u/5QAIc6MVtSee7TALmvBpt2Fl9IqOKDn+eVqw6x0F5AUv2+zgYr8gkHkS8Kc79v +bHLKUgU6z52Zb1E2wqJ80nJ48h+IxwUO79LYNmHBn931zswS6x0iTWVhjzfMVp43 +w7Gi3+Rnn8k6H7at409YS6L1PcQUh+u1ak5TtrI1bA1BQK+IdH1+2yCkJLwv2ESc +w5tfy6wtXIiCDakDTwFPqbsAEQEAAYkCHwQYAQgACQUCSgXOmQIbDAAKCRC5cr8+ +pK5Xo2CKEACTZ7rFQ9E71lsjz28feFBCupswRNr859iUUEmthpuUV76sS8ZJ3WrE +zRtgDGcphoVNa0NVhCsjB1gCkZSFctrsrEib2D8TKeTpNCecOFzPTWWCK9+KznZo +OGinMhCz5szLtfMK3MqpQN57vzqrPsFcHDAq5mlvCxuF8RPpi91jowy5dfOeQD6J +J1vKMqY1vHdObkjMjXsPIXaR5PT9Ih08NiVCyvHULQsxbesWYOnSofqb+xL3o/4z +1Ey5XaYnKz8N2taMdGYNUt4i7W6/k5QD3zRgAPLn9YgQiOEx3E5lN56WCJIeJX9r +t5yTtIDtPOTcnJCLF/9D9GfaAsSzjUm/d7WcEQLJ+evtLmX5QAE0kyglyRzpbGab +OwX23pGLyZp7CdDl0iGRdMNhnyAtENfu2hAjEoNxG6MSX04niNwKIjA0sraDox99 +oYE1cm9EYq6S3J92xZd3JIU9UhpIAWbPymR1WxhzLd4OaFtSNzuweHin+YXve1HE +iXlevbdC0or5EJhMiPqcIRpGYaFa2OwTJ4sGt74jJwekqbF7KmAtLYUKTcxwnWPr +scI82YyfuSyf9TsmglhYSo6uNsGtLtsGY2l5qGKeREu6JwRAJomf8H+1oanCyk+J +zavT5Y5LA+Hwb9ddjC9U8kT/eaNzC0EEXaxTR8HQSOaUrXBwr6fp1A== +=oZKZ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/SPECS/libmd/libmd.spec b/SPECS/libmd/libmd.spec new file mode 100644 index 00000000..a18a5a14 --- /dev/null +++ b/SPECS/libmd/libmd.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libmd +Version: 1.1.0 +Release: %autorelease +Summary: Message digest functions from BSD systems +License: BSD-2-Clause OR BSD-3-Clause OR ISC OR SUSE-Public-Domain +URL: https://www.hadrons.org/software/libmd/ +#!RemoteAsset +Source0: https://archive.hadrons.org/software/libmd/libmd-%{version}.tar.xz +#!RemoteAsset +Source1: https://archive.hadrons.org/software/libmd/libmd-%{version}.tar.xz.asc +Source2: %{name}.keyring +BuildSystem: autotools +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules + +BuildRequires: pkgconfig + +%description +The libmd library provides a few message digest ("hash") functions, as +found on various BSDs on a library with the same name and with a compatible +API. + +%package devel +Summary: Provides message digest functions from BSD systems +Requires: %{name} = %{version} + +%description devel +The libmd library provides a few message digest ("hash") functions, as +found on various BSDs on a library with the same name and with a compatible +API. + +Digests supported: MD2/4/5, RIPEMD160, SHA1, SHA2-256/384/512. + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libmd.so.* + +%files devel +%license COPYING +%doc ChangeLog README +%{_includedir}/* +%{_libdir}/libmd.so +%{_libdir}/pkgconfig/libmd.pc +%{_mandir}/man3/*.3* +%{_mandir}/man7/libmd.7* + +%changelog +%{?autochangelog} diff --git a/SPECS/libmicrohttpd/libmicrohttpd.spec b/SPECS/libmicrohttpd/libmicrohttpd.spec new file mode 100644 index 00000000..0063b466 --- /dev/null +++ b/SPECS/libmicrohttpd/libmicrohttpd.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libmicrohttpd +Version: 1.0.2 +Release: %autorelease +Summary: Small Embeddable HTTP Server Library +License: LGPL-2.1-or-later AND GPL-3.0-or-later +URL: https://www.gnu.org/software/libmicrohttpd/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/libmicrohttpd/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --enable-bauth +BuildOption(conf): --enable-dauth +BuildOption(conf): --enable-epoll +BuildOption(conf): --enable-messages +BuildOption(conf): --enable-postprocessor +BuildOption(conf): --enable-https +BuildOption(conf): --enable-curl +BuildOption(conf): --disable-static +BuildOption(conf): --disable-examples + +BuildRequires: libtool texinfo pkgconfig >= 0.9.0 +BuildRequires: pkgconfig(gnutls) >= 2.8.6 +BuildRequires: pkgconfig(libcurl) >= 7.16.4 + +%description +GNU libmicrohttpd is a small C library that makes it easy to run an HTTP +server as part of another application. This package contains the runtime +shared libraries. + +%package devel +Summary: Development files for libmicrohttpd +License: LGPL-2.1-or-later +Requires: %{name} = %{version} +Requires: pkgconfig +Requires: pkgconfig(gnutls) + +%description devel +This package contains the header files, pkg-config files, documentation, +and other files needed to develop applications that use libmicrohttpd. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +rm -v %{buildroot}%{_infodir}/%{name}_performance_data.png + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libmicrohttpd.so.* + +%files devel +%doc ChangeLog +%{_includedir}/microhttpd.h +%{_libdir}/libmicrohttpd.so +%{_libdir}/pkgconfig/libmicrohttpd.pc +%{_infodir}/libmicrohttpd*.info* +%{_mandir}/man3/libmicrohttpd.* + +%changelog +%{?autochangelog} diff --git a/SPECS/libmnl/libmnl.spec b/SPECS/libmnl/libmnl.spec new file mode 100644 index 00000000..ac32c0f9 --- /dev/null +++ b/SPECS/libmnl/libmnl.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libmnl +Version: 1.0.5 +Release: %autorelease +Summary: A minimalistic user-space library oriented to netlink developers +License: LGPL-2.1-or-later +URL: https://netfilter.org/projects/libmnl +#!RemoteAsset +Source0: https://netfilter.org/projects/libmnl/files/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --with-doxygen=no + +BuildRequires: gcc + +%description +libmnl is a minimalistic user-space library oriented to Netlink developers. +It aims to provide simple helpers to avoid re-inventing the wheel when +dealing with Netlink headers and TLVs. + +%package devel +Summary: Development files for libmnl +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and examples for +developing applications that use libmnl. + + +%install -a +find %{buildroot} -name '*.la' -delete + +%ldconfig_scriptlets + +%files +%doc README +%license COPYING +%{_libdir}/*.so.* + +%files devel +%doc examples +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libmodulemd/libmodulemd.spec b/SPECS/libmodulemd/libmodulemd.spec new file mode 100644 index 00000000..061e24cd --- /dev/null +++ b/SPECS/libmodulemd/libmodulemd.spec @@ -0,0 +1,87 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libmodulemd +Version: 2.15.2 +Release: %autorelease +Summary: Module metadata manipulation library +# COPYING: MIT +## not in any binary package +# contrib/coverity-modeling.c: GPL-2.0-or-later +# contrib/release-tools/semver: GPL-3.0-only +# modulemd/tests/test_data/f29.yaml: Apache-2.0 +# modulemd/tests/test_data/f29-updates.yaml: Apache-2.0 +# xml_specs/reduced/tests/good/module_stream_build_license.xml: MIT AND GPL-3.0-or-later +License: MIT +SourceLicense: %{license} AND GPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND Apache-2.0 +URL: https://github.com/fedora-modularity/libmodulemd +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz +#!RemoteAsset +Source1: %{url}/releases/download/%{version}/modulemd-%{version}.tar.xz.asc +# Key exported from Petr Pisar's keyring +#Source2: gpgkey-E3F42FCE156830A80358E6E94FD1AEC3365AF7BF.gpg +BuildSystem: meson +BuildOption(conf): -Drpmio=enabled +BuildOption(conf): -Dskip_introspection=false +BuildOption(conf): -Dtest_installed_lib=false +BuildOption(conf): -Dwith_docs=false +BuildOption(conf): -Dwith_manpages=enabled + +#BuildRequires: gnupg2 +BuildRequires: meson +BuildRequires: gcc gcc-c++ +BuildRequires: pkgconfig(gobject-2.0) pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(yaml-0.1) +# doc gen tool is disabled to make this pkg usable ASAP +#BuildRequires: pkgconfig(gtk-doc) +#BuildRequires: glib2-doc +BuildRequires: rpm-devel +BuildRequires: python3-devel python3-pygobject + +%description +C library for manipulating module metadata files. +See https://github.com/fedora-modularity/libmodulemd/blob/main/README.md for +more details. + +%package -n python3-%{name} +Summary: Python 3 bindings for %{name} +Requires: %{name} = %{version}-%{release} +Requires: python%{python3_pkgversion}-pygobject +Requires: python3-six + +%description -n python3-%{name} +Python3 bindings for %{name}. + +%package devel +Summary: Development files for libmodulemd +Requires: libmodulemd + +%description devel +Development files for %{name}. + +%files +%license COPYING +%doc NEWS README.md +%{_bindir}/modulemd-validator +%{_mandir}/man1/modulemd-validator.1* +%{_libdir}/libmodulemd.so.2* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/Modulemd-2.0.typelib + +%files devel +%{_libdir}/libmodulemd.so +%{_libdir}/pkgconfig/modulemd-2.0.pc +%{_includedir}/modulemd-2.0/ +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/Modulemd-2.0.gir + +%files -n python3-%{name} +%{python3_sitearch}/gi/overrides/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libmspack/libmspack.spec b/SPECS/libmspack/libmspack.spec new file mode 100644 index 00000000..5996d139 --- /dev/null +++ b/SPECS/libmspack/libmspack.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libmspack +Version: 0.11 +Release: %autorelease +Summary: Library for Microsoft CAB file compression and decompression +License: LGPL-2.1-or-later +URL: http://www.cabextract.org.uk/libmspack/ +#!RemoteAsset +Source0: https://github.com/kyz/libmspack/archive/v%{version}alpha/libmspack-%{version}alpha.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --disable-static + +BuildOption(build): CFLAGS="%{optflags} -fno-strict-aliasing" -C libmspack +BuildOption(install): -C libmspack +BuildRequires: doxygen gcc autoconf automake libtool + +%description +libmspack is a library for compressing and decompressing Microsoft cabinet +(CAB) files and other related formats. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, documentation, and other files needed +to develop applications that use libmspack. + +%conf -p +cd libmspack +autoreconf -fi + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%{_libdir}/libmspack.so.* + +%files devel +%{_includedir}/mspack.h +%{_libdir}/libmspack.so +%{_libdir}/pkgconfig/libmspack.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libndp/libndp.spec b/SPECS/libndp/libndp.spec new file mode 100644 index 00000000..31176514 --- /dev/null +++ b/SPECS/libndp/libndp.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libndp +Version: 1.9 +Release: %autorelease +Summary: Library for Neighbor Discovery Protocol +License: LGPL-2.1-or-later +URL: http://libndp.org +VCS: git:https://github.com/jpirko/libndp +#!RemoteAsset +Source0: http://libndp.org/files/libndp-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(install): INSTALL="install -p" + +BuildRequires: make + +%description +This package contains a library which provides a wrapper +for IPv6 Neighbor Discovery Protocol. It also provides a tool +named ndptool for sending and receiving NDP messages. + +%package devel +Summary: Libraries and header files for libndp development +Requires: %{name} = %{version}-%{release} + +%description devel +The libndp-devel package contains the header files and libraries +necessary for developing programs using libndp. + +%install -a +find $RPM_BUILD_ROOT -name \*.la -delete + +%ldconfig_scriptlets + +%files +%doc COPYING +%{_libdir}/*so.* +%{_bindir}/ndptool +%{_mandir}/man8/ndptool.8* + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libnetfilter_conntrack/libnetfilter_conntrack.spec b/SPECS/libnetfilter_conntrack/libnetfilter_conntrack.spec new file mode 100644 index 00000000..2fd85497 --- /dev/null +++ b/SPECS/libnetfilter_conntrack/libnetfilter_conntrack.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnetfilter_conntrack +Version: 1.0.9 +Release: %autorelease +Summary: Netfilter conntrack userspace library +License: GPL-2.0-or-later +URL: https://netfilter.org/projects/libnetfilter_conntrack +VCS: git:https://git.netfilter.org/libnetfilter_conntrack +#!RemoteAsset +Source0: %{url}/files/%name-%version.tar.bz2 +#!RemoteAsset +Source1: %{url}/files/%name-%version.tar.bz2.sig +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-rpath + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libmnl) +BuildRequires: pkgconfig(libnfnetlink) + +%description +libnetfilter_conntrack is a userspace library providing a programming +interface (API) to the in-kernel connection tracking state table. + +%package devel +Summary: Netfilter conntrack userspace library +Requires: %{name} = %{version}-%{release} + +%description devel +libnetfilter_conntrack is a userspace library providing a programming +interface (API) to the in-kernel connection tracking state table. + +%conf -p +autoreconf -fiv + +%install -a +find $RPM_BUILD_ROOT -type f -name "*.la" -delete + +%files +%license COPYING +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%dir %{_includedir}/libnetfilter_conntrack +%{_includedir}/libnetfilter_conntrack/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libnetfilter_cthelper/libnetfilter_cthelper.spec b/SPECS/libnetfilter_cthelper/libnetfilter_cthelper.spec new file mode 100644 index 00000000..ad29659b --- /dev/null +++ b/SPECS/libnetfilter_cthelper/libnetfilter_cthelper.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnetfilter_cthelper +Version: 1.0.1 +Release: %autorelease +Summary: Library for the user-space conntrack helper infrastructure +License: GPL-2.0-only +URL: http://www.netfilter.org/projects/libnetfilter_cthelper/index.html +#!RemoteAsset +Source0: http://www.netfilter.org/projects/libnetfilter_cthelper/files/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: gcc make autoconf automake libtool +BuildRequires: libmnl-devel pkgconfig linux-headers + +%description +libnetfilter_cthelper is the userspace library that provides the programming +interface to the user-space helper infrastructure. With this library, +you can register, configure, enable and disable user-space helpers. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: libmnl-devel +Requires: linux-headers + +%description devel +This package contains libraries and header files for developing applications +that use the libnetfilter_cthelper library. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README +%{_libdir}/*.so.* + +%files devel +%doc examples +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%dir %{_includedir}/libnetfilter_cthelper +%{_includedir}/libnetfilter_cthelper/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libnetfilter_cttimeout/libnetfilter_cttimeout.spec b/SPECS/libnetfilter_cttimeout/libnetfilter_cttimeout.spec new file mode 100644 index 00000000..f61e1562 --- /dev/null +++ b/SPECS/libnetfilter_cttimeout/libnetfilter_cttimeout.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnetfilter_cttimeout +Version: 1.0.1 +Release: %autorelease +Summary: Netfilter/conntrack Timeout policy tuning +License: GPL-2.0-or-later +URL: http://netfilter.org +#!RemoteAsset +Source0: http://netfilter.org/projects/%{name}/files/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: libmnl-devel pkgconfig linux-headers gcc make + +%description +libnetfilter_cttimeout is the userspace library that provides the programming +interface to the fine-grain connection tracking timeout infrastructure. + +%package devel +Summary: Development files for the libnetfilter_cttimeout library +Requires: %{name} = %{version} +Requires: libmnl-devel +Requires: linux-headers + +%description devel +This package includes header files and libraries necessary for developing +applications that use the libnetfilter_cttimeout library. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%doc COPYING README +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%dir %{_includedir}/libnetfilter_cttimeout +%{_includedir}/libnetfilter_cttimeout/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libnetfilter_log/libnetfilter_log.spec b/SPECS/libnetfilter_log/libnetfilter_log.spec new file mode 100644 index 00000000..929e75b6 --- /dev/null +++ b/SPECS/libnetfilter_log/libnetfilter_log.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnetfilter_log +Version: 1.0.2 +Release: %autorelease +Summary: Netfilter logging userspace library +License: GPL-2.0-only +URL: http://netfilter.org +#!RemoteAsset +Source0: http://netfilter.org/projects/%{name}/files/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-rpath + +BuildRequires: gcc make autoconf automake libtool libmnl-devel +BuildRequires: libnfnetlink-devel pkgconfig linux-headers + +%description +libnetfilter_log is a userspace library providing an interface to packets +that have been logged by the kernel packet filter. It is part of a system +that deprecates the old syslog/dmesg based packet logging. + +%package devel +Summary: Development files for the Netfilter logging library +Requires: %{name} = %{version} +Requires: pkgconfig +Requires: linux-headers +Requires: libnfnetlink-devel + +%description devel +This package contains the header files and development library for +libnetfilter_log. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%dir %{_includedir}/%{name} +%{_includedir}/%{name}/*.h +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libnetfilter_queue/libnetfilter_queue.spec b/SPECS/libnetfilter_queue/libnetfilter_queue.spec new file mode 100644 index 00000000..e38521bd --- /dev/null +++ b/SPECS/libnetfilter_queue/libnetfilter_queue.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnetfilter_queue +Version: 1.0.5 +Release: %autorelease +Summary: Netfilter queue userspace library +License: GPL-2.0-only +URL: http://netfilter.org +#!RemoteAsset +Source0: https://netfilter.org/projects/%{name}/files/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: autoconf automake libtool pkgconfig linux-headers +BuildRequires: libnfnetlink-devel libmnl-devel +BuildRequires: make + +%description +libnetfilter_queue is a userspace library providing an API to packets +that have been queued by the kernel packet filter. It deprecates the +old ip_queue / libipq mechanism. + +%package devel +Summary: Development files for the libnetfilter_queue library +Requires: %{name} = %{version} +Requires: libnfnetlink-devel +Requires: linux-headers +Requires: pkgconfig + +%description devel +This package includes header files and libraries for developing applications +that use the libnetfilter_queue library. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/libnetfilter_queue/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libnfnetlink/libnfnetlink.spec b/SPECS/libnfnetlink/libnfnetlink.spec new file mode 100644 index 00000000..3a2701a9 --- /dev/null +++ b/SPECS/libnfnetlink/libnfnetlink.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnfnetlink +Version: 1.0.2 +Release: %autorelease +Summary: Netlink library for netfilter +License: GPL-2.0-or-later +URL: http://netfilter.org +#!RemoteAsset +Source0: http://netfilter.org/projects/libnfnetlink/files/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildRequires: linux-headers automake autoconf libtool pkgconfig +BuildRequires: make + +%description +libnfnetlink is the low-level library for netfilter related kernel/userspace +communication. It provides a generic messaging infrastructure for in-kernel +netfilter subsystems and their userspace management tools. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: linux-headers + +%description devel +This package contains libraries and header files for developing applications +that use the libnfnetlink library. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/%{name}/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libnfs/0001-libnfs-6.0.2-fix_gnutls_undefined_symbols.patch b/SPECS/libnfs/0001-libnfs-6.0.2-fix_gnutls_undefined_symbols.patch new file mode 100644 index 00000000..5d9cf52a --- /dev/null +++ b/SPECS/libnfs/0001-libnfs-6.0.2-fix_gnutls_undefined_symbols.patch @@ -0,0 +1,25 @@ +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 82376cb..33be5e4 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -48,5 +48,5 @@ libnfs_la_LIBADD = \ + + if HAVE_TLS + libnfs_la_CPPFLAGS += -I$(abs_top_srcdir)/tls +-libnfs_la_LIBADD += ../tls/libtls.la ++libnfs_la_LIBADD += ../tls/libtls.la -lgnutls + endif +diff --git a/utils/Makefile.am b/utils/Makefile.am +index bd584b8..2ae7636 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -16,9 +16,6 @@ AM_CPPFLAGS = \ + "-D_U_=__attribute__((unused))" + + COMMON_LIBS = ../lib/libnfs.la $(LIBSOCKET) +-if HAVE_TLS +-COMMON_LIBS += -lgnutls +-endif + + nfs_cat_LDADD = $(COMMON_LIBS) + nfs_ls_LDADD = $(COMMON_LIBS) diff --git a/SPECS/libnfs/0002-libnfs-6.0.2-fix_missing_include.patch b/SPECS/libnfs/0002-libnfs-6.0.2-fix_missing_include.patch new file mode 100644 index 00000000..df611093 --- /dev/null +++ b/SPECS/libnfs/0002-libnfs-6.0.2-fix_missing_include.patch @@ -0,0 +1,12 @@ +diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h +index 2bc0918..9ecf1f0 100755 +--- a/include/nfsc/libnfs.h ++++ b/include/nfsc/libnfs.h +@@ -27,6 +27,7 @@ + #include "ps2_compat.h" + #endif + ++#include + #include + #if !defined(_WIN32) + #include diff --git a/SPECS/libnfs/libnfs.spec b/SPECS/libnfs/libnfs.spec new file mode 100644 index 00000000..fcebd286 --- /dev/null +++ b/SPECS/libnfs/libnfs.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnfs +Version: 6.0.2 +Release: %autorelease +Summary: Client library for accessing NFS shares over a network +License: LGPL-2.1-or-later AND BSD-2-Clause AND GPL-3.0-or-later +URL: https://github.com/sahlberg/libnfs +#!RemoteAsset +Source: https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-%{version}.tar.gz +# https://github.com/sahlberg/libnfs/pull/518 +Patch0: 0001-libnfs-6.0.2-fix_gnutls_undefined_symbols.patch +# https://github.com/sahlberg/libnfs/commit/2cdfedaba379cbb512d3c203a1b9eae795f4fb23 +Patch1: 0002-libnfs-6.0.2-fix_missing_include.patch +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-examples +BuildOption(conf): --disable-werror +BuildOption(conf): --enable-pthread + +BuildRequires: automake gcc gnutls-devel krb5-devel libtool make + +%description +The libnfs package contains a library of functions for accessing NFSv2, +NFSv3, and NFSv4 servers from user space. + +%package devel +Summary: Development files for libnfs +License: LGPL-2.1-or-later AND BSD-2-Clause AND GPL-3.0-or-later +Requires: %{name} = %{version} + +%description devel +The libnfs-devel package contains libraries, header files, and examples +for developing applications that use libnfs. + +%prep -a +autoreconf -vif + +%build -p +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING LICENCE-*.txt +%doc README +%{_libdir}/libnfs.so.16* +%{_bindir}/nfs-* +%{_mandir}/man1/nfs-*.1* + +%files devel +%doc examples/*.c +%{_includedir}/nfsc/ +%{_libdir}/libnfs.so +%{_libdir}/pkgconfig/libnfs.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libnftnl/libnftnl.spec b/SPECS/libnftnl/libnftnl.spec new file mode 100644 index 00000000..48ad4e48 --- /dev/null +++ b/SPECS/libnftnl/libnftnl.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnftnl +Version: 1.3.0 +Release: %autorelease +Summary: Library for low-level interaction with nftables Netlink's API over libmnl +License: GPL-2.0-or-later +URL: https://netfilter.org/projects/libnftnl/ +VCS: git:https://git.netfilter.org/libnftnl +#!RemoteAsset +Source0: %{url}/files/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: %{url}/files/%{name}-%{version}.tar.xz.sig +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules + +BuildRequires: libmnl-devel +BuildRequires: make + +%description +A library for low-level interaction with nftables Netlink's API over libmnl. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%install -a +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + +%files +%doc COPYING +%{_libdir}/*.so.* + +%files devel +%{_libdir}/libnft*.so +%{_libdir}/pkgconfig/libnftnl.pc +%{_includedir}/libnftnl + +%changelog +%{?autochangelog} diff --git a/SPECS/libnl/libnl.spec b/SPECS/libnl/libnl.spec new file mode 100644 index 00000000..79f63a8d --- /dev/null +++ b/SPECS/libnl/libnl.spec @@ -0,0 +1,109 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond python 0 + +Name: libnl +Version: 3.11.0 +Release: %autorelease +Summary: A suite of libraries for interacting with Linux Netlink sockets +License: LGPL-2.1-only +URL: https://github.com/thom311/libnl +#!RemoteAsset +Source0: https://github.com/thom311/libnl/archive/refs/tags/%{name}3_11_0.tar.gz#/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: gcc +BuildRequires: flex +BuildRequires: bison +BuildRequires: libtool +%if %{with python} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: swig +%endif + +%description +The libnl suite is a collection of libraries providing APIs to the Netlink +protocol, which is the primary IPC mechanism for interacting with the Linux +kernel networking subsystems. This package contains all the runtime libraries. + +%package cli +Summary: Command-line interface utilities for libnl +Requires: %{name}%{?_isa} = %{version}-%{release} +%description cli +This package provides command-line utilities (like nl-link-list, nl-route-list) +and their specific support libraries for inspecting and manipulating Netlink +from the shell. + +%if %{with python} +%package -n python3-%{name} +Summary: Python 3 bindings for libnl +Requires: %{name}%{?_isa} = %{version}-%{release} +%description -n python3-%{name} +This package contains the Python 3 bindings for the libnl3 library suite. +%endif + +%package devel +Summary: Development files for the libnl library suite +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-cli%{?_isa} = %{version}-%{release} +%description devel +This package provides all the header files, pkg-config files, and unversioned +libraries needed to develop applications that use the libnl suite. + +%conf -p +autoreconf -fiv + +%build -a +%if %{with python} +pushd python +%pyproject_wheel +popd +%endif + +%install -a +%if %{with python} +pushd python +%pyproject_install +popd +%endif +find %{buildroot} -type f -name "*.la" -delete + +%ldconfig_scriptlets +%ldconfig_scriptlets cli + +%files +%license COPYING +# The main package owns all non-cli libraries. +%exclude %{_libdir}/libnl-cli-3.so.* +%{_libdir}/libnl-*.so.* + +%files cli +%config(noreplace) %{_sysconfdir}/libnl/ +%dir %{_libdir}/libnl/ +%{_libdir}/libnl/cli +%{_libdir}/libnl-cli-3.so.* +%{_bindir}/* +%{_mandir}/man8/* + +%if %{with python} +%files -n python3-%{name} +%{python3_sitearch}/netlink/ +%{python3_sitearch}/netlink-*.dist-info +%endif + +%files devel +%{_includedir}/libnl3/ +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} + diff --git a/SPECS/libnsl/libnsl.spec b/SPECS/libnsl/libnsl.spec new file mode 100644 index 00000000..f749cf32 --- /dev/null +++ b/SPECS/libnsl/libnsl.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libnsl +Version: 2.0.1 +Release: %autorelease +Summary: Public client interface library for NIS(YP) and NIS+ +License: BSD-3-Clause AND LGPL-2.1-or-later +URL: https://github.com/thkukuk/libnsl +#!RemoteAsset +Source0: %{url}/archive/v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig(libtirpc) + +%description +This package contains the libnsl library. This library contains +the public client interface for NIS(YP) and NIS+. +This code was formerly part of glibc, but is now standalone to +be able to link against TI-RPC for IPv6 support. + +%package devel +Summary: Development files for libnsl +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for libnsl2 + +%conf -p +autoreconf -fiv + +%install -a +rm %{buildroot}%{_libdir}/%{name}.la + +%files +%license COPYING +%{_libdir}/libnsl.so.* + +%files devel +%{_libdir}/libnsl.so +%{_includedir}/* +%{_libdir}/pkgconfig/libnsl.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libp11/libp11.spec b/SPECS/libp11/libp11.spec new file mode 100644 index 00000000..17a25044 --- /dev/null +++ b/SPECS/libp11/libp11.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libp11 +Version: 0.4.13 +Release: %autorelease +Summary: Library Implementing a Small Layer on Top of PKCS#11 API +License: LGPL-2.1-or-later AND BSD-2-Clause AND OpenSSL +URL: https://github.com/OpenSC/libp11 +#!RemoteAsset +Source0: %{url}/releases/download/libp11-%{version}/libp11-%{version}.tar.gz +#!RemoteAsset +Source1: %{url}/releases/download/libp11-%{version}/libp11-%{version}.tar.gz.asc +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(zlib) + +%description +Libp11 is a library implementing a small layer on top of PKCS#11 API to +make using PKCS#11 implementations easier. + +The official name for PKCS#11 is "RSA Security Inc. PKCS #11 +Cryptographic Token Interface (Cryptoki)". + +Libp11 source code includes the official header files (version 2.20) +and thus is "derived from the RSA Security Inc. PKCS #11 Cryptographic +Token Interface (Cryptoki)". + +%package devel +Summary: Files for developing with libp11 +Requires: %{name} = %{version}-%{release} +Requires: openssl-devel + +%description devel +This devel package contains libraries and header files for +developing applications that use libp11. + +%conf -p +autoreconf -fvi + +%install -a +# Remove .la files +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc NEWS +%{_libdir}/libp11.so.* +%{_libdir}/libpkcs11.so.* + +%files devel +%doc %{_docdir}/libp11 +%{_libdir}/libp11.so +%{_libdir}/libpkcs11.so +%{_libdir}/engines-3/libpkcs11.so +%{_libdir}/engines-3/pkcs11.so +%{_libdir}/pkgconfig/libp11.pc +%{_includedir}/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libpaper/libpaper.spec b/SPECS/libpaper/libpaper.spec new file mode 100644 index 00000000..035f3d7b --- /dev/null +++ b/SPECS/libpaper/libpaper.spec @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libpaper +Version: 2.2.6 +Release: %autorelease +Summary: Library and tools for handling papersize +License: LGPL-2.1-or-later AND LicenseRef-openRuyi-Public-Domain AND GPL-3.0-or-later AND LGPL-2.0-or-later AND FSFAP +URL: https://github.com/rrthomas/libpaper/ +#!RemoteAsset +Source0: https://github.com/rrthomas/libpaper/releases/download/v%{version}/libpaper-%{version}.tar.gz +# Pulled from paper +Source1: localepaper.c +# from libpaper-1.x +Source2: paperconf +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: libtool +BuildRequires: gettext +BuildRequires: gawk +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: help2man +BuildRequires: tar +BuildRequires: perl +BuildRequires: gzip + +Provides: bundled(gnulib) + +%description +The libpaper package enables users to indicate their preferred paper +size and specifies system-wide and per-user paper size catalogues, which can +also be used directly (see paperspecs(5)). + +%package devel +Summary: Headers/Libraries for developing programs that use libpaper +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains headers and libraries that programmers will need +to develop applications which use libpaper. + +%package -n paper +Summary: Print paper size information +Requires: %{name} = %{version}-%{release} +License: GPL-3.0-or-later AND FSFAP AND GPL-2.0-only + +%description -n paper +The paper(1) utility can be used to find the user's preferred +default paper size and give information about known sizes. + +%prep -a +cp %{SOURCE1} src/ + +%build -a +# localepaper +pushd src +%{__cc} %{optflags} -I.. -Ilibgnu -o localepaper localepaper.c libgnu/.libs/libgnupaper.a +popd + +%install -a +rm -rf %{buildroot}%{_datadir}/doc/libpaper/README.md +rm $RPM_BUILD_ROOT%{_libdir}/*.la +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} + +mkdir %{buildroot}%{_libexecdir} +install -m0755 src/localepaper %{buildroot}%{_libexecdir} + +gzip -c %{SOURCE2} > paperconf.1.gz +install -m0644 paperconf.1.gz %{buildroot}%{_mandir}/man1/paperconf.1 + +%ldconfig_scriptlets + +%files +%doc ChangeLog README +%license COPYING +%config(noreplace) %{_sysconfdir}/paperspecs +%{_libdir}/libpaper.so.2* + +%files devel +%{_includedir}/paper.h +%{_libdir}/libpaper.so + +%files -n paper +%{_bindir}/paper +%{_bindir}/paperconf +%{_libexecdir}/localepaper +%{_mandir}/man1/paper.* +%{_mandir}/man1/paperconf.* +%{_mandir}/man5/paperspecs.* + +%changelog +%{?autochangelog} diff --git a/SPECS/libpaper/localepaper.c b/SPECS/libpaper/localepaper.c new file mode 100644 index 00000000..78404a37 --- /dev/null +++ b/SPECS/libpaper/localepaper.c @@ -0,0 +1,44 @@ +/* + * localepaper: print the dimensions in mm of the current locale's + * paper size, if possible. + * + * Based on a patch by Caolan McNamara: + * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481213 + * + * Copyright (C) Reuben Thomas , 2013. + * + * Copying and distribution of this file, with or without modification, + * are permitted in any medium without royalty provided the copyright + * notice and this notice are preserved. + */ + +#include + +#include +#include +#include +#if defined LC_PAPER && defined _GNU_SOURCE +#include +#endif + +#include "progname.h" + +int main(int argc, char *argv[]) +{ + set_program_name(argv[0]); + argc = argc; /* Avoid a compiler warning. */ + +#if defined LC_PAPER && defined _GNU_SOURCE + setlocale(LC_ALL, ""); + +#define NL_PAPER_GET(x) \ + ((union { char *string; unsigned word; })nl_langinfo(x)).word + + printf("%d %d\n", NL_PAPER_GET(_NL_PAPER_WIDTH), NL_PAPER_GET(_NL_PAPER_HEIGHT)); + return EXIT_SUCCESS; + +#else + printf("%s: locale paper size information is not supported on this system", program_name); + return EXIT_FAILURE; +#endif +} diff --git a/SPECS/libpaper/paperconf b/SPECS/libpaper/paperconf new file mode 100644 index 00000000..cc842ef0 --- /dev/null +++ b/SPECS/libpaper/paperconf @@ -0,0 +1,120 @@ +.TH PAPERCONF 1 "24 April 2001" +.SH NAME +.B paperconf +\- print paper configuration information +.SH SYNOPSIS +.B paperconf +[ +[ +.B \-p +] +.I paper +| +.B \-d +| +.B \-a +] +[ +.B \-z +] +[ +.B \-n +| +.B \-N +] +[ +.B \-s +| +.B \-w +| +.B \-h +] +[ +.B \-c +| +.B \-m +| +.B \-i +] +.SH DESCRIPTION +.B paperconf +prints information about a given paper. +The information that can be obtained is the name of the paper, its +size and its width or height. +When called without arguments, +.B paperconf +prints the name of the system- or user-specified paper, obtained by +looking in order at the +.B PAPERSIZE +environment variable, at the contents of the file specified by the +.B PAPERCONF +environment variable, at the contents of the file +.B /etc/papersize +, consulting the values controlled by the +.B LC_PAPER +locale setting, or by using +.B letter +as a fall-back value if none of the other alternatives are successful. +By default, width and height of the paper are printed in PostScript points. +.SH OPTIONS +.TP +.BI \-p " paper" +Specify the name of the +.I paper +about which information is asked. +.TP +.B \-d +Use the default builtin paper name. +.TP +.B \-a +Consider all known paper names. +.TP +.B \-z +If the paper name is unknown, print it but issue a message on the +standard error and exit with a non-zero code. +.TP +.B \-n +Print the name of the paper. +.TP +.B \-N +Print the name of the paper with the first letter capitalized. +.TP +.B \-s +Print the size (width followed by height) of the paper. +.TP +.B \-w +Print the width of the paper. +.TP +.B \-h +Print the height of the paper. +.TP +.B \-c +Use centimetres as unit for paper size. +.TP +.B \-m +Use millimetres as unit for paper size. +.TP +.B \-i +Use inches as unit for paper size. + +.SH ENVIRONMENT +.TP 20 +.B PAPERSIZE +Paper size to use regardless of what the papersize file contains. +.TP 20 +.B PAPERCONF +Full path to a file containing the paper size to use. +.SH FILES +.TP 20 +.B /etc/papersize +Contains the name of the system-wide default paper size to be used +if the +.B PAPERSIZE +and +.B PAPERCONF +variables are not set. +.SH AUTHOR +Yves Arrouye +.SH SEE ALSO +.BR papersize (5) + diff --git a/SPECS/libpcap/libpcap.spec b/SPECS/libpcap/libpcap.spec new file mode 100644 index 00000000..b6951670 --- /dev/null +++ b/SPECS/libpcap/libpcap.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libpcap +Version: 1.10.5 +Release: %autorelease +Summary: A system-independent interface for user-level packet capture +License: BSD-3-Clause +URL: https://www.tcpdump.org +#!RemoteAsset +Source: https://www.tcpdump.org/release/%{name}-%{version}.tar.xz + +BuildSystem: autotools + +BuildRequires: make +BuildRequires: bison +BuildRequires: flex +BuildRequires: gcc + +%description +Libpcap provides a portable framework for low-level network monitoring. +Applications include network statistics collection, security monitoring, +network debugging, etc. + +%package devel +Summary: Header files for libpcap development +Requires: %{name} = %{version} + +%description devel +This package contains the header files, static libraries and documentation +for developing applications that use libpcap. + +%package help +Summary: Documentation for libpcap +BuildArch: noarch + +%description help +This package contains supplementary documentation files for libpcap. + +%conf -p +export CFLAGS="%{optflags} -fno-strict-aliasing" + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +# no test +%check + + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libpcap.so.* + +%files devel +%{_bindir}/pcap-config +%{_includedir}/pcap/ +%{_includedir}/pcap.h +%{_includedir}/pcap-bpf.h +%{_includedir}/pcap-namedb.h +%{_libdir}/libpcap.so +%{_libdir}/libpcap.a +%{_libdir}/pkgconfig/libpcap.pc +%{_mandir}/man3/pcap*.3* + +%files help +%doc README.md CHANGES CREDITS +%{_mandir}/man1/pcap-config.1* +%{_mandir}/man5/pcap-savefile.5* +%{_mandir}/man7/pcap-filter.7* +%{_mandir}/man7/pcap-linktype.7* +%{_mandir}/man7/pcap-tstamp.7* + +%changelog +%{?autochangelog} diff --git a/SPECS/libpciaccess/libpciaccess.spec b/SPECS/libpciaccess/libpciaccess.spec new file mode 100644 index 00000000..69f84f6d --- /dev/null +++ b/SPECS/libpciaccess/libpciaccess.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libpciaccess +Version: 0.18 +Release: %autorelease +Summary: PCI access library +License: HPND AND MIT +URL: https://www.x.org/ +#!RemoteAsset +Source0: https://www.x.org/archive/individual/lib/libpciaccess-%{version}.tar.xz +BuildSystem: meson + +BuildRequires: autoconf automake libtool pkgconfig util-macros +BuildRequires: meson zlib-devel +Requires: hwdata + +%description +libpciaccess is a library for portable PCI access routines across multiple +operating systems. + +%package devel +Summary: Development files for the PCI access library +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +This package contains the header files and development library for libpciaccess. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS +%{_libdir}/libpciaccess.so.0* + +%files devel +%{_includedir}/pciaccess.h +%{_libdir}/libpciaccess.so +%{_libdir}/pkgconfig/pciaccess.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libpipeline/libpipeline.spec b/SPECS/libpipeline/libpipeline.spec new file mode 100644 index 00000000..6106fb2e --- /dev/null +++ b/SPECS/libpipeline/libpipeline.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libpipeline +Version: 1.5.8 +Release: %autorelease +Summary: A C library for manipulating pipelines of subprocesses +License: GPL-3.0-or-later +URL: https://libpipeline.nongnu.org/ +#!RemoteAsset +Source: https://download.savannah.gnu.org/releases/libpipeline/libpipeline-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gcc make +BuildRequires: pkgconfig(check) >= 0.9.10 + +%description +libpipeline is a C library for manipulating pipelines of subprocesses +in a flexible and convenient way. This allows you to create pipelines +such as fork and execve easily and safely. + +%package devel +Summary: Development files and documentation for libpipeline +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, pkg-config file, and +API documentation needed for development with libpipeline. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc ChangeLog +%{_libdir}/libpipeline.so* + +%files devel +%{_libdir}/libpipeline.so +%{_libdir}/pkgconfig/libpipeline.pc +%{_includedir}/*.h +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libpng/libpng.spec b/SPECS/libpng/libpng.spec new file mode 100644 index 00000000..40179b32 --- /dev/null +++ b/SPECS/libpng/libpng.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libpng +Version: 1.6.50 +Release: %autorelease +Summary: A library of functions for manipulating PNG image format files +License: zlib +URL: http://www.libpng.org/pub/png/ +#!RemoteAsset +Source0: https://github.com/glennrp/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: zlib-devel + +%description +The libpng package contains a library of functions for creating and +manipulating PNG (Portable Network Graphics) image format files. PNG +is a bit-mapped graphics format similar to the GIF format. PNG was +created to replace the GIF format, since GIF uses a patented data +compression algorithm. + +Libpng should be installed if you need to manipulate PNG format image +files. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +The libpng-devel package contains header files and documentation necessary +for developing programs using the PNG (Portable Network Graphics) library. + +If you want to develop programs which will manipulate PNG image format +files, you should install libpng-devel. You'll also need to install +the libpng package. + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_bindir}/pngfix +%{_libdir}/libpng*.so.* +%{_mandir}/man5/* + +%files devel +%doc libpng-manual.txt example.c TODO CHANGES +%{_bindir}/* +%{_includedir}/* +%{_libdir}/libpng*.so +%{_libdir}/pkgconfig/libpng*.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libpsl/libpsl.spec b/SPECS/libpsl/libpsl.spec new file mode 100644 index 00000000..36908b14 --- /dev/null +++ b/SPECS/libpsl/libpsl.spec @@ -0,0 +1,95 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libpsl +Version: 0.21.5 +Release: %autorelease +Summary: C library for the Public Suffix List +License: MIT +URL: https://rockdaboot.github.io/libpsl +#!RemoteAsset +Source: https://github.com/rockdaboot/libpsl/archive/refs/tags/%{version}.tar.gz +BuildSystem: meson + +BuildOption: -Ddocs=false +BuildOption: -Druntime=libidn2 +BuildOption: -Dbuiltin=true +BuildOption: -Dpsl_distfile=%{_datadir}/publicsuffix/public_suffix_list.dafsa +BuildOption: -Dpsl_file=%{_datadir}/publicsuffix/effective_tld_names.dat +BuildOption: -Dpsl_testfile=%{_datadir}/publicsuffix/test_psl.txt + +BuildRequires: meson +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: glib-devel +BuildRequires: icu4c-devel +BuildRequires: libidn2-devel +BuildRequires: libunistring-devel +BuildRequires: make +BuildRequires: publicsuffix-list +BuildRequires: python3-devel + +Requires: publicsuffix-list + +%description +libpsl is a C library to handle the Public Suffix List, used by web clients to +manage cookies, certificates, and domain highlighting. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: publicsuffix-list + +%description devel +This package contains libraries and header files for +developing applications that use %{name}. + +%package -n psl +Summary: Command-line utility to explore the Public Suffix List + +%description -n psl +This package contains a command-line utility to explore the Public Suffix List. + +%package -n psl-make-dafsa +Summary: Compiles the Public Suffix List into DAFSA form +BuildArch: noarch + +%description -n psl-make-dafsa +This script compiles a plain text Public Suffix List into a +Deterministic Acyclic Finite State Automaton (DAFSA). + +%prep -a +rm -frv list +ln -sv %{_datadir}/publicsuffix list +%py3_shebang_fix src/psl-make-dafsa + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libpsl.so.5 +%{_libdir}/libpsl.so.5.* +%{_mandir}/man1/psl-make-dafsa.1.gz +%{_mandir}/man1/psl.1.gz + +%files devel +%doc AUTHORS NEWS +%{_includedir}/libpsl.h +%{_libdir}/libpsl.so +%{_libdir}/pkgconfig/libpsl.pc + +%files -n psl +%doc AUTHORS NEWS +%license COPYING +%{_bindir}/psl + +%files -n psl-make-dafsa +%license COPYING +%{_bindir}/psl-make-dafsa + +%changelog +%{?autochangelog} diff --git a/SPECS/libpwquality/0001-setuptools.patch b/SPECS/libpwquality/0001-setuptools.patch new file mode 100644 index 00000000..818a4c0a --- /dev/null +++ b/SPECS/libpwquality/0001-setuptools.patch @@ -0,0 +1,43 @@ +diff --git a/python/Makefile.am b/python/Makefile.am +index 1d00c0c..6e51744 100644 +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -14,7 +14,7 @@ all-local: + CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) + + install-exec-local: +- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} ++ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix} + + clean-local: + rm -rf py$(PYTHONREV) +diff --git a/python/Makefile.in b/python/Makefile.in +index f47ac5e..8e9c7f2 100644 +--- a/python/Makefile.in ++++ b/python/Makefile.in +@@ -483,7 +483,7 @@ all-local: + CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) + + install-exec-local: +- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix} ++ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root=${DESTDIR} --prefix=${prefix} + + clean-local: + rm -rf py$(PYTHONREV) +diff --git a/python/setup.py.in b/python/setup.py.in +index a741b91..f934c50 100755 +--- a/python/setup.py.in ++++ b/python/setup.py.in +@@ -6,9 +6,9 @@ + + import os + +-from distutils.core import setup, Extension +-from distutils.command.build_ext import build_ext as _build_ext +-from distutils.command.sdist import sdist as _sdist ++from setuptools import setup, Extension ++from setuptools.command.build_ext import build_ext as _build_ext ++from setuptools.command.sdist import sdist as _sdist + + def genconstants(headerfile, outputfile): + hf = open(headerfile, 'r') diff --git a/SPECS/libpwquality/libpwquality.spec b/SPECS/libpwquality/libpwquality.spec new file mode 100644 index 00000000..359b0f14 --- /dev/null +++ b/SPECS/libpwquality/libpwquality.spec @@ -0,0 +1,98 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global upstream_version %{version_no_tilde} + +Name: libpwquality +Version: 1.4.5 +Release: %autorelease +Summary: A library for password generation and password quality checking +License: BSD-3-Clause OR GPL-2.0-or-later +URL: https://github.com/libpwquality/libpwquality/ +#!RemoteAsset +Source0: https://github.com/libpwquality/libpwquality/releases/download/libpwquality-%{version}/libpwquality-%{version}.tar.bz2 +BuildSystem: autotools + +# https://github.com/libpwquality/libpwquality/pull/74 +Patch0: 0001-setuptools.patch + +BuildOption(conf): --with-securedir=%{_pam_moduledir} +BuildOption(conf): --with-pythonsitedir=%{python3_sitearch} +BuildOption(conf): --with-python-binary=%{__python3} +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: cracklib-devel +BuildRequires: gettext +BuildRequires: pam-devel +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-packaging + +%description +This is a library for password quality checks and generation +of random passwords that pass the checks. +This library uses the cracklib and cracklib dictionaries +to perform some of the checks. + +%package devel +Summary: Support for development of applications using the libpwquality library +Requires: libpwquality = %{version}-%{release} +Requires: pkgconfig + +%description devel +Files needed for development of applications using the libpwquality +library. +See the pwquality.h header file for the API. + +%package -n python3-pwquality +Summary: Python bindings for the libpwquality library +Requires: libpwquality = %{version}-%{release} + +%description -n python3-pwquality +This is pwquality Python module that provides Python bindings +for the libpwquality library. These bindings can be used +for easy password quality checking and generation of random +pronounceable passwords from Python applications. + +%install -a +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_pam_moduledir}/*.la +mkdir %{buildroot}%{_pam_secconfdir}/pwquality.conf.d +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README NEWS AUTHORS +%{_bindir}/pwmake +%{_bindir}/pwscore +%dir %{_pam_moduledir} +%{_pam_moduledir}/pam_pwquality.so +%{_libdir}/libpwquality.so.* +%dir %{_pam_secconfdir} +%config(noreplace) %{_pam_secconfdir}/pwquality.conf +%dir %{_pam_secconfdir}/pwquality.conf.d +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man8/* + +%files devel +%{_includedir}/pwquality.h +%{_libdir}/libpwquality.so +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man3/* + +%files -n python3-pwquality +%{python3_sitearch}/*.so +%{python3_sitearch}/*.egg-info + +%changelog +%{?autochangelog} diff --git a/SPECS/librepo/librepo.spec b/SPECS/librepo/librepo.spec new file mode 100644 index 00000000..a4f2bcc0 --- /dev/null +++ b/SPECS/librepo/librepo.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# default use zchunk +%bcond zchunk 1 + +Name: librepo +Version: 1.20.0 +Release: %autorelease +Summary: Library for downloading repository metadata +License: LGPL-2.0-or-later +URL: https://github.com/rpm-software-management/librepo +#!RemoteAsset +Source: %{url}/archive/%{version}/librepo-%{version}.tar.gz +BuildSystem: cmake + +# or,can't find glib.h +BuildOption(conf): -DCMAKE_C_FLAGS="%{build_cflags} $(pkg-config --cflags glib-2.0)" +BuildOption(conf): -DENABLE_PYTHON=OFF +BuildOption(conf): -DENABLE_PYTHON_TESTS=OFF + +%if %{with zchunk} +BuildOption(conf): -DWITH_ZCHUNK=ON +%else +BuildOption(conf): -DWITH_ZCHUNK=OFF +%endif + +BuildRequires: gcc cmake gpgme-devel +BuildRequires: pkgconfig(check) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(glib-2.0) >= 2.66 +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(openssl) +BuildRequires: doxygen + +%if %{with zchunk} +BuildRequires: pkgconfig(zck) +%endif + +%description +A library providing a C API for downloading repository metadata. + +%package devel +Summary: Development files for librepo +Requires: %{name} = %{version} + +%description devel +Development files for librepo. + +%build -p +export PKG_CONFIG_PATH=%{_libdir}/pkgconfig:%{_datadir}/pkgconfig + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README.md +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*so +%{_libdir}/pkgconfig/librepo.pc +%{_includedir}/librepo/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libressl/libressl.spec b/SPECS/libressl/libressl.spec new file mode 100644 index 00000000..85f73bd9 --- /dev/null +++ b/SPECS/libressl/libressl.spec @@ -0,0 +1,112 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libressl +Version: 4.1.1 +Release: %autorelease +Summary: An SSL/TLS protocol implementation +License: OpenSSL +URL: https://www.libressl.org/ +#!RemoteAsset +Source: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --enable-libtls +BuildOption(conf): --with-openssldir=%{_sysconfdir}/libressl +BuildOption(conf): --disable-static + +BuildRequires: automake autoconf libtool fdupes pkg-config + +%description +LibreSSL is an implementation of the Secure Sockets Layer (SSL) and +Transport Layer Security (TLS) protocols, forked from OpenSSL. +This package contains the command-line tool and configuration. + +%package -n libcrypto56 +Summary: LibreSSL cryptographic library + +%description -n libcrypto56 +This package provides the 'crypto' library from LibreSSL, which implements a +wide range of cryptographic algorithms. + +%package -n libssl59 +Summary: LibreSSL SSL/TLS library + +%description -n libssl59 +This package provides the 'ssl' library from LibreSSL for the Secure Sockets +Layer (SSL) and Transport Layer Security (TLS) protocols. + +%package -n libtls32 +Summary: A simplified interface for the LibreSSL TLS protocol + +%description -n libtls32 +This package provides the 'tls' library from LibreSSL, offering a modern and +simplified interface for secure client and server communications. + +%package devel +Summary: Development files for LibreSSL +Requires: libcrypto56 = %{version} +Requires: libssl59 = %{version} +Requires: libtls32 = %{version} + +%description devel +This package contains the header files, pkg-config files, and API documentation +needed to develop applications that use LibreSSL. + +%conf -p +autoreconf -fiv + +%install -a + +for i in %{buildroot}%{_mandir}/man*; do + cd "$i" + for j in *.*; do + if [ -L "$j" ]; then + target=$(readlink "$j") + ln -fs "${target}ssl" "$j" + fi + mv "$j" "${j}ssl" + done + cd - >/dev/null +done +rm -v "%{buildroot}%{_sysconfdir}/libressl/cert.pem" + +%ldconfig_scriptlets -n libcrypto56 +%ldconfig_scriptlets -n libssl59 +%ldconfig_scriptlets -n libtls32 + +%files +%license COPYING +%dir %{_sysconfdir}/libressl/ +%config(noreplace) %{_sysconfdir}/libressl/openssl.cnf +%config(noreplace) %{_sysconfdir}/libressl/x509v3.cnf +%{_bindir}/ocspcheck +%{_bindir}/openssl +%{_mandir}/man1/*.1ssl* +%{_mandir}/man5/*.5ssl* +%{_mandir}/man8/*.8ssl* + +%files -n libcrypto56 +%{_libdir}/libcrypto.so.* + +%files -n libssl59 +%{_libdir}/libssl.so.* + +%files -n libtls32 +%{_libdir}/libtls.so.* + +%files devel +%{_includedir}/openssl/ +%{_includedir}/tls.h +%{_libdir}/libcrypto.so +%{_libdir}/libssl.so +%{_libdir}/libtls.so +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man3/*.3ssl* + +%changelog +%{?autochangelog} diff --git a/SPECS/libseccomp/fix-murmur-hash-strict-aliasing-violation.patch b/SPECS/libseccomp/fix-murmur-hash-strict-aliasing-violation.patch new file mode 100644 index 00000000..662a68b5 --- /dev/null +++ b/SPECS/libseccomp/fix-murmur-hash-strict-aliasing-violation.patch @@ -0,0 +1,86 @@ +From b7d0f04e63c460638eeca970ba3bb784733e2e2e Mon Sep 17 00:00:00 2001 +From: Romain Geissler +Date: Tue, 18 Feb 2025 22:29:05 +0000 +Subject: [PATCH] Fix strict aliasing UB in MurMur hash implementation. + +This was spotted when trying to upgrade the libseccomp fedora package to +version 2.6.0 in fedora rawhide. It comes with gcc 15 and LTO enabled by +default. When running the test 61-sim-transactions we get plenty of such +errors in valgrind: + +==265507== Use of uninitialised value of size 8 +==265507== at 0x4096AD: _hsh_add (gen_bpf.c:599) +==265507== by 0x40A557: UnknownInlinedFun (gen_bpf.c:2016) +==265507== by 0x40A557: gen_bpf_generate (gen_bpf.c:2341) +==265507== by 0x400CDE: UnknownInlinedFun (db.c:2685) +==265507== by 0x400CDE: UnknownInlinedFun (db.c:2682) +==265507== by 0x400CDE: UnknownInlinedFun (api.c:756) +==265507== by 0x400CDE: UnknownInlinedFun (util.c:162) +==265507== by 0x400CDE: UnknownInlinedFun (util.c:153) +==265507== by 0x400CDE: main (61-sim-transactions.c:128) +==265507== Uninitialised value was created by a stack allocation +==265507== at 0x409590: _hsh_add (gen_bpf.c:573) + +Investigating this a bit, it seems that because of LTO the MurMur hash +implementation is being inlined in _hsh_add. The two buffers data and +blocks to point at the same underlying data, but via incompatible type, +which is a strict aliasing violation. Instead, remove the getblock32 +function and inline the copy with memcpy. + +This is reproducible on a "fedora:rawhide" container (gcc 15) and using: +export CFLAGS='-O2 -flto=auto -ffat-lto-objects -g' + +Signed-off-by: Romain Geissler +--- + src/hash.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/src/hash.c b/src/hash.c +index 4435900f..01ff9399 100644 +--- a/src/hash.c ++++ b/src/hash.c +@@ -12,15 +12,11 @@ + */ + + #include ++#include + #include + + #include "hash.h" + +-static inline uint32_t getblock32(const uint32_t *p, int i) +-{ +- return p[i]; +-} +- + static inline uint32_t rotl32(uint32_t x, int8_t r) + { + return (x << r) | (x >> (32 - r)); +@@ -41,7 +37,6 @@ static inline uint32_t fmix32(uint32_t h) + uint32_t hash(const void *key, size_t length) + { + const uint8_t *data = (const uint8_t *)key; +- const uint32_t *blocks; + const uint8_t *tail; + const int nblocks = length / 4; + const uint32_t c1 = 0xcc9e2d51; +@@ -54,9 +49,8 @@ uint32_t hash(const void *key, size_t length) + uint32_t h1 = 0; + + /* body */ +- blocks = (const uint32_t *)(data + nblocks * 4); + for(i = -nblocks; i; i++) { +- k1 = getblock32(blocks, i); ++ memcpy(&k1, data + (nblocks + i) * sizeof(uint32_t), sizeof(uint32_t)); + + k1 *= c1; + k1 = rotl32(k1, 15); +@@ -68,7 +62,7 @@ uint32_t hash(const void *key, size_t length) + } + + /* tail */ +- tail = (const uint8_t *)(data + nblocks * 4); ++ tail = data + nblocks * sizeof(uint32_t); + switch(length & 3) { + case 3: + k2 ^= tail[2] << 16; diff --git a/SPECS/libseccomp/libseccomp.spec b/SPECS/libseccomp/libseccomp.spec new file mode 100644 index 00000000..58211baf --- /dev/null +++ b/SPECS/libseccomp/libseccomp.spec @@ -0,0 +1,105 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# By default, build the optional Python bindings. +%bcond python 1 + +Name: libseccomp +Version: 2.6.0 +Release: %autorelease +Summary: Enhanced library for the Linux syscall filtering mechanism +License: LGPL-2.1-only +URL: https://github.com/seccomp/libseccomp +#!RemoteAsset +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz + +Patch: make-python-build.patch +Patch: fix-murmur-hash-strict-aliasing-violation.patch + +BuildSystem: autotools + +BuildOption(conf): --disable-static +%if %{with python} +BuildOption(conf): --enable-python +%else +BuildOption(conf): --disable-python +%endif +BuildOption(check): LIBSECCOMP_TSTCFG_JOBS=0 +BuildOption(check): LIBSECCOMP_TSTCFG_TYPE=live +BuildOption(check): LIBSECCOMP_TSTCFG_MODE_LIST=c +BuildOption(check): LIBSECCOMP_TSTCFG_ARCH_LIST=native +BuildOption(check): LIBSECCOMP_TSTCFG_LOG_LEVEL=2 + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gcc +BuildRequires: gperf +%if %{with python} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: cython +%endif + +%description +The libseccomp library provides an easy-to-use interface to the Linux +kernel seccomp syscall filtering mechanism. It is a fundamental building +block for creating secure, sandboxed applications and containers. + +%package tools +Summary: Command-line tools for libseccomp +Requires: %{name}%{?_isa} = %{version}-%{release} +%description tools +Contains scmp_sys_resolver, a utility to resolve syscall names and numbers, +which is useful for developers and system administrators. + +%if %{with python} +%package -n python3-%{name} +Summary: Python bindings for the libseccomp library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description -n python3-%{name} +This package provides the Python 3 bindings for libseccomp, allowing Python +applications to create and manage seccomp filters. +%endif + +%package devel +Summary: Development files for libseccomp +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +Header files, pkg-config files, and documentation for developing applications +that link against libseccomp. + +%conf -p +autoreconf -fiv + +%install -a +rm -f %{buildroot}%{_libdir}/libseccomp.la + +%files +%license LICENSE +%doc README.md CHANGELOG +%{_libdir}/libseccomp.so.* + +%files tools +%{_bindir}/scmp_sys_resolver +%{_mandir}/man1/scmp_sys_resolver.1* + +%if %{with python} +%files -n python3-libseccomp +%{python3_sitearch}/* +%endif + +%files devel +%doc CREDITS CONTRIBUTING.md src/syscalls.csv +%{_includedir}/seccomp.h +%{_includedir}/seccomp-syscalls.h +%{_libdir}/libseccomp.so +%{_libdir}/pkgconfig/libseccomp.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libseccomp/make-python-build.patch b/SPECS/libseccomp/make-python-build.patch new file mode 100644 index 00000000..1f45eeb1 --- /dev/null +++ b/SPECS/libseccomp/make-python-build.patch @@ -0,0 +1,655 @@ +--- + src/python/setup.py | 4 ++-- + tests/01-sim-allow.py | 2 +- + tests/02-sim-basic.py | 2 +- + tests/03-sim-basic_chains.py | 2 +- + tests/04-sim-multilevel_chains.py | 2 +- + tests/05-sim-long_jumps.py | 2 +- + tests/06-sim-actions.py | 2 +- + tests/07-sim-db_bug_looping.py | 2 +- + tests/08-sim-subtree_checks.py | 2 +- + tests/09-sim-syscall_priority_pre.py | 2 +- + tests/10-sim-syscall_priority_post.py | 2 +- + tests/11-basic-basic_errors.py | 2 +- + tests/12-sim-basic_masked_ops.py | 2 +- + tests/13-basic-attrs.py | 2 +- + tests/14-sim-reset.py | 2 +- + tests/15-basic-resolver.py | 2 +- + tests/16-sim-arch_basic.py | 2 +- + tests/17-sim-arch_merge.py | 2 +- + tests/18-sim-basic_allowlist.py | 2 +- + tests/19-sim-missing_syscalls.py | 2 +- + tests/20-live-basic_die.py | 2 +- + tests/21-live-basic_allow.py | 2 +- + tests/22-sim-basic_chains_array.py | 2 +- + tests/23-sim-arch_all_le_basic.py | 2 +- + tests/24-live-arg_allow.py | 2 +- + tests/25-sim-multilevel_chains_adv.py | 2 +- + tests/26-sim-arch_all_be_basic.py | 2 +- + tests/27-sim-bpf_blk_state.py | 2 +- + tests/28-sim-arch_x86.py | 2 +- + tests/29-sim-pseudo_syscall.py | 2 +- + tests/30-sim-socket_syscalls.py | 2 +- + tests/31-basic-version_check.py | 2 +- + tests/32-live-tsync_allow.py | 2 +- + tests/33-sim-socket_syscalls_be.py | 2 +- + tests/34-sim-basic_denylist.py | 2 +- + tests/35-sim-negative_one.py | 2 +- + tests/36-sim-ipc_syscalls.py | 2 +- + tests/37-sim-ipc_syscalls_be.py | 2 +- + tests/39-basic-api_level.py | 2 +- + tests/40-sim-log.py | 2 +- + tests/41-sim-syscall_priority_arch.py | 2 +- + tests/42-sim-adv_chains.py | 2 +- + tests/43-sim-a2_order.py | 2 +- + tests/44-live-a2_order.py | 2 +- + tests/45-sim-chain_code_coverage.py | 2 +- + tests/46-sim-kill_process.py | 2 +- + tests/47-live-kill_process.py | 2 +- + tests/48-sim-32b_args.py | 2 +- + tests/49-sim-64b_comparisons.py | 2 +- + tests/50-sim-hash_collision.py | 2 +- + tests/51-live-user_notification.py | 2 +- + tests/52-basic-load.py | 2 +- + tests/53-sim-binary_tree.py | 2 +- + tests/54-live-binary_tree.py | 2 +- + tests/56-basic-iterate_syscalls.py | 2 +- + tests/57-basic-rawsysrc.py | 2 +- + tests/58-live-tsync_notify.py | 2 +- + tests/regression | 4 ++-- + 58 files changed, 60 insertions(+), 60 deletions(-) + +Index: libseccomp-2.6.0/src/python/setup.py +=================================================================== +--- libseccomp-2.6.0.orig/src/python/setup.py ++++ libseccomp-2.6.0/src/python/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Enhanced Seccomp Library Python Module Build Script +@@ -40,6 +40,6 @@ setup( + ext_modules = cythonize([ + Extension("seccomp", ["seccomp.pyx"], + # unable to handle libtool libraries directly +- extra_objects=["../.libs/libseccomp.a"]), ++ extra_objects=["../.libs/libseccomp.so"]), + ]) + ) +Index: libseccomp-2.6.0/tests/01-sim-allow.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/01-sim-allow.py ++++ libseccomp-2.6.0/tests/01-sim-allow.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/02-sim-basic.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/02-sim-basic.py ++++ libseccomp-2.6.0/tests/02-sim-basic.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/03-sim-basic_chains.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/03-sim-basic_chains.py ++++ libseccomp-2.6.0/tests/03-sim-basic_chains.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/04-sim-multilevel_chains.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/04-sim-multilevel_chains.py ++++ libseccomp-2.6.0/tests/04-sim-multilevel_chains.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/05-sim-long_jumps.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/05-sim-long_jumps.py ++++ libseccomp-2.6.0/tests/05-sim-long_jumps.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/06-sim-actions.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/06-sim-actions.py ++++ libseccomp-2.6.0/tests/06-sim-actions.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/07-sim-db_bug_looping.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/07-sim-db_bug_looping.py ++++ libseccomp-2.6.0/tests/07-sim-db_bug_looping.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/08-sim-subtree_checks.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/08-sim-subtree_checks.py ++++ libseccomp-2.6.0/tests/08-sim-subtree_checks.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/09-sim-syscall_priority_pre.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/09-sim-syscall_priority_pre.py ++++ libseccomp-2.6.0/tests/09-sim-syscall_priority_pre.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/10-sim-syscall_priority_post.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/10-sim-syscall_priority_post.py ++++ libseccomp-2.6.0/tests/10-sim-syscall_priority_post.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/11-basic-basic_errors.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/11-basic-basic_errors.py ++++ libseccomp-2.6.0/tests/11-basic-basic_errors.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/12-sim-basic_masked_ops.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/12-sim-basic_masked_ops.py ++++ libseccomp-2.6.0/tests/12-sim-basic_masked_ops.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/13-basic-attrs.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/13-basic-attrs.py ++++ libseccomp-2.6.0/tests/13-basic-attrs.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/14-sim-reset.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/14-sim-reset.py ++++ libseccomp-2.6.0/tests/14-sim-reset.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/15-basic-resolver.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/15-basic-resolver.py ++++ libseccomp-2.6.0/tests/15-basic-resolver.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/16-sim-arch_basic.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/16-sim-arch_basic.py ++++ libseccomp-2.6.0/tests/16-sim-arch_basic.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/17-sim-arch_merge.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/17-sim-arch_merge.py ++++ libseccomp-2.6.0/tests/17-sim-arch_merge.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/18-sim-basic_allowlist.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/18-sim-basic_allowlist.py ++++ libseccomp-2.6.0/tests/18-sim-basic_allowlist.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/19-sim-missing_syscalls.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/19-sim-missing_syscalls.py ++++ libseccomp-2.6.0/tests/19-sim-missing_syscalls.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/20-live-basic_die.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/20-live-basic_die.py ++++ libseccomp-2.6.0/tests/20-live-basic_die.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/21-live-basic_allow.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/21-live-basic_allow.py ++++ libseccomp-2.6.0/tests/21-live-basic_allow.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/22-sim-basic_chains_array.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/22-sim-basic_chains_array.py ++++ libseccomp-2.6.0/tests/22-sim-basic_chains_array.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/23-sim-arch_all_le_basic.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/23-sim-arch_all_le_basic.py ++++ libseccomp-2.6.0/tests/23-sim-arch_all_le_basic.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/24-live-arg_allow.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/24-live-arg_allow.py ++++ libseccomp-2.6.0/tests/24-live-arg_allow.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/25-sim-multilevel_chains_adv.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/25-sim-multilevel_chains_adv.py ++++ libseccomp-2.6.0/tests/25-sim-multilevel_chains_adv.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/26-sim-arch_all_be_basic.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/26-sim-arch_all_be_basic.py ++++ libseccomp-2.6.0/tests/26-sim-arch_all_be_basic.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/27-sim-bpf_blk_state.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/27-sim-bpf_blk_state.py ++++ libseccomp-2.6.0/tests/27-sim-bpf_blk_state.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/28-sim-arch_x86.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/28-sim-arch_x86.py ++++ libseccomp-2.6.0/tests/28-sim-arch_x86.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/29-sim-pseudo_syscall.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/29-sim-pseudo_syscall.py ++++ libseccomp-2.6.0/tests/29-sim-pseudo_syscall.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/30-sim-socket_syscalls.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/30-sim-socket_syscalls.py ++++ libseccomp-2.6.0/tests/30-sim-socket_syscalls.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/31-basic-version_check.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/31-basic-version_check.py ++++ libseccomp-2.6.0/tests/31-basic-version_check.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/32-live-tsync_allow.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/32-live-tsync_allow.py ++++ libseccomp-2.6.0/tests/32-live-tsync_allow.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/33-sim-socket_syscalls_be.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/33-sim-socket_syscalls_be.py ++++ libseccomp-2.6.0/tests/33-sim-socket_syscalls_be.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/34-sim-basic_denylist.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/34-sim-basic_denylist.py ++++ libseccomp-2.6.0/tests/34-sim-basic_denylist.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/35-sim-negative_one.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/35-sim-negative_one.py ++++ libseccomp-2.6.0/tests/35-sim-negative_one.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/36-sim-ipc_syscalls.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/36-sim-ipc_syscalls.py ++++ libseccomp-2.6.0/tests/36-sim-ipc_syscalls.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/37-sim-ipc_syscalls_be.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/37-sim-ipc_syscalls_be.py ++++ libseccomp-2.6.0/tests/37-sim-ipc_syscalls_be.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/39-basic-api_level.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/39-basic-api_level.py ++++ libseccomp-2.6.0/tests/39-basic-api_level.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/40-sim-log.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/40-sim-log.py ++++ libseccomp-2.6.0/tests/40-sim-log.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/41-sim-syscall_priority_arch.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/41-sim-syscall_priority_arch.py ++++ libseccomp-2.6.0/tests/41-sim-syscall_priority_arch.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/42-sim-adv_chains.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/42-sim-adv_chains.py ++++ libseccomp-2.6.0/tests/42-sim-adv_chains.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/43-sim-a2_order.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/43-sim-a2_order.py ++++ libseccomp-2.6.0/tests/43-sim-a2_order.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/44-live-a2_order.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/44-live-a2_order.py ++++ libseccomp-2.6.0/tests/44-live-a2_order.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/45-sim-chain_code_coverage.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/45-sim-chain_code_coverage.py ++++ libseccomp-2.6.0/tests/45-sim-chain_code_coverage.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/46-sim-kill_process.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/46-sim-kill_process.py ++++ libseccomp-2.6.0/tests/46-sim-kill_process.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/47-live-kill_process.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/47-live-kill_process.py ++++ libseccomp-2.6.0/tests/47-live-kill_process.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/48-sim-32b_args.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/48-sim-32b_args.py ++++ libseccomp-2.6.0/tests/48-sim-32b_args.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/49-sim-64b_comparisons.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/49-sim-64b_comparisons.py ++++ libseccomp-2.6.0/tests/49-sim-64b_comparisons.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/50-sim-hash_collision.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/50-sim-hash_collision.py ++++ libseccomp-2.6.0/tests/50-sim-hash_collision.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/51-live-user_notification.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/51-live-user_notification.py ++++ libseccomp-2.6.0/tests/51-live-user_notification.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/52-basic-load.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/52-basic-load.py ++++ libseccomp-2.6.0/tests/52-basic-load.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/53-sim-binary_tree.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/53-sim-binary_tree.py ++++ libseccomp-2.6.0/tests/53-sim-binary_tree.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/54-live-binary_tree.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/54-live-binary_tree.py ++++ libseccomp-2.6.0/tests/54-live-binary_tree.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/56-basic-iterate_syscalls.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/56-basic-iterate_syscalls.py ++++ libseccomp-2.6.0/tests/56-basic-iterate_syscalls.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/57-basic-rawsysrc.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/57-basic-rawsysrc.py ++++ libseccomp-2.6.0/tests/57-basic-rawsysrc.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/58-live-tsync_notify.py +=================================================================== +--- libseccomp-2.6.0.orig/tests/58-live-tsync_notify.py ++++ libseccomp-2.6.0/tests/58-live-tsync_notify.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # + # Seccomp Library test program +Index: libseccomp-2.6.0/tests/regression +=================================================================== +--- libseccomp-2.6.0.orig/tests/regression ++++ libseccomp-2.6.0/tests/regression +@@ -262,9 +262,9 @@ function run_test_command() { + cmd="$cmd:$(cd $(pwd)/../src/python/build/lib.*; pwd)" + # check and adjust if we are doing a VPATH build + if [[ -e "./$2.py" ]]; then +- cmd="$cmd /usr/bin/env python $2.py $3" ++ cmd="$cmd /usr/bin/env python3 $2.py $3" + else +- cmd="$cmd /usr/bin/env python ${srcdir}/$2.py $3" ++ cmd="$cmd /usr/bin/env python3 ${srcdir}/$2.py $3" + fi + else + cmd="$2 $3" diff --git a/SPECS/libsecret/libsecret.spec b/SPECS/libsecret/libsecret.spec new file mode 100644 index 00000000..098ee5b2 --- /dev/null +++ b/SPECS/libsecret/libsecret.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# first two digits of version +%global release_version 0.21 + +Name: libsecret +Version: %{release_version}.7 +Release: %autorelease +Summary: Library for storing and retrieving passwords and other secrets +License: LGPL-2.1-or-later AND Apache-2.0 AND (GPL-2.0-or-later OR TGPPL-1.0) AND LicenseRef-openRuyi-Public-Domain +URL: https://wiki.gnome.org/Projects/Libsecret +#!RemoteAsset +Source: https://download.gnome.org/sources/%{name}/%{release_version}/%{name}-%{version}.tar.xz +BuildSystem: meson + +BuildRequires: meson +BuildRequires: gettext +BuildRequires: vala +BuildRequires: libxslt +BuildRequires: docbook-xsl +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(bash-completion) +BuildRequires: pkgconfig(libgcrypt) +BuildRequires: pkgconfig(gi-docgen) + +%description +libsecret is a library for storing and retrieving passwords and other secrets. +It communicates with the "Secret Service" using DBus. gnome-keyring and +KSecretService are both implementations of a Secret Service. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%install -a +%find_lang libsecret + +%files -f libsecret.lang +%license COPYING +%doc NEWS README.md +%{_bindir}/secret-tool +%{_libdir}/libsecret-1.so.0* +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/Secret-1.typelib +%{_mandir}/man1/secret-tool.1* +%{_datadir}/bash-completion/completions/secret-tool + +%files devel +%license COPYING +%{_includedir}/libsecret-1/ +%{_libdir}/libsecret-1.so +%{_libdir}/pkgconfig/libsecret-1.pc +%{_libdir}/pkgconfig/libsecret-unstable.pc +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/Secret-1.gir +%dir %{_datadir}/vala +%dir %{_datadir}/vala/vapi +%{_datadir}/vala/vapi/libsecret-1.deps +%{_datadir}/vala/vapi/libsecret-1.vapi +%doc %{_docdir}/libsecret-1/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libselinux/libselinux.keyring b/SPECS/libselinux/libselinux.keyring new file mode 100644 index 00000000..b69dd8c9 --- /dev/null +++ b/SPECS/libselinux/libselinux.keyring @@ -0,0 +1,121 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGcpEXsBEACjkf3/pxK1vKNYV5sbqoOfqlP7i/WuVtFmjStjBaQOYQCM5kxE +L1ImKlMJ1B40WW/ocSKIK+XduZkiqtn7O8sjpTX7Z0fuTTrE2ogUtNXTNuv61SQ7 +CymDmevn0qy40/TVYFLQQvO6c7/MeP4E4R0+DUq8HQhAW2oDBoB+6fLrti9Ov07t +jPTtkJ9PE+0d/oUnzQU95FrQuhlidbhSZIa2bV/n1UP36p7jKFG01qdqZdQqN/wF +PDStDCOgmFVPkyDRnqFbp+EWsPnsuB3x8GLlkcdSVHjPX6eoYJSgeUeNzQlXIryP +x+h8pp+jD/v0hNo6oHO/4/emxj15wGDvAZo4eurNHNHEB8phE7YhoUdEaewQTwWf +BIQvTS49XGmKJNq+sskUSOS70aY/c5jetvAg9dvDWb2ZkbXIBVtIQR/nxZJZ6gGn +Q7qqvAB0ht2BRfgGRDxtfky1SNenm2bRK2aNCJns73VyDRW5a2t+P8jgTfG2Wg3O +G0bZAsjizuIAvWiuEKXES5lE71qVQJJydG+GbDYOHqwHqLnp69xl1QXDExc4HLF9 +avR/FfhCVHyNiow+PtQw2PY9xxME5Be6YhbZx0YR6eL2+sT1wt9lFI0LA9YBda2v +XNBbngnHkOMIYehtCTndnuQT4xlUCN6A5pPS7nRyWME18mii26Wfj6BsYwARAQAB +tCVQZXRyIExhdXRyYmFjaCA8bGF1dHJiYWNoQHJlZGhhdC5jb20+iQJXBBMBCABB +FiEEaNIYIzQqE2g66z5O+0xoW13BwT4FAmcpEXsCGwMFCQPCZwAFCwkIBwICIgIG +FQoJCAsCBBYCAwECHgcCF4AACgkQ+0xoW13BwT52gxAAjmac0DxofR1945mfP82s +zBjofuMr/6Vhq0LHTl7VN8r7PP195EqzGA/c+OPSn2KCjeMh09w3n9ieWZUR6mUO +ZKIo4516d2+LL6wDyy6QyjTtD6bWlhY3MW3KJl35zjian0jWXuHquS0hj1cN52uU +CQ2iDVWVR63142maBe3Y6Yk0OZh+1ZwoinLD9ktq5uNFwCbHCyfsjp1adProV+D0 +fy2txGVaKlVY/yKY7QQinALxFuG42CTGO39xV/cISnOiQXifSTeepia33Q020ZzS +QblACVO+VS4ek1bO7O90A+0zLcoRpch+7cgRl4goLFKBZdObvNEpSfQXqMoCwteE +r9Y4DUBrs10BTAzGsSd182ioGu6xosOWnNZTtRK/ZhP49/dpDu7WzODYnxXl6pE/ +4TzDB7nhE0KBCtwOBSrlpvKdyy+6WXcaom/O9kLv9DdOH+DlZz51FoYHPQ70UG5E +9DCOucH3fbFbV8N/XtxJylUoC9X+PCe2lZd/udK/YzSj1+KGdMGXh3ZzYQEq1N2n +lbQil5GXm4tp3cBiii4/pGhn78h39mA15pAof9mULGTlL0YvNiGbrrnKw5hGSHs1 ++hOFG28CoB4NxMpYYMbWdCiTYoo5LKpLzU9PYCUzPsDbpHS+wf/2VDW5kUiEgZvF +leUYRFnBd3Wz6WB9ZNsHkr6JAjMEEAEIAB0WIQS4aChHdk32DfUtmSy8OQXyNRec +8QUCZykYBQAKCRC8OQXyNRec8V0ZD/4vu4DsQwH5iHS6uFm46W1lI22B7pv5Rstl +N3wNGx/Tjh75nQ0lZ1DaxosGm0aEhydqzhB3SBL5CRYHuUysnfW67HXlkGMWwa3K +or5Wgfwkg+9XwyvleiOoD5RhSlc/qewgut2RS83Ol4DnUjFi5UxZy63xJRVjOMPX +VgbU/wsXPJ2wiZph7ux75ETzkXf/Y+iRk17R3QaHfq7J8lI0PzReuvEulE6BptCA +c0bR2sv8MeN2hrcXRXkRSgbs0HBSuYFGVYpgItQV9b7yZCfpFUrwkhX1ZoevOL8o +Bkuidlvl0KM7R746XXqnJSh8sDxI3sFqqN6ezyGjb3sa0Td1quReaPmnenhg+6v8 +P6hkI0gf4FgyyG3jpW0Te/pXXQ/woDboyA2jmowTVDSQLUNRiLrxw94OCtAExZr6 +cX6b2LZoZ4DKLeoOFm7TckuE5gCG/jk5VFrCb28WrIqIFEA1WiBNGv5yHjPLBpqn +B9UtD7GLBUuqVPmf+IjNYJDSEDXl4pmAlXSRNcvg5YoF4mpI2ectWbgCFnY6kocy +yMTsESim8J70llYUiuO1D1OuuIHI7HTdqdaSabtviVnUcoM4j8LHLPwFm9iLOjuF +I50aMusUFMP9aTSzC+nMHg0qHkjo3uSCmlcxNpanfr4qZDHronNpmN6kaXVUw0V2 +CI/pLDqk77kCDQRnKRF7ARAArgRj7ToZ65fjAuVSoAxYKdsUQu6EFkZYUsQi8/pY +lLVY6957jlFVylV9gyncCrKaI1FqECVEy1JD1i1dJ2UE+SG01yhX+GqNw3LAx1uz +L5GzbulGT8MlULTJUvgAGtJKXCF81rjpfhm8+vwYYO+MBSEro1dDtatknFhH39TS +epEa0a48EuEV7LUfrSflrE/z7Z/2kUI1sMnXcduuFWO75FR4TwarlYkjl15rlJ9i +dcURGxP/M76nDtlppIOZYpHVrzw/oGQMPt7rdkhoBrzj0z8PP46DM0SBvJGO+Bs7 +Q4QitLbHrWUahbsX2msSDOP3s0iIG7qqk0Jgl5+Sl88Q2uT7CY5S2El+HoTu6mGW +WJBqazp2pcBzdn7EE32MV/vhGnNWYg8r8wU2vQRxQwWBRGkG1pOuTh0YyH76/mLi +orHHAkd/hGwYIOyAf1lkN6YrPmry4U1MjWRtOewo2353svjlT7f+ZGbiXbaDx674 +C8PpHgZ8qOzLMQULIYrtOZViPRj4QZH35htFDUZqFeq2tH9osLT0tLLFBOph8pTw +q6yehx4RsE6KARlQ0/JunOJvAeXVURX1ytHl5Pww8eCzzF2mNDuBG4+LXZ+9zze6 +elSw0gdILFmpeiKUazPb7OlfayLc/EG0r+1OjpkVEuKOEezbnRjVqCngzJdir3UD +ZVMAEQEAAYkCPAQYAQgAJhYhBGjSGCM0KhNoOus+TvtMaFtdwcE+BQJnKRF7AhsM +BQkDwmcAAAoJEPtMaFtdwcE+jMYP/Rh+SS0bAara89lQj8Wxy/5WcSpW33h0GdLT +/obJi+EjtN/zW/7vZRGVB5fxNRCjH0Hx3cCu7lvb6JKQ9y8fvQ9tjyO3/JPAe1KU +XN/r5g8iX6jJPPsOiIgtKOs7nWe2XyAqYhvxD1bvjFXpUUgnibysfTgwoWkiXNQO +rrrQlhAga05QW6BJ+DtotVT/SPhYooQp8B+D3fBhMop34mBEXLgVk+uJ6bse+VRK +LZUp992utQX89fflfviIp09CgQANmLwqQxlQsO3JDpk67aGIOkCuOjmENp0ozfXh +nrlWczXWGOISGZMXcjIYGWVvSoEiTQucFUe4xiaKoE0kRtqocuoiO7z9G8WVhX4A +whJ4DsHrySdslxqjXeiC0Om4niGmAKOPYHWfQ1YxyO7SC167Wx+whpBtYd68fa+C +XkskMI21Qk382hYHZSi/bvAS+yieDBjd27jROcz7l6PB/ivwPfBf4mlUICF+vc5z +SSfDXidGoU8B7UTsM1REnzF8RX2I9ECzCjqqiHsgjE0RNQbWvLBETE23q0eyiPHR +ZvQjQgHsKdZEr0Xqg1GnRLiRWCn4l6Fr00ZcUraGfyoEP+ulQ+yP852SIE34LsCL +TusI17P4gp2dR9eQ4mosI7J5TAL1Y+W4U8H1GeeCFgzjGExZ/xe9Is46T++A/GKp +HkA0s5uxuQINBGcpEuEBEAC6H5vY7GP2r5FFn6mQNV/8zo/TXIOYOHC1gfOL8tbw +8UcLqJCXMxF7K/VHmfe4ISkBn76Z1R4KCjZOYWdh2mbESB1owhb3y6p7h+4eGhdT +YyHh6I3uPIm9dAKyKMINjOJ+iPTcdjudNWPDj4FJK72QDf+8SpT0DliMbTUyZVIx +ohpOupmqyfKkrqvZ7ElrthVFjBGqktgLmSyKQNUr1+11+GOeydgZLiljJ8w1IdjU +oEykeNPvASQz4pnZZGmNNlnuc/27gt98kwqBxyVGB/7XcJ5Jol9UiGMmXEZUuSWg +Txcls56Ha+Qrbnt70F6cQWBCfIsKkYnxg2yewlWHFTVoDrZ1PuOac5UwGGcag2Ez +LPN+9TDRETPZVulkGSLBlF9n0xZQGzJud4fw3DNkxBAsJz/Kj+Oc+uYNL62CXgJc +bMG2nE9RlIy5ji0dlna8FvTNx+Fjs/UKse7KVcsXOQ479dE/fDUXwjVSokKN1MqN +2MIMX9Va150d57WISxIfE8Yfx8enhCmsEMPBng2d+KVg0cwNabpTVvOFfbKepwYC +tBJ3U3L+gvsnMTWqgf+c2vBW85JI1YVRNcVd4vL5I5cl0UmkY/7/BX6Bh/JzOhQ/ +q+YJ0rUezXlZC8rPI/+eYtLm4uKV/FUqvFkMjpI2tLh/9eQdwadgHIUpSGrmBU3R +lwARAQABiQRyBBgBCAAmFiEEaNIYIzQqE2g66z5O+0xoW13BwT4FAmcpEuECGwIF +CQPCZwACQAkQ+0xoW13BwT7BdCAEGQEIAB0WIQRyAOssP15IhGPAzp7NyujJJ8a+ +MQUCZykS4QAKCRDNyujJJ8a+MTGJD/9MpDYKL6yo1JUhzCD+TQajWLhwDuWEo11h +EEJohOEH2Myo2DbOA/OAQsFxpUkvzHDQTbHZm8F6Mzhf55OuaR259zEdHwH/MEXy +g+UPamCz/NmZkQ7WCrgJ1pvvIihU02t+gJlKHE4I9HbAiLFxhm23l/tnfNJeqSMh +5zqxM551PvlleulBu8g15SS84l8wI6JqKVq68N+/yTmIlRVs/4PHW85zzxu97BUl +xssgPgchGv89L6TUPXTMZucXvVOfEZmvtqcxkJIUIcnlZX4FLAccq3FHL5snXH0w +vjklyvVqdNd5och5Io3MUGKAlBKAe/R656CQPdGbD4hzE1viXnfqx6Vo1HRQDDHU +MLWqmMG2cT3+ld1MSxlDGr2QyuPR359UoWM4oANUimTHujR1nWOZtSZ2NBXIYOAc +T4SaB13vbr/Z+1auJba495QLphmKpu28GcKfAX5pXo/WesTQFYlyEvIGMMJ7ljah +cEBgXrHCkM98w+viixyrM9XhNZVQsGJuu1FaBLGa+KcgYXH1P3BAJV9fbnh2oFoA +SFEwiahP9g/7p69FkqpA4NGEjjg4bu5XvUhUAnwEcQE3yHG9AzdY+zV+HAwEULIZ ++v/H9Tj9zvxH0mHGRT1XCYxssZA/tU/VCB+IepmkcyTxlSZCfoot66vNZyfA8WTC +AU9kQPw5A4xfEACKjcOFavkoN3eYgIcAs1jQDaKlv8kfotIfG7RLcwtr9sXo9upF +jX58oxP9wVXGWf32s1Stf6ENFtzupuEqTG8aZydeeRxMdqH1t9SCERqeUqQGvWDW +KTfOASek7/Hf5ff06/6B73YwNrBXSeqT1H/21L5kP+mHvZD2THdl9U1IvR5bGO7A +HMVbRnCHlMBfitpKbJAKYBeLTk7diY2KrhqtJSDmgA4xFn533oOysBLhJ22XHr8K +4pMHMRoY9AtD3Ak0HRWZ395BZM/30phwB0jCPkEnk/Rnv7GGxWNA6e2fii2c/q83 +pG4O1itLoztMI39l4oK838bSdFpzgP4glfcJhi1heBqgO6h61Ra1zs7k/MdERNoG +3/jqhvaXN/pxPlDJW6NN/P6LSsYRzrem9cryZX4rsEVj8Mel0SGXWkPDZhgtsGZS +2FBZ2wvr9NW+kx7/Blp28n9vLcB5HNB66xS5y5Kj1Q03tiPy7d1GHE2CxKJT3oD9 +IWUCgHmzc6eHkrhYRUIG78g2N2L6vYEsl49KcDcjtWRET0dp/UPbyO0HObddt+3a +uzeU7XwVwKrDqR3siHd7S1ny5Qb1QO+pMMdNQcsBa/CurfyAooC7ZExpTToDmRHz +tFxCKLPE7AEjCIe5RYxTj8fLHp9ew4OESzQ7oAUNqs0NkZ57ZqYpMDJmkbkCDQRn +KRPFARAA7AZXVugEPe8MuygBPracbFtKpeIGw5vGelZs2J87Mz0FQY84ikexIffY +9kYb/4s2M10QJ/LI/VHKwfk5PuP3ZDy+BFCgbdf3zmBs6NjJlzTG8CRNK9bE6LLk +K4Xdfywnc1J6tANfCM/2pWotWP/cUHyeRrUcVLsrMLdmj+TMKjF5nf+FXc9NYiNy +gm+0FIIo9nI4nGdGpZ+LkE0mjdLZJHWbFX3rvNrBeJnwx54GXqsuE58IG3P2D5uq +tdlih6e4yfkmzaZwfSFph4xJXdRYgLiSKfOvUQnGz4vX+FUJUE2KINzoNdwVejP1 +lVz2SOllM4yhlUORGTI556f7lLJr3Ari14uYMswTj6mB4cJL9ZrgqtjIRZ7s2kbV +VORImdFL5/JgZNa3ASK7BPon1TS3V3mFvGEztgCGWc4Sc1WaprcGrfKomz0b/uCJ +xnsIgn0kEcpMnM6cp+kaHEFI6A6gI5pZbq5ULMOp+tg+YJQgpCZqcHjjXEkUa4dU +8wsGNWOzCgwoaQreAzooxEINhDne7qwUr4lyXwehsFJ7NUhQqkpVfchb13nTpwTQ +WFJb829Ym/QUgxWWjILYGk6NJZWATBe2T+bdIo+yAIBwKrOLvGWWhHz4T0LbFyL1 +x0Ybl9qCGBKNo/qPSoPDD+yVE9AlzkAMh66SQ5hMKJKIPBC1uUkAEQEAAYkCMwQY +AQgAJxYhBGjSGCM0KhNoOus+TvtMaFtdwcE+BQJnKRPFAxsgBAUJA8JnAAAANxYP +/iolEuftNwy1EwXjdif51f47XdivEEJPifVBWaI+watRxrhWDUn62tXogywauGS2 +mJpXSp4v+SbSHTabiAQNkoPJZZd15aERcVpNXL3IKlJdRYmXmBJdNLDGuoFbJYuU +suThRP2X2yTmYx3LQkDy6ehtXgz95dCCBHXUMveOLto7SGyrHLFeQlxrBaNUZbko +vURqgMogn8LDE4jmKkW54whFCNC/D0Cj/DZ+rXWpVdj3OSeTqkWSn9EMct6z7BUc +O15tl8n3FXsxvWZ/+TTd1PnoZoD9TcRe8nYV2BZH7N/5gwRr0w8MdijZQ0S+T2Y6 +Tbjszyz4557F2WQ+DIpbkDya1i5j91GPxboLiktwxZr53+8hSmbka7DQXmrQBaT3 +8VsF70cvO0R6+9Ge4deZ9Nl62j+cICJiDikKPqncmg3kIt5tHxi1ab0AkFtfWSBW ++pJTZWDBggWzEETPxa7aHvP95IJJ4iABEVtOUnpwGtGRcJXKFu/Qs9ZZR8BSqIS1 +0bGsDhfH+MqsjTYmNF1b9tmReNKRrwr5wOWlyv2LEFZbkuRaw52IvyMTF9MbDbkU +DtZ3UeIecG/foy7/Nv7T8jrd358ur3d7eWaZXH2pAXynk6R/iiNj1iggdWQtLu30 +CAWOb+5yakQZtfHI+TYKveX5vlHjXHd0Fb2TGK5alk3d +=uF78 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/SPECS/libselinux/libselinux.spec b/SPECS/libselinux/libselinux.spec new file mode 100644 index 00000000..fa436faa --- /dev/null +++ b/SPECS/libselinux/libselinux.spec @@ -0,0 +1,151 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define libsepol_ver 3.8.1 +Name: libselinux +Version: 3.8.1 +Release: %autorelease +Summary: SELinux runtime library and utilities +License: Public-Domain +URL: https://github.com/SELinuxProject/selinux/wiki/Releases +#!RemoteAsset +Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz.asc +Source2: libselinux.keyring +Source3: selinux-ready +Patch4: readv-proto.patch +Patch5: skip_cycles.patch +# Make linking working even when default pkg-config doesn’t provide -lpython +Patch6: python3.8-compat.patch +Patch7: swig4_moduleimport.patch +BuildRequires: libsepol-devel >= %{libsepol_ver} +BuildRequires: libsepol-static >= %{libsepol_ver} +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libpcre2-8) + +BuildSystem: autotools +BuildOption(build): LIBDIR="%{_libdir}" CC="%__cc" +BuildOption(build): CFLAGS="%{optflags} -fno-semantic-interposition -ffat-lto-objects" +BuildOption(build): USE_PCRE2=y +BuildOption(install): LIBDIR="%{_libdir}" +BuildOption(install): SHLIBDIR="%{_libdir}" +BuildOption(install): BINDIR="%{_bindir}" +BuildOption(install): SBINDIR="%{_sbindir}" + +%description +libselinux provides an interface to get and set process and file +security contexts and to obtain security policy decisions. + +%package -n selinux-tools +Summary: SELinux command-line utilities +Requires: %{name} = %{version} +Provides: libselinux-utils = %{version}-%{release} + +%description -n selinux-tools +Security-enhanced Linux is a feature of the kernel and some +utilities that implement mandatory access control policies, such as +Type Enforcement, Role-based Access Control and Multi-Level +Security. + +This subpackage contains utilities to inspect and administer the +system's SELinux state. + +%package devel +Summary: Development files for the SELinux runtime library +Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: libselinux = %{version} +#Automatic dependency on libsepol-devel via pkgconfig + +%description devel +libselinux provides an interface to get and set process and file +security contexts and to obtain security policy decisions. + +This package contains the development files, which are +necessary to develop your own software using libselinux. + +%package static +Summary: Static archives for the SELinux runtime +Requires: libselinux-devel = %{version} +Requires: pkgconfig(libpcre2-8) +Requires: pkgconfig(libsepol) + +%description static +libselinux provides an interface to get and set process and file +security contexts and to obtain security policy decisions. + +This package contains the static development files, which are +necessary to develop your own software using libselinux. + +# no configure scripts +%conf +: +%install -p +mkdir -p %{buildroot}/%{_lib} +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_sbindir} + + +%install -a +mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon +mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist +install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}/selinux-ready + +# TODO: enable test. +%check + + +%ldconfig_scriptlets + +%files -n selinux-tools +%{_sbindir}/avcstat +%{_sbindir}/getenforce +%{_sbindir}/getpolicyload +%{_sbindir}/getsebool +%{_sbindir}/matchpathcon +%{_sbindir}/selabel_digest +%{_sbindir}/selabel_lookup +%{_sbindir}/selinux_check_access +%{_sbindir}/selabel_compare +%{_sbindir}/selabel_lookup_best_match +%{_sbindir}/selabel_partial_match +%{_sbindir}/selinuxconlist +%{_sbindir}/selinuxdefcon +%{_sbindir}/selinuxenabled +%{_sbindir}/setenforce +%{_sbindir}/togglesebool +%{_sbindir}/selinux-ready +%{_sbindir}/selinuxexeccon +%{_sbindir}/sefcontext_compile +%{_sbindir}/compute_* +%{_sbindir}/getfilecon +%{_sbindir}/getpidcon +%{_sbindir}/policyvers +%{_sbindir}/setfilecon +%{_sbindir}/getseuser +%{_sbindir}/selinux_check_securetty_context +%{_sbindir}/selabel_get_digests_all_partial_matches +%{_sbindir}/validatetrans +%{_sbindir}/getpidprevcon +%{_mandir}/man5/* +%{_mandir}/man8/* + +%files +%{_libdir}/libselinux.so.* + +%files devel +%{_libdir}/libselinux.so +%{_includedir}/selinux/ +%{_mandir}/man3/* +%{_libdir}/pkgconfig/libselinux.pc + +%files static +%{_libdir}/libselinux.a + +%changelog +%{?autochangelog} diff --git a/SPECS/libselinux/python3.8-compat.patch b/SPECS/libselinux/python3.8-compat.patch new file mode 100644 index 00000000..f80a8689 --- /dev/null +++ b/SPECS/libselinux/python3.8-compat.patch @@ -0,0 +1,16 @@ +Index: libselinux-3.5/src/Makefile +=================================================================== +--- libselinux-3.5.orig/src/Makefile ++++ libselinux-3.5/src/Makefile +@@ -13,7 +13,11 @@ LIBDIR ?= $(PREFIX)/lib + SHLIBDIR ?= /lib + INCLUDEDIR ?= $(PREFIX)/include + PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) ++ifeq ($(shell $(PKG_CONFIG) --exists $(PYPREFIX)-embed && echo true), true) ++PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)-embed) ++else + PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) ++endif + PYTHONLIBDIR ?= $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '$(PREFIX)', 'base': '$(PREFIX)'}))") + PYCEXT ?= $(shell $(PYTHON) -c 'import importlib.machinery;print(importlib.machinery.EXTENSION_SUFFIXES[0])') + RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') diff --git a/SPECS/libselinux/readv-proto.patch b/SPECS/libselinux/readv-proto.patch new file mode 100644 index 00000000..0d6c133e --- /dev/null +++ b/SPECS/libselinux/readv-proto.patch @@ -0,0 +1,12 @@ +Index: libselinux-2.5/src/setrans_client.c +=================================================================== +--- libselinux-2.5.orig/src/setrans_client.c ++++ libselinux-2.5/src/setrans_client.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/SPECS/libselinux/selinux-ready b/SPECS/libselinux/selinux-ready new file mode 100644 index 00000000..10d93b71 --- /dev/null +++ b/SPECS/libselinux/selinux-ready @@ -0,0 +1,235 @@ +#!/bin/bash + +KERNEL="unknown" +INITRD="unknown" +TD="" + + +# init needs /selinux to be there +check_dir() +{ + SLDIRS="/selinux /sys/fs/selinux" + FOUND="no" + + for DIR in $SLDIRS; do + if [ -d $DIR ]; then + printf "\tcheck_dir: OK. $DIR exists.\n" + FOUND="yes" + fi + done + + if [ $FOUND == "yes" ]; then + return 0 + else + printf "\tcheck_dir: ERR. Neither of $SLDIRS does exist. Please execute 'mkdir /sys/fs/selinux' as root\n" + return 1 + fi +} + +check_filesystem() +{ + FSPATH="/proc/filesystems" + FSNAMES="securityfs selinuxfs" + OK="O" + + for FSNAME in $FSNAMES; do + grep -w $FSNAME $FSPATH 1>&2 >/dev/null + + if [ $? == 0 ]; then + printf "\tcheck_filesystem: OK. Filesystem '$FSNAME' exists.\n" + else + printf "\tcheck_filesystem: ERR. Filesystem '$FSNAME' is missing. Please enable SELinux while compiling the kernel.\n" + OK="1" + fi + done + if [ "$OK" == "0" ]; then + return 0; + else + return 1; + fi +} + +check_boot() +{ + printf "\tcheck_boot: Assuming GRUB2 as bootloader.\n" + + BPARAM1="security=selinux" + BPARAM2="selinux=1" + if grep $BPARAM1 /proc/cmdline | grep $BPARAM2 >/dev/null; then + printf "\tcheck_boot: OK. Current kernel has boot-parameters '$BPARAM1 $BPARAM2'\n" + return 0 + else + printf "\tcheck_boot: INFO. Boot-parameter missing for booting the kernel.\n" + printf "\t Newer (open)SUSE distributions (SLE 16 and up) use SELinux by default. For older versions\n" + printf "\t please add 'security=selinux selinux=1' to the kernel boot-parameter list to enable SELinux.\n" + return 1 + fi +} + +check_mkinitrd() +{ + MCMD="mount.*/root/proc.*" + + if ! [ -f "/boot/initrd" ];then + printf "\tcheck_mkinitrd: ERR. Unable to locate '/boot/initrd'\n" + return 2 + fi + + cp /boot/initrd $TD/ 2>/dev/null + + pushd . 2>&1>/dev/null + cd $TD + mkdir initrd-extracted + cd initrd-extracted + INITRD_FORMAT=$(file $TD/initrd | awk -F' ' '{print $2}') + case $INITRD_FORMAT in + 'XZ' ) + xz -d -c $TD/initrd | cpio -i --force-local --no-absolute-filenames 2>/dev/null ;; + 'ASCII' ) + /usr/lib/dracut/skipcpio $TD/initrd | zstd -d | cpio -i --force-local --no-absolute-filenames 2>/dev/null ;; + 'gzip' ) + gzip -d -c $TD/initrd | cpio -i --force-local --no-absolute-filenames 2>/dev/null ;; + 'Zstandard' ) + zstd -d -c $TD/initrd | cpio -i --force-local --no-absolute-filenames 2>/dev/null ;; + * ) + printf "\tcheck_mkinitrd: ERR. Error while extracting initrd file.'\n" + return 2 + esac + if [ -d boot ]; then + grep -E -- $MCMD boot/* 2>&1 >/dev/null + FLG1=$? + grep -E -- load_policy boot/* 2>&1 >/dev/null + FLG2=$? + else + # looks like we're using dracut/systemd. We can only check if libselinux1 + # exists + if [ -f usr/lib64/libselinux.so.1 ]; then + # if this exists + FLG1=0 + FLG2=0 + fi + fi + popd 2>&1>/dev/null + + if [ $FLG1 == 0 -a $FLG2 == 0 ];then + printf "\tcheck_mkinitrd: OK. Your initrd seems to be correct.\n" + return 0 + else + printf "\tcheck_mkinitrd: ERR. Your initrd seems not to mount /proc of\n" + printf "\t the root filesystem during boot and/or load_policy\n" + printf "\t is missing,\n" + printf "\t this may be a reason for SELinux not working.\n" + return 1 + fi +} + +check_pam() +{ + AA_PAM=0 + SE_PAM=0 + + # test for AA pam module + grep apparmor /etc/pam.d/* 2>&1 >/dev/null + FLG=$? + if [ $FLG == 0 ]; then + AA_PAM=1 + fi + + # test for SELinux pam module + grep selinux /etc/pam.d/* 2>&1 >/dev/null + FLG=$? + if [ $FLG == 0 ]; then + SE_PAM=1 + fi + + # suggest config + if [ $SE_PAM == 1 ] && [ $AA_PAM == 0 ]; then + printf "\tcheck_pam: OK. Your PAM configuration seems to be correct.\n" + return 0 + fi + printf "\tcheck_pam: ERR. Your PAM configuration seems to be incorrect.\n" + if [ $AA_PAM == 1 ]; then + printf " execute 'pam-config -d --apparmor' as root\n" + fi + if [ $SE_PAM == 0 ]; then + printf " execute 'pam-config -a --selinux' as root\n" + fi + + return 1 +} + +check_initupstart() +{ + CFGFILE="/etc/selinux/config" + + if ! [ -f $CFGFILE ]; then + printf "\tcheck_initupstart: ERR. $CFGFILE does not exist.\n" + return 1; + fi +} + +check_packages() +{ + PKGLST="checkpolicy policycoreutils selinux-tools libselinux1 libsepol2 libsemanage2" + FAIL=0 + + for i in $PKGLST + do + rpm -q $i 1>&2 >/dev/null + if [ $? == 1 ];then + printf "\tcheck_packages: ERR. Package '$i' not installed, please run 'zypper in $i' as root\n" + FAIL=1 + fi + done + + if [ $FAIL == 0 ]; then + printf "\tcheck_packages: OK. All essential packages are installed\n" + return 0 + else + return 1 + fi +} + +check_config() +{ + CF="/etc/selinux/config" + + if [ -f $CF ];then + printf "\tcheck_config: OK. Config file seems to be there.\n" + # with -L because /etc/selinux/config is now a link to /etc/sysconfig/selinux-policy + if ! [ $(stat -L --printf=%a $CF) -eq "644" ]; then + printf "\tcheck_config: ERR. Config file '$CF' has wrong permissions.\n" + return 1 + fi + + # check that SELINUX is not disabled there + SELINUX_MODE=$(grep "^\s*SELINUX\s*=" $CF | sed "s/SELINUX\s*=\(\S*\)\s*"/\\1/) + case "$SELINUX_MODE" in + permissive | enforcing ) + printf "\tcheck_config: OK. SELINUX is set to '$SELINUX_MODE'.\n" + return 0 + ;; + * ) + printf "\tcheck_config: ERR. SELINUX is set to '$SELINUX_MODE' in '$CF'. Should be either 'permissive' or 'enforcing'\n" + return 1 + ;; + esac + else + printf "\tcheck_config: ERR. Config file '$CF' is missing.\n" + return 1 + fi +} + +TD=$(mktemp -q -d /tmp/selinux-ready.XXXXXX) + +echo "Start checking your system if it is selinux-ready or not:" +check_dir +check_filesystem +check_boot +check_mkinitrd +check_packages +check_config +check_initupstart +check_pam + +rm -rf $TD diff --git a/SPECS/libselinux/skip_cycles.patch b/SPECS/libselinux/skip_cycles.patch new file mode 100644 index 00000000..a0c1675e --- /dev/null +++ b/SPECS/libselinux/skip_cycles.patch @@ -0,0 +1,14 @@ +Index: libselinux-3.4-rc3/src/selinux_restorecon.c +=================================================================== +--- libselinux-3.4-rc3.orig/src/selinux_restorecon.c ++++ libselinux-3.4-rc3/src/selinux_restorecon.c +@@ -871,7 +871,8 @@ loop_body: + errno = ELOOP; + state->error = -1; + state->abort = true; +- goto finish; ++ fts_set(fts, ftsent, FTS_SKIP); ++ continue; + case FTS_DP: + continue; + case FTS_DNR: diff --git a/SPECS/libselinux/swig4_moduleimport.patch b/SPECS/libselinux/swig4_moduleimport.patch new file mode 100644 index 00000000..43274e43 --- /dev/null +++ b/SPECS/libselinux/swig4_moduleimport.patch @@ -0,0 +1,13 @@ +Index: libselinux-2.9/src/selinuxswig_python.i +=================================================================== +--- libselinux-2.9.orig/src/selinuxswig_python.i 2019-03-15 10:32:30.000000000 +0000 ++++ libselinux-2.9/src/selinuxswig_python.i 2019-12-16 15:03:46.133451617 +0000 +@@ -6,7 +6,7 @@ + #define DISABLE_RPM + #endif + +-%module selinux ++%module(moduleimport="import $module") selinux + %{ + #include "selinux/selinux.h" + %} diff --git a/SPECS/libsemanage/libsemanage.spec b/SPECS/libsemanage/libsemanage.spec new file mode 100644 index 00000000..86cefd7d --- /dev/null +++ b/SPECS/libsemanage/libsemanage.spec @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libsemanage +Version: 3.9 +Release: %autorelease +Summary: SELinux policy management library and utilities +License: LGPL-2.1-or-later +URL: https://github.com/SELinuxProject/selinux/wiki/Releases +#!RemoteAsset +Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz +Source1: semanage.conf +BuildSystem: autotools + +BuildRequires: audit-devel bison flex bzip2-devel libselinux-devel libsepol-devel +BuildRequires: pkgconfig make gcc + + +BuildOption(build): CFLAGS="%{optflags} -fno-semantic-interposition" +BuildOption(build): LIBDIR="%{_libdir}" +BuildOption(build): LIBEXECDIR="%{_libexecdir}" +BuildOption(build): SHLIBDIR="%{_libdir}" + +BuildOption(install): LIBDIR="%{_libdir}" +BuildOption(install): LIBEXECDIR="%{_libexecdir}" +BuildOption(install): SHLIBDIR="%{_libdir}" + +%description +libsemanage is the SELinux policy management library. It is used to +manipulate SELinux policies. This package contains the runtime library, +configuration files, and policy migration tools. + +%package devel +Summary: Development files for the SELinux policy management library +Requires: %{name} = %{version} + +%description devel +The libsemanage-devel package contains the header files, static and shared +libraries needed for developing applications that manipulate SELinux policies. + +%prep -a +grep /usr/libexec . -rl | xargs sed -i "s|/usr/libexec|%{_libexecdir}|g" + +# No configure +%conf + +%install -a +install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/selinux/semanage.conf +install -d -m 755 %{buildroot}%{_localstatedir}/lib/selinux + +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libsemanage.so.* +%dir %{_localstatedir}/lib/selinux +%dir %{_libexecdir}/selinux +%{_libexecdir}/selinux/* +%dir %{_sysconfdir}/selinux +%config(noreplace) %{_sysconfdir}/selinux/semanage.conf + +%files devel +%{_libdir}/libsemanage.so +%{_libdir}/libsemanage.a +%{_libdir}/pkgconfig/libsemanage.pc +%{_includedir}/semanage/ +%{_mandir}/man3/* +%{_mandir}/man5/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libsemanage/semanage.conf b/SPECS/libsemanage/semanage.conf new file mode 100644 index 00000000..bc9d4ac9 --- /dev/null +++ b/SPECS/libsemanage/semanage.conf @@ -0,0 +1,51 @@ +# Authors: Jason Tang +# +# Copyright (C) 2004-2005 Tresys Technology, LLC +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# Specify how libsemanage will interact with a SELinux policy manager. +# The four options are: +# +# "source" - libsemanage manipulates a source SELinux policy +# "direct" - libsemanage will write directly to a module store. +# /foo/bar - Write by way of a policy management server, whose +# named socket is at /foo/bar. The path must begin +# with a '/'. +# foo.com:4242 - Establish a TCP connection to a remote policy +# management server at foo.com. If there is a colon +# then the remainder is interpreted as a port number; +# otherwise default to port 4242. +module-store = direct + +# When generating the final linked and expanded policy, by default +# semanage will set the policy version to POLICYDB_VERSION_MAX, as +# given in . Change this setting if a different +# version is necessary. +#policy-version = 19 + +# expand-check check neverallow rules when executing all semanage commands. +# Large penalty in time if you turn this on. +expand-check=0 + +# usepasswd check tells semanage to scan all pass word records for home directories +# and setup the labeling correctly. If this is turned off, SELinux will label /home +# correctly only. You will need to use semanage fcontext command. +# For example, if you had home dirs in /althome directory you would have to execute +# semanage fcontext -a -e /home /althome +usepasswd=False +bzip-small=true +bzip-blocksize=5 +ignoredirs=/root diff --git a/SPECS/libsepol/libsepol.spec b/SPECS/libsepol/libsepol.spec new file mode 100644 index 00000000..0050b7fb --- /dev/null +++ b/SPECS/libsepol/libsepol.spec @@ -0,0 +1,92 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libsepol +Version: 3.8.1 +Release: %autorelease +Summary: SELinux binary policy manipulation library +License: LGPL-2.1-or-later +URL: https://github.com/SELinuxProject/selinux/wiki/Releases +#!RemoteAsset +Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz.asc +BuildRequires: flex +BuildRequires: pkgconfig +BuildOption(install): LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" +BuildSystem: autotools + + + +%description +libsepol provides an API for the manipulation of SELinux binary +policies. It is used by checkpolicy (the policy compiler) and similar +tools, as well as by programs like load_policy that need to perform +specific transformations on binary policies such as customizing +policy boolean settings. + +%package utils +Summary: SELinux binary policy manipulation tools + +%description utils +libsepol provides an API for the manipulation of SELinux binary +policies. It is used by checkpolicy (the policy compiler) and similar +tools, as well as by programs like load_policy that need to perform +specific transformations on binary policies such as customizing +policy boolean settings. + +%package devel +Summary: Development files for SELinux's binary policy manipulation library +Requires: %{name} = %{version} +Requires: glibc-devel + +%description devel +The libsepol-devel package contains the libraries and header files +needed for developing applications that manipulate binary SELinux +policies. + +%package static +Summary: Static archives for SELinux's binary policy manipulation library +Requires: libsepol-devel = %{version} + +%description static +The libsepol-devel-static package contains the static libraries +needed for developing applications that manipulate binary SELinux +policies. + +%ldconfig_scriptlets + +# no configure script +%conf +: + +%files utils +%defattr(-,root,root) +%{_bindir}/chkcon +%{_bindir}/sepol_check_access +%{_bindir}/sepol_compute_av +%{_bindir}/sepol_compute_member +%{_bindir}/sepol_compute_relabel +%{_bindir}/sepol_validate_transition +%{_mandir}/man8/*.8%{ext_man} + +%files +%defattr(-,root,root) +%{_libdir}/libsepol.so.* + +%files devel +%defattr(-,root,root) +%{_libdir}/libsepol.so +%{_mandir}/man3/*.3%{ext_man} +%{_includedir}/sepol/ +%{_libdir}/pkgconfig/libsepol.pc + +%files static +%defattr(-,root,root) +%{_libdir}/libsepol.a + +%changelog +%{?autochangelog} diff --git a/SPECS/libsigsegv/libsigsegv.spec b/SPECS/libsigsegv/libsigsegv.spec new file mode 100644 index 00000000..2813d95f --- /dev/null +++ b/SPECS/libsigsegv/libsigsegv.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libsigsegv +Version: 2.15 +Release: %autorelease +Summary: Library for Handling Page Faults in User Mode +License: GPL-2.0-or-later +#!RemoteAsset +URL: https://www.gnu.org/software/%{name}/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig + +BuildSystem: autotools +BuildOption: --enable-shared + +%description +This is a library for handling page faults in user mode. A page fault occurs +when a program tries to access to a region of memory that is currently not +available. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This is a library for handling page faults in user mode. A page fault occurs +when a program tries to access to a region of memory that is currently not +available. + +%files +%license COPYING +%doc AUTHORS ChangeLog* NEWS PORTING README +%{_libdir}/libsigsegv.so.* + +%files devel +%{_includedir}/sigsegv.h +%{_libdir}/libsigsegv.so +%{_libdir}/libsigsegv.a + +%changelog +%{?autochangelog} diff --git a/SPECS/libsodium/libsodium.spec b/SPECS/libsodium/libsodium.spec new file mode 100644 index 00000000..f710fb5d --- /dev/null +++ b/SPECS/libsodium/libsodium.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libsodium +Version: 1.0.20 +Release: %autorelease +Summary: Portable NaCl-based crypto library +License: ISC +URL: https://github.com/jedisct1/libsodium +#!RemoteAsset +Source: https://download.libsodium.org/libsodium/releases/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules + +BuildRequires: gcc + +%description +Sodium is a portable, cross-compilable, installable, packageable fork of NaCl, +a new easy-to-use high-speed software library for network communication, +encryption, decryption, signatures, etc. + +%package devel +Summary: Development files for the libsodium crypto library +Requires: %{name} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to compile and develop applications that use libsodium. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/%{name}.so.26* + +%files devel +%doc AUTHORS ChangeLog README.markdown THANKS +%{_includedir}/sodium.h +%{_includedir}/sodium +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libsolv/libsolv.spec b/SPECS/libsolv/libsolv.spec new file mode 100644 index 00000000..c0bb3c19 --- /dev/null +++ b/SPECS/libsolv/libsolv.spec @@ -0,0 +1,101 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libsolv +Version: 0.7.35 +Release: %autorelease +Summary: A free package dependency solver using a satisfiability algorithm +License: BSD-3-Clause +URL: https://github.com/openSUSE/libsolv +#!RemoteAsset +Source: https://github.com/openSUSE/libsolv/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DFEDORA=1 +BuildOption(conf): -DENABLE_COMPLEX_DEPS=ON +BuildOption(conf): -DENABLE_RPMDB=ON +BuildOption(conf): -DENABLE_RPMDB_BYRPMHEADER=ON +BuildOption(conf): -DENABLE_RPMDB_LIBRPM=ON +BuildOption(conf): -DENABLE_RPMPKG_LIBRPM=ON +BuildOption(conf): -DENABLE_RPMMD=ON +BuildOption(conf): -DUSE_VENDORDIRS=ON +BuildOption(conf): -DWITH_LIBXML2=ON +BuildOption(conf): -DENABLE_LZMA_COMPRESSION=ON +BuildOption(conf): -DENABLE_BZIP2_COMPRESSION=ON +BuildOption(conf): -DENABLE_ZSTD_COMPRESSION=ON +BuildOption(conf): -DENABLE_ZCHUNK_COMPRESSION=ON +BuildOption(conf): -DENABLE_CONDA=ON +BuildOption(conf): -DENABLE_SUSEREPO=ON +BuildOption(conf): -DENABLE_COMPS=ON +BuildOption(conf): -DENABLE_PERL=ON # Requires: swig, perl-devel +BuildOption(conf): -DENABLE_RUBY=OFF # Requires: swig, ruby-devel +BuildOption(conf): -DENABLE_PYTHON=ON # Requires: swig, python3-devel +BuildOption(conf): -DENABLE_APPDATA=OFF # Requires: pkgconfig(appstream-glib) +BuildOption(conf): -DENABLE_HELIXREPO=ON # Requires: pkgconfig(sqlite3) +BuildOption(conf): -DENABLE_DEBIAN=OFF +BuildOption(conf): -DENABLE_ARCHREPO=OFF + + +# BuildRequires: swig perl-devel ruby-devel python3-devel +# BuildRequires: pkgconfig(appstream-glib) pkgconfig(sqlite3) + +BuildRequires: pkgconfig(openssl) pkgconfig(yaml-0.1) +BuildRequires: libzstd-devel +BuildRequires: pkgconfig(zck) +BuildRequires: cmake gcc-c++ ninja pkgconfig(rpm) zlib-devel +BuildRequires: libxml2-devel xz-devel bzip2-devel +BuildRequires: swig perl-devel python3-devel pkgconfig(sqlite3) perl-macros + +%description +libsolv is a free package dependency solver using a satisfiability algorithm. +It uses a dictionary approach to store and retrieve package and dependency +information, and satisfiability for resolving dependencies. This package +contains the core C/C++ library and command-line tools. + +%package devel +Summary: Development files for libsolv +Requires: %{name} = %{version} +Requires: rpm-devel + +%description devel +Development files for the libsolv library. + +%ldconfig_scriptlets + +%files +%license LICENSE* +%{_libdir}/lib*.so.* +%{_bindir}/deltainfoxml2solv +%{_bindir}/dumpsolv +%{_bindir}/installcheck +%{_bindir}/mergesolv +%{_bindir}/repomdxml2solv +%{_bindir}/rpmdb2solv +%{_bindir}/rpmmd2solv +%{_bindir}/rpms2solv +%{_bindir}/testsolv +%{_bindir}/comps2solv +%{_bindir}/conda2solv +%{_bindir}/susetags2solv +%{_bindir}/updateinfoxml2solv +%{_bindir}/repo2solv +%{_bindir}/solv +%{_mandir}/man1/* +%{_mandir}/man3/lib*.3* +%{perl_vendorarch}/solv.pm +%{perl_vendorarch}/solv.so + +%files devel +%{_libdir}/lib*.so +%{_includedir}/solv/ +%{_libdir}/pkgconfig/lib*.pc +%dir %{_datadir}/cmake/Modules/ +%{_datadir}/cmake/Modules/FindLibSolv.cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/libspiro/libspiro.spec b/SPECS/libspiro/libspiro.spec new file mode 100644 index 00000000..eb4c43ad --- /dev/null +++ b/SPECS/libspiro/libspiro.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libspiro +Version: 20240903 +Release: %autorelease +Summary: Library implementing the Unicode Bidirectional Algorithm +License: GPL-3.0-or-later +URL: https://github.com/fontforge/libspiro +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/%{name}-dist-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make + +%description +This library will take an array of spiro control points and +convert them into a series of bézier splines which can then +be used in the myriad of ways the world has come to use béziers. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%files +%doc README* ChangeLog AUTHORS +%license COPYING +%{_libdir}/*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/libspiro.pc +%{_mandir}/man3/libspiro.3.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/libspng/libspng.spec b/SPECS/libspng/libspng.spec new file mode 100644 index 00000000..19676115 --- /dev/null +++ b/SPECS/libspng/libspng.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libspng +Version: 0.7.4 +Release: %autorelease +Summary: Simple, modern libpng alternative +License: BSD-2-Clause +URL: https://libspng.org/ +#!RemoteAsset +Source0: https://github.com/randy408/libspng/archive/v%{version}/libspng-%{version}.tar.gz +BuildSystem: meson + +BuildOption(conf): -Ddev_build=true +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: meson +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(zlib) + +%description +Libspng is a C library for reading and writing Portable Network Graphics (PNG) +format files with a focus on security and ease of use. + +Libspng is an alternative to libpng, the projects are separate and the APIs are +not compatible. This package contains the runtime shared library. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc CONTRIBUTING.md README.md +%{_libdir}/libspng.so.0 +%{_libdir}/libspng.so.0.* + +%files devel +%doc docs +%{_includedir}/spng.h +%{_libdir}/libspng.so +%{_libdir}/pkgconfig/spng.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libssh/libssh.spec b/SPECS/libssh/libssh.spec new file mode 100644 index 00000000..b2d165a6 --- /dev/null +++ b/SPECS/libssh/libssh.spec @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# If we want to enable building pkcs11, change this to 1 +%bcond pkcs11 0 +%bcond gssapi 0 + +Name: libssh +Version: 0.11.3 +Release: %autorelease +Summary: A library implementing the SSH protocol +License: LGPL-2.1-or-later +URL: http://www.libssh.org +#!RemoteAsset +Source0: https://www.libssh.org/files/0.11/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.libssh.org/files/0.11/%{name}-%{version}.tar.xz.asc +Source2: libssh_client.config +Source3: libssh_server.config +BuildSystem: cmake + +# We need sshd to run some tests +BuildOption(conf): -DUNIT_TESTING=OFF +BuildOption(conf): -DCLIENT_TESTING=OFF +BuildOption(conf): -DSERVER_TESTING=OFF +%if %{with gssapi} +BuildOption(conf): -DGSSAPI_TESTING=ON +%else +BuildOption(conf): -DWITH_GSSAPI=OFF +%endif +%if %{with pkcs11} +BuildOption(conf): -DWITH_PKCS11_URI=ON +BuildOption(conf): -DWITH_PKCS11_PROVIDER=ON +%endif + +BuildRequires: cmake +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: zlib-devel +%if %{with gssapi} +BuildRequires: krb5-devel +%endif +BuildRequires: cmocka-cmake +BuildRequires: pam_wrapper +BuildRequires: socket_wrapper +BuildRequires: nss_wrapper +BuildRequires: uid_wrapper +BuildRequires: priv_wrapper +%if %{with pkcs11} +BuildRequires: pkcs11-provider +BuildRequires: p11-kit-devel +BuildRequires: p11-kit-server +BuildRequires: opensc +BuildRequires: softhsm +BuildRequires: gnutls +%endif + +Requires: %{name}-config = %{version}-%{release} + +# Please Enable this back once we have crypto-policies +#Recommends: crypto-policies + + +%description +The ssh library was designed to be used by programmers needing a working SSH +implementation by the mean of a library. The complete control of the client is +made by the programmer. With libssh, you can remotely execute programs, transfer +files, use a secure and transparent tunnel for your remote programs. With its +Secure FTP implementation, you can play with remote files easily, without +third-party programs others than libcrypto (from openssl). + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: cmake-filesystem + +%description devel +The %{name}-devel package contains libraries and header files for developing +applications that use %{name}. + +%package config +Summary: Configuration files for %{name} +BuildArch: noarch + +%description config +The %{name}-config package provides the default configuration files for %{name}. + +%install -a +install -d -m755 %{buildroot}%{_sysconfdir}/libssh +install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/libssh/libssh_client.config +install -m644 %{SOURCE3} %{buildroot}%{_sysconfdir}/libssh/libssh_server.config + +%ldconfig_scriptlets + +%files +%doc AUTHORS BSD CHANGELOG README +%license COPYING +%{_libdir}/libssh.so.4* + +%files devel +%{_includedir}/libssh/ +%{_libdir}/cmake/libssh/ +%{_libdir}/pkgconfig/libssh.pc +%{_libdir}/libssh.so + +%files config +%attr(0755,root,root) %dir %{_sysconfdir}/libssh +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/libssh/libssh_client.config +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/libssh/libssh_server.config + +%changelog +%{?autochangelog} diff --git a/SPECS/libssh/libssh_client.config b/SPECS/libssh/libssh_client.config new file mode 100644 index 00000000..1d293bdf --- /dev/null +++ b/SPECS/libssh/libssh_client.config @@ -0,0 +1,4 @@ +# Parse system-wide crypto configuration file +Include /etc/crypto-policies/back-ends/libssh.config +# Parse OpenSSH configuration file for consistency +Include /etc/ssh/ssh_config diff --git a/SPECS/libssh/libssh_server.config b/SPECS/libssh/libssh_server.config new file mode 100644 index 00000000..d3ef5c2d --- /dev/null +++ b/SPECS/libssh/libssh_server.config @@ -0,0 +1,2 @@ +# Parse system-wide crypto configuration file +Include /etc/crypto-policies/back-ends/libssh.config diff --git a/SPECS/libssh2/libssh2.spec b/SPECS/libssh2/libssh2.spec new file mode 100644 index 00000000..8f9cd109 --- /dev/null +++ b/SPECS/libssh2/libssh2.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libssh2 +Version: 1.11.1 +Release: %autorelease +Summary: A library implementing the SSH2 protocol +License: BSD-3-Clause +URL: https://www.libssh2.org/ +#!RemoteAsset +Source: https://libssh2.org/download/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-docker-tests +BuildOption(conf): --disable-static + +BuildRequires: coreutils findutils zlib-devel +BuildRequires: gcc make sed openssl-devel +BuildRequires: groff + +%description +libssh2 is a library implementing the SSH2 protocol. It supports +authenticated key exchange, arbitrary channel communication, and a variety +of SFTP and SCP operations. + +%package devel +Summary: Development files for libssh2 +Requires: pkgconfig +Requires: %{name} = %{version} + +%description devel +The libssh2-devel package contains libraries, header files, API documentation, +and examples for developing applications that use libssh2. + +%install -a +make -C example clean +rm -rf example/.deps +find example/ -type f '(' -name '*.am' -o -name '*.in' ')' -delete +mv -v example example.%{_arch} + +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc docs/AUTHORS NEWS README RELEASE-NOTES +%{_libdir}/*.so.* + +%files devel +%doc docs/BINDINGS.md docs/HACKING.md docs/TODO +%doc example.%{_arch}/ +%{_mandir}/man3/libssh2_*.3* +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libtalloc/libtalloc.spec b/SPECS/libtalloc/libtalloc.spec new file mode 100644 index 00000000..3c522495 --- /dev/null +++ b/SPECS/libtalloc/libtalloc.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libtalloc +Version: 2.4.3 +Release: %autorelease +Summary: A hierarchical memory allocator with destructors +License: LGPL-3.0-or-later +URL: https://talloc.samba.org/ +#!RemoteAsset +Source: https://www.samba.org/ftp/talloc/talloc-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --disable-rpath-install +BuildOption(conf): --bundled-libraries=NONE +BuildOption(conf): --builtin-libraries=replace +BuildOption(conf): --disable-silent-rules + +BuildRequires: make +BuildRequires: gcc +BuildRequires: python3-devel + +Provides: bundled(libreplace) + +%description +A library that implements a hierarchical, pool-based memory allocator with +destructors, which greatly simplifies memory management in complex C programs. + +%package devel +Summary: Development files for the Talloc library +Requires: libtalloc = %{version} + +%description devel +Header files and development libraries needed to build applications that +link against the Talloc library. + +%package -n python3-talloc +Summary: Python bindings for the Talloc library +Requires: libtalloc = %{version} + +%description -n python3-talloc +Python 3 bindings and libraries for using Talloc in Python applications. + +%package -n python3-talloc-devel +Summary: Development files for python3-talloc +Requires: python3-talloc = %{version} + +%description -n python3-talloc-devel +Development files for the python3-talloc bindings. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%ldconfig_scriptlets -n python3-talloc + +%files +%license LICENSE +%{_libdir}/libtalloc.so.* + +%files devel +%{_includedir}/talloc.h +%{_libdir}/libtalloc.so +%{_libdir}/pkgconfig/talloc.pc + +%files -n python3-talloc +%{_libdir}/libpytalloc-util.cpython*.so.* +%{python3_sitearch}/talloc.cpython*.so + +%files -n python3-talloc-devel +%{_includedir}/pytalloc.h +%{_libdir}/pkgconfig/pytalloc-util.cpython-*.pc +%{_libdir}/libpytalloc-util.cpython*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/libtar/libtar.spec b/SPECS/libtar/libtar.spec new file mode 100644 index 00000000..a96134c0 --- /dev/null +++ b/SPECS/libtar/libtar.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libtar +Version: 1.2.20 +Release: %autorelease +Summary: Library for manipulating tar files from within C programs +License: BSD-3-Clause +URL: http://repo.or.cz/libtar.git +#!RemoteAsset +Source: http://repo.or.cz/libtar.git/snapshot/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildRequires: libtool autoconf automake gcc + +%description +Libtar is a C library for manipulating POSIX tar files. It handles adding +and extracting files to/from a tar archive. Requires gcc, make, and zlib. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, documentation, and other development +files for the libtar library. + +%prep -a +# set correct version for .so build +%global ltversion %(echo %{version} | tr '.' ':') +sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %{ltversion}/' \ + lib/Makefile.in + +%conf -p +autoreconf -fi + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + + +%ldconfig_scriptlets + +%files +%doc TODO README ChangeLog* +%license COPYRIGHT +%{_bindir}/%{name} +%{_libdir}/lib*.so.* + +%files devel +%{_includedir}/libtar.h +%{_includedir}/libtar_listhash.h +%{_libdir}/lib*.so +%{_mandir}/man3/*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/libtasn1/libtasn1.spec b/SPECS/libtasn1/libtasn1.spec new file mode 100644 index 00000000..d8a3232a --- /dev/null +++ b/SPECS/libtasn1/libtasn1.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libtasn1 +Version: 4.20.0 +Release: %autorelease +Summary: ASN.1 parsing library +License: GFDL-1.3-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later +URL: https://www.gnu.org/software/libtasn1/ +#!RemoteAsset +Source0: http://ftpmirror.gnu.org/gnu/libtasn1/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: http://ftpmirror.gnu.org/gnu/libtasn1/%{name}-%{version}.tar.gz.sig + +BuildRequires: perl +BuildRequires: autoconf +BuildRequires: automake +BuildSystem: autotools +BuildOption(conf): --disable-static +%description +This is the ASN.1 library used by GNUTLS. Abstract Syntax Notation One (ASN.1) +is a standardized data description and serialization language. + +%package devel +Summary: Development files for the ASN.1 parsing library +License: GFDL-1.3-or-later AND LGPL-2.1-or-later +Requires: %{name} = %{version} + +%description devel +This is the ASN.1 library used by GNUTLS. Abstract Syntax Notation One (ASN.1) +is a standardized data description and serialization language. + +%ldconfig_scriptlets + +%files +%license COPYING +%{_bindir}/* +%{_libdir}/*.so* +%{_infodir}/* +%{_mandir}/man?/* + + +%files devel +%license COPYING.LESSERv2 +%doc NEWS README THANKS +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/libtasn1.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libthai/libthai.spec b/SPECS/libthai/libthai.spec new file mode 100644 index 00000000..39eb9131 --- /dev/null +++ b/SPECS/libthai/libthai.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libthai +Version: 0.1.29 +Release: %autorelease +Summary: Thai language support routines +License: LGPL-2.1-or-later +URL: https://linux.thai.net/plone/TLWG/libthai/ +VCS: git:https://github.com/tlwg/libthai +#!RemoteAsset +Source0: http://linux.thai.net/pub/thailinux/software/libthai/libthai-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: pkgconfig(datrie-0.2) + +%description +LibThai is a set of Thai language support routines aimed to ease +developers' tasks to incorporate Thai language support in their applications. +It includes important Thai-specific functions e.g. word breaking, input and +output methods as well as basic character and string supports. + +%package devel +Summary: Thai language support routines +Requires: %{name} = %{version}-%{release} + +%description devel +The libthai-devel package includes the header files and developer docs +for the libthai package. + +Install libthai-devel if you want to develop programs which will use +libthai. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%doc README AUTHORS COPYING ChangeLog +%{_libdir}/lib*.so.* +%{_datadir}/libthai + +%files devel +%{_includedir}/thai +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libtiff/libtiff-4.0.3-seek.patch b/SPECS/libtiff/libtiff-4.0.3-seek.patch new file mode 100644 index 00000000..2795e525 --- /dev/null +++ b/SPECS/libtiff/libtiff-4.0.3-seek.patch @@ -0,0 +1,13 @@ +Index: tiff-4.6.0/libtiff/tiffiop.h +=================================================================== +--- tiff-4.6.0.orig/libtiff/tiffiop.h ++++ tiff-4.6.0/libtiff/tiffiop.h +@@ -256,7 +256,7 @@ struct TIFFOpenOptions + #define TIFFWriteFile(tif, buf, size) \ + ((*(tif)->tif_writeproc)((tif)->tif_clientdata, (buf), (size))) + #define TIFFSeekFile(tif, off, whence) \ +- ((*(tif)->tif_seekproc)((tif)->tif_clientdata, (off), (whence))) ++ ((tif)->tif_seekproc?((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence)):0) + #define TIFFCloseFile(tif) ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) + #define TIFFGetFileSize(tif) ((*(tif)->tif_sizeproc)((tif)->tif_clientdata)) + #define TIFFMapFileContents(tif, paddr, psize) \ diff --git a/SPECS/libtiff/libtiff-4.7.0-test_directory.patch b/SPECS/libtiff/libtiff-4.7.0-test_directory.patch new file mode 100644 index 00000000..bb7933be --- /dev/null +++ b/SPECS/libtiff/libtiff-4.7.0-test_directory.patch @@ -0,0 +1,167 @@ +From ea6f6bd7bccbe9a80327810993b8aae5587e1307 Mon Sep 17 00:00:00 2001 +From: Su Laus +Date: Tue, 19 Nov 2024 18:34:02 +0000 +Subject: [PATCH] Update test/test_directory.c not to fail on big-endian + machines. Fix memory leaks + +Closes #652 et #656 +--- + test/test_directory.c | 67 ++++++++++++++++++++++++++++++++++++------- + 1 file changed, 56 insertions(+), 11 deletions(-) + +diff --git a/test/test_directory.c b/test/test_directory.c +index 0556da1ec..8cc376958 100644 +--- a/test/test_directory.c ++++ b/test/test_directory.c +@@ -1365,6 +1365,7 @@ int test_rewrite_lastdir_offset(unsigned int openMode) + filename, N_DIRECTORIES, count); + goto failure; + } ++ /* hint: file was closed by count_directories() */ + unlink(filename); + return 0; + +@@ -1511,6 +1512,8 @@ int test_lastdir_offset(unsigned int openMode) + } + } + } ++ /* hint: files are always closed by count_directories() and ++ * get_dir_offsets() */ + unlink(filename_optimized); + unlink(filename_non_optimized); + return 0; +@@ -1977,8 +1980,8 @@ int test_current_dirnum_incrementing(int testcase, unsigned int openMode) + TIFFSetSubDirectory(tif, 0); + CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); + +-/*-- Patch offset of IFD2 to not existing IFD3 without entries. +- * Thus TIFFFetchDirectory() will fail. --*/ ++ /*-- Patch offset of IFD2 to not existing IFD3 without entries. ++ * Thus TIFFFetchDirectory() will fail. --*/ + #define TIFFReadFile_M(tif, buf, size) \ + ((*TIFFGetReadProc(tif))(TIFFClientdata(tif), (buf), (size))); + #define TIFFWriteFile_M(tif, buf, size) \ +@@ -1986,51 +1989,90 @@ int test_current_dirnum_incrementing(int testcase, unsigned int openMode) + #define TIFFSeekFile_M(tif, off, whence) \ + ((*TIFFGetSeekProc(tif))(TIFFClientdata(tif), (off), (whence))); + +- /* Code below does only handle Classic-TIFF without swapping". */ +- if (!(TIFFIsByteSwapped(tif) || TIFFIsBigTIFF(tif))) +- { ++ /* --------------------------------------------------------------------- ++ * Test IFD index incrementing in case the functions return with certain ++ * errors. To provoke that errors, the file is patched by writing bytes ++ * directly into the file. Therefore, code below does only handle ++ * Classic-TIFF and little-endian files. ++ * The code works also on big endian machines, which have to swap some ++ * directly read/written values. ++ * --------------------------------------------------------------------- */ ++ if (!(TIFFIsBigEndian(tif) || TIFFIsBigTIFF(tif))) ++ { ++ /* Patch nextIFDOffset of IFD2, which is 0, with offset to itself. ++ * This generates an IFD3 without any elements at the end of file. ++ * Reading IFD3 should provoke reading error. */ + uint64_t ss = TIFFSeekFile_M(tif, offsetBase[2], 0); + uint16_t cnt = 0; + uint64_t rr = TIFFReadFile_M(tif, &cnt, 2); ++ if (TIFFIsByteSwapped(tif)) ++ TIFFSwabShort(&cnt); + ss = TIFFSeekFile_M(tif, offsetBase[2] + cnt * 12 + 2, 0); + uint32_t wt = (uint32_t)ss; ++ if (TIFFIsByteSwapped(tif)) ++ TIFFSwabLong(&wt); + rr = TIFFWriteFile_M(tif, &wt, 4); + (void)rr; + + /* Now there are offsets to four IFDs in the file, where the last one is +- * not existing and has a non-valid dircount and entries behind EOF. */ ++ * not existing and has a non-valid dircount and entries behind EOF. ++ * (dircount is 458 (as offset) */ + fprintf(stderr, "----- Expect error messages about 'Error fetching " + "directory link.' -----\n"); +- /* TIFFNumberOfDirectories() returns 3 */ ++ /* TIFFNumberOfDirectories() returns 3 and omits the invalid fourth IFD. ++ */ + lastdir = TIFFNumberOfDirectories(tif); + TIFFSetDirectory(tif, 0); + CHECKCURDIRNUM_M(tif, 0, __LINE__); ++ ++ /* TIFFSetDirectory(3) fails with error messages: ++ * TIFFFetchDirectory: test_current_dirnum_incrementing_wl.tif: ++ * Can not read TIFF directory. ++ * TIFFReadDirectory: Failed to read directory at offset 458. */ + fprintf(stderr, "----- Expect error messages about 'Cannot read TIFF " + "directory.' -----\n"); + if (TIFFSetDirectory(tif, 3)) + { + fprintf(stderr, +- "TIFFSetDirectory(3) for IFD4 was expected to fail but " ++ "TIFFSetDirectory(3) for IFD3 was expected to fail but " + "succeeded for %s " + "at %d\n", + filename, __LINE__); + goto failure; + } ++ + /* Fails in 4.6.0 */ ++ /* Reading invalid IFD 3 leads to an error and was not read in. ++ * Therefore, curdir shall be 65535 (non-existing directory) */ + CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); + offsetBase[3] = TIFFCurrentDirOffset(tif); + +- /* Point IFD3 to a location within the file, where it has now a +- * non-valid dircount=0. */ ++ /* Point IFD3 to a location within the file, where it has now for ++ * little-endian TIFF files a non-valid dircount=0, which leads also to ++ * an error and the IFD is not read in. */ + ss = TIFFSeekFile_M(tif, offsetBase[2] + cnt * 12 + 2, 0); + wt = (uint32_t)(offsetBase[1] + 8); ++ // wt = (uint32_t)(ss + 400); ++ if (TIFFIsByteSwapped(tif)) ++ TIFFSwabLong(&wt); + rr = TIFFWriteFile_M(tif, &wt, 4); ++ + fprintf(stderr, "----- Expect error messages about 'Error fetching " + "directory link.' -----\n"); +- /* TIFFNumberOfDirectories() returns now 4 */ ++ /* TIFFNumberOfDirectories() returns now 4, because for an IFD linked ++ * list dircount=0 is not treated as an error and there is an offset ++ * (=1) to a next IFD. Then, at the fifth IFD a link error occurs. */ + lastdir = TIFFNumberOfDirectories(tif); + TIFFSetDirectory(tif, 0); + CHECKCURDIRNUM_M(tif, 0, __LINE__); ++ ++ /* TIFFSetDirectory(3) fails with error messages: ++ * test_current_dirnum_incrementing_wl.tif: Failed to allocate ++ * memory for to read TIFF directory (0 elements of 12 bytes each). ++ * TIFFReadDirectory: Failed to read directory at offset 178. ++ * The IFD 3 is not read in and curdir is set to 65535 (non-existing ++ * directory). ++ */ + fprintf(stderr, + "----- Expect error messages about 'Failed to allocate " + "memory for to read TIFF directory.' AND 'Failed to read " +@@ -2044,10 +2086,12 @@ int test_current_dirnum_incrementing(int testcase, unsigned int openMode) + filename, __LINE__); + goto failure; + } ++ + /* Fails in 4.6.0 */ + CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); + } + ++ TIFFClose(tif); + unlink(filename); + return 0; + +@@ -2136,6 +2180,7 @@ int test_curdircount_setting(unsigned int openMode) + CHECKCURDIRNUM_M(tif, (tdir_t)(-1), __LINE__); + } + ++ TIFFClose(tif); + unlink(filename); + return 0; + +-- +GitLab + diff --git a/SPECS/libtiff/libtiff.spec b/SPECS/libtiff/libtiff.spec new file mode 100644 index 00000000..e54d621d --- /dev/null +++ b/SPECS/libtiff/libtiff.spec @@ -0,0 +1,78 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libtiff +Version: 4.7.0 +Release: %autorelease +Summary: Tools for Converting from and to the Tagged Image File Format +License: HPND +URL: https://libtiff.gitlab.io/libtiff/ +#!RemoteAsset +Source: https://download.osgeo.org/libtiff/tiff-%{version}.tar.xz +Patch0: libtiff-4.0.3-seek.patch +Patch1: libtiff-4.7.0-test_directory.patch +BuildRequires: cmake >= 3.5 +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(libjpeg) +BuildRequires: libtool +BuildRequires: lzma-devel +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(zlib) +Recommends: libtiff-docs = %{version} + +BuildSystem: cmake +# tools are not enabled for now due to test failure `FAIL: tiffcp-32bpp-None-jpeg.sh` +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +%description +This package contains the library and support programs for the TIFF +image format. To link a program with libtiff, you will have to add +-ljpeg and -lz to include the necessary libjpeg and libz in the +linking process. + +%package devel +Summary: Development Tools for Programs which will use the libtiff Library +Requires: glibc-devel +Requires: libstdc++-devel +Requires: libtiff = %{version} +Recommends: libtiff-docs = %{version} + +%description devel +This package contains the header files and static libraries for +developing programs which will manipulate TIFF format image files using +the libtiff library. + +%package docs +Summary: Libtiff HTML document +BuildArch: noarch + +%description docs +This package holds libtiff command lint tools and development HTML pages. + +%conf -p +CFLAGS="%{optflags} -fPIC" + +%ldconfig_scriptlets + +%files +%{_bindir}/* +%doc README.md VERSION ChangeLog TODO RELEASE-DATE +%license LICENSE.md +%{_libdir}/*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/tiff/ + +%files docs +%{_datadir}/doc/tiff + +%changelog +%{?autochangelog} diff --git a/SPECS/libtirpc/libtirpc.spec b/SPECS/libtirpc/libtirpc.spec new file mode 100644 index 00000000..8fde5531 --- /dev/null +++ b/SPECS/libtirpc/libtirpc.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libtirpc +Version: 1.3.7 +Release: %autorelease +Summary: Transport-independent RPC library +License: SISSL AND BSD-3-Clause +URL: https://sourceforge.net/projects/libtirpc/ +#!RemoteAsset +Source: https://downloads.sourceforge.net/libtirpc/%{name}-%{version}.tar.bz2 +BuildSystem: autotools +BuildOption(conf): --disable-static +BuildOption(conf): --enable-gssapi + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(krb5) + +%description +Libtirpc is a Transport-Independent RPC library for Linux + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: pkgconfig(krb5) + +%description devel +This package contains the header files, pkg-config support file, and +symbolic links needed to develop applications that use libtirpc. + +%files +%license COPYING +%doc AUTHORS +%config(noreplace) %{_sysconfdir}/netconfig +%config(noreplace) %{_sysconfdir}/bindresvport.blacklist +%{_mandir}/man5/netconfig.5* +%{_libdir}/libtirpc.so.* + +%files devel +%{_includedir}/tirpc/ +%{_libdir}/libtirpc.so +%{_libdir}/pkgconfig/libtirpc.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libtomcrypt/libtomcrypt.spec b/SPECS/libtomcrypt/libtomcrypt.spec new file mode 100644 index 00000000..208b34d9 --- /dev/null +++ b/SPECS/libtomcrypt/libtomcrypt.spec @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: libtomcrypt +Version: 1.18.2 +Release: %autorelease +Summary: A comprehensive, portable cryptographic toolkit +License: Unlicense OR WTFPL +URL: http://www.libtom.net/ +#!RemoteAsset +Source: https://github.com/libtom/libtomcrypt/archive/v%{version}/libtomcrypt-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): PREFIX="%{_prefix}" +BuildOption(build): INCPATH="%{_includedir}" +BuildOption(build): LIBPATH="%{_libdir}" +BuildOption(build): EXTRALIBS="-ltommath" +BuildOption(build): CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" +BuildOption(build): -f makefile.shared library test + +BuildOption(install): INSTALL_OPTS="-m 755" +BuildOption(install): INCPATH="%{_includedir}" +BuildOption(install): LIBPATH="%{_libdir}" +BuildOption(install): -f makefile.shared + +BuildRequires: libtommath-devel >= 1.0 +BuildRequires: libtool +BuildRequires: make +BuildRequires: gcc + +%description +A comprehensive, modular and portable cryptographic toolkit that provides +developers with a vast array of well known published block ciphers, one-way hash +functions, and a plethora of other routines. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +# No configure +%conf + +%install -a +find %{buildroot} -name '*.la' -delete +find %{buildroot} -name '*.a' -delete +sed -i \ + -e 's|^prefix=.*|prefix=%{_prefix}|g' \ + -e 's|^libdir=.*|libdir=${prefix}/%{_lib}|g' \ + %{buildroot}%{_libdir}/pkgconfig/%{name}.pc + +%ldconfig_scriptlets + +# TODO: Fix test build. +%check + +%files +%license LICENSE +%{_libdir}/*.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libtommath/libtommath.spec b/SPECS/libtommath/libtommath.spec new file mode 100644 index 00000000..a3e69bac --- /dev/null +++ b/SPECS/libtommath/libtommath.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: libtommath +Version: 1.3.0 +Release: %autorelease +Summary: A portable number theoretic multiple-precision integer library +License: Unlicense +URL: http://www.libtom.net/ +#!RemoteAsset +Source: https://github.com/libtom/libtommath/archive/refs/tags/v%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(build): CFLAGS="%{optflags} -I./" +BuildOption(build): -f makefile.shared +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): LIBPATH=%{_libdir} +BuildOption(install): -f makefile.shared + +BuildRequires: make +BuildRequires: libtool + +%description +A free open source portable number theoretic multiple-precision integer library +written entirely in C, designed with a simple API and efficient routines. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for developing +applications that use libtommath. + +%prep -a +# Fix permissions on installed library +sed -i -e 's/644 $(LIBNAME)/755 $(LIBNAME)/g' makefile.shared +# Fix pkgconfig path +sed -i \ + -e 's|^prefix=.*|prefix=%{_prefix}|g' \ + -e 's|^libdir=.*|libdir=%{_libdir}|g' \ + %{name}.pc.in + +# No configure +%conf + +%install -a +find %{buildroot} -name '*.la' -delete +find %{buildroot} -name '*.a' -delete + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/*.so.* + +%files devel +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libtool/_multibuild b/SPECS/libtool/_multibuild new file mode 100644 index 00000000..86a6eae5 --- /dev/null +++ b/SPECS/libtool/_multibuild @@ -0,0 +1,3 @@ + + testsuite + diff --git a/SPECS/libtool/handle-Werror-return-type.patch b/SPECS/libtool/handle-Werror-return-type.patch new file mode 100644 index 00000000..d73fe5bd --- /dev/null +++ b/SPECS/libtool/handle-Werror-return-type.patch @@ -0,0 +1,10 @@ +--- libtool-2.4.7/tests/resident.at ++++ libtool-2.4.7/tests/resident.at +@@ -117,6 +117,7 @@ + setup_plugin (void) + { + atexit (bye); ++ return 0; + } + ]]) + diff --git a/SPECS/libtool/libtool-2.4.7-grep-3.8.patch b/SPECS/libtool/libtool-2.4.7-grep-3.8.patch new file mode 100644 index 00000000..69a253e5 --- /dev/null +++ b/SPECS/libtool/libtool-2.4.7-grep-3.8.patch @@ -0,0 +1,34 @@ +From 1e13a1944f725ccc24bce1a2fa6f9009ba8a2270 Mon Sep 17 00:00:00 2001 +From: Andreas Stieger +Date: Sun, 4 Sep 2022 22:24:41 +0200 +Subject: [PATCH] tests/link-order.at: avoid warning and test failure with GNU + grep 3.8 + +https://bugzilla.opensuse.org/show_bug.cgi?id=1203097 +https://savannah.gnu.org/patch/index.php?10275 + +--- + tests/link-order.at | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/link-order.at b/tests/link-order.at +index 3f01a00d..a145347f 100644 +--- a/tests/link-order.at ++++ b/tests/link-order.at +@@ -99,12 +99,12 @@ aix* | interix*) ;; # These systems have different path syntax + case $hardcode_direct$hardcode_direct_absolute in + yesno) + AT_CHECK([if $EGREP relinking stderr; then +- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout ++ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout + else :; fi], [0], [ignore], [], [echo "wrong link order"]) + ;; + *) + AT_CHECK([if $EGREP relinking stderr; then +- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout ++ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout + else :; fi], [0], [ignore], [], [echo "wrong link order"]) + ;; + esac +-- +2.37.2 \ No newline at end of file diff --git a/SPECS/libtool/libtool-reproducible-hostname.patch b/SPECS/libtool/libtool-reproducible-hostname.patch new file mode 100644 index 00000000..c260588c --- /dev/null +++ b/SPECS/libtool/libtool-reproducible-hostname.patch @@ -0,0 +1,13 @@ +Index: libtool-2.4.6/configure +=================================================================== +--- libtool-2.4.6.orig/configure ++++ libtool-2.4.6/configure +@@ -31426,7 +31426,7 @@ $as_echo X"$file" | + cat <<_LT_EOF >> "$cfgfile" + #! $SHELL + # Generated automatically by $as_me ($PACKAGE) $VERSION +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: ++# Libtool was configured on host localhost: + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + + # Provide generalized library-building support services. diff --git a/SPECS/libtool/libtool.spec b/SPECS/libtool/libtool.spec new file mode 100644 index 00000000..32657c99 --- /dev/null +++ b/SPECS/libtool/libtool.spec @@ -0,0 +1,103 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "testsuite" +%define psuffix -testsuite +%else +%define psuffix %{nil} +%endif +Name: libtool%{psuffix} +Version: 2.4.7 +Release: %autorelease +Summary: A Tool to Build Shared Libraries +License: GFDL-1.2-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later +Group: Development/Tools/Building +URL: https://www.gnu.org/software/libtool/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/libtool/libtool-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/libtool/libtool-%{version}.tar.xz.sig +Patch0: libtool-reproducible-hostname.patch +Patch1: handle-Werror-return-type.patch +Patch2: libtool-2.4.7-grep-3.8.patch + +Buildsystem: autotools + +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: gcc-fortran +BuildRequires: gcc-objc +BuildRequires: help2man +BuildRequires: lzma +BuildRequires: texinfo +BuildRequires: pkgconfig(zlib) +Requires: automake > 1.4 +Requires: libltdl7 = %{version} +Requires: m4 >= 1.4.16 +Requires: tar +Provides: libltdl-devel +Provides: libtool-ltdl-devel +BuildOption: --enable-ltdl-install + +%description +GNU libtool is a set of shell scripts to automatically configure UNIX +architectures to build shared libraries in a generic fashion. + +%package -n libltdl7 +Summary: Libtool Runtime Library +License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ + +%description -n libltdl7 +Library needed by programs that use the ltdl interface of GNU libtool. + +%conf -p +rm -f doc/libtool.info + +%if "%{flavor}" == "testsuite" +%check +trap 'test $? -ne 0 && cat tests/testsuite.log' EXIT +%make_build check + +%install +: + +%else + +%install -a +chmod +x %{buildroot}%{_datadir}/libtool/build-aux/ltmain.sh +# Do not add builder's hostname into generated scripts +sed -i "/uname -n/d" %{buildroot}%{_datadir}/aclocal/libtool.m4 +%endif + +%post -n libltdl7 -p /sbin/ldconfig +%postun -n libltdl7 -p /sbin/ldconfig + +%if "%{name}" == "libtool" +%files +%license COPYING +%doc AUTHORS NEWS README THANKS ChangeLog +%{_bindir}/libtool +%{_bindir}/libtoolize +%{_includedir}/libltdl +%{_includedir}/ltdl.h +%{_libdir}/libltdl.a +%{_libdir}/libltdl.so +%{_datadir}/aclocal/*.m4 +%{_infodir}/libtool.info%{?ext_info} +%{_infodir}/libtool.info-1%{?ext_info} +%{_infodir}/libtool.info-2%{?ext_info} +%{_mandir}/man1/libtool.1%{?ext_man} +%{_mandir}/man1/libtoolize.1%{?ext_man} +%{_datadir}/libtool + +%files -n libltdl7 +%{_libdir}/libltdl.so.7* +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/libtraceevent/libtraceevent.spec b/SPECS/libtraceevent/libtraceevent.spec new file mode 100644 index 00000000..27f5c546 --- /dev/null +++ b/SPECS/libtraceevent/libtraceevent.spec @@ -0,0 +1,87 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond doc 0 + +Name: libtraceevent +Version: 1.8.4 +Release: %autorelease +Summary: Linux kernel trace event parsing library +License: LGPL-2.1-only AND GPL-2.0-or-later +URL: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ +#!RemoteAsset +Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/%{name}-%{version}.tar.gz + +BuildSystem: meson + +%if %{without doc} +BuildOption(conf): -Ddoc=false +%endif +BuildOption(conf): --default-library=shared +BuildOption(conf): -Dhtmldir=%{_docdir}/%{name} +BuildOption(conf): -Dplugindir=%{_libdir}/traceevent/plugins + +BuildRequires: meson +BuildRequires: gcc +BuildRequires: zlib-devel +%if %{with doc} +BuildRequires: asciidoc +BuildRequires: xmlto +%endif + +%description +The libtraceevent library provides a C API to parse the event formats found +in the tracefs filesystem, which is the foundation of the kernel ftrace +infrastructure. + +%package plugins +Summary: Plugins for the libtraceevent library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description plugins +This package provides plugins for libtraceevent, which can add extra +functionality such as dynamically creating event formats from strings. + +%if %{with doc} +%package doc +Summary: HTML documentation for the libtraceevent API +BuildArch: noarch +%description doc +This package contains the detailed HTML documentation for the libtraceevent API. +%endif + +%package devel +Summary: Development files for the libtraceevent library +Requires: %{name}%{?_isa} = %{version}-%{release} +%description devel +This package provides the header files, libraries, and pkg-config files +needed to develop applications that use libtraceevent. + +%ldconfig_scriptlets + +%files +%license LICENSES/LGPL-2.1 LICENSES/GPL-2.0 +%{_libdir}/libtraceevent.so.* + +%files plugins +%dir %{_libdir}/traceevent +%dir %{_libdir}/traceevent/plugins +%{_libdir}/traceevent/plugins/*.so +%{_libdir}/traceevent/plugins/libtraceevent-dynamic-list + +%if %{with doc} +%files doc +%{_docdir}/%{name}/ +%endif + +%files devel +%doc README samples/ +%{_includedir}/traceevent/ +%{_libdir}/libtraceevent.so +%{_libdir}/pkgconfig/libtraceevent.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libunistring/libunistring.spec b/SPECS/libunistring/libunistring.spec new file mode 100644 index 00000000..17154229 --- /dev/null +++ b/SPECS/libunistring/libunistring.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libunistring +Version: 1.3 +Release: %autorelease +Summary: GNU Unicode string library +License: GPL-3.0-or-later OR LGPL-3.0-or-later +URL: https://www.gnu.org/software/libunistring/ +#!RemoteAsset +Source0: http://ftpmirror.gnu.org/gnu/libunistring/libunistring-%{version}.tar.xz +#!RemoteAsset +Source1: http://ftpmirror.gnu.org/gnu/libunistring/libunistring-%{version}.tar.xz.sig +BuildSystem: autotools + +%description +This portable C library implements Unicode string types in three flavours: +(UTF-8, UTF-16, UTF-32), together with functions for character processing +(names, classifications, properties) and functions for string processing +(iteration, formatted output, width, word breaks, line breaks, normalization, +case folding and regular expressions). + +%package devel +Summary: Development files for the GNU Unicode string library +Requires: %{name} = %{version} + +%description devel +Development files for programs using libunistring and documentation +for UniString library. + +%package static +Summary: Static version of libunistring library +Requires: %{name}-devel = %{version} + +%description static +Static library for the %{name} library + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%files +%license COPYING* +%{_libdir}/libunistring.so.* + +%files devel +%license COPYING* +%{_docdir}/%{name} +%{_infodir}/libunistring.info* +%{_libdir}/libunistring.so +%{_includedir}/unistring +%{_includedir}/*.h + +%files static +%license COPYING* +%{_libdir}/libunistring.a + +%changelog +%{?autochangelog} diff --git a/SPECS/libunwind/libunwind.spec b/SPECS/libunwind/libunwind.spec new file mode 100644 index 00000000..38eddc16 --- /dev/null +++ b/SPECS/libunwind/libunwind.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libunwind +Version: 1.8.3 +Release: %autorelease +Summary: An unwinding library +License: MIT +URL: https://www.nongnu.org/libunwind/ +#!RemoteAsset +Source: https://github.com/libunwind/libunwind/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-static +BuildOption(conf): --disable-tests +BuildOption(conf): --disable-documentation + +BuildRequires: automake libtool autoconf +BuildRequires: make gcc-c++ + +%description +Libunwind provides a C ABI to determine the call-chain of a program. + +%package devel +Summary: Development files for libunwind +Requires: %{name} = %{version} + +%description devel +This package contains the libraries, header files, and documentation +needed for developing applications that use libunwind. + +%conf -p +autoreconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README NEWS +%{_libdir}/libunwind*.so.* + +%files devel +%{_libdir}/libunwind*.so +%{_libdir}/pkgconfig/libunwind*.pc +%{_includedir}/unwind.h +%{_includedir}/libunwind*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/liburing/liburing.spec b/SPECS/liburing/liburing.spec new file mode 100644 index 00000000..a6414723 --- /dev/null +++ b/SPECS/liburing/liburing.spec @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: liburing +Version: 2.12 +Release: %autorelease +Summary: High-performance async I/O library for the Linux kernel +License: (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT) +URL: https://git.kernel.dk/cgit/liburing/ +#!RemoteAsset +Source0: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz + +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gcc-c++ + +%description +liburing provides a simplified, high-level interface for applications to use +the powerful and efficient io_uring asynchronous I/O facility of the +Linux kernel. This package also includes a handy tool, 'io_uring_probe', +to check the features supported by the current system kernel. + +%package ffi +Summary: FFI library for using io_uring from other languages +%description ffi +This package contains the Foreign Function Interface (FFI) shared library +for liburing. It provides a stable C ABI for non-C/C++ languages like +Python, Rust, or Go to interact with the io_uring facility. + +%package devel +Summary: Development files for the io_uring library +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: liburing-ffi%{?_isa} = %{version}-%{release} +%description devel +This package contains the header files, pkg-config files, and man pages +needed to develop applications using liburing. + +%conf +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --libdevdir=%{_libdir} \ + --mandir=%{_mandir} \ + --includedir=%{_includedir} \ + --use-libc + +%install -a +# Adhering to openRuyi's policy of preferring dynamic libraries. +rm -f %{buildroot}%{_libdir}/*.a +# Providing a value-add tool for developers. +install -Dm 755 test/probe.t %{buildroot}%{_bindir}/io_uring_probe + +# Tests are dependent on kernel version and features +%check + + +%files +%license COPYING +%{_bindir}/io_uring_probe +%{_libdir}/liburing.so.* + +%files -n liburing-ffi +%license COPYING +%{_libdir}/liburing-ffi.so.* + +%files devel +%doc README +%{_includedir}/liburing/ +%{_includedir}/liburing.h +%{_libdir}/liburing.so +%{_libdir}/liburing-ffi.so +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man*/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libusb/libusb.spec b/SPECS/libusb/libusb.spec new file mode 100644 index 00000000..ae62a047 --- /dev/null +++ b/SPECS/libusb/libusb.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libusb +Version: 1.0.29 +Release: %autorelease +Summary: Public client interface library for NIS(YP) and NIS+ +License: BSD-3-Clause AND LGPL-2.1-or-later +URL: http://libusb.info +VCS: git:https://github.com/libusb/libusb +#!RemoteAsset +Source0: https://github.com/libusb/libusb/releases/download/v%{version}/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source1: https://github.com/libusb/libusb/releases/download/v%{version}/%{name}-%{version}.tar.bz2.asc +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig(libsystemd) + +%description +This package provides a way for applications to access USB devices. + +libusb is a library for USB device access from Linux, macOS, +Windows, OpenBSD/NetBSD, Haiku and Solaris userspace. + +libusb is abstracted internally in such a way that it can hopefully +be ported to other operating systems. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%conf -p +autoreconf -fiv + +%install -a +rm %{buildroot}%{_libdir}/*.la + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS README ChangeLog +%{_libdir}/*.so.* + +%files devel +%{_includedir}/libusb-1.0 +%{_libdir}/*.so +%{_libdir}/pkgconfig/libusb-1.0.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libutempter/0001-fix-install-path.patch b/SPECS/libutempter/0001-fix-install-path.patch new file mode 100644 index 00000000..cad5730f --- /dev/null +++ b/SPECS/libutempter/0001-fix-install-path.patch @@ -0,0 +1,15 @@ +diff --git a/libutempter/Makefile b/libutempter/Makefile +index 256f1f8..cce4619 100644 +--- a/libutempter/Makefile ++++ b/libutempter/Makefile +@@ -30,8 +30,8 @@ MAP = lib$(PROJECT).map + TARGETS = $(PROJECT) $(SHAREDLIB) + + INSTALL = install +-libdir = /usr/lib +-libexecdir = /usr/lib ++libdir ?= /usr/lib ++libexecdir ?= /usr/lib + includedir = /usr/include + mandir = /usr/share/man + man3dir = $(mandir)/man3 diff --git a/SPECS/libutempter/libutempter.spec b/SPECS/libutempter/libutempter.spec new file mode 100644 index 00000000..d3f60b43 --- /dev/null +++ b/SPECS/libutempter/libutempter.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libutempter +Version: 1.2.3 +Release: %autorelease +Summary: A privileged helper for utmp/wtmp updates +License: LGPL-2.1-or-later +URL: https://github.com/altlinux/libutempter +#!RemoteAsset +Source: https://github.com/altlinux/libutempter/archive/refs/tags/%{version}-alt1.tar.gz#/%{name}-%{version}.tar.gz +Patch: 0001-fix-install-path.patch +BuildSystem: autotools + +BuildOption(build): -C libutempter libdir=%{_libdir} libexecdir=%{_libexecdir} +BuildOption(install): -C libutempter libdir=%{_libdir} libexecdir=%{_libexecdir} + +BuildRequires: gcc +Requires(pre): shadow + +%description +This library supports saving session records to +to utmp and wtmp files. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for %{name}. + +# No configure +%conf + +# No tests. +%check + +%files +%{_libdir}/libutempter.so.* +%{_libexecdir}/utempter/utempter +%{_mandir}/man3/* + +%files devel +%{_includedir}/utempter.h +%{_libdir}/libutempter.so + +%changelog +%{?autochangelog} diff --git a/SPECS/libuv/libuv.spec b/SPECS/libuv/libuv.spec new file mode 100644 index 00000000..98a97784 --- /dev/null +++ b/SPECS/libuv/libuv.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libuv +Version: 1.51.0 +Release: %autorelease +Summary: Asychronous I/O support library +License: MIT +URL: https://libuv.org +#!RemoteAsset +Source0: https://dist.libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz +#!RemoteAsset +Source1: https://dist.libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz.sign + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool + +%description +libuv is a support library with a focus on asynchronous I/O. It was +primarily developed for use by Node.js, but it is also used by +Mozilla's Rust language, Luvit, Julia, pyuv, and others. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +libuv is a support library with a focus on asynchronous I/O. It was +primarily developed for use by Node.js, but it is also used by +Mozilla's Rust language, Luvit, Julia, pyuv, and others. + +%prep -a +./autogen.sh + +%files +%license LICENSE +%{_libdir}/libuv.so.* + +%files devel +%doc AUTHORS CONTRIBUTING.md ChangeLog README.md +%license LICENSE +%{_libdir}/libuv.so +%{_includedir}/uv* +%{_libdir}/pkgconfig/libuv.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libverto/libverto.spec b/SPECS/libverto/libverto.spec new file mode 100644 index 00000000..af075d13 --- /dev/null +++ b/SPECS/libverto/libverto.spec @@ -0,0 +1,156 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libverto +Version: 0.3.2 +Release: %autorelease +Summary: Main loop abstraction library +License: MIT +URL: https://github.com/latchset/libverto +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(libuv) +BuildRequires: libev-devel + +%description +libverto provides a way for libraries to expose asynchronous interfaces +without having to choose a particular event loop, offloading this +decision to the end application which consumes the library. + +If you are packaging an application, not library, based on libverto, +you should depend either on a specific implementation module or you +can depend on the virtual provides 'libverto-module-base'. This will +ensure that you have at least one module installed that provides io, +timeout and signal functionality. Currently glib is the only module +that does not provide these three because it lacks signal. However, +glib will support signal in the future. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%package glib +Summary: glib module for %{name} +Requires: %{name} = %{version}-%{release} + +%description glib +Module for %{name} which provides integration with glib. + +This package does NOT yet provide %{name}-module-base. + +%package glib-devel +Summary: Development files for %{name}-glib +Requires: %{name}-glib = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} + +%description glib-devel +The %{name}-glib-devel package contains libraries and header files for +developing applications that use %{name}-glib. + +%package libevent +Summary: libevent module for %{name} +Requires: %{name} = %{version}-%{release} +Provides: %{name}-module-base = %{version}-%{release} + +%description libevent +Module for %{name} which provides integration with libevent. + +%package libevent-devel +Summary: Development files for %{name}-libevent +Requires: %{name}-libevent = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} + +%description libevent-devel +The %{name}-libevent-devel package contains libraries and header files for +developing applications that use %{name}-libevent. + +%package libev +Summary: libev module for %{name} +Requires: %{name} = %{version}-%{release} +Provides: %{name}-module-base = %{version}-%{release} + +%description libev +Module for %{name} which provides integration with libev. + +This package provides %{name}-module-base since it supports io, timeout +and signal. + +%package libev-devel +Summary: Development files for %{name}-libev +Requires: %{name}-libev = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} + +%description libev-devel +The %{name}-libev-devel package contains libraries and header files for +developing applications that use %{name}-libev. + +This package provides %{name}-module-base since it supports io, timeout +and signal. + +%conf -p +autoreconf -fiv + +%install -a +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + +%ldconfig_scriptlets +%ldconfig_scriptlets glib +%ldconfig_scriptlets libevent +%ldconfig_scriptlets libev + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_libdir}/%{name}.so.* + +%files devel +%{_includedir}/verto.h +%{_includedir}/verto-module.h +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/%{name}.pc + +%files glib +%{_libdir}/%{name}-glib.so.* + +%files glib-devel +%{_includedir}/verto-glib.h +%{_libdir}/%{name}-glib.so +%{_libdir}/pkgconfig/%{name}-glib.pc + +%files libevent +%{_libdir}/%{name}-libevent.so.* + +%files libevent-devel +%{_includedir}/verto-libevent.h +%{_libdir}/%{name}-libevent.so +%{_libdir}/pkgconfig/%{name}-libevent.pc + +%files libev +%{_libdir}/%{name}-libev.so.* + +%files libev-devel +%{_includedir}/verto-libev.h +%{_libdir}/%{name}-libev.so +%{_libdir}/pkgconfig/%{name}-libev.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libwebsockets/libwebsockets.spec b/SPECS/libwebsockets/libwebsockets.spec new file mode 100644 index 00000000..1d90dbad --- /dev/null +++ b/SPECS/libwebsockets/libwebsockets.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libwebsockets +Version: 4.3.3 +Release: %autorelease +Summary: A lightweight C library for Websockets +License: LGPL-2.1-or-later and Public-Domain and BSD-3-Clause and MIT and Zlib +URL: https://libwebsockets.org +#!RemoteAsset +Source0: https://github.com/warmcat/libwebsockets/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DLWS_WITH_HTTP2:BOOL=ON +BuildOption(conf): -DLWS_IPV6:BOOL=ON +BuildOption(conf): -DLWS_WITH_ZIP_FOPS:BOOL=ON +BuildOption(conf): -DLWS_WITH_SOCKS5:BOOL=ON +BuildOption(conf): -DLWS_WITH_RANGES:BOOL=ON +BuildOption(conf): -DLWS_WITH_ACME:BOOL=ON +BuildOption(conf): -DLWS_WITH_LIBUV:BOOL=OFF +BuildOption(conf): -DLWS_WITH_LIBEV:BOOL=OFF +BuildOption(conf): -DLWS_WITH_LIBEVENT:BOOL=OFF +BuildOption(conf): -DLWS_WITH_FTS:BOOL=ON +BuildOption(conf): -DLWS_WITH_THREADPOOL:BOOL=ON +BuildOption(conf): -DLWS_UNIX_SOCK:BOOL=ON +BuildOption(conf): -DLWS_WITH_HTTP_PROXY:BOOL=ON +BuildOption(conf): -DLWS_WITH_DISKCACHE:BOOL=ON +BuildOption(conf): -DLWS_WITH_LWSAC:BOOL=ON +BuildOption(conf): -DLWS_LINK_TESTAPPS_DYNAMIC:BOOL=ON +BuildOption(conf): -DLWS_WITHOUT_BUILTIN_GETIFADDRS:BOOL=ON +BuildOption(conf): -DLWS_USE_BUNDLED_ZLIB:BOOL=OFF +BuildOption(conf): -DLWS_WITHOUT_BUILTIN_SHA1:BOOL=ON +BuildOption(conf): -DLWS_WITH_STATIC:BOOL=OFF +BuildOption(conf): -DLWS_WITHOUT_CLIENT:BOOL=OFF +BuildOption(conf): -DLWS_WITHOUT_SERVER:BOOL=OFF +BuildOption(conf): -DLWS_WITHOUT_TESTAPPS:BOOL=ON +BuildOption(conf): -DLWS_WITHOUT_TEST_SERVER:BOOL=ON +BuildOption(conf): -DLWS_WITHOUT_TEST_SERVER_EXTPOLL:BOOL=ON +BuildOption(conf): -DLWS_WITHOUT_TEST_PING:BOOL=ON +BuildOption(conf): -DLWS_WITHOUT_TEST_CLIENT:BOOL=ON +BuildOption(conf): -DLWS_WITHOUT_EXTENSIONS:BOOL=OFF +# add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM:STRING=3.5 + +BuildRequires: cmake openssl-devel zlib-devel libev-devel gcc gcc-c++ + +%description +Libwebsockets (LWS) is a flexible, lightweight pure C library for implementing modern +network protocols easily with a tiny footprint, using a nonblocking event loop. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files and development libraries needed to +develop applications that use libwebsockets. + + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md READMEs/ +%{_libdir}/%{name}.so.* + +%files devel +%{_includedir}/*.h +%{_includedir}/%{name} +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/libwebsockets/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libxcb/libxcb.spec b/SPECS/libxcb/libxcb.spec new file mode 100644 index 00000000..36b34f05 --- /dev/null +++ b/SPECS/libxcb/libxcb.spec @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libxcb +Version: 1.17.0 +Release: %autorelease +Summary: A C binding to the X11 protocol +License: X11 +URL: https://xcb.freedesktop.org/ +#!RemoteAsset +Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.xz + +# This is stolen straight from the pthread-stubs source: +# http://cgit.freedesktop.org/xcb/pthread-stubs/blob/?id=6900598192bacf5fd9a34619b11328f746a5956d +# we don't need the library because glibc has working pthreads, but we need +# the pkgconfig file so libs that link against libxcb know this... +Source1: pthread-stubs.pc.in +BuildSystem: autotools + +BuildOption(conf): --enable-selinux +BuildOption(conf): --enable-xkb +BuildOption(conf): --enable-xinput +BuildOption(conf): --disable-xprint +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-unit-tests +BuildOption(conf): --disable-static + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig(xorg-macros) >= 1.18 +BuildRequires: pkgconfig(xau) >= 0.99.2 +BuildRequires: pkgconfig(xcb-proto) >= 1.17.0 +BuildRequires: doxygen +BuildRequires: python3-devel + +%description +The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a +small footprint, latency hiding, direct access to the protocol, improved +threading support, and extensibility. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains development files for %{name}. + +%package doc +Summary: Documentation for %{name} + +%description doc +The %{name}-doc package contains documentation for the %{name} library. + +%prep -a +sed -i 's/pthread-stubs //' configure.ac +export LC_ALL=C +autoreconf -ivf + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +mkdir -p %{buildroot}%{_libdir}/pkgconfig +sed 's,@libdir@,%{_libdir},;s,@prefix@,%{_prefix},;s,@exec_prefix@,%{_exec_prefix},' %{S:1} \ + > %{buildroot}%{_libdir}/pkgconfig/pthread-stubs.pc + +%files +%license COPYING +%{_libdir}/libxcb*.so.* + +%files devel +%{_includedir}/xcb +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%files doc +%doc NEWS README.md +%{_mandir}/man3/*.3* +%doc %{_datadir}/doc/* + +%changelog +%{?autochangelog} diff --git a/SPECS/libxcb/pthread-stubs.pc.in b/SPECS/libxcb/pthread-stubs.pc.in new file mode 100644 index 00000000..1b722e95 --- /dev/null +++ b/SPECS/libxcb/pthread-stubs.pc.in @@ -0,0 +1,8 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ + +Name: pthread stubs +Description: Stubs missing from libc for standard pthread functions +Version: 0.1 +Libs: diff --git a/SPECS/libxcrypt/libxcrypt.spec b/SPECS/libxcrypt/libxcrypt.spec new file mode 100644 index 00000000..9ffb4907 --- /dev/null +++ b/SPECS/libxcrypt/libxcrypt.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libxcrypt +Version: 4.4.38 +Release: %autorelease +Summary: Extended crypt library for DES, MD5, Blowfish and others +License: BSD-2-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause AND Public-Domain +URL: https://github.com/besser82/libxcrypt +#!RemoteAsset +Source0: https://github.com/besser82/libxcrypt/releases/download/v%{version}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://github.com/besser82/libxcrypt/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc +#!RemoteAsset +Source2: https://github.com/besser82/libxcrypt/releases/download/v%{version}/libxcrypt-gpgkey.asc#/%{name}.keyring +BuildRequires: pkgconfig +BuildRequires: perl +BuildSystem: autotools +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-shared +BuildOption(conf): --enable-static +BuildOption(conf): --enable-hashes=all +BuildOption(conf): --with-pkgconfigdir=%{_libdir}/pkgconfig + +%description +libxcrypt is a modern library for one-way hashing of passwords. +It supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password +hashes, and provides the traditional Unix 'crypt' and 'crypt_r' +interfaces, as well as a set of extended interfaces pioneered by +Openwall Linux, 'crypt_rn', 'crypt_ra', 'crypt_gensalt', +'crypt_gensalt_rn', and 'crypt_gensalt_ra'. + +%package devel +Summary: Development files for %{name} +License: BSD-2-Clause AND LGPL-2.1-or-later AND BSD-3-Clause AND Public-Domain +Requires: %{name} = %{version} +Requires: pkgconfig >= 0.9.0 +Conflicts: glibc-devel < 2.28 +Provides: glibc-devel:%{_libdir}/libcrypt.so + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%package static +Summary: Static library for -static linking with %{name} +License: BSD-2-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause AND Public-Domain +Requires: %{name}-devel = %{version} +Requires: glibc-static +Conflicts: glibc-static < 2.28 +Provides: glibc-static:%{_libdir}/libcrypt.a + +%description static +This package contains the libxcrypt static libraries for -static +linking. You don't need this, unless you link statically, which +is highly discouraged. + + +%ldconfig_scriptlets + +%files +%license COPYING.LIB LICENSING +%doc AUTHORS NEWS THANKS +%{_libdir}/*.so.* + +%files devel +%doc TODO +%{_libdir}/*.so +%{_includedir}/*.h +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man?/* + +%files static +%{_libdir}/*.a + +%changelog +%{?autochangelog} diff --git a/SPECS/libxml2/libxml2.spec b/SPECS/libxml2/libxml2.spec new file mode 100644 index 00000000..624b2f9d --- /dev/null +++ b/SPECS/libxml2/libxml2.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libxml2 +Version: 2.14.5 +Release: %autorelease +Summary: A Library to Manipulate XML Files +License: MIT +URL: https://gitlab.gnome.org/GNOME/libxml2 +#!RemoteAsset +Source: https://download.gnome.org/sources/libxml2/2.14/libxml2-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --disable-static +BuildOption(conf): --docdir=%{_docdir}/%{name} +BuildOption(conf): --with-history +BuildOption(conf): --enable-ipv6 +BuildOption(conf): --with-sax1 +BuildOption(conf): --with-regexps +BuildOption(conf): --with-threads +BuildOption(conf): --with-reader +BuildOption(conf): --with-ftp +BuildOption(conf): --with-http +BuildOption(conf): --with-legacy +BuildOption(conf): --without-python + +BuildRequires: fdupes +BuildRequires: pkgconfig +BuildRequires: readline-devel +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) + +%description +The XML C library was developed for the GNOME project. It is used by many +programs to load, save, and manipulate any kind of XML files. +This package contains the core runtime library and command-line tools. + +%package devel +Summary: Development files for libxml2 +Requires: %{name} = %{version} +Requires: glibc-devel +Requires: pkgconfig(liblzma) +Requires: pkgconfig(zlib) + +%description devel +This subpackage contains header files for developing applications that +want to make use of libxml2. + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +ln -s libxml2/libxml %{buildroot}%{_includedir}/libxml +rm -f %{buildroot}%{_docdir}/%{name}/Copyright +%fdupes %{buildroot}%{_datadir} + +%ldconfig_scriptlets + +%files +%license Copyright +%doc %{_docdir}/%{name}/ +%{_bindir}/xmllint +%{_bindir}/xmlcatalog +%{_mandir}/man1/xmllint.1* +%{_mandir}/man1/xmlcatalog.1* +%{_libdir}/libxml2.so.* + +%files devel +%{_bindir}/xml2-config +%{_includedir}/libxml* +%{_libdir}/libxml2.so +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/ +%{_mandir}/man1/xml2-config.1* +%{_datadir}/gtk-doc/ + +%changelog +%{?autochangelog} diff --git a/SPECS/libxslt/libxslt.spec b/SPECS/libxslt/libxslt.spec new file mode 100644 index 00000000..2c921476 --- /dev/null +++ b/SPECS/libxslt/libxslt.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libxslt +Version: 1.1.43 +Release: %autorelease +Summary: XSL Transformation Library +License: GPL-2.0-or-later AND MIT +URL: https://gitlab.gnome.org/GNOME/libxslt +#!RemoteAsset +Source0: https://download.gnome.org/sources/libxslt/1.1/libxslt-%{version}.tar.xz +Source1: xslt-config.1 + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --without-python +BuildOption(conf): --disable-silent-rules + +BuildRequires: fdupes gcc libgcrypt-devel pkgconfig +BuildRequires: pkgconfig(libxml-2.0) >= 2.9.12 + +%description +This C library allows you to transform XML files into other XML files +(or HTML, text, and more) using the standard XSLT stylesheet +transformation mechanism. This package contains the runtime libraries and +command-line tools. + +%package devel +Summary: Development files for libxslt +Requires: %{name} = %{version} +Requires: glibc-devel +Requires: libgcrypt-devel + +%description devel +This package contains the header files, pkg-config files, and documentation +needed to develop applications that use the libxslt libraries. + +%install -a +rm -fr %{buildroot}%{_datadir}/doc +install -D -m0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/xslt-config.1 +find %{buildroot} -type f -name "*.la" -delete -print +%fdupes %{buildroot}%{_datadir} + +%ldconfig_scriptlets + +%files +%license Copyright +%doc AUTHORS NEWS TODO FEATURES +# Files from original 'tools' package +%{_bindir}/xsltproc +%{_mandir}/man1/xsltproc.1%{?ext_man} +# Files from original 'libxslt1' package +%{_libdir}/libxslt.so.1* +# Files from original 'libexslt0' package +%{_libdir}/libexslt.so.0* + +%files devel +%{_libdir}/libxslt.so +%{_libdir}/libexslt.so +%{_libdir}/*.sh +%{_libdir}/pkgconfig/libxslt.pc +%{_libdir}/pkgconfig/libexslt.pc +%dir %{_libdir}/cmake/libxslt/ +%{_libdir}/cmake/libxslt/FindGcrypt.cmake +%{_libdir}/cmake/libxslt/libxslt-config.cmake +%{_includedir}/* +%{_bindir}/xslt-config +%{_mandir}/man1/xslt-config.1%{?ext_man} +%{_mandir}/man3/* +%dir %{_datadir}/gtk-doc/ +%dir %{_datadir}/gtk-doc/html/ +%{_datadir}/gtk-doc/html/libexslt/ +%{_datadir}/gtk-doc/html/libxslt/ +%doc doc/*.html doc/tutorial doc/tutorial2 + +%changelog +%{?autochangelog} diff --git a/SPECS/libxslt/xslt-config.1 b/SPECS/libxslt/xslt-config.1 new file mode 100644 index 00000000..2acb1b36 --- /dev/null +++ b/SPECS/libxslt/xslt-config.1 @@ -0,0 +1,47 @@ +.mso www.tmac +.TH XSLT-CONFIG 1 2011-06-24 GNOME "The XSLT C library for GNOME" + +.SH NAME +xslt-config \- provides compilation or linking flags for programs using libxslt + +.SH SYNOPSIS +.B xslt-config --cflags +.br +.B xslt-config --libs + +.SH DESCRIPTION +.B xslt-config +is a small shell script which is installed as part of +.B libxslt +usual install process which provides compilation or linking flags for programs using it. +Use + +.IP +.B xslt-config --cflags + +.PP +to get the compilation flags and + +.IP +.B xslt-config --libs + +.PP +to get the linker flags. Usually this is done directly from the Makefile as: + +.IP +.B CFLAGS=`xslt-config --cflags` +.br +.B LIBS=`xslt-config --libs` + + +.SH NOTES +If you use the +.SM EXSLT +extensions from the program then you should prepend +.B -lexslt +to the +.B LIBS +options + +.SH SEE ALSO +.URL http://xmlsoft.org/XSLT/ "The XSLT C library for GNOME" diff --git a/SPECS/libyaml/libyaml.spec b/SPECS/libyaml/libyaml.spec new file mode 100644 index 00000000..18a0878c --- /dev/null +++ b/SPECS/libyaml/libyaml.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libyaml +Version: 0.2.5 +Release: %autorelease +Summary: A YAML parser and emitter written in C +License: MIT +URL: https://pyyaml.org/wiki/LibYAML +#!RemoteAsset +Source: http://pyyaml.org/download/libyaml/yaml-%{version}.tar.gz +BuildRequires: pkgconfig +BuildSystem: autotools +BuildOption(conf): --disable-static + +%description +A YAML parser and emitter written in C + +%package devel +Summary: Development files for libyaml +Requires: %{name} = %{version} + +%description devel +This package holds the development files for libyaml, +a YAML parser and emitter written in C. + +%prep +%autosetup -n yaml-%{version} + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%{_libdir}/libyaml-0.so.2 +%{_libdir}/libyaml-0.so.2.0.* + +%files devel +%{_includedir}/yaml.h +%{_libdir}/libyaml.so +%{_libdir}/pkgconfig/yaml-0.1.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/libyang/libyang.spec b/SPECS/libyang/libyang.spec new file mode 100644 index 00000000..9891f54c --- /dev/null +++ b/SPECS/libyang/libyang.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: libyang +Version: 3.13.5 +Release: %autorelease +Summary: YANG data modeling language library +License: BSD-3-Clause +URL: https://github.com/CESNET/libyang +#!RemoteAsset +Source: https://github.com/CESNET/libyang/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_BUILD_TYPE:STRING=Release +BuildOption(conf): -DENABLE_LYD_PRIV:BOOL=ON +BuildOption(conf): -DGEN_LANGUAGE_BINDINGS:BOOL=ON +BuildOption(conf): -DENABLE_VALGRIND_TESTS:BOOL=OFF +BuildOption(conf): -DGEN_DOXYGEN_DOCS:BOOL=OFF + +BuildRequires: cmake doxygen pcre2-devel gcc gcc-c++ swig +BuildRequires: cmocka-devel python3-devel flex bison + +%description +Libyang is a YANG data modeling language parser and toolkit written (and +providing API) in C. This package contains the core C library and command-line +tools. + +%package devel +Summary: Development files for libyang +Requires: %{name} = %{version} +Requires: pcre2-devel + +%description devel +Headers, pkg-config, and other development files for the libyang library. +This package also contains the API documentation. + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_bindir}/yanglint +%{_bindir}/yangre +%{_mandir}/man1/yanglint.1.gz +%{_mandir}/man1/yangre.1.gz +%{_libdir}/libyang.so.* +%dir %{_datadir}/yang +%dir %{_datadir}/yang/modules +%dir %{_datadir}/yang/modules/libyang +%{_datadir}/yang/modules/libyang/*.yang + +%files devel +%doc doc/ +%{_libdir}/libyang.so +%{_libdir}/pkgconfig/libyang.pc +%dir %{_includedir}/libyang +%{_includedir}/libyang/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/libyuv/0001-fix-install-dir.patch b/SPECS/libyuv/0001-fix-install-dir.patch new file mode 100644 index 00000000..98593c7a --- /dev/null +++ b/SPECS/libyuv/0001-fix-install-dir.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6cce8a..158d361 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,9 +188,6 @@ endif() + add_executable ( cpuid ${ly_base_dir}/util/cpuid.c ) + target_link_libraries ( cpuid ${ly_lib_static} ) + +-# this creates the conversion tool +-add_executable ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) +-target_link_libraries ( yuvconvert ${ly_lib_static} ) + + # this creates the yuvconstants tool + add_executable ( yuvconstants ${ly_base_dir}/util/yuvconstants.c ) +@@ -246,9 +243,9 @@ endif() + + ++include(GNUInstallDirs) + # install the conversion tool, .so, .a, and all the header files +-install ( TARGETS yuvconvert DESTINATION bin ) + install ( TARGETS ${ly_lib_static} DESTINATION lib ) +-install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib ) ++install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib ) + install ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) + + # create the .deb and .rpm packages using cpack diff --git a/SPECS/libyuv/libyuv.spec b/SPECS/libyuv/libyuv.spec new file mode 100644 index 00000000..b69c3f30 --- /dev/null +++ b/SPECS/libyuv/libyuv.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global git_commit 94417b9d213364905ce849c25719b819b8dbbaaa + +Name: libyuv +Summary: YUV conversion and scaling functionality library +Version: 0 +Release: %autorelease +License: BSD-3-Clause +URL: https://chromium.googlesource.com/libyuv/libyuv +#!RemoteAsset +Source: https://chromium.googlesource.com/libyuv/libyuv/+archive/%{git_commit}.tar.gz +Patch: 0001-fix-install-dir.patch +BuildSystem: cmake + +BuildOption(conf): -DTEST=ON +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: gtest-devel + +%description +This is an open source project that includes YUV conversion and scaling +functionality. Converts all webcam formats to YUV (I420). Convert YUV to +formats for rendering/effects. Rotate by 90 degrees to adjust for mobile +devices in portrait mode. + +%package devel +Summary: The development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files and development libraries for libyuv. + +%prep -a + +cat > %{name}.pc << EOF +prefix=%{_prefix} +exec_prefix=${prefix} +libdir=%{_libdir} +includedir=%{_includedir} + +Name: %{name} +Description: %{summary} +Version: %{version} +Libs: -lyuv +EOF + +%install -a +find %{buildroot} -type f -name "*.a" -delete + +install -p -D -m 0644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/%{name}.pc + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md + +%files devel +%{_includedir}/libyuv +%{_includedir}/libyuv.h +%{_libdir}/libyuv.so +%{_libdir}/pkgconfig/libyuv.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/linux-firmware/linux-firmware.spec b/SPECS/linux-firmware/linux-firmware.spec new file mode 100644 index 00000000..c6462a0d --- /dev/null +++ b/SPECS/linux-firmware/linux-firmware.spec @@ -0,0 +1,722 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _firmwarepath /usr/lib/firmware + +Name: linux-firmware +Version: 20251011 +Release: %autorelease +Summary: Firmware files used by the Linux kernel +License: GPL-1.0-or-later AND GPL-2.0-or-later AND MIT AND LicenseRef-Callaway-Redistributable-no-modification-permitted +URL: https://www.kernel.org/ +#!RemoteAsset +Source0: https://www.kernel.org/pub/linux/kernel/firmware/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.kernel.org/pub/linux/kernel/firmware/%{name}-%{version}.tar.sign + +BuildRequires: make +BuildRequires: git +BuildRequires: python3 +BuildRequires: parallel +BuildRequires: rdfind + +Requires: linux-firmware-whence = %{version}-%{release} +Requires: ((linux-firmware = %{version}-%{release}) if linux-firmware) +Recommends: qcom-wwan-firmware +Recommends: amd-gpu-firmware +Recommends: amd-ucode-firmware +Recommends: atheros-firmware +Recommends: brcmfmac-firmware +Recommends: cirrus-audio-firmware +Recommends: intel-audio-firmware +Recommends: intel-gpu-firmware +Recommends: mt7xxx-firmware +Recommends: nvidia-gpu-firmware +Recommends: nxpwireless-firmware +Recommends: realtek-firmware +Recommends: tiwilink-firmware + +%description +This package includes firmware files required for some devices to +operate. + +%package whence +Summary: WHENCE License file +License: GPL-1.0-or-later AND GPL-2.0-or-later AND MIT AND LicenseRef-Callaway-Redistributable-no-modification-permitted +%description whence +This package contains the WHENCE license file which documents the vendor license details. + +# GPU firmwares +%package -n amd-gpu-firmware +Summary: Firmware for AMD GPUs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n amd-gpu-firmware +Firmware for AMD amdgpu and radeon GPUs. + +%package -n intel-gpu-firmware +Summary: Firmware for Intel GPUs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n intel-gpu-firmware +Firmware for Intel GPUs including GuC (Graphics Microcontroller), HuC (HEVC/H.265 +Microcontroller) and DMC (Display Microcontroller) firmware for Skylake and later +platforms. + +%package -n nvidia-gpu-firmware +Summary: Firmware for NVIDIA GPUs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n nvidia-gpu-firmware +Firmware for NVIDIA GPUs. + +# Microcode updates +%package -n amd-ucode-firmware +Summary: Microcode updates for AMD CPUs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n amd-ucode-firmware +Microcode updates for AMD CPUs, AMD SEV and AMD TEE. + +# WiFi/Bluetooth/WWAN firmwares +%package -n atheros-firmware +Summary: Firmware for Qualcomm Atheros WiFi/Bluetooth adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n atheros-firmware +Firmware for Qualcomm Atheros ath6k/ath9k/ath10k/ath11k WiFi adapters. + +%package -n brcmfmac-firmware +Summary: Firmware for Broadcom/Cypress brcmfmac WiFi/Bluetooth adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n brcmfmac-firmware +Firmware for Broadcom/Cypress brcmfmac WiFi/Bluetooth adapters. + +%package -n iwlegacy-firmware +Summary: Firmware for Intel(R) Wireless WiFi Link 3945(A)BG and 4965AGN adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n iwlegacy-firmware +This package contains the firmware required by the iwlegacy driver +for Linux. This includes the 3945(A)BG and 4965AGN WiFi NICs. Usage +of the firmware is subject to the terms and conditions contained +inside the provided LICENSE file. Please read it carefully. + +%package -n iwlwifi-dvm-firmware +Summary: DVM Firmware for Intel(R) Wireless WiFi adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n iwlwifi-dvm-firmware +This package contains the firmware required by the iwlwifi driver +for Linux built with DVM firmware support (CONFIG_IWLDVM=y/m). Usage of +the firmware is subject to the terms and conditions contained inside the +provided LICENSE file. Please read it carefully. + +%package -n iwlwifi-mvm-firmware +Summary: MVM Firmware for Intel(R) Wireless WiFi adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +# Same hardware, newer firmware with a different driver, enables smooth migration +Requires: iwlwifi-mld-firmware = %{version}-%{release} +%description -n iwlwifi-mvm-firmware +This package contains the firmware required by the iwlwifi driver +for Linux built with MVM firmware support (CONFIG_IWLMVM=y/m). Usage of +the firmware is subject to the terms and conditions contained inside the +provided LICENSE file. Please read it carefully. + +%package -n iwlwifi-mld-firmware +Summary: MLD Firmware for Intel(R) Wireless WiFi adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n iwlwifi-mld-firmware +This package contains the firmware required by the iwlwifi driver +for Linux built with MLD firmware support (CONFIG_IWLMLD=y/m). Usage of +the firmware is subject to the terms and conditions contained inside the +provided LICENSE file. Please read it carefully. + +%package -n libertas-firmware +Summary: Firmware for Marvell Libertas SD/USB WiFi Network Adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n libertas-firmware +Firmware for the Marvell Libertas series of WiFi Network Adapters +Including the SD 8686/8787 and USB 8388/8388. + +%package -n mt7xxx-firmware +Summary: Firmware for Mediatek 7600/7900 series WiFi/Bluetooth adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n mt7xxx-firmware +Firmware for Mediatek 7600/7900 series WiFi/Bluetooth adapters + +%package -n nxpwireless-firmware +Summary: Firmware for NXP WiFi/Bluetooth/UWB adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n nxpwireless-firmware +Firmware for NXP WiFi/Bluetooth/UWB adapters. + +%package -n realtek-firmware +Summary: Firmware for Realtek WiFi/Bluetooth adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n realtek-firmware +Firmware for Realtek WiFi/Bluetooth adapters + +%package -n qcom-wwan-firmware +Summary: Firmware for Qualcomm Wireless WAN modems +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n qcom-wwan-firmware +Firmware for Qualcomm Snapdragon X-series (SDX) wireless WAN modems used +across numerous WWAN cards from numerous vendors. + +%package -n tiwilink-firmware +Summary: Firmware for Texas Instruments WiFi/Bluetooth adapters +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n tiwilink-firmware +Firmware for Texas Instruments WiFi/Bluetooth adapters + +# SMART NIC and network switch firmwares +%package -n liquidio-firmware +Summary: Firmware for Cavium LiquidIO Intelligent Server Adapter +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n liquidio-firmware +Firmware for Cavium LiquidIO Intelligent Server Adapter + +%package -n mlxsw_spectrum-firmware +Summary: Firmware for Mellanox Spectrum 1/2/3 Switches +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n mlxsw_spectrum-firmware +Firmware for Mellanox Spectrumi series 1/2/3 ethernet switches. + +%package -n mrvlprestera-firmware +Summary: Firmware for Marvell Prestera Switchdev/ASIC devices +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n mrvlprestera-firmware +Firmware for Marvell Prestera Switchdev/ASIC devices + +%package -n netronome-firmware +Summary: Firmware for Netronome Smart NICs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n netronome-firmware +Firmware for Netronome Smart NICs + +%package -n qcom-accel-firmware +Summary: Firmware for Qualcomm Technologies data center / Open-vRAN Accelerators +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n qcom-accel-firmware +Firmware for Qualcomm Technologies data center and Open-vRAN accelerators +including the X100 5G RAN Accelerator Card, the QRU100 5G RAN Platform +and the Cloud AI 100. + +%package -n qed-firmware +Summary: Firmware for Marvell FastLinQ adapters family +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n qed-firmware +Firmware for Marvell FastLinQ adapters family (QDE), this device +supports RoCE (RDMA over Converged Ethernet), iSCSI, iWARP, FCoE +and ethernet including SRIOV, DCB etc. + +# Silicon Vendor specific +%package -n mediatek-firmware +Summary: Firmware for Mediatek SoCs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n mediatek-firmware +Firmware for various compoents in Mediatek SoCs, in particular SCP. + +%package -n qcom-firmware +Summary: Firmware for Qualcomm SoCs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +Requires: atheros-firmware = %{version}-%{release} +%description -n qcom-firmware +Firmware for various compoents in Qualcomm SoCs including Adreno GPUs, +Venus video encode/decode, Audio DSP, Compute DSP, modem, Sensor DSPs. + +# Vision and ISP hardware +%package -n intel-vsc-firmware +Summary: Firmware files for Intel Visual Sensing Controller (IVSC) +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n intel-vsc-firmware +Firmware files for Intel Visual Sensing Controller (IVSC) for +Tiger Lake, Alder Lake and Raptor Lake SoCs and the IPU3/6 firmware. + +# Sound codec hardware +%package -n cirrus-audio-firmware +Summary: Firmware for Cirrus audio amplifiers and codecs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n cirrus-audio-firmware +Firmware for Cirrus audio amplifiers and codecs + +%package -n intel-audio-firmware +Summary: Firmware for Intel audio DSP amplifiers and codecs +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n intel-audio-firmware +Firmware for Intel audio DSP amplifiers and codecs + +# Random other hardware +%package -n dvb-firmware +Summary: Firmware for various DVB broadcast receivers +License: LicenseRef-Callaway-Redistributable-no-modification-permitted +Requires: linux-firmware-whence = %{version}-%{release} +%description -n dvb-firmware +Firmware for various DVB broadcast receivers. These include the +Siano DTV devices, devices based on Conexant chipsets (cx18, +cx23885, cx23840, cx231xx), Xceive xc4000/xc5000, DiBcom dib0700, +Terratec H5 DRX-K, ITEtech IT9135 Ax and Bx, and av7110. + +%prep +%autosetup -S git -p1 + +%build + +%install +mkdir -p %{buildroot}/%{_firmwarepath} +mkdir -p %{buildroot}/%{_firmwarepath}/updates + +make %{?_smp_mflags} DESTDIR=%{buildroot} FIRMWAREDIR=%{_firmwarepath} install-xz + +# Cleanup files we don't want to ship +pushd %{buildroot}/%{_firmwarepath} +# Remove firmware shipped in separate packages already +# Perhaps these should be built as subpackages of linux-firmware? +rm -rf ess korg sb16 yamaha + +# Remove firmware for Creative CA0132 HD as it's in alsa-firmware +rm -f ctefx.bin* ctspeq.bin* + +# Remove source files we don't need to install +rm -rf carl9170fw +rm -rf cis/{src,Makefile} +rm -f atusb/ChangeLog +rm -f av7110/{Boot.S,Makefile} +rm -f dsp56k/{bootstrap.asm,concat-bootstrap.pl,Makefile} +rm -f iscis/{*.c,*.h,README,Makefile} +rm -f keyspan_pda/{keyspan_pda.S,xircom_pgs.S,Makefile} +rm -f usbdux/*dux */*.asm + +# No need to install old firmware versions where we also provide newer versions +# which are preferred and support the same (or more) hardware +rm -f libertas/sd8686_v8* +rm -f libertas/usb8388_v5.bin* + +# Remove superfluous infra files +rm -f check_whence.py Makefile README +popd + +# Create file list but exclude firmwares that we place in subpackages +FILEDIR=`pwd` +pushd %{buildroot}/%{_firmwarepath} +find . \! -type d > $FILEDIR/linux-firmware.files +find . -type d | sed -e '/^.$/d' > $FILEDIR/linux-firmware.dirs +popd +sed -i -e 's:^./::' linux-firmware.{files,dirs} +sed \ + -i -e '/^a300_p/d' \ + -i -e '/^amdgpu/d' \ + -i -e '/^amdnpu/d' \ + -i -e '/^amd/d' \ + -i -e '/^amdtee/d' \ + -i -e '/^amd-ucode/d' \ + -i -e '/^ar3k/d' \ + -i -e '/^ath6k/d' \ + -i -e '/^ath9k_htc/d' \ + -i -e '/^ath10k/d' \ + -i -e '/^ath11k/d' \ + -i -e '/^ath12k/d' \ + -i -e '/^as102_data/d' \ + -i -e '/^av7110/d' \ + -i -e '/^brcm/d' \ + -i -e '/^cirrus/d' \ + -i -e '/^cmmb/d' \ + -i -e '/^cypress/d' \ + -i -e '/^dvb/d' \ + -i -e '/^i915/d' \ + -i -e '/^intel\/avs/d' \ + -i -e '/^intel\/catpt/d' \ + -i -e '/^intel\/dsp_fw/d' \ + -i -e '/^intel\/fw_sst/d' \ + -i -e '/^intel\/ipu/d' \ + -i -e '/^intel\/ipu3/d' \ + -i -e '/^intel\/irci_irci/d' \ + -i -e '/^intel\/vsc/d' \ + -i -e '/^isdbt/d' \ + -i -e '/^iwlwifi/d' \ + -i -e '/^intel\/iwlwifi/d' \ + -i -e '/^nvidia\/a/d' \ + -i -e '/^nvidia\/g/d' \ + -i -e '/^nvidia\/tu/d' \ + -i -e '/^lgs8g75/d' \ + -i -e '/^libertas/d' \ + -i -e '/^liquidio/d' \ + -i -e '/^mellanox/d' \ + -i -e '/^mediatek/d' \ + -i -e '/^mrvl\/prestera/d' \ + -i -e '/^mrvl\/sd8787/d' \ + -i -e '/^mt76/d' \ + -i -e '/^netronome/d' \ + -i -e '/^nxp/d' \ + -i -e '/^qca/d' \ + -i -e '/^qcom/d' \ + -i -e '/^qed/d' \ + -i -e '/^radeon/d' \ + -i -e '/^rtl_bt/d' \ + -i -e '/^rtlwifi/d' \ + -i -e '/^rtw88/d' \ + -i -e '/^rtw89/d' \ + -i -e '/^sms1xxx/d' \ + -i -e '/^tdmb/d' \ + -i -e '/^ti-connectivity/d' \ + -i -e '/^v4l-cx2/d' \ + linux-firmware.{files,dirs} +sed -i -e 's!^!/usr/lib/firmware/!' linux-firmware.{files,dirs} +sed -i -e 's/^/"/;s/$/"/' linux-firmware.files +sed -e 's/^/%%dir /' linux-firmware.dirs >> linux-firmware.files + +# temporary workaround for directory->symlink changes/migration +%pretrans -n nvidia-gpu-firmware -p +path = "/usr/lib/firmware/nvidia/ad103" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end +path = "/usr/lib/firmware/nvidia/ad104" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end +path = "/usr/lib/firmware/nvidia/ad106" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end +path = "/usr/lib/firmware/nvidia/ad107" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + + +%files -f linux-firmware.files +%dir %{_firmwarepath} +%license LICENCE.* LICENSE.* GPL* + +%files whence +%license WHENCE + +# GPU firmwares +%files -n amd-gpu-firmware +%license LICENSE.radeon LICENSE.amdgpu LICENSE.amdnpu +%{_firmwarepath}/amdgpu/ +%{_firmwarepath}/amdnpu/ +%{_firmwarepath}/radeon/ + +%files -n intel-gpu-firmware +%license LICENSE.i915 +%{_firmwarepath}/i915/ + +%files -n nvidia-gpu-firmware +%license LICENCE.nvidia +%dir %{_firmwarepath}/nvidia/ +%{_firmwarepath}/nvidia/a* +%{_firmwarepath}/nvidia/g* +%{_firmwarepath}/nvidia/tu* + +# Microcode updates +%files -n amd-ucode-firmware +%license LICENSE.amd-ucode +%{_firmwarepath}/amd/ +%{_firmwarepath}/amdtee/ +%{_firmwarepath}/amd-ucode/ + +# WiFi/Bluetooth firmwares +%files -n atheros-firmware +%license LICENCE.atheros_firmware +%license LICENSE.QualcommAtheros_ar3k +%license LICENSE.QualcommAtheros_ath10k +%license LICENCE.open-ath9k-htc-firmware +%license qca/NOTICE.txt +%{_firmwarepath}/ar3k/ +%{_firmwarepath}/ath6k/ +%{_firmwarepath}/ath9k_htc/ +%{_firmwarepath}/ath10k/ +%{_firmwarepath}/ath11k/ +%{_firmwarepath}/ath12k/ +%{_firmwarepath}/qca/ + +%files -n brcmfmac-firmware +%license LICENCE.broadcom_bcm43xx +%license LICENCE.cypress +%{_firmwarepath}/brcm/ +%{_firmwarepath}/cypress/ + +%files -n iwlegacy-firmware +%license LICENCE.iwlwifi_firmware +%{_firmwarepath}/iwlwifi-3945-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-3945-*.ucode* +%{_firmwarepath}/iwlwifi-4965-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-4965-*.ucode* + +%files -n iwlwifi-dvm-firmware +%license LICENCE.iwlwifi_firmware +%{_firmwarepath}/iwlwifi-1??-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-1??-*.ucode* +%{_firmwarepath}/iwlwifi-1000-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-1000-*.ucode* +%{_firmwarepath}/iwlwifi-20?0-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-20?0-*.ucode* +%{_firmwarepath}/iwlwifi-5??0-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-5??0-*.ucode* +%{_firmwarepath}/iwlwifi-60?0-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-60?0-*.ucode* +%{_firmwarepath}/iwlwifi-6000g2?-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-6000g2?-*.ucode* + +%files -n iwlwifi-mvm-firmware +%license LICENCE.iwlwifi_firmware +%{_firmwarepath}/iwlwifi-316?-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-316?-*.ucode* +%{_firmwarepath}/iwlwifi-726?-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-726?-*.ucode* +%{_firmwarepath}/iwlwifi-7265D-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-7265D-*.ucode* +%{_firmwarepath}/iwlwifi-8000C-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-8000C-*.ucode* +%{_firmwarepath}/iwlwifi-8265-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-8265-*.ucode* +%{_firmwarepath}/iwlwifi-9??0-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-9??0-*.ucode* +%{_firmwarepath}/iwlwifi-cc-a0-*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-cc-a0-*.ucode* +%{_firmwarepath}/iwlwifi-gl-c0* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-gl-c0* +%{_firmwarepath}/iwlwifi-ma-b0* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-ma-b0* +%{_firmwarepath}/iwlwifi-Qu*.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-Qu*.ucode* +%{_firmwarepath}/iwlwifi-ty-a0* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-ty-a0* +%{_firmwarepath}/iwlwifi-so-a0* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-so-a0* +%{_firmwarepath}/iwlwifi-bz-b0* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-bz-b0* +%exclude %{_firmwarepath}/iwlwifi-bz-b0*9[7-9].ucode* +%exclude %{_firmwarepath}/iwlwifi-bz-b0*1??.ucode* +%exclude %{_firmwarepath}/intel/iwlwifi/iwlwifi-bz-b0*9[7-9].ucode* +%exclude %{_firmwarepath}/intel/iwlwifi/iwlwifi-bz-b0*1??.ucode* +%exclude %{_firmwarepath}/iwlwifi-gl-c0*9[7-9].ucode* +%exclude %{_firmwarepath}/iwlwifi-gl-c0*1??.ucode* +%exclude %{_firmwarepath}/intel/iwlwifi/iwlwifi-gl-c0*9[7-9].ucode* +%exclude %{_firmwarepath}/intel/iwlwifi/iwlwifi-gl-c0*1??.ucode* + +%files -n iwlwifi-mld-firmware +%license LICENCE.iwlwifi_firmware +%{_firmwarepath}/iwlwifi-bz-b0*9[7-9].ucode* +%{_firmwarepath}/iwlwifi-bz-b0*1??.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-bz-b0*9[7-9].ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-bz-b0*1??.ucode* +%{_firmwarepath}/iwlwifi-gl-c0*9[7-9].ucode* +%{_firmwarepath}/iwlwifi-gl-c0*1??.ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-gl-c0*9[7-9].ucode* +%{_firmwarepath}/intel/iwlwifi/iwlwifi-gl-c0*1??.ucode* + +%files -n libertas-firmware +%license LICENCE.Marvell LICENCE.OLPC +%dir %{_firmwarepath}/libertas +%dir %{_firmwarepath}/mrvl +%{_firmwarepath}/libertas/* +%{_firmwarepath}/mrvl/sd8787* + +%files -n mt7xxx-firmware +%license LICENCE.mediatek +%license LICENCE.ralink_a_mediatek_company_firmware +%dir %{_firmwarepath}/mediatek +%{_firmwarepath}/mediatek/mt76* +%{_firmwarepath}/mediatek/mt791* +%{_firmwarepath}/mediatek/mt7925/ +%{_firmwarepath}/mediatek/mt7996/ +%{_firmwarepath}/mediatek/BT* +%{_firmwarepath}/mediatek/WIFI* +%{_firmwarepath}/mt76* + +%files -n nxpwireless-firmware +%license LICENSE.nxp +%dir %{_firmwarepath}/nxp +%{_firmwarepath}/nxp/* + +%files -n qcom-wwan-firmware +%license LICENSE.qcom qcom/NOTICE.txt +%dir %{_firmwarepath}/qcom +%{_firmwarepath}/qcom/sdx*/ + +%files -n realtek-firmware +%license LICENCE.rtlwifi_firmware.txt +%{_firmwarepath}/rtl_bt/ +%{_firmwarepath}/rtlwifi/ +%{_firmwarepath}/rtw88/ +%{_firmwarepath}/rtw89/ + +%files -n tiwilink-firmware +%license LICENCE.ti-connectivity +%dir %{_firmwarepath}/ti-connectivity/ +%{_firmwarepath}/ti-connectivity/* + +# SMART NIC and network switch firmwares +%files -n liquidio-firmware +%license LICENCE.cavium_liquidio +%dir %{_firmwarepath}/liquidio +%{_firmwarepath}/liquidio/* + +%files -n mrvlprestera-firmware +%license LICENCE.Marvell +%dir %{_firmwarepath}/mrvl/prestera +%{_firmwarepath}/mrvl/prestera/* + +%files -n mlxsw_spectrum-firmware +%dir %{_firmwarepath}/mellanox/ +%{_firmwarepath}/mellanox/* + +%files -n netronome-firmware +%license LICENCE.Netronome +%dir %{_firmwarepath}/netronome +%{_firmwarepath}/netronome/* + +%files -n qcom-accel-firmware +%dir %{_firmwarepath}/qcom +%dir %{_firmwarepath}/qcom/aic100 +%dir %{_firmwarepath}/qcom/qdu100 +%{_firmwarepath}/qcom/aic100/* +%{_firmwarepath}/qcom/qdu100/* + +%files -n qed-firmware +%dir %{_firmwarepath}/qed +%{_firmwarepath}/qed/* + +# Silicon Vendor specific +%files -n mediatek-firmware +%license LICENCE.mediatek +%dir %{_firmwarepath}/mediatek +%{_firmwarepath}/mediatek/mt798?* +%{_firmwarepath}/mediatek/mt8173/ +%{_firmwarepath}/mediatek/mt8183/ +%{_firmwarepath}/mediatek/mt8186/ +%{_firmwarepath}/mediatek/mt8188/ +%{_firmwarepath}/mediatek/mt8189/ +%{_firmwarepath}/mediatek/mt8192/ +%{_firmwarepath}/mediatek/mt8195/ +%{_firmwarepath}/mediatek/mt8196/ +%{_firmwarepath}/mediatek/sof/ +%{_firmwarepath}/mediatek/sof-tplg/ + +%files -n qcom-firmware +%license LICENSE.qcom LICENSE.qcom_yamato qcom/NOTICE.txt +%dir %{_firmwarepath}/qcom +%{_firmwarepath}/a300_p* +%{_firmwarepath}/qcom/*.fw* +%{_firmwarepath}/qcom/*.bin* +%{_firmwarepath}/qcom/*.m* +%{_firmwarepath}/qcom/apq*/ +%{_firmwarepath}/qcom/kaanapali/ +%{_firmwarepath}/qcom/qcm*/ +%{_firmwarepath}/qcom/qcs*/ +%{_firmwarepath}/qcom/qrb*/ +%{_firmwarepath}/qcom/sa*/ +%{_firmwarepath}/qcom/sc*/ +%{_firmwarepath}/qcom/sdm*/ +%{_firmwarepath}/qcom/sm*/ +%{_firmwarepath}/qcom/venus-*/ +%{_firmwarepath}/qcom/vpu*/ +%{_firmwarepath}/qcom/x1*/ + +# Vision and ISP hardware +%files -n intel-vsc-firmware +%license LICENSE.ivsc +%dir %{_firmwarepath}/intel/ipu/ +%dir %{_firmwarepath}/intel/vsc/ +%{_firmwarepath}/intel/ipu3-fw.bin* +%{_firmwarepath}/intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin* +%{_firmwarepath}/intel/ipu/* +%{_firmwarepath}/intel/vsc/* + +# Sound codec hardware +%files -n cirrus-audio-firmware +%license LICENSE.cirrus +%dir %{_firmwarepath}/cirrus +%{_firmwarepath}/cirrus/* + +%files -n intel-audio-firmware +%license LICENCE.adsp_sst LICENCE.IntcSST2 +%dir %{_firmwarepath}/intel/ +%dir %{_firmwarepath}/intel/avs/ +%dir %{_firmwarepath}/intel/catpt/ +%{_firmwarepath}/intel/avs/* +%{_firmwarepath}/intel/catpt/* +%{_firmwarepath}/intel/dsp_fw* +%{_firmwarepath}/intel/fw_sst* + +# Random other hardware +%files -n dvb-firmware +%license LICENSE.dib0700 LICENCE.it913x LICENCE.siano +%license LICENCE.xc4000 LICENCE.xc5000 LICENCE.xc5000c +%dir %{_firmwarepath}/av7110/ +%{_firmwarepath}/av7110/* +%{_firmwarepath}/as102_data* +%{_firmwarepath}/cmmb* +%{_firmwarepath}/dvb* +%{_firmwarepath}/isdbt* +%{_firmwarepath}/lgs8g75* +%{_firmwarepath}/sms1xxx* +%{_firmwarepath}/tdmb* +%{_firmwarepath}/v4l-cx2* + +%changelog +%{?autochangelog} diff --git a/SPECS/linux-headers/linux-headers.spec b/SPECS/linux-headers/linux-headers.spec new file mode 100644 index 00000000..776499ad --- /dev/null +++ b/SPECS/linux-headers/linux-headers.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%ifarch riscv64 +%global archdir riscv +%endif + +Name: linux-headers +Version: 6.17.5 +Release: %autorelease +Summary: Header files for the Linux kernel for use by userspace +License: GPL-2.0-only AND LGPL-2.1-only AND MIT AND BSD-2-Clause AND BSD-3-Clause +URL: https://www.kernel.org/ +#!RemoteAsset +Source0: https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-%{version}.tar.xz + +BuildRequires: rsync + +%description +Linux-headers includes the C header files that specify the stable API +interface between the Linux kernel and userspace libraries and programs. + +%prep +%autosetup -p1 -n linux-%{version} + +%install +%make_build ARCH=%{archdir} headers_install INSTALL_HDR_PATH=%{buildroot}%{_prefix} + +%files +%license COPYING +%{_includedir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/linux/config.riscv64 b/SPECS/linux/config.riscv64 new file mode 100644 index 00000000..842f7841 --- /dev/null +++ b/SPECS/linux/config.riscv64 @@ -0,0 +1,1759 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_ZSTD=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BPF_SYSCALL=y +CONFIG_BPF_JIT=y +CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_PREEMPT=y +CONFIG_PREEMPT_DYNAMIC=y +CONFIG_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_IRQ_TIME_ACCOUNTING=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_PSI=y +CONFIG_PSI_DEFAULT_DISABLED=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=20 +CONFIG_NUMA_BALANCING=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_RDMA=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_HUGETLB=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_SYSFS_SYSCALL=y +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +CONFIG_DEBUG_PERF_USE_VMALLOC=y +CONFIG_PROFILING=y +CONFIG_KEXEC=y +CONFIG_KEXEC_FILE=y +CONFIG_ARCH_MICROCHIP=y +CONFIG_ARCH_RENESAS=y +CONFIG_ARCH_SIFIVE=y +CONFIG_ARCH_SOPHGO=y +CONFIG_ARCH_SPACEMIT=y +CONFIG_SOC_STARFIVE=y +CONFIG_ARCH_SUNXI=y +CONFIG_ARCH_THEAD=y +CONFIG_ARCH_VIRT=y +CONFIG_ARCH_CANAAN=y +CONFIG_SMP=y +CONFIG_SCHED_MC=y +CONFIG_NUMA=y +CONFIG_NODES_SHIFT=7 +CONFIG_RISCV_SBI_V01=y +# CONFIG_RISCV_BOOT_SPINWAIT is not set +CONFIG_RANDOMIZE_BASE=y +CONFIG_PM_DEBUG=y +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_IDLE_GOV_TEO=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=m +CONFIG_ACPI=y +CONFIG_ACPI_TAD=m +CONFIG_ACPI_DOCK=y +CONFIG_ACPI_PCI_SLOT=y +CONFIG_ACPI_CONTAINER=y +CONFIG_ACPI_HED=y +CONFIG_ACPI_NFIT=m +CONFIG_ACPI_CONFIGFS=m +CONFIG_ACPI_PFRUT=m +CONFIG_ACPI_FFH=y +CONFIG_PMIC_OPREGION=y +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_MODULE_SIG_SHA256=y +CONFIG_MODULE_COMPRESS=y +CONFIG_MODULE_COMPRESS_ZSTD=y +CONFIG_BLK_DEV_ZONED=y +CONFIG_BLK_DEV_THROTTLING=y +CONFIG_BLK_WBT=y +CONFIG_BLK_INLINE_ENCRYPTION=y +CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_BSD_DISKLABEL=y +CONFIG_SOLARIS_X86_PARTITION=y +CONFIG_UNIXWARE_DISKLABEL=y +CONFIG_KARMA_PARTITION=y +CONFIG_BINFMT_MISC=m +CONFIG_ZSWAP=y +CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4=y +CONFIG_ZSMALLOC_STAT=y +CONFIG_SLAB_FREELIST_RANDOM=y +CONFIG_SLAB_FREELIST_HARDENED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_KSM=y +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y +CONFIG_CMA=y +CONFIG_CMA_SYSFS=y +CONFIG_CMA_AREAS=19 +CONFIG_IDLE_PAGE_TRACKING=y +CONFIG_USERFAULTFD=y +CONFIG_LRU_GEN=y +CONFIG_LRU_GEN_ENABLED=y +CONFIG_DAMON=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=m +CONFIG_UNIX_DIAG=m +CONFIG_TLS=m +CONFIG_TLS_DEVICE=y +CONFIG_XFRM_USER=m +CONFIG_XFRM_SUB_POLICY=y +CONFIG_XFRM_STATISTICS=y +CONFIG_NET_KEY=m +CONFIG_NET_KEY_MIGRATE=y +CONFIG_XDP_SOCKETS=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_FIB_TRIE_STATS=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_NET_IPVTI=m +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_ESP_OFFLOAD=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_DIAG=m +CONFIG_INET_UDP_DIAG=m +CONFIG_INET_RAW_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_NV=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_TCP_CONG_DCTCP=m +CONFIG_TCP_CONG_BBR=m +CONFIG_TCP_MD5SIG=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_SIT=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_GRE=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +CONFIG_NETLABEL=y +CONFIG_MPTCP=y +CONFIG_NETWORK_PHY_TIMESTAMPING=y +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMEOUT=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_GLUE_CT=y +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y +CONFIG_NFT_NUMGEN=m +CONFIG_NFT_CT=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m +CONFIG_NFT_NAT=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_QUOTA=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NFT_HASH=m +CONFIG_NFT_FIB_INET=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XTABLES_COMPAT=y +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_AUDIT=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CGROUP=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPCOMP=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_MAC=m +CONFIG_IP_SET_HASH_NETPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETNET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_IPV6=y +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_FO=m +CONFIG_IP_VS_OVF=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_PE_SIP=m +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_LOG_ARP=m +CONFIG_NF_LOG_IPV4=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_SYNPROXY=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SECURITY=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_REJECT=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_IP_SCTP=m +CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y +CONFIG_SCTP_COOKIE_HMAC_MD5=y +CONFIG_TIPC=m +CONFIG_TIPC_MEDIA_IB=y +CONFIG_L2TP=m +CONFIG_L2TP_DEBUGFS=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_VLAN_FILTERING=y +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_VLAN_8021Q_MVRP=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_HHF=m +CONFIG_NET_SCH_PIE=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m +CONFIG_NET_SCH_DEFAULT=y +CONFIG_DEFAULT_FQ_CODEL=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_CLS_BPF=m +CONFIG_NET_CLS_FLOWER=m +CONFIG_NET_CLS_MATCHALL=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_SAMPLE=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +CONFIG_NET_ACT_VLAN=m +CONFIG_NET_ACT_BPF=m +CONFIG_NET_ACT_SKBMOD=m +CONFIG_NET_ACT_TUNNEL_KEY=m +CONFIG_DCB=y +CONFIG_OPENVSWITCH=m +CONFIG_VSOCKETS=m +CONFIG_VIRTIO_VSOCKETS=m +CONFIG_NETLINK_DIAG=y +CONFIG_NET_SWITCHDEV=y +CONFIG_CGROUP_NET_PRIO=y +CONFIG_BPF_STREAM_PARSER=y +CONFIG_NET_PKTGEN=m +CONFIG_NET_DROP_MONITOR=m +CONFIG_CAN=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_LEDS=y +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_RFKILL_GPIO=m +CONFIG_NET_9P=y +CONFIG_NET_9P_FD=m +CONFIG_NET_9P_VIRTIO=y +CONFIG_CAIF=y +CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y +CONFIG_LWTUNNEL=y +CONFIG_PCI=y +CONFIG_PCIEAER=y +CONFIG_PCIEAER_INJECT=m +CONFIG_PCIE_ECRC=y +CONFIG_PCIE_DPC=y +CONFIG_PCI_STUB=y +CONFIG_PCI_IOV=y +CONFIG_PCI_PRI=y +CONFIG_PCI_PASID=y +CONFIG_VGA_ARB_MAX_GPUS=64 +CONFIG_HOTPLUG_PCI_SHPC=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_PCIE_XILINX=y +CONFIG_PCIE_CADENCE_PLAT_HOST=y +CONFIG_PCIE_CADENCE_PLAT_EP=y +CONFIG_PCIE_DW_PLAT_HOST=y +CONFIG_PCIE_DW_PLAT_EP=y +CONFIG_PCIE_FU740=y +CONFIG_PCIE_MICROCHIP_HOST=y +CONFIG_PCIE_STARFIVE_HOST=y +CONFIG_PCI_ENDPOINT=y +CONFIG_PCI_ENDPOINT_CONFIGFS=y +CONFIG_CXL_BUS=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_ALLOW_DEV_COREDUMP is not set +CONFIG_SIFIVE_CCACHE=y +CONFIG_CONNECTOR=y +CONFIG_SYSFB_SIMPLEFB=y +CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y +CONFIG_MTD=m +CONFIG_MTD_CMDLINE_PARTS=m +CONFIG_MTD_BLOCK=m +CONFIG_MTD_CFI=m +CONFIG_MTD_CFI_ADV_OPTIONS=y +CONFIG_MTD_CFI_GEOMETRY=y +CONFIG_MTD_MAP_BANK_WIDTH_8=y +CONFIG_MTD_CFI_INTELEXT=m +CONFIG_MTD_CFI_AMDSTD=m +CONFIG_MTD_CFI_STAA=m +CONFIG_MTD_PHYSMAP=m +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_BLOCK2MTD=m +CONFIG_MTD_SPI_NOR=m +CONFIG_MTD_UBI=m +CONFIG_MTD_UBI_GLUEBI=m +CONFIG_OF_OVERLAY=y +CONFIG_BLK_DEV_NULL_BLK=m +CONFIG_ZRAM=m +CONFIG_ZRAM_MULTI_COMP=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=0 +CONFIG_BLK_DEV_DRBD=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_CDROM_PKTCDVD=m +CONFIG_ATA_OVER_ETH=m +CONFIG_VIRTIO_BLK=y +CONFIG_BLK_DEV_RBD=m +CONFIG_BLK_DEV_NVME=y +CONFIG_NVME_MULTIPATH=y +CONFIG_NVME_RDMA=m +CONFIG_NVME_FC=m +CONFIG_NVME_TCP=m +CONFIG_NVME_TARGET=m +CONFIG_NVME_TARGET_LOOP=m +CONFIG_NVME_TARGET_RDMA=m +CONFIG_NVME_TARGET_FC=m +CONFIG_NVME_TARGET_FCLOOP=m +CONFIG_NVME_TARGET_TCP=m +CONFIG_ENCLOSURE_SERVICES=m +CONFIG_APDS9802ALS=m +CONFIG_ISL29003=m +CONFIG_ISL29020=m +CONFIG_SENSORS_TSL2550=m +CONFIG_SENSORS_BH1770=m +CONFIG_SENSORS_APDS990X=m +CONFIG_SRAM=y +CONFIG_EEPROM_MAX6875=m +CONFIG_SENSORS_LIS3_I2C=m +CONFIG_ALTERA_STAPL=m +CONFIG_MISC_RTSX_PCI=m +CONFIG_MISC_RTSX_USB=m +CONFIG_UACCE=m +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=y +CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_ENCLOSURE=m +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_SCSI_SPI_ATTRS=m +CONFIG_SCSI_FC_ATTRS=m +CONFIG_SCSI_SAS_LIBSAS=m +CONFIG_SCSI_SAS_ATA=y +CONFIG_ISCSI_TCP=m +CONFIG_SCSI_CXGB4_ISCSI=m +CONFIG_SCSI_BNX2_ISCSI=m +CONFIG_SCSI_BNX2X_FCOE=m +CONFIG_BE2ISCSI=m +CONFIG_SCSI_HPSA=m +CONFIG_SCSI_AACRAID=m +CONFIG_MEGARAID_SAS=m +CONFIG_SCSI_MPT2SAS=m +CONFIG_SCSI_SMARTPQI=m +CONFIG_LIBFC=m +CONFIG_LIBFCOE=m +CONFIG_FCOE=m +CONFIG_SCSI_IPR=m +CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA_ISCSI=m +CONFIG_QEDI=m +CONFIG_QEDF=m +CONFIG_SCSI_LPFC=m +CONFIG_SCSI_DEBUG=m +CONFIG_SCSI_VIRTIO=y +CONFIG_SCSI_CHELSIO_FCOE=m +CONFIG_SCSI_DH=y +CONFIG_SCSI_DH_RDAC=y +CONFIG_SCSI_DH_HP_SW=y +CONFIG_SCSI_DH_EMC=y +CONFIG_SCSI_DH_ALUA=y +CONFIG_ATA=y +CONFIG_SATA_AHCI=y +CONFIG_SATA_MOBILE_LPM_POLICY=0 +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_ATA_PIIX=m +CONFIG_ATA_GENERIC=m +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +CONFIG_BCACHE=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_DEBUG=y +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_ERA=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +CONFIG_DM_MULTIPATH_QL=m +CONFIG_DM_MULTIPATH_ST=m +CONFIG_DM_DELAY=m +CONFIG_DM_UEVENT=y +CONFIG_DM_FLAKEY=m +CONFIG_DM_VERITY=m +CONFIG_DM_SWITCH=m +CONFIG_DM_LOG_WRITES=m +CONFIG_DM_INTEGRITY=m +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m +CONFIG_TCM_USER2=m +CONFIG_LOOPBACK_TARGET=m +CONFIG_TCM_FC=m +CONFIG_ISCSI_TARGET=m +CONFIG_ISCSI_TARGET_CXGB4=m +CONFIG_BONDING=m +CONFIG_DUMMY=m +CONFIG_NET_FC=y +CONFIG_IFB=m +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +CONFIG_IPVLAN=m +CONFIG_IPVTAP=m +CONFIG_VXLAN=m +CONFIG_GENEVE=m +CONFIG_MACSEC=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_VIRTIO_NET=y +CONFIG_NLMON=m +CONFIG_NET_VRF=m +CONFIG_VSOCKMON=m +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_AGERE is not set +# CONFIG_NET_VENDOR_ALTEON is not set +CONFIG_ENA_ETHERNET=m +CONFIG_ATL1=m +CONFIG_ATL1E=m +CONFIG_ATL1C=m +CONFIG_ALX=m +CONFIG_TIGON3=m +CONFIG_BNX2X=m +CONFIG_BNXT=m +CONFIG_BNXT_DCB=y +# CONFIG_BNXT_HWMON is not set +CONFIG_MACB=y +CONFIG_THUNDER_NIC_PF=m +CONFIG_THUNDER_NIC_VF=m +CONFIG_CAVIUM_PTP=y +CONFIG_LIQUIDIO=m +CONFIG_LIQUIDIO_VF=m +CONFIG_CHELSIO_T4VF=m +CONFIG_CHELSIO_IPSEC_INLINE=m +CONFIG_CHELSIO_TLS_DEVICE=m +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_CORTINA is not set +CONFIG_DNET=m +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_DLINK is not set +# CONFIG_NET_VENDOR_EMULEX is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_I825XX is not set +CONFIG_E1000=m +CONFIG_E1000E=y +CONFIG_IGB=m +CONFIG_IGBVF=m +CONFIG_IXGBE=m +CONFIG_IXGBE_DCB=y +CONFIG_IXGBEVF=m +CONFIG_I40E=m +CONFIG_I40EVF=m +CONFIG_ICE=m +CONFIG_FM10K=m +# CONFIG_NET_VENDOR_MARVELL is not set +CONFIG_MLX4_EN=m +# CONFIG_MLX4_CORE_GEN2 is not set +CONFIG_MLX5_CORE=m +CONFIG_MLX5_CORE_EN=y +CONFIG_MLX5_CORE_IPOIB=y +CONFIG_MLXSW_CORE=m +# CONFIG_MLXSW_SPECTRUM is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETERION is not set +CONFIG_NFP=m +# CONFIG_NET_VENDOR_NVIDIA is not set +CONFIG_ETHOC=m +# CONFIG_NET_VENDOR_PACKET_ENGINES is not set +CONFIG_QLA3XXX=m +CONFIG_NETXEN_NIC=m +CONFIG_QED=m +CONFIG_QEDE=m +# CONFIG_NET_VENDOR_BROCADE is not set +CONFIG_QCOM_EMAC=m +# CONFIG_NET_VENDOR_RDC is not set +CONFIG_8139CP=m +CONFIG_8139TOO=m +# CONFIG_8139TOO_PIO is not set +CONFIG_8139TOO_8129=y +CONFIG_R8169=y +# CONFIG_NET_VENDOR_RENESAS is not set +CONFIG_ROCKER=m +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SILAN is not set +# CONFIG_NET_VENDOR_SIS is not set +CONFIG_SFC=m +CONFIG_EPIC100=m +CONFIG_SMSC911X=m +CONFIG_SMSC9420=m +# CONFIG_NET_VENDOR_SOCIONEXT is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_NET_VENDOR_TEHUTI is not set +# CONFIG_NET_VENDOR_TI is not set +# CONFIG_NET_VENDOR_VIA is not set +CONFIG_NGBE=m +CONFIG_TXGBE=m +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_XILINX is not set +CONFIG_AMD_PHY=m +CONFIG_AQUANTIA_PHY=m +CONFIG_BROADCOM_PHY=m +CONFIG_BCM87XX_PHY=m +CONFIG_CICADA_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_ICPLUS_PHY=m +CONFIG_LXT_PHY=m +CONFIG_LSI_ET1011C_PHY=m +CONFIG_MARVELL_PHY=m +CONFIG_MICREL_PHY=m +CONFIG_MICROSEMI_PHY=m +CONFIG_NATIONAL_PHY=m +CONFIG_AT803X_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_STE10XP=m +CONFIG_TERANETICS_PHY=m +CONFIG_DP83848_PHY=m +CONFIG_DP83867_PHY=m +CONFIG_VITESSE_PHY=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_C_CAN=m +CONFIG_CAN_C_CAN_PLATFORM=m +CONFIG_CAN_C_CAN_PCI=m +CONFIG_CAN_CC770=m +CONFIG_CAN_CC770_PLATFORM=m +CONFIG_CAN_SJA1000=m +CONFIG_CAN_EMS_PCI=m +CONFIG_CAN_KVASER_PCI=m +CONFIG_CAN_PEAK_PCI=m +CONFIG_CAN_PLX_PCI=m +CONFIG_CAN_SJA1000_PLATFORM=m +CONFIG_CAN_SOFTING=m +CONFIG_CAN_8DEV_USB=m +CONFIG_CAN_EMS_USB=m +CONFIG_CAN_KVASER_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_MDIO_BITBANG=m +CONFIG_MDIO_BCM_UNIMAC=m +CONFIG_MDIO_GPIO=m +CONFIG_MDIO_OCTEON=m +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_HUAWEI_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +CONFIG_USB_NET_CH9200=m +# CONFIG_WLAN_VENDOR_ADMTEK is not set +CONFIG_ATH10K=m +CONFIG_ATH10K_PCI=m +# CONFIG_WLAN_VENDOR_ATMEL is not set +# CONFIG_WLAN_VENDOR_BROADCOM is not set +# CONFIG_WLAN_VENDOR_INTEL is not set +# CONFIG_WLAN_VENDOR_INTERSIL is not set +# CONFIG_WLAN_VENDOR_MARVELL is not set +# CONFIG_WLAN_VENDOR_MEDIATEK is not set +CONFIG_RT2X00=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT53XX=y +# CONFIG_WLAN_VENDOR_REALTEK is not set +# CONFIG_WLAN_VENDOR_RSI is not set +# CONFIG_WLAN_VENDOR_ST is not set +# CONFIG_WLAN_VENDOR_TI is not set +# CONFIG_WLAN_VENDOR_ZYDAS is not set +# CONFIG_WLAN_VENDOR_QUANTENNA is not set +CONFIG_WAN=y +CONFIG_HDLC=m +CONFIG_HDLC_RAW=m +CONFIG_HDLC_CISCO=m +CONFIG_HDLC_FR=m +CONFIG_HDLC_PPP=m +CONFIG_USB4_NET=m +CONFIG_INPUT_SPARSEKMAP=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_MOUSE_PS2_SENTELIC=y +CONFIG_MOUSE_SERIAL=m +CONFIG_MOUSE_APPLETOUCH=m +CONFIG_MOUSE_BCM5974=m +CONFIG_MOUSE_CYAPA=m +CONFIG_MOUSE_VSXXXAA=m +CONFIG_MOUSE_SYNAPTICS_I2C=m +CONFIG_MOUSE_SYNAPTICS_USB=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=m +CONFIG_RMI4_I2C=m +CONFIG_RMI4_SPI=m +CONFIG_RMI4_SMB=m +CONFIG_SERIO_RAW=m +CONFIG_SERIO_ALTERA_PS2=m +CONFIG_SERIO_ARC_PS2=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_RSA=y +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_8250_RT288X=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_NONSTANDARD=y +CONFIG_N_HDLC=m +CONFIG_N_GSM=m +CONFIG_VIRTIO_CONSOLE=y +CONFIG_IPMI_HANDLER=m +CONFIG_IPMI_DEVICE_INTERFACE=m +CONFIG_IPMI_SSIF=m +CONFIG_IPMI_WATCHDOG=m +CONFIG_IPMI_POWEROFF=m +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_TIMERIOMEM=m +CONFIG_HW_RANDOM_VIRTIO=y +# CONFIG_DEVPORT is not set +CONFIG_TCG_TIS=y +CONFIG_TCG_TIS_SPI=y +CONFIG_TCG_TIS_I2C_ATMEL=m +CONFIG_TCG_TIS_I2C_INFINEON=m +CONFIG_TCG_TIS_I2C_NUVOTON=m +CONFIG_TCG_ATMEL=m +CONFIG_TCG_TIS_ST33ZP24_I2C=m +CONFIG_TCG_TIS_ST33ZP24_SPI=m +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=m +CONFIG_I2C_ARB_GPIO_CHALLENGE=m +CONFIG_I2C_MUX_GPIO=m +CONFIG_I2C_MUX_PCA9541=m +CONFIG_I2C_MUX_PCA954x=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_MUX_MLXCPLD=m +CONFIG_I2C_NFORCE2=m +CONFIG_I2C_DESIGNWARE_CORE=y +CONFIG_I2C_DESIGNWARE_SLAVE=y +CONFIG_I2C_DESIGNWARE_PCI=m +CONFIG_I2C_GPIO=m +CONFIG_I2C_PCA_PLATFORM=m +CONFIG_I2C_SIMTEC=m +CONFIG_I2C_DIOLAN_U2C=m +CONFIG_I2C_TINY_USB=m +CONFIG_I2C_STUB=m +CONFIG_I2C_SLAVE_EEPROM=m +CONFIG_SPI=y +CONFIG_SPI_CADENCE=m +CONFIG_SPI_DESIGNWARE=y +CONFIG_SPI_DW_PCI=m +CONFIG_SPI_DW_MMIO=y +CONFIG_SPI_SIFIVE=y +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_GPIO=m +CONFIG_DP83640_PHY=m +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_CADENCE=m +CONFIG_GPIO_DWAPB=y +CONFIG_GPIO_GENERIC_PLATFORM=m +CONFIG_GPIO_SIFIVE=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_POWER_RESET_GPIO_RESTART=y +CONFIG_POWER_RESET_RESTART=y +CONFIG_CHARGER_SMB347=m +CONFIG_SENSORS_AD7314=m +CONFIG_SENSORS_AD7414=m +CONFIG_SENSORS_AD7418=m +CONFIG_SENSORS_ADM1025=m +CONFIG_SENSORS_ADM1026=m +CONFIG_SENSORS_ADM1029=m +CONFIG_SENSORS_ADM1031=m +CONFIG_SENSORS_ADM9240=m +CONFIG_SENSORS_ADT7310=m +CONFIG_SENSORS_ADT7410=m +CONFIG_SENSORS_ADT7411=m +CONFIG_SENSORS_ADT7462=m +CONFIG_SENSORS_ADT7470=m +CONFIG_SENSORS_ADT7475=m +CONFIG_SENSORS_ASC7621=m +CONFIG_SENSORS_ATXP1=m +CONFIG_SENSORS_DS620=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_F71805F=m +CONFIG_SENSORS_F71882FG=m +CONFIG_SENSORS_F75375S=m +CONFIG_SENSORS_GL518SM=m +CONFIG_SENSORS_GL520SM=m +CONFIG_SENSORS_G760A=m +CONFIG_SENSORS_G762=m +CONFIG_SENSORS_IBMAEM=m +CONFIG_SENSORS_IBMPEX=m +CONFIG_SENSORS_IT87=m +CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_POWR1220=m +CONFIG_SENSORS_LINEAGE=m +CONFIG_SENSORS_LTC2945=m +CONFIG_SENSORS_LTC4151=m +CONFIG_SENSORS_LTC4215=m +CONFIG_SENSORS_LTC4222=m +CONFIG_SENSORS_LTC4245=m +CONFIG_SENSORS_LTC4260=m +CONFIG_SENSORS_LTC4261=m +CONFIG_SENSORS_MAX1111=m +CONFIG_SENSORS_MAX16065=m +CONFIG_SENSORS_MAX1619=m +CONFIG_SENSORS_MAX1668=m +CONFIG_SENSORS_MAX197=m +CONFIG_SENSORS_MAX6639=m +CONFIG_SENSORS_MAX6650=m +CONFIG_SENSORS_MAX6697=m +CONFIG_SENSORS_MAX31790=m +CONFIG_SENSORS_MCP3021=m +CONFIG_SENSORS_ADCXX=m +CONFIG_SENSORS_LM63=m +CONFIG_SENSORS_LM70=m +CONFIG_SENSORS_LM73=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_LM77=m +CONFIG_SENSORS_LM78=m +CONFIG_SENSORS_LM80=m +CONFIG_SENSORS_LM83=m +CONFIG_SENSORS_LM85=m +CONFIG_SENSORS_LM87=m +CONFIG_SENSORS_LM90=m +CONFIG_SENSORS_LM92=m +CONFIG_SENSORS_LM93=m +CONFIG_SENSORS_LM95234=m +CONFIG_SENSORS_LM95241=m +CONFIG_SENSORS_LM95245=m +CONFIG_SENSORS_PC87360=m +CONFIG_SENSORS_PC87427=m +CONFIG_SENSORS_NCT6683=m +CONFIG_SENSORS_NCT7802=m +CONFIG_SENSORS_NCT7904=m +CONFIG_SENSORS_PCF8591=m +CONFIG_PMBUS=m +CONFIG_SENSORS_ADM1275=m +CONFIG_SENSORS_LM25066=m +CONFIG_SENSORS_LTC2978=m +CONFIG_SENSORS_LTC3815=m +CONFIG_SENSORS_MAX16064=m +CONFIG_SENSORS_MAX20751=m +CONFIG_SENSORS_MAX34440=m +CONFIG_SENSORS_MAX8688=m +CONFIG_SENSORS_TPS40422=m +CONFIG_SENSORS_UCD9000=m +CONFIG_SENSORS_UCD9200=m +CONFIG_SENSORS_ZL6100=m +CONFIG_SENSORS_PWM_FAN=y +CONFIG_SENSORS_SHT15=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_SIS5595=m +CONFIG_SENSORS_DME1737=m +CONFIG_SENSORS_EMC1403=m +CONFIG_SENSORS_EMC6W201=m +CONFIG_SENSORS_SMSC47M1=m +CONFIG_SENSORS_SMSC47M192=m +CONFIG_SENSORS_SMSC47B397=m +CONFIG_SENSORS_SCH5627=m +CONFIG_SENSORS_SCH5636=m +CONFIG_SENSORS_ADC128D818=m +CONFIG_SENSORS_ADS7828=m +CONFIG_SENSORS_ADS7871=m +CONFIG_SENSORS_AMC6821=m +CONFIG_SENSORS_INA209=m +CONFIG_SENSORS_INA2XX=m +CONFIG_SENSORS_TC74=m +CONFIG_SENSORS_THMC50=m +CONFIG_SENSORS_TMP102=m +CONFIG_SENSORS_TMP103=m +CONFIG_SENSORS_TMP401=m +CONFIG_SENSORS_TMP421=m +CONFIG_SENSORS_VIA686A=m +CONFIG_SENSORS_VT1211=m +CONFIG_SENSORS_VT8231=m +CONFIG_SENSORS_W83781D=m +CONFIG_SENSORS_W83791D=m +CONFIG_SENSORS_W83792D=m +CONFIG_SENSORS_W83793=m +CONFIG_SENSORS_W83795=m +CONFIG_SENSORS_W83L785TS=m +CONFIG_SENSORS_W83L786NG=m +CONFIG_SENSORS_W83627HF=m +CONFIG_SENSORS_W83627EHF=m +CONFIG_THERMAL_GOV_FAIR_SHARE=y +CONFIG_THERMAL_GOV_USER_SPACE=y +CONFIG_CPU_THERMAL=y +CONFIG_THERMAL_EMULATION=y +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_SYSFS=y +CONFIG_SOFT_WATCHDOG=m +CONFIG_GPIO_WATCHDOG=m +CONFIG_ALIM7101_WDT=m +CONFIG_I6300ESB_WDT=m +CONFIG_PCIPCWATCHDOG=m +CONFIG_WDTPCI=m +CONFIG_USBPCWATCHDOG=m +CONFIG_BCMA=m +CONFIG_BCMA_DRIVER_GMAC_CMN=y +CONFIG_BCMA_DRIVER_GPIO=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_PWM=y +# CONFIG_MEDIA_CEC_SUPPORT is not set +CONFIG_MEDIA_SUPPORT=m +CONFIG_VIDEO_FIXED_MINOR_RANGES=y +# CONFIG_DVB_NET is not set +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_AUXDISPLAY=y +CONFIG_DRM=y +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_RADEON=m +CONFIG_DRM_RADEON_USERPTR=y +CONFIG_DRM_AMDGPU=m +CONFIG_DRM_AMDGPU_CIK=y +CONFIG_DRM_AMDGPU_USERPTR=y +CONFIG_DRM_NOUVEAU=m +CONFIG_DRM_UDL=m +CONFIG_DRM_AST=m +CONFIG_DRM_MGAG200=m +CONFIG_DRM_QXL=m +CONFIG_DRM_VIRTIO_GPU=m +CONFIG_DRM_I2C_NXP_TDA998X=m +CONFIG_DRM_BOCHS=m +CONFIG_DRM_CIRRUS_QEMU=m +CONFIG_FB=y +CONFIG_FB_EFI=y +CONFIG_FB_RADEON=y +CONFIG_FB_SIMPLE=y +CONFIG_FB_SSD1307=m +CONFIG_FB_TILEBLITTING=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_LCD_PLATFORM=m +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=m +CONFIG_BACKLIGHT_LP855X=m +CONFIG_BACKLIGHT_GPIO=m +CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=m +CONFIG_SND=m +CONFIG_SND_ALOOP=m +CONFIG_SND_HDA_INTEL=m +CONFIG_SND_USB_AUDIO=m +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=y +CONFIG_HID_APPLEIR=m +CONFIG_HID_AUREAL=m +CONFIG_HID_BELKIN=y +CONFIG_HID_BETOP_FF=m +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +CONFIG_HID_CORSAIR=m +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=m +CONFIG_HID_ELECOM=m +CONFIG_HID_ELO=m +CONFIG_HID_EZKEY=y +CONFIG_HID_GEMBIRD=m +CONFIG_HID_GFRM=m +CONFIG_HID_HOLTEK=m +CONFIG_HID_GT683R=m +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_ICADE=m +CONFIG_HID_ITE=y +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=m +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=y +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +CONFIG_HID_PENMOUNT=m +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +CONFIG_HID_PICOLCD_FB=y +CONFIG_HID_PICOLCD_BACKLIGHT=y +CONFIG_HID_PICOLCD_LCD=y +CONFIG_HID_PICOLCD_LEDS=y +CONFIG_HID_PLANTRONICS=m +CONFIG_HID_PRIMAX=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAITEK=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEELSERIES=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_RMI=m +CONFIG_HID_GREENASIA=m +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_HID_TIVO=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_HID_ZYDACRON=m +CONFIG_HID_SENSOR_HUB=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +CONFIG_USB_LED_TRIG=y +CONFIG_USB_ULPI_BUS=m +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_LEDS_TRIGGER_USBPORT=m +CONFIG_USB_MON=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_UHCI_HCD=y +CONFIG_USB_PRINTER=m +CONFIG_USB_TMC=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=y +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_SIMPLE=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_SISUSBVGA=m +CONFIG_USB_LD=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_HSIC_USB3503=m +CONFIG_USB_CHAOSKEY=m +CONFIG_TYPEC=m +CONFIG_TYPEC_TCPM=m +CONFIG_TYPEC_TCPCI=m +CONFIG_TYPEC_UCSI=m +CONFIG_TYPEC_DP_ALTMODE=m +CONFIG_USB_ROLE_SWITCH=y +CONFIG_MMC=y +CONFIG_PWRSEQ_EMMC=m +CONFIG_PWRSEQ_SIMPLE=m +CONFIG_SDIO_UART=m +CONFIG_MMC_CRYPTO=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PCI=m +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_CADENCE=y +CONFIG_MMC_TIFM_SD=m +CONFIG_MMC_SPI=y +CONFIG_MMC_CB710=m +CONFIG_MMC_VIA_SDMMC=m +CONFIG_MMC_DW=m +CONFIG_MMC_DW_BLUEFIELD=m +CONFIG_MMC_DW_PCI=m +CONFIG_MMC_VUB300=m +CONFIG_MMC_USHC=m +CONFIG_MMC_REALTEK_PCI=m +CONFIG_MMC_REALTEK_USB=m +CONFIG_MMC_CQHCI=y +CONFIG_MMC_TOSHIBA_PCI=m +CONFIG_MMC_MTK=m +CONFIG_MMC_SDHCI_XENON=m +CONFIG_MEMSTICK=m +CONFIG_MSPRO_BLOCK=m +CONFIG_MEMSTICK_TIFM_MS=m +CONFIG_MEMSTICK_JMICRON_38X=m +CONFIG_MEMSTICK_R592=m +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=m +CONFIG_LEDS_LM3530=m +CONFIG_LEDS_LP3944=m +CONFIG_LEDS_LT3593=m +CONFIG_LEDS_BLINKM=m +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_ONESHOT=m +CONFIG_LEDS_TRIGGER_HEARTBEAT=m +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m +CONFIG_LEDS_TRIGGER_TRANSIENT=m +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_INFINIBAND=m +CONFIG_INFINIBAND_USER_MAD=m +CONFIG_INFINIBAND_USER_ACCESS=m +CONFIG_INFINIBAND_BNXT_RE=m +CONFIG_INFINIBAND_CXGB4=m +CONFIG_MLX4_INFINIBAND=m +CONFIG_MLX5_INFINIBAND=m +CONFIG_INFINIBAND_QEDR=m +CONFIG_RDMA_RXE=m +CONFIG_INFINIBAND_IPOIB=m +CONFIG_INFINIBAND_IPOIB_CM=y +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set +CONFIG_INFINIBAND_SRP=m +CONFIG_INFINIBAND_SRPT=m +CONFIG_INFINIBAND_ISER=m +CONFIG_INFINIBAND_ISERT=m +CONFIG_EDAC=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_SYSTOHC is not set +CONFIG_RTC_DRV_ABB5ZES3=m +CONFIG_RTC_DRV_ABX80X=m +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1374_WDT=y +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_ISL12022=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8523=m +CONFIG_RTC_DRV_PCF85063=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_M41T80_WDT=y +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8010=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m +CONFIG_RTC_DRV_EM3027=m +CONFIG_RTC_DRV_RV8803=m +CONFIG_RTC_DRV_M41T93=m +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1343=m +CONFIG_RTC_DRV_DS1347=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RX4581=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_PCF2123=m +CONFIG_RTC_DRV_MCP795=m +CONFIG_RTC_DRV_DS3232=m +CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_RV3029C2=m +# CONFIG_RTC_DRV_RV3029_HWMON is not set +CONFIG_RTC_DRV_DS1286=m +CONFIG_RTC_DRV_DS1511=m +CONFIG_RTC_DRV_DS1553=m +CONFIG_RTC_DRV_DS1685_FAMILY=m +CONFIG_RTC_DRV_DS1742=m +CONFIG_RTC_DRV_DS2404=m +CONFIG_RTC_DRV_EFI=y +CONFIG_RTC_DRV_STK17TA8=m +CONFIG_RTC_DRV_M48T35=m +CONFIG_RTC_DRV_M48T59=m +CONFIG_RTC_DRV_MSM6242=m +CONFIG_RTC_DRV_RP5C01=m +CONFIG_DMADEVICES=y +CONFIG_QCOM_HIDMA_MGMT=m +CONFIG_QCOM_HIDMA=m +CONFIG_DW_DMAC=m +CONFIG_DW_DMAC_PCI=m +CONFIG_ASYNC_TX_DMA=y +CONFIG_UIO_CIF=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_UIO_AEC=m +CONFIG_UIO_SERCOS3=m +CONFIG_UIO_PCI_GENERIC=m +CONFIG_VFIO=m +CONFIG_VFIO_NOIOMMU=y +CONFIG_VFIO_PCI=m +CONFIG_VIRT_DRIVERS=y +CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_BALLOON=y +CONFIG_VIRTIO_INPUT=y +CONFIG_VIRTIO_MMIO=y +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_VIRTIO_RTC=m +CONFIG_VHOST_NET=m +CONFIG_VHOST_SCSI=m +CONFIG_VHOST_VSOCK=m +CONFIG_HWSPINLOCK=y +CONFIG_MAILBOX=y +CONFIG_IOMMU_DEFAULT_DMA_LAZY=y +CONFIG_RPMSG_CHAR=y +CONFIG_RPMSG_CTRL=y +CONFIG_RPMSG_VIRTIO=y +CONFIG_EXTCON=y +CONFIG_EXTCON_GPIO=m +CONFIG_PWM=y +CONFIG_PWM_SIFIVE=m +CONFIG_GENERIC_PHY=y +CONFIG_USB4=m +CONFIG_DAX=y +CONFIG_DEV_DAX=m +CONFIG_INTERCONNECT=y +CONFIG_VALIDATE_FS_PARSER=y +CONFIG_EXT3_FS=m +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_XFS_FS=y +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_OCFS2_FS=m +# CONFIG_OCFS2_FS_STATS is not set +# CONFIG_OCFS2_DEBUG_MASKLOG is not set +CONFIG_BTRFS_FS=y +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_BTRFS_EXPERIMENTAL=y +CONFIG_BTRFS_FS_REF_VERIFY=y +CONFIG_FANOTIFY=y +CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +CONFIG_QFMT_V2=y +CONFIG_AUTOFS_FS=y +CONFIG_FUSE_FS=y +CONFIG_CUSE=m +CONFIG_VIRTIO_FS=y +CONFIG_OVERLAY_FS=m +CONFIG_NETFS_STATS=y +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +CONFIG_EXFAT_FS=y +CONFIG_NTFS3_LZX_XPRESS=y +CONFIG_NTFS3_FS_POSIX_ACL=y +CONFIG_NTFS_FS=m +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_HUGETLBFS=y +CONFIG_EFIVAR_FS=y +CONFIG_CRAMFS=m +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZ4=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_PSTORE=y +CONFIG_PSTORE_RAM=m +CONFIG_NFS_FS=y +CONFIG_NFS_V2=m +CONFIG_NFS_V3=m +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_ROOT_NFS=y +# CONFIG_NFS_DISABLE_UDP_SUPPORT is not set +# CONFIG_NFS_V4_2_READ_PLUS is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_BLOCKLAYOUT=y +CONFIG_NFSD_SCSILAYOUT=y +CONFIG_NFSD_FLEXFILELAYOUT=y +CONFIG_NFSD_V4_2_INTER_SSC=y +CONFIG_NFSD_V4_SECURITY_LABEL=y +CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_SUNRPC_DEBUG=y +CONFIG_CEPH_FS=m +CONFIG_CEPH_FS_POSIX_ACL=y +CONFIG_CIFS=m +# CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_9P_FS=y +CONFIG_9P_FS_POSIX_ACL=y +CONFIG_9P_FS_SECURITY=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m +CONFIG_NLS_UTF8=m +CONFIG_PERSISTENT_KEYRINGS=y +CONFIG_TRUSTED_KEYS=y +CONFIG_SECURITY=y +CONFIG_SECURITY_INFINIBAND=y +CONFIG_SECURITY_NETWORK_XFRM=y +CONFIG_LSM_MMAP_MIN_ADDR=32768 +CONFIG_SECURITY_SELINUX=y +CONFIG_SECURITY_SELINUX_BOOTPARAM=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_YAMA=y +CONFIG_SECURITY_LOCKDOWN_LSM=y +CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y +CONFIG_SECURITY_LANDLOCK=y +CONFIG_INTEGRITY_SIGNATURE=y +CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y +CONFIG_INTEGRITY_PLATFORM_KEYRING=y +CONFIG_IMA=y +CONFIG_IMA_DEFAULT_HASH_SHA256=y +CONFIG_IMA_READ_POLICY=y +CONFIG_IMA_APPRAISE=y +CONFIG_IMA_LOAD_X509=y +CONFIG_EVM=y +CONFIG_EVM_LOAD_X509=y +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf" +CONFIG_INIT_STACK_NONE=y +CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y +CONFIG_FORTIFY_SOURCE=y +CONFIG_HARDENED_USERCOPY=y +CONFIG_RANDSTRUCT_FULL=y +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_PCRYPT=m +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_DH=m +CONFIG_CRYPTO_ECDH=m +CONFIG_CRYPTO_CURVE25519=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=m +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SM4_GENERIC=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=m +CONFIG_CRYPTO_CHACHA20POLY1305=m +CONFIG_CRYPTO_GCM=y +CONFIG_CRYPTO_SEQIV=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_SM3_GENERIC=y +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_CRC32=m +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_LZ4HC=m +CONFIG_CRYPTO_ZSTD=y +CONFIG_CRYPTO_ANSI_CPRNG=m +CONFIG_CRYPTO_DRBG_HASH=y +CONFIG_CRYPTO_DRBG_CTR=y +CONFIG_CRYPTO_USER_API_HASH=y +CONFIG_CRYPTO_USER_API_SKCIPHER=y +CONFIG_CRYPTO_USER_API_RNG=y +CONFIG_CRYPTO_USER_API_AEAD=y +CONFIG_CRYPTO_AES_RISCV64=m +CONFIG_CRYPTO_GHASH_RISCV64=m +CONFIG_CRYPTO_DEV_CHELSIO=m +CONFIG_CRYPTO_DEV_VIRTIO=y +CONFIG_SIGNED_PE_FILE_VERIFICATION=y +CONFIG_SECONDARY_TRUSTED_KEYRING=y +CONFIG_SYSTEM_BLACKLIST_KEYRING=y +CONFIG_SYSTEM_REVOCATION_LIST=y +CONFIG_CORDIC=m +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_DMA_MAP_BENCHMARK=y +CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_CALLER=y +CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_HEADERS_INSTALL=y +CONFIG_DEBUG_SECTION_MISMATCH=y +CONFIG_KGDB=y +CONFIG_KGDB_TESTS=y +CONFIG_KGDB_KDB=y +CONFIG_KDB_DEFAULT_ENABLE=0x0 +CONFIG_KDB_KEYBOARD=y +CONFIG_DEBUG_KMEMLEAK=y +CONFIG_DEBUG_VM=y +# CONFIG_DEBUG_VM_PGTABLE is not set +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DEBUG_PER_CPU_MAPS=y +CONFIG_KFENCE=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_SOFTLOCKUP_DETECTOR=y +# CONFIG_SOFTLOCKUP_DETECTOR_INTR_STORM is not set +CONFIG_WQ_WATCHDOG=y +CONFIG_SCHEDSTATS=y +CONFIG_DEBUG_ATOMIC_SLEEP=y +CONFIG_DEBUG_LIST=y +CONFIG_RCU_CPU_STALL_TIMEOUT=60 +# CONFIG_RCU_TRACE is not set +CONFIG_BOOTTIME_TRACING=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_STACK_TRACER=y +CONFIG_SCHED_TRACER=y +CONFIG_HWLAT_TRACER=y +CONFIG_TIMERLAT_TRACER=y +CONFIG_FTRACE_SYSCALLS=y +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_SYNTH_EVENTS=y +CONFIG_RING_BUFFER_BENCHMARK=m +CONFIG_SAMPLES=y +CONFIG_IO_STRICT_DEVMEM=y +# CONFIG_RUNTIME_KERNEL_TESTING_MENU is not set +CONFIG_FUNCTION_ERROR_INJECTION=y +# CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/SPECS/linux/linux.spec b/SPECS/linux/linux.spec new file mode 100644 index 00000000..b2e3fef6 --- /dev/null +++ b/SPECS/linux/linux.spec @@ -0,0 +1,145 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +#!BuildConstraint: hardware:jobs 32 +%{!?_debugdir: %global _debugdir %{_prefix}/lib/debug} + +%global signmodules 1 +%global kver %{version}-%{release} +%global kernel_make_flags LD=ld.bfd KBUILD_BUILD_VERSION=%{release} + +Name: linux +Version: 6.17.5 +Release: %autorelease +Summary: The Linux Kernel +License: GPL-2.0-only +URL: https://www.kernel.org/ + +#!RemoteAsset +Source0: https://cdn.kernel.org/pub/linux/kernel/v6.x/%{name}-%{version}.tar.xz +Source1: config.%{_arch} + +BuildRequires: gcc, bison, binutils, glibc-devel, make, perl +BuildRequires: flex, bison +BuildRequires: bc, cpio, dwarves, gettext, python3, rsync, tar, xz, zstd +BuildRequires: libasm-devel +BuildRequires: libdebuginfod-dummy-devel +BuildRequires: ncurses-devel +BuildRequires: libcap-devel +BuildRequires: libssh-devel +BuildRequires: libdw-devel +BuildRequires: libelf-devel +BuildRequires: zstd-devel +BuildRequires: python3-devel +BuildRequires: slang-devel +BuildRequires: zlib-devel +BuildRequires: openssl-devel +BuildRequires: kmod +BuildRequires: rpm-config-openruyi + +Requires: %{name}-core%{?_isa} = %{version}-%{release} +Requires: %{name}-modules%{?_isa} = %{version}-%{release} +Requires(post): kmod +Requires(post): kernel-install +Requires(postun): kernel-install +%description +This is a meta-package that installs the core kernel image and modules. +For a minimal boot environment, install the 'linux-core' package instead. + +%package core +Summary: The core Linux kernel image and initrd + +%description core +Contains the bootable kernel image (vmlinuz) and a generic, pre-built initrd, +providing the minimal set of files needed to boot the system. + +%package modules +Summary: Kernel modules for the Linux kernel +Requires: %{name}-core = %{version}-%{release} + +%description modules +Contains all the kernel modules (.ko files) and associated metadata for +the hardware drivers and kernel features. + +%package devel +Summary: Development files for building external kernel modules +Requires: %{name} = %{version}-%{release} +Requires: dwarves + +%description devel +This package provides the kernel headers and Makefiles necessary to build +external kernel modules against the installed kernel. The development files are +located at %{_usrsrc}/kernels/%{kver}, with symlinks provided under +%{_prefix}/lib/modules/%{kver}/ for compatibility. + +%package debuginfo +Summary: Debug information for the Linux kernel +Requires: %{name} = %{version}-%{release} + +%description debuginfo +Contains the unstripped vmlinux file for debugging the kernel. This is +essential for tools like crash or for advanced kernel debugging. + +%prep +%autosetup -p1 +cp %{SOURCE1} .config +echo "-%{release}" > localversion + +%make_build %{kernel_make_flags} olddefconfig + +%build + +%make_build %{kernel_make_flags} + +%install +%define modpath %{buildroot}%{_libdir}/modules/%{kver} +%define kpath %{buildroot}%{_prefix}/lib/kernel +%define ksrcpath %{buildroot}%{_usrsrc}/kernels/%{kver} +%define debugpath %{buildroot}%{_debugdir}%{_lib}/modules/%{kver} +install -d %{modpath} %{kpath} %{ksrcpath} %{debugpath} + +%make_build %{kernel_make_flags} INSTALL_MOD_PATH=%{buildroot}%{_prefix} INSTALL_MOD_STRIP=1 DEPMOD=true modules_install + +%make_build run-command %{kernel_make_flags} KBUILD_RUN_COMMAND="$(pwd)/scripts/package/install-extmod-build %{ksrcpath}" + +ln -sf ../../../../src/kernels/%{kver} %{modpath}/build +ln -sf ../../../../src/kernels/%{kver} %{modpath}/source + +install -Dm644 $(make %{kernel_make_flags} -s image_name) %{kpath}/vmlinuz-%{kver} +install -m644 vmlinux %{debugpath}/vmlinux + +echo "Module signing would happen here for version %{kver}." + +%post +%{_sbindir}/depmod -a %{kver} +%{_bindir}/kernel-install add %{kver} %{_prefix}/lib/kernel/vmlinuz-%{kver} + +%postun +if [ $1 -eq 0 ] ; then + %{_bindir}/kernel-install remove %{kver} +fi + +%files +%license COPYING +%doc README + +%files core +%{_prefix}/lib/kernel/vmlinuz-%{kver} + +%files modules +%{_prefix}/lib/modules/* + +%files devel +%{_usrsrc}/kernels/%{kver}/ +%{_libdir}/modules/%{kver}/build +%{_libdir}/modules/%{kver}/source + +%files debuginfo +%{_debugdir}%{_lib}/modules/%{kver}/vmlinux + +%changelog +%{?autochangelog} diff --git a/SPECS/lksctp-tools/lksctp-tools.spec b/SPECS/lksctp-tools/lksctp-tools.spec new file mode 100644 index 00000000..4fbda396 --- /dev/null +++ b/SPECS/lksctp-tools/lksctp-tools.spec @@ -0,0 +1,72 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lksctp-tools +Version: 1.0.21 +Release: %autorelease +Summary: Linux Kernel Stream Control Transmission Protocol Tools +License: GPL-2.0-or-later AND LGPL-2.0-only AND MIT +URL: https://github.com/sctp/lksctp-tools/wiki +#!RemoteAsset +Source0: https://github.com/sctp/lksctp-tools/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: gcc +BuildRequires: libtool +BuildRequires: autoconf +BuildRequires: automake + +%description +This is the lksctp-tools package for Linux Kernel SCTP (Stream Control +Transmission Protocol) Reference Implementation. + +This package is intended to supplement the Linux Kernel SCTP Reference +Implementation now available in the Linux kernel source tree in +versions 2.5.36 and following. For more information on LKSCTP see the +package documentation README file, section titled "LKSCTP - Linux +Kernel SCTP." + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for %{name} which include header files and dynamic +libraries. + +%conf -p +rm -rf configure && sh bootstrap + +%conf -a +# remove rpath from libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +%ldconfig_scriptlets + +%files +%defattr(-,root,root) +%license COPYING* +%doc AUTHORS ChangeLog README doc/*.txt +%{_bindir}/* +%{_libdir}/libsctp.so.* +%{_libdir}/lksctp-tools/libwithsctp.so.* +%{_mandir}/man7/* + +%files devel +%{_includedir}/* +%{_libdir}/libsctp.so +%{_libdir}/lksctp-tools/libwithsctp.so +%{_datadir}/lksctp-tools/ +%{_libdir}/pkgconfig/libsctp.pc +%{_mandir}/man3/* + +%changelog +%{?autochangelog} diff --git a/SPECS/lldpad/lldpad.spec b/SPECS/lldpad/lldpad.spec new file mode 100644 index 00000000..7b52d794 --- /dev/null +++ b/SPECS/lldpad/lldpad.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lldpad +Version: 1.1.0 +Release: %autorelease +Summary: Intel LLDP Agent for Data Center Bridging +License: GPL-2.0-only +URL: http://open-lldp.org/ +#!RemoteAsset +Source: https://github.com/openSUSE/lldpad/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(build): CFLAGS="%{optflags} -Wno-error -fcommon" + +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: flex >= 2.5.33 +BuildRequires: util-linux +BuildRequires: libconfig-devel +BuildRequires: libnl-devel +BuildRequires: readline-devel +BuildRequires: systemd-rpm-macros +BuildRequires: make gcc + +Requires: readline +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +This package contains the Linux user space daemon and configuration tool for +the Intel LLDP Agent, enabling Data Center Bridging (DCB) features. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Provides: dcbd-devel = %{version} + +%description devel +The %{name}-devel package contains header files for developing applications +that use %{name}. + +%conf -p +./bootstrap.sh + +%install -a +mkdir -p %{buildroot}%{_sharedstatedir}/%{name} + +%post +%systemd_post lldpad.service lldpad.socket + +%preun +%systemd_preun lldpad.service lldpad.socket + +%postun +%systemd_postun_with_restart lldpad.service lldpad.socket + +%files +%doc COPYING README ChangeLog +%{_sbindir}/* +%{_libdir}/liblldp_clif.so.* +%dir %{_sharedstatedir}/lldpad +%{_unitdir}/lldpad.service +%{_unitdir}/lldpad.socket +%{_sysconfdir}/bash_completion.d/* +%{_mandir}/man3/* +%{_mandir}/man8/* + +%files devel +%{_includedir}/* +%{_libdir}/pkgconfig/*.pc +%{_libdir}/liblldp_clif.so + +%changelog +%{?autochangelog} diff --git a/SPECS/llhttp/llhttp.spec b/SPECS/llhttp/llhttp.spec new file mode 100644 index 00000000..4cc40286 --- /dev/null +++ b/SPECS/llhttp/llhttp.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: llhttp +Version: 9.3.0 +Release: %autorelease +Summary: Port of http_parser to llparse +License: MIT +URL: https://github.com/nodejs/llhttp +#!RemoteAsset +Source: https://github.com/nodejs/llhttp/archive/refs/tags/release/v%{version}.tar.gz +BuildSystem: cmake + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ + +%description +This project is a port of http_parser to TypeScript. llparse is used to +generate the output C source file, which can be compiled and linked. + +%package devel +Summary: Development files for llhttp +Requires: %{name} = %{version} + +%description devel +The llhttp-devel package contains libraries and header files for +developing applications that use llhttp. + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md +%{_libdir}/libllhttp.so* + +%files devel +%{_includedir}/llhttp.h +%{_libdir}/libllhttp.so +%{_libdir}/pkgconfig/libllhttp.pc +%{_libdir}/cmake/llhttp/ + +%changelog +%{?autochangelog} diff --git a/SPECS/lmdb/0001-lmdb-make.patch b/SPECS/lmdb/0001-lmdb-make.patch new file mode 100644 index 00000000..52cfd0fa --- /dev/null +++ b/SPECS/lmdb/0001-lmdb-make.patch @@ -0,0 +1,80 @@ +diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile +index 000f1f9..c533342 100644 +--- a/libraries/liblmdb/Makefile ++++ b/libraries/liblmdb/Makefile +@@ -26,6 +26,7 @@ OPT = -O2 -g + CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS) + LDLIBS = + SOLIBS = ++SOVERSION = 0.0.0 + SOEXT = .so + prefix = /usr/local + exec_prefix = $(prefix) +@@ -38,7 +39,7 @@ mandir = $(datarootdir)/man + ######################################################################## + + IHDRS = lmdb.h +-ILIBS = liblmdb.a liblmdb$(SOEXT) ++ILIBS = liblmdb$(SOEXT) liblmdb$(SOEXT).$(SOVERSION) + IPROGS = mdb_stat mdb_copy mdb_dump mdb_load + IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1 + PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5 +@@ -49,13 +50,13 @@ install: $(ILIBS) $(IPROGS) $(IHDRS) + mkdir -p $(DESTDIR)$(libdir) + mkdir -p $(DESTDIR)$(includedir) + mkdir -p $(DESTDIR)$(mandir)/man1 +- for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done +- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done +- for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done +- for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done ++ for f in $(IPROGS); do cp -a $$f $(DESTDIR)$(bindir); done ++ for f in $(ILIBS); do cp -a $$f $(DESTDIR)$(libdir); done ++ for f in $(IHDRS); do cp -a $$f $(DESTDIR)$(includedir); done ++ for f in $(IDOCS); do cp -a $$f $(DESTDIR)$(mandir)/man1; done + + clean: +- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb ++ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb + + test: all + rm -rf testdb && mkdir testdb +@@ -64,21 +65,25 @@ test: all + liblmdb.a: mdb.o midl.o + $(AR) rs $@ mdb.o midl.o + +-liblmdb$(SOEXT): mdb.lo midl.lo ++liblmdb$(SOEXT): liblmdb$(SOEXT).$(SOVERSION) ++ rm -f $@ ++ ln -s $< $@ ++ ++liblmdb$(SOEXT).$(SOVERSION): mdb.lo midl.lo + # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) +- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) +- +-mdb_stat: mdb_stat.o liblmdb.a +-mdb_copy: mdb_copy.o liblmdb.a +-mdb_dump: mdb_dump.o liblmdb.a +-mdb_load: mdb_load.o liblmdb.a +-mtest: mtest.o liblmdb.a +-mtest2: mtest2.o liblmdb.a +-mtest3: mtest3.o liblmdb.a +-mtest4: mtest4.o liblmdb.a +-mtest5: mtest5.o liblmdb.a +-mtest6: mtest6.o liblmdb.a +-mplay: mplay.o liblmdb.a ++ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS) ++ ++mdb_stat: mdb_stat.o liblmdb.so ++mdb_copy: mdb_copy.o liblmdb.so ++mdb_dump: mdb_dump.o liblmdb.so ++mdb_load: mdb_load.o liblmdb.so ++mtest: mtest.o liblmdb.so ++mtest2: mtest2.o liblmdb.so ++mtest3: mtest3.o liblmdb.so ++mtest4: mtest4.o liblmdb.so ++mtest5: mtest5.o liblmdb.so ++mtest6: mtest6.o liblmdb.so ++mplay: mplay.o liblmdb.so + + mdb.o: mdb.c lmdb.h midl.h + $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c diff --git a/SPECS/lmdb/lmdb.pc.in b/SPECS/lmdb/lmdb.pc.in new file mode 100644 index 00000000..b26cf70d --- /dev/null +++ b/SPECS/lmdb/lmdb.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=@EXEC_PREFIX@ +libdir=@LIBDIR@ +includedir=@INCLUDEDIR@ + +Name: liblmdb +Description: Lightning Memory-mapped key-value database +URL: http://symas.com/mdb/ +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -llmdb +Cflags: -I${includedir} diff --git a/SPECS/lmdb/lmdb.spec b/SPECS/lmdb/lmdb.spec new file mode 100644 index 00000000..5d5eff83 --- /dev/null +++ b/SPECS/lmdb/lmdb.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test + +Name: lmdb +Version: 0.9.33 +Release: %autorelease +Summary: Memory-mapped key-value database +License: OLDAP-2.8 +URL: https://www.symas.com/lmdb +VCS: git:https://git.openldap.org/openldap/openldap +#!RemoteAsset +Source0: https://git.openldap.org/openldap/openldap/-/archive/LMDB_%{version}/openldap-LMDB_%{version}.tar.gz +Source1: lmdb.pc.in +BuildSystem: autotools + +BuildOption(build): -C libraries/liblmdb SOVERSION=%{version} CFLAGS="%{optflags}" +BuildOption(install): -C libraries/liblmdb +BuildOption(install): SOVERSION=%{version} bindir=%{_bindir} libdir=%{_libdir} +BuildOption(install): mandir=%{_mandir} includedir=%{_includedir} datarootdir=%{_datadir} +BuildOption(check): -C libraries/liblmdb + +# Build and link to shared library +Patch0: 0001-lmdb-make.patch + +BuildRequires: make + +%description +LMDB is an ultra-fast, ultra-compact key-value embedded data +store developed by Symas for the OpenLDAP Project. By using memory-mapped files, +it provides the read performance of a pure in-memory database while still +offering the persistence of standard disk-based databases, and is only limited +to the size of the virtual address space. + +%package libs +Summary: Shared libraries for %{name} + +%description libs +The %{name}-libs package contains shared libraries necessary for running +applications that use the %{name} embedded database. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -n openldap-LMDB_%{version} -p1 + +%conf +# No conf + +%install -a +# Install pkgconfig file +sed -e 's:@PREFIX@:%{_prefix}:g' \ + -e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \ + -e 's:@LIBDIR@:%{_libdir}:g' \ + -e 's:@INCLUDEDIR@:%{_includedir}:g' \ + -e 's:@PACKAGE_VERSION@:%{version}:g' \ + %{SOURCE1} >lmdb.pc +install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc + +# TODO: Fix tests +%check +: + +%ldconfig_scriptlets libs + +%files +%doc libraries/liblmdb/COPYRIGHT +%doc libraries/liblmdb/CHANGES +%doc %{_mandir}/man1/*.1.gz +%license libraries/liblmdb/LICENSE +%{_bindir}/* + +%files libs +%{_libdir}/*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/logrotate/logrotate.spec b/SPECS/logrotate/logrotate.spec new file mode 100644 index 00000000..245ef3b5 --- /dev/null +++ b/SPECS/logrotate/logrotate.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: logrotate +Version: 3.22.0 +Release: %autorelease +Summary: Rotates, compresses, removes and mails system log files +License: GPL-2.0-or-later +URL: https://github.com/logrotate/logrotate +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/logrotate-%{version}.tar.xz +#!RemoteAsset +Source1: %{url}/releases/download/%{version}/logrotate-%{version}.tar.xz.asc +BuildSystem: autotools + +BuildOption(conf): --with-state-file-path=%{_localstatedir}/lib/logrotate/logrotate.status + +BuildRequires: acl +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +BuildRequires: pkgconfig(libacl) +BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(popt) +BuildRequires: systemd-rpm-macros + +%description +The logrotate utility is designed to simplify the administration of +log files on a system which generates a lot of log files. Logrotate +allows for the automatic rotation compression, removal and mailing of +log files. Logrotate can be set to handle a log file daily, weekly, +monthly or when the log file gets to a certain size. + +Install the logrotate package if you need a utility to deal with the +log files on your system. + +%conf -p +autoreconf -fiv + +%install -a +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +mkdir -p $RPM_BUILD_ROOT%{_unitdir} +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/logrotate + +install -p -m 644 examples/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/ +install -p -m 644 examples/{b,w}tmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ +install -p -m 644 examples/logrotate.{service,timer} $RPM_BUILD_ROOT%{_unitdir}/ + +%pre +# If /var/lib/logrotate/logrotate.status does not exist, create it and copy +# the /var/lib/logrotate.status in it (if it exists). We have to do that in pre +# script, otherwise the /var/lib/logrotate/logrotate.status would not be there, +# because during the update, it is removed/renamed. +if [ ! -d %{_localstatedir}/lib/logrotate/ -a -f %{_localstatedir}/lib/logrotate.status ]; then + mkdir -p %{_localstatedir}/lib/logrotate + cp -a %{_localstatedir}/lib/logrotate.status %{_localstatedir}/lib/logrotate +fi + +%post +%systemd_post logrotate.{service,timer} + +%preun +%systemd_preun logrotate.{service,timer} + +%files +%license COPYING +%doc ChangeLog.md +%{_sbindir}/logrotate +%{_unitdir}/logrotate.{service,timer} +%{_mandir}/man8/logrotate.8* +%{_mandir}/man5/logrotate.conf.5* +%config(noreplace) %{_sysconfdir}/logrotate.conf +%dir %{_sysconfdir}/logrotate.d +%config(noreplace) %{_sysconfdir}/logrotate.d/{b,w}tmp +%dir %{_localstatedir}/lib/logrotate +%ghost %verify(not size md5 mtime) %attr(0640, root, root) %{_localstatedir}/lib/logrotate/logrotate.status + +%changelog +%{?autochangelog} diff --git a/SPECS/lshw/lshw.spec b/SPECS/lshw/lshw.spec new file mode 100644 index 00000000..50775eed --- /dev/null +++ b/SPECS/lshw/lshw.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lshw +Version: B.02.20 +Release: %autorelease +Summary: Hardware lister +License: GPL-2.0-only +URL: https://ezix.org/project/wiki/HardwareLiSter +#!RemoteAsset +Source: https://www.ezix.org/software/files/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: gettext-devel + +# Define common arguments for make +%global make_args PREFIX="%{_prefix}" SBINDIR="%{_sbindir}" MANDIR="%{_mandir}" DATADIR="%{_datadir}" VERSION="%{version}" + +# Pass these arguments to the build and install steps +BuildOption(build): %{make_args} +BuildOption(install): %{make_args} + +%description +lshw (Hardware Lister) is a small tool to provide detailed information +on the hardware configuration of the machine. It can report exact memory +configuration, firmware version, mainboard configuration, CPU version +and speed, cache configuration, bus speed, etc. +This package provides the command-line interface only. + +# No configure +%conf + +# No tests +%check +: + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%doc README.md +%{_sbindir}/lshw +%{_datadir}/lshw/ +%{_mandir}/man1/lshw.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/lsof/lsof.spec b/SPECS/lsof/lsof.spec new file mode 100644 index 00000000..7657f8a6 --- /dev/null +++ b/SPECS/lsof/lsof.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lsof +Version: 4.99.5 +Release: %autorelease +Summary: A tool for listing open files +License: Sendmail and LGPL-2.1-or-later and Zlib +URL: https://lsof.readthedocs.io/en/latest/ +#!RemoteAsset +Source0: https://github.com/lsof-org/lsof/releases/download/%{version}/lsof-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --enable-security +BuildOption(conf): --enable-no-sock-security + +BuildRequires: gcc make +BuildRequires: pkgconfig(libtirpc) +BuildRequires: libselinux-devel +BuildRequires: groff + +%description +lsof is a Unix administrative tool that displays information about files +open to processes. It runs on many Unix dialects. + +%package devel +Summary: Development files for the lsof library +Requires: %{name} = %{version} + +%description devel +This package contains the header files and development library for lsof. + +%build -a +soelim -r Lsof.8 > lsof.1 + +%install -a +install -m 0644 lsof.1 -D %{buildroot}%{_mandir}/man1/lsof.1 +rm -rf %{buildroot}%{_mandir}/man8/lsof.8* + +%ldconfig_scriptlets + +%files +%license COPYING +%doc 00CREDITS 00README 00FAQ 00LSOF-L 00QUICKSTART +%{_bindir}/lsof +%{_libdir}/liblsof.so.* +%{_mandir}/man1/lsof.1* + +%files devel +%{_libdir}/liblsof.so +%{_includedir}/*.h + +%changelog +%{?autochangelog} diff --git a/SPECS/lsscsi/lsscsi.spec b/SPECS/lsscsi/lsscsi.spec new file mode 100644 index 00000000..3dae10c4 --- /dev/null +++ b/SPECS/lsscsi/lsscsi.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lsscsi +Version: 0.32 +Release: %autorelease +Summary: The lsscsi command lists information about SCSI devices in Linux. +License: GPLv2+ +URL: http://sg.danny.cz/scsi/lsscsi.html +#!RemoteAsset +Source0: http://sg.danny.cz/scsi/%{name}-%{version}.tgz + +BuildRequires: gcc +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildSystem: autotools + +%description +Using SCSI terminology, lsscsi lists SCSI logical units (or SCSI targets +when the '--transport' option is given). The default action is to produce +one line of output for each SCSI device currently attached to the system. +In version 0.30 of this utility, support was added to list NVMe namespaces +(under SCSI devices(LUs)) and NVMe controllers (under SCSI hosts). + +%files +%doc ChangeLog INSTALL README CREDITS AUTHORS +%license COPYING +%{_bindir}/%{name} +%{_mandir}/man8/%{name}.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/lua-json/0001-support-lpeg1.1.0.patch b/SPECS/lua-json/0001-support-lpeg1.1.0.patch new file mode 100644 index 00000000..3044e16f --- /dev/null +++ b/SPECS/lua-json/0001-support-lpeg1.1.0.patch @@ -0,0 +1,37 @@ +From 473d61d262a1c86a69ad9b4882352d122e42f3fa Mon Sep 17 00:00:00 2001 +From: Josh +Date: Thu, 20 Jul 2023 15:49:33 -0400 +Subject: [PATCH] feat: support lpeg 1.1 + +This changeset adds support for lpeg 1.1 which updated the lpeg.version from a function to a string. + +Therefore we have to check the type of the value. + +Refs: #47 +--- + lua/json/decode/util.lua | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lua/json/decode/util.lua b/lua/json/decode/util.lua +index 2493bf3..8b23751 100644 +--- a/lua/json/decode/util.lua ++++ b/lua/json/decode/util.lua +@@ -17,6 +17,8 @@ local table_concat = require("table").concat + + local merge = require("json.util").merge + ++local type = type ++ + local _ENV = nil + + local function get_invalid_character_info(input, index) +@@ -94,7 +96,8 @@ local unicode_ignored = (unicode_space + comment)^0 + + -- Parse the lpeg version skipping patch-values + -- LPEG <= 0.7 have no version value... so 0.7 is value +-local DecimalLpegVersion = lpeg.version and tonumber(lpeg.version():match("^(%d+%.%d+)")) or 0.7 ++-- LPEG >= 1.1 uses a string for the version instead of function ++local DecimalLpegVersion = lpeg.version and tonumber((type(lpeg.version) == "string" and lpeg.version or lpeg.version()):match("^(%d+%.%d+)")) or 0.7 + + local function setObjectKeyForceNumber(t, key, value) + key = tonumber(key) or key diff --git a/SPECS/lua-json/lua-json.spec b/SPECS/lua-json/lua-json.spec new file mode 100644 index 00000000..49a84228 --- /dev/null +++ b/SPECS/lua-json/lua-json.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lua-json +Version: 1.3.4 +Release: %autorelease +Summary: JSON Parser/Constructor for Lua +License: MIT +URL: https://github.com/harningt/luajson +#!RemoteAsset +Source: https://github.com/harningt/luajson/archive/refs/tags/%{version}.tar.gz +Patch: 0001-support-lpeg1.1.0.patch +BuildSystem: autotools + +BuildRequires: lua-devel +BuildRequires: lua-lpeg + +Requires: lua(abi) +Requires: lua-lpeg + +%description +LuaJSON is a customizable JSON decoder/encoder, using LPEG for parsing. + +# No configure +%conf + +# TODO: package lunit to enable check +%check + +%install +install -d -m 755 %{buildroot}%{lua_pkgdir} +install -p -m 0644 lua/*.lua %{buildroot}%{lua_pkgdir}/ + +%files +%doc LICENSE docs/LuaJSON.txt docs/ReleaseNotes-1.0.txt +%{lua_pkgdir}/*.lua + +%changelog +%{?autochangelog} diff --git a/SPECS/lua-lpeg/lua-lpeg.spec b/SPECS/lua-lpeg/lua-lpeg.spec new file mode 100644 index 00000000..b49fa4bb --- /dev/null +++ b/SPECS/lua-lpeg/lua-lpeg.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: lua-lpeg +Version: 1.1.0 +Release: %autorelease +Summary: Parsing Expression Grammars for Lua +License: MIT +#!RemoteAsset +URL: http://www.inf.puc-rio.br/~roberto/lpeg/ +Source0: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): COPT="%{optflags}" +BuildOption(build): LDFLAGS="%{build_ldflags}" + +BuildRequires: gcc +BuildRequires: lua-devel + + +%description +LPeg is a new pattern-matching library for Lua, based on Parsing Expression +Grammars (PEGs). + +# No configure +%conf + +# No install +%install +install -d -m 0755 %{buildroot}%{lua_libdir} +install -d -m 0755 %{buildroot}%{lua_pkgdir} + +install -p -m 0755 lpeg.so %{buildroot}%{lua_libdir}/lpeg.so.%{version} +ln -s lpeg.so.%{version} %{buildroot}%{lua_libdir}/lpeg.so + +install -p -m 0644 re.lua %{buildroot}%{lua_pkgdir}/ + +%files +%doc HISTORY lpeg.html re.html lpeg-128.gif test.lua +%{lua_libdir}/* +%{lua_pkgdir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/lua/0001-lua-5.4.6-idsize.patch b/SPECS/lua/0001-lua-5.4.6-idsize.patch new file mode 100644 index 00000000..e1fe3faa --- /dev/null +++ b/SPECS/lua/0001-lua-5.4.6-idsize.patch @@ -0,0 +1,13 @@ +diff --git a/src/luaconf.h.template.in b/src/luaconf.h.template.in +index 1e32333..601d10e 100644 +--- a/src/luaconf.h.template.in ++++ b/src/luaconf.h.template.in +@@ -762,7 +762,7 @@ + ** of a function in debug information. + ** CHANGE it if you want a different size. + */ +-#define LUA_IDSIZE 60 ++#define LUA_IDSIZE 512 + + + /* diff --git a/SPECS/lua/0002-lua-5.4.0-beta-autotoolize.patch b/SPECS/lua/0002-lua-5.4.0-beta-autotoolize.patch new file mode 100644 index 00000000..103ff0bd --- /dev/null +++ b/SPECS/lua/0002-lua-5.4.0-beta-autotoolize.patch @@ -0,0 +1,193 @@ +diff -up lua-5.4.0-beta/configure.ac.autoxxx lua-5.4.0-beta/configure.ac +--- lua-5.4.0-beta/configure.ac.autoxxx 2019-10-23 15:03:13.296916443 -0400 ++++ lua-5.4.0-beta/configure.ac 2019-10-23 15:03:13.296916443 -0400 +@@ -0,0 +1,69 @@ ++AC_PREREQ(2.59) ++AC_INIT([lua], [5.4.0], [https://bugzilla.redhat.com/], [lua-at], [http://www.lua.org]) ++AC_SUBST([MAJOR_VERSION], [5.4]) ++ ++AC_CONFIG_HEADERS([config.h]) ++AC_CONFIG_SRCDIR([src/lapi.c]) ++ ++AM_INIT_AUTOMAKE([1.9 foreign]) ++ ++AC_PROG_CC ++AC_PROG_LIBTOOL ++ ++AC_ARG_WITH( ++ [readline], ++ [AC_HELP_STRING([--with-readline], [Use readline for interpreter input [default=yes]])], ++ [use_readline=$withval], ++ [use_readline=yes] ++) ++ ++LUA_LIBS="-lm" ++ ++# Check for readline ++READLINE_DEFS="#undef LUA_USE_READLINE" ++if test "x$use_readline" == "xyes"; then ++ AC_CHECK_LIB([readline], [readline], [:], [use_readline=no], [-lncurses]) ++ AC_CHECK_HEADERS([readline/readline.h readline/history.h], [], [use_readline=no]) ++ if test "x$use_readline" == "xno"; then ++ AC_MSG_WARN([readline headers could not be found, disabling readline support]) ++ else ++ READLINE_DEFS="#define LUA_USE_READLINE" ++ READLINE_LIBS="-lreadline -lncurses" ++ fi ++fi ++AC_SUBST(READLINE_DEFS) ++AC_SUBST(READLINE_LIBS) ++ ++case "$host" in ++ *-mingw*) use_os=win32 ;; ++ *-darwin*) use_os=macosx ;; ++ *) use_os=posix ;; ++esac ++ ++POSIX_DEFS="#undef LUA_USE_POSIX" ++LUA_DL_DEFS="#undef LUA_USE_DLOPEN" ++LUA_BUILD_AS_DLL_DEFS="#undef LUA_BUILD_AS_DLL" ++ ++if test "x$use_os" == "xwin32"; then ++ LUA_BUILD_AS_DLL_DEFS="#define LUA_BUILD_AS_DLL" ++elif test "x$use_os" == "xmacosx"; then ++ POSIX_DEFS="#define LUA_USE_POSIX" ++ LUA_DL_DEFS="#define LUA_DL_DYLD" ++elif test "x$use_os" == "xposix"; then ++ POSIX_DEFS="#define LUA_USE_POSIX" ++ LUA_DL_DEFS="#define LUA_DL_DLOPEN" ++ LUA_LIBS="$LUA_LIBS -ldl" ++fi ++AC_SUBST(POSIX_DEFS) ++AC_SUBST(LUA_DL_DEFS) ++AC_SUBST(LUA_BUILD_AS_DLL_DEFS) ++ ++AC_SUBST(LUA_LIBS) ++ ++AC_CONFIG_FILES([Makefile ++ src/Makefile ++ src/lua.pc ++ src/luaconf.h.template ++ doc/Makefile ++]) ++AC_OUTPUT +diff -up lua-5.4.0-beta/doc/Makefile.am.autoxxx lua-5.4.0-beta/doc/Makefile.am +--- lua-5.4.0-beta/doc/Makefile.am.autoxxx 2019-10-23 15:03:13.296916443 -0400 ++++ lua-5.4.0-beta/doc/Makefile.am 2019-10-23 15:03:13.296916443 -0400 +@@ -0,0 +1,4 @@ ++man1_MANS = lua.1 luac.1 ++ ++EXTRA_DIST = \ ++ contents.html logo.gif lua.1 luac.1 lua.css manual.css manual.html osi-certified-72x60.png readme.html +diff -up lua-5.4.0-beta/Makefile.am.autoxxx lua-5.4.0-beta/Makefile.am +--- lua-5.4.0-beta/Makefile.am.autoxxx 2019-10-23 15:03:13.296916443 -0400 ++++ lua-5.4.0-beta/Makefile.am 2019-10-23 15:03:13.296916443 -0400 +@@ -0,0 +1,3 @@ ++SUBDIRS = src doc ++ ++EXTRA_DIST = README +diff -up lua-5.4.0-beta/src/.gitignore.autoxxx lua-5.4.0-beta/src/.gitignore +--- lua-5.4.0-beta/src/.gitignore.autoxxx 2019-10-23 15:03:13.297916423 -0400 ++++ lua-5.4.0-beta/src/.gitignore 2019-10-23 15:03:13.296916443 -0400 +@@ -0,0 +1,5 @@ ++lua ++lua.pc ++luac ++luaconf.h ++luaconf.h.template +diff -up lua-5.4.0-beta/src/luaconf.h.template.in.autoxxx lua-5.4.0-beta/src/luaconf.h.template.in +--- lua-5.4.0-beta/src/luaconf.h.template.in.autoxxx 2019-09-30 19:52:16.000000000 -0400 ++++ lua-5.4.0-beta/src/luaconf.h.template.in 2019-10-23 15:05:45.139817627 -0400 +@@ -11,6 +11,11 @@ + #include + #include + ++@POSIX_DEFS@ ++@LUA_DL_DEFS@ ++@LUA_BUILD_AS_DLL_DEFS@ ++@READLINE_DEFS@ ++ + + /* + ** =================================================================== +@@ -227,9 +232,9 @@ + + #else /* }{ */ + +-#define LUA_ROOT "/usr/local/" +-#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" +-#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" ++#define LUA_ROOT "@prefix@/" ++#define LUA_LDIR "@pkgdatadir@/lua/" LUA_VDIR "/" ++#define LUA_CDIR "@libdir@/lua/" LUA_VDIR "/" + + #if !defined(LUA_PATH_DEFAULT) + #define LUA_PATH_DEFAULT \ +diff -up lua-5.4.0-beta/src/lua.pc.in.autoxxx lua-5.4.0-beta/src/lua.pc.in +--- lua-5.4.0-beta/src/lua.pc.in.autoxxx 2019-10-23 15:03:13.297916423 -0400 ++++ lua-5.4.0-beta/src/lua.pc.in 2019-10-23 15:03:13.297916423 -0400 +@@ -0,0 +1,13 @@ ++V= @MAJOR_VERSION@ ++R= @VERSION@ ++prefix= @prefix@ ++exec_prefix=${prefix} ++libdir= @libdir@ ++includedir=${prefix}/include ++ ++Name: Lua ++Description: An Extensible Extension Language ++Version: ${R} ++Requires: ++Libs: -llua @LUA_LIBS@ ++Cflags: -I${includedir} +diff -up lua-5.4.0-beta/src/Makefile.am.autoxxx lua-5.4.0-beta/src/Makefile.am +--- lua-5.4.0-beta/src/Makefile.am.autoxxx 2019-10-23 15:03:13.297916423 -0400 ++++ lua-5.4.0-beta/src/Makefile.am 2019-10-23 15:03:13.297916423 -0400 +@@ -0,0 +1,46 @@ ++AM_CFLAGS = -Wall ++ ++include_HEADERS = lua.h lualib.h lauxlib.h lua.hpp ++ ++nodist_include_HEADERS = luaconf.h ++ ++lib_LTLIBRARIES = liblua.la ++liblua_la_LDFLAGS = -release @MAJOR_VERSION@ ++liblua_la_SOURCES = \ ++ lapi.c lauxlib.c lbaselib.c lcode.c lcorolib.c lctype.c ldblib.c \ ++ ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c lmathlib.c lmem.c \ ++ loadlib.c lobject.c lopcodes.c loslib.c lparser.c lstate.c lstring.c lstrlib.c \ ++ ltable.c ltablib.c ltm.c lundump.c lutf8lib.c lvm.c lzio.c \ ++ lapi.h lcode.h lctype.h ldebug.h ldo.h lfunc.h lgc.h llex.h llimits.h \ ++ lmem.h lobject.h lopcodes.h lparser.h lstate.h lstring.h ltable.h ltm.h \ ++ lundump.h lvm.h lzio.h ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = lua.pc ++ ++bin_PROGRAMS = lua luac ++ ++lua_SOURCES = lua.c ++lua_LDADD = liblua.la @LUA_LIBS@ @READLINE_LIBS@ ++lua_DEPENDENCIES = liblua.la ++ ++luac_SOURCES = luac.c ++# Statically link liblua against luac since luac uses symbols not exported in liblua ++luac_LDADD = .libs/liblua.a @LUA_LIBS@ ++luac_DEPENDENCIES = liblua.la ++ ++EXTRA_DIST = luaconf.h.template ++BUILT_SOURCES = luaconf.h ++CLEANFILES = luaconf.h luaconf.h.template ++ ++readline_defs = @READLINE_DEFS@ ++ ++edit = sed \ ++ -e 's,%prefix%,$(prefix),g' \ ++ -e 's,%lua_datadir%,$(datadir),g' \ ++ -e 's,%lua_libdir%,$(libdir),g' ++ ++luaconf.h : luaconf.h.template ++ rm -f $@ $@.tmp ++ $(edit) $< >$@.tmp ++ mv $@.tmp $@ + diff --git a/SPECS/lua/0003-lua-5.2.2-configure-linux.patch b/SPECS/lua/0003-lua-5.2.2-configure-linux.patch new file mode 100644 index 00000000..9455f640 --- /dev/null +++ b/SPECS/lua/0003-lua-5.2.2-configure-linux.patch @@ -0,0 +1,23 @@ +diff -up lua-5.2.2/configure.ac.linux lua-5.2.2/configure.ac +--- lua-5.2.2/configure.ac.linux 2013-05-10 15:42:27.269437631 -0400 ++++ lua-5.2.2/configure.ac 2013-05-10 15:43:23.530435620 -0400 +@@ -50,6 +50,7 @@ AC_SUBST(READLINE_LIBS) + case "$host" in + *-mingw*) use_os=win32 ;; + *-darwin*) use_os=macosx ;; ++ *-linux*) use_os=linux ;; + *) use_os=posix ;; + esac + +@@ -62,6 +63,10 @@ if test "x$use_os" == "xwin32"; then + elif test "x$use_os" == "xmacosx"; then + POSIX_DEFS="#define LUA_USE_POSIX" + LUA_DL_DEFS="#define LUA_DL_DYLD" ++elif test "x$use_os" == "xlinux"; then ++ POSIX_DEFS="#define LUA_USE_LINUX" ++ LUA_DL_DEFS="#define LUA_DL_DLOPEN" ++ LUA_LIBS="$LUA_LIBS -ldl" + elif test "x$use_os" == "xposix"; then + POSIX_DEFS="#define LUA_USE_POSIX" + LUA_DL_DEFS="#define LUA_DL_DLOPEN" + diff --git a/SPECS/lua/0004-lua-5.3.0-configure-compat-module.patch b/SPECS/lua/0004-lua-5.3.0-configure-compat-module.patch new file mode 100644 index 00000000..b89b09d4 --- /dev/null +++ b/SPECS/lua/0004-lua-5.3.0-configure-compat-module.patch @@ -0,0 +1,36 @@ +diff -up lua-5.2.2/configure.ac.compat-module lua-5.2.2/configure.ac +--- lua-5.2.2/configure.ac.compat-module 2013-05-10 10:16:05.344137597 -0400 ++++ lua-5.2.2/configure.ac 2013-05-10 10:16:05.357137596 -0400 +@@ -11,6 +11,20 @@ AC_PROG_CC + AC_PROG_LIBTOOL + + AC_ARG_WITH( ++ [compat-module], ++ [AC_HELP_STRING([--with-compat-module], [Enable LUA_COMPAT_MODULE functions [default=no]])], ++ [use_compat_module=$withval], ++ [use_compat_module=no] ++) ++ ++COMPAT_DEFS="#undef LUA_COMPAT_ALL" ++if test "x$use_compat_module" == "xyes"; then ++ COMPAT_DEFS="#define LUA_COMPAT_5_1 ++#define LUA_COMPAT_5_2" ++fi ++AC_SUBST(COMPAT_DEFS) ++ ++AC_ARG_WITH( + [readline], + [AC_HELP_STRING([--with-readline], [Use readline for interpreter input [default=yes]])], + [use_readline=$withval], +diff -up lua-5.2.2/src/luaconf.h.template.in.compat-module lua-5.2.2/src/luaconf.h.template.in +--- lua-5.2.2/src/luaconf.h.template.in.compat-module 2013-05-10 10:25:42.586116963 -0400 ++++ lua-5.2.2/src/luaconf.h.template.in 2013-05-10 10:26:29.957115269 -0400 +@@ -15,6 +15,7 @@ + @LUA_DL_DEFS@ + @LUA_BUILD_AS_DLL_DEFS@ + @READLINE_DEFS@ ++@COMPAT_DEFS@ + + + /* + diff --git a/SPECS/lua/lua.spec b/SPECS/lua/lua.spec new file mode 100644 index 00000000..572951ce --- /dev/null +++ b/SPECS/lua/lua.spec @@ -0,0 +1,104 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lua +Version: 5.4.8 +Release: %autorelease +Summary: Powerful, efficient, lightweight, embeddable scripting language +License: MIT +URL: https://www.lua.org/ +#!RemoteAsset +Source0: https://www.lua.org/ftp/lua-%{version}.tar.gz +#!RemoteAsset +Source1: https://www.lua.org/tests/lua-%{version}-tests.tar.gz +Source2: luaconf.h +Source3: mit.txt +Source4: macros.lua +Patch0: 0001-lua-5.4.6-idsize.patch +Patch1: 0002-lua-5.4.0-beta-autotoolize.patch +Patch2: 0003-lua-5.2.2-configure-linux.patch +Patch3: 0004-lua-5.3.0-configure-compat-module.patch +BuildRequires: make +BuildRequires: automake autoconf libtool readline-devel ncurses-devel +BuildSystem: autotools +BuildOption(conf): --with-readline --with-compat-module +BuildOption(build): LIBS="-lm -ldl" +%global major_version 5.4 + +%description +Lua is a powerful, efficient, lightweight, embeddable scripting language. +It supports procedural programming, object-oriented programming, +functional programming, data-driven programming, and data description. + +%prep +# we need to rename the file within the srcdir before patching, +# autosetup is not usable +%setup -q -a 1 +mv src/luaconf.h src/luaconf.h.template.in +%patch 0 -p1 -E -z .autoxxx +%patch 1 -p1 -z .idsize +%patch 2 -p1 -z .configure-linux +%patch 3 -p1 -z .configure-compat-all +# Put proper version in configure.ac, patch0 hardcodes 5.3.0 +sed -i 's|5.3.0|%{version}|g' configure.ac +autoreconf -ifv +cp %{SOURCE3} . + +%build -p +sed -i 's|@pkgdatadir@|%{_datadir}|g' src/luaconf.h.template +# hack so that only /usr/bin/lua gets linked with readline as it is the +# only one which needs this and otherwise we get License troubles + +%install -a +mv %{buildroot}%{_includedir}/luaconf.h %{buildroot}%{_includedir}/luaconf-%{_arch}.h +mkdir -p %{buildroot}/%{_libdir}/lua/%{major_version} +mkdir -p %{buildroot}/%{_datadir}/lua/%{major_version} +install -p -m 644 %{SOURCE2} %{buildroot}%{_includedir}/luaconf.h +install -Dpm 0644 %{SOURCE4} %{buildroot}/%{_rpmmacrodir}/macros.lua +rm -rf %{buildroot}%{_libdir}/*.a + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +This package contains development files for %{name}. + +%package help +Summary: Help files for %{name} + +%description help +%{summary} + +%files +%defattr(-,root,root) +%license mit.txt +%{_bindir}/lua +%{_bindir}/luac +%dir %{_libdir}/lua +%dir %{_libdir}/lua/%{major_version} +%dir %{_datadir}/lua +%dir %{_datadir}/lua/%{major_version} +%{_libdir}/liblua-%{major_version}.so +%{_libdir}/liblua.so + +%files devel +%defattr(-,root,root) +%{_includedir}/l*.h +%{_includedir}/l*.hpp +%{_libdir}/pkgconfig/*.pc +%{_rpmmacrodir}/macros.lua + +%files help +%defattr(-,root,root) +%doc README doc/*.html doc/*.css doc/*.gif doc/*.png +%{_mandir}/man1/lua*.1* + +%changelog +%{?autochangelog} + diff --git a/SPECS/lua/luaconf.h b/SPECS/lua/luaconf.h new file mode 100644 index 00000000..0500f967 --- /dev/null +++ b/SPECS/lua/luaconf.h @@ -0,0 +1,66 @@ +/* + * This luaconf.h is a wrapper include file for the original luaconf.h, + * which has been renamed to luaconf-.h. There are conflicts for the + * original luaconf.h on multilib systems, which result from arch-specific + * configuration options. Please do not use the arch-specific file directly. + * + * Copyright (C) 2015 Tom Callaway + */ + +/** + * \file luaconf.h + */ + +#ifdef luaconf_wrapper_h +#error "luaconf_wrapper_h should not be defined!" +#endif +#define luaconf_wrapper_h + +#if defined(__i386__) +#include "luaconf-i386.h" +#elif defined(__ia64__) +#include "luaconf-ia64.h" +#elif defined(__powerpc64__) +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#include "luaconf-ppc64.h" +# else +#include "luaconf-ppc64le.h" +# endif +#elif defined(__powerpc__) +#include "luaconf-ppc.h" +#elif defined(__s390x__) +#include "luaconf-s390x.h" +#elif defined(__s390__) +#include "luaconf-s390.h" +#elif defined(__x86_64__) +#include "luaconf-x86_64.h" +#elif defined(__arm__) +#include "luaconf-arm.h" +#elif defined(__alpha__) +#include "luaconf-alpha.h" +#elif defined(__sparc__) && defined (__arch64__) +#include "luaconf-sparc64.h" +#elif defined(__sparc__) +#include "luaconf-sparc.h" +#elif defined(__aarch64__) +#include "luaconf-aarch64.h" +#elif defined(__mips64) && defined(__MIPSEL__) +#include "luaconf-mips64el.h" +#elif defined(__mips64) +#include "luaconf-mips64.h" +#elif defined(__mips) && defined(__MIPSEL__) +#include "luaconf-mipsel.h" +#elif defined(__mips) +#include "luaconf-mips.h" +#elif defined(__riscv) +#include "luaconf-riscv64.h" +#elif defined(__loongarch64) +#include "luaconf-loongarch64.h" +#elif defined(__sw_64__) +#include "luaconf-sw_64.h" +#else +#error "The lua-devel package is not usable with the architecture." +#endif + +#undef luaconf_wrapper_h + diff --git a/SPECS/lua/macros.lua b/SPECS/lua/macros.lua new file mode 100644 index 00000000..7511a807 --- /dev/null +++ b/SPECS/lua/macros.lua @@ -0,0 +1,9 @@ +%lua_version %{lua: print(string.sub(_VERSION, 5))} + +%lua_libdir %{_libdir}/lua/%{lua_version} +%lua_pkgdir %{_datadir}/lua/%{lua_version} + +%lua_requires \ +Requires: lua(abi) = %{lua_version} \ +%{nil} + diff --git a/SPECS/lua/mit.txt b/SPECS/lua/mit.txt new file mode 100644 index 00000000..1147a002 --- /dev/null +++ b/SPECS/lua/mit.txt @@ -0,0 +1,20 @@ +Copyright (c) 1994-2017 Lua.org, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/SPECS/luajit/0001-add_riscv_support.patch b/SPECS/luajit/0001-add_riscv_support.patch new file mode 100644 index 00000000..65353064 --- /dev/null +++ b/SPECS/luajit/0001-add_riscv_support.patch @@ -0,0 +1,12439 @@ +From 459094e89900b94a9a764e1bab1ec735f2b10421 Mon Sep 17 00:00:00 2001 +From: gns +Date: Tue, 5 Mar 2024 17:09:31 +0800 +Subject: [PATCH 01/22] riscv(support): add RISC-V 64 arch base definition + +--- + src/lj_arch.h | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +diff --git a/src/lj_arch.h b/src/lj_arch.h +index a4eecf27e0..bf2cd4e581 100644 +--- a/src/lj_arch.h ++++ b/src/lj_arch.h +@@ -31,6 +31,8 @@ + #define LUAJIT_ARCH_mips32 6 + #define LUAJIT_ARCH_MIPS64 7 + #define LUAJIT_ARCH_mips64 7 ++#define LUAJIT_ARCH_riscv64 8 ++#define LUAJIT_ARCH_RISCV64 8 + + /* Target OS. */ + #define LUAJIT_OS_OTHER 0 +@@ -65,6 +67,8 @@ + #define LUAJIT_TARGET LUAJIT_ARCH_MIPS64 + #elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS) + #define LUAJIT_TARGET LUAJIT_ARCH_MIPS32 ++#elif (defined(__riscv) || defined(__riscv__)) && __riscv_xlen == 64 ++#define LUAJIT_TARGET LUAJIT_ARCH_RISCV64 + #else + #error "Architecture not supported (in this version), see: https://luajit.org/status.html#architectures" + #endif +@@ -439,6 +443,21 @@ + #define LJ_ARCH_VERSION 10 + #endif + ++#elif LUAJIT_TARGET == LUAJIT_ARCH_RISCV64 ++ ++#define LJ_ARCH_NAME "riscv64" ++#define LJ_ARCH_BITS 64 ++#define LJ_ARCH_ENDIAN LUAJIT_LE /* Forget about BE for now */ ++#define LJ_TARGET_RISCV64 1 ++#define LJ_TARGET_GC64 1 ++#define LJ_TARGET_EHRETREG 10 ++#define LJ_TARGET_EHRAREG 1 ++#define LJ_TARGET_JUMPRANGE 30 /* JAL +-2^20 = +-1MB,\ ++ AUIPC+JALR +-2^31 = +-2GB, leave 1 bit to avoid AUIPC corner case */ ++#define LJ_TARGET_MASKSHIFT 1 ++#define LJ_TARGET_MASKROT 1 ++#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL ++ + #else + #error "No target architecture defined" + #endif +@@ -531,6 +550,10 @@ + #error "Only n64 ABI supported for MIPS64" + #undef LJ_TARGET_MIPS + #endif ++#elif LJ_TARGET_RISCV64 ++#if !defined(__riscv_float_abi_double) ++#error "Only RISC-V 64 double float supported for now" ++#endif + #endif + #endif + + +From 865b39a9707a5fede21ffa7bcd96385eb9fc2466 Mon Sep 17 00:00:00 2001 +From: gns +Date: Tue, 5 Mar 2024 17:11:11 +0800 +Subject: [PATCH 02/22] riscv(dynasm): add RISC-V support + +--- + dynasm/dasm_riscv.h | 433 ++++++++++++++++++ + dynasm/dasm_riscv.lua | 979 ++++++++++++++++++++++++++++++++++++++++ + dynasm/dasm_riscv32.lua | 12 + + dynasm/dasm_riscv64.lua | 12 + + 4 files changed, 1436 insertions(+) + create mode 100644 dynasm/dasm_riscv.h + create mode 100644 dynasm/dasm_riscv.lua + create mode 100644 dynasm/dasm_riscv32.lua + create mode 100644 dynasm/dasm_riscv64.lua + +diff --git a/dynasm/dasm_riscv.h b/dynasm/dasm_riscv.h +new file mode 100644 +index 0000000000..523bb66113 +--- /dev/null ++++ b/dynasm/dasm_riscv.h +@@ -0,0 +1,433 @@ ++/* ++** DynASM RISC-V encoding engine. ++** Copyright (C) 2005-2025 Mike Pall. All rights reserved. ++** Released under the MIT license. See dynasm.lua for full copyright notice. ++*/ ++ ++#include ++#include ++#include ++#include ++ ++#define DASM_ARCH "riscv" ++ ++#ifndef DASM_EXTERN ++#define DASM_EXTERN(a,b,c,d) 0 ++#endif ++ ++/* Action definitions. */ ++enum { ++ DASM_STOP, DASM_SECTION, DASM_ESC, DASM_REL_EXT, ++ /* The following actions need a buffer position. */ ++ DASM_ALIGN, DASM_REL_LG, DASM_LABEL_LG, ++ /* The following actions also have an argument. */ ++ DASM_REL_PC, DASM_LABEL_PC, DASM_IMM, DASM_IMMS, ++ DASM__MAX ++}; ++ ++/* Maximum number of section buffer positions for a single dasm_put() call. */ ++#define DASM_MAXSECPOS 25 ++ ++/* DynASM encoder status codes. Action list offset or number are or'ed in. */ ++#define DASM_S_OK 0x00000000 ++#define DASM_S_NOMEM 0x01000000 ++#define DASM_S_PHASE 0x02000000 ++#define DASM_S_MATCH_SEC 0x03000000 ++#define DASM_S_RANGE_I 0x11000000 ++#define DASM_S_RANGE_SEC 0x12000000 ++#define DASM_S_RANGE_LG 0x13000000 ++#define DASM_S_RANGE_PC 0x14000000 ++#define DASM_S_RANGE_REL 0x15000000 ++#define DASM_S_UNDEF_LG 0x21000000 ++#define DASM_S_UNDEF_PC 0x22000000 ++ ++/* Macros to convert positions (8 bit section + 24 bit index). */ ++#define DASM_POS2IDX(pos) ((pos)&0x00ffffff) ++#define DASM_POS2BIAS(pos) ((pos)&0xff000000) ++#define DASM_SEC2POS(sec) ((sec)<<24) ++#define DASM_POS2SEC(pos) ((pos)>>24) ++#define DASM_POS2PTR(D, pos) (D->sections[DASM_POS2SEC(pos)].rbuf + (pos)) ++ ++/* Action list type. */ ++typedef const unsigned int *dasm_ActList; ++ ++/* Per-section structure. */ ++typedef struct dasm_Section { ++ int *rbuf; /* Biased buffer pointer (negative section bias). */ ++ int *buf; /* True buffer pointer. */ ++ size_t bsize; /* Buffer size in bytes. */ ++ int pos; /* Biased buffer position. */ ++ int epos; /* End of biased buffer position - max single put. */ ++ int ofs; /* Byte offset into section. */ ++} dasm_Section; ++ ++/* Core structure holding the DynASM encoding state. */ ++struct dasm_State { ++ size_t psize; /* Allocated size of this structure. */ ++ dasm_ActList actionlist; /* Current actionlist pointer. */ ++ int *lglabels; /* Local/global chain/pos ptrs. */ ++ size_t lgsize; ++ int *pclabels; /* PC label chains/pos ptrs. */ ++ size_t pcsize; ++ void **globals; /* Array of globals. */ ++ dasm_Section *section; /* Pointer to active section. */ ++ size_t codesize; /* Total size of all code sections. */ ++ int maxsection; /* 0 <= sectionidx < maxsection. */ ++ int status; /* Status code. */ ++ dasm_Section sections[1]; /* All sections. Alloc-extended. */ ++}; ++ ++/* The size of the core structure depends on the max. number of sections. */ ++#define DASM_PSZ(ms) (sizeof(dasm_State)+(ms-1)*sizeof(dasm_Section)) ++ ++ ++/* Initialize DynASM state. */ ++void dasm_init(Dst_DECL, int maxsection) ++{ ++ dasm_State *D; ++ size_t psz = 0; ++ Dst_REF = NULL; ++ DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection)); ++ D = Dst_REF; ++ D->psize = psz; ++ D->lglabels = NULL; ++ D->lgsize = 0; ++ D->pclabels = NULL; ++ D->pcsize = 0; ++ D->globals = NULL; ++ D->maxsection = maxsection; ++ memset((void *)D->sections, 0, maxsection * sizeof(dasm_Section)); ++} ++ ++/* Free DynASM state. */ ++void dasm_free(Dst_DECL) ++{ ++ dasm_State *D = Dst_REF; ++ int i; ++ for (i = 0; i < D->maxsection; i++) ++ if (D->sections[i].buf) ++ DASM_M_FREE(Dst, D->sections[i].buf, D->sections[i].bsize); ++ if (D->pclabels) DASM_M_FREE(Dst, D->pclabels, D->pcsize); ++ if (D->lglabels) DASM_M_FREE(Dst, D->lglabels, D->lgsize); ++ DASM_M_FREE(Dst, D, D->psize); ++} ++ ++/* Setup global label array. Must be called before dasm_setup(). */ ++void dasm_setupglobal(Dst_DECL, void **gl, unsigned int maxgl) ++{ ++ dasm_State *D = Dst_REF; ++ D->globals = gl; ++ DASM_M_GROW(Dst, int, D->lglabels, D->lgsize, (10+maxgl)*sizeof(int)); ++} ++ ++/* Grow PC label array. Can be called after dasm_setup(), too. */ ++void dasm_growpc(Dst_DECL, unsigned int maxpc) ++{ ++ dasm_State *D = Dst_REF; ++ size_t osz = D->pcsize; ++ DASM_M_GROW(Dst, int, D->pclabels, D->pcsize, maxpc*sizeof(int)); ++ memset((void *)(((unsigned char *)D->pclabels)+osz), 0, D->pcsize-osz); ++} ++ ++/* Setup encoder. */ ++void dasm_setup(Dst_DECL, const void *actionlist) ++{ ++ dasm_State *D = Dst_REF; ++ int i; ++ D->actionlist = (dasm_ActList)actionlist; ++ D->status = DASM_S_OK; ++ D->section = &D->sections[0]; ++ memset((void *)D->lglabels, 0, D->lgsize); ++ if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); ++ for (i = 0; i < D->maxsection; i++) { ++ D->sections[i].pos = DASM_SEC2POS(i); ++ D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; ++ D->sections[i].ofs = 0; ++ } ++} ++ ++ ++#ifdef DASM_CHECKS ++#define CK(x, st) \ ++ do { if (!(x)) { \ ++ D->status = DASM_S_##st|(int)(p-D->actionlist-1); return; } } while (0) ++#define CKPL(kind, st) \ ++ do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ ++ D->status = DASM_S_RANGE_##st|(int)(p-D->actionlist-1); return; } } while (0) ++#else ++#define CK(x, st) ((void)0) ++#define CKPL(kind, st) ((void)0) ++#endif ++ ++static int dasm_imms(int n) ++{ ++ return (n >= -2048 && n < 2048) ? n : 4096; ++} ++/* Pass 1: Store actions and args, link branches/labels, estimate offsets. */ ++void dasm_put(Dst_DECL, int start, ...) ++{ ++ va_list ap; ++ dasm_State *D = Dst_REF; ++ dasm_ActList p = D->actionlist + start; ++ dasm_Section *sec = D->section; ++ int pos = sec->pos, ofs = sec->ofs; ++ int *b; ++ ++ if (pos >= sec->epos) { ++ DASM_M_GROW(Dst, int, sec->buf, sec->bsize, ++ sec->bsize + 2*DASM_MAXSECPOS*sizeof(int)); ++ sec->rbuf = sec->buf - DASM_POS2BIAS(pos); ++ sec->epos = (int)sec->bsize/sizeof(int) - DASM_MAXSECPOS+DASM_POS2BIAS(pos); ++ } ++ ++ b = sec->rbuf; ++ b[pos++] = start; ++ ++ va_start(ap, start); ++ while (1) { ++ unsigned int ins = *p++; ++ unsigned int action = (ins >> 20); ++ if (action >= DASM__MAX || (ins & 0xf)) { ++ ofs += 4; ++ } else { ++ ins >>= 4; ++ int *pl, n = action >= DASM_REL_PC ? va_arg(ap, int) : 0; ++ switch (action) { ++ case DASM_STOP: goto stop; ++ case DASM_SECTION: ++ n = (ins & 255); CK(n < D->maxsection, RANGE_SEC); ++ D->section = &D->sections[n]; goto stop; ++ case DASM_ESC: p++; ofs += 4; break; ++ case DASM_REL_EXT: break; ++ case DASM_ALIGN: ofs += (ins & 255); b[pos++] = ofs; break; ++ case DASM_REL_LG: ++ n = (ins & 2047) - 10; pl = D->lglabels + n; ++ /* Bkwd rel or global. */ ++ if (n >= 0) { CK(n>=10||*pl<0, RANGE_LG); CKPL(lg, LG); goto putrel; } ++ pl += 10; n = *pl; ++ if (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */ ++ goto linkrel; ++ case DASM_REL_PC: ++ pl = D->pclabels + n; CKPL(pc, PC); ++ putrel: ++ n = *pl; ++ if (n < 0) { /* Label exists. Get label pos and store it. */ ++ b[pos] = -n; ++ } else { ++ linkrel: ++ b[pos] = n; /* Else link to rel chain, anchored at label. */ ++ *pl = pos; ++ } ++ pos++; ++ break; ++ case DASM_LABEL_LG: ++ pl = D->lglabels + (ins & 2047) - 10; CKPL(lg, LG); goto putlabel; ++ case DASM_LABEL_PC: ++ pl = D->pclabels + n; CKPL(pc, PC); ++ putlabel: ++ n = *pl; /* n > 0: Collapse rel chain and replace with label pos. */ ++ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = pos; ++ } ++ *pl = -pos; /* Label exists now. */ ++ b[pos++] = ofs; /* Store pass1 offset estimate. */ ++ break; ++ case DASM_IMM: ++#ifdef DASM_CHECKS ++ CK((n & ((1<<((ins>>10)&31))-1)) == 0, RANGE_I); ++#endif ++ n >>= ((ins>>10)&31); ++#ifdef DASM_CHECKS ++ if (ins & 0x8000) ++ CK(((n + (1<<(((ins>>5)&31)-1)))>>((ins>>5)&31)) == 0, RANGE_I); ++ else ++ CK((n>>((ins>>5)&31)) == 0, RANGE_I); ++#endif ++ b[pos++] = n; ++ break; ++ case DASM_IMMS: ++#ifdef DASM_CHECKS ++ CK(dasm_imms(n) != 4096, RANGE_I); ++#endif ++ b[pos++] = n; ++ break; ++ } ++ } ++ } ++stop: ++ va_end(ap); ++ sec->pos = pos; ++ sec->ofs = ofs; ++} ++#undef CK ++ ++/* Pass 2: Link sections, shrink aligns, fix label offsets. */ ++int dasm_link(Dst_DECL, size_t *szp) ++{ ++ dasm_State *D = Dst_REF; ++ int secnum; ++ int ofs = 0; ++ ++#ifdef DASM_CHECKS ++ *szp = 0; ++ if (D->status != DASM_S_OK) return D->status; ++ { ++ int pc; ++ for (pc = 0; pc*sizeof(int) < D->pcsize; pc++) ++ if (D->pclabels[pc] > 0) return DASM_S_UNDEF_PC|pc; ++ } ++#endif ++ ++ { /* Handle globals not defined in this translation unit. */ ++ int idx; ++ for (idx = 10; idx*sizeof(int) < D->lgsize; idx++) { ++ int n = D->lglabels[idx]; ++ /* Undefined label: Collapse rel chain and replace with marker (< 0). */ ++ while (n > 0) { int *pb = DASM_POS2PTR(D, n); n = *pb; *pb = -idx; } ++ } ++ } ++ ++ /* Combine all code sections. No support for data sections (yet). */ ++ for (secnum = 0; secnum < D->maxsection; secnum++) { ++ dasm_Section *sec = D->sections + secnum; ++ int *b = sec->rbuf; ++ int pos = DASM_SEC2POS(secnum); ++ int lastpos = sec->pos; ++ ++ while (pos != lastpos) { ++ dasm_ActList p = D->actionlist + b[pos++]; ++ while (1) { ++ unsigned int ins = *p++; ++ unsigned int action = (ins >> 20); ++ if (ins & 0xf) continue; else ins >>= 4; ++ switch (action) { ++ case DASM_STOP: case DASM_SECTION: goto stop; ++ case DASM_ESC: p++; break; ++ case DASM_REL_EXT: break; ++ case DASM_ALIGN: ofs -= (b[pos++] + ofs) & (ins & 255); break; ++ case DASM_REL_LG: case DASM_REL_PC: pos++; break; ++ case DASM_LABEL_LG: case DASM_LABEL_PC: b[pos++] += ofs; break; ++ case DASM_IMM: case DASM_IMMS: pos++; break; ++ } ++ } ++ stop: (void)0; ++ } ++ ofs += sec->ofs; /* Next section starts right after current section. */ ++ } ++ ++ D->codesize = ofs; /* Total size of all code sections */ ++ *szp = ofs; ++ return DASM_S_OK; ++} ++ ++#ifdef DASM_CHECKS ++#define CK(x, st) \ ++ do { if (!(x)) return DASM_S_##st|(int)(p-D->actionlist-1); } while (0) ++#else ++#define CK(x, st) ((void)0) ++#endif ++ ++/* Pass 3: Encode sections. */ ++int dasm_encode(Dst_DECL, void *buffer) ++{ ++ dasm_State *D = Dst_REF; ++ char *base = (char *)buffer; ++ unsigned int *cp = (unsigned int *)buffer; ++ int secnum; ++ ++ /* Encode all code sections. No support for data sections (yet). */ ++ for (secnum = 0; secnum < D->maxsection; secnum++) { ++ dasm_Section *sec = D->sections + secnum; ++ int *b = sec->buf; ++ int *endb = sec->rbuf + sec->pos; ++ ++ while (b != endb) { ++ dasm_ActList p = D->actionlist + *b++; ++ while (1) { ++ unsigned int ins = *p++; ++ if (ins & 0xf) { *cp++ = ins; continue; } ++ unsigned int action = (ins >> 20); ++ unsigned int val = (ins >> 4); ++ int n = (action >= DASM_ALIGN && action < DASM__MAX) ? *b++ : 0; ++ switch (action) { ++ case DASM_STOP: case DASM_SECTION: goto stop; ++ case DASM_ESC: *cp++ = *p++; break; ++ case DASM_REL_EXT: ++ n = DASM_EXTERN(Dst, (unsigned char *)cp, (val & 2047), 1); ++ goto patchrel; ++ case DASM_ALIGN: ++ val &= 255; while ((((char *)cp - base) & val)) *cp++ = 0x60000000; ++ break; ++ case DASM_REL_LG: ++ if (n < 0) { ++ n = (int)((ptrdiff_t)D->globals[-n-10] - (ptrdiff_t)cp + 4); ++ goto patchrel; ++ } ++ /* fallthrough */ ++ case DASM_REL_PC: ++ CK(n >= 0, UNDEF_PC); ++ n = *DASM_POS2PTR(D, n) - (int)((char *)cp - base) + 4; ++ patchrel: ++ if (val & 2048) { /* B */ ++ CK((n & 1) == 0 && ((n + 0x1000) >> 13) == 0, RANGE_REL); ++ cp[-1] |= ((n << 19) & 0x80000000) | ((n << 20) & 0x7e000000) ++ | ((n << 7) & 0x00000f00) | ((n >> 4) & 0x00000080); ++ } else { /* J */ ++ CK((n & 1) == 0 && ((n+0x00100000) >> 21) == 0, RANGE_REL); ++ cp[-1] |= ((n << 11) & 0x80000000) | ((n << 20) & 0x7fe00000) ++ | ((n << 9) & 0x00100000) | (n & 0x000ff000); ++ } ++ break; ++ case DASM_LABEL_LG: ++ val &= 2047; if (val >= 20) D->globals[val-20] = (void *)(base + n); ++ break; ++ case DASM_LABEL_PC: break; ++ case DASM_IMM: ++ cp[-1] |= (n & ((1<<((val>>5)&31))-1)) << (val&31); ++ break; ++ case DASM_IMMS: ++ cp[-1] |= (((n << 20) & 0xfe000000) | ((n << 7) & 0x00000f80)); ++ break; ++ default: *cp++ = ins; break; ++ } ++ } ++ stop: (void)0; ++ } ++ } ++ ++ if (base + D->codesize != (char *)cp) /* Check for phase errors. */ ++ return DASM_S_PHASE; ++ return DASM_S_OK; ++} ++#undef CK ++ ++/* Get PC label offset. */ ++int dasm_getpclabel(Dst_DECL, unsigned int pc) ++{ ++ dasm_State *D = Dst_REF; ++ if (pc*sizeof(int) < D->pcsize) { ++ int pos = D->pclabels[pc]; ++ if (pos < 0) return *DASM_POS2PTR(D, -pos); ++ if (pos > 0) return -1; /* Undefined. */ ++ } ++ return -2; /* Unused or out of range. */ ++} ++ ++#ifdef DASM_CHECKS ++/* Optional sanity checker to call between isolated encoding steps. */ ++int dasm_checkstep(Dst_DECL, int secmatch) ++{ ++ dasm_State *D = Dst_REF; ++ if (D->status == DASM_S_OK) { ++ int i; ++ for (i = 1; i <= 9; i++) { ++ if (D->lglabels[i] > 0) { D->status = DASM_S_UNDEF_LG|i; break; } ++ D->lglabels[i] = 0; ++ } ++ } ++ if (D->status == DASM_S_OK && secmatch >= 0 && ++ D->section != &D->sections[secmatch]) ++ D->status = DASM_S_MATCH_SEC|(int)(D->section-D->sections); ++ return D->status; ++} ++#endif ++ +diff --git a/dynasm/dasm_riscv.lua b/dynasm/dasm_riscv.lua +new file mode 100644 +index 0000000000..4c8518f163 +--- /dev/null ++++ b/dynasm/dasm_riscv.lua +@@ -0,0 +1,979 @@ ++------------------------------------------------------------------------------ ++-- DynASM RISC-V module. ++-- ++-- Copyright (C) 2005-2025 Mike Pall. All rights reserved. ++-- See dynasm.lua for full copyright notice. ++-- ++-- Contributed by gns from PLCT Lab, ISCAS. ++------------------------------------------------------------------------------ ++ ++local riscv32 = riscv32 ++local riscv64 = riscv64 ++ ++-- Module information: ++local _info = { ++ arch = riscv32 and "riscv32" or riscv64 and "riscv64", ++ description = "DynASM RISC-V module", ++ version = "1.5.0", ++ vernum = 10500, ++ release = "2022-07-12", ++ author = "Mike Pall", ++ license = "MIT", ++} ++ ++-- Exported glue functions for the arch-specific module. ++local _M = { _info = _info } ++ ++-- Cache library functions. ++local type, tonumber, pairs, ipairs = type, tonumber, pairs, ipairs ++local assert, setmetatable = assert, setmetatable ++local _s = string ++local sub, format, byte, char = _s.sub, _s.format, _s.byte, _s.char ++local match, gmatch = _s.match, _s.gmatch ++local concat, sort = table.concat, table.sort ++local bit = bit or require("bit") ++local band, shl, shr, sar = bit.band, bit.lshift, bit.rshift, bit.arshift ++local tohex = bit.tohex ++ ++local function __orderedIndexGen(t) ++ local orderedIndex = {} ++ for key in pairs(t) do ++ table.insert(orderedIndex, key) ++ end ++ table.sort( orderedIndex ) ++ return orderedIndex ++end ++ ++local function __orderedNext(t, state) ++ local key = nil ++ if state == nil then ++ t.__orderedIndex = __orderedIndexGen(t) ++ key = t.__orderedIndex[1] ++ else ++ local j = 0 ++ for _,_ in pairs(t.__orderedIndex) do j = j + 1 end ++ for i = 1, j do ++ if t.__orderedIndex[i] == state then ++ key = t.__orderedIndex[i+1] ++ end ++ end ++ end ++ ++ if key then ++ return key, t[key] ++ end ++ ++ t.__orderedIndex = nil ++ return ++end ++ ++local function opairs(t) ++ return __orderedNext, t, nil ++end ++ ++-- Inherited tables and callbacks. ++local g_opt, g_arch ++local wline, werror, wfatal, wwarn ++ ++-- Action name list. ++-- CHECK: Keep this in sync with the C code! ++local action_names = { ++ "STOP", "SECTION", "ESC", "REL_EXT", ++ "ALIGN", "REL_LG", "LABEL_LG", ++ "REL_PC", "LABEL_PC", "IMM", "IMMS", ++} ++ ++-- Maximum number of section buffer positions for dasm_put(). ++-- CHECK: Keep this in sync with the C code! ++local maxsecpos = 25 -- Keep this low, to avoid excessively long C lines. ++ ++-- Action name -> action number. ++local map_action = {} ++for n,name in ipairs(action_names) do ++ map_action[name] = n-1 ++end ++ ++-- Action list buffer. ++local actlist = {} ++ ++-- Argument list for next dasm_put(). Start with offset 0 into action list. ++local actargs = { 0 } ++ ++-- Current number of section buffer positions for dasm_put(). ++local secpos = 1 ++ ++------------------------------------------------------------------------------ ++ ++-- Dump action names and numbers. ++local function dumpactions(out) ++ out:write("DynASM encoding engine action codes:\n") ++ for n,name in ipairs(action_names) do ++ local num = map_action[name] ++ out:write(format(" %-10s %02X %d\n", name, num, num)) ++ end ++ out:write("\n") ++end ++ ++-- Write action list buffer as a huge static C array. ++local function writeactions(out, name) ++ local nn = #actlist ++ if nn == 0 then nn = 1; actlist[0] = map_action.STOP end ++ out:write("static const unsigned int ", name, "[", nn, "] = {\n") ++ for i = 1,nn-1 do ++ assert(out:write("0x", tohex(actlist[i]), ",\n")) ++ end ++ assert(out:write("0x", tohex(actlist[nn]), "\n};\n\n")) ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Add word to action list. ++local function wputxw(n) ++ assert(n >= 0 and n <= 0xffffffff and n % 1 == 0, "word out of range") ++ actlist[#actlist+1] = n ++end ++ ++-- Add action to list with optional arg. Advance buffer pos, too. ++local function waction(action, val, a, num) ++ local w = assert(map_action[action], "bad action name `"..action.."'") ++ wputxw(w * 0x100000 + (val or 0) * 16) ++ if a then actargs[#actargs+1] = a end ++ if a or num then secpos = secpos + (num or 1) end ++end ++ ++-- Flush action list (intervening C code or buffer pos overflow). ++local function wflush(term) ++ if #actlist == actargs[1] then return end -- Nothing to flush. ++ if not term then waction("STOP") end -- Terminate action list. ++ wline(format("dasm_put(Dst, %s);", concat(actargs, ", ")), true) ++ actargs = { #actlist } -- Actionlist offset is 1st arg to next dasm_put(). ++ secpos = 1 -- The actionlist offset occupies a buffer position, too. ++end ++ ++-- Put escaped word. ++local function wputw(n) ++ if band(n, 0xf) == 0 then waction("ESC") end ++ wputxw(n) ++end ++ ++-- Reserve position for word. ++local function wpos() ++ local pos = #actlist+1 ++ actlist[pos] = "" ++ return pos ++end ++ ++-- Store word to reserved position. ++local function wputpos(pos, n) ++ assert(n >= -0x80000000 and n <= 0xffffffff and n % 1 == 0, "word out of range") ++ actlist[pos] = n ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Global label name -> global label number. With auto assignment on 1st use. ++local next_global = 20 ++local map_global = setmetatable({}, { __index = function(t, name) ++ if not match(name, "^[%a_][%w_]*$") then werror("bad global label") end ++ local n = next_global ++ if n > 2047 then werror("too many global labels") end ++ next_global = n + 1 ++ t[name] = n ++ return n ++end}) ++ ++-- Dump global labels. ++local function dumpglobals(out, lvl) ++ local t = {} ++ for name, n in pairs(map_global) do t[n] = name end ++ out:write("Global labels:\n") ++ for i=20,next_global-1 do ++ out:write(format(" %s\n", t[i])) ++ end ++ out:write("\n") ++end ++ ++-- Write global label enum. ++local function writeglobals(out, prefix) ++ local t = {} ++ for name, n in pairs(map_global) do t[n] = name end ++ out:write("enum {\n") ++ for i=20,next_global-1 do ++ out:write(" ", prefix, t[i], ",\n") ++ end ++ out:write(" ", prefix, "_MAX\n};\n") ++end ++ ++-- Write global label names. ++local function writeglobalnames(out, name) ++ local t = {} ++ for name, n in pairs(map_global) do t[n] = name end ++ out:write("static const char *const ", name, "[] = {\n") ++ for i=20,next_global-1 do ++ out:write(" \"", t[i], "\",\n") ++ end ++ out:write(" (const char *)0\n};\n") ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Extern label name -> extern label number. With auto assignment on 1st use. ++local next_extern = 0 ++local map_extern_ = {} ++local map_extern = setmetatable({}, { __index = function(t, name) ++ -- No restrictions on the name for now. ++ local n = next_extern ++ if n > 2047 then werror("too many extern labels") end ++ next_extern = n + 1 ++ t[name] = n ++ map_extern_[n] = name ++ return n ++end}) ++ ++-- Dump extern labels. ++local function dumpexterns(out, lvl) ++ out:write("Extern labels:\n") ++ for i=0,next_extern-1 do ++ out:write(format(" %s\n", map_extern_[i])) ++ end ++ out:write("\n") ++end ++ ++-- Write extern label names. ++local function writeexternnames(out, name) ++ out:write("static const char *const ", name, "[] = {\n") ++ for i=0,next_extern-1 do ++ out:write(" \"", map_extern_[i], "\",\n") ++ end ++ out:write(" (const char *)0\n};\n") ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Arch-specific maps. ++local map_archdef = { ++ ra = "x1", sp = "x2", ++} -- Ext. register name -> int. name. ++ ++local map_type = {} -- Type name -> { ctype, reg } ++local ctypenum = 0 -- Type number (for Dt... macros). ++ ++-- Reverse defines for registers. ++function _M.revdef(s) ++ if s == "x1" then return "ra" ++ elseif s == "x2" then return "sp" end ++ return s ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Template strings for RISC-V instructions. ++local map_op = {} ++ ++local map_op_rv32imafd = { ++ ++ -- RV32I ++ lui_2 = "00000037DU", ++ auipc_2 = "00000017DA", ++ ++ jal_2 = "0000006fDJ", ++ jalr_3 = "00000067DRJ", ++ -- pseudo-instrs ++ j_1 = "0000006fJ", ++ jal_1 = "000000efJ", ++ jr_1 = "00000067R", ++ jalr_1 = "000000e7R", ++ jalr_2 = "000000e7RJ", ++ ++ beq_3 = "00000063RrB", ++ bne_3 = "00001063RrB", ++ blt_3 = "00004063RrB", ++ bge_3 = "00005063RrB", ++ bltu_3 = "00006063RrB", ++ bgeu_3 = "00007063RrB", ++ -- pseudo-instrs ++ bnez_2 = "00001063RB", ++ beqz_2 = "00000063RB", ++ blez_2 = "00005063rB", ++ bgez_2 = "00005063RB", ++ bltz_2 = "00004063RB", ++ bgtz_2 = "00004063rB", ++ bgt_3 = "00004063rRB", ++ ble_3 = "00005063rRB", ++ bgtu_3 = "00006063rRB", ++ bleu_3 = "00007063rRB", ++ ++ lb_2 = "00000003DL", ++ lh_2 = "00001003DL", ++ lw_2 = "00002003DL", ++ lbu_2 = "00004003DL", ++ lhu_2 = "00005003DL", ++ ++ sb_2 = "00000023rS", ++ sh_2 = "00001023rS", ++ sw_2 = "00002023rS", ++ ++ addi_3 = "00000013DRI", ++ slti_3 = "00002013DRI", ++ sltiu_3 = "00003013DRI", ++ xori_3 = "00004013DRI", ++ ori_3 = "00006013DRI", ++ andi_3 = "00007013DRI", ++ slli_3 = "00001013DRi", ++ srli_3 = "00005013DRi", ++ srai_3 = "40005013DRi", ++ -- pseudo-instrs ++ seqz_2 = "00103013DR", ++ ["zext.b_2"] = "0ff07013DR", ++ ++ add_3 = "00000033DRr", ++ sub_3 = "40000033DRr", ++ sll_3 = "00001033DRr", ++ slt_3 = "00002033DRr", ++ sltu_3 = "00003033DRr", ++ xor_3 = "00004033DRr", ++ srl_3 = "00005033DRr", ++ sra_3 = "40005033DRr", ++ or_3 = "00006033DRr", ++ and_3 = "00007033DRr", ++ -- pseudo-instrs ++ snez_2 = "00003033Dr", ++ sltz_2 = "00002033DR", ++ sgtz_2 = "00002033Dr", ++ ++ ecall_0 = "00000073", ++ ebreak_0 = "00100073", ++ ++ nop_0 = "00000013", ++ li_2 = "00000013DI", ++ mv_2 = "00000013DR", ++ not_2 = "fff04013DR", ++ neg_2 = "40000033Dr", ++ ret_0 = "00008067", ++ ++ -- RV32M ++ mul_3 = "02000033DRr", ++ mulh_3 = "02001033DRr", ++ mulhsu_3 = "02002033DRr", ++ mulhu_3 = "02003033DRr", ++ div_3 = "02004033DRr", ++ divu_3 = "02005033DRr", ++ rem_3 = "02006033DRr", ++ remu_3 = "02007033DRr", ++ ++ -- RV32A ++ ["lr.w_2"] = "c0000053FR", ++ ["sc.w_2"] = "c0001053FRr", ++ ["amoswap.w_3"] = "c0002053FRr", ++ ["amoadd.w_3"] = "c0003053FRr", ++ ["amoxor.w_3"] = "c0004053FRr", ++ ["amoor.w_3"] = "c0005053FRr", ++ ["amoand.w_3"] = "c0006053FRr", ++ ["amomin.w_3"] = "c0007053FRr", ++ ["amomax.w_3"] = "c0008053FRr", ++ ["amominu.w_3"] = "c0009053FRr", ++ ["amomaxu.w_3"] = "c000a053FRr", ++ ++ -- RV32F ++ ["flw_2"] = "00002007FL", ++ ["fsw_2"] = "00002027gS", ++ ++ ["fmadd.s_4"] = "00000043FGgH", ++ ["fmsub.s_4"] = "00000047FGgH", ++ ["fnmsub.s_4"] = "0000004bFGgH", ++ ["fnmadd.s_4"] = "0000004fFGgH", ++ ["fmadd.s_5"] = "00000043FGgHM", ++ ["fmsub.s_5"] = "00000047FGgHM", ++ ["fnmsub.s_5"] = "0000004bFGgHM", ++ ["fnmadd.s_5"] = "0000004fFGgHM", ++ ++ ["fadd.s_3"] = "00000053FGg", ++ ["fsub.s_3"] = "08000053FGg", ++ ["fmul.s_3"] = "10000053FGg", ++ ["fdiv.s_3"] = "18000053FGg", ++ ["fsqrt.s_2"] = "58000053FG", ++ ["fadd.s_4"] = "00000053FGgM", ++ ["fsub.s_4"] = "08000053FGgM", ++ ["fmul.s_4"] = "10000053FGgM", ++ ["fdiv.s_4"] = "18000053FGgM", ++ ["fsqrt.s_3"] = "58000053FGM", ++ ++ ["fsgnj.s_3"] = "20000053FGg", ++ ["fsgnjn.s_3"] = "20001053FGg", ++ ["fsgnjx.s_3"] = "20002053FGg", ++ ++ ["fmin.s_3"] = "28000053FGg", ++ ["fmax.s_3"] = "28001053FGg", ++ ++ ["fcvt.w.s_2"] = "c0000053DG", ++ ["fcvt.wu.s_2"] = "c0100053DG", ++ ["fcvt.w.s_3"] = "c0000053DGM", ++ ["fcvt.wu.s_3"] = "c0100053DGM", ++ ["fmv.x.w_2"] = "e0000053DG", ++ ++ ["feq.s_3"] = "a0002053DGg", ++ ["flt.s_3"] = "a0001053DGg", ++ ["fle.s_3"] = "a0000053DGg", ++ ++ ["fclass.s_2"] = "e0001053DG", ++ ++ ["fcvt.s.w_2"] = "d0000053FR", ++ ["fcvt.s.wu_2"] = "d0100053FR", ++ ["fcvt.s.w_3"] = "d0000053FRM", ++ ["fcvt.s.wu_3"] = "d0100053FRM", ++ ["fmv.w.x_2"] = "f0000053FR", ++ ++ -- RV32D ++ ["fld_2"] = "00003007FL", ++ ["fsd_2"] = "00003027gS", ++ ++ ["fmadd.d_4"] = "02000043FGgH", ++ ["fmsub.d_4"] = "02000047FGgH", ++ ["fnmsub.d_4"] = "0200004bFGgH", ++ ["fnmadd.d_4"] = "0200004fFGgH", ++ ["fmadd.d_5"] = "02000043FGgHM", ++ ["fmsub.d_5"] = "02000047FGgHM", ++ ["fnmsub.d_5"] = "0200004bFGgHM", ++ ["fnmadd.d_5"] = "0200004fFGgHM", ++ ++ ["fadd.d_3"] = "02000053FGg", ++ ["fsub.d_3"] = "0a000053FGg", ++ ["fmul.d_3"] = "12000053FGg", ++ ["fdiv.d_3"] = "1a000053FGg", ++ ["fsqrt.d_2"] = "5a000053FG", ++ ["fadd.d_4"] = "02000053FGgM", ++ ["fsub.d_4"] = "0a000053FGgM", ++ ["fmul.d_4"] = "12000053FGgM", ++ ["fdiv.d_4"] = "1a000053FGgM", ++ ["fsqrt.d_3"] = "5a000053FGM", ++ ++ ["fsgnj.d_3"] = "22000053FGg", ++ ["fsgnjn.d_3"] = "22001053FGg", ++ ["fsgnjx.d_3"] = "22002053FGg", ++ ["fmin.d_3"] = "2a000053FGg", ++ ["fmax.d_3"] = "2a001053FGg", ++ ["fcvt.s.d_2"] = "40100053FG", ++ ["fcvt.d.s_2"] = "42000053FG", ++ ["feq.d_3"] = "a2002053DGg", ++ ["flt.d_3"] = "a2001053DGg", ++ ["fle.d_3"] = "a2000053DGg", ++ ["fclass.d_2"] = "e2001053DG", ++ ["fcvt.w.d_2"] = "c2000053DG", ++ ["fcvt.wu.d_2"] = "c2100053DG", ++ ["fcvt.d.w_2"] = "d2000053FR", ++ ["fcvt.d.wu_2"] = "d2100053FR", ++ ["fcvt.w.d_3"] = "c2000053DGM", ++ ["fcvt.wu.d_3"] = "c2100053DGM", ++ ["fcvt.d.w_3"] = "d2000053FRM", ++ ["fcvt.d.wu_3"] = "d2100053FRM", ++ ++ ["fmv.d_2"] = "22000053FY", ++ ["fneg.d_2"] = "22001053FY", ++ ["fabs.d_2"] = "22002053FY", ++ ++} ++ ++local map_op_rv64imafd = { ++ ++ -- RV64I ++ lwu_2 = "00006003DL", ++ ld_2 = "00003003DL", ++ ++ sd_2 = "00003023rS", ++ ++ slli_3 = "00001013DRj", ++ srli_3 = "00005013DRj", ++ srai_3 = "40005013DRj", ++ ++ addiw_3 = "0000001bDRI", ++ slliw_3 = "0000101bDRi", ++ srliw_3 = "0000501bDRi", ++ sraiw_3 = "4000501bDRi", ++ ++ addw_3 = "0000003bDRr", ++ subw_3 = "4000003bDRr", ++ sllw_3 = "0000103bDRr", ++ srlw_3 = "0000503bDRr", ++ sraw_3 = "4000503bDRr", ++ ++ negw_2 = "4000003bDr", ++ ["sext.w_2"] = "0000001bDR", ++ ++ -- RV64M ++ mulw_3 = "0200003bDRr", ++ divw_3 = "0200403bDRr", ++ divuw_3 = "0200503bDRr", ++ remw_3 = "0200603bDRr", ++ remuw_3 = "0200703bDRr", ++ ++ -- RV64A ++ ["lr.d_2"] = "c2000053FR", ++ ["sc.d_2"] = "c2001053FRr", ++ ["amoswap.d_3"] = "c2002053FRr", ++ ["amoadd.d_3"] = "c2003053FRr", ++ ["amoxor.d_3"] = "c2004053FRr", ++ ["amoor.d_3"] = "c2005053FRr", ++ ["amoand.d_3"] = "c2006053FRr", ++ ["amomin.d_3"] = "c2007053FRr", ++ ["amomax.d_3"] = "c2008053FRr", ++ ["amominu.d_3"] = "c2009053FRr", ++ ["amomaxu.d_3"] = "c200a053FRr", ++ ++ -- RV64F ++ ["fcvt.l.s_2"] = "c0200053DG", ++ ["fcvt.lu.s_2"] = "c0300053DG", ++ ["fcvt.l.s_3"] = "c0200053DGM", ++ ["fcvt.lu.s_3"] = "c0300053DGM", ++ ["fcvt.s.l_2"] = "d0200053FR", ++ ["fcvt.s.lu_2"] = "d0300053FR", ++ ["fcvt.s.l_3"] = "d0200053FRM", ++ ["fcvt.s.lu_3"] = "d0300053FRM", ++ ++ -- RV64D ++ ["fcvt.l.d_2"] = "c2200053DG", ++ ["fcvt.lu.d_2"] = "c2300053DG", ++ ["fcvt.l.d_3"] = "c2200053DGM", ++ ["fcvt.lu.d_3"] = "c2300053DGM", ++ ["fmv.x.d_2"] = "e2000053DG", ++ ["fcvt.d.l_2"] = "d2200053FR", ++ ["fcvt.d.lu_2"] = "d2300053FR", ++ ["fcvt.d.l_3"] = "d2200053FRM", ++ ["fcvt.d.lu_3"] = "d2300053FRM", ++ ["fmv.d.x_2"] = "f2000053FR", ++ ++} ++ ++local map_op_zicsr = { ++ csrrw_3 = "00001073DCR", ++ csrrs_3 = "00002073DCR", ++ csrrc_3 = "00003073DCR", ++ csrrwi_3 = "00005073DCu", ++ csrrsi_3 = "00006073DCu", ++ csrrci_3 = "00007073DCu", ++ ++ -- pseudo-ops ++ csrrw_2 = "00001073DC", ++ csrrs_2 = "00002073CR", ++ csrrc_2 = "00003073CR", ++ csrrwi_2 = "00005073Cu", ++ csrrsi_2 = "00006073Cu", ++ csrrci_2 = "00007073Cu", ++ ++ rdinstret_1 = "C0202073D", ++ rdcycle_1 = "C0002073D", ++ rdtime_1 = "C0102073D", ++ rdinstreth_1 = "C8202073D", ++ rdcycleh_1 = "C8002073D", ++ rdtimeh_1 = "C8102073D", ++ ++ frcsr_1 = "00302073D", ++ fscsr_2 = "00301073DR", ++ fscsr_1 = "00301073R", ++ frrm_1 = "00202073D", ++ fsrm_2 = "00201073DR", ++ fsrm_1 = "00201073R", ++ fsrmi_2 = "00205073Du", ++ fsrmi_1 = "00205073u", ++ frflags_1 = "00102073D", ++ fsflags_2 = "00101073DR", ++ fsflagsi_2 = "00105073Du", ++ fsflagsi_1 = "00105073u", ++} ++ ++local map_op_zifencei = { ++ ["fence.i_3"] = "0000100fDRI", ++} ++ ++local list_map_op_rv32 = { ['a'] = map_op_rv32imafd, ['b'] = map_op_zifencei, ['c'] = map_op_zicsr } ++local list_map_op_rv64 = { ['a'] = map_op_rv32imafd, ['b'] = map_op_rv64imafd, ['c'] = map_op_zifencei, ['d'] = map_op_zicsr } ++ ++if riscv32 then for _, map in opairs(list_map_op_rv32) do ++ for k, v in pairs(map) do map_op[k] = v end ++ end ++end ++if riscv64 then for _, map in opairs(list_map_op_rv64) do ++ for k, v in pairs(map) do map_op[k] = v end ++ end ++end ++ ++------------------------------------------------------------------------------ ++ ++local function parse_gpr(expr) ++ local tname, ovreg = match(expr, "^([%w_]+):(x[1-3]?[0-9])$") ++ local tp = map_type[tname or expr] ++ if tp then ++ local reg = ovreg or tp.reg ++ if not reg then ++ werror("type `"..(tname or expr).."' needs a register override") ++ end ++ expr = reg ++ end ++ local r = match(expr, "^x([1-3]?[0-9])$") ++ if r then ++ r = tonumber(r) ++ if r <= 31 then return r, tp end ++ end ++ werror("bad register name `"..expr.."'") ++end ++ ++local function parse_fpr(expr) ++ local r = match(expr, "^f([1-3]?[0-9])$") ++ if r then ++ r = tonumber(r) ++ if r <= 31 then return r end ++ end ++ werror("bad register name `"..expr.."'") ++end ++ ++local function parse_imm(imm, bits, shift, scale, signed, action) ++ local n = tonumber(imm) ++ if n then ++ local m = sar(n, scale) ++ if shl(m, scale) == n then ++ if signed then ++ local s = sar(m, bits-1) ++ if s == 0 then return shl(m, shift) ++ elseif s == -1 then return shl(m + shl(1, bits), shift) end ++ else ++ if sar(m, bits) == 0 then return shl(m, shift) end ++ end ++ end ++ werror("out of range immediate `"..imm.."'") ++ elseif match(imm, "^[xf]([1-3]?[0-9])$") or ++ match(imm, "^([%w_]+):([xf][1-3]?[0-9])$") then ++ werror("expected immediate operand, got register") ++ else ++ waction(action or "IMM", ++ (signed and 32768 or 0)+shl(scale, 10)+shl(bits, 5)+shift, imm) ++ return 0 ++ end ++end ++ ++local function parse_csr(expr) ++ local r = match(expr, "^([1-4]?[0-9]?[0-9]?[0-9])$") ++ if r then ++ r = tonumber(r) ++ if r <= 4095 then return r end ++ end ++ werror("bad register name `"..expr.."'") ++end ++ ++local function parse_imms(imm) ++ local n = tonumber(imm) ++ if n then ++ if n >= -2048 and n < 2048 then ++ local imm5, imm7 = band(n, 0x1f), shr(band(n, 0xfe0), 5) ++ return shl(imm5, 7) + shl(imm7, 25) ++ end ++ werror("out of range immediate `"..imm.."'") ++ elseif match(imm, "^[xf]([1-3]?[0-9])$") or ++ match(imm, "^([%w_]+):([xf][1-3]?[0-9])$") then ++ werror("expected immediate operand, got register") ++ else ++ waction("IMMS", 0, imm); return 0 ++ end ++end ++ ++local function parse_rm(mode) ++ local rnd_mode = { ++ rne = 0, rtz = 1, rdn = 2, rup = 3, rmm = 4, dyn = 7 ++ } ++ local n = rnd_mode[mode] ++ if n then return n ++ else werror("bad rounding mode `"..mode.."'") end ++end ++ ++local function parse_disp(disp, mode) ++ local imm, reg = match(disp, "^(.*)%(([%w_:]+)%)$") ++ if imm then ++ local r = shl(parse_gpr(reg), 15) ++ local extname = match(imm, "^extern%s+(%S+)$") ++ if extname then ++ waction("REL_EXT", map_extern[extname], nil, 1) ++ return r ++ else ++ if mode == "load" then ++ return r + parse_imm(imm, 12, 20, 0, true) ++ elseif mode == "store" then ++ return r + parse_imms(imm) ++ else ++ werror("bad displacement mode '"..mode.."'") ++ end ++ end ++ end ++ local reg, tailr = match(disp, "^([%w_:]+)%s*(.*)$") ++ if reg and tailr ~= "" then ++ local r, tp = parse_gpr(reg) ++ if tp then ++ if mode == "load" then ++ waction("IMM", 32768+12*32+20, format(tp.ctypefmt, tailr)) ++ elseif mode == "store" then ++ waction("IMMS", 0, format(tp.ctypefmt, tailr)) ++ else ++ werror("bad displacement mode '"..mode.."'") ++ end ++ return shl(r, 15) ++ end ++ end ++ werror("bad displacement `"..disp.."'") ++end ++ ++local function parse_label(label, def) ++ local prefix = sub(label, 1, 2) ++ -- =>label (pc label reference) ++ if prefix == "=>" then ++ return "PC", 0, sub(label, 3) ++ end ++ -- ->name (global label reference) ++ if prefix == "->" then ++ return "LG", map_global[sub(label, 3)] ++ end ++ if def then ++ -- [1-9] (local label definition) ++ if match(label, "^[1-9]$") then ++ return "LG", 10+tonumber(label) ++ end ++ else ++ -- [<>][1-9] (local label reference) ++ local dir, lnum = match(label, "^([<>])([1-9])$") ++ if dir then -- Fwd: 1-9, Bkwd: 11-19. ++ return "LG", lnum + (dir == ">" and 0 or 10) ++ end ++ -- extern label (extern label reference) ++ local extname = match(label, "^extern%s+(%S+)$") ++ if extname then ++ return "EXT", map_extern[extname] ++ end ++ end ++ werror("bad label `"..label.."'") ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Handle opcodes defined with template strings. ++map_op[".template__"] = function(params, template, nparams) ++ if not params then return sub(template, 9) end ++ local op = tonumber(sub(template, 1, 8), 16) ++ local n = 1 ++ ++ -- Limit number of section buffer positions used by a single dasm_put(). ++ -- A single opcode needs a maximum of 2 positions (ins/ext). ++ if secpos+2 > maxsecpos then wflush() end ++ local pos = wpos() ++ ++ -- Process each character. ++ for p in gmatch(sub(template, 9), ".") do ++ if p == "D" then -- gpr rd ++ op = op + shl(parse_gpr(params[n]), 7); n = n + 1 ++ elseif p == "R" then -- gpr rs1 ++ op = op + shl(parse_gpr(params[n]), 15); n = n + 1 ++ elseif p == "r" then -- gpr rs2 ++ op = op + shl(parse_gpr(params[n]), 20); n = n + 1 ++ elseif p == "F" then -- fpr rd ++ op = op + shl(parse_fpr(params[n]), 7); n = n + 1 ++ elseif p == "G" then -- fpr rs1 ++ op = op + shl(parse_fpr(params[n]), 15); n = n + 1 ++ elseif p == "g" then -- fpr rs2 ++ op = op + shl(parse_fpr(params[n]), 20); n = n + 1 ++ elseif p == "H" then -- fpr rs3 ++ op = op + shl(parse_fpr(params[n]), 27); n = n + 1 ++ elseif p == "C" then -- csr ++ op = op + shl(parse_csr(params[n]), 20); n = n + 1 ++ elseif p == "M" then -- fpr rounding mode ++ op = op + shl(parse_rm(params[n]), 12); n = n + 1 ++ elseif p == "Y" then -- fpr psuedo-op ++ local r = parse_fpr(params[n]) ++ op = op + shl(r, 15) + shl(r, 20); n = n + 1 ++ elseif p == "I" then -- I-type imm12 ++ op = op + parse_imm(params[n], 12, 20, 0, true); n = n + 1 ++ elseif p == "i" then -- I-type shamt5 ++ op = op + parse_imm(params[n], 5, 20, 0, false); n = n + 1 ++ elseif p == "j" then -- I-type shamt6 ++ op = op + parse_imm(params[n], 6, 20, 0, false); n = n + 1 ++ elseif p == "u" then -- I-type uimm ++ op = op + parse_imm(params[n], 5, 15, 0, false); n = n + 1 ++ elseif p == "U" then -- U-type imm20 ++ op = op + parse_imm(params[n], 20, 12, 0, false); n = n + 1 ++ elseif p == "L" then -- load ++ op = op + parse_disp(params[n], "load"); n = n + 1 ++ elseif p == "S" then -- store ++ op = op + parse_disp(params[n], "store"); n = n + 1 ++ elseif p == "B" or p == "J" then -- control flow ++ local mode, m, s = parse_label(params[n], false) ++ if p == "B" then m = m + 2048 end ++ waction("REL_"..mode, m, s, 1); n = n + 1 ++ elseif p == "A" then -- AUIPC ++ local mode, m, s = parse_label(params[n], false) ++ waction("REL_"..mode, m, s, 1); n = n + 1 ++ else ++ assert(false) ++ end ++ end ++ wputpos(pos, op) ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Pseudo-opcode to mark the position where the action list is to be emitted. ++map_op[".actionlist_1"] = function(params) ++ if not params then return "cvar" end ++ local name = params[1] -- No syntax check. You get to keep the pieces. ++ wline(function(out) writeactions(out, name) end) ++end ++ ++-- Pseudo-opcode to mark the position where the global enum is to be emitted. ++map_op[".globals_1"] = function(params) ++ if not params then return "prefix" end ++ local prefix = params[1] -- No syntax check. You get to keep the pieces. ++ wline(function(out) writeglobals(out, prefix) end) ++end ++ ++-- Pseudo-opcode to mark the position where the global names are to be emitted. ++map_op[".globalnames_1"] = function(params) ++ if not params then return "cvar" end ++ local name = params[1] -- No syntax check. You get to keep the pieces. ++ wline(function(out) writeglobalnames(out, name) end) ++end ++ ++-- Pseudo-opcode to mark the position where the extern names are to be emitted. ++map_op[".externnames_1"] = function(params) ++ if not params then return "cvar" end ++ local name = params[1] -- No syntax check. You get to keep the pieces. ++ wline(function(out) writeexternnames(out, name) end) ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Label pseudo-opcode (converted from trailing colon form). ++map_op[".label_1"] = function(params) ++ if not params then return "[1-9] | ->global | =>pcexpr" end ++ if secpos+1 > maxsecpos then wflush() end ++ local mode, n, s = parse_label(params[1], true) ++ if mode == "EXT" then werror("bad label definition") end ++ waction("LABEL_"..mode, n, s, 1) ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Pseudo-opcodes for data storage. ++map_op[".long_*"] = function(params) ++ if not params then return "imm..." end ++ for _,p in ipairs(params) do ++ local n = tonumber(p) ++ if not n then werror("bad immediate `"..p.."'") end ++ if n < 0 then n = n + 2^32 end ++ wputw(n) ++ if secpos+2 > maxsecpos then wflush() end ++ end ++end ++ ++-- Alignment pseudo-opcode. ++map_op[".align_1"] = function(params) ++ if not params then return "numpow2" end ++ if secpos+1 > maxsecpos then wflush() end ++ local align = tonumber(params[1]) ++ if align then ++ local x = align ++ -- Must be a power of 2 in the range (2 ... 256). ++ for i=1,8 do ++ x = x / 2 ++ if x == 1 then ++ waction("ALIGN", align-1, nil, 1) -- Action byte is 2**n-1. ++ return ++ end ++ end ++ end ++ werror("bad alignment") ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Pseudo-opcode for (primitive) type definitions (map to C types). ++map_op[".type_3"] = function(params, nparams) ++ if not params then ++ return nparams == 2 and "name, ctype" or "name, ctype, reg" ++ end ++ local name, ctype, reg = params[1], params[2], params[3] ++ if not match(name, "^[%a_][%w_]*$") then ++ werror("bad type name `"..name.."'") ++ end ++ local tp = map_type[name] ++ if tp then ++ werror("duplicate type `"..name.."'") ++ end ++ -- Add #type to defines. A bit unclean to put it in map_archdef. ++ map_archdef["#"..name] = "sizeof("..ctype..")" ++ -- Add new type and emit shortcut define. ++ local num = ctypenum + 1 ++ map_type[name] = { ++ ctype = ctype, ++ ctypefmt = format("Dt%X(%%s)", num), ++ reg = reg, ++ } ++ wline(format("#define Dt%X(_V) (int)(ptrdiff_t)&(((%s *)0)_V)", num, ctype)) ++ ctypenum = num ++end ++map_op[".type_2"] = map_op[".type_3"] ++ ++-- Dump type definitions. ++local function dumptypes(out, lvl) ++ local t = {} ++ for name in pairs(map_type) do t[#t+1] = name end ++ sort(t) ++ out:write("Type definitions:\n") ++ for _,name in ipairs(t) do ++ local tp = map_type[name] ++ local reg = tp.reg or "" ++ out:write(format(" %-20s %-20s %s\n", name, tp.ctype, reg)) ++ end ++ out:write("\n") ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Set the current section. ++function _M.section(num) ++ waction("SECTION", num) ++ wflush(true) -- SECTION is a terminal action. ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Dump architecture description. ++function _M.dumparch(out) ++ out:write(format("DynASM %s version %s, released %s\n\n", ++ _info.arch, _info.version, _info.release)) ++ dumpactions(out) ++end ++ ++-- Dump all user defined elements. ++function _M.dumpdef(out, lvl) ++ dumptypes(out, lvl) ++ dumpglobals(out, lvl) ++ dumpexterns(out, lvl) ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Pass callbacks from/to the DynASM core. ++function _M.passcb(wl, we, wf, ww) ++ wline, werror, wfatal, wwarn = wl, we, wf, ww ++ return wflush ++end ++ ++-- Setup the arch-specific module. ++function _M.setup(arch, opt) ++ g_arch, g_opt = arch, opt ++end ++ ++-- Merge the core maps and the arch-specific maps. ++function _M.mergemaps(map_coreop, map_def) ++ setmetatable(map_op, { __index = map_coreop }) ++ setmetatable(map_def, { __index = map_archdef }) ++ return map_op, map_def ++end ++ ++return _M ++ ++------------------------------------------------------------------------------ ++ +diff --git a/dynasm/dasm_riscv32.lua b/dynasm/dasm_riscv32.lua +new file mode 100644 +index 0000000000..f194ce1dcb +--- /dev/null ++++ b/dynasm/dasm_riscv32.lua +@@ -0,0 +1,12 @@ ++------------------------------------------------------------------------------ ++-- DynASM RISC-V 32 module. ++-- ++-- Copyright (C) 2005-2025 Mike Pall. All rights reserved. ++-- See dynasm.lua for full copyright notice. ++------------------------------------------------------------------------------ ++-- This module just sets 32 bit mode for the combined RISC-V module. ++-- All the interesting stuff is there. ++------------------------------------------------------------------------------ ++ ++riscv32 = true -- Using a global is an ugly, but effective solution. ++return require("dasm_riscv") +diff --git a/dynasm/dasm_riscv64.lua b/dynasm/dasm_riscv64.lua +new file mode 100644 +index 0000000000..25274395dc +--- /dev/null ++++ b/dynasm/dasm_riscv64.lua +@@ -0,0 +1,12 @@ ++------------------------------------------------------------------------------ ++-- DynASM RISC-V 64 module. ++-- ++-- Copyright (C) 2005-2025 Mike Pall. All rights reserved. ++-- See dynasm.lua for full copyright notice. ++------------------------------------------------------------------------------ ++-- This module just sets 64 bit mode for the combined RISC-V module. ++-- All the interesting stuff is there. ++------------------------------------------------------------------------------ ++ ++riscv64 = true -- Using a global is an ugly, but effective solution. ++return require("dasm_riscv") + +From 5a704727730307a71d1b5b9df634db76b367fab9 Mon Sep 17 00:00:00 2001 +From: gns +Date: Tue, 5 Mar 2024 18:03:33 +0800 +Subject: [PATCH 03/22] riscv(interp): add register definition + +--- + src/vm_riscv64.dasc | 82 +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 82 insertions(+) + create mode 100644 src/vm_riscv64.dasc + +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +new file mode 100644 +index 0000000000..bfe324c2ef +--- /dev/null ++++ b/src/vm_riscv64.dasc +@@ -0,0 +1,82 @@ ++|// Low-level VM code for RISC-V 64 CPUs. ++|// Bytecode interpreter, fast functions and helper functions. ++|// Copyright (C) 2005-2025 Mike Pall. See Copyright Notice in luajit.h ++|// ++|// Contributed by gns from PLCT Lab, ISCAS. ++|// Sponsored by PLCT Lab, ISCAS. ++| ++|.arch riscv64 ++|.section code_op, code_sub ++| ++|.actionlist build_actionlist ++|.globals GLOB_ ++|.globalnames globnames ++|.externnames extnames ++| ++|// Note: The ragged indentation of the instructions is intentional. ++|// The starting columns indicate data dependencies. ++| ++|//----------------------------------------------------------------------- ++| ++|// Fixed register assignments for the interpreter. ++|// Don't use: x0 = 0, x1 = ra, x2 = sp, x3 = gp, x4 = tp ++| ++| ++|// The following must be C callee-save (but BASE is often refetched). ++|.define BASE, x18 // Base of current Lua stack frame. ++|.define KBASE, x19 // Constants of current Lua function. ++|.define PC, x20 // Next PC. ++|.define GLREG, x21 // Global state. ++|.define DISPATCH, x22 // Opcode dispatch table. ++|.define LREG, x23 // Register holding lua_State (also in SAVE_L). ++|.define MULTRES, x24 // Size of multi-result: (nresults+1)*8. ++| ++|// Constants for type-comparisons, stores and conversions. C callee-save. ++|.define TISNIL, x8 ++|.define TISNUM, x25 ++|.define TOBIT, f27 // 2^52 + 2^51. ++| ++|// The following temporaries are not saved across C calls, except for RA. ++|.define RA, x9 // Callee-save. ++|.define RB, x14 ++|.define RC, x15 ++|.define RD, x16 ++|.define INS, x17 ++| ++|.define TMP0, x6 ++|.define TMP1, x7 ++|.define TMP2, x28 ++|.define TMP3, x29 ++|.define TMP4, x30 ++| ++|// RISC-V lp64d calling convention. ++|.define CFUNCADDR, x5 ++|.define CARG1, x10 ++|.define CARG2, x11 ++|.define CARG3, x12 ++|.define CARG4, x13 ++|.define CARG5, x14 ++|.define CARG6, x15 ++|.define CARG7, x16 ++|.define CARG8, x17 ++| ++|.define CRET1, x10 ++|.define CRET2, x11 ++| ++|.define FARG1, f10 ++|.define FARG2, f11 ++|.define FARG3, f12 ++|.define FARG4, f13 ++|.define FARG5, f14 ++|.define FARG6, f15 ++|.define FARG7, f16 ++|.define FARG8, f17 ++| ++|.define FRET1, f10 ++|.define FRET2, f11 ++| ++|.define FTMP0, f0 ++|.define FTMP1, f1 ++|.define FTMP2, f2 ++|.define FTMP3, f3 ++|.define FTMP4, f4 + +From e3b19286cd1e849eb71fd834247a14d8e0ce2095 Mon Sep 17 00:00:00 2001 +From: gns +Date: Tue, 5 Mar 2024 18:05:22 +0800 +Subject: [PATCH 04/22] riscv(interp): add frame definition + +--- + src/lj_frame.h | 9 +++++ + src/vm_riscv64.dasc | 83 +++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 92 insertions(+) + +diff --git a/src/lj_frame.h b/src/lj_frame.h +index a7e07d8969..06a3d8eebb 100644 +--- a/src/lj_frame.h ++++ b/src/lj_frame.h +@@ -264,6 +264,15 @@ enum { LJ_CONT_TAILCALL, LJ_CONT_FFI_CALLBACK }; /* Special continuations. */ + #endif + #define CFRAME_OFS_MULTRES 0 + #define CFRAME_SHIFT_MULTRES 3 ++#elif LJ_TARGET_RISCV64 ++#define CFRAME_OFS_ERRF 252 ++#define CFRAME_OFS_NRES 248 ++#define CFRAME_OFS_PREV 240 ++#define CFRAME_OFS_L 232 ++#define CFRAME_OFS_PC 224 ++#define CFRAME_OFS_MULTRES 0 ++#define CFRAME_SIZE 256 ++#define CFRAME_SHIFT_MULTRES 3 + #else + #error "Missing CFRAME_* definitions for this architecture" + #endif +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index bfe324c2ef..4499c7df36 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -80,3 +80,86 @@ + |.define FTMP2, f2 + |.define FTMP3, f3 + |.define FTMP4, f4 ++| ++|// Stack layout while in interpreter. Must match with lj_frame.h. ++|// RISC-V 64 lp64d. ++| ++|.define CFRAME_SPACE, 256 // Delta for sp. ++| ++|//----- 16 byte aligned, <-- sp entering interpreter ++|.define SAVE_ERRF, 252 // 32 bit values. ++|.define SAVE_NRES, 248 ++|.define SAVE_CFRAME, 240 // 64 bit values. ++|.define SAVE_L, 232 ++|.define SAVE_PC, 224 ++|//----- 16 byte aligned ++|// Padding 216 ++|.define SAVE_GPR_, 112 // .. 112+13*8: 64 bit GPR saves. ++|.define SAVE_FPR_, 16 // .. 16+12*8: 64 bit FPR saves. ++| ++| ++|.define TMPD, 0 ++|//----- 16 byte aligned ++| ++|.define TMPD_OFS, 0 ++| ++|//----------------------------------------------------------------------- ++| ++|.macro saveregs ++| addi sp, sp, -CFRAME_SPACE ++| fsd f27, SAVE_FPR_+11*8(sp) ++| fsd f26, SAVE_FPR_+10*8(sp) ++| fsd f25, SAVE_FPR_+9*8(sp) ++| fsd f24, SAVE_FPR_+8*8(sp) ++| fsd f23, SAVE_FPR_+7*8(sp) ++| fsd f22, SAVE_FPR_+6*8(sp) ++| fsd f21, SAVE_FPR_+5*8(sp) ++| fsd f20, SAVE_FPR_+4*8(sp) ++| fsd f19, SAVE_FPR_+3*8(sp) ++| fsd f18, SAVE_FPR_+2*8(sp) ++| fsd f9, SAVE_FPR_+1*8(sp) ++| fsd f8, SAVE_FPR_+0*8(sp) ++| sd ra, SAVE_GPR_+12*8(sp) ++| sd x27, SAVE_GPR_+11*8(sp) ++| sd x26, SAVE_GPR_+10*8(sp) ++| sd x25, SAVE_GPR_+9*8(sp) ++| sd x24, SAVE_GPR_+8*8(sp) ++| sd x23, SAVE_GPR_+7*8(sp) ++| sd x22, SAVE_GPR_+6*8(sp) ++| sd x21, SAVE_GPR_+5*8(sp) ++| sd x20, SAVE_GPR_+4*8(sp) ++| sd x19, SAVE_GPR_+3*8(sp) ++| sd x18, SAVE_GPR_+2*8(sp) ++| sd x9, SAVE_GPR_+1*8(sp) ++| sd x8, SAVE_GPR_+0*8(sp) ++|.endmacro ++| ++|.macro restoreregs_ret ++| ld ra, SAVE_GPR_+12*8(sp) ++| ld x27, SAVE_GPR_+11*8(sp) ++| ld x26, SAVE_GPR_+10*8(sp) ++| ld x25, SAVE_GPR_+9*8(sp) ++| ld x24, SAVE_GPR_+8*8(sp) ++| ld x23, SAVE_GPR_+7*8(sp) ++| ld x22, SAVE_GPR_+6*8(sp) ++| ld x21, SAVE_GPR_+5*8(sp) ++| ld x20, SAVE_GPR_+4*8(sp) ++| ld x19, SAVE_GPR_+3*8(sp) ++| ld x18, SAVE_GPR_+2*8(sp) ++| ld x9, SAVE_GPR_+1*8(sp) ++| ld x8, SAVE_GPR_+0*8(sp) ++| fld f27, SAVE_FPR_+11*8(sp) ++| fld f26, SAVE_FPR_+10*8(sp) ++| fld f25, SAVE_FPR_+9*8(sp) ++| fld f24, SAVE_FPR_+8*8(sp) ++| fld f23, SAVE_FPR_+7*8(sp) ++| fld f22, SAVE_FPR_+6*8(sp) ++| fld f21, SAVE_FPR_+5*8(sp) ++| fld f20, SAVE_FPR_+4*8(sp) ++| fld f19, SAVE_FPR_+3*8(sp) ++| fld f18, SAVE_FPR_+2*8(sp) ++| fld f9, SAVE_FPR_+1*8(sp) ++| fld f8, SAVE_FPR_+0*8(sp) ++| addi sp, sp, CFRAME_SPACE ++| ret ++|.endmacro + +From c27634a26d4b2ec296724c6d9387d6b34c03b93c Mon Sep 17 00:00:00 2001 +From: gns +Date: Tue, 5 Mar 2024 18:07:52 +0800 +Subject: [PATCH 05/22] riscv(interp): add helper macros and typedefs + +--- + src/vm_riscv64.dasc | 353 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 353 insertions(+) + +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index 4499c7df36..f8f338ce89 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -163,3 +163,356 @@ + | addi sp, sp, CFRAME_SPACE + | ret + |.endmacro ++| ++|//----------------------------------------------------------------------- ++| ++|// Pseudo-instruction macros ++|// Be cautious with local label 9 since we use them here! ++|.macro bxeq, a, b, tgt ++| bne a, b, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxne, a, b, tgt ++| beq a, b, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxlt, a, b, tgt ++| bge a, b, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxge, a, b, tgt ++| blt a, b, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxgt, a, b, tgt ++| bge b, a, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxle, a, b, tgt ++| blt b, a, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxltu, a, b, tgt ++| bgeu a, b, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxgeu, a, b, tgt ++| bltu a, b, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxgtu, a, b, tgt ++| bgeu b, a, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxleu, a, b, tgt ++| bltu b, a, >9 ++| j tgt ++|9: ++|.endmacro ++| ++|.macro bxeqz, a, tgt ++| bxeq a, x0, tgt ++|.endmacro ++| ++|.macro bxnez, a, tgt ++| bxne a, x0, tgt ++|.endmacro ++| ++|.macro bxlez, a, tgt ++| bxge x0, a, tgt ++|.endmacro ++| ++|.macro bxgez, a, tgt ++| bxge a, x0, tgt ++|.endmacro ++| ++|.macro bxltz, a, tgt ++| bxlt a, x0, tgt ++|.endmacro ++| ++|.macro bxgtz, a, tgt ++| bxlt x0, a, tgt ++|.endmacro ++| ++|.macro lxi, a, b ++| lui a, (b)&0xfffff ++| srai a, a, 12 ++|.endmacro ++| ++|.macro lzi, a, b ++| lui a, (b)&0xfffff ++| srli a, a, 12 ++|.endmacro ++| ++|.macro addxi, a, b, c ++| lui x31, (c)&0xfffff ++| srai x31, x31, 12 ++| add a, x31, b ++|.endmacro ++| ++|.macro sext.b, a, b ++| slli a, b, 56 ++| srai a, a, 56 ++|.endmacro ++| ++|.macro sext.h, a, b ++| slli a, b, 48 ++| srai a, a, 48 ++|.endmacro ++| ++|.macro zext.h, a, b ++| slli a, b, 48 ++| srli a, a, 48 ++|.endmacro ++| ++|.macro zext.w, a, b ++| slli a, b, 32 ++| srli a, a, 32 ++|.endmacro ++| ++|.macro bfextri, a, b, c, d ++| slli a, b, (63-c) ++| srli a, a, (d+63-c) ++|.endmacro ++| ++|//----------------------------------------------------------------------- ++| ++|// Type definitions. Some of these are only used for documentation. ++|.type L, lua_State, LREG ++|.type GL, global_State, GLREG ++|.type TVALUE, TValue ++|.type GCOBJ, GCobj ++|.type STR, GCstr ++|.type TAB, GCtab ++|.type LFUNC, GCfuncL ++|.type CFUNC, GCfuncC ++|.type PROTO, GCproto ++|.type UPVAL, GCupval ++|.type NODE, Node ++|.type NARGS8, int ++|.type TRACE, GCtrace ++|.type SBUF, SBuf ++| ++|//----------------------------------------------------------------------- ++| ++|// Trap for not-yet-implemented parts. ++|.macro NYI; .long 0x00100073; .endmacro ++| ++|//----------------------------------------------------------------------- ++| ++|// Access to frame relative to BASE. ++|.define FRAME_PC, -8 ++|.define FRAME_FUNC, -16 ++| ++|//----------------------------------------------------------------------- ++| ++|// Endian-specific defines. RISC-V only has little endian ABI for now. ++|.define OFS_RD, 2 ++|.define OFS_RA, 1 ++|.define OFS_OP, 0 ++| ++|// Instruction decode. ++|.macro decode_OP1, dst, ins; andi dst, ins, 0xff; .endmacro ++|.macro decode_BC4b, dst; slliw dst, dst, 2; .endmacro ++|.macro decode_BC8b, dst; slliw dst, dst, 3; .endmacro ++|.macro decode_RX8b, dst; andi dst, dst, 0x7f8; .endmacro ++| ++|.macro decode_OP8a, dst, ins; decode_OP1 dst, ins; .endmacro ++|.macro decode_OP8b, dst; decode_BC8b dst; .endmacro ++|.macro decode_RA8a, dst, ins; srliw dst, ins, 5; .endmacro ++|.macro decode_RA8b, dst; decode_RX8b dst; .endmacro ++|.macro decode_RB8a, dst, ins; srliw dst, ins, 21; .endmacro ++|.macro decode_RB8b, dst; decode_RX8b dst; .endmacro ++|.macro decode_RC8a, dst, ins; srliw dst, ins, 13; .endmacro ++|.macro decode_RC8b, dst; decode_RX8b dst; .endmacro ++|.macro decode_RD8a, dst, ins; srliw dst, ins, 16; .endmacro ++|.macro decode_RD4b, dst; decode_BC4b dst; .endmacro ++|.macro decode_RD8b, dst; decode_BC8b dst; .endmacro ++|.macro decode_RDtoRC8, dst, src; andi dst, src, 0x7f8; .endmacro ++| ++|.macro decode_OP8, dst, ins; decode_OP1 dst, ins; decode_BC8b dst; .endmacro ++|.macro decode_RA8, dst, ins; decode_RA8a dst, ins; decode_RA8b dst; .endmacro ++|.macro decode_RB8, dst, ins; decode_RB8a dst, ins; decode_RB8b dst; .endmacro ++|.macro decode_RC8, dst, ins; decode_RC8a dst, ins; decode_RC8b dst; .endmacro ++|.macro decode_RD8, dst, ins; decode_RD8a dst, ins; decode_RD8b dst; .endmacro ++| ++|// Instruction fetch. ++|.macro ins_NEXT1 ++| lw INS, 0(PC) ++| addi PC, PC, 4 ++|.endmacro ++|// Instruction decode+dispatch. ++|.macro ins_NEXT2 ++| decode_OP8 TMP1, INS ++| add TMP0, DISPATCH, TMP1 ++| decode_RD8a RD, INS ++| ld TMP4, 0(TMP0) ++| decode_RA8a RA, INS ++| decode_RD8b RD ++| decode_RA8b RA ++| jr TMP4 ++|.endmacro ++|.macro ins_NEXT ++| ins_NEXT1 ++| ins_NEXT2 ++|.endmacro ++| ++|// Instruction footer. ++|.if 1 ++| // Replicated dispatch. Less unpredictable branches, but higher I-Cache use. ++| .define ins_next, ins_NEXT ++| .define ins_next_, ins_NEXT ++| .define ins_next1, ins_NEXT1 ++| .define ins_next2, ins_NEXT2 ++|.else ++| // Common dispatch. Lower I-Cache use, only one (very) unpredictable branch. ++| // Affects only certain kinds of benchmarks (and only with -j off). ++| .macro ins_next ++| j ->ins_next ++| .endmacro ++| .macro ins_next1 ++| .endmacro ++| .macro ins_next2 ++| j ->ins_next ++| .endmacro ++| .macro ins_next_ ++| ->ins_next: ++| ins_NEXT ++| .endmacro ++|.endif ++| ++|// Call decode and dispatch. ++|.macro ins_callt ++| // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC ++| ld PC, LFUNC:RB->pc ++| lw INS, 0(PC) ++| addi PC, PC, 4 ++| decode_OP8 TMP1, INS ++| decode_RA8 RA, INS ++| add TMP0, DISPATCH, TMP1 ++| ld TMP0, 0(TMP0) ++| add RA, RA, BASE ++| jr TMP0 ++|.endmacro ++| ++|.macro ins_call ++| // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, PC = caller PC ++| sd PC, FRAME_PC(BASE) ++| ins_callt ++|.endmacro ++| ++|//----------------------------------------------------------------------- ++| ++|.macro branch_RD ++| srliw TMP0, RD, 1 ++| lui TMP4, (-(BCBIAS_J*4 >> 12)) & 0xfffff ++| addw TMP0, TMP0, TMP4 ++| add PC, PC, TMP0 ++|.endmacro ++| ++|// Assumes J is relative to GL. Some J members might be out of range though. ++#define GL_J(field) (GG_G2J + (int)offsetof(jit_State, field)) ++| ++#define PC2PROTO(field) ((int)offsetof(GCproto, field)-(int)sizeof(GCproto)) ++| ++|.macro call_intern, curfunc, func ++|->curfunc .. _pcrel_ .. func: ++| auipc CFUNCADDR, extern %pcrel_hi(func) ++| jalr CFUNCADDR, extern %pcrel_lo(lj_ .. curfunc .. _pcrel_ .. func) ++|.endmacro ++|.macro call_extern, func ++| call extern func ++| empty ++|.endmacro ++| ++|// Set current VM state. Uses TMP0. ++|.macro li_vmstate, st; li TMP0, ~LJ_VMST_..st; .endmacro ++|.macro st_vmstate; sw TMP0, GL->vmstate; .endmacro ++| ++|// Move table write barrier back. Overwrites mark and tmp. ++|.macro barrierback, tab, mark, tmp, target ++| ld tmp, GL->gc.grayagain ++| andi mark, mark, ~LJ_GC_BLACK & 255 // black2gray(tab) ++| sd tab, GL->gc.grayagain ++| sb mark, tab->marked ++| sd tmp, tab->gclist ++| j target ++|.endmacro ++| ++|// Clear type tag. Isolate lowest 64-17=47 bits of reg. ++|.macro cleartp, reg; slli reg, reg, 17; srli reg, reg, 17; .endmacro ++|.macro cleartp, dst, reg; slli dst, reg, 17; srli dst, dst, 17; .endmacro ++| ++|// Set type tag: Merge 17 type bits into bits [47, 63] of dst. ++|.macro settp_a, dst; cleartp dst; .endmacro ++|.macro settp_a, dst, src; cleartp dst, src; .endmacro ++|.macro settp_b, dst, tp; ++| slli x31, tp, 47 ++| or dst, dst, x31 ++|.endmacro ++|.macro settp_b, dst, src, tp; ++| slli x31, tp, 47 ++| or dst, src, x31 ++|.endmacro ++|.macro settp, dst, tp; settp_a dst; settp_b dst, tp; .endmacro ++|.macro settp, dst, src, tp; settp_a dst, src; settp_b dst, dst, tp; .endmacro ++| ++|// Extract (negative) type tag. ++|.macro gettp, dst, src; srai dst, src, 47; .endmacro ++| ++|// Macros to check the TValue type and extract the GCobj. Branch on failure. ++|.macro checktp, reg, tp, target ++| gettp TMP4, reg ++| addi TMP4, TMP4, tp ++| cleartp reg ++| bxnez TMP4, target ++|.endmacro ++|.macro checktp, dst, reg, tp, target ++| gettp TMP4, reg ++| addi TMP4, TMP4, tp ++| cleartp dst, reg ++| bxnez TMP4, target ++|.endmacro ++|.macro checkstr, reg, target; checktp reg, -LJ_TSTR, target; .endmacro ++|.macro checktab, reg, target; checktp reg, -LJ_TTAB, target; .endmacro ++|.macro checkfunc, reg, target; checktp reg, -LJ_TFUNC, target; .endmacro ++|.macro checkint, reg, target ++| gettp TMP4, reg ++| bxne TMP4, TISNUM, target ++|.endmacro ++|.macro checknum, reg, target ++| gettp TMP4, reg ++| sltiu TMP4, TMP4, LJ_TISNUM ++| bxeqz TMP4, target ++|.endmacro ++| ++|.macro mov_false, reg ++| li reg, 0x001 ++| slli reg, reg, 47 ++| not reg, reg ++|.endmacro ++|.macro mov_true, reg ++| li reg, 0x001 ++| slli reg, reg, 48 ++| not reg, reg ++|.endmacro ++| ++|//----------------------------------------------------------------------- + +From caeefe25d08c45e1339fc59f63ca8b466403c151 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 08:40:08 +0800 +Subject: [PATCH 06/22] riscv(interp): add base assembly interpreter VM + +--- + src/lj_vm.h | 3 + + src/lj_vmmath.c | 3 +- + src/vm_riscv64.dasc | 3584 ++++++++++++++++++++++++++++++++++++++++++- + 3 files changed, 3586 insertions(+), 4 deletions(-) + +diff --git a/src/lj_vm.h b/src/lj_vm.h +index 9cc42613d3..774944725d 100644 +--- a/src/lj_vm.h ++++ b/src/lj_vm.h +@@ -37,6 +37,9 @@ LJ_ASMF int lj_vm_cpuid(uint32_t f, uint32_t res[4]); + #if LJ_TARGET_PPC + void lj_vm_cachesync(void *start, void *end); + #endif ++#if LJ_TARGET_RISCV64 ++void lj_vm_fence_rw_rw(); ++#endif + LJ_ASMF double lj_vm_foldarith(double x, double y, int op); + #if LJ_HASJIT + LJ_ASMF double lj_vm_foldfpm(double x, int op); +diff --git a/src/lj_vmmath.c b/src/lj_vmmath.c +index 2c9b96cce4..a31a4adf51 100644 +--- a/src/lj_vmmath.c ++++ b/src/lj_vmmath.c +@@ -69,7 +69,8 @@ double lj_vm_foldarith(double x, double y, int op) + + /* -- Helper functions for generated machine code ------------------------- */ + +-#if (LJ_HASJIT && !(LJ_TARGET_ARM || LJ_TARGET_ARM64 || LJ_TARGET_PPC)) || LJ_TARGET_MIPS ++#if (LJ_HASJIT && !(LJ_TARGET_ARM || LJ_TARGET_ARM64 || LJ_TARGET_PPC)) || LJ_TARGET_MIPS \ ++ || LJ_TARGET_RISCV64 + int32_t LJ_FASTCALL lj_vm_modi(int32_t a, int32_t b) + { + uint32_t y, ua, ub; +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index f8f338ce89..c86f94bddb 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -438,9 +438,11 @@ + | auipc CFUNCADDR, extern %pcrel_hi(func) + | jalr CFUNCADDR, extern %pcrel_lo(lj_ .. curfunc .. _pcrel_ .. func) + |.endmacro +-|.macro call_extern, func +-| call extern func +-| empty ++|.macro call_extern, curfunc, func ++|->curfunc .. _got_pcrel_ .. func: ++| auipc CFUNCADDR, extern %got_pcrel_hi(func) ++| ld CFUNCADDR, extern %pcrel_lo(lj_ .. curfunc .. _got_pcrel_ .. func)(CFUNCADDR) ++| jalr CFUNCADDR + |.endmacro + | + |// Set current VM state. Uses TMP0. +@@ -516,3 +518,3579 @@ + |.endmacro + | + |//----------------------------------------------------------------------- ++ ++/* Generate subroutines used by opcodes and other parts of the VM. */ ++/* The .code_sub section should be last to help static branch prediction. */ ++static void build_subroutines(BuildCtx *ctx) ++{ ++ |.code_sub ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Return handling ---------------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |->vm_returnp: ++ | // See vm_return. Also: TMP2 = previous base. ++ | andi TMP0, PC, FRAME_P ++ | ++ | // Return from pcall or xpcall fast func. ++ | mov_true TMP1 ++ | bxeqz TMP0, ->cont_dispatch ++ | ld PC, FRAME_PC(TMP2) // Fetch PC of previous frame. ++ | mv BASE, TMP2 // Restore caller base. ++ | // Prepending may overwrite the pcall frame, so do it at the end. ++ | sd TMP1, -8(RA) // Prepend true to results. ++ | addi RA, RA, -8 ++ | ++ |->vm_returnc: ++ | addiw RD, RD, 8 // RD = (nresults+1)*8. ++ | andi TMP0, PC, FRAME_TYPE ++ | li CRET1, LUA_YIELD ++ | bxeqz RD, ->vm_unwind_c_eh ++ | mv MULTRES, RD ++ | bxeqz TMP0, ->BC_RET_Z // Handle regular return to Lua. ++ | ++ |->vm_return: ++ | // BASE = base, RA = resultptr, RD/MULTRES = (nresults+1)*8, PC = return ++ | // TMP0 = PC & FRAME_TYPE ++ | andi TMP2, PC, ~FRAME_TYPEP ++ | xori TMP0, TMP0, FRAME_C ++ | sub TMP2, BASE, TMP2 // TMP2 = previous base. ++ | bxnez TMP0, ->vm_returnp ++ | ++ | addiw TMP1, RD, -8 ++ | sd TMP2, L->base ++ | li_vmstate C ++ | lw TMP2, SAVE_NRES(sp) ++ | addi BASE, BASE, -16 ++ | st_vmstate ++ | slliw TMP2, TMP2, 3 ++ | beqz TMP1, >2 ++ |1: ++ | addiw TMP1, TMP1, -8 ++ | ld CRET1, 0(RA) ++ | addi RA, RA, 8 ++ | sd CRET1, 0(BASE) ++ | addi BASE, BASE, 8 ++ | bnez TMP1, <1 ++ | ++ |2: ++ | bne TMP2, RD, >6 ++ |3: ++ | sd BASE, L->top // Store new top. ++ | ++ |->vm_leave_cp: ++ | ld TMP0, SAVE_CFRAME(sp) // Restore previous C frame. ++ | mv CRET1, x0 // Ok return status for vm_pcall. ++ | sd TMP0, L->cframe ++ | ++ |->vm_leave_unw: ++ | restoreregs_ret ++ | ++ |6: ++ | ld TMP1, L->maxstack ++ | blt TMP2, RD, >7 ++ | // More results wanted. Check stack size and fill up results with nil. ++ | bge BASE, TMP1, >9 ++ | sd TISNIL, 0(BASE) ++ | addiw RD, RD, 8 ++ | addi BASE, BASE, 8 ++ | j <2 ++ | ++ |7: // Less results wanted. ++ | subw TMP0, RD, TMP2 ++ | sub TMP0, BASE, TMP0 // Either keep top or shrink it. ++ | beqz TMP2, >8 ++ | mv BASE, TMP0 // LUA_MULTRET+1 case ++ |8: ++ | j <3 ++ | ++ |9: // Corner case: need to grow stack for filling up results. ++ | // This can happen if: ++ | // - A C function grows the stack (a lot). ++ | // - The GC shrinks the stack in between. ++ | // - A return back from a lua_call() with (high) nresults adjustment. ++ | ++ | sd BASE, L->top // Save current top held in BASE (yes). ++ | mv MULTRES, RD ++ | srliw CARG2, TMP2, 3 ++ | mv CARG1, L ++ | call_intern vm_leave_unw, lj_state_growstack // (lua_State *L, int n) ++ | lw TMP2, SAVE_NRES(sp) ++ | ld BASE, L->top // Need the (realloced) L->top in BASE. ++ | mv RD, MULTRES ++ | slliw TMP2, TMP2, 3 ++ | j <2 ++ | ++ |->vm_unwind_c: // Unwind C stack, return from vm_pcall. ++ | // (void *cframe, int errcode) ++ | mv sp, CARG1 ++ | mv CRET1, CARG2 ++ |->vm_unwind_c_eh: // Landing pad for external unwinder. ++ | ld L, SAVE_L(sp) ++ | li TMP0, ~LJ_VMST_C ++ | ld GL, L->glref ++ | sw TMP0, GL->vmstate ++ | j ->vm_leave_unw ++ | ++ |->vm_unwind_ff: // Unwind C stack, return from ff pcall. ++ | // (void *cframe) ++ | andi sp, CARG1, CFRAME_RAWMASK ++ |->vm_unwind_ff_eh: // Landing pad for external unwinder. ++ | ld L, SAVE_L(sp) ++ | lui TMP3, 0x43380 // TOBIT = Hiword of 2^52 + 2^51 (double). ++ | li TISNIL, LJ_TNIL ++ | li TISNUM, LJ_TISNUM ++ | ld BASE, L->base ++ | ld GL, L->glref // Setup pointer to global state. ++ | slli TMP3, TMP3, 32 ++ | mov_false TMP1 ++ | li_vmstate INTERP ++ | ld PC, FRAME_PC(BASE) // Fetch PC of previous frame. ++ | fmv.d.x TOBIT, TMP3 ++ | addi RA, BASE, -8 // Results start at BASE-8. ++ | addxi DISPATCH, GL, GG_G2DISP ++ | sd TMP1, -8(BASE) // Prepend false to error message. ++ | st_vmstate ++ | li RD, 16 // 2 results: false + error message. ++ | j ->vm_returnc ++ | ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Grow stack for calls ----------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |->vm_growstack_c: // Grow stack for C function. ++ | li CARG2, LUA_MINSTACK ++ | j >2 ++ | ++ |->vm_growstack_l: // Grow stack for Lua function. ++ | // BASE = new base, RA = BASE+framesize*8, RC = nargs*8, PC = first PC ++ | add RC, BASE, RC ++ | sub RA, RA, BASE ++ | sd BASE, L->base ++ | addi PC, PC, 4 // Must point after first instruction. ++ | sd RC, L->top ++ | srliw CARG2, RA, 3 ++ |2: ++ | // L->base = new base, L->top = top ++ | sd PC, SAVE_PC(sp) ++ | mv CARG1, L ++ | call_intern vm_growstack_l, lj_state_growstack // (lua_State *L, int n) ++ | ld BASE, L->base ++ | ld RC, L->top ++ | ld LFUNC:RB, FRAME_FUNC(BASE) ++ | sub RC, RC, BASE ++ | cleartp LFUNC:RB ++ | // BASE = new base, RB = LFUNC/CFUNC, RC = nargs*8, FRAME_PC(BASE) = PC ++ | ins_callt // Just retry the call. ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Entry points into the assembler VM --------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |->vm_resume: // Setup C frame and resume thread. ++ | // (lua_State *L, TValue *base, int nres1 = 0, ptrdiff_t ef = 0) ++ | saveregs ++ | mv L, CARG1 ++ | ld GL, L->glref // Setup pointer to global state. ++ | mv BASE, CARG2 ++ | lbu TMP1, L->status ++ | sd L, SAVE_L(sp) ++ | li PC, FRAME_CP ++ | addi TMP0, sp, CFRAME_RESUME ++ | addxi DISPATCH, GL, GG_G2DISP ++ | sw x0, SAVE_NRES(sp) ++ | sw x0, SAVE_ERRF(sp) ++ | sd CARG1, SAVE_PC(sp) // Any value outside of bytecode is ok. ++ | sd x0, SAVE_CFRAME(sp) ++ | sd TMP0, L->cframe ++ | beqz TMP1, >3 ++ | ++ | // Resume after yield (like a return). ++ | sd L, GL->cur_L ++ | mv RA, BASE ++ | ld BASE, L->base ++ | ld TMP1, L->top ++ | ld PC, FRAME_PC(BASE) ++ | lui TMP3, 0x43380 // TOBIT = Hiword of 2^52 + 2^51 (double). ++ | sub RD, TMP1, BASE ++ | slli TMP3, TMP3, 32 ++ | sb x0, L->status ++ | fmv.d.x TOBIT, TMP3 ++ | li_vmstate INTERP ++ | addi RD, RD, 8 ++ | st_vmstate ++ | mv MULTRES, RD ++ | andi TMP0, PC, FRAME_TYPE ++ | li TISNIL, LJ_TNIL ++ | li TISNUM, LJ_TISNUM ++ | bxeqz TMP0, ->BC_RET_Z ++ | j ->vm_return ++ | ++ |->vm_pcall: // Setup protected C frame and enter VM. ++ | // (lua_State *L, TValue *base, int nres1, ptrdiff_t ef) ++ | saveregs ++ | sw CARG4, SAVE_ERRF(sp) ++ | li PC, FRAME_CP ++ | j >1 ++ | ++ |->vm_call: // Setup C frame and enter VM. ++ | // (lua_State *L, TValue *base, int nres1) ++ | saveregs ++ | li PC, FRAME_C ++ | ++ |1: // Entry point for vm_pcall above (PC = ftype). ++ | ld TMP1, L:CARG1->cframe ++ | mv L, CARG1 ++ | sw CARG3, SAVE_NRES(sp) ++ | ld GL, L->glref // Setup pointer to global state. ++ | sd CARG1, SAVE_L(sp) ++ | mv BASE, CARG2 ++ | addxi DISPATCH, GL, GG_G2DISP ++ | sd CARG1, SAVE_PC(sp) // Any value outside of bytecode is ok. ++ | sd TMP1, SAVE_CFRAME(sp) ++ | sd sp, L->cframe // Add our C frame to cframe chain. ++ | ++ |3: // Entry point for vm_cpcall/vm_resume (BASE = base, PC = ftype). ++ | sd L, GL->cur_L ++ | ld TMP2, L->base // TMP2 = old base (used in vmeta_call). ++ | lui TMP3, 0x43380 // TOBIT = Hiword of 2^52 + 2^51 (double). ++ | ld TMP1, L->top ++ | slli TMP3, TMP3, 32 ++ | add PC, PC, BASE ++ | sub NARGS8:RC, TMP1, BASE ++ | li TISNUM, LJ_TISNUM ++ | sub PC, PC, TMP2 // PC = frame delta + frame type ++ | fmv.d.x TOBIT, TMP3 ++ | li_vmstate INTERP ++ | li TISNIL, LJ_TNIL ++ | st_vmstate ++ | ++ |->vm_call_dispatch: ++ | // TMP2 = old base, BASE = new base, RC = nargs*8, PC = caller PC ++ | ld LFUNC:RB, FRAME_FUNC(BASE) ++ | checkfunc LFUNC:RB, ->vmeta_call ++ | ++ |->vm_call_dispatch_f: ++ | ins_call ++ | // BASE = new base, RB = func, RC = nargs*8, PC = caller PC ++ | ++ |->vm_cpcall: // Setup protected C frame, call C. ++ | // (lua_State *L, lua_CFunction func, void *ud, lua_CPFunction cp) ++ | saveregs ++ | mv L, CARG1 ++ | ld TMP0, L:CARG1->stack ++ | sd CARG1, SAVE_L(sp) ++ | ld TMP1, L->top ++ | ld GL, L->glref // Setup pointer to global state. ++ | sd CARG1, SAVE_PC(sp) // Any value outside of bytecode is ok. ++ | sub TMP0, TMP0, TMP1 // Compute -savestack(L, L->top). ++ | ld TMP1, L->cframe ++ | addxi DISPATCH, GL, GG_G2DISP ++ | sw TMP0, SAVE_NRES(sp) // Neg. delta means cframe w/o frame. ++ | sw x0, SAVE_ERRF(sp) // No error function. ++ | sd TMP1, SAVE_CFRAME(sp) ++ | sd sp, L->cframe // Add our C frame to cframe chain. ++ | sd L, GL->cur_L ++ | jalr CARG4 // (lua_State *L, lua_CFunction func, void *ud) ++ | mv BASE, CRET1 ++ | li PC, FRAME_CP ++ | bnez CRET1, <3 // Else continue with the call. ++ | j ->vm_leave_cp // No base? Just remove C frame. ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Metamethod handling ------------------------------------------------ ++ |//----------------------------------------------------------------------- ++ | ++ |//-- Continuation dispatch ---------------------------------------------- ++ | ++ |->cont_dispatch: ++ | // BASE = meta base, RA = resultptr, RD = (nresults+1)*8 ++ | ld TMP0, -32(BASE) // Continuation. ++ | mv RB, BASE ++ | mv BASE, TMP2 // Restore caller BASE. ++ | ld LFUNC:TMP1, FRAME_FUNC(TMP2) ++ | ld PC, -24(RB) // Restore PC from [cont|PC]. ++ | cleartp LFUNC:TMP1 ++ | add TMP2, RA, RD ++ | ld TMP1, LFUNC:TMP1->pc ++ | sd TISNIL, -8(TMP2) // Ensure one valid arg. ++ | // BASE = base, RA = resultptr, RB = meta base ++ | ld KBASE, PC2PROTO(k)(TMP1) ++ | jr TMP0 // Jump to continuation. ++ | ++ |->cont_cat: // RA = resultptr, RB = meta base ++ | lw INS, -4(PC) ++ | addi CARG2, RB, -32 ++ | ld TMP0, 0(RA) ++ | decode_RB8 MULTRES, INS ++ | decode_RA8 RA, INS ++ | add TMP1, BASE, MULTRES ++ | sd BASE, L->base ++ | sub CARG3, CARG2, TMP1 ++ | sd TMP0, 0(CARG2) ++ | bxne TMP1, CARG2, ->BC_CAT_Z ++ | add RA, BASE, RA ++ | sd TMP0, 0(RA) ++ | j ->cont_nop ++ | ++ |//-- Table indexing metamethods ----------------------------------------- ++ | ++ |->vmeta_tgets1: ++ | addi CARG3, GL, offsetof(global_State, tmptv) ++ | li TMP0, LJ_TSTR ++ | settp STR:RC, TMP0 ++ | sd STR:RC, 0(CARG3) ++ | j >1 ++ | ++ |->vmeta_tgets: ++ | addi CARG2, GL, offsetof(global_State, tmptv) ++ | addi CARG3, GL, offsetof(global_State, tmptv2) ++ | li TMP0, LJ_TTAB ++ | li TMP1, LJ_TSTR ++ | settp TAB:RB, TMP0 ++ | settp STR:RC, TMP1 ++ | sd TAB:RB, 0(CARG2) ++ | sd STR:RC, 0(CARG3) ++ | j >1 ++ | ++ |->vmeta_tgetb: // TMP0 = index ++ | addi CARG3, GL, offsetof(global_State, tmptv) ++ | settp TMP0, TISNUM ++ | sd TMP0, 0(CARG3) ++ | ++ |->vmeta_tgetv: ++ |1: ++ | sd BASE, L->base ++ | mv CARG1, L ++ | sd PC, SAVE_PC(sp) ++ | // (lua_State *L, TValue *o, TValue *k) ++ | call_intern vmeta_tgetv, lj_meta_tget ++ | // Returns TValue * (finished) or NULL (metamethod). ++ | beqz CRET1, >3 ++ | ld TMP0, 0(CRET1) ++ | ins_next1 ++ | sd TMP0, 0(RA) ++ | ins_next2 ++ | ++ |3: // Call __index metamethod. ++ | // BASE = base, L->top = new base, stack = cont/func/t/k ++ | addi TMP1, BASE, -FRAME_CONT ++ | li NARGS8:RC, 16 // 2 args for func(t, k). ++ | ld BASE, L->top ++ | sd PC, -24(BASE) // [cont|PC] ++ | sub PC, BASE, TMP1 ++ | ld LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. ++ | cleartp LFUNC:RB ++ | j ->vm_call_dispatch_f ++ | ++ |->vmeta_tgetr: ++ | call_intern vmeta_tgetr, lj_tab_getinth // (GCtab *t, int32_t key) ++ | // Returns cTValue * or NULL. ++ | mv TMP1, TISNIL ++ | bxeqz CRET1, ->BC_TGETR_Z ++ | ld TMP1, 0(CRET1) ++ | j ->BC_TGETR_Z ++ | ++ |//----------------------------------------------------------------------- ++ | ++ |->vmeta_tsets1: ++ | addi, CARG3, GL, offsetof(global_State, tmptv) ++ | li TMP0, LJ_TSTR ++ | settp STR:RC, TMP0 ++ | sd STR:RC, 0(CARG3) ++ | j >1 ++ | ++ |->vmeta_tsets: ++ | addi CARG2, GL, offsetof(global_State, tmptv) ++ | addi CARG3, GL, offsetof(global_State, tmptv2) ++ | li TMP0, LJ_TTAB ++ | li TMP1, LJ_TSTR ++ | settp TAB:RB, TMP0 ++ | settp STR:RC, TMP1 ++ | sd TAB:RB, 0(CARG2) ++ | sd STR:RC, 0(CARG3) ++ | j >1 ++ | ++ |->vmeta_tsetb: // TMP0 = index ++ | addi CARG3, GL, offsetof(global_State, tmptv) ++ | settp TMP0, TISNUM ++ | sd TMP0, 0(CARG3) ++ | ++ |->vmeta_tsetv: ++ |1: ++ | sd BASE, L->base ++ | mv CARG1, L ++ | sd PC, SAVE_PC(sp) ++ | // (lua_State *L, TValue *o, TValue *k) ++ | call_intern vmeta_tsetv, lj_meta_tset ++ | // Returns TValue * (finished) or NULL (metamethod). ++ | ld TMP2, 0(RA) ++ | beqz CRET1, >3 ++ | ins_next1 ++ | // NOBARRIER: lj_meta_tset ensures the table is not black. ++ | sd TMP2, 0(CRET1) ++ | ins_next2 ++ | ++ |3: // Call __newindex metamethod. ++ | // BASE = base, L->top = new base, stack = cont/func/t/k/(v) ++ | addi TMP1, BASE, -FRAME_CONT ++ | ld BASE, L->top ++ | sd PC, -24(BASE) // [cont|PC] ++ | sub PC, BASE, TMP1 ++ | ld LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. ++ | li NARGS8:RC, 24 // 3 args for func(t, k, v) ++ | cleartp LFUNC:RB ++ | sd TMP2, 16(BASE) // Copy value to third argument. ++ | j ->vm_call_dispatch_f ++ | ++ |->vmeta_tsetr: ++ | sd BASE, L->base ++ | mv CARG1, L ++ | sd PC, SAVE_PC(sp) ++ | // (lua_State *L, GCtab *t, int32_t key) ++ | call_intern vmeta_tsetr, lj_tab_setinth ++ | // Returns TValue *. ++ | j ->BC_TSETR_Z ++ | ++ |//-- Comparison metamethods --------------------------------------------- ++ | ++ |->vmeta_comp: ++ | // RA/RD point to o1/o2. ++ | mv CARG2, RA ++ | mv CARG3, RD ++ | addi PC, PC, -4 ++ | sd BASE, L->base ++ | mv CARG1, L ++ | decode_OP1 CARG4, INS ++ | sd PC, SAVE_PC(sp) ++ | // (lua_State *L, TValue *o1, *o2, int op) ++ | call_intern vmeta_comp, lj_meta_comp ++ | // Returns 0/1 or TValue * (metamethod). ++ |3: ++ | sltiu TMP1, CRET1, 2 ++ | bxeqz TMP1, ->vmeta_binop ++ | negw TMP2, CRET1 ++ |4: ++ | lhu RD, OFS_RD(PC) ++ | addi PC, PC, 4 ++ | lui TMP1, (-(BCBIAS_J*4 >> 12)) & 0xfffff ++ | slliw RD, RD, 2 ++ | addw RD, RD, TMP1 ++ | and RD, RD, TMP2 ++ | add PC, PC, RD ++ |->cont_nop: ++ | ins_next ++ | ++ |->cont_ra: // RA = resultptr ++ | lbu TMP1, -4+OFS_RA(PC) ++ | ld TMP2, 0(RA) ++ | slliw TMP1, TMP1, 3 ++ | add TMP1, BASE, TMP1 ++ | sd TMP2, 0(TMP1) ++ | j ->cont_nop ++ | ++ |->cont_condt: // RA = resultptr ++ | ld TMP0, 0(RA) ++ | gettp TMP0, TMP0 ++ | sltiu TMP1, TMP0, LJ_TISTRUECOND ++ | negw TMP2, TMP1 // Branch if result is true. ++ | j <4 ++ | ++ |->cont_condf: // RA = resultptr ++ | ld TMP0, 0(RA) ++ | gettp TMP0, TMP0 ++ | sltiu TMP1, TMP0, LJ_TISTRUECOND ++ | addiw TMP2, TMP1, -1 // Branch if result is false. ++ | j <4 ++ | ++ |->vmeta_equal: ++ | // CARG1/CARG2 point to o1/o2. TMP0 is set to 0/1. ++ | cleartp LFUNC:CARG3, CARG2 ++ | cleartp LFUNC:CARG2, CARG1 ++ | mv CARG4, TMP0 ++ | addi PC, PC, -4 ++ | sd BASE, L->base ++ | mv CARG1, L ++ | sd PC, SAVE_PC(sp) ++ | // (lua_State *L, GCobj *o1, *o2, int ne) ++ | call_intern vmeta_equal, lj_meta_equal ++ | // Returns 0/1 or TValue * (metamethod). ++ | j <3 ++ | ++ |->vmeta_istype: ++ | addi PC, PC, -4 ++ | sd BASE, L->base ++ | mv CARG1, L ++ | srliw CARG2, RA, 3 ++ | srliw CARG3, RD, 3 ++ | sd PC, SAVE_PC(sp) ++ | // (lua_State *L, TValue *o, BCReg tp) ++ | call_intern vmeta_istype, lj_meta_istype ++ | j ->cont_nop ++ | ++ |//-- Arithmetic metamethods --------------------------------------------- ++ | ++ |->vmeta_unm: ++ | mv RC, RB ++ | ++ |->vmeta_arith: ++ | mv CARG1, L ++ | sd BASE, L->base ++ | mv CARG2, RA ++ | sd PC, SAVE_PC(sp) ++ | mv CARG3, RB ++ | mv CARG4, RC ++ | decode_OP1 CARG5, INS ++ | // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) ++ | call_intern vmeta_arith, lj_meta_arith ++ | // Returns NULL (finished) or TValue * (metamethod). ++ | bxeqz CRET1, ->cont_nop ++ | ++ | // Call metamethod for binary op. ++ |->vmeta_binop: ++ | // BASE = old base, CRET1 = new base, stack = cont/func/o1/o2 ++ | sub TMP1, CRET1, BASE ++ | sd PC, -24(CRET1) // [cont|PC] ++ | mv TMP2, BASE ++ | addi PC, TMP1, FRAME_CONT ++ | mv BASE, CRET1 ++ | li NARGS8:RC, 16 // 2 args for func(o1, o2). ++ | j ->vm_call_dispatch ++ | ++ |->vmeta_len: ++ | // CARG2 already set by BC_LEN. ++#if LJ_52 ++ | mv MULTRES, CARG1 ++#endif ++ | sd BASE, L->base ++ | mv CARG1, L ++ | sd PC, SAVE_PC(sp) ++ | call_intern vmeta_len, lj_meta_len // (lua_State *L, TValue *o) ++ | // Returns NULL (retry) or TValue * (metamethod base). ++#if LJ_52 ++ | bxnez CRET1, ->vmeta_binop // Binop call for compatibility. ++ | mv CARG1, MULTRES ++ | j ->BC_LEN_Z ++#else ++ | j ->vmeta_binop // Binop call for compatibility. ++#endif ++ | ++ |//-- Call metamethod ---------------------------------------------------- ++ | ++ |->vmeta_call: // Resolve and call __call metamethod. ++ | // TMP2 = old base, BASE = new base, RC = nargs*8 ++ | mv CARG1, L ++ | sd TMP2, L->base // This is the callers base! ++ | addi CARG2, BASE, -16 ++ | sd PC, SAVE_PC(sp) ++ | add CARG3, BASE, RC ++ | mv MULTRES, NARGS8:RC ++ | // (lua_State *L, TValue *func, TValue *top) ++ | call_intern vmeta_call, lj_meta_call ++ | ld LFUNC:RB, FRAME_FUNC(BASE) // Guaranteed to be a function here. ++ | addi NARGS8:RC, MULTRES, 8 // Got one more argument now. ++ | cleartp LFUNC:RB ++ | ins_call ++ | ++ |->vmeta_callt: // Resolve __call for BC_CALLT. ++ | // BASE = old base, RA = new base, RC = nargs*8 ++ | mv CARG1, L ++ | sd BASE, L->base ++ | addi CARG2, RA, -16 ++ | sd PC, SAVE_PC(sp) ++ | add CARG3, RA, RC ++ | mv MULTRES, NARGS8:RC ++ | // (lua_State *L, TValue *func, TValue *top) ++ | call_intern vmeta_callt, lj_meta_call ++ | ld RB, FRAME_FUNC(RA) // Guaranteed to be a function here. ++ | ld TMP1, FRAME_PC(BASE) ++ | addi NARGS8:RC, MULTRES, 8 // Got one more argument now. ++ | cleartp LFUNC:CARG3, RB ++ | j ->BC_CALLT_Z ++ | ++ |//-- Argument coercion for 'for' statement ------------------------------ ++ | ++ |->vmeta_for: ++ | mv CARG1, L ++ | sd BASE, L->base ++ | mv CARG2, RA ++ | sd PC, SAVE_PC(sp) ++ | mv MULTRES, INS ++ | call_intern vmeta_for, lj_meta_for // (lua_State *L, TValue *base) ++ | decode_RA8 RA, MULTRES ++ | decode_RD8 RD, MULTRES ++ | j =>BC_FORI ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Fast functions ----------------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |.macro .ffunc, name ++ |->ff_ .. name: ++ |.endmacro ++ | ++ |.macro .ffunc_1, name ++ |->ff_ .. name: ++ | ld CARG1, 0(BASE) ++ | bxeqz NARGS8:RC, ->fff_fallback ++ |.endmacro ++ | ++ |.macro .ffunc_2, name ++ |->ff_ .. name: ++ | sltiu TMP0, NARGS8:RC, 16 ++ | ld CARG1, 0(BASE) ++ | ld CARG2, 8(BASE) ++ | bxnez TMP0, ->fff_fallback ++ |.endmacro ++ | ++ |.macro .ffunc_n, name ++ |->ff_ .. name: ++ | ld CARG1, 0(BASE) ++ | fld FARG1, 0(BASE) ++ | bxeqz NARGS8:RC, ->fff_fallback ++ | checknum CARG1, ->fff_fallback ++ |.endmacro ++ | ++ |.macro .ffunc_nn, name ++ |->ff_ .. name: ++ | ld CARG1, 0(BASE) ++ | sltiu TMP0, NARGS8:RC, 16 ++ | ld CARG2, 8(BASE) ++ | bxnez TMP0, ->fff_fallback ++ | gettp TMP1, CARG1 ++ | gettp TMP2, CARG2 ++ | sltiu TMP1, TMP1, LJ_TISNUM ++ | sltiu TMP2, TMP2, LJ_TISNUM ++ | fld FARG1, 0(BASE) ++ | and TMP1, TMP1, TMP2 ++ | fld FARG2, 8(BASE) ++ | bxeqz TMP1, ->fff_fallback ++ |.endmacro ++ | ++ |// Inlined GC threshold check. ++ |.macro ffgccheck ++ | ld TMP0, GL->gc.total ++ | ld TMP1, GL->gc.threshold ++ | bltu TMP0, TMP1, >1 ++ | jal ->fff_gcstep ++ |1: ++ |.endmacro ++ | ++ |//-- Base library: checks ----------------------------------------------- ++ |.ffunc_1 assert ++ | gettp TMP1, CARG1 ++ | sltiu TMP1, TMP1, LJ_TISTRUECOND ++ | addi RA, BASE, -16 ++ | bxeqz TMP1, ->fff_fallback ++ | ld PC, FRAME_PC(BASE) ++ | addiw RD, NARGS8:RC, 8 // Compute (nresults+1)*8. ++ | addi TMP1, BASE, 8 ++ | add TMP2, RA, RD ++ | sd CARG1, -16(BASE) ++ | bne BASE, TMP2, >1 ++ | j ->fff_res // Done if exactly 1 argument. ++ |1: ++ | ld TMP0, 0(TMP1) ++ | sd TMP0, -16(TMP1) ++ | mv TMP3, TMP1 ++ | addi TMP1, TMP1, 8 ++ | bne TMP3, TMP2, <1 ++ | j ->fff_res ++ | ++ |.ffunc_1 type ++ | gettp TMP0, CARG1 ++ | not TMP3, TMP0 ++ | bltu TISNUM, TMP0, >1 ++ | li TMP3, ~LJ_TISNUM ++ |1: ++ | slli TMP3, TMP3, 3 ++ | add TMP3, CFUNC:RB, TMP3 ++ | ld CARG1, CFUNC:TMP3->upvalue ++ | j ->fff_restv ++ | ++ |//-- Base library: getters and setters --------------------------------- ++ | ++ |.ffunc_1 getmetatable ++ | gettp TMP2, CARG1 ++ | addi TMP0, TMP2, -LJ_TTAB ++ | addi TMP1, TMP2, -LJ_TUDATA ++ | snez TMP0, TMP0 ++ | neg TMP0, TMP0 ++ | and TMP0, TMP0, TMP1 ++ | cleartp TAB:CARG1 ++ | bnez TMP0, >6 ++ |1: // Field metatable must be at same offset for GCtab and GCudata! ++ | ld TAB:RB, TAB:CARG1->metatable ++ |2: ++ | ld STR:RC, GL->gcroot[GCROOT_MMNAME+MM_metatable] ++ | li CARG1, LJ_TNIL ++ | bxeqz TAB:RB, ->fff_restv ++ | lw TMP0, TAB:RB->hmask ++ | lw TMP1, STR:RC->sid ++ | ld NODE:TMP2, TAB:RB->node ++ | and TMP1, TMP1, TMP0 // idx = str->sid & tab->hmask ++ | slli TMP0, TMP1, 5 ++ | slli TMP1, TMP1, 3 ++ | sub TMP1, TMP0, TMP1 ++ | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) ++ | li CARG4, LJ_TSTR ++ | settp STR:RC, CARG4 // Tagged key to look for. ++ |3: // Rearranged logic, because we expect _not_ to find the key. ++ | ld TMP0, NODE:TMP2->key ++ | ld CARG1, NODE:TMP2->val ++ | ld NODE:TMP2, NODE:TMP2->next ++ | li TMP3, LJ_TTAB ++ | beq RC, TMP0, >5 ++ | bnez NODE:TMP2, <3 ++ |4: ++ | settp CARG1, RB, TMP3 ++ | j ->fff_restv // Not found, keep default result. ++ |5: ++ | bxne CARG1, TISNIL, ->fff_restv ++ | j <4 // Ditto for nil value. ++ | ++ |6: ++ | sltiu TMP3, TMP2, LJ_TISNUM ++ | neg TMP4, TMP3 ++ | xor TMP0, TMP2, TISNUM // TMP2 = TMP3 ? TISNUM : TMP2 ++ | and TMP0, TMP0, TMP4 ++ | xor TMP2, TMP0, TMP2 ++ | slli TMP2, TMP2, 3 ++ | sub TMP0, GL, TMP2 ++ | ld TAB:RB, (offsetof(global_State, gcroot[GCROOT_BASEMT])-8)(TMP0) ++ | j <2 ++ | ++ |.ffunc_2 setmetatable ++ | // Fast path: no mt for table yet and not clearing the mt. ++ | checktp TMP1, CARG1, -LJ_TTAB, ->fff_fallback ++ | gettp TMP3, CARG2 ++ | ld TAB:TMP0, TAB:TMP1->metatable ++ | lbu TMP2, TAB:TMP1->marked ++ | addi TMP3, TMP3, -LJ_TTAB ++ | cleartp TAB:CARG2 ++ | or TMP3, TMP3, TAB:TMP0 ++ | bxnez TMP3, ->fff_fallback ++ | andi TMP3, TMP2, LJ_GC_BLACK // isblack(table) ++ | sd TAB:CARG2, TAB:TMP1->metatable ++ | bxeqz TMP3, ->fff_restv ++ | barrierback TAB:TMP1, TMP2, TMP0, ->fff_restv ++ | ++ |.ffunc rawget ++ | ld CARG2, 0(BASE) ++ | sltiu TMP0, NARGS8:RC, 16 ++ | gettp TMP1, CARG2 ++ | cleartp CARG2 ++ | addi TMP1, TMP1, -LJ_TTAB ++ | or TMP0, TMP0, TMP1 ++ | addi CARG3, BASE, 8 ++ | bxnez TMP0, ->fff_fallback ++ | mv CARG1, L ++ | call_intern ff_rawget, lj_tab_get // (lua_State *L, GCtab *t, cTValue *key) ++ | // Returns cTValue *. ++ | ld CARG1, 0(CRET1) ++ | j ->fff_restv ++ | ++ |//-- Base library: conversions ------------------------------------------ ++ | ++ |.ffunc tonumber ++ | // Only handles the number case inline (without a base argument). ++ | ld CARG1, 0(BASE) ++ | xori TMP0, NARGS8:RC, 8 // Exactly one number argument. ++ | gettp TMP1, CARG1 ++ | sltu TMP1, TISNUM, TMP1 ++ | or TMP0, TMP0, TMP1 ++ | bxnez TMP0, ->fff_fallback // No args or CARG1 is not number ++ | j ->fff_restv ++ | ++ |.ffunc_1 tostring ++ | // Only handles the string or number case inline. ++ | gettp TMP0, CARG1 ++ | addi TMP1, TMP0, -LJ_TSTR ++ | // A __tostring method in the string base metatable is ignored. ++ | bxeqz TMP1, ->fff_restv // String key? ++ | // Handle numbers inline, unless a number base metatable is present. ++ | ld TMP1, GL->gcroot[GCROOT_BASEMT_NUM] ++ | sltu TMP0, TISNUM, TMP0 ++ | sd BASE, L->base // Add frame since C call can throw. ++ | or TMP0, TMP0, TMP1 ++ | bxnez TMP0, ->fff_fallback ++ | sd PC, SAVE_PC(sp) // Redundant (but a defined value). ++ | ffgccheck ++ | mv CARG1, L ++ | mv CARG2, BASE ++ | call_intern ff_tostring, lj_strfmt_number // (lua_State *L, cTValue *o) ++ | // Returns GCstr *. ++ | li TMP1, LJ_TSTR ++ | ld BASE, L->base ++ | settp CARG1, TMP1 ++ | j ->fff_restv ++ | ++ |//-- Base library: iterators ------------------------------------------- ++ | ++ |.ffunc_1 next ++ | checktp CARG1, -LJ_TTAB, ->fff_fallback ++ | add TMP0, BASE, NARGS8:RC ++ | ld PC, FRAME_PC(BASE) ++ | sd TISNIL, 0(TMP0) // Set missing 2nd arg to nil. ++ | addi CARG2, BASE, 8 ++ | addi CARG3, BASE, -16 ++ | call_intern ff_next, lj_tab_next // (GCtab *t, cTValue *key, TValue *o) ++ | // Returns 1=found, 0=end, -1=error. ++ | li RD, (2+1)*8 ++ | bxgtz CRET1, ->fff_res // Found key/value. ++ | mv TMP1, CRET1 ++ | mv CARG1, TISNIL ++ | bxeqz TMP1, ->fff_restv // End of traversal: return nil. ++ | ld CFUNC:RB, FRAME_FUNC(BASE) ++ | li RC, 2*8 ++ | cleartp CFUNC:RB ++ | j ->fff_fallback // Invalid key. ++ | ++ |.ffunc_1 pairs ++ | checktp TAB:TMP1, CARG1, -LJ_TTAB, ->fff_fallback ++ | ld PC, FRAME_PC(BASE) ++#if LJ_52 ++ | ld TAB:TMP2, TAB:TMP1->metatable ++ | ld TMP0, CFUNC:RB->upvalue[0] ++ | bxnez TAB:TMP2, ->fff_fallback ++#else ++ | ld TMP0, CFUNC:RB->upvalue[0] ++#endif ++ | sd TISNIL, 0(BASE) ++ | sd CARG1, -8(BASE) ++ | sd TMP0, -16(BASE) ++ | li RD, (3+1)*8 ++ | j ->fff_res ++ | ++ |.ffunc_2 ipairs_aux ++ | checktab CARG1, ->fff_fallback ++ | checkint CARG2, ->fff_fallback ++ | lw TMP0, TAB:CARG1->asize ++ | ld TMP1, TAB:CARG1->array ++ | ld PC, FRAME_PC(BASE) ++ | sext.w TMP2, CARG2 ++ | addiw TMP2, TMP2, 1 ++ | sltu TMP3, TMP2, TMP0 ++ | zext.w TMP0, TMP2 ++ | settp_b TMP0, TISNUM ++ | sd TMP0, -16(BASE) ++ | beqz TMP3, >2 // Not in array part? ++ | slli TMP3, TMP2, 3 ++ | add TMP3, TMP1, TMP3 ++ | ld TMP1, 0(TMP3) ++ |1: ++ | li RD, (0+1)*8 ++ | bxeq TMP1, TISNIL, ->fff_res // End of iteration, return 0 results. ++ | sd TMP1, -8(BASE) ++ | li RD, (2+1)*8 ++ | j ->fff_res ++ |2: // Check for empty hash part first. Otherwise call C function. ++ | lw TMP0, TAB:CARG1->hmask ++ | li RD, (0+1)*8 ++ | bxeqz TMP0, ->fff_res ++ | mv CARG2, TMP2 ++ | call_intern ff_ipairs_aux, lj_tab_getinth // (GCtab *t, int32_t key) ++ | // Returns cTValue * or NULL. ++ | li RD, (0+1)*8 ++ | bxeqz CRET1, ->fff_res ++ | ld TMP1, 0(CRET1) ++ | j <1 ++ | ++ |.ffunc_1 ipairs ++ | checktp TAB:TMP1, CARG1, -LJ_TTAB, ->fff_fallback ++ | ld PC, FRAME_PC(BASE) ++#if LJ_52 ++ | ld TAB:TMP2, TAB:TMP1->metatable ++#endif ++ | ld CFUNC:TMP0, CFUNC:RB->upvalue[0] ++#if LJ_52 ++ | bxnez TAB:TMP2, ->fff_fallback ++#endif ++ | slli TMP1, TISNUM, 47 ++ | sd CARG1, -8(BASE) ++ | sd TMP1, 0(BASE) ++ | sd CFUNC:TMP0, -16(BASE) ++ | li RD, (3+1)*8 ++ | j ->fff_res ++ | ++ |//-- Base library: catch errors ---------------------------------------- ++ | ++ |.ffunc pcall ++ | ld TMP1, L->maxstack ++ | add TMP2, BASE, NARGS8:RC ++ | bxltu TMP1, TMP2, ->fff_fallback ++ | addi NARGS8:TMP0, NARGS8:RC, -8 ++ | lbu TMP3, GL->hookmask ++ | mv TMP2, BASE ++ | bxltz NARGS8:TMP0, ->fff_fallback ++ | mv NARGS8:RC, NARGS8:TMP0 ++ | addi BASE, BASE, 16 ++ | // Remember active hook before pcall. ++ | srliw TMP3, TMP3, HOOK_ACTIVE_SHIFT ++ | andi TMP3, TMP3, 1 ++ | addi PC, TMP3, 16+FRAME_PCALL ++ | bxeqz NARGS8:RC, ->vm_call_dispatch ++ |1: ++ | add TMP0, BASE, NARGS8:RC ++ |2: ++ | ld TMP1, -16(TMP0) ++ | sd TMP1, -8(TMP0) ++ | addi TMP0, TMP0, -8 ++ | bne TMP0, BASE, <2 ++ | j ->vm_call_dispatch ++ | ++ |.ffunc xpcall ++ | ld TMP1, L->maxstack ++ | add TMP2, BASE, NARGS8:RC ++ | bxltu TMP1, TMP2, ->fff_fallback ++ | addi NARGS8:TMP0, NARGS8:RC, -16 ++ | ld CARG1, 0(BASE) ++ | ld CARG2, 8(BASE) ++ | lbu TMP1, GL->hookmask ++ | bxltz NARGS8:TMP0, ->fff_fallback ++ | gettp TMP2, CARG2 ++ | addi TMP2, TMP2, -LJ_TFUNC ++ | bxnez TMP2, ->fff_fallback // Traceback must be a function. ++ | mv TMP2, BASE ++ | mv NARGS8:RC, NARGS8:TMP0 ++ | addi BASE, BASE, 24 ++ | // Remember active hook before pcall. ++ | srliw TMP3, TMP3, HOOK_ACTIVE_SHIFT ++ | sd CARG2, 0(TMP2) // Swap function and traceback. ++ | andi TMP3, TMP3, 1 ++ | sd CARG1, 8(TMP2) ++ | addi PC, TMP3, 24+FRAME_PCALL ++ | bnez NARGS8:RC, <1 ++ | j ->vm_call_dispatch ++ | ++ |//-- Coroutine library -------------------------------------------------- ++ | ++ |.macro coroutine_resume_wrap, resume ++ |.if resume ++ |.ffunc_1 coroutine_resume ++ | checktp CARG1, CARG1, -LJ_TTHREAD, ->fff_fallback ++ |.else ++ |.ffunc coroutine_wrap_aux ++ | ld L:CARG1, CFUNC:RB->upvalue[0].gcr ++ | cleartp L:CARG1 ++ |.endif ++ | lbu TMP0, L:CARG1->status ++ | ld TMP1, L:CARG1->cframe ++ | ld CARG2, L:CARG1->top ++ | ld TMP2, L:CARG1->base ++ | addiw CARG4, TMP0, -LUA_YIELD ++ | add CARG3, CARG2, TMP0 ++ | addi TMP3, CARG2, 8 ++ | seqz TMP4, CARG4 ++ | neg TMP4, TMP4 ++ | xor CARG2, CARG2, TMP3 // CARG2 = TMP4 ? CARG2 : TMP3 ++ | and CARG2, CARG2, TMP4 ++ | xor CARG2, TMP3, CARG2 ++ | bxgtz CARG4, ->fff_fallback // st > LUA_YIELD? ++ | xor TMP2, TMP2, CARG3 ++ | or CARG4, TMP2, TMP0 ++ | bxnez TMP1, ->fff_fallback // cframe != 0? ++ | ld TMP0, L:CARG1->maxstack ++ | ld PC, FRAME_PC(BASE) ++ | bxeqz CARG4, ->fff_fallback // base == top && st == 0? ++ | add TMP2, CARG2, NARGS8:RC ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) ++ | bxltu TMP0, TMP2, ->fff_fallback // Stack overflow? ++ |1: ++ |.if resume ++ | addi BASE, BASE, 8 // Keep resumed thread in stack for GC. ++ | addi NARGS8:RC, NARGS8:RC, -8 ++ | addi TMP2, TMP2, -8 ++ |.endif ++ | sd TMP2, L:CARG1->top ++ | sd BASE, L->top ++ | add TMP1, BASE, NARGS8:RC ++ | mv CARG3, CARG2 ++ |2: // Move args to coroutine. ++ | ld TMP0, 0(BASE) ++ | sltu TMP3, BASE, TMP1 ++ | addi BASE, BASE, 8 ++ | beqz TMP3, >3 ++ | sd TMP0, 0(CARG3) ++ | addi CARG3, CARG3, 8 ++ | j <2 ++ |3: ++ | mv L:RA, L:CARG1 ++ | jal ->vm_resume // (lua_State *L, TValue *base, 0, 0) ++ | // Returns thread status. ++ |4: ++ | ld TMP2, L:RA->base ++ | sltiu TMP1, CRET1, LUA_YIELD+1 ++ | ld TMP3, L:RA->top ++ | li_vmstate INTERP ++ | ld BASE, L->base ++ | sd L, GL->cur_L ++ | st_vmstate ++ | sub RD, TMP3, TMP2 ++ | beqz TMP1, >8 ++ | ld TMP0, L->maxstack ++ | add TMP1, BASE, RD ++ | beqz RD, >6 // No results? ++ | add TMP3, TMP2, RD ++ | bltu TMP0, TMP1, >9 // Need to grow stack? ++ | sd TMP2, L:RA->top // Clear coroutine stack. ++ | mv TMP1, BASE ++ |5: // Move results from coroutine. ++ | ld TMP0, 0(TMP2) ++ | addi TMP2, TMP2, 8 ++ | sd TMP0, 0(TMP1) ++ | addi TMP1, TMP1, 8 ++ | bltu TMP2, TMP3, <5 ++ |6: ++ |.if resume ++ | mov_true TMP1 ++ | addi RD, RD, 16 ++ |7: ++ | sd TMP1, -8(BASE) // Prepend true/false to results. ++ | addi RA, BASE, -8 ++ |.else ++ | mv RA, BASE ++ | addi RD, RD, 8 ++ |.endif ++ | andi TMP0, PC, FRAME_TYPE ++ | sd PC, SAVE_PC(sp) ++ | mv MULTRES, RD ++ |// bxeqz TMP0, ->BC_RET_Z // Local label 9 in use ++ | bnez TMP0, >6 ++ | j ->BC_RET_Z ++ |6: ++ | j ->vm_return ++ | ++ |8: // Coroutine returned with error (at co->top-1). ++ |.if resume ++ | addi TMP3, TMP3, -8 ++ | mov_false TMP1 ++ | li RD, (2+1)*8 ++ | ld TMP0, 0(TMP3) ++ | sd TMP3, L:RA->top // Remove error from coroutine stack. ++ | sd TMP0, 0(BASE) // Copy error message. ++ | j <7 ++ |.else ++ | mv CARG1, L ++ | mv CARG2, L:RA ++ | // (lua_State *L, lua_State *co) ++ | call_intern ff_coroutine_wrap_aux, lj_ffh_coroutine_wrap_err ++ |.endif ++ | ++ |9: // Handle stack expansion on return from yield. ++ | mv CARG1, L ++ | srliw CARG2, RD, 3 ++ | // (lua_State *L, int n) ++ |.if resume ++ | call_intern ff_coroutine_resume, lj_state_growstack ++ |.else ++ | call_intern ff_coroutine_wrap_aux, lj_state_growstack ++ |.endif ++ | mv CRET1, x0 ++ | j <4 ++ |.endmacro ++ | ++ | coroutine_resume_wrap 1 // coroutine.resume ++ | coroutine_resume_wrap 0 // coroutine.wrap ++ | ++ |.ffunc coroutine_yield ++ | ld TMP0, L->cframe ++ | add TMP1, BASE, NARGS8:RC ++ | li CRET1, LUA_YIELD ++ | sd BASE, L->base ++ | andi TMP0, TMP0, CFRAME_RESUME ++ | sd TMP1, L->top ++ | bxeqz TMP0, ->fff_fallback ++ | sd x0, L->cframe ++ | sb CRET1, L->status ++ | j ->vm_leave_unw ++ | ++ |//-- Math library ------------------------------------------------------- ++ | ++ |.macro math_round, func, rm ++ |->ff_math_ .. func: ++ | ld CARG1, 0(BASE) ++ | gettp TMP0, CARG1 ++ | bxeqz NARGS8:RC, ->fff_fallback ++ | fmv.d.x FARG1, CARG1 ++ | bxeq TMP0, TISNUM, ->fff_restv ++ | srli TMP1, CARG1, 52 // Extract exponent (and sign). ++ | bxgeu TMP0, TISNUM, ->fff_fallback ++ | andi TMP1, TMP1, 0x7ff // Extract exponent. ++ | slti TMP2, TMP1, 1023 + 52 + 1 // 1023: Bias, 52: Max fraction ++ | bxeqz TMP2, ->fff_resn // Less than 2^52 / Not NaN? ++ | fcvt.l.d TMP3, FARG1, rm ++ | fcvt.d.l FTMP1, TMP3 ++ | fsgnj.d FRET1, FTMP1, FARG1 ++ | j ->fff_resn ++ |.endmacro ++ | ++ | math_round floor, rdn ++ | math_round ceil, rup ++ | ++ |.ffunc_1 math_abs ++ | gettp CARG2, CARG1 ++ | addi TMP2, CARG2, -LJ_TISNUM ++ | sext.w TMP1, CARG1 ++ | bnez TMP2, >1 ++ | sraiw TMP0, TMP1, 31 // Extract sign. int ++ | xor TMP1, TMP1, TMP0 ++ | sub CARG1, TMP1, TMP0 ++ | slli TMP3, CARG1, 32 ++ | settp CARG1, TISNUM ++ | bxgez TMP3, ->fff_restv ++ | lui CARG1, 0x41e00 // 2^31 as a double. ++ | slli CARG1, CARG1, 32 ++ | j ->fff_restv ++ |1: ++ | sltiu TMP2, CARG2, LJ_TISNUM ++ | slli CARG1, CARG1, 1 ++ | srli CARG1, CARG1, 1 ++ | bxeqz TMP2, ->fff_fallback // int ++ |// fallthrough ++ | ++ |->fff_restv: ++ | // CARG1 = TValue result. ++ | ld PC, FRAME_PC(BASE) ++ | sd CARG1, -16(BASE) ++ |->fff_res1: ++ | // RA = results, PC = return. ++ | li RD, (1+1)*8 ++ |->fff_res: ++ | // RA = results, RD = (nresults+1)*8, PC = return. ++ | andi TMP0, PC, FRAME_TYPE ++ | mv MULTRES, RD ++ | addi RA, BASE, -16 ++ | bxnez TMP0, ->vm_return ++ | lw INS, -4(PC) ++ | decode_RB8 RB, INS ++ |5: ++ | bltu RD, RB, >6 // More results expected? ++ | decode_RA8a TMP0, INS ++ | ins_next1 ++ | decode_RA8b TMP0 ++ | // Adjust BASE. KBASE is assumed to be set for the calling frame. ++ | sub BASE, RA, TMP0 ++ | ins_next2 ++ | ++ |6: // Fill up results with nil. ++ | add TMP1, RA, RD ++ | addi RD, RD, 8 ++ | sd TISNIL, -8(TMP1) ++ | j <5 ++ | ++ |.macro math_extern, func ++ | .ffunc_n math_ .. func ++ | call_extern ff_math_extern, func ++ | j ->fff_resn ++ |.endmacro ++ | ++ |.macro math_extern2, func ++ | .ffunc_nn math_ .. func ++ | call_extern ff_math_extern2, func ++ | j ->fff_resn ++ |.endmacro ++ | ++ |.ffunc_n math_sqrt ++ | fsqrt.d FRET1, FARG1 ++ |->fff_resn: ++ | ld PC, FRAME_PC(BASE) ++ | fsd FRET1, -16(BASE) ++ | j ->fff_res1 ++ | ++ |.ffunc math_log ++ | li TMP1, 8 ++ | ld CARG1, 0(BASE) ++ | fld FARG1, 0(BASE) ++ | bxne NARGS8:RC, TMP1, ->fff_fallback // Need exactly 1 argument. ++ | checknum CARG1, ->fff_fallback ++ | call_extern ff_math_log, log ++ | j ->fff_resn ++ | ++ | math_extern log10 ++ | math_extern exp ++ | math_extern sin ++ | math_extern cos ++ | math_extern tan ++ | math_extern asin ++ | math_extern acos ++ | math_extern atan ++ | math_extern sinh ++ | math_extern cosh ++ | math_extern tanh ++ | math_extern2 pow ++ | math_extern2 atan2 ++ | math_extern2 fmod ++ | ++ |.ffunc_2 math_ldexp ++ | checknum CARG1, ->fff_fallback ++ | checkint CARG2, ->fff_fallback ++ | fld FARG1, 0(BASE) ++ | lw CARG1, 8(BASE) ++ | call_extern ff_math_ldexp, ldexp // (double x, int exp) ++ | j ->fff_resn ++ | ++ |.ffunc_n math_frexp ++ | ld PC, FRAME_PC(BASE) ++ | addi CARG1, GL, offsetof(global_State, tmptv) ++ | call_extern ff_math_frexp, frexp ++ | lw TMP1, GL->tmptv ++ | fcvt.d.w FARG2, TMP1 ++ | fsd FRET1, -16(BASE) ++ | fsd FARG2, -8(BASE) ++ | li RD, (2+1)*8 ++ | j ->fff_res ++ | ++ |.ffunc_n math_modf ++ | addi CARG1, BASE, -16 ++ | ld PC, FRAME_PC(BASE) ++ | call_extern ff_math_modf, modf ++ | fsd FRET1, -8(BASE) ++ | li RD, (2+1)*8 ++ | j ->fff_res ++ | ++ |.macro math_minmax, name, ismax ++ | .ffunc_1 name ++ | add RB, BASE, NARGS8:RC ++ | addi RA, BASE, 8 ++ | checkint CARG1, >4 ++ |1: // Handle integers. ++ | ld CARG2, 0(RA) ++ | bxeq RA, RB, ->fff_restv ++ | sext.w CARG1, CARG1 ++ | checkint CARG2, >3 ++ | sext.w CARG2, CARG2 ++ | slt TMP0, CARG1, CARG2 ++ |.if ismax ++ | addi TMP1, TMP0, -1 ++ |.else ++ | neg TMP1, TMP0 ++ |.endif ++ | xor TMP2, CARG1, CARG2 // CARG1 = TMP1 ? CARG1 : CARG2 ++ | and TMP2, TMP2, TMP1 ++ | xor CARG1, CARG2, TMP2 ++ | addi RA, RA, 8 ++ | zext.w CARG1, CARG1 ++ | settp_b CARG1, TISNUM ++ | j <1 ++ |3: // Convert intermediate result to number and continue below. ++ | fcvt.d.w FARG1, CARG1 ++ | checknum CARG2, ->fff_fallback ++ | fld FARG2, 0(RA) ++ | j >6 ++ | ++ |4: ++ | fld FARG1, 0(BASE) ++ | checknum CARG1, ->fff_fallback ++ |5: // Handle numbers. ++ | ld CARG2, 0(RA) ++ | fld FARG2, 0(RA) ++ | bxgeu RA, RB, ->fff_resn ++ | checknum CARG2, >7 ++ |6: ++ |.if ismax ++ | flt.d TMP0, FARG2, FARG1 ++ |.else // min ++ | flt.d TMP0, FARG1, FARG2 ++ |.endif ++ | bnez TMP0, >8 // skip swap ++ | fmv.d FARG1, FARG2 ++ |8: ++ | addi RA, RA, 8 ++ | j <5 ++ |7: // Convert integer to number and continue above. ++ | checkint CARG2, ->fff_fallback ++ | fcvt.d.w FARG2, CARG2 ++ | j <6 ++ |.endmacro ++ | ++ | math_minmax math_min, 0 ++ | math_minmax math_max, 1 ++ | ++ |//-- String library ----------------------------------------------------- ++ | ++ |.ffunc string_byte // Only handle the 1-arg case here. ++ | ld CARG1, 0(BASE) ++ | gettp TMP0, CARG1 ++ | xori TMP1, NARGS8:RC, 8 ++ | addi TMP0, TMP0, -LJ_TSTR ++ | or TMP1, TMP1, TMP0 ++ | cleartp STR:CARG1 ++ | bxnez TMP1, ->fff_fallback // Need exactly 1 string argument. ++ | lw TMP0, STR:CARG1->len ++ | ld PC, FRAME_PC(BASE) ++ | snez RD, TMP0 ++ | lbu TMP2, STR:CARG1[1] // Access is always ok (NUL at end). ++ | addiw RD, RD, 1 ++ | slliw RD, RD, 3 // RD = ((str->len != 0)+1)*8 ++ | settp_b TMP2, TISNUM ++ | sd TMP2, -16(BASE) ++ | j ->fff_res ++ | ++ |.ffunc string_char // Only handle the 1-arg case here. ++ | ffgccheck ++ | ld CARG1, 0(BASE) ++ | gettp TMP0, CARG1 ++ | xori TMP1, NARGS8:RC, 8 // Need exactly 1 argument. ++ | addi TMP0, TMP0, -LJ_TISNUM // Integer. ++ | li TMP2, 255 ++ | sext.w CARG1, CARG1 ++ | or TMP1, TMP1, TMP0 ++ | sltu TMP2, TMP2, CARG1 // !(255 < n). ++ | or TMP1, TMP1, TMP2 ++ | li CARG3, 1 ++ | bxnez TMP1, ->fff_fallback ++ | addi CARG2, sp, TMPD_OFS ++ | sb CARG1, TMPD(sp) ++ |->fff_newstr: ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) ++ | mv CARG1, L ++ | // (lua_State *L, const char *str, size_t l) ++ | call_intern fff_newstr, lj_str_new ++ | // Returns GCstr *. ++ | ld BASE, L->base ++ |->fff_resstr: ++ | li TMP1, LJ_TSTR ++ | settp CRET1, TMP1 ++ | j ->fff_restv ++ | ++ |.ffunc string_sub ++ | ffgccheck ++ | ld CARG1, 0(BASE) ++ | ld CARG2, 8(BASE) ++ | ld CARG3, 16(BASE) ++ | addi TMP0, NARGS8:RC, -16 ++ | gettp TMP1, CARG1 ++ | bxltz TMP0, ->fff_fallback ++ | cleartp STR:CARG1, CARG1 ++ | li CARG4, -1 ++ | beqz TMP0, >1 ++ | sext.w CARG4, CARG3 ++ | checkint CARG3, ->fff_fallback ++ |1: ++ | checkint CARG2, ->fff_fallback ++ | addi TMP0, TMP1, -LJ_TSTR ++ | sext.w CARG3, CARG2 ++ | bxnez TMP0, ->fff_fallback ++ | lw CARG2, STR:CARG1->len ++ | // STR:CARG1 = str, CARG2 = str->len, CARG3 = start, CARG4 = end ++ | addiw TMP0, CARG2, 1 ++ | bgez CARG4, >2 ++ | addw CARG4, CARG4, TMP0 // if (end < 0) end += len+1 ++ |2: ++ | bgez CARG3, >3 ++ | addw CARG3, CARG3, TMP0 // if (start < 0) start += len+1 ++ |3: ++ | bgez CARG4, >4 ++ | mv CARG4, x0 // if (end < 0) end = 0 ++ |4: ++ | bgtz CARG3, >5 ++ | li CARG3, 1 // if (start < 1) start = 1 ++ |5: ++ | ble CARG4, CARG2, >6 ++ | mv CARG4, CARG2 // if (end > len) end = len ++ |6: ++ | add CARG2, STR:CARG1, CARG3 ++ | sub CARG3, CARG4, CARG3 // len = end - start ++ | addi CARG2, CARG2, sizeof(GCstr)-1 ++ | addiw CARG3, CARG3, 1 // len += 1 ++ | bxgez CARG3, ->fff_newstr ++ |->fff_emptystr: // Return empty string. ++ | li TMP1, LJ_TSTR ++ | addi STR:CARG1, GL, offsetof(global_State, strempty) ++ | settp CARG1, TMP1 ++ | j ->fff_restv ++ | ++ |.macro ffstring_op, name ++ | .ffunc string_ .. name ++ | ffgccheck ++ | ld CARG2, 0(BASE) ++ | bxeqz NARGS8:RC, ->fff_fallback ++ | checkstr STR:CARG2, ->fff_fallback ++ | addi SBUF:CARG1, GL, offsetof(global_State, tmpbuf) ++ | ld TMP0, SBUF:CARG1->b ++ | sd L, SBUF:CARG1->L ++ | sd BASE, L->base ++ | sd TMP0, SBUF:CARG1->w ++ | sd PC, SAVE_PC(sp) ++ | call_intern ff_string_ .. name, lj_buf_putstr_ .. name ++ | call_intern ff_string_ .. name, lj_buf_tostr // CARG1 = CRET1 ++ | ld BASE, L->base ++ | j ->fff_resstr ++ |.endmacro ++ | ++ |ffstring_op reverse ++ |ffstring_op lower ++ |ffstring_op upper ++ | ++ |//-- Bit library -------------------------------------------------------- ++ | ++ |->vm_tobit_fb: ++ | fld FARG1, 0(BASE) ++ | bxeqz TMP1, ->fff_fallback ++ | fadd.d FARG1, FARG1, TOBIT ++ | fmv.x.w CRET1, FARG1 ++ | zext.w CRET1, CRET1 ++ | ret ++ | ++ |.macro .ffunc_bit, name ++ | .ffunc_1 bit_..name ++ | gettp TMP0, CARG1 ++ | zext.w CRET1, CARG1 ++ | beq TMP0, TISNUM, >1 ++ | sltiu TMP1, TMP0, LJ_TISNUM ++ | jal ->vm_tobit_fb ++ |1: ++ |.endmacro ++ | ++ |.macro .ffunc_bit_op, name, bins ++ | .ffunc_bit name ++ | addi TMP2, BASE, 8 ++ | add TMP3, BASE, NARGS8:RC ++ |1: ++ | ld TMP1, 0(TMP2) ++ | bxeq TMP2, TMP3, ->fff_resi ++ | gettp TMP0, TMP1 ++ | addi TMP2, TMP2, 8 ++ | bne TMP0, TISNUM, >2 ++ | zext.w TMP1, TMP1 ++ | bins CRET1, CRET1, TMP1 ++ | j <1 ++ |2: ++ | fld FARG1, -8(TMP2) ++ | sltiu TMP0, TMP0, LJ_TISNUM ++ | fadd.d FARG1, FARG1, TOBIT ++ | bxeqz TMP0, ->fff_fallback ++ | fmv.x.w TMP1, FARG1 ++ | zext.w TMP1, TMP1 ++ | bins CRET1, CRET1, TMP1 ++ | j <1 ++ |.endmacro ++ | ++ |.ffunc_bit_op band, and ++ |.ffunc_bit_op bor, or ++ |.ffunc_bit_op bxor, xor ++ | ++ |.ffunc_bit bswap ++ | srliw CARG2, CARG1, 8 ++ | lui CARG3, 16 ++ | addiw CARG3, CARG3, -256 ++ | and CARG2, CARG2, CARG3 ++ | srliw CARG3, CARG1, 24 ++ | or CARG2, CARG2, CARG3 ++ | slli CARG3, CARG1, 8 ++ | lui CARG4, 0x00ff0 ++ | and CARG3, CARG3, CARG4 ++ | slli CARG1, CARG1, 24 ++ | or CARG1, CARG1, CARG3 ++ | or CARG1, CARG1, CARG2 ++ | slli CARG1, CARG1, 32 ++ | srli CARG1, CARG1, 32 ++ | j ->fff_resi ++ | ++ |.ffunc_bit tobit ++ |->fff_resi: ++ | settp CARG1, TISNUM // CARG1 = CRET1 ++ | j ->fff_restv ++ | ++ |.ffunc_bit bnot ++ | not CRET1, CRET1 ++ | zext.w CRET1, CRET1 ++ | j ->fff_resi ++ | ++ |.macro .ffunc_bit_sh, name, shins ++ | .ffunc_2 bit_..name ++ | gettp TMP0, CARG1 ++ | beq TMP0, TISNUM, >1 ++ | sltiu TMP1, TMP0, LJ_TISNUM ++ | jal ->vm_tobit_fb ++ |// mv CARG1, CRET1 // CARG1 = CRET1 ++ |1: ++ | gettp TMP0, CARG2 ++ | zext.w CARG2, CARG2 ++ | bxne TMP0, TISNUM, ->fff_fallback ++ | sext.w CARG1, CARG1 ++ | shins CRET1, CARG1, CARG2 ++ | zext.w CRET1, CRET1 ++ | j ->fff_resi ++ |.endmacro ++ | ++ |.ffunc_bit_sh lshift, sllw ++ |.ffunc_bit_sh rshift, srlw ++ |.ffunc_bit_sh arshift, sraw ++ | ++ |.macro .ffunc_bit_rot, name, rotinsa, rotinsb ++ | .ffunc_2 bit_..name ++ | gettp TMP0, CARG1 ++ | beq TMP0, TISNUM, >1 ++ | sltiu TMP1, TMP0, LJ_TISNUM ++ | jal ->vm_tobit_fb ++ |// mv CARG1, CRET1 // CARG1 = CRET1 ++ |1: ++ | gettp TMP0, CARG2 ++ | zext.w CARG2, CARG2 ++ | bxne TMP0, TISNUM, ->fff_fallback ++ | sext.w CARG1, CARG1 ++ | neg TMP2, CARG2 ++ | rotinsa TMP1, CARG1, CARG2 ++ | rotinsb TMP0, CARG1, TMP2 ++ | or CRET1, TMP0, TMP1 ++ | zext.w CRET1, CRET1 ++ | j ->fff_resi ++ |.endmacro ++ | ++ |.ffunc_bit_rot rol, sllw, srlw ++ |.ffunc_bit_rot ror, srlw, sllw ++ | ++ |//----------------------------------------------------------------------- ++ | ++ |->fff_fallback: // Call fast function fallback handler. ++ | // BASE = new base, RB = CFUNC, RC = nargs*8 ++ | ld PC, FRAME_PC(BASE) // Fallback may overwrite PC. ++ | ld CARG3, CFUNC:RB->f ++ | add TMP1, BASE, NARGS8:RC ++ | sd BASE, L->base ++ | addi TMP0, TMP1, 8*LUA_MINSTACK ++ | ld TMP2, L->maxstack ++ | sd PC, SAVE_PC(sp) // Redundant (but a defined value). ++ | sd TMP1, L->top ++ | mv CARG1, L ++ | bltu TMP2, TMP0, >5 // Need to grow stack. ++ | jalr CARG3 // (lua_State *L) ++ | // Either throws an error, or recovers and returns -1, 0 or nresults+1. ++ | ld BASE, L->base ++ | slliw RD, CRET1, 3 ++ | bxgtz CRET1, ->fff_res // Returned nresults+1? ++ |1: // Returned 0 or -1: retry fast path. ++ | ld LFUNC:RB, FRAME_FUNC(BASE) ++ | ld TMP0, L->top ++ | sub NARGS8:RC, TMP0, BASE ++ | cleartp LFUNC:RB ++ | bxnez CRET1, ->vm_call_tail // Returned -1? ++ | ins_callt // Returned 0: retry fast path. ++ | ++ |// Reconstruct previous base for vmeta_call during tailcall. ++ |->vm_call_tail: ++ | andi TMP0, PC, FRAME_TYPE ++ | andi TMP1, PC, ~FRAME_TYPEP // TODO ++ | bnez TMP0, >3 ++ | lbu TMP1, OFS_RA(PC) ++ | slliw TMP1, TMP1, 3 ++ | addiw TMP1, TMP1, 16 ++ |3: ++ | sub TMP2, BASE, TMP1 ++ | j ->vm_call_dispatch // Resolve again for tailcall. ++ | ++ |5: // Grow stack for fallback handler. ++ | li CARG2, LUA_MINSTACK ++ | mv CARG1, L ++ | call_intern vm_call_tail, lj_state_growstack // (lua_State *L, int n) ++ | ld BASE, L->base ++ | mv CRET1, x0 // Set zero-flag to force retry. ++ | j <1 ++ | ++ |->fff_gcstep: // Call GC step function. ++ | // BASE = new base, RC = nargs*8 ++ | mv MULTRES, ra ++ | add TMP0, BASE, NARGS8:RC // Calculate L->top. ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) // Redundant (but a defined value). ++ | mv CARG1, L ++ | sd TMP0, L->top ++ | call_intern fff_gc_step, lj_gc_step // (lua_State *L) ++ | ld BASE, L->base ++ | mv ra, MULTRES // Help return address predictor. ++ | ld TMP0, L->top ++ | ld CFUNC:RB, FRAME_FUNC(BASE) ++ | cleartp CFUNC:RB ++ | sub NARGS8:RC, TMP0, BASE ++ | ret ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Special dispatch targets ------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |->vm_record: // Dispatch target for recording phase. ++ | ++ |->vm_rethook: // Dispatch target for return hooks. ++ | lbu TMP3, GL->hookmask ++ | andi TMP1, TMP3, HOOK_ACTIVE // Hook already active? ++ | beqz TMP1, >1 ++ |5: // Re-dispatch to static ins. ++ | ld TMP1, GG_DISP2STATIC(TMP0) // Assumes TMP0 holds DISPATCH+OP*4. ++ | jr TMP1 ++ | ++ |->vm_inshook: // Dispatch target for instr/line hooks. ++ | lbu TMP3, GL->hookmask ++ | lw TMP2, GL->hookcount ++ | andi TMP1, TMP3, HOOK_ACTIVE // Hook already active? ++ | bnez TMP1, <5 ++ | andi TMP1, TMP3, LUA_MASKLINE|LUA_MASKCOUNT ++ | addiw TMP2, TMP2, -1 ++ | beqz TMP1, <5 ++ | sw TMP2, GL->hookcount ++ | beqz TMP2, >1 ++ | andi TMP1, TMP3, LUA_MASKLINE ++ | beqz TMP1, <5 ++ |1: ++ | sw MULTRES, TMPD(sp) ++ | mv CARG2, PC ++ | sd BASE, L->base ++ | mv CARG1, L ++ | // SAVE_PC must hold the _previous_ PC. The callee updates it with PC. ++ | call_intern vm_inshook, lj_dispatch_ins // (lua_State *L, const BCIns *pc) ++ |3: ++ | ld BASE, L->base ++ |4: // Re-dispatch to static ins. ++ | lw INS, -4(PC) ++ | decode_OP8 TMP1, INS ++ | add TMP0, DISPATCH, TMP1 ++ | decode_RD8a RD, INS ++ | ld TMP1, GG_DISP2STATIC(TMP0) ++ | decode_RA8 RA, INS ++ | decode_RD8b RD ++ | jr TMP1 ++ | ++ |->cont_hook: // Continue from hook yield. ++ | addi PC, PC, 4 ++ | lw MULTRES, -24(RB) // Restore MULTRES for *M ins. ++ | j <4 ++ | ++ | ++ |->vm_callhook: // Dispatch target for call hooks. ++ | mv CARG2, PC ++ | ++ |->cont_stitch: // Trace stitching. ++ | ++ |->vm_profhook: // Dispatch target for profiler hook. ++#if LJ_HASPROFILE ++ | mv CARG1, L ++ | mv CARG2, PC ++ | sd BASE, L->base ++ | sw MULTRES, TMPD(sp) ++ | // (lua_State *L, const BCIns *pc) ++ | call_intern vm_profhook, lj_dispatch_profile ++ | // HOOK_PROFILE is off again, so re-dispatch to dynamic instruction. ++ | addi PC, PC, -4 ++ | ld BASE, L->base ++ | j ->cont_nop ++#endif ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Math helper functions ---------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ | ++ |// Hard-float round to integer. ++ |// Modifies TMP0, FARG1, FARG5 ++ |.macro vm_round, rm ++ | fmv.x.d TMP0, FARG1 ++ | srli TMP0, TMP0, 52 // Extract exponent (and sign). ++ | andi TMP0, TMP0, 0x7ff // Extract exponent. ++ | addi TMP0, TMP0, -1075 ++ | bgtz TMP0, >1 // Less than 2^52 / Not NaN? ++ | fcvt.l.d TMP0, FARG1, rm ++ | fcvt.d.l FARG5, TMP0 ++ | fsgnj.d FRET1, FARG5, FARG1 ++ |1: ++ | ret ++ |.endmacro ++ | ++ | ++ |->vm_floor: ++ | vm_round rdn ++ |->vm_ceil: ++ | vm_round rup ++ | ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Miscellaneous functions -------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |// void lj_vm_fence_rw_rw() ++ |->vm_fence_rw_rw: ++ |.if JIT or FFI ++ | .long 0x0330000f ++ | ret ++ |.endif ++ | ++ |//----------------------------------------------------------------------- ++} ++ ++/* Generate the code for a single instruction. */ ++static void build_ins(BuildCtx *ctx, BCOp op, int defop) ++{ ++ int vk = 0; ++ |=>defop: ++ ++ switch (op) { ++ ++ /* -- Comparison ops ---------------------------------------------------- */ ++ ++ /* Remember: all ops branch for a true comparison, fall through otherwise. */ ++ ++ case BC_ISLT: case BC_ISGE: case BC_ISLE: case BC_ISGT: ++ | // RA = src1*8, RD = src2*8, JMP with RD = target ++ | add RA, BASE, RA ++ | add RD, BASE, RD ++ if (op == BC_ISLT || op == BC_ISGE) { ++ | ld CARG1, 0(RA) ++ | ld CARG2, 0(RD) ++ | gettp CARG3, CARG1 ++ | gettp CARG4, CARG2 ++ } else { ++ | ld CARG2, 0(RA) ++ | ld CARG1, 0(RD) ++ | gettp CARG3, CARG2 ++ | gettp CARG4, CARG1 ++ } ++ | lhu TMP2, OFS_RD(PC) // TMP2=jump ++ | addi PC, PC, 4 ++ | bne CARG3, TISNUM, >2 ++ | decode_BC4b TMP2 ++ | bne CARG4, TISNUM, >5 ++ | sext.w CARG1, CARG1 ++ | sext.w CARG2, CARG2 ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | slt TMP1, CARG1, CARG2 ++ | addw TMP2, TMP2, TMP3 // TMP2=(jump-0x8000)<<2 ++ if (op == BC_ISLT || op == BC_ISGT) { ++ | neg TMP1, TMP1 ++ } else { ++ | addi TMP1, TMP1, -1 ++ } ++ | and TMP2, TMP2, TMP1 ++ |1: ++ | add PC, PC, TMP2 ++ | ins_next ++ | ++ |2: // RA is not an integer. ++ | sltiu TMP1, CARG3, LJ_TISNUM ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | bxeqz TMP1, ->vmeta_comp ++ | sltiu TMP1, CARG4, LJ_TISNUM ++ | decode_BC4b TMP2 ++ | beqz TMP1, >4 ++ | fmv.d.x FTMP0, CARG1 ++ | fmv.d.x FTMP2, CARG2 ++ |3: // RA and RD are both numbers. ++ | addw TMP2, TMP2, TMP3 ++ if (op == BC_ISLT) { ++ | flt.d TMP3, FTMP0, FTMP2 ++ | neg TMP3, TMP3 ++ } else if (op == BC_ISGE) { ++ | flt.d TMP3, FTMP0, FTMP2 ++ | addi TMP3, TMP3, -1 ++ } else if (op == BC_ISLE) { ++ | fle.d TMP3, FTMP2, FTMP0 ++ | neg TMP3, TMP3 ++ } else if (op == BC_ISGT) { ++ | fle.d TMP3, FTMP2, FTMP0 ++ | addi TMP3, TMP3, -1 ++ } ++ | and TMP2, TMP2, TMP3 ++ | j <1 ++ | ++ |4: // RA is a number, RD is not a number. ++ | // RA is a number, RD is an integer. Convert RD to a number. ++ | bxne CARG4, TISNUM, ->vmeta_comp ++ if (op == BC_ISLT || op == BC_ISGE) { ++ | fcvt.d.w FTMP2, CARG2 ++ | fmv.d.x FTMP0, CARG1 ++ } else { ++ | fcvt.d.w FTMP0, CARG1 ++ | fmv.d.x FTMP2, CARG2 ++ } ++ | j <3 ++ | ++ |5: // RA is an integer, RD is not an integer ++ | sltiu TMP1, CARG4, LJ_TISNUM ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | bxeqz TMP1, ->vmeta_comp ++ | // RA is an integer, RD is a number. Convert RA to a number. ++ if (op == BC_ISLT || op == BC_ISGE) { ++ | fcvt.d.w FTMP0, CARG1 ++ | fmv.d.x FTMP2, CARG2 ++ } else { ++ | fcvt.d.w FTMP2, CARG2 ++ | fmv.d.x FTMP0, CARG1 ++ } ++ | j <3 ++ break; ++ ++ case BC_ISEQV: case BC_ISNEV: ++ vk = op == BC_ISEQV; ++ | // RA = src1*8, RD = src2*8, JMP with RD = target ++ | add RA, BASE, RA ++ | add RD, BASE, RD ++ | addi PC, PC, 4 ++ | ld CARG1, 0(RA) ++ | ld CARG2, 0(RD) ++ | lhu TMP2, -4+OFS_RD(PC) ++ | gettp CARG3, CARG1 ++ | gettp CARG4, CARG2 ++ | sltu TMP0, TISNUM, CARG3 ++ | sltu TMP1, TISNUM, CARG4 ++ | or TMP0, TMP0, TMP1 ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ if (vk) { ++ | beqz TMP0, ->BC_ISEQN_Z ++ } else { ++ | beqz TMP0, ->BC_ISNEN_Z ++ } ++ |// Either or both types are not numbers. ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | decode_BC4b TMP2 ++ | addw TMP2, TMP2, TMP3 // (jump-0x8000)<<2 ++ | bne CARG1, CARG2, >2 ++ | // Tag and value are equal. ++ if (vk) { ++ |->BC_ISEQV_Z: ++ | add PC, PC, TMP2 ++ } ++ |1: ++ | ins_next ++ | ++ |2: // Check if the tags are the same and it's a table or userdata. ++ | xor TMP3, CARG3, CARG4 // Same type? ++ | sltiu TMP0, CARG3, LJ_TISTABUD+1 // Table or userdata? TMP0=1 ++ | beqz TMP3, >3 ++ | mv TMP0, x0 // TMP0=0: not same type, or same type table/userdata ++ |3: ++ | cleartp TAB:TMP1, CARG1 ++ if (vk) { ++ | beqz TMP0, <1 ++ } else { ++ | beqz TMP0, ->BC_ISEQV_Z // Reuse code from opposite instruction. ++ } ++ | // Different tables or userdatas. Need to check __eq metamethod. ++ | // Field metatable must be at same offset for GCtab and GCudata! ++ | ld TAB:TMP3, TAB:TMP1->metatable ++ if (vk) { ++ | beqz TAB:TMP3, <1 // No metatable? ++ | lbu TMP3, TAB:TMP3->nomm ++ | andi TMP3, TMP3, 1<BC_ISEQV_Z // No metatable? ++ | lbu TMP3, TAB:TMP3->nomm ++ | andi TMP3, TMP3, 1<BC_ISEQV_Z // Or 'no __eq' flag set? ++ } ++ | j ->vmeta_equal // Handle __eq metamethod. ++ break; ++ ++ case BC_ISEQS: case BC_ISNES: ++ vk = op == BC_ISEQS; ++ | // RA = src*8, RD = str_const*8 (~), JMP with RD = target ++ | add RA, BASE, RA ++ | addi PC, PC, 4 ++ | ld CARG1, 0(RA) ++ | sub RD, KBASE, RD ++ | lhu TMP2, -4+OFS_RD(PC) ++ | ld CARG2, -8(RD) // KBASE-8-str_const*8 ++ | li TMP0, LJ_TSTR ++ | decode_BC4b TMP2 ++ | settp CARG2, TMP0 ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | xor TMP0, CARG1, CARG2 // TMP2=0: A==D; TMP2!=0: A!=D ++ | addw TMP2, TMP2, TMP3 ++ if (vk) { ++ | seqz TMP4, TMP0 ++ } else { ++ | snez TMP4, TMP0 ++ } ++ | neg TMP4, TMP4 ++ | and TMP2, TMP2, TMP4 ++ | add PC, PC, TMP2 ++ | ins_next ++ break; ++ ++ case BC_ISEQN: case BC_ISNEN: ++ vk = op == BC_ISEQN; ++ | // RA = src*8, RD = num_const*8, JMP with RD = target ++ | add RA, BASE, RA ++ | add RD, KBASE, RD ++ | ld CARG1, 0(RA) ++ | ld CARG2, 0(RD) ++ | lhu TMP2, OFS_RD(PC) ++ | gettp CARG3, CARG1 ++ | gettp CARG4, CARG2 ++ | addi PC, PC, 4 ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ if (vk) { ++ |->BC_ISEQN_Z: ++ } else { ++ |->BC_ISNEN_Z: ++ } ++ | decode_BC4b TMP2 ++ | bne CARG3, TISNUM, >4 ++ | addw TMP2, TMP2, TMP3 ++ | bne CARG4, TISNUM, >6 ++ | xor TMP0, CARG1, CARG2 // TMP0=0: A==D; TMP0!=0: A!=D ++ |1: ++ if (vk) { ++ | seqz TMP4, TMP0 ++ | neg TMP4, TMP4 ++ | and TMP2, TMP2, TMP4 ++ | add PC, PC, TMP2 ++ |2: ++ } else { ++ | snez TMP4, TMP0 ++ | neg TMP4, TMP4 ++ | and TMP2, TMP2, TMP4 ++ |2: ++ | add PC, PC, TMP2 ++ } ++ |3: ++ | ins_next ++ | ++ |4: // RA is not an integer. ++ | addw TMP2, TMP2, TMP3 ++ | bgeu CARG3, TISNUM, <2 ++ | fmv.d.x FTMP0, CARG1 ++ | fmv.d.x FTMP2, CARG2 ++ | bne CARG4, TISNUM, >5 ++ |// RA is a number, RD is an integer. ++ | fcvt.d.w FTMP2, CARG2 ++ | ++ |5: // RA and RD are both numbers. ++ | feq.d TMP0, FTMP0, FTMP2 ++ | seqz TMP0, TMP0 ++ | j <1 ++ | ++ |6: // RA is an integer, RD is a number. ++ | bgeu CARG4, TISNUM, <2 ++ | fcvt.d.w FTMP0, CARG1 ++ | fmv.d.x FTMP2, CARG2 ++ | j <5 ++ | ++ break; ++ ++ case BC_ISEQP: case BC_ISNEP: ++ vk = op == BC_ISEQP; ++ | // RA = src*8, RD = primitive_type*8 (~), JMP with RD = target ++ | add RA, BASE, RA ++ | srliw TMP0, RD, 3 ++ | ld TMP1, 0(RA) ++ | not TMP0, TMP0 // ~TMP0: ~0 ~1 ~2 ++ | lhu TMP2, OFS_RD(PC) // TMP2: RD in next INS, branch target ++ | gettp TMP1, TMP1 ++ | addi PC, PC, 4 ++ | xor TMP0, TMP1, TMP0 // TMP0=0 A=D; TMP0!=0 A!=D ++ | decode_BC4b TMP2 ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | addw TMP2, TMP2, TMP3 // TMP2=(jump-0x8000)<<2 ++ if (vk) { ++ | seqz TMP4, TMP0 ++ } else { ++ | snez TMP4, TMP0 ++ } ++ | neg TMP4, TMP4 ++ | and TMP2, TMP2, TMP4 ++ | add PC, PC, TMP2 ++ | ins_next ++ break; ++ ++ /* -- Unary test and copy ops ------------------------------------------- */ ++ ++ case BC_ISTC: case BC_ISFC: case BC_IST: case BC_ISF: ++ | // RA = dst*8 or unused, RD = src*8, JMP with RD = target ++ | add RD, BASE, RD ++ | lhu TMP2, OFS_RD(PC) ++ | ld TMP0, 0(RD) ++ | addi PC, PC, 4 ++ | gettp TMP0, TMP0 ++ | add RA, BASE, RA ++ | sltiu TMP0, TMP0, LJ_TISTRUECOND // TMP0=1 true; TMP0=0 false ++ | decode_BC4b TMP2 ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | ld CRET1, 0(RD) ++ | addw TMP2, TMP2, TMP3 // (jump-0x8000)<<2 ++ if (op == BC_IST || op == BC_ISTC) { ++ | beqz TMP0, >1 ++ if (op == BC_ISTC) { ++ | sd CRET1, 0(RA) ++ } ++ } else { ++ | bnez TMP0, >1 ++ if (op == BC_ISFC) { ++ | sd CRET1, 0(RA) ++ } ++ } ++ | add PC, PC, TMP2 ++ |1: ++ | ins_next ++ break; ++ ++ case BC_ISTYPE: ++ | // RA = src*8, RD = -type*8 ++ | add TMP0, BASE, RA ++ | srliw TMP1, RD, 3 ++ | ld TMP0, 0(TMP0) ++ | gettp TMP0, TMP0 ++ | add TMP0, TMP0, TMP1 // if itype of RA == type, then TMP0=0 ++ | bxnez TMP0, ->vmeta_istype ++ | ins_next ++ break; ++ case BC_ISNUM: ++ | // RA = src*8, RD = -(TISNUM-1)*8 ++ | add TMP0, BASE, RA ++ | ld TMP0, 0(TMP0) ++ | checknum TMP0, ->vmeta_istype ++ | ins_next ++ break; ++ ++ /* -- Unary ops --------------------------------------------------------- */ ++ ++ case BC_MOV: ++ | // RA = dst*8, RD = src*8 ++ | add RD, BASE, RD ++ | add RA, BASE, RA ++ | ld TMP0, 0(RD) ++ | ins_next1 ++ | sd TMP0, 0(RA) ++ | ins_next2 ++ break; ++ case BC_NOT: ++ | // RA = dst*8, RD = src*8 ++ | add RD, BASE, RD ++ | add RA, BASE, RA ++ | ld TMP0, 0(RD) ++ | li TMP1, LJ_TTRUE ++ | ins_next1 ++ | gettp TMP0, TMP0 ++ | sltu TMP0, TMP1, TMP0 ++ | addiw TMP0, TMP0, 1 ++ | slli TMP0, TMP0, 47 ++ | not TMP0, TMP0 ++ | sd TMP0, 0(RA) ++ | ins_next2 ++ break; ++ case BC_UNM: ++ | // RA = dst*8, RD = src*8 ++ | add RB, BASE, RD ++ | add RA, BASE, RA ++ | ld TMP0, 0(RB) ++ | lui TMP1, 0x80000 ++ | gettp CARG3, TMP0 ++ | bne CARG3, TISNUM, >1 ++ | negw TMP0, TMP0 ++ | bxeq TMP0, TMP1, ->vmeta_unm // Meta handler deals with -2^31. ++ | zext.w TMP0, TMP0 ++ | settp_b TMP0, TISNUM ++ | j >2 ++ |1: ++ | sltiu TMP3, CARG3, LJ_TISNUM ++ | slli TMP1, TMP1, 32 ++ | bxeqz TMP3, ->vmeta_unm ++ | xor TMP0, TMP0, TMP1 // sign => ~sign ++ |2: ++ | sd TMP0, 0(RA) ++ | ins_next ++ break; ++ case BC_LEN: ++ | // RA = dst*8, RD = src*8 ++ | add CARG2, BASE, RD ++ | ld TMP0, 0(CARG2) ++ | add RA, BASE, RA ++ | gettp TMP1, TMP0 ++ | addi TMP2, TMP1, -LJ_TSTR ++ | cleartp STR:CARG1, TMP0 ++ | bnez TMP2, >2 ++ | lwu CARG1, STR:CARG1->len ++ |1: ++ | settp_b CARG1, TISNUM ++ | sd CARG1, 0(RA) ++ | ins_next ++ |2: ++ | addi TMP2, TMP1, -LJ_TTAB ++ | bxnez TMP2, ->vmeta_len ++#if LJ_52 ++ | ld TAB:TMP2, TAB:CARG1->metatable ++ | bnez TAB:TMP2, >9 ++ |3: ++#endif ++ |->BC_LEN_Z: ++ | call_intern BC_LEN, lj_tab_len // (GCtab *t) ++ | // Returns uint32_t (but less than 2^31). ++ | j <1 ++#if LJ_52 ++ |9: ++ | lbu TMP0, TAB:TMP2->nomm ++ | andi TMP0, TMP0, 1<vmeta_len ++#endif ++ break; ++ ++ /* -- Binary ops -------------------------------------------------------- */ ++ ++ |.macro fpmod, a, b, c ++ | fdiv.d FARG1, b, c ++ | jal ->vm_floor // floor(b/c) ++ | fmul.d a, FRET1, c ++ | fsub.d a, b, a // b - floor(b/c)*c ++ |.endmacro ++ | ++ |.macro ins_arithpre ++ ||vk = ((int)op - BC_ADDVN) / (BC_ADDNV-BC_ADDVN); ++ | // RA = dst*8, RB = src1*8, RC = src2*8 | num_const*8 ++ ||if (vk == 1) { ++ | // RA = dst*8, RB = num_const*8, RC = src1*8 ++ | decode_RB8 RC, INS ++ | decode_RDtoRC8 RB, RD ++ ||} else { ++ | // RA = dst*8, RB = src1*8, RC = num_const*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ ||} ++ ||switch (vk) { ++ ||case 0: // suffix is VN ++ | add RB, BASE, RB ++ | add RC, KBASE, RC ++ || break; ++ ||case 1: // suffix is NV ++ | add RC, BASE, RC ++ | add RB, KBASE, RB ++ || break; ++ ||default: // CAT or suffix is VV ++ | add RB, BASE, RB ++ | add RC, BASE, RC ++ || break; ++ ||} ++ |.endmacro ++ | ++ |.macro ins_arithfp, fpins, itype1, itype2 ++ | fld FTMP0, 0(RB) ++ | sltu itype1, itype1, TISNUM ++ | sltu itype2, itype2, TISNUM ++ | fld FTMP2, 0(RC) ++ | and itype1, itype1, itype2 ++ | add RA, BASE, RA ++ | bxeqz itype1, ->vmeta_arith ++ | fpins FRET1, FTMP0, FTMP2 ++ | ins_next1 ++ | fsd FRET1, 0(RA) ++ | ins_next2 ++ |.endmacro ++ | ++ |.macro ins_arithead, itype1, itype2, tval1, tval2 ++ | ld tval1, 0(RB) ++ | ld tval2, 0(RC) ++ | // Check for two integers. ++ | gettp itype1, tval1 ++ | gettp itype2, tval2 ++ |.endmacro ++ | ++ |.macro ins_arithdn, intins, fpins ++ | ins_arithpre ++ | ins_arithead TMP0, TMP1, CARG1, CARG2 ++ | bne TMP0, TISNUM, >1 ++ | bne TMP1, TISNUM, >1 ++ | sext.w CARG3, CARG1 ++ | sext.w CARG4, CARG2 ++ |.if "intins" == "addw" ++ | intins CRET1, CARG3, CARG4 ++ | xor TMP1, CRET1, CARG3 // ((y^a) & (y^b)) < 0: overflow. ++ | xor TMP2, CRET1, CARG4 ++ | and TMP1, TMP1, TMP2 ++ | add RA, BASE, RA ++ | bxltz TMP1, ->vmeta_arith ++ |.elif "intins" == "subw" ++ | intins CRET1, CARG3, CARG4 ++ | xor TMP1, CRET1, CARG3 // ((y^a) & (a^b)) < 0: overflow. ++ | xor TMP2, CARG3, CARG4 ++ | and TMP1, TMP1, TMP2 ++ | add RA, BASE, RA ++ | bxltz TMP1, ->vmeta_arith ++ |.elif "intins" == "mulw" ++ | mul TMP2, CARG3, CARG4 ++ | add RA, BASE, RA ++ | sext.w CRET1, TMP2 ++ | bxne CRET1, TMP2, ->vmeta_arith // 63-32bit not all 0 or 1: overflow. ++ |.endif ++ | zext.w CRET1, CRET1 ++ | settp_b CRET1, TISNUM ++ | sd CRET1, 0(RA) ++ | ins_next ++ |1: // Check for two numbers. ++ | ins_arithfp, fpins, TMP0, TMP1 ++ |.endmacro ++ | ++ |.macro ins_arithdiv, fpins ++ | ins_arithpre ++ | ins_arithead TMP0, TMP1, CARG1, CARG2 ++ | ins_arithfp, fpins, TMP0, TMP1 ++ |.endmacro ++ | ++ |.macro ins_arithmod, fpins, BC ++ | ins_arithpre ++ | ins_arithead TMP0, TMP1, CARG1, CARG2 ++ | bne TMP0, TISNUM, >1 ++ | bne TMP1, TISNUM, >1 ++ | sext.w CARG1, CARG1 ++ | sext.w CARG2, CARG2 ++ | add RA, BASE, RA ++ | bxeqz CARG2, ->vmeta_arith ++ | call_intern BC, lj_vm_modi ++ | zext.w CRET1, CRET1 ++ | settp_b CRET1, TISNUM ++ | sd CRET1, 0(RA) ++ | ins_next ++ |1: // Check for two numbers. ++ | ins_arithfp, fpins, TMP0, TMP1 ++ |.endmacro ++ ++ case BC_ADDVN: case BC_ADDNV: case BC_ADDVV: ++ | ins_arithdn addw, fadd.d ++ break; ++ case BC_SUBVN: case BC_SUBNV: case BC_SUBVV: ++ | ins_arithdn subw, fsub.d ++ break; ++ case BC_MULVN: case BC_MULNV: case BC_MULVV: ++ | ins_arithdn mulw, fmul.d ++ break; ++ case BC_DIVVN: case BC_DIVNV: case BC_DIVVV: ++ | ins_arithdiv fdiv.d ++ break; ++ case BC_MODVN: ++ | ins_arithmod fpmod, BC_MODVN ++ break; ++ case BC_MODNV: ++ | ins_arithmod fpmod, BC_MODNV ++ break; ++ case BC_MODVV: ++ | ins_arithmod fpmod, BC_MODVV ++ break; ++ case BC_POW: ++ | ins_arithpre ++ | ld CARG1, 0(RB) ++ | ld CARG2, 0(RC) ++ | gettp TMP0, CARG1 ++ | gettp TMP1, CARG2 ++ | sltiu TMP0, TMP0, LJ_TISNUM ++ | sltiu TMP1, TMP1, LJ_TISNUM ++ | and TMP0, TMP0, TMP1 ++ | add RA, BASE, RA ++ | bxeqz TMP0, ->vmeta_arith ++ | fld FARG1, 0(RB) ++ | fld FARG2, 0(RC) ++ | call_extern BC_POW, pow ++ | ins_next1 ++ | fsd FRET1, 0(RA) ++ | ins_next2 ++ break; ++ ++ case BC_CAT: ++ | // RA = dst*8, RB = src_start*8, RC = src_end*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | sub CARG3, RC, RB ++ | sd BASE, L->base ++ | add CARG2, BASE, RC ++ | mv MULTRES, RB ++ |->BC_CAT_Z: ++ | srliw CARG3, CARG3, 3 ++ | sd PC, SAVE_PC(sp) ++ | mv CARG1, L ++ | call_intern BC_CAT, lj_meta_cat // (lua_State *L, TValue *top, int left) ++ | // Returns NULL (finished) or TValue * (metamethod). ++ | ld BASE, L->base ++ | bxnez CRET1, ->vmeta_binop ++ | add RB, BASE, MULTRES ++ | ld TMP0, 0(RB) ++ | add RA, BASE, RA ++ | sd TMP0, 0(RA) ++ | ins_next ++ break; ++ ++ /* -- Constant ops ------------------------------------------------------ */ ++ ++ case BC_KSTR: ++ | // RA = dst*8, RD = str_const*8 (~) ++ | sub TMP1, KBASE, RD ++ | li TMP2, LJ_TSTR ++ | ld TMP0, -8(TMP1) // KBASE-8-str_const*8 ++ | add RA, BASE, RA ++ | settp TMP0, TMP2 ++ | sd TMP0, 0(RA) ++ | ins_next ++ break; ++ case BC_KCDATA: ++ break; ++ case BC_KSHORT: ++ | // RA = dst*8, RD = int16_literal*8 ++ | sraiw RD, INS, 16 ++ | add RA, BASE, RA ++ | zext.w RD, RD ++ | ins_next1 ++ | settp_b RD, TISNUM ++ | sd RD, 0(RA) ++ | ins_next2 ++ break; ++ case BC_KNUM: ++ | // RA = dst*8, RD = num_const*8 ++ | add RD, KBASE, RD ++ | add RA, BASE, RA ++ | ld TMP0, 0(RD) ++ | ins_next1 ++ | sd TMP0, 0(RA) ++ | ins_next2 ++ break; ++ case BC_KPRI: ++ | // RA = dst*8, RD = primitive_type*8 (~) ++ | add RA, BASE, RA ++ | slli TMP0, RD, 44 // 44+3 ++ | not TMP0, TMP0 ++ | ins_next1 ++ | sd TMP0, 0(RA) ++ | ins_next2 ++ break; ++ case BC_KNIL: ++ | // RA = base*8, RD = end*8 ++ | add RA, BASE, RA ++ | sd TISNIL, 0(RA) ++ | addi RA, RA, 8 ++ | add RD, BASE, RD ++ |1: ++ | sd TISNIL, 0(RA) ++ | slt TMP0, RA, RD ++ | addi RA, RA, 8 ++ | bnez TMP0, <1 ++ | ins_next ++ break; ++ ++ /* -- Upvalue and function ops ------------------------------------------ */ ++ ++ case BC_UGET: ++ | // RA = dst*8, RD = uvnum*8 ++ | ld LFUNC:TMP0, FRAME_FUNC(BASE) ++ | add RA, BASE, RA ++ | cleartp LFUNC:TMP0 ++ | add RD, RD, LFUNC:TMP0 ++ | ld UPVAL:TMP0, LFUNC:RD->uvptr ++ | ld TMP1, UPVAL:TMP0->v ++ | ld TMP2, 0(TMP1) ++ | ins_next1 ++ | sd TMP2, 0(RA) ++ | ins_next2 ++ break; ++ case BC_USETV: ++ | // RA = uvnum*8, RD = src*8 ++ | ld LFUNC:TMP0, FRAME_FUNC(BASE) ++ | add RD, BASE, RD ++ | cleartp LFUNC:TMP0 ++ | add RA, RA, LFUNC:TMP0 ++ | ld UPVAL:TMP0, LFUNC:RA->uvptr ++ | ld CRET1, 0(RD) ++ | lbu TMP3, UPVAL:TMP0->marked ++ | ld CARG2, UPVAL:TMP0->v ++ | andi TMP3, TMP3, LJ_GC_BLACK // isblack(uv) ++ | lbu TMP0, UPVAL:TMP0->closed ++ | gettp TMP2, CRET1 ++ | sd CRET1, 0(CARG2) ++ | or TMP3, TMP3, TMP0 ++ | li TMP0, LJ_GC_BLACK|1 ++ | addi TMP2, TMP2, -(LJ_TNUMX+1) ++ | beq TMP3, TMP0, >2 // Upvalue is closed and black? ++ |1: ++ | ins_next ++ | ++ |2: // Check if new value is collectable. ++ | sltiu TMP0, TMP2, LJ_TISGCV - (LJ_TNUMX+1) ++ | cleartp GCOBJ:CRET1, CRET1 ++ | beqz TMP0, <1 // tvisgcv(v) ++ | lbu TMP3, GCOBJ:CRET1->gch.marked ++ | andi TMP3, TMP3, LJ_GC_WHITES // iswhite(v) ++ | beqz TMP3, <1 ++ | // Crossed a write barrier. Move the barrier forward. ++ | mv CARG1, GL ++ | call_intern BC_USETV, lj_gc_barrieruv // (global_State *g, TValue *tv) ++ | j <1 ++ break; ++ case BC_USETS: ++ | // RA = uvnum*8, RD = str_const*8 (~) ++ | ld LFUNC:TMP0, FRAME_FUNC(BASE) ++ | sub TMP1, KBASE, RD ++ | cleartp LFUNC:TMP0 ++ | add RA, RA, LFUNC:TMP0 ++ | ld UPVAL:TMP0, LFUNC:RA->uvptr ++ | ld STR:TMP1, -8(TMP1) // KBASE-8-str_const*8 ++ | lbu TMP2, UPVAL:TMP0->marked ++ | ld CARG2, UPVAL:TMP0->v ++ | lbu TMP3, STR:TMP1->marked ++ | andi TMP4, TMP2, LJ_GC_BLACK // isblack(uv) ++ | lbu TMP2, UPVAL:TMP0->closed ++ | li TMP0, LJ_TSTR ++ | settp TMP1, TMP0 ++ | sd TMP1, 0(CARG2) ++ | bnez TMP4, >2 ++ |1: ++ | ins_next ++ | ++ |2: // Check if string is white and ensure upvalue is closed. ++ | beqz TMP2, <1 ++ | andi TMP0, TMP3, LJ_GC_WHITES // iswhite(str) ++ | beqz TMP0, <1 ++ | // Crossed a write barrier. Move the barrier forward. ++ | mv CARG1, GL ++ | call_intern BC_USETS, lj_gc_barrieruv // (global_State *g, TValue *tv) ++ | j <1 ++ break; ++ case BC_USETN: ++ | // RA = uvnum*8, RD = num_const*8 ++ | ld LFUNC:TMP0, FRAME_FUNC(BASE) ++ | add RD, KBASE, RD ++ | cleartp LFUNC:TMP0 ++ | add TMP0, RA, LFUNC:TMP0 ++ | ld UPVAL:TMP0, LFUNC:TMP0->uvptr ++ | ld TMP1, 0(RD) ++ | ld TMP0, UPVAL:TMP0->v ++ | sd TMP1, 0(TMP0) ++ | ins_next ++ break; ++ case BC_USETP: ++ | // RA = uvnum*8, RD = primitive_type*8 (~) ++ | ld LFUNC:TMP0, FRAME_FUNC(BASE) ++ | slli TMP2, RD, 44 ++ | cleartp LFUNC:TMP0 ++ | add TMP0, RA, LFUNC:TMP0 ++ | not TMP2, TMP2 ++ | ld UPVAL:TMP0, LFUNC:TMP0->uvptr ++ | ld TMP1, UPVAL:TMP0->v ++ | sd TMP2, 0(TMP1) ++ | ins_next ++ break; ++ ++ case BC_UCLO: ++ | // RA = level*8, RD = target ++ | ld TMP2, L->openupval ++ | branch_RD // Do this first since RD is not saved. ++ | sd BASE, L->base ++ | mv CARG1, L ++ | beqz TMP2, >1 ++ | add CARG2, BASE, RA ++ | call_intern BC_UCLO, lj_func_closeuv // (lua_State *L, TValue *level) ++ | ld BASE, L->base ++ |1: ++ | ins_next ++ break; ++ ++ case BC_FNEW: ++ | // RA = dst*8, RD = proto_const*8 (~) (holding function prototype) ++ | sub TMP1, KBASE, RD ++ | ld CARG3, FRAME_FUNC(BASE) ++ | ld CARG2, -8(TMP1) // KBASE-8-tab_const*8 ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) ++ | cleartp CARG3 ++ | mv CARG1, L ++ | // (lua_State *L, GCproto *pt, GCfuncL *parent) ++ | call_intern BC_FNEW, lj_func_newL_gc ++ | // Returns GCfuncL *. ++ | li TMP0, LJ_TFUNC ++ | ld BASE, L->base ++ | settp CRET1, TMP0 ++ | add RA, BASE, RA ++ | sd CRET1, 0(RA) ++ | ins_next ++ break; ++ ++ /* -- Table ops --------------------------------------------------------- */ ++ ++ case BC_TNEW: ++ case BC_TDUP: ++ | // RA = dst*8, RD = (hbits|asize)*8 | tab_const*8 (~) ++ | ld TMP0, GL->gc.total ++ | ld TMP1, GL->gc.threshold ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) ++ | bgeu TMP0, TMP1, >5 ++ |1: ++ if (op == BC_TNEW) { ++ | srliw CARG2, RD, 3 ++ | andi CARG2, CARG2, 0x7ff ++ | lzi TMP0, 0x801 ++ | addiw TMP2, CARG2, -0x7ff ++ | srliw CARG3, RD, 14 ++ | seqz TMP3, TMP2 ++ | neg TMP4, TMP3 ++ | xor CARG1, TMP0, CARG2 // CARG2 = TMP3 ? TMP0 : CARG2 ++ | and CARG1, CARG1, TMP4 ++ | xor CARG2, CARG2, CARG1 ++ | mv CARG1, L ++ | // (lua_State *L, int32_t asize, uint32_t hbits) ++ | call_intern BC_TNEW, lj_tab_new ++ | // Returns Table *. ++ } else { ++ | sub TMP1, KBASE, RD ++ | mv CARG1, L ++ | ld CARG2, -8(TMP1) // KBASE-8-str_const*8 ++ | call_intern BC_TDUP, lj_tab_dup // (lua_State *L, Table *kt) ++ | // Returns Table *. ++ } ++ | li TMP0, LJ_TTAB ++ | ld BASE, L->base ++ | ins_next1 ++ | settp CRET1, TMP0 ++ | add RA, BASE, RA ++ | sd CRET1, 0(RA) ++ | ins_next2 ++ |5: ++ | mv MULTRES, RD ++ | mv CARG1, L ++ if (op == BC_TNEW) { ++ | call_intern BC_TNEW, lj_gc_step_fixtop // (lua_State *L) ++ } else { ++ | call_intern BC_TDUP, lj_gc_step_fixtop // (lua_State *L) ++ } ++ | mv RD, MULTRES ++ | j <1 ++ break; ++ ++ case BC_GGET: ++ | // RA = dst*8, RD = str_const*8 (~) ++ case BC_GSET: ++ | // RA = src*8, RD = str_const*8 (~) ++ | ld LFUNC:TMP0, FRAME_FUNC(BASE) ++ | sub TMP1, KBASE, RD ++ | ld STR:RC, -8(TMP1) // KBASE-8-str_const*8 ++ | cleartp LFUNC:TMP0 ++ | ld TAB:RB, LFUNC:TMP0->env ++ | add RA, BASE, RA ++ if (op == BC_GGET) { ++ | j ->BC_TGETS_Z ++ } else { ++ | j ->BC_TSETS_Z ++ } ++ break; ++ ++ case BC_TGETV: ++ | // RA = dst*8, RB = table*8, RC = key*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add CARG2, BASE, RB ++ | add CARG3, BASE, RC ++ | ld TAB:RB, 0(CARG2) ++ | ld TMP2, 0(CARG3) ++ | add RA, BASE, RA ++ | checktab TAB:RB, ->vmeta_tgetv ++ | gettp TMP3, TMP2 ++ | lw TMP0, TAB:RB->asize ++ | bne TMP3, TISNUM, >5 // Integer key? ++ | sext.w TMP2, TMP2 ++ | ld TMP1, TAB:RB->array ++ | bxgeu TMP2, TMP0, ->vmeta_tgetv // Integer key and in array part? ++ | slliw TMP2, TMP2, 3 ++ | add TMP2, TMP1, TMP2 ++ | ld CRET1, 0(TMP2) ++ | beq CRET1, TISNIL, >2 ++ |1: ++ | sd CRET1, 0(RA) ++ | ins_next ++ | ++ |2: // Check for __index if table value is nil. ++ | ld TAB:TMP2, TAB:RB->metatable ++ | beqz TAB:TMP2, <1 // No metatable: done. ++ | lbu TMP0, TAB:TMP2->nomm ++ | andi TMP0, TMP0, 1<vmeta_tgetv ++ | ++ |5: ++ | li TMP0, LJ_TSTR ++ | cleartp RC, TMP2 ++ | bxne TMP3, TMP0, ->vmeta_tgetv // String key? ++ | j ->BC_TGETS_Z ++ break; ++ case BC_TGETS: ++ | // RA = dst*8, RB = table*8, RC = str_const*8 (~) ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add CARG2, BASE, RB ++ | sub CARG3, KBASE, RC ++ | ld TAB:RB, 0(CARG2) ++ | add RA, BASE, RA ++ | ld STR:RC, -8(CARG3) // KBASE-8-str_const*8 ++ | checktab TAB:RB, ->vmeta_tgets1 ++ |->BC_TGETS_Z: ++ | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = dst*8 ++ | lw TMP0, TAB:RB->hmask ++ | lw TMP1, STR:RC->sid ++ | ld NODE:TMP2, TAB:RB->node ++ | and TMP1, TMP1, TMP0 // idx = str->sid & tab->hmask ++ | slliw TMP0, TMP1, 5 ++ | slliw TMP1, TMP1, 3 ++ | subw TMP1, TMP0, TMP1 ++ | li TMP3, LJ_TSTR ++ | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) ++ | settp STR:RC, TMP3 // Tagged key to look for. ++ |1: ++ | ld CARG1, NODE:TMP2->key ++ | ld CARG2, NODE:TMP2->val ++ | ld NODE:TMP1, NODE:TMP2->next ++ | ld TAB:TMP3, TAB:RB->metatable ++ | bne CARG1, RC, >4 ++ | beq CARG2, TISNIL, >5 // Key found, but nil value? ++ |3: ++ | sd CARG2, 0(RA) ++ | ins_next ++ | ++ |4: // Follow hash chain. ++ | mv NODE:TMP2, NODE:TMP1 ++ | bnez NODE:TMP1, <1 ++ | // End of hash chain: key not found, nil result. ++ | ++ |5: // Check for __index if table value is nil. ++ | mv CARG2, TISNIL ++ | beqz TAB:TMP3, <3 // No metatable: done. ++ | lbu TMP0, TAB:TMP3->nomm ++ | andi TMP0, TMP0, 1<vmeta_tgets ++ break; ++ case BC_TGETB: ++ | // RA = dst*8, RB = table*8, RC = index*8 ++ | decode_RB8 RB, INS ++ | add CARG2, BASE, RB ++ | decode_RDtoRC8 RC, RD ++ | ld TAB:RB, 0(CARG2) ++ | add RA, BASE, RA ++ | srliw TMP0, RC, 3 ++ | checktab TAB:RB, ->vmeta_tgetb ++ | lw TMP1, TAB:RB->asize ++ | ld TMP2, TAB:RB->array ++ | bxgeu TMP0, TMP1, ->vmeta_tgetb ++ | add RC, TMP2, RC ++ | ld CRET1, 0(RC) ++ | beq CRET1, TISNIL, >5 ++ |1: ++ | sd CRET1, 0(RA) ++ | ins_next ++ | ++ |5: // Check for __index if table value is nil. ++ | ld TAB:TMP2, TAB:RB->metatable ++ | beqz TAB:TMP2, <1 // No metatable: done. ++ | lbu TMP1, TAB:TMP2->nomm ++ | andi TMP1, TMP1, 1<vmeta_tgetb // Caveat: preserve TMP0 and CARG2! ++ break; ++ case BC_TGETR: ++ | // RA = dst*8, RB = table*8, RC = key*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add RB, BASE, RB ++ | add RC, BASE, RC ++ | ld TAB:CARG1, 0(RB) ++ | lw CARG2, 0(RC) ++ | add RA, BASE, RA ++ | cleartp TAB:CARG1 ++ | lw TMP0, TAB:CARG1->asize ++ | ld TMP1, TAB:CARG1->array ++ | bxgeu CARG2, TMP0, ->vmeta_tgetr // In array part? ++ | slliw TMP2, CARG2, 3 ++ | add TMP3, TMP1, TMP2 ++ | ld TMP1, 0(TMP3) ++ |->BC_TGETR_Z: ++ | ins_next1 ++ | sd TMP1, 0(RA) ++ | ins_next2 ++ break; ++ ++ case BC_TSETV: ++ | // RA = src*8, RB = table*8, RC = key*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add CARG2, BASE, RB ++ | add CARG3, BASE, RC ++ | ld TAB:RB, 0(CARG2) ++ | ld TMP2, 0(CARG3) ++ | add RA, BASE, RA ++ | checktab TAB:RB, ->vmeta_tsetv ++ | sext.w RC, TMP2 ++ | checkint TMP2, >5 ++ | lw TMP0, TAB:RB->asize ++ | ld TMP1, TAB:RB->array ++ | bxgeu RC, TMP0, ->vmeta_tsetv // Integer key and in array part? ++ | slliw TMP2, RC, 3 ++ | add TMP1, TMP1, TMP2 ++ | lbu TMP3, TAB:RB->marked ++ | ld TMP0, 0(TMP1) ++ | ld CRET1, 0(RA) ++ | beq TMP0, TISNIL, >3 ++ |1: ++ | andi TMP2, TMP3, LJ_GC_BLACK // isblack(table) ++ | sd CRET1, 0(TMP1) ++ | bnez TMP2, >7 ++ |2: ++ | ins_next ++ | ++ |3: // Check for __newindex if previous value is nil. ++ | ld TAB:TMP2, TAB:RB->metatable ++ | beqz TAB:TMP2, <1 // No metatable: done. ++ | lbu TMP2, TAB:TMP2->nomm ++ | andi TMP2, TMP2, 1<vmeta_tsetv ++ |5: ++ | gettp TMP0, TMP2 ++ | addi TMP0, TMP0, -LJ_TSTR ++ | bxnez TMP0, ->vmeta_tsetv ++ | cleartp STR:RC, TMP2 ++ | j ->BC_TSETS_Z // String key? ++ | ++ |7: // Possible table write barrier for the value. Skip valiswhite check. ++ | barrierback TAB:RB, TMP3, TMP0, <2 ++ break; ++ case BC_TSETS: ++ | // RA = src*8, RB = table*8, RC = str_const*8 (~) ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add CARG2, BASE, RB ++ | sub CARG3, KBASE, RC ++ | ld TAB:RB, 0(CARG2) ++ | ld RC, -8(CARG3) // KBASE-8-str_const*8 ++ | add RA, BASE, RA ++ | cleartp STR:RC ++ | checktab TAB:RB, ->vmeta_tsets1 ++ |->BC_TSETS_Z: ++ | // TAB:RB = GCtab *, STR:RC = GCstr *, RA = BASE+src*8 ++ | lw TMP0, TAB:RB->hmask ++ | lw TMP1, STR:RC->sid ++ | ld NODE:TMP2, TAB:RB->node ++ | sb x0, TAB:RB->nomm // Clear metamethod cache. ++ | and TMP1, TMP1, TMP0 // idx = str->sid & tab->hmask ++ | slliw TMP0, TMP1, 5 ++ | slliw TMP1, TMP1, 3 ++ | subw TMP1, TMP0, TMP1 ++ | li TMP3, LJ_TSTR ++ | add NODE:TMP2, NODE:TMP2, TMP1 // node = tab->node + (idx*32-idx*8) ++ | settp STR:RC, TMP3 // Tagged key to look for. ++ | fld FTMP0, 0(RA) ++ |1: ++ | ld TMP0, NODE:TMP2->key ++ | ld CARG2, NODE:TMP2->val ++ | ld NODE:TMP1, NODE:TMP2->next ++ | lbu TMP3, TAB:RB->marked ++ | bne TMP0, RC, >5 ++ | ld TAB:TMP0, TAB:RB->metatable ++ | beq CARG2, TISNIL, >4 // Key found, but nil value? ++ |2: ++ | andi TMP3, TMP3, LJ_GC_BLACK // isblack(table) ++ | fsd FTMP0, NODE:TMP2->val ++ | bnez TMP3, >7 ++ |3: ++ | ins_next ++ | ++ |4: // Check for __newindex if previous value is nil. ++ | beqz TAB:TMP0, <2 // No metatable: done. ++ | lbu TMP0, TAB:TMP0->nomm ++ | andi TMP0, TMP0, 1<vmeta_tsets ++ | ++ |5: // Follow hash chain. ++ | mv NODE:TMP2, NODE:TMP1 ++ | bnez NODE:TMP1, <1 ++ | // End of hash chain: key not found, add a new one ++ | ++ | // But check for __newindex first. ++ | ld TAB:TMP2, TAB:RB->metatable ++ | addi CARG3, GL, offsetof(global_State, tmptv) ++ | beqz TAB:TMP2, >6 // No metatable: continue. ++ | lbu TMP0, TAB:TMP2->nomm ++ | andi TMP0, TMP0, 1<vmeta_tsets // 'no __newindex' flag NOT set: check. ++ |6: ++ | sd RC, 0(CARG3) ++ | sd BASE, L->base ++ | mv CARG2, TAB:RB ++ | sd PC, SAVE_PC(sp) ++ | mv CARG1, L ++ | // (lua_State *L, GCtab *t, TValue *k) ++ | call_intern BC_TSETS, lj_tab_newkey ++ | // Returns TValue *. ++ | ld BASE, L->base ++ | fsd FTMP0, 0(CRET1) ++ | j <3 // No 2nd write barrier needed. ++ | ++ |7: // Possible table write barrier for the value. Skip valiswhite check. ++ | barrierback TAB:RB, TMP3, TMP0, <3 ++ break; ++ case BC_TSETB: ++ | // RA = src*8, RB = table*8, RC = index*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add CARG2, BASE, RB ++ | add RA, BASE, RA ++ | ld TAB:RB, 0(CARG2) ++ | srliw TMP0, RC, 3 ++ | checktab RB, ->vmeta_tsetb ++ | lw TMP1, TAB:RB->asize ++ | ld TMP2, TAB:RB->array ++ | bxgeu TMP0, TMP1, ->vmeta_tsetb ++ | add RC, TMP2, RC ++ | ld TMP1, 0(RC) ++ | lbu TMP3, TAB:RB->marked ++ | beq TMP1, TISNIL, >5 ++ |1: ++ | ld CRET1, 0(RA) ++ | andi TMP1, TMP3, LJ_GC_BLACK // isblack(table) ++ | sd CRET1, 0(RC) ++ | bnez TMP1, >7 ++ |2: ++ | ins_next ++ | ++ |5: // Check for __newindex if previous value is nil. ++ | ld TAB:TMP2, TAB:RB->metatable ++ | beqz TAB:TMP2, <1 // No metatable: done. ++ | lbu TMP1, TAB:TMP2->nomm ++ | andi TMP1, TMP1, 1<vmeta_tsetb // Caveat: preserve TMP0 and CARG2! ++ | ++ |7: // Possible table write barrier for the value. Skip valiswhite check. ++ | barrierback TAB:RB, TMP3, TMP0, <2 ++ break; ++ case BC_TSETR: ++ | // RA = dst*8, RB = table*8, RC = key*8 ++ | decode_RB8 RB, INS ++ | decode_RDtoRC8 RC, RD ++ | add CARG1, BASE, RB ++ | add CARG3, BASE, RC ++ | ld TAB:CARG2, 0(CARG1) ++ | lw CARG3, 0(CARG3) ++ | cleartp TAB:CARG2 ++ | lbu TMP3, TAB:CARG2->marked ++ | lw TMP0, TAB:CARG2->asize ++ | ld TMP1, TAB:CARG2->array ++ | andi TMP2, TMP3, LJ_GC_BLACK // isblack(table) ++ | add RA, BASE, RA ++ | bnez TMP2, >7 ++ |2: ++ | bxgeu CARG3, TMP0, ->vmeta_tsetr // In array part? ++ | slliw TMP2, CARG3, 3 ++ | add CRET1, TMP1, TMP2 ++ |->BC_TSETR_Z: ++ | ld TMP1, 0(RA) ++ | ins_next1 ++ | sd TMP1, 0(CRET1) ++ | ins_next2 ++ | ++ |7: // Possible table write barrier for the value. Skip valiswhite check. ++ | barrierback TAB:CARG2, TMP3, CRET1, <2 ++ break; ++ ++ case BC_TSETM: ++ | // RA = base*8 (table at base-1), RD = num_const*8 (start index) ++ | add RA, BASE, RA ++ |1: ++ | add TMP3, KBASE, RD ++ | ld TAB:CARG2, -8(RA) // Guaranteed to be a table. ++ | addiw TMP0, MULTRES, -8 ++ | lw TMP3, 0(TMP3) // Integer constant is in lo-word. ++ | srliw CARG3, TMP0, 3 ++ | beqz TMP0, >4 // Nothing to copy? ++ | cleartp TAB:CARG2 ++ | addw CARG3, CARG3, TMP3 ++ | lw TMP2, TAB:CARG2->asize ++ | slliw TMP1, TMP3, 3 ++ | lbu TMP3, TAB:CARG2->marked ++ | ld CARG1, TAB:CARG2->array ++ | bltu TMP2, CARG3, >5 ++ | add TMP2, RA, TMP0 ++ | add TMP1, TMP1, CARG1 ++ | andi TMP0, TMP3, LJ_GC_BLACK // isblack(table) ++ |3: // Copy result slots to table. ++ | ld CRET1, 0(RA) ++ | addi RA, RA, 8 ++ | sd CRET1, 0(TMP1) ++ | addi TMP1, TMP1, 8 ++ | bltu RA, TMP2, <3 ++ | bnez TMP0, >7 ++ |4: ++ | ins_next ++ | ++ |5: // Need to resize array part. ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) ++ | mv BASE, RD ++ | mv CARG1, L ++ | // (lua_State *L, GCtab *t, int nasize) ++ | call_intern BC_TSETM, lj_tab_reasize ++ | // Must not reallocate the stack. ++ | mv RD, BASE ++ | ld BASE, L->base // Reload BASE for lack of a saved register. ++ | j <1 ++ | ++ |7: // Possible table write barrier for any value. Skip valiswhite check. ++ | barrierback TAB:CARG2, TMP3, TMP0, <4 ++ break; ++ ++ /* -- Calls and vararg handling ----------------------------------------- */ ++ ++ case BC_CALLM: ++ | // RA = base*8, (RB = (nresults+1)*8,) RC = extra_nargs*8 ++ | decode_RDtoRC8 NARGS8:RC, RD ++ | addw NARGS8:RC, NARGS8:RC, MULTRES ++ | j ->BC_CALL_Z ++ break; ++ case BC_CALL: ++ | // RA = base*8, (RB = (nresults+1)*8,) RC = (nargs+1)*8 ++ | decode_RDtoRC8 NARGS8:RC, RD ++ |->BC_CALL_Z: ++ | mv TMP2, BASE ++ | add BASE, BASE, RA ++ | ld LFUNC:RB, 0(BASE) ++ | addi BASE, BASE, 16 ++ | addiw NARGS8:RC, NARGS8:RC, -8 ++ | checkfunc RB, ->vmeta_call ++ | ins_call ++ break; ++ ++ case BC_CALLMT: ++ | // RA = base*8, (RB = 0,) RC = extra_nargs*8 ++ | addw NARGS8:RD, NARGS8:RD, MULTRES ++ | j ->BC_CALLT_Z1 ++ break; ++ case BC_CALLT: ++ | // RA = base*8, (RB = 0,) RC = (nargs+1)*8 ++ |->BC_CALLT_Z1: ++ | add RA, BASE, RA ++ | ld LFUNC:RB, 0(RA) ++ | mv NARGS8:RC, RD ++ | ld TMP1, FRAME_PC(BASE) ++ | addi RA, RA, 16 ++ | addiw NARGS8:RC, NARGS8:RC, -8 ++ | checktp CARG3, LFUNC:RB, -LJ_TFUNC, ->vmeta_callt ++ |->BC_CALLT_Z: ++ | andi TMP0, TMP1, FRAME_TYPE // Caveat: preserve TMP0 until the 'or'. ++ | lbu TMP3, LFUNC:CARG3->ffid ++ | xori TMP2, TMP1, FRAME_VARG ++ | bnez TMP0, >7 ++ |1: ++ | sd LFUNC:RB, FRAME_FUNC(BASE) // Copy function down, but keep PC. ++ | sltiu CARG4, TMP3, 2 // (> FF_C) Calling a fast function? ++ | mv TMP2, BASE ++ | mv RB, CARG3 ++ | mv TMP3, NARGS8:RC ++ | beqz NARGS8:RC, >3 ++ |2: ++ | ld CRET1, 0(RA) ++ | addi RA, RA, 8 ++ | addiw TMP3, TMP3, -8 ++ | sd CRET1, 0(TMP2) ++ | addi TMP2, TMP2, 8 ++ | bnez TMP3, <2 ++ |3: ++ | or TMP0, TMP0, CARG4 ++ | beqz TMP0, >5 ++ |4: ++ | ins_callt ++ | ++ |5: // Tailcall to a fast function with a Lua frame below. ++ | lw INS, -4(TMP1) ++ | decode_RA8 RA, INS ++ | sub TMP1, BASE, RA ++ | ld TMP1, -32(TMP1) ++ | cleartp LFUNC:TMP1 ++ | ld TMP1, LFUNC:TMP1->pc ++ | ld KBASE, PC2PROTO(k)(TMP1) // Need to prepare KBASE. ++ | j <4 ++ | ++ |7: // Tailcall from a vararg function. ++ | andi CARG4, TMP2, FRAME_TYPEP ++ | sub TMP2, BASE, TMP2 // Relocate BASE down. ++ | bnez CARG4, <1 // Vararg frame below? ++ | mv BASE, TMP2 ++ | ld TMP1, FRAME_PC(TMP2) ++ | andi TMP0, TMP1, FRAME_TYPE ++ | j <1 ++ break; ++ ++ case BC_ITERC: ++ | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 ((2+1)*8)) ++ | mv TMP2, BASE // Save old BASE for vmeta_call. ++ | add BASE, BASE, RA ++ | ld RB, -24(BASE) //A, A+1, A+2 = A-3, A-2, A-1. ++ | ld CARG1, -16(BASE) ++ | ld CARG2, -8(BASE) ++ | li NARGS8:RC, 16 // Iterators get 2 arguments. ++ | sd RB, 0(BASE) // Copy callable. ++ | sd CARG1, 16(BASE) // Copy state. ++ | sd CARG2, 24(BASE) // Copy control var. ++ | addi BASE, BASE, 16 ++ | checkfunc RB, ->vmeta_call ++ | ins_call ++ break; ++ ++ case BC_ITERN: ++ | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8) ++ |->vm_IITERN: ++ | add RA, BASE, RA ++ | ld TAB:RB, -16(RA) ++ | lw RC, -8(RA) // Get index from control var. ++ | cleartp TAB:RB ++ | addi PC, PC, 4 ++ | lw TMP0, TAB:RB->asize ++ | ld TMP1, TAB:RB->array ++ | slli CARG3, TISNUM, 47 ++ |1: // Traverse array part. ++ | bleu TMP0, RC, >5 // Index points after array part? ++ | slliw TMP3, RC, 3 ++ | add TMP3, TMP1, TMP3 ++ | ld CARG1, 0(TMP3) ++ | lhu RD, -4+OFS_RD(PC) // ITERL RD ++ | or TMP2, RC, CARG3 ++ | addiw RC, RC, 1 ++ | beq CARG1, TISNIL, <1 // Skip holes in array part. ++ | sd TMP2, 0(RA) ++ | sd CARG1, 8(RA) ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | decode_BC4b RD ++ | add RD, RD, TMP3 ++ | sw RC, -8(RA) // Update control var. ++ | add PC, PC, RD ++ |3: ++ | ins_next ++ | ++ |5: // Traverse hash part. ++ | lw TMP1, TAB:RB->hmask ++ | subw RC, RC, TMP0 ++ | ld TMP2, TAB:RB->node ++ |6: ++ | bltu TMP1, RC, <3 // End of iteration? Branch to ITERL+1. ++ | slliw TMP3, RC, 5 ++ | slliw RB, RC, 3 ++ | subw TMP3, TMP3, RB ++ | add NODE:TMP3, TMP3, TMP2 // node = tab->node + (idx*32-idx*8) ++ | ld CARG1, 0(NODE:TMP3) ++ | lhu RD, -4+OFS_RD(PC) // ITERL RD ++ | addiw RC, RC, 1 ++ | beq CARG1, TISNIL, <6 // Skip holes in hash part. ++ | ld CARG2, NODE:TMP3->key ++ | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | sd CARG1, 8(RA) ++ | addw RC, RC, TMP0 ++ | decode_BC4b RD ++ | addw RD, RD, TMP3 ++ | sd CARG2, 0(RA) ++ | add PC, PC, RD ++ | sw RC, -8(RA) // Update control var. ++ | j <3 ++ break; ++ ++ case BC_ISNEXT: ++ | // RA = base*8, RD = target (points to ITERN) ++ | add RA, BASE, RA ++ | srliw TMP0, RD, 1 ++ | ld CFUNC:CARG1, -24(RA) ++ | add TMP0, PC, TMP0 ++ | ld CARG2, -16(RA) ++ | ld CARG3, -8(RA) ++ | lui TMP2, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ | checkfunc CFUNC:CARG1, >5 ++ | gettp CARG2, CARG2 ++ | addi CARG2, CARG2, -LJ_TTAB ++ | lbu TMP1, CFUNC:CARG1->ffid ++ | addi CARG3, CARG3, -LJ_TNIL ++ | or TMP3, CARG2, CARG3 ++ | addi TMP1, TMP1, -FF_next_N ++ | or TMP3, TMP3, TMP1 ++ | lui TMP1, ((LJ_KEYINDEX - (((LJ_KEYINDEX & 0xfff)^0x800) - 0x800)) >> 12) & 0xfffff ++ | bnez TMP3, >5 ++ | add PC, TMP0, TMP2 ++ | addi TMP1, TMP1, (((LJ_KEYINDEX & 0xfff)^0x800) - 0x800) ++ | slli TMP1, TMP1, 32 ++ | sd TMP1, -8(RA) ++ |1: ++ | ins_next ++ |5: // Despecialize bytecode if any of the checks fail. ++ | li TMP3, BC_JMP ++ | li TMP1, BC_ITERC ++ | sb TMP3, -4+OFS_OP(PC) ++ | add PC, TMP0, TMP2 ++ | sb TMP1, OFS_OP(PC) ++ | j <1 ++ break; ++ ++ case BC_VARG: ++ | // RA = base*8, RB = (nresults+1)*8, RC = numparams*8 ++ | ld TMP0, FRAME_PC(BASE) ++ | decode_RDtoRC8 RC, RD ++ | decode_RB8 RB, INS ++ | add RC, BASE, RC ++ | add RA, BASE, RA ++ | addi RC, RC, FRAME_VARG ++ | add TMP2, RA, RB ++ | addi TMP3, BASE, -16 // TMP3 = vtop ++ | sub RC, RC, TMP0 // RC = vbase ++ | // Note: RC may now be even _above_ BASE if nargs was < numparams. ++ | sub TMP1, TMP3, RC ++ | beqz RB, >5 // Copy all varargs? ++ | addi TMP2, TMP2, -16 ++ |1: // Copy vararg slots to destination slots. ++ | ld CARG1, 0(RC) ++ | sltu TMP0, RC, TMP3 ++ | addi RC, RC, 8 ++ | bnez TMP0, >2 ++ | mv CARG1, TISNIL ++ |2: ++ | sd CARG1, 0(RA) ++ | sltu TMP0, RA, TMP2 ++ | addi RA, RA, 8 ++ | bnez TMP0, <1 ++ |3: ++ | ins_next ++ | ++ |5: // Copy all varargs. ++ | ld TMP0, L->maxstack ++ | li MULTRES, 8 // MULTRES = (0+1)*8 ++ | blez TMP1, <3 // No vararg slots? ++ | add TMP2, RA, TMP1 ++ | addi MULTRES, TMP1, 8 ++ | bltu TMP0, TMP2, >7 ++ |6: ++ | ld CRET1, 0(RC) ++ | addi RC, RC, 8 ++ | sd CRET1, 0(RA) ++ | addi RA, RA, 8 ++ | bltu RC, TMP3, <6 // More vararg slots? ++ | j <3 ++ | ++ |7: // Grow stack for varargs. ++ | sd RA, L->top ++ | sub RA, RA, BASE ++ | sd BASE, L->base ++ | sub BASE, RC, BASE // Need delta, because BASE may change. ++ | sd PC, SAVE_PC(sp) ++ | srliw CARG2, TMP1, 3 ++ | mv CARG1, L ++ | call_intern BC_VARG, lj_state_growstack // (lua_State *L, int n) ++ | mv RC, BASE ++ | ld BASE, L->base ++ | add RA, BASE, RA ++ | add RC, BASE, RC ++ | addi TMP3, BASE, -16 ++ | j <6 ++ break; ++ ++ /* -- Returns ----------------------------------------------------------- */ ++ ++ case BC_RETM: ++ | // RA = results*8, RD = extra_nresults*8 ++ | addw RD, RD, MULTRES ++ | j ->BC_RET_Z1 ++ break; ++ ++ case BC_RET: ++ | // RA = results*8, RD = (nresults+1)*8 ++ |->BC_RET_Z1: ++ | ld PC, FRAME_PC(BASE) ++ | add RA, BASE, RA ++ | mv MULTRES, RD ++ |1: ++ | andi TMP0, PC, FRAME_TYPE ++ | xori TMP1, PC, FRAME_VARG ++ | bnez TMP0, ->BC_RETV_Z ++ | ++ |->BC_RET_Z: ++ | // BASE = base, RA = resultptr, RD = (nresults+1)*8, PC = return ++ | lw INS, -4(PC) ++ | addi TMP2, BASE, -16 ++ | addi RC, RD, -8 ++ | decode_RA8 TMP0, INS ++ | decode_RB8 RB, INS ++ | sub BASE, TMP2, TMP0 ++ | add TMP3, TMP2, RB ++ | beqz RC, >3 ++ |2: ++ | ld CRET1, 0(RA) ++ | addi RA, RA, 8 ++ | addi RC, RC, -8 ++ | sd CRET1, 0(TMP2) ++ | addi TMP2, TMP2, 8 ++ | bnez RC, <2 ++ |3: ++ | addi TMP3, TMP3, -8 ++ |5: ++ | bltu TMP2, TMP3, >6 ++ | ld LFUNC:TMP1, FRAME_FUNC(BASE) ++ | cleartp LFUNC:TMP1 ++ | ld TMP1, LFUNC:TMP1->pc ++ | ld KBASE, PC2PROTO(k)(TMP1) ++ | ins_next ++ | ++ |6: // Fill up results with nil. ++ | sd TISNIL, 0(TMP2) ++ | addi TMP2, TMP2, 8 ++ | j <5 ++ | ++ |->BC_RETV_Z: // Non-standard return case. ++ | andi TMP2, TMP1, FRAME_TYPEP ++ | bxnez TMP2, ->vm_return ++ | // Return from vararg function: relocate BASE down. ++ | sub BASE, BASE, TMP1 ++ | ld PC, FRAME_PC(BASE) ++ | j <1 ++ break; ++ ++ case BC_RET0: case BC_RET1: ++ | // RA = results*8, RD = (nresults+1)*8 ++ | ld PC, FRAME_PC(BASE) ++ | add RA, BASE, RA ++ | mv MULTRES, RD ++ | andi TMP0, PC, FRAME_TYPE ++ | xori TMP1, PC, FRAME_VARG ++ | bnez TMP0, ->BC_RETV_Z ++ | lw INS, -4(PC) ++ | addi TMP2, BASE, -16 ++ if (op == BC_RET1) { ++ | ld CRET1, 0(RA) ++ } ++ | decode_RB8 RB, INS ++ | decode_RA8 RA, INS ++ | sub BASE, TMP2, RA ++ if (op == BC_RET1) { ++ | sd CRET1, 0(TMP2) ++ } ++ |5: ++ | bltu RD, RB, >6 ++ | ld TMP1, FRAME_FUNC(BASE) ++ | cleartp LFUNC:TMP1 ++ | ld TMP1, LFUNC:TMP1->pc ++ | ins_next1 ++ | ld KBASE, PC2PROTO(k)(TMP1) ++ | ins_next2 ++ | ++ |6: // Fill up results with nil. ++ | addi TMP2, TMP2, 8 ++ | addi RD, RD, 8 ++ if (op == BC_RET1) { ++ | sd TISNIL, 0(TMP2) ++ } else { ++ | sd TISNIL, -8(TMP2) ++ } ++ | j <5 ++ break; ++ ++ /* -- Loops and branches ------------------------------------------------ */ ++ ++ case BC_FORL: ++ | // Fall through. Assumes BC_IFORL follows. ++ break; ++ ++ case BC_JFORI: ++ case BC_JFORL: ++#if !LJ_HASJIT ++ break; ++#endif ++ case BC_FORI: ++ case BC_IFORL: ++ | // RA = base*8, RD = target (after end of loop or start of loop) ++ vk = (op == BC_IFORL || op == BC_JFORL); ++ | add RA, BASE, RA ++ | ld CARG1, FORL_IDX*8(RA) // CARG1 = IDX ++ | ld CARG2, FORL_STEP*8(RA) // CARG2 = STEP ++ | ld CARG3, FORL_STOP*8(RA) // CARG3 = STOP ++ | gettp CARG4, CARG1 ++ | gettp CARG5, CARG2 ++ | gettp CARG6, CARG3 ++ if (op != BC_JFORL) { ++ | srliw RD, RD, 1 ++ | lui TMP2, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J<<2 ++ | add TMP2, RD, TMP2 ++ } ++ | bne CARG4, TISNUM, >3 ++ | sext.w CARG4, CARG1 // start ++ | sext.w CARG3, CARG3 // stop ++ if (!vk) { // init ++ | bxne CARG6, TISNUM, ->vmeta_for ++ | bxne CARG5, TISNUM, ->vmeta_for ++ | bfextri TMP0, CARG2, 31, 31 // sign ++ | slt CARG2, CARG3, CARG4 ++ | slt TMP1, CARG4, CARG3 ++ | neg TMP4, TMP0 ++ | xor TMP0, TMP1, CARG2 // CARG2 = TMP0 ? TMP1 : CARG2 ++ | and TMP0, TMP0, TMP4 ++ | xor CARG2, CARG2, TMP0 // CARG2=0: +,start <= stop or -,start >= stop ++ } else { ++ | sext.w CARG5, CARG2 // step ++ | addw CARG1, CARG4, CARG5 // start + step ++ | xor TMP3, CARG1, CARG4 // y^a ++ | xor TMP1, CARG1, CARG5 // y^b ++ | and TMP3, TMP3, TMP1 ++ | slt TMP1, CARG1, CARG3 // start+step < stop ? ++ | slt CARG3, CARG3, CARG1 // stop < start+step ? ++ | sltz TMP0, CARG5 // step < 0 ? ++ | sltz TMP3, TMP3 // ((y^a) & (y^b)) < 0: overflow. ++ | neg TMP4, TMP0 ++ | xor TMP1, TMP1, CARG3 // CARG3 = TMP0 ? TMP1 : CARG3 ++ | and TMP1, TMP1, TMP4 ++ | xor CARG3, CARG3, TMP1 ++ | or CARG2, CARG3, TMP3 // CARG2=1: overflow; CARG2=0: continue ++ | zext.w CARG1, CARG1 ++ | settp_b CARG1, TISNUM ++ | sd CARG1, FORL_IDX*8(RA) ++ } ++ |1: ++ if (op == BC_FORI) { ++ | neg TMP4, CARG2 // CARG2!=0: jump out the loop; CARG2==0: next INS ++ | and TMP2, TMP2, TMP4 ++ | add PC, PC, TMP2 ++ } else if (op == BC_JFORI) { ++ | add PC, PC, TMP2 ++ | lhu RD, -4+OFS_RD(PC) ++ } else if (op == BC_IFORL) { ++ | addi TMP4, CARG2, -1 // CARG2!=0: next INS; CARG2==0: jump back ++ | and TMP2, TMP2, TMP4 ++ | add PC, PC, TMP2 ++ } ++ | ins_next1 ++ | sd CARG1, FORL_EXT*8(RA) ++ |2: ++ if (op == BC_JFORI) { ++ | decode_RD8b RD ++ | beqz CARG2, =>BC_JLOOP // CARG2 == 0: excute the loop ++ } else if (op == BC_JFORL) { ++ | beqz CARG2, =>BC_JLOOP ++ } ++ | ins_next2 ++ | ++ |3: // FP loop. ++ | fld FTMP0, FORL_IDX*8(RA) // start ++ | fld FTMP1, FORL_STOP*8(RA) // stop ++ | ld TMP0, FORL_STEP*8(RA) // step ++ | sltz CARG2, TMP0 // step < 0 ? ++ | neg CARG2, CARG2 ++ if (!vk) { ++ | sltiu TMP3, CARG4, LJ_TISNUM // start is number ? ++ | sltiu TMP0, CARG5, LJ_TISNUM // step is number ? ++ | sltiu TMP1, CARG6, LJ_TISNUM // stop is number ? ++ | and TMP3, TMP3, TMP1 ++ | and TMP0, TMP0, TMP3 ++ | bxeqz TMP0, ->vmeta_for // if start or step or stop isn't number ++ | flt.d TMP3, FTMP0, FTMP1 // start < stop ? ++ | flt.d TMP4, FTMP1, FTMP0 // stop < start ? ++ | xor TMP0, TMP3, TMP4 // CARG2 = CARG2 ? TMP3 : TMP4 ++ | and TMP0, TMP0, CARG2 ++ | xor CARG2, TMP4, TMP0 // CARG2=0:+,startstop ++ | j <1 ++ } else { ++ | fld FTMP3, FORL_STEP*8(RA) ++ | fadd.d FTMP0, FTMP0, FTMP3 // start + step ++ | flt.d TMP3, FTMP0, FTMP1 // start + step < stop ? ++ | flt.d TMP4, FTMP1, FTMP0 ++ | xor TMP0, TMP3, TMP4 // CARG2 = CARG2 ? TMP3 : TMP4 ++ | and TMP0, TMP0, CARG2 ++ | xor CARG2, TMP4, TMP0 ++ if (op == BC_IFORL) { ++ | addi TMP3, CARG2, -1 ++ | and TMP2, TMP2, TMP3 ++ | add PC, PC, TMP2 ++ } ++ | fsd FTMP0, FORL_IDX*8(RA) ++ | ins_next1 ++ | fsd FTMP0, FORL_EXT*8(RA) ++ | j <2 ++ } ++ break; ++ ++ case BC_ITERL: ++ | // Fall through. Assumes BC_IITERL follows. ++ break; ++ ++ case BC_JITERL: ++#if !LJ_HASJIT ++ break; ++#endif ++ case BC_IITERL: ++ | // RA = base*8, RD = target ++ | add RA, BASE, RA ++ | ld TMP1, 0(RA) ++ | beq TMP1, TISNIL, >1 // Stop if iterator returned nil. ++ if (op == BC_JITERL) { ++ | sd TMP1,-8(RA) ++ | j =>BC_JLOOP ++ } else { ++ | branch_RD // Otherwise save control var + branch. ++ | sd TMP1, -8(RA) ++ } ++ |1: ++ | ins_next ++ break; ++ ++ case BC_LOOP: ++ | // Fall through. Assumes BC_ILOOP follows. ++ break; ++ ++ case BC_ILOOP: ++ | // RA = base*8, RD = target (loop extent) ++ | ins_next ++ break; ++ ++ case BC_JLOOP: ++ break; ++ ++ case BC_JMP: ++ | // RA = base*8 (only used by trace recorder), RD = target ++ | branch_RD // PC + (jump - 0x8000)<<2 ++ | ins_next ++ break; ++ ++ /* -- Function headers -------------------------------------------------- */ ++ ++ case BC_FUNCF: ++ case BC_FUNCV: /* NYI: compiled vararg functions. */ ++ | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. ++ break; ++ ++ case BC_JFUNCF: ++#if !LJ_HASJIT ++ break; ++#endif ++ case BC_IFUNCF: ++ | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 ++ | ld TMP2, L->maxstack ++ | lbu TMP1, -4+PC2PROTO(numparams)(PC) ++ | ld KBASE, -4+PC2PROTO(k)(PC) ++ | bxltu TMP2, RA, ->vm_growstack_l ++ | slliw TMP1, TMP1, 3 // numparams*8 ++ |2: ++ | bltu NARGS8:RC, TMP1, >3 // Check for missing parameters. ++ if (op == BC_JFUNCF) { ++ | decode_RD8 RD, INS ++ | j =>BC_JLOOP ++ } else { ++ | ins_next ++ } ++ | ++ |3: // Clear missing parameters. ++ | add TMP0, BASE, NARGS8:RC ++ | sd TISNIL, 0(TMP0) ++ | addiw NARGS8:RC, NARGS8:RC, 8 ++ | j <2 ++ break; ++ ++ case BC_JFUNCV: ++#if !LJ_HASJIT ++ break; ++#endif ++ | NYI // NYI: compiled vararg functions ++ break; /* NYI: compiled vararg functions. */ ++ ++ case BC_IFUNCV: ++ | // BASE = new base, RA = BASE+framesize*8, RB = LFUNC, RC = nargs*8 ++ | li TMP0, LJ_TFUNC ++ | add TMP1, BASE, RC ++ | ld TMP2, L->maxstack ++ | settp LFUNC:RB, TMP0 ++ | add TMP0, RA, RC ++ | sd LFUNC:RB, 0(TMP1) // Store (tagged) copy of LFUNC. ++ | addi TMP2, TMP2, -8 ++ | addi TMP3, RC, 16+FRAME_VARG ++ | ld KBASE, -4+PC2PROTO(k)(PC) ++ | sd TMP3, 8(TMP1) // Store delta + FRAME_VARG. ++ | bxgeu TMP0, TMP2, ->vm_growstack_l ++ | lbu TMP2, -4+PC2PROTO(numparams)(PC) ++ | mv RA, BASE ++ | mv RC, TMP1 ++ | ins_next1 ++ | addi BASE, TMP1, 16 ++ | beqz TMP2, >2 ++ |1: ++ | ld TMP0, 0(RA) ++ | sltu CARG2, RA, RC // Less args than parameters? ++ | addi RA, RA, 8 ++ | addi TMP1, TMP1, 8 ++ | addiw TMP2, TMP2, -1 ++ | beqz CARG2, >3 ++ | neg TMP4, CARG2 // Clear old fixarg slot (help the GC). ++ | xor TMP3, TISNIL, TMP0 // CARG1 = CARG2 ? TISNIL : TMP0 ++ | and TMP3, TMP3, TMP4 ++ | xor CARG1, TMP0, TMP3 ++ | sd CARG1, -8(RA) ++ | sd TMP0, 8(TMP1) ++ | bnez TMP2, <1 ++ |2: ++ | ins_next2 ++ |3: ++ | neg TMP4, CARG2 // Clear missing fixargs. ++ | xor TMP3, TMP0, TISNIL // TMP0 = CARG2 ? TMP0 : TISNIL ++ | and TMP3, TMP3, TMP4 ++ | xor TMP0, TISNIL, TMP3 ++ | sd TMP0, 8(TMP1) ++ | bnez TMP2, <1 ++ | j <2 ++ break; ++ ++ case BC_FUNCC: ++ case BC_FUNCCW: ++ | // BASE = new base, RA = BASE+framesize*8, RB = CFUNC, RC = nargs*8 ++ if (op == BC_FUNCC) { ++ | ld CARG4, CFUNC:RB->f ++ } else { ++ | ld CARG4, GL->wrapf ++ } ++ | add TMP1, RA, NARGS8:RC ++ | ld TMP2, L->maxstack ++ | add RC, BASE, NARGS8:RC ++ | sd BASE, L->base // base of currently excuting function ++ | sd RC, L->top ++ | bxgtu TMP1, TMP2, ->vm_growstack_c // Need to grow stack. ++ | li_vmstate C // li TMP0, ~LJ_VMST_C ++ if (op == BC_FUNCCW) { ++ | ld CARG2, CFUNC:RB->f ++ } ++ | mv CARG1, L ++ | st_vmstate // sw TMP0, GL->vmstate ++ | jalr CARG4 // (lua_State *L [, lua_CFunction f]) ++ | // Returns nresults. ++ | ld BASE, L->base ++ | ld TMP1, L->top ++ | sd L, GL->cur_L ++ | slliw RD, CRET1, 3 ++ | li_vmstate INTERP ++ | ld PC, FRAME_PC(BASE) // Fetch PC of caller. ++ | sub RA, TMP1, RD // RA = L->top - nresults*8 ++ | st_vmstate ++ | j ->vm_returnc ++ break; ++ ++ /* ---------------------------------------------------------------------- */ ++ ++ default: ++ fprintf(stderr, "Error: undefined opcode BC_%s\n", bc_names[op]); ++ exit(2); ++ break; ++ } ++} ++ ++static int build_backend(BuildCtx *ctx) ++{ ++ int op; ++ ++ dasm_growpc(Dst, BC__MAX); ++ ++ build_subroutines(ctx); ++ ++ |.code_op ++ for (op = 0; op < BC__MAX; op++) ++ build_ins(ctx, (BCOp)op, op); ++ ++ return BC__MAX; ++} ++ ++/* Emit pseudo frame-info for all assembler functions. */ ++static void emit_asm_debug(BuildCtx *ctx) ++{ ++ ++} + +From 33d45379ae5fa65fc0824a2463e319d3f275e918 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:19:25 +0800 +Subject: [PATCH 07/22] riscv(support): add target definition + +--- + src/lj_target.h | 4 +- + src/lj_target_riscv.h | 542 ++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 545 insertions(+), 1 deletion(-) + create mode 100644 src/lj_target_riscv.h + +diff --git a/src/lj_target.h b/src/lj_target.h +index 47592432f0..08637f6934 100644 +--- a/src/lj_target.h ++++ b/src/lj_target.h +@@ -55,7 +55,7 @@ typedef uint32_t RegSP; + /* Bitset for registers. 32 registers suffice for most architectures. + ** Note that one set holds bits for both GPRs and FPRs. + */ +-#if LJ_TARGET_PPC || LJ_TARGET_MIPS || LJ_TARGET_ARM64 ++#if LJ_TARGET_PPC || LJ_TARGET_MIPS || LJ_TARGET_ARM64 || LJ_TARGET_RISCV64 + typedef uint64_t RegSet; + #define RSET_BITS 6 + #define rset_picktop_(rs) ((Reg)lj_fls64(rs)) +@@ -143,6 +143,8 @@ typedef uint32_t RegCost; + #include "lj_target_ppc.h" + #elif LJ_TARGET_MIPS + #include "lj_target_mips.h" ++#elif LJ_TARGET_RISCV64 ++#include "lj_target_riscv.h" + #else + #error "Missing include for target CPU" + #endif +diff --git a/src/lj_target_riscv.h b/src/lj_target_riscv.h +new file mode 100644 +index 0000000000..a2a907dbad +--- /dev/null ++++ b/src/lj_target_riscv.h +@@ -0,0 +1,542 @@ ++/* ++** Definitions for RISC-V CPUs. ++** Copyright (C) 2005-2023 Mike Pall. See Copyright Notice in luajit.h ++*/ ++ ++#ifndef _LJ_TARGET_RISCV_H ++#define _LJ_TARGET_RISCV_H ++ ++/* -- Registers IDs ------------------------------------------------------- */ ++ ++#define GPRDEF(_) \ ++ _(X0) _(RA) _(SP) _(X3) _(X4) _(X5) _(X6) _(X7) \ ++ _(X8) _(X9) _(X10) _(X11) _(X12) _(X13) _(X14) _(X15) \ ++ _(X16) _(X17) _(X18) _(X19) _(X20) _(X21) _(X22) _(X23) \ ++ _(X24) _(X25) _(X26) _(X27) _(X28) _(X29) _(X30) _(X31) ++#define FPRDEF(_) \ ++ _(F0) _(F1) _(F2) _(F3) _(F4) _(F5) _(F6) _(F7) \ ++ _(F8) _(F9) _(F10) _(F11) _(F12) _(F13) _(F14) _(F15) \ ++ _(F16) _(F17) _(F18) _(F19) _(F20) _(F21) _(F22) _(F23) \ ++ _(F24) _(F25) _(F26) _(F27) _(F28) _(F29) _(F30) _(F31) ++#define VRIDDEF(_) ++ ++#define RIDENUM(name) RID_##name, ++ ++enum { ++ GPRDEF(RIDENUM) /* General-purpose registers (GPRs). */ ++ FPRDEF(RIDENUM) /* Floating-point registers (FPRs). */ ++ RID_MAX, ++ RID_ZERO = RID_X0, ++ RID_TMP = RID_RA, ++ RID_GP = RID_X3, ++ RID_TP = RID_X4, ++ ++ /* Calling conventions. */ ++ RID_RET = RID_X10, ++ RID_RETLO = RID_X10, ++ RID_RETHI = RID_X11, ++ RID_FPRET = RID_F10, ++ RID_CFUNCADDR = RID_X5, ++ ++ /* These definitions must match with the *.dasc file(s): */ ++ RID_BASE = RID_X18, /* Interpreter BASE. */ ++ RID_LPC = RID_X20, /* Interpreter PC. */ ++ RID_GL = RID_X21, /* Interpreter GL. */ ++ RID_LREG = RID_X23, /* Interpreter L. */ ++ ++ /* Register ranges [min, max) and number of registers. */ ++ RID_MIN_GPR = RID_X0, ++ RID_MAX_GPR = RID_X31+1, ++ RID_MIN_FPR = RID_MAX_GPR, ++ RID_MAX_FPR = RID_F31+1, ++ RID_NUM_GPR = RID_MAX_GPR - RID_MIN_GPR, ++ RID_NUM_FPR = RID_MAX_FPR - RID_MIN_FPR /* Only even regs are used. */ ++}; ++ ++#define RID_NUM_KREF RID_NUM_GPR ++#define RID_MIN_KREF RID_X0 ++ ++/* -- Register sets ------------------------------------------------------- */ ++ ++/* Make use of all registers, except ZERO, TMP, SP, GP, TP, CFUNCADDR and GL. */ ++#define RSET_FIXED \ ++ (RID2RSET(RID_ZERO)|RID2RSET(RID_TMP)|RID2RSET(RID_SP)|\ ++ RID2RSET(RID_GP)|RID2RSET(RID_TP)|RID2RSET(RID_GL)) ++#define RSET_GPR (RSET_RANGE(RID_MIN_GPR, RID_MAX_GPR) - RSET_FIXED) ++#define RSET_FPR RSET_RANGE(RID_MIN_FPR, RID_MAX_FPR) ++ ++#define RSET_ALL (RSET_GPR|RSET_FPR) ++#define RSET_INIT RSET_ALL ++ ++#define RSET_SCRATCH_GPR \ ++ (RSET_RANGE(RID_X5, RID_X7+1)|RSET_RANGE(RID_X28, RID_X31+1)|\ ++ RSET_RANGE(RID_X10, RID_X17+1)) ++ ++#define RSET_SCRATCH_FPR \ ++ (RSET_RANGE(RID_F0, RID_F7+1)|RSET_RANGE(RID_F10, RID_F17+1)|\ ++ RSET_RANGE(RID_F28, RID_F31+1)) ++#define RSET_SCRATCH (RSET_SCRATCH_GPR|RSET_SCRATCH_FPR) ++ ++#define REGARG_FIRSTGPR RID_X10 ++#define REGARG_LASTGPR RID_X17 ++#define REGARG_NUMGPR 8 ++ ++#define REGARG_FIRSTFPR RID_F10 ++#define REGARG_LASTFPR RID_F17 ++#define REGARG_NUMFPR 8 ++ ++/* -- Spill slots --------------------------------------------------------- */ ++ ++/* Spill slots are 32 bit wide. An even/odd pair is used for FPRs. ++** ++** SPS_FIXED: Available fixed spill slots in interpreter frame. ++** This definition must match with the *.dasc file(s). ++** ++** SPS_FIRST: First spill slot for general use. ++*/ ++#if LJ_32 ++#define SPS_FIXED 5 ++#else ++#define SPS_FIXED 4 ++#endif ++#define SPS_FIRST 4 ++ ++#define SPOFS_TMP 0 ++ ++#define sps_scale(slot) (4 * (int32_t)(slot)) ++#define sps_align(slot) (((slot) - SPS_FIXED + 3) & ~3) ++ ++/* -- Exit state ---------------------------------------------------------- */ ++/* This definition must match with the *.dasc file(s). */ ++typedef struct { ++ lua_Number fpr[RID_NUM_FPR]; /* Floating-point registers. */ ++ intptr_t gpr[RID_NUM_GPR]; /* General-purpose registers. */ ++ int32_t spill[256]; /* Spill slots. */ ++} ExitState; ++ ++/* Highest exit + 1 indicates stack check. */ ++#define EXITSTATE_CHECKEXIT 1 ++ ++/* Return the address of a per-trace exit stub. */ ++static LJ_AINLINE uint32_t *exitstub_trace_addr_(uint32_t *p, uint32_t exitno) ++{ ++ while (*p == 0x00000013) p++; /* Skip RISCVI_NOP. */ ++ return p + 4 + exitno; ++} ++/* Avoid dependence on lj_jit.h if only including lj_target.h. */ ++#define exitstub_trace_addr(T, exitno) \ ++ exitstub_trace_addr_((MCode *)((char *)(T)->mcode + (T)->szmcode), (exitno)) ++ ++/* -- Instructions -------------------------------------------------------- */ ++ ++/* Instruction fields. */ ++#define RISCVF_D(d) (((d)&31) << 7) ++#define RISCVF_S1(r) (((r)&31) << 15) ++#define RISCVF_S2(r) (((r)&31) << 20) ++#define RISCVF_S3(r) (((r)&31) << 27) ++#define RISCVF_FUNCT2(f) (((f)&3) << 25) ++#define RISCVF_FUNCT3(f) (((f)&7) << 12) ++#define RISCVF_FUNCT7(f) (((f)&127) << 25) ++#define RISCVF_SHAMT(s) ((s) << 20) ++#define RISCVF_RM(m) (((m)&7) << 12) ++#define RISCVF_IMMI(i) ((i) << 20) ++#define RISCVF_IMMS(i) (((i)&0xfe0) << 20 | ((i)&0x1f) << 7) ++#define RISCVF_IMMB(i) (((i)&0x1000) << 19 | ((i)&0x800) >> 4 | ((i)&0x7e0) << 20 | ((i)&0x1e) << 7) ++#define RISCVF_IMMU(i) (((i)&0xfffff) << 12) ++#define RISCVF_IMMJ(i) (((i)&0x100000) << 11 | ((i)&0xff000) | ((i)&0x800) << 9 | ((i)&0x7fe) << 20) ++ ++/* Encode helpers. */ ++#define RISCVF_W_HI(w) ((w) - ((((w)&0xfff)^0x800) - 0x800)) ++#define RISCVF_W_LO(w) ((w)&0xfff) ++#define RISCVF_HI(i) ((RISCVF_W_HI(i) >> 12) & 0xfffff) ++#define RISCVF_LO(i) RISCVF_W_LO(i) ++ ++/* Check for valid field range. */ ++#define RISCVF_SIMM_OK(x, b) ((((x) + (1 << (b-1))) >> (b)) == 0) ++#define RISCVF_UIMM_OK(x, b) (((x) >> (b)) == 0) ++#define checku11(i) RISCVF_UIMM_OK(i, 11) ++#define checki12(i) RISCVF_SIMM_OK(i, 12) ++#define checki13(i) RISCVF_SIMM_OK(i, 13) ++#define checki20(i) RISCVF_SIMM_OK(i, 20) ++#define checki21(i) RISCVF_SIMM_OK(i, 21) ++#define checki32auipc(i) (checki32(i) && (int32_t)(i) < 0x7ffff800) ++ ++typedef enum RISCVIns { ++ ++ /* --- RVI --- */ ++ RISCVI_LUI = 0x00000037, ++ RISCVI_AUIPC = 0x00000017, ++ ++ RISCVI_JAL = 0x0000006f, ++ RISCVI_JALR = 0x00000067, ++ ++ RISCVI_ADDI = 0x00000013, ++ RISCVI_SLTI = 0x00002013, ++ RISCVI_SLTIU = 0x00003013, ++ RISCVI_XORI = 0x00004013, ++ RISCVI_ORI = 0x00006013, ++ RISCVI_ANDI = 0x00007013, ++ ++ RISCVI_SLLI = 0x00001013, ++ RISCVI_SRLI = 0x00005013, ++ RISCVI_SRAI = 0x40005013, ++ ++ RISCVI_ADD = 0x00000033, ++ RISCVI_SUB = 0x40000033, ++ RISCVI_SLL = 0x00001033, ++ RISCVI_SLT = 0x00002033, ++ RISCVI_SLTU = 0x00003033, ++ RISCVI_XOR = 0x00004033, ++ RISCVI_SRL = 0x00005033, ++ RISCVI_SRA = 0x40005033, ++ RISCVI_OR = 0x00006033, ++ RISCVI_AND = 0x00007033, ++ ++ RISCVI_LB = 0x00000003, ++ RISCVI_LH = 0x00001003, ++ RISCVI_LW = 0x00002003, ++ RISCVI_LBU = 0x00004003, ++ RISCVI_LHU = 0x00005003, ++ RISCVI_SB = 0x00000023, ++ RISCVI_SH = 0x00001023, ++ RISCVI_SW = 0x00002023, ++ ++ RISCVI_BEQ = 0x00000063, ++ RISCVI_BNE = 0x00001063, ++ RISCVI_BLT = 0x00004063, ++ RISCVI_BGE = 0x00005063, ++ RISCVI_BLTU = 0x00006063, ++ RISCVI_BGEU = 0x00007063, ++ ++ RISCVI_ECALL = 0x00000073, ++ RISCVI_EBREAK = 0x00100073, ++ ++ RISCVI_NOP = 0x00000013, ++ RISCVI_MV = 0x00000013, ++ RISCVI_NOT = 0xfff04013, ++ RISCVI_NEG = 0x40000033, ++ RISCVI_RET = 0x00008067, ++ RISCVI_ZEXT_B = 0x0ff07013, ++ ++#if LJ_TARGET_RISCV64 ++ RISCVI_LWU = 0x00007003, ++ RISCVI_LD = 0x00003003, ++ RISCVI_SD = 0x00003023, ++ ++ RISCVI_ADDIW = 0x0000001b, ++ ++ RISCVI_SLLIW = 0x0000101b, ++ RISCVI_SRLIW = 0x0000501b, ++ RISCVI_SRAIW = 0x4000501b, ++ ++ RISCVI_ADDW = 0x0000003b, ++ RISCVI_SUBW = 0x4000003b, ++ RISCVI_SLLW = 0x0000103b, ++ RISCVI_SRLW = 0x0000503b, ++ RISCVI_SRAW = 0x4000503b, ++ ++ RISCVI_NEGW = 0x4000003b, ++ RISCVI_SEXT_W = 0x0000001b, ++#endif ++ ++ /* --- RVM --- */ ++ RISCVI_MUL = 0x02000033, ++ RISCVI_MULH = 0x02001033, ++ RISCVI_MULHSU = 0x02002033, ++ RISCVI_MULHU = 0x02003033, ++ RISCVI_DIV = 0x02004033, ++ RISCVI_DIVU = 0x02005033, ++ RISCVI_REM = 0x02006033, ++ RISCVI_REMU = 0x02007033, ++#if LJ_TARGET_RISCV64 ++ RISCVI_MULW = 0x0200003b, ++ RISCVI_DIVW = 0x0200403b, ++ RISCVI_DIVUW = 0x0200503b, ++ RISCVI_REMW = 0x0200603b, ++ RISCVI_REMUW = 0x0200703b, ++#endif ++ ++ /* --- RVF --- */ ++ RISCVI_FLW = 0x00002007, ++ RISCVI_FSW = 0x00002027, ++ ++ RISCVI_FMADD_S = 0x00000043, ++ RISCVI_FMSUB_S = 0x00000047, ++ RISCVI_FNMSUB_S = 0x0000004b, ++ RISCVI_FNMADD_S = 0x0000004f, ++ ++ RISCVI_FADD_S = 0x00000053, ++ RISCVI_FSUB_S = 0x08000053, ++ RISCVI_FMUL_S = 0x10000053, ++ RISCVI_FDIV_S = 0x18000053, ++ RISCVI_FSQRT_S = 0x58000053, ++ ++ RISCVI_FSGNJ_S = 0x20000053, ++ RISCVI_FSGNJN_S = 0x20001053, ++ RISCVI_FSGNJX_S = 0x20002053, ++ ++ RISCVI_FMIN_S = 0x28000053, ++ RISCVI_FMAX_S = 0x28001053, ++ ++ RISCVI_FCVT_W_S = 0xc0000053, ++ RISCVI_FCVT_WU_S = 0xc0100053, ++ ++ RISCVI_FMV_X_W = 0xe0000053, ++ ++ RISCVI_FEQ_S = 0xa0002053, ++ RISCVI_FLT_S = 0xa0001053, ++ RISCVI_FLE_S = 0xa0000053, ++ ++ RISCVI_FCLASS_S = 0xe0001053, ++ ++ RISCVI_FCVT_S_W = 0xd0000053, ++ RISCVI_FCVT_S_WU = 0xd0100053, ++ RISCVI_FMV_W_X = 0xf0000053, ++ ++ RISCVI_FMV_S = 0x20000053, ++ RISCVI_FNEG_S = 0x20001053, ++ RISCVI_FABS_S = 0x20002053, ++#if LJ_TARGET_RISCV64 ++ RISCVI_FCVT_L_S = 0xc0200053, ++ RISCVI_FCVT_LU_S = 0xc0300053, ++ RISCVI_FCVT_S_L = 0xd0200053, ++ RISCVI_FCVT_S_LU = 0xd0300053, ++#endif ++ ++ /* --- RVD --- */ ++ RISCVI_FLD = 0x00003007, ++ RISCVI_FSD = 0x00003027, ++ ++ RISCVI_FMADD_D = 0x02000043, ++ RISCVI_FMSUB_D = 0x02000047, ++ RISCVI_FNMSUB_D = 0x0200004b, ++ RISCVI_FNMADD_D = 0x0200004f, ++ ++ RISCVI_FADD_D = 0x02000053, ++ RISCVI_FSUB_D = 0x0a000053, ++ RISCVI_FMUL_D = 0x12000053, ++ RISCVI_FDIV_D = 0x1a000053, ++ RISCVI_FSQRT_D = 0x5a000053, ++ ++ RISCVI_FSGNJ_D = 0x22000053, ++ RISCVI_FSGNJN_D = 0x22001053, ++ RISCVI_FSGNJX_D = 0x22002053, ++ ++ RISCVI_FMIN_D = 0x2a000053, ++ RISCVI_FMAX_D = 0x2a001053, ++ ++ RISCVI_FCVT_S_D = 0x40100053, ++ RISCVI_FCVT_D_S = 0x42000053, ++ ++ RISCVI_FEQ_D = 0xa2002053, ++ RISCVI_FLT_D = 0xa2001053, ++ RISCVI_FLE_D = 0xa2000053, ++ ++ RISCVI_FCLASS_D = 0xe2001053, ++ ++ RISCVI_FCVT_W_D = 0xc2000053, ++ RISCVI_FCVT_WU_D = 0xc2100053, ++ RISCVI_FCVT_D_W = 0xd2000053, ++ RISCVI_FCVT_D_WU = 0xd2100053, ++ ++ RISCVI_FMV_D = 0x22000053, ++ RISCVI_FNEG_D = 0x22001053, ++ RISCVI_FABS_D = 0x22002053, ++#if LJ_TARGET_RISCV64 ++ RISCVI_FCVT_L_D = 0xc2200053, ++ RISCVI_FCVT_LU_D = 0xc2300053, ++ RISCVI_FMV_X_D = 0xe2000053, ++ RISCVI_FCVT_D_L = 0xd2200053, ++ RISCVI_FCVT_D_LU = 0xd2300053, ++ RISCVI_FMV_D_X = 0xf2000053, ++#endif ++ ++ /* --- Zifencei --- */ ++ RISCVI_FENCE = 0x0000000f, ++ RISCVI_FENCE_I = 0x0000100f, ++ ++ /* --- Zicsr --- */ ++ RISCVI_CSRRW = 0x00001073, ++ RISCVI_CSRRS = 0x00002073, ++ RISCVI_CSRRC = 0x00003073, ++ RISCVI_CSRRWI = 0x00005073, ++ RISCVI_CSRRSI = 0x00006073, ++ RISCVI_CSRRCI = 0x00007073, ++ ++ /* --- RVB --- */ ++ /* Zba */ ++ RISCVI_SH1ADD = 0x20002033, ++ RISCVI_SH2ADD = 0x20004033, ++ RISCVI_SH3ADD = 0x20006033, ++#if LJ_TARGET_RISCV64 ++ RISCVI_ADD_UW = 0x0800003b, ++ ++ RISCVI_SH1ADD_UW = 0x2000203b, ++ RISCVI_SH2ADD_UW = 0x2000403b, ++ RISCVI_SH3ADD_UW = 0x2000603b, ++ ++ RISCVI_SLLI_UW = 0x0800101b, ++ ++ RISCVI_ZEXT_W = 0x0800003b, ++#endif ++ /* Zbb */ ++ RISCVI_ANDN = 0x40007033, ++ RISCVI_ORN = 0x40006033, ++ RISCVI_XNOR = 0x40004033, ++ ++ RISCVI_CLZ = 0x60001013, ++ RISCVI_CTZ = 0x60101013, ++ ++ RISCVI_CPOP = 0x60201013, ++ ++ RISCVI_MAX = 0x0a006033, ++ RISCVI_MAXU = 0x0a007033, ++ RISCVI_MIN = 0x0a004033, ++ RISCVI_MINU = 0x0a005033, ++ ++ RISCVI_SEXT_B = 0x60401013, ++ RISCVI_SEXT_H = 0x60501013, ++#if LJ_TARGET_RISCV64 ++ RISCVI_ZEXT_H = 0x0800403b, ++#endif ++ ++ RISCVI_ROL = 0x60001033, ++ RISCVI_ROR = 0x60005033, ++ RISCVI_RORI = 0x60005013, ++ ++ RISCVI_ORC_B = 0x28705013, ++ ++#if LJ_TARGET_RISCV64 ++ RISCVI_REV8 = 0x6b805013, ++ ++ RISCVI_CLZW = 0x6000101b, ++ RISCVI_CTZW = 0x6010101b, ++ ++ RISCVI_CPOPW = 0x6020101b, ++ ++ RISCVI_ROLW = 0x6000103b, ++ RISCVI_RORIW = 0x6000501b, ++ RISCVI_RORW = 0x6000503b, ++#endif ++ /* NYI: Zbc, Zbs */ ++ ++ /* --- Zicond --- */ ++ RISCVI_CZERO_EQZ = 0x0e005033, ++ RISCVI_CZERO_NEZ = 0x0e007033, ++ ++ /* --- Zfa --- */ ++ RISCVI_FLI_S = 0xf0100053, ++ RISCVI_FMINM_S = 0x28002053, ++ RISCVI_FMAXM_S = 0x28003053, ++ RISCVI_FROUND_S = 0x40400053, ++ RISCVI_FROUNDNX_S = 0x40500053, ++ RISCVI_FCVTMOD_W_D = 0xc2801053, ++ RISCVI_FLEQ_S = 0xa0004053, ++ RISCVI_FLTQ_S = 0xa0005053, ++ RISCVI_FLI_D = 0xf2100053, ++ RISCVI_FMINM_D = 0x2a002053, ++ RISCVI_FMAXM_D = 0x2a003053, ++ RISCVI_FROUND_D = 0x42400053, ++ RISCVI_FROUNDNX_D = 0x42500053, ++ RISCVI_FLEQ_D = 0xa2004053, ++ RISCVI_FLTQ_D = 0xa2005053, ++ ++ RISCVI_FROUND_S_RTZ = 0x40401053, ++ RISCVI_FROUND_S_RDN = 0x40402053, ++ RISCVI_FROUND_S_RUP = 0x40403053, ++ RISCVI_FROUNDNX_S_RTZ = 0x40501053, ++ RISCVI_FROUNDNX_S_RDN = 0x40502053, ++ RISCVI_FROUNDNX_S_RUP = 0x40503053, ++ RISCVI_FROUND_D_RTZ = 0x42401053, ++ RISCVI_FROUND_D_RDN = 0x42402053, ++ RISCVI_FROUND_D_RUP = 0x42403053, ++ RISCVI_FROUNDNX_D_RTZ = 0x42501053, ++ RISCVI_FROUNDNX_D_RDN = 0x42502053, ++ RISCVI_FROUNDNX_D_RUP = 0x42503053, ++ ++ /* TBD: RVV?, RVP?, RVJ? */ ++ ++ /* --- XThead* --- */ ++ /* XTHeadBa */ ++ RISCVI_TH_ADDSL = 0x0000100b, ++ ++ /* XTHeadBb */ ++ RISCVI_TH_SRRI = 0x1000100b, ++#if LJ_TARGET_RISCV64 ++ RISCVI_TH_SRRIW = 0x1400100b, ++#endif ++ RISCVI_TH_EXT = 0x0000200b, ++ RISCVI_TH_EXTU = 0x0000300b, ++ RISCVI_TH_FF0 = 0x8400100b, ++ RISCVI_TH_FF1 = 0x8600100b, ++ RISCVI_TH_REV = 0x8200100b, ++#if LJ_TARGET_RISCV64 ++ RISCVI_TH_REVW = 0x9000100b, ++#endif ++ RISCVI_TH_TSTNBZ = 0x8000100b, ++ ++ /* XTHeadBs */ ++ RISCVI_TH_TST = 0x8800100b, ++ ++ /* XTHeadCondMov */ ++ RISCVI_TH_MVEQZ = 0x4000100b, ++ RISCVI_TH_MVNEZ = 0x4200100b, ++ ++ /* XTHeadMac */ ++ RISCVI_TH_MULA = 0x2000100b, ++ RISCVI_TH_MULAH = 0x2800100b, ++#if LJ_TARGET_RISCV64 ++ RISCVI_TH_MULAW = 0x2400100b, ++#endif ++ RISCVI_TH_MULS = 0x2200100b, ++ RISCVI_TH_MULSH = 0x2a00100b, ++ RISCVI_TH_MULSW = 0x2600100b, ++ ++ /* NYI: XTHeadMemIdx, XTHeadFMemIdx, XTHeadMemPair */ ++} RISCVIns; ++ ++typedef enum RISCVRM { ++ RISCVRM_RNE = 0, ++ RISCVRM_RTZ = 1, ++ RISCVRM_RDN = 2, ++ RISCVRM_RUP = 3, ++ RISCVRM_RMM = 4, ++ RISCVRM_DYN = 7, ++} RISCVRM; ++ ++static const uint16_t riscv_fli_map_hi16[32] = { ++ 0xbff0u, // -1 ++ 0x0010u, // min ++ 0x3ef0u, // 2^-16 ++ 0x3f00u, // 2^-15 ++ 0x3f70u, // 2^-8 ++ 0x3f80u, // 2^-7 ++ 0x3fb0u, // 2^-4 ++ 0x3fc0u, // 2^-3, 0.125 ++ 0x3fd0u, // 2^-2, 0.25 ++ 0x3fd4u, // 0.3125 ++ 0x3fd8u, // 0.375 ++ 0x3fdcu, // 0.4375 ++ 0x3fe0u, // 0.5 ++ 0x3fe4u, // 0.625 ++ 0x3fe8u, // 0.75 ++ 0x3fecu, // 0.875 ++ 0x3ff0u, // 1 ++ 0x3ff4u, // 1.25 ++ 0x3ff8u, // 1.5 ++ 0x3ffcu, // 1.75 ++ 0x4000u, // 2 ++ 0x4004u, // 2.5 ++ 0x4008u, // 3 ++ 0x4010u, // 4 ++ 0x4020u, // 8 ++ 0x4030u, // 16 ++ 0x4060u, // 128 ++ 0x4070u, // 256 ++ 0x40e0u, // 2^15, 32768 ++ 0x40f0u, // 2^16, 65536 ++ 0x7ff0u, // inf ++ 0x7ff8u, // canonical nan ++}; ++ ++#endif + +From 9eb94f1afc108b216e5161977bdbf8093bf5ecb3 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:21:02 +0800 +Subject: [PATCH 08/22] riscv(ffi): add call convention and support framework + +--- + src/lj_ccall.c | 156 +++++++++++++++++++++++++++++++- + src/lj_ccall.h | 17 +++- + src/lj_ccallback.c | 64 +++++++++++++- + src/lj_target_riscv.h | 2 +- + src/vm_riscv64.dasc | 201 ++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 435 insertions(+), 5 deletions(-) + +diff --git a/src/lj_ccall.c b/src/lj_ccall.c +index ae69cd28d1..bb4da414f4 100644 +--- a/src/lj_ccall.c ++++ b/src/lj_ccall.c +@@ -575,6 +575,97 @@ + goto done; \ + } + ++#elif LJ_TARGET_RISCV64 ++/* -- RISC-V lp64d calling conventions ------------------------------------ */ ++ ++#define CCALL_HANDLE_STRUCTRET \ ++ /* Return structs of size > 16 by reference. */ \ ++ cc->retref = !(sz <= 16); \ ++ if (cc->retref) cc->gpr[ngpr++] = (GPRArg)dp; ++ ++#define CCALL_HANDLE_STRUCTRET2 \ ++ unsigned int cl = ccall_classify_struct(cts, ctr); \ ++ if ((cl & 4) && (cl >> 8) <= 2) { \ ++ CTSize i = (cl >> 8) - 1; \ ++ do { ((float *)dp)[i] = cc->fpr[i].f; } while (i--); \ ++ } else { \ ++ if (cl > 1) { \ ++ sp = (uint8_t *)&cc->fpr[0]; \ ++ if ((cl >> 8) > 2) \ ++ sp = (uint8_t *)&cc->gpr[0]; \ ++ } \ ++ memcpy(dp, sp, ctr->size); \ ++ } \ ++ ++#define CCALL_HANDLE_COMPLEXRET \ ++ /* Complex values are returned in 1 or 2 FPRs. */ \ ++ cc->retref = 0; ++ ++#define CCALL_HANDLE_COMPLEXRET2 \ ++ if (ctr->size == 2*sizeof(float)) { /* Copy complex float from FPRs. */ \ ++ ((float *)dp)[0] = cc->fpr[0].f; \ ++ ((float *)dp)[1] = cc->fpr[1].f; \ ++ } else { /* Copy complex double from FPRs. */ \ ++ ((double *)dp)[0] = cc->fpr[0].d; \ ++ ((double *)dp)[1] = cc->fpr[1].d; \ ++ } ++ ++#define CCALL_HANDLE_COMPLEXARG \ ++ /* Pass long double complex by reference. */ \ ++ if (sz == 2*sizeof(long double)) { \ ++ rp = cdataptr(lj_cdata_new(cts, did, sz)); \ ++ sz = CTSIZE_PTR; \ ++ } \ ++ /* Pass complex in two FPRs or on stack. */ \ ++ else if (sz == 2*sizeof(float)) { \ ++ isfp = 2; \ ++ sz = 2*CTSIZE_PTR; \ ++ } else { \ ++ isfp = 1; \ ++ sz = 2*CTSIZE_PTR; \ ++ } ++ ++#define CCALL_HANDLE_RET \ ++ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ ++ sp = (uint8_t *)&cc->fpr[0].f; ++ ++#define CCALL_HANDLE_STRUCTARG \ ++ /* Pass structs of size >16 by reference. */ \ ++ unsigned int cl = ccall_classify_struct(cts, d); \ ++ nff = cl >> 8; \ ++ if (sz > 16) { \ ++ rp = cdataptr(lj_cdata_new(cts, did, sz)); \ ++ sz = CTSIZE_PTR; \ ++ } \ ++ /* Pass struct in FPRs. */ \ ++ if (cl > 1) { \ ++ isfp = (cl & 4) ? 2 : 1; \ ++ } ++ ++ ++#define CCALL_HANDLE_REGARG \ ++ if (isfp && (!isva)) { /* Try to pass argument in FPRs. */ \ ++ int n2 = ctype_isvector(d->info) ? 1 : \ ++ isfp == 1 ? n : 2; \ ++ if (nfpr + n2 <= CCALL_NARG_FPR && nff <= 2) { \ ++ dp = &cc->fpr[nfpr]; \ ++ nfpr += n2; \ ++ goto done; \ ++ } else { \ ++ if (ngpr + n2 <= maxgpr) { \ ++ dp = &cc->gpr[ngpr]; \ ++ ngpr += n2; \ ++ goto done; \ ++ } \ ++ } \ ++ } else { /* Try to pass argument in GPRs. */ \ ++ if (ngpr + n <= maxgpr) { \ ++ dp = &cc->gpr[ngpr]; \ ++ ngpr += n; \ ++ goto done; \ ++ } \ ++ } ++ + #else + #error "Missing calling convention definitions for this architecture" + #endif +@@ -891,6 +982,51 @@ static void ccall_copy_struct(CCallState *cc, CType *ctr, void *dp, void *sp, + + #endif + ++/* -- RISC-V ABI struct classification ---------------------------- */ ++ ++#if LJ_TARGET_RISCV64 ++ ++static unsigned int ccall_classify_struct(CTState *cts, CType *ct) ++{ ++ CTSize sz = ct->size; ++ unsigned int r = 0, n = 0, isu = (ct->info & CTF_UNION); ++ while (ct->sib) { ++ CType *sct; ++ ct = ctype_get(cts, ct->sib); ++ if (ctype_isfield(ct->info)) { ++ sct = ctype_rawchild(cts, ct); ++ if (ctype_isfp(sct->info)) { ++ r |= sct->size; ++ if (!isu) n++; else if (n == 0) n = 1; ++ } else if (ctype_iscomplex(sct->info)) { ++ r |= (sct->size >> 1); ++ if (!isu) n += 2; else if (n < 2) n = 2; ++ } else if (ctype_isstruct(sct->info)) { ++ goto substruct; ++ } else { ++ goto noth; ++ } ++ } else if (ctype_isbitfield(ct->info)) { ++ goto noth; ++ } else if (ctype_isxattrib(ct->info, CTA_SUBTYPE)) { ++ sct = ctype_rawchild(cts, ct); ++ substruct: ++ if (sct->size > 0) { ++ unsigned int s = ccall_classify_struct(cts, sct); ++ if (s <= 1) goto noth; ++ r |= (s & 255); ++ if (!isu) n += (s >> 8); else if (n < (s >>8)) n = (s >> 8); ++ } ++ } ++ } ++ if ((r == 4 || r == 8) && n <= 4) ++ return r + (n << 8); ++noth: /* Not a homogeneous float/double aggregate. */ ++ return (sz <= 16); /* Return structs of size <= 16 in GPRs. */ ++} ++ ++#endif ++ + /* -- Common C call handling ---------------------------------------------- */ + + /* Infer the destination CTypeID for a vararg argument. */ +@@ -937,6 +1073,10 @@ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct, + #endif + #endif + ++#if LJ_TARGET_RISCV64 ++ int nff = 0; ++#endif ++ + /* Clear unused regs to get some determinism in case of misdeclaration. */ + memset(cc->gpr, 0, sizeof(cc->gpr)); + #if CCALL_NUM_FPR +@@ -1077,7 +1217,11 @@ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct, + if (isfp && d->size == sizeof(float)) + ((float *)dp)[1] = ((float *)dp)[0]; /* Floats occupy high slot. */ + #endif +-#if LJ_TARGET_MIPS64 || (LJ_TARGET_ARM64 && LJ_BE) ++#if LJ_TARGET_RISCV64 ++ if (isfp && d->size == sizeof(float)) ++ ((uint32_t *)dp)[1] = 0xffffffffu; /* Float NaN boxing */ ++#endif ++#if LJ_TARGET_MIPS64 || (LJ_TARGET_ARM64 && LJ_BE) || LJ_TARGET_RISCV64 + if ((ctype_isinteger_or_bool(d->info) || ctype_isenum(d->info) + #if LJ_TARGET_MIPS64 + || (isfp && nsp == 0) +@@ -1107,6 +1251,14 @@ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct, + CTSize i = (sz >> 2) - 1; + do { ((uint64_t *)dp)[i] = ((uint32_t *)dp)[i]; } while (i--); + } ++#elif LJ_TARGET_RISCV64 ++ if (isfp == 2 && nff <= 2) { ++ /* Split complex float into separate registers. */ ++ CTSize i = (sz >> 2) - 1; ++ do { ++ ((uint64_t *)dp)[i] = 0xffffffff00000000ul | ((uint32_t *)dp)[i]; ++ } while (i--); ++ } + #else + UNUSED(isfp); + #endif +@@ -1116,7 +1268,7 @@ static int ccall_set_args(lua_State *L, CTState *cts, CType *ct, + if ((int32_t)nsp < 0) nsp = 0; + #endif + +-#if LJ_TARGET_X64 || (LJ_TARGET_PPC && !LJ_ABI_SOFTFP) ++#if LJ_TARGET_X64 || (LJ_TARGET_PPC && !LJ_ABI_SOFTFP) || LJ_TARGET_RISCV64 + cc->nfpr = nfpr; /* Required for vararg functions. */ + #endif + cc->nsp = (nsp + CTSIZE_PTR-1) & ~(CTSIZE_PTR-1); +diff --git a/src/lj_ccall.h b/src/lj_ccall.h +index 3528fca55e..d8c59fd8d8 100644 +--- a/src/lj_ccall.h ++++ b/src/lj_ccall.h +@@ -129,6 +129,21 @@ typedef union FPRArg { + struct { LJ_ENDIAN_LOHI(float f; , float g;) }; + } FPRArg; + ++#elif LJ_TARGET_RISCV64 ++ ++#define CCALL_NARG_GPR 8 ++#define CCALL_NARG_FPR 8 ++#define CCALL_NRET_GPR 2 ++#define CCALL_NRET_FPR 2 ++#define CCALL_SPS_EXTRA 3 ++#define CCALL_SPS_FREE 1 ++ ++typedef intptr_t GPRArg; ++typedef union FPRArg { ++ double d; ++ struct { LJ_ENDIAN_LOHI(float f; , float g;) }; ++} FPRArg; ++ + #else + #error "Missing calling convention definitions for this architecture" + #endif +@@ -175,7 +190,7 @@ typedef LJ_ALIGN(CCALL_ALIGN_CALLSTATE) struct CCallState { + uint8_t resx87; /* Result on x87 stack: 1:float, 2:double. */ + #elif LJ_TARGET_ARM64 + void *retp; /* Aggregate return pointer in x8. */ +-#elif LJ_TARGET_PPC ++#elif LJ_TARGET_PPC || LJ_TARGET_RISCV64 + uint8_t nfpr; /* Number of arguments in FPRs. */ + #endif + #if LJ_32 +diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c +index 52f92932f0..e904c49339 100644 +--- a/src/lj_ccallback.c ++++ b/src/lj_ccallback.c +@@ -71,6 +71,10 @@ static MSize CALLBACK_OFS2SLOT(MSize ofs) + + #define CALLBACK_MCODE_HEAD 52 + ++#elif LJ_TARGET_RISCV64 ++ ++#define CALLBACK_MCODE_HEAD 68 ++ + #else + + /* Missing support for this architecture. */ +@@ -238,6 +242,39 @@ static void *callback_mcode_init(global_State *g, uint32_t *page) + } + return p; + } ++#elif LJ_TARGET_RISCV64 ++static void *callback_mcode_init(global_State *g, uint32_t *page) ++{ ++ uint32_t *p = page; ++ uintptr_t target = (uintptr_t)(void *)lj_vm_ffi_callback; ++ uintptr_t ug = (uintptr_t)(void *)g; ++ uintptr_t target_hi = (target >> 32), target_lo = target & 0xffffffffULL; ++ uintptr_t ug_hi = (ug >> 32), ug_lo = ug & 0xffffffffULL; ++ MSize slot; ++ *p++ = RISCVI_LUI | RISCVF_D(RID_X6) | RISCVF_IMMU(RISCVF_HI(target_hi)); ++ *p++ = RISCVI_LUI | RISCVF_D(RID_X7) | RISCVF_IMMU(RISCVF_HI(ug_hi)); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_IMMI(RISCVF_LO(target_hi)); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_IMMI(RISCVF_LO(ug_hi)); ++ *p++ = RISCVI_SLLI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_SHAMT(11); ++ *p++ = RISCVI_SLLI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_SHAMT(11); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_IMMI(target_lo >> 21); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_IMMI(ug_lo >> 21); ++ *p++ = RISCVI_SLLI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_SHAMT(11); ++ *p++ = RISCVI_SLLI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_SHAMT(11); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_IMMI((target_lo >> 10) & 0x7ff); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_IMMI((ug_lo >> 10) & 0x7ff); ++ *p++ = RISCVI_SLLI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_SHAMT(10); ++ *p++ = RISCVI_SLLI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_SHAMT(10); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X6) | RISCVF_S1(RID_X6) | RISCVF_IMMI(target_lo & 0x3ff); ++ *p++ = RISCVI_ADDI | RISCVF_D(RID_X7) | RISCVF_S1(RID_X7) | RISCVF_IMMI(ug_lo & 0x3ff); ++ *p++ = RISCVI_JALR | RISCVF_D(RID_X0) | RISCVF_S1(RID_X6) | RISCVF_IMMJ(0); ++ for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) { ++ *p++ = RISCVI_LUI | RISCVF_D(RID_X5) | RISCVF_IMMU(slot); ++ *p = RISCVI_JAL | RISCVF_IMMJ(((char *)page-(char *)p)); ++ p++; ++ } ++ return p; ++} + #else + /* Missing support for this architecture. */ + #define callback_mcode_init(g, p) (p) +@@ -512,6 +549,31 @@ void lj_ccallback_mcode_free(CTState *cts) + } + #endif + ++#define CALLBACK_HANDLE_RET \ ++ if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ ++ ((float *)dp)[1] = *(float *)dp; ++ ++#elif LJ_TARGET_RISCV64 ++ ++#define CALLBACK_HANDLE_REGARG \ ++ if (isfp) { \ ++ if (nfpr + n <= CCALL_NARG_FPR) { \ ++ sp = &cts->cb.fpr[nfpr]; \ ++ nfpr += n; \ ++ goto done; \ ++ } else if (ngpr + n <= maxgpr) { \ ++ sp = &cts->cb.gpr[ngpr]; \ ++ ngpr += n; \ ++ goto done; \ ++ } \ ++ } else { \ ++ if (ngpr + n <= maxgpr) { \ ++ sp = &cts->cb.gpr[ngpr]; \ ++ ngpr += n; \ ++ goto done; \ ++ } \ ++ } ++ + #define CALLBACK_HANDLE_RET \ + if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ + ((float *)dp)[1] = *(float *)dp; +@@ -662,7 +724,7 @@ static void callback_conv_result(CTState *cts, lua_State *L, TValue *o) + *(int32_t *)dp = ctr->size == 1 ? (int32_t)*(int8_t *)dp : + (int32_t)*(int16_t *)dp; + } +-#if LJ_TARGET_MIPS64 || (LJ_TARGET_ARM64 && LJ_BE) ++#if LJ_TARGET_MIPS64 || (LJ_TARGET_ARM64 && LJ_BE) || LJ_TARGET_RISCV64 + /* Always sign-extend results to 64 bits. Even a soft-fp 'float'. */ + if (ctr->size <= 4 && + (LJ_ABI_SOFTFP || ctype_isinteger_or_bool(ctr->info))) +diff --git a/src/lj_target_riscv.h b/src/lj_target_riscv.h +index a2a907dbad..22948dc5a4 100644 +--- a/src/lj_target_riscv.h ++++ b/src/lj_target_riscv.h +@@ -1,6 +1,6 @@ + /* + ** Definitions for RISC-V CPUs. +-** Copyright (C) 2005-2023 Mike Pall. See Copyright Notice in luajit.h ++** Copyright (C) 2005-2025 Mike Pall. See Copyright Notice in luajit.h + */ + + #ifndef _LJ_TARGET_RISCV_H +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index c86f94bddb..0a8970a109 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -812,14 +812,29 @@ static void build_subroutines(BuildCtx *ctx) + | mv BASE, TMP2 // Restore caller BASE. + | ld LFUNC:TMP1, FRAME_FUNC(TMP2) + | ld PC, -24(RB) // Restore PC from [cont|PC]. ++ |.if FFI ++ | sltiu TMP3, TMP0, 2 ++ |.endif + | cleartp LFUNC:TMP1 + | add TMP2, RA, RD + | ld TMP1, LFUNC:TMP1->pc + | sd TISNIL, -8(TMP2) // Ensure one valid arg. ++ |.if FFI ++ | bnez TMP3, >1 ++ |.endif + | // BASE = base, RA = resultptr, RB = meta base + | ld KBASE, PC2PROTO(k)(TMP1) + | jr TMP0 // Jump to continuation. + | ++ |.if FFI ++ |1: ++ | addi TMP1, RB, -32 ++ | bxnez TMP0, ->cont_ffi_callback // cont = 1: return from FFI callback. ++ | // cont = 0: tailcall from C function. ++ | sub RC, TMP1, BASE ++ | j ->vm_call_tail ++ |.endif ++ | + |->cont_cat: // RA = resultptr, RB = meta base + | lw INS, -4(PC) + | addi CARG2, RB, -32 +@@ -1019,6 +1034,18 @@ static void build_subroutines(BuildCtx *ctx) + | // Returns 0/1 or TValue * (metamethod). + | j <3 + | ++ |->vmeta_equal_cd: ++ |.if FFI ++ | addi PC, PC, -4 ++ | mv CARG1, L ++ | mv CARG2, INS ++ | sd BASE, L->base ++ | sd PC, SAVE_PC(sp) ++ | call_intern vmeta_equal_cd, lj_meta_equal_cd // (lua_State *L, BCIns op) ++ | // Returns 0/1 or TValue * (metamethod). ++ | j <3 ++ |.endif ++ | + |->vmeta_istype: + | addi PC, PC, -4 + | sd BASE, L->base +@@ -2219,6 +2246,133 @@ static void build_subroutines(BuildCtx *ctx) + |.endif + | + |//----------------------------------------------------------------------- ++ |//-- FFI helper functions ----------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |// Handler for callback functions. Callback slot number in x5, g in x7. ++ |->vm_ffi_callback: ++ |.if FFI ++ |.type CTSTATE, CTState, PC ++ | saveregs ++ | ld CTSTATE, GL:x7->ctype_state ++ | mv GL, x7 ++ | addxi DISPATCH, x7, GG_G2DISP ++ | srli x5, x5, 12 ++ | sw x5, CTSTATE->cb.slot ++ | sd CARG1, CTSTATE->cb.gpr[0] ++ | fsd FARG1, CTSTATE->cb.fpr[0] ++ | sd CARG2, CTSTATE->cb.gpr[1] ++ | fsd FARG2, CTSTATE->cb.fpr[1] ++ | sd CARG3, CTSTATE->cb.gpr[2] ++ | fsd FARG3, CTSTATE->cb.fpr[2] ++ | sd CARG4, CTSTATE->cb.gpr[3] ++ | fsd FARG4, CTSTATE->cb.fpr[3] ++ | sd CARG5, CTSTATE->cb.gpr[4] ++ | fsd FARG5, CTSTATE->cb.fpr[4] ++ | sd CARG6, CTSTATE->cb.gpr[5] ++ | fsd FARG6, CTSTATE->cb.fpr[5] ++ | sd CARG7, CTSTATE->cb.gpr[6] ++ | fsd FARG7, CTSTATE->cb.fpr[6] ++ | sd CARG8, CTSTATE->cb.gpr[7] ++ | fsd FARG8, CTSTATE->cb.fpr[7] ++ | addi TMP0, sp, CFRAME_SPACE ++ | sd TMP0, CTSTATE->cb.stack ++ | sd x0, SAVE_PC(sp) // Any value outside of bytecode is ok. ++ | mv CARG1, CTSTATE ++ | mv CARG2, sp ++ | call_intern vm_ffi_callback, lj_ccallback_enter // (CTState *cts, void *cf) ++ | // Returns lua_State *. ++ | ld BASE, L:CRET1->base ++ | ld RC, L:CRET1->top ++ | mv L, CRET1 ++ | lui TMP3, 0x43380 // TOBIT = Hiword of 2^52 + 2^51 (double). ++ | ld LFUNC:RB, FRAME_FUNC(BASE) ++ | li TISNIL, LJ_TNIL ++ | li TISNUM, LJ_TISNUM ++ | slli TMP3, TMP3, 32 ++ | li_vmstate INTERP ++ | subw RC, RC, BASE ++ | cleartp LFUNC:RB ++ | st_vmstate ++ | fmv.d.x TOBIT, TMP3 ++ | ins_callt ++ |.endif ++ | ++ |->cont_ffi_callback: // Return from FFI callback. ++ |.if FFI ++ | ld CTSTATE, GL->ctype_state ++ | sd BASE, L->base ++ | sd RB, L->top ++ | sd L, CTSTATE->L ++ | mv CARG1, CTSTATE ++ | mv CARG2, RA ++ | // (CTState *cts, TValue *o) ++ | call_intern cont_ffi_callback, lj_ccallback_leave ++ | fld FRET1, CTSTATE->cb.fpr[0] ++ | ld CRET1, CTSTATE->cb.gpr[0] ++ | fld FRET2, CTSTATE->cb.fpr[1] ++ | ld CRET2, CTSTATE->cb.gpr[1] ++ | j ->vm_leave_unw ++ |.endif ++ | ++ |->vm_ffi_call: // Call C function via FFI. ++ | // Caveat: needs special frame unwinding, see below. ++ |.if FFI ++ | .type CCSTATE, CCallState, CARG1 ++ | lw TMP1, CCSTATE->spadj ++ | lbu CARG2, CCSTATE->nsp ++ | lbu CARG3, CCSTATE->nfpr ++ | mv TMP2, sp ++ | sub sp, sp, TMP1 ++ | sd ra, -8(TMP2) ++ | sd x18, -16(TMP2) ++ | sd CCSTATE, -24(TMP2) ++ | mv x18, TMP2 ++ | addi TMP1, CCSTATE, offsetof(CCallState, stack) ++ | mv TMP2, sp ++ | add TMP3, TMP1, CARG2 ++ | beqz CARG2, >2 ++ |1: ++ | ld TMP0, 0(TMP1) ++ | addi TMP1, TMP1, 8 ++ | sd TMP0, 0(TMP2) ++ | addi TMP2, TMP2, 8 ++ | bltu TMP1, TMP3, <1 ++ |2: ++ | beqz CARG3, >3 ++ | fld FARG1, CCSTATE->fpr[0] ++ | fld FARG2, CCSTATE->fpr[1] ++ | fld FARG3, CCSTATE->fpr[2] ++ | fld FARG4, CCSTATE->fpr[3] ++ | fld FARG5, CCSTATE->fpr[4] ++ | fld FARG6, CCSTATE->fpr[5] ++ | fld FARG7, CCSTATE->fpr[6] ++ | fld FARG8, CCSTATE->fpr[7] ++ |3: ++ | ld CFUNCADDR, CCSTATE->func ++ | ld CARG2, CCSTATE->gpr[1] ++ | ld CARG3, CCSTATE->gpr[2] ++ | ld CARG4, CCSTATE->gpr[3] ++ | ld CARG5, CCSTATE->gpr[4] ++ | ld CARG6, CCSTATE->gpr[5] ++ | ld CARG7, CCSTATE->gpr[6] ++ | ld CARG8, CCSTATE->gpr[7] ++ | ld CARG1, CCSTATE->gpr[0] // Do this last, since CCSTATE is CARG1. ++ | jalr CFUNCADDR ++ | ld CCSTATE:TMP1, -24(x18) ++ | ld TMP0, -16(x18) ++ | ld ra, -8(x18) ++ | sd CRET1, CCSTATE:TMP1->gpr[0] ++ | sd CRET2, CCSTATE:TMP1->gpr[1] ++ | fsd FRET1, CCSTATE:TMP1->fpr[0] ++ | fsd FRET2, CCSTATE:TMP1->fpr[1] ++ | mv sp, x18 ++ | mv x18, TMP0 ++ | ret ++ |.endif ++ |// Note: vm_ffi_call must be the last function in this object file! ++ | ++ |//----------------------------------------------------------------------- + } + + /* Generate the code for a single instruction. */ +@@ -2343,6 +2497,13 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | beqz TMP0, ->BC_ISNEN_Z + } + |// Either or both types are not numbers. ++ |.if FFI ++ | // Check if RA or RD is a cdata. ++ | xori TMP0, CARG3, LJ_TCDATA ++ | xori TMP1, CARG4, LJ_TCDATA ++ | and TMP0, TMP0, TMP1 ++ | bxeqz TMP0, ->vmeta_equal_cd ++ |.endif + | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 + | decode_BC4b TMP2 + | addw TMP2, TMP2, TMP3 // (jump-0x8000)<<2 +@@ -2395,10 +2556,17 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | sub RD, KBASE, RD + | lhu TMP2, -4+OFS_RD(PC) + | ld CARG2, -8(RD) // KBASE-8-str_const*8 ++ |.if FFI ++ | gettp CARG3, CARG1 ++ | li TMP1, LJ_TCDATA ++ |.endif + | li TMP0, LJ_TSTR + | decode_BC4b TMP2 + | settp CARG2, TMP0 + | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 ++ |.if FFI ++ | bxeq CARG3, TMP1, ->vmeta_equal_cd ++ |.endif + | xor TMP0, CARG1, CARG2 // TMP2=0: A==D; TMP2!=0: A!=D + | addw TMP2, TMP2, TMP3 + if (vk) { +@@ -2453,7 +2621,11 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | + |4: // RA is not an integer. + | addw TMP2, TMP2, TMP3 ++ |.if FFI ++ | bgeu CARG3, TISNUM, >7 ++ |.else + | bgeu CARG3, TISNUM, <2 ++ |.endif + | fmv.d.x FTMP0, CARG1 + | fmv.d.x FTMP2, CARG2 + | bne CARG4, TISNUM, >5 +@@ -2466,11 +2638,26 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | j <1 + | + |6: // RA is an integer, RD is a number. ++ |.if FFI ++ | bgeu CARG4, TISNUM, >8 ++ |.else + | bgeu CARG4, TISNUM, <2 ++ |.endif + | fcvt.d.w FTMP0, CARG1 + | fmv.d.x FTMP2, CARG2 + | j <5 + | ++ |.if FFI ++ |7: // RA not int, not number ++ | li TMP0, LJ_TCDATA ++ | bne CARG3, TMP0, <2 ++ | j ->vmeta_equal_cd ++ | ++ |8: // RD not int, not number ++ | li TMP0, LJ_TCDATA ++ | bne CARG4, TMP0, <2 ++ | j ->vmeta_equal_cd ++ |.endif + break; + + case BC_ISEQP: case BC_ISNEP: +@@ -2484,6 +2671,10 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | gettp TMP1, TMP1 + | addi PC, PC, 4 + | xor TMP0, TMP1, TMP0 // TMP0=0 A=D; TMP0!=0 A!=D ++ |.if FFI ++ | li TMP3, LJ_TCDATA ++ | bxeq TMP1, TMP3, ->vmeta_equal_cd ++ |.endif + | decode_BC4b TMP2 + | lui TMP3, (-(BCBIAS_J*4 >> 12)) & 0xfffff // -BCBIAS_J*4 + | addw TMP2, TMP2, TMP3 // TMP2=(jump-0x8000)<<2 +@@ -2824,6 +3015,16 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | ins_next + break; + case BC_KCDATA: ++ |.if FFI ++ | // RA = dst*8, RD = cdata_const*8 (~) ++ | sub TMP1, KBASE, RD ++ | ld TMP0, -8(TMP1) // KBASE-8-cdata_const*8 ++ | li TMP2, LJ_TCDATA ++ | add RA, BASE, RA ++ | settp TMP0, TMP2 ++ | sd TMP0, 0(RA) ++ | ins_next ++ |.endif + break; + case BC_KSHORT: + | // RA = dst*8, RD = int16_literal*8 + +From e1ce400d1fe432e5eee562ec4d000082e0189a0e Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:27:26 +0800 +Subject: [PATCH 09/22] riscv(support): add extension detection + +--- + src/lib_jit.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++ + src/lj_jit.h | 11 +++++ + 2 files changed, 134 insertions(+) + +diff --git a/src/lib_jit.c b/src/lib_jit.c +index fd8e585b83..e97e4d45e8 100644 +--- a/src/lib_jit.c ++++ b/src/lib_jit.c +@@ -631,6 +631,111 @@ JIT_PARAMDEF(JIT_PARAMINIT) + #include + #endif + ++#if LJ_TARGET_RISCV64 && LJ_TARGET_POSIX ++#include ++#include ++static sigjmp_buf sigbuf = {0}; ++static void detect_sigill(int sig) ++{ ++ siglongjmp(sigbuf, 1); ++} ++ ++static int riscv_compressed() ++{ ++#if defined(__riscv_c) || defined(__riscv_compressed) ++ /* Don't bother checking for RVC -- would crash before getting here. */ ++ return 1; ++#elif defined(__GNUC__) ++ /* c.nop; c.nop; */ ++ __asm__(".4byte 0x00010001"); ++ return 1; ++#else ++ return 0; ++#endif ++} ++ ++static int riscv_zba() ++{ ++#if defined(__riscv_b) || defined(__riscv_zba) ++ /* Don't bother checking for Zba -- would crash before getting here. */ ++ return 1; ++#elif defined(__GNUC__) ++ /* Don't bother verifying the result, just check if the instruction exists. */ ++ /* add.uw zero, zero, zero */ ++ __asm__(".4byte 0x0800003b"); ++ return 1; ++#else ++ return 0; ++#endif ++} ++ ++static int riscv_zbb() ++{ ++#if defined(__riscv_b) || defined(__riscv_zbb) ++ /* Don't bother checking for Zbb -- would crash before getting here. */ ++ return 1; ++#elif defined(__GNUC__) ++ register int t asm ("a0"); ++ /* addi a0, zero, 255; sext.b a0, a0; */ ++ __asm__("addi a0, zero, 255\n\t.4byte 0x60451513"); ++ return t < 0; ++#else ++ return 0; ++#endif ++} ++ ++static int riscv_zicond() ++{ ++#if defined(__riscv_zicond) ++ /* Don't bother checking for Zicond -- would crash before getting here. */ ++ return 1; ++#elif defined(__GNUC__) ++ /* czero.eqz zero, zero, zero; */ ++ __asm__(".4byte 0x0e005033"); ++ return 1; ++#else ++ return 0; ++#endif ++} ++ ++static int riscv_zfa() ++{ ++#if defined(__riscv_zfa) ++ /* Don't bother checking for Zfa -- would crash before getting here. */ ++ return 1; ++#else ++ return 0; ++#endif ++} ++ ++static int riscv_xthead() ++{ ++#if (defined(__riscv_xtheadba) \ ++ && defined(__riscv_xtheadbb) \ ++ && defined(__riscv_xtheadcondmov) \ ++ && defined(__riscv_xtheadmac)) ++ /* Don't bother checking for XThead -- would crash before getting here. */ ++ return 1; ++#elif defined(__GNUC__) ++ register int t asm ("a0"); ++ /* C906 & C910 & C908 all have "xtheadc", XTheadBb subset "xtheadc". */ ++ /* Therefore assume XThead* are present if XTheadBb is present. */ ++ /* addi a0, zero, 255; th.ext a0, a0, 7, 0; */ ++ __asm__("addi a0, zero, 255\n\t.4byte 0x1c05250b"); ++ return t == -1; /* In case of collision with other vendor extensions. */ ++#else ++ return 0; ++#endif ++} ++ ++static uint32_t riscv_probe(int (*func)(void), uint32_t flag) ++{ ++ if (sigsetjmp(sigbuf, 1) == 0) { ++ return func() ? flag : 0; ++ } else return 0; ++} ++#endif ++ + /* Arch-dependent CPU feature detection. */ + static uint32_t jit_cpudetect(void) + { +@@ -702,6 +807,24 @@ static uint32_t jit_cpudetect(void) + } + #endif + ++#elif LJ_TARGET_RISCV64 ++#if LJ_HASJIT ++ /* SIGILL-based detection of RVC, Zba, Zbb and XThead. Welcome to the future. */ ++ struct sigaction old = {0}, act = {0}; ++ act.sa_handler = detect_sigill; ++ sigaction(SIGILL, &act, &old); ++ flags |= riscv_probe(riscv_compressed, JIT_F_RVC); ++ flags |= riscv_probe(riscv_zba, JIT_F_RVZba); ++ flags |= riscv_probe(riscv_zbb, JIT_F_RVZbb); ++ flags |= riscv_probe(riscv_zicond, JIT_F_RVZicond); ++ flags |= riscv_probe(riscv_zfa, JIT_F_RVZfa); ++ flags |= riscv_probe(riscv_xthead, JIT_F_RVXThead); ++ sigaction(SIGILL, &old, NULL); ++ ++ /* Detect V/P? */ ++ /* V have no hardware available, P not ratified yet. */ ++#endif ++ + #else + #error "Missing CPU detection for this architecture" + #endif +diff --git a/src/lj_jit.h b/src/lj_jit.h +index 102ba0b4b7..e61d99ffa9 100644 +--- a/src/lj_jit.h ++++ b/src/lj_jit.h +@@ -67,6 +67,17 @@ + #endif + #endif + ++#elif LJ_TARGET_RISCV64 ++ ++#define JIT_F_RVC (JIT_F_CPU << 0) ++#define JIT_F_RVZba (JIT_F_CPU << 1) ++#define JIT_F_RVZbb (JIT_F_CPU << 2) ++#define JIT_F_RVZicond (JIT_F_CPU << 3) ++#define JIT_F_RVZfa (JIT_F_CPU << 4) ++#define JIT_F_RVXThead (JIT_F_CPU << 5) ++ ++#define JIT_F_CPUSTRING "\003RVC\003Zba\003Zbb\006Zicond\003Zfa\006XThead" ++ + #else + + #define JIT_F_CPUSTRING "" + +From 160c28acb57e27189f439ebb4ad2a2ad07301b36 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:29:41 +0800 +Subject: [PATCH 10/22] riscv(jit): add insn emitter + +--- + src/lj_emit_riscv.h | 574 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 574 insertions(+) + create mode 100644 src/lj_emit_riscv.h + +diff --git a/src/lj_emit_riscv.h b/src/lj_emit_riscv.h +new file mode 100644 +index 0000000000..d4160663e2 +--- /dev/null ++++ b/src/lj_emit_riscv.h +@@ -0,0 +1,574 @@ ++/* ++** RISC-V instruction emitter. ++** Copyright (C) 2005-2025 Mike Pall. See Copyright Notice in luajit.h ++** ++** Contributed by gns from PLCT Lab, ISCAS. ++*/ ++ ++static intptr_t get_k64val(ASMState *as, IRRef ref) ++{ ++ IRIns *ir = IR(ref); ++ if (ir->o == IR_KINT64) { ++ return (intptr_t)ir_kint64(ir)->u64; ++ } else if (ir->o == IR_KGC) { ++ return (intptr_t)ir_kgc(ir); ++ } else if (ir->o == IR_KPTR || ir->o == IR_KKPTR) { ++ return (intptr_t)ir_kptr(ir); ++ } else { ++ lj_assertA(ir->o == IR_KINT || ir->o == IR_KNULL, ++ "bad 64 bit const IR op %d", ir->o); ++ return ir->i; /* Sign-extended. */ ++ } ++} ++ ++#define get_kval(as, ref) get_k64val(as, ref) ++ ++/* -- Emit basic instructions --------------------------------------------- */ ++ ++static void emit_r(ASMState *as, RISCVIns riscvi, Reg rd, Reg rs1, Reg rs2) ++{ ++ *--as->mcp = riscvi | RISCVF_D(rd) | RISCVF_S1(rs1) | RISCVF_S2(rs2); ++} ++ ++#define emit_ds(as, riscvi, rd, rs1) emit_r(as, riscvi, rd, rs1, 0) ++#define emit_ds2(as, riscvi, rd, rs2) emit_r(as, riscvi, rd, 0, rs2) ++#define emit_ds1s2(as, riscvi, rd, rs1, rs2) emit_r(as, riscvi, rd, rs1, rs2) ++ ++static void emit_r4(ASMState *as, RISCVIns riscvi, Reg rd, Reg rs1, Reg rs2, Reg rs3) ++{ ++ *--as->mcp = riscvi | RISCVF_D(rd) | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_S3(rs3); ++} ++ ++#define emit_ds1s2s3(as, riscvi, rd, rs1, rs2, rs3) emit_r4(as, riscvi, rd, rs1, rs2, rs3) ++ ++static void emit_i(ASMState *as, RISCVIns riscvi, Reg rd, Reg rs1, int32_t i) ++{ ++ *--as->mcp = riscvi | RISCVF_D(rd) | RISCVF_S1(rs1) | RISCVF_IMMI((uint32_t)i & 0xfff); ++} ++ ++#define emit_di(as, riscvi, rd, i) emit_i(as, riscvi, rd, 0, i) ++#define emit_dsi(as, riscvi, rd, rs1, i) emit_i(as, riscvi, rd, rs1, i) ++#define emit_dsshamt(as, riscvi, rd, rs1, i) emit_i(as, riscvi, rd, rs1, i&0x3f) ++ ++static void emit_s(ASMState *as, RISCVIns riscvi, Reg rs1, Reg rs2, int32_t i) ++{ ++ *--as->mcp = riscvi | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_IMMS((uint32_t)i & 0xfff); ++} ++ ++#define emit_s1s2i(as, riscvi, rs1, rs2, i) emit_s(as, riscvi, rs1, rs2, i) ++ ++/* ++static void emit_b(ASMState *as, RISCVIns riscvi, Reg rs1, Reg rs2, int32_t i) ++{ ++ *--as->mcp = riscvi | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_IMMB((uint32_t)i & 0x1ffe); ++} ++*/ ++ ++static void emit_u(ASMState *as, RISCVIns riscvi, Reg rd, uint32_t i) ++{ ++ *--as->mcp = riscvi | RISCVF_D(rd) | RISCVF_IMMU(i & 0xfffff); ++} ++ ++#define emit_du(as, riscvi, rd, i) emit_u(as, riscvi, rd, i) ++ ++/* ++static void emit_j(ASMState *as, RISCVIns riscvi, Reg rd, int32_t i) ++{ ++ *--as->mcp = riscvi | RISCVF_D(rd) | RISCVF_IMMJ((uint32_t)i & 0x1fffffe); ++} ++*/ ++ ++static Reg ra_allock(ASMState *as, intptr_t k, RegSet allow); ++static void ra_allockreg(ASMState *as, intptr_t k, Reg r); ++static Reg ra_scratch(ASMState *as, RegSet allow); ++ ++static void emit_lso(ASMState *as, RISCVIns riscvi, Reg data, Reg base, int32_t ofs) ++{ ++ lj_assertA(checki12(ofs), "load/store offset %d out of range", ofs); ++ switch (riscvi) { ++ case RISCVI_LD: case RISCVI_LW: case RISCVI_LH: case RISCVI_LB: ++ case RISCVI_LWU: case RISCVI_LHU: case RISCVI_LBU: ++ case RISCVI_FLW: case RISCVI_FLD: ++ emit_dsi(as, riscvi, data, base, ofs); ++ break; ++ case RISCVI_SD: case RISCVI_SW: case RISCVI_SH: case RISCVI_SB: ++ case RISCVI_FSW: case RISCVI_FSD: ++ emit_s1s2i(as, riscvi, base, data, ofs); ++ break; ++ default: lj_assertA(0, "invalid lso"); break; ++ } ++} ++ ++static void emit_roti(ASMState *as, RISCVIns riscvi, Reg rd, Reg rs1, Reg tmp, ++ int32_t shamt) ++{ ++ if (as->flags & JIT_F_RVZbb || as->flags & JIT_F_RVXThead) { ++ if (!(as->flags & JIT_F_RVZbb)) switch (riscvi) { ++ case RISCVI_RORI: riscvi = RISCVI_TH_SRRI; break; ++ case RISCVI_RORIW: riscvi = RISCVI_TH_SRRIW; break; ++ default: lj_assertA(0, "invalid roti op"); break; ++ } ++ emit_dsshamt(as, riscvi, rd, rs1, shamt); ++ } else { ++ RISCVIns ai, bi; ++ int32_t shwid, shmsk; ++ switch (riscvi) { ++ case RISCVI_RORI: ++ ai = RISCVI_SRLI, bi = RISCVI_SLLI; ++ shwid = 64, shmsk = 63; ++ break; ++ case RISCVI_RORIW: ++ ai = RISCVI_SRLIW, bi = RISCVI_SLLIW; ++ shwid = 32, shmsk = 31; ++ break; ++ default: ++ lj_assertA(0, "invalid roti op"); ++ return; ++ } ++ emit_ds1s2(as, RISCVI_OR, rd, rd, tmp); ++ emit_dsshamt(as, bi, rd, rs1, (shwid - shamt)&shmsk); ++ emit_dsshamt(as, ai, tmp, rs1, shamt&shmsk); ++ } ++} ++ ++static void emit_rot(ASMState *as, RISCVIns riscvi, Reg rd, Reg rs1, Reg rs2, Reg tmp) ++{ ++ if (as->flags & JIT_F_RVZbb) { ++ emit_ds1s2(as, riscvi, rd, rs1, rs2); ++ } else { ++ RISCVIns sai, sbi; ++ switch (riscvi) { ++ case RISCVI_ROL: ++ sai = RISCVI_SLL, sbi = RISCVI_SRL; ++ break; ++ case RISCVI_ROR: ++ sai = RISCVI_SRL, sbi = RISCVI_SLL; ++ break; ++ case RISCVI_ROLW: ++ sai = RISCVI_SLLW, sbi = RISCVI_SRLW; ++ break; ++ case RISCVI_RORW: ++ sai = RISCVI_SRLW, sbi = RISCVI_SLLW; ++ break; ++ default: ++ lj_assertA(0, "invalid rot op"); ++ return; ++ } ++ if (rd == rs2) { ++ emit_ds1s2(as, RISCVI_OR, rd, rd, tmp); ++ emit_ds1s2(as, sbi, tmp, rs1, tmp); ++ emit_ds1s2(as, sai, rd, rs1, rs2); ++ emit_ds2(as, RISCVI_NEG, tmp, rs2); ++ } else { ++ emit_ds1s2(as, RISCVI_OR, rd, rd, tmp); ++ emit_ds1s2(as, sai, rd, rs1, rs2); ++ emit_ds1s2(as, sbi, tmp, rs1, tmp); ++ emit_ds2(as, RISCVI_NEG, tmp, rs2); ++ } ++ } ++} ++ ++static void emit_ext(ASMState *as, RISCVIns riscvi, Reg rd, Reg rs1) ++{ ++ if ((riscvi != RISCVI_ZEXT_W && as->flags & JIT_F_RVZbb) || ++ (riscvi == RISCVI_ZEXT_W && as->flags & JIT_F_RVZba)) { ++ emit_ds(as, riscvi, rd, rs1); ++ } else if (as->flags & JIT_F_RVXThead) { ++ uint32_t hi, sext; ++ switch (riscvi) { ++ case RISCVI_ZEXT_B: ++ case RISCVI_SEXT_W: ++ emit_ds(as, riscvi, rd, rs1); ++ return; ++ case RISCVI_ZEXT_H: ++ hi = 15, sext = 0; ++ break; ++ case RISCVI_ZEXT_W: ++ hi = 31, sext = 0; ++ break; ++ case RISCVI_SEXT_B: ++ hi = 7, sext = 1; ++ break; ++ case RISCVI_SEXT_H: ++ hi = 15, sext = 1; ++ break; ++ default: ++ lj_assertA(0, "invalid ext op"); ++ return; ++ } ++ emit_dsi(as, sext ? RISCVI_TH_EXT : RISCVI_TH_EXTU, ++ rd, rs1, hi << 6); ++ } else { ++ RISCVIns sli, sri; ++ int32_t shamt; ++ switch (riscvi) { ++ case RISCVI_ZEXT_B: ++ case RISCVI_SEXT_W: ++ emit_ds(as, riscvi, rd, rs1); ++ return; ++ case RISCVI_ZEXT_H: ++ sli = RISCVI_SLLI, sri = RISCVI_SRLI; ++ shamt = 48; ++ break; ++ case RISCVI_ZEXT_W: ++ sli = RISCVI_SLLI, sri = RISCVI_SRLI; ++ shamt = 32; ++ break; ++ case RISCVI_SEXT_B: ++ sli = RISCVI_SLLI, sri = RISCVI_SRAI; ++ shamt = 56; ++ break; ++ case RISCVI_SEXT_H: ++ sli = RISCVI_SLLI, sri = RISCVI_SRAI; ++ shamt = 48; ++ break; ++ default: ++ lj_assertA(0, "invalid ext op"); ++ return; ++ } ++ emit_dsshamt(as, sri, rd, rd, shamt); ++ emit_dsshamt(as, sli, rd, rs1, shamt); ++ } ++} ++ ++static void emit_cleartp(ASMState *as, Reg rd, Reg rs1) ++{ ++ if (as->flags & JIT_F_RVXThead) { ++ emit_dsi(as, RISCVI_TH_EXTU, rd, rs1, 46u << 6); ++ } else { ++ emit_dsshamt(as, RISCVI_SRLI, rd, rd, 17); ++ emit_dsshamt(as, RISCVI_SLLI, rd, rs1, 17); ++ } ++} ++ ++/* ++static void emit_andn(ASMState *as, Reg rd, Reg rs1, Reg rs2, Reg tmp) ++{ ++ if (as->flags & JIT_F_RVZbb) { ++ emit_ds1s2(as, RISCVI_ANDN, rd, rs1, rs2); ++ } else { ++ emit_ds1s2(as, RISCVI_AND, rd, rs1, tmp); ++ emit_ds(as, RISCVI_NOT, tmp, rs2); ++ } ++} ++*/ ++ ++/* ++static void emit_orn(ASMState *as, Reg rd, Reg rs1, Reg rs2, Reg tmp) ++{ ++ if (as->flags & JIT_F_RVZbb) { ++ emit_ds1s2(as, RISCVI_ORN, rd, rs1, rs2); ++ } else { ++ emit_ds1s2(as, RISCVI_OR, rd, rs1, tmp); ++ emit_ds(as, RISCVI_NOT, tmp, rs2); ++ } ++} ++*/ ++ ++static void emit_xnor(ASMState *as, Reg rd, Reg rs1, Reg rs2) ++{ ++ if (as->flags & JIT_F_RVZbb) { ++ emit_ds1s2(as, RISCVI_XNOR, rd, rs1, rs2); ++ } else { ++ emit_ds(as, RISCVI_NOT, rd, rd); ++ emit_ds1s2(as, RISCVI_XOR, rd, rs1, rs2); ++ } ++} ++ ++static void emit_shxadd(ASMState *as, Reg rd, Reg rs1, Reg rs2, Reg tmp, unsigned int shamt) ++{ ++ if (as->flags & JIT_F_RVZba) { ++ switch (shamt) { ++ case 1: emit_ds1s2(as, RISCVI_SH1ADD, rd, rs2, rs1); break; ++ case 2: emit_ds1s2(as, RISCVI_SH2ADD, rd, rs2, rs1); break; ++ case 3: emit_ds1s2(as, RISCVI_SH3ADD, rd, rs2, rs1); break; ++ default: return; ++ } ++ } else if (as->flags & JIT_F_RVXThead) { ++ emit_dsi(as, RISCVI_TH_ADDSL|RISCVF_IMMI(shamt<<5), rd, rs1, rs2); ++ } else { ++ emit_ds1s2(as, RISCVI_ADD, rd, rs1, tmp); ++ emit_dsshamt(as, RISCVI_SLLI, tmp, rs2, shamt); ++ } ++} ++ ++#define emit_sh1add(as, rd, rs1, rs2, tmp) emit_shxadd(as, rd, rs1, rs2, tmp, 1) ++#define emit_sh2add(as, rd, rs1, rs2, tmp) emit_shxadd(as, rd, rs1, rs2, tmp, 2) ++#define emit_sh3add(as, rd, rs1, rs2, tmp) emit_shxadd(as, rd, rs1, rs2, tmp, 3) ++ ++static void emit_loadk12(ASMState *as, Reg rd, int32_t i) ++{ ++ emit_di(as, RISCVI_ADDI, rd, i); ++} ++ ++static void emit_loadk32(ASMState *as, Reg rd, int32_t i) ++{ ++ if (checki12((int64_t)i)) { ++ emit_loadk12(as, rd, i); ++ } else { ++ if(LJ_UNLIKELY(RISCVF_HI((uint32_t)i) == 0x80000u && i > 0)) ++ emit_dsi(as, RISCVI_XORI, rd, rd, RISCVF_LO(i)); ++ else ++ emit_dsi(as, RISCVI_ADDI, rd, rd, RISCVF_LO(i)); ++ emit_du(as, RISCVI_LUI, rd, RISCVF_HI((uint32_t)i)); ++ } ++} ++ ++/* -- Emit loads/stores --------------------------------------------------- */ ++ ++/* Prefer rematerialization of BASE/L from global_State over spills. */ ++#define emit_canremat(ref) ((ref) <= REF_BASE) ++ ++ ++/* Load a 32 bit constant into a GPR. */ ++#define emit_loadi(as, r, i) emit_loadk32(as, r, i); ++ ++/* Load a 64 bit constant into a GPR. */ ++static void emit_loadu64(ASMState *as, Reg r, uint64_t u64) ++{ ++ int64_t u64_delta = (int64_t)((intptr_t)u64 - (intptr_t)(as->mcp - 2)); ++ if (checki32((int64_t)u64)) { ++ emit_loadk32(as, r, (int32_t)u64); ++ } else if (checki32auipc(u64_delta)) { ++ emit_dsi(as, RISCVI_ADDI, r, r, RISCVF_LO(u64_delta)); ++ emit_du(as, RISCVI_AUIPC, r, RISCVF_HI(u64_delta)); ++ } else { ++ uint32_t lo32 = u64 & 0xfffffffful; ++ if (checku11(lo32)) { ++ if (lo32 > 0) emit_dsi(as, RISCVI_ADDI, r, r, lo32); ++ emit_dsshamt(as, RISCVI_SLLI, r, r, 32); ++ } else { ++ RISCVIns li_insn[7] = {0}; ++ int shamt = 0, step = 0; ++ for(int bit = 0; bit < 32; bit++) { ++ if (lo32 & (1u << bit)) { ++ if (shamt) li_insn[step++] = RISCVI_SLLI | RISCVF_D(r) | RISCVF_S1(r) | RISCVF_IMMI(shamt); ++ int inc = bit+10 > 31 ? 31-bit : 10; ++ bit += inc, shamt = inc+1; ++ uint32_t msk = ((1ul << (bit+1))-1)^((1ul << (((bit-inc) >= 0) ? (bit-inc) : 0))-1); ++ uint16_t payload = (lo32 & msk) >> (((bit-inc) >= 0) ? (bit-inc) : 0); ++ li_insn[step++] = RISCVI_ADDI | RISCVF_D(r) | RISCVF_S1(r) | RISCVF_IMMI(payload); ++ } else shamt++; ++ } ++ if (shamt) li_insn[step++] = RISCVI_SLLI | RISCVF_D(r) | RISCVF_S1(r) | RISCVF_IMMI(shamt); ++ ++ if (step < 6) { ++ for(int i = 0; i < step; i++) ++ *--as->mcp = li_insn[i]; ++ } else { ++ emit_dsi(as, RISCVI_ADDI, r, r, u64 & 0x3ff); ++ emit_dsshamt(as, RISCVI_SLLI, r, r, 10); ++ emit_dsi(as, RISCVI_ADDI, r, r, (u64 >> 10) & 0x7ff); ++ emit_dsshamt(as, RISCVI_SLLI, r, r, 11); ++ emit_dsi(as, RISCVI_ADDI, r, r, (u64 >> 21) & 0x7ff); ++ emit_dsshamt(as, RISCVI_SLLI, r, r, 11); ++ } ++ } ++ ++ uint32_t hi32 = u64 >> 32; ++ if (hi32 & 0xfff) emit_loadk32(as, r, hi32); ++ else emit_du(as, RISCVI_LUI, r, hi32 >> 12); ++ } ++} ++ ++#define emit_loada(as, r, addr) emit_loadu64(as, (r), u64ptr((addr))) ++ ++/* Get/set from constant pointer. */ ++static void emit_lsptr(ASMState *as, RISCVIns riscvi, Reg r, void *p, RegSet allow) ++{ ++ emit_lso(as, riscvi, r, ra_allock(as, igcptr(p), allow), 0); ++} ++ ++/* Load 64 bit IR constant into register. */ ++static void emit_loadk64(ASMState *as, Reg r, IRIns *ir) ++{ ++ const uint64_t *k = &ir_k64(ir)->u64; ++ Reg r64 = r; ++ if (rset_test(RSET_FPR, r)) { ++ if (as->flags & JIT_F_RVZfa) { ++ uint8_t sign = (*k >> 63) & 1; ++ uint16_t k_hi16 = (*k >> 48) & 0xffff; ++ uint64_t k_lo48 = *k & 0xffffffffffff; ++ uint16_t mk_hi16 = k_hi16 & 0x7fff; ++ if (!k_lo48) { ++ if (riscv_fli_map_hi16[0] == k_hi16) { ++ emit_ds(as, RISCVI_FLI_D, r, 0); ++ return; ++ } ++ for (int i = 1; i < 32; i++) { ++ if (riscv_fli_map_hi16[i] == mk_hi16) { ++ if (sign) ++ emit_ds1s2(as, RISCVI_FNEG_D, r, r, r); ++ emit_ds(as, RISCVI_FLI_D, r, i); ++ return; ++ } ++ } ++ } ++ } ++ r64 = RID_TMP; ++ emit_ds(as, RISCVI_FMV_D_X, r, r64); ++ } ++ emit_loadu64(as, r64, *k); ++} ++ ++/* Get/set global_State fields. */ ++static void emit_lsglptr(ASMState *as, RISCVIns riscvi, Reg r, int32_t ofs) ++{ ++ emit_lso(as, riscvi, r, RID_GL, ofs); ++} ++ ++#define emit_getgl(as, r, field) \ ++ emit_lsglptr(as, RISCVI_LD, (r), (int32_t)offsetof(global_State, field)) ++#define emit_setgl(as, r, field) \ ++ emit_lsglptr(as, RISCVI_SD, (r), (int32_t)offsetof(global_State, field)) ++ ++/* Trace number is determined from per-trace exit stubs. */ ++#define emit_setvmstate(as, i) UNUSED(i) ++ ++/* -- Emit control-flow instructions -------------------------------------- */ ++ ++/* Label for internal jumps. */ ++typedef MCode *MCLabel; ++ ++/* Return label pointing to current PC. */ ++#define emit_label(as) ((as)->mcp) ++ ++static void emit_branch(ASMState *as, RISCVIns riscvi, Reg rs1, Reg rs2, MCode *target, int jump) ++{ ++ MCode *p = as->mcp; ++ ptrdiff_t delta = (char *)target - (char *)(p - 1); ++ switch (jump) { ++ case -1: ++ lj_assertA(((delta + 0x10000) >> 13) == 0, "branch target out of range"); /* B */ ++ *--p = riscvi | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_IMMB(delta); ++ break; ++ case 0: case 1: ++ lj_assertA(((delta + 0x100000) >> 21) == 0, "branch target out of range"); /* ^B+J */ ++ if (checki13(delta) && !jump) { ++ *--p = riscvi | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_IMMB(delta); ++ *--p = RISCVI_NOP; ++ } else { ++ *--p = RISCVI_JAL | RISCVF_IMMJ(delta); /* Poorman's trampoline */ ++ *--p = (riscvi^0x00001000) | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_IMMB(8); ++ } ++ break; ++ default: ++ lj_assertA(0, "invalid jump type"); ++ break; ++ } ++ as->mcp = p; ++} ++ ++static void emit_jump(ASMState *as, MCode *target, int jump) ++{ ++ MCode *p = as->mcp; ++ ptrdiff_t delta; ++ switch(jump) { ++ case -1: ++ delta = (char *)target - (char *)(p - 1); ++ lj_assertA(((delta + 0x100000) >> 21) == 0, "jump target out of range"); /* J */ ++ *--p = RISCVI_JAL | RISCVF_IMMJ(delta); ++ break; ++ case 0: case 1: ++ delta = (char *)target - (char *)(p - 2); ++ lj_assertA(checki32auipc(delta), "jump target out of range"); /* AUIPC+JALR */ ++ if (checki21(delta) && !jump) { ++ *--p = RISCVI_NOP; ++ *--p = RISCVI_JAL | RISCVF_IMMJ(delta); ++ } else { ++ *--p = RISCVI_JALR | RISCVF_S1(RID_TMP) | RISCVF_IMMI(RISCVF_LO(delta)); ++ *--p = RISCVI_AUIPC | RISCVF_D(RID_TMP) | RISCVF_IMMU(RISCVF_HI(delta)); ++ } ++ break; ++ default: ++ lj_assertA(0, "invalid jump type"); ++ break; ++ } ++ as->mcp = p; ++} ++ ++#define emit_jmp(as, target) emit_jump(as, target, 0) ++ ++#define emit_mv(as, dst, src) \ ++ emit_ds(as, RISCVI_MV, (dst), (src)) ++ ++static void emit_call(ASMState *as, void *target, int needcfa) ++{ ++ MCode *p = as->mcp; ++ ptrdiff_t delta = (char *)target - (char *)(p - 2); ++ if (checki21(delta)) { ++ *--p = RISCVI_NOP; ++ *--p = RISCVI_JAL | RISCVF_D(RID_RA) | RISCVF_IMMJ(delta); ++ } else if (checki32(delta)) { ++ *--p = RISCVI_JALR | RISCVF_D(RID_RA) | RISCVF_S1(RID_TMP) | RISCVF_IMMI(RISCVF_LO(delta)); ++ *--p = RISCVI_AUIPC | RISCVF_D(RID_TMP) | RISCVF_IMMU(RISCVF_HI(delta)); ++ needcfa = 1; ++ } else { ++ *--p = RISCVI_JALR | RISCVF_D(RID_RA) | RISCVF_S1(RID_CFUNCADDR) | RISCVF_IMMI(0); ++ needcfa = 2; ++ } ++ as->mcp = p; ++ if (needcfa > 1) ++ ra_allockreg(as, (intptr_t)target, RID_CFUNCADDR); ++} ++ ++/* -- Emit generic operations --------------------------------------------- */ ++ ++/* Generic move between two regs. */ ++static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src) ++{ ++ if (src < RID_MAX_GPR && dst < RID_MAX_GPR) ++ emit_mv(as, dst, src); ++ else if (src < RID_MAX_GPR) ++ emit_ds(as, irt_isnum(ir->t) ? RISCVI_FMV_D_X : RISCVI_FMV_W_X, dst, src); ++ else if (dst < RID_MAX_GPR) ++ emit_ds(as, irt_isnum(ir->t) ? RISCVI_FMV_X_D : RISCVI_FMV_X_W, dst, src); ++ else ++ emit_ds1s2(as, irt_isnum(ir->t) ? RISCVI_FMV_D : RISCVI_FMV_S, dst, src, src); ++} ++ ++/* Emit an arithmetic operation with a constant operand. */ ++static void emit_opk(ASMState *as, RISCVIns riscvi, Reg dest, Reg src, ++ Reg tmp, intptr_t k) ++{ ++ if (checki12(k)) emit_dsi(as, riscvi, dest, src, k); ++ else { ++ switch (riscvi) { ++ case RISCVI_ADDI: riscvi = RISCVI_ADD; break; ++ case RISCVI_XORI: riscvi = RISCVI_XOR; break; ++ case RISCVI_ORI: riscvi = RISCVI_OR; break; ++ case RISCVI_ANDI: riscvi = RISCVI_AND; break; ++ default: lj_assertA(0, "NYI arithmetic RISCVIns"); return; ++ } ++ emit_ds1s2(as, riscvi, dest, src, tmp); ++ emit_loadu64(as, tmp, (uintptr_t)k); ++ } ++} ++ ++/* Generic load of register with base and (small) offset address. */ ++static void emit_loadofs(ASMState *as, IRIns *ir, Reg r, Reg base, int32_t ofs) ++{ ++ if (r < RID_MAX_GPR) ++ emit_lso(as, irt_is64(ir->t) ? RISCVI_LD : RISCVI_LW, r, base, ofs); ++ else ++ emit_lso(as, irt_isnum(ir->t) ? RISCVI_FLD : RISCVI_FLW, r, base, ofs); ++} ++ ++/* Generic store of register with base and (small) offset address. */ ++static void emit_storeofs(ASMState *as, IRIns *ir, Reg r, Reg base, int32_t ofs) ++{ ++ if (r < RID_MAX_GPR) ++ emit_lso(as, irt_is64(ir->t) ? RISCVI_SD : RISCVI_SW, r, base, ofs); ++ else ++ emit_lso(as, irt_isnum(ir->t) ? RISCVI_FSD : RISCVI_FSW, r, base, ofs); ++} ++ ++/* Add offset to pointer. */ ++static void emit_addptr(ASMState *as, Reg r, int32_t ofs) ++{ ++ if (ofs) ++ emit_opk(as, RISCVI_ADDI, r, r, RID_TMP, ofs); ++} ++ ++ ++#define emit_spsub(as, ofs) emit_addptr(as, RID_SP, -(ofs)) + +From 83f3cc575e7488ef00c32db6b4aea2a6a0a51237 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:32:53 +0800 +Subject: [PATCH 11/22] riscv(jit): add IR assembler + +--- + src/lj_asm.c | 4 + + src/lj_asm_riscv64.h | 2037 ++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 2041 insertions(+) + create mode 100644 src/lj_asm_riscv64.h + +diff --git a/src/lj_asm.c b/src/lj_asm.c +index fec4351251..d9ac8cf131 100644 +--- a/src/lj_asm.c ++++ b/src/lj_asm.c +@@ -227,6 +227,8 @@ static Reg rset_pickrandom(ASMState *as, RegSet rs) + #include "lj_emit_ppc.h" + #elif LJ_TARGET_MIPS + #include "lj_emit_mips.h" ++#elif LJ_TARGET_RISCV64 ++#include "lj_emit_riscv.h" + #else + #error "Missing instruction emitter for target CPU" + #endif +@@ -1708,6 +1710,8 @@ static void asm_loop(ASMState *as) + #include "lj_asm_ppc.h" + #elif LJ_TARGET_MIPS + #include "lj_asm_mips.h" ++#elif LJ_TARGET_RISCV64 ++#include "lj_asm_riscv64.h" + #else + #error "Missing assembler for target CPU" + #endif +diff --git a/src/lj_asm_riscv64.h b/src/lj_asm_riscv64.h +new file mode 100644 +index 0000000000..c40b57eb73 +--- /dev/null ++++ b/src/lj_asm_riscv64.h +@@ -0,0 +1,2037 @@ ++/* ++** RISC-V IR assembler (SSA IR -> machine code). ++** Copyright (C) 2005-2025 Mike Pall. See Copyright Notice in luajit.h ++** ++** Contributed by gns from PLCT Lab, ISCAS. ++*/ ++ ++/* -- Register allocator extensions --------------------------------------- */ ++ ++/* Allocate a register with a hint. */ ++static Reg ra_hintalloc(ASMState *as, IRRef ref, Reg hint, RegSet allow) ++{ ++ Reg r = IR(ref)->r; ++ if (ra_noreg(r)) { ++ if (!ra_hashint(r) && !iscrossref(as, ref)) ++ ra_sethint(IR(ref)->r, hint); /* Propagate register hint. */ ++ r = ra_allocref(as, ref, allow); ++ } ++ ra_noweak(as, r); ++ return r; ++} ++ ++/* Allocate a register or RID_ZERO. */ ++static Reg ra_alloc1z(ASMState *as, IRRef ref, RegSet allow) ++{ ++ Reg r = IR(ref)->r; ++ if (ra_noreg(r)) { ++ if (!(allow & RSET_FPR) && irref_isk(ref) && get_kval(as, ref) == 0) ++ return RID_ZERO; ++ r = ra_allocref(as, ref, allow); ++ } else { ++ ra_noweak(as, r); ++ } ++ return r; ++} ++ ++/* Allocate two source registers for three-operand instructions. */ ++static Reg ra_alloc2(ASMState *as, IRIns *ir, RegSet allow) ++{ ++ IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); ++ Reg left = irl->r, right = irr->r; ++ if (ra_hasreg(left)) { ++ ra_noweak(as, left); ++ if (ra_noreg(right)) ++ right = ra_alloc1z(as, ir->op2, rset_exclude(allow, left)); ++ else ++ ra_noweak(as, right); ++ } else if (ra_hasreg(right)) { ++ ra_noweak(as, right); ++ left = ra_alloc1z(as, ir->op1, rset_exclude(allow, right)); ++ } else if (ra_hashint(right)) { ++ right = ra_alloc1z(as, ir->op2, allow); ++ left = ra_alloc1z(as, ir->op1, rset_exclude(allow, right)); ++ } else { ++ left = ra_alloc1z(as, ir->op1, allow); ++ right = ra_alloc1z(as, ir->op2, rset_exclude(allow, left)); ++ } ++ return left | (right << 8); ++} ++ ++/* -- Guard handling ------------------------------------------------------ */ ++ ++/* Copied from MIPS, AUIPC+JALR is expensive to setup in-place */ ++#define RISCV_SPAREJUMP 4 ++ ++/* Setup spare long-range jump (trampoline?) slots per mcarea. */ ++ ++static void asm_sparejump_setup(ASMState *as) ++{ ++ MCode *mxp = as->mctop; ++ if ((char *)mxp == (char *)as->J->mcarea + as->J->szmcarea) { ++ for (int i = RISCV_SPAREJUMP*2; i--; ) ++ *--mxp = RISCVI_EBREAK; ++ as->mctop = mxp; ++ } ++} ++ ++static MCode *asm_sparejump_use(MCode *mcarea, MCode *target) ++{ ++ MCode *mxp = (MCode *)((char *)mcarea + ((MCLink *)mcarea)->size); ++ int slot = RISCV_SPAREJUMP; ++ RISCVIns tslot = RISCVI_EBREAK, tauipc, tjalr; ++ while (slot--) { ++ mxp -= 2; ++ ptrdiff_t delta = (char *)target - (char *)mxp; ++ tauipc = RISCVI_AUIPC | RISCVF_D(RID_TMP) | RISCVF_IMMU(RISCVF_HI(delta)), ++ tjalr = RISCVI_JALR | RISCVF_S1(RID_TMP) | RISCVF_IMMI(RISCVF_LO(delta)); ++ if (mxp[0] == tauipc && mxp[1] == tjalr) { ++ return mxp; ++ } else if (mxp[0] == tslot) { ++ mxp[0] = tauipc, mxp[1] = tjalr; ++ return mxp; ++ } ++ } ++ return NULL; ++} ++ ++/* Setup exit stub after the end of each trace. */ ++static void asm_exitstub_setup(ASMState *as, ExitNo nexits) ++{ ++ ExitNo i; ++ MCode *mxp = as->mctop; ++ if (mxp - (nexits + 4 + MCLIM_REDZONE) < as->mclim) ++ asm_mclimit(as); ++ for (i = nexits-1; (int32_t)i >= 0; i--) ++ *--mxp = RISCVI_JAL | RISCVF_D(RID_RA) | RISCVF_IMMJ((uintptr_t)(4*(-4-i))); ++ ptrdiff_t delta = (char *)lj_vm_exit_handler - (char *)(mxp-3); ++ /* 1: sw ra, 0(sp); auipc+jalr ->vm_exit_handler; lui x0, traceno; jal <1; jal <1; ... */ ++ *--mxp = RISCVI_LUI | RISCVF_IMMU(as->T->traceno); ++ *--mxp = RISCVI_JALR | RISCVF_D(RID_RA) | RISCVF_S1(RID_TMP) ++ | RISCVF_IMMI(RISCVF_LO((uintptr_t)(void *)delta)); ++ *--mxp = RISCVI_AUIPC | RISCVF_D(RID_TMP) ++ | RISCVF_IMMU(RISCVF_HI((uintptr_t)(void *)delta)); ++ *--mxp = RISCVI_SD | RISCVF_S2(RID_RA) | RISCVF_S1(RID_SP); ++ as->mctop = mxp; ++} ++ ++static MCode *asm_exitstub_addr(ASMState *as, ExitNo exitno) ++{ ++ /* Keep this in-sync with exitstub_trace_addr(). */ ++ return as->mctop + exitno + 4; ++} ++ ++/* Emit conditional branch to exit for guard. */ ++static void asm_guard(ASMState *as, RISCVIns riscvi, Reg rs1, Reg rs2) ++{ ++ MCode *target = asm_exitstub_addr(as, as->snapno); ++ MCode *p = as->mcp; ++ if (LJ_UNLIKELY(p == as->invmcp)) { ++ as->loopinv = 1; ++ as->mcp = ++p; ++ *p = RISCVI_JAL | RISCVF_IMMJ((char *)target - (char *)p); ++ riscvi = riscvi^RISCVF_FUNCT3(1); /* Invert cond. */ ++ target = p - 1; /* Patch target later in asm_loop_fixup. */ ++ } ++ ptrdiff_t delta = (char *)target - (char *)(p - 1); ++ *--p = RISCVI_JAL | RISCVF_IMMJ(delta); ++ *--p = (riscvi^RISCVF_FUNCT3(1)) | RISCVF_S1(rs1) | RISCVF_S2(rs2) | RISCVF_IMMB(8); ++ as->mcp = p; ++} ++ ++/* -- Operand fusion ------------------------------------------------------ */ ++ ++/* Limit linear search to this distance. Avoids O(n^2) behavior. */ ++#define CONFLICT_SEARCH_LIM 31 ++ ++/* Check if there's no conflicting instruction between curins and ref. */ ++static int noconflict(ASMState *as, IRRef ref, IROp conflict) ++{ ++ IRIns *ir = as->ir; ++ IRRef i = as->curins; ++ if (i > ref + CONFLICT_SEARCH_LIM) ++ return 0; /* Give up, ref is too far away. */ ++ while (--i > ref) ++ if (ir[i].o == conflict) ++ return 0; /* Conflict found. */ ++ return 1; /* Ok, no conflict. */ ++} ++ ++/* Fuse the array base of colocated arrays. */ ++static int32_t asm_fuseabase(ASMState *as, IRRef ref) ++{ ++ IRIns *ir = IR(ref); ++ if (ir->o == IR_TNEW && ir->op1 <= LJ_MAX_COLOSIZE && ++ !neverfuse(as) && noconflict(as, ref, IR_NEWREF)) ++ return (int32_t)sizeof(GCtab); ++ return 0; ++} ++ ++/* Fuse array/hash/upvalue reference into register+offset operand. */ ++static Reg asm_fuseahuref(ASMState *as, IRRef ref, int32_t *ofsp, RegSet allow) ++{ ++ IRIns *ir = IR(ref); ++ if (ra_noreg(ir->r)) { ++ if (ir->o == IR_AREF) { ++ if (mayfuse(as, ref)) { ++ if (irref_isk(ir->op2)) { ++ IRRef tab = IR(ir->op1)->op1; ++ int32_t ofs = asm_fuseabase(as, tab); ++ IRRef refa = ofs ? tab : ir->op1; ++ ofs += 8*IR(ir->op2)->i; ++ if (checki12(ofs)) { ++ *ofsp = ofs; ++ return ra_alloc1(as, refa, allow); ++ } ++ } ++ } ++ } else if (ir->o == IR_HREFK) { ++ if (mayfuse(as, ref)) { ++ int32_t ofs = (int32_t)(IR(ir->op2)->op2 * sizeof(Node)); ++ if (checki12(ofs)) { ++ *ofsp = ofs; ++ return ra_alloc1(as, ir->op1, allow); ++ } ++ } ++ } else if (ir->o == IR_UREFC) { ++ if (irref_isk(ir->op1)) { ++ GCfunc *fn = ir_kfunc(IR(ir->op1)); ++ GCupval *uv = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv; ++ intptr_t ofs = ((intptr_t)((uintptr_t)(&uv->tv) - (uintptr_t)&J2GG(as->J)->g)); ++ if (checki12(ofs)) { ++ *ofsp = (int32_t)ofs; ++ return RID_GL; ++ } ++ } ++ } else if (ir->o == IR_TMPREF) { ++ *ofsp = (int32_t)offsetof(global_State, tmptv); ++ return RID_GL; ++ } ++ } ++ *ofsp = 0; ++ return ra_alloc1(as, ref, allow); ++} ++ ++/* Fuse XLOAD/XSTORE reference into load/store operand. */ ++static void asm_fusexref(ASMState *as, RISCVIns riscvi, Reg rd, IRRef ref, ++ RegSet allow, int32_t ofs) ++{ ++ IRIns *ir = IR(ref); ++ Reg base; ++ if (ra_noreg(ir->r) && canfuse(as, ir)) { ++ intptr_t ofs2; ++ if (ir->o == IR_ADD) { ++ if (irref_isk(ir->op2) && (ofs2 = ofs + get_kval(as, ir->op2), ++ checki12(ofs2))) { ++ ref = ir->op1; ++ ofs = (int32_t)ofs2; ++ } ++ } else if (ir->o == IR_STRREF) { ++ ofs2 = 4096; ++ lj_assertA(ofs == 0, "bad usage"); ++ ofs = (int32_t)sizeof(GCstr); ++ if (irref_isk(ir->op2)) { ++ ofs2 = ofs + get_kval(as, ir->op2); ++ ref = ir->op1; ++ } else if (irref_isk(ir->op1)) { ++ ofs2 = ofs + get_kval(as, ir->op1); ++ ref = ir->op2; ++ } ++ if (!checki12(ofs2)) { ++ /* NYI: Fuse ADD with constant. */ ++ Reg right, left = ra_alloc2(as, ir, allow); ++ right = (left >> 8); left &= 255; ++ emit_lso(as, riscvi, rd, RID_TMP, ofs); ++ emit_ds1s2(as, RISCVI_ADD, RID_TMP, left, right); ++ return; ++ } ++ ofs = ofs2; ++ } ++ } ++ base = ra_alloc1(as, ref, allow); ++ emit_lso(as, riscvi, rd, base, ofs); ++} ++ ++/* Fuse Integer multiply-accumulate. */ ++ ++static int asm_fusemac(ASMState *as, IRIns *ir, RISCVIns riscvi) ++{ ++ IRRef lref = ir->op1, rref = ir->op2; ++ IRIns *irm; ++ if (lref != rref && ++ ((mayfuse(as, lref) && (irm = IR(lref), irm->o == IR_MUL) && ++ ra_noreg(irm->r)) || ++ (mayfuse(as, rref) && (irm = IR(rref), irm->o == IR_MUL) && ++ (rref = lref, ra_noreg(irm->r))))) { ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg add = ra_hintalloc(as, rref, dest, RSET_GPR); ++ Reg left = ra_alloc2(as, irm, ++ rset_exclude(rset_exclude(RSET_GPR, dest), add)); ++ Reg right = (left >> 8); left &= 255; ++ emit_ds1s2(as, riscvi, dest, left, right); ++ if (dest != add) emit_mv(as, dest, add); ++ return 1; ++ } ++ return 0; ++} ++ ++/* Fuse FP multiply-add/sub. */ ++ ++static int asm_fusemadd(ASMState *as, IRIns *ir, RISCVIns riscvi, RISCVIns riscvir) ++{ ++ IRRef lref = ir->op1, rref = ir->op2; ++ IRIns *irm; ++ if ((as->flags & JIT_F_OPT_FMA) && ++ lref != rref && ++ ((mayfuse(as, lref) && (irm = IR(lref), irm->o == IR_MUL) && ++ ra_noreg(irm->r)) || ++ (mayfuse(as, rref) && (irm = IR(rref), irm->o == IR_MUL) && ++ (rref = lref, riscvi = riscvir, ra_noreg(irm->r))))) { ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ Reg add = ra_hintalloc(as, rref, dest, RSET_FPR); ++ Reg left = ra_alloc2(as, irm, ++ rset_exclude(rset_exclude(RSET_FPR, dest), add)); ++ Reg right = (left >> 8); left &= 255; ++ emit_ds1s2s3(as, riscvi, dest, left, right, add); ++ return 1; ++ } ++ return 0; ++} ++/* -- Calls --------------------------------------------------------------- */ ++ ++/* Generate a call to a C function. */ ++static void asm_gencall(ASMState *as, const CCallInfo *ci, IRRef *args) ++{ ++ uint32_t n, nargs = CCI_XNARGS(ci); ++ int32_t ofs = 0; ++ Reg gpr, fpr = REGARG_FIRSTFPR; ++ if ((void *)ci->func) ++ emit_call(as, (void *)ci->func, 1); ++ for (gpr = REGARG_FIRSTGPR; gpr <= REGARG_LASTGPR; gpr++) ++ as->cost[gpr] = REGCOST(~0u, ASMREF_L); ++ gpr = REGARG_FIRSTGPR; ++ for (n = 0; n < nargs; n++) { /* Setup args. */ ++ IRRef ref = args[n]; ++ IRIns *ir = IR(ref); ++ if (ref) { ++ if (irt_isfp(ir->t)) { ++ if (fpr <= REGARG_LASTFPR) { ++ lj_assertA(rset_test(as->freeset, fpr), ++ "reg %d not free", fpr); /* Must have been evicted. */ ++ ra_leftov(as, fpr, ref); ++ fpr++; if(ci->flags & CCI_VARARG) gpr++; ++ } else if (!(ci->flags & CCI_VARARG) && gpr <= REGARG_LASTGPR) { ++ lj_assertA(rset_test(as->freeset, gpr), ++ "reg %d not free", gpr); /* Must have been evicted. */ ++ ra_leftov(as, gpr, ref); ++ gpr++; ++ } else { ++ Reg r = ra_alloc1(as, ref, RSET_FPR); ++ emit_spstore(as, ir, r, ofs); ++ ofs += 8; ++ } ++ } else { ++ if (gpr <= REGARG_LASTGPR) { ++ lj_assertA(rset_test(as->freeset, gpr), ++ "reg %d not free", gpr); /* Must have been evicted. */ ++ ra_leftov(as, gpr, ref); ++ gpr++; if(ci->flags & CCI_VARARG) fpr++; ++ } else { ++ Reg r = ra_alloc1z(as, ref, RSET_GPR); ++ emit_spstore(as, ir, r, ofs); ++ ofs += 8; ++ } ++ } ++ } ++ } ++} ++ ++/* Setup result reg/sp for call. Evict scratch regs. */ ++static void asm_setupresult(ASMState *as, IRIns *ir, const CCallInfo *ci) ++{ ++ RegSet drop = RSET_SCRATCH; ++ int hiop = ((ir+1)->o == IR_HIOP && !irt_isnil((ir+1)->t)); ++ if (ra_hasreg(ir->r)) ++ rset_clear(drop, ir->r); /* Dest reg handled below. */ ++ if (hiop && ra_hasreg((ir+1)->r)) ++ rset_clear(drop, (ir+1)->r); /* Dest reg handled below. */ ++ ra_evictset(as, drop); /* Evictions must be performed first. */ ++ if (ra_used(ir)) { ++ lj_assertA(!irt_ispri(ir->t), "PRI dest"); ++ if (irt_isfp(ir->t)) { ++ if ((ci->flags & CCI_CASTU64)) { ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ emit_ds(as, irt_isnum(ir->t) ? RISCVI_FMV_D_X : RISCVI_FMV_W_X, ++ dest, RID_RET); ++ } else { ++ ra_destreg(as, ir, RID_FPRET); ++ } ++ } else if (hiop) { ++ ra_destpair(as, ir); ++ } else { ++ ra_destreg(as, ir, RID_RET); ++ } ++ } ++} ++ ++static void asm_callx(ASMState *as, IRIns *ir) ++{ ++ IRRef args[CCI_NARGS_MAX*2]; ++ CCallInfo ci; ++ IRRef func; ++ IRIns *irf; ++ ci.flags = asm_callx_flags(as, ir); ++ asm_collectargs(as, ir, &ci, args); ++ asm_setupresult(as, ir, &ci); ++ func = ir->op2; irf = IR(func); ++ if (irf->o == IR_CARG) { func = irf->op1; irf = IR(func); } ++ if (irref_isk(func)) { /* Call to constant address. */ ++ ci.func = (ASMFunction)(void *)get_kval(as, func); ++ } else { /* Need specific register for indirect calls. */ ++ Reg r = ra_alloc1(as, func, RID2RSET(RID_CFUNCADDR)); ++ MCode *p = as->mcp; ++ *--p = RISCVI_JALR | RISCVF_D(RID_RA) | RISCVF_S1(r); ++ if (r == RID_CFUNCADDR) ++ *--p = RISCVI_ADDI | RISCVF_D(RID_CFUNCADDR) | RISCVF_S1(r); ++ else ++ *--p = RISCVI_MV | RISCVF_D(RID_CFUNCADDR) | RISCVF_S1(r); ++ as->mcp = p; ++ ci.func = (ASMFunction)(void *)0; ++ } ++ asm_gencall(as, &ci, args); ++} ++ ++/* -- Returns ------------------------------------------------------------- */ ++ ++/* Return to lower frame. Guard that it goes to the right spot. */ ++static void asm_retf(ASMState *as, IRIns *ir) ++{ ++ Reg base = ra_alloc1(as, REF_BASE, RSET_GPR); ++ void *pc = ir_kptr(IR(ir->op2)); ++ int32_t delta = 1+LJ_FR2+bc_a(*((const BCIns *)pc - 1)); ++ as->topslot -= (BCReg)delta; ++ if ((int32_t)as->topslot < 0) as->topslot = 0; ++ irt_setmark(IR(REF_BASE)->t); /* Children must not coalesce with BASE reg. */ ++ emit_setgl(as, base, jit_base); ++ emit_addptr(as, base, -8*delta); ++ asm_guard(as, RISCVI_BNE, RID_TMP, ++ ra_allock(as, igcptr(pc), rset_exclude(RSET_GPR, base))); ++ emit_lso(as, RISCVI_LD, RID_TMP, base, -8); ++} ++ ++/* -- Buffer operations --------------------------------------------------- */ ++ ++#if LJ_HASBUFFER ++static void asm_bufhdr_write(ASMState *as, Reg sb) ++{ ++ Reg tmp = ra_scratch(as, rset_exclude(RSET_GPR, sb)); ++ IRIns irgc; ++ irgc.ot = IRT(0, IRT_PGC); /* GC type. */ ++ emit_storeofs(as, &irgc, RID_TMP, sb, offsetof(SBuf, L)); ++ emit_ds1s2(as, RISCVI_OR, RID_TMP, RID_TMP, tmp); ++ emit_dsi(as, RISCVI_ANDI, tmp, tmp, SBUF_MASK_FLAG); ++ emit_getgl(as, RID_TMP, cur_L); ++ emit_loadofs(as, &irgc, tmp, sb, offsetof(SBuf, L)); ++} ++#endif ++ ++/* -- Type conversions ---------------------------------------------------- */ ++ ++static void asm_tointg(ASMState *as, IRIns *ir, Reg left) ++{ ++ Reg tmp = ra_scratch(as, rset_exclude(RSET_FPR, left)); ++ Reg dest = ra_dest(as, ir, RSET_GPR), cmp = ra_scratch(as, rset_exclude(RSET_GPR, dest)); ++ asm_guard(as, RISCVI_BEQ, cmp, RID_ZERO); ++ emit_ds1s2(as, RISCVI_FEQ_D, cmp, tmp, left); ++ emit_ds(as, RISCVI_FCVT_D_W, tmp, dest); ++ emit_ds(as, RISCVI_FCVT_W_D, dest, left); ++} ++ ++static void asm_tobit(ASMState *as, IRIns *ir) ++{ ++ RegSet allow = RSET_FPR; ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_alloc1(as, ir->op1, allow); ++ Reg right = ra_alloc1(as, ir->op2, rset_clear(allow, left)); ++ Reg tmp = ra_scratch(as, rset_clear(allow, right)); ++ emit_ds(as, RISCVI_FMV_X_W, dest, tmp); ++ emit_ds1s2(as, RISCVI_FADD_D, tmp, left, right); ++} ++ ++static void asm_conv(ASMState *as, IRIns *ir) ++{ ++ IRType st = (IRType)(ir->op2 & IRCONV_SRCMASK); ++ int st64 = (st == IRT_I64 || st == IRT_U64 || st == IRT_P64); ++ int stfp = (st == IRT_NUM || st == IRT_FLOAT); ++ IRRef lref = ir->op1; ++ lj_assertA(irt_type(ir->t) != st, "inconsistent types for CONV"); ++ /* Use GPR to pass floating-point arguments */ ++ if (irt_isfp(ir->t) && ir->r >= RID_X10 && ir->r <= RID_X17) { ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg ftmp = ra_scratch(as, RSET_FPR); ++ if (stfp) { /* FP to FP conversion. */ ++ emit_ds(as, st == IRT_NUM ? RISCVI_FMV_X_W : RISCVI_FMV_X_D, dest, ftmp); ++ emit_ds(as, st == IRT_NUM ? RISCVI_FCVT_S_D : RISCVI_FCVT_D_S, ++ ftmp, ra_alloc1(as, lref, RSET_FPR)); ++ } else { /* Integer to FP conversion. */ ++ Reg left = ra_alloc1(as, lref, RSET_GPR); ++ RISCVIns riscvi = irt_isfloat(ir->t) ? ++ (((IRT_IS64 >> st) & 1) ? ++ (st == IRT_I64 ? RISCVI_FCVT_S_L : RISCVI_FCVT_S_LU) : ++ (st == IRT_INT ? RISCVI_FCVT_S_W : RISCVI_FCVT_S_WU)) : ++ (((IRT_IS64 >> st) & 1) ? ++ (st == IRT_I64 ? RISCVI_FCVT_D_L : RISCVI_FCVT_D_LU) : ++ (st == IRT_INT ? RISCVI_FCVT_D_W : RISCVI_FCVT_D_WU)); ++ emit_ds(as, st64 ? RISCVI_FMV_X_D : RISCVI_FMV_X_W, dest, ftmp); ++ emit_ds(as, riscvi, ftmp, left); ++ } ++ } else if (irt_isfp(ir->t)) { ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ if (stfp) { /* FP to FP conversion. */ ++ emit_ds(as, st == IRT_NUM ? RISCVI_FCVT_S_D : RISCVI_FCVT_D_S, ++ dest, ra_alloc1(as, lref, RSET_FPR)); ++ } else { /* Integer to FP conversion. */ ++ Reg left = ra_alloc1(as, lref, RSET_GPR); ++ RISCVIns riscvi = irt_isfloat(ir->t) ? ++ (((IRT_IS64 >> st) & 1) ? ++ (st == IRT_I64 ? RISCVI_FCVT_S_L : RISCVI_FCVT_S_LU) : ++ (st == IRT_INT ? RISCVI_FCVT_S_W : RISCVI_FCVT_S_WU)) : ++ (((IRT_IS64 >> st) & 1) ? ++ (st == IRT_I64 ? RISCVI_FCVT_D_L : RISCVI_FCVT_D_LU) : ++ (st == IRT_INT ? RISCVI_FCVT_D_W : RISCVI_FCVT_D_WU)); ++ emit_ds(as, riscvi, dest, left); ++ } ++ } else if (stfp) { /* FP to integer conversion. */ ++ if (irt_isguard(ir->t)) { ++ /* Checked conversions are only supported from number to int. */ ++ lj_assertA(irt_isint(ir->t) && st == IRT_NUM, ++ "bad type for checked CONV"); ++ asm_tointg(as, ir, ra_alloc1(as, lref, RSET_FPR)); ++ } else { ++ Reg left = ra_alloc1(as, lref, RSET_FPR); ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ RISCVIns riscvi = irt_is64(ir->t) ? ++ (st == IRT_NUM ? ++ (irt_isi64(ir->t) ? RISCVI_FCVT_L_D : RISCVI_FCVT_LU_D) : ++ (irt_isi64(ir->t) ? RISCVI_FCVT_L_S : RISCVI_FCVT_LU_S)) : ++ (st == IRT_NUM ? ++ (irt_isint(ir->t) ? RISCVI_FCVT_W_D : RISCVI_FCVT_WU_D) : ++ (irt_isint(ir->t) ? RISCVI_FCVT_W_S : RISCVI_FCVT_WU_S)); ++ emit_ds(as, riscvi|RISCVF_RM(RISCVRM_RTZ), dest, left); ++ } ++ } else if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_alloc1(as, lref, RSET_GPR); ++ RISCVIns riscvi = st == IRT_I8 ? RISCVI_SEXT_B : ++ st == IRT_U8 ? RISCVI_ZEXT_B : ++ st == IRT_I16 ? RISCVI_SEXT_H : RISCVI_ZEXT_H; ++ lj_assertA(irt_isint(ir->t) || irt_isu32(ir->t), "bad type for CONV EXT"); ++ emit_ext(as, riscvi, dest, left); ++ } else { /* 32/64 bit integer conversions. */ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ if (irt_is64(ir->t)) { ++ if (st64) { ++ /* 64/64 bit no-op (cast)*/ ++ ra_leftov(as, dest, lref); /* Do nothing, but may need to move regs. */ ++ } else { /* 32 to 64 bit sign extension. */ ++ Reg left = ra_alloc1(as, lref, RSET_GPR); ++ if ((ir->op2 & IRCONV_SEXT)) { /* 32 to 64 bit sign extension. */ ++ emit_ext(as, RISCVI_SEXT_W, dest, left); ++ } else { /* 32 to 64 bit zero extension. */ ++ emit_ext(as, RISCVI_ZEXT_W, dest, left); ++ } ++ } ++ } else { ++ if (st64 && !(ir->op2 & IRCONV_NONE)) { ++ /* This is either a 32 bit reg/reg mov which zeroes the hiword ++ ** or a load of the loword from a 64 bit address. ++ */ ++ Reg left = ra_alloc1(as, lref, RSET_GPR); ++ emit_ext(as, RISCVI_ZEXT_W, dest, left); ++ } else { /* 32/32 bit no-op (cast). */ ++ ra_leftov(as, dest, lref); /* Do nothing, but may need to move regs. */ ++ } ++ } ++ } ++} ++ ++static void asm_strto(ASMState *as, IRIns *ir) ++{ ++ const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_strscan_num]; ++ IRRef args[2]; ++ int32_t ofs = SPOFS_TMP; ++ RegSet drop = RSET_SCRATCH; ++ if (ra_hasreg(ir->r)) rset_set(drop, ir->r); /* Spill dest reg (if any). */ ++ ra_evictset(as, drop); ++ if (ir->s) ofs = sps_scale(ir->s); ++ asm_guard(as, RISCVI_BEQ, RID_RET, RID_ZERO); /* Test return status. */ ++ args[0] = ir->op1; /* GCstr *str */ ++ args[1] = ASMREF_TMP1; /* TValue *n */ ++ asm_gencall(as, ci, args); ++ /* Store the result to the spill slot or temp slots. */ ++ Reg tmp = ra_releasetmp(as, ASMREF_TMP1); ++ emit_opk(as, RISCVI_ADDI, tmp, RID_SP, tmp, ofs); ++} ++ ++/* -- Memory references --------------------------------------------------- */ ++ ++/* Store tagged value for ref at base+ofs. */ ++static void asm_tvstore64(ASMState *as, Reg base, int32_t ofs, IRRef ref) ++{ ++ RegSet allow = rset_exclude(RSET_GPR, base); ++ IRIns *ir = IR(ref); ++ lj_assertA(irt_ispri(ir->t) || irt_isaddr(ir->t) || irt_isinteger(ir->t), ++ "store of IR type %d", irt_type(ir->t)); ++ if (irref_isk(ref)) { ++ TValue k; ++ lj_ir_kvalue(as->J->L, &k, ir); ++ emit_lso(as, RISCVI_SD, ra_allock(as, (int64_t)k.u64, allow), base, ofs); ++ } else { ++ Reg src = ra_alloc1(as, ref, allow); ++ rset_clear(allow, src); ++ Reg type = ra_allock(as, (int64_t)irt_toitype(ir->t) << 47, allow); ++ emit_lso(as, RISCVI_SD, RID_TMP, base, ofs); ++ if (irt_isinteger(ir->t)) { ++ if (as->flags & JIT_F_RVZba) { ++ emit_ds1s2(as, RISCVI_ADD_UW, RID_TMP, src, type); ++ } else { ++ emit_ds1s2(as, RISCVI_ADD, RID_TMP, RID_TMP, type); ++ emit_ext(as, RISCVI_ZEXT_W, RID_TMP, src); ++ } ++ } else { ++ emit_ds1s2(as, RISCVI_ADD, RID_TMP, src, type); ++ } ++ } ++} ++ ++/* Get pointer to TValue. */ ++static void asm_tvptr(ASMState *as, Reg dest, IRRef ref, MSize mode) // todo-new ++{ ++ if ((mode & IRTMPREF_IN1)) { ++ IRIns *ir = IR(ref); ++ if (irt_isnum(ir->t)) { ++ if (irref_isk(ref) && !(mode & IRTMPREF_OUT1)) { ++ /* Use the number constant itself as a TValue. */ ++ ra_allockreg(as, igcptr(ir_knum(ir)), dest); ++ return; ++ } ++ emit_lso(as, RISCVI_FSD, ra_alloc1(as, ref, RSET_FPR), dest, 0); ++ } else { ++ asm_tvstore64(as, dest, 0, ref); ++ } ++ } ++ /* g->tmptv holds the TValue(s). */ ++ emit_opk(as, RISCVI_ADDI, dest, RID_GL, dest, offsetof(global_State, tmptv)); ++} ++ ++static void asm_aref(ASMState *as, IRIns *ir) ++{ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg idx, base; ++ if (irref_isk(ir->op2)) { ++ IRRef tab = IR(ir->op1)->op1; ++ int32_t ofs = asm_fuseabase(as, tab); ++ IRRef refa = ofs ? tab : ir->op1; ++ ofs += 8*IR(ir->op2)->i; ++ if (checki12(ofs)) { ++ base = ra_alloc1(as, refa, RSET_GPR); ++ emit_dsi(as, RISCVI_ADDI, dest, base, ofs); ++ return; ++ } ++ } ++ base = ra_alloc1(as, ir->op1, RSET_GPR); ++ idx = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, base)); ++ emit_sh3add(as, dest, base, idx, RID_TMP); ++} ++ ++/* Inlined hash lookup. Specialized for key type and for const keys. ++** The equivalent C code is: ++** Node *n = hashkey(t, key); ++** do { ++** if (lj_obj_equal(&n->key, key)) return &n->val; ++** } while ((n = nextnode(n))); ++** return niltv(L); ++*/ ++static void asm_href(ASMState *as, IRIns *ir, IROp merge) ++{ ++ RegSet allow = RSET_GPR; ++ int destused = ra_used(ir); ++ Reg dest = ra_dest(as, ir, allow); ++ Reg tab = ra_alloc1(as, ir->op1, rset_clear(allow, dest)); ++ Reg key = RID_NONE, type = RID_NONE, tmpnum = RID_NONE, tmp1, tmp2; ++ Reg cmp64 = RID_NONE; ++ IRRef refkey = ir->op2; ++ IRIns *irkey = IR(refkey); ++ int isk = irref_isk(refkey); ++ IRType1 kt = irkey->t; ++ uint32_t khash; ++ MCLabel l_end, l_loop, l_next; ++ rset_clear(allow, tab); ++ tmp1 = ra_scratch(as, allow); ++ rset_clear(allow, tmp1); ++ tmp2 = ra_scratch(as, allow); ++ rset_clear(allow, tmp2); ++ ++ if (irt_isnum(kt)) { ++ key = ra_alloc1(as, refkey, RSET_FPR); ++ tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key)); ++ } else { ++ /* Allocate cmp64 register used for 64-bit comparisons */ ++ if (!isk && irt_isaddr(kt)) { ++ cmp64 = tmp2; ++ } else { ++ int64_t k; ++ if (isk && irt_isaddr(kt)) { ++ k = ((int64_t)irt_toitype(kt) << 47) | irkey[1].tv.u64; ++ } else { ++ lj_assertA(irt_ispri(kt) && !irt_isnil(kt), "bad HREF key type"); ++ k = ~((int64_t)~irt_toitype(kt) << 47); ++ } ++ cmp64 = ra_allock(as, k, allow); ++ rset_clear(allow, cmp64); ++ } ++ if (!irt_ispri(kt)) { ++ key = ra_alloc1(as, refkey, allow); ++ rset_clear(allow, key); ++ } ++ } ++ ++ /* Key not found in chain: jump to exit (if merged) or load niltv. */ ++ l_end = emit_label(as); ++ int is_lend_exit = 0; ++ as->invmcp = NULL; ++ if (merge == IR_NE) ++ asm_guard(as, RISCVI_BEQ, RID_ZERO, RID_ZERO); ++ else if (destused) ++ emit_loada(as, dest, niltvg(J2G(as->J))); ++ ++ /* Follow hash chain until the end. */ ++ l_loop = --as->mcp; ++ emit_mv(as, dest, tmp1); ++ emit_lso(as, RISCVI_LD, tmp1, dest, (int32_t)offsetof(Node, next)); ++ l_next = emit_label(as); ++ ++ /* Type and value comparison. */ ++ if (merge == IR_EQ) { /* Must match asm_guard(). */ ++ l_end = asm_exitstub_addr(as, as->snapno); ++ is_lend_exit = 1; ++ } ++ if (irt_isnum(kt)) { ++ emit_branch(as, RISCVI_BNE, tmp1, RID_ZERO, l_end, is_lend_exit); ++ emit_ds1s2(as, RISCVI_FEQ_D, tmp1, tmpnum, key); ++ emit_branch(as, RISCVI_BEQ, tmp1, RID_ZERO, l_next, -1); ++ emit_dsi(as, RISCVI_SLTIU, tmp1, tmp1, ((int32_t)LJ_TISNUM)); ++ emit_dsshamt(as, RISCVI_SRAI, tmp1, tmp1, 47); ++ emit_ds(as, RISCVI_FMV_D_X, tmpnum, tmp1); ++ } else { ++ emit_branch(as, RISCVI_BEQ, tmp1, cmp64, l_end, is_lend_exit); ++ } ++ emit_lso(as, RISCVI_LD, tmp1, dest, (int32_t)offsetof(Node, key.u64)); ++ *l_loop = RISCVI_BNE | RISCVF_S1(tmp1) | RISCVF_S2(RID_ZERO) ++ | RISCVF_IMMB((char *)as->mcp-(char *)l_loop); ++ if (!isk && irt_isaddr(kt)) { ++ type = ra_allock(as, (int64_t)irt_toitype(kt) << 47, allow); ++ emit_ds1s2(as, RISCVI_ADD, tmp2, key, type); ++ rset_clear(allow, type); ++ } ++ ++ /* Load main position relative to tab->node into dest. */ ++ khash = isk ? ir_khash(as, irkey) : 1; ++ if (khash == 0) { ++ emit_lso(as, RISCVI_LD, dest, tab, (int32_t)offsetof(GCtab, node)); ++ } else { ++ Reg tmphash = tmp1; ++ if (isk) ++ tmphash = ra_allock(as, khash, allow); ++ /* node = tab->node + (idx*32-idx*8) */ ++ emit_ds1s2(as, RISCVI_ADD, dest, dest, tmp1); ++ lj_assertA(sizeof(Node) == 24, "bad Node size"); ++ emit_ds1s2(as, RISCVI_SUBW, tmp1, tmp2, tmp1); ++ emit_dsshamt(as, RISCVI_SLLIW, tmp1, tmp1, 3); ++ emit_dsshamt(as, RISCVI_SLLIW, tmp2, tmp1, 5); ++ emit_ds1s2(as, RISCVI_AND, tmp1, tmp2, tmphash); // idx = hi & tab->hmask ++ emit_lso(as, RISCVI_LD, dest, tab, (int32_t)offsetof(GCtab, node)); ++ emit_lso(as, RISCVI_LW, tmp2, tab, (int32_t)offsetof(GCtab, hmask)); ++ if (isk) { ++ /* Nothing to do. */ ++ } else if (irt_isstr(kt)) { ++ emit_lso(as, RISCVI_LW, tmp1, key, (int32_t)offsetof(GCstr, sid)); ++ } else { /* Must match with hash*() in lj_tab.c. */ ++ emit_ds1s2(as, RISCVI_SUBW, tmp1, tmp1, tmp2); ++ emit_roti(as, RISCVI_RORIW, tmp2, tmp2, dest, (-HASH_ROT3)&0x1f); ++ emit_ds1s2(as, RISCVI_XOR, tmp1, tmp1, tmp2); ++ emit_roti(as, RISCVI_RORIW, tmp1, tmp1, dest, (-HASH_ROT2-HASH_ROT1)&0x1f); ++ emit_ds1s2(as, RISCVI_SUBW, tmp2, tmp2, dest); ++ emit_ds1s2(as, RISCVI_XOR, tmp2, tmp2, tmp1); ++ emit_roti(as, RISCVI_RORIW, dest, tmp1, RID_TMP, (-HASH_ROT1)&0x1f); ++ if (irt_isnum(kt)) { ++ emit_dsshamt(as, RISCVI_SLLIW, tmp1, tmp1, 1); ++ emit_dsshamt(as, RISCVI_SRAI, tmp1, tmp1, 32); // hi ++ emit_ext(as, RISCVI_SEXT_W, tmp2, tmp1); // lo ++ emit_ds(as, RISCVI_FMV_X_D, tmp1, key); ++ } else { ++ checkmclim(as); ++ emit_dsshamt(as, RISCVI_SRAI, tmp1, tmp1, 32); // hi ++ emit_ext(as, RISCVI_SEXT_W, tmp2, key); // lo ++ emit_ds1s2(as, RISCVI_ADD, tmp1, key, type); ++ } ++ } ++ } ++} ++ ++static void asm_hrefk(ASMState *as, IRIns *ir) ++{ ++ IRIns *kslot = IR(ir->op2); ++ IRIns *irkey = IR(kslot->op1); ++ int32_t ofs = (int32_t)(kslot->op2 * sizeof(Node)); ++ int32_t kofs = ofs + (int32_t)offsetof(Node, key); ++ int bigofs = !checki12(kofs); ++ Reg dest = (ra_used(ir) || bigofs) ? ra_dest(as, ir, RSET_GPR) : RID_NONE; ++ Reg node = ra_alloc1(as, ir->op1, RSET_GPR); ++ RegSet allow = rset_exclude(RSET_GPR, node); ++ Reg idx = node; ++ int64_t k; ++ lj_assertA(ofs % sizeof(Node) == 0, "unaligned HREFK slot"); ++ if (bigofs) { ++ idx = dest; ++ rset_clear(allow, dest); ++ kofs = (int32_t)offsetof(Node, key); ++ } else if (ra_hasreg(dest)) { ++ emit_dsi(as, RISCVI_ADDI, dest, node, ofs); ++ } ++ if (irt_ispri(irkey->t)) { ++ lj_assertA(!irt_isnil(irkey->t), "bad HREFK key type"); ++ k = ~((int64_t)~irt_toitype(irkey->t) << 47); ++ } else if (irt_isnum(irkey->t)) { ++ k = (int64_t)ir_knum(irkey)->u64; ++ } else { ++ k = ((int64_t)irt_toitype(irkey->t) << 47) | (int64_t)ir_kgc(irkey); ++ } ++ asm_guard(as, RISCVI_BNE, RID_TMP, ra_allock(as, k, allow)); ++ emit_lso(as, RISCVI_LD, RID_TMP, idx, kofs); ++ if (bigofs) ++ emit_ds1s2(as, RISCVI_ADD, dest, node, ra_allock(as, ofs, allow)); ++} ++ ++static void asm_uref(ASMState *as, IRIns *ir) ++{ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ int guarded = (irt_t(ir->t) & (IRT_GUARD|IRT_TYPE)) == (IRT_GUARD|IRT_PGC); ++ if (irref_isk(ir->op1) && !guarded) { ++ GCfunc *fn = ir_kfunc(IR(ir->op1)); ++ MRef *v = &gcref(fn->l.uvptr[(ir->op2 >> 8)])->uv.v; ++ emit_lsptr(as, RISCVI_LD, dest, v, RSET_GPR); ++ } else { ++ if (guarded) ++ asm_guard(as, ir->o == IR_UREFC ? RISCVI_BEQ : RISCVI_BNE, RID_TMP, RID_ZERO); ++ if (ir->o == IR_UREFC) ++ emit_dsi(as, RISCVI_ADDI, dest, dest, (int32_t)offsetof(GCupval, tv)); ++ else ++ emit_lso(as, RISCVI_LD, dest, dest, (int32_t)offsetof(GCupval, v)); ++ if (guarded) ++ emit_lso(as, RISCVI_LBU, RID_TMP, dest, (int32_t)offsetof(GCupval, closed)); ++ if (irref_isk(ir->op1)) { ++ GCfunc *fn = ir_kfunc(IR(ir->op1)); ++ GCobj *o = gcref(fn->l.uvptr[(ir->op2 >> 8)]); ++ emit_loada(as, dest, o); ++ } else { ++ emit_lso(as, RISCVI_LD, dest, ra_alloc1(as, ir->op1, RSET_GPR), ++ (int32_t)offsetof(GCfuncL, uvptr) + ++ (int32_t)sizeof(MRef) * (int32_t)(ir->op2 >> 8)); ++ } ++ } ++} ++ ++static void asm_fref(ASMState *as, IRIns *ir) ++{ ++ UNUSED(as); UNUSED(ir); ++ lj_assertA(!ra_used(ir), "unfused FREF"); ++} ++ ++static void asm_strref(ASMState *as, IRIns *ir) ++{ ++ RegSet allow = RSET_GPR; ++ Reg dest = ra_dest(as, ir, allow); ++ Reg base = ra_alloc1(as, ir->op1, allow); ++ IRIns *irr = IR(ir->op2); ++ int32_t ofs = sizeof(GCstr); ++ rset_clear(allow, base); ++ if (irref_isk(ir->op2) && checki12(ofs + irr->i)) { ++ emit_dsi(as, RISCVI_ADDI, dest, base, ofs + irr->i); ++ } else { ++ emit_dsi(as, RISCVI_ADDI, dest, dest, ofs); ++ emit_ds1s2(as, RISCVI_ADD, dest, base, ra_alloc1(as, ir->op2, allow)); ++ } ++} ++ ++/* -- Loads and stores ---------------------------------------------------- */ ++ ++static RISCVIns asm_fxloadins(IRIns *ir) ++{ ++ switch (irt_type(ir->t)) { ++ case IRT_I8: return RISCVI_LB; ++ case IRT_U8: return RISCVI_LBU; ++ case IRT_I16: return RISCVI_LH; ++ case IRT_U16: return RISCVI_LHU; ++ case IRT_NUM: return RISCVI_FLD; ++ case IRT_FLOAT: return RISCVI_FLW; ++ default: return irt_is64(ir->t) ? RISCVI_LD : RISCVI_LW; ++ } ++} ++ ++static RISCVIns asm_fxstoreins(IRIns *ir) ++{ ++ switch (irt_type(ir->t)) { ++ case IRT_I8: case IRT_U8: return RISCVI_SB; ++ case IRT_I16: case IRT_U16: return RISCVI_SH; ++ case IRT_NUM: return RISCVI_FSD; ++ case IRT_FLOAT: return RISCVI_FSW; ++ default: return irt_is64(ir->t) ? RISCVI_SD : RISCVI_SW; ++ } ++} ++ ++static void asm_fload(ASMState *as, IRIns *ir) ++{ ++ RegSet allow = RSET_GPR; ++ Reg idx, dest = ra_dest(as, ir, allow); ++ rset_clear(allow, dest); ++ RISCVIns riscvi = asm_fxloadins(ir); ++ int32_t ofs; ++ if (ir->op1 == REF_NIL) { /* FLOAD from GG_State with offset. */ ++ idx = RID_GL; ++ ofs = (ir->op2 << 2) - GG_OFS(g); ++ } else { ++ idx = ra_alloc1(as, ir->op1, allow); ++ if (ir->op2 == IRFL_TAB_ARRAY) { ++ ofs = asm_fuseabase(as, ir->op1); ++ if (ofs) { /* Turn the t->array load into an add for colocated arrays. */ ++ emit_dsi(as, RISCVI_ADDI, dest, idx, ofs); ++ return; ++ } ++ } ++ ofs = field_ofs[ir->op2]; ++ lj_assertA(!irt_isfp(ir->t), "bad FP FLOAD"); ++ } ++ rset_clear(allow, idx); ++ emit_lso(as, riscvi, dest, idx, ofs); ++} ++ ++static void asm_fstore(ASMState *as, IRIns *ir) ++{ ++ if (ir->r != RID_SINK) { ++ Reg src = ra_alloc1z(as, ir->op2, RSET_GPR); ++ IRIns *irf = IR(ir->op1); ++ Reg idx = ra_alloc1(as, irf->op1, rset_exclude(RSET_GPR, src)); ++ int32_t ofs = field_ofs[irf->op2]; ++ lj_assertA(!irt_isfp(ir->t), "bad FP FSTORE"); ++ emit_lso(as, asm_fxstoreins(ir), src, idx, ofs); ++ } ++} ++ ++static void asm_xload(ASMState *as, IRIns *ir) ++{ ++ Reg dest = ra_dest(as, ir, (irt_isfp(ir->t)) ? RSET_FPR : RSET_GPR); ++ lj_assertA(LJ_TARGET_UNALIGNED || !(ir->op2 & IRXLOAD_UNALIGNED), ++ "unaligned XLOAD"); ++ asm_fusexref(as, asm_fxloadins(ir), dest, ir->op1, RSET_GPR, 0); ++} ++ ++static void asm_xstore_(ASMState *as, IRIns *ir, int32_t ofs) ++{ ++ if (ir->r != RID_SINK) { ++ Reg src = ra_alloc1z(as, ir->op2, irt_isfp(ir->t) ? RSET_FPR : RSET_GPR); ++ asm_fusexref(as, asm_fxstoreins(ir), src, ir->op1, ++ rset_exclude(RSET_GPR, src), ofs); ++ } ++} ++ ++#define asm_xstore(as, ir) asm_xstore_(as, ir, 0) ++ ++static void asm_ahuvload(ASMState *as, IRIns *ir) ++{ ++ Reg dest = RID_NONE, type = RID_TMP, idx; ++ RegSet allow = RSET_GPR; ++ int32_t ofs = 0; ++ IRType1 t = ir->t; ++ if (ra_used(ir)) { ++ lj_assertA((irt_isnum(ir->t)) || irt_isint(ir->t) || irt_isaddr(ir->t), ++ "bad load type %d", irt_type(ir->t)); ++ dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : allow); ++ rset_clear(allow, dest); ++ if (irt_isaddr(t)) { ++ emit_cleartp(as, dest, dest); ++ } else if (irt_isint(t)) ++ emit_ext(as, RISCVI_SEXT_W, dest, dest); ++ } ++ idx = asm_fuseahuref(as, ir->op1, &ofs, allow); ++ if (ir->o == IR_VLOAD) ofs += 8 * ir->op2; ++ rset_clear(allow, idx); ++ if (irt_isnum(t)) { ++ asm_guard(as, RISCVI_BEQ, RID_TMP, RID_ZERO); ++ emit_dsi(as, RISCVI_SLTIU, RID_TMP, type, (int32_t)LJ_TISNUM); ++ } else { ++ asm_guard(as, RISCVI_BNE, type, ++ ra_allock(as, (int32_t)irt_toitype(t), allow)); ++ } ++ if (ra_hasreg(dest)) { ++ if (irt_isnum(t)) { ++ emit_lso(as, RISCVI_FLD, dest, idx, ofs); ++ dest = type; ++ } ++ } else { ++ dest = type; ++ } ++ emit_dsshamt(as, RISCVI_SRAI, type, dest, 47); ++ emit_lso(as, RISCVI_LD, dest, idx, ofs); ++} ++ ++static void asm_ahustore(ASMState *as, IRIns *ir) ++{ ++ RegSet allow = RSET_GPR; ++ Reg idx, src = RID_NONE, type = RID_NONE; ++ int32_t ofs = 0; ++ if (ir->r == RID_SINK) ++ return; ++ if (irt_isnum(ir->t)) { ++ src = ra_alloc1(as, ir->op2, RSET_FPR); ++ idx = asm_fuseahuref(as, ir->op1, &ofs, allow); ++ emit_lso(as, RISCVI_FSD, src, idx, ofs); ++ } else { ++ Reg tmp = RID_TMP; ++ if (irt_ispri(ir->t)) { ++ tmp = ra_allock(as, ~((int64_t)~irt_toitype(ir->t) << 47), allow); ++ rset_clear(allow, tmp); ++ } else { ++ src = ra_alloc1(as, ir->op2, allow); ++ rset_clear(allow, src); ++ type = ra_allock(as, (int64_t)irt_toitype(ir->t) << 47, allow); ++ rset_clear(allow, type); ++ } ++ idx = asm_fuseahuref(as, ir->op1, &ofs, allow); ++ emit_lso(as, RISCVI_SD, tmp, idx, ofs); ++ if (ra_hasreg(src)) { ++ if (irt_isinteger(ir->t)) { ++ if (as->flags & JIT_F_RVZba) { ++ emit_ds1s2(as, RISCVI_ADD_UW, tmp, src, type); ++ } else { ++ emit_ds1s2(as, RISCVI_ADD, tmp, tmp, type); ++ emit_ext(as, RISCVI_ZEXT_W, tmp, src); ++ } ++ } else { ++ emit_ds1s2(as, RISCVI_ADD, tmp, src, type); ++ } ++ } ++ } ++} ++ ++static void asm_sload(ASMState *as, IRIns *ir) ++{ ++ Reg dest = RID_NONE, type = RID_NONE, base; ++ RegSet allow = RSET_GPR; ++ IRType1 t = ir->t; ++ int32_t ofs = 8*((int32_t)ir->op1-2); ++ lj_assertA(checki12(ofs), "sload IR operand out of range"); ++ lj_assertA(!(ir->op2 & IRSLOAD_PARENT), ++ "bad parent SLOAD"); /* Handled by asm_head_side(). */ ++ lj_assertA(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK), ++ "inconsistent SLOAD variant"); ++ if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) { ++ dest = ra_scratch(as, RSET_FPR); ++ asm_tointg(as, ir, dest); ++ t.irt = IRT_NUM; /* Continue with a regular number type check. */ ++ } else if (ra_used(ir)) { ++ Reg tmp = RID_NONE; ++ if ((ir->op2 & IRSLOAD_CONVERT)) ++ tmp = ra_scratch(as, irt_isint(t) ? RSET_FPR : RSET_GPR); ++ lj_assertA((irt_isnum(t)) || irt_isint(t) || irt_isaddr(t), ++ "bad SLOAD type %d", irt_type(t)); ++ dest = ra_dest(as, ir, irt_isnum(t) ? RSET_FPR : allow); ++ rset_clear(allow, dest); ++ base = ra_alloc1(as, REF_BASE, allow); ++ rset_clear(allow, base); ++ if (irt_isaddr(t)) { /* Clear type from pointers. */ ++ emit_cleartp(as, dest, dest); ++ } else if (ir->op2 & IRSLOAD_CONVERT) { ++ if (irt_isint(t)) { ++ emit_ds(as, RISCVI_FCVT_W_D|RISCVF_RM(RISCVRM_RTZ), dest, tmp); ++ /* If value is already loaded for type check, move it to FPR. */ ++ if ((ir->op2 & IRSLOAD_TYPECHECK)) ++ emit_ds(as, RISCVI_FMV_D_X, tmp, dest); ++ else ++ dest = tmp; ++ t.irt = IRT_NUM; /* Check for original type. */ ++ } else { ++ emit_ds(as, RISCVI_FCVT_D_W, dest, tmp); ++ dest = tmp; ++ t.irt = IRT_INT; /* Check for original type. */ ++ } ++ } else if (irt_isint(t) && (ir->op2 & IRSLOAD_TYPECHECK)) { ++ /* Sign-extend integers. */ ++ emit_ext(as, RISCVI_SEXT_W, dest, dest); ++ } ++ goto dotypecheck; ++ } ++ base = ra_alloc1(as, REF_BASE, allow); ++ rset_clear(allow, base); ++dotypecheck: ++ if ((ir->op2 & IRSLOAD_TYPECHECK)) { ++ type = dest < RID_MAX_GPR ? dest : RID_TMP; ++ if (irt_ispri(t)) { ++ asm_guard(as, RISCVI_BNE, type, ++ ra_allock(as, ~((int64_t)~irt_toitype(t) << 47) , allow)); ++ } else if ((ir->op2 & IRSLOAD_KEYINDEX)) { ++ asm_guard(as, RISCVI_BNE, RID_TMP, ++ ra_allock(as, (int32_t)LJ_KEYINDEX, allow)); ++ emit_dsshamt(as, RISCVI_SRAI, RID_TMP, type, 32); ++ } else { ++ if (irt_isnum(t)) { ++ asm_guard(as, RISCVI_BEQ, RID_TMP, RID_ZERO); ++ emit_dsi(as, RISCVI_SLTIU, RID_TMP, RID_TMP, LJ_TISNUM); ++ if (ra_hasreg(dest)) { ++ emit_lso(as, RISCVI_FLD, dest, base, ofs); ++ } ++ } else { ++ asm_guard(as, RISCVI_BNE, RID_TMP, ++ ra_allock(as, (int32_t)irt_toitype(t), allow)); ++ } ++ emit_dsshamt(as, RISCVI_SRAI, RID_TMP, type, 47); ++ } ++ emit_lso(as, RISCVI_LD, type, base, ofs); ++ } else if (ra_hasreg(dest)) { ++ emit_lso(as, irt_isnum(t) ? RISCVI_FLD : ++ irt_isint(t) ? RISCVI_LW : RISCVI_LD, ++ dest, base, ofs); ++ } ++} ++ ++/* -- Allocations --------------------------------------------------------- */ ++ ++#if LJ_HASFFI ++static void asm_cnew(ASMState *as, IRIns *ir) ++{ ++ CTState *cts = ctype_ctsG(J2G(as->J)); ++ CTypeID id = (CTypeID)IR(ir->op1)->i; ++ CTSize sz; ++ CTInfo info = lj_ctype_info(cts, id, &sz); ++ const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_mem_newgco]; ++ IRRef args[4]; ++ RegSet drop = RSET_SCRATCH; ++ lj_assertA(sz != CTSIZE_INVALID || (ir->o == IR_CNEW && ir->op2 != REF_NIL), ++ "bad CNEW/CNEWI operands"); ++ ++ as->gcsteps++; ++ if (ra_hasreg(ir->r)) ++ rset_clear(drop, ir->r); /* Dest reg handled below. */ ++ ra_evictset(as, drop); ++ if (ra_used(ir)) ++ ra_destreg(as, ir, RID_RET); /* GCcdata * */ ++ ++ /* Initialize immutable cdata object. */ ++ if (ir->o == IR_CNEWI) { ++ RegSet allow = (RSET_GPR & ~RSET_SCRATCH); ++ emit_lso(as, sz == 8 ? RISCVI_SD : RISCVI_SW, ra_alloc1(as, ir->op2, allow), ++ RID_RET, (sizeof(GCcdata))); ++ lj_assertA(sz == 4 || sz == 8, "bad CNEWI size %d", sz); ++ } else if (ir->op2 != REF_NIL) { /* Create VLA/VLS/aligned cdata. */ ++ ci = &lj_ir_callinfo[IRCALL_lj_cdata_newv]; ++ args[0] = ASMREF_L; /* lua_State *L */ ++ args[1] = ir->op1; /* CTypeID id */ ++ args[2] = ir->op2; /* CTSize sz */ ++ args[3] = ASMREF_TMP1; /* CTSize align */ ++ asm_gencall(as, ci, args); ++ emit_loadi(as, ra_releasetmp(as, ASMREF_TMP1), (int32_t)ctype_align(info)); ++ return; ++ } ++ ++ /* Initialize gct and ctypeid. lj_mem_newgco() already sets marked. */ ++ emit_lso(as, RISCVI_SB, RID_RET+1, RID_RET, (offsetof(GCcdata, gct))); ++ emit_lso(as, RISCVI_SH, RID_TMP, RID_RET, (offsetof(GCcdata, ctypeid))); ++ emit_loadk12(as, RID_RET+1, ~LJ_TCDATA); ++ emit_loadk32(as, RID_TMP, id); ++ args[0] = ASMREF_L; /* lua_State *L */ ++ args[1] = ASMREF_TMP1; /* MSize size */ ++ asm_gencall(as, ci, args); ++ ra_allockreg(as, (int32_t)(sz+sizeof(GCcdata)), ++ ra_releasetmp(as, ASMREF_TMP1)); ++} ++#endif ++ ++/* -- Write barriers ------------------------------------------------------ */ ++ ++static void asm_tbar(ASMState *as, IRIns *ir) ++{ ++ Reg tab = ra_alloc1(as, ir->op1, RSET_GPR); ++ Reg mark = ra_scratch(as, rset_exclude(RSET_GPR, tab)); ++ Reg link = RID_TMP; ++ MCLabel l_end = emit_label(as); ++ emit_lso(as, RISCVI_SD, link, tab, (int32_t)offsetof(GCtab, gclist)); ++ emit_lso(as, RISCVI_SB, mark, tab, (int32_t)offsetof(GCtab, marked)); ++ emit_setgl(as, tab, gc.grayagain); // make tab gray again ++ emit_getgl(as, link, gc.grayagain); ++ emit_branch(as, RISCVI_BEQ, RID_TMP, RID_ZERO, l_end, -1); // black: not jump ++ emit_ds1s2(as, RISCVI_XOR, mark, mark, RID_TMP); // mark=0: gray ++ emit_dsi(as, RISCVI_ANDI, RID_TMP, mark, LJ_GC_BLACK); ++ emit_lso(as, RISCVI_LBU, mark, tab, ((int32_t)offsetof(GCtab, marked))); ++} ++ ++static void asm_obar(ASMState *as, IRIns *ir) ++{ ++ const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_barrieruv]; ++ IRRef args[2]; ++ MCLabel l_end; ++ Reg obj, val, tmp; ++ /* No need for other object barriers (yet). */ ++ lj_assertA(IR(ir->op1)->o == IR_UREFC, "bad OBAR type"); // Closed upvalue ++ ra_evictset(as, RSET_SCRATCH); ++ l_end = emit_label(as); ++ args[0] = ASMREF_TMP1; /* global_State *g */ ++ args[1] = ir->op1; /* TValue *tv */ ++ asm_gencall(as, ci, args); ++ emit_ds(as, RISCVI_MV, ra_releasetmp(as, ASMREF_TMP1), RID_GL); ++ obj = IR(ir->op1)->r; ++ tmp = ra_scratch(as, rset_exclude(RSET_GPR, obj)); ++ emit_branch(as, RISCVI_BEQ, tmp, RID_ZERO, l_end, -1); ++ emit_branch(as, RISCVI_BEQ, RID_TMP, RID_ZERO, l_end, -1); // black: jump ++ emit_dsi(as, RISCVI_ANDI, tmp, tmp, LJ_GC_BLACK); ++ emit_dsi(as, RISCVI_ANDI, RID_TMP, RID_TMP, LJ_GC_WHITES); ++ val = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, obj)); ++ emit_lso(as, RISCVI_LBU, tmp, obj, ++ ((int32_t)offsetof(GCupval, marked)-(int32_t)offsetof(GCupval, tv))); ++ emit_lso(as, RISCVI_LBU, RID_TMP, val, ((int32_t)offsetof(GChead, marked))); ++} ++ ++/* -- Arithmetic and logic operations ------------------------------------- */ ++ ++static void asm_fparith(ASMState *as, IRIns *ir, RISCVIns riscvi) ++{ ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ Reg right, left = ra_alloc2(as, ir, RSET_FPR); ++ right = (left >> 8); left &= 255; ++ emit_ds1s2(as, riscvi, dest, left, right); ++} ++ ++static void asm_fpunary(ASMState *as, IRIns *ir, RISCVIns riscvi) ++{ ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ Reg left = ra_hintalloc(as, ir->op1, dest, RSET_FPR); ++ switch(riscvi) { ++ case RISCVI_FROUND_S_RTZ: case RISCVI_FROUND_S_RDN: case RISCVI_FROUND_S_RUP: ++ case RISCVI_FROUND_D_RTZ: case RISCVI_FROUND_D_RDN: case RISCVI_FROUND_D_RUP: ++ case RISCVI_FSQRT_S: case RISCVI_FSQRT_D: ++ emit_ds(as, riscvi, dest, left); ++ break; ++ case RISCVI_FMV_S: case RISCVI_FMV_D: ++ case RISCVI_FABS_S: case RISCVI_FABS_D: ++ case RISCVI_FNEG_S: case RISCVI_FNEG_D: ++ emit_ds1s2(as, riscvi, dest, left, left); ++ break; ++ default: ++ lj_assertA(0, "bad fp unary instruction"); ++ return; ++ } ++} ++ ++static void asm_fpround(ASMState *as, IRIns *ir, RISCVIns riscvi) ++{ ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ Reg left = ra_hintalloc(as, ir->op1, dest, RSET_FPR); ++ MCLabel l_end = emit_label(as); ++ ++ if (dest != left) { ++ emit_ds1s2(as, RISCVI_FSGNJ_D, dest, dest, left); ++ emit_ds(as, RISCVI_FCVT_D_L, dest, RID_TMP); ++ } else { ++ Reg ftmp = ra_scratch(as, rset_exclude(RSET_FPR, dest)); ++ emit_ds1s2(as, RISCVI_FSGNJ_D, dest, ftmp, left); ++ emit_ds(as, RISCVI_FCVT_D_L, ftmp, RID_TMP); ++ } ++ emit_ds(as, riscvi, RID_TMP, left); ++ emit_branch(as, RISCVI_BLT, RID_ZERO, RID_TMP, l_end, -1); ++ emit_dsi(as, RISCVI_ADDI, RID_TMP, RID_TMP, -1075); ++ emit_dsi(as, RISCVI_ANDI, RID_TMP, RID_TMP, 0x7ff); ++ emit_dsi(as, RISCVI_SRLI, RID_TMP, RID_TMP, 52); ++ if (dest != left) ++ emit_ds1s2(as, RISCVI_FMV_D, dest, left, left); ++ emit_ds(as, RISCVI_FMV_X_D, RID_TMP, left); ++} ++ ++static void asm_fpmath(ASMState *as, IRIns *ir) ++{ ++ IRFPMathOp fpm = (IRFPMathOp)ir->op2; ++ if (fpm <= IRFPM_TRUNC) ++ if (as->flags & JIT_F_RVZfa) { ++ asm_fpunary(as, ir, fpm == IRFPM_FLOOR ? RISCVI_FROUND_D_RDN : ++ fpm == IRFPM_CEIL ? RISCVI_FROUND_D_RUP : RISCVI_FROUND_D_RTZ); ++ } else { ++ asm_fpround(as, ir, fpm == IRFPM_FLOOR ? RISCVI_FCVT_L_D | RISCVF_RM(RISCVRM_RDN) : ++ fpm == IRFPM_CEIL ? RISCVI_FCVT_L_D | RISCVF_RM(RISCVRM_RUP) : ++ RISCVI_FCVT_L_D | RISCVF_RM(RISCVRM_RTZ)); ++ } ++ else if (fpm == IRFPM_SQRT) ++ asm_fpunary(as, ir, RISCVI_FSQRT_D); ++ else ++ asm_callid(as, ir, IRCALL_lj_vm_floor + fpm); ++} ++ ++static void asm_add(ASMState *as, IRIns *ir) ++{ ++ IRType1 t = ir->t; ++ if (irt_isnum(t)) { ++ if (!asm_fusemadd(as, ir, RISCVI_FMADD_D, RISCVI_FMADD_D)) ++ asm_fparith(as, ir, RISCVI_FADD_D); ++ return; ++ } else { ++ if ((as->flags & JIT_F_RVXThead) && asm_fusemac(as, ir, RISCVI_TH_MULA)) ++ return; ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); ++ if (irref_isk(ir->op2)) { ++ intptr_t k = get_kval(as, ir->op2); ++ if (checki12(k)) { ++ if (irt_is64(t)) { ++ emit_dsi(as, RISCVI_ADDI, dest, left, k); ++ } else { ++ emit_dsi(as, RISCVI_ADDIW, dest, left, k); ++ } ++ return; ++ } ++ } ++ Reg right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); ++ emit_ds1s2(as, irt_is64(t) ? RISCVI_ADD : RISCVI_ADDW, dest, ++ left, right); ++ } ++} ++ ++static void asm_sub(ASMState *as, IRIns *ir) ++{ ++ if (irt_isnum(ir->t)) { ++ if (!asm_fusemadd(as, ir, RISCVI_FMSUB_D, RISCVI_FNMSUB_D)) ++ asm_fparith(as, ir, RISCVI_FSUB_D); ++ return; ++ } else { ++ if ((as->flags & JIT_F_RVXThead) && asm_fusemac(as, ir, RISCVI_TH_MULS)) ++ return; ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg right, left = ra_alloc2(as, ir, RSET_GPR); ++ right = (left >> 8); left &= 255; ++ emit_ds1s2(as, irt_is64(ir->t) ? RISCVI_SUB : RISCVI_SUBW, dest, ++ left, right); ++ } ++} ++ ++static void asm_mul(ASMState *as, IRIns *ir) ++{ ++ if (irt_isnum(ir->t)) { ++ asm_fparith(as, ir, RISCVI_FMUL_D); ++ } else { ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg right, left = ra_alloc2(as, ir, RSET_GPR); ++ right = (left >> 8); left &= 255; ++ emit_ds1s2(as, irt_is64(ir->t) ? RISCVI_MUL : RISCVI_MULW, dest, ++ left, right); ++ } ++} ++ ++static void asm_fpdiv(ASMState *as, IRIns *ir) ++{ ++ asm_fparith(as, ir, RISCVI_FDIV_D); ++} ++ ++static void asm_neg(ASMState *as, IRIns *ir) ++{ ++ if (irt_isnum(ir->t)) { ++ asm_fpunary(as, ir, RISCVI_FNEG_D); ++ } else { ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); ++ emit_ds1s2(as, irt_is64(ir->t) ? RISCVI_SUB : RISCVI_SUBW, dest, ++ RID_ZERO, left); ++ } ++} ++ ++#define asm_abs(as, ir) asm_fpunary(as, ir, RISCVI_FABS_D) ++ ++static void asm_arithov(ASMState *as, IRIns *ir) ++{ ++ Reg right, left, tmp, dest = ra_dest(as, ir, RSET_GPR); ++ lj_assertA(!irt_is64(ir->t), "bad usage"); ++ if (irref_isk(ir->op2)) { ++ int k = IR(ir->op2)->i; ++ if (ir->o == IR_SUBOV) k = (int)(~(unsigned int)k+1u); ++ if (checki12(k)) { /* (dest < left) == (k >= 0 ? 1 : 0) */ ++ left = ra_alloc1(as, ir->op1, RSET_GPR); ++ asm_guard(as, k >= 0 ? RISCVI_BLT : RISCVI_BGE, dest, dest == left ? RID_TMP : left); ++ emit_dsi(as, RISCVI_ADDI, dest, left, k); ++ if (dest == left) emit_mv(as, RID_TMP, left); ++ return; ++ } ++ } ++ left = ra_alloc2(as, ir, RSET_GPR); ++ right = (left >> 8); left &= 255; ++ tmp = ra_scratch(as, rset_exclude(rset_exclude(rset_exclude(RSET_GPR, left), ++ right), dest)); ++ asm_guard(as, RISCVI_BLT, RID_TMP, RID_ZERO); ++ emit_ds1s2(as, RISCVI_AND, RID_TMP, RID_TMP, tmp); ++ if (ir->o == IR_ADDOV) { /* ((dest^left) & (dest^right)) < 0 */ ++ emit_ds1s2(as, RISCVI_XOR, RID_TMP, dest, dest == right ? RID_TMP : right); ++ } else { /* ((dest^left) & (dest^~right)) < 0 */ ++ emit_xnor(as, RID_TMP, dest, dest == right ? RID_TMP : right); ++ } ++ emit_ds1s2(as, RISCVI_XOR, tmp, dest, dest == left ? RID_TMP : left); ++ emit_ds1s2(as, ir->o == IR_ADDOV ? RISCVI_ADDW : RISCVI_SUBW, dest, left, right); ++ if (dest == left || dest == right) ++ emit_mv(as, RID_TMP, dest == left ? left : right); ++} ++ ++#define asm_addov(as, ir) asm_arithov(as, ir) ++#define asm_subov(as, ir) asm_arithov(as, ir) ++ ++static void asm_mulov(ASMState *as, IRIns *ir) ++{ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg right, left = ra_alloc2(as, ir, RSET_GPR); ++ right = (left >> 8); left &= 255; ++ asm_guard(as, RISCVI_BNE, dest, RID_TMP); ++ emit_ext(as, RISCVI_SEXT_W, dest, RID_TMP); // dest: [31:0]+signextend ++ emit_ds1s2(as, RISCVI_MUL, RID_TMP, left, right); // RID_TMP: [63:0] ++} ++ ++static void asm_bnot(ASMState *as, IRIns *ir) ++{ ++ Reg left, right, dest = ra_dest(as, ir, RSET_GPR); ++ IRIns *irl = IR(ir->op1); ++ if (as->flags & JIT_F_RVZbb && mayfuse(as, ir->op1) && irl->o == IR_BXOR) { ++ left = ra_alloc2(as, irl, RSET_GPR); ++ right = (left >> 8); left &= 255; ++ emit_ds1s2(as, RISCVI_XNOR, dest, left, right); ++ } else { ++ left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); ++ emit_ds(as, RISCVI_NOT, dest, left); ++ } ++} ++ ++static void asm_bswap(ASMState *as, IRIns *ir) ++{ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_alloc1(as, ir->op1, RSET_GPR); ++ RegSet allow = rset_exclude(rset_exclude(RSET_GPR, dest), left); ++ if (as->flags & JIT_F_RVZbb) { ++ if (!irt_is64(ir->t)) ++ emit_dsshamt(as, RISCVI_SRAI, dest, dest, 32); ++ emit_ds(as, RISCVI_REV8, dest, left); ++ } else if (as->flags & JIT_F_RVXThead) { ++ emit_ds(as, irt_is64(ir->t) ? RISCVI_TH_REV : RISCVI_TH_REVW, ++ dest, left); ++ } else if (irt_is64(ir->t)) { ++ Reg tmp1, tmp2, tmp3, tmp4; ++ tmp1 = ra_scratch(as, allow), allow = rset_exclude(allow, tmp1); ++ tmp2 = ra_scratch(as, allow), allow = rset_exclude(allow, tmp2); ++ tmp3 = ra_scratch(as, allow), allow = rset_exclude(allow, tmp3); ++ tmp4 = ra_scratch(as, allow); ++ emit_ds1s2(as, RISCVI_OR, dest, dest, tmp4); ++ emit_ds1s2(as, RISCVI_OR, dest, dest, tmp3); ++ emit_ds1s2(as, RISCVI_OR, dest, dest, tmp2); ++ emit_dsshamt(as, RISCVI_SLLI, tmp4, tmp4, 40); ++ emit_dsshamt(as, RISCVI_SLLI, dest, left, 56); ++ emit_ds1s2(as, RISCVI_OR, tmp3, tmp1, tmp3); ++ emit_ds1s2(as, RISCVI_AND, tmp4, left, RID_TMP); ++ emit_dsshamt(as, RISCVI_SLLI, tmp3, tmp3, 32); ++ emit_dsshamt(as, RISCVI_SLLI, tmp1, tmp1, 24); ++ emit_dsshamt(as, RISCVI_SRLIW, tmp3, left, 24); ++ emit_ds1s2(as, RISCVI_OR, tmp2, tmp3, tmp2); ++ emit_ds1s2(as, RISCVI_AND, tmp1, left, tmp1); ++ emit_ds1s2(as, RISCVI_OR, tmp3, tmp4, tmp3); ++ emit_dsshamt(as, RISCVI_SLLI, tmp4, tmp4, 24); ++ emit_dsshamt(as, RISCVI_SRLIW, tmp4, tmp4, 24); ++ emit_ds1s2(as, RISCVI_AND, tmp3, tmp3, tmp1); ++ emit_dsshamt(as, RISCVI_SRLI, tmp4, left, 8); ++ emit_dsshamt(as, RISCVI_SRLI, tmp3, left, 24); ++ emit_ds1s2(as, RISCVI_OR, tmp2, tmp2, tmp3); ++ emit_du(as, RISCVI_LUI, tmp1, RISCVF_HI(0xff0000u)); ++ emit_ds1s2(as, RISCVI_AND, tmp2, tmp2, RID_TMP); ++ emit_dsshamt(as, RISCVI_SRLI, tmp3, left, 56); ++ emit_dsi(as, RISCVI_ADDI, RID_TMP, RID_TMP, RISCVF_LO(0xff00)); ++ emit_du(as, RISCVI_LUI, RID_TMP, RISCVF_HI(0xff00u)); ++ emit_dsshamt(as, RISCVI_SRLI, tmp2, left, 40); ++ } else { ++ Reg tmp1, tmp2; ++ tmp1 = ra_scratch(as, allow), allow = rset_exclude(allow, tmp1); ++ tmp2 = ra_scratch(as, allow); ++ emit_ds1s2(as, RISCVI_OR, dest, dest, tmp2); ++ emit_ds1s2(as, RISCVI_OR, dest, dest, tmp1); ++ emit_dsshamt(as, RISCVI_SLLI, tmp2, RID_TMP, 8); ++ emit_dsshamt(as, RISCVI_SLLIW, dest, left, 24); ++ emit_ds1s2(as, RISCVI_OR, tmp1, tmp1, tmp2); ++ emit_ds1s2(as, RISCVI_AND, RID_TMP, left, RID_TMP); ++ emit_ds1s2(as, RISCVI_AND, tmp1, tmp1, RID_TMP); ++ emit_dsshamt(as, RISCVI_SRLIW, tmp2, left, 24); ++ emit_dsi(as, RISCVI_ADDI, RID_TMP, RID_TMP, RISCVF_LO(0xff00)); ++ emit_du(as, RISCVI_LUI, RID_TMP, RISCVF_HI(0xff00u)); ++ emit_dsshamt(as, RISCVI_SRLI, tmp1, left, 8); ++ } ++} ++ ++static void asm_bitop(ASMState *as, IRIns *ir, RISCVIns riscvi, RISCVIns riscvik, RISCVIns riscvin) ++{ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left, right; ++ IRIns *irl = IR(ir->op1), *irr = IR(ir->op2); ++ if (irref_isk(ir->op2)) { ++ intptr_t k = get_kval(as, ir->op2); ++ if (checki12(k)) { ++ left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); ++ emit_dsi(as, riscvik, dest, left, k); ++ return; ++ } ++ } else if (as->flags & JIT_F_RVZbb) { ++ if (mayfuse(as, ir->op1) && irl->o == IR_BNOT) { ++ left = ra_alloc1(as, irl->op1, RSET_GPR); ++ right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); ++ emit_ds1s2(as, riscvin, dest, right, left); ++ return; ++ } else if (mayfuse(as, ir->op2) && irr->o == IR_BNOT) { ++ left = ra_alloc1(as, ir->op1, RSET_GPR); ++ right = ra_alloc1(as, irr->op1, rset_exclude(RSET_GPR, left)); ++ emit_ds1s2(as, riscvin, dest, left, right); ++ return; ++ } ++ } ++ left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); ++ right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); ++ emit_ds1s2(as, riscvi, dest, left, right); ++} ++ ++#define asm_band(as, ir) asm_bitop(as, ir, RISCVI_AND, RISCVI_ANDI, RISCVI_ANDN) ++#define asm_bor(as, ir) asm_bitop(as, ir, RISCVI_OR, RISCVI_ORI, RISCVI_ORN) ++#define asm_bxor(as, ir) asm_bitop(as, ir, RISCVI_XOR, RISCVI_XORI, RISCVI_XNOR) ++ ++static void asm_bitshift(ASMState *as, IRIns *ir, RISCVIns riscvi, RISCVIns riscvik) ++{ ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_alloc1(as, ir->op1, RSET_GPR); ++ uint32_t shmsk = irt_is64(ir->t) ? 63 : 31; ++ if (irref_isk(ir->op2)) { /* Constant shifts. */ ++ uint32_t shift = (uint32_t)(IR(ir->op2)->i & shmsk); ++ switch (riscvik) { ++ case RISCVI_SRAI: case RISCVI_SRLI: case RISCVI_SLLI: ++ case RISCVI_SRAIW: case RISCVI_SLLIW: case RISCVI_SRLIW: ++ emit_dsshamt(as, riscvik, dest, left, shift); ++ break; ++ case RISCVI_ADDI: shift = (-shift) & shmsk; ++ case RISCVI_RORI: ++ emit_roti(as, RISCVI_RORI, dest, left, RID_TMP, shift); ++ break; ++ case RISCVI_ADDIW: shift = (-shift) & shmsk; ++ case RISCVI_RORIW: ++ emit_roti(as, RISCVI_RORIW, dest, left, RID_TMP, shift); ++ break; ++ default: ++ lj_assertA(0, "bad shift instruction"); ++ return; ++ } ++ } else { ++ Reg right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); ++ switch (riscvi) { ++ case RISCVI_SRA: case RISCVI_SRL: case RISCVI_SLL: ++ case RISCVI_SRAW: case RISCVI_SRLW: case RISCVI_SLLW: ++ emit_ds1s2(as, riscvi, dest, left, right); ++ break; ++ case RISCVI_ROR: case RISCVI_ROL: ++ case RISCVI_RORW: case RISCVI_ROLW: ++ emit_rot(as, riscvi, dest, left, right, RID_TMP); ++ break; ++ default: ++ lj_assertA(0, "bad shift instruction"); ++ return; ++ } ++ } ++} ++ ++#define asm_bshl(as, ir) (irt_is64(ir->t) ? \ ++ asm_bitshift(as, ir, RISCVI_SLL, RISCVI_SLLI) : \ ++ asm_bitshift(as, ir, RISCVI_SLLW, RISCVI_SLLIW)) ++#define asm_bshr(as, ir) (irt_is64(ir->t) ? \ ++ asm_bitshift(as, ir, RISCVI_SRL, RISCVI_SRLI) : \ ++ asm_bitshift(as, ir, RISCVI_SRLW, RISCVI_SRLIW)) ++#define asm_bsar(as, ir) (irt_is64(ir->t) ? \ ++ asm_bitshift(as, ir, RISCVI_SRA, RISCVI_SRAI) : \ ++ asm_bitshift(as, ir, RISCVI_SRAW, RISCVI_SRAIW)) ++#define asm_brol(as, ir) (irt_is64(ir->t) ? \ ++ asm_bitshift(as, ir, RISCVI_ROL, RISCVI_ADDI) : \ ++ asm_bitshift(as, ir, RISCVI_ROLW, RISCVI_ADDIW)) ++ // ROLI -> ADDI, ROLIW -> ADDIW; Hacky but works. ++#define asm_bror(as, ir) (irt_is64(ir->t) ? \ ++ asm_bitshift(as, ir, RISCVI_ROR, RISCVI_RORI) : \ ++ asm_bitshift(as, ir, RISCVI_RORW, RISCVI_RORIW)) ++ ++static void asm_min_max(ASMState *as, IRIns *ir, int ismax) ++{ ++ if (irt_isnum(ir->t)) { ++ Reg dest = ra_dest(as, ir, RSET_FPR); ++ MCLabel l_ret_left, l_end; ++ Reg right, left = ra_alloc2(as, ir, RSET_FPR); ++ right = (left >> 8); left &= 255; ++ l_end = emit_label(as); ++ ++ if (dest != left) ++ emit_ds1s2(as, RISCVI_FMV_D, dest, left, left); ++ l_ret_left = emit_label(as); ++ ++ if (dest != left) ++ emit_jump(as, l_end, -1); ++ if (dest != right) ++ emit_ds1s2(as, RISCVI_FMV_D, dest, right, right); ++ ++ emit_branch(as, RISCVI_BNE, RID_TMP, RID_ZERO, l_ret_left, -1); ++ emit_ds1s2(as, RISCVI_FLT_D, RID_TMP, ismax ? right : left, ++ ismax ? left : right); ++ } else { ++ Reg dest = ra_dest(as, ir, RSET_GPR); ++ Reg left = ra_hintalloc(as, ir->op1, dest, RSET_GPR); ++ Reg right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); ++ if (as->flags & JIT_F_RVZbb) { ++ emit_ds1s2(as, ismax ? RISCVI_MAX : RISCVI_MIN, dest, left, right); ++ } else { ++ if (as->flags & JIT_F_RVXThead) { ++ if (left == right) { ++ if (dest != left) emit_mv(as, dest, left); ++ } else { ++ if (dest == left) { ++ emit_ds1s2(as, RISCVI_TH_MVNEZ, dest, right, RID_TMP); ++ } else { ++ emit_ds1s2(as, RISCVI_TH_MVEQZ, dest, left, RID_TMP); ++ if (dest != right) emit_mv(as, dest, right); ++ } ++ } ++ } else if (as->flags & JIT_F_RVZicond) { ++ emit_ds1s2(as, RISCVI_OR, dest, dest, RID_TMP); ++ if (dest != right) { ++ emit_ds1s2(as, RISCVI_CZERO_EQZ, RID_TMP, right, RID_TMP); ++ emit_ds1s2(as, RISCVI_CZERO_NEZ, dest, left, RID_TMP); ++ } else { ++ emit_ds1s2(as, RISCVI_CZERO_NEZ, RID_TMP, left, RID_TMP); ++ emit_ds1s2(as, RISCVI_CZERO_EQZ, dest, right, RID_TMP); ++ } ++ } else { ++ if (dest != right) { ++ emit_ds1s2(as, RISCVI_XOR, dest, right, dest); ++ emit_ds1s2(as, RISCVI_AND, dest, dest, RID_TMP); ++ emit_ds1s2(as, RISCVI_XOR, dest, right, left); ++ emit_dsi(as, RISCVI_ADDI, RID_TMP, RID_TMP, -1); ++ } else { ++ emit_ds1s2(as, RISCVI_XOR, dest, left, dest); ++ emit_ds1s2(as, RISCVI_AND, dest, dest, RID_TMP); ++ emit_ds1s2(as, RISCVI_XOR, dest, left, right); ++ emit_ds1s2(as, RISCVI_SUB, RID_TMP, RID_ZERO, RID_TMP); ++ } ++ } ++ emit_ds1s2(as, RISCVI_SLT, RID_TMP, ++ ismax ? left : right, ismax ? right : left); ++ } ++ } ++} ++ ++#define asm_min(as, ir) asm_min_max(as, ir, 0) ++#define asm_max(as, ir) asm_min_max(as, ir, 1) ++ ++/* -- Comparisons --------------------------------------------------------- */ ++ ++/* FP comparisons. */ ++static void asm_fpcomp(ASMState *as, IRIns *ir) ++{ ++ IROp op = ir->o; ++ Reg right, left = ra_alloc2(as, ir, RSET_FPR); ++ right = (left >> 8); left &= 255; ++ asm_guard(as, (op < IR_EQ ? (op&4) : (op&1)) ++ ? RISCVI_BNE : RISCVI_BEQ, RID_TMP, RID_ZERO); ++ switch (op) { ++ case IR_LT: case IR_UGE: ++ emit_ds1s2(as, RISCVI_FLT_D, RID_TMP, left, right); ++ break; ++ case IR_LE: case IR_UGT: case IR_ABC: ++ emit_ds1s2(as, RISCVI_FLE_D, RID_TMP, left, right); ++ break; ++ case IR_GT: case IR_ULE: ++ emit_ds1s2(as, RISCVI_FLT_D, RID_TMP, right, left); ++ break; ++ case IR_GE: case IR_ULT: ++ emit_ds1s2(as, RISCVI_FLE_D, RID_TMP, right, left); ++ break; ++ case IR_EQ: case IR_NE: ++ emit_ds1s2(as, RISCVI_FEQ_D, RID_TMP, left, right); ++ break; ++ default: ++ break; ++ } ++} ++ ++/* Integer comparisons. */ ++static void asm_intcomp(ASMState *as, IRIns *ir) ++{ ++ /* ORDER IR: LT GE LE GT ULT UGE ULE UGT. */ ++ /* 00 01 10 11 100 101 110 111 */ ++ IROp op = ir->o; ++ Reg right, left = ra_alloc1(as, ir->op1, RSET_GPR); ++ if (op == IR_ABC) op = IR_UGT; ++ if ((op&4) == 0 && irref_isk(ir->op2) && get_kval(as, ir->op2) == 0) { ++ switch (op) { ++ case IR_LT: asm_guard(as, RISCVI_BGE, left, RID_ZERO); break; ++ case IR_GE: asm_guard(as, RISCVI_BLT, left, RID_ZERO); break; ++ case IR_LE: asm_guard(as, RISCVI_BLT, RID_ZERO, left); break; ++ case IR_GT: asm_guard(as, RISCVI_BGE, RID_ZERO, left); break; ++ default: break; ++ } ++ return; ++ } ++ if (irref_isk(ir->op2)) { ++ intptr_t k = get_kval(as, ir->op2); ++ if ((op&2)) k++; ++ if (checki12(k)) { ++ asm_guard(as, (op&1) ? RISCVI_BNE : RISCVI_BEQ, RID_TMP, RID_ZERO); ++ emit_dsi(as, (op&4) ? RISCVI_SLTIU : RISCVI_SLTI, RID_TMP, left, k); ++ return; ++ } ++ } ++ right = ra_alloc1(as, ir->op2, rset_exclude(RSET_GPR, left)); ++ asm_guard(as, ((op&4) ? RISCVI_BGEU : RISCVI_BGE) ^ RISCVF_FUNCT3((op^(op>>1))&1), ++ (op&2) ? right : left, (op&2) ? left : right); ++} ++ ++static void asm_comp(ASMState *as, IRIns *ir) ++{ ++ if (irt_isnum(ir->t)) ++ asm_fpcomp(as, ir); ++ else ++ asm_intcomp(as, ir); ++} ++ ++static void asm_equal(ASMState *as, IRIns *ir) ++{ ++ if (irt_isnum(ir->t)) { ++ asm_fpcomp(as, ir); ++ } else { ++ Reg right, left = ra_alloc2(as, ir, RSET_GPR); ++ right = (left >> 8); left &= 255; ++ asm_guard(as, (ir->o & 1) ? RISCVI_BEQ : RISCVI_BNE, left, right); ++ } ++} ++ ++/* -- Split register ops -------------------------------------------------- */ ++ ++/* Hiword op of a split 64 bit op. Previous op must be the loword op. */ ++static void asm_hiop(ASMState *as, IRIns *ir) ++{ ++ /* HIOP is marked as a store because it needs its own DCE logic. */ ++ int uselo = ra_used(ir-1), usehi = ra_used(ir); /* Loword/hiword used? */ ++ if (LJ_UNLIKELY(!(as->flags & JIT_F_OPT_DCE))) uselo = usehi = 1; ++ if (!usehi) return; /* Skip unused hiword op for all remaining ops. */ ++ switch ((ir-1)->o) { ++ case IR_CALLN: ++ case IR_CALLL: ++ case IR_CALLS: ++ case IR_CALLXS: ++ if (!uselo) ++ ra_allocref(as, ir->op1, RID2RSET(RID_RETLO)); /* Mark lo op as used. */ ++ break; ++ default: lj_assertA(0, "bad HIOP for op %d", (ir-1)->o); break; ++ } ++} ++ ++/* -- Profiling ----------------------------------------------------------- */ ++ ++static void asm_prof(ASMState *as, IRIns *ir) ++{ ++ UNUSED(ir); ++ asm_guard(as, RISCVI_BNE, RID_TMP, RID_ZERO); ++ emit_dsi(as, RISCVI_ANDI, RID_TMP, RID_TMP, HOOK_PROFILE); ++ emit_lsglptr(as, RISCVI_LBU, RID_TMP, ++ (int32_t)offsetof(global_State, hookmask)); ++} ++ ++/* -- Stack handling ------------------------------------------------------ */ ++ ++/* Check Lua stack size for overflow. Use exit handler as fallback. */ ++static void asm_stack_check(ASMState *as, BCReg topslot, ++ IRIns *irp, RegSet allow, ExitNo exitno) ++{ ++ /* Try to get an unused temp register, otherwise spill/restore RID_RET*. */ ++ Reg tmp, pbase = irp ? (ra_hasreg(irp->r) ? irp->r : RID_TMP) : RID_BASE; ++ ExitNo oldsnap = as->snapno; ++ rset_clear(allow, pbase); ++ as->snapno = exitno; ++ asm_guard(as, RISCVI_BNE, RID_TMP, RID_ZERO); ++ as->snapno = oldsnap; ++ if (allow) { ++ tmp = rset_pickbot(allow); ++ ra_modified(as, tmp); ++ } else { // allow == RSET_EMPTY ++ tmp = RID_RET; ++ emit_lso(as, RISCVI_LD, tmp, RID_SP, 0); /* Restore tmp1 register. */ ++ } ++ emit_dsi(as, RISCVI_SLTIU, RID_TMP, RID_TMP, (int32_t)(8*topslot)); ++ emit_ds1s2(as, RISCVI_SUB, RID_TMP, tmp, pbase); ++ emit_lso(as, RISCVI_LD, tmp, tmp, offsetof(lua_State, maxstack)); ++ if (pbase == RID_TMP) ++ emit_getgl(as, RID_TMP, jit_base); ++ emit_getgl(as, tmp, cur_L); ++ if (allow == RSET_EMPTY) /* Spill temp register. */ ++ emit_lso(as, RISCVI_SD, tmp, RID_SP, 0); ++} ++ ++/* Restore Lua stack from on-trace state. */ ++static void asm_stack_restore(ASMState *as, SnapShot *snap) ++{ ++ SnapEntry *map = &as->T->snapmap[snap->mapofs]; ++#ifdef LUA_USE_ASSERT ++ SnapEntry *flinks = &as->T->snapmap[snap_nextofs(as->T, snap)-1-LJ_FR2]; ++#endif ++ MSize n, nent = snap->nent; ++ /* Store the value of all modified slots to the Lua stack. */ ++ for (n = 0; n < nent; n++) { ++ SnapEntry sn = map[n]; ++ BCReg s = snap_slot(sn); ++ int32_t ofs = 8*((int32_t)s-1-LJ_FR2); ++ IRRef ref = snap_ref(sn); ++ IRIns *ir = IR(ref); ++ if ((sn & SNAP_NORESTORE)) ++ continue; ++ if (irt_isnum(ir->t)) { ++ Reg src = ra_alloc1(as, ref, RSET_FPR); ++ emit_lso(as, RISCVI_FSD, src, RID_BASE, ofs); ++ } else { ++ if ((sn & SNAP_KEYINDEX)) { ++ RegSet allow = rset_exclude(RSET_GPR, RID_BASE); ++ int64_t kki = (int64_t)LJ_KEYINDEX << 32; ++ if (irref_isk(ref)) { ++ emit_lso(as, RISCVI_SD, ++ ra_allock(as, kki | (int64_t)(uint32_t)ir->i, allow), ++ RID_BASE, ofs); ++ } else { ++ Reg src = ra_alloc1(as, ref, allow); ++ Reg rki = ra_allock(as, kki, rset_exclude(allow, src)); ++ emit_lso(as, RISCVI_SD, RID_TMP, RID_BASE, ofs); ++ emit_ds1s2(as, RISCVI_ADD, RID_TMP, src, rki); ++ } ++ } else { ++ asm_tvstore64(as, RID_BASE, ofs, ref); ++ } ++ } ++ checkmclim(as); ++ } ++ lj_assertA(map + nent == flinks, "inconsistent frames in snapshot"); ++} ++ ++/* -- GC handling --------------------------------------------------------- */ ++ ++/* Marker to prevent patching the GC check exit. */ ++#define RISCV_NOPATCH_GC_CHECK \ ++ (RISCVI_OR|RISCVF_D(RID_TMP)|RISCVF_S1(RID_TMP)|RISCVF_S2(RID_TMP)) ++ ++/* Check GC threshold and do one or more GC steps. */ ++static void asm_gc_check(ASMState *as) ++{ ++ const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_gc_step_jit]; ++ IRRef args[2]; ++ MCLabel l_end; ++ Reg tmp; ++ ra_evictset(as, RSET_SCRATCH); ++ l_end = emit_label(as); ++ /* Exit trace if in GCSatomic or GCSfinalize. Avoids syncing GC objects. */ ++ asm_guard(as, RISCVI_BNE, RID_RET, RID_ZERO); /* Assumes asm_snap_prep() already done. */ ++ *--as->mcp = RISCV_NOPATCH_GC_CHECK; ++ args[0] = ASMREF_TMP1; /* global_State *g */ ++ args[1] = ASMREF_TMP2; /* MSize steps */ ++ asm_gencall(as, ci, args); ++ emit_ds(as, RISCVI_MV, ra_releasetmp(as, ASMREF_TMP1), RID_GL); ++ tmp = ra_releasetmp(as, ASMREF_TMP2); ++ emit_loadi(as, tmp, as->gcsteps); ++ /* Jump around GC step if GC total < GC threshold. */ ++ emit_branch(as, RISCVI_BLTU, RID_TMP, tmp, l_end, -1); ++ emit_getgl(as, tmp, gc.threshold); ++ emit_getgl(as, RID_TMP, gc.total); ++ as->gcsteps = 0; ++ checkmclim(as); ++} ++ ++/* -- Loop handling ------------------------------------------------------- */ ++ ++/* Fixup the loop branch. */ ++static void asm_loop_fixup(ASMState *as) ++{ ++ MCode *p = as->mctop; ++ MCode *target = as->mcp; ++ ptrdiff_t delta; ++ if (as->loopinv) { /* Inverted loop branch? */ ++ delta = (char *)target - (char *)(p - 2); ++ /* asm_guard* already inverted the branch, and patched the final b. */ ++ lj_assertA(checki21(delta), "branch target out of range"); ++ p[-2] = (p[-2]&0x00000fff) | RISCVF_IMMJ(delta); ++ } else { ++ /* J */ ++ delta = (char *)target - (char *)(p - 1); ++ p[-1] = RISCVI_JAL | RISCVF_IMMJ(delta); ++ } ++} ++ ++/* Fixup the tail of the loop. */ ++static void asm_loop_tail_fixup(ASMState *as) ++{ ++ UNUSED(as); /* Nothing to do(?) */ ++} ++ ++/* -- Head of trace ------------------------------------------------------- */ ++ ++/* Coalesce BASE register for a root trace. */ ++static void asm_head_root_base(ASMState *as) ++{ ++ IRIns *ir = IR(REF_BASE); ++ Reg r = ir->r; ++ if (ra_hasreg(r)) { ++ ra_free(as, r); ++ if (rset_test(as->modset, r) || irt_ismarked(ir->t)) ++ ir->r = RID_INIT; /* No inheritance for modified BASE register. */ ++ if (r != RID_BASE) ++ emit_mv(as, r, RID_BASE); ++ } ++} ++ ++/* Coalesce BASE register for a side trace. */ ++static Reg asm_head_side_base(ASMState *as, IRIns *irp) ++{ ++ IRIns *ir = IR(REF_BASE); ++ Reg r = ir->r; ++ if (ra_hasreg(r)) { ++ ra_free(as, r); ++ if (rset_test(as->modset, r) || irt_ismarked(ir->t)) ++ ir->r = RID_INIT; /* No inheritance for modified BASE register. */ ++ if (irp->r == r) { ++ return r; /* Same BASE register already coalesced. */ ++ } else if (ra_hasreg(irp->r) && rset_test(as->freeset, irp->r)) { ++ emit_mv(as, r, irp->r); /* Move from coalesced parent reg. */ ++ return irp->r; ++ } else { ++ emit_getgl(as, r, jit_base); /* Otherwise reload BASE. */ ++ } ++ } ++ return RID_NONE; ++} ++ ++/* -- Tail of trace ------------------------------------------------------- */ ++ ++/* Fixup the tail code. */ ++static void asm_tail_fixup(ASMState *as, TraceNo lnk) ++{ ++ MCode *p = as->mctop; ++ MCode *target = lnk ? traceref(as->J,lnk)->mcode : (MCode *)lj_vm_exit_interp; ++ int32_t spadj = as->T->spadjust; ++ if (spadj == 0) { ++ p[-3] = RISCVI_NOP; ++ // as->mctop = p-2; ++ } else { ++ /* Patch stack adjustment. */ ++ p[-3] = RISCVI_ADDI | RISCVF_D(RID_SP) | RISCVF_S1(RID_SP) | RISCVF_IMMI(spadj); ++ } ++ /* Patch exit jump. */ ++ ptrdiff_t delta = (char *)target - (char *)(p - 2); ++ p[-2] = RISCVI_AUIPC | RISCVF_D(RID_TMP) | RISCVF_IMMU(RISCVF_HI(delta)); ++ p[-1] = RISCVI_JALR | RISCVF_S1(RID_TMP) | RISCVF_IMMI(RISCVF_LO(delta)); ++} ++ ++/* Prepare tail of code. */ ++static void asm_tail_prep(ASMState *as) ++{ ++ MCode *p = as->mctop - 2; /* Leave room for exitstub. */ ++ if (as->loopref) { ++ as->invmcp = as->mcp = p; ++ } else { ++ as->mcp = p-1; /* Leave room for stack pointer adjustment. */ ++ as->invmcp = NULL; ++ } ++ p[0] = p[1] = RISCVI_NOP; /* Prevent load/store merging. */ ++} ++ ++/* -- Trace setup --------------------------------------------------------- */ ++ ++/* Ensure there are enough stack slots for call arguments. */ ++static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) ++{ ++ IRRef args[CCI_NARGS_MAX*2]; ++ uint32_t i, nargs = CCI_XNARGS(ci); ++ int nslots = 0, ngpr = REGARG_NUMGPR, nfpr = REGARG_NUMFPR; ++ asm_collectargs(as, ir, ci, args); ++ for (i = 0; i < nargs; i++) { ++ if (args[i] && irt_isfp(IR(args[i])->t)) { ++ if (nfpr > 0) { ++ nfpr--; if(ci->flags & CCI_VARARG) ngpr--; ++ } else if (!(ci->flags & CCI_VARARG) && ngpr > 0) ngpr--; ++ else nslots += 2; ++ } else { ++ if (ngpr > 0) { ++ ngpr--; if(ci->flags & CCI_VARARG) nfpr--; ++ } else nslots += 2; ++ } ++ } ++ if (nslots > as->evenspill) /* Leave room for args in stack slots. */ ++ as->evenspill = nslots; ++ return REGSP_HINT(irt_isfp(ir->t) ? RID_FPRET : RID_RET); ++} ++ ++static void asm_setup_target(ASMState *as) ++{ ++ asm_sparejump_setup(as); ++ asm_exitstub_setup(as, as->T->nsnap + (as->parent ? 1 : 0)); ++} ++ ++/* -- Trace patching ------------------------------------------------------ */ ++ ++/* Patch exit jumps of existing machine code to a new target. */ ++void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target) ++{ ++ MCode *p = T->mcode; ++ MCode *pe = (MCode *)((char *)p + T->szmcode); ++ MCode *px = exitstub_trace_addr(T, exitno); ++ MCode *cstart = NULL; ++ MCode *mcarea = lj_mcode_patch(J, p, 0); ++ ++ for (; p < pe; p++) { ++ /* Look for exitstub branch, replace with branch to target. */ ++ ptrdiff_t odelta = (char *)px - (char *)(p+1), ++ ndelta = (char *)target - (char *)(p+1); ++ if ((((p[0] ^ RISCVF_IMMB(8)) & 0xfe000f80u) == 0 && ++ ((p[0] & 0x0000007fu) == 0x63u) && ++ ((p[1] ^ RISCVF_IMMJ(odelta)) & 0xfffff000u) == 0 && ++ ((p[1] & 0x0000007fu) == 0x6fu) && p[-1] != RISCV_NOPATCH_GC_CHECK) || ++ (((p[1] ^ RISCVF_IMMJ(odelta)) & 0xfffff000u) == 0 && ++ ((p[1] & 0x0000007fu) == 0x6fu) && p[0] != RISCV_NOPATCH_GC_CHECK)) { ++ lj_assertJ(checki32(ndelta), "branch target out of range"); ++ /* Patch jump, if within range. */ ++ patchbranch: ++ if (checki21(ndelta)) { /* Patch jump */ ++ p[1] = RISCVI_JAL | RISCVF_IMMJ(ndelta); ++ if (!cstart) cstart = p + 1; ++ } else { /* Branch out of range. Use spare jump slot in mcarea. */ ++ MCode *mcjump = asm_sparejump_use(mcarea, target); ++ if (mcjump) { ++ lj_mcode_sync(mcjump, mcjump+2); ++ ndelta = (char *)mcjump - (char *)(p+1); ++ if (checki21(ndelta)) { ++ goto patchbranch; ++ } else { ++ lj_assertJ(0, "spare jump out of range: -Osizemcode too big"); ++ } ++ } ++ /* Ignore jump slot overflow. Child trace is simply not attached. */ ++ } ++ } else if (p+2 == pe) { ++ if (p[0] == RISCVI_NOP && p[1] == RISCVI_NOP) { ++ ptrdiff_t delta = (char *)target - (char *)p; ++ lj_assertJ(checki32(delta), "jump target out of range"); ++ p[0] = RISCVI_AUIPC | RISCVF_D(RID_TMP) | RISCVF_IMMU(RISCVF_HI(delta)); ++ p[1] = RISCVI_JALR | RISCVF_S1(RID_TMP) | RISCVF_IMMI(RISCVF_LO(delta)); ++ if (!cstart) cstart = p; ++ } ++ } ++ } ++ if (cstart) lj_mcode_sync(cstart, px+1); ++ lj_mcode_patch(J, mcarea, 1); ++} + +Note that the following patch is changed a little to be +compilable in openRuyi gcc 15 +From 843a01e1586bed915ef0ab0e2a20d515a2d6674b Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:36:58 +0800 +Subject: [PATCH 12/22] riscv(interp): add VM builder support + +--- + src/host/buildvm.c | 2 ++ + src/host/buildvm_asm.c | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 33 insertions(+) + +diff --git a/src/host/buildvm.c b/src/host/buildvm.c +index 24db75f40b..6d9bfd6b9e 100644 +--- a/src/host/buildvm.c ++++ b/src/host/buildvm.c +@@ -67,6 +67,8 @@ static int collect_reloc(BuildCtx *ctx, uint8_t *addr, int idx, int type); + #include "../dynasm/dasm_ppc.h" + #elif LJ_TARGET_MIPS + #include "../dynasm/dasm_mips.h" ++#elif LJ_TARGET_RISCV64 ++#include "../dynasm/dasm_riscv.h" + #else + #error "No support for this architecture (yet)" + #endif +diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c +index 3870b8fe5e..e1ef296f31 100644 +--- a/src/host/buildvm_asm.c ++++ b/src/host/buildvm_asm.c +@@ -156,6 +156,34 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n, + "Error: unsupported opcode %08x for %s symbol relocation.\n", + ins, sym); + exit(1); ++#elif LJ_TARGET_RISCV64 ++ if ((ins & 0x7f) == 0x17u) { ++ fprintf(ctx->fp, "\tauipc x%d, %s\n", (ins >> 7) & 31, sym); ++ } else if ((ins & 0x7f) == 0x67u) { ++ fprintf(ctx->fp, "\tjalr x%d, x%d, %s\n", (ins >> 7) & 31, (ins >> 15) & 31, sym); ++ } else if ((ins & 0x7f) == 0x6fu) { ++ fprintf(ctx->fp, "\tjal x%d, %s\n", (ins >> 7) & 31, sym); ++ } else if ((ins & 0x7f) == 0x03u) { ++ uint8_t funct3 = (ins >> 12) & 7; ++ uint8_t rd = (ins >> 7) & 31, rs1 = (ins >> 15) & 31; ++ switch (funct3) { ++ case 0: fprintf(ctx->fp, "\tlb"); break; ++ case 1: fprintf(ctx->fp, "\tlh"); break; ++ case 2: fprintf(ctx->fp, "\tlw"); break; ++ case 3: fprintf(ctx->fp, "\tld"); break; ++ case 4: fprintf(ctx->fp, "\tlbu"); break; ++ case 5: fprintf(ctx->fp, "\tlhu"); break; ++ case 6: fprintf(ctx->fp, "\tlwu"); break; ++ default: goto rv_reloc_err; ++ } ++ fprintf(ctx->fp, " x%d, %s(x%d)\n", rd, sym, rs1); ++ } else { ++rv_reloc_err: ++ fprintf(stderr, ++ "Error: unsupported opcode %08x for %s symbol relocation.\n", ++ ins, sym); ++ exit(1); ++ } + #else + #error "missing relocation support for this architecture" + #endif +@@ -248,6 +276,9 @@ void emit_asm(BuildCtx *ctx) + #endif + #if LJ_TARGET_MIPS + fprintf(ctx->fp, "\t.set nomips16\n\t.abicalls\n\t.set noreorder\n\t.set nomacro\n"); ++#endif ++#if LJ_TARGET_RISCV64 ++ fprintf(ctx->fp, ".option norelax\n"); + #endif + emit_asm_align(ctx, 4); + + +From a4def325033641166e3db1d15754360b3310fe74 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:38:50 +0800 +Subject: [PATCH 13/22] riscv(misc): add bytecode listing support + +--- + src/jit/bcsave.lua | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua +index a30a34b6be..05b1ae4261 100644 +--- a/src/jit/bcsave.lua ++++ b/src/jit/bcsave.lua +@@ -101,6 +101,7 @@ local map_arch = { + mips64el = { e = "le", b = 64, m = 8, f = 0x80000007, }, + mips64r6 = { e = "be", b = 64, m = 8, f = 0xa0000407, }, + mips64r6el = { e = "le", b = 64, m = 8, f = 0xa0000407, }, ++ riscv64 = { e = "le", b = 64, m = 243, f = 0x00000004, }, + } + + local map_os = { + +From bd6f9fcdb109fa37e69d5b4be4b97320fb9bf608 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:40:51 +0800 +Subject: [PATCH 14/22] riscv(jit): add hooks in interpreter + +--- + src/vm_riscv64.dasc | 387 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 387 insertions(+) + +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index 0a8970a109..ee45afef99 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -449,6 +449,24 @@ + |.macro li_vmstate, st; li TMP0, ~LJ_VMST_..st; .endmacro + |.macro st_vmstate; sw TMP0, GL->vmstate; .endmacro + | ++|.macro hotcheck, delta, target ++| srli TMP1, PC, 1 ++| andi TMP1, TMP1, 126 ++| add TMP1, TMP1, DISPATCH ++| lhu TMP2, GG_DISP2HOT(TMP1) ++| addiw TMP2, TMP2, -delta ++| sh TMP2, GG_DISP2HOT(TMP1) ++| bxltz TMP2, target ++|.endmacro ++| ++|.macro hotloop ++| hotcheck HOTCOUNT_LOOP, ->vm_hotloop ++|.endmacro ++| ++|.macro hotcall ++| hotcheck HOTCOUNT_CALL, ->vm_hotcall ++|.endmacro ++| + |// Move table write barrier back. Overwrites mark and tmp. + |.macro barrierback, tab, mark, tmp, target + | ld tmp, GL->gc.grayagain +@@ -1146,8 +1164,15 @@ static void build_subroutines(BuildCtx *ctx) + | sd PC, SAVE_PC(sp) + | mv MULTRES, INS + | call_intern vmeta_for, lj_meta_for // (lua_State *L, TValue *base) ++ |.if JIT ++ | decode_OP1 TMP0, MULTRES ++ | li TMP1, BC_JFORI ++ |.endif + | decode_RA8 RA, MULTRES + | decode_RD8 RD, MULTRES ++ |.if JIT ++ | bxeq TMP0, TMP1, =>BC_JFORI ++ |.endif + | j =>BC_FORI + | + |//----------------------------------------------------------------------- +@@ -2142,6 +2167,20 @@ static void build_subroutines(BuildCtx *ctx) + |//----------------------------------------------------------------------- + | + |->vm_record: // Dispatch target for recording phase. ++ |.if JIT ++ | lbu TMP3, GL->hookmask ++ | andi TMP1, TMP3, HOOK_VMEVENT // No recording while in vmevent. ++ | bnez TMP1, >5 ++ | // Decrement the hookcount for consistency, but always do the call. ++ | lw TMP2, GL->hookcount ++ | andi TMP1, TMP3, HOOK_ACTIVE ++ | bnez TMP1, >1 ++ | addiw TMP2, TMP2, -1 ++ | andi TMP1, TMP3, LUA_MASKLINE|LUA_MASKCOUNT ++ | beqz TMP1, >1 ++ | sw TMP2, GL->hookcount ++ | j >1 ++ |.endif + | + |->vm_rethook: // Dispatch target for return hooks. + | lbu TMP3, GL->hookmask +@@ -2187,11 +2226,103 @@ static void build_subroutines(BuildCtx *ctx) + | lw MULTRES, -24(RB) // Restore MULTRES for *M ins. + | j <4 + | ++ |->vm_hotloop: // Hot loop counter underflow. ++ |.if JIT ++ | ld LFUNC:TMP1, FRAME_FUNC(BASE) ++ | addi CARG1, GL, GG_G2J ++ | cleartp LFUNC:TMP1 ++ | sd PC, SAVE_PC(sp) ++ | ld TMP1, LFUNC:TMP1->pc ++ | mv CARG2, PC ++ | sd L, (offsetof(jit_State, L))(CARG1) ++ | lbu TMP1, PC2PROTO(framesize)(TMP1) ++ | sd BASE, L->base ++ | slli TMP1, TMP1, 3 ++ | add TMP1, BASE, TMP1 ++ | sd TMP1, L->top ++ | call_intern vm_hotloop, lj_trace_hot // (jit_State *J, const BCIns *pc) ++ | j <3 ++ |.endif ++ | + | + |->vm_callhook: // Dispatch target for call hooks. + | mv CARG2, PC ++ |.if JIT ++ | j >1 ++ |.endif ++ | ++ |->vm_hotcall: // Hot call counter underflow. ++ |.if JIT ++ | ori CARG2, PC, 1 ++ |1: ++ |.endif ++ | add TMP0, BASE, RC ++ | sd PC, SAVE_PC(sp) ++ | sd BASE, L->base ++ | sub RA, RA, BASE ++ | sd TMP0, L->top ++ | mv CARG1, L ++ | call_intern vm_hotcall, lj_dispatch_call // (lua_State *L, const BCIns *pc) ++ | // Returns ASMFunction. ++ | ld BASE, L->base ++ | ld TMP0, L->top ++ | sd x0, SAVE_PC(sp) // Invalidate for subsequent line hook. ++ | add RA, BASE, RA ++ | sub NARGS8:RC, TMP0, BASE ++ | ld LFUNC:RB, FRAME_FUNC(BASE) ++ | cleartp LFUNC:RB ++ | lw INS, -4(PC) ++ | jr CRET1 + | + |->cont_stitch: // Trace stitching. ++ |.if JIT ++ | // RA = resultptr, RB = meta base ++ | lw INS, -4(PC) ++ | ld TRACE:TMP2, -40(RB) // Save previous trace. ++ | decode_RA8 RC, INS ++ | addi TMP1, MULTRES, -8 ++ | cleartp TRACE:TMP2 ++ | add RC, BASE, RC // Call base. ++ | beqz TMP1, >2 ++ |1: // Move results down. ++ | ld CARG1, 0(RA) ++ | addi TMP1, TMP1, -8 ++ | addi RA, RA, 8 ++ | sd CARG1, 0(RC) ++ | addi RC, RC, 8 ++ | bnez TMP1, <1 ++ |2: ++ | decode_RA8 RA, INS ++ | decode_RB8 RB, INS ++ | add RA, RA, RB ++ | add RA, BASE, RA ++ |3: ++ | bltu RC, RA, >8 // More results wanted? ++ | ++ | lhu TMP3, TRACE:TMP2->traceno ++ | lhu RD, TRACE:TMP2->link ++ | bxeq RD, TMP3, ->cont_nop // Blacklisted. ++ | slliw RD, RD, 3 ++ | bxnez RD, =>BC_JLOOP // Jump to stitched trace. ++ | ++ | // Stitch a new trace to the previous trace. ++ | addi CARG1, GL, GG_G2J ++ | // addi CARG2, CARG1, 1 // We don't care what's on the verge. ++ | addi CARG2, CARG1, 2047 // jit_State too large. ++ | sw TMP3, (offsetof(jit_State, exitno)-2047)(CARG2) ++ | sd L, (offsetof(jit_State, L)-2047)(CARG2) ++ | sd BASE, L->base ++ | mv CARG2, PC ++ | // (jit_State *J, const BCIns *pc) ++ | call_intern cont_stitch, lj_dispatch_stitch ++ | ld BASE, L->base ++ | j ->cont_nop ++ | ++ |8: ++ | sd TISNIL, 0(RC) ++ | addi RC, RC, 8 ++ | j <3 ++ |.endif + | + |->vm_profhook: // Dispatch target for profiler hook. + #if LJ_HASPROFILE +@@ -2206,6 +2337,149 @@ static void build_subroutines(BuildCtx *ctx) + | ld BASE, L->base + | j ->cont_nop + #endif ++ | ++ |//----------------------------------------------------------------------- ++ |//-- Trace exit handler ------------------------------------------------- ++ |//----------------------------------------------------------------------- ++ | ++ |.macro savex_, a, b ++ | fsd f..a, a*8(sp) ++ | fsd f..b, b*8(sp) ++ | sd x..a, 32*8+a*8(sp) ++ | sd x..b, 32*8+b*8(sp) ++ |.endmacro ++ | ++ |->vm_exit_handler: ++ |.if JIT ++ | addi sp, sp, -(32*8+32*8) ++ | savex_ 0, 5 ++ | savex_ 6, 7 ++ | savex_ 8, 9 ++ | savex_ 10, 11 ++ | savex_ 12, 13 ++ | savex_ 14, 15 ++ | savex_ 16, 17 ++ | savex_ 18, 19 ++ | savex_ 20, 21 ++ | savex_ 22, 23 ++ | savex_ 24, 25 ++ | savex_ 26, 27 ++ | savex_ 28, 29 ++ | savex_ 30, 31 ++ | fsd f1, 1*8(sp) ++ | fsd f2, 2*8(sp) ++ | fsd f3, 3*8(sp) ++ | fsd f4, 4*8(sp) ++ | sd x0, 32*8+1*8(sp) // Clear RID_TMP. ++ | ld TMP1, 32*8+32*8(sp) // Load exit pc. ++ | addi TMP2, sp, 32*8+32*8 // Recompute original value of sp. ++ | addxi DISPATCH, GL, GG_G2DISP ++ | sd TMP2, 32*8+2*8(sp) // Store sp in RID_SP ++ | addi CARG1, GL, GG_G2J ++ | li_vmstate EXIT ++ | // addi CARG2, CARG1, 1 // We don't care what's on the verge. ++ | addi CARG2, CARG1, 2047 // jit_State too large. ++ | sub TMP1, TMP1, ra ++ | lw TMP2, 0(ra) // Load trace number. ++ | st_vmstate ++ | srli TMP1, TMP1, 2 ++ | ld L, GL->cur_L ++ | ld BASE, GL->jit_base ++ | srli TMP2, TMP2, 12 ++ | addi TMP1, TMP1, -2 ++ | sd L, (offsetof(jit_State, L)-2047)(CARG2) ++ | sw TMP2, (offsetof(jit_State, parent)-2047)(CARG2) // Store trace number. ++ | sd BASE, L->base ++ | sw TMP1, (offsetof(jit_State, exitno)-2047)(CARG2) // Store exit number. ++ | sd x0, GL->jit_base ++ | mv CARG2, sp ++ | call_intern vm_exit_handler, lj_trace_exit // (jit_State *J, ExitState *ex) ++ | // Returns MULTRES (unscaled) or negated error code. ++ | ld TMP1, L->cframe ++ | ld BASE, L->base ++ | andi sp, TMP1, CFRAME_RAWMASK ++ | ld PC, SAVE_PC(sp) // Get SAVE_PC. ++ | sd L, SAVE_L(sp) // Set SAVE_L (on-trace resume/yield). ++ | j >1 ++ |.endif ++ | ++ |->vm_exit_interp: ++ |.if JIT ++ | // CRET1 = MULTRES or negated error code, BASE, PC and JGL set. ++ | ld L, SAVE_L(sp) ++ | addxi DISPATCH, GL, GG_G2DISP ++ | sd BASE, L->base ++ |1: ++ | ld LFUNC:RB, FRAME_FUNC(BASE) ++ | sltiu TMP0, CRET1, -LUA_ERRERR // Check for error from exit. ++ | beqz TMP0, >9 ++ | lui TMP3, 0x43380 // TOBIT = Hiword of 2^52 + 2^51 (double). ++ | slli MULTRES, CRET1, 3 ++ | cleartp LFUNC:RB ++ | sw MULTRES, TMPD(sp) ++ | li TISNIL, LJ_TNIL ++ | li TISNUM, LJ_TISNUM // Setup type comparison constants. ++ | slli TMP3, TMP3, 32 ++ | ld TMP1, LFUNC:RB->pc ++ | sd x0, GL->jit_base ++ | ld KBASE, PC2PROTO(k)(TMP1) ++ | fmv.d.x TOBIT, TMP3 ++ | // Modified copy of ins_next which handles function header dispatch, too. ++ | lw INS, 0(PC) ++ | addi PC, PC, 4 ++ | addiw CRET1, CRET1, 17 // Static dispatch? ++ | // Assumes TISNIL == ~LJ_VMST_INTERP == -1 ++ | sw TISNIL, GL->vmstate ++ | decode_RD8a RD, INS ++ | beqz CRET1, >5 ++ | decode_OP8 TMP1, INS ++ | add TMP0, DISPATCH, TMP1 ++ | sltiu TMP2, TMP1, BC_FUNCF*8 ++ | ld TMP3, 0(TMP0) ++ | decode_RA8 RA, INS ++ | beqz TMP2, >2 ++ | decode_RD8b RD ++ | jr TMP3 ++ |2: ++ | sltiu TMP2, TMP1, (BC_FUNCC+2)*8 // Fast function? ++ | ld TMP1, FRAME_PC(BASE) ++ | bnez TMP2, >3 ++ | // Check frame below fast function. ++ | andi TMP0, TMP1, FRAME_TYPE ++ | bnez TMP0, >3 // Trace stitching continuation? ++ | // Otherwise set KBASE for Lua function below fast function. ++ | lw TMP2, -4(TMP1) ++ | decode_RA8 TMP0, TMP2 ++ | sub TMP1, BASE, TMP0 ++ | ld LFUNC:TMP2, -32(TMP1) ++ | cleartp LFUNC:TMP2 ++ | ld TMP1, LFUNC:TMP2->pc ++ | ld KBASE, PC2PROTO(k)(TMP1) ++ |3: ++ | addi RC, MULTRES, -8 ++ | add RA, RA, BASE ++ | jr TMP3 ++ | ++ |5: // Dispatch to static entry of original ins replaced by BC_JLOOP. ++ | ld TMP0, GL_J(trace)(GL) ++ | decode_RD8b RD ++ | add TMP0, TMP0, RD ++ | ld TRACE:TMP2, 0(TMP0) ++ | lw INS, TRACE:TMP2->startins ++ | decode_OP8 TMP1, INS ++ | add TMP0, DISPATCH, TMP1 ++ | decode_RD8a RD, INS ++ | ld TMP3, GG_DISP2STATIC(TMP0) ++ | decode_RA8a RA, INS ++ | decode_RD8b RD ++ | decode_RA8b RA ++ | jr TMP3 ++ | ++ |9: // Rethrow error from the right C frame. ++ | negw CARG2, CRET1 ++ | mv CARG1, L ++ | call_intern vm_exit_interp, lj_err_trace // (lua_State *L, int errcode) ++ |.endif + | + |//----------------------------------------------------------------------- + |//-- Math helper functions ---------------------------------------------- +@@ -2232,6 +2506,10 @@ static void build_subroutines(BuildCtx *ctx) + | vm_round rdn + |->vm_ceil: + | vm_round rup ++ |->vm_trunc: ++ |.if JIT ++ | vm_round rtz ++ |.endif + | + | + |//----------------------------------------------------------------------- +@@ -2245,6 +2523,67 @@ static void build_subroutines(BuildCtx *ctx) + | ret + |.endif + | ++ |.define NEXT_TAB, TAB:CARG1 ++ |.define NEXT_IDX, CARG2 ++ |.define NEXT_ASIZE, CARG3 ++ |.define NEXT_NIL, CARG4 ++ |.define NEXT_TMP0, TMP0 ++ |.define NEXT_TMP1, TMP1 ++ |.define NEXT_TMP2, TMP2 ++ |.define NEXT_RES_VK, CRET1 ++ |.define NEXT_RES_IDX, CRET2 ++ |.define NEXT_RES_PTR, sp ++ |.define NEXT_RES_VAL, 0(sp) ++ |.define NEXT_RES_KEY, 8(sp) ++ | ++ |// TValue *lj_vm_next(GCtab *t, uint32_t idx) ++ |// Next idx returned in CRET2. ++ |->vm_next: ++ |.if JIT ++ | lw NEXT_ASIZE, NEXT_TAB->asize ++ | ld NEXT_TMP0, NEXT_TAB->array ++ | li NEXT_NIL, LJ_TNIL ++ |1: // Traverse array part. ++ | bgeu NEXT_IDX, NEXT_ASIZE, >5 ++ | slliw NEXT_TMP1, NEXT_IDX, 3 ++ | add NEXT_TMP1, NEXT_TMP0, NEXT_TMP1 ++ | li TMP3, LJ_TISNUM ++ | ld NEXT_TMP2, 0(NEXT_TMP1) ++ | slli TMP3, TMP3, 47 ++ | or NEXT_TMP1, NEXT_IDX, TMP3 ++ | addiw NEXT_IDX, NEXT_IDX, 1 ++ | beq NEXT_TMP2, NEXT_NIL, <1 ++ | sd NEXT_TMP2, NEXT_RES_VAL ++ | sd NEXT_TMP1, NEXT_RES_KEY ++ | mv NEXT_RES_VK, NEXT_RES_PTR ++ | mv NEXT_RES_IDX, NEXT_IDX ++ | ret ++ | ++ |5: // Traverse hash part. ++ | subw NEXT_RES_IDX, NEXT_IDX, NEXT_ASIZE ++ | lw NEXT_TMP0, NEXT_TAB->hmask ++ | ld NODE:NEXT_RES_VK, NEXT_TAB->node ++ | slliw NEXT_TMP2, NEXT_RES_IDX, 5 ++ | slliw TMP3, NEXT_RES_IDX, 3 ++ | subw TMP3, NEXT_TMP2, TMP3 ++ | add NODE:NEXT_RES_VK, NODE:NEXT_RES_VK, TMP3 ++ |6: ++ | bltu NEXT_TMP0, NEXT_RES_IDX, >8 ++ | ld NEXT_TMP2, NODE:NEXT_RES_VK->val ++ | addiw NEXT_RES_IDX, NEXT_RES_IDX, 1 ++ | bne NEXT_TMP2, NEXT_NIL, >9 ++ | // Skip holes in hash part. ++ | addi NODE:NEXT_RES_VK, NODE:NEXT_RES_VK, sizeof(Node) ++ | j <6 ++ | ++ |8: // End of iteration. Set the key to nil (not the value). ++ | sd NEXT_NIL, NEXT_RES_KEY ++ | mv NEXT_RES_VK, NEXT_RES_PTR ++ |9: ++ | addw NEXT_RES_IDX, NEXT_RES_IDX, NEXT_ASIZE ++ | ret ++ |.endif ++ | + |//----------------------------------------------------------------------- + |//-- FFI helper functions ----------------------------------------------- + |//----------------------------------------------------------------------- +@@ -3735,6 +4074,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + + case BC_ITERN: + | // RA = base*8, (RB = (nresults+1)*8, RC = (nargs+1)*8 (2+1)*8) ++ |.if JIT ++ | hotloop ++ |.endif + |->vm_IITERN: + | add RA, BASE, RA + | ld TAB:RB, -16(RA) +@@ -3819,8 +4161,26 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | li TMP1, BC_ITERC + | sb TMP3, -4+OFS_OP(PC) + | add PC, TMP0, TMP2 ++ |.if JIT ++ | lb TMP0, OFS_OP(PC) ++ | li TMP3, BC_ITERN ++ | lhu TMP2, OFS_RD(PC) ++ | bne TMP0, TMP3, >6 ++ |.endif + | sb TMP1, OFS_OP(PC) + | j <1 ++ |.if JIT ++ |6: // Unpatch JLOOP. ++ | ld TMP0, GL_J(trace)(GL) // Assumes J.trace in-reach relative to GL. ++ | slliw TMP2, TMP2, 3 ++ | add TMP0, TMP0, TMP2 ++ | ld TRACE:TMP2, 0(TMP0) ++ | lw TMP0, TRACE:TMP2->startins ++ | andi TMP0, TMP0, -256 ++ | or TMP0, TMP0, TMP1 ++ | sw TMP0, 0(PC) ++ | j <1 ++ |.endif + break; + + case BC_VARG: +@@ -3986,6 +4346,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + /* -- Loops and branches ------------------------------------------------ */ + + case BC_FORL: ++ |.if JIT ++ | hotloop ++ |.endif + | // Fall through. Assumes BC_IFORL follows. + break; + +@@ -4106,6 +4469,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + break; + + case BC_ITERL: ++ |.if JIT ++ | hotloop ++ |.endif + | // Fall through. Assumes BC_IITERL follows. + break; + +@@ -4130,6 +4496,12 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + break; + + case BC_LOOP: ++ | // RA = base*8, RD = target (loop extent) ++ | // Note: RA/RD is only used by trace recorder to determine scope/extent ++ | // This opcode does NOT jump, it's only purpose is to detect a hot loop. ++ |.if JIT ++ | hotloop ++ |.endif + | // Fall through. Assumes BC_ILOOP follows. + break; + +@@ -4139,6 +4511,18 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + break; + + case BC_JLOOP: ++ |.if JIT ++ | // RA = base*8 (ignored), RD = traceno*8 ++ | ld TMP0, GL_J(trace)(GL) // Assumes J.trace in-reach relative to GL. ++ | add TMP0, TMP0, RD ++ | // Traces on RISC-V don't store the trace number, so use 0. ++ | sd x0, GL->vmstate ++ | ld TRACE:TMP1, 0(TMP0) ++ | sd BASE, GL->jit_base // store Current JIT code L->base ++ | ld TMP1, TRACE:TMP1->mcode ++ | sd L, GL->tmpbuf.L ++ | jr TMP1 ++ |.endif + break; + + case BC_JMP: +@@ -4150,6 +4534,9 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + /* -- Function headers -------------------------------------------------- */ + + case BC_FUNCF: ++ |.if JIT ++ | hotcall ++ |.endif + case BC_FUNCV: /* NYI: compiled vararg functions. */ + | // Fall through. Assumes BC_IFUNCF/BC_IFUNCV follow. + break; + +From 6a2c877aa8460069806c311bcf4cae055dc7fce3 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:42:05 +0800 +Subject: [PATCH 15/22] riscv(interp): add DWARF info + +--- + src/vm_riscv64.dasc | 132 +++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 131 insertions(+), 1 deletion(-) + +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index ee45afef99..1fee1f7ed4 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -4680,5 +4680,135 @@ static int build_backend(BuildCtx *ctx) + /* Emit pseudo frame-info for all assembler functions. */ + static void emit_asm_debug(BuildCtx *ctx) + { +- ++ int fcofs = (int)((uint8_t *)ctx->glob[GLOB_vm_ffi_call] - ctx->code); ++ int i; ++ switch (ctx->mode) { ++ case BUILD_elfasm: ++ fprintf(ctx->fp, "\t.section .debug_frame,\"\",@progbits\n"); ++ fprintf(ctx->fp, ++ ".Lframe0:\n" ++ "\t.4byte .LECIE0-.LSCIE0\n" ++ ".LSCIE0:\n" ++ "\t.4byte 0xffffffff\n" ++ "\t.byte 0x1\n" ++ "\t.string \"\"\n" ++ "\t.uleb128 0x1\n" ++ "\t.sleb128 -4\n" ++ "\t.byte 1\n" /* Return address is in ra. */ ++ "\t.byte 0xc\n\t.uleb128 2\n\t.uleb128 0\n" /* def_cfa sp 0 */ ++ "\t.align 3\n" ++ ".LECIE0:\n\n"); ++ fprintf(ctx->fp, ++ ".LSFDE0:\n" ++ "\t.4byte .LEFDE0-.LASFDE0\n" ++ ".LASFDE0:\n" ++ "\t.4byte .Lframe0\n" ++ "\t.8byte .Lbegin\n" ++ "\t.8byte %d\n" ++ "\t.byte 0xe\n\t.uleb128 %d\n" ++ "\t.byte 0x81\n\t.uleb128 2*6\n" /* offset ra */, ++ fcofs, CFRAME_SIZE); ++ for (i = 27; i >= 18; i--) /* offset x27-x18 (s11-s2) */ ++ fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 2*(27-i+7)); ++ fprintf(ctx->fp, ++ "\t.byte 0x89\n\t.uleb128 2*17\n" /* offset x9 (s1) */ ++ "\t.byte 0x88\n\t.uleb128 2*18\n" /* offset x8 (s0/fp) */); ++ for (i = 27; i >= 18; i--) /* offset f31-f18 */ ++ fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+32+i, 2*(27-i+19)); ++ fprintf(ctx->fp, ++ "\t.byte 0x89+32\n\t.uleb128 2*29\n" /* offset f9 (fs1) */ ++ "\t.byte 0x88+32\n\t.uleb128 2*30\n" /* offset f8 (fs0) */ ++ "\t.align 3\n" ++ ".LEFDE0:\n\n"); ++#if LJ_HASFFI ++ fprintf(ctx->fp, ++ ".LSFDE1:\n" ++ "\t.4byte .LEFDE1-.LASFDE1\n" ++ ".LASFDE1:\n" ++ "\t.4byte .Lframe0\n" ++ "\t.4byte lj_vm_ffi_call\n" ++ "\t.4byte %d\n" ++ "\t.byte 0x81\n\t.uleb128 2*1\n" /* offset ra */ ++ "\t.byte 0x92\n\t.uleb128 2*2\n" /* offset x18 */ ++ "\t.byte 0xd\n\t.uleb128 0x12\n" ++ "\t.align 3\n" ++ ".LEFDE1:\n\n", (int)ctx->codesz - fcofs); ++#endif ++#if !LJ_NO_UNWIND ++ fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n"); ++ fprintf(ctx->fp, ++ ".Lframe1:\n" ++ "\t.4byte .LECIE1-.LSCIE1\n" ++ ".LSCIE1:\n" ++ "\t.4byte 0\n" ++ "\t.byte 0x1\n" ++ "\t.string \"zPR\"\n" ++ "\t.uleb128 0x1\n" ++ "\t.sleb128 -4\n" ++ "\t.byte 1\n" /* Return address is in ra. */ ++ "\t.uleb128 6\n" /* augmentation length */ ++ "\t.byte 0x1b\n" ++ "\t.4byte lj_err_unwind_dwarf-.\n" ++ "\t.byte 0x1b\n" ++ "\t.byte 0xc\n\t.uleb128 2\n\t.uleb128 0\n" /* def_cfa sp 0 */ ++ "\t.align 2\n" ++ ".LECIE1:\n\n"); ++ fprintf(ctx->fp, ++ ".LSFDE2:\n" ++ "\t.4byte .LEFDE2-.LASFDE2\n" ++ ".LASFDE2:\n" ++ "\t.4byte .LASFDE2-.Lframe1\n" ++ "\t.4byte .Lbegin-.\n" ++ "\t.4byte %d\n" ++ "\t.uleb128 0\n" /* augmentation length */ ++ "\t.byte 0xe\n\t.uleb128 %d\n" ++ "\t.byte 0x81\n\t.uleb128 2*6\n", /* offset ra */ ++ fcofs, CFRAME_SIZE); ++ for (i = 27; i >= 18; i--) /* offset x27-x18 (s11-s2) */ ++ fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+i, 2*(27-i+7)); ++ fprintf(ctx->fp, ++ "\t.byte 0x89\n\t.uleb128 2*17\n" /* offset x9 (s1) */ ++ "\t.byte 0x88\n\t.uleb128 2*18\n" /* offset x8 (s0/fp) */); ++ for (i = 27; i >= 18; i--) /* offset f31-f18 */ ++ fprintf(ctx->fp, "\t.byte %d\n\t.uleb128 %d\n", 0x80+32+i, 2*(27-i+19)); ++ fprintf(ctx->fp, ++ "\t.byte 0x89+32\n\t.uleb128 2*29\n" /* offset f9 (fs1) */ ++ "\t.byte 0x88+32\n\t.uleb128 2*30\n" /* offset f8 (fs0) */ ++ "\t.align 2\n" ++ ".LEFDE2:\n\n"); ++#if LJ_HASFFI ++ fprintf(ctx->fp, ++ ".Lframe2:\n" ++ "\t.4byte .LECIE2-.LSCIE2\n" ++ ".LSCIE2:\n" ++ "\t.4byte 0\n" ++ "\t.byte 0x1\n" ++ "\t.string \"zR\"\n" ++ "\t.uleb128 0x1\n" ++ "\t.sleb128 -4\n" ++ "\t.byte 1\n" /* Return address is in ra. */ ++ "\t.uleb128 1\n" /* augmentation length */ ++ "\t.byte 0x1b\n" ++ "\t.byte 0xc\n\t.uleb128 2\n\t.uleb128 0\n" /* def_cfa sp 0 */ ++ "\t.align 2\n" ++ ".LECIE2:\n\n"); ++ fprintf(ctx->fp, ++ ".LSFDE3:\n" ++ "\t.4byte .LEFDE3-.LASFDE3\n" ++ ".LASFDE3:\n" ++ "\t.4byte .LASFDE3- .Lframe2\n" ++ "\t.4byte lj_vm_ffi_call-.\n" ++ "\t.4byte %d\n" ++ "\t.uleb128 0\n" /* augmentation length */ ++ "\t.byte 0x81\n\t.uleb128 2*1\n" /* offset ra */ ++ "\t.byte 0x92\n\t.uleb128 2*2\n" /* offset x18 */ ++ "\t.byte 0xd\n\t.uleb128 0x12\n" ++ "\t.align 2\n" ++ ".LEFDE3:\n\n", (int)ctx->codesz - fcofs); ++#endif ++#endif ++ break; ++ default: ++ break; ++ } + } + +From dae3b8fc1e0d4929b6c4b253df8d43b8f6f0c6a1 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:42:34 +0800 +Subject: [PATCH 16/22] riscv(jit): add GDBJIT support + +--- + src/lj_gdbjit.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/lj_gdbjit.c b/src/lj_gdbjit.c +index 9e68932a8c..7d677c7c74 100644 +--- a/src/lj_gdbjit.c ++++ b/src/lj_gdbjit.c +@@ -306,6 +306,9 @@ enum { + #elif LJ_TARGET_MIPS + DW_REG_SP = 29, + DW_REG_RA = 31, ++#elif LJ_TARGET_RISCV64 ++ DW_REG_SP = 2, ++ DW_REG_RA = 1, + #else + #error "Unsupported target architecture" + #endif +@@ -383,6 +386,8 @@ static const ELFheader elfhdr_template = { + .machine = 20, + #elif LJ_TARGET_MIPS + .machine = 8, ++#elif LJ_TARGET_RISCV64 ++ .machine = 243, + #else + #error "Unsupported target architecture" + #endif +@@ -591,6 +596,16 @@ static void LJ_FASTCALL gdbjit_ehframe(GDBJITctx *ctx) + for (i = 23; i >= 16; i--) { DB(DW_CFA_offset|i); DUV(26-i); } + for (i = 30; i >= 20; i -= 2) { DB(DW_CFA_offset|32|i); DUV(42-i); } + } ++#elif LJ_TARGET_RISCV64 ++ { ++ int i; ++ for (i = 27; i >= 18; i--) { DB(DW_CFA_offset|i); DUV(27-i+7); } ++ DB(DW_CFA_offset|9); DUV(17); ++ DB(DW_CFA_offset|8); DUV(18); ++ for (i = 27; i >= 18; i--) { DB(DW_CFA_offset|32|i); DUV(27-i+19); } ++ DB(DW_CFA_offset|32|9); DUV(29); ++ DB(DW_CFA_offset|32|8); DUV(30); ++ } + #else + #error "Unsupported target architecture" + #endif + +From e2a45eb4bc14787b374996a485527e9353d63e67 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:43:46 +0800 +Subject: [PATCH 17/22] riscv(support,linux): add Linux specfic icache sync + codepath + +--- + src/lj_mcode.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/src/lj_mcode.c b/src/lj_mcode.c +index 864da7fb4c..3b88cfcfea 100644 +--- a/src/lj_mcode.c ++++ b/src/lj_mcode.c +@@ -38,6 +38,12 @@ + void sys_icache_invalidate(void *start, size_t len); + #endif + ++#if LJ_TARGET_RISCV64 && LJ_TARGET_LINUX ++#include ++#include ++#include ++#endif ++ + /* Synchronize data/instruction cache. */ + void lj_mcode_sync(void *start, void *end) + { +@@ -52,6 +58,17 @@ void lj_mcode_sync(void *start, void *end) + sys_icache_invalidate(start, (char *)end-(char *)start); + #elif LJ_TARGET_PPC + lj_vm_cachesync(start, end); ++#elif LJ_TARGET_RISCV64 && LJ_TARGET_LINUX ++#if (defined(__GNUC__) || defined(__clang__)) ++ __asm__ volatile("fence rw, rw"); ++#else ++ lj_vm_fence_rw_rw(); ++#endif ++#ifdef __GLIBC__ ++ __riscv_flush_icache(start, end, 0); ++#else ++ syscall(__NR_riscv_flush_icache, start, end, 0UL); ++#endif + #elif defined(__GNUC__) || defined(__clang__) + __clear_cache(start, end); + #else + +From 751c8b6396a2f0e7557052edb7a5788ff78004e2 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:47:58 +0800 +Subject: [PATCH 18/22] riscv(support,linux): make mremap() non-moving due to + VA space woes + +--- + src/lj_alloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lj_alloc.c b/src/lj_alloc.c +index cb704f7b3f..9039d80537 100644 +--- a/src/lj_alloc.c ++++ b/src/lj_alloc.c +@@ -365,7 +365,7 @@ static void *CALL_MREMAP_(void *ptr, size_t osz, size_t nsz, int flags) + #define CALL_MREMAP(addr, osz, nsz, mv) CALL_MREMAP_((addr), (osz), (nsz), (mv)) + #define CALL_MREMAP_NOMOVE 0 + #define CALL_MREMAP_MAYMOVE 1 +-#if LJ_64 && (!LJ_GC64 || LJ_TARGET_ARM64) ++#if LJ_64 && (!LJ_GC64 || LJ_TARGET_ARM64 || LJ_TARGET_RISCV64) + #define CALL_MREMAP_MV CALL_MREMAP_NOMOVE + #else + #define CALL_MREMAP_MV CALL_MREMAP_MAYMOVE + +From 55f24bab73c59dd99644e27da90ca5e591888b17 Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:48:43 +0800 +Subject: [PATCH 19/22] riscv(misc): add disassmbler support + +--- + src/jit/dis_riscv.lua | 979 ++++++++++++++++++++++++++++++++++++++++ + src/jit/dis_riscv64.lua | 16 + + 2 files changed, 995 insertions(+) + create mode 100644 src/jit/dis_riscv.lua + create mode 100644 src/jit/dis_riscv64.lua + +diff --git a/src/jit/dis_riscv.lua b/src/jit/dis_riscv.lua +new file mode 100644 +index 0000000000..8de563a724 +--- /dev/null ++++ b/src/jit/dis_riscv.lua +@@ -0,0 +1,979 @@ ++------------------------------------------------------------------------------ ++-- LuaJIT RISC-V disassembler module. ++-- ++-- Copyright (C) 2005-2025 Mike Pall. All rights reserved. ++-- Released under the MIT license. See Copyright Notice in luajit.h ++-- ++-- Contributed by Milos Poletanovic from Syrmia.com. ++-- Contributed by gns from PLCT Lab, ISCAS. ++------------------------------------------------------------------------------ ++-- This is a helper module used by the LuaJIT machine code dumper module. ++-- ++-- It disassembles most standard RISC-V instructions. ++-- Mode is little-endian ++------------------------------------------------------------------------------ ++ ++local type = type ++local byte, format = string.byte, string.format ++local match, gmatch = string.match, string.gmatch ++local concat = table.concat ++local bit = require("bit") ++local band, bor, tohex = bit.band, bit.bor, bit.tohex ++local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift ++local jit = require("jit") ++ ++local jstat = { jit.status() } ++local function is_opt_enabled(opt) ++ for _, v in ipairs(jstat) do ++ if v == opt then ++ return true ++ end ++ end ++ return false ++end ++local xthead = is_opt_enabled("XThead") ++ ++------------------------------------------------------------------------------ ++-- Opcode maps ++------------------------------------------------------------------------------ ++ ++--RVC32 extension ++ ++local map_quad0 = { ++ shift = 13, mask = 7, ++ [0] = "c.addi4spnZW", "c.fldNMh", "c.lwZMn", "c.flwNMn", ++ false, "c.fsdNMh", "c.swZMn", "c.fswNMn" ++} ++ ++local map_sub2quad1 = { ++ shift = 5, mask = 3, ++ [0] = "c.subMZ", "c.xorMZ", "c.orMZ", "c.andMZ" ++} ++ ++local map_sub1quad1 = { ++ shift = 10, mask = 3, ++ [0] = "c.srliM1", "c.sraiM1", "c.andiMx", map_sub2quad1 ++} ++ ++local map_quad1 = { ++ shift = 13, mask = 7, ++ [0] = { ++ shift = 7, mask = 31, ++ [0] = "c.nop", _ = "c.addiDx" ++ }, ++ [1] = "c.jalT", [2] = "c.liDx", ++ [3] = { ++ shift = 7, mask = 31, ++ [0] = "c.luiDK", [1] = "c.luiDK", [2] = "c.addi16spX", ++ _ = "c.luiDK" ++ }, ++ [4] = map_sub1quad1, [5] = "c.jT", [6] = "c.beqzMq", [7] = "c.bnezMq" ++} ++ ++local map_sub1quad2 = { ++ shift = 12, mask = 1, ++ [0] = { ++ shift = 2, mask = 31, ++ [0] = "c.jrD", _ = "c.mvDE" ++ }, ++ [1] = { ++ shift = 2, mask = 31, ++ [0] = { ++ shift = 7, mask = 31, ++ [0] = "c.ebreak", _ = "c.jalrD" ++ }, ++ _ = "c.addDE" ++ } ++} ++ ++local map_quad2 = { ++ shift = 13, mask = 7, ++ [0] = "c.slliD1", [1] = "c.fldspFQ",[2] = "c.lwspDY", [3] = "c.flwspFY", ++ [4] = map_sub1quad2, [5] = "c.fsdspVt", [6] = "c.swspEu", [7] = "c.fswspVu" ++} ++ ++local map_compr = { ++ [0] = map_quad0, map_quad1, map_quad2 ++} ++ ++--RV32M ++local map_mext = { ++ shift = 12, mask = 7, ++ [0] = "mulDRr", "mulhDRr", "mulhsuDRr", "mulhuDRr", ++ "divDRr", "divuDRr", "remDRr", "remuDRr" ++} ++ ++--RV64M ++local map_mext64 = { ++ shift = 12, mask = 7, ++ [0] = "mulwDRr", [4] = "divwDRr", [5] = "divuwDRr", [6] = "remwDRr", ++ [7] = "remuwDRr" ++} ++ ++--RV32F, RV64F, RV32D, RV64D ++local map_fload = { ++ shift = 12, mask = 7, ++ [2] = "flwFL", [3] = "fldFL" ++} ++ ++local map_fstore = { ++ shift = 12, mask = 7, ++ [2] = "fswSg", [3] = "fsdSg" ++} ++ ++local map_fmadd = { ++ shift = 25, mask = 3, ++ [0] = "fmadd.sFGgHo", "fmadd.dFGgHo" ++} ++ ++local map_fmsub = { ++ shift = 25, mask = 3, ++ [0] = "fmsub.sFGgHo", "fmsub.dFGgHo" ++} ++ ++local map_fnmsub = { ++ shift = 25, mask = 3, ++ [0] = "fnmsub.sFGgHo", "fnmsub.dFGgHo" ++} ++ ++local map_fnmadd = { ++ shift = 25, mask = 3, ++ [0] = "fnmadd.sFGgHo", "fnmadd.dFGgHo" ++} ++ ++local map_fsgnjs = { ++ shift = 12, mask = 7, ++ [0] = "fsgnj.s|fmv.sFGg6", "fsgnjn.s|fneg.sFGg6", "fsgnjx.s|fabs.sFGg6" ++} ++ ++local map_fsgnjd = { ++ shift = 12, mask = 7, ++ [0] = "fsgnj.d|fmv.dFGg6", "fsgnjn.d|fneg.dFGg6", "fsgnjx.d|fabs.dFGg6" ++} ++ ++local map_fms = { ++ shift = 12, mask = 7, ++ [0] = "fmin.sFGg", "fmax.sFGg", "fminm.sFGg", "fmaxm.sFGg" ++} ++ ++local map_fmd = { ++ shift = 12, mask = 7, ++ [0] = "fmin.dFGg", "fmax.dFGg", "fminm.dFGg", "fmaxm.dFGg" ++} ++ ++local map_fcomps = { ++ shift = 12, mask = 7, ++ [0] = "fle.sDGg", "flt.sDGg", "feq.sDGg", ++ [4] = "fleq.sDGg", "fltq.sDGg" ++} ++ ++local map_fcompd = { ++ shift = 12, mask = 7, ++ [0] = "fle.dDGg", "flt.dDGg", "feq.dDGg", ++ [4] = "fleq.dDGg", "fltq.dDGg" ++} ++ ++local map_fcvtwls = { ++ shift = 20, mask = 31, ++ [0] = "fcvt.w.sDGo", "fcvt.wu.sDGo", "fcvt.l.sDGo", "fcvt.lu.sDGo" ++} ++ ++local map_fcvtwld = { ++ shift = 20, mask = 31, ++ [0] = "fcvt.w.dDGo", "fcvt.wu.dDGo", "fcvt.l.dDGo", "fcvt.lu.dDGo", ++ [8] = { ++ shift = 12, mask = 7, ++ [1] = "fcvtmodw.dDG" ++ } ++} ++ ++local map_fcvts = { ++ shift = 20, mask = 31, ++ [0] = "fcvt.s.wFRo", "fcvt.s.wuFRo", "fcvt.s.lFRo", "fcvt.s.luFRo" ++} ++ ++local map_fcvtd = { ++ shift = 20, mask = 31, ++ [0] = "fcvt.d.wFRo", "fcvt.d.wuFRo", "fcvt.d.lFRo", "fcvt.d.luFRo" ++} ++ ++local map_fcvtsd = { ++ shift = 20, mask = 31, ++ [0] = "fcvt.s.dFGo", ++ [4] = "fround.sFGo", [5] = "froundnx.sFGo" ++} ++ ++local map_fcvtds = { ++ shift = 20, mask = 31, ++ [0] = "fcvt.d.sFGo", ++ [4] = "fround.dFGo", [5] = "froundnx.dFGo" ++} ++ ++local map_fmvwx = { ++ shift = 20, mask = 31, ++ [0] = "fmv.w.xFR", [1] = "fli.sFy" ++} ++ ++local map_fmvdx = { ++ shift = 20, mask = 31, ++ [0] = "fmv.d.xFR", [1] = "fli.dFy" ++} ++ ++local map_fext = { ++ shift = 25, mask = 127, ++ [0] = "fadd.sFGgo", [1] = "fadd.dFGgo", [4] = "fsub.sFGgo", [5] = "fsub.dFGgo", ++ [8] = "fmul.sFGgo", [9] = "fmul.dFGgo", [12] = "fdiv.sFGgo", [13] = "fdiv.dFGgo", ++ [16] = map_fsgnjs, [17] = map_fsgnjd, [20] = map_fms, [21] = map_fmd, ++ [32] = map_fcvtsd, [33] = map_fcvtds,[44] = "fsqrt.sFGo", [45] = "fsqrt.dFGo", ++ [80] = map_fcomps, [81] = map_fcompd, [96] = map_fcvtwls, [97] = map_fcvtwld, ++ [104] = map_fcvts, [105] = map_fcvtd, ++ [112] = { ++ shift = 12, mask = 7, ++ [0] = "fmv.x.wDG", "fclass.sDG" ++ }, ++ [113] = { ++ shift = 12, mask = 7, ++ [0] = "fmv.x.dDG", "fclass.dDG" ++ }, ++ [120] = map_fmvwx, [121] = map_fmvdx ++} ++ ++--RV32A, RV64A ++local map_aext = { ++ shift = 27, mask = 31, ++ [0] = { ++ shift = 12, mask = 7, ++ [2] = "amoadd.wDrO", [3] = "amoadd.dDrO" ++ }, ++ { ++ shift = 12, mask = 7, ++ [2] = "amoswap.wDrO", [3] = "amoswap.dDrO" ++ }, ++ { ++ shift = 12, mask = 7, ++ [2] = "lr.wDO", [3] = "lr.dDO" ++ }, ++ { ++ shift = 12, mask = 7, ++ [2] = "sc.wDrO", [3] = "sc.dDrO" ++ }, ++ { ++ shift = 12, mask = 7, ++ [2] = "amoxor.wDrO", [3] = "amoxor.dDrO" ++ }, ++ [8] = { ++ shift = 12, mask = 7, ++ [2] = "amoor.wDrO", [3] = "amoor.dDrO" ++ }, ++ [12] = { ++ shift = 12, mask = 7, ++ [2] = "amoand.wDrO", [3] = "amoand.dDrO" ++ }, ++ [16] = { ++ shift = 12, mask = 7, ++ [2] = "amomin.wDrO", [3] = "amomin.dDrO" ++ }, ++ [20] = { ++ shift = 12, mask = 7, ++ [2] = "amomax.wDrO", [3] = "amomax.dDrO" ++ }, ++ [24] = { ++ shift = 12, mask = 7, ++ [2] = "amominu.wDrO", [3] = "amominu.dDrO" ++ }, ++ [28] = { ++ shift = 12, mask = 7, ++ [2] = "amomaxu.wDrO", [3] = "amomaxu.dDrO" ++ }, ++} ++ ++-- RV32I, RV64I ++local map_load = { ++ shift = 12, mask = 7, ++ [0] = "lbDL", "lhDL", "lwDL", "ldDL", ++ "lbuDL", "lhuDL", "lwuDL" ++} ++ ++local map_opimm = { ++ shift = 12, mask = 7, ++ [0] = { ++ shift = 7, mask = 0x1ffffff, ++ [0] = "nop", _ = "addi|li|mvDR0I2" ++ }, ++ { ++ shift = 25, mask = 127, ++ [48] = { ++ shift = 20, mask = 31, ++ [4] = "sext.bDR", [5] = "sext.hDR" ++ }, ++ _ = "slliDRi", ++ }, "sltiDRI", "sltiu|seqzDRI5", ++ "xori|notDRI4", ++ { ++ shift = 26, mask = 63, ++ [0] = "srliDRi", [16] = "sraiDRi", [24] = "roriDRi", ++ [26] = { ++ shift = 20, mask = 63, ++ [56] = "rev8DR" ++ } ++ }, ++ "oriDRI", "andiDRI" ++} ++ ++local map_branch = { ++ shift = 12, mask = 7, ++ [0] = "beq|beqzRr0B", "bne|bnezRr0B" , false, false, ++ "blt|bgtz|bltzR0r2B", "bge|blez|bgezR0r2B", "bltuRrB", "bgeuRrB" ++} ++ ++local map_store = { ++ shift = 12, mask = 7, ++ [0] = "sbSr", "shSr", "swSr", "sdSr" ++} ++ ++local map_op = { ++ shift = 25, mask = 127, ++ [0] = { ++ shift = 12, mask = 7, ++ [0] = "addDRr", "sllDRr", "slt|sgtz|sltzDR0r2", "sltu|snezDR0r", ++ "xorDRr", "srlDRr", "orDRr", "andDRr" ++ }, ++ [1] = map_mext, ++ [4] = { ++ ++ }, ++ [5] = { -- Zbb ++ shift = 12, mask = 7, ++ [4] = "minDRr", [5] = "minuDRr", [6] = "maxDRr", [7] = "maxuDRr" ++ }, ++ [7] = { -- Zicond ++ shift = 12, mask = 7, ++ [5] = "czero.eqzDRr", [7] = "czero.nezDRr" ++ }, ++ [16] = { -- Zba ++ shift = 12, mask = 7, ++ [2] = "sh1addDRr", [4] = "sh2addDRr", [6] = "sh3addDRr" ++ }, ++ [32] = { -- Zbb ++ shift = 12, mask = 7, ++ [0] = "sub|negDR0r", [4] = "xnorDRr", [5] = "sraDRr", [6] = "ornDRr", [7] = "andnDRr" ++ }, ++ [48] = { -- Zbb ++ shift = 12, mask = 7, ++ [1] = "rolDRr", [5] = "rorDRr" ++ } ++} ++ ++--- 64I ++local map_opimm32 = { ++ shift = 12, mask = 7, ++ [0] = "addiw|sext.wDRI0", "slliwDRi", ++ [2] = { -- Zba ++ shift = 25, mask = 127, ++ [1] = "slli.uwDRi" ++ }, ++ [5] = { -- 64I ++ shift = 25, mask = 127, ++ [0] = "srliwDRi", [32] = "sraiwDRi", [48] = "roriwDRi" ++ }, ++ [48] = { -- Zbb ++ shift = 25, mask = 127, ++ [5] = "roriwDRi" ++ } ++} ++ ++local map_op32 = { ++ shift = 25, mask = 127, ++ [0] = { -- 64I ++ shift = 12, mask = 7, ++ [0] = "addwDRr", [1] = "sllwDRr", [5] = "srlwDRr" ++ }, ++ [1] = map_mext64, ++ [4] = { -- Zba & Zbb ++ shift = 12, mask = 7, ++ [0] = "add.uw|zext.w|DRr0", [4] = "zext.hDRr" ++ }, ++ [16] = { -- Zba ++ shift = 12, mask = 7, ++ [2] = "sh1add.uw", [4] = "sh2add.uw", [6] = "sh3add.uw" ++ }, ++ [32] = { -- 64I ++ shift = 12, mask = 7, ++ [0] = "subw|negwDR0r", [5] = "srawDRr" ++ }, ++ [48] = { -- Zbb ++ shift = 12, mask = 7, ++ [1] = "rolwDRr", [5] = "rorwDRr" ++ } ++} ++ ++local map_ecabre = { ++ shift = 12, mask = 7, ++ [0] = { ++ shift = 20, mask = 4095, ++ [0] = "ecall", "ebreak" ++ } ++} ++ ++local map_fence = { ++ shift = 12, mask = 1, ++ [0] = "fence", --"fence.i" ZIFENCEI EXTENSION ++} ++ ++local map_jalr = { ++ shift = 7, mask = 0x1ffffff, ++ _ = "jalr|jrDRI7", [256] = "ret" ++} ++ ++local map_xthead_custom0 = { ++ shift = 12, mask = 7, ++ [1] = { -- Arithmetic ++ shift = 27, mask = 31, ++ [0] = "th.addslDRrv", ++ [2] = { ++ shift = 26, mask = 63, ++ [4] = "th.srriDRi", ++ [5] = { ++ shift = 25, mask = 127, ++ [10] = "th.srriwDRi" ++ } ++ }, ++ [4] = { -- XTheadMac ++ shift = 25, mask = 3, ++ [0] = "th.mulaDRr", "th.mulsDRr", "th.mulawDRr", "th.mulswDRr" ++ }, ++ [5] = { -- XTheadMac ++ shift = 25, mask = 3, ++ [0] = "th.mulahDRr", "th.mulshDRr" ++ }, ++ [8] = { -- XTheadCondMov ++ shift = 25, mask = 3, ++ [0] = "th.mveqzDRr", "th.mvnezDRr" ++ }, ++ [16] = { -- XTheadBb ++ shift = 20, mask = 31, ++ [0] = { ++ shift = 25, mask = 3, ++ [0] = "th.tstnbzDRi", "th.revDR", "th.ff0DR", "th.ff1DR" ++ } ++ }, ++ [17] = { -- XTheadBb ++ shift = 26, mask = 1, ++ [0] = "th.tstDRi" ++ }, ++ [18] = { -- XTheadBb ++ shift = 20, mask = 31, ++ [0] = { ++ shift = 25, mask = 3, ++ [0] = "th.revwDR" ++ } ++ } ++ }, ++ [2] = "th.extDRji", [3] = "th.extuDRji", ++ { -- MemLoad ++ shift = 29, mask = 7, ++ [7] = { -- XTheadMemPair ++ shift = 25, mask = 3, ++ [0] = "th.lwdDrP", [2] = "th.lwudDrP", "th.lddDrP" ++ } ++ }, ++ { -- MemStore ++ shift = 29, mask = 7, ++ [7] = { -- XTheadMemPair ++ shift = 25, mask = 3, ++ [0] = "th.swdDrP", [3] = "th.sddDrP" ++ } ++ } ++} ++ ++local map_custom0 = xthead and map_xthead_custom0 or nil ++ ++local map_pri = { ++ [3] = map_load, [7] = map_fload, [11] = map_custom0, [15] = map_fence, [19] = map_opimm, ++ [23] = "auipcDA", [27] = map_opimm32, ++ [35] = map_store, [39] = map_fstore, [47] = map_aext, [51] = map_op, ++ [55] = "luiDU", [59] = map_op32, [67] = map_fmadd, [71] = map_fmsub, ++ [75] = map_fnmsub, [99] = map_branch, [79] = map_fnmadd, [83] = map_fext, ++ [103] = map_jalr, [111] = "jal|j|D0J", [115] = map_ecabre ++} ++ ++------------------------------------------------------------------------------ ++ ++local map_gpr = { ++ [0] = "zero", "ra", "sp", "gp", "tp", "x5", "x6", "x7", ++ "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", ++ "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", ++ "x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31", ++} ++ ++local map_fgpr = { ++ [0] = "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", ++ "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", ++ "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", ++ "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", ++} ++ ++local map_rm = { ++ [0] = "rne", "rtz", "rdn", "rup", "rmm", [7] = "dyn" ++} ++ ++local map_fli = { ++ [0] = "-1.0", ++ "min", ++ "0x1p-16", "0x1p-15", "0x1p-8", "0x1p-7", ++ "0.0625", "0.125", ++ "0.25", "0.3125", "0.375", "0.4375", ++ "0.5", "0.625", "0.75", "0.875", ++ "1.0", "1.25", "1.5", "1.75", ++ "2.0", "2.5", "3.0", ++ "4.0", "8.0", "16.0", "128.0", "256.0", ++ "32768.0", "65536.0", "inf", "nan" ++} ++ ++------------------------------------------------------------------------------ ++ ++-- Output a nicely formatted line with an opcode and operands. ++local function putop(ctx, text, operands) ++ local pos = ctx.pos ++ local extra = "" ++ if ctx.rel then ++ local sym = ctx.symtab[ctx.rel] ++ if sym then extra = "\t->"..sym end ++ end ++ if ctx.hexdump > 0 then ++ ctx.out:write((format("%08x %s %-7s %s%s\n", ++ ctx.addr+pos, tohex(ctx.op), text, concat(operands, ","), extra))) ++ else ++ ctx.out(format("%08x %-7s %s%s\n", ++ ctx.addr+pos, text, concat(operands, ", "), extra)) ++ end ++ local pos = ctx.pos ++ local first_byte = byte(ctx.code, ctx.pos+1) ++ --Examine if the next instruction is 16-bits or 32-bits ++ if(band(first_byte, 3) < 3) then ++ ctx.pos = pos + 2 ++ else ++ ctx.pos = pos + 4 ++ end ++end ++ ++-- Fallback for unknown opcodes. ++local function unknown(ctx) ++ return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) ++end ++ ++local function get_le(ctx) ++ local pos = ctx.pos ++ --Examine if the next instruction is 16-bits or 32-bits ++ local first_byte = byte(ctx.code, pos+1) ++ if(band(first_byte, 3) < 3) then --checking first two bits of opcode ++ local b0, b1 = byte(ctx.code, pos+1, pos+2) ++ return bor(lshift(b1, 8), b0) ++ else ++ local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) ++ return bor(lshift(b3, 24), lshift(b2, 16), lshift(b1, 8), b0) ++ end ++end ++ ++local function parse_W(opcode) ++ local part1 = band(rshift(opcode, 7), 15) --9:6 ++ local part2 = band(rshift(opcode, 11), 3) --5:4 ++ local part3 = band(rshift(opcode, 5), 1)--3 ++ local part4 = band(rshift(opcode, 6), 1)--2 ++ return bor(lshift(0, 31), lshift(part1, 6) , lshift(part2, 4), ++ lshift(part3, 3), lshift(part4, 2)) ++end ++ ++local function parse_x(opcode) ++ local part1 = band(rshift(opcode, 12), 1) --5 ++ local part2 = band(rshift(opcode, 2), 31) --4:0 ++ if(part1 == 1) then ++ return bor(lshift(1, 31), lshift(0x1ffffff, 6), lshift(part1, 5), part2) ++ else ++ return bor(lshift(0, 31), lshift(part1, 5), part2) ++ end ++end ++ ++local function parse_X(opcode) ++ local part1 = band(rshift(opcode, 12), 1) --12 ++ local part2 = band(rshift(opcode, 3), 3) --8:7 ++ local part3 = band(rshift(opcode, 5), 1) --6 ++ local part4 = band(rshift(opcode, 2), 1) --5 ++ local part5 = band(rshift(opcode, 6), 1) --4 ++ if(part1 == 1) then ++ return bor(lshift(1, 31), lshift(0x3fffff, 9), lshift(part2, 7), ++ lshift(part3, 6), lshift(part4, 5), lshift(part5, 4)) ++ else ++ return bor(lshift(0, 31), lshift(part2, 7), lshift(part3, 6), ++ lshift(part4, 5), lshift(part5, 4)) ++ end ++end ++ ++local function parse_S(opcode) ++ local part1 = band(rshift(opcode, 25), 127) --11:5 ++ local sign = band(rshift(part1, 6), 1) ++ local part2 = band(rshift(opcode, 7), 31) --4:0 ++ if (sign == 1) then ++ return bor(lshift(1, 31), lshift(0x7ffff, 12), lshift(part1, 5), part2) ++ else ++ return bor(lshift(0, 31), lshift(part1, 5), part2) ++ end ++end ++ ++local function parse_B(opcode) ++ local part1 = band(rshift(opcode, 7), 1) --11 ++ local part2 = band(rshift(opcode, 25), 63) --10:5 ++ local part3 = band(rshift(opcode, 8), 15) -- 4 : 1 ++ if (part1 == 1) then ++ return bor(lshift(1, 31), lshift(0x7ffff, 12), lshift(part1, 11), ++ lshift(part2, 5), lshift(part3, 1), 0) ++ else ++ return bor(lshift(0, 31), lshift(part1, 11), lshift(part2, 5), ++ lshift(part3, 1), 0) ++ end ++end ++ ++local function parse_q(opcode) ++ local part1 = band(rshift(opcode, 12), 1) --8 ++ local part2 = band(rshift(opcode, 5), 3) --7:6 ++ local part3 = band(rshift(opcode, 2), 1) --5 ++ local part4 = band(rshift(opcode, 10), 3) --4:3 ++ local part5 = band(rshift(opcode, 3), 3) --2:1 ++ if(part1 == 1) then ++ return bor(lshift(1, 31), lshift(0x7fffff, 8), lshift(part2, 6), ++ lshift(part3, 5), lshift(part4, 3), lshift(part5, 1)) ++ else ++ return bor(lshift(0, 31), lshift(part2, 6), lshift(part3, 5), ++ lshift(part4, 3), lshift(part5, 1)) ++ end ++end ++ ++local function parse_J(opcode) ++ local part1 = band(rshift(opcode, 31), 1) --20 ++ local part2 = band(rshift(opcode, 12), 255) -- 19:12 ++ local part3 = band(rshift(opcode, 20), 1) --11 ++ local part4 = band(rshift(opcode, 21), 1023) --10:1 ++ if(part1 == 1) then ++ return bor(lshift(1, 31), lshift(0x7ff, 20), lshift(part2, 12), ++ lshift(part3, 11), lshift(part4, 1)) ++ else ++ return bor(lshift(0, 31), lshift(0, 20), lshift(part2, 12), ++ lshift(part3, 11), lshift(part4, 1)) ++ end ++end ++ ++local function parse_T(opcode) ++ local part1 = band(rshift(opcode, 12), 1) --11 ++ local part2 = band(rshift(opcode, 8), 1) --10 ++ local part3 = band(rshift(opcode, 9), 3)--9:8 ++ local part4 = band(rshift(opcode, 6), 1) --7 ++ local part5 = band(rshift(opcode, 7), 1) -- 6 ++ local part6 = band(rshift(opcode, 2), 1) --5 ++ local part7 = band(rshift(opcode, 11), 1) --4 ++ local part8 = band(rshift(opcode, 3), 7) --3:1 ++ if(part1 == 1) then ++ return bor(lshift(1, 31), lshift(0x7ffff, 12), lshift(part1, 11), ++ lshift(part2, 10), lshift(part3, 8), lshift(part4, 7), ++ lshift(part5, 6), lshift(part6, 5), lshift(part7, 4), ++ lshift(part8, 1)) ++ else ++ return bor(lshift(0, 31), lshift(part1, 11), lshift(part2, 10), ++ lshift(part3, 8), lshift(part4, 7), lshift(part5, 6), ++ lshift(part6, 5), lshift(part7, 4), lshift(part8, 1)) ++ end ++end ++ ++local function parse_K(opcode) ++ local part1 = band(rshift(opcode, 12), 1) --5 17 ++ local part2 = band(rshift(opcode, 2), 31) --4:0 16:12 ++ if(part1 == 1) then ++ return bor(lshift(0, 31), lshift(0x7fff, 5), part2) ++ else ++ return bor(lshift(0, 31), lshift(part1, 5), part2) ++ end ++end ++ ++-- Disassemble a single instruction. ++local function disass_ins(ctx) ++ local op = ctx:get() ++ local operands = {} ++ local last = nil ++ ctx.op = op ++ ctx.rel =nil ++ ++ local opat = 0 ++ --for compressed instructions ++ if(band(op, 3) < 3) then ++ opat = ctx.map_compr[band(op, 3)] ++ while type(opat) ~= "string" do ++ if not opat then return unknown(ctx) end ++ local test = band(rshift(op, opat.shift), opat.mask) ++ opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ ++ end ++ else ++ opat = ctx.map_pri[band(op,127)] ++ while type(opat) ~= "string" do ++ if not opat then return unknown(ctx) end ++ opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ ++ end ++ end ++ local name, pat = match(opat, "^([a-z0-9_.]*)(.*)") ++ local altname, pat2 = match(pat, "|([a-z0-9_.|]*)(.*)") ++ local a1, a2 = 0 ++ if altname then ++ pat = pat2 ++ end ++ ++ local alias_done = false --variable for the case of 2 pseudoinstructions, if both parameters are x0, 0 ++ ++ for p in gmatch(pat, ".") do ++ local x = nil ++ if p == "D" then ++ x = map_gpr[band(rshift(op, 7), 31)] ++ elseif p == "F" then ++ x = map_fgpr[band(rshift(op, 7), 31)] ++ elseif p == "R" then ++ x = map_gpr[band(rshift(op, 15), 31)] ++ elseif p == "G" then ++ x = map_fgpr[band(rshift(op, 15), 31)] ++ elseif p == "r" then ++ x = map_gpr[band(rshift(op, 20), 31)] ++ if(name == "sb" or name == "sh" or name == "sw" or name == "sd") then ++ local temp = last --because of the diffrent order of the characters ++ operands[#operands] = x ++ x = temp ++ end ++ elseif p == "g" then ++ x = map_fgpr[band(rshift(op, 20), 31)] ++ if(name == "fsw" or name == "fsd") then ++ local temp = last ++ operands[#operands] = x ++ x = temp ++ end ++ elseif p == "Z" then ++ x = map_gpr[8 + band(rshift(op, 2), 7)] ++ elseif p == "N" then ++ x = map_fgpr[8 + band(rshift(op, 2), 7)] ++ elseif p == "M" then ++ x = map_gpr[8 + band(rshift(op, 7), 7)] ++ elseif p == "E" then ++ x = map_gpr[band(rshift(op, 2), 31)] ++ elseif p == "W" then ++ local uimm = parse_W(op) ++ x = format("%s,%d", "sp", uimm) ++ elseif p == "x" then ++ x = parse_x(op) ++ elseif p == "h" then ++ local part1 = band(rshift(op, 5), 3) --7:6 ++ local part2 = band(rshift(op, 10), 7) --5:3 ++ local uimm = bor(lshift(0, 31), lshift(part1, 6) , lshift(part2, 3)) ++ operands[#operands] = format("%d(%s)", uimm, last) ++ elseif p == "X" then ++ local imm = parse_X(op) ++ x = format("%s,%d", "sp", imm) ++ elseif p == "O" then ++ x = format("(%s)", map_gpr[band(rshift(op, 15), 31)]) ++ elseif p == "H" then ++ x = map_fgpr[band(rshift(op, 27), 31)] ++ elseif p == "L" then ++ local register = map_gpr[band(rshift(op, 15), 31)] ++ local disp = arshift(op, 20) ++ x = format("%d(%s)", disp, register) ++ elseif p == "P" then -- XTheadMemPair ++ local register = map_gpr[band(rshift(op, 15), 31)] ++ local disp = band(arshift(op, 25), 3) ++ local isword = bxor(band(arshift(op, 26), 1), 1) ++ x = format("(%s), %d, %d", register, disp, isword and 3 or 4) ++ elseif p == "I" then ++ x = arshift(op, 20) ++ --different for jalr ++ if(name == "jalr") then ++ local reg = map_gpr[band(rshift(op, 15), 31)] ++ if(ctx.reltab[reg] == nil) then ++ operands[#operands] = format("%d(%s)", x, last) ++ else ++ local target = ctx.reltab[reg] + x ++ operands[#operands] = format("%d(%s) #0x%08x", x, last, target) ++ ctx.rel = target ++ ctx.reltab[reg] = nil --assume no reuses of the register ++ end ++ x = nil --not to add additional operand ++ end ++ elseif p == "i" then ++ --both for RV32I AND RV64I ++ local value = band(arshift(op, 20), 63) ++ x = string.format("%d", value) ++ elseif p == "j" then -- XThead imm1[31..26] ++ local value = band(rshift(op, 26), 63) ++ x = string.format("%d", value) ++ elseif p == "v" then --XThead imm[2][26..25] ++ local value = band(rshift(op, 25), 3) ++ x = string.format("%d", value) ++ elseif p == "S" then ++ local register = map_gpr[band(rshift(op, 15), 31)] --register ++ local imm = parse_S(op) ++ x = format("%d(%s)", imm, register) ++ elseif p == "n" then ++ local part1 = band(rshift(op, 5), 1) --6 ++ local part2 = band(rshift(op, 10), 7) --5:3 ++ local part3 = band(rshift(op, 6), 1) --2 ++ local uimm = bor(lshift(0, 31), lshift(part1, 6), lshift(part2, 3), ++ lshift(part3, 2)) ++ operands[#operands] = format("%d(%s)", uimm, last) ++ elseif p == "A" then ++ local value, dest = band(rshift(op, 12), 0xfffff), map_gpr[band(rshift(op, 7), 31)] ++ ctx.reltab[dest] = ctx.addr + ctx.pos + lshift(value, 12) ++ x = format("0x%x", value) ++ elseif p == "B" then ++ x = ctx.addr + ctx.pos + parse_B(op) ++ ctx.rel = x ++ x = format("0x%08x", x) ++ elseif p == "U" then ++ local value = band(rshift(op, 12), 0xfffff) ++ x = string.format("0x%x", value) ++ elseif p == "Q" then ++ local part1 = band(rshift(op, 2), 7) --8:6 ++ local part2 = band(rshift(op, 12), 1) --5 ++ local part3 = band(rshift(op, 5), 3) --4:3 ++ local uimm = bor(lshift(0, 31), lshift(part1, 6), lshift(part2, 5), ++ lshift(part3, 3)) ++ x = format("%d(%s)", uimm, "sp") ++ elseif p == "q" then ++ x = ctx.addr + ctx.pos + parse_q(op) ++ ctx.rel = x ++ x = format("0x%08x", x) ++ elseif p == "J" then ++ x = ctx.addr + ctx.pos + parse_J(op) ++ ctx.rel = x ++ x = format("0x%08x", x) ++ elseif p == "K" then ++ local value = parse_K(op) ++ x = string.format("0x%x", value) ++ elseif p == "Y" then ++ local part1 = band(rshift(op, 2), 3) --7:6 ++ local part2 = band(rshift(op, 12), 1) --5 ++ local part3 = band(rshift(op, 4), 7) --4:2 ++ local uimm = bor(lshift(0, 31), lshift(part1, 6), lshift(part2, 5), ++ lshift(part3, 2)) ++ x = format("%d(%s)", uimm, "sp") ++ elseif p == "o" then -- rounding mode ++ x = map_rm[band(rshift(op, 12), 7)] ++ elseif p == "y" then -- fli lut ++ x = map_fli[band(rshift(op, 15), 31)] ++ elseif p == "1" then ++ local part1 = band(rshift(op, 12), 1) --5 ++ local part2 = band(rshift(op, 2), 31) --4:0 ++ local uimm = bor(lshift(0, 31), lshift(part1, 5), part2) ++ x = string.format("0x%x", uimm) ++ elseif p == "T" then ++ x = ctx.addr + ctx.pos + parse_T(op) ++ ctx.rel = x ++ x = format("0x%08x", x) ++ elseif p == "t" then ++ local part1 = band(rshift(op, 7), 7) --8:6 ++ local part2 = band(rshift(op, 10), 7) --5:3 ++ local uimm = bor(lshift(0, 31), lshift(part1, 6), lshift(part2, 3)) ++ x = format("%d(%s)", uimm, "sp") ++ elseif p == "u" then ++ local part1 = band(rshift(op, 7), 3) --7:6 ++ local part2 = band(rshift(op, 9), 15) --5:2 ++ local uimm = bor(lshift(0, 31), lshift(part1, 6), lshift(part2, 2)) ++ x = format("%d(%s)", uimm, "sp") ++ elseif p == "V" then ++ x = map_fgpr[band(rshift(op, 2), 31)] ++ elseif p == "0" then --PSEUDOINSTRUCTIONS ++ if (last == "zero" or last == 0) then ++ local n = #operands ++ operands[n] = nil ++ last = operands[n-1] ++ local a1, a2 = match(altname, "([^|]*)|(.*)") ++ if a1 then name, altname = a1, a2 ++ else name = altname end ++ alias_done = true ++ end ++ elseif (p == "4") then ++ if(last == -1) then ++ name = altname ++ operands[#operands] = nil ++ end ++ elseif (p == "5") then ++ if(last == 1) then ++ name = altname ++ operands[#operands] = nil ++ end ++ elseif (p == "6") then ++ if(last == operands[#operands - 1]) then ++ name = altname ++ operands[#operands] = nil ++ end ++ elseif (p == "7") then --jalr rs ++ local value = string.sub(operands[#operands], 1, 1) ++ local reg = string.sub(operands[#operands], 3, #(operands[#operands]) - 1) ++ if(value == "0" and ++ (operands[#operands - 1] == "ra" or operands[#operands - 1] == "zero")) then ++ if(operands[#operands - 1] == "zero") then ++ name = altname ++ end ++ operands[#operands] = nil ++ operands[#operands] = reg ++ end ++ elseif (p == "2" and alias_done == false) then ++ if (last == "zero" or last == 0) then ++ local a1, a2 = match(altname, "([^|]*)|(.*)") ++ name = a2 ++ operands[#operands] = nil ++ end ++ end ++ if x then operands[#operands+1] = x; last = x end ++ end ++ return putop(ctx, name, operands) ++end ++ ++------------------------------------------------------------------------------ ++ ++-- Disassemble a block of code. ++local function disass_block(ctx, ofs, len) ++ if not ofs then ++ ofs = 0 ++ end ++ local stop = len and ofs+len or #ctx.code ++ --instructions can be both 32 and 16 bits ++ stop = stop - stop % 2 ++ ctx.pos = ofs - ofs % 2 ++ ctx.rel = nil ++ while ctx.pos < stop do disass_ins(ctx) end ++end ++ ++-- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). ++local function create(code, addr, out) ++ local ctx = {} ++ ctx.code = code ++ ctx.addr = addr or 0 ++ ctx.out = out or io.write ++ ctx.symtab = {} ++ ctx.disass = disass_block ++ ctx.hexdump = 8 ++ ctx.get = get_le ++ ctx.map_pri = map_pri ++ ctx.map_compr = map_compr ++ ctx.reltab = {} ++ return ctx ++end ++ ++-- Simple API: disassemble code (a string) at address and output via out. ++local function disass(code, addr, out) ++ create(code, addr, out):disass(addr) ++end ++ ++-- Return register name for RID. ++local function regname(r) ++ if r < 32 then return map_gpr[r] end ++ return "f"..(r-32) ++end ++ ++-- Public module functions. ++return { ++ create = create, ++ disass = disass, ++ regname = regname ++} +diff --git a/src/jit/dis_riscv64.lua b/src/jit/dis_riscv64.lua +new file mode 100644 +index 0000000000..fd6ce27689 +--- /dev/null ++++ b/src/jit/dis_riscv64.lua +@@ -0,0 +1,16 @@ ++---------------------------------------------------------------------------- ++-- LuaJIT RISC-V 64 disassembler wrapper module. ++-- ++-- Copyright (C) 2005-2025 Mike Pall. All rights reserved. ++-- Released under the MIT license. See Copyright Notice in luajit.h ++---------------------------------------------------------------------------- ++-- This module just exports the default riscv little-endian functions from the ++-- RISC-V disassembler module. All the interesting stuff is there. ++------------------------------------------------------------------------------ ++ ++local dis_riscv = require((string.match(..., ".*%.") or "").."dis_riscv") ++return { ++ create = dis_riscv.create, ++ disass = dis_riscv.disass, ++ regname = dis_riscv.regname ++} +\ No newline at end of file + +From 23b5c55e1e18a75bb35a1a5ce7cd3b85a84903ad Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 6 Mar 2024 09:50:08 +0800 +Subject: [PATCH 20/22] riscv(misc): add support in Makefile + +--- + Makefile | 1 + + src/Makefile | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/Makefile b/Makefile +index d789e9f374..7b7368adde 100644 +--- a/Makefile ++++ b/Makefile +@@ -101,6 +101,7 @@ FILES_JITLIB= bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua \ + dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua \ + dis_mips64.lua dis_mips64el.lua \ + dis_mips64r6.lua dis_mips64r6el.lua \ ++ dis_riscv.lua dis_riscv64.lua \ + vmdef.lua + + ifeq (,$(findstring Windows,$(OS))) +diff --git a/src/Makefile b/src/Makefile +index 4a56d1e8e5..cdf1d5d279 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -52,6 +52,7 @@ CCOPT_arm= + CCOPT_arm64= + CCOPT_ppc= + CCOPT_mips= ++CCOPT_riscv64= + # + CCDEBUG= + # Uncomment the next line to generate debug information: +@@ -266,6 +267,9 @@ ifneq (,$(findstring LJ_TARGET_MIPS ,$(TARGET_TESTARCH))) + else + TARGET_LJARCH= mips + endif ++else ++ifneq (,$(findstring LJ_TARGET_RISCV64 ,$(TARGET_TESTARCH))) ++ TARGET_LJARCH= riscv64 + else + $(error Unsupported target architecture) + endif +@@ -274,6 +278,7 @@ endif + endif + endif + endif ++endif + + ifneq (,$(findstring LJ_TARGET_PS3 1,$(TARGET_TESTARCH))) + TARGET_SYS= PS3 +@@ -471,6 +476,9 @@ ifeq (ppc,$(TARGET_LJARCH)) + DASM_AFLAGS+= -D PPE -D TOC + endif + endif ++ifneq (,$(findstring LJ_TARGET_RISCV64 ,$(TARGET_TESTARCH))) ++ DASM_AFLAGS+= -D RISCV64 ++endif + endif + endif + + +From bedd0cf1e179a0a3370ea3320806237d8a4ec37e Mon Sep 17 00:00:00 2001 +From: gns +Date: Wed, 21 Aug 2024 16:39:26 +0800 +Subject: [PATCH 21/22] riscv(support,linux): use HWPROBE for ISE detection + +Current SIGILL handler appears to have weird issues with libluajit on +some platform. Considering 6.6 kernel is becoming more common, switch +to HWPROBE for better compatibility. +--- + src/lib_jit.c | 79 +++++++++++++++++++++++++-------------------------- + src/lj_jit.h | 29 +++++++++++++++++++ + 2 files changed, 67 insertions(+), 41 deletions(-) + +diff --git a/src/lib_jit.c b/src/lib_jit.c +index e97e4d45e8..376b3c85f9 100644 +--- a/src/lib_jit.c ++++ b/src/lib_jit.c +@@ -632,23 +632,26 @@ JIT_PARAMDEF(JIT_PARAMINIT) + #endif + + #if LJ_TARGET_RISCV64 && LJ_TARGET_POSIX +-#include +-#include +-static sigjmp_buf sigbuf = {0}; +-static void detect_sigill(int sig) +-{ +- siglongjmp(sigbuf, 1); +-} ++ ++#if LJ_TARGET_LINUX ++#include ++ ++struct riscv_hwprobe hwprobe_requests[] = { ++ {RISCV_HWPROBE_KEY_IMA_EXT_0} ++}; ++ ++const uint64_t *hwprobe_ext = &hwprobe_requests[0].value; ++ ++int hwprobe_ret = 0; ++#endif + + static int riscv_compressed() + { + #if defined(__riscv_c) || defined(__riscv_compressed) + /* Don't bother checking for RVC -- would crash before getting here. */ + return 1; +-#elif defined(__GNUC__) +- /* c.nop; c.nop; */ +- __asm__(".4byte 0x00010001"); +- return 1; ++#elif LJ_TARGET_LINUX ++ return (hwprobe_ret == 0 && ((*hwprobe_ext) & RISCV_HWPROBE_IMA_C)) ? 1 : 0; + #else + return 0; + #endif +@@ -659,11 +662,8 @@ static int riscv_zba() + #if defined(__riscv_b) || defined(__riscv_zba) + /* Don't bother checking for Zba -- would crash before getting here. */ + return 1; +-#elif defined(__GNUC__) +- /* Don't bother verifying the result, just check if the instruction exists. */ +- /* add.uw zero, zero, zero */ +- __asm__(".4byte 0x0800003b"); +- return 1; ++#elif LJ_TARGET_LINUX ++ return (hwprobe_ret == 0 && ((*hwprobe_ext) & RISCV_HWPROBE_EXT_ZBA)) ? 1 : 0; + #else + return 0; + #endif +@@ -674,11 +674,8 @@ static int riscv_zbb() + #if defined(__riscv_b) || defined(__riscv_zbb) + /* Don't bother checking for Zbb -- would crash before getting here. */ + return 1; +-#elif defined(__GNUC__) +- register int t asm ("a0"); +- /* addi a0, zero, 255; sext.b a0, a0; */ +- __asm__("addi a0, zero, 255\n\t.4byte 0x60451513"); +- return t < 0; ++#elif LJ_TARGET_LINUX ++ return (hwprobe_ret == 0 && ((*hwprobe_ext) & RISCV_HWPROBE_EXT_ZBB)) ? 1 : 0; + #else + return 0; + #endif +@@ -689,10 +686,8 @@ static int riscv_zicond() + #if defined(__riscv_zicond) + /* Don't bother checking for Zicond -- would crash before getting here. */ + return 1; +-#elif defined(__GNUC__) +- /* czero.eqz zero, zero, zero; */ +- __asm__(".4byte 0x0e005033"); +- return 1; ++#elif LJ_TARGET_LINUX ++ return (hwprobe_ret == 0 && ((*hwprobe_ext) & RISCV_HWPROBE_EXT_ZICOND)) ? 1 : 0; + #else + return 0; + #endif +@@ -703,6 +698,8 @@ static int riscv_zfa() + #if defined(__riscv_zfa) + /* Don't bother checking for Zfa -- would crash before getting here. */ + return 1; ++#elif LJ_TARGET_LINUX ++ return (hwprobe_ret == 0 && ((*hwprobe_ext) & RISCV_HWPROBE_EXT_ZFA)) ? 1 : 0; + #else + return 0; + #endif +@@ -716,23 +713,19 @@ static int riscv_xthead() + && defined(__riscv_xtheadmac)) + /* Don't bother checking for XThead -- would crash before getting here. */ + return 1; +-#elif defined(__GNUC__) +- register int t asm ("a0"); +- /* C906 & C910 & C908 all have "xtheadc", XTheadBb subset "xtheadc". */ +- /* Therefore assume XThead* are present if XTheadBb is present. */ +- /* addi a0, zero, 255; th.ext a0, a0, 7, 0; */ +- __asm__("addi a0, zero, 255\n\t.4byte 0x1c05250b"); +- return t == -1; /* In case of collision with other vendor extensions. */ + #else +- return 0; ++/* ++** Hardcoded as there's no easy way of detection: ++** - SIGILL have some trouble with libluajit as we speak ++** - Checking mvendorid looks good, but might not be reliable. ++*/ ++ return 0; + #endif + } + + static uint32_t riscv_probe(int (*func)(void), uint32_t flag) + { +- if (sigsetjmp(sigbuf, 1) == 0) { +- return func() ? flag : 0; +- } else return 0; ++ return func() ? flag : 0; + } + #endif + +@@ -809,17 +802,21 @@ static uint32_t jit_cpudetect(void) + + #elif LJ_TARGET_RISCV64 + #if LJ_HASJIT +- /* SIGILL-based detection of RVC, Zba, Zbb and XThead. Welcome to the future. */ +- struct sigaction old = {0}, act = {0}; +- act.sa_handler = detect_sigill; +- sigaction(SIGILL, &act, &old); ++ ++#if LJ_TARGET_LINUX ++ /* HWPROBE-based detection of RVC, Zba, Zbb and Zicond. */ ++ hwprobe_ret = syscall(__NR_riscv_hwprobe, &hwprobe_requests, ++ sizeof(hwprobe_requests) / sizeof(struct riscv_hwprobe), 0, ++ NULL, 0); ++ + flags |= riscv_probe(riscv_compressed, JIT_F_RVC); + flags |= riscv_probe(riscv_zba, JIT_F_RVZba); + flags |= riscv_probe(riscv_zbb, JIT_F_RVZbb); + flags |= riscv_probe(riscv_zicond, JIT_F_RVZicond); + flags |= riscv_probe(riscv_zfa, JIT_F_RVZfa); + flags |= riscv_probe(riscv_xthead, JIT_F_RVXThead); +- sigaction(SIGILL, &old, NULL); ++ ++#endif + + /* Detect V/P? */ + /* V have no hardware available, P not ratified yet. */ +diff --git a/src/lj_jit.h b/src/lj_jit.h +index e61d99ffa9..124985692d 100644 +--- a/src/lj_jit.h ++++ b/src/lj_jit.h +@@ -78,6 +78,35 @@ + + #define JIT_F_CPUSTRING "\003RVC\003Zba\003Zbb\006Zicond\003Zfa\006XThead" + ++#if LJ_TARGET_LINUX ++#include ++ ++#ifndef __NR_riscv_hwprobe ++#ifndef __NR_arch_specific_syscall ++#define __NR_arch_specific_syscall 244 ++#endif ++#define __NR_riscv_hwprobe (__NR_arch_specific_syscall + 14) ++#endif ++ ++struct riscv_hwprobe { ++ int64_t key; ++ uint64_t value; ++}; ++ ++#define RISCV_HWPROBE_KEY_MVENDORID 0 ++#define RISCV_HWPROBE_KEY_MARCHID 1 ++#define RISCV_HWPROBE_KEY_MIMPID 2 ++#define RISCV_HWPROBE_KEY_BASE_BEHAVIOR 3 ++#define RISCV_HWPROBE_KEY_IMA_EXT_0 4 ++ ++#define RISCV_HWPROBE_IMA_C (1 << 1) ++#define RISCV_HWPROBE_EXT_ZBA (1 << 3) ++#define RISCV_HWPROBE_EXT_ZBB (1 << 4) ++#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) ++#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) ++ ++#endif ++ + #else + + #define JIT_F_CPUSTRING "" + +From fd1422f59e1e93fbeff55e2598786a25138fe9c2 Mon Sep 17 00:00:00 2001 +From: gns +Date: Thu, 16 Jan 2025 01:02:19 +0800 +Subject: [PATCH 22/22] riscv(interp): strip excessive extended branch (^B+J) + +--- + src/vm_riscv64.dasc | 104 ++++++++++++++++++++++---------------------- + 1 file changed, 52 insertions(+), 52 deletions(-) + +diff --git a/src/vm_riscv64.dasc b/src/vm_riscv64.dasc +index 1fee1f7ed4..d4cbe4ebb1 100644 +--- a/src/vm_riscv64.dasc ++++ b/src/vm_riscv64.dasc +@@ -553,7 +553,7 @@ static void build_subroutines(BuildCtx *ctx) + | + | // Return from pcall or xpcall fast func. + | mov_true TMP1 +- | bxeqz TMP0, ->cont_dispatch ++ | beqz TMP0, ->cont_dispatch + | ld PC, FRAME_PC(TMP2) // Fetch PC of previous frame. + | mv BASE, TMP2 // Restore caller base. + | // Prepending may overwrite the pcall frame, so do it at the end. +@@ -564,9 +564,9 @@ static void build_subroutines(BuildCtx *ctx) + | addiw RD, RD, 8 // RD = (nresults+1)*8. + | andi TMP0, PC, FRAME_TYPE + | li CRET1, LUA_YIELD +- | bxeqz RD, ->vm_unwind_c_eh ++ | beqz RD, ->vm_unwind_c_eh + | mv MULTRES, RD +- | bxeqz TMP0, ->BC_RET_Z // Handle regular return to Lua. ++ | beqz TMP0, ->BC_RET_Z // Handle regular return to Lua. + | + |->vm_return: + | // BASE = base, RA = resultptr, RD/MULTRES = (nresults+1)*8, PC = return +@@ -574,7 +574,7 @@ static void build_subroutines(BuildCtx *ctx) + | andi TMP2, PC, ~FRAME_TYPEP + | xori TMP0, TMP0, FRAME_C + | sub TMP2, BASE, TMP2 // TMP2 = previous base. +- | bxnez TMP0, ->vm_returnp ++ | bnez TMP0, ->vm_returnp + | + | addiw TMP1, RD, -8 + | sd TMP2, L->base +@@ -743,7 +743,7 @@ static void build_subroutines(BuildCtx *ctx) + | andi TMP0, PC, FRAME_TYPE + | li TISNIL, LJ_TNIL + | li TISNUM, LJ_TISNUM +- | bxeqz TMP0, ->BC_RET_Z ++ | beqz TMP0, ->BC_RET_Z + | j ->vm_return + | + |->vm_pcall: // Setup protected C frame and enter VM. +@@ -1003,7 +1003,7 @@ static void build_subroutines(BuildCtx *ctx) + | // Returns 0/1 or TValue * (metamethod). + |3: + | sltiu TMP1, CRET1, 2 +- | bxeqz TMP1, ->vmeta_binop ++ | beqz TMP1, ->vmeta_binop + | negw TMP2, CRET1 + |4: + | lhu RD, OFS_RD(PC) +@@ -1091,7 +1091,7 @@ static void build_subroutines(BuildCtx *ctx) + | // (lua_State *L, TValue *ra,*rb,*rc, BCReg op) + | call_intern vmeta_arith, lj_meta_arith + | // Returns NULL (finished) or TValue * (metamethod). +- | bxeqz CRET1, ->cont_nop ++ | beqz CRET1, ->cont_nop + | + | // Call metamethod for binary op. + |->vmeta_binop: +@@ -1115,7 +1115,7 @@ static void build_subroutines(BuildCtx *ctx) + | call_intern vmeta_len, lj_meta_len // (lua_State *L, TValue *o) + | // Returns NULL (retry) or TValue * (metamethod base). + #if LJ_52 +- | bxnez CRET1, ->vmeta_binop // Binop call for compatibility. ++ | bnez CRET1, ->vmeta_binop // Binop call for compatibility. + | mv CARG1, MULTRES + | j ->BC_LEN_Z + #else +@@ -1201,7 +1201,7 @@ static void build_subroutines(BuildCtx *ctx) + |->ff_ .. name: + | ld CARG1, 0(BASE) + | fld FARG1, 0(BASE) +- | bxeqz NARGS8:RC, ->fff_fallback ++ | beqz NARGS8:RC, ->fff_fallback + | checknum CARG1, ->fff_fallback + |.endmacro + | +@@ -1210,7 +1210,7 @@ static void build_subroutines(BuildCtx *ctx) + | ld CARG1, 0(BASE) + | sltiu TMP0, NARGS8:RC, 16 + | ld CARG2, 8(BASE) +- | bxnez TMP0, ->fff_fallback ++ | bnez TMP0, ->fff_fallback + | gettp TMP1, CARG1 + | gettp TMP2, CARG2 + | sltiu TMP1, TMP1, LJ_TISNUM +@@ -1218,7 +1218,7 @@ static void build_subroutines(BuildCtx *ctx) + | fld FARG1, 0(BASE) + | and TMP1, TMP1, TMP2 + | fld FARG2, 8(BASE) +- | bxeqz TMP1, ->fff_fallback ++ | beqz TMP1, ->fff_fallback + |.endmacro + | + |// Inlined GC threshold check. +@@ -1278,7 +1278,7 @@ static void build_subroutines(BuildCtx *ctx) + |2: + | ld STR:RC, GL->gcroot[GCROOT_MMNAME+MM_metatable] + | li CARG1, LJ_TNIL +- | bxeqz TAB:RB, ->fff_restv ++ | beqz TAB:RB, ->fff_restv + | lw TMP0, TAB:RB->hmask + | lw TMP1, STR:RC->sid + | ld NODE:TMP2, TAB:RB->node +@@ -1300,7 +1300,7 @@ static void build_subroutines(BuildCtx *ctx) + | settp CARG1, RB, TMP3 + | j ->fff_restv // Not found, keep default result. + |5: +- | bxne CARG1, TISNIL, ->fff_restv ++ | bne CARG1, TISNIL, ->fff_restv + | j <4 // Ditto for nil value. + | + |6: +@@ -1326,7 +1326,7 @@ static void build_subroutines(BuildCtx *ctx) + | bxnez TMP3, ->fff_fallback + | andi TMP3, TMP2, LJ_GC_BLACK // isblack(table) + | sd TAB:CARG2, TAB:TMP1->metatable +- | bxeqz TMP3, ->fff_restv ++ | beqz TMP3, ->fff_restv + | barrierback TAB:TMP1, TMP2, TMP0, ->fff_restv + | + |.ffunc rawget +@@ -1361,7 +1361,7 @@ static void build_subroutines(BuildCtx *ctx) + | gettp TMP0, CARG1 + | addi TMP1, TMP0, -LJ_TSTR + | // A __tostring method in the string base metatable is ignored. +- | bxeqz TMP1, ->fff_restv // String key? ++ | beqz TMP1, ->fff_restv // String key? + | // Handle numbers inline, unless a number base metatable is present. + | ld TMP1, GL->gcroot[GCROOT_BASEMT_NUM] + | sltu TMP0, TISNUM, TMP0 +@@ -1391,10 +1391,10 @@ static void build_subroutines(BuildCtx *ctx) + | call_intern ff_next, lj_tab_next // (GCtab *t, cTValue *key, TValue *o) + | // Returns 1=found, 0=end, -1=error. + | li RD, (2+1)*8 +- | bxgtz CRET1, ->fff_res // Found key/value. ++ | bgtz CRET1, ->fff_res // Found key/value. + | mv TMP1, CRET1 + | mv CARG1, TISNIL +- | bxeqz TMP1, ->fff_restv // End of traversal: return nil. ++ | beqz TMP1, ->fff_restv // End of traversal: return nil. + | ld CFUNC:RB, FRAME_FUNC(BASE) + | li RC, 2*8 + | cleartp CFUNC:RB +@@ -1434,19 +1434,19 @@ static void build_subroutines(BuildCtx *ctx) + | ld TMP1, 0(TMP3) + |1: + | li RD, (0+1)*8 +- | bxeq TMP1, TISNIL, ->fff_res // End of iteration, return 0 results. ++ | beq TMP1, TISNIL, ->fff_res // End of iteration, return 0 results. + | sd TMP1, -8(BASE) + | li RD, (2+1)*8 + | j ->fff_res + |2: // Check for empty hash part first. Otherwise call C function. + | lw TMP0, TAB:CARG1->hmask + | li RD, (0+1)*8 +- | bxeqz TMP0, ->fff_res ++ | beqz TMP0, ->fff_res + | mv CARG2, TMP2 + | call_intern ff_ipairs_aux, lj_tab_getinth // (GCtab *t, int32_t key) + | // Returns cTValue * or NULL. + | li RD, (0+1)*8 +- | bxeqz CRET1, ->fff_res ++ | beqz CRET1, ->fff_res + | ld TMP1, 0(CRET1) + | j <1 + | +@@ -1483,7 +1483,7 @@ static void build_subroutines(BuildCtx *ctx) + | srliw TMP3, TMP3, HOOK_ACTIVE_SHIFT + | andi TMP3, TMP3, 1 + | addi PC, TMP3, 16+FRAME_PCALL +- | bxeqz NARGS8:RC, ->vm_call_dispatch ++ | beqz NARGS8:RC, ->vm_call_dispatch + |1: + | add TMP0, BASE, NARGS8:RC + |2: +@@ -1540,17 +1540,17 @@ static void build_subroutines(BuildCtx *ctx) + | xor CARG2, CARG2, TMP3 // CARG2 = TMP4 ? CARG2 : TMP3 + | and CARG2, CARG2, TMP4 + | xor CARG2, TMP3, CARG2 +- | bxgtz CARG4, ->fff_fallback // st > LUA_YIELD? ++ | bgtz CARG4, ->fff_fallback // st > LUA_YIELD? + | xor TMP2, TMP2, CARG3 + | or CARG4, TMP2, TMP0 +- | bxnez TMP1, ->fff_fallback // cframe != 0? ++ | bnez TMP1, ->fff_fallback // cframe != 0? + | ld TMP0, L:CARG1->maxstack + | ld PC, FRAME_PC(BASE) +- | bxeqz CARG4, ->fff_fallback // base == top && st == 0? ++ | beqz CARG4, ->fff_fallback // base == top && st == 0? + | add TMP2, CARG2, NARGS8:RC + | sd BASE, L->base + | sd PC, SAVE_PC(sp) +- | bxltu TMP0, TMP2, ->fff_fallback // Stack overflow? ++ | bltu TMP0, TMP2, ->fff_fallback // Stack overflow? + |1: + |.if resume + | addi BASE, BASE, 8 // Keep resumed thread in stack for GC. +@@ -1655,7 +1655,7 @@ static void build_subroutines(BuildCtx *ctx) + | sd BASE, L->base + | andi TMP0, TMP0, CFRAME_RESUME + | sd TMP1, L->top +- | bxeqz TMP0, ->fff_fallback ++ | beqz TMP0, ->fff_fallback + | sd x0, L->cframe + | sb CRET1, L->status + | j ->vm_leave_unw +@@ -1666,14 +1666,14 @@ static void build_subroutines(BuildCtx *ctx) + |->ff_math_ .. func: + | ld CARG1, 0(BASE) + | gettp TMP0, CARG1 +- | bxeqz NARGS8:RC, ->fff_fallback ++ | beqz NARGS8:RC, ->fff_fallback + | fmv.d.x FARG1, CARG1 +- | bxeq TMP0, TISNUM, ->fff_restv ++ | beq TMP0, TISNUM, ->fff_restv + | srli TMP1, CARG1, 52 // Extract exponent (and sign). +- | bxgeu TMP0, TISNUM, ->fff_fallback ++ | bgeu TMP0, TISNUM, ->fff_fallback + | andi TMP1, TMP1, 0x7ff // Extract exponent. + | slti TMP2, TMP1, 1023 + 52 + 1 // 1023: Bias, 52: Max fraction +- | bxeqz TMP2, ->fff_resn // Less than 2^52 / Not NaN? ++ | beqz TMP2, ->fff_resn // Less than 2^52 / Not NaN? + | fcvt.l.d TMP3, FARG1, rm + | fcvt.d.l FTMP1, TMP3 + | fsgnj.d FRET1, FTMP1, FARG1 +@@ -1693,7 +1693,7 @@ static void build_subroutines(BuildCtx *ctx) + | sub CARG1, TMP1, TMP0 + | slli TMP3, CARG1, 32 + | settp CARG1, TISNUM +- | bxgez TMP3, ->fff_restv ++ | bgez TMP3, ->fff_restv + | lui CARG1, 0x41e00 // 2^31 as a double. + | slli CARG1, CARG1, 32 + | j ->fff_restv +@@ -1701,7 +1701,7 @@ static void build_subroutines(BuildCtx *ctx) + | sltiu TMP2, CARG2, LJ_TISNUM + | slli CARG1, CARG1, 1 + | srli CARG1, CARG1, 1 +- | bxeqz TMP2, ->fff_fallback // int ++ | beqz TMP2, ->fff_fallback // int + |// fallthrough + | + |->fff_restv: +@@ -1757,7 +1757,7 @@ static void build_subroutines(BuildCtx *ctx) + | li TMP1, 8 + | ld CARG1, 0(BASE) + | fld FARG1, 0(BASE) +- | bxne NARGS8:RC, TMP1, ->fff_fallback // Need exactly 1 argument. ++ | bne NARGS8:RC, TMP1, ->fff_fallback // Need exactly 1 argument. + | checknum CARG1, ->fff_fallback + | call_extern ff_math_log, log + | j ->fff_resn +@@ -1811,7 +1811,7 @@ static void build_subroutines(BuildCtx *ctx) + | checkint CARG1, >4 + |1: // Handle integers. + | ld CARG2, 0(RA) +- | bxeq RA, RB, ->fff_restv ++ | beq RA, RB, ->fff_restv + | sext.w CARG1, CARG1 + | checkint CARG2, >3 + | sext.w CARG2, CARG2 +@@ -1840,7 +1840,7 @@ static void build_subroutines(BuildCtx *ctx) + |5: // Handle numbers. + | ld CARG2, 0(RA) + | fld FARG2, 0(RA) +- | bxgeu RA, RB, ->fff_resn ++ | bgeu RA, RB, ->fff_resn + | checknum CARG2, >7 + |6: + |.if ismax +@@ -1871,7 +1871,7 @@ static void build_subroutines(BuildCtx *ctx) + | addi TMP0, TMP0, -LJ_TSTR + | or TMP1, TMP1, TMP0 + | cleartp STR:CARG1 +- | bxnez TMP1, ->fff_fallback // Need exactly 1 string argument. ++ | bnez TMP1, ->fff_fallback // Need exactly 1 string argument. + | lw TMP0, STR:CARG1->len + | ld PC, FRAME_PC(BASE) + | snez RD, TMP0 +@@ -1894,7 +1894,7 @@ static void build_subroutines(BuildCtx *ctx) + | sltu TMP2, TMP2, CARG1 // !(255 < n). + | or TMP1, TMP1, TMP2 + | li CARG3, 1 +- | bxnez TMP1, ->fff_fallback ++ | bnez TMP1, ->fff_fallback + | addi CARG2, sp, TMPD_OFS + | sb CARG1, TMPD(sp) + |->fff_newstr: +@@ -1917,7 +1917,7 @@ static void build_subroutines(BuildCtx *ctx) + | ld CARG3, 16(BASE) + | addi TMP0, NARGS8:RC, -16 + | gettp TMP1, CARG1 +- | bxltz TMP0, ->fff_fallback ++ | bltz TMP0, ->fff_fallback + | cleartp STR:CARG1, CARG1 + | li CARG4, -1 + | beqz TMP0, >1 +@@ -1927,7 +1927,7 @@ static void build_subroutines(BuildCtx *ctx) + | checkint CARG2, ->fff_fallback + | addi TMP0, TMP1, -LJ_TSTR + | sext.w CARG3, CARG2 +- | bxnez TMP0, ->fff_fallback ++ | bnez TMP0, ->fff_fallback + | lw CARG2, STR:CARG1->len + | // STR:CARG1 = str, CARG2 = str->len, CARG3 = start, CARG4 = end + | addiw TMP0, CARG2, 1 +@@ -1950,7 +1950,7 @@ static void build_subroutines(BuildCtx *ctx) + | sub CARG3, CARG4, CARG3 // len = end - start + | addi CARG2, CARG2, sizeof(GCstr)-1 + | addiw CARG3, CARG3, 1 // len += 1 +- | bxgez CARG3, ->fff_newstr ++ | bgez CARG3, ->fff_newstr + |->fff_emptystr: // Return empty string. + | li TMP1, LJ_TSTR + | addi STR:CARG1, GL, offsetof(global_State, strempty) +@@ -1961,7 +1961,7 @@ static void build_subroutines(BuildCtx *ctx) + | .ffunc string_ .. name + | ffgccheck + | ld CARG2, 0(BASE) +- | bxeqz NARGS8:RC, ->fff_fallback ++ | beqz NARGS8:RC, ->fff_fallback + | checkstr STR:CARG2, ->fff_fallback + | addi SBUF:CARG1, GL, offsetof(global_State, tmpbuf) + | ld TMP0, SBUF:CARG1->b +@@ -1983,7 +1983,7 @@ static void build_subroutines(BuildCtx *ctx) + | + |->vm_tobit_fb: + | fld FARG1, 0(BASE) +- | bxeqz TMP1, ->fff_fallback ++ | beqz TMP1, ->fff_fallback + | fadd.d FARG1, FARG1, TOBIT + | fmv.x.w CRET1, FARG1 + | zext.w CRET1, CRET1 +@@ -2005,7 +2005,7 @@ static void build_subroutines(BuildCtx *ctx) + | add TMP3, BASE, NARGS8:RC + |1: + | ld TMP1, 0(TMP2) +- | bxeq TMP2, TMP3, ->fff_resi ++ | beq TMP2, TMP3, ->fff_resi + | gettp TMP0, TMP1 + | addi TMP2, TMP2, 8 + | bne TMP0, TISNUM, >2 +@@ -2016,7 +2016,7 @@ static void build_subroutines(BuildCtx *ctx) + | fld FARG1, -8(TMP2) + | sltiu TMP0, TMP0, LJ_TISNUM + | fadd.d FARG1, FARG1, TOBIT +- | bxeqz TMP0, ->fff_fallback ++ | beqz TMP0, ->fff_fallback + | fmv.x.w TMP1, FARG1 + | zext.w TMP1, TMP1 + | bins CRET1, CRET1, TMP1 +@@ -2064,7 +2064,7 @@ static void build_subroutines(BuildCtx *ctx) + |1: + | gettp TMP0, CARG2 + | zext.w CARG2, CARG2 +- | bxne TMP0, TISNUM, ->fff_fallback ++ | bne TMP0, TISNUM, ->fff_fallback + | sext.w CARG1, CARG1 + | shins CRET1, CARG1, CARG2 + | zext.w CRET1, CRET1 +@@ -2085,7 +2085,7 @@ static void build_subroutines(BuildCtx *ctx) + |1: + | gettp TMP0, CARG2 + | zext.w CARG2, CARG2 +- | bxne TMP0, TISNUM, ->fff_fallback ++ | bne TMP0, TISNUM, ->fff_fallback + | sext.w CARG1, CARG1 + | neg TMP2, CARG2 + | rotinsa TMP1, CARG1, CARG2 +@@ -2116,13 +2116,13 @@ static void build_subroutines(BuildCtx *ctx) + | // Either throws an error, or recovers and returns -1, 0 or nresults+1. + | ld BASE, L->base + | slliw RD, CRET1, 3 +- | bxgtz CRET1, ->fff_res // Returned nresults+1? ++ | bgtz CRET1, ->fff_res // Returned nresults+1? + |1: // Returned 0 or -1: retry fast path. + | ld LFUNC:RB, FRAME_FUNC(BASE) + | ld TMP0, L->top + | sub NARGS8:RC, TMP0, BASE + | cleartp LFUNC:RB +- | bxnez CRET1, ->vm_call_tail // Returned -1? ++ | bnez CRET1, ->vm_call_tail // Returned -1? + | ins_callt // Returned 0: retry fast path. + | + |// Reconstruct previous base for vmeta_call during tailcall. +@@ -4297,7 +4297,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | + |->BC_RETV_Z: // Non-standard return case. + | andi TMP2, TMP1, FRAME_TYPEP +- | bxnez TMP2, ->vm_return ++ | bnez TMP2, ->vm_return + | // Return from vararg function: relocate BASE down. + | sub BASE, BASE, TMP1 + | ld PC, FRAME_PC(BASE) +@@ -4550,7 +4550,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | ld TMP2, L->maxstack + | lbu TMP1, -4+PC2PROTO(numparams)(PC) + | ld KBASE, -4+PC2PROTO(k)(PC) +- | bxltu TMP2, RA, ->vm_growstack_l ++ | bltu TMP2, RA, ->vm_growstack_l + | slliw TMP1, TMP1, 3 // numparams*8 + |2: + | bltu NARGS8:RC, TMP1, >3 // Check for missing parameters. +@@ -4587,7 +4587,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | addi TMP3, RC, 16+FRAME_VARG + | ld KBASE, -4+PC2PROTO(k)(PC) + | sd TMP3, 8(TMP1) // Store delta + FRAME_VARG. +- | bxgeu TMP0, TMP2, ->vm_growstack_l ++ | bgeu TMP0, TMP2, ->vm_growstack_l + | lbu TMP2, -4+PC2PROTO(numparams)(PC) + | mv RA, BASE + | mv RC, TMP1 +@@ -4633,7 +4633,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop) + | add RC, BASE, NARGS8:RC + | sd BASE, L->base // base of currently excuting function + | sd RC, L->top +- | bxgtu TMP1, TMP2, ->vm_growstack_c // Need to grow stack. ++ | bgtu TMP1, TMP2, ->vm_growstack_c // Need to grow stack. + | li_vmstate C // li TMP0, ~LJ_VMST_C + if (op == BC_FUNCCW) { + | ld CARG2, CFUNC:RB->f diff --git a/SPECS/luajit/0002-enable-lua52compat.patch b/SPECS/luajit/0002-enable-lua52compat.patch new file mode 100644 index 00000000..2b0d4ff8 --- /dev/null +++ b/SPECS/luajit/0002-enable-lua52compat.patch @@ -0,0 +1,11 @@ +--- LuaJIT-a4f56a459a588ae768801074b46ba0adcfb49eb1/src/Makefile.orig 2025-09-16 15:42:57.091915947 +0800 ++++ LuaJIT-a4f56a459a588ae768801074b46ba0adcfb49eb1/src/Makefile 2025-09-16 15:42:58.922898907 +0800 +@@ -98,7 +98,7 @@ + # enabled by default. Some other features that *might* break some existing + # code (e.g. __pairs or os.execute() return values) can be enabled here. + # Note: this does not provide full compatibility with Lua 5.2 at this time. +-#XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT ++XCFLAGS+= -DLUAJIT_ENABLE_LUA52COMPAT + # + # Disable the JIT compiler, i.e. turn LuaJIT into a pure interpreter. + #XCFLAGS+= -DLUAJIT_DISABLE_JIT diff --git a/SPECS/luajit/0003-preserve-timestamps.patch b/SPECS/luajit/0003-preserve-timestamps.patch new file mode 100644 index 00000000..2122e1ac --- /dev/null +++ b/SPECS/luajit/0003-preserve-timestamps.patch @@ -0,0 +1,13 @@ +--- LuaJIT-a4f56a459a588ae768801074b46ba0adcfb49eb1/Makefile.orig 2025-09-16 15:42:57.092915938 +0800 ++++ LuaJIT-a4f56a459a588ae768801074b46ba0adcfb49eb1/Makefile 2025-09-16 15:43:04.696845172 +0800 +@@ -79,8 +79,8 @@ + MKDIR= mkdir -p + RMDIR= rmdir 2>/dev/null + SYMLINK= ln -sf +-INSTALL_X= install -m 0755 +-INSTALL_F= install -m 0644 ++INSTALL_X= install -p -m 0755 ++INSTALL_F= install -p -m 0644 + UNINSTALL= $(RM) + LDCONFIG= ldconfig -n 2>/dev/null + SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \ diff --git a/SPECS/luajit/luajit.spec b/SPECS/luajit/luajit.spec new file mode 100644 index 00000000..9acdd1e5 --- /dev/null +++ b/SPECS/luajit/luajit.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: luajit +# LuaJIT is a rolling release, see http://luajit.org/status.html +%global luajit_version 2.1 +# The commit that could be patched +%global commit_date 20250113 +%global commit a4f56a4 +Version: %{commit_date}+git%{commit} +Release: %autorelease +Summary: Just-In-Time Compiler for Lua +License: MIT +URL: http://luajit.org +#!RemoteAsset +Source0: https://github.com/LuaJIT/LuaJIT/archive/%{commit}.tar.gz +# Support for risc-v patch, should remove once PR is mereged +Patch0: 0001-add_riscv_support.patch +# Enable Lua 5.2 features +Patch1: 0002-enable-lua52compat.patch +# Preserve timestamps during installation +Patch2: 0003-preserve-timestamps.patch +# not autotools, use this for ease +BuildSystem: autotools +BuildOption(build): amalg Q= E=@: PREFIX=%{_prefix} TARGET_STRIP=: +BuildOption(build): CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" +BuildOption(build): MULTILIB=%{_lib} +BuildOption(install): PREFIX=%{_prefix} MULTILIB=%{_lib} +BuildRequires: gcc +BuildRequires: make + +%description +LuaJIT implements the full set of language features defined by Lua 5.1. +The virtual machine (VM) is API- and ABI-compatible to the standard +Lua interpreter and can be deployed as a drop-in replacement. + +%package devel +Summary: Development files for %{name} +Requires: %{name} + +%description devel +This package contains development files for %{name}. + +# overwrite conf process, don't do anything here +%conf + +%install -a +# Remove static .a +find %{buildroot} -type f -name *.a -delete -print + +%files +%license COPYRIGHT +%doc README +%{_bindir}/luajit* +%{_libdir}/libluajit-*.so.* +%{_mandir}/man1/luajit.1* +%{_datadir}/luajit-%{luajit_version} + +%files devel +%doc doc/* +%{_includedir}/luajit-%{luajit_version}/ +%{_libdir}/libluajit-*.so +%{_libdir}/pkgconfig/luajit.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/lutok/lutok.spec b/SPECS/lutok/lutok.spec new file mode 100644 index 00000000..db2da36d --- /dev/null +++ b/SPECS/lutok/lutok.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lutok +Version: 0.6.1 +Release: %autorelease +Summary: A lightweight C++ API library for Lua +License: BSD-3-Clause +URL: https://github.com/jmmv/lutok/ +#!RemoteAsset +Source: https://github.com/freebsd/lutok/archive/refs/tags/lutok-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --without-doxygen + +BuildRequires: gcc-c++ autoconf automake libtool +BuildRequires: lua-devel >= 5.2 +BuildRequires: make +Requires: lua >= 5.2 + +%description +Lutok provides thin C++ wrappers around the Lua C API to ease the +interaction between C++ and Lua. + +%package devel +Summary: Development files for the Lutok library +Requires: %{name} = %{version} +Requires: lua-devel >= 5.1 + +%description devel +This package provides the header files, pkg-config files, and symbolic links +needed to develop applications that use the Lutok library. + +%conf -p +autoreconf -fiv + +%files +%license COPYING +%doc AUTHORS NEWS +%doc %{_docdir}/lutok +%{_libdir}/liblutok.so* + +%files devel +%{_includedir}/lutok +%{_libdir}/liblutok.so +%{_libdir}/pkgconfig/lutok.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/lvm2/lvm2.spec b/SPECS/lvm2/lvm2.spec new file mode 100644 index 00000000..617a5cd8 --- /dev/null +++ b/SPECS/lvm2/lvm2.spec @@ -0,0 +1,499 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global device_mapper_version 1.02.209 + +# If we want to enable, change this to 1 +%bcond lvmdbusd 0 +%bcond lvmpolld 0 +%bcond dmfilemapd 0 + +Name: lvm2 +Version: 2.03.35 +# Do not reset Release to 1 unless both lvm2 and device-mapper +# versions are increased together. +Release: %autorelease +Summary: Userland logical volume management tools +License: LicenseRef-DMIT +URL: https://sourceware.org/lvm2 +#!RemoteAsset +Source0: https://sourceware.org/pub/lvm2/releases/LVM2.%{version}.tgz +BuildSystem: autotools + +BuildOption(conf): --with-default-dm-run-dir=%{_rundir} +BuildOption(conf): --with-default-run-dir=%{_rundir}/lvm +BuildOption(conf): --with-default-locking-dir=%{_rundir}/lock/lvm +BuildOption(conf): --with-default-pid-dir=%{_rundir} +BuildOption(conf): --with-udev-dir=%{_prefix}/lib/udev/rules.d +BuildOption(conf): --with-usrlibdir=%{_libdir} +BuildOption(conf): --enable-fsadm +BuildOption(conf): --enable-write_install +BuildOption(conf): --enable-pkgconfig +BuildOption(conf): --enable-cmdlib +BuildOption(conf): --enable-dmeventd +BuildOption(conf): --enable-blkid_wiping +BuildOption(conf): --enable-udev_sync +%if %{with lvmpolld} +BuildOption(conf): --enable-lvmpolld +%endif +%if %{with lvmdbusd} +BuildOption(conf): --enable-dbus-service +BuildOption(conf): --enable-notify-dbus +%endif +%if %{with dmfilemapd} +BuildOption(conf): --enable-dmfilemapd +%endif +BuildOption(conf): --with-writecache=internal +BuildOption(conf): --with-integrity=internal +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --with-default-use-devices-file=1 +BuildOption(conf): --enable-readline + +BuildRequires: make +BuildRequires: libselinux-devel +BuildRequires: libsepol-devel +BuildRequires: util-linux-devel +BuildRequires: ncurses-devel +BuildRequires: libedit-devel +BuildRequires: libaio +BuildRequires: libaio-devel +BuildRequires: pkgconfig +BuildRequires: kmod +BuildRequires: systemd-devel +BuildRequires: systemd-units +BuildRequires: readline-devel +%if %{with lvmdbusd} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-dbus +BuildRequires: python3-pyudev +%endif + +Requires: %{name}-libs = %{version}-%{release} +Requires: bash >= %{bash_version} +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%description +LVM2 includes all of the support for handling read/write operations on +physical volumes (hard disks, RAID-Systems, magneto optical, etc., +multiple devices (MD), see mdadm(8) or even loop devices, see +losetup(8)), creating volume groups (kind of virtual disks) from one +or more physical volumes and creating one or more logical volumes +(kind of logical partitions) in volume groups. + +%package devel +Summary: Development libraries and headers +License: LGPL-2.1-only +Requires: %{name} = %{version}-%{release} +Requires: device-mapper-devel = %{device_mapper_version}-%{release} +Requires: device-mapper-event-devel = %{device_mapper_version}-%{release} +Requires: pkgconfig + +%description devel +This package contains files needed to develop applications that use +the lvm2 libraries. + +%package libs +Summary: Shared libraries for lvm2 +License: LGPL-2.1-only +Requires: device-mapper-event = %{device_mapper_version}-%{release} + +%description libs +This package contains shared lvm2 libraries for applications. + +%if %{with lvmdbusd} +%package dbusd +Summary: LVM2 D-Bus daemon +License: GPL-2.0-only +BuildArch: noarch +Requires: lvm2 >= %{version}-%{release} +Requires: dbus +Requires: python3-dbus +Requires: python3-pyudev +Requires: python3-gobject-base +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%description dbusd +Daemon for access to LVM2 functionality through a D-Bus interface. +%endif + +%package -n device-mapper +Summary: Device mapper utility +Version: %{device_mapper_version} +License: GPL-2.0-only +URL: https://www.sourceware.org/dm/ +Requires: device-mapper-libs = %{device_mapper_version}-%{release} +Requires: util-linux +Requires: systemd + +%description -n device-mapper +This package contains the supporting userspace utility, dmsetup, +for the kernel device-mapper. + +%package -n device-mapper-devel +Summary: Development libraries and headers for device-mapper +Version: %{device_mapper_version} +License: LGPL-2.1-only +Requires: device-mapper = %{device_mapper_version}-%{release} +Requires: pkgconfig + +%description -n device-mapper-devel +This package contains files needed to develop applications that use +the device-mapper libraries. + +%package -n device-mapper-libs +Summary: Device-mapper shared library +Version: %{device_mapper_version} +License: LGPL-2.1-only +Requires: device-mapper = %{device_mapper_version}-%{release} + +%description -n device-mapper-libs +This package contains the device-mapper shared library, libdevmapper. + +%package -n device-mapper-event +Summary: Device-mapper event daemon +Version: %{device_mapper_version} +Requires: device-mapper = %{device_mapper_version}-%{release} +Requires: device-mapper-event-libs = %{device_mapper_version}-%{release} +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%description -n device-mapper-event +This package contains the dmeventd daemon for monitoring the state +of device-mapper devices. + +%package -n device-mapper-event-libs +Summary: Device-mapper event daemon shared library +Version: %{device_mapper_version} +License: LGPL-2.1-only + +%description -n device-mapper-event-libs +This package contains the device-mapper event daemon shared library, +libdevmapper-event. + +%package -n device-mapper-event-devel +Summary: Development libraries and headers for the device-mapper event daemon +Version: %{device_mapper_version} +License: LGPL-2.1-only +Requires: device-mapper-event = %{device_mapper_version}-%{release} +Requires: pkgconfig + +%description -n device-mapper-event-devel +This package contains files needed to develop applications that use +the device-mapper event library. + +%install -a +make install_system_dirs DESTDIR=%{buildroot} +make install_systemd_units DESTDIR=%{buildroot} +make install_systemd_generators DESTDIR=%{buildroot} +make install_tmpfiles_configuration DESTDIR=%{buildroot} + +install -m 700 -d %{buildroot}%{_sharedstatedir}/lvm + +%post +%systemd_post blk-availability.service lvm2-monitor.service +if [ "$1" = "1" ] ; then + # FIXME: what to do with this? We do not want to start it in a container/chroot + # enable and start lvm2-monitor.service on completely new installation only, not on upgrades + systemctl enable lvm2-monitor.service + systemctl start lvm2-monitor.service >/dev/null 2>&1 || : +fi + +%if %{with lvmpolld} +%systemd_post lvm2-lvmpolld.socket +# lvm2-lvmpolld socket is always enabled and started and ready to serve if lvmpolld is used +# replace direct systemctl calls with systemd rpm macro once this is provided in the macro: +# http://cgit.freedesktop.org/systemd/systemd/commit/?id=57ab2eabb8f92fad5239c7d4492e9c6e23ee0678 +systemctl enable lvm2-lvmpolld.socket +systemctl start lvm2-lvmpolld.socket >/dev/null 2>&1 || : +%endif + +%if %{with lvmdbusd} +%post dbusd +%systemd_post lvm2-lvmdbusd.service +%endif + +%post -n device-mapper-event +%systemd_post dm-event.socket +# dm-event.socket is always enabled and started and ready to serve if dmeventd is used +# replace direct systemctl calls with systemd rpm macro once this is provided in the macro: +# http://cgit.freedesktop.org/systemd/systemd/commit/?id=57ab2eabb8f92fad5239c7d4492e9c6e23ee0678 +systemctl enable dm-event.socket +systemctl start dm-event.socket >/dev/null 2>&1 || : +if [ -e %{_default_pid_dir}/dmeventd.pid ]; then + %{_sbindir}/dmeventd -R || echo "Failed to restart dmeventd daemon. Please, try manual restart." +fi + +%preun +%systemd_preun blk-availability.service lvm2-monitor.service + +%if %{with lvmpolld} +%systemd_preun lvm2-lvmpolld.service lvm2-lvmpolld.socket +%endif + +%if %{with lvmdbusd} +%preun dbusd +%systemd_preun lvm2-lvmdbusd.service +%endif + +%preun -n device-mapper-event +%systemd_preun dm-event.service dm-event.socket + +%postun +%systemd_postun lvm2-monitor.service + +%if %{with lvmpolld} +%systemd_postun_with_restart lvm2-lvmpolld.service +%endif + +%if %{with lvmdbusd} +%postun dbusd +%systemd_postun lvm2-lvmdbusd.service +%endif + +%ldconfig_scriptlets libs + +%ldconfig_scriptlets -n device-mapper-libs + +%ldconfig_scriptlets -n device-mapper-event-libs + +%files +%license COPYING COPYING.LIB +%doc README VERSION WHATS_NEW +%doc doc/lvm_fault_handling.txt +%{_sbindir}/fsadm +%{_sbindir}/lvm +%{_sbindir}/lvmconfig +%{_sbindir}/lvmdevices +%{_sbindir}/lvmdump +%{_sbindir}/lvmpersist +%if %{with lvmpolld} +%{_sbindir}/lvmpolld +%endif +%{_sbindir}/lvm_import_vdo +%{_sbindir}/lvchange +%{_sbindir}/lvconvert +%{_sbindir}/lvcreate +%{_sbindir}/lvdisplay +%{_sbindir}/lvextend +%{_sbindir}/lvmdiskscan +%{_sbindir}/lvmsadc +%{_sbindir}/lvmsar +%{_sbindir}/lvreduce +%{_sbindir}/lvremove +%{_sbindir}/lvrename +%{_sbindir}/lvresize +%{_sbindir}/lvs +%{_sbindir}/lvscan +%{_sbindir}/pvchange +%{_sbindir}/pvck +%{_sbindir}/pvcreate +%{_sbindir}/pvdisplay +%{_sbindir}/pvmove +%{_sbindir}/pvremove +%{_sbindir}/pvresize +%{_sbindir}/pvs +%{_sbindir}/pvscan +%{_sbindir}/vgcfgbackup +%{_sbindir}/vgcfgrestore +%{_sbindir}/vgchange +%{_sbindir}/vgck +%{_sbindir}/vgconvert +%{_sbindir}/vgcreate +%{_sbindir}/vgdisplay +%{_sbindir}/vgexport +%{_sbindir}/vgextend +%{_sbindir}/vgimport +%{_sbindir}/vgimportclone +%{_sbindir}/vgimportdevices +%{_sbindir}/vgmerge +%{_sbindir}/vgmknodes +%{_sbindir}/vgreduce +%{_sbindir}/vgremove +%{_sbindir}/vgrename +%{_sbindir}/vgs +%{_sbindir}/vgscan +%{_sbindir}/vgsplit +%attr(755, -, -) %{_libexecdir}/lvresize_fs_helper +%{_mandir}/man5/lvm.conf.5.gz +%{_mandir}/man7/lvmautoactivation.7.gz +%{_mandir}/man7/lvmcache.7.gz +%{_mandir}/man7/lvmraid.7.gz +%{_mandir}/man7/lvmreport.7.gz +%{_mandir}/man7/lvmthin.7.gz +%{_mandir}/man7/lvmvdo.7.gz +%{_mandir}/man7/lvmsystemid.7.gz +%{_mandir}/man8/fsadm.8.gz +%{_mandir}/man8/lvchange.8.gz +%{_mandir}/man8/lvconvert.8.gz +%{_mandir}/man8/lvcreate.8.gz +%{_mandir}/man8/lvdisplay.8.gz +%{_mandir}/man8/lvextend.8.gz +%{_mandir}/man8/lvm.8.gz +%{_mandir}/man8/lvm-config.8.gz +%{_mandir}/man8/lvm-dumpconfig.8.gz +%{_mandir}/man8/lvm-fullreport.8.gz +%{_mandir}/man8/lvmconfig.8.gz +%{_mandir}/man8/lvmdevices.8.gz +%{_mandir}/man8/lvmdiskscan.8.gz +%{_mandir}/man8/lvmdump.8.gz +%{_mandir}/man8/lvmpersist.8.gz +%{_mandir}/man8/lvmsadc.8.gz +%{_mandir}/man8/lvmsar.8.gz +%{_mandir}/man8/lvreduce.8.gz +%{_mandir}/man8/lvremove.8.gz +%{_mandir}/man8/lvrename.8.gz +%{_mandir}/man8/lvresize.8.gz +%{_mandir}/man8/lvs.8.gz +%{_mandir}/man8/lvscan.8.gz +%{_mandir}/man8/pvchange.8.gz +%{_mandir}/man8/pvck.8.gz +%{_mandir}/man8/pvcreate.8.gz +%{_mandir}/man8/pvdisplay.8.gz +%{_mandir}/man8/pvmove.8.gz +%{_mandir}/man8/pvremove.8.gz +%{_mandir}/man8/pvresize.8.gz +%{_mandir}/man8/pvs.8.gz +%{_mandir}/man8/pvscan.8.gz +%{_mandir}/man8/lvm_import_vdo.8.gz +%{_mandir}/man8/vgcfgbackup.8.gz +%{_mandir}/man8/vgcfgrestore.8.gz +%{_mandir}/man8/vgchange.8.gz +%{_mandir}/man8/vgck.8.gz +%{_mandir}/man8/vgconvert.8.gz +%{_mandir}/man8/vgcreate.8.gz +%{_mandir}/man8/vgdisplay.8.gz +%{_mandir}/man8/vgexport.8.gz +%{_mandir}/man8/vgextend.8.gz +%{_mandir}/man8/vgimport.8.gz +%{_mandir}/man8/vgimportclone.8.gz +%{_mandir}/man8/vgimportdevices.8.gz +%{_mandir}/man8/vgmerge.8.gz +%{_mandir}/man8/vgmknodes.8.gz +%{_mandir}/man8/vgreduce.8.gz +%{_mandir}/man8/vgremove.8.gz +%{_mandir}/man8/vgrename.8.gz +%{_mandir}/man8/vgs.8.gz +%{_mandir}/man8/vgscan.8.gz +%{_mandir}/man8/vgsplit.8.gz +# %{_udevdir} is not defined? - 251 +%{_prefix}/lib/udev/rules.d/11-dm-lvm.rules +%{_prefix}/lib/udev/rules.d/69-dm-lvm.rules +%if %{with lvmpolld} +%{_mandir}/man8/lvmpolld.8.gz +%endif +%{_mandir}/man8/lvm-lvpoll.8.gz +%dir %{_sysconfdir}/lvm +%ghost %{_sysconfdir}/lvm/cache/.cache +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf +%dir %{_sysconfdir}/lvm/profile +%{_sysconfdir}/lvm/profile/command_profile_template.profile +%{_sysconfdir}/lvm/profile/metadata_profile_template.profile +%{_sysconfdir}/lvm/profile/thin-generic.profile +%{_sysconfdir}/lvm/profile/thin-performance.profile +%{_sysconfdir}/lvm/profile/cache-mq.profile +%{_sysconfdir}/lvm/profile/cache-smq.profile +%{_sysconfdir}/lvm/profile/lvmdbusd.profile +%{_sysconfdir}/lvm/profile/vdo-small.profile +%dir %{_sysconfdir}/lvm/backup +%dir %{_sysconfdir}/lvm/cache +%dir %{_sysconfdir}/lvm/archive +%dir %{_sysconfdir}/lvm/devices +%dir %{_rundir}/lock/lvm +%dir %{_rundir}/lvm +%{_tmpfilesdir}/%{name}.conf +%{_unitdir}/blk-availability.service +%{_unitdir}/lvm2-monitor.service +%if %{with lvmpolld} +%{_unitdir}/lvm2-lvmpolld.socket +%{_unitdir}/lvm2-lvmpolld.service +%endif +%{_unitdir}/lvm-devices-import.service +%{_unitdir}/lvm-devices-import.path +%dir %{_sharedstatedir}/lvm + +%files devel +%{_libdir}/liblvm2cmd.so +%{_libdir}/libdevmapper-event-lvm2.so +%{_includedir}/lvm2cmd.h + +%files libs +%license COPYING.LIB +%{_libdir}/liblvm2cmd.so.* +%{_libdir}/libdevmapper-event-lvm2.so.* +%dir %{_libdir}/device-mapper +%{_libdir}/device-mapper/libdevmapper-event-lvm2mirror.so +%{_libdir}/device-mapper/libdevmapper-event-lvm2snapshot.so +%{_libdir}/device-mapper/libdevmapper-event-lvm2raid.so +%{_libdir}/libdevmapper-event-lvm2mirror.so +%{_libdir}/libdevmapper-event-lvm2snapshot.so +%{_libdir}/libdevmapper-event-lvm2raid.so +%{_libdir}/libdevmapper-event-lvm2thin.so +%{_libdir}/device-mapper/libdevmapper-event-lvm2thin.so +%{_libdir}/libdevmapper-event-lvm2vdo.so +%{_libdir}/device-mapper/libdevmapper-event-lvm2vdo.so + +%if %{with lvmdbusd} +%files dbusd +%{_sbindir}/lvmdbusd +%{_sysconfdir}/dbus-1/system.d/com.redhat.lvmdbus1.conf +%{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service +%{_mandir}/man8/lvmdbusd.8.gz +%{_unitdir}/lvm2-lvmdbusd.service +%{python3_sitelib}/lvmdbusd +%endif + +%files -n device-mapper +%license COPYING COPYING.LIB +%doc WHATS_NEW_DM VERSION_DM README +%doc udev/12-dm-permissions.rules +%{_sbindir}/dmsetup +%{_sbindir}/blkdeactivate +%{_sbindir}/dmstats +%{_mandir}/man8/dmsetup.8.gz +%{_mandir}/man8/dmstats.8.gz +%{_mandir}/man8/blkdeactivate.8.gz +%if %{with dmfilemapd} +%{_sbindir}/dmfilemapd +%{_mandir}/man8/dmfilemapd.8.gz +%endif +%{_prefix}/lib/udev/rules.d/10-dm.rules +%{_prefix}/lib/udev/rules.d/13-dm-disk.rules +%{_prefix}/lib/udev/rules.d/95-dm-notify.rules + +%files -n device-mapper-devel +%{_libdir}/libdevmapper.so +%{_includedir}/libdevmapper.h +%{_libdir}/pkgconfig/devmapper.pc + +%files -n device-mapper-libs +%license COPYING COPYING.LIB +%{_libdir}/libdevmapper.so.* + +%files -n device-mapper-event +%{_sbindir}/dmeventd +%{_mandir}/man8/dmeventd.8.gz +%{_unitdir}/dm-event.socket +%{_unitdir}/dm-event.service + +%files -n device-mapper-event-libs +%license COPYING.LIB +%{_libdir}/libdevmapper-event.so.* + +%files -n device-mapper-event-devel +%{_libdir}/libdevmapper-event.so +%{_includedir}/libdevmapper-event.h +%{_libdir}/pkgconfig/devmapper-event.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/lz4/lz4-export.diff b/SPECS/lz4/lz4-export.diff new file mode 100644 index 00000000..6bec0003 --- /dev/null +++ b/SPECS/lz4/lz4-export.diff @@ -0,0 +1,21 @@ + +[ 9s] bench.o: In function `BMK_benchMem': +[ 9s] /home/abuild/rpmbuild/BUILD/lz4-1.8.0/programs/bench.c:221: undefined reference to `LZ4_XXH64' + +--- + lib/xxhash.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: lz4-1.9.1/lib/xxhash.h +=================================================================== +--- lz4-1.9.1.orig/lib/xxhash.h ++++ lz4-1.9.1/lib/xxhash.h +@@ -107,7 +107,7 @@ typedef enum { XXH_OK=0, XXH_ERROR } XXH + # define XXH_PUBLIC_API static + # endif + #else +-# define XXH_PUBLIC_API /* do nothing */ ++# define XXH_PUBLIC_API __attribute__((visibility("default"))) /* do nothing */ + #endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */ + + /*! XXH_NAMESPACE, aka Namespace Emulation : diff --git a/SPECS/lz4/lz4.spec b/SPECS/lz4/lz4.spec new file mode 100644 index 00000000..0118aec4 --- /dev/null +++ b/SPECS/lz4/lz4.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lz4 +Version: 1.10.0 +Release: %autorelease +Summary: Hash-based Predictive Lempel–Ziv compressor +License: BSD-2-Clause AND GPL-2.0-or-later +URL: https://lz4.github.io/lz4/ +#!RemoteAsset +Source: https://github.com/lz4/lz4/releases/download/v%{version}/lz4-%{version}.tar.gz +Patch1: lz4-export.diff +BuildRequires: pkgconfig +BuildRequires: make +BuildSystem: autotools +BuildOption(build): PREFIX=%{_prefix} +BuildOption(install): PREFIX=%{_prefix} LIBDIR=%{_libdir} +%description +LZ4 is a lossless data compression algorithm that is focused on +compression and decompression speed. It belongs to the LZ77 +(Lempel–Ziv) family of byte-oriented compression schemes. It is a +LZP2 fork and provides better compression ratio for text files. + +This subpackage provides a GPL command-line utility to make use of +the LZ4 algorithm. + +%package devel +Summary: Development files for the LZ4 compressor +License: BSD-2-Clause +Requires: %{name} = %version + +%description devel +LZ4 is a lossless data compression algorithm that is focused on +compression and decompression speed. It belongs to the LZ77 +(Lempel–Ziv) family of byte-oriented compression schemes. It is a + +This subpackage contains libraries and header files for developing +applications that want to make use of liblz4. + +%package static +Summary: Static version of %{name} library +Requires: %{name}-devel = %{version} + +%description static +Static library for the %{name} library + +# no configure script +%conf + +%ldconfig_scriptlets + +%files +%_bindir/lz4* +%_bindir/unlz4 +%_mandir/man1/*.1* +%{_libdir}/liblz4.so.1* + +%files devel +%{_includedir}/lz4*.h +%{_libdir}/liblz4.so +%{_libdir}/pkgconfig/*.pc + +%files static +%{_libdir}/liblz4.a + +%changelog +%{?autochangelog} diff --git a/SPECS/lzip/lzip.spec b/SPECS/lzip/lzip.spec new file mode 100644 index 00000000..3f917730 --- /dev/null +++ b/SPECS/lzip/lzip.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lzip +Version: 1.25 +Release: %autorelease +Summary: Lossless file compressor based on the LZMA algorithm +License: GPL-3.0-or-later +Group: Archiving/Compression +URL: https://www.nongnu.org/lzip/lzip.html +#!RemoteAsset +Source: https://download.savannah.nongnu.org/releases/lzip/lzip-%{version}.tar.gz +BuildRequires: gcc-c++ +Buildsystem: autotools +%description +Lzip is a lossless file compressor based on the LZMA (Lempel-Ziv-Markov +chain-Algorithm) algorithm. + The high compression of LZMA comes from +combining two basic, well-proven compression ideas: sliding dictionaries +(i.e. LZ77/78), and markov models (i.e. the thing used by every +compression algorithm that uses a range encoder or similar order-0 +entropy coder as its last stage) with segregation of contexts according +to what the bits are used for. + +Lzip is not a replacement for gzip or bzip2, but a complement; which +one is best to use depends on user's needs. Gzip is the fastest and most +widely used. Bzip2 compresses better than gzip but is slower, both +compressing and decompressing. +Lzip decompresses almost as fast as gzip +and compresses better than bzip2, but requires more memory and time +during compression. These features make lzip well suited for software +distribution and data archival. + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/%{name} +%{_infodir}/%{name}.info%{?ext_info} +%{_mandir}/man1/%{name}.1%{?ext_man} + + +%changelog +%{?autochangelog} diff --git a/SPECS/lzlib/lzlib.spec b/SPECS/lzlib/lzlib.spec new file mode 100644 index 00000000..4cc88ae6 --- /dev/null +++ b/SPECS/lzlib/lzlib.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lzlib +Version: 1.15 +Release: %autorelease +Summary: Lzip data compression C library +License: GPLv2+ AND BSD-2-Clause +URL: https://www.nongnu.org/lzip/lzlib.html +#!RemoteAsset +Source0: https://download.savannah.nongnu.org/releases/lzip/lzlib/lzlib-%{version}.tar.gz +#!RemoteAsset +Source1: https://download.savannah.nongnu.org/releases/lzip/lzlib/lzlib-%{version}.tar.gz.sig +BuildSystem: autotools +BuildOption(conf): --disable-static +BuildOption(conf): --enable-shared +BuildRequires: gcc autoconf automake +BuildRequires: texinfo + +%description +Lzlib is a C library for in-memory LZMA compression and decompression in +the lzip format. It supports integrity checking of the decompressed data, and +all functions are thread-safe. The library should never crash, even in case of +corrupted input. + +%package devel +Summary: Development files for the lzlib +License: BSD-2-Clause +Requires: %{name} = %version + +%description devel +This subpackage contains libraries and header files for developing +applications that want to make use of lzlib. + +%files +%doc README +%license COPYING COPYING.GPL +%{_libdir}/liblz.so* + +%files devel +%{_includedir}/lzlib.h +%{_libdir}/liblz.so +%{_infodir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/lzo/lzo.spec b/SPECS/lzo/lzo.spec new file mode 100644 index 00000000..61b1d9d7 --- /dev/null +++ b/SPECS/lzo/lzo.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lzo +Version: 2.10 +Release: %autorelease +License: GPL-2.0-or-later +URL: https://www.oberhumer.com/opensource/lzo/ +#!RemoteAsset +Source0: https://www.oberhumer.com/opensource/%{name}/download/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --enable-shared + +Summary: Data compression library suitable for real-time data de-/compression +%description +LZO is a data compression library which is suitable for data +de-/compression in real-time. This means it favours speed over +compression ratio. + +LZO is written in ANSI C. Both the source code and the compressed data +format are designed to be portable across platforms. + + +%package devel +Summary: Development files for lzo +Requires: lzo = %{version} + +%description devel +LZO is a portable lossless data compression library written in ANSI C. +Decompression requires no memory. LZO is suitable for data +de-/compression in real-time. This means it favours speed over +compression ratio. + + +%ldconfig_scriptlets + +%files +%license COPYING +%doc %{_docdir}/%{name} +%{_libdir}/liblzo2.so.* + +%files devel +%doc AUTHORS BUGS NEWS README THANKS +%doc doc/* util/* +%{_libdir}/liblzo2.so +%{_libdir}/liblzo2.a +%{_includedir}/lzo +%{_libdir}/pkgconfig/lzo2.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/lzop/lzop.spec b/SPECS/lzop/lzop.spec new file mode 100644 index 00000000..76761068 --- /dev/null +++ b/SPECS/lzop/lzop.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: lzop +Version: 1.04 +Release: %autorelease +Summary: A fast LZ-based file compressor +License: GPL-2.0-or-later +Group: Productivity/Archiving/Compression +URL: https://www.lzop.org/ +#!RemoteAsset +Source: https://www.lzop.org/download/lzop-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM:STRING=3.5 + +BuildRequires: cmake +BuildRequires: pkgconfig +BuildRequires: pkgconfig(lzo2) + +%description +lzop is a file compressor which is very similar to gzip. lzop favors speed over +compression ratio. + +lzop was designed with the following goals in mind: +- Speed (both compression and decompression) +- Reasonable drop-in compatibility to gzip +- Portability + +%files +%doc AUTHORS ChangeLog NEWS README THANKS +%license COPYING +%{_bindir}/lzop +%{_mandir}/man1/lzop.1* +%doc %{_docdir}/lzop + +%changelog +%{?autochangelog} diff --git a/SPECS/m4/m4.spec b/SPECS/m4/m4.spec new file mode 100644 index 00000000..d73f21f7 --- /dev/null +++ b/SPECS/m4/m4.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Define build conditionals for optional features +%bcond nls 0 + +Name: m4 +Version: 1.4.20 +Release: %autorelease +Summary: The GNU macro processor +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/m4/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz + +BuildSystem: autotools +BuildOption(conf): --without-included-regex +%if %{with nls} +BuildOption(conf): --enable-nls +%else +BuildOption(conf): --disable-nls +%endif + +BuildRequires: gcc +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +%if %{with nls} +BuildRequires: gettext +%endif + +%description +A GNU implementation of the traditional UNIX macro processor. M4 is +useful for writing text files which can be logically parsed, and is used +by many programs, such as autoconf, as part of their build process. + +%if %{with nls} +%install -a +rm -f %{buildroot}%{_infodir}/dir + +%find_lang %{name} --generate-subpackages +%endif + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README THANKS TODO +%{_bindir}/m4 +%{_mandir}/man1/m4.1* +%{_infodir}/m4.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/make/make.spec b/SPECS/make/make.spec new file mode 100644 index 00000000..89d1b503 --- /dev/null +++ b/SPECS/make/make.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond_with guile + +Name: make +Version: 4.4.1 +Release: %autorelease +Summary: A tool which controls the generation of executables and non-source files of a program +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/make/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz + +BuildSystem: autotools +%if %{with guile} +BuildOption(conf): --with-guile +%else +BuildOption(conf): --without-guile +%endif + +BuildRequires: gcc autoconf automake +BuildRequires: make +%if %{with guile} +BuildRequires: guile-devel +%endif +Provides: %{name}-devel = %{version}-%{release} +Obsoletes: %{name}-devel < %{version}-%{release} + +%description +GNU Make is a tool which controls the generation of executables and other +non-source files of a program from the program's source files. + +Make gets its knowledge of how to build your program from a file called +the makefile, which lists each of the non-source files and how to compute +it from other files. When you write a program, you should write a makefile +for it, so that it is possible to use Make to build and install the program. + +%build -p +touch configure aclocal.m4 Makefile.in + +%install -a +ln -sf make %{buildroot}/%{_bindir}/gmake +ln -sf make.1 %{buildroot}/%{_mandir}/man1/gmake.1 +rm -f %{buildroot}/%{_infodir}/dir +%find_lang %{name} --generate-subpackages + +%check +# check will fail if running the test with -j2 +# http://savannah.gnu.org/bugs/?func=detailitem&item_id=53152 +if [ "%{_smp_mflags}" = "-j2" ]; then + echo "test will fail with make -j2 check" +else +/usr/bin/env LANG=C make check || { + for f in tests/work/*/*.diff; do + test -f "$f" || continue + printf "++++++++++++++ %s ++++++++++++++\n" "${f##*/}" + cat "$f" + done +} +fi + +%files +%license COPYING +%doc README AUTHORS +%{_bindir}/* +%{_includedir}/* +%doc NEWS +%{_mandir}/*/* +%{_infodir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/man-db/man-db.spec b/SPECS/man-db/man-db.spec new file mode 100644 index 00000000..1977eb95 --- /dev/null +++ b/SPECS/man-db/man-db.spec @@ -0,0 +1,168 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: man-db +Version: 2.13.1 +Release: %autorelease +Summary: Tools for searching and reading man pages +License: GPL-2.0-or-later +URL: https://savannah.nongnu.org/projects/man-db +VCS: git:https://git.savannah.nongnu.org/git/man-db.git +#!RemoteAsset +Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz.asc +BuildSystem: autotools + +BuildOption(conf): --with-sections="1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" +BuildOption(conf): --disable-setuid +BuildOption(conf): --enable-cache-owner=root +BuildOption(conf): --with-systemdsystemunitdir=/usr/lib/systemd/system +BuildOption(conf): --with-override-dir=overrides + +BuildRequires: make +BuildRequires: less +BuildRequires: groff +BuildRequires: groff-base +BuildRequires: gdbm-devel +BuildRequires: pkgconfig(libpipeline) +BuildRequires: pkgconfig(zlib) + +Provides: man = %{version} +Provides: man-pages-reader = %{version} + +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +%description +The man-db package includes five tools for browsing man-pages: +man, whatis, apropos, manpath and lexgrog. man formats and displays +manual pages. whatis searches the manual page names. apropos searches the +manual page names and descriptions. manpath determines search path +for manual pages. lexgrog directly reads header information in +manual pages. + +%install -a +# rename files for alternative usage +for f in man apropos whatis; do + mv %{buildroot}%{_bindir}/$f %{buildroot}%{_bindir}/$f.%{name} + touch %{buildroot}%{_bindir}/$f + mv %{buildroot}%{_mandir}/man1/$f.1 %{buildroot}%{_mandir}/man1/$f.%{name}.1 + touch %{buildroot}%{_mandir}/man1/$f.1 +done + +# move the documentation to the relevant place +mv %{buildroot}%{_datadir}/doc/man-db/* ./ + +# remove zsoelim man page - part of groff package +rm %{buildroot}%{_datadir}/man/man1/zsoelim.1 + +# remove libtool archives +rm %{buildroot}%{_libdir}/man-db/*.la + +# install cache directory +install -d -m 0755 %{buildroot}%{_localstatedir}/cache/man + +# config for tmpfiles.d +install -D -p -m 0644 init/systemd/man-db.conf %{buildroot}/usr/lib/tmpfiles.d/. + +# One package have two lang files +%find_lang %{name} +%find_lang %{name}-gnulib + +%pre +# remove alternativized files if they are not symlinks +for f in man apropos whatis; do + [ -L %{_bindir}/$f ] || %{__rm} -f %{_bindir}/$f >/dev/null 2>&1 || : + [ -L %{_mandir}/man1/$f.1.gz ] || %{__rm} -f %{_mandir}/man1/$f.1.gz >/dev/null 2>&1 || : +done + +# stop and disable timer from previous builds +if [ -e /usr/lib/systemd/system/mandb.timer ]; then + if test -d /run/systemd; then + systemctl stop man-db.timer >/dev/null 2>&1 || : + systemctl -q disable man-db.timer >/dev/null 2>&1 || : + fi +fi +%service_add_pre man-db.service man-db.timer + +%post +# set up the alternatives files +%{_sbindir}/update-alternatives --install %{_bindir}/man man %{_bindir}/man.%{name} 300 \ + --slave %{_bindir}/apropos apropos %{_bindir}/apropos.%{name} \ + --slave %{_bindir}/whatis whatis %{_bindir}/whatis.%{name} \ + --slave %{_mandir}/man1/man.1.gz man.1.gz %{_mandir}/man1/man.%{name}.1.gz \ + --slave %{_mandir}/man1/apropos.1.gz apropos.1.gz %{_mandir}/man1/apropos.%{name}.1.gz \ + --slave %{_mandir}/man1/whatis.1.gz whatis.1.gz %{_mandir}/man1/whatis.%{name}.1.gz \ + >/dev/null 2>&1 || : + +# clear the old cache +%{__rm} -rf %{cache}/* >/dev/null 2>&1 || : +%service_add_post man-db.service man-db.timer + +%preun +if [ $1 -eq 0 ]; then + %{_sbindir}/update-alternatives --remove man %{_bindir}/man.%{name} >/dev/null 2>&1 || : +fi +%service_del_preun man-db.service man-db.timer + +%postun +if [ $1 -ge 1 ]; then + if [ "$(readlink %{_sysconfdir}/alternatives/man)" == "%{_bindir}/man.%{name}" ]; then + %{_sbindir}/update-alternatives --set man %{_bindir}/man.%{name} >/dev/null 2>&1 || : + fi +fi +%service_del_postun man-db.service man-db.timer + +%check -p +export LANG=C + +%files -f %{name}.lang -f %{name}-gnulib.lang +%license COPYING +%doc README.md man-db-manual.txt man-db-manual.ps ChangeLog NEWS.md +%config(noreplace) %{_sysconfdir}/man_db.conf +%config(noreplace) %{_tmpfilesdir}/man-db.conf +%{_sbindir}/accessdb +%ghost %{_bindir}/man +%ghost %{_bindir}/apropos +%ghost %{_bindir}/whatis +%{_bindir}/man.%{name} +%{_bindir}/apropos.%{name} +%{_bindir}/whatis.%{name} +%{_bindir}/man-recode +%{_bindir}/manpath +%{_bindir}/lexgrog +%{_bindir}/catman +%{_bindir}/mandb +%dir %{_libdir}/man-db +%{_libdir}/man-db/*.so +%dir %{_libexecdir}/man-db +%{_libexecdir}/man-db/globbing +%{_libexecdir}/man-db/manconv +%{_libexecdir}/man-db/zsoelim +%{_unitdir}/man-db.service +%{_unitdir}/man-db.timer +%verify(not mtime) %dir %{_localstatedir}/cache/man +%ghost %{_mandir}/man1/man.1* +%ghost %{_mandir}/man1/apropos.1* +%ghost %{_mandir}/man1/whatis.1* +%{_mandir}/man1/man.%{name}.1* +%{_mandir}/man1/apropos.%{name}.1* +%{_mandir}/man1/whatis.%{name}.1* +%{_mandir}/man1/man-recode.1* +%{_mandir}/man1/lexgrog.1* +%{_mandir}/man1/manconv.1* +%{_mandir}/man1/manpath.1* +%{_mandir}/man5/manpath.5* +%{_mandir}/man8/accessdb.8* +%{_mandir}/man8/catman.8* +%{_mandir}/man8/mandb.8* +%lang(it) %{_datadir}/man/it/man*/* + +%changelog +%{?autochangelog} diff --git a/SPECS/mandoc/mandoc.spec b/SPECS/mandoc/mandoc.spec new file mode 100644 index 00000000..2f0d1348 --- /dev/null +++ b/SPECS/mandoc/mandoc.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mandoc +Version: 1.14.6 +Release: %autorelease +Summary: UNIX manpage compiler +License: ISC +URL: https://mandoc.bsd.lv/ +#!RemoteAsset +Source: https://mandoc.bsd.lv/snapshots/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: zlib-devel + +%description +The mandoc manpage compiler toolset (formerly called "mdocml") +is a suite of tools compiling mdoc(7), the roff(7) macro language +of choice for BSD manual pages, and man(7), the predominant +historical language for UNIX manuals. + +It includes a man(1) manual viewer and additional tools. +For general information, see . + +%conf -p +cd %{name}-%{version} + +cat > configure.local << 'EOF' +PREFIX=%{_prefix} +BINDIR=%{_bindir} +SBINDIR=%{_sbindir} +MANDIR=%{_mandir} +INCLUDEDIR=%{_includedir} +LIBDIR=%{_libdir} +LN="ln -sf" +MANM_MANCONF=mandoc.conf +INSTALL_PROGRAM="${INSTALL} -m 0755" +INSTALL_LIB="${INSTALL} -m 0755" +INSTALL_MAN="${INSTALL} -m 0644" +INSTALL_DATA="${INSTALL} -m 0644" +INSTALL_LIBMANDOC=1 +CFLAGS="%{optflags} -fPIC" +EOF + +%build -p +cd %{name}-%{version} + +%install -p +cd %{name}-%{version} + +%install -a +find %{buildroot} -type f -name "*.a" -delete -print + +%files +%license mandoc-%{version}/LICENSE +%{_includedir}/*.h +%{_bindir}/apropos +%{_bindir}/demandoc +%{_bindir}/man +%{_bindir}/mandoc +%{_bindir}/soelim +%{_bindir}/whatis +%{_sbindir}/makewhatis +%{_mandir}/man1/*.1* +%{_mandir}/man3/*.3* +%{_mandir}/man5/*.5* +%{_mandir}/man7/*.7* +%{_mandir}/man8/*.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/meson/meson.spec b/SPECS/meson/meson.spec new file mode 100644 index 00000000..5d671f9d --- /dev/null +++ b/SPECS/meson/meson.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: meson +Version: 1.9.0 +Release: %autorelease +Summary: High productivity build system +License: Apache-2.0 +URL: https://mesonbuild.com/ +#!RemoteAsset +Source0: https://github.com/mesonbuild/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/mesonbuild/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz.asc +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: expat +Requires: python%{python3_version}dist(setuptools) +Requires: ninja +Requires: python3 + +%description +Meson is a build system designed to optimize programmer +productivity. It aims to do this by providing simple, out-of-the-box +support for modern software development tools and practices, such as +unit tests, coverage reports, Valgrind, CCache and the like. + +%prep +%autosetup -p1 -n meson-%{version} +# Macro should not change when we are redefining bindir +sed -i -e "/^%%__meson /s| .*$| %{_bindir}/%{name}|" data/macros.%{name} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +install -Dpm0644 -t %{buildroot}%{_rpmmacrodir} data/macros.%{name} +install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions/ data/shell-completions/bash/meson +install -Dpm0644 -t %{buildroot}%{_datadir}/zsh/site-functions/ data/shell-completions/zsh/_meson + +%files +%license COPYING +%{_bindir}/%{name} +%{python3_sitelib}/mesonbuild/ +%{python3_sitelib}/%{name}-*.dist-info/ +%{_mandir}/man1/%{name}.1* +%{_rpmmacrodir}/macros.%{name} +%dir %{_datadir}/polkit-1 +%dir %{_datadir}/polkit-1/actions +%{_datadir}/polkit-1/actions/com.mesonbuild.install.policy +%{_datadir}/bash-completion/completions/meson +%{_datadir}/zsh/site-functions/_meson + +%changelog +%{?autochangelog} diff --git a/SPECS/mimalloc/mimalloc.spec b/SPECS/mimalloc/mimalloc.spec new file mode 100644 index 00000000..fa38deef --- /dev/null +++ b/SPECS/mimalloc/mimalloc.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mimalloc +Version: 3.1.5 +Release: %autorelease +Summary: A general purpose allocator with excellent performance + +License: MIT +URL: https://github.com/microsoft/mimalloc +#!RemoteAsset +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildSystem: cmake + +BuildOption(conf): -DMI_INSTALL_TOPLEVEL=ON +# if you want to override malloc/free globally, set this to ON +BuildOption(conf): -DMI_OVERRIDE=OFF +BuildOption(conf): -DMI_BUILD_STATIC=OFF +BuildOption(conf): -DMI_BUILD_OBJECT=OFF +BuildOption(conf): -DMI_BUILD_TESTS=ON +BuildOption(conf): -DMI_OPT_ARCH=ON +BuildOption(conf): -DCMAKE_BUILD_TYPE=Release + +BuildRequires: cmake +BuildRequires: gcc-c++ + +%description +mimalloc (pronounced "me-malloc") is a general purpose allocator with +excellent performance characteristics. Initially developed by Daan Leijen +for run-time systems. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the libraries and header files needed to develop +applications that use mimalloc. + +%prep -a +# Remove any pre-compiled binaries from the source tarball. +rm -rf bin + +%files +%license LICENSE +%doc readme.md +%{_libdir}/lib%{name}.so.* + +%files devel +%{_includedir}/mimalloc.h +%{_includedir}/mimalloc-new-delete.h +%{_includedir}/mimalloc-override.h +%{_includedir}/mimalloc-stats.h +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/cmake/%{name}/ + +%changelog +%{?autochangelog} diff --git a/SPECS/minicom/minicom.spec b/SPECS/minicom/minicom.spec new file mode 100644 index 00000000..8ce906ee --- /dev/null +++ b/SPECS/minicom/minicom.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: minicom +Summary: A text-based modem control and terminal emulation program +Version: 2.10 +Release: %autorelease +URL: https://salsa.debian.org/minicom-team/minicom +# The file 'src/wildmat.c' is in Public Domain +License: GPL-2.0-or-later AND LGPL-2.0-or-later +#!RemoteAsset +Source0: https://salsa.debian.org/minicom-team/minicom/-/archive/%{version}/%{name}-%{version}.tar.gz + +BuildRequires: make gcc +BuildRequires: ncurses-devel autoconf automake gettext-devel +Recommends: lrzsz +BuildSystem: autotools + +%description +Minicom is a simple text-based modem control and terminal emulation +program somewhat similar to MSDOS Telix. Minicom includes a dialing +directory, full ANSI and VT100 emulation, an (external) scripting +language, and other features. + +%build -a +# Remove unused files to make sure we've got the License tag right. +rm -f lib/snprintf.c + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%doc ChangeLog AUTHORS NEWS TODO +%license COPYING +%{_bindir}/minicom +%{_bindir}/runscript +%{_bindir}/xminicom +%{_bindir}/ascii-xfr +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/mlocate/mlocate.spec b/SPECS/mlocate/mlocate.spec new file mode 100644 index 00000000..c6f6bf18 --- /dev/null +++ b/SPECS/mlocate/mlocate.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Summary: Locate files on the file system +Name: mlocate +Version: 0.26 +Release: %autorelease +License: GPL-2.0-only +URL: https://pagure.io/mlocate +#!RemoteAsset +Source0: http://releases.pagure.org/mlocate/mlocate-%{version}.tar.xz +BuildRequires: xz +BuildRequires: sed +BuildRequires: grep +BuildRequires: autoconf +BuildRequires: automake +BuildSystem: autotools + +BuildOption(conf): --localstatedir=%{_localstatedir}/lib + +%description +A new locate implementation. The m character +stands for merging, because updatedb reuses the +existing database to avoid re-reading most of the +file system. + +%conf -p +autoreconf -fiv + +%install -a +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%doc AUTHORS ChangeLog README NEWS +%defattr(-,root,root,-) +%attr(0755,root,root) %{_bindir}/locate +%{_bindir}/updatedb +%{_mandir}/man*/* +%{_datadir}/locale/en_GB/LC_MESSAGES/mlocate.mo + +%changelog +%{?autochangelog} diff --git a/SPECS/mokutil/mokutil.spec b/SPECS/mokutil/mokutil.spec new file mode 100644 index 00000000..b430c4ad --- /dev/null +++ b/SPECS/mokutil/mokutil.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mokutil +Version: 0.7.2 +Release: %autorelease +Summary: Tools for manipulating machine owner keys +License: GPLv3+ +URL: https://github.com/lcp/mokutil +#!RemoteAsset +Source0: https://github.com/lcp/mokutil/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gcc autoconf automake libtool +BuildRequires: openssl-devel keyutils-devel efivar-devel +BuildRequires: pkgconfig + +%description +The utility to manipulate machine owner keys which are managed by shim. + +%conf -p +autoreconf -fiv + +%files +%license COPYING +%doc README +%{_bindir}/mokutil +%{_datadir}/bash-completion/completions/mokutil +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/mold/0001-Use-system-compatible-include-path-for-xxhash.h.patch b/SPECS/mold/0001-Use-system-compatible-include-path-for-xxhash.h.patch new file mode 100644 index 00000000..cc4dc0cc --- /dev/null +++ b/SPECS/mold/0001-Use-system-compatible-include-path-for-xxhash.h.patch @@ -0,0 +1,44 @@ +From bd078876b1d067e882308b51973a373fb18fc5b1 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Christoph Erhardt +Date: Sat, 6 Aug 2022 09:18:54 +0200 +Subject: [PATCH] Use system-compatible include path for `xxhash.h` + +Distributors that build mold against the system-provided xxHash package +expect its header file `xxhash.h` in the top-level include directory, +not in an `xxhash` subdirectory. Adjust the include path and the +`#include` directive accordingly. +--- + CMakeLists.txt | 2 ++ + lib/lib.h | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0038d391..f28ae233 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -233,6 +233,8 @@ else() + mold_add_tbb() + endif() + ++target_include_directories(mold PRIVATE third-party/xxhash) ++ + # We always use Clang to build mold on Windows. MSVC can't compile mold. + if(WIN32) + if(MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +diff --git a/lib/lib.h b/lib/lib.h +index b2a85dd9..6ca2d2e3 100644 +--- a/lib/lib.h ++++ b/lib/lib.h +@@ -36,7 +36,7 @@ + #endif + + #define XXH_INLINE_ALL 1 +-#include "../third-party/xxhash/xxhash.h" ++#include + + #ifdef NDEBUG + # define unreachable() __builtin_unreachable() +-- +2.49.0 + diff --git a/SPECS/mold/mold.spec b/SPECS/mold/mold.spec new file mode 100644 index 00000000..11961156 --- /dev/null +++ b/SPECS/mold/mold.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mold +Version: 2.40.4 +Release: %autorelease +Summary: A Modern Linker +License: MIT AND (Apache-2.0 OR MIT) +URL: https://github.com/rui314/mold +#!RemoteAsset +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +# Allow building against the system-provided `xxhash.h` +Patch0: 0001-Use-system-compatible-include-path-for-xxhash.h.patch +BuildSystem: cmake +# use bundled mimalloc +# BuildOption(conf): -DMOLD_USE_SYSTEM_MIMALLOC=ON + +# use bundled blake3 to decrease dependency +# BuildRequires: blake3-devel +BuildRequires: cmake +BuildRequires: gcc gcc-c++ +# BuildRequires: mimalloc-devel +BuildRequires: xxhash-devel zlib-devel zstd-devel +Provides: bundled(tbb) = 2022.1 +Provides: bundled(blake3) +Provides: bundled(mimalloc) + +Requires(post): update-alternatives +Requires(preun):update-alternatives + +%description +mold is a faster drop-in replacement for existing Unix linkers. +It is several times faster than the LLVM lld linker. +mold is designed to increase developer productivity by reducing +build time, especially in rapid debug-edit-rebuild cycles. + +%post +if [ "$1" = 1 ]; then + update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.mold 100 +fi + +%postun +if [ "$1" = 0 ]; then + update-alternatives --remove ld %{_bindir}/ld.mold +fi + +%files +%license %{_docdir}/mold/LICENSE +%ghost %{_bindir}/ld +%{_bindir}/mold +%{_bindir}/ld.mold +%{_libdir}/mold/mold-wrapper.so +%{_libexecdir}/mold/ld +%{_mandir}/man1/ld.mold.1* +%{_mandir}/man1/mold.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/mpc/mpc.spec b/SPECS/mpc/mpc.spec new file mode 100644 index 00000000..ec5caf2c --- /dev/null +++ b/SPECS/mpc/mpc.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mpc +Version: 1.3.1 +Release: %autorelease +Summary: multiple-precision complex shared library +License: LGPL-3.0-or-later +Group: Development/Libraries/C and C++ +URL: http://www.multiprecision.org/mpc/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/mpc/mpc-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/mpc/mpc-%{version}.tar.gz.sig +BuildRequires: pkgconfig +BuildRequires: pkgconfig(gmp) >= 5.0.0 +BuildRequires: pkgconfig(mpfr) >= 4.1.0 +BuildSystem: autotools + +%description +MPC is a C library for the arithmetic of complex numbers with +arbitrarily high precision and correct rounding of the result. It is +built upon and follows the same principles as MPFR. + +%package -n libmpc3 +Summary: MPC multiple-precision complex shared library +Group: Development/Libraries/C and C++ + +%description -n libmpc3 +MPC is a C library for the arithmetic of complex numbers with +arbitrarily high precision and correct rounding of the result. It is +built upon and follows the same principles as MPFR. + +%package devel +Summary: MPC multiple-precision complex library development files +Group: Development/Libraries/C and C++ +Requires: libmpc3 = %{version} +Requires: pkgconfig(gmp) >= 5.0.0 +Requires: pkgconfig(mpfr) >= 4.1.0 + +%description devel +MPC multiple-precision complex library development files. + +%check +%make_build check + +%post -n libmpc3 -p /sbin/ldconfig + +%postun -n libmpc3 -p /sbin/ldconfig + +%files -n libmpc3 +%defattr(-,root,root) +%license COPYING.LESSER +%{_libdir}/libmpc.so.3* + +%files devel +%defattr(-,root,root) +%license COPYING.LESSER +%doc AUTHORS NEWS +%{_infodir}/mpc.info* +%{_libdir}/libmpc.a +%{_libdir}/libmpc.so +%{_includedir}/mpc.h + +%changelog +%{?autochangelog} diff --git a/SPECS/mpdecimal/mpdecimal.spec b/SPECS/mpdecimal/mpdecimal.spec new file mode 100644 index 00000000..69efa8f9 --- /dev/null +++ b/SPECS/mpdecimal/mpdecimal.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mpdecimal +Version: 4.0.1 +Release: %autorelease +Summary: Library for general decimal arithmetic +License: BSD-2-Clause +URL: https://www.bytereef.org/mpdecimal/index.html +#!RemoteAsset +Source0: https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-%{version}.tar.gz +#!RemoteAsset +Source1: https://speleotrove.com/decimal/dectest.zip + +BuildSystem: autotools + +BuildOption(conf): --disable-static +# Set LDXXFLAGS to properly pass the buildroot +# linker flags to the C++ extension. +BuildOption(build): LDXXFLAGS="%{?build_ldflags}" + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: unzip + +%description +The package contains a library libmpdec implementing General Decimal +Arithmetic Specification. The specification, written by Mike Cowlishaw from +IBM, defines a general purpose arbitrary precision data type together with +rigorously specified functions and rounding behavior. + +%package -n %{name}++ +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Library for general decimal arithmetic (C++) + +%description -n %{name}++ +The package contains a library libmpdec++ implementing General Decimal +Arithmetic Specification. The specification, written by Mike Cowlishaw from +IBM, defines a general purpose arbitrary precision data type together with +rigorously specified functions and rounding behavior. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}++%{?_isa} = %{version}-%{release} +Summary: Development headers for mpdecimal library + +%description devel +The package contains development headers for the mpdecimal library. + +%prep -a +unzip -d tests/testdata %{SOURCE1} + +%install -a +# license will go into dedicated directory +rm %{buildroot}%{_docdir}/%{name}/COPYRIGHT.txt + +%files +%doc README.txt CHANGELOG.txt +%license COPYRIGHT.txt +%{_libdir}/libmpdec.so.%{version} +%{_libdir}/libmpdec.so.4 + +%files -n %{name}++ +%{_libdir}/libmpdec++.so.%{version} +%{_libdir}/libmpdec++.so.4 + +%files devel +%{_libdir}/libmpdec.so +%{_libdir}/libmpdec++.so +%{_includedir}/mpdecimal.h +%{_includedir}/decimal.hh +%{_libdir}/pkgconfig/libmpdec.pc +%{_libdir}/pkgconfig/libmpdec++.pc +%{_mandir}/man3/libmpdec.3* +%{_mandir}/man3/libmpdec++.3* +%{_mandir}/man3/mpdecimal*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/mpfr/mpfr.spec b/SPECS/mpfr/mpfr.spec new file mode 100644 index 00000000..beab5b2a --- /dev/null +++ b/SPECS/mpfr/mpfr.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mpfr +Version: 4.2.2 +Release: %autorelease +Summary: The GNU multiple-precision floating-point library +License: LGPL-3.0-or-later +URL: https://www.mpfr.org/ +#!RemoteAsset +Source0: https://www.mpfr.org/mpfr-%{version}/mpfr-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.mpfr.org/mpfr-%{version}/mpfr-%{version}.tar.xz.asc +Buildsystem: autotools +BuildRequires: gmp-devel +BuildRequires: pkgconfig + +%description +The MPFR library is a C library for multiple-precision floating-point +computations with exact rounding (also called correct rounding). It is +based on the GMP multiple-precision library. + +The main goal of MPFR is to provide a library for multiple-precision +floating-point computation which is both efficient and has a +well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 +standard for double-precision floating-point arithmetic (53-bit +mantissa). + +%package devel +Summary: Development files for the GNU multiple-precision floating-point library +Requires: gmp-devel +Requires: mpfr = %{version} + +%description devel +Development files for the GNU multiple-precision floating-point library. + +The MPFR library is a C library for multiple-precision floating-point +computations with exact rounding (also called correct rounding). It is +based on the GMP multiple-precision library. + +%conf +%configure \ + --enable-thread-safe \ + --enable-shared \ + --disable-static \ + --docdir=%{_docdir}/%{name} + +%ldconfig_scriptlets + +%files +%license COPYING* +%{_libdir}/libmpfr.so.6* + +%files devel +%license COPYING* +%doc %{_docdir}/mpfr +%{_infodir}/mpfr.info* +%{_libdir}/libmpfr.so +%{_includedir}/mpf2mpfr.h +%{_includedir}/mpfr.h +%{_libdir}/pkgconfig/mpfr.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/mtd-utils/mtd-utils.spec b/SPECS/mtd-utils/mtd-utils.spec new file mode 100644 index 00000000..fc7f11e2 --- /dev/null +++ b/SPECS/mtd-utils/mtd-utils.spec @@ -0,0 +1,74 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mtd-utils +Version: 2.3.0 +Release: %autorelease +Summary: Utilities for dealing with MTD (flash) devices +License: GPL-2.0-or-later +URL: http://www.linux-mtd.infradead.org/ +#!RemoteAsset +Source: https://infraroot.at/pub/mtd/mtd-utils-%{version}.tar.bz2 +BuildSystem: autotools +BuildOption(conf): --without-tests +BuildOption(conf): --disable-unit-tests +BuildRequires: make autoconf automake libtool +BuildRequires: pkgconfig(libacl) +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(cmocka) +BuildRequires: lzo-devel + +%description +The mtd-utils package contains utilities for handling MTD devices, +and for dealing with FTL, NFTL, JFFS2, etc. + +%package ubi +Summary: Utilities for dealing with UBI +Requires: %{name} = %{version} + +%description ubi +The mtd-utils-ubi package contains utilities for manipulating UBI on +MTD (flash) devices. + +%conf -p +autoreconf -fiv + +%ldconfig_scriptlets + +%files +%license COPYING +%{_sbindir}/doc* +%{_sbindir}/flash* +%{_sbindir}/ftl* +%{_sbindir}/jffs2dump +%{_sbindir}/jffs2reader +%{_sbindir}/lsmtd +%{_sbindir}/mkfs.jffs2 +%{_sbindir}/mtd_debug +%{_sbindir}/nand* +%{_sbindir}/nftl* +%{_sbindir}/recv_image +%{_sbindir}/rfd* +%{_sbindir}/serve_image +%{_sbindir}/sumtool +%{_sbindir}/mkfs.ubifs +%{_sbindir}/mtdinfo +%{_sbindir}/mtdpart +%{_sbindir}/fectest +%{_mandir}/man*/* + +%files ubi +%{_sbindir}/ubi* +%{_sbindir}/mount.ubifs +%{_sbindir}/fsck.ubifs + +%changelog +%{?autochangelog} diff --git a/SPECS/mtdev/mtdev.spec b/SPECS/mtdev/mtdev.spec new file mode 100644 index 00000000..a677ae4c --- /dev/null +++ b/SPECS/mtdev/mtdev.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: mtdev +Version: 1.1.7 +Release: %autorelease +Summary: Multitouch Protocol Translation Library +License: MIT +URL: http://bitmath.org/code/mtdev +#!RemoteAsset +Source0: http://bitmath.org/code/mtdev/mtdev-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: gcc autoconf automake libtool + +%description +The mtdev is a stand-alone library which transforms all variants of kernel MT +events to the slotted type B protocol. The events put into mtdev may be from +any MT device, specifically type A without contact tracking, type A with contact +tracking, or type B with contact tracking. + +%package devel +Summary: Development files for the mtdev library +Requires: pkgconfig +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and a test utility for +developing applications that use the mtdev library. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%doc README +%license COPYING +%{_libdir}/libmtdev.so.* + +%files devel +%{_bindir}/mtdev-test +%{_includedir}/mtdev*.h +%{_libdir}/libmtdev.so +%{_libdir}/pkgconfig/mtdev.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/multipath-tools/multipath-tools.spec b/SPECS/multipath-tools/multipath-tools.spec new file mode 100644 index 00000000..5d54f6aa --- /dev/null +++ b/SPECS/multipath-tools/multipath-tools.spec @@ -0,0 +1,198 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test + +Name: multipath-tools +Version: 0.11.1 +Release: %autorelease +Summary: Tools to manage multipath devices using device-mapper +License: GPL-2.0-only AND GPL-3.0-or-later +URL: https://github.com/opensvc/multipath-tools +#!RemoteAsset +Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): LIB=%{_lib} +BuildOption(install): bindir=%{_sbindir} +BuildOption(install): syslibdir=%{_libdir} +BuildOption(install): usrlibdir=%{_libdir} +BuildOption(install): plugindir=%{_libmpathdir} +BuildOption(install): mandir=%{_mandir} +BuildOption(install): unitdir=%{_unitdir} +BuildOption(install): includedir=%{_includedir} +BuildOption(install): pkgconfigdir=%{_pkgconfdir} +BuildOption(install): tmpfilesdir=%{_tmpfilesdir} + +BuildRequires: libaio-devel +BuildRequires: readline-devel +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(devmapper) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(liburcu) +BuildRequires: pkgconfig(mount) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(udev) +BuildRequires: pkgconfig(cmocka) + +Requires: device-mapper >= 1.2.78 +Requires: kpartx + +%description +multipath-tools provides tools to manage multipath devices by +instructing the device-mapper multipath kernel module what to do. +The tools are : +* multipath - Scan the system for multipath devices and assemble them. +* multipathd - Detects when paths fail and execs multipath to update things. + +%package libs +Summary: The multipath-tools modules and shared library +# only libmpathcmd is LGPL-2.1-or-later AND LGPL-2.0-or-later +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later + +%description libs +The multipath-tools-libs provides the path checker +and prioritizer modules. It also contains the libmpathpersist and +libmpathcmd shared libraries, as well as multipath's internal library, +libmultipath. + +%package devel +Summary: Development libraries and headers for %{name} +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} + +%description devel +This package contains the files need to develop applications that use +device-mapper-multipath's lbmpathpersist and libmpathcmd libraries. + +%package -n kpartx +Summary: Partition device manager for device-mapper devices + +%description -n kpartx +kpartx manages partition creation and removal for device-mapper devices. + +%package -n libdmmp +Summary: device-mapper-multipath C API library +License: GPL-3.0-or-later +Requires: json-c +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} + +%description -n libdmmp +This package contains the shared library for the device-mapper-multipath +C API library. + +%package -n libdmmp-devel +Summary: device-mapper-multipath C API library headers +Requires: pkgconfig +Requires: libdmmp = %{version}-%{release} + +%description -n libdmmp-devel +This package contains the files needed to develop applications that use +device-mapper-multipath's libdmmp C API library + +%conf +# No conf + +%build -p +%define _libdir /usr/%{_lib} +%define _libmpathdir %{_libdir}/multipath +%define _pkgconfdir %{_libdir}/pkgconfig + +%install -a +# tree fix up +install -d %{buildroot}/etc/multipath +rm -rf %{buildroot}/%{_initrddir} + +%post +%tmpfiles_create %{_tmpfilesdir}/multipath.conf +%systemd_post multipathd.service + +%preun +%systemd_preun multipathd.service + +%postun +if [ $1 -ge 1 ] ; then + multipathd forcequeueing daemon > /dev/null 2>&1 || : +fi +%systemd_postun_with_restart multipathd.service + +%ldconfig_scriptlets -n libdmmp +%ldconfig_scriptlets libs + +%files +%license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 LICENSES/GPL-3.0 +%{_sbindir}/multipath +%{_sbindir}/multipathd +%{_sbindir}/multipathc +%{_sbindir}/mpathpersist +%{_unitdir}/multipathd.service +%{_unitdir}/multipathd.socket +%{_mandir}/man5/multipath.conf.5* +%{_mandir}/man8/multipath.8* +%{_mandir}/man8/multipathd.8* +%{_mandir}/man8/multipathc.8* +%{_mandir}/man8/mpathpersist.8* +%config /usr/lib/udev/rules.d/56-multipath.rules +%config /usr/lib/udev/rules.d/11-dm-mpath.rules +%config /usr/lib/udev/rules.d/99-z-dm-mpath-late.rules +%dir %{_modulesloaddir} +%{_tmpfilesdir}/multipath.conf +%doc README.md +%dir /etc/multipath + +%files libs +%license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 LICENSES/LGPL-2.1 +%doc README.md +%{_libdir}/libmultipath.so +%{_libdir}/libmultipath.so.* +%{_libdir}/libmpathutil.so +%{_libdir}/libmpathutil.so.* +%{_libdir}/libmpathpersist.so.* +%{_libdir}/libmpathcmd.so.* +%{_libdir}/libmpathvalid.so.* +%dir %{_libmpathdir} +%{_libmpathdir}/* + +%files devel +%doc README.md +%{_libdir}/libmpathpersist.so +%{_libdir}/libmpathcmd.so +%{_libdir}/libmpathvalid.so +%{_includedir}/mpath_cmd.h +%{_includedir}/mpath_persist.h +%{_includedir}/mpath_valid.h +%{_mandir}/man3/mpath_persistent_reserve_in.3* +%{_mandir}/man3/mpath_persistent_reserve_out.3* + +%files -n kpartx +%license LICENSES/GPL-2.0 +%doc README.md +%{_sbindir}/kpartx +/usr/lib/udev/kpartx_id +%{_mandir}/man8/kpartx.8* +%config %{_udevrulesdir}/11-dm-parts.rules +%config %{_udevrulesdir}/66-kpartx.rules +%config %{_udevrulesdir}/68-del-part-nodes.rules + +%files -n libdmmp +%license LICENSES/GPL-3.0 +%doc README.md +%{_libdir}/libdmmp.so.* + +%files -n libdmmp-devel +%doc README.md +%{_libdir}/libdmmp.so +%dir %{_includedir}/libdmmp +%{_includedir}/libdmmp/* +%{_mandir}/man3/dmmp_* +%{_mandir}/man3/libdmmp.h.3* +%{_pkgconfdir}/libdmmp.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/musl/0001-musl-1.2.0-Support-static-pie-with-musl-gcc-specs.patch b/SPECS/musl/0001-musl-1.2.0-Support-static-pie-with-musl-gcc-specs.patch new file mode 100644 index 00000000..7cd75dee --- /dev/null +++ b/SPECS/musl/0001-musl-1.2.0-Support-static-pie-with-musl-gcc-specs.patch @@ -0,0 +1,102 @@ +From 0d79e34e6da9d9827cfb7c787e90524176248d67 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 6 Apr 2020 19:41:22 +0200 +Subject: [PATCH] Enable linking to a static position independent executable + +This also enables address space layout randomization (ASLR). + +$ cat hello.c + +int main() +{ + printf("main = 0x%lxd\n", main); + return 0; +} + +$ gcc -static-pie -o hello hello.c -specs musl-gcc.specs + +$ ldd hello + statically linked + +$ file hello +hello: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=24fe0d02b0558dc37b8ae2268878b118804ae72d, with debug_info, not stripped + +$ ./hello +main = 0x7f858c4e72b9d + +$ ./hello +main = 0x7f0854d312b9d + +$ ./hello +main = 0x7f7179a1d2b9d + +$ ./hello +main = 0x7f37f981b2b9d + +$ readelf -l hello + +Elf file type is DYN (Shared object file) +Entry point 0x1058 +There are 9 program headers, starting at offset 64 + +Program Headers: + Type Offset VirtAddr PhysAddr + FileSiz MemSiz Flags Align + LOAD 0x0000000000000000 0x0000000000000000 0x0000000000000000 + 0x00000000000003c0 0x00000000000003c0 R 0x1000 + LOAD 0x0000000000001000 0x0000000000001000 0x0000000000001000 + 0x0000000000002cce 0x0000000000002cce R E 0x1000 + LOAD 0x0000000000004000 0x0000000000004000 0x0000000000004000 + 0x0000000000001550 0x0000000000001550 R 0x1000 + LOAD 0x0000000000005e50 0x0000000000006e50 0x0000000000006e50 + 0x00000000000002e0 0x00000000000009a0 RW 0x1000 + DYNAMIC 0x0000000000005e70 0x0000000000006e70 0x0000000000006e70 + 0x0000000000000170 0x0000000000000170 RW 0x8 + NOTE 0x0000000000000238 0x0000000000000238 0x0000000000000238 + 0x0000000000000024 0x0000000000000024 R 0x4 + GNU_EH_FRAME 0x0000000000004b60 0x0000000000004b60 0x0000000000004b60 + 0x00000000000001ec 0x00000000000001ec R 0x4 + GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 + 0x0000000000000000 0x0000000000000000 RW 0x10 + GNU_RELRO 0x0000000000005e50 0x0000000000006e50 0x0000000000006e50 + 0x00000000000001b0 0x00000000000001b0 R 0x1 + + Section to Segment mapping: + Segment Sections... + 00 .note.gnu.build-id .gnu.hash .dynsym .dynstr .rela.dyn + 01 .init .plt .text .fini + 02 .rodata .eh_frame_hdr .eh_frame + 03 .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .data .bss + 04 .dynamic + 05 .note.gnu.build-id + 06 .eh_frame_hdr + 07 + 08 .init_array .fini_array .data.rel.ro .dynamic .got +--- + tools/musl-gcc.specs.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + mode change 100644 => 100755 tools/musl-gcc.specs.sh + +diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh +old mode 100644 +new mode 100755 +index 30492574..4d93626a +--- a/tools/musl-gcc.specs.sh ++++ b/tools/musl-gcc.specs.sh +@@ -17,13 +17,13 @@ cat < +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _musl_target_cpu %{_target_cpu} +%global _musl_platform %{_musl_target_cpu}-linux-musl + +%global _libdir %{_prefix}/lib/%{_musl_platform} +%global _includedir %{_prefix}/include/%{_musl_platform} + +%global _syslibdir /lib + +Name: musl +Version: 1.2.5 +Release: %autorelease +Summary: Fully featured lightweight standard C library for Linux +License: MIT +URL: https://musl.libc.org +#!RemoteAsset +Source0: %{url}/releases/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: %{url}/releases/%{name}-%{version}.tar.gz.asc + +# Support PIE with static linking +Patch0: 0001-musl-1.2.0-Support-static-pie-with-musl-gcc-specs.patch +BuildSystem: autotools + +BuildOption(conf): --enable-debug +BuildOption(conf): --enable-wrapper=all + +# musl is only for Linux +ExclusiveOS: linux + +BuildRequires: gcc +BuildRequires: make + +%description +musl is a C standard library to power a new generation +of Linux-based devices. It is lightweight, fast, simple, +free, and strives to be correct in the sense of standards +conformance and safety. + +%package devel +Summary: Development files for %{name} + +# This package also provides the headers for using musl +Provides: %{name}-headers = %{version}-%{release} +Requires: %{name} = %{version}-%{release} + +%description devel +musl is a C standard library to power a new generation +of Linux-based devices. It is lightweight, fast, simple, +free, and strives to be correct in the sense of standards +conformance and safety. + +This package provides the development files for using +musl with programs and libraries. + +%package static +Summary: Static link library for %{name} + +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static +musl is a C standard library to power a new generation +of Linux-based devices. It is lightweight, fast, simple, +free, and strives to be correct in the sense of standards +conformance and safety. + +This package provides the additional development files for +statically linking musl into programs and libraries. + +%package gcc +Summary: Wrapper for using gcc with musl +Requires: %{name}-devel = %{version}-%{release} +Requires: gcc + +%description gcc +musl is a C standard library to power a new generation +of Linux-based devices. It is lightweight, fast, simple, +free, and strives to be correct in the sense of standards +conformance and safety. + +This package provides a wrapper around gcc to compile +programs and libraries with musl easily. + +%package clang +Summary: Wrapper for using clang with musl +Requires: %{name}-devel = %{version}-%{release} +Requires: clang + +%description clang +musl is a C standard library to power a new generation +of Linux-based devices. It is lightweight, fast, simple, +free, and strives to be correct in the sense of standards +conformance and safety. + +This package provides a wrapper around clang to compile +programs and libraries with musl easily. + + +%build -p +# musl is known not to work with LTO +# Disable LTO +%define _lto_cflags %{nil} + +# Set linker flags to get correct soname... +export LDFLAGS="%{?build_ldflags} -Wl,-soname,ld-musl-%{_musl_target_cpu}.so.1" + +%install -a +# Swap the files around for libc.so, making libc.so a symlink to the real file +rm %{buildroot}/lib/ld-musl-%{_musl_target_cpu}.so.1 +mv %{buildroot}%{_libdir}/libc.so %{buildroot}/lib/ld-musl-%{_musl_target_cpu}.so.1 +ln -sr %{buildroot}/lib/ld-musl-%{_musl_target_cpu}.so.1 %{buildroot}%{_libdir}/ld-musl-%{_musl_target_cpu}.so.1 +ln -sr %{buildroot}%{_libdir}/ld-musl-%{_musl_target_cpu}.so.1 %{buildroot}%{_libdir}/libc.so + +# Write search path for dynamic linker +mkdir -p %{buildroot}%{_sysconfdir} +touch %{buildroot}%{_sysconfdir}/ld-musl-%{_musl_target_cpu}.path +cat > %{buildroot}%{_sysconfdir}/ld-musl-%{_musl_target_cpu}.path < %{buildroot}%{_rpmconfigdir}/macros.d/macros.musl < +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nano +Version: 8.6 +Release: %autorelease +Summary: Text editor +License: GPL-3.0-or-later +URL: https://www.nano-editor.org +#!RemoteAsset +Source0: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.nano-editor.org/dist/latest/%{name}-%{version}.tar.xz.asc +Source2: nanorc +BuildSystem: autotools + +BuildOption(conf): --enable-color +BuildOption(conf): --enable-nanorc +BuildOption(conf): --enable-multibuffer +BuildOption(conf): --enable-utf8 + +BuildRequires: file-devel +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: texinfo + +%description +GNU nano is a small and friendly text editor. + +%build -a +# Enable syntax highlighting by default - 251 +sed -E -e 's|^# (include "?/usr/share/nano/\*.nanorc"?)|\1|' \ + %{SOURCE2} doc/sample.nanorc > ./nanorc + +%install -a +# Install our /etc/nanorc - 251 +mkdir -p %{buildroot}%{_sysconfdir} +install -m 0644 ./nanorc %{buildroot}%{_sysconfdir}/nanorc +%find_lang %{name} --generate-subpackages + +%files +%license COPYING COPYING.DOC +%doc AUTHORS ChangeLog* IMPROVEMENTS NEWS README THANKS TODO +%doc doc/{faq,nano}.html +%{_bindir}/{,r}nano +%config(noreplace) %{_sysconfdir}/nanorc +%{_mandir}/man1/{,r}nano.1* +%{_mandir}/man5/nanorc.5* +%{_infodir}/nano.info* +%{_datadir}/nano + +%changelog +%{?autochangelog} diff --git a/SPECS/nano/nanorc b/SPECS/nano/nanorc new file mode 100644 index 00000000..61cb4a47 --- /dev/null +++ b/SPECS/nano/nanorc @@ -0,0 +1,5 @@ +## This is a system-wide configuration file for the nano editor. +## +## Each user can save his own configuration to ~/.nanorc +## +## See the nanorc(5) man page for details. diff --git a/SPECS/ncurses/0001-ncurses-config.patch b/SPECS/ncurses/0001-ncurses-config.patch new file mode 100644 index 00000000..a6dc70c9 --- /dev/null +++ b/SPECS/ncurses/0001-ncurses-config.patch @@ -0,0 +1,60 @@ +diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in +index a45dd54..8527305 100644 +--- a/misc/gen-pkgconfig.in ++++ b/misc/gen-pkgconfig.in +@@ -83,7 +83,7 @@ if [ "$includedir" != "/usr/include" ]; then + fi + + lib_flags= +-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@ ++for opt in -L$libdir @LIBS@ + do + case $opt in + -l*) # LIBS is handled specially below +diff --git a/misc/ncurses-config.in b/misc/ncurses-config.in +index 7b02ac2..b64379f 100644 +--- a/misc/ncurses-config.in ++++ b/misc/ncurses-config.in +@@ -41,7 +41,6 @@ exec_prefix="@exec_prefix@" + + bindir="@bindir@" + includedir="@includedir@" +-libdir="@libdir@" + datarootdir="@datarootdir@" + datadir="@datadir@" + mandir="@mandir@" +@@ -101,7 +100,7 @@ fi + # There is no portable way to find the list of standard library directories. + # Require a POSIX shell anyway, to keep this simple. + lib_flags= +-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ $LIBS ++for opt in $LIBS + do + case $opt in + -specs*) # ignore linker specs-files which were used to build library +@@ -117,13 +116,13 @@ do + lib_check=`echo "x$opt" | sed -e 's/^.-L//'` + [ -d "$lib_check" ] || continue + case "$lib_check" in +- @LD_SEARCHPATH@) # skip standard libdir ++ ////) # skip standard libdir (disabled for multilib) + if [ "$lib_check" = "$libdir" ] + then + lib_first=yes + IFS_save="$IFS" + IFS='|' +- LIBDIRS="@LD_SEARCHPATH@" ++ LIBDIRS="" + for lib_check in $LIBDIRS + do + if [ -d "$lib_check" ] +@@ -271,7 +270,6 @@ ENDECHO + echo "$INCS" + ;; + --libdir) +- echo "${libdir}" + ;; + --mandir) + echo "${mandir}" +-- +2.33.0 diff --git a/SPECS/ncurses/0002-ncurses-libs.patch b/SPECS/ncurses/0002-ncurses-libs.patch new file mode 100644 index 00000000..c92ae51d --- /dev/null +++ b/SPECS/ncurses/0002-ncurses-libs.patch @@ -0,0 +1,64 @@ +diff --git a/c++/Makefile.in b/c++/Makefile.in +index 99f21da..e25b273 100644 +--- a/c++/Makefile.in ++++ b/c++/Makefile.in +@@ -118,7 +118,7 @@ SHLIB_LIST = $(SHLIB_DIRS) \ + -l@FORM_NAME@@USE_LIB_SUFFIX@ \ + -l@MENU_NAME@@USE_LIB_SUFFIX@ \ + -l@PANEL_NAME@@USE_LIB_SUFFIX@ \ +- -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++ -lncurses@USE_LIB_SUFFIX@ #@SHLIB_LIST@ + + LIBROOT = ncurses++ + +@@ -157,8 +157,7 @@ LDFLAGS_SHARED = $(TEST_LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ + LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@) + + # flags for library built by this makefile +-LDFLAGS = $(TEST_ARGS) @LDFLAGS@ \ +- @LD_MODEL@ $(TEST_LIBS) @LIBS@ $(CXXLIBS) ++LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ $(CXXLIBS) + + AUTO_SRC = \ + etip.h +diff --git a/form/Makefile.in b/form/Makefile.in +index a950a3e..6feb95e 100644 +--- a/form/Makefile.in ++++ b/form/Makefile.in +@@ -110,7 +110,7 @@ LINK = $(LIBTOOL_LINK) + LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ + + SHLIB_DIRS = -L../lib +-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ #@SHLIB_LIST@ + + RPATH_LIST = @RPATH_LIST@ + RESULTING_SYMS = @RESULTING_SYMS@ +diff --git a/menu/Makefile.in b/menu/Makefile.in +index b623bf0..8c0d199 100644 +--- a/menu/Makefile.in ++++ b/menu/Makefile.in +@@ -110,7 +110,7 @@ LINK = $(LIBTOOL_LINK) + LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ + + SHLIB_DIRS = -L../lib +-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ #@SHLIB_LIST@ + + RPATH_LIST = @RPATH_LIST@ + RESULTING_SYMS = @RESULTING_SYMS@ +diff --git a/panel/Makefile.in b/panel/Makefile.in +index 380f80c..dfe116e 100644 +--- a/panel/Makefile.in ++++ b/panel/Makefile.in +@@ -112,7 +112,7 @@ LINK = $(LIBTOOL_LINK) + LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ + + SHLIB_DIRS = -L../lib +-SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ @SHLIB_LIST@ ++SHLIB_LIST = $(SHLIB_DIRS) -lncurses@USE_LIB_SUFFIX@ #@SHLIB_LIST@ + + RPATH_LIST = @RPATH_LIST@ + RESULTING_SYMS = @RESULTING_SYMS@ +-- +2.33.0 diff --git a/SPECS/ncurses/0003-ncurses-urxvt.patch b/SPECS/ncurses/0003-ncurses-urxvt.patch new file mode 100644 index 00000000..fd58933e --- /dev/null +++ b/SPECS/ncurses/0003-ncurses-urxvt.patch @@ -0,0 +1,181 @@ +diff --git a/misc/terminfo.src b/misc/terminfo.src +index 70047be..c4569b9 100644 +--- a/misc/terminfo.src ++++ b/misc/terminfo.src +@@ -6145,6 +6145,175 @@ rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygw + rxvt-16color|rxvt with 16 colors like aixterm, + ncv#32, use=ibm+16color, use=rxvt, + ++# rxvt-unicode ++# http://cvs.schmorp.de/rxvt-unicode/doc/etc/rxvt-unicode.terminfo?revision=1.34 ++# From: Thomas Dickey 04 Oct 1997 ++# Updated: Özgür Kesim 02 Nov 1997 ++# Updated: Marc Lehmann , 17 Feb 2005 ++# Updated: Marc Lehmann , 04 Nov 2008: change init/reset sequences ++# Updated: Marc Lehmann , 24 Nov 2014: implement cvvis as blinking cursor ++# Updated: Marc Lehmann , 13 Dec 2014: removed superfluous 0 from sgr ++rxvt-unicode|rxvt-unicode terminal (X Window System), ++ am, ++ bce, ++ eo, ++ km, ++ msgr, ++ xenl, ++ hs, ++ cols#80, ++ it#8, ++ lines#24, ++ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~-A.B+C\,D0EhFiG, ++ bel=^G, ++ blink=\E[5m, ++ bold=\E[1m, ++ clear=\E[H\E[2J, ++ civis=\E[?25l, ++ cnorm=\E[?12l\E[?25h, ++ cvvis=\E[?12;25h, ++ cr=^M, ++ csr=\E[%i%p1%d;%p2%dr, ++ cub=\E[%p1%dD, ++ cub1=^H, ++ cud=\E[%p1%dB, ++ cud1=^J, ++ cuf=\E[%p1%dC, ++ cuf1=\E[C, ++ cup=\E[%i%p1%d;%p2%dH, ++ cuu=\E[%p1%dA, ++ cuu1=\E[A, ++ dch=\E[%p1%dP, ++ dch1=\E[P, ++ dl=\E[%p1%dM, ++ dl1=\E[M, ++ ed=\E[J, ++ el=\E[K, ++ el1=\E[1K, ++ flash=\E[?5h$<20/>\E[?5l, ++ home=\E[H, ++ hpa=\E[%i%p1%dG, ++ ht=^I, ++ hts=\EH, ++ ich=\E[%p1%d@, ++ ich1=\E[@, ++ il=\E[%p1%dL, ++ il1=\E[L, ++ ind=^J, ++ is1=\E[\041p, ++ is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l, ++ kDC=\E[3$, ++ kIC=\E[2$, ++ kEND=\E[8$, ++ kHOM=\E[7$, ++ kLFT=\E[d, ++ kNXT=\E[6$, ++ kPRV=\E[5$, ++ kRIT=\E[c, ++ kbs=\177, ++ ka1=\EOw, ++ ka3=\EOy, ++ kb2=\EOu, ++ kc1=\EOq, ++ kc3=\EOs, ++ kcbt=\E[Z, ++ kcub1=\E[D, ++ kcud1=\E[B, ++ kcuf1=\E[C, ++ kcuu1=\E[A, ++ kdch1=\E[3~, ++ kel=\E[8\^, ++ kend=\E[8~, ++ kent=\EOM, ++ kf1=\E[11~, ++ kf10=\E[21~, ++ kf11=\E[23~, ++ kf12=\E[24~, ++ kf13=\E[25~, ++ kf14=\E[26~, ++ kf15=\E[28~, ++ kf16=\E[29~, ++ kf17=\E[31~, ++ kf18=\E[32~, ++ kf19=\E[33~, ++ kf2=\E[12~, ++ kf20=\E[34~, ++ kf3=\E[13~, ++ kf4=\E[14~, ++ kf5=\E[15~, ++ kf6=\E[17~, ++ kf7=\E[18~, ++ kf8=\E[19~, ++ kf9=\E[20~, ++ kfnd=\E[1~, ++ khome=\E[7~, ++ kich1=\E[2~, ++ kmous=\E[M, ++ knp=\E[6~, ++ kpp=\E[5~, ++ kslt=\E[4~, ++ rc=\E8, ++ rev=\E[7m, ++ ri=\EM, ++ rmso=\E[27m, ++ rmul=\E[24m, ++ rs1=\Ec, ++ rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l, ++ sgr0=\E[m\E(B, ++ enacs=, ++ smacs=\E(0, ++ rmacs=\E(B, ++ smso=\E[7m, ++ smul=\E[4m, ++ tbc=\E[3g, ++ vpa=\E[%i%p1%dd, ++ colors#88, ++ pairs#7744, ++ btns#5, ++ lm#0, ++ ccc, ++ npc, ++ mc5i, ++ ncv#0, ++ mir, ++ xon, ++ bw, ++ ech=\E[%p1%dX, ++ mc0=\E[i, ++ mc4=\E[4i, ++ mc5=\E[5i, ++ sitm=\E[3m, ++ ritm=\E[23m, ++ smam=\E[?7h, ++ rmam=\E[?7l, ++ smir=\E[4h, ++ rmir=\E[4l, ++ smcup=\E[?1049h, ++ rmcup=\E[r\E[?1049l, ++ smkx=\E=, ++ rmkx=\E>, ++ indn=\E[%p1%dS, ++ rin=\E[%p1%dT, ++ sgr=\E[%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;, ++ op=\E[39;49m, ++ setaf=\E[38;5;%p1%dm, ++ setab=\E[48;5;%p1%dm, ++ setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;, ++ setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;, ++ initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\, ++ sc=\E7, ++ s0ds=\E(B, ++ s1ds=\E(0, ++ s2ds=\E*B, ++ s3ds=\E+B, ++ u6=\E[%i%d;%dR, ++ u7=\E[6n, ++ u8=\E[?1;2c, ++ u9=\E[c, ++ tsl=\E]2;, ++ fsl=\007, ++ dsl=\E]2;\007, ++ + #### MRXVT + # mrxvt 0.5.4 + # + diff --git a/SPECS/ncurses/0004-ncurses-kbs.patch b/SPECS/ncurses/0004-ncurses-kbs.patch new file mode 100644 index 00000000..5b863dc8 --- /dev/null +++ b/SPECS/ncurses/0004-ncurses-kbs.patch @@ -0,0 +1,19 @@ +--- a/misc/terminfo.src 2025-08-28 13:53:09.279295728 +0800 ++++ b/misc/terminfo.src 2025-08-28 13:53:17.187332476 +0800 +@@ -6707,7 +6707,7 @@ + sgr0=\E[0m\017, smir=\E[4h, smkx=\E=, smso=\E[7m, + smul=\E[4m, use=ansi+csr, use=ansi+idl, use=ansi+local, + use=xterm+alt47, use=vt100+enq, use=vt100+4bsd, +- use=rxvt+pcfkeys, use=vt220+cvis, use=vt220+keypad, ++ use=rxvt+pcfkeys, use=vt220+cvis, use=vt220+keypad, use=xterm+kbs, + + # Key Codes from rxvt reference: + # +@@ -8396,6 +8396,7 @@ + # on Solaris because Sun's curses implementation gets confused. + screen.teraterm|disable ncv in teraterm, + ncv#127, ++ kbs=^H, + acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i + \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u + \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, diff --git a/SPECS/ncurses/ncurses.spec b/SPECS/ncurses/ncurses.spec new file mode 100644 index 00000000..48733779 --- /dev/null +++ b/SPECS/ncurses/ncurses.spec @@ -0,0 +1,107 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ncurses +Version: 6.5 +Release: %autorelease +Summary: Terminal control library +License: MIT +URL: https://invisible-island.net/ncurses/ncurses.html +#!RemoteAsset +Source: https://invisible-mirror.net/archives/ncurses/ncurses-%{version}.tar.gz +# Patch for removing hardcoded path +Patch0: 0001-ncurses-config.patch +# Patch for cleaning up and simplying the linking process +Patch1: 0002-ncurses-libs.patch +# Patch for adding terminal definition for rxvt-unicode +Patch2: 0003-ncurses-urxvt.patch +# Patch for fixing backspace key configuration in rxvt and screen terminals +Patch3: 0004-ncurses-kbs.patch + +BuildSystem: autotools + +BuildRequires: make +BuildRequires: gcc gcc-c++ +BuildRequires: gpm-devel +BuildRequires: pkgconfig + +%description +The ncurses (new curses) library is a free software emulation of +curses in System V Release 4.0 (SVr4), and more. It uses terminfo +format, supports pads and color and multiple highlights and forms +characters and function-key mapping, and has all the other SVr4-curses +enhancements over BSD curses. + +%package devel +Summary: Development files for the ncurses library +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +This package contains development files for the ncurses library, +including headers, symbolic links for libraries, and pkg-config files. + +%conf +export CFLAGS="%{build_cflags} -std=gnu17" +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --disable-static \ + --enable-colorfgbg \ + --enable-hard-tabs \ + --enable-overwrite \ + --enable-pc-files \ + --with-versioned-syms=yes \ + --enable-xmc-glitch \ + --disable-wattr-macros \ + --disable-root-environ \ + --with-cxx-shared \ + --with-ospeed=unsigned \ + --with-pkg-config-libdir=%{_libdir}/pkgconfig \ + --with-shared \ + --with-terminfo-dirs=%{_sysconfdir}/terminfo:%{_datadir}/terminfo \ + --with-termlib=tinfo \ + --with-ticlib=tic \ + --with-xterm-kbs=DEL \ + --without-ada + +%install -a +find %{buildroot} -type f -name "*.a" -delete -print +mkdir -p %{buildroot}%{_sysconfdir}/terminfo +xz NEWS + +(cd %{buildroot}%{_libdir} && for i in lib*w.so; do ln -s $i `echo $i | sed 's/w\\.so$/.so/'`; done) +(cd %{buildroot}%{_libdir}/pkgconfig && for i in *w.pc; do ln -s $i `echo $i | sed 's/w\\.pc$/.pc/'`; done) +(cd %{buildroot}%{_bindir} && for i in ncursesw*-config; do ln -s $i `echo $i | sed 's/w//'`; done) + +%files +%license COPYING +%doc ANNOUNCE AUTHORS NEWS.xz README TO-DO +%doc misc/ncurses.supp +%{_bindir}/[cirt]* +%dir %{_sysconfdir}/terminfo +%{_datadir}/tabset +%dir %{_datadir}/terminfo +%{_datadir}/terminfo/* +%{_libdir}/lib*.so.* +%{_mandir}/man1/[cirt]* +%{_mandir}/man5/* +%{_mandir}/man7/* + +%files devel +%{_bindir}/ncurses*-config +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/*.h +%{_mandir}/man1/ncurses*-config* +%{_mandir}/man3/* +%doc doc/html/ + +%changelog +%{?autochangelog} diff --git a/SPECS/netperf/netperf.spec b/SPECS/netperf/netperf.spec new file mode 100644 index 00000000..fb97d530 --- /dev/null +++ b/SPECS/netperf/netperf.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global commit_date 20250728 +%global commit afc51ff9764741da4ed6702651fba9d9c23f8557 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: netperf +Version: %{commit_date}+git%{shortcommit} +Release: %autorelease +Summary: Benchmark to measure the performance of many different types of networking +License: MIT +URL: https://github.com/HewlettPackard/netperf +#!RemoteAsset +Source0: https://github.com/HewlettPackard/netperf/archive/%{commit}/%{name}-%{commit}.tar.gz + +BuildSystem: autotools +BuildOption(build): CFLAGS="%{optflags} -fno-strict-aliasing -fcommon -std=c99 -D_GNU_SOURCE" + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: make +BuildRequires: texinfo + +%description +Netperf is a benchmark that can be used to measure the performance of many +different types of networking. It provides tests for both unidirectional +throughput, and end-to-end latency. + +%package help +Summary: Help files for %{name} +BuildArch: noarch + +%description help +Help files for %{name}. + +%prep +%autosetup -n %{name}-%{commit} + +%conf -p +autoreconf -fiv -I src/missing/m4 + +%install -a +rm -rf %{buildroot}%{_infodir}/dir + +%files +%defattr(-,root,root,0755) +%doc README AUTHORS Release_Notes +%license COPYING +%{_bindir}/netperf +%{_bindir}/netserver +%{_infodir}/netperf.* + +%files help +%doc doc/netperf.{html,pdf,txt,xml} +%doc doc/examples +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/nettle/nettle.spec b/SPECS/nettle/nettle.spec new file mode 100644 index 00000000..7a75d029 --- /dev/null +++ b/SPECS/nettle/nettle.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nettle +Version: 3.10.2 +Release: %autorelease +Summary: GNU file archiving program +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: http://www.lysator.liu.se/~nisse/nettle/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +BuildSystem: autotools + +BuildRequires: gmp-devel +BuildRequires: m4 +BuildRequires: pkgconfig + +BuildOption(conf): --disable-static + +%description +Nettle is a cryptographic library that is designed to fit easily in more +or less any context: In crypto toolkits for object-oriented languages +(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in +kernel space. + +%package devel +Summary: Development headers for a low-level cryptographic library +Requires: %{name} = %{version}-%{release} +Requires: gmp-devel%{?_isa} + +%description devel +Nettle is a cryptographic library that is designed to fit easily in more +or less any context: In crypto toolkits for object-oriented languages +(C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in +kernel space. This package contains the files needed for developing +applications with nettle. + +%files +%license COPYING* +%doc AUTHORS ChangeLog NEWS README +%{_bindir}/nettle-lfib-stream +%{_bindir}/nettle-pbkdf2 +%{_bindir}/pkcs1-conv +%{_bindir}/sexp-conv +%{_bindir}/nettle-hash + +%files devel +%doc descore.README nettle.html nettle.pdf +%{_includedir}/nettle +%{_libdir}/libnettle.so* +%{_libdir}/libhogweed.so* +%{_libdir}/pkgconfig/hogweed.pc +%{_libdir}/pkgconfig/nettle.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/newt/newt.spec b/SPECS/newt/newt.spec new file mode 100644 index 00000000..518eef87 --- /dev/null +++ b/SPECS/newt/newt.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: newt +Version: 0.52.25 +Release: %autorelease +Summary: A library for text mode user interfaces +License: LGPL-2.0-only +URL: https://pagure.io/newt +#!RemoteAsset +Source: https://pagure.io/releases/newt/newt-%{version}.tar.gz + +BuildSystem: autotools +BuildOption(conf): --without-python +BuildOption(conf): --without-tcl +BuildOption(conf): --enable-shared + +BuildRequires: gcc +BuildRequires: popt-devel +BuildRequires: slang-devel +BuildRequires: make +BuildRequires: pkgconfig + +%description +Newt is a programming library for color text-mode, widget-based user +interfaces. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: slang-devel + +%description devel +This package contains the header files and development libraries +needed to build applications that use the newt library. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete + +rm -rf %{buildroot}%{_datadir}/locale + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS README CHANGES peanuts.py popcorn.py +%{_bindir}/whiptail +%{_libdir}/libnewt.so.* +%{_mandir}/man1/whiptail.1* + +%files devel +%{_includedir}/newt.h +%{_libdir}/libnewt.so +%{_libdir}/pkgconfig/libnewt.pc +%{_libdir}/libnewt.a + +%changelog +%{?autochangelog} diff --git a/SPECS/nftables/main.nft b/SPECS/nftables/main.nft new file mode 100644 index 00000000..6e135660 --- /dev/null +++ b/SPECS/nftables/main.nft @@ -0,0 +1,54 @@ +# Sample configuration for nftables service. +# Load this by calling 'nft -f /etc/nftables/main.nft'. +# Note about base chain priorities: +# The priority values used in these sample configs are +# offset by 20 in order to avoid ambiguity when firewalld +# is also running which uses an offset of 10. This means +# that packets will traverse firewalld first and if not +# dropped/rejected there will hit the chains defined here. +# Chains created by iptables, ebtables and arptables tools +# do not use an offset, so those chains are traversed first +# in any case. +# drop any existing nftables ruleset +flush ruleset +# a common table for both IPv4 and IPv6 +table inet nftables_svc { + # protocols to allow + set allowed_protocols { + type inet_proto + elements = { icmp, icmpv6 } + } + # interfaces to accept any traffic on + set allowed_interfaces { + type ifname + elements = { "lo" } + } + # services to allow + set allowed_tcp_dports { + type inet_service + elements = { ssh, 9090 } + } + # this chain gathers all accept conditions + chain allow { + ct state established,related accept + + meta l4proto @allowed_protocols accept + iifname @allowed_interfaces accept + tcp dport @allowed_tcp_dports accept + } + # base-chain for traffic to this host + chain INPUT { + type filter hook input priority filter + 20 + policy accept + + jump allow + reject with icmpx type port-unreachable + } +} +# By default, any forwarding traffic is allowed. +# Uncomment the following line to filter it based +# on the same criteria as input traffic. +#include "/etc/nftables/router.nft" +# Uncomment the following line to enable masquerading of +# forwarded traffic. May be used with or without router.nft. +#include "/etc/nftables/nat.nft" \ No newline at end of file diff --git a/SPECS/nftables/nat.nft b/SPECS/nftables/nat.nft new file mode 100644 index 00000000..fc1d41e4 --- /dev/null +++ b/SPECS/nftables/nat.nft @@ -0,0 +1,34 @@ +# Sample configuration snippet for nftables service. +# Meant to be included by main.nft, not for direct use. +# dedicated table for IPv4 +table ip nftables_svc { + # interfaces to masquerade traffic from + set masq_interfaces { + type ifname + elements = { "virbr0" } + } + # networks to masquerade traffic from + # 'interval' flag is required to support subnets + set masq_ips { + type ipv4_addr + flags interval + elements = { 192.168.122.0/24 } + } + # [CVE-2021-3773] force port randomization for non-locally originated + # connections using suspicious port values to prevent port-shadow + # attacks, i.e. accidental matching of new inbound connections vs. + # existing ones + chain do_masquerade { + meta iif > 0 th sport < 16384 th dport >= 32768 masquerade random + masquerade + } + # base-chain to manipulate conntrack in postrouting, + # will see packets for new or related traffic only + chain POSTROUTING { + type nat hook postrouting priority srcnat + 20 + policy accept + + iifname @masq_interfaces oifname != @masq_interfaces jump do_masquerade + ip saddr @masq_ips jump do_masquerade + } +} \ No newline at end of file diff --git a/SPECS/nftables/nftables.conf b/SPECS/nftables/nftables.conf new file mode 100644 index 00000000..bf2d84f2 --- /dev/null +++ b/SPECS/nftables/nftables.conf @@ -0,0 +1,6 @@ +# Uncomment the include statement here to load the default config sample +# in /etc/nftables for nftables service. +#include "/etc/nftables/main.nft" +# To customize, either edit the samples in /etc/nftables, append further +# commands to the end of this file or overwrite it after first service +# start by calling: 'nft list ruleset >/etc/sysconfig/nftables.conf'. \ No newline at end of file diff --git a/SPECS/nftables/nftables.service b/SPECS/nftables/nftables.service new file mode 100644 index 00000000..f0633963 --- /dev/null +++ b/SPECS/nftables/nftables.service @@ -0,0 +1,15 @@ +[Unit] +Description=Netfilter Tables +Documentation=man:nft(8) +Wants=network-pre.target +Before=network-pre.target +[Service] +Type=oneshot +ProtectSystem=full +ProtectHome=true +ExecStart=/sbin/nft -f /etc/sysconfig/nftables.conf +ExecReload=/sbin/nft 'flush ruleset; include "/etc/sysconfig/nftables.conf";' +ExecStop=/sbin/nft flush ruleset +RemainAfterExit=yes +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/SPECS/nftables/nftables.spec b/SPECS/nftables/nftables.spec new file mode 100644 index 00000000..7dff27a1 --- /dev/null +++ b/SPECS/nftables/nftables.spec @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nftables +Version: 1.1.5 +Release: %autorelease +Summary: Netfilter Tables userspace utilities +License: GPL-2.0-only +URL: https://netfilter.org/projects/nftables/ +#!RemoteAsset +Source0: https://netfilter.org/projects/nftables/files/nftables-%{version}.tar.xz +Source1: nftables.service +Source2: nftables.conf +Source3: main.nft +Source4: router.nft +Source5: nat.nft +BuildSystem: autotools + +BuildOption(conf): --with-xtables +BuildOption(conf): --with-json +BuildOption(conf): --disable-manpages + +BuildRequires: flex bison gmp-devel jansson-devel python3-devel readline-devel +BuildRequires: libedit-devel python3-setuptools make gcc python3-pip +BuildRequires: pkgconfig(libmnl) >= 1.0.4 +BuildRequires: pkgconfig(libnftnl) >= 1.3.0 +BuildRequires: pkgconfig(xtables) >= 1.6.1 +BuildRequires: systemd-rpm-macros autoconf automake libtool + +Requires: %{name}-services = %{version} +%systemd_requires + +%description +Netfilter Tables userspace utilities. + +%package devel +Summary: Development library for nftables / libnftables +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +Headers and other development files for the libnftables library. + +%package -n python3-nftables +Summary: Python module providing an interface to libnftables +Requires: %{name} = %{version} +%description -n python3-nftables +The nftables python module provides an interface to libnftables via ctypes. + +%package services +Summary: Systemd service for nftables +Requires: %{name} = %{version} + +%description services +Systemd service for managing an nftables-based firewall. + +%conf -p +autoreconf -vif + +%build -a +cd py +%pyproject_wheel + +%install -a +find %{buildroot} -name '*.la' -delete +rm -f %{buildroot}/%{_libdir}/libnftables.a + +install -d -m 755 %{buildroot}%{_unitdir} +install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/ +install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig +install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ +install -d -m 755 %{buildroot}%{_sysconfdir}/nftables +install -m 644 %{SOURCE3} %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/nftables/ + +cd py +%pyproject_install +%pyproject_save_files nftables + +%ldconfig_scriptlets + +%post services -p /bin/sh +%systemd_post nftables.service +%preun services -p /bin/sh +%systemd_preun nftables.service +%postun services -p /bin/sh +%systemd_postun_with_restart nftables.service + +%files +%license COPYING +%doc %{_docdir}/nftables/examples/ +%doc %{_docdir}/nftables/main.nft +%{_sbindir}/nft +%{_libdir}/libnftables.so.* +%{_mandir}/man5/libnftables-json.5* +%{_mandir}/man8/nft* +%{_datadir}/nftables/ + +%files devel +%{_libdir}/libnftables.so +%{_libdir}/pkgconfig/libnftables.pc +%{_includedir}/nftables/libnftables.h +%{_mandir}/man3/libnftables.3* + +%files -n python3-nftables -f %{pyproject_files} + +%files services +%config(noreplace) %{_sysconfdir}/nftables/ +%config(noreplace) %{_sysconfdir}/sysconfig/nftables.conf +%{_unitdir}/nftables.service + +%changelog +%{?autochangelog} diff --git a/SPECS/nftables/router.nft b/SPECS/nftables/router.nft new file mode 100644 index 00000000..acf2ac23 --- /dev/null +++ b/SPECS/nftables/router.nft @@ -0,0 +1,14 @@ +# Sample configuration snippet for nftables service. +# Meant to be included by main.nft, not for direct use. +# a common table for both IPv4 and IPv6 +table inet nftables_svc { + # base-chain for traffic forwarded by this host + # re-uses 'allow' chain from main.nft + chain FORWARD { + type filter hook forward priority filter + 20 + policy accept + + jump allow + reject with icmpx type host-unreachable + } +} \ No newline at end of file diff --git a/SPECS/nghttp2/nghttp2.keyring b/SPECS/nghttp2/nghttp2.keyring new file mode 100644 index 00000000..f9f518fd --- /dev/null +++ b/SPECS/nghttp2/nghttp2.keyring @@ -0,0 +1,64 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGiBEmgJCARBACDsyRcJt0cPqS5I3nooSD4ETmsqXSGoA1QP0NcD3mMDIxfwOk3 +ZgaLAhQTpylqzYu4uQ5lDcvkpZtN8cA+R+9Bxq1VcY5Jra4t93Eyxd/14oufgg8w +GLZ8q2otuUliL+RWPEuuBLNJFrdHeLfITBX88ZyHz8tu0kpWBBVBLb5yYwCg3OmH +L59aPl0TIoKGIL/xYs80ixcD/3PA9z6SbChDHRKA647Smrw6QuQHl7Uubg6LYYxz +FoxeN3F/grZHNJyUzlkdraIcWWYi1Dr0D28TnuQUbPoj7ju248iPRv2ZEr7OpV9j +RksxJIBqzC698XwPuq2Jo8iBNgE2t25aY9UHXxehqg6zkyR1bdhFzDV1cEKGkU62 +TAnvA/9tB77GiQ9H02oybfqYrdxrWCou3kRa7owd/tBqRMkzH4Vt86VIXwVdsMn1 +sGeF4YGUqwY7GCT+jviFCdvGTRqeCJgaLJAYE8hSFIxpDTdUNxaPxwuOd3Jq5BKC +U7boXpLlAcdh47CMk4qvIDZfBb2iVjZCN1yFI9R/TCH7JCT9NLQrVGF0c3VoaXJv +IFRzdWppa2F3YSA8dGF0c3VoaXJvLnRAZ21haWwuY29tPohgBBMRAgAgBQJJoCQg +AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQfoQD1dZzw2YoTgCgmzKU0uK/ +fr2nVqYondsxppQS83wAoIPlXaxcUV39DvA7/Rui6+rBNljmuQQNBEmgJCAQEADi +J5vXLb+y5g2kQApYk/iPqlJV02jHX7VJnWwivfQNq0F56TiiAZx9B6QR71pShkv8 +L4FgdmuNPcxamh4LAiVsiE3lW5dnlt6cp5bmWvNOTDZIojbxSfS4ZhQmt3Ij4vJ5 +fnlgUeaLDzXqeuO5ezMZvpsoBcDMvPCnv8R28JX0z1LIjA42sC85Kvd8EeB7uyGJ +q0qzU7OMP6JdxN2IwvdGiqXAAHI2KZOU9Pp4Kvg4qj8v3ELXrhlrZVye6PAmbufJ +Gdcg73EEabhoWutzt1h++qUkhzSQRUoTIqa2DWyE/bTPGlxqKgHmur5okBn5iwcr +BijhE6d8AvBqlopxyHHIEsZ4YswvLR8VcOt//aT1ArYdrxAfyjujvimoW1+gDjsA ++Hc1wlrYW6uLgHwFIzQFOi4Yt/+hw26dlqJhO9pnK8vwpPsMnvkfHQx5A7EeZhpN +g1YIDhPEO+RSk81Gs0Y1xzJjLulncxlzprX6xmyZK/B2dQZy4XFl5K02Q7Zas++x +z70JvwOC8kDu117jb3QtersJHt09SGywCrkaU6P8+iKxPd2PEwaPWKqu4n7IpLZu +2Kg5GXO1h80fqhPSRJGbj5a6YVvfVHoRPaUL34Y4yYPxPVxjpgYR6ohhhoyURA4w ++qkhugcbYM9/wQTbwhgLc5mG62bq+WVkhehaGFOCwwADBRAAkzofRfa6dNtZC8kp +4bTmTydRCRrAAjUvCtRNL+PjB6JpTsIru/w6dR2i3TYDnUOBNkvVLUNG+Sk6fsR2 +CcEefsa4AQwRb8G33FATsewFbImSrBNT9R5hr+hR33XWxo0KAcXrucnaboidQOBK +lDD0SEC6eBexVXa4/h9qum4Qmj0u9XBBqMqEOJY/Mao5SJ8EWZV+UAszgJdmHDvq +s9+1425NuzuG9/KQzx/5wWjQmtAHikE/oFQ1RZ3hWxRpe4YmsrKQuVqwHRfIjCrB +MdBteldVr4NN0eUqfnrXgTpInXSsUstDr1/04u2Q3+spQUjJOcZ+IluPLfr12EAH +UKc9/2CT6cLmBVEl2s2PijC5EoxH3UA2KkxcxBy5LleKvF5FZ3MHbXaj2RLMLBlW +aGhlFF2H85EEmq73Ex5ncLPT4BW2rHrkwdUOOXCN8riUZr42E3K+GTyfGyRbU9Ar +MBP62ytvamwBO9O+E6sJCVraoho4a2ERORh5PQzEot1Tmyf4u6AQf1+JVMn2yThc +ilRKWD1Q/AfEAibVbPANkXXjX5pZkIRc1Eunq5afYf2ixyS96RSjc6EZ+euaaaFC +96+MdDtlycafZIXYNgiNkrrm8mzPCb2i8tmF9aPnGYBknsnFLlda3Zz4afFDKyLN +LYRvqAujonL+HBOLW2InmeD5p6SISQQYEQIACQUCSaAkIAIbDAAKCRB+hAPV1nPD +ZqpZAJ9Kw73IdA3hw+wQEen991bFlMzHfQCgtG/GMjXB246Qt9XPVvToTSFJQPq5 +Ag0EZdRdtAEQAMIqEK6XuVLgY6KPOUqHFjQZdi87hCX9sTSHVuvQ75Ko70Ayz/AH +I7YWnPoaJjWQwCugGOdEjXKQMUUKuGUrWAtGoGUg9MDFXdAXRrwBhhKz8ZGJzGPU +YXkanJSHo3AAFQ4QWSJmGvlZ2VhthB5v/njUlpzFvNusa5e71RRLM5f5R3kROUlj +vwAXUcosLESi864AKFzo1qiQB6KtatTLJH8aHQEFrVwzrleKdkF5OozfWw1poB4g +94QBkIzXgmEA3uTpXHLctIngpR8mZrQQtohI2zKlpnq9lCMZ7j3/xitZ6xS2KSlH +BU3Z4TXZKZuFP7IsITVTdlMg/OHua2l0i3ZewbIWPnnPJC8dQi+QdYe6FWjDwZPu +HBAbbxHVFCYnz5f4SP9LNqeWRGqHHnzb5pNe2xZHykPP84kvFvmRonqMBIvFrPhV +kw+Z43JBvxM4YwYp0GWEuDAik6KmbuM5SmwAiR67KigwwUoumJi9YdQlUIkNKO7P +SvmHCzaX47+AdLxDToMXCsIO2NlLGE5GN/RwQ8k0owWoK5WZYUI16pgZ39n/Z03y +Ig+W//qUJ7+eYTgvvCngR3kxUXipSVA0+skxWvdmRHla5MasuvtPuW/Xz6/+U3fS +4bmYTWA5TmhfrMublTncBXgEvX9LzyL+kPhf81OAix3RNUlD6Jp5+751ABEBAAGJ +ApYEGBECACAWIQT087kUdNHrKYib0O9+hAPV1nPDZgUCZdRdtAIbAgJACRB+hAPV +1nPDZsF0IAQZAQoAHRYhBFFrYikY0VxHirHqOlM5or6C4H3sBQJl1F20AAoJEFM5 +or6C4H3sBa8QALx76ibbGN3vz9+Aa58gtk1oDIIfEF/U7PmMuPB9CA9738kgiXvq +nxKAkiBU9EkaiYsPfF/iv35xp44CrFz/mjqMQiMlWOxMtRVXjsQQoGKmkdei4THk +3pVE4u6bXXb38LUnXyYVV9P0XLNV/ilwvRlnozP4NqrjH7MuKLKLUoKNHMD6UK2/ +UWUqHQPboFYTIb826+S8PiGQ/3PO7+Y+h0Jyq2o5c76N2PvMgtkQwvTTw6hPP8p1 +EIffN1wUpZ5dG+Cxe9oN2FF6Lq89WCK1M7n3DU4JZqjKIcmxJKPPmjQjdVUUhyXQ +4naywi+h30esJ/CbrQ0oyDnr0jbiTg04c6IV5U5deVDywJ9gAAgV0g12NDwo2SCb +ZeLGul8/tZXpXiTYJdTQ0N3EUZYPbOvY8Kdh95stq9HtKJyozP/yemFBfiTtK0Kt +QISQHf0GNJR+D682S0iB3nSprzXpgwgjaHYLQXYdUomg7lMGrtf3XZQlUaHYLHp6 +W0xhOweS/2kr5G461zSyJ3T9ITm59GapunXfuSGqA2mJvv9CXJqN8Qm6UzUD8QBk +JxiUC6IMVAoBShSPD9qC0jBxXETKNHC4zPoF0wfOVYjKJ29btfOjneL0IdLNR/6c +WcszscQx9Rm+vWArbDdcATTnImO1hIehxeQPp/8IRPpxHjD64GoNSbzyZkwAn0n6 +KhOXkidphC12e/W/W3vSRrm5AKC2S6Ile4sLQr7aDSQZLvJz54gxYw== +=Rw9e +-----END PGP PUBLIC KEY BLOCK----- diff --git a/SPECS/nghttp2/nghttp2.spec b/SPECS/nghttp2/nghttp2.spec new file mode 100644 index 00000000..218179c7 --- /dev/null +++ b/SPECS/nghttp2/nghttp2.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nghttp2 +Version: 1.66.0 +Release: %autorelease +Summary: Implementation of Hypertext Transfer Protocol version 2 in C +License: MIT +URL: https://nghttp2.org/ +#!RemoteAsset +Source0: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/nghttp2-%{version}.tar.xz +#!RemoteAsset +Source1: https://github.com/nghttp2/nghttp2/releases/download/v%{version}/nghttp2-%{version}.tar.xz.asc +Source2: nghttp2.keyring +BuildSystem: autotools +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules +# Attention: for now,wo can only build shared library +BuildOption(conf): --disable-app + +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: python3-rpm-macros +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(openssl) >= 1.1.1 + +%description +This is an implementation of Hypertext Transfer Protocol version 2. + +The framing layer of HTTP/2 is implemented as a form of reusable C library. +On top of that, we have implemented HTTP/2 client, server and proxy. We +have also developed load test and benchmarking tool for HTTP/2. + +HPACK encoder and decoder are available as public API. + +%package devel +Summary: Development files for nghttp2 +Requires: %{name} = %{version} + +%description devel +Development files for usage with libnghttp2, which implements +Hypertext Transfer Protocol version 2. + +%prep +%autosetup -p1 -n nghttp2-%{version} + +%install -a +rm -rf %{buildroot}%{_mandir}/man1/ +rm -f %{buildroot}%{_datadir}/nghttp2/fetch-ocsp-response +rm -f %{buildroot}%{_docdir}/nghttp2/README.rst + +%files +%license COPYING +# The main package now only contains the library +%{_libdir}/libnghttp2.so.14 +%{_libdir}/libnghttp2.so.14.* + +%files devel +%dir %{_includedir}/%{name}/ +%{_includedir}/%{name}/%{name}*.h +%{_libdir}/libnghttp2.so +%{_libdir}/pkgconfig/libnghttp2.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/nghttp3/0001-fix-install-path.patch b/SPECS/nghttp3/0001-fix-install-path.patch new file mode 100644 index 00000000..f2b815ce --- /dev/null +++ b/SPECS/nghttp3/0001-fix-install-path.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 7dbfde4..b060466 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -70,7 +70,7 @@ set(NGHTTP3_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") + set(NGHTTP3_VERSION_CONFIG "${NGHTTP3_GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake") + set(NGHTTP3_PROJECT_CONFIG "${NGHTTP3_GENERATED_DIR}/${PROJECT_NAME}Config.cmake") + set(NGHTTP3_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +-set(NGHTTP3_CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") ++set(NGHTTP3_CONFIG_INSTALL_DIR "lib64/cmake/${PROJECT_NAME}") + set(NGHTTP3_NAMESPACE "${PROJECT_NAME}::") + set(NGHTTP3_VERSION ${PROJECT_VERSION}) + diff --git a/SPECS/nghttp3/nghttp3.spec b/SPECS/nghttp3/nghttp3.spec new file mode 100644 index 00000000..3a10be0a --- /dev/null +++ b/SPECS/nghttp3/nghttp3.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nghttp3 +Version: 1.12.0 +Release: %autorelease +Summary: The HTTP/3 library +License: MIT +URL: https://github.com/ngtcp2/nghttp3 +#!RemoteAsset +Source: https://github.com/ngtcp2/nghttp3/releases/download/v%{version}/nghttp3-%{version}.tar.xz +BuildSystem: cmake +Patch: 0001-fix-install-path.patch + +BuildOption(conf): -DENABLE_STATIC_LIB:BOOL=OFF + +BuildRequires: cmake >= 3.20 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: pkgconfig(check) + +%description +nghttp3 is a C library that implements QUIC and HTTP/3 framing layer. + +%package devel +Summary: Development files for the HTTP/3 library +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries for nghttp3. + + +%ldconfig_scriptlets + +%files +%license COPYING +%doc %{_docdir}/%{name} +%{_libdir}/libnghttp3.so.9 +%{_libdir}/libnghttp3.so.9.* + +%files devel +%{_includedir}/nghttp3/ +%{_libdir}/libnghttp3.so +%{_libdir}/pkgconfig/libnghttp3.pc +%{_libdir}/cmake/ + +%changelog +%{?autochangelog} diff --git a/SPECS/nginx/nginx.logrotate b/SPECS/nginx/nginx.logrotate new file mode 100644 index 00000000..13ad4ff5 --- /dev/null +++ b/SPECS/nginx/nginx.logrotate @@ -0,0 +1,15 @@ +/var/log/nginx/*.log { + daily + missingok + rotate 14 + compress + delaycompress + notifempty + create 640 nginx nginx + sharedscripts + postrotate + if [ -f /run/nginx.pid ]; then + /bin/kill -USR1 $(cat /run/nginx.pid) 2>/dev/null || true + fi + endscript +} diff --git a/SPECS/nginx/nginx.service b/SPECS/nginx/nginx.service new file mode 100644 index 00000000..4470e4fe --- /dev/null +++ b/SPECS/nginx/nginx.service @@ -0,0 +1,18 @@ +[Unit] +Description=The nginx HTTP and reverse proxy server +After=network-online.target remote-fs.target nss-lookup.target +Wants=network-online.target + +[Service] +Type=forking +PIDFile=/run/nginx.pid +ExecStartPre=/usr/bin/nginx -t +ExecStart=/usr/bin/nginx +ExecReload=/bin/kill -s HUP $MAINPID +KillSignal=SIGQUIT +TimeoutStopSec=5 +KillMode=mixed +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/nginx/nginx.spec b/SPECS/nginx/nginx.spec new file mode 100644 index 00000000..a78df29c --- /dev/null +++ b/SPECS/nginx/nginx.spec @@ -0,0 +1,197 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: sunyuechi +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nginx +Version: 1.28.0 +Release: %autorelease +Summary: High performance web server and reverse proxy server + +License: BSD-2-Clause +URL: https://nginx.org +#!RemoteAsset +Source0: https://nginx.org/download/nginx-%{version}.tar.gz +Source1: nginx.service +Source2: nginx.logrotate +Source3: nginx.sysusers + +BuildRequires: gcc +BuildRequires: make +BuildRequires: openssl-devel +BuildRequires: pcre2-devel +BuildRequires: zlib-devel +BuildRequires: systemd-rpm-macros + +Requires: openssl +Requires: pcre2 +Requires: zlib +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +Provides: webserver + +%global nginx_moduledir %{_libdir}/nginx/modules +%global nginx_moduleconfdir %{_datadir}/nginx/modules + +%description +Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and +IMAP protocols, with a strong focus on high concurrency, performance and low +memory usage. + +%package doc +Summary: Documentation and examples for nginx +BuildArch: noarch + +%description doc +This package contains documentation, man pages, vim syntax files, and +example HTML files for nginx web server. + +%prep +%autosetup -n nginx-%{version} + +# nginx does not utilize a standard configure script. +%conf +./configure \ + --prefix=/etc/nginx \ + --conf-path=/etc/nginx/nginx.conf \ + --sbin-path=/usr/bin/nginx \ + --modules-path=%{_libdir}/nginx/modules \ + --pid-path=/run/nginx.pid \ + --lock-path=/run/lock/nginx.lock \ + --user=nginx \ + --group=nginx \ + --http-log-path=/var/log/nginx/access.log \ + --error-log-path=/var/log/nginx/error.log \ + --http-client-body-temp-path=/var/lib/nginx/client-body \ + --http-proxy-temp-path=/var/lib/nginx/proxy \ + --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ + --http-scgi-temp-path=/var/lib/nginx/scgi \ + --http-uwsgi-temp-path=/var/lib/nginx/uwsgi \ + --with-compat \ + --with-file-aio \ + --with-threads \ + --with-http_addition_module \ + --with-http_auth_request_module \ + --with-http_dav_module \ + --with-http_flv_module \ + --with-http_gunzip_module \ + --with-http_gzip_static_module \ + --with-http_mp4_module \ + --with-http_random_index_module \ + --with-http_realip_module \ + --with-http_secure_link_module \ + --with-http_slice_module \ + --with-http_ssl_module \ + --with-http_stub_status_module \ + --with-http_sub_module \ + --with-http_v2_module \ + --with-http_v3_module \ + --with-pcre-jit \ + --with-stream \ + --with-stream_realip_module \ + --with-stream_ssl_module \ + --with-stream_ssl_preread_module \ + --with-cc-opt="%{optflags}" \ + --with-ld-opt="%{build_ldflags}" + +%build + +%make_build + +%install +%make_install + +# Install systemd service file +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/nginx.service + +# Install logrotate configuration +install -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/nginx + +# Create directories +install -d -m 0755 %{buildroot}/var/lib/nginx +install -d -m 0700 %{buildroot}/var/lib/nginx/proxy +install -d -m 0700 %{buildroot}/var/lib/nginx/client-body +install -d -m 0700 %{buildroot}/var/lib/nginx/fastcgi +install -d -m 0700 %{buildroot}/var/lib/nginx/scgi +install -d -m 0700 %{buildroot}/var/lib/nginx/uwsgi +install -d -m 0755 %{buildroot}/var/log/nginx + +# Move html directory to standard location +install -d %{buildroot}%{_datadir}/nginx +mv %{buildroot}/etc/nginx/html %{buildroot}%{_datadir}/nginx/ + +# Update nginx.conf to point to new html location +sed -i 's|root\s*html;|root /usr/share/nginx/html;|g' \ + %{buildroot}%{_sysconfdir}/nginx/nginx.conf + +# Remove .default files +rm -f %{buildroot}%{_sysconfdir}/nginx/*.default + +# Install man page +install -p -D -m 0644 objs/nginx.8 %{buildroot}%{_mandir}/man8/nginx.8 + +# Install vim syntax files +for i in ftdetect ftplugin indent syntax; do + install -p -D -m 0644 contrib/vim/${i}/nginx.vim \ + %{buildroot}%{_datadir}/vim/vimfiles/${i}/nginx.vim +done + +install -p -d -m 0755 %{buildroot}%{nginx_moduleconfdir} +install -p -d -m 0755 %{buildroot}%{nginx_moduledir} + +# install sysusers file +install -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/nginx.conf + +%pre +%sysusers_create_compat %{SOURCE3} + +%post +%systemd_post nginx.service + +%preun +%systemd_preun nginx.service + +%postun +%systemd_postun_with_restart nginx.service + +%files +%license LICENSE +%{_bindir}/nginx +%dir %{_sysconfdir}/nginx +%config(noreplace) %{_sysconfdir}/nginx/fastcgi.conf +%config(noreplace) %{_sysconfdir}/nginx/fastcgi_params +%config(noreplace) %{_sysconfdir}/nginx/koi-utf +%config(noreplace) %{_sysconfdir}/nginx/koi-win +%config(noreplace) %{_sysconfdir}/nginx/mime.types +%config(noreplace) %{_sysconfdir}/nginx/nginx.conf +%config(noreplace) %{_sysconfdir}/nginx/scgi_params +%config(noreplace) %{_sysconfdir}/nginx/uwsgi_params +%config(noreplace) %{_sysconfdir}/nginx/win-utf +%config(noreplace) %{_sysconfdir}/logrotate.d/nginx +%{_sysusersdir}/nginx.conf +%dir %{_libdir}/nginx +%dir %{_libdir}/nginx/modules +%{_unitdir}/nginx.service +%dir %attr(755,nginx,nginx) /var/lib/nginx +%dir %attr(700,nginx,nginx) /var/lib/nginx/client-body +%dir %attr(700,nginx,nginx) /var/lib/nginx/fastcgi +%dir %attr(700,nginx,nginx) /var/lib/nginx/proxy +%dir %attr(700,nginx,nginx) /var/lib/nginx/scgi +%dir %attr(700,nginx,nginx) /var/lib/nginx/uwsgi +%dir %attr(755,nginx,nginx) /var/log/nginx + +%files doc +%doc CHANGES +%{_datadir}/nginx/html/* +%{_datadir}/vim/vimfiles/ftdetect/nginx.vim +%{_datadir}/vim/vimfiles/ftplugin/nginx.vim +%{_datadir}/vim/vimfiles/indent/nginx.vim +%{_datadir}/vim/vimfiles/syntax/nginx.vim +%{_mandir}/man8/nginx.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/nginx/nginx.sysusers b/SPECS/nginx/nginx.sysusers new file mode 100644 index 00000000..7f08e392 --- /dev/null +++ b/SPECS/nginx/nginx.sysusers @@ -0,0 +1,3 @@ +#Type Name ID GECOS Home directory Shell +g nginx - +u nginx - "Nginx web server" /var/lib/nginx /sbin/nologin diff --git a/SPECS/ngtcp2/ngtcp2.spec b/SPECS/ngtcp2/ngtcp2.spec new file mode 100644 index 00000000..96ed1005 --- /dev/null +++ b/SPECS/ngtcp2/ngtcp2.spec @@ -0,0 +1,121 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond doc 0 + +Name: ngtcp2 +Version: 1.16.0 +Release: %autorelease +Summary: Implementation of RFC 9000 QUIC protocol +License: MIT +URL: https://github.com/ngtcp2/ngtcp2 +#!RemoteAsset +Source: https://github.com/ngtcp2/ngtcp2/releases/download/v%{version}/ngtcp2-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --with-gnutls +BuildOption(conf): --with-openssl +BuildOption(conf): --with-libev +BuildOption(conf): --disable-static +BuildOption(conf): --enable-werror +%if %{without doc} +BuildOption(conf): --disable-docs +%endif + +BuildRequires: autoconf gcc make libtool +BuildRequires: pkgconfig(libev) +BuildRequires: gnutls-devel >= 3.7.5 +BuildRequires: openssl-devel >= 3.5.0 +%if %{with doc} +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_rtd_theme +%endif + +%description +"Call it TCP/2. One More Time." +ngtcp2 project is an effort to implement RFC9000 QUIC protocol. + +%package devel +Summary: The ngtcp2 development files +Requires: %{name} = %{version} +Recommends: %{name}-crypto-gnutls-devel = %{version} +Recommends: %{name}-crypto-ossl-devel = %{version} + +%description devel +Development headers and libraries for the ngtcp2 QUIC protocol implementation. + +%package crypto-gnutls +Summary: The ngtcp2 GnuTLS crypto backend +Requires: %{name} = %{version} + +%description crypto-gnutls +GnuTLS crypto backend for the ngtcp2 QUIC protocol implementation. + +%package crypto-gnutls-devel +Summary: Development files for the ngtcp2 GnuTLS crypto backend +Requires: %{name}-devel = %{version} +Requires: %{name}-crypto-gnutls = %{version} +Requires: gnutls-devel >= 3.7.5 + +%description crypto-gnutls-devel +Development files for the GnuTLS crypto backend for ngtcp2. + +%package crypto-ossl +Summary: The ngtcp2 OpenSSL crypto backend +Requires: %{name} = %{version} + +%description crypto-ossl +OpenSSL crypto backend for the ngtcp2 QUIC protocol implementation. + +%package crypto-ossl-devel +Summary: Development files for the ngtcp2 OpenSSL crypto backend +Requires: %{name}-devel = %{version} +Requires: %{name}-crypto-ossl = %{version} +Requires: openssl-devel >= 3.5.0 + +%description crypto-ossl-devel +Development files for the OpenSSL crypto backend for ngtcp2. + +%conf -p +autoreconf -fsi + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS +%doc %{_docdir}/ngtcp2 +%{_libdir}/libngtcp2.so.16* + +%files crypto-gnutls +%{_libdir}/libngtcp2_crypto_gnutls.so.8* + +%files crypto-ossl +%{_libdir}/libngtcp2_crypto_ossl.so.0* + +%files devel +%doc ChangeLog +%{_libdir}/libngtcp2.so +%{_libdir}/pkgconfig/libngtcp2.pc +%{_includedir}/ngtcp2/ +%exclude %{_includedir}/ngtcp2/ngtcp2_crypto_*.h + +%files crypto-gnutls-devel +%{_libdir}/libngtcp2_crypto_gnutls.so +%{_libdir}/pkgconfig/libngtcp2_crypto_gnutls.pc +%{_includedir}/ngtcp2/ngtcp2_crypto_gnutls.h + +%files crypto-ossl-devel +%{_libdir}/libngtcp2_crypto_ossl.so +%{_libdir}/pkgconfig/libngtcp2_crypto_ossl.pc +%{_includedir}/ngtcp2/ngtcp2_crypto_ossl.h + +%changelog +%{?autochangelog} diff --git a/SPECS/ninja/macros.ninja b/SPECS/ninja/macros.ninja new file mode 100644 index 00000000..ef3167bd --- /dev/null +++ b/SPECS/ninja/macros.ninja @@ -0,0 +1,11 @@ +%__ninja %{_bindir}/ninja +%__ninja_common_opts -v %{?_smp_mflags} + +%ninja_build \ + %{__ninja} %{__ninja_common_opts} + +%ninja_install \ + DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts} + +%ninja_test \ + %{__ninja} test %{__ninja_common_opts} \ No newline at end of file diff --git a/SPECS/ninja/ninja.spec b/SPECS/ninja/ninja.spec new file mode 100644 index 00000000..f02dcc20 --- /dev/null +++ b/SPECS/ninja/ninja.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: ninja +Version: 1.13.1 +Release: %autorelease +Summary: A small build system closest in spirit to Make +License: Apache-2.0 +Group: Development/Tools/Building +URL: https://ninja-build.org/ +#!RemoteAsset +Source0: https://github.com/ninja-build/ninja/archive/v%{version}/ninja-%{version}.tar.gz +Source1: macros.ninja +BuildSystem: cmake + +BuildOption(conf): -DBUILD_TESTING=OFF +BuildOption(conf): -DCMAKE_INSTALL_PREFIX=%{_prefix} + +BuildRequires: cmake +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: python3 +BuildRequires: re2c + +%description +Ninja is a small build system with a focus on speed, designed to have its input +files generated by a higher-level build system. + + +%install -a +install -D -p -m 0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja +install -D -p -m 0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/site/syntax/ninja.vim +install -D -p -m 0644 misc/bash-completion %{buildroot}%{_datadir}/bash-completion/completions/ninja +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ninja + +%files +%license COPYING +%{_bindir}/ninja +%{_datadir}/bash-completion +%{_datadir}/vim +%{_datadir}/zsh +%{_rpmconfigdir}/macros.d/macros.ninja + +%changelog +%{?autochangelog} diff --git a/SPECS/nlohmann-json/nlohmann-json.spec b/SPECS/nlohmann-json/nlohmann-json.spec new file mode 100644 index 00000000..837c656f --- /dev/null +++ b/SPECS/nlohmann-json/nlohmann-json.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nlohmann-json +Version: 3.12.0 +Release: %autorelease +Summary: JSON for Modern C++ (header-only) +License: MIT +URL: https://github.com/nlohmann/json +#!RemoteAsset +Source: https://github.com/nlohmann/json/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DJSON_MultipleHeaders:BOOL=ON +BuildOption(conf): -DJSON_BuildTests:BOOL=OFF +BuildOption(conf): -DJSON_Install:BOOL=ON +BuildRequires: doctest +BuildRequires: gcc-c++ +BuildRequires: cmake + +%description +JSON for Modern C++ is a header-only C++ library for reading, writing, +and manipulating JSON data. + +%files +%license LICENSE.MIT +%doc README.md +%{_includedir}/nlohmann +%{_datadir}/cmake/nlohmann_json/*.cmake +%{_datadir}/pkgconfig/nlohmann_json.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/npth/npth.spec b/SPECS/npth/npth.spec new file mode 100644 index 00000000..49204fd3 --- /dev/null +++ b/SPECS/npth/npth.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Suyun114 +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: npth +Version: 1.8 +Release: %autorelease +Summary: GNU Portable Threads library +License: LGPL-2.1-or-later +URL: https://gnupg.org/software/npth/ +#!RemoteAsset +Source: https://gnupg.org/ftp/gcrypt/%{name}/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source2: https://gnupg.org/ftp/gcrypt/%{name}/%{name}-%{version}.tar.bz2.sig + +BuildSystem: autotools +BuildOption(conf): --disable-static + +%description +nPth is a non-preemptive threads implementation using an API very similar +to the one known from GNU Pth. It has been designed as a replacement of +GNU Pth for non-ancient operating systems. In contrast to GNU Pth is is +based on the system's standard threads implementation. Thus nPth allows +the use of libraries which are not compatible to GNU Pth. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains libraries and header files for +developing applications that use %{name}. + +%files +%license COPYING.LIB +%{_libdir}/lib%{name}.so.* + +%files devel +%license COPYING.LIB +%doc AUTHORS ChangeLog NEWS README +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc +%{_includedir}/%{name}.h +%{_datadir}/aclocal/%{name}.m4 + +%changelog +%{?autochangelog} diff --git a/SPECS/nspr/0001-nspr-gcc-atomics.patch b/SPECS/nspr/0001-nspr-gcc-atomics.patch new file mode 100644 index 00000000..ecea424d --- /dev/null +++ b/SPECS/nspr/0001-nspr-gcc-atomics.patch @@ -0,0 +1,55 @@ +diff --git a/nspr/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h +index ad57d08..57877b8 100644 +--- a/nspr/pr/include/md/_linux.h ++++ b/nspr/pr/include/md/_linux.h +@@ -105,6 +105,15 @@ + #endif + + #if defined(__i386__) ++#if defined(__GNUC__) ++/* Use GCC built-in functions */ ++#define _PR_HAVE_ATOMIC_OPS ++#define _MD_INIT_ATOMIC() ++#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) ++#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1) ++#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i) ++#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv) ++#else + #define _PR_HAVE_ATOMIC_OPS + #define _MD_INIT_ATOMIC() + extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val); +@@ -116,6 +125,7 @@ extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val); + extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval); + #define _MD_ATOMIC_SET _PR_x86_AtomicSet + #endif ++#endif + + #if defined(__ia64__) + #define _PR_HAVE_ATOMIC_OPS +@@ -131,6 +141,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval); + #endif + + #if defined(__x86_64__) ++#if defined(__GNUC__) ++/* Use GCC built-in functions */ ++#define _PR_HAVE_ATOMIC_OPS ++#define _MD_INIT_ATOMIC() ++#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1) ++#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1) ++#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i) ++#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv) ++#else + #define _PR_HAVE_ATOMIC_OPS + #define _MD_INIT_ATOMIC() + extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32 *val); +@@ -142,6 +161,7 @@ extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32 *ptr, PRInt32 val); + extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); + #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet + #endif ++#endif + + #if defined(__loongarch__) + #if defined(__GNUC__) +-- +2.32.1 (Apple Git-133) + diff --git a/SPECS/nspr/nspr.spec b/SPECS/nspr/nspr.spec new file mode 100644 index 00000000..8194192e --- /dev/null +++ b/SPECS/nspr/nspr.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nspr +Version: 4.37.0 +Release: %autorelease +Summary: Netscape Portable Runtime libraries +License: MPL-2.0 +URL: https://firefox-source-docs.mozilla.org/nspr/index.html +#!RemoteAsset +Source0: https://ftp.mozilla.org/pub/nspr/releases/v4.37/src/%{name}-4.37.tar.gz#/%{name}-%{version}.tar.gz +Patch: 0001-nspr-gcc-atomics.patch +BuildSystem: autotools + +BuildOption(conf): --enable-64bit --enable-optimize --disable-debug +BuildOption(conf): --includedir=%{_includedir}/nspr + +BuildOption(build): -C nspr +BuildOption(install): -C nspr + +BuildRequires: gcc + +%description +NetScape Portable Runtime (NSPR) provides platform independence for non-GUI +operating system facilities, including threads, I/O, and memory management. + +%package devel +Summary: Development libraries and tools for NSPR +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config file, and development +tools needed to build applications that use the NSPR libraries. + +%conf -p +cd nspr + +%install -a +rm -f %{buildroot}%{_bindir}/compile-et.pl %{buildroot}%{_bindir}/prerr.properties +find %{buildroot} -type f -name "*.a" -delete -print + +%ldconfig_scriptlets + +%files +%license nspr/LICENSE +%{_libdir}/lib*.so + +%files devel +%{_includedir}/nspr/nspr.h +%{_includedir}/nspr/pr*.h +%{_includedir}/nspr/pl*.h +%{_includedir}/nspr/obsolete/ +%{_includedir}/nspr/private/ +%{_includedir}/nspr/md/ +%{_bindir}/nspr-config +%{_datadir}/aclocal/nspr.m4 +%{_libdir}/pkgconfig/nspr.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/nss/nss.spec b/SPECS/nss/nss.spec new file mode 100644 index 00000000..cc5cece1 --- /dev/null +++ b/SPECS/nss/nss.spec @@ -0,0 +1,124 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nss +Version: 3.115 +Release: %autorelease +Summary: Network Security Services +License: MPL-2.0 +URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS +#!RemoteAsset +Source: https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_115_RTM/src/nss-3.115-with-nspr-4.37.tar.gz +BuildSystem: autotools + +BuildOption(build): -C nss +BuildOption(build): nss_build_all +BuildOption(build): BUILD_OPT=1 +BuildOption(build): NSS_USE_SYSTEM_SQLITE=1 +BuildOption(build): NSS_ENABLE_WERROR=0 +BuildOption(build): USE_64=1 + +BuildRequires: gcc-c++ make sqlite-devel +BuildRequires: zlib-devel perl which + +%description +Network Security Services (NSS) is a set of libraries for developing +security-enabled client and server applications. This all-in-one package +contains the runtime libraries, development files, and command-line tools. + +# No configure +%conf + +%install +# no make install +install -d -m 755 %{buildroot}%{_bindir} +install -d -m 755 %{buildroot}%{_libdir} +install -d -m 755 %{buildroot}%{_includedir}/nss3 +install -d -m 755 %{buildroot}%{_includedir}/nspr4 +install -d -m 755 %{buildroot}%{_libdir}/pkgconfig +install -d -m 755 %{buildroot}%{_sysconfdir}/pki/nssdb + +TARGET_DIR=$(cat dist/latest) +DIST_DIR=dist/$TARGET_DIR + +cp -a $DIST_DIR/bin/* %{buildroot}%{_bindir}/ +cp -a $DIST_DIR/lib/* %{buildroot}%{_libdir}/ + +cp -aL dist/public/nss/*.h %{buildroot}%{_includedir}/nss3/ + +cp -aL $DIST_DIR/include/*.h %{buildroot}%{_includedir}/nspr4/ + +find nss/lib -name "*.so" -path "*${TARGET_DIR}*" -exec install -p -m 755 {} %{buildroot}%{_libdir}/ \; +find nss/lib -name "*.a" -path "*${TARGET_DIR}*" -exec install -p -m 644 {} %{buildroot}%{_libdir}/ \; +find nss/lib -name "*.chk" -path "*${TARGET_DIR}*" -exec install -p -m 644 {} %{buildroot}%{_libdir}/ \; + +cd %{buildroot}%{_libdir} +ln -snf libnss3.so libnss3.so.3 +ln -snf libnssutil3.so libnssutil3.so.3 +ln -snf libsmime3.so libsmime3.so.3 +ln -snf libssl3.so libssl3.so.3 +ln -snf libsoftokn3.so libsoftokn3.so.3 +ln -snf libnspr4.so libnspr4.so.0 +ln -snf libplc4.so libplc4.so.0 +ln -snf libplds4.so libplds4.so.0 + +rm -f %{buildroot}%{_bindir}/{gtests,nss-gtest-all} + +# need create pc +install -d -m 755 %{buildroot}%{_libdir}/pkgconfig + +cat > %{buildroot}%{_libdir}/pkgconfig/nss-util.pc << EOF +prefix=%{_prefix} +exec_prefix=%{_exec_prefix} +libdir=%{_libdir} +includedir=%{_includedir}/nss3 + +Name: NSS-UTIL +Description: Network Security Services Utility Library +Version: 3.94 +Requires: nspr +Libs: -L\${libdir} -lnssutil3 +Cflags: -I\${includedir} +EOF + +cat > %{buildroot}%{_libdir}/pkgconfig/nss.pc << EOF +prefix=%{_prefix} +exec_prefix=%{_exec_prefix} +libdir=%{_libdir} +includedir=%{_includedir}/nss3 + +Name: NSS +Description: Network Security Services +Version: 3.115 +Requires: nspr +Libs: -L\${libdir} -lssl3 -lsmime3 -lnss3 +Cflags: -I\${includedir} +EOF + +# TODO: Add tests +%check + +%ldconfig_scriptlets + +%files +%license nss/COPYING +%dir %{_sysconfdir}/pki +%dir %{_sysconfdir}/pki/nssdb +%exclude %{_libdir}/libnspr4.so +%exclude %{_libdir}/libplc4.so +%exclude %{_libdir}/libplds4.so +%{_libdir}/lib*.so* +%{_libdir}/*.chk +%{_bindir}/* +%{_includedir}/nss3/ +%{_includedir}/nspr4/ +%{_libdir}/lib*.a +%{_libdir}/pkgconfig/nss-util.pc +%{_libdir}/pkgconfig/nss.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/nss_wrapper/0001-nwrap-fix-tests.patch b/SPECS/nss_wrapper/0001-nwrap-fix-tests.patch new file mode 100644 index 00000000..08e86521 --- /dev/null +++ b/SPECS/nss_wrapper/0001-nwrap-fix-tests.patch @@ -0,0 +1,110 @@ +From 59468d514326009616e166f484b4b2ec7163b91b Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 17 Jul 2025 15:17:52 +0200 +Subject: [PATCH] tests: Add missing include for stdint.h + +Signed-off-by: Andreas Schneider +--- + tests/test_getaddrinfo.c | 1 + + tests/test_gethostby_name_addr.c | 1 + + tests/test_gethostent.c | 3 ++- + tests/test_getpwuid_module.c | 1 + + tests/test_initgroups.c | 1 + + tests/test_nwrap_disabled.c | 1 + + tests/testsuite.c | 1 + + 7 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/tests/test_getaddrinfo.c b/tests/test_getaddrinfo.c +index 6de0323..63dc21f 100644 +--- a/tests/test_getaddrinfo.c ++++ b/tests/test_getaddrinfo.c +@@ -2,6 +2,7 @@ + + #include + #include ++#include + #include + #include + +diff --git a/tests/test_gethostby_name_addr.c b/tests/test_gethostby_name_addr.c +index e8939f6..9aae9ae 100644 +--- a/tests/test_gethostby_name_addr.c ++++ b/tests/test_gethostby_name_addr.c +@@ -4,6 +4,7 @@ + + #include + #include ++#include + #include + #include + +diff --git a/tests/test_gethostent.c b/tests/test_gethostent.c +index aa61696..ad8a89c 100644 +--- a/tests/test_gethostent.c ++++ b/tests/test_gethostent.c +@@ -2,6 +2,7 @@ + + #include + #include ++#include + #include + #include + +@@ -31,7 +32,7 @@ static void test_nwrap_gethostent(void **state) + char buf[INET6_ADDRSTRLEN]; + uint32_t j; + const char *ip; +- ++ + ip = inet_ntop(he->h_addrtype, + he->h_addr_list[i], + buf, +diff --git a/tests/test_getpwuid_module.c b/tests/test_getpwuid_module.c +index a06a49d..3718ebb 100644 +--- a/tests/test_getpwuid_module.c ++++ b/tests/test_getpwuid_module.c +@@ -2,6 +2,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/tests/test_initgroups.c b/tests/test_initgroups.c +index 1ec2220..f5ccba7 100644 +--- a/tests/test_initgroups.c ++++ b/tests/test_initgroups.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include + #include + #include +diff --git a/tests/test_nwrap_disabled.c b/tests/test_nwrap_disabled.c +index f00294b..090377d 100644 +--- a/tests/test_nwrap_disabled.c ++++ b/tests/test_nwrap_disabled.c +@@ -2,6 +2,7 @@ + + #include + #include ++#include + #include + #include + +diff --git a/tests/testsuite.c b/tests/testsuite.c +index bf678fd..41082f9 100644 +--- a/tests/testsuite.c ++++ b/tests/testsuite.c +@@ -2,6 +2,7 @@ + + #include + #include ++#include + #include + #include + +-- +GitLab diff --git a/SPECS/nss_wrapper/nss_wrapper.spec b/SPECS/nss_wrapper/nss_wrapper.spec new file mode 100644 index 00000000..8f4bb3c1 --- /dev/null +++ b/SPECS/nss_wrapper/nss_wrapper.spec @@ -0,0 +1,72 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: nss_wrapper +Version: 1.1.16 +Release: %autorelease +Summary: A wrapper for the user, group and hosts NSS API +License: BSD-3-Clause +URL: http://cwrap.org/ +#!RemoteAsset +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc +BuildSystem: cmake + +# Fix tests +Patch0: 0001-nwrap-fix-tests.patch + +BuildOption(conf): -DUNIT_TESTING=ON + +BuildRequires: cmake +BuildRequires: cmocka-cmake +BuildRequires: perl + +Recommends: cmake +Recommends: pkgconfig + +%description +There are projects which provide daemons needing to be able to create, modify +and delete Unix users. Or just switch user ids to interact with the system e.g. +a user space file server. To be able to test that you need the privilege to +modify the passwd and groups file. With nss_wrapper it is possible to define +your own passwd and groups file which will be used by software to act correctly +while under test. + +If you have a client and server under test they normally use functions to +resolve network names to addresses (dns) or vice versa. The nss_wrappers allow +you to create a hosts file to setup name resolution for the addresses you use +with socket_wrapper. + +To use it set the following environment variables: + +LD_PRELOAD=libuid_wrapper.so +NSS_WRAPPER_PASSWD=/path/to/passwd +NSS_WRAPPER_GROUP=/path/to/group +NSS_WRAPPER_HOSTS=/path/to/host + +This package doesn't have a devel package cause this project is for +development/testing. + +%install -a +sed -i '1 s|/usr/bin/env\ perl|/usr/bin/perl|' %{buildroot}%{_bindir}/nss_wrapper.pl + +%ldconfig_scriptlets + +%files +%doc AUTHORS README.md CHANGELOG +%license LICENSE +%{_bindir}/nss_wrapper.pl +%dir %{_libdir}/cmake/nss_wrapper +%{_libdir}/cmake/nss_wrapper/nss_wrapper-config-version.cmake +%{_libdir}/cmake/nss_wrapper/nss_wrapper-config.cmake +%{_libdir}/pkgconfig/nss_wrapper.pc +%{_mandir}/man1/nss_wrapper.1* +%{_libdir}/libnss_wrapper.so* + +%changelog +%{?autochangelog} diff --git a/SPECS/numactl/numactl.spec b/SPECS/numactl/numactl.spec new file mode 100644 index 00000000..3b4992d7 --- /dev/null +++ b/SPECS/numactl/numactl.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: numactl +Version: 2.0.19 +Release: %autorelease +Summary: Library for tuning for Non Uniform Memory Access machines +License: GPL-2.0-only +URL: https://github.com/numactl/numactl +#!RemoteAsset +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make + +%description +Simple NUMA policy support. It consists of a numactl program to run +other programs with a specific NUMA policy. + +%package devel +Summary: Development package for building Applications that use numa +Requires: %{name} = %{version}-%{release} +License: LGPL-2.1-only and GPL-2.0-only + +%description devel +Provides development headers for numa library calls + +%ldconfig_scriptlets + +%files +%doc README.md +%{_bindir}/numactl +%{_bindir}/numademo +%{_bindir}/numastat +%{_bindir}/memhog +%{_bindir}/migspeed +%{_bindir}/migratepages +%{_libdir}/libnuma.so.1.0.0 +%{_libdir}/libnuma.so.1 +%{_mandir}/man8/*.8* +# Already included this in man-pages package +%exclude %{_mandir}/man2/*.2* + +%files devel +%{_libdir}/libnuma.so +%exclude %{_libdir}/libnuma.a +%{_libdir}/pkgconfig/numa.pc +%{_includedir}/numa.h +%{_includedir}/numaif.h +%{_includedir}/numacompat1.h +%{_mandir}/man3/*.3* + +%changelog +%{?autochangelog} diff --git a/SPECS/numad/0001-recognize-m-option-correctly.patch b/SPECS/numad/0001-recognize-m-option-correctly.patch new file mode 100644 index 00000000..f36aca63 --- /dev/null +++ b/SPECS/numad/0001-recognize-m-option-correctly.patch @@ -0,0 +1,25 @@ +From cf6c2c029edc9c288122bcd603a72eb7f6d042d2 Mon Sep 17 00:00:00 2001 +From: Jan Synacek +Date: Mon, 30 Oct 2017 11:37:45 +0100 +Subject: [PATCH] recognize -m option correctly + +--- + numad.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/numad.c b/numad.c +index 4c85486..0721af4 100644 +--- a/numad.c ++++ b/numad.c +@@ -2395,7 +2395,7 @@ int main(int argc, char *argv[]) { + int x_flag = 0; + int tmp_int = 0; + long list_pid = 0; +- while ((opt = getopt(argc, argv, "C:dD:hH:i:K:l:p:r:R:S:t:u:vVw:x:")) != -1) { ++ while ((opt = getopt(argc, argv, "C:dD:hH:i:K:l:m:p:r:R:S:t:u:vVw:x:")) != -1) { + switch (opt) { + case 'C': + C_flag = 1; +-- +2.34.1 + diff --git a/SPECS/numad/0002-numad_log-fix-buffer-overflow.patch b/SPECS/numad/0002-numad_log-fix-buffer-overflow.patch new file mode 100644 index 00000000..29de58df --- /dev/null +++ b/SPECS/numad/0002-numad_log-fix-buffer-overflow.patch @@ -0,0 +1,25 @@ +From 3399d89305b6560e27e70aff4ad9fb403dedf947 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 6 Sep 2023 12:27:47 +0200 +Subject: [PATCH] numad_log: fix buffer overflow + +--- + numad.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/numad.c b/numad.c +index a6a7a5d..25363a2 100644 +--- a/numad.c ++++ b/numad.c +@@ -153,7 +153,7 @@ void numad_log(int level, const char *fmt, ...) { + *p++ = ' '; + va_list ap; + va_start(ap, fmt); +- vsnprintf(p, BUF_SIZE, fmt, ap); ++ vsnprintf(p, BUF_SIZE - strlen(buf) , fmt, ap); + va_end(ap); + fprintf(log_fs, "%s", buf); + fflush(log_fs); +-- +2.34.1 + diff --git a/SPECS/numad/0003-avoid-array-index-out-of-bounds.patch b/SPECS/numad/0003-avoid-array-index-out-of-bounds.patch new file mode 100644 index 00000000..8c104045 --- /dev/null +++ b/SPECS/numad/0003-avoid-array-index-out-of-bounds.patch @@ -0,0 +1,25 @@ +From ade9632aecbe1ed2d9a9220edcd42f56b9ad0eea Mon Sep 17 00:00:00 2001 +From: luochenglcs +Date: Tue, 30 Aug 2022 15:47:39 +0800 +Subject: [PATCH] avoid array index out-of-bounds + +--- + numad.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/numad.c b/numad.c +index 0721af4..58a198c 100644 +--- a/numad.c ++++ b/numad.c +@@ -1983,6 +1983,8 @@ id_list_p pick_numa_nodes(int pid, int cpus, int mbs, int assume_enough_cpus) { + // Next line optional, since we will not look at that node again + tmp_node[index[best_node_ix]].magnitude = combined_value_of_weighted_resources(0, mbs, cpus, tmp_node[index[best_node_ix]].MBs_free, tmp_node[index[best_node_ix]].CPUs_free); + best_node_ix += 1; ++ if (best_node_ix >= num_nodes) ++ break; + } + // For existing processes, calculate the non-local memory percent to see if + // process is already in the right place. +-- +1.8.3.1 + diff --git a/SPECS/numad/numad.spec b/SPECS/numad/numad.spec new file mode 100644 index 00000000..467c5b0c --- /dev/null +++ b/SPECS/numad/numad.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: numad +Version: 0.5 +Release: %autorelease +Summary: NUMA user daemon +License: LGPL-2.1-only +URL: https://pagure.io/numad +#!RemoteAsset: git+https://pagure.io/numad#aec1497e2b29f57997ae27351ac01abc25026387 +#!CreateArchive +Source0: %{name}-%{version}git.tar.gz +Patch1: 0001-recognize-m-option-correctly.patch +Patch2: 0002-numad_log-fix-buffer-overflow.patch +Patch3: 0003-avoid-array-index-out-of-bounds.patch + +BuildRequires: gcc +BuildRequires: make +BuildRequires: systemd-rpm-macros + +%systemd_requires + +%description +Numad is a deamon that monitors NUMA topology and usage and distributes +loads for good locality for the purpose of providing the best performance, +by avoiding unnecessary latency. + +%prep +%autosetup -n %{name}-%{version}git -p1 + +%build +%make_build CFLAGS="$CFLAGS" + +%install +%make_install prefix=%{buildroot}/usr +mkdir -p %{buildroot}%{_unitdir} +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d +install -p -m 644 numad.service %{buildroot}%{_unitdir}/ +install -p -m 644 numad.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} + +%files +%config(noreplace) %{_sysconfdir}/logrotate.d/numad +%{_bindir}/* +%{_unitdir}/numad.service +%doc %{_mandir}/man8/* + +%post +%systemd_post numad.service + +%preun +%systemd_preun numad.service + +%postun +%systemd_postun numad.service + +%changelog +%{?autochangelog} diff --git a/SPECS/oniguruma/oniguruma.spec b/SPECS/oniguruma/oniguruma.spec new file mode 100644 index 00000000..5bca62b8 --- /dev/null +++ b/SPECS/oniguruma/oniguruma.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: oniguruma +Version: 6.9.10 +Release: %autorelease +Summary: Regular expressions library +License: BSD-2-Clause +URL: https://github.com/kkos/oniguruma/ +#!RemoteAsset +Source0: https://github.com/kkos/oniguruma/releases/download/v%{version}/onig-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --disable-static + +BuildRequires: gcc +# autoreconf needs these +BuildRequires: autoconf automake libtool + +%description +Oniguruma is a regular expressions library that supports various character +encodings for each regular expression object. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, documentation, and other development +files for the oniguruma library. + + +%prep -a +%{__sed} -i.multilib -e 's|-L@libdir@||' onig-config.in + +%conf -p +autoreconf -fiv + +%install -a +find %{buildroot} -type f \( -name "*.la" -o -name "*.a" \) -delete -print + +%ldconfig_scriptlets + +%files +%doc AUTHORS +%license COPYING +%lang(ja) %doc README_japanese index_ja.html +%{_libdir}/libonig.so.5* + +%files devel +%lang(ja) %doc doc/*.ja +%doc HISTORY README.md index.html doc/API doc/CALLOUTS.API doc/CALLOUTS.BUILTIN doc/FAQ doc/RE +%{_bindir}/onig-config +%{_includedir}/onig*.h +%{_libdir}/libonig.so +%{_libdir}/pkgconfig/oniguruma.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/openblas/openblas.spec b/SPECS/openblas/openblas.spec new file mode 100644 index 00000000..be1970fd --- /dev/null +++ b/SPECS/openblas/openblas.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: openblas +Version: 0.3.30 +Release: %autorelease +Summary: An optimized BLAS library based on GotoBLAS2 1.13 BSD version +License: BSD-3-Clause +URL: http://www.openmathlib.org/OpenBLAS/ +#!RemoteAsset +Source0: https://github.com/OpenMathLib/OpenBLAS/releases/download/v%{version}/OpenBLAS-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): BINARY=64 +BuildOption(build): INTERFACE64=1 +BuildOption(build): USE_THREAD=1 +BuildOption(build): USE_OPENMP=0 +BuildOption(build): NO_STATIC=1 +BuildOption(build): DYNAMIC_ARCH=1 +BuildOption(build): TARGET=RISCV64_GENERIC +BuildOption(build): NO_TEST=1 +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): OPENBLAS_LIBRARY_DIR=%{_libdir} +BuildOption(install): NO_STATIC=1 +BuildRequires: gcc perl-devel gcc-c++ + +%description +OpenBLAS is an optimized BLAS library based on GotoBLAS2, providing a high-performance +implementation of Basic Linear Algebra Subprograms. + +%package devel +Summary: Development files for OpenBLAS +Requires: %{name} = %{version} + +%description devel +This package contains the development headers and libraries for OpenBLAS. + +# No configure +%conf + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc Changelog.txt GotoBLAS_01Readme.txt +%{_libdir}/libopenblas*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/libopenblas*.so +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/openblas/ + +%changelog +%{?autochangelog} diff --git a/SPECS/openjade/0001-openjade-getoptperl.patch b/SPECS/openjade/0001-openjade-getoptperl.patch new file mode 100644 index 00000000..0d835eae --- /dev/null +++ b/SPECS/openjade/0001-openjade-getoptperl.patch @@ -0,0 +1,21 @@ +diff -urNp openjade-1.3.2-orig/msggen.pl openjade-1.3.2/msggen.pl +--- openjade-1.3.2-orig/msggen.pl 2002-10-20 23:47:23.000000000 +0200 ++++ openjade-1.3.2/msggen.pl 2012-08-10 10:38:28.019081661 +0200 +@@ -4,6 +4,7 @@ + # See the file COPYING for copying permission. + + use POSIX; ++use Getopt::Std; + + # Package and version. + $package = 'openjade'; +@@ -18,8 +19,7 @@ $gen_c = 0; + undef $opt_l; + undef $opt_p; + undef $opt_t; +-do 'getopts.pl'; +-&Getopts('l:p:t:'); ++getopts('l:p:t:'); + $module = $opt_l; + $pot_file = $opt_p; + diff --git a/SPECS/openjade/0002-openjade-nola.patch b/SPECS/openjade/0002-openjade-nola.patch new file mode 100644 index 00000000..1e23ca52 --- /dev/null +++ b/SPECS/openjade/0002-openjade-nola.patch @@ -0,0 +1,12 @@ +diff -urNp openjade-1.3.2-orig/jade/Makefile.sub openjade-1.3.2/jade/Makefile.sub +--- openjade-1.3.2-orig/jade/Makefile.sub 2002-11-15 23:46:50.000000000 +0100 ++++ openjade-1.3.2/jade/Makefile.sub 2009-02-13 11:52:30.000000000 +0100 +@@ -4,7 +4,7 @@ OBJS=jade.o SgmlFOTBuilder.o RtfFOTBuild + INCLUDE=-I$(srcdir)/../grove -I$(srcdir)/../spgrove -I$(srcdir)/../style + # XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a \ + # ../lib/libosp.a +-XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a $(splibdir)/libosp.a ++XLIBS=../style/libostyle.a ../spgrove/libospgrove.a ../grove/libogrove.a $(splibdir)/libosp.so + GENSRCS=JadeMessages.h HtmlMessages.h RtfMessages.h TeXMessages.h \ + HtmlFOTBuilder_inst.cxx RtfFOTBuilder_inst.cxx TeXFOTBuilder_inst.cxx \ + TransformFOTBuilder_inst.cxx MifMessages.h MifFOTBuilder_inst.cxx diff --git a/SPECS/openjade/0003-openjade-1.3.1-nsl.patch b/SPECS/openjade/0003-openjade-1.3.1-nsl.patch new file mode 100644 index 00000000..48d13029 --- /dev/null +++ b/SPECS/openjade/0003-openjade-1.3.1-nsl.patch @@ -0,0 +1,21 @@ +--- openjade-1.3.1/config/configure.in.lr 2003-09-12 08:03:22.000000000 -0600 ++++ openjade-1.3.1/config/configure.in 2003-09-12 08:03:44.000000000 -0600 +@@ -156,7 +156,6 @@ + then + AC_MSG_RESULT(yes) + AC_DEFINE(SP_HAVE_SOCKET) +- AC_CHECK_LIB(nsl,main,LIBS="$LIBS -lnsl") + AC_CHECK_LIB(socket,main,LIBS="$LIBS -lsocket") + AC_MSG_CHECKING(h_errno in netdb.h) + AC_EGREP_HEADER(h_errno,netdb.h, +--- openjade-1.3.1/configure.lr 2003-09-12 08:35:55.000000000 -0600 ++++ openjade-1.3.1/configure 2003-09-12 08:36:07.000000000 -0600 +@@ -5530,7 +5530,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lnsl $LIBS" ++LIBS="-lXXXnsl $LIBS" + cat >conftest.$ac_ext <<_ACEOF + #line $LINENO "configure" + #include "confdefs.h" diff --git a/SPECS/openjade/0004-openjade-deplibs.patch b/SPECS/openjade/0004-openjade-deplibs.patch new file mode 100644 index 00000000..3466ad7d --- /dev/null +++ b/SPECS/openjade/0004-openjade-deplibs.patch @@ -0,0 +1,40 @@ +diff -urNp openjade-1.3.2/grove/Makefile.sub devel/grove/Makefile.sub +--- openjade-1.3.2/grove/Makefile.sub 2002-10-20 23:47:24.000000000 +0200 ++++ devel/grove/Makefile.sub 2007-07-23 15:39:23.000000000 +0200 +@@ -1,4 +1,4 @@ + LTVERSION=0:1:0 + LIB=ogrove +-DEPLIBS=-lm ++DEPLIBS=-lm -lstdc++ + OBJS=Node.o LocNode.o +diff -urNp openjade-1.3.2/spgrove/Makefile.sub devel/spgrove/Makefile.sub +--- openjade-1.3.2/spgrove/Makefile.sub 2002-11-15 23:46:50.000000000 +0100 ++++ devel/spgrove/Makefile.sub 2007-07-23 16:06:13.000000000 +0200 +@@ -1,9 +1,10 @@ + LTVERSION=0:1:0 + LIB=ospgrove + INCLUDE=-I$(srcdir)/../grove +-DEPLIBS=-lm -L$(TOP)/grove -L$(TOP)/grove/.libs \ ++DEPLIBS=$(TOP)/grove/libogrove.la \ ++ -lm -losp -L$(TOP)/grove/.libs \ + -L$(TOP)/lib -L$(TOP)/lib/.libs \ +- $(LIB_THREADS) ++ $(LIB_THREADS) -lstdc++ + OBJS=GroveApp.o GroveBuilder.o SdNode.o + GENSRCS=grove_inst.cxx + +diff -urNp openjade-1.3.2/style/Makefile.sub devel/style/Makefile.sub +--- openjade-1.3.2/style/Makefile.sub 2003-04-18 19:18:10.000000000 +0200 ++++ devel/style/Makefile.sub 2007-07-23 16:08:26.000000000 +0200 +@@ -1,8 +1,8 @@ + LTVERSION=0:1:0 + LIB=ostyle +-DEPLIBS=-lm -L$(TOP)/grove -L$(TOP)/grove/.libs \ +- -L$(TOP)/lib -L$(TOP)/lib/.libs \ +- -L$(TOP)/spgrove -L$(TOP)/spgrove/.libs ++DEPLIBS=$(TOP)/grove/libogrove.la $(TOP)/spgrove/libospgrove.la \ ++ -lm -losp -L$(TOP)/lib -L$(TOP)/lib/.libs -L$(TOP)/grove/.libs \ ++ -L$(TOP)/spgrove -L$(TOP)/spgrove/.libs -lstdc++ + OBJS=LangObj.o \ + Collector.o \ + DssslApp.o \ diff --git a/SPECS/openjade/0005-openjade-1.3.2-gcc46.patch b/SPECS/openjade/0005-openjade-1.3.2-gcc46.patch new file mode 100644 index 00000000..962ac19f --- /dev/null +++ b/SPECS/openjade/0005-openjade-1.3.2-gcc46.patch @@ -0,0 +1,82 @@ +If a class or struct has no user-defined default constructor, C++ doesn't +allow you to default construct a const instance of it. + +https://bugs.gentoo.org/358021 +http://clang.llvm.org/compatibility.html#default_init_const +http://gcc.gnu.org/PR44499 + + +--- a/jade/TeXFOTBuilder.cxx ++++ b/jade/TeXFOTBuilder.cxx +@@ -88,6 +88,8 @@ public: + value.convertString(nic_.placement); + } + ExtensionFlowObj *copy() const { return new PageFloatFlowObj(*this); } ++ public: ++ PageFloatFlowObj() {} + private: + PageFloatNIC nic_; + StringC name_; +@@ -101,6 +103,8 @@ public: + fotb.endPageFootnote(); + } + ExtensionFlowObj *copy() const { return new PageFootnoteFlowObj(*this); } ++ public: ++ PageFootnoteFlowObj() {} + private: + }; + ////////////////////////////////////////////////////////////////////// +--- a/jade/TransformFOTBuilder.cxx ++++ b/jade/TransformFOTBuilder.cxx +@@ -41,6 +41,7 @@ public: + }; + class EntityRefFlowObj : public TransformExtensionFlowObj { + public: ++ EntityRefFlowObj() {} + void atomic(TransformFOTBuilder &fotb, const NodePtr &) const { + fotb.entityRef(name_); + } +@@ -56,6 +57,7 @@ public: + }; + class ProcessingInstructionFlowObj : public TransformExtensionFlowObj { + public: ++ ProcessingInstructionFlowObj() {} + void atomic(TransformFOTBuilder &fotb, const NodePtr &) const { + fotb.processingInstruction(data_); + } +@@ -98,6 +100,8 @@ public: + } + } + ExtensionFlowObj *copy() const { return new EmptyElementFlowObj(*this); } ++ public: ++ EmptyElementFlowObj() {} + private: + ElementNIC nic_; + }; +@@ -133,6 +137,8 @@ public: + } + } + ExtensionFlowObj *copy() const { return new ElementFlowObj(*this); } ++ public: ++ ElementFlowObj() {} + private: + ElementNIC nic_; + }; +@@ -150,6 +156,8 @@ public: + value.convertString(systemId_); + } + ExtensionFlowObj *copy() const { return new EntityFlowObj(*this); } ++ public: ++ EntityFlowObj() {} + private: + StringC systemId_; + }; +@@ -174,6 +182,8 @@ public: + } + } + ExtensionFlowObj *copy() const { return new DocumentTypeFlowObj(*this); } ++ public: ++ DocumentTypeFlowObj() {} + private: + DocumentTypeNIC nic_; + }; diff --git a/SPECS/openjade/0006-openjade-configure-c99.patch b/SPECS/openjade/0006-openjade-configure-c99.patch new file mode 100644 index 00000000..7afd7686 --- /dev/null +++ b/SPECS/openjade/0006-openjade-configure-c99.patch @@ -0,0 +1,15 @@ +diff --git a/configure b/configure +index 89206c1..98bc43a 100755 +--- a/configure ++++ b/configure +@@ -3417,8 +3417,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext diff --git a/SPECS/openjade/openjade.spec b/SPECS/openjade/openjade.spec new file mode 100644 index 00000000..684b0dad --- /dev/null +++ b/SPECS/openjade/openjade.spec @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: openjade +Version: 1.3.2 +Release: %autorelease +Summary: A DSSSL implementation +License: LicenseRef-DMIT +URL: http://openjade.sourceforge.net/ +#!RemoteAsset +Source0: http://download.sourceforge.net/openjade/openjade-%{version}.tar.gz +BuildSystem: autotools + +# Use Getopt:Std to prevent build failure +Patch0: 0001-openjade-getoptperl.patch +# Do not require OpenSP libosp.la file for build +Patch1: 0002-openjade-nola.patch +# Do not link against -lnsl +Patch2: 0003-openjade-1.3.1-nsl.patch +# Fix dependent libs for libogrove +Patch3: 0004-openjade-deplibs.patch +# Upstream bug tracker fix +Patch4: 0005-openjade-1.3.2-gcc46.patch +# Fix build with newer compilers +Patch5: 0006-openjade-configure-c99.patch + +BuildRequires: config +BuildRequires: make +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: opensp-devel +BuildRequires: perl +BuildRequires: perl(POSIX) +BuildRequires: perl(Getopt::Std) + +Requires: sgml-common + +%description +OpenJade is an implementation of the ISO/IEC 10179:1996 standard DSSSL +(Document Style Semantics and Specification Language). OpenJade is +based on James Clark's Jade implementation of DSSSL. OpenJade is a +command-line application and a set of components. The DSSSL engine +inputs an SGML or XML document and can output a variety of formats: +XML, RTF, TeX, MIF (FrameMaker), SGML, or XML. + +%conf +cp -p %{_bindir}/config.guess config/ +cp -p %{_bindir}/config.sub config/ +# This shit is driving me nuts - 251 +# DO NOT TOUCH: https://bugs.launchpad.net/ubuntu/+source/openjade/+bug/1869734 +CXXFLAGS="-O0" +%configure --disable-static \ + --datadir=%{_datadir}/sgml/%{name}-%{version} \ + --enable-splibdir=%{_libdir} + +%install -a +ln -s openjade %{buildroot}/%{_bindir}/jade + +# Install jade/jade %%{buildroot}/%%{prefix}/bin/jade +cp dsssl/catalog %{buildroot}/%{_datadir}/sgml/%{name}-%{version}/ +cp dsssl/{dsssl,style-sheet,fot}.dtd %{buildroot}/%{_datadir}/sgml/%{name}-%{version}/ + +# Add unversioned/versioned catalog and symlink +mkdir -p %{buildroot}/etc/sgml +pushd %{buildroot}/etc/sgml +touch %{name}-%{version}-%{release}.soc +ln -s %{name}-%{version}-%{release}.soc %{name}.soc +popd + +rm -f %{buildroot}%{_libdir}/*.so %{buildroot}%{_libdir}/*.la + +%post +%{?ldconfig} +%{_bindir}/install-catalog --add %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \ + %{_datadir}/sgml/%{name}-%{version}/catalog >/dev/null 2>/dev/null || : + +%preun +%{_bindir}/install-catalog --remove %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc \ + %{_datadir}/sgml/%{name}-%{version}/catalog >/dev/null 2>/dev/null || : + +# The install-catalog removes the file making uninstallation throw a warning about removing a non-existent file +# This file creation suppresses the warning +touch %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc + +%files +%doc jadedoc/* dsssl/README.jadetex +%doc README COPYING VERSION +# Removed %%ghost for succesful instalation on OSTree +%verify(not size filedigest mtime) %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.soc +%{_sysconfdir}/sgml/%{name}.soc +%{_bindir}/* +%{_libdir}/*.so.* +%{_datadir}/sgml/%{name}-%{version} + +%changelog +%{?autochangelog} diff --git a/SPECS/openjdk-17/8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch b/SPECS/openjdk-17/8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch new file mode 100644 index 00000000..29ec69b3 --- /dev/null +++ b/SPECS/openjdk-17/8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch @@ -0,0 +1,151 @@ +diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp +index 0c503e0b7fd..70a750f0043 100644 +--- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp +@@ -318,7 +318,7 @@ void Assembler::wrap_label(Label &L, prfop op, prefetch_insn insn) { + + bool Assembler::operand_valid_for_add_sub_immediate(int64_t imm) { + bool shift = false; +- uint64_t uimm = (uint64_t)uabs((jlong)imm); ++ uint64_t uimm = (uint64_t)g_uabs((jlong)imm); + if (uimm < (1 << 12)) + return true; + if (uimm < (1 << 24) +diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +index 5a8047bc2af..12fff1972bd 100644 +--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp ++++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +@@ -858,7 +858,7 @@ class Assembler : public AbstractAssembler { + static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M); + + static bool reachable_from_branch_at(address branch, address target) { +- return uabs(target - branch) < branch_range; ++ return g_uabs(target - branch) < branch_range; + } + + // Unconditional branch (immediate) +diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +index 7abb2205414..c9a8db901e4 100644 +--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +@@ -2410,7 +2410,7 @@ void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, uint64_t im + if (fits) { + (this->*insn1)(Rd, Rn, imm); + } else { +- if (uabs(imm) < (1 << 24)) { ++ if (g_uabs(imm) < (1 << 24)) { + (this->*insn1)(Rd, Rn, imm & -(1 << 12)); + (this->*insn1)(Rd, Rd, imm & ((1 << 12)-1)); + } else { +diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp +index c92f0cf05bd..4920b7cb47c 100644 +--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp +@@ -1042,7 +1042,7 @@ class StubGenerator: public StubCodeGenerator { + + void copy_memory_small(Register s, Register d, Register count, Register tmp, int step) { + bool is_backwards = step < 0; +- size_t granularity = uabs(step); ++ size_t granularity = g_uabs(step); + int direction = is_backwards ? -1 : 1; + int unit = wordSize * direction; + +@@ -1098,7 +1098,7 @@ class StubGenerator: public StubCodeGenerator { + Register count, Register tmp, int step) { + copy_direction direction = step < 0 ? copy_backwards : copy_forwards; + bool is_backwards = step < 0; +- unsigned int granularity = uabs(step); ++ unsigned int granularity = g_uabs(step); + const Register t0 = r3, t1 = r4; + + // <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always +diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp +index 98c51e9883d..31a8f59f802 100644 +--- a/src/hotspot/cpu/riscv/assembler_riscv.hpp ++++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp +@@ -2779,7 +2779,7 @@ enum Nf { + static const unsigned long branch_range = 1 * M; + + static bool reachable_from_branch_at(address branch, address target) { +- return uabs(target - branch) < branch_range; ++ return g_uabs(target - branch) < branch_range; + } + + // Decode the given instruction, checking if it's a 16-bit compressed +diff --git a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp +index 7fe0392ea5c..a0ebb34a548 100644 +--- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp ++++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp +@@ -925,7 +925,7 @@ class StubGenerator: public StubCodeGenerator { + + void copy_memory_v(Register s, Register d, Register count, Register tmp, int step) { + bool is_backward = step < 0; +- int granularity = uabs(step); ++ int granularity = g_uabs(step); + + const Register src = x30, dst = x31, vl = x14, cnt = x15, tmp1 = x16, tmp2 = x17; + assert_different_registers(s, d, cnt, vl, tmp, tmp1, tmp2); +@@ -974,7 +974,7 @@ class StubGenerator: public StubCodeGenerator { + } + + bool is_backwards = step < 0; +- int granularity = uabs(step); ++ int granularity = g_uabs(step); + + const Register src = x30, dst = x31, cnt = x15, tmp3 = x16, tmp4 = x17, tmp5 = x14, tmp6 = x13; + +diff --git a/src/hotspot/share/opto/mulnode.cpp b/src/hotspot/share/opto/mulnode.cpp +index 6d35fd8bf7b..6eb47eb38bb 100644 +--- a/src/hotspot/share/opto/mulnode.cpp ++++ b/src/hotspot/share/opto/mulnode.cpp +@@ -242,7 +242,7 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) { + // Check for negative constant; if so negate the final result + bool sign_flip = false; + +- unsigned int abs_con = uabs(con); ++ unsigned int abs_con = g_uabs(con); + if (abs_con != (unsigned int)con) { + sign_flip = true; + } +@@ -336,7 +336,7 @@ Node *MulLNode::Ideal(PhaseGVN *phase, bool can_reshape) { + + // Check for negative constant; if so negate the final result + bool sign_flip = false; +- julong abs_con = uabs(con); ++ julong abs_con = g_uabs(con); + if (abs_con != (julong)con) { + sign_flip = true; + } +diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp +index 98d7fbc674c..d5840b0c001 100644 +--- a/src/hotspot/share/utilities/globalDefinitions.hpp ++++ b/src/hotspot/share/utilities/globalDefinitions.hpp +@@ -1064,7 +1064,7 @@ inline bool is_even(intx x) { return !is_odd(x); } + + // abs methods which cannot overflow and so are well-defined across + // the entire domain of integer types. +-static inline unsigned int uabs(unsigned int n) { ++static inline unsigned int g_uabs(unsigned int n) { + union { + unsigned int result; + int value; +@@ -1073,7 +1073,7 @@ static inline unsigned int uabs(unsigned int n) { + if (value < 0) result = 0-result; + return result; + } +-static inline julong uabs(julong n) { ++static inline julong g_uabs(julong n) { + union { + julong result; + jlong value; +@@ -1082,8 +1082,8 @@ static inline julong uabs(julong n) { + if (value < 0) result = 0-result; + return result; + } +-static inline julong uabs(jlong n) { return uabs((julong)n); } +-static inline unsigned int uabs(int n) { return uabs((unsigned int)n); } ++static inline julong g_uabs(jlong n) { return g_uabs((julong)n); } ++static inline unsigned int g_uabs(int n) { return g_uabs((unsigned int)n); } + + // "to" should be greater than "from." + inline intx byte_size(void* from, void* to) { diff --git a/SPECS/openjdk-17/openjdk-17.spec b/SPECS/openjdk-17/openjdk-17.spec new file mode 100644 index 00000000..b199b9ad --- /dev/null +++ b/SPECS/openjdk-17/openjdk-17.spec @@ -0,0 +1,134 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global majorver 17 +%global minorver 0 +%global securityver 16 +%global buildver 8 +%global newjavaver %{majorver}.%{minorver}.%{securityver} +%global _jvmdir %_libdir/jvm +%bcond bootstrap 1 + +Name: java-17-openjdk +Version: %{newjavaver}.%{buildver} +Release: %autorelease +Summary: OpenJDK 17 Runtime Environment +License: GPL-2.0-with-classpath-exception +URL: https://openjdk.org +#!RemoteAsset +Source0: https://github.com/openjdk/jdk%{majorver}u/archive/refs/tags/jdk-%{newjavaver}+%{buildver}.tar.gz +%if %{with bootstrap} +#!RemoteAsset +Source1: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.16%2B8/OpenJDK17U-jdk_riscv64_linux_hotspot_17.0.16_8.tar.gz +%endif + +Patch0: 8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXt-devel +BuildRequires: libXtst-devel +BuildRequires: freetype-devel +BuildRequires: libpng-devel +BuildRequires: cups-devel +BuildRequires: alsa-lib-devel +BuildRequires: fontconfig-devel +BuildRequires: zip +BuildRequires: pkgconfig +%if %{without bootstrap} +BuildRequires: java-17-openjdk +%endif +Requires(post): update-alternatives +Requires(preun):update-alternatives + +Provides: java-%{majorver}-openjdk-devel = %{version}-%{release} +Provides: java-%{majorver}-openjdk-headless = %{version}-%{release} + +%description +The OpenJDK 17 runtime environment. + +%prep +%autosetup -p1 -n jdk17u-jdk-%{newjavaver}-%{buildver} + +%build +%if %{with bootstrap} +tar -xf %{SOURCE1} -C %{_tmppath} +BOOTJDKPATH=%{_tmppath}/jdk-17.0.16+8 +%else +BOOTJDKPATH=%{_jvmdir}/java-17-openjdk +%endif + +ARCH=$(uname -m) +echo $BOOTJDKPATH + +mkdir -p build-release +pushd build-release +bash ../configure \ + --with-version-build=%{buildver} \ + --with-version-pre= \ + --with-version-opt= \ + --with-boot-jdk=$BOOTJDKPATH \ + --with-debug-level=release \ + --with-native-debug-symbols=internal \ + --with-vendor-version-string=openRuyi \ + --with-vendor-name="%{_vendor_name}" \ + --with-vendor-url="%{_vendor_url}" \ + --with-vendor-bug-url="%{_vendor_bug_url}" \ + --enable-unlimited-crypto \ + --disable-warnings-as-errors +make images +popd + +%install -p +mkdir -p %{buildroot}%{_jvmdir} +cp -a build-release/images/jdk %{buildroot}%{_jvmdir}/java-17-openjdk + +%post +alternatives \ + --install %{_bindir}/java java %{_jvmdir}/java-17-openjdk/bin/java 17 \ + --slave %{_bindir}/javac javac %{_jvmdir}/java-17-openjdk/bin/javac \ + --slave %{_bindir}/jlink jlink %{_jvmdir}/java-17-openjdk/bin/jlink \ + --slave %{_bindir}/jmod jmod %{_jvmdir}/java-17-openjdk/bin/jmod \ + --slave %{_bindir}/jar jar %{_jvmdir}/java-17-openjdk/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{_jvmdir}/java-17-openjdk/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{_jvmdir}/java-17-openjdk/bin/javadoc \ + --slave %{_bindir}/javap javap %{_jvmdir}/java-17-openjdk/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{_jvmdir}/java-17-openjdk/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{_jvmdir}/java-17-openjdk/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{_jvmdir}/java-17-openjdk/bin/jdb \ + --slave %{_bindir}/jdeps jdeps %{_jvmdir}/java-17-openjdk/bin/jdeps \ + --slave %{_bindir}/jdeprscan jdeprscan %{_jvmdir}/java-17-openjdk/bin/jdeprscan \ + --slave %{_bindir}/jfr jfr %{_jvmdir}/java-17-openjdk/bin/jfr \ + --slave %{_bindir}/jimage jimage %{_jvmdir}/java-17-openjdk/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{_jvmdir}/java-17-openjdk/bin/jinfo \ + --slave %{_bindir}/jmap jmap %{_jvmdir}/java-17-openjdk/bin/jmap \ + --slave %{_bindir}/jps jps %{_jvmdir}/java-17-openjdk/bin/jps \ + --slave %{_bindir}/jpackage jpackage %{_jvmdir}/java-17-openjdk/bin/jpackage \ + --slave %{_bindir}/jrunscript jrunscript %{_jvmdir}/java-17-openjdk/bin/jrunscript \ + --slave %{_bindir}/jshell jshell %{_jvmdir}/java-17-openjdk/bin/jshell \ + --slave %{_bindir}/jstack jstack %{_jvmdir}/java-17-openjdk/bin/jstack \ + --slave %{_bindir}/jstat jstat %{_jvmdir}/java-17-openjdk/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{_jvmdir}/java-17-openjdk/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{_jvmdir}/java-17-openjdk/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{_jvmdir}/java-17-openjdk/bin/serialver + +%postun +alternatives --remove java %{_jvmdir}/java-17-openjdk/bin/java + +%files +%license LICENSE +%doc README.md +%{_jvmdir}/java-17-openjdk + +%changelog +%{?autochangelog} diff --git a/SPECS/openjdk-21/8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch b/SPECS/openjdk-21/8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch new file mode 100644 index 00000000..9aff83a1 --- /dev/null +++ b/SPECS/openjdk-21/8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch @@ -0,0 +1,182 @@ +From 8ae131845d031b09a34edb81fad694157cf37c9e Mon Sep 17 00:00:00 2001 +From: Dingli Zhang +Date: Wed, 17 Sep 2025 14:14:50 +0000 +Subject: [PATCH] 8354941: Build failure with glibc 2.42 due to uabs() name + collision + + +diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp +index c7b867a42..fab224847 100644 +--- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp +@@ -461,7 +461,7 @@ void Assembler::bang_stack_with_offset(int offset) { Unimplemented(); } + + bool asm_util::operand_valid_for_immediate_bits(int64_t imm, unsigned nbits) { + guarantee(nbits == 8 || nbits == 12, "invalid nbits value"); +- uint64_t uimm = (uint64_t)uabs((jlong)imm); ++ uint64_t uimm = (uint64_t)g_uabs((jlong)imm); + if (uimm < (UCONST64(1) << nbits)) + return true; + if (uimm < (UCONST64(1) << (2 * nbits)) +diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +index dafb4f522..5d3ca441b 100644 +--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp ++++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +@@ -930,7 +930,7 @@ public: + static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M); + + static bool reachable_from_branch_at(address branch, address target) { +- return uabs(target - branch) < branch_range; ++ return g_uabs(target - branch) < branch_range; + } + + // Unconditional branch (immediate) +diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +index 0a2dd0dce..8ec1af1bd 100644 +--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +@@ -2894,7 +2894,7 @@ void MacroAssembler::wrap_add_sub_imm_insn(Register Rd, Register Rn, uint64_t im + if (fits) { + (this->*insn1)(Rd, Rn, imm); + } else { +- if (uabs(imm) < (1 << 24)) { ++ if (g_uabs(imm) < (1 << 24)) { + (this->*insn1)(Rd, Rn, imm & -(1 << 12)); + (this->*insn1)(Rd, Rd, imm & ((1 << 12)-1)); + } else { +diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp +index b2cc462ff..2bfc49d05 100644 +--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp ++++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp +@@ -1130,7 +1130,7 @@ class StubGenerator: public StubCodeGenerator { + + void copy_memory_small(DecoratorSet decorators, BasicType type, Register s, Register d, Register count, int step) { + bool is_backwards = step < 0; +- size_t granularity = uabs(step); ++ size_t granularity = g_uabs(step); + int direction = is_backwards ? -1 : 1; + + Label Lword, Lint, Lshort, Lbyte; +@@ -1189,7 +1189,7 @@ class StubGenerator: public StubCodeGenerator { + Register s, Register d, Register count, int step) { + copy_direction direction = step < 0 ? copy_backwards : copy_forwards; + bool is_backwards = step < 0; +- unsigned int granularity = uabs(step); ++ unsigned int granularity = g_uabs(step); + const Register t0 = r3, t1 = r4; + + // <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always +diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp +index 24de7c15f..afb661e18 100644 +--- a/src/hotspot/cpu/riscv/assembler_riscv.hpp ++++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp +@@ -2913,7 +2913,7 @@ public: + static const unsigned long branch_range = 1 * M; + + static bool reachable_from_branch_at(address branch, address target) { +- return uabs(target - branch) < branch_range; ++ return g_uabs(target - branch) < branch_range; + } + + // Decode the given instruction, checking if it's a 16-bit compressed +diff --git a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp +index 8c5e1c097..bc4d2e944 100644 +--- a/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp ++++ b/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp +@@ -917,7 +917,7 @@ class StubGenerator: public StubCodeGenerator { + + void copy_memory_v(Register s, Register d, Register count, int step) { + bool is_backward = step < 0; +- int granularity = uabs(step); ++ int granularity = g_uabs(step); + + const Register src = x30, dst = x31, vl = x14, cnt = x15, tmp1 = x16, tmp2 = x17; + assert_different_registers(s, d, cnt, vl, tmp1, tmp2); +@@ -973,7 +973,7 @@ class StubGenerator: public StubCodeGenerator { + } + + bool is_backwards = step < 0; +- int granularity = uabs(step); ++ int granularity = g_uabs(step); + + const Register src = x30, dst = x31, cnt = x15, tmp3 = x16, tmp4 = x17, tmp5 = x14, tmp6 = x13; + const Register gct1 = x28, gct2 = x29, gct3 = t2; +diff --git a/src/hotspot/share/opto/mulnode.cpp b/src/hotspot/share/opto/mulnode.cpp +index f42d06a36..43d842173 100644 +--- a/src/hotspot/share/opto/mulnode.cpp ++++ b/src/hotspot/share/opto/mulnode.cpp +@@ -245,7 +245,7 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) { + // Check for negative constant; if so negate the final result + bool sign_flip = false; + +- unsigned int abs_con = uabs(con); ++ unsigned int abs_con = g_uabs(con); + if (abs_con != (unsigned int)con) { + sign_flip = true; + } +@@ -480,7 +480,7 @@ Node *MulLNode::Ideal(PhaseGVN *phase, bool can_reshape) { + + // Check for negative constant; if so negate the final result + bool sign_flip = false; +- julong abs_con = uabs(con); ++ julong abs_con = g_uabs(con); + if (abs_con != (julong)con) { + sign_flip = true; + } +diff --git a/src/hotspot/share/opto/subnode.cpp b/src/hotspot/share/opto/subnode.cpp +index 8b2538f8a..c4a86d765 100644 +--- a/src/hotspot/share/opto/subnode.cpp ++++ b/src/hotspot/share/opto/subnode.cpp +@@ -1899,14 +1899,14 @@ const Type* AbsNode::Value(PhaseGVN* phase) const { + case Type::Int: { + const TypeInt* ti = t1->is_int(); + if (ti->is_con()) { +- return TypeInt::make(uabs(ti->get_con())); ++ return TypeInt::make(g_uabs(ti->get_con())); + } + break; + } + case Type::Long: { + const TypeLong* tl = t1->is_long(); + if (tl->is_con()) { +- return TypeLong::make(uabs(tl->get_con())); ++ return TypeLong::make(g_uabs(tl->get_con())); + } + break; + } +diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp +index 0083442be..625fdcc41 100644 +--- a/src/hotspot/share/utilities/globalDefinitions.hpp ++++ b/src/hotspot/share/utilities/globalDefinitions.hpp +@@ -1164,7 +1164,7 @@ inline bool is_even(intx x) { return !is_odd(x); } + + // abs methods which cannot overflow and so are well-defined across + // the entire domain of integer types. +-static inline unsigned int uabs(unsigned int n) { ++static inline unsigned int g_uabs(unsigned int n) { + union { + unsigned int result; + int value; +@@ -1173,7 +1173,7 @@ static inline unsigned int uabs(unsigned int n) { + if (value < 0) result = 0-result; + return result; + } +-static inline julong uabs(julong n) { ++static inline julong g_uabs(julong n) { + union { + julong result; + jlong value; +@@ -1182,8 +1182,8 @@ static inline julong uabs(julong n) { + if (value < 0) result = 0-result; + return result; + } +-static inline julong uabs(jlong n) { return uabs((julong)n); } +-static inline unsigned int uabs(int n) { return uabs((unsigned int)n); } ++static inline julong g_uabs(jlong n) { return g_uabs((julong)n); } ++static inline unsigned int g_uabs(int n) { return g_uabs((unsigned int)n); } + + // "to" should be greater than "from." + inline intx byte_size(void* from, void* to) { +-- +2.43.0 + diff --git a/SPECS/openjdk-21/openjdk-21.spec b/SPECS/openjdk-21/openjdk-21.spec new file mode 100644 index 00000000..5d1c458b --- /dev/null +++ b/SPECS/openjdk-21/openjdk-21.spec @@ -0,0 +1,134 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global majorver 21 +%global minorver 0 +%global securityver 8 +%global buildver 9 +%global newjavaver %{majorver}.%{minorver}.%{securityver} +%global _jvmdir %_libdir/jvm +%bcond bootstrap 1 + +Name: java-21-openjdk +Version: %{newjavaver}.%{buildver} +Release: %autorelease +Summary: OpenJDK 21 Runtime Environment +License: GPL-2.0-with-classpath-exception +URL: https://openjdk.org +#!RemoteAsset +Source0: https://github.com/openjdk/jdk%{majorver}u/archive/refs/tags/jdk-%{newjavaver}+%{buildver}.tar.gz +%if %{with bootstrap} +#!RemoteAsset +Source1: https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.8%2B9/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.8_9.tar.gz +%endif + +Patch0: 8354941-Build-failure-with-glibc-2.42-due-to-uabs-na.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXt-devel +BuildRequires: libXtst-devel +BuildRequires: freetype-devel +BuildRequires: libpng-devel +BuildRequires: cups-devel +BuildRequires: alsa-lib-devel +BuildRequires: fontconfig-devel +BuildRequires: zip +BuildRequires: pkgconfig +%if %{without bootstrap} +BuildRequires: java-21-openjdk +%endif +Requires(post): update-alternatives +Requires(preun):update-alternatives + +Provides: java-%{majorver}-openjdk-devel = %{version}-%{release} +Provides: java-%{majorver}-openjdk-headless = %{version}-%{release} + +%description +The OpenJDK 21 runtime environment. + +%prep +%autosetup -p1 -n jdk21u-jdk-%{newjavaver}-%{buildver} + +%build +%if %{with bootstrap} +tar -xf %{SOURCE1} -C %{_tmppath} +BOOTJDKPATH=%{_tmppath}/jdk-21.0.8+9 +%else +BOOTJDKPATH=%{_jvmdir}/java-21-openjdk +%endif + +ARCH=$(uname -m) +echo $BOOTJDKPATH + +mkdir -p build-release +pushd build-release +bash ../configure \ + --with-version-build=%{buildver} \ + --with-version-pre= \ + --with-version-opt= \ + --with-boot-jdk=$BOOTJDKPATH \ + --with-debug-level=release \ + --with-native-debug-symbols=internal \ + --with-vendor-version-string=openRuyi \ + --with-vendor-name="%{_vendor_name}" \ + --with-vendor-url="%{_vendor_url}" \ + --with-vendor-bug-url="%{_vendor_bug_url}" \ + --enable-unlimited-crypto \ + --disable-warnings-as-errors +make images +popd + +%install -p +mkdir -p %{buildroot}%{_jvmdir} +cp -a build-release/images/jdk %{buildroot}%{_jvmdir}/java-21-openjdk + +%post +alternatives \ + --install %{_bindir}/java java %{_jvmdir}/java-21-openjdk/bin/java 21 \ + --slave %{_bindir}/javac javac %{_jvmdir}/java-21-openjdk/bin/javac \ + --slave %{_bindir}/jlink jlink %{_jvmdir}/java-21-openjdk/bin/jlink \ + --slave %{_bindir}/jmod jmod %{_jvmdir}/java-21-openjdk/bin/jmod \ + --slave %{_bindir}/jar jar %{_jvmdir}/java-21-openjdk/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{_jvmdir}/java-21-openjdk/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{_jvmdir}/java-21-openjdk/bin/javadoc \ + --slave %{_bindir}/javap javap %{_jvmdir}/java-21-openjdk/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{_jvmdir}/java-21-openjdk/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{_jvmdir}/java-21-openjdk/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{_jvmdir}/java-21-openjdk/bin/jdb \ + --slave %{_bindir}/jdeps jdeps %{_jvmdir}/java-21-openjdk/bin/jdeps \ + --slave %{_bindir}/jdeprscan jdeprscan %{_jvmdir}/java-21-openjdk/bin/jdeprscan \ + --slave %{_bindir}/jfr jfr %{_jvmdir}/java-21-openjdk/bin/jfr \ + --slave %{_bindir}/jimage jimage %{_jvmdir}/java-21-openjdk/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{_jvmdir}/java-21-openjdk/bin/jinfo \ + --slave %{_bindir}/jmap jmap %{_jvmdir}/java-21-openjdk/bin/jmap \ + --slave %{_bindir}/jps jps %{_jvmdir}/java-21-openjdk/bin/jps \ + --slave %{_bindir}/jpackage jpackage %{_jvmdir}/java-21-openjdk/bin/jpackage \ + --slave %{_bindir}/jrunscript jrunscript %{_jvmdir}/java-21-openjdk/bin/jrunscript \ + --slave %{_bindir}/jshell jshell %{_jvmdir}/java-21-openjdk/bin/jshell \ + --slave %{_bindir}/jstack jstack %{_jvmdir}/java-21-openjdk/bin/jstack \ + --slave %{_bindir}/jstat jstat %{_jvmdir}/java-21-openjdk/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{_jvmdir}/java-21-openjdk/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{_jvmdir}/java-21-openjdk/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{_jvmdir}/java-21-openjdk/bin/serialver + +%postun +alternatives --remove java %{_jvmdir}/java-21-openjdk/bin/java + +%files +%license LICENSE +%doc README.md +%{_jvmdir}/java-21-openjdk + +%changelog +%{?autochangelog} diff --git a/SPECS/openjdk-25/openjdk-25.spec b/SPECS/openjdk-25/openjdk-25.spec new file mode 100644 index 00000000..6bf2f221 --- /dev/null +++ b/SPECS/openjdk-25/openjdk-25.spec @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global majorver 25 +%global minorver 0 +%global securityver 0 +%global buildver 36 +%global newjavaver %{majorver}.%{minorver}.%{securityver} +%global _jvmdir %_libdir/jvm +%bcond bootstrap 1 + +Name: java-25-openjdk +Version: %{newjavaver}.%{buildver} +Release: %autorelease +Summary: OpenJDK 25 Runtime Environment +License: GPL-2.0-with-classpath-exception +URL: https://openjdk.org +#!RemoteAsset +Source0: https://github.com/openjdk/jdk%{majorver}u/archive/refs/tags/jdk-%{majorver}+%{buildver}.tar.gz +%if %{with bootstrap} +#!RemoteAsset +Source1: https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25%2B36/OpenJDK25U-jdk_riscv64_linux_hotspot_25_36.tar.gz +%endif + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXt-devel +BuildRequires: libXtst-devel +BuildRequires: freetype-devel +BuildRequires: libpng-devel +BuildRequires: cups-devel +BuildRequires: alsa-lib-devel +BuildRequires: fontconfig-devel +BuildRequires: zip +BuildRequires: pkgconfig +%if %{without bootstrap} +BuildRequires: java-25-openjdk +%endif +Requires(post): update-alternatives +Requires(preun):update-alternatives + +Provides: java-%{majorver}-openjdk-devel = %{version}-%{release} +Provides: java-%{majorver}-openjdk-headless = %{version}-%{release} + +%description +The OpenJDK 25 runtime environment. + +%prep +%autosetup -p1 -n jdk25u-jdk-%{majorver}-%{buildver} + +%build +%if %{with bootstrap} +tar -xf %{SOURCE1} -C %{_tmppath} +BOOTJDKPATH=%{_tmppath}/jdk-25+36 +%else +BOOTJDKPATH=%{_jvmdir}/java-25-openjdk +%endif + +ARCH=$(uname -m) +echo $BOOTJDKPATH + +mkdir -p build-release +pushd build-release +bash ../configure \ + --with-version-build=%{buildver} \ + --with-version-pre= \ + --with-version-opt= \ + --with-boot-jdk=$BOOTJDKPATH \ + --with-debug-level=release \ + --with-native-debug-symbols=internal \ + --with-vendor-version-string=openRuyi \ + --with-vendor-name="openRuyi" \ + --with-vendor-url="%{_vendor_url}" \ + --with-vendor-bug-url="%{_vendor_bug_url}" \ + --enable-unlimited-crypto \ + --disable-warnings-as-errors +make images +popd + +%install -p +mkdir -p %{buildroot}%{_jvmdir} +cp -a build-release/images/jdk %{buildroot}%{_jvmdir}/java-25-openjdk + +%post +alternatives \ + --install %{_bindir}/java java %{_jvmdir}/java-25-openjdk/bin/java 25 \ + --slave %{_bindir}/javac javac %{_jvmdir}/java-25-openjdk/bin/javac \ + --slave %{_bindir}/jlink jlink %{_jvmdir}/java-25-openjdk/bin/jlink \ + --slave %{_bindir}/jmod jmod %{_jvmdir}/java-25-openjdk/bin/jmod \ + --slave %{_bindir}/jar jar %{_jvmdir}/java-25-openjdk/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{_jvmdir}/java-25-openjdk/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{_jvmdir}/java-25-openjdk/bin/javadoc \ + --slave %{_bindir}/javap javap %{_jvmdir}/java-25-openjdk/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{_jvmdir}/java-25-openjdk/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{_jvmdir}/java-25-openjdk/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{_jvmdir}/java-25-openjdk/bin/jdb \ + --slave %{_bindir}/jdeps jdeps %{_jvmdir}/java-25-openjdk/bin/jdeps \ + --slave %{_bindir}/jdeprscan jdeprscan %{_jvmdir}/java-25-openjdk/bin/jdeprscan \ + --slave %{_bindir}/jfr jfr %{_jvmdir}/java-25-openjdk/bin/jfr \ + --slave %{_bindir}/jimage jimage %{_jvmdir}/java-25-openjdk/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{_jvmdir}/java-25-openjdk/bin/jinfo \ + --slave %{_bindir}/jmap jmap %{_jvmdir}/java-25-openjdk/bin/jmap \ + --slave %{_bindir}/jps jps %{_jvmdir}/java-25-openjdk/bin/jps \ + --slave %{_bindir}/jpackage jpackage %{_jvmdir}/java-25-openjdk/bin/jpackage \ + --slave %{_bindir}/jrunscript jrunscript %{_jvmdir}/java-25-openjdk/bin/jrunscript \ + --slave %{_bindir}/jshell jshell %{_jvmdir}/java-25-openjdk/bin/jshell \ + --slave %{_bindir}/jstack jstack %{_jvmdir}/java-25-openjdk/bin/jstack \ + --slave %{_bindir}/jstat jstat %{_jvmdir}/java-25-openjdk/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{_jvmdir}/java-25-openjdk/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{_jvmdir}/java-25-openjdk/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{_jvmdir}/java-25-openjdk/bin/serialver + +%postun +alternatives --remove java %{_jvmdir}/java-25-openjdk/bin/java + +%files +%license LICENSE +%doc README.md +%{_jvmdir}/java-25-openjdk + +%changelog +%{?autochangelog} diff --git a/SPECS/openjdk-latest/openjdk-latest.spec b/SPECS/openjdk-latest/openjdk-latest.spec new file mode 100644 index 00000000..d47b5d3b --- /dev/null +++ b/SPECS/openjdk-latest/openjdk-latest.spec @@ -0,0 +1,135 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global majorver 25 +%global minorver 0 +%global securityver 0 +%global buildver 36 +%global newjavaver %{majorver}.%{minorver}.%{securityver} +%global _jvmdir %_libdir/jvm +%bcond bootstrap 1 + +Name: java-latest-openjdk +Version: %{newjavaver}.%{buildver} +Release: %autorelease +Summary: OpenJDK latest Runtime Environment +License: GPL-2.0-with-classpath-exception +URL: https://openjdk.org + +#!RemoteAsset +Source0: https://github.com/openjdk/jdk%{majorver}u/archive/refs/tags/jdk-%{majorver}+%{buildver}.tar.gz +%if %{with bootstrap} +#!RemoteAsset +Source1: https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25%2B36/OpenJDK25U-jdk_riscv64_linux_hotspot_25_36.tar.gz +%endif + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXt-devel +BuildRequires: libXtst-devel +BuildRequires: freetype-devel +BuildRequires: libpng-devel +BuildRequires: cups-devel +BuildRequires: alsa-lib-devel +BuildRequires: fontconfig-devel +BuildRequires: zip +BuildRequires: pkgconfig +%if %{without bootstrap} +BuildRequires: java-latest-openjdk +%endif +Requires(post): update-alternatives +Requires(preun):update-alternatives + +Provides: java-openjdk-headless = %{version}-%{release} +Provides: java-openjdk-devel = %{version}-%{release} +Provides: java-latest-openjdk-devel = %{version}-%{release} +Provides: java-latest-openjdk-headless = %{version}-%{release} + +%description +The OpenJDK latest runtime environment. + +%prep +%autosetup -p1 -n jdk%{majorver}u-jdk-%{majorver}-%{buildver} + +%build +%if %{with bootstrap} +tar -xf %{SOURCE1} -C %{_tmppath} +BOOTJDKPATH=%{_tmppath}/jdk-25+36 +%else +BOOTJDKPATH=%{_jvmdir}/java-latest-openjdk +%endif + +ARCH=$(uname -m) +echo $BOOTJDKPATH + +mkdir -p build-release +pushd build-release +bash ../configure \ + --with-version-build=%{buildver} \ + --with-version-pre= \ + --with-version-opt= \ + --with-boot-jdk=$BOOTJDKPATH \ + --with-debug-level=release \ + --with-native-debug-symbols=internal \ + --with-vendor-version-string=openRuyi \ + --with-vendor-name="%{_vendor_name}" \ + --with-vendor-url="%{_vendor_url}" \ + --with-vendor-bug-url="%{_vendor_bug_url}" \ + --enable-unlimited-crypto \ + --disable-warnings-as-errors +make images +popd + +%install -p +mkdir -p %{buildroot}%{_jvmdir} +cp -a build-release/images/jdk %{buildroot}%{_jvmdir}/java-latest-openjdk + +%post +alternatives \ + --install %{_bindir}/java java %{_jvmdir}/java-latest-openjdk/bin/java 9999 \ + --slave %{_bindir}/javac javac %{_jvmdir}/java-latest-openjdk/bin/javac \ + --slave %{_bindir}/jlink jlink %{_jvmdir}/java-latest-openjdk/bin/jlink \ + --slave %{_bindir}/jmod jmod %{_jvmdir}/java-latest-openjdk/bin/jmod \ + --slave %{_bindir}/jar jar %{_jvmdir}/java-latest-openjdk/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{_jvmdir}/java-latest-openjdk/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{_jvmdir}/java-latest-openjdk/bin/javadoc \ + --slave %{_bindir}/javap javap %{_jvmdir}/java-latest-openjdk/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{_jvmdir}/java-latest-openjdk/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{_jvmdir}/java-latest-openjdk/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{_jvmdir}/java-latest-openjdk/bin/jdb \ + --slave %{_bindir}/jdeps jdeps %{_jvmdir}/java-latest-openjdk/bin/jdeps \ + --slave %{_bindir}/jdeprscan jdeprscan %{_jvmdir}/java-latest-openjdk/bin/jdeprscan \ + --slave %{_bindir}/jfr jfr %{_jvmdir}/java-latest-openjdk/bin/jfr \ + --slave %{_bindir}/jimage jimage %{_jvmdir}/java-latest-openjdk/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{_jvmdir}/java-latest-openjdk/bin/jinfo \ + --slave %{_bindir}/jmap jmap %{_jvmdir}/java-latest-openjdk/bin/jmap \ + --slave %{_bindir}/jps jps %{_jvmdir}/java-latest-openjdk/bin/jps \ + --slave %{_bindir}/jpackage jpackage %{_jvmdir}/java-latest-openjdk/bin/jpackage \ + --slave %{_bindir}/jrunscript jrunscript %{_jvmdir}/java-latest-openjdk/bin/jrunscript \ + --slave %{_bindir}/jshell jshell %{_jvmdir}/java-latest-openjdk/bin/jshell \ + --slave %{_bindir}/jstack jstack %{_jvmdir}/java-latest-openjdk/bin/jstack \ + --slave %{_bindir}/jstat jstat %{_jvmdir}/java-latest-openjdk/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{_jvmdir}/java-latest-openjdk/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{_jvmdir}/java-latest-openjdk/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{_jvmdir}/java-latest-openjdk/bin/serialver + +%postun +alternatives --remove java %{_jvmdir}/java-latest-openjdk/bin/java + +%files +%license LICENSE +%doc README.md +%{_jvmdir}/java-latest-openjdk + +%changelog +%{?autochangelog} diff --git a/SPECS/openldap/0001-reproducible.patch b/SPECS/openldap/0001-reproducible.patch new file mode 100644 index 00000000..0f562f8c --- /dev/null +++ b/SPECS/openldap/0001-reproducible.patch @@ -0,0 +1,13 @@ +Index: openldap-2.6.3/build/mkversion +=================================================================== +--- openldap-2.6.3.orig/build/mkversion ++++ openldap-2.6.3/build/mkversion +@@ -77,7 +77,7 @@ static const char copyright[] = + "COPYING RESTRICTIONS APPLY\n"; + + $static $const char $SYMBOL[] = +-"@(#) \$$PACKAGE: $APPLICATION $VERSION (" __DATE__ " " __TIME__ ") \$\n" ++"@(#) \$$PACKAGE: $APPLICATION $VERSION \$\n" + "\t$WHOWHERE\n"; + + __EOF__ diff --git a/SPECS/openldap/0002-LDAPI-socket-location.patch b/SPECS/openldap/0002-LDAPI-socket-location.patch new file mode 100644 index 00000000..38cdfbbf --- /dev/null +++ b/SPECS/openldap/0002-LDAPI-socket-location.patch @@ -0,0 +1,12 @@ +diff -ur openldap-2.6.2.orig/include/ldap_defaults.h openldap-2.6.2/include/ldap_defaults.h +--- openldap-2.6.2.orig/include/ldap_defaults.h 2022-05-04 16:55:23.000000000 +0200 ++++ openldap-2.6.2/include/ldap_defaults.h 2022-05-23 12:55:05.059335200 +0200 +@@ -40,7 +40,7 @@ + + /* default ldapi:// socket */ + #ifndef LDAPI_SOCK +-#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi" ++#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "ldapi" + #endif + + /* diff --git a/SPECS/openldap/0003-pie-compile.patch b/SPECS/openldap/0003-pie-compile.patch new file mode 100644 index 00000000..34c4a620 --- /dev/null +++ b/SPECS/openldap/0003-pie-compile.patch @@ -0,0 +1,101 @@ +From 60edf86023da15db7be5935c85826e16d2b78648 Mon Sep 17 00:00:00 2001 +From: Ralf Haferkamp +Date: Fri, 12 Nov 2010 09:39:11 +0100 +Subject: pie compile + + +diff --git a/build/top.mk b/build/top.mk +index 38ce146d7..d7fee4ec2 100644 +--- a/build/top.mk ++++ b/build/top.mk +@@ -111,7 +111,7 @@ OL_VERSIONED_SYMBOLS = @OL_VERSIONED_SYMBOLS@ + LTSTATIC = @LTSTATIC@ + + LTLINK = $(LIBTOOL) --mode=link \ +- $(CC) $(LTSTATIC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS) ++ $(CC) -pie $(LTSTATIC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS) + + LTCOMPILE_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=compile \ + $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(LIB_DEFS) -c +@@ -120,7 +120,7 @@ LTLINK_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=link \ + $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB) $(SYMBOL_VERSION_FLAGS) + + LTCOMPILE_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \ +- $(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c ++ $(CC) $(LT_CFLAGS) $(PIE_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c + + LTLINK_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=link \ + $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_MOD) +@@ -214,7 +214,7 @@ LLOADD_LIBS = @BALANCER_LIBS@ $(LEVENT_LIBS) + # Our Defaults + CC = $(AC_CC) + DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES) +-CFLAGS = $(AC_CFLAGS) $(DEFS) ++CFLAGS = -fPIE $(AC_CFLAGS) $(DEFS) + LDFLAGS = $(LDAP_LIBPATH) $(AC_LDFLAGS) $(XLDFLAGS) + LIBS = $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS) + +diff --git a/servers/slapd/back-ldap/Makefile.in b/servers/slapd/back-ldap/Makefile.in +index 71400ca1b..6427165c6 100644 +--- a/servers/slapd/back-ldap/Makefile.in ++++ b/servers/slapd/back-ldap/Makefile.in +@@ -26,6 +26,8 @@ LDAP_LIBDIR= ../../../libraries + BUILD_OPT = "--enable-ldap" + BUILD_MOD = @BUILD_LDAP@ + ++PIE_CFLAGS="-fPIE" ++ + mod_DEFS = -DSLAPD_IMPORT + MOD_DEFS = $(@BUILD_LDAP@_DEFS) + +diff --git a/servers/slapd/back-ldif/Makefile.in b/servers/slapd/back-ldif/Makefile.in +index 225c8dd19..2f07c067b 100644 +--- a/servers/slapd/back-ldif/Makefile.in ++++ b/servers/slapd/back-ldif/Makefile.in +@@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries + BUILD_OPT = "--enable-ldif" + BUILD_MOD = yes + ++PIE_CFLAGS="-fPIE" ++ + mod_DEFS = -DSLAPD_IMPORT + MOD_DEFS = $(yes_DEFS) + +diff --git a/servers/slapd/back-mdb/Makefile.in b/servers/slapd/back-mdb/Makefile.in +index 6d64824da..9bbf8747d 100644 +--- a/servers/slapd/back-mdb/Makefile.in ++++ b/servers/slapd/back-mdb/Makefile.in +@@ -34,6 +34,8 @@ MDB_SUBDIR = $(srcdir)/$(LDAP_LIBDIR)/liblmdb + BUILD_OPT = "--enable-mdb" + BUILD_MOD = @BUILD_MDB@ + ++PIE_CFLAGS="-fPIE" ++ + mod_DEFS = -DSLAPD_IMPORT + MOD_DEFS = $(@BUILD_MDB@_DEFS) + MOD_LIBS = $(MDB_LIBS) +diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in +index 200a1c65c..6b2afffb9 100644 +--- a/servers/slapd/back-monitor/Makefile.in ++++ b/servers/slapd/back-monitor/Makefile.in +@@ -30,6 +30,8 @@ LDAP_LIBDIR= ../../../libraries + BUILD_OPT = "--enable-monitor" + BUILD_MOD = yes + ++PIE_CFLAGS="-fPIE" ++ + mod_DEFS = -DSLAPD_IMPORT + MOD_DEFS = $(yes_DEFS) + +diff --git a/servers/slapd/back-relay/Makefile.in b/servers/slapd/back-relay/Makefile.in +index 71d74a171..60b44afd8 100644 +--- a/servers/slapd/back-relay/Makefile.in ++++ b/servers/slapd/back-relay/Makefile.in +@@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries + BUILD_OPT = "--enable-relay" + BUILD_MOD = @BUILD_RELAY@ + ++PIE_CFLAGS="-fPIE" ++ + mod_DEFS = -DSLAPD_IMPORT + MOD_DEFS = $(@BUILD_RELAY@_DEFS) diff --git a/SPECS/openldap/0004-In-monitor-backend-do-not-return-Connection0-entries.patch b/SPECS/openldap/0004-In-monitor-backend-do-not-return-Connection0-entries.patch new file mode 100644 index 00000000..99a96c1e --- /dev/null +++ b/SPECS/openldap/0004-In-monitor-backend-do-not-return-Connection0-entries.patch @@ -0,0 +1,26 @@ +From d4b247e43fe1ea1b3713f3d8f493422d5adcc537 Mon Sep 17 00:00:00 2001 +From: HouzuoGuo +Date: Fri, 13 Mar 2015 16:14:10 +0100 +Subject: [PATCH] In monitor backend, do not return Connection0 entries as they + are created for internal use only. + +--- + servers/slapd/back-monitor/conn.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c +index 4d327f243..c4d3c6237 100644 +--- a/servers/slapd/back-monitor/conn.c ++++ b/servers/slapd/back-monitor/conn.c +@@ -456,6 +456,11 @@ monitor_subsys_conn_create( + c != NULL; + c = connection_next( c, &connindex ) ) + { ++ /* Connection 0 is created by connection_client_setup for internal use only */ ++ if (c->c_connid == 0) { ++ continue; ++ } ++ + monitor_entry_t *mp; + + /* ignore outbound for now, nothing to show */ diff --git a/SPECS/openldap/0005-Clear-shared-key-only-in-close-function.patch b/SPECS/openldap/0005-Clear-shared-key-only-in-close-function.patch new file mode 100644 index 00000000..e6ea5e9a --- /dev/null +++ b/SPECS/openldap/0005-Clear-shared-key-only-in-close-function.patch @@ -0,0 +1,16 @@ +diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c +index 6bdf3151d..56212151b 100644 +--- a/libraries/liblmdb/mdb.c ++++ b/libraries/liblmdb/mdb.c +@@ -4692,6 +4692,11 @@ mdb_env_close0(MDB_env *env, int excl) + + if (env->me_flags & MDB_ENV_TXKEY) { + pthread_key_delete(env->me_txkey); ++ ++ // No need to call desctructor anymore, as all pid ++ // values are cleared below. ++ env->me_txkey = NULL; ++ + #ifdef _WIN32 + /* Delete our key from the global list */ + for (i=0; ie_attrs = a->a_next; + ++ extern void attr_clean(Attribute *); + attr_clean( a ); + } + +Index: openldap-2.6.7/libraries/liblmdb/mdb.c +=================================================================== +--- openldap-2.6.7.orig/libraries/liblmdb/mdb.c ++++ openldap-2.6.7/libraries/liblmdb/mdb.c +@@ -5161,7 +5161,7 @@ mdb_env_close0(MDB_env *env, int excl) + + // No need to call desctructor anymore, as all pid + // values are cleared below. +- env->me_txkey = NULL; ++ memset(&env->me_txkey, 0, sizeof(env->me_txkey)); + + #ifdef _WIN32 + /* Delete our key from the global list */ diff --git a/SPECS/openldap/README.module-loading b/SPECS/openldap/README.module-loading new file mode 100644 index 00000000..1dae136c --- /dev/null +++ b/SPECS/openldap/README.module-loading @@ -0,0 +1,25 @@ +All of the OpenLDAP backends (except back-config) and overlays are now +compiled as dynamic modules in our packages. If you want to use any of +these in your setup make sure to put the correct "olcModuleLoad" or +"moduleload" statements in your configuration. + +For details please see the slapd-config(5) and slapd.conf(5) manpages +(depending on which config mechanism you use). + +For a list of the included dynamic modules list all modules files: + +ls /usr/lib*/openldap/*.so + +Or just the backend files: + +ls /usr/lib*/openldap/back_*.so + +Documentations for the overlays can be found in the respective man pages or +the OpenLDAP Administration Guide which is part of the "openldap2-doc" +package. + +Backend man-pages: +man 5 slapo- + +Overlays man-pages: +man 5 slapo- diff --git a/SPECS/openldap/fixup-modulepath.sh b/SPECS/openldap/fixup-modulepath.sh new file mode 100644 index 00000000..b16fed29 --- /dev/null +++ b/SPECS/openldap/fixup-modulepath.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +source /usr/lib/openldap/update-crc + +conf_dir='/etc/openldap/slapd.d' +tgt_ldif="${conf_dir}/cn=config.ldif" +if [ ! -d ${conf_dir} ] || [ ! -f ${tgt_ldif} ] +then + exit 0 +fi + +# Make sure slapd.service is not running. +slapd_running=1 + +# Don't check if no systemd, we could be in a container. +if [ -f "/usr/bin/systemctl" ]; then + /usr/bin/systemctl is-active --quiet slapd.service + slapd_running=$? +fi + +if [ $slapd_running -eq 0 ]; then + echo "Unable to update crc of '${tgt_ldif}' while slapd.service is running ..." + exit 1 +fi + +# Remove the module path. +sed -n -i '/olcModulePath/!p' ${tgt_ldif} + +res=$? + +if [ $res -ne 0 ] +then + echo "Failed to remove olcModulePath in ${tgt_ldif}" + exit 1 +else + do_update_crc ${tgt_ldif} + echo "Updated crc of ${tgt_ldif}" +fi + + + + diff --git a/SPECS/openldap/ldap-user.conf b/SPECS/openldap/ldap-user.conf new file mode 100644 index 00000000..4455b7c2 --- /dev/null +++ b/SPECS/openldap/ldap-user.conf @@ -0,0 +1,2 @@ +# Type Name ID GECOS [HOME] +u ldap - "User for OpenLDAP" /var/lib/ldap diff --git a/SPECS/openldap/openldap.conf b/SPECS/openldap/openldap.conf new file mode 100644 index 00000000..d0985b07 --- /dev/null +++ b/SPECS/openldap/openldap.conf @@ -0,0 +1,3 @@ +# openldap needs a directory in /var/lib/: +d /var/lib/ldap 0750 ldap ldap - +d /run/slapd 0755 ldap ldap - diff --git a/SPECS/openldap/openldap.spec b/SPECS/openldap/openldap.spec new file mode 100644 index 00000000..2242a716 --- /dev/null +++ b/SPECS/openldap/openldap.spec @@ -0,0 +1,453 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define run_test_suite 0 +%define slapdrundir %{_rundir}/slapd + +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects + +Name: openldap +Version: 2.6.10 +Release: %autorelease +Summary: An implementation of the Lightweight Directory Access Protocol +License: OLDAP-2.8 +URL: https://www.openldap.org +#!RemoteAsset +Source0: https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-%{version}.tgz +#!RemoteAsset +Source1: https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-%{version}.tgz.asc +Source2: slapd.conf +Source3: sasl-slapd.conf +Source4: README.module-loading +Source5: schema2ldif +Source6: slapd.conf.olctemplate +Source7: slapd.conf.example +Source8: start +Source9: slapd.service +Source10: sysconfig.openldap +Source11: openldap.conf +Source12: ldap-user.conf +Source13: fixup-modulepath.sh +Source14: slapd-ldif-update-crc.sh +Source15: update-crc.sh + +Patch0: 0001-reproducible.patch +Patch1: 0002-LDAPI-socket-location.patch +Patch2: 0003-pie-compile.patch +Patch3: 0004-In-monitor-backend-do-not-return-Connection0-entries.patch +Patch4: 0005-Clear-shared-key-only-in-close-function.patch +Patch5: 0006-gcc14-v2.patch +BuildSystem: autotools + +BuildOption(conf): --sysconfdir=%{_sysconfdir}/openldap +BuildOption(conf): --libexecdir=%{_libexecdir} +BuildOption(conf): --localstatedir=%{slapdrundir} +BuildOption(conf): --enable-wrappers=no +BuildOption(conf): --enable-spasswd +BuildOption(conf): --enable-modules +BuildOption(conf): --enable-shared +BuildOption(conf): --enable-dynamic +BuildOption(conf): --with-tls=openssl +BuildOption(conf): --with-cyrus-sasl +BuildOption(conf): --enable-crypt +BuildOption(conf): --enable-ipv6=yes +BuildOption(conf): --enable-dynacl +BuildOption(conf): --enable-aci +BuildOption(conf): --enable-ldap=mod +BuildOption(conf): --enable-meta=mod +BuildOption(conf): --enable-perl=mod +BuildOption(conf): --enable-sock=mod +BuildOption(conf): --enable-sql=mod +BuildOption(conf): --enable-mdb=mod +BuildOption(conf): --enable-relay=mod +BuildOption(conf): --enable-overlays=mod +BuildOption(conf): --enable-syncprov=mod +BuildOption(conf): --enable-ppolicy=mod +BuildOption(conf): --with-yielding-select +BuildOption(conf): --with-argon2=libargon2 + +BuildOption(install): STRIP="" "sysconfdir=%{_sysconfdir}/openldap" "libexecdir=%{_libexecdir}" + +BuildRequires: libargon2-devel cyrus-sasl-devel db-devel mandoc libtool sysuser-tools unixODBC-devel +BuildRequires: pkgconfig(krb5) pkgconfig(systemd) pkgconfig(openssl) +Requires: /usr/bin/awk +Requires: libldap2 = %{version} +Recommends: cyrus-sasl +%sysusers_requires + +%description +OpenLDAP is a client and server reference implementation of the +Lightweight Directory Access Protocol v3 (LDAPv3). + +The server provides several database backends and overlays. + +%package back-perl +Summary: OpenLDAP Perl backend +Requires: %{name} = %{version} +Requires: perl + +%description back-perl +The OpenLDAP Perl back-end allows you to execute Perl code specific to +different LDAP operations. + +%package back-sock +Summary: OpenLDAP Socket backend +Requires: %{name} = %{version} +Provides: %{name}:/usr/share/man/man5/slapd-sock.5.gz + +%description back-sock +The OpenLDAP socket back-end allows you to handle LDAP requests and +results with an external process listening on a Unix domain socket. + +%package back-meta +Summary: OpenLDAP Meta backend +Requires: %{name} = %{version} +Provides: %{name}:/usr/share/man/man5/slapd-meta.5.gz + +%description back-meta +The OpenLDAP Meta back-end is able to perform basic LDAP proxying with +respect to a set of remote LDAP servers. The information contained in +these servers can be presented as belonging to a single Directory +Information Tree (DIT). + +%package back-sql +Summary: OpenLDAP SQL backend +Requires: %{name} = %{version} + +%description back-sql +The primary purpose of this OpenLDAP backend is to present information +stored in a Relational (SQL) Database as an LDAP subtree without the need +to do any programming. + +%package -n libldap-data +Summary: Configuration file for system-wide defaults for all uses of libldap +BuildArch: noarch + +%description -n libldap-data +The subpackage contains a configuration file used to set system-wide defaults +to be applied with all usages of libldap. + +%package contrib +Summary: OpenLDAP Contrib Modules +Requires: %{name} = %{version} + +%description contrib +Various overlays found in contrib/: +addpartial Intercepts ADD requests, applies changes to existing entries +allop +allowed Generates attributes indicating access rights +autogroup +authzid implements RFC 3829 support +cloak +datamorph store enumerated values and fixed size integers +denyop +lastbind writes last bind timestamp to entry +noopsrch handles no-op search control +pw-sha2 generates/validates SHA-2 password hashes +pw-pbkdf2 generates/validates PBKDF2 password hashes +smbk5pwd generates Samba3 password hashes (heimdal krb disabled) +trace traces overlay invocation +variant allows attributes/values to be shared between several entries +vc implements the verify credentials extended operation + +%package client +Summary: OpenLDAP client utilities +Requires: libldap2 = %{version} + +%description client +OpenLDAP client utilities such as ldapadd, ldapsearch, ldapmodify. + +%package devel +Summary: Libraries, Header Files and Documentation for OpenLDAP +Conflicts: openldap-devel +Requires: libldap2 = %{version} +Recommends: cyrus-sasl-devel + +%description devel +This package provides the OpenLDAP libraries, header files, and +documentation. + +%package static +Summary: Static libraries for the OpenLDAP libraries +Requires: cyrus-sasl-devel +Requires: openssl-devel +Requires: %{name}-devel = %version + +%description static +This package provides the static versions of the OpenLDAP libraries +for development. + +%package -n libldap2 +Summary: OpenLDAP Client Libraries +Recommends: libldap-data >= %{version} + +%description -n libldap2 +This package contains the OpenLDAP client libraries. + +%package -n libldapcpp-devel +Summary: C++ wrapper around openLDAP API +Requires: libldapcpp0 = %{version} +Requires: %{name}-devel + +%description -n libldapcpp-devel +This package contains files needed for development with the LDAP C++ +library. + +%package -n libldapcpp0 +Summary: C++ wrapper around openLDAP API +Provides: ldapcpplib = %{version} +Obsoletes: ldapcpplib <= 0.0.5 + +%description -n libldapcpp0 +This package provides a C++ library for accessing LDAP (Version 3) +Servers + +%build -p +cp %{SOURCE4} . +make depend +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +export CFLAGS="%{optflags} -Wno-format-extra-args -fno-strict-aliasing -DNDEBUG -DSLAP_CONFIG_DELETE -DSLAP_SCHEMA_EXPOSE -DLDAP_COLLECTIVE_ATTRIBUTES -DLDAP_USE_NON_BLOCKING_TLS" +export STRIP="" + +%build -a +# Build selected contrib overlays +for SLAPO_NAME in addpartial allowed allop autogroup authzid datamorph lastbind denyop cloak noopsrch passwd/sha2 passwd/pbkdf2 trace variant vc +do + make -C contrib/slapd-modules/${SLAPO_NAME} %{?_smp_mflags} "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" +done +# slapo-smbk5pwd only for Samba password hashes +make -C contrib/slapd-modules/smbk5pwd %{?_smp_mflags} "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" DEFS="-DDO_SAMBA" HEIMDAL_LIB="" + +# Create ldap user +%sysusers_generate_pre %{SOURCE12} ldap + +%check +%if %run_test_suite +# calculate the base port to be use in the test-suite +SLAPD_BASEPORT=10000 +if [ -f /.buildenv ] ; then + . /.buildenv + SLAPD_BASEPORT=$(($SLAPD_BASEPORT + ${BUILD_INCARNATION:-0} * 10)) +fi +export SLAPD_BASEPORT +rm -f tests/scripts/test019-syncreplication-cascade +rm -f tests/scripts/test022-ppolicy +rm -f tests/scripts/test023-refint +rm -f tests/scripts/test033-glue-syncrepl +#rm -f tests/scripts/test036-meta-concurrency +#rm -f tests/scripts/test039-glue-ldap-concurrency +rm -f tests/scripts/test043-delta-syncrepl +#rm -f tests/scripts/test045-syncreplication-proxied +rm -f tests/scripts/test048-syncrepl-multiproxy +rm -f tests/scripts/test050-syncrepl-multimaster +rm -f tests/scripts/test058-syncrepl-asymmetric +make SLAPD_DEBUG=0 test +%endif + +%install +mkdir -p %{buildroot}%{_libdir}/openldap +mkdir -p %{buildroot}/usr/lib/openldap +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_unitdir} +make STRIP="" DESTDIR="%{buildroot}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" install + +# Additional symbolic link to slapd executable in /usr/sbin/ +rm -f %{buildroot}%{_sbindir}/slapd +(cd %{buildroot}%{_sbindir} && ln -s ../lib64/slapd slapd) + +# Install selected contrib overlays +for SLAPO_NAME in addpartial allowed allop autogroup authzid datamorph lastbind denyop cloak noopsrch passwd/sha2 passwd/pbkdf2 trace variant vc +do + make -C contrib/slapd-modules/${SLAPO_NAME} STRIP="" DESTDIR="%{buildroot}" "mandir=%{_mandir}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" install +done +# slapo-smbk5pwd only for Samba password hashes +make -C contrib/slapd-modules/smbk5pwd STRIP="" DESTDIR="%{buildroot}" "mandir=%{_mandir}" "sysconfdir=%{_sysconfdir}/openldap" "libdir=%{_libdir}" "libexecdir=%{_libexecdir}" install +install -m 755 %{SOURCE8} %{buildroot}/usr/lib/openldap/start +install -m 644 %{SOURCE9} %{buildroot}%{_unitdir} +mkdir -p %{buildroot}%{_sysconfdir}/openldap/slapd.d +mkdir -p %{buildroot}%{_sysconfdir}/sasl2 +install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sasl2/slapd.conf +install -m 755 -d %{buildroot}/var/lib/ldap +chmod a+x %{buildroot}%{_libdir}/liblber.so* +chmod a+x %{buildroot}%{_libdir}/libldap.so* +install -m 755 %{SOURCE5} %{buildroot}%{_sbindir}/schema2ldif +mkdir -p %{buildroot}%{_tmpfilesdir}/ +install -m 644 %{SOURCE11} %{buildroot}%{_tmpfilesdir}/ +mkdir -p %{buildroot}%{_sysusersdir} +install -m 644 %{SOURCE12} %{buildroot}%{_sysusersdir}/ + +install -m 755 %{SOURCE12} ${RPM_BUILD_ROOT}/usr/lib/openldap/fixup-modulepath +install -m 755 %{SOURCE13} ${RPM_BUILD_ROOT}/%{_sbindir}/slapd-ldif-update-crc +install -m 755 %{SOURCE14} ${RPM_BUILD_ROOT}/usr/lib/openldap/update-crc + +mkdir -p %{buildroot}%{_fillupdir} +install -m 644 %{SOURCE10} %{buildroot}%{_fillupdir}/sysconfig.openldap +# Install default and sample configuration files +install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/openldap +install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/openldap +install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/openldap +find doc/guide '(' ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d ')' -delete +rm -rf doc/guide/release + +%define DOCDIR %{_defaultdocdir}/%{name} +# Install default database optimisation +install -d %{buildroot}%{DOCDIR}/adminguide \ + %{buildroot}%{DOCDIR}/images \ + %{buildroot}%{DOCDIR}/drafts +install -m 644 doc/guide/admin/* %{buildroot}%{DOCDIR}/adminguide +install -m 644 doc/guide/images/*.gif %{buildroot}%{DOCDIR}/images +install -m 644 doc/drafts/* %{buildroot}%{DOCDIR}/drafts +install -m 644 ANNOUNCEMENT \ + COPYRIGHT \ + README \ + CHANGES \ + %{SOURCE4} \ + %{buildroot}%{DOCDIR} +install -m 644 servers/slapd/slapd.ldif \ + %{buildroot}%{DOCDIR}/slapd.ldif.default +rm -f %{buildroot}/etc/openldap/schema/README +rm -f %{buildroot}/etc/openldap/slapd.ldif* +mv servers/slapd/back-sql/rdbms_depend servers/slapd/back-sql/examples + +rm -f %{buildroot}%{_libdir}/openldap/*.a +rm -f %{buildroot}/usr/share/man/man5/slapd-dnssrv.5 +rm -f %{buildroot}/usr/share/man/man5/slapd-null.5 +rm -f %{buildroot}/usr/share/man/man5/slapd-passwd.5 +rm -f %{buildroot}/usr/share/man/man5/slapd-shell.5 +rm -f %{buildroot}/usr/share/man/man5/slapd-tcl.5 +# Remove *.la files, libtool does not handle this correct +# Keep .la files for modules in the openldap subdirectory, which are consumed +# in this form. +rm -f %{buildroot}%{_libdir}/*.la + +# Provide a libldap_r for backwards-compatibility with OpenLDAP < 2.5. +ln -fs libldap.so "%{buildroot}%{_libdir}/libldap_r.so" + +%pre -f ldap.pre +%service_add_pre slapd.service + +%post +%tmpfiles_create %{name}.conf +%service_add_post slapd.service + +%ldconfig_scriptlets -n libldap2 + +%preun +%service_del_preun slapd.service + +%postun +%service_del_postun slapd.service + +%files +%config %{_sysconfdir}/openldap/schema/*.schema +%config %{_sysconfdir}/openldap/schema/*.ldif +%config(noreplace) /etc/sasl2/slapd.conf +%config(noreplace) %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf +%config(noreplace) %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.olctemplate +%config %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.default +%config %attr(640, root, ldap) %{_sysconfdir}/openldap/slapd.conf.example +%dir /usr/lib/openldap +%dir %{_sysconfdir}/sasl2 +%dir %{_sysconfdir}/openldap +%dir %attr(0770, ldap, ldap) %{_sysconfdir}/openldap/slapd.d +%dir %{_sysconfdir}/openldap/schema +%{_fillupdir}/sysconfig.openldap +%{_sbindir}/slap* +%{_libexecdir}/openldap/* +%exclude %{_libexecdir}/openldap/back_meta* +%exclude %{_libexecdir}/openldap/back_sql* +%exclude %{_libexecdir}/openldap/back_perl* +%exclude %{_libexecdir}/openldap/back_sock* +%{_libexecdir}/slapd +/usr/lib/openldap/* +%{_unitdir}/slapd.service +%{_tmpfilesdir}/openldap.conf +%{_sysusersdir}/ldap-user.conf +%dir %attr(0750, ldap, ldap) %{_sharedstatedir}/ldap +%ghost %attr(0750, ldap, ldap) %{slapdrundir} +%doc %{_mandir}/man8/sl* +%doc %{_mandir}/man8/lloadd.* +%doc %{_mandir}/man5/* +%dir %{DOCDIR} +%doc %{DOCDIR}/ANNOUNCEMENT +%doc %{DOCDIR}/COPYRIGHT +%license LICENSE +%doc %{DOCDIR}/README* +%doc %{DOCDIR}/CHANGES +%doc %{DOCDIR}/slapd.ldif.default +%doc %{DOCDIR}/drafts +%doc %{DOCDIR}/adminguide +%doc %{DOCDIR}/images +%{_libdir}/liblber.so.* +%{_libdir}/libldap.so.* + +%files back-perl +%{_libexecdir}/openldap/back_perl* +%doc %{_mandir}/man5/slapd-perl.* + +%files back-sock +%{_libexecdir}/openldap/back_sock* +%doc %{_mandir}/man5/slapd-sock.* + +%files back-meta +%{_libexecdir}/openldap/back_meta* +%doc %{_mandir}/man5/slapd-meta.* + +%files back-sql +%{_libexecdir}/openldap/back_sql* +%doc %{_mandir}/man5/slapd-sql.* +%doc servers/slapd/back-sql/examples +%doc servers/slapd/back-sql/docs/bugs +%doc servers/slapd/back-sql/docs/install + +%files -n libldap-data +%config(noreplace) %{_sysconfdir}/openldap/ldap.conf +%doc %{_mandir}/man5/ldap.conf* +%{_sysconfdir}/openldap/ldap.conf.default + +%files contrib +%{_libexecdir}/openldap/addpartial.* +%{_libexecdir}/openldap/allop.* +%{_libexecdir}/openldap/allowed.* +%{_libexecdir}/openldap/authzid.* +%{_libexecdir}/openldap/autogroup.* +%{_libexecdir}/openldap/cloak.* +%{_libexecdir}/openldap/datamorph.* +%{_libexecdir}/openldap/denyop.* +%{_libexecdir}/openldap/lastbind.* +%{_libexecdir}/openldap/noopsrch.* +%{_libexecdir}/openldap/pw-pbkdf2.* +%{_libexecdir}/openldap/pw-sha2.* +%{_libexecdir}/openldap/smbk5pwd.* +%{_libexecdir}/openldap/trace.* +%{_libexecdir}/openldap/variant.* +%{_libexecdir}/openldap/vc.* + +%files client +%doc %{_mandir}/man1/ldap* +%doc %{_mandir}/man5/ldif.* +%dir /etc/openldap +%{_sbindir}/schema2ldif +%{_bindir}/ldap* + +%files devel +%doc %{_mandir}/man3/* +%{_includedir}/*.h +%{_libdir}/liblber.so +%{_libdir}/libldap*.so +%{_libdir}/pkgconfig/*.pc + +%files static +%_libdir/liblber.a +%_libdir/libldap*.a + +%files -n libldap2 +%{_libdir}/liblber.so.* +%{_libdir}/libldap.so.* + +%changelog +%{?autochangelog} diff --git a/SPECS/openldap/sasl-slapd.conf b/SPECS/openldap/sasl-slapd.conf new file mode 100644 index 00000000..5536bf8c --- /dev/null +++ b/SPECS/openldap/sasl-slapd.conf @@ -0,0 +1 @@ +mech_list: gssapi digest-md5 cram-md5 external diff --git a/SPECS/openldap/schema2ldif b/SPECS/openldap/schema2ldif new file mode 100644 index 00000000..12f27482 --- /dev/null +++ b/SPECS/openldap/schema2ldif @@ -0,0 +1,53 @@ +#!/bin/bash +# +# This is a simple tool to convert OpenLDAP Schema files to +# LDIF suitable for usage with OpenLDAP's dynamic configuration +# backend (cn=config) +# +# usage: +# schema2ldif +# +# The generated LDIF is printed to stdout. +# + +if [ -z "$1" ]; then + echo 'usage: schema2ldif ' + exit; +fi + +cn=`basename $1 .schema` + +echo "dn: cn=$cn,cn=schema,cn=config"; +echo "objectclass: olcSchemaConfig"; +echo "cn: $cn"; + +/usr/bin/awk ' +BEGIN { + buffer = ""; + width=78 ; +} +function wrap(data) +{ + if (length(data) > 0) { + do { + print substr(data,0,width); + data = " " substr(data, width+1); + } + while (length(data) > 1 ) + }; +} +/^[\t ]*$/ {wrap(buffer); buffer=""; print "#"; next; } +/^#.*$/ { wrap(buffer); buffer=""; print $0; next } +/^[\t ]+/ { gsub("^[\t ]+",""); buffer = buffer " " $0; next; } +{ + wrap(buffer); + $1 = tolower($1) ; + gsub("^objectclass$","olcObjectclasses:",$1) + gsub("^attributetype$","olcAttributeTypes:",$1) + gsub("^attributetypes$","olcAttributeTypes:",$1) + gsub("^objectidentifier$","olcObjectIdentifier:",$1) + buffer = $0; +} +END { wrap(buffer); print "" } +' "$@" + diff --git a/SPECS/openldap/slapd-ldif-update-crc.sh b/SPECS/openldap/slapd-ldif-update-crc.sh new file mode 100644 index 00000000..957bea19 --- /dev/null +++ b/SPECS/openldap/slapd-ldif-update-crc.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Script to fix the crc of openldap slapd.d ldifs. +source /usr/lib/openldap/update-crc + +if [ -z ${1} ]; then + echo "Usage: ${0} /etc/openldap/slapd.d/" + exit 1 +fi + +if [ ! -f "${1}" ]; then + echo "File ${1} does not exist?" + echo "Usage: ${0} /etc/openldap/slapd.d/" + exit 1 +fi + +# Make sure slapd.service is not running. +slapd_running=1 + +# Don't check if no systemd, we could be in a container. +if [ -f "/usr/bin/systemctl" ]; then + /usr/bin/systemctl is-active --quiet slapd.service + slapd_running=$? +fi + +if [ $slapd_running -eq 0 ]; then + echo "Unable to update crc of '${1}' while slapd.service is running ..." + exit 1 +fi + +do_update_crc ${1} + +echo "Updated crc of ${1}" + diff --git a/SPECS/openldap/slapd.conf b/SPECS/openldap/slapd.conf new file mode 100644 index 00000000..6f847c34 --- /dev/null +++ b/SPECS/openldap/slapd.conf @@ -0,0 +1,86 @@ +# This file (slapd.conf) is the static configuration file of OpenLDAP server daemon. +# +# OpenLDAP daemon (slapd.service) supports two configuration styles: +# - Simple configuration with this file +# - Online configuration (OLC) +# +# You may choose the configuration style by setting it in: +# /etc/sysconfig/openldap OPENLDAP_CONFIG_BACKEND="files|ldap" +# If the value is set to "files", this configuration file will be used. +# If the value is set to "ldap", this configuration file will be entirely ignored, and +# the OLC configuration from /etc/openldap/slapd.d will be loaded. +# +# If you decide to use online configuration, please read the additional instructions in: +# /etc/openldap/slapd.conf.olctemplate +# +# Feel free to customise this file according to your needs, and start OpenLDAP +# server daemon by executing: +# systemctl start slapd.service +# +# To verify that LDAP service is running properly, try the following command: +# ldapsearch -x -D cn=Manager,dc=my-domain,dc=com -w secret -s base namingContexts + +# +# See slapd.conf(5) for details on configuration options. +# See /etc/openldap/slapd.conf.example for more examples. +# This file should NOT be world readable. +# + +pidfile /run/slapd/slapd.pid +argsfile /run/slapd/slapd.args + +# The following schema files are often useful +include /etc/openldap/schema/core.schema +include /etc/openldap/schema/cosine.schema +include /etc/openldap/schema/inetorgperson.schema +include /etc/openldap/schema/rfc2307bis.schema +include /etc/openldap/schema/yast.schema + +# Load backend modules such as database engines +moduleload back_mdb.la + +# Very important: define ACL to authorise client access +# The default settings permit rootdn to read and write, while other users +# may read the entire database or change their own password. +# If no ACL is present, everyone will be allowed to read the database. +# rootdn can always read and write everything. +access to dn.base="" + by * read + +access to dn.base="cn=Subschema" + by * read + +access to attrs=userPassword,userPKCS12 + by self write + by * auth + +access to attrs=shadowLastChange + by self write + by * read + +access to * + by * read + +# Define a LDAP database +database mdb +suffix "dc=my-domain,dc=com" +rootdn "cn=Manager,dc=my-domain,dc=com" +# Please avoid using clear text for root password +# See slappasswd(8) for instructions on creating a salted+hashed password +rootpw secret +# The database directory must exist prior to the start of OpenLDAP daemon +# The directory should be owned by ldap user and permission 0700 is recommended +directory /var/lib/ldap +# Indices to maintain +index objectClass eq + +# Using TLS to secure communication between LDAP clients and the server is strongly recommended. +# To enable TLS, you will need CA certificate, server certificate, and certificate key, and +# write down their paths below, make sure the files are readable by user "ldap". +# The server will then support StartTLS on standard port 389. +# To also serve LDAPS on port 636, set OPENLDAP_START_LDAPS="yes" in /etc/sysconfig/openldap. +#TLSProtocolMin 3.1 +#TLSCipherSuite HIGH:!SSLv3:!SSLv2:!ADH +#TLSCACertificateFile /my/ca.crt +#TLSCertificateFile /my/tls.crt +#TLSCertificateKeyFile /my/tls.key diff --git a/SPECS/openldap/slapd.conf.example b/SPECS/openldap/slapd.conf.example new file mode 100644 index 00000000..87e484bb --- /dev/null +++ b/SPECS/openldap/slapd.conf.example @@ -0,0 +1,354 @@ +############################################################################ +# See slapd.conf(5) for details on configuration options. +# This file SHOULD NOT be world readable. +# +# Important note: +# You surely have to adjust some settings to meet your (security) +# requirements. +# At least you should replace suffix "dc=example,dc=com" by +# something meaningful for your setup. +# If you plan to use OpenLDAP server as backend for Samba and/or Kerberos +# KDC then you MUST add decent ACLs for protecting user credentials! +# +# Read the man pages before changing something! +# +# You can debug the config by running (as root while slapd stopped): +# /usr/sbin/slapd -f /etc/openldap/slapd.conf -u ldap -g ldap -h "ldapi:/// ldap://127.0.0.1" -d 65535 +############################################################################ + +#--------------------------------------------------------------------------- +# slapd global parameters +#--------------------------------------------------------------------------- + +# serverID must be unique across all provider replicas +# for using multi-master replication (MMR) +serverID 99 + +# only alter this when you know what you're doing +#threads 4 + +# Run-time files +pidfile /var/run/slapd/slapd.pid +argsfile /var/run/slapd/slapd.args + +# for more debugging set: +#loglevel config stats stats2 +loglevel stats + +#--------------------------------------------------------------------------- +# Load runtime loadable modules +#--------------------------------------------------------------------------- + +# Load additional backend modules installed by package 'openldap2' +# The following backends are statically built-in and therefore don't have +# to be loaded here: +# config, ldif, monitor, bdb, hdb, ldap, mdb, relay +#moduleload back_bdb +#moduleload back_hdb +moduleload back_mdb +#moduleload back_meta +#moduleload back_sock + +# Load additional overlay modules installed by package 'openldap2' +# The following overlay are statically built-in and therefore don't have +# to be loaded here: +# ppolicy, syncprov +#moduleload accesslog +#moduleload constraint +#moduleload dds +#moduleload deref +#moduleload dynlist +#moduleload memberof +moduleload refint +#moduleload sssvlv +#moduleload translucent +moduleload unique +#moduleload valsort + +# Load additional overlay modules installed by package 'openldap2-contrib' +#moduleload allowed +#moduleload lastbind +#moduleload noopsrch +#moduleload pw-pbkdf2 +#moduleload pw-sha2 +#moduleload smbk5pwd + +#--------------------------------------------------------------------------- +# Include schema files +#--------------------------------------------------------------------------- + +# Schema files installed by package 'openldap2' +include /etc/openldap/schema/core.schema +include /etc/openldap/schema/cosine.schema +include /etc/openldap/schema/inetorgperson.schema +include /etc/openldap/schema/rfc2307bis.schema +include /etc/openldap/schema/ppolicy.schema +#include /etc/openldap/schema/yast.schema + +# Schema file installed by package 'dhcp-server' +#include /etc/openldap/schema/dhcp.schema + +# Schema file installed by package 'samba' +#include /etc/openldap/schema/samba3.schema + +# Schema file installed by package 'krb5-plugin-kdb-ldap' +#include /usr/share/doc/packages/krb5/kerberos.schema + +#--------------------------------------------------------------------------- +# Transport Layer Security (TLS) configuration +#--------------------------------------------------------------------------- + +# require at least TLS 1.0 and highly secure ciphers +#TLSProtocolMin 3.1 +#TLSCipherSuite HIGH:!SSLv3:!SSLv2:!ADH + +# TLS certificate and key files +#TLSCACertificateFile /etc/ssl/ca-bundle.pem +#TLSCertificateFile /etc/openldap/ssl.crt/server.crt +#TLSCertificateKeyFile /etc/openldap/ssl.key/server.key + +# For enabling Perfect Forward Secrecy (PFS), see dhparam(1) +#TLSDHParamFile /etc/openldap/ssl.key/dhparam + +#--------------------------------------------------------------------------- +# Password hashing +#--------------------------------------------------------------------------- + +#password-hash {CRYPT} +# Parameters for {CRYPT} scheme: SHA-512, 72 bits) of salt, 5000 iterations +#password-crypt-salt-format "$6$%.12s" + +#--------------------------------------------------------------------------- +# Security requirements +#--------------------------------------------------------------------------- + +#disallow bind_anon +#require bind LDAPv3 strong + +# SSF value for ldapi:// +localSSF 256 + +# minimum required SSF value (security strength factor) +# Sample security restrictions +# Require integrity protection (prevent hijacking) +# Require 112-bit (3DES or better) encryption for updates +# Require 63-bit encryption for simple bind +# security ssf=1 update_ssf=112 simple_bind=64 +#security ssf=128 update_ssf=256 simple_bind=128 +security ssf=0 + +#--------------------------------------------------------------------------- +# Global access control (ACLs) +#--------------------------------------------------------------------------- + +# Root DSE: allow anyone to read it +access to + dn.base="" + by * read + +# Sub schema sub entry: allow anyone to read it +access to + dn.base="cn=Subschema" + by * read + +#--------------------------------------------------------------------------- +# Authz-DN mappings +#--------------------------------------------------------------------------- + +# If connected via IPC socket (ldapi:///) and SASL/EXTERNAL was used +# System user root is mapped to the rootdn in database dc=example,dc=com +# which has also read access on config and monitor databases +authz-regexp + "gidNumber=0\\+uidNumber=0,cn=peercred,cn=external,cn=auth" + "cn=root,dc=example,dc=com" + +# Map local system user to LDAP entry +# if connected via IPC socket (ldapi:///) and SASL/EXTERNAL was used +authz-regexp + "gidnumber=([0-9]+)\\+uidnumber=([0-9]+),cn=peercred,cn=external,cn=auth" + "ldap:///dc=example,dc=com??sub?(&(objectClass=posixAccount)(uidNumber=$2)(gidNumber=$1))" + +# this maps the attribute uid to a LDAP entry +# if one of the typical password-based SASL mechs was used +authz-regexp + "uid=([a-zA-Z0-9_-]+),cn=(DIGEST-MD5|CRAM-MD5|NTLM|PLAIN|LOGIN|SCRAM-SHA-1),cn=auth" + "ldap:///dc=example,dc=com??sub?(uid=$1)" + +# this maps the attribute uid to a LDAP entry +# if one of the Kerberos based SASL mechs was used +#authz-regexp +# "uid=([a-zA-Z0-9_-]+),cn=(GSSAPI|GS2-KRB5|GS2-IAKERB),cn=auth" +# "ldap:///dc=example,dc=com??sub?(|(krbPrincipalName=$1)(krbPrincipalAlias=$1))" + +# Map client cert subject DN to LDAP entry if SASL/EXTERNAL was used +#authz-regexp +# "(.+)" +# "ldap:///dc=example,dc=com??sub?(&(objectClass=pkiUser)(seeAlso=$1))" + + +#=========================================================================== +# Database specific configuration sections below +# Required order of databases: +# config (first), ...others..., monitor (last) +#=========================================================================== + + +#--------------------------------------------------------------------------- +# cn=config // Configuration database (always first!) +# see slapd-config(5) +#--------------------------------------------------------------------------- + +database config + +# Cleartext passwords, especially for the rootdn, should +# be avoid! See slappasswd(8) and slapd.conf(5) for details. +# Best thing is not to set rootpw at all! +# For local config access by root use LDAPI with SASL/EXTERNAL instead +# (see above). +#rootpw secret + +access to + dn.subtree="cn=config" + by dn.exact="cn=root,dc=example,dc=com" manage + by group.base="cn=slapd admins,ou=groups,dc=example,dc=com" read + by * none + + +#--------------------------------------------------------------------------- +# dc=example,dc=com // Example MDB database to be used by normal clients +# see slapd-mdb(5) +#--------------------------------------------------------------------------- + +database mdb + +suffix "dc=example,dc=com" + +# rootdn has to be set for overlays' internal operations +rootdn "cn=root,dc=example,dc=com" + +# Cleartext passwords, especially for the rootdn, should +# be avoid! See slappasswd(8) and slapd.conf(5) for details. +# Best thing is not to set rootpw at all! +rootpw secret + +# The database directory MUST exist prior to running slapd and +# SHOULD only be accessible by the slapd user 'ldap'. +# mkdir /var/lib/ldap/example-db && chown ldap:ldap /var/lib/ldap/example-db && chmod 0700 /var/lib/ldap/example-db +directory /var/lib/ldap/example-db + +# Permissions of database files created +mode 0600 + +# extra information to be available in cn=monitor for this database +monitoring on + +# Perform ACL checks on the content of a new entry being added +add_content_acl on + +# backend-specific database parameters +checkpoint 1024 5 +# 100 MB (you can raise the limit later) +maxsize 104857600 + +# Indices to maintain +# +# Whenever you change indexing configuration you have to re-run slapindex +# while slapd being stopped! +# Don't forget to fix ownership/permissions of newly generated index files +# afterwards! + +# set always! +index objectClass eq + +# for typical address book use +index cn,sn,givenName,mail eq,sub + +# for user management +index uid,uidNumber,gidNumber eq + +# for authz-regexp mapping of Kerberos principal name +#index krbPrincipalName,krbPrincipalAlias eq + +# for authz-regexp mapping of client cert subject DNs +#index seeAlso eq + +# for syncrepl +index entryUUID,entryCSN eq + +# access control lists (ACLs) for dc=example,dc=com +# see slapd.access(5) for details on access control lists (ACLs) + +# full read access also to 'userPassword' for group of replicas +# and control is forwarded to subsequent ACLs +access to + dn.subtree=dc=example,dc=com + by group.base="cn=slapd replicas,ou=groups,dc=example,dc=com" read + by * break + +# write-only access to 'userPassword' for user, auth access else +access to + attrs=userPassword + by self =w + by * auth + +# 'userPKCS' must only be accessible by self +access to + attrs=userPKCS12 + by self write + by * none + +# No access to history of passwords +#access to +# attrs=pwdHistory +# by * none + +# Catch-all ACL for the rest +access to + dn.subtree=dc=example,dc=com + by group.base="cn=slapd admins,ou=groups,dc=example,dc=com" manage + by self read + by users read + by * auth + +# see slapo-ppolicy(5) +overlay ppolicy +# Default password policy entry +#ppolicy_default cn=ppolicy-default,ou=policies,dc=example,dc=com +# Hash clear-text userPassword values sent in with add/modify operations +#ppolicy_hash_cleartext +# Return AccountLocked error code to client +#ppolicy_use_lockout + +# see slapo-refint(5) +overlay refint +refint_attributes member seeAlso +refint_nothing cn=dummy + +# Check sub-tree wide uniqueness of certain attributes +# see slapo-unique(5) +# you have to add eq-index for efficient uniqueness check! +# Note that filter part is currently ignored because of OpenLDAP ITS#6825 +overlay unique +unique_uri "ldap:///dc=example,dc=com?uid,uidNumber,homeDirectory?sub" +unique_uri "ldap:///ou=groups,dc=example,dc=com?cn,gidNumber?sub?(|(objectClass=groupOfNames)(objectClass=posixGroup))" +#unique_uri "ldap:///dc=example,dc=com?krbPrincipalName,krbPrincipalAlias?sub" +#unique_uri "ldap:///dc=example,dc=com?ipHostNumber?sub" +#unique_uri "ldap:///dc=example,dc=com?employeeNumber?sub" +#unique_uri "ldap:///dc=example,dc=com?uniqueIdentifier?sub" + +#overlay syncprov +#mirrormode on + + +#--------------------------------------------------------------------------- +# cn=monitor // Monitoring database (always last!) +# see slapd-monitor(5) +#--------------------------------------------------------------------------- + +database monitor + +access to + dn.subtree="cn=monitor" + by dn.exact="cn=root,dc=example,dc=com" write + by group.base="cn=slapd admins,ou=groups,dc=example,dc=com" write + by users read diff --git a/SPECS/openldap/slapd.conf.olctemplate b/SPECS/openldap/slapd.conf.olctemplate new file mode 100644 index 00000000..90ae51f4 --- /dev/null +++ b/SPECS/openldap/slapd.conf.olctemplate @@ -0,0 +1,46 @@ +# This file (slapd.conf.olctemplate) is a template for creating the initial +# online configuration for OpenLDAP server daemon. +# +# In order to use online configuration for OpenLDAP server daemon, make sure to set: +# /etc/sysconfig/openldap OPENLDAP_CONFIG_BACKEND="ldap" +# +# Before starting the OpenLDAP daemon (slapd.conf) with onlne configuration for +# the very first time, you have to prepare the online configuration directory +# from this template file - first, make necessary customisations if you wish, and then +# run: +# cd /etc/openldap && slaptest -f slapd.conf.olctemplate -F slapd.d +# +# Then you may start OpenLDAP daemon: +# systemctl start slapd.service +# +# To verify that LDAP service is running properly, try the following command: +# ldapsearch -x -D cn=admin,cn=config -w secret -b cn=config + +# +# See slapd.conf(5) for details on configuration options. +# See /etc/openldap/slapd.conf.example for more examples. +# This file should NOT be world readable. +# + +pidfile /run/slapd/slapd.pid +argsfile /run/slapd/slapd.args + +# The following schema files are often useful +include /etc/openldap/schema/core.schema +include /etc/openldap/schema/cosine.schema +include /etc/openldap/schema/inetorgperson.schema +include /etc/openldap/schema/rfc2307bis.schema +include /etc/openldap/schema/yast.schema + +# Load backend modules such as database engines +# modulepath /usr/lib64/openldap +# moduleload back_mdb.la +# moduleload back_hdb.la +# moduleload back_bdb.la + +# Define the config database that holds all online configurations +database config +rootdn "cn=admin,cn=config" +# Please avoid using clear text for root password +# See slappasswd(8) for instructions on creating a salted+hashed password +rootpw secret diff --git a/SPECS/openldap/slapd.service b/SPECS/openldap/slapd.service new file mode 100644 index 00000000..6d5af0b1 --- /dev/null +++ b/SPECS/openldap/slapd.service @@ -0,0 +1,28 @@ +[Unit] +Description=OpenLDAP Server Daemon +After=syslog.target network.target + +[Service] +Type=forking +ExecStart=/usr/lib/openldap/start + +# Hardening to prevent security escalation. +## Future hardening for FS protection. +# ProtectSystem=full +# ReadWritePaths=/etc/openldap/slapd.d /var/lib/ldap + +RestrictSUIDSGID=true +NoNewPrivileges=true +PrivateTmp=true +PrivateDevices=true +ProtectHostname=true +ProtectClock=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +MemoryDenyWriteExecute=true + +[Install] +WantedBy=multi-user.target + diff --git a/SPECS/openldap/start b/SPECS/openldap/start new file mode 100644 index 00000000..8233a7c6 --- /dev/null +++ b/SPECS/openldap/start @@ -0,0 +1,174 @@ +#! /bin/bash +# Copyright (c) 1997-2000 SuSE GmbH Nuernberg, Germany. +# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# Author: Carsten Hoeger +# Ralf Haferkamp +# + +test -f /etc/sysconfig/openldap && . /etc/sysconfig/openldap + +SLAPD_BIN=/usr/sbin/slapd +LDAP_URLS="" +LDAPS_URLS="" +LDAPI_URLS="" +SLAPD_CONFIG_ARG="-F /etc/openldap/slapd.d" +SLAPD_PID_DIR="/var/run/slapd/" + +test -x $SLAPD_BIN || exit 5 + +function init_ldap_listener_urls(){ + case "$OPENLDAP_START_LDAP" in + [Yy][Ee][Ss]) + if [ -n "$OPENLDAP_LDAP_INTERFACES" ] + then + for iface in $OPENLDAP_LDAP_INTERFACES ;do + LDAP_URLS="$LDAP_URLS ldap://$iface" + done + else + LDAP_URLS="ldap:///" + fi + ;; + esac +} + +function init_ldapi_listener_urls(){ + case "$OPENLDAP_START_LDAPI" in + [Yy][Ee][Ss]) + if [ -n "$OPENLDAP_LDAPI_INTERFACES" ] + then + for iface in $OPENLDAP_LDAPI_INTERFACES ;do + esc_iface=`echo "$iface" | sed -e s'/\\//\\%2f/'g` + LDAPI_URLS="$LDAPI_URLS ldapi://$esc_iface" + done + else + LDAPI_URLS="ldapi:///" + fi + ;; + esac +} + +function init_ldaps_listener_urls(){ + case "$OPENLDAP_START_LDAPS" in + [Yy][Ee][Ss]) + if [ -n "$OPENLDAP_LDAPS_INTERFACES" ] + then + for iface in $OPENLDAP_LDAPS_INTERFACES ;do + LDAPS_URLS="$LDAPS_URLS ldaps://$iface" + done + else + LDAPS_URLS="ldaps:///" + fi + ;; + esac +} + +function check_connection(){ + SLAPD_TIMEOUT=10 + START=$( date +%s) + while [ $(( $( date +%s) - ${START} )) -lt ${SLAPD_TIMEOUT} ]; do + ldapsearch -x -H "$LDAP_URLS $LDAPI_URLS $LDAPS_URLS" -b "" -s base &>/dev/null + LDAPSEARCH_RC=$? + if [ ${LDAPSEARCH_RC} -ge 0 ] && [ ${LDAPSEARCH_RC} -le 80 ] ; then break + else sleep 1 + fi + done +} + +depth=0; + +function chown_database_dirs_bconfig() { + ldapdir=$(find $1 -type f -name "olcDatabase*" | xargs grep -i olcdbdirectory | awk '{print $2}') + for dir in $(realpath ${ldapdir}); do + if [[ $dir =~ ^/var/lib/ldap$|^/var/lib/ldap/.* ]]; then + [ -d "$dir" ] && [ -n "$OPENLDAP_USER" ] && \ + chown -h -R $OPENLDAP_USER $dir 2>/dev/null + [ -d "$dir" ] && [ -n "$OPENLDAP_GROUP" ] && \ + chgrp -h -R $OPENLDAP_GROUP $dir 2>/dev/null + else + echo "Skipping chown -h of external directory for security reasons. You must manually run:" + echo "# chown -h -R $OPENLDAP_USER $dir" + echo "# chgrp -h -R $OPENLDAP_GROUP $dir" + fi + done +} + +function chown_database_dirs() { + ldapdir=`grep ^directory $1 | awk '{print $2}'` + for dir in $ldapdir; do + [ -d "$dir" ] && [ -n "$OPENLDAP_USER" ] && \ + chown -h -R $OPENLDAP_USER $dir 2>/dev/null + [ -d "$dir" ] && [ -n "$OPENLDAP_GROUP" ] && \ + chgrp -h -R $OPENLDAP_GROUP $dir 2>/dev/null + done + includes=`grep ^include $1 | awk '{print $2}'` + if [ $depth -le 50 ]; then + depth=$(( $depth + 1 )); + for i in $includes; do + chown_database_dirs "$i" ; + done + fi +} + +USER_CMD="" +GROUP_CMD="" +[ ! "x$OPENLDAP_USER" = "x" ] && USER_CMD="-u $OPENLDAP_USER" +[ ! "x$OPENLDAP_GROUP" = "x" ] && GROUP_CMD="-g $OPENLDAP_GROUP" +[ ! "x$OPENLDAP_CONFIG_BACKEND" = "xldap" ] && SLAPD_CONFIG_ARG="-f /etc/openldap/slapd.conf" + + +# chown -h backend directories if OPENLDAP_CHOWN_DIRS ist set +if [ "$(echo "$OPENLDAP_CHOWN_DIRS" | tr 'A-Z' 'a-z')" = "yes" ]; then + if [ -n "$OPENLDAP_USER" -o -n "$OPENLDAP_GROUP" ]; then + if [ -n "$OPENLDAP_CONFIG_BACKEND" -a "$OPENLDAP_CONFIG_BACKEND" = "ldap" ]; then + chown -h -R $OPENLDAP_USER /etc/openldap/slapd.d 2>/dev/null + chgrp -h -R $OPENLDAP_GROUP /etc/openldap/slapd.d 2>/dev/null + chown_database_dirs_bconfig "/etc/openldap/slapd.d" + # assume back-config usage if slapd.conf is not present but slapd.d is + elif [ ! -f /etc/openldap/slapd.conf -a /etc/openldap/slapd.d ]; then + chown -h -R $OPENLDAP_USER /etc/openldap/slapd.d 2>/dev/null + chgrp -h -R $OPENLDAP_GROUP /etc/openldap/slapd.d 2>/dev/null + chown_database_dirs_bconfig "/etc/openldap/slapd.d" + else + chown_database_dirs "/etc/openldap/slapd.conf" + chgrp -h $OPENLDAP_GROUP /etc/openldap/slapd.conf 2>/dev/null + fi + if test -f /etc/sasl2/slapd.conf ; then + chgrp -h $OPENLDAP_GROUP /etc/sasl2/slapd.conf 2>/dev/null + chmod 640 /etc/sasl2/slapd.conf 2>/dev/null + fi + if [ -n "$OPENLDAP_KRB5_KEYTAB" ]; then + keytabfile=${OPENLDAP_KRB5_KEYTAB/#FILE:/} + if test -f $keytabfile ; then + chgrp -h $OPENLDAP_GROUP $keytabfile 2>/dev/null + chmod g+r $keytabfile 2>/dev/null + fi + fi + fi +fi +if [ -n "$OPENLDAP_KRB5_KEYTAB" ]; then + export KRB5_KTNAME=$OPENLDAP_KRB5_KEYTAB +fi +case "$OPENLDAP_REGISTER_SLP" in + [Yy][Ee][Ss]) + SLAPD_SLP_REG="-o slp=on" + ;; + *) + SLAPD_SLP_REG="-o slp=off" + ;; +esac + +init_ldap_listener_urls +init_ldapi_listener_urls +init_ldaps_listener_urls + +if [ ! -d $SLAPD_PID_DIR ]; then + mkdir -p $SLAPD_PID_DIR + chown -h ldap:ldap $SLAPD_PID_DIR +fi +echo -n "Starting ldap-server" +exec $SLAPD_BIN -h "$LDAP_URLS $LDAPS_URLS $LDAPI_URLS" \ + $SLAPD_CONFIG_ARG $USER_CMD $GROUP_CMD \ + $OPENLDAP_SLAPD_PARAMS $SLAPD_SLP_REG + diff --git a/SPECS/openldap/sysconfig.openldap b/SPECS/openldap/sysconfig.openldap new file mode 100644 index 00000000..20033877 --- /dev/null +++ b/SPECS/openldap/sysconfig.openldap @@ -0,0 +1,158 @@ +## Path: Network/LDAP +## Description: Basic Configuration of the OpenLDAP Directory Server + +## Type: yesno +## Default: yes +## ServiceRestart: ldap +# +# If set to "no" the LDAP server will not accept any "normal" LDAP connections +# but just connections over "ldaps" or "ldapi". Setting this to "no" does only +# make sense when either OPENLDAP_START_LDAPS or OPENLDAP_START_LDAPI is set +# "yes". +# +OPENLDAP_START_LDAP="yes" + +## Type: yesno +## Default: no +## ServiceRestart: ldap +# +# If set to "yes" the "ldap over ssl" feature of slapd will be enabled. Don't +# forget to add the "TLSCertificateFile" and "TLSCertificateKeyFile" options +# to the /etc/openldap/slapd.conf (man slapd.conf). +# Note: Don't confuse this with "START_TLS", the preferred method for +# making encrypted LDAP connections, which is enabled as soon as You +# specify "TLSCertificateFile" and "TLSCertificateKeyFile" in your config +# file +# +OPENLDAP_START_LDAPS="no" + +## Type: yesno +## Default: no +## ServiceRestart: ldap +# +# If set to "yes", "ldap over IPC" feature of slapd will be enabled. +# The ldap server creates a Unix domain socket as /var/run/slapd/ldapi. +# Default: no +# +OPENLDAP_START_LDAPI="yes" + +## Type: string +## Default: "" +## ServiceRestart: ldap +# +# If not empty, additional parameters for slapd daemon. +# Default: "" +# +OPENLDAP_SLAPD_PARAMS="" + +## Type: string +## Default: ldap +## ServiceRestart: ldap +# +# specifies a user, as which the openldap server should be executed +# Default: ldap +# +OPENLDAP_USER="ldap" + +## Type: string +## Default: ldap +## ServiceRestart: ldap +# +# specifies a group, as which the openldap server should be executed +# Default: ldap +# +OPENLDAP_GROUP="ldap" + +## Type: yesno +## Default: yes +## ServiceRestart: ldap +# +# If set to "yes" the init scripts will change the owner/group of the +# different backend database directories (e.g. /var/lib/ldap) to the +# user/group specified above +# +OPENLDAP_CHOWN_DIRS="yes" + +## Type: string +## Default: "" +## ServiceRestart: ldap +# +# Use this to specify the interfaces that the server such accept +# LDAP connections from. The values are specified in the format +#
:, where address is an IP address and port is the +# portnumber, the daemon should listen to (defaulting to 389). If this +# parameter is empty the server will attach to all interfaces. This +# parameter is only evaluated if "OPENLDAP_START_LDAP" is set to +# "yes" +# Default: "" +# +OPENLDAP_LDAP_INTERFACES="" + +## Type: string +## Default: "" +## ServiceRestart: ldap +# +# Use this to specify the interfaces that the server such accept +# LDAPS connections from. The values are specified in the format +#
:, where address is an IP address and port is the +# portnumber, the daemon should listen to (defaulting to 636). If this +# parameter is empty the server will attach to all interfaces. This +# parameter is only evaluated if "OPENLDAP_START_LDAPS" is set to +# "yes" +# Default: "" +# +OPENLDAP_LDAPS_INTERFACES="" + +## Type: string +## Default: "" +## ServiceRestart: ldap +# +# Use this to specify the paths of the Unix Domain Sockets that +# the server should create an accept incoming LDAPI connections +# on. This parameter is only evaluated if "OPENLDAP_START_LDAPI" +# is set to "yes". +# Default: "" +# +OPENLDAP_LDAPI_INTERFACES="" + +## Type: yesno +## Default: "yes" +## ServiceRestart: ldap +# +# If set to "no" the LDAP server will not try itself at a running SLP +# daemon. +# Default: "yes" +# +OPENLDAP_REGISTER_SLP="no" + +## Type: string +## Default: "" +## ServiceRestart: ldap +# +# Set this to the name of the keytab, if you want to use a non-default +# Kerberos Keytab. If OPENLDAP_CHOWN_DIRS is set to "yes" the permissions of +# this file will be changed so that the group OPENLDAP_GROUP has read +# access to the file. +# Example: OPENLDAP_KRB5_KEYTAB="FILE:/etc/openldap/krb5.keytab +# Default: "" +# +OPENLDAP_KRB5_KEYTAB="" + +## Type: string +## Default: "files" +## ServiceRestart: ldap +# +# Here you can configure which of the configuration backends you want to +# use. Possible values are "files" for slapd.conf(5) styleconfiguration or +# "ldap" for the slapd-config(5) LDAP based configuration backend. +# +OPENLDAP_CONFIG_BACKEND="files" + +## Type: yesno +## Default: "yes" +## ServiceRestart: ldap +# +# Here you can configure if the slapd shall start with or without memory limit. +# +OPENLDAP_MEMORY_LIMIT="yes" + diff --git a/SPECS/openldap/update-crc.sh b/SPECS/openldap/update-crc.sh new file mode 100644 index 00000000..97181002 --- /dev/null +++ b/SPECS/openldap/update-crc.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Script to fix the crc of openldap slapd.d ldifs. + +do_update_crc () { + if [ -z ${1} ]; then + echo "Invalid call to do_update_crc() - no filename provided" + exit 1 + fi + + tgt_ldif=$1 + + if [ ! -f "${tgt_ldif}" ]; then + echo "invalid call to do_update_crc() - file ${tgt_ldif} does not exist?" + exit 1 + fi + + rm -f "${tgt_ldif}.crcbak" + mv "${tgt_ldif}" "${tgt_ldif}.crcbak" + + /usr/bin/awk ' +BEGIN { + # CRC-32 ZIP polynomial in reversed bit order. + POLY = 0xedb88320 + + # 8-bit character -> ordinal table. + for (i = 0; i < 256; i++) + ORD[sprintf("%c", i)] = i +} + +{ + # Remember each input line. + input[NR] = $0 + + # Verify the file header. + if (NR == 1 && $0 != "# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.") + exit 1 + if (NR == 2 && $0 !~ /# CRC32 ......../) + exit 1 +} + +# Calculate CRC-32. +function crc32(crc, string, i, j, c) { + crc = and(compl(crc), 0xffffffff) + for (i = 1; i <= length(string); i++) { + c = substr(string, i, 1) + crc = xor(crc, ORD[c]) + for (j = 0; j < 8; j++) + crc = and(crc, 1) ? xor(rshift(crc, 1), POLY) : rshift(crc, 1) + } + crc = and(compl(crc), 0xffffffff) + return crc +} + +END { + # Calculate CRC-32 of the file and update it in the header. + crc = 0 + for (i = 3; i <= length(input); i++) + crc = crc32(crc, input[i] "\n") + input[2] = "# CRC32 " sprintf("%08x", crc) + + # Print the output. + for (i = 1; i <= length(input); i++) + print input[i] +}' "${tgt_ldif}.crcbak" > "${tgt_ldif}" + +} + diff --git a/SPECS/opensp/opensp.spec b/SPECS/opensp/opensp.spec new file mode 100644 index 00000000..470d8d1e --- /dev/null +++ b/SPECS/opensp/opensp.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: opensp +Version: 1.5.2 +Release: %autorelease +Summary: SGML and XML parser +License: X11 +URL: http://openjade.sourceforge.net/ +#!RemoteAsset +Source0: http://download.sourceforge.net/openjade/OpenSP-%{version}.tar.gz +BuildSystem: autotools +# configure: error: unrecognized option: --docdir=/usr/share/doc/opensp +# So we need to use this +BuildOption(conf): --disable-doc-build +BuildOption(conf): --disable-dependency-tracking +BuildOption(conf): --disable-static +BuildOption(conf): --enable-http +BuildOption(conf): --enable-default-catalog=/etc/sgml/catalog +BuildOption(conf): --enable-default-search-path=/usr/share/sgml:/usr/share/xml + +BuildRequires: make +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool + +Requires: sgml-common +Provides: bundled(gettext) = 0.14.5 + +%description +OpenSP is an implementation of the ISO/IEC 8879:1986 standard SGML +(Standard Generalized Markup Language). OpenSP is based on James +Clark's SP implementation of SGML. OpenSP is a command-line +application and a set of components, including a generic API. + +%package devel +Summary: Files for developing applications that use OpenSP +Requires: %{name} = %{version}-%{release} + +%description devel +Header files and libtool library for developing applications that use OpenSP. + +%prep +%autosetup -n OpenSP-%{version} +# convert files to UTF-8 +iconv -f latin1 -t utf8 ChangeLog -o ChangeLog.tmp +mv -f ChangeLog.tmp ChangeLog + +%conf -p +autoreconf -fiv + +%install -a +for file in nsgmls sgmlnorm spam spent sx ; do + ln -s o$file $RPM_BUILD_ROOT%{_bindir}/$file +done + +# Rename sx to sgml2xml. +mv $RPM_BUILD_ROOT%{_bindir}/sx $RPM_BUILD_ROOT%{_bindir}/sgml2xml + +# Clean out (installed) redundant copies of the docs and DTDs. +rm -rf $RPM_BUILD_ROOT%{_docdir}/OpenSP +rm -rf $RPM_BUILD_ROOT%{_datadir}/OpenSP + +%find_lang OpenSP --generate-subpackages + +%ldconfig_scriptlets + +%files +%doc AUTHORS BUGS COPYING ChangeLog NEWS README +%doc pubtext/opensp-implied.dcl +%{_bindir}/* +%{_libdir}/libosp.so.* + +%files devel +%{_includedir}/OpenSP/ +%{_libdir}/libosp.so + +%changelog +%{?autochangelog} diff --git a/SPECS/openssh/openssh-server-systemd-sysusers.conf b/SPECS/openssh/openssh-server-systemd-sysusers.conf new file mode 100644 index 00000000..419c5293 --- /dev/null +++ b/SPECS/openssh/openssh-server-systemd-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u sshd 74 "Privilege-separated SSH" /usr/share/empty.sshd - diff --git a/SPECS/openssh/openssh.spec b/SPECS/openssh/openssh.spec new file mode 100644 index 00000000..1c5a4089 --- /dev/null +++ b/SPECS/openssh/openssh.spec @@ -0,0 +1,301 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# If we want to enable building these, change this to 1 +%bcond kerberos5 0 +%bcond fido2 0 +%bcond selinux 0 +%bcond xorg 0 + +Name: openssh +Version: 10.0p1 +Release: %autorelease +Summary: An open source implementation of SSH protocol version 2 +License: BSD-3-Clause AND BSD-2-Clause AND ISC AND SSH-OpenSSH AND ssh-keyscan AND sprintf AND LicenseRef-Fedora-Public-Domain AND X11-distribute-modifications-variant +URL: http://www.openssh.com/portable.html +#!RemoteAsset +Source0: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc +Source2: sshd.pam +Source3: sshd.service +Source4: sshd@.service +Source5: sshd.socket +Source6: ssh-agent.service +Source7: ssh-agent.socket +Source8: sshd.sysconfig +Source9: sshd-keygen +Source10: sshd-keygen@.service +Source11: sshd-keygen.target +Source12: openssh-server-systemd-sysusers.conf +BuildSystem: autotools + +BuildOption(conf): --sysconfdir=%{_sysconfdir}/ssh +BuildOption(conf): --libexecdir=%{_libexecdir}/openssh +BuildOption(conf): --datadir=%{_datadir}/openssh +BuildOption(conf): --with-default-path=/usr/local/bin:/usr/bin +BuildOption(conf): --with-superuser-path=/usr/local/bin:/usr/bin +BuildOption(conf): --with-privsep-path=%{_datadir}/empty.sshd +BuildOption(conf): --disable-strip +BuildOption(conf): --without-zlib-version-check +BuildOption(conf): --without-ipaddr-display +BuildOption(conf): --with-pie=no +BuildOption(conf): --without-hardening +BuildOption(conf): --with-systemd +BuildOption(conf): --with-pam +%if %{with selinux} +BuildOption(conf): --with-selinux +BuildOption(conf): --with-audit=linux +BuildOption(conf): --with-sandbox=seccomp_filter +%endif +%if %{with kerberos5} +BuildOption(conf): --with-kerberos5${krb5_prefix:+=${krb5_prefix}} +%else +BuildOption(conf): --without-kerberos5 +%endif +BuildOption(conf): --with-libedit + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: zlib-devel +BuildRequires: audit-devel +BuildRequires: util-linux +BuildRequires: groff +BuildRequires: pam-devel +BuildRequires: openssl-devel +BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros +BuildRequires: make +#BuildRequires: p11-kit-devel +%if %{with fido2} +BuildRequires: libfido2-devel +%endif +BuildRequires: libxcrypt-devel +%if %{with kerberos} +BuildRequires: krb5-devel +%endif +BuildRequires: libedit-devel +BuildRequires: ncurses-devel +%if %{with selinux} +BuildRequires: libselinux-devel +BuildRequires: audit-devel +%endif +%if %{with xorg} +BuildRequires: xauth +BuildRequires: libX11-devel +%endif + +Recommends: p11-kit + +Requires: /sbin/nologin +Requires: openssl +%if %{with selinux} +Requires: libselinux +Requires: audit-devel +%endif + +%description +SSH (Secure SHell) is a program for logging into and executing +commands on a remote machine. SSH is intended to replace rlogin and +rsh, and to provide secure encrypted communications between two +untrusted hosts over an insecure network. X11 connections and +arbitrary TCP/IP ports can also be forwarded over the secure channel. + +OpenSSH is OpenBSD's version of the last free version of SSH, bringing +it up to date in terms of security and features. + +This package includes the core files necessary for both the OpenSSH +client and server. To make this package useful, you should also +install openssh-clients, openssh-server, or both. + +%package clients +Summary: An open source SSH client applications +Requires: openssh = %{version}-%{release} +#Requires: crypto-policies + +%description clients +OpenSSH is a free version of SSH (Secure SHell), a program for logging +into and executing commands on a remote machine. This package includes +the clients necessary to make encrypted connections to SSH servers. + +%package keysign +Summary: A helper program used for host-based authentication +Requires: openssh = %{version}-%{release} + +%description keysign +OpenSSH is a free version of SSH (Secure SHell), a program for logging +into and executing commands on a remote machine. ssh-keysign is a +helper program used for host-based authentication disabled by default. + +%package server +Summary: An open source SSH server daemon +Requires: openssh = %{version}-%{release} +Requires(pre): /usr/sbin/useradd +Requires: pam +#Requires: crypto-policies + +%description server +OpenSSH is a free version of SSH (Secure SHell), a program for logging +into and executing commands on a remote machine. This package contains +the secure shell daemon (sshd). The sshd daemon allows SSH clients to +securely connect to your SSH server. + +%package askpass +Summary: A passphrase dialog for OpenSSH and X +Requires: openssh = %{version}-%{release} + +%description askpass +OpenSSH is a free version of SSH (Secure SHell), a program for logging +into and executing commands on a remote machine. This package contains +an X11 passphrase dialog for OpenSSH. + +%prep +# Our %%prep won't work so this - 251 +%setup -q -n %{name}-%{version} + +%conf -p +autoreconf -fiv + +%build -p +CFLAGS="$CFLAGS -fPIC" +SAVE_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -pie -z relro -z now" +%if %{with kerberos5} +if test -r /etc/profile.d/krb5-devel.sh ; then + source /etc/profile.d/krb5-devel.sh +fi +krb5_prefix=`krb5-config --prefix` +if test "$krb5_prefix" != "%{_prefix}" ; then + CPPFLAGS="$CPPFLAGS -I${krb5_prefix}/include -I${krb5_prefix}/include/gssapi"; export CPPFLAGS + CFLAGS="$CFLAGS -I${krb5_prefix}/include -I${krb5_prefix}/include/gssapi" + LDFLAGS="$LDFLAGS -L${krb5_prefix}/%{_lib}"; export LDFLAGS +else + krb5_prefix= + CPPFLAGS="-I%{_includedir}/gssapi"; export CPPFLAGS + CFLAGS="$CFLAGS -I%{_includedir}/gssapi" +fi +%endif + +%install -p +mkdir -p -m755 %{buildroot}%{_sysconfdir}/ssh +mkdir -p -m755 %{buildroot}%{_sysconfdir}/ssh/ssh_config.d +mkdir -p -m755 %{buildroot}%{_sysconfdir}/ssh/sshd_config.d +mkdir -p -m755 %{buildroot}%{_libexecdir}/openssh + +%install -a +install -d %{buildroot}/etc/pam.d/ +install -d %{buildroot}/etc/sysconfig/ +install -d %{buildroot}%{_libexecdir}/openssh +install -m644 %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/sshd +install -m644 %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/sshd + +install -d -m755 $RPM_BUILD_ROOT/%{_unitdir} +install -m644 %{SOURCE3} $RPM_BUILD_ROOT/%{_unitdir}/sshd.service +install -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/sshd@.service +install -m644 %{SOURCE5} $RPM_BUILD_ROOT/%{_unitdir}/sshd.socket +install -m644 %{SOURCE10} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen@.service +install -m644 %{SOURCE11} $RPM_BUILD_ROOT/%{_unitdir}/sshd-keygen.target + +install -d -m755 $RPM_BUILD_ROOT/%{_userunitdir} +install -m644 %{SOURCE6} $RPM_BUILD_ROOT/%{_userunitdir}/ssh-agent.service +install -m644 %{SOURCE7} $RPM_BUILD_ROOT/%{_userunitdir}/ssh-agent.socket +install -m744 %{SOURCE9} $RPM_BUILD_ROOT/%{_libexecdir}/openssh/sshd-keygen + +install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}/ +install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/ + +install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}/ +install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +install -d -m711 ${RPM_BUILD_ROOT}/%{_datadir}/empty.sshd +install -p -D -m 0644 %{SOURCE12} %{buildroot}%{_sysusersdir}/openssh-server.conf + +# TODO: We don't need these now but maybe in the future +rm -f $RPM_BUILD_ROOT/etc/profile.d/gnome-ssh-askpass.* + + +%pre server +%sysusers_create_package openssh-server %{SOURCE12} + +%post server +%systemd_post sshd.service sshd.socket + +%preun server +%systemd_preun sshd.service sshd.socket + +%postun server +%systemd_postun_with_restart sshd.service + +%post clients +%systemd_user_post ssh-agent.service +%systemd_user_post ssh-agent.socket + +%preun clients +%systemd_user_preun ssh-agent.service +%systemd_user_preun ssh-agent.socket + +%files +%license LICENCE +%doc CREDITS ChangeLog OVERVIEW PROTOCOL* README README.platform README.privsep README.tun README.dns TODO +%attr(0755,root,root) %dir %{_sysconfdir}/ssh +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/moduli +%attr(0755,root,root) %{_bindir}/ssh-keygen +%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1* +%attr(0755,root,root) %dir %{_libexecdir}/openssh + +%files clients +%attr(0755,root,root) %{_bindir}/ssh +%attr(0644,root,root) %{_mandir}/man1/ssh.1* +%attr(0755,root,root) %{_bindir}/scp +%attr(0644,root,root) %{_mandir}/man1/scp.1* +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh/ssh_config +%dir %attr(0755,root,root) %{_sysconfdir}/ssh/ssh_config.d/ +%attr(0644,root,root) %{_mandir}/man5/ssh_config.5* +%attr(0755,root,root) %{_bindir}/ssh-agent +%attr(0755,root,root) %{_bindir}/ssh-add +%attr(0755,root,root) %{_bindir}/ssh-keyscan +%attr(0755,root,root) %{_bindir}/sftp +%attr(0755,root,root) %{_bindir}/ssh-copy-id +%attr(0755,root,root) %{_libexecdir}/openssh/ssh-pkcs11-helper +%attr(0755,root,root) %{_libexecdir}/openssh/ssh-sk-helper +%attr(0644,root,root) %{_mandir}/man1/ssh-agent.1* +%attr(0644,root,root) %{_mandir}/man1/ssh-add.1* +%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1* +%attr(0644,root,root) %{_mandir}/man1/sftp.1* +%attr(0644,root,root) %{_mandir}/man1/ssh-copy-id.1* +%attr(0644,root,root) %{_mandir}/man8/ssh-pkcs11-helper.8* +%attr(0644,root,root) %{_mandir}/man8/ssh-sk-helper.8* +%attr(0644,root,root) %{_userunitdir}/ssh-agent.service +%attr(0644,root,root) %{_userunitdir}/ssh-agent.socket + +%files keysign +%attr(4555,root,root) %{_libexecdir}/openssh/ssh-keysign +%attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8* + +%files server +%dir %attr(0711,root,root) %{_datadir}/empty.sshd +%attr(0755,root,root) %{_sbindir}/sshd +%attr(0755,root,root) %{_libexecdir}/openssh/sshd-session +%attr(0755,root,root) %{_libexecdir}/openssh/sshd-auth +%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server +%attr(0755,root,root) %{_libexecdir}/openssh/sshd-keygen +%attr(0644,root,root) %{_mandir}/man5/sshd_config.5* +%attr(0644,root,root) %{_mandir}/man5/moduli.5* +%attr(0644,root,root) %{_mandir}/man8/sshd.8* +%attr(0644,root,root) %{_mandir}/man8/sftp-server.8* +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config +%dir %attr(0700,root,root) %{_sysconfdir}/ssh/sshd_config.d/ +%attr(0644,root,root) %config(noreplace) /etc/pam.d/sshd +%attr(0640,root,root) %config(noreplace) /etc/sysconfig/sshd +%attr(0644,root,root) %{_unitdir}/sshd.service +%attr(0644,root,root) %{_unitdir}/sshd@.service +%attr(0644,root,root) %{_unitdir}/sshd.socket +%attr(0644,root,root) %{_unitdir}/sshd-keygen@.service +%attr(0644,root,root) %{_unitdir}/sshd-keygen.target +%attr(0644,root,root) %{_sysusersdir}/openssh-server.conf + +%changelog +%{?autochangelog} diff --git a/SPECS/openssh/ssh-agent.service b/SPECS/openssh/ssh-agent.service new file mode 100644 index 00000000..d0c38dd0 --- /dev/null +++ b/SPECS/openssh/ssh-agent.service @@ -0,0 +1,17 @@ +# Requires SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" +# set in environment, handled for example in plasma via +# /etc/xdg/plasma-workspace/env/ssh-agent.sh +[Unit] +ConditionEnvironment=!SSH_AGENT_PID +Description=OpenSSH key agent +Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1) +Requires=ssh-agent.socket + +[Service] +ExecStart=/usr/bin/ssh-agent -D +PassEnvironment=SSH_AGENT_PID +SuccessExitStatus=2 +Type=simple + +[Install] +Also=ssh-agent.socket diff --git a/SPECS/openssh/ssh-agent.socket b/SPECS/openssh/ssh-agent.socket new file mode 100644 index 00000000..d589cbc8 --- /dev/null +++ b/SPECS/openssh/ssh-agent.socket @@ -0,0 +1,14 @@ +[Unit] +Description=OpenSSH key agent +Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1) + +[Socket] +ListenStream=%t/ssh-agent.socket +Service=ssh-agent.service +Priority=6 +Backlog=5 +SocketMode=0600 +DirectoryMode=0700 + +[Install] +WantedBy=sockets.target diff --git a/SPECS/openssh/sshd-keygen b/SPECS/openssh/sshd-keygen new file mode 100644 index 00000000..17ec1008 --- /dev/null +++ b/SPECS/openssh/sshd-keygen @@ -0,0 +1,45 @@ +#!/bin/bash + +# Create the host keys for the OpenSSH server. +KEYTYPE=$1 +case $KEYTYPE in + "dsa") ;& # disabled in FIPS + "ed25519") + FIPS=/proc/sys/crypto/fips_enabled + if [[ -r "$FIPS" && $(cat $FIPS) == "1" ]]; then + exit 0 + fi ;; + "rsa") + if [[ ! -z $SSH_RSA_BITS ]]; then + SSH_KEYGEN_OPTIONS="-b $SSH_RSA_BITS" + fi ;; # always ok + "ecdsa") + if [[ ! -z $SSH_ECDSA_BITS ]]; then + SSH_KEYGEN_OPTIONS="-b $SSH_ECDSA_BITS" + fi ;; + *) # wrong argument + exit 12 ;; +esac +KEY=/etc/ssh/ssh_host_${KEYTYPE}_key + +KEYGEN=/usr/bin/ssh-keygen +if [[ ! -x $KEYGEN ]]; then + exit 13 +fi + +# remove old keys +rm -f $KEY{,.pub} + +# create new keys +if ! $KEYGEN -q -t $KEYTYPE $SSH_KEYGEN_OPTIONS -f $KEY -C '' -N '' >&/dev/null; then + exit 1 +fi + +# sanitize permissions +/usr/bin/chmod 600 $KEY +/usr/bin/chmod 644 $KEY.pub +if [[ -x /usr/sbin/restorecon ]]; then + /usr/sbin/restorecon $KEY{,.pub} +fi + +exit 0 diff --git a/SPECS/openssh/sshd-keygen.target b/SPECS/openssh/sshd-keygen.target new file mode 100644 index 00000000..9efb4e25 --- /dev/null +++ b/SPECS/openssh/sshd-keygen.target @@ -0,0 +1,5 @@ +[Unit] +Wants=sshd-keygen@rsa.service +Wants=sshd-keygen@ecdsa.service +Wants=sshd-keygen@ed25519.service +PartOf=sshd.service diff --git a/SPECS/openssh/sshd-keygen@.service b/SPECS/openssh/sshd-keygen@.service new file mode 100644 index 00000000..aee13033 --- /dev/null +++ b/SPECS/openssh/sshd-keygen@.service @@ -0,0 +1,14 @@ +[Unit] +Description=OpenSSH %i Server Key Generation +ConditionFileNotEmpty=|!/etc/ssh/ssh_host_%i_key + +[Service] +Type=oneshot +# Set option as empty variable to suppress warnings upon expanding the command line +# when the config file under /etc does not exist or is empty. +Environment=OPTIONS= +EnvironmentFile=-/etc/sysconfig/sshd +ExecStart=/usr/libexec/openssh/sshd-keygen %i + +[Install] +WantedBy=sshd-keygen.target diff --git a/SPECS/openssh/sshd.pam b/SPECS/openssh/sshd.pam new file mode 100644 index 00000000..c4c2efee --- /dev/null +++ b/SPECS/openssh/sshd.pam @@ -0,0 +1,14 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth substack common-auth +auth include postlogin-auth +account requisite pam_nologin.so +account substack common-account +account include postlogin-account +password substack common-password +password include postlogin-password +session required pam_loginuid.so +session optional pam_keyinit.so force revoke +session substack common-session +session include postlogin-session +session optional pam_motd.so diff --git a/SPECS/openssh/sshd.service b/SPECS/openssh/sshd.service new file mode 100644 index 00000000..a109e01d --- /dev/null +++ b/SPECS/openssh/sshd.service @@ -0,0 +1,20 @@ +[Unit] +Description=OpenSSH server daemon +Documentation=man:sshd(8) man:sshd_config(5) +After=network.target sshd-keygen.target +Wants=sshd-keygen.target + +[Service] +Type=notify +# Set option as empty variable to suppress warnings upon expanding the command line +# when the config file under /etc does not exist or is empty. +Environment=OPTIONS= +EnvironmentFile=-/etc/sysconfig/sshd +ExecStart=/usr/sbin/sshd -D $OPTIONS +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/openssh/sshd.socket b/SPECS/openssh/sshd.socket new file mode 100644 index 00000000..caa50c42 --- /dev/null +++ b/SPECS/openssh/sshd.socket @@ -0,0 +1,11 @@ +[Unit] +Description=OpenSSH Server Socket +Documentation=man:sshd(8) man:sshd_config(5) +Conflicts=sshd.service + +[Socket] +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/SPECS/openssh/sshd.sysconfig b/SPECS/openssh/sshd.sysconfig new file mode 100644 index 00000000..be40d084 --- /dev/null +++ b/SPECS/openssh/sshd.sysconfig @@ -0,0 +1,11 @@ +# Configuration file for the sshd service. + +# The server keys are automatically generated if they are missing. +# To change the automatic creation, adjust sshd.service options for +# example using systemctl enable sshd-keygen@dsa.service to allow creation +# of DSA key or systemctl mask sshd-keygen@rsa.service to disable RSA key +# creation. + +#SSH_RSA_BITS=3072 +#SSH_ECDSA_BITS=256 +OPTIONS="" diff --git a/SPECS/openssh/sshd@.service b/SPECS/openssh/sshd@.service new file mode 100644 index 00000000..8ac892a8 --- /dev/null +++ b/SPECS/openssh/sshd@.service @@ -0,0 +1,14 @@ +[Unit] +Description=OpenSSH per-connection server daemon +Documentation=man:sshd(8) man:sshd_config(5) +Wants=sshd-keygen.target +After=sshd-keygen.target + +[Service] +# Set option as empty variable to avoid warnings upon expanding the command line +# when the config file under /etc does not exist or is empty. +Environment=OPTIONS= +EnvironmentFile=-/etc/sysconfig/sshd +ExecStart=-/usr/sbin/sshd -i $OPTIONS -o "AuthorizedKeysFile ${CREDENTIALS_DIRECTORY}/ssh.ephemeral-authorized_keys-all .ssh/authorized_keys" +StandardInput=socket +ImportCredential=ssh.ephemeral-authorized_keys-all diff --git a/SPECS/openssl/openssl-shared-jitterentropy.patch b/SPECS/openssl/openssl-shared-jitterentropy.patch new file mode 100644 index 00000000..5c2ef75b --- /dev/null +++ b/SPECS/openssl/openssl-shared-jitterentropy.patch @@ -0,0 +1,35 @@ +diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf +index 86287c3..4852fa0 100644 +--- a/Configurations/00-base-templates.conf ++++ b/Configurations/00-base-templates.conf +@@ -107,7 +107,7 @@ my %targets=( + ex_libs => + sub { + my @libs = (); +- push(@libs, "-l:libjitterentropy.a") if !defined($disabled{jitter}); ++ push(@libs, "-l:libjitterentropy.so") if !defined($disabled{jitter}); + push(@libs, "-lz") if !defined($disabled{zlib}) && defined($disabled{"zlib-dynamic"}); + if (!defined($disabled{brotli}) && defined($disabled{"brotli-dynamic"})) { + push(@libs, "-lbrotlienc"); +diff --git a/apps/openssl.cnf b/apps/openssl.cnf +index abace0e..c41669c 100644 +--- a/apps/openssl.cnf ++++ b/apps/openssl.cnf +@@ -52,6 +52,7 @@ tsa_policy3 = 1.2.3.4.5.7 + + [openssl_init] + providers = provider_sect ++random = random + + # List of providers to load + [provider_sect] +@@ -60,6 +61,9 @@ default = default_sect + # included fipsmodule.cnf. + # fips = fips_sect + ++[random] ++seed=JITTER ++ + # If no providers are activated explicitly, the default one is activated implicitly. + # See man 7 OSSL_PROVIDER-default for more details. + # diff --git a/SPECS/openssl/openssl.spec b/SPECS/openssl/openssl.spec new file mode 100644 index 00000000..3dafbe4d --- /dev/null +++ b/SPECS/openssl/openssl.spec @@ -0,0 +1,167 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define ssletcdir %{_sysconfdir}/pki/tls +%define sonum 3 + +%bcond lto 0 +%if %{with lto} +%define _lto_cflags %{nil} +%endif + +%global _test_target test + +Name: openssl +Version: 3.5.2 +Release: %autorelease +Summary: Cryptography and SSL/TLS Toolkit +License: Apache-2.0 +URL: https://www.openssl.org/ +#!RemoteAsset +Source: https://www.openssl.org/source/%{name}-%{version}.tar.gz + +# Use the shared jitterentropy library instead of static +Patch1: openssl-shared-jitterentropy.patch + +BuildRequires: gcc +BuildRequires: jitterentropy-devel +BuildRequires: make +BuildRequires: perl +BuildRequires: pkgconfig +BuildRequires: pkgconfig(zlib) +BuildSystem: autotools +BuildOption(check): LD_LIBRARY_PATH="$PWD" +%description +OpenSSL is a software library to be used in applications that need to +secure communications over computer networks against eavesdropping or +need to ascertain the identity of the party at the other end. +OpenSSL contains an implementation of the SSL and TLS protocols. + + +%package devel +Summary: Development files for building with OpenSSL +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files, pkgconfig/cmake files, development +symlinks, and API documentation needed to develop applications which will +use OpenSSL. + +%package doc +Summary: HTML documentation for OpenSSL +BuildArch: noarch + +%description doc +This package contains the HTML version of the API documentation and man +pages for OpenSSL. + +%conf +./Configure \ + --prefix=%{_prefix} \ + --libdir=%{_lib} \ + --openssldir=%{ssletcdir} \ + shared \ + enable-camellia \ + enable-seed \ + enable-ec_nistp_64_gcc_128 \ + enable-jitter \ + enable-ktls \ + enable-rfc3779 \ + no-afalgeng \ + no-atexit \ + no-ec2m \ + no-mdc2 \ + zlib \ + enable-pie \ + %{optflags} \ + -Wa,--noexecstack \ + -Wl,-z,relro,-z,now \ + -Wall \ + -fno-common \ + -DTERMIOS \ + -D_GNU_SOURCE \ + -DOPENSSL_PEDANTIC_ZEROIZATION \ + -DOPENSSL_NO_BUF_FREELISTS \ + $(getconf LFS_CFLAGS) + + +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' Makefile +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' Makefile + +%check -p +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) +export HARNESS_VERBOSE=yes +export HARNESS_JOBS=%{_ncpus} + + +%install -a + +# Remove static libraries +rm -f %{buildroot}%{_libdir}/*.a +# Remove the cnf.dist +rm -f %{buildroot}%{ssletcdir}/openssl.cnf.dist +rm -f %{buildroot}%{ssletcdir}/ct_log_list.cnf.dist + +# Create the compatibility symlink for older software. +ln -sf ./%{name} %{buildroot}/%{_includedir}/ssl + +# Relocate misc scripts to /usr/share, keeping /etc clean. +mkdir %{buildroot}/%{_datadir}/ssl +mv %{buildroot}/%{ssletcdir}/misc %{buildroot}/%{_datadir}/ssl/ + +# Do not install demo scripts executable under /usr/share/doc +find demos -type f -perm /111 -exec chmod 644 {} + + +%ldconfig_scriptlets + +%files +%license LICENSE.txt +%doc NEWS.md README.md +# Runtime libraries +%{_libdir}/libcrypto.so.%{sonum} +%{_libdir}/libssl.so.%{sonum} +# Command-line tool +%{_bindir}/openssl +%{_bindir}/c_rehash +# Engines and modules +%{_libdir}/engines-3/ +%{_libdir}/ossl-modules/ +%dir %{ssletcdir} +# Configuration files and directories +%attr(700,root,root) %{ssletcdir}/private +%config (noreplace) %{ssletcdir}/openssl.cnf +%config (noreplace) %{ssletcdir}/ct_log_list.cnf +# User-level man pages +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man7/* + +%files devel +# Header files +%{_includedir}/openssl/ +%{_includedir}/ssl +# Development symlinks +%{_libdir}/libcrypto.so +%{_libdir}/libssl.so +# Build system support files (pkg-config and CMake) +%{_libdir}/pkgconfig/openssl.pc +%{_libdir}/pkgconfig/libcrypto.pc +%{_libdir}/pkgconfig/libssl.pc +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/OpenSSL +%{_libdir}/cmake/OpenSSL/*.cmake +# API documentation (man3) +%{_mandir}/man3/* +%dir %{_datadir}/ssl +%{_datadir}/ssl/misc + +%files doc +%{_datadir}/doc/openssl/html/ + +%changelog +%{?autochangelog} diff --git a/SPECS/openvswitch/openvswitch.spec b/SPECS/openvswitch/openvswitch.spec new file mode 100644 index 00000000..7fb590bb --- /dev/null +++ b/SPECS/openvswitch/openvswitch.spec @@ -0,0 +1,112 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: sunyuechi +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: openvswitch +Version: 3.5.1 +Release: %autorelease +Summary: Production Quality, Multilayer Open Virtual Switch +License: Apache-2.0 +URL: https://www.openvswitch.org/ + +#!RemoteAsset +Source0: https://www.openvswitch.org/releases/%{name}-%{version}.tar.gz +Source1: openvswitch.sysusers +Source2: ovsdb-server.service +Source3: ovs-vswitchd.service + +BuildSystem: autotools + +BuildOption(conf): --prefix=%{_prefix} +BuildOption(conf): --sysconfdir=%{_sysconfdir} +BuildOption(conf): --localstatedir=%{_localstatedir} +BuildOption(conf): --with-rundir=/run/openvswitch +BuildOption(conf): --sbindir=%{_sbindir} +BuildOption(conf): PYTHON=%{__python3} + +BuildRequires: gcc +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: openssl-devel +BuildRequires: libcap-ng-devel +BuildRequires: python3-devel +BuildRequires: systemd-rpm-macros + +%{?systemd_requires} + +%description +Open vSwitch provides standard network bridging functions and +support for the OpenFlow protocol for remote per-flow control of +traffic. + +%prep -a + +# Fix bash completion path +sed -i \ + -e 's|$(sysconfdir)/bash_completion.d|/usr/share/bash-completion/completions|g' \ + -e '/if grep warning:/d' \ + Makefile.am + +%conf -p +./boot.sh +export CFLAGS="%{optflags} -ffat-lto-objects" + +%install -a + +# Install systemd units +install -Dm644 %{SOURCE1} %{buildroot}%{_sysusersdir}/openvswitch.conf +install -Dm644 %{SOURCE2} %{buildroot}%{_unitdir}/ovsdb-server.service +install -Dm644 %{SOURCE3} %{buildroot}%{_unitdir}/ovs-vswitchd.service + +# Create config directory +install -dm755 %{buildroot}%{_sysconfdir}/openvswitch + +# Remove runtime directory from package +rm -rf %{buildroot}/run + +# TODO: make tests pass. +%check + +%post +# Initialize the database if it doesn't exist +if [ ! -f %{_sysconfdir}/openvswitch/conf.db ]; then + echo "Initializing Open vSwitch database..." + %{_bindir}/ovsdb-tool create \ + %{_sysconfdir}/openvswitch/conf.db \ + %{_datadir}/openvswitch/vswitch.ovsschema + chown openvswitch:openvswitch %{_sysconfdir}/openvswitch/conf.db + chmod 0640 %{_sysconfdir}/openvswitch/conf.db +fi + +%systemd_post ovsdb-server.service ovs-vswitchd.service + +%preun +%systemd_preun ovsdb-server.service ovs-vswitchd.service + +%postun +%systemd_postun_with_restart ovsdb-server.service ovs-vswitchd.service + +%files +%license LICENSE NOTICE +%doc README.rst NEWS +%dir %{_sysconfdir}/openvswitch +%ghost %config(noreplace) %attr(0640,openvswitch,openvswitch) %{_sysconfdir}/openvswitch/conf.db +%{_bindir}/* +%{_sbindir}/* +%{_libdir}/*.a +%{_libdir}/pkgconfig/*.pc +%{_includedir}/openvswitch/ +%{_includedir}/openflow/ +%{_datadir}/openvswitch/ +%{_datadir}/bash-completion/completions/*.bash +%{_mandir}/man?/* +%{_unitdir}/*.service +%{_sysusersdir}/openvswitch.conf + +%changelog +%{?autochangelog} diff --git a/SPECS/openvswitch/openvswitch.sysusers b/SPECS/openvswitch/openvswitch.sysusers new file mode 100644 index 00000000..320a86f4 --- /dev/null +++ b/SPECS/openvswitch/openvswitch.sysusers @@ -0,0 +1,4 @@ +#Type Name ID GECOS Home directory Shell +u openvswitch - "Open vSwitch Daemons" / /sbin/nologin +g hugetlbfs - +m openvswitch hugetlbfs diff --git a/SPECS/openvswitch/ovs-vswitchd.service b/SPECS/openvswitch/ovs-vswitchd.service new file mode 100644 index 00000000..58791b5d --- /dev/null +++ b/SPECS/openvswitch/ovs-vswitchd.service @@ -0,0 +1,15 @@ +[Unit] +Description = Open vSwitch Daemon +Documentation = man:ovs-vswitchd +Wants = network.target +Before = network.target NetworkManager.service +Requires = ovsdb-server.service +After = ovsdb-server.service + +[Service] +ExecStartPre = /sbin/modprobe openvswitch +PIDFile = /run/openvswitch/ovs-vswitchd.pid +ExecStart = /usr/sbin/ovs-vswitchd --pidfile=/run/openvswitch/ovs-vswitchd.pid + +[Install] +WantedBy = multi-user.target diff --git a/SPECS/openvswitch/ovsdb-server.service b/SPECS/openvswitch/ovsdb-server.service new file mode 100644 index 00000000..6bcb76bb --- /dev/null +++ b/SPECS/openvswitch/ovsdb-server.service @@ -0,0 +1,7 @@ +[Unit] +Description = Open vSwitch Database Server +Documentation = man:ovsdb-server + +[Service] +PIDFile=/run/openvswitch/ovsdb-server.pid +ExecStart=/usr/sbin/ovsdb-server --remote=punix:/var/run/openvswitch/db.sock --pidfile=/run/openvswitch/ovsdb-server.pid diff --git a/SPECS/os-prober/os-prober.spec b/SPECS/os-prober/os-prober.spec new file mode 100644 index 00000000..8a0ba8c1 --- /dev/null +++ b/SPECS/os-prober/os-prober.spec @@ -0,0 +1,78 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: os-prober +Version: 1.83 +Release: %autorelease +Summary: Probes disks on the system for installed operating systems +License: GPL-2.0-or-later +URL: https://joeyh.name/code/os-prober/ +VCS: git:https://salsa.debian.org/installer-team/os-prober +#!RemoteAsset +Source0: https://salsa.debian.org/installer-team/os-prober/-/archive/%{version}/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(build): LDFLAGS="$LDFLAGS -fPIC" +BuildOption(build): CFLAGS="$CFLAGS" +BuildOption(build): CPPFLAGS="$CPPFLAGS" + +BuildRequires: make + +Requires: udev +Requires: coreutils +Requires: util-linux +Requires: grep +Requires: /bin/sed +Requires: /sbin/modprobe + +%description +This package detects other OSes available on a system and outputs the results +in a generic machine-readable format. Support for new OSes and Linux +distributions can be added easily. + +%prep -a +find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \; +# Change path of grub-mount and grub-probe to grub2-mount and grub2-probe +sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \ + linux-boot-probes/common/50mounted-tests +sed -i -e 's|grub-mount|grub2-mount|g' os-probes/common/50mounted-tests \ + linux-boot-probes/common/50mounted-tests common.sh + +%conf +# No configure + +%install +install -m 0755 -d %{buildroot}%{_bindir} +install -m 0755 -d %{buildroot}%{_localstatedir}/lib/%{name} + +install -m 0755 -p os-prober linux-boot-prober %{buildroot}%{_bindir} +install -m 0755 -Dp newns %{buildroot}%{_libexecdir}/os-prober/newns +install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh + +for probes in os-probes os-probes/mounted os-probes/init \ + linux-boot-probes linux-boot-probes/mounted; do + install -m 755 -d %{buildroot}%{_libexecdir}/$probes + cp -a $probes/common/* %{buildroot}%{_libexecdir}/$probes + if [ -e "$probes/$ARCH" ]; then + cp -a $probes/$ARCH/* %{buildroot}%{_libexecdir}/$probes + fi +done + +# no tests. +%check + + +%files +%doc README TODO debian/changelog +%license debian/copyright +%{_bindir}/* +%{_libexecdir}/* +%{_datadir}/%{name} +%{_localstatedir}/lib/%{name} + +%changelog +%{?autochangelog} diff --git a/SPECS/p11-kit/p11-kit.spec b/SPECS/p11-kit/p11-kit.spec new file mode 100644 index 00000000..83520f4f --- /dev/null +++ b/SPECS/p11-kit/p11-kit.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: p11-kit +Version: 0.25.5 +Release: %autorelease +Summary: Library and tools for working with PKCS#11 modules +License: BSD-3-Clause +URL: https://p11-glue.freedesktop.org/p11-kit.html +#!RemoteAsset +Source: https://github.com/p11-glue/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz +BuildSystem: meson + +BuildOption: -Dtrust_paths=%{_sysconfdir}/pki/trust:%{_datadir}/pki/trust +BuildOption: -Dbash_completion=disabled +BuildOption: -Dgtk_doc=false +BuildOption: -Dman=false + +BuildRequires: meson +BuildRequires: python3 +BuildRequires: cmake +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libffi) >= 3.0.0 +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(systemd) +BuildRequires: libtasn1-devel + +%description +p11-kit provides a way to load and enumerate PKCS#11 modules, as well +as a standard configuration setup for installing PKCS#11 modules in +such a way that they're discoverable. This package contains the runtime +libraries, tools, and server components. + +%package devel +Summary: Development files for the p11-kit library +Requires: %{name} = %{version} + +%description devel +This package contains the header files and pkg-config files needed to +develop applications that use p11-kit. + + +%install -a +install -d -m 755 %{buildroot}%{_sysconfdir}/pkcs11/modules +find %{buildroot} -type f -name "*.la" -delete -print +rm -rf %{buildroot}%{_datadir}/locale +rm -f %{buildroot}%{_sysconfdir}/pkcs11/pkcs11.conf.example + +%ldconfig_scriptlets + +%files +%license COPYING +%dir %{_sysconfdir}/pkcs11 +%dir %{_sysconfdir}/pkcs11/modules +%dir %{_libdir}/pkcs11 +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/modules +%{_datadir}/%{name}/modules/p11-kit-trust.module +%{_libdir}/pkcs11/p11-kit-trust.so +%dir %{_libexecdir}/%{name} +%{_libexecdir}/%{name}/* +%{_libdir}/libp11-kit.so.* +%{_libdir}/p11-kit-proxy.so +%{_bindir}/p11-kit +%{_bindir}/trust +%{_libdir}/pkcs11/p11-kit-client.so +%{_userunitdir}/p11-kit-server.service +%{_userunitdir}/p11-kit-server.socket + +%files devel +%{_includedir}/p11-kit-1/ +%{_libdir}/libp11-kit.so +%{_libdir}/pkgconfig/p11-kit-1.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/p7zip/p7zip.spec b/SPECS/p7zip/p7zip.spec new file mode 100644 index 00000000..94ad28ef --- /dev/null +++ b/SPECS/p7zip/p7zip.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: p7zip +Version: 17.05 +Release: %autorelease +Summary: 7z file archiver for Linux systems +License: LGPL-2.1-or-later and (LGPL-2.1-or-later or CPL-1.0) +URL: https://github.com/p7zip-project/p7zip/ +#!RemoteAsset +Source0: https://github.com/p7zip-project/p7zip/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): OPTFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" +BuildOption(install): DEST_DIR="%{buildroot}" +BuildOption(install): DEST_HOME=/usr +BuildOption(install): DEST_SHARE=%{_libdir}/p7zip +BuildOption(install): DEST_MAN="%{_mandir}" +BuildRequires: gcc-c++ + +%description +7za is a file archiver with a high compression ratio for Linux systems. + +# No configure +%conf + +%files +%license DOC/License.txt +%doc README +%doc %{_docdir}/%{name}/ +%{_bindir}/* +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/pam/0001-post-v1.7.1.patch b/SPECS/pam/0001-post-v1.7.1.patch new file mode 100644 index 00000000..25854b03 --- /dev/null +++ b/SPECS/pam/0001-post-v1.7.1.patch @@ -0,0 +1,1273 @@ +diff --git a/doc/specs/draft-morgan-pam.raw b/doc/specs/draft-morgan-pam.raw +index 8fdb0502..253d7e2c 100644 +--- a/doc/specs/draft-morgan-pam.raw ++++ b/doc/specs/draft-morgan-pam.raw +@@ -442,7 +442,7 @@ available agents on the system is implementation specific. + pamc_start() function returns NULL on failure. Otherwise, the return + value is a pointer to an opaque data type which provides a handle to + the libpamc library. On systems where threading is available, the +-libpamc libraray is thread safe provided a single (pamc_handler_t *) ++libpamc library is thread safe provided a single (pamc_handler_t *) + is used by each thread. + + #$$$$ Client (Applicant) selection of agents +diff --git a/examples/check_user.c b/examples/check_user.c +index 89cc137b..bb100bc5 100644 +--- a/examples/check_user.c ++++ b/examples/check_user.c +@@ -6,8 +6,8 @@ + + You need to add the following (or equivalent) to the /etc/pam.conf file. + # check authorization +- check auth required pam_unix_auth.so +- check account required pam_unix_acct.so ++ check auth required pam_unix.so ++ check account required pam_unix.so + */ + + #include +diff --git a/examples/tty_conv.c b/examples/tty_conv.c +index 59bbb3b3..2219a51e 100644 +--- a/examples/tty_conv.c ++++ b/examples/tty_conv.c +@@ -18,26 +18,26 @@ + static void echoOff(int fd, int off) + { + struct termios tty; +- if (ioctl(fd, TCGETA, &tty) < 0) ++ if (tcgetattr(fd, &tty) < 0) + { +- fprintf(stderr, "TCGETA failed: %s\n", strerror(errno)); ++ fprintf(stderr, "tcgetattr failed: %s\n", strerror(errno)); + return; + } + + if (off) + { + tty.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); +- if (ioctl(fd, TCSETAF, &tty) < 0) ++ if (tcsetattr(fd, TCSAFLUSH, &tty) < 0) + { +- fprintf(stderr, "TCSETAF failed: %s\n", strerror(errno)); ++ fprintf(stderr, "tcsetattr(TCSAFLUSH) failed: %s\n", strerror(errno)); + } + } + else + { + tty.c_lflag |= (ECHO | ECHOE | ECHOK | ECHONL); +- if (ioctl(fd, TCSETAW, &tty) < 0) ++ if (tcsetattr(fd, TCSADRAIN, &tty) < 0) + { +- fprintf(stderr, "TCSETAW failed: %s\n", strerror(errno)); ++ fprintf(stderr, "tcsetattr(TCSADRAIN) failed: %s\n", strerror(errno)); + } + } + } +diff --git a/libpam/pam_modutil_cleanup.c b/libpam/pam_modutil_cleanup.c +index 2077cbd7..46233736 100644 +--- a/libpam/pam_modutil_cleanup.c ++++ b/libpam/pam_modutil_cleanup.c +@@ -5,8 +5,12 @@ + */ + + #include "pam_modutil_private.h" ++#include "pam_inline.h" + ++#include ++#include + #include ++#include + + void + pam_modutil_cleanup (pam_handle_t *pamh UNUSED, void *data, +@@ -15,3 +19,39 @@ pam_modutil_cleanup (pam_handle_t *pamh UNUSED, void *data, + /* junk it */ + free(data); + } ++ ++void ++pam_modutil_cleanup_group (pam_handle_t *pamh UNUSED, void *data, ++ int error_status UNUSED) ++{ ++ struct group *gr = data; ++ ++ if (gr && gr->gr_passwd) ++ pam_overwrite_string(gr->gr_passwd); ++ ++ free(data); ++} ++ ++void ++pam_modutil_cleanup_passwd (pam_handle_t *pamh UNUSED, void *data, ++ int error_status UNUSED) ++{ ++ struct passwd *pw = data; ++ ++ if (pw && pw->pw_passwd) ++ pam_overwrite_string(pw->pw_passwd); ++ ++ free(data); ++} ++ ++void ++pam_modutil_cleanup_shadow (pam_handle_t *pamh UNUSED, void *data, ++ int error_status UNUSED) ++{ ++ struct spwd *sp = data; ++ ++ if (sp && sp->sp_pwdp) ++ pam_overwrite_string(sp->sp_pwdp); ++ ++ free(data); ++} +diff --git a/libpam/pam_modutil_getgrgid.c b/libpam/pam_modutil_getgrgid.c +index 6c2bb31b..fa3436c5 100644 +--- a/libpam/pam_modutil_getgrgid.c ++++ b/libpam/pam_modutil_getgrgid.c +@@ -62,7 +62,7 @@ pam_modutil_getgrgid(pam_handle_t *pamh, gid_t gid) + status = PAM_NO_MODULE_DATA; + if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) { + status = pam_set_data(pamh, data_name, +- result, pam_modutil_cleanup); ++ result, pam_modutil_cleanup_group); + } + free(data_name); + if (status == PAM_SUCCESS) { +diff --git a/libpam/pam_modutil_getgrnam.c b/libpam/pam_modutil_getgrnam.c +index 418b9e47..533a8ce6 100644 +--- a/libpam/pam_modutil_getgrnam.c ++++ b/libpam/pam_modutil_getgrnam.c +@@ -62,7 +62,7 @@ pam_modutil_getgrnam(pam_handle_t *pamh, const char *group) + status = PAM_NO_MODULE_DATA; + if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) { + status = pam_set_data(pamh, data_name, +- result, pam_modutil_cleanup); ++ result, pam_modutil_cleanup_group); + } + free(data_name); + if (status == PAM_SUCCESS) { +diff --git a/libpam/pam_modutil_getpwnam.c b/libpam/pam_modutil_getpwnam.c +index 5701ba9c..de654aeb 100644 +--- a/libpam/pam_modutil_getpwnam.c ++++ b/libpam/pam_modutil_getpwnam.c +@@ -62,7 +62,7 @@ pam_modutil_getpwnam(pam_handle_t *pamh, const char *user) + status = PAM_NO_MODULE_DATA; + if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) { + status = pam_set_data(pamh, data_name, +- result, pam_modutil_cleanup); ++ result, pam_modutil_cleanup_passwd); + } + free(data_name); + if (status == PAM_SUCCESS) { +diff --git a/libpam/pam_modutil_getpwuid.c b/libpam/pam_modutil_getpwuid.c +index d3bb7231..6534958c 100644 +--- a/libpam/pam_modutil_getpwuid.c ++++ b/libpam/pam_modutil_getpwuid.c +@@ -62,7 +62,7 @@ pam_modutil_getpwuid(pam_handle_t *pamh, uid_t uid) + status = PAM_NO_MODULE_DATA; + if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) { + status = pam_set_data(pamh, data_name, +- result, pam_modutil_cleanup); ++ result, pam_modutil_cleanup_passwd); + } + free(data_name); + if (status == PAM_SUCCESS) { +diff --git a/libpam/pam_modutil_getspnam.c b/libpam/pam_modutil_getspnam.c +index 9aa6ac9a..9733eda0 100644 +--- a/libpam/pam_modutil_getspnam.c ++++ b/libpam/pam_modutil_getspnam.c +@@ -62,7 +62,7 @@ pam_modutil_getspnam(pam_handle_t *pamh, const char *user) + status = PAM_NO_MODULE_DATA; + if (pam_get_data(pamh, data_name, &ignore) != PAM_SUCCESS) { + status = pam_set_data(pamh, data_name, +- result, pam_modutil_cleanup); ++ result, pam_modutil_cleanup_shadow); + } + free(data_name); + if (status == PAM_SUCCESS) { +diff --git a/libpam/pam_modutil_private.h b/libpam/pam_modutil_private.h +index 98a30f68..611c7696 100644 +--- a/libpam/pam_modutil_private.h ++++ b/libpam/pam_modutil_private.h +@@ -20,5 +20,14 @@ + extern void + pam_modutil_cleanup(pam_handle_t *pamh, void *data, + int error_status); ++extern void ++pam_modutil_cleanup_group(pam_handle_t *pamh, void *data, ++ int error_status); ++extern void ++pam_modutil_cleanup_passwd(pam_handle_t *pamh, void *data, ++ int error_status); ++extern void ++pam_modutil_cleanup_shadow(pam_handle_t *pamh, void *data, ++ int error_status); + + #endif /* PAMMODUTIL_PRIVATE_H */ +diff --git a/meson.build b/meson.build +index 0827a53e..af83cd51 100644 +--- a/meson.build ++++ b/meson.build +@@ -53,6 +53,7 @@ cdata.set10('DEFAULT_USERGROUPS_SETTING', get_option('usergroups')) + cdata.set('PAM_USERTYPE_UIDMIN', get_option('uidmin')) + cdata.set('PAM_USERTYPE_OVERFLOW_UID', get_option('kernel-overflow-uid')) + cdata.set('PAM_MISC_CONV_BUFSIZE', get_option('misc-conv-bufsize')) ++cdata.set('PAM_UNIX_TRY_GETSPNAM', get_option('pam_unix-try-getspnam') ? 1 : false) + + cdata.set_quoted('_PAM_ISA', + get_option('isadir') != '' ? get_option('isadir') : '../..' / fs.name(libdir) / 'security') +@@ -150,6 +151,7 @@ add_project_link_arguments( + # --as-needed and --no-undefined are enabled by default + cc.get_supported_link_arguments([ + '-Wl,--fatal-warnings', ++ '-Wl,--no-undefined-version', + '-Wl,-O1', + ]), + language: 'c') +@@ -263,6 +265,10 @@ foreach f: ['crypt_r'] + endif + endforeach + ++libpwaccess = dependency('libpwaccess', required: get_option('pwaccess')) ++if libpwaccess.found() ++ cdata.set('USE_PWACCESS', 1) ++endif + + libeconf = dependency('libeconf', version: '>= 0.5.0', required: get_option('econf')) + if libeconf.found() +diff --git a/meson_options.txt b/meson_options.txt +index a172ceea..35d979b5 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -14,6 +14,8 @@ option('elogind', type: 'feature', value: 'auto', + description: 'logind support in pam_issue, pam_limits, and pam_timestamp via elogind') + option('openssl', type: 'feature', value: 'disabled', + description: 'Use OpenSSL crypto libraries in pam_timestamp') ++option('pwaccess', type: 'feature', value: 'auto', ++ description: 'libpwaccess support in pam_unix') + option('selinux', type: 'feature', value: 'auto', + description: 'SELinux support') + option('nis', type: 'feature', value: 'auto', +@@ -85,7 +87,7 @@ option('xauth', type: 'string', + description: 'Additional path to check for xauth when it is called from pam_xauth') + option('randomdev', type: 'string', + description: 'Random device to use instead of /dev/urandom') +-option('vendordir', type: 'string', ++option('vendordir', type: 'string', value: '/usr/share/pam', + description: 'Distribution provided configuration files directory') + + option('pam_userdb', type: 'feature', value: 'auto', +@@ -99,3 +101,5 @@ option('pam_lastlog', type: 'feature', value: 'disabled', + description: 'pam_lastlog module') + option('pam_unix', type: 'feature', value: 'auto', + description: 'pam_unix module') ++option('pam_unix-try-getspnam', type: 'boolean', value: false, ++ description: 'Let pam_unix try getspnam to obtain shadow password file entry before falling back to invoking the helper') +diff --git a/modules/maps/modules-account-session.map b/modules/maps/modules-account-session.map +new file mode 100644 +index 00000000..da87def8 +--- /dev/null ++++ b/modules/maps/modules-account-session.map +@@ -0,0 +1,7 @@ ++{ ++ global: ++ pam_sm_acct_mgmt; ++ pam_sm_close_session; ++ pam_sm_open_session; ++ local: *; ++}; +diff --git a/modules/maps/modules-account.map b/modules/maps/modules-account.map +new file mode 100644 +index 00000000..2b35aeb7 +--- /dev/null ++++ b/modules/maps/modules-account.map +@@ -0,0 +1,5 @@ ++{ ++ global: ++ pam_sm_acct_mgmt; ++ local: *; ++}; +diff --git a/modules/modules.map b/modules/maps/modules-auth-account-password-session.map +similarity index 100% +rename from modules/modules.map +rename to modules/maps/modules-auth-account-password-session.map +diff --git a/modules/maps/modules-auth-account-password.map b/modules/maps/modules-auth-account-password.map +new file mode 100644 +index 00000000..1f9e00b1 +--- /dev/null ++++ b/modules/maps/modules-auth-account-password.map +@@ -0,0 +1,8 @@ ++{ ++ global: ++ pam_sm_acct_mgmt; ++ pam_sm_authenticate; ++ pam_sm_chauthtok; ++ pam_sm_setcred; ++ local: *; ++}; +diff --git a/modules/maps/modules-auth-account-session.map b/modules/maps/modules-auth-account-session.map +new file mode 100644 +index 00000000..dcc94d87 +--- /dev/null ++++ b/modules/maps/modules-auth-account-session.map +@@ -0,0 +1,9 @@ ++{ ++ global: ++ pam_sm_acct_mgmt; ++ pam_sm_authenticate; ++ pam_sm_close_session; ++ pam_sm_open_session; ++ pam_sm_setcred; ++ local: *; ++}; +diff --git a/modules/maps/modules-auth-account.map b/modules/maps/modules-auth-account.map +new file mode 100644 +index 00000000..71928f8b +--- /dev/null ++++ b/modules/maps/modules-auth-account.map +@@ -0,0 +1,7 @@ ++{ ++ global: ++ pam_sm_acct_mgmt; ++ pam_sm_authenticate; ++ pam_sm_setcred; ++ local: *; ++}; +diff --git a/modules/maps/modules-auth-session.map b/modules/maps/modules-auth-session.map +new file mode 100644 +index 00000000..40ec74d6 +--- /dev/null ++++ b/modules/maps/modules-auth-session.map +@@ -0,0 +1,8 @@ ++{ ++ global: ++ pam_sm_authenticate; ++ pam_sm_close_session; ++ pam_sm_open_session; ++ pam_sm_setcred; ++ local: *; ++}; +diff --git a/modules/maps/modules-auth.map b/modules/maps/modules-auth.map +new file mode 100644 +index 00000000..eb970e07 +--- /dev/null ++++ b/modules/maps/modules-auth.map +@@ -0,0 +1,6 @@ ++{ ++ global: ++ pam_sm_authenticate; ++ pam_sm_setcred; ++ local: *; ++}; +diff --git a/modules/maps/modules-password.map b/modules/maps/modules-password.map +new file mode 100644 +index 00000000..b2538d45 +--- /dev/null ++++ b/modules/maps/modules-password.map +@@ -0,0 +1,5 @@ ++{ ++ global: ++ pam_sm_chauthtok; ++ local: *; ++}; +diff --git a/modules/maps/modules-session.map b/modules/maps/modules-session.map +new file mode 100644 +index 00000000..b413987f +--- /dev/null ++++ b/modules/maps/modules-session.map +@@ -0,0 +1,6 @@ ++{ ++ global: ++ pam_sm_close_session; ++ pam_sm_open_session; ++ local: *; ++}; +diff --git a/modules/meson.build b/modules/meson.build +index 20cebdbb..68a7a63c 100644 +--- a/modules/meson.build ++++ b/modules/meson.build +@@ -1,9 +1,3 @@ +-pam_module_map = 'modules.map' +-pam_module_map_path = meson.current_source_dir() / pam_module_map +- +-pam_module_link_deps = ['..' / pam_module_map] +-pam_module_link_args = ['-Wl,--version-script=' + pam_module_map_path] +- + subdir('pam_access') + subdir('pam_canonicalize_user') + subdir('pam_debug') +diff --git a/modules/module-meson.build b/modules/module-meson.build +index dce38b90..7920dc8b 100644 +--- a/modules/module-meson.build ++++ b/modules/module-meson.build +@@ -128,6 +128,12 @@ if module == 'pam_xauth' + pam_module_deps += [libselinux] + endif + ++pam_module_map = 'module.map' ++pam_module_map_path = meson.current_source_dir() / pam_module_map ++ ++pam_module_link_deps = [pam_module_map] ++pam_module_link_args = ['-Wl,--version-script=' + pam_module_map_path] ++ + pam_module = shared_module( + module, + name_prefix: '', +@@ -425,7 +431,7 @@ if module == 'pam_unix' + ], + c_args: ['-DHELPER_COMPILE="unix_chkpwd"'], + link_args: exe_link_args, +- dependencies: [libpam_internal_dep, libpam_dep, libcrypt, libselinux, libaudit], ++ dependencies: [libpam_internal_dep, libpam_dep, libcrypt, libselinux, libaudit, libpwaccess], + install: true, + install_dir: sbindir, + ) +@@ -441,7 +447,7 @@ if module == 'pam_unix' + ], + c_args: ['-DHELPER_COMPILE="unix_update"'], + link_args: exe_link_args, +- dependencies: [libpam_internal_dep, libpam_dep, libcrypt, libselinux, libaudit], ++ dependencies: [libpam_internal_dep, libpam_dep, libcrypt, libselinux, libaudit, libpwaccess], + install: true, + install_dir: sbindir, + ) +diff --git a/modules/pam_access/module.map b/modules/pam_access/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_access/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_canonicalize_user/module.map b/modules/pam_canonicalize_user/module.map +new file mode 120000 +index 00000000..190be9a2 +--- /dev/null ++++ b/modules/pam_canonicalize_user/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth.map +\ No newline at end of file +diff --git a/modules/pam_debug/module.map b/modules/pam_debug/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_debug/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_deny/module.map b/modules/pam_deny/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_deny/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_echo/module.map b/modules/pam_echo/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_echo/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_env/module.map b/modules/pam_env/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_env/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_env/pam_env.8.xml b/modules/pam_env/pam_env.8.xml +index c7889e0f..2bf7d7b2 100644 +--- a/modules/pam_env/pam_env.8.xml ++++ b/modules/pam_env/pam_env.8.xml +@@ -80,8 +80,8 @@ + pairs on separate lines. The path to this file can be specified with the + envfile option. + If this file has not been defined, the settings are read from the +- files /etc/security/environment and +- /etc/security/environment.d/*. ++ files /etc/environment and ++ /etc/environment.d/*. + If the file /etc/environment does not exist, the + settings are read from the files %vendordir%/environment, + %vendordir%/environment.d/* and +diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c +index 496c8943..3158768e 100644 +--- a/modules/pam_env/pam_env.c ++++ b/modules/pam_env/pam_env.c +@@ -627,10 +627,15 @@ _expand_arg(pam_handle_t *pamh, char **value) + if ('\\' == *orig) { + ++orig; + if ('$' != *orig && '@' != *orig && '\\' != *orig) { +- D(("Unrecognized escaped character: <%c> - ignoring", *orig)); +- pam_syslog(pamh, LOG_ERR, +- "Unrecognized escaped character: <%c> - ignoring", +- *orig); ++ if (*orig) { ++ D(("Unrecognized escaped character: <%c> - ignoring", *orig)); ++ pam_syslog(pamh, LOG_ERR, ++ "Unrecognized escaped character: <%c> - ignoring", ++ *orig); ++ } else { ++ D(("Ignoring backslash at end of string")); ++ pam_syslog(pamh, LOG_ERR, "Ignoring backslash at end of string"); ++ } + } else { + /* Note the increment */ + if (_strbuf_add_char(&buf, *orig++)) { +diff --git a/modules/pam_exec/module.map b/modules/pam_exec/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_exec/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_faildelay/module.map b/modules/pam_faildelay/module.map +new file mode 120000 +index 00000000..190be9a2 +--- /dev/null ++++ b/modules/pam_faildelay/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth.map +\ No newline at end of file +diff --git a/modules/pam_faillock/faillock.conf b/modules/pam_faillock/faillock.conf +index 16d93df7..3e119013 100644 +--- a/modules/pam_faillock/faillock.conf ++++ b/modules/pam_faillock/faillock.conf +@@ -33,7 +33,7 @@ + # + # The length of the interval during which the consecutive + # authentication failures must happen for the user account +-# lock out is n seconds. ++# lock out is n seconds. + # The default is 900 (15 minutes). + # fail_interval = 900 + # +@@ -56,7 +56,7 @@ + # + # If a group name is specified with this option, members + # of the group will be handled by this module the same as +-# the root account (the options `even_deny_root>` and +-# `root_unlock_time` will apply to them. ++# the root account (the options `even_deny_root` and ++# `root_unlock_time` will apply to them). + # By default, the option is not set. + # admin_group = +diff --git a/modules/pam_faillock/module.map b/modules/pam_faillock/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_faillock/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_faillock/pam_faillock.8.xml b/modules/pam_faillock/pam_faillock.8.xml +index ce0ae050..42f87e81 100644 +--- a/modules/pam_faillock/pam_faillock.8.xml ++++ b/modules/pam_faillock/pam_faillock.8.xml +@@ -243,6 +243,14 @@ + user accounts allowing the adversary to infer that a particular account + is not existing on a system. + ++ ++ If the stack has not been run prior to the ++ stack, the logic to reset the failed login counter is intentionally skipped. This prevents ++ automated services, such as crond or systemd-user, ++ which might only perform account management tasks, from inadvertently clearing a user's ++ failed attempt records. This ensures the faillock counter is only reset by a service that ++ performs a full, successful authentication. ++ + + + +diff --git a/modules/pam_faillock/pam_faillock.c b/modules/pam_faillock/pam_faillock.c +index 2d847aeb..a8363b6c 100644 +--- a/modules/pam_faillock/pam_faillock.c ++++ b/modules/pam_faillock/pam_faillock.c +@@ -62,6 +62,8 @@ + #define FAILLOCK_ACTION_AUTHSUCC 1 + #define FAILLOCK_ACTION_AUTHFAIL 2 + ++#define FAILLOCK_AUTH_EXECUTED "pam_faillock:auth_executed" ++ + static int + args_parse(pam_handle_t *pamh, int argc, const char **argv, + int flags, struct options *opts) +@@ -478,6 +480,10 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, + goto err; + } + ++ rv = pam_set_data(pamh, FAILLOCK_AUTH_EXECUTED, (void *)1, NULL); ++ if (rv != PAM_SUCCESS) ++ goto err; ++ + if (!(opts.flags & FAILLOCK_FLAG_LOCAL_ONLY) || + check_local_user (pamh, opts.user) != 0) { + switch (opts.action) { +@@ -531,6 +537,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, + struct options opts; + int rv, fd = -1; + struct tally_data tallies; ++ const void *auth_flag; + + memset(&tallies, 0, sizeof(tallies)); + +@@ -541,6 +548,12 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, + + opts.action = FAILLOCK_ACTION_AUTHSUCC; + ++ rv = pam_get_data(pamh, FAILLOCK_AUTH_EXECUTED, &auth_flag); ++ if (rv == PAM_NO_MODULE_DATA) { ++ rv = PAM_SUCCESS; ++ goto err; ++ } ++ + if ((rv=get_pam_user(pamh, &opts)) != PAM_SUCCESS) { + goto err; + } +diff --git a/modules/pam_filter/module.map b/modules/pam_filter/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_filter/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_ftp/module.map b/modules/pam_ftp/module.map +new file mode 120000 +index 00000000..190be9a2 +--- /dev/null ++++ b/modules/pam_ftp/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth.map +\ No newline at end of file +diff --git a/modules/pam_group/module.map b/modules/pam_group/module.map +new file mode 120000 +index 00000000..190be9a2 +--- /dev/null ++++ b/modules/pam_group/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth.map +\ No newline at end of file +diff --git a/modules/pam_issue/module.map b/modules/pam_issue/module.map +new file mode 120000 +index 00000000..190be9a2 +--- /dev/null ++++ b/modules/pam_issue/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth.map +\ No newline at end of file +diff --git a/modules/pam_keyinit/module.map b/modules/pam_keyinit/module.map +new file mode 120000 +index 00000000..96519a4f +--- /dev/null ++++ b/modules/pam_keyinit/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-session.map +\ No newline at end of file +diff --git a/modules/pam_lastlog/module.map b/modules/pam_lastlog/module.map +new file mode 120000 +index 00000000..fa8c55e7 +--- /dev/null ++++ b/modules/pam_lastlog/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-session.map +\ No newline at end of file +diff --git a/modules/pam_lastlog/pam_lastlog.c b/modules/pam_lastlog/pam_lastlog.c +index 01545a69..c68b5fb0 100644 +--- a/modules/pam_lastlog/pam_lastlog.c ++++ b/modules/pam_lastlog/pam_lastlog.c +@@ -569,7 +569,8 @@ last_login_failed(pam_handle_t *pamh, int announce, const char *user, time_t llt + + while ((retval=pam_modutil_read(fd, (void *)&ut, + sizeof(ut))) == sizeof(ut)) { +- if (ut.ut_tv.tv_sec >= lltime && strncmp(ut.ut_user, user, UT_NAMESIZE) == 0) { ++ if (zero_extend_signed_to_ull(ut.ut_tv.tv_sec) >= zero_extend_signed_to_ull(lltime) ++ && strncmp(ut.ut_user, user, UT_NAMESIZE) == 0) { + memcpy(&utuser, &ut, sizeof(utuser)); + failed++; + } +diff --git a/modules/pam_limits/module.map b/modules/pam_limits/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_limits/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_listfile/module.map b/modules/pam_listfile/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_listfile/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_localuser/module.map b/modules/pam_localuser/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_localuser/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_loginuid/module.map b/modules/pam_loginuid/module.map +new file mode 120000 +index 00000000..d4486c2b +--- /dev/null ++++ b/modules/pam_loginuid/module.map +@@ -0,0 +1 @@ ++../maps/modules-account-session.map +\ No newline at end of file +diff --git a/modules/pam_mail/module.map b/modules/pam_mail/module.map +new file mode 120000 +index 00000000..96519a4f +--- /dev/null ++++ b/modules/pam_mail/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-session.map +\ No newline at end of file +diff --git a/modules/pam_mkhomedir/module.map b/modules/pam_mkhomedir/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_mkhomedir/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_motd/module.map b/modules/pam_motd/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_motd/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_namespace/module.map b/modules/pam_namespace/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_namespace/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_nologin/module.map b/modules/pam_nologin/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_nologin/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_permit/module.map b/modules/pam_permit/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_permit/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_pwhistory/module.map b/modules/pam_pwhistory/module.map +new file mode 120000 +index 00000000..7df2e1b6 +--- /dev/null ++++ b/modules/pam_pwhistory/module.map +@@ -0,0 +1 @@ ++../maps/modules-password.map +\ No newline at end of file +diff --git a/modules/pam_rhosts/module.map b/modules/pam_rhosts/module.map +new file mode 120000 +index 00000000..190be9a2 +--- /dev/null ++++ b/modules/pam_rhosts/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth.map +\ No newline at end of file +diff --git a/modules/pam_rootok/module.map b/modules/pam_rootok/module.map +new file mode 120000 +index 00000000..175e8b86 +--- /dev/null ++++ b/modules/pam_rootok/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password.map +\ No newline at end of file +diff --git a/modules/pam_securetty/module.map b/modules/pam_securetty/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_securetty/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_selinux/module.map b/modules/pam_selinux/module.map +new file mode 120000 +index 00000000..96519a4f +--- /dev/null ++++ b/modules/pam_selinux/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-session.map +\ No newline at end of file +diff --git a/modules/pam_sepermit/module.map b/modules/pam_sepermit/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_sepermit/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_setquota/module.map b/modules/pam_setquota/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_setquota/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_shells/module.map b/modules/pam_shells/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_shells/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_stress/module.map b/modules/pam_stress/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_stress/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_succeed_if/module.map b/modules/pam_succeed_if/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_succeed_if/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_time/module.map b/modules/pam_time/module.map +new file mode 120000 +index 00000000..1057580e +--- /dev/null ++++ b/modules/pam_time/module.map +@@ -0,0 +1 @@ ++../maps/modules-account.map +\ No newline at end of file +diff --git a/modules/pam_timestamp/module.map b/modules/pam_timestamp/module.map +new file mode 120000 +index 00000000..96519a4f +--- /dev/null ++++ b/modules/pam_timestamp/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-session.map +\ No newline at end of file +diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c +index 0172d1ef..030fa2b8 100644 +--- a/modules/pam_timestamp/pam_timestamp.c ++++ b/modules/pam_timestamp/pam_timestamp.c +@@ -244,7 +244,9 @@ check_login_time( + if (strncmp(ruser, ut->ut_user, sizeof(ut->ut_user)) != 0) { + continue; + } +- if (oldest_login == 0 || oldest_login > ut->ut_tv.tv_sec) { ++ if (oldest_login == 0 || ++ zero_extend_signed_to_ull(oldest_login) ++ > zero_extend_signed_to_ull(ut->ut_tv.tv_sec)) { + oldest_login = ut->ut_tv.tv_sec; + } + } +diff --git a/modules/pam_tty_audit/module.map b/modules/pam_tty_audit/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_tty_audit/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_umask/module.map b/modules/pam_umask/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_umask/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file +diff --git a/modules/pam_unix/module.map b/modules/pam_unix/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_unix/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c +index 961b7667..5afcbba9 100644 +--- a/modules/pam_unix/pam_unix_acct.c ++++ b/modules/pam_unix/pam_unix_acct.c +@@ -63,7 +63,7 @@ + #include "passverify.h" + + int _unix_run_verify_binary(pam_handle_t *pamh, unsigned long long ctrl, +- const char *user, int *daysleft) ++ const char *user, long *daysleft) + { + int retval=0, child, fds[2]; + struct sigaction newsa, oldsa; +@@ -156,7 +156,7 @@ int _unix_run_verify_binary(pam_handle_t *pamh, unsigned long long ctrl, + rc = pam_modutil_read(fds[0], buf, sizeof(buf) - 1); + if(rc > 0) { + buf[rc] = '\0'; +- if (sscanf(buf,"%d", daysleft) != 1 ) ++ if (sscanf(buf,"%ld", daysleft) != 1) + retval = PAM_AUTH_ERR; + } + else { +@@ -191,7 +191,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv) + unsigned long long ctrl; + const void *void_uname; + const char *uname; +- int retval, daysleft = -1; ++ long daysleft = -1; ++ int retval; + char buf[256]; + + D(("called.")); +@@ -263,24 +264,24 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv) + case PAM_SUCCESS: + if (daysleft >= 0) { + pam_syslog(pamh, LOG_DEBUG, +- "password for user %s will expire in %d days", ++ "password for user %s will expire in %ld days", + uname, daysleft); + #if defined HAVE_DNGETTEXT && defined ENABLE_NLS + pam_sprintf(buf, + dngettext(PACKAGE, +- "Warning: your password will expire in %d day.", +- "Warning: your password will expire in %d days.", ++ "Warning: your password will expire in %ld day.", ++ "Warning: your password will expire in %ld days.", + daysleft), + daysleft); + #else + if (daysleft == 1) + pam_sprintf(buf, +- _("Warning: your password will expire in %d day."), ++ _("Warning: your password will expire in %ld day."), + daysleft); + else + pam_sprintf(buf, + /* TRANSLATORS: only used if dngettext is not supported */ +- _("Warning: your password will expire in %d days."), ++ _("Warning: your password will expire in %ld days."), + daysleft); + #endif + _make_remark(pamh, ctrl, PAM_TEXT_INFO, buf); +diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c +index ffb61547..e713afca 100644 +--- a/modules/pam_unix/pam_unix_auth.c ++++ b/modules/pam_unix/pam_unix_auth.c +@@ -2,7 +2,6 @@ + * pam_unix authentication management + * + * Copyright Alexander O. Yuriev, 1996. All rights reserved. +- * NIS+ support by Thorsten Kukuk + * Copyright Jan Rękorajski, 1999. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c +index cdd253e3..dbc9fb76 100644 +--- a/modules/pam_unix/pam_unix_passwd.c ++++ b/modules/pam_unix/pam_unix_passwd.c +@@ -510,7 +510,7 @@ static int _unix_verify_shadow(pam_handle_t *pamh, const char *user, unsigned lo + { + struct passwd *pwent = NULL; /* Password and shadow password */ + struct spwd *spent = NULL; /* file entries for the user */ +- int daysleft; ++ long daysleft; + int retval; + + retval = get_account_info(pamh, user, &pwent, &spent); +diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c +index 85e7841e..7f758bb4 100644 +--- a/modules/pam_unix/passverify.c ++++ b/modules/pam_unix/passverify.c +@@ -23,6 +23,9 @@ + #ifdef HAVE_CRYPT_H + #include + #endif ++#ifdef USE_PWACCESS ++#include ++#endif + + #include "pam_cc_compat.h" + #include "pam_inline.h" +@@ -200,65 +203,51 @@ PAMH_ARG_DECL(int get_account_info, + *pwd = pam_modutil_getpwnam(pamh, name); /* Get password file entry... */ + *spwdent = NULL; + +- if (*pwd != NULL) { +- if (strcmp((*pwd)->pw_passwd, "*NP*") == 0) +- { /* NIS+ */ +-#ifdef HELPER_COMPILE +- uid_t save_euid, save_uid; +- +- save_euid = geteuid(); +- save_uid = getuid(); +- if (save_uid == (*pwd)->pw_uid) { +- if (setreuid(save_euid, save_uid)) +- return PAM_CRED_INSUFFICIENT; +- } else { +- if (setreuid(0, -1)) +- return PAM_CRED_INSUFFICIENT; +- if (setreuid(-1, (*pwd)->pw_uid)) { +- if (setreuid(-1, 0) +- || setreuid(0, -1) +- || setreuid(-1, (*pwd)->pw_uid)) { +- return PAM_CRED_INSUFFICIENT; +- } +- } +- } +- +- *spwdent = pam_modutil_getspnam(pamh, name); +- if (save_uid == (*pwd)->pw_uid) { +- if (setreuid(save_uid, save_euid)) +- return PAM_CRED_INSUFFICIENT; +- } else { +- if (setreuid(-1, 0) +- || setreuid(save_uid, -1) +- || setreuid(-1, save_euid)) +- return PAM_CRED_INSUFFICIENT; +- } ++ if (*pwd == NULL) { ++ return PAM_USER_UNKNOWN; ++ } + +- if (*spwdent == NULL || (*spwdent)->sp_pwdp == NULL) +- return PAM_AUTHINFO_UNAVAIL; +-#else +- /* we must run helper for NIS+ passwords */ +- return PAM_UNIX_RUN_HELPER; ++ if (is_pwd_shadowed(*pwd)) { ++#if defined(HELPER_COMPILE) || defined(PAM_UNIX_TRY_GETSPNAM) ++ /* ++ * shadow password file entry for this user, ++ * if shadowing is enabled ++ */ ++#ifdef USE_PWACCESS ++ int r; ++ bool complete = false; ++ char *error = NULL; ++ ++ r = pwaccess_get_user_record(-1, name, NULL, spwdent, &complete, &error); ++ if (r < 0) { ++ if (!PWACCESS_IS_NOT_RUNNING(r)) ++ pam_syslog(pamh, LOG_ERR, "%s", ++ error ? error : strerror(-r)); ++ free(error); ++ } ++ if (complete) ++ return PAM_SUCCESS; ++ struct_shadow_freep(spwdent); + #endif +- } else if (is_pwd_shadowed(*pwd)) { +-#ifdef HELPER_COMPILE +- /* +- * shadow password file entry for this user, +- * if shadowing is enabled +- */ +- *spwdent = getspnam(name); +- if (*spwdent == NULL || (*spwdent)->sp_pwdp == NULL) +- return PAM_AUTHINFO_UNAVAIL; +-#else +- /* +- * The helper has to be invoked to deal with +- * the shadow password file entry. +- */ +- return PAM_UNIX_RUN_HELPER; ++ *spwdent = pam_modutil_getspnam(pamh, name); ++ if (*spwdent == NULL || (*spwdent)->sp_pwdp == NULL ++# ifndef HELPER_COMPILE ++ /* synthesized entry from libnss-systemd */ ++ || (strcmp(name, "root") == 0 && ++ strcmp((*spwdent)->sp_pwdp, "!*") == 0) ++# endif ++ ) ++# ifdef HELPER_COMPILE ++ return PAM_AUTHINFO_UNAVAIL; ++# endif ++#endif /* HELPER_COMPILE || PAM_UNIX_TRY_GETSPNAM */ ++#ifndef HELPER_COMPILE ++ /* ++ * The helper has to be invoked to deal with ++ * the shadow password file entry. ++ */ ++ return PAM_UNIX_RUN_HELPER; + #endif +- } +- } else { +- return PAM_USER_UNKNOWN; + } + return PAM_SUCCESS; + } +@@ -284,23 +273,8 @@ PAMH_ARG_DECL(int get_pwd_hash, + return PAM_SUCCESS; + } + +-/* +- * invariant: 0 <= num1 +- * invariant: 0 <= num2 +- */ +-static int +-subtract(long num1, long num2) +-{ +- long value = num1 - num2; +- if (value < INT_MIN) +- return INT_MIN; +- if (value > INT_MAX) +- return INT_MAX; +- return (int)value; +-} +- + PAMH_ARG_DECL(int check_shadow_expiry, +- struct spwd *spent, int *daysleft) ++ struct spwd *spent, long *daysleft) + { + long int curdays, passed; + *daysleft = -1; +@@ -331,7 +305,7 @@ PAMH_ARG_DECL(int check_shadow_expiry, + long inact = spent->sp_max < LONG_MAX - spent->sp_inact ? + spent->sp_max + spent->sp_inact : LONG_MAX; + if (passed >= inact) { +- *daysleft = subtract(inact, passed); ++ *daysleft = inact - passed; + D(("authtok expired")); + return PAM_AUTHTOK_EXPIRED; + } +@@ -344,7 +318,7 @@ PAMH_ARG_DECL(int check_shadow_expiry, + long warn = spent->sp_warn > spent->sp_max ? -1 : + spent->sp_max - spent->sp_warn; + if (passed >= warn) { +- *daysleft = subtract(spent->sp_max, passed); ++ *daysleft = spent->sp_max - passed; + D(("warn before expiry")); + } + } +diff --git a/modules/pam_unix/passverify.h b/modules/pam_unix/passverify.h +index 1636791c..234eb8ca 100644 +--- a/modules/pam_unix/passverify.h ++++ b/modules/pam_unix/passverify.h +@@ -73,7 +73,7 @@ PAMH_ARG_DECL(int get_pwd_hash, + const char *name, struct passwd **pwd, char **hash); + + PAMH_ARG_DECL(int check_shadow_expiry, +- struct spwd *spent, int *daysleft); ++ struct spwd *spent, long *daysleft); + + PAMH_ARG_DECL(int unix_update_passwd, + const char *forwho, const char *towhat); +diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c +index b95f95e6..652e35b2 100644 +--- a/modules/pam_unix/support.c ++++ b/modules/pam_unix/support.c +@@ -648,7 +648,7 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned long long ctrl, const char *name + { + struct passwd *pwd = NULL; + char *salt = NULL; +- int daysleft; ++ long daysleft; + int retval; + int blank = 0; + int execloop; +@@ -863,7 +863,7 @@ int + _unix_verify_user(pam_handle_t *pamh, + unsigned long long ctrl, + const char *name, +- int *daysleft) ++ long *daysleft) + { + int retval; + struct spwd *spent; +diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h +index e8f629d7..759b7ba0 100644 +--- a/modules/pam_unix/support.h ++++ b/modules/pam_unix/support.h +@@ -174,9 +174,9 @@ extern int _unix_verify_password(pam_handle_t * pamh, const char *name, + const char *p, unsigned long long ctrl); + + extern int _unix_verify_user(pam_handle_t *pamh, unsigned long long ctrl, +- const char *name, int *daysleft); ++ const char *name, long *daysleft); + + extern int _unix_run_verify_binary(pam_handle_t *pamh, + unsigned long long ctrl, +- const char *user, int *daysleft); ++ const char *user, long *daysleft); + #endif /* _PAM_UNIX_SUPPORT_H */ +diff --git a/modules/pam_unix/unix_chkpwd.c b/modules/pam_unix/unix_chkpwd.c +index 820136d5..dde41a3a 100644 +--- a/modules/pam_unix/unix_chkpwd.c ++++ b/modules/pam_unix/unix_chkpwd.c +@@ -41,7 +41,7 @@ static int _check_expiry(const char *uname) + struct spwd *spent; + struct passwd *pwent; + int retval; +- int daysleft; ++ long daysleft; + + retval = get_account_info(uname, &pwent, &spent); + if (retval != PAM_SUCCESS) { +@@ -56,7 +56,7 @@ static int _check_expiry(const char *uname) + } + + retval = check_shadow_expiry(spent, &daysleft); +- printf("%d\n", daysleft); ++ printf("%ld\n", daysleft); + return retval; + } + +diff --git a/modules/pam_userdb/module.map b/modules/pam_userdb/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_userdb/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_usertype/module.map b/modules/pam_usertype/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_usertype/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_warn/module.map b/modules/pam_warn/module.map +new file mode 120000 +index 00000000..894551fb +--- /dev/null ++++ b/modules/pam_warn/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account-password-session.map +\ No newline at end of file +diff --git a/modules/pam_wheel/module.map b/modules/pam_wheel/module.map +new file mode 120000 +index 00000000..6cc612ef +--- /dev/null ++++ b/modules/pam_wheel/module.map +@@ -0,0 +1 @@ ++../maps/modules-auth-account.map +\ No newline at end of file +diff --git a/modules/pam_xauth/module.map b/modules/pam_xauth/module.map +new file mode 120000 +index 00000000..b90af7a8 +--- /dev/null ++++ b/modules/pam_xauth/module.map +@@ -0,0 +1 @@ ++../maps/modules-session.map +\ No newline at end of file diff --git a/SPECS/pam/common-account.pamd b/SPECS/pam/common-account.pamd new file mode 100644 index 00000000..5e724e8d --- /dev/null +++ b/SPECS/pam/common-account.pamd @@ -0,0 +1,9 @@ +# +# /etc/pam.d/common-account - account settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the account modules that define +# the central access policy for use on the system. The default is to +# only deny service to users whose accounts are expired. +# +account required pam_unix.so try_first_pass diff --git a/SPECS/pam/common-auth.pamd b/SPECS/pam/common-auth.pamd new file mode 100644 index 00000000..4fa5eea4 --- /dev/null +++ b/SPECS/pam/common-auth.pamd @@ -0,0 +1,11 @@ +# +# /etc/pam.d/common-auth - authentication settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authentication modules that define +# the central authentication scheme for use on the system +# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the +# traditional Unix authentication mechanisms. +# +auth required pam_env.so +auth required pam_unix.so try_first_pass diff --git a/SPECS/pam/common-password.pamd b/SPECS/pam/common-password.pamd new file mode 100644 index 00000000..269b4c6b --- /dev/null +++ b/SPECS/pam/common-password.pamd @@ -0,0 +1,11 @@ +# +# /etc/pam.d/common-password - password-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define the services to be +# used to change user passwords. +# +# The "nullok" option allows users to change an empty password, else +# empty passwords are treated as locked accounts. +# +password required pam_unix.so nullok diff --git a/SPECS/pam/common-session-nonlogin.pamd b/SPECS/pam/common-session-nonlogin.pamd new file mode 100644 index 00000000..55cd19da --- /dev/null +++ b/SPECS/pam/common-session-nonlogin.pamd @@ -0,0 +1,13 @@ +# +# /etc/pam.d/common-session-nonlogin - session-related modules common +# to services not doing a real login +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive), but not if they don't create a new login session +# (e.g. like cron, chfn, chsh, ...) +# +session required pam_unix.so try_first_pass +session optional pam_umask.so +session optional pam_env.so diff --git a/SPECS/pam/common-session.pamd b/SPECS/pam/common-session.pamd new file mode 100644 index 00000000..359462f2 --- /dev/null +++ b/SPECS/pam/common-session.pamd @@ -0,0 +1,12 @@ +# +# /etc/pam.d/common-session - session-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive). +# +session optional pam_systemd.so +session required pam_unix.so try_first_pass +session optional pam_umask.so +session optional pam_env.so diff --git a/SPECS/pam/macros.pam b/SPECS/pam/macros.pam new file mode 100644 index 00000000..774327a9 --- /dev/null +++ b/SPECS/pam/macros.pam @@ -0,0 +1,5 @@ +%_pam_libdir %{_libdir} +%_pam_moduledir %{_libdir}/security +%_pam_secconfdir %{_sysconfdir}/security +%_pam_confdir %{_sysconfdir}/pam.d +%_pam_vendordir %{_datadir}/pam.d diff --git a/SPECS/pam/other.pamd b/SPECS/pam/other.pamd new file mode 100644 index 00000000..6e90bbeb --- /dev/null +++ b/SPECS/pam/other.pamd @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth required pam_warn.so +auth required pam_deny.so +account required pam_warn.so +account required pam_deny.so +password required pam_warn.so +password required pam_deny.so +session required pam_warn.so +session required pam_deny.so diff --git a/SPECS/pam/pam.conf b/SPECS/pam/pam.conf new file mode 100644 index 00000000..e94a8607 --- /dev/null +++ b/SPECS/pam/pam.conf @@ -0,0 +1,3 @@ +d /run/console 0755 root root - +d /run/faillock 0755 root root - +d /run/sepermit 0755 root root - diff --git a/SPECS/pam/pam.spec b/SPECS/pam/pam.spec new file mode 100644 index 00000000..4d9e49d7 --- /dev/null +++ b/SPECS/pam/pam.spec @@ -0,0 +1,333 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# If we want to enable building docs, change this to 1. +%bcond docs 0 +# Same as above +%bcond selinux 1 +%bcond nis 0 +# We need to enable once systemd is available +# Also we need to add systemd %%install stuff maybe +%bcond systemd 1 + +Name: pam +Version: 1.7.1 +Release: %autorelease +Summary: An extensible library which provides authentication for applications +License: BSD-3-Clause AND GPL-2.0-or-later +URL: http://www.linux-pam.org/ +#!RemoteAsset +Source0: https://github.com/linux-pam/linux-pam/releases/download/v%{version}/Linux-PAM-%{version}.tar.xz +#!RemoteAsset +Source1: https://github.com/linux-pam/linux-pam/releases/download/v%{version}/Linux-PAM-%{version}.tar.xz.asc +# Macros for us +Source2: macros.pam +Source3: pam.conf +# Other essential files +Source4: other.pamd +Source5: common-auth.pamd +Source6: common-account.pamd +Source7: common-password.pamd +Source8: common-session.pamd +Source9: common-session-nonlogin.pamd +Source10: su.pamd +Source11: system-auth.pamd +Source12: password-auth.pamd +BuildSystem: meson + +# Backport upstream fixes +Patch0: 0001-post-v1.7.1.patch + +# We need to tell rpm where to find various macros +%{load:%{SOURCE2}} + +BuildOption(conf): -Daudit=enabled + +%if %{with systemd} +BuildOption(conf): -Dlogind=enabled +%else +BuildOption(conf): -Dlogind=disabled +%endif +BuildOption(conf): -Delogind=disabled +BuildOption(conf): -Dopenssl=enabled +BuildOption(conf): -Dpam_userdb=enabled +BuildOption(conf): -Ddb=gdbm +%if %{with selinux} +BuildOption(conf): -Dselinux=enabled +%else +BuildOption(conf): -Dselinux=disabled +%endif +%if %{with nis} +BuildOption(conf): -Dnis=enabled +%else +BuildOption(conf): -Dnis=disabled +%endif +%if %{with docs} +BuildOption(conf): -Ddocs=enabled +%else +BuildOption(conf): -Ddocs=disabled +%endif +BuildOption(conf): -Dpwaccess=disabled + +BuildRequires: audit-devel +BuildRequires: gdbm-devel +BuildRequires: pkgconfig(libeconf) +%if %{with nis} +BuildRequires: libnsl2-devel +%endif +%if %{with selinux} +BuildRequires: libselinux-devel +%endif +%if %{with systemd} +BuildRequires: systemd-devel +%endif +BuildRequires: libtirpc-devel +BuildRequires: libxcrypt-devel +BuildRequires: meson +BuildRequires: openssl-devel +BuildRequires: pkgconfig + +Requires: setup + +%description +PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. + +%package devel +Summary: Files needed for developing PAM-aware applications and modules for PAM + +%description devel +PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. This package +contains header files used for building both PAM-aware applications +and modules for use with the PAM system. + +%if %{with docs} +%package doc +Summary: Extra documentation for PAM. +Requires: pam = %{version}-%{release} +Provides: pam-docs = %{version}-%{release} +BuildArch: noarch +BuildRequires: docbook5-schemas +BuildRequires: docbook5-style-xsl +BuildRequires: elinks +BuildRequires: libxslt +BuildRequires: linuxdoc-tools + +%description doc +PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. The pam-doc +contains extra documentation for PAM. Currently, this includes additional +documentation in txt and html format. +%endif + +%install -a +# Install the macros file +install -D -m 644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name} + +%if %{with selinux} +# Temporary compat link +ln -sf pam_sepermit.so %{buildroot}%{_pam_moduledir}/pam_selinux_permit.so +%endif + +# RPM uses docs from source tree +rm -rf %{buildroot}%{_datadir}/doc/Linux-PAM + +# Install default configuration files. +install -d -m 755 %{buildroot}%{_pam_confdir} +install -d -m 755 %{buildroot}%{_pam_vendordir} +install -m 644 %{SOURCE4} %{buildroot}%{_pam_confdir}/other +install -m 644 %{SOURCE5} %{buildroot}%{_pam_confdir}/common-auth +install -m 644 %{SOURCE6} %{buildroot}%{_pam_confdir}/common-account +install -m 644 %{SOURCE7} %{buildroot}%{_pam_confdir}/common-password +install -m 644 %{SOURCE8} %{buildroot}%{_pam_confdir}/common-session +install -m 644 %{SOURCE9} %{buildroot}%{_pam_confdir}/common-session-nonlogin +install -m 644 %{SOURCE10} %{buildroot}%{_pam_confdir}/su +install -m 644 %{SOURCE11} %{buildroot}%{_pam_confdir}/system-auth +install -m 644 %{SOURCE12} %{buildroot}%{_pam_confdir}/password-auth + +for phase in auth acct passwd session ; do + ln -sf pam_unix.so %{buildroot}%{_pam_moduledir}/pam_unix_${phase}.so +done + +# Remove .la files and make new .so links -- this depends on the value +# of _libdir not changing, and *not* being /usr/lib. +for lib in libpam libpamc libpam_misc ; do + rm -f %{buildroot}%{_pam_libdir}/${lib}.la +done +rm -f %{buildroot}%{_pam_moduledir}/*.la + +%if "%{_pam_libdir}" != "%{_libdir}" +install -d -m 755 %{buildroot}%{_libdir} +for lib in libpam libpamc libpam_misc ; do + pushd %{buildroot}%{_libdir} + ln -sf %{_pam_libdir}/${lib}.so.*.* ${lib}.so + popd + rm -f %{buildroot}%{_pam_libdir}/${lib}.so +done +%endif + +# Duplicate doc file sets. +rm -fr %{buildroot}/usr/share/doc/pam + +# Install the file for autocreation of /var/run subdirectories on boot +install -m644 -D %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/pam.conf + +# Install systemd unit file. +install -m644 -D %{_vpath_builddir}/modules/pam_namespace/pam_namespace.service \ + %{buildroot}%{_unitdir}/pam_namespace.service + +# Fix other configuration files +install -d -m 755 %{buildroot}%{_pam_secconfdir} +for f in access.conf faillock.conf group.conf limits.conf namespace.conf pwhistory.conf time.conf pam_env.conf; do + install -m 644 %{buildroot}%{_datadir}/pam/security/$f %{buildroot}%{_pam_secconfdir}/ +done +# /etc/environment will be installed by the setup package +# install -m 644 %{buildroot}%{_datadir}/pam/environment %{buildroot}%{_sysconfdir}/environment +install -m 755 %{buildroot}%{_datadir}/pam/security/namespace.init %{buildroot}%{_pam_secconfdir}/ +rm -rf %{buildroot}%{_datadir}/pam/security +rm -f %{buildroot}%{_datadir}/pam/environment + +%if %{with docs} +# Install doc files to unified location. +install -d -m 755 %{buildroot}%{_pkgdocdir}/{adg/html,mwg/html,sag/html} +install -p -m 644 doc/specs/rfc86.0.txt %{buildroot}%{_pkgdocdir} +for i in adg mwg sag; do + install -p -m 644 %{_vpath_builddir}/doc/$i/*.txt %{buildroot}%{_pkgdocdir}/$i + cp -pr %{_vpath_builddir}/doc/$i/html/* %{buildroot}%{_pkgdocdir}/$i/html +done +find %{buildroot}%{_pkgdocdir} -type d | xargs chmod 755 +find %{buildroot}%{_pkgdocdir} -type f | xargs chmod 644 +%endif + +# Avoid illegal package names +rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*@* +%find_lang Linux-PAM --generate-subpackages + +%files +%license Copyright +%dir %{_pam_confdir} +%dir %{_pam_vendordir} +%config(noreplace) %{_pam_confdir}/other +%config(noreplace) %{_pam_confdir}/common-auth +%config(noreplace) %{_pam_confdir}/common-account +%config(noreplace) %{_pam_confdir}/common-password +%config(noreplace) %{_pam_confdir}/common-session +%config(noreplace) %{_pam_confdir}/common-session-nonlogin +%config(noreplace) %{_pam_confdir}/su +%config(noreplace) %{_pam_confdir}/system-auth +%config(noreplace) %{_pam_confdir}/password-auth +%{_rpmconfigdir}/macros.d/macros.%{name} +%{_sbindir}/pam_namespace_helper +%{_sbindir}/faillock +#%{_sysconfdir}/environment +%attr(4755,root,root) %{_sbindir}/pam_timestamp_check +%attr(4755,root,shadow) %{_sbindir}/unix_chkpwd + +%attr(0755,root,root) %{_sbindir}/mkhomedir_helper +%attr(0755,root,root) %{_sbindir}/pwhistory_helper +%dir %{_pam_moduledir} +%{_pam_moduledir}/pam_access.so +%{_pam_moduledir}/pam_canonicalize_user.so +%{_pam_moduledir}/pam_debug.so +%{_pam_moduledir}/pam_deny.so +%{_pam_moduledir}/pam_echo.so +%{_pam_moduledir}/pam_env.so +%{_pam_moduledir}/pam_exec.so +%{_pam_moduledir}/pam_faildelay.so +%{_pam_moduledir}/pam_faillock.so +%{_pam_moduledir}/pam_filter.so +%{_pam_moduledir}/pam_ftp.so +%{_pam_moduledir}/pam_group.so +%{_pam_moduledir}/pam_issue.so +%{_pam_moduledir}/pam_keyinit.so +%{_pam_moduledir}/pam_limits.so +%{_pam_moduledir}/pam_listfile.so +%{_pam_moduledir}/pam_localuser.so +%{_pam_moduledir}/pam_loginuid.so +%{_pam_moduledir}/pam_mail.so +%{_pam_moduledir}/pam_mkhomedir.so +%{_pam_moduledir}/pam_motd.so +%{_pam_moduledir}/pam_namespace.so +%{_pam_moduledir}/pam_nologin.so +%{_pam_moduledir}/pam_permit.so +%{_pam_moduledir}/pam_pwhistory.so +%{_pam_moduledir}/pam_rhosts.so +%{_pam_moduledir}/pam_rootok.so +%if %{with selinux} +%{_sbindir}/unix_update +%{_pam_moduledir}/pam_selinux.so +%{_pam_moduledir}/pam_selinux_permit.so +%{_pam_moduledir}/pam_sepermit.so +%endif +%{_pam_moduledir}/pam_securetty.so +%{_pam_moduledir}/pam_setquota.so +%{_pam_moduledir}/pam_shells.so +%{_pam_moduledir}/pam_stress.so +%{_pam_moduledir}/pam_succeed_if.so +%{_pam_moduledir}/pam_time.so +%{_pam_moduledir}/pam_timestamp.so +%{_pam_moduledir}/pam_tty_audit.so +%{_pam_moduledir}/pam_umask.so +%{_pam_moduledir}/pam_unix.so +%{_pam_moduledir}/pam_unix_acct.so +%{_pam_moduledir}/pam_unix_auth.so +%{_pam_moduledir}/pam_unix_passwd.so +%{_pam_moduledir}/pam_unix_session.so +%{_pam_moduledir}/pam_userdb.so +%{_pam_moduledir}/pam_usertype.so +%{_pam_moduledir}/pam_warn.so +%{_pam_moduledir}/pam_wheel.so +%{_pam_moduledir}/pam_xauth.so +%{_pam_moduledir}/pam_filter +%{_unitdir}/pam_namespace.service +%dir %{_pam_secconfdir} +%config(noreplace) %{_pam_secconfdir}/access.conf +%config(noreplace) %{_pam_secconfdir}/faillock.conf +%config(noreplace) %{_pam_secconfdir}/group.conf +%config(noreplace) %{_pam_secconfdir}/limits.conf +%dir %{_pam_secconfdir}/limits.d +%config(noreplace) %{_pam_secconfdir}/namespace.conf +%dir %{_pam_secconfdir}/namespace.d +%attr(755,root,root) %config(noreplace) %{_pam_secconfdir}/namespace.init +%config(noreplace) %{_pam_secconfdir}/pam_env.conf +%config(noreplace) %{_pam_secconfdir}/pwhistory.conf +%config(noreplace) %{_pam_secconfdir}/time.conf +%{_prefix}/lib/tmpfiles.d/pam.conf +%if %{with docs} +%{_mandir}/man5/* +%{_mandir}/man8/* +%endif + +%files devel +#dir %{_pkgdocdir} +#doc %{_pkgdocdir}/rfc86.0.txt +%{_includedir}/security +%if %{with docs} +%{_mandir}/man3/* +%endif +%{_libdir}/libpam.so +%{_libdir}/libpamc.so +%{_libdir}/libpam_misc.so +%{_pam_libdir}/libpam.so.0* +%{_pam_libdir}/libpamc.so.0* +%{_pam_libdir}/libpam_misc.so.0* +%{_libdir}/pkgconfig/pam.pc +%{_libdir}/pkgconfig/pam_misc.pc +%{_libdir}/pkgconfig/pamc.pc + +%if %{with docs} +%files doc +%doc %{_pkgdocdir} +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/pam/password-auth.pamd b/SPECS/pam/password-auth.pamd new file mode 100644 index 00000000..91bc62e5 --- /dev/null +++ b/SPECS/pam/password-auth.pamd @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth +password include system-auth +session include system-auth diff --git a/SPECS/pam/su.pamd b/SPECS/pam/su.pamd new file mode 100644 index 00000000..97ecc211 --- /dev/null +++ b/SPECS/pam/su.pamd @@ -0,0 +1,10 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_env.so +auth sufficient pam_unix.so try_first_pass nullok +auth required pam_deny.so + +account required pam_unix.so + +session required pam_unix.so +session optional pam_xauth.so diff --git a/SPECS/pam/system-auth.pamd b/SPECS/pam/system-auth.pamd new file mode 100644 index 00000000..a043320b --- /dev/null +++ b/SPECS/pam/system-auth.pamd @@ -0,0 +1,12 @@ +#%PAM-1.0 +auth required pam_env.so +auth sufficient pam_unix.so nullok try_first_pass +auth required pam_deny.so + +account required pam_unix.so + +password sufficient pam_unix.so nullok sha512 shadow try_first_pass +password required pam_deny.so + +session required pam_limits.so +session required pam_unix.so diff --git a/SPECS/pam_wrapper/pam_wrapper.spec b/SPECS/pam_wrapper/pam_wrapper.spec new file mode 100644 index 00000000..a25eea3d --- /dev/null +++ b/SPECS/pam_wrapper/pam_wrapper.spec @@ -0,0 +1,119 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pam_wrapper +Version: 1.1.8 +Release: %autorelease +Summary: A tool to test PAM applications and PAM modules +License: GPL-3.0-or-later +URL: http://cwrap.org/ +#!RemoteAsset +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_BUILD_TYPE=RelWithDebInfo +BuildOption(conf): -DUNIT_TESTING=ON +BuildOption(conf): -DPYTHON_INSTALL_SITEARCH=%{python3_sitearch} + +BuildRequires: cmake +BuildRequires: cmocka-cmake +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: pam-devel + +Recommends: cmake +Recommends: pkgconfig + +%description +This component of cwrap allows you to either test your PAM (Linux-PAM +and OpenPAM) application or module. + +For testing PAM applications, simple PAM module called pam_matrix is +included. If you plan to test a PAM module you can use the pamtest library, +which simplifies testing of modules. You can combine it with the cmocka +unit testing framework or you can use the provided Python bindings to +write tests for your module in Python. + +%package -n libpamtest +Summary: A tool to test PAM applications and PAM modules +# Automatically converted from old format: GPLv3+ - review is highly recommended. +License: GPL-3.0-or-later +Requires: pam_wrapper = %{version}-%{release} + +%description -n libpamtest +If you plan to test a PAM module you can use this library, which simplifies +testing of modules. + +%package -n libpamtest-devel +Summary: A tool to test PAM applications and PAM modules +License: GPL-3.0-or-later +Requires: pam_wrapper = %{version}-%{release} +Requires: libpamtest = %{version}-%{release} + +Recommends: cmake +Recommends: pkgconfig + +%description -n libpamtest-devel +If you plan to develop tests for a PAM module you can use this library, +which simplifies testing of modules. This sub package includes the header +files for libpamtest. + +%package -n python3-libpamtest +Summary: A python wrapper for libpamtest +License: GPL-3.0-or-later +Requires: pam_wrapper = %{version}-%{release} +Requires: libpamtest = %{version}-%{release} + +%description -n python3-libpamtest +If you plan to develop python tests for a PAM module you can use this +Python module to quickly write tests in Python + +%prep -a +# Not compatible with Python 3.12 headers +sed -i -e '/Werror=declaration-after-statement/d' CompilerChecks.cmake +# renamed in Python 3.2, old name dropped in 3.12 +sed -i -e 's/assertRaisesRegexp/assertRaisesRegex/' tests/pypamtest_test.py + +%ldconfig_scriptlets + +%ldconfig_scriptlets -n libpamtest + +%files +%{_libdir}/libpam_wrapper.so* +%{_libdir}/pkgconfig/pam_wrapper.pc +%dir %{_libdir}/cmake/pam_wrapper +%{_libdir}/cmake/pam_wrapper/pam_wrapper-config-version.cmake +%{_libdir}/cmake/pam_wrapper/pam_wrapper-config.cmake +%{_libdir}/pam_wrapper/pam_chatty.so +%{_libdir}/pam_wrapper/pam_matrix.so +%{_libdir}/pam_wrapper/pam_get_items.so +%{_libdir}/pam_wrapper/pam_set_items.so +%{_mandir}/man1/pam_wrapper.1* +%{_mandir}/man8/pam_chatty.8* +%{_mandir}/man8/pam_matrix.8* +%{_mandir}/man8/pam_get_items.8* +%{_mandir}/man8/pam_set_items.8* + +%files -n libpamtest +%{_libdir}/libpamtest.so.* + +%files -n libpamtest-devel +%{_libdir}/libpamtest.so +%{_libdir}/pkgconfig/libpamtest.pc +%dir %{_libdir}/cmake/pamtest +%{_libdir}/cmake/pamtest/pamtest-config-relwithdebinfo.cmake +%{_libdir}/cmake/pamtest/pamtest-config-version.cmake +%{_libdir}/cmake/pamtest/pamtest-config.cmake +%{_includedir}/libpamtest.h + +%files -n python3-libpamtest +%{python3_sitearch}/pypamtest.so + +%changelog +%{?autochangelog} diff --git a/SPECS/pango/pango.spec b/SPECS/pango/pango.spec new file mode 100644 index 00000000..b572e8e2 --- /dev/null +++ b/SPECS/pango/pango.spec @@ -0,0 +1,78 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pango +Version: 1.57.0 +Release: %autorelease +Summary: System for layout and rendering of internationalized text +License: LGPL-2.0-or-later +URL: https://www.pango.org/ +VCS: git:https://gitlab.gnome.org/GNOME/pango +#!RemoteAsset +Source0: https://gitlab.gnome.org/GNOME/pango/-/archive/%{version}/pango-%{version}.tar.gz +BuildSystem: meson + +BuildRequires: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(fribidi) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(libthai) +BuildRequires: pkgconfig(xft) +BuildRequires: pkgconfig(xrender) + +%description +Pango is a library for laying out and rendering of text, with an emphasis +on internationalization. Pango can be used anywhere that text layout is needed, +though most of the work on Pango so far has been done in the context of the +GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+. + +Pango is designed to be modular; the core Pango layout engine can be used +with different font backends. + +The integration of Pango with Cairo provides a complete solution with high +quality text handling and graphics rendering. + +%package devel +Summary: Development files for pango +Requires: %{name} = %{version}-%{release} + +%description devel +The pango-devel package includes the header files for the pango package. + +%files +%license COPYING +%doc NEWS README.md +%{_libdir}/libpango*-*.so.* +%{_bindir}/pango-list +%{_bindir}/pango-segmentation +%{_bindir}/pango-view +%{_libdir}/girepository-1.0/Pango-1.0.typelib +%{_libdir}/girepository-1.0/PangoCairo-1.0.typelib +%{_libdir}/girepository-1.0/PangoFc-1.0.typelib +%{_libdir}/girepository-1.0/PangoFT2-1.0.typelib +%{_libdir}/girepository-1.0/PangoOT-1.0.typelib +%{_libdir}/girepository-1.0/PangoXft-1.0.typelib + +%files devel +%{_libdir}/libpango*.so +%{_includedir}/* +%{_libdir}/pkgconfig/* +%{_datadir}/gir-1.0/Pango-1.0.gir +%{_datadir}/gir-1.0/PangoCairo-1.0.gir +%{_datadir}/gir-1.0/PangoFc-1.0.gir +%{_datadir}/gir-1.0/PangoFT2-1.0.gir +%{_datadir}/gir-1.0/PangoOT-1.0.gir +%{_datadir}/gir-1.0/PangoXft-1.0.gir + +%changelog +%{?autochangelog} diff --git a/SPECS/parallel/parallel.spec b/SPECS/parallel/parallel.spec new file mode 100644 index 00000000..4352aaff --- /dev/null +++ b/SPECS/parallel/parallel.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: parallel +Version: 20250822 +Release: %autorelease +Summary: Shell tool for executing jobs in parallel +License: GPL-3.0-or-later AND GFDL-1.3-or-later +URL: https://www.gnu.org/software/parallel/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: make +BuildRequires: perl +BuildRequires: sed +# bash-completion for %%{bash_completions_dir} +BuildRequires: bash-completion + +# Exclude errors for dependencies ending in sh, for example ash, pdksh and so on. +%define __requires_exclude sh$ + +%description +GNU Parallel is a shell tool for executing jobs in parallel using one or more +machines. A job is typically a single command or a small script that has to be +run for each of the lines in the input. + +%conf -p +autoreconf -ivf + +%files +%license LICENSES/GPL-3.0-or-later.txt LICENSES/GFDL-1.3-or-later.txt +%doc %{_docdir}/%{name} +%doc README NEWS +%{_bindir}/parallel +%{_bindir}/parcat +%{_bindir}/parset +%{_bindir}/parsort +%{_bindir}/env_parallel* +%{_bindir}/sem +%{_bindir}/sql +%{_bindir}/niceload +%{_mandir}/man1/parallel.1* +%{_mandir}/man1/parcat.1* +%{_mandir}/man1/parset.1* +%{_mandir}/man1/parsort.1* +%{_mandir}/man1/env_parallel.1* +%{_mandir}/man1/sem.1* +%{_mandir}/man1/sql.1* +%{_mandir}/man1/niceload.1* +%{_mandir}/man7/parallel* +%{_datadir}/bash-completion/completions/parallel +%{_datadir}/zsh/site-functions/_parallel + +%changelog +%{?autochangelog} diff --git a/SPECS/parted/0001-fix-do_version-parameters.patch b/SPECS/parted/0001-fix-do_version-parameters.patch new file mode 100644 index 00000000..22e0bbed --- /dev/null +++ b/SPECS/parted/0001-fix-do_version-parameters.patch @@ -0,0 +1,12 @@ +diff --git a/parted/parted.c b/parted/parted.c +--- a/parted/parted.c ++++ b/parted/parted.c +@@ -2172,7 +2172,7 @@ do_unit (PedDevice** dev, PedDisk** diskp) + } + + static int +-do_version () ++do_version (PedDevice** dev, PedDisk** diskp) + { + printf ("\n%s\n%s", + prog_name, diff --git a/SPECS/parted/parted.spec b/SPECS/parted/parted.spec new file mode 100644 index 00000000..a7e1dc27 --- /dev/null +++ b/SPECS/parted/parted.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Summary: The GNU disk partition manipulation program +Name: parted +Version: 3.6 +Release: %autorelease +URL: https://www.gnu.org/software/parted/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/parted/parted-%{version}.tar.xz +Patch0: 0001-fix-do_version-parameters.patch +License: GPLv3+ + +BuildRequires: readline-devel gettext-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: texinfo +BuildRequires: gcc +BuildRequires: make util-linux-devel + +BuildSystem: autotools +BuildOption(conf): --enable-shared +BuildOption(conf): --disable-device-mapper +BuildOption(conf): --disable-static + +%description +The GNU Parted program allows you to create, destroy, resize, move, +and copy hard disk partitions. Parted can be used for creating space +for new operating systems, reorganizing disk usage, and copying data +to new hard disks. + +%package devel +Summary: Files for developing apps which will manipulate disk partitions +Requires: %{name} = %{version}-%{release} +%description devel +The GNU Parted library is a set of routines for hard disk partition +manipulation. If you want to develop programs that manipulate disk +partitions and filesystems using the routines provided by the GNU +Parted library, you need to install this package. + +%conf -p +autoreconf -fiv + +%install -a +%{__rm} -rf %{buildroot}%{_infodir}/dir +%find_lang %{name} --generate-subpackages + +%ldconfig_postun + +%files +%license COPYING +%doc README doc/API doc/FAT +%{_sbindir}/parted +%{_sbindir}/partprobe +%{_libdir}/libparted*.so.* +%{_mandir}/man8/parted.8.gz +%{_mandir}/man8/partprobe.8.gz +%{_infodir}/parted.info.gz + +%files devel +%{_includedir}/parted +%{_libdir}/libparted*.so +%{_libdir}/pkgconfig/libparted*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/patch/CVE-2019-20633.patch b/SPECS/patch/CVE-2019-20633.patch new file mode 100644 index 00000000..9b014667 --- /dev/null +++ b/SPECS/patch/CVE-2019-20633.patch @@ -0,0 +1,25 @@ +commit a09d9519a57e84d8e2ad592fbba09e8a9faf55f8 +Author: Wolfgang Frisch +Date: Tue Jul 30 14:17:32 2024 +0200 + + Fix double-free/OOB read in pch.c (CVE-2019-20633) + + see also: https://savannah.gnu.org/bugs/index.php?56683#comment1 + +Index: patch-2.8/src/pch.c +=================================================================== +--- patch-2.8.orig/src/pch.c ++++ patch-2.8/src/pch.c +@@ -1200,8 +1200,11 @@ another_hunk (enum diff difftype, bool r + while (p_end >= 0) { + if (p_end == p_efake) + p_end = p_bfake; /* don't free twice */ +- else ++ else { + free(p_line[p_end]); ++ p_line[p_end] = NULL; ++ p_len[p_end] = 0; ++ } + p_end--; + } + assert (p_end < 0); diff --git a/SPECS/patch/patch.spec b/SPECS/patch/patch.spec new file mode 100644 index 00000000..bae7e48b --- /dev/null +++ b/SPECS/patch/patch.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: patch +Version: 2.8 +Release: %autorelease +Summary: GNU patch +License: GPL-3.0-or-later +Group: Productivity/Text/Utilities +URL: https://ftp.gnu.org/gnu/patch/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/patch/%{name}-%{version}.tar.xz +#!RemoteAsset +Source2: https://ftpmirror.gnu.org/gnu/patch/%{name}-%{version}.tar.xz.sig +# https://savannah.gnu.org/people/viewgpg.php?user_id=15000 +Patch14: CVE-2019-20633.patch +BuildRequires: ed +# The fix for CVE-2010-4651 breaks the way interdiff was +# invoking patch, so interdiff had to be fixed too. +Conflicts: patchutils < 0.3.2 +BuildSystem: autotools + +%description +The GNU patch program is used to apply diffs between original and +changed files (generated by the diff command) to the original files. + + +%check +%make_build check + +%files +%doc AUTHORS NEWS README +%license COPYING +%{_bindir}/patch +%{_mandir}/man1/patch.1%{?ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/patchelf/patchelf.spec b/SPECS/patchelf/patchelf.spec new file mode 100644 index 00000000..cb8d5bfe --- /dev/null +++ b/SPECS/patchelf/patchelf.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: patchelf +Version: 0.18.0 +Release: %autorelease +Summary: A utility for patching ELF binaries +License: GPL-3.0-or-later +URL: https://nixos.org/patchelf.html +#!RemoteAsset +Source0: https://github.com/NixOS/patchelf/archive/refs/tags/%{version}/patchelf-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gcc gcc-c++ make autoconf automake libtool + +%description +PatchELF is a simple utility for modifying an existing ELF executable +or library. It can change the dynamic loader ("ELF interpreter") +of an executable and change the RPATH of an executable or library. + +%prep -a +# package ships elf.h - delete to use glibc-headers one +%{__rm} -f src/elf.h + +%conf -p +autoreconf -fiv + +%files +%license COPYING +%doc README.md +%doc %{_docdir}/%{name} +%{_bindir}/patchelf +%{_mandir}/man1/patchelf.1* +%{_datadir}/zsh/site-functions/_patchelf + +%changelog +%{?autochangelog} diff --git a/SPECS/pciutils/pciutils.spec b/SPECS/pciutils/pciutils.spec new file mode 100644 index 00000000..f6b3bf01 --- /dev/null +++ b/SPECS/pciutils/pciutils.spec @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pciutils +Version: 3.14.0 +Release: %autorelease +Summary: PCI utilities for the Linux Kernel +License: GPL-2.0-or-later +URL: https://mj.ucw.cz/sw/pciutils/ +#!RemoteAsset +Source: https://www.kernel.org/pub/software/utils/pciutils/pciutils-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(build): OPT="%{optflags}" +BuildOption(build): PREFIX=%{_prefix} +BuildOption(build): LIBDIR=%{_libdir} +BuildOption(build): SBINDIR=%{_sbindir} +BuildOption(build): STRIP="" +BuildOption(build): SHARED="yes" + +BuildOption(install): install-lib +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): SBINDIR=%{_sbindir} +BuildOption(install): ROOT="" +BuildOption(install): MANDIR=%{_mandir} +BuildOption(install): STRIP="" +BuildOption(install): SHARED="yes" +BuildOption(install): LIBDIR=%{_libdir} + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libkmod) +BuildRequires: pkgconfig(zlib) +Requires: hwdata + +%description +This package contains command-line utilities for inspecting and manipulating +devices connected to the PCI bus. + +%package devel +Summary: Development files for the PCI utilities +Requires: %{name} = %{version} + +%description devel +This package contains the header files and development files for the +PCI utilities library. + +# No configure +%conf + +%install -a +install -d -m 755 %{buildroot}%{_includedir}/pci +install -m 644 lib/pci.h lib/header.h lib/config.h lib/types.h %{buildroot}%{_includedir}/pci/ +install -D -m 644 lib/libpci.pc %{buildroot}%{_libdir}/pkgconfig/libpci.pc +(cd %{buildroot}%{_libdir} && ln -sf libpci.so.3 libpci.so) + +# No tests +%check + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README +%{_bindir}/lspci +%{_sbindir}/pcilmr +%{_sbindir}/setpci +%{_sbindir}/update-pciids +%{_mandir}/man*/* +%{_libdir}/libpci.so.3 +%{_libdir}/libpci.so.3.* +%{_datadir}/pci.ids* + +%files devel +%{_includedir}/pci/ +%{_libdir}/pkgconfig/libpci.pc +%{_libdir}/libpci.so + +%changelog +%{?autochangelog} diff --git a/SPECS/pcre2/pcre2.spec b/SPECS/pcre2/pcre2.spec new file mode 100644 index 00000000..012327f9 --- /dev/null +++ b/SPECS/pcre2/pcre2.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pcre2 +Version: 10.45 +Release: %autorelease +Summary: A library for Perl-compatible regular expressions +License: BSD-3-Clause WITH PCRE2-exception +URL: https://pcre2project.github.io/pcre2/ +#!RemoteAsset +Source0: https://github.com/PCRE2Project/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2 + +BuildSystem: autotools + +BuildOption(conf): --enable-jit +BuildOption(conf): --enable-pcre2-16 +BuildOption(conf): --enable-pcre2-32 +BuildOption(conf): --enable-pcre2grep-libbz2 +BuildOption(conf): --enable-pcre2grep-libz +BuildOption(conf): --enable-pcre2test-libreadline +BuildOption(conf): --enable-unicode + + +BuildRequires: make, gcc-c++, autoconf, automake, libtool +BuildRequires: bzip2-devel, readline-devel +BuildRequires: pkgconfig(zlib) + + +%description +PCRE2 is a re-working of the original PCRE library to provide a new API. +This package contains the runtime libraries (8-bit, 16-bit, 32-bit, and POSIX) +and the `pcre2grep` and `pcre2test` command-line tools. +Requires: bzip2-libs, readline, zlib +# Provides all the different library sonames. +Provides: libpcre2-8.so.0%{?_isa} +Provides: libpcre2-16.so.0%{?_isa} +Provides: libpcre2-32.so.0%{?_isa} +Provides: libpcre2-posix.so.3%{?_isa} + +# The `-devel` package for developers. +%package devel +Summary: Development files for pcre2 +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains header files, development libraries, and API documentation +for compiling applications that use the PCRE2 library. + +%conf -p +autoreconf -fiv + +%install -a +rm -f %{buildroot}%{_libdir}/*.la + +%ldconfig_scriptlets + +%files +%license LICENCE.md +%doc AUTHORS.md ChangeLog NEWS README +# All runtime libraries are in the main package. +%{_libdir}/libpcre2-8.so.0* +%{_libdir}/libpcre2-16.so.0* +%{_libdir}/libpcre2-32.so.0* +%{_libdir}/libpcre2-posix.so.3* +# All CLI tools are in the main package. +%{_bindir}/pcre2grep +%{_bindir}/pcre2test +# Man pages for the tools. +%{_mandir}/man1/* + +%files devel +%doc %{_docdir}/pcre2/ +# Header file. +%{_includedir}/*.h +# Development symlinks. +%{_libdir}/*.so +# Static libraries. +%{_libdir}/*.a +# Pkg-config files. +%{_libdir}/pkgconfig/*.pc +# Man page for the pcre2-config script. +%{_mandir}/man1/pcre2-config.1.gz +# API documentation. +%{_mandir}/man3/* +# The pcre2-config script is a development tool. +%{_bindir}/pcre2-config + +%changelog +%{?autochangelog} diff --git a/SPECS/pcsc-lite/pcsc-lite.spec b/SPECS/pcsc-lite/pcsc-lite.spec new file mode 100644 index 00000000..48f53183 --- /dev/null +++ b/SPECS/pcsc-lite/pcsc-lite.spec @@ -0,0 +1,97 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pcsc-lite +Version: 2.3.3 +Release: %autorelease +Summary: Middleware to access a smart card using SCard API (PC/SC) +License: BSD-3-Clause +URL: https://pcsclite.apdu.fr/ +#!RemoteAsset +Source: https://pcsclite.apdu.fr/files/%{name}-%{version}.tar.xz +BuildSystem: meson + +BuildOption(conf): -Dpolkit=true +BuildOption(conf): -Dusbdropdir=%{_libdir}/pcsc/drivers +BuildOption(conf): -Dlibsystemd=true + +BuildRequires: doxygen meson python3 flex duktape +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(polkit-gobject-1) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(mount) +Requires: pcsc-ifd-handler +Requires: polkit +Recommends: ccid + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +PC/SC Lite is a middleware to access a smart card using SCard API (PC/SC). +This package contains the PC/SC Lite server, runtime library, and utilities. + +%package devel +Summary: PC/SC Lite library and header files for development +Requires: %{name} = %{version} +Requires: pkgconfig(libudev) + +%description devel +This package includes the PC/SC Lite library, header files, and API +documentation for development. + +%prep -a +for file in ChangeLog; do + iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \ + touch -r $file $file.new && \ + mv $file.new $file +done + +%install -a +install -d %{buildroot}%{_sysconfdir}/reader.conf.d + +%post +/sbin/ldconfig +%systemd_post pcscd.socket pcscd.service + +%preun +%systemd_preun pcscd.socket pcscd.service + +%postun +/sbin/ldconfig +%systemd_postun_with_restart pcscd.socket pcscd.service + +%files +%doc AUTHORS ChangeLog HELP README SECURITY +%doc doc/README.polkit +%{_docdir}/pcsc-lite/setup_spy.sh +%license COPYING +%config(noreplace) %{_sysconfdir}/default/pcscd +%dir %{_sysconfdir}/reader.conf.d/ +%ghost %dir %{_localstatedir}/run/pcscd/ +%{_libdir}/lib*.so.* +%{_sbindir}/pcscd +%{_userunitdir}/pcscd.socket +%{_userunitdir}/pcscd.service +%{_datadir}/metainfo/fr.apdu.pcsclite.metainfo.xml +%{_datadir}/polkit-1/actions/org.debian.pcsc-lite.policy +%{_mandir}/man5/reader.conf.5* +%{_mandir}/man8/pcscd.8* + +%files devel +%{_bindir}/pcsc-spy +%{_includedir}/PCSC/ +%{_libdir}/lib*.a +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man1/* + +%changelog +%{?autochangelog} \ No newline at end of file diff --git a/SPECS/perl-Alien-Build-Plugin-Download-GitLab/perl-Alien-Build-Plugin-Download-GitLab.spec b/SPECS/perl-Alien-Build-Plugin-Download-GitLab/perl-Alien-Build-Plugin-Download-GitLab.spec new file mode 100644 index 00000000..8dfd80eb --- /dev/null +++ b/SPECS/perl-Alien-Build-Plugin-Download-GitLab/perl-Alien-Build-Plugin-Download-GitLab.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Alien-Build-Plugin-Download-GitLab +Version: 0.01 +Release: %autorelease +Summary: Alien::Build plugin to download from GitLab +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Alien-Build-Plugin-Download-GitLab +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Build-Plugin-Download-GitLab-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.4 +BuildRequires: perl(Alien::Build::Plugin) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(JSON::PP) +BuildRequires: perl(Path::Tiny) +BuildRequires: perl(Test2::V0) >= 0.000121 +BuildRequires: perl(URI) +BuildRequires: perl(URI::Escape) + +%description +This plugin is designed for downloading assets from a GitLab instance. + +%prep +%setup -q -n Alien-Build-Plugin-Download-GitLab-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc author.yml Changes perlcriticrc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Alien-Build/perl-Alien-Build.spec b/SPECS/perl-Alien-Build/perl-Alien-Build.spec new file mode 100644 index 00000000..b52e7947 --- /dev/null +++ b/SPECS/perl-Alien-Build/perl-Alien-Build.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Alien-Build +Version: 2.84 +Release: %autorelease +Summary: Build external dependencies for use in CPAN +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Alien-Build +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Build-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.4 +BuildRequires: perl(Capture::Tiny) >= 0.17 +BuildRequires: perl(Digest::SHA) +BuildRequires: perl(ExtUtils::CBuilder) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.64 +BuildRequires: perl(ExtUtils::ParseXS) >= 3.30 +BuildRequires: perl(FFI::CheckLib) >= 0.11 +BuildRequires: perl(File::chdir) +BuildRequires: perl(File::Which) >= 1.10 +BuildRequires: perl(JSON::PP) +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(parent) +BuildRequires: perl(Path::Tiny) >= 0.077 +BuildRequires: perl(Test2::API) >= 1.302096 +BuildRequires: perl(Test2::V0) >= 0.000121 +BuildRequires: perl(Text::ParseWords) >= 3.26 + +Requires: perl(Capture::Tiny) >= 0.17 +Requires: perl(ExtUtils::MakeMaker) >= 6.64 +Requires: perl(ExtUtils::ParseXS) >= 3.30 +Requires: perl(FFI::CheckLib) >= 0.11 +Requires: perl(File::Which) >= 1.10 +Requires: perl(List::Util) >= 1.33 +Requires: perl(Path::Tiny) >= 0.077 +Requires: perl(Test2::API) >= 1.302096 +Requires: perl(Text::ParseWords) >= 3.26 + +%description +This module provides tools for building external (non-CPAN) dependencies +for CPAN. It is mainly designed to be used at install time of a CPAN +client, and work closely with Alien::Base which is used at runtime. + +%prep +%setup -q -n Alien-Build-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc author.yml Changes Changes.Alien-Base Changes.Alien-Base-Wrapper Changes.Alien-Build-Decode-Mojo Changes.Test-Alien perlcriticrc README spellcheck.ini SUPPORT weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Alien-Libxml2/perl-Alien-Libxml2.spec b/SPECS/perl-Alien-Libxml2/perl-Alien-Libxml2.spec new file mode 100644 index 00000000..053bb6bb --- /dev/null +++ b/SPECS/perl-Alien-Libxml2/perl-Alien-Libxml2.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Alien-Libxml2 +Version: 0.20 +Release: %autorelease +Summary: Install the C libxml2 library on your system +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Alien-Libxml2 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Libxml2-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Alien::Base) >= 2.37 +BuildRequires: perl(Alien::Build) >= 2.37 +BuildRequires: perl(Alien::Build::MM) >= 0.32 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Alien) +BuildRequires: perl(Test2::V0) >= 0.000121 +BuildRequires: perl(File::chdir) +# Manual +BuildRequires: perl(Alien::Build::Plugin::Download::GitLab) +BuildRequires: perl(URI) +BuildRequires: perl(IO::Socket::SSL) +BuildRequires: perl(Mozilla::CA) +BuildRequires: libxml2-devel + +Requires: perl(Alien::Base) >= 2.37 + +%description +This module provides libxml2 for other modules to use. + +%prep +%setup -q -n Alien-Libxml2-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc alienfile author.yml Changes perlcriticrc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Archive-Zip/perl-Archive-Zip.spec b/SPECS/perl-Archive-Zip/perl-Archive-Zip.spec new file mode 100644 index 00000000..864452d6 --- /dev/null +++ b/SPECS/perl-Archive-Zip/perl-Archive-Zip.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Archive-Zip +Version: 1.68 +Release: %autorelease +Summary: Provide an interface to ZIP archive files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Archive-Zip +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PH/PHRED/Archive-Zip-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Compress::Raw::Zlib) >= 2.017 +BuildRequires: perl(Encode) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) >= 0.80 +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IO::Seekable) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Time::Local) + +Requires: perl(Compress::Raw::Zlib) >= 2.017 +Requires: perl(File::Spec) >= 0.80 + +%description +The Archive::Zip module allows a Perl program to create, manipulate, read, +and write Zip archive files. + +%prep +%setup -q -n Archive-Zip-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-B-COW/perl-B-COW.spec b/SPECS/perl-B-COW/perl-B-COW.spec new file mode 100644 index 00000000..95159d6a --- /dev/null +++ b/SPECS/perl-B-COW/perl-B-COW.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-B-COW +Version: 0.007 +Release: %autorelease +Summary: B::COW additional B helpers to check COW status +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/B-COW +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AT/ATOOMIC/B-COW-%{version}.tar.gz +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Devel::Peek) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Test::More) +BuildRequires: perl(XSLoader) + +%description +B::COW provides some naive additional B helpers to check the COW status + of one SvPV. + +%prep +%setup -q -n B-COW-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-B-Hooks-EndOfScope/perl-B-Hooks-EndOfScope.spec b/SPECS/perl-B-Hooks-EndOfScope/perl-B-Hooks-EndOfScope.spec new file mode 100644 index 00000000..042a196e --- /dev/null +++ b/SPECS/perl-B-Hooks-EndOfScope/perl-B-Hooks-EndOfScope.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-B-Hooks-EndOfScope +Version: 0.28 +Release: %autorelease +Summary: Execute code after a scope finished compilation +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/B-Hooks-EndOfScope +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/B-Hooks-EndOfScope-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Glob) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IPC::Open2) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Implementation) >= 0.05 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Sub::Exporter::Progressive) >= 0.001006 +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +Requires: perl(Module::Implementation) >= 0.05 +Requires: perl(Sub::Exporter::Progressive) >= 0.001006 + +%description +This module allows you to execute code when perl finished compiling the +surrounding scope. + +%prep +%setup -q -n B-Hooks-EndOfScope-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-B-Keywords/perl-B-Keywords.spec b/SPECS/perl-B-Keywords/perl-B-Keywords.spec new file mode 100644 index 00000000..3e5c39c5 --- /dev/null +++ b/SPECS/perl-B-Keywords/perl-B-Keywords.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-B-Keywords +Version: 1.28 +Release: %autorelease +Summary: Lists of reserved barewords and symbol names +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/B-Keywords +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RU/RURBAN/B-Keywords-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(B) +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +B::Keywords supplies several arrays of exportable keywords: @Scalars, + @Arrays, @Hashes, @Filehandles, @Symbols, @Functions, @Barewords, + @BarewordsExtra, @TieIOMethods, @UNIVERSALMethods and @ExporterSymbols. + +%prep +%setup -q -n B-Keywords-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Business-ISMN/perl-Business-ISMN.spec b/SPECS/perl-Business-ISMN/perl-Business-ISMN.spec new file mode 100644 index 00000000..e78ae4b6 --- /dev/null +++ b/SPECS/perl-Business-ISMN/perl-Business-ISMN.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Business-ISMN +Version: 1.205 +Release: %autorelease +Summary: Work with International Standard Music Numbers +License: Artistic-2.0 +URL: https://metacpan.org/dist/Business-ISMN +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BR/BRIANDFOY/Business-ISMN-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(List::Util) +BuildRequires: perl(Test::More) >= 1 +BuildRequires: perl(Tie::Cycle) >= 1.21 +BuildRequires: perl(version) >= 0.86 + +Requires: perl(Tie::Cycle) >= 1.21 + +%description +Methods + +%prep +%setup -q -n Business-ISMN-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes INSTALL.SKIP ismns.txt SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Business-ISSN/perl-Business-ISSN.spec b/SPECS/perl-Business-ISSN/perl-Business-ISSN.spec new file mode 100644 index 00000000..27b62f01 --- /dev/null +++ b/SPECS/perl-Business-ISSN/perl-Business-ISSN.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Business-ISSN +Version: 1.008 +Release: %autorelease +Summary: Perl extension for International Standard Serial Numbers +License: Artistic-2.0 +URL: https://metacpan.org/dist/Business-ISSN +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BR/BRIANDFOY/Business-ISSN-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 1 + +%description +new($issn) + +%prep +%setup -q -n Business-ISSN-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CITATION.cff INSTALL.SKIP SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-CPAN-Meta-Check/perl-CPAN-Meta-Check.spec b/SPECS/perl-CPAN-Meta-Check/perl-CPAN-Meta-Check.spec new file mode 100644 index 00000000..fe5bf661 --- /dev/null +++ b/SPECS/perl-CPAN-Meta-Check/perl-CPAN-Meta-Check.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-CPAN-Meta-Check +Version: 0.018 +Release: %autorelease +Summary: Verify requirements in a CPAN::Meta object +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/CPAN-Meta-Check +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/CPAN-Meta-Check-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(CPAN::Meta) >= 2.120920 +BuildRequires: perl(CPAN::Meta::Prereqs) >= 2.132830 +BuildRequires: perl(CPAN::Meta::Requirements) >= 2.121 +BuildRequires: perl(Env) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Metadata) >= 1.000023 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +Requires: perl(CPAN::Meta::Prereqs) >= 2.132830 +Requires: perl(CPAN::Meta::Requirements) >= 2.121 +Requires: perl(Module::Metadata) >= 1.000023 + +%description +This module verifies if requirements described in a CPAN::Meta object +are present. + +%prep +%setup -q -n CPAN-Meta-Check-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-CPAN-Requirements-Dynamic/perl-CPAN-Requirements-Dynamic.spec b/SPECS/perl-CPAN-Requirements-Dynamic/perl-CPAN-Requirements-Dynamic.spec new file mode 100644 index 00000000..3c1c8066 --- /dev/null +++ b/SPECS/perl-CPAN-Requirements-Dynamic/perl-CPAN-Requirements-Dynamic.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-CPAN-Requirements-Dynamic +Version: 0.002 +Release: %autorelease +Summary: Dynamic prerequisites in meta files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/CPAN-Requirements-Dynamic +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/CPAN-Requirements-Dynamic-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(CPAN::Meta::Prereqs) +BuildRequires: perl(CPAN::Meta::Requirements::Range) +BuildRequires: perl(ExtUtils::Config) +BuildRequires: perl(ExtUtils::HasCompiler) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(IPC::Cmd) +BuildRequires: perl(Parse::CPAN::Meta) +BuildRequires: perl(Perl::OSType) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +This module implements a format for describing dynamic prerequisites of a +distribution. + +%prep +%setup -q -n CPAN-Requirements-Dynamic-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Canary-Stability/perl-Canary-Stability.spec b/SPECS/perl-Canary-Stability/perl-Canary-Stability.spec new file mode 100644 index 00000000..5c60c0f6 --- /dev/null +++ b/SPECS/perl-Canary-Stability/perl-Canary-Stability.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Canary-Stability +Version: 2013 +Release: %autorelease +Summary: Canary to check perl compatibility for schmorp's modules +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Canary-Stability +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/Canary-Stability-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module is used by Schmorp's modules during configuration stage to test +the installed perl for compatibility with his modules. + +%prep +%setup -q -n Canary-Stability-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Capture-Tiny/perl-Capture-Tiny.spec b/SPECS/perl-Capture-Tiny/perl-Capture-Tiny.spec new file mode 100644 index 00000000..28b6e1a8 --- /dev/null +++ b/SPECS/perl-Capture-Tiny/perl-Capture-Tiny.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Capture-Tiny +Version: 0.50 +Release: %autorelease +Summary: Capture STDOUT and STDERR from Perl, XS or external programs +License: Apache-2.0 +URL: https://metacpan.org/dist/Capture-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(lib) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.62 +BuildRequires: perl(warnings) + +%description +Capture::Tiny provides a simple, portable way to capture almost anything +sent to STDOUT or STDERR, regardless of whether it comes from Perl, from XS +code or from an external program. Optionally, output can be teed so that it +is captured while being passed through to the original filehandles. Yes, it +even works on Windows (usually). Stop guessing which of a dozen capturing +modules to use in any particular situation and just use this one. + +%prep +%setup -q -n Capture-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.mkdn perlcritic.rc README Todo + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Class-Data-Inheritable/perl-Class-Data-Inheritable.spec b/SPECS/perl-Class-Data-Inheritable/perl-Class-Data-Inheritable.spec new file mode 100644 index 00000000..4b8d22e1 --- /dev/null +++ b/SPECS/perl-Class-Data-Inheritable/perl-Class-Data-Inheritable.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Class-Data-Inheritable +Version: 0.10 +Release: %autorelease +Summary: Inheritable, overridable class data +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Class-Data-Inheritable +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RS/RSHERER/Class-Data-Inheritable-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +Class::Data::Inheritable is for creating accessor/mutators to class data. +That is, if you want to store something about your class as a whole +(instead of about a single object). This data is then inherited by your +subclasses and can be overridden. + +%prep +%setup -q -n Class-Data-Inheritable-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Class-Inspector/perl-Class-Inspector.spec b/SPECS/perl-Class-Inspector/perl-Class-Inspector.spec new file mode 100644 index 00000000..6b44605a --- /dev/null +++ b/SPECS/perl-Class-Inspector/perl-Class-Inspector.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Class-Inspector +Version: 1.36 +Release: %autorelease +Summary: Get information about a class and its structure +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Class-Inspector +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/Class-Inspector-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(base) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) >= 0.80 +BuildRequires: perl(Test::More) >= 0.98 + +Requires: perl(File::Spec) >= 0.80 + +%description +Class::Inspector allows you to get information about a loaded class. Most +or all of this information can be found in other ways, but they aren't +always very friendly, and usually involve a relatively high level of Perl +wizardry, or strange and unusual looking code. Class::Inspector attempts to +provide an easier, more friendly interface to this information. + +%prep +%setup -q -n Class-Inspector-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc author.yml Changes maint perlcriticrc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Class-Method-Modifiers/perl-Class-Method-Modifiers.spec b/SPECS/perl-Class-Method-Modifiers/perl-Class-Method-Modifiers.spec new file mode 100644 index 00000000..3281c0fc --- /dev/null +++ b/SPECS/perl-Class-Method-Modifiers/perl-Class-Method-Modifiers.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Class-Method-Modifiers +Version: 2.15 +Release: %autorelease +Summary: Provides Moose-like method modifiers +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Class-Method-Modifiers +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Class-Method-Modifiers-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(B) +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(if) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +%description +Method modifiers are a convenient feature from the CLOS (Common Lisp Object +System) world. + +%prep +%setup -q -n Class-Method-Modifiers-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Class-Singleton/perl-Class-Singleton.spec b/SPECS/perl-Class-Singleton/perl-Class-Singleton.spec new file mode 100644 index 00000000..15ccf456 --- /dev/null +++ b/SPECS/perl-Class-Singleton/perl-Class-Singleton.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Class-Singleton +Version: 1.6 +Release: %autorelease +Summary: Implementation of a "Singleton" class +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Class-Singleton +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHAY/Class-Singleton-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(base) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +This is the Class::Singleton module. A Singleton describes an object class +that can have only one instance in any system. An example of a Singleton +might be a print spooler or system registry. This module implements a +Singleton class from which other classes can be derived. By itself, the +Class::Singleton module does very little other than manage the +instantiation of a single object. In deriving a class from +Class::Singleton, your module will inherit the Singleton instantiation +method and can implement whatever specific functionality is required. + +%prep +%setup -q -n Class-Singleton-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Class-Tiny/perl-Class-Tiny.spec b/SPECS/perl-Class-Tiny/perl-Class-Tiny.spec new file mode 100644 index 00000000..91d3dca6 --- /dev/null +++ b/SPECS/perl-Class-Tiny/perl-Class-Tiny.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Class-Tiny +Version: 1.008 +Release: %autorelease +Summary: Minimalist class construction +License: Apache-2.0 +URL: https://metacpan.org/dist/Class-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(lib) +BuildRequires: perl(strict) +BuildRequires: perl(subs) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +%description +This module offers a minimalist class construction kit in around 120 lines +of code. Here is a list of features: + +%prep +%setup -q -n Class-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.mkdn perlcritic.rc README tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Class-XSAccessor/perl-Class-XSAccessor.spec b/SPECS/perl-Class-XSAccessor/perl-Class-XSAccessor.spec new file mode 100644 index 00000000..3e49a7e3 --- /dev/null +++ b/SPECS/perl-Class-XSAccessor/perl-Class-XSAccessor.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Class-XSAccessor +Version: 1.19 +Release: %autorelease +Summary: Generate fast XS accessors without runtime compilation +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Class-XSAccessor +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SM/SMUELLER/Class-XSAccessor-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) +BuildRequires: perl(Time::HiRes) +BuildRequires: perl(XSLoader) + +%description +Class::XSAccessor implements fast read, write and read/write accessors in +XS. Additionally, it can provide predicates such as has_foo() for testing +whether the attribute foo exists in the object (which is different from "is +defined within the object"). It only works with objects that are +implemented as ordinary hashes. Class::XSAccessor::Array implements the +same interface for objects that use arrays for their internal +representation. + +%prep +%setup -q -n Class-XSAccessor-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Clone-PP/perl-Clone-PP.spec b/SPECS/perl-Clone-PP/perl-Clone-PP.spec new file mode 100644 index 00000000..1e96a3dd --- /dev/null +++ b/SPECS/perl-Clone-PP/perl-Clone-PP.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Clone-PP +Version: 1.08 +Release: %autorelease +Summary: Recursively copy Perl datatypes +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Clone-PP +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/N/NE/NEILB/Clone-PP-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Benchmark) +BuildRequires: perl(Carp) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +%description +This module provides a general-purpose clone function to make deep copies +of Perl data structures. It calls itself recursively to copy nested hash, +array, scalar and reference types, including tied variables and objects. + +%prep +%setup -q -n Clone-PP-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Clone/perl-Clone.spec b/SPECS/perl-Clone/perl-Clone.spec new file mode 100644 index 00000000..a158ce08 --- /dev/null +++ b/SPECS/perl-Clone/perl-Clone.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Clone +Version: 0.47 +Release: %autorelease +Summary: Recursively copy Perl datatypes +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Clone +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AT/ATOOMIC/Clone-%{version}.tar.gz +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(B::COW) >= 0.004 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.88 + +%description +This module provides a clone() method which makes recursive copies of +nested hash, array, scalar and reference types, including tied variables +and objects. + +%prep +%setup -q -n Clone-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Config-AutoConf/perl-Config-AutoConf.spec b/SPECS/perl-Config-AutoConf/perl-Config-AutoConf.spec new file mode 100644 index 00000000..754673a5 --- /dev/null +++ b/SPECS/perl-Config-AutoConf/perl-Config-AutoConf.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Config-AutoConf +Version: 0.320 +Release: %autorelease +Summary: Module to implement some of AutoConf macros in pure perl +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Config-AutoConf +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AM/AMBS/Config-AutoConf-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(base) +BuildRequires: perl(Capture::Tiny) +BuildRequires: perl(Carp) +BuildRequires: perl(Config) +BuildRequires: perl(Cwd) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::CBuilder) >= 0.23 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Slurper) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Scalar::Util) >= 1.18 +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.9 +BuildRequires: perl(Text::ParseWords) +BuildRequires: perl(warnings) + +Requires: perl(ExtUtils::CBuilder) >= 0.280220 +Requires: perl(Scalar::Util) >= 1.18 + +%description +Config::AutoConf is intended to provide the same opportunities to Perl +developers as GNU Autoconf does for Shell developers. + +%prep +%setup -q -n Config-AutoConf-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ARTISTIC-1.0 Changes GPL-1 README.md testTc852_ + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Config-IniFiles/perl-Config-IniFiles.spec b/SPECS/perl-Config-IniFiles/perl-Config-IniFiles.spec new file mode 100644 index 00000000..12e04d5b --- /dev/null +++ b/SPECS/perl-Config-IniFiles/perl-Config-IniFiles.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Config-IniFiles +Version: 3.000003 +Release: %autorelease +Summary: Module for reading .ini-style configuration files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Config-IniFiles +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/Config-IniFiles-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(English) +BuildRequires: perl(Exporter) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IO::Scalar) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(Module::Build) +BuildRequires: perl(parent) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Symbol) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(List::Util) >= 1.33 + +%description +Config::IniFiles provides a way to have readable configuration files +outside your Perl script. Configurations can be imported (inherited, +stacked,...), sections can be grouped, and settings can be accessed from a +tied hash. + +%prep +%setup -q -n Config-IniFiles-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install --destdir=%{buildroot} --create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes OLD-Changes.txt README scripts weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Config-Tiny/perl-Config-Tiny.spec b/SPECS/perl-Config-Tiny/perl-Config-Tiny.spec new file mode 100644 index 00000000..fce709c6 --- /dev/null +++ b/SPECS/perl-Config-Tiny/perl-Config-Tiny.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Config-Tiny +Version: 2.30 +Release: %autorelease +Summary: Read/Write .ini style files with as little code as possible +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Config-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RS/RSAVAGE/Config-Tiny-%{version}.tgz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) >= 3.30 +BuildRequires: perl(File::Temp) >= 0.22 +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 1.001002 +BuildRequires: perl(utf8) + +Requires: perl(File::Spec) >= 3.30 +Requires: perl(File::Temp) >= 0.22 + +%description +Config::Tiny is a Perl class to read and write .ini style +configuration files with as little code as possible, reducing load +time and memory overhead. + +%prep +%setup -q -n Config-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changelog.ini Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Crypt-RC4/perl-Crypt-RC4.spec b/SPECS/perl-Crypt-RC4/perl-Crypt-RC4.spec new file mode 100644 index 00000000..06514790 --- /dev/null +++ b/SPECS/perl-Crypt-RC4/perl-Crypt-RC4.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Crypt-RC4 +Version: 2.02 +Release: %autorelease +Summary: Perl implementation of the RC4 encryption algorithm +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/Crypt-RC4 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SI/SIFUKURT/Crypt-RC4-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +A simple implementation of the RC4 algorithm, developed by RSA Security, +Inc. Here is the description from RSA's website: + +%prep +%setup -q -n Crypt-RC4-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DBD-CSV/perl-DBD-CSV.spec b/SPECS/perl-DBD-CSV/perl-DBD-CSV.spec new file mode 100644 index 00000000..9815745c --- /dev/null +++ b/SPECS/perl-DBD-CSV/perl-DBD-CSV.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DBD-CSV +Version: 0.62 +Release: %autorelease +Summary: DBI driver for CSV files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DBD-CSV +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HM/HMBRAND/DBD-CSV-%{version}.tgz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(charnames) +BuildRequires: perl(Config) +BuildRequires: perl(Cwd) +BuildRequires: perl(DBD::File) >= 0.42 +BuildRequires: perl(DBI) >= 1.628 +BuildRequires: perl(Encode) >= 3.12 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(SQL::Statement) >= 1.405 +BuildRequires: perl(Test::Harness) +BuildRequires: perl(Test::More) >= 0.90 +BuildRequires: perl(Text::CSV_XS) >= 1.01 + +Requires: perl(DBD::File) >= 0.42 +Requires: perl(DBI) >= 1.628 +Requires: perl(Encode) >= 3.12 +Requires: perl(SQL::Statement) >= 1.405 +Requires: perl(Test::More) >= 0.90 +Requires: perl(Text::CSV_XS) >= 1.01 + +%description +The DBD::CSV module is yet another driver for the DBI (Database independent +interface for Perl). This one is based on the SQL "engine" SQL::Statement +and the abstract DBI driver DBD::File and implements access to so-called +CSV files (Comma Separated Values). Such files are often used for exporting +MS Access and MS Excel data. + +%prep +%setup -q -n DBD-CSV-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ChangeLog CONTRIBUTING.md README SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DBD-SQLite/perl-DBD-SQLite.spec b/SPECS/perl-DBD-SQLite/perl-DBD-SQLite.spec new file mode 100644 index 00000000..7eba1e14 --- /dev/null +++ b/SPECS/perl-DBD-SQLite/perl-DBD-SQLite.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DBD-SQLite +Version: 1.76 +Release: %autorelease +Summary: Self-contained RDBMS in a DBI Driver +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DBD-SQLite +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(DBI) >= 1.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) >= 0.82 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Tie::Hash) + +Requires: perl(DBI) >= 1.57 + +%description +SQLite is a public domain file-based relational database engine that you +can find at https://www.sqlite.org/. + +%prep +%setup -q -n DBD-SQLite-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes constants.inc dbdimp_tokenizer.inc dbdimp_virtual_table.inc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DBI/perl-DBI.spec b/SPECS/perl-DBI/perl-DBI.spec new file mode 100644 index 00000000..e12d8d6f --- /dev/null +++ b/SPECS/perl-DBI/perl-DBI.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DBI +Version: 1.647 +Release: %autorelease +Summary: Database independent interface for Perl +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DBI +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HM/HMBRAND/DBI-%{version}.tgz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Simple) >= 0.90 + +%description +The DBI is a database access module for the Perl programming language. +It defines a set of methods, variables, and conventions that provide a +consistent database interface, independent of the actual database +being used. + +%prep +%setup -q -n DBI-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ChangeLog Driver.xst README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Data-Compare/perl-Data-Compare.spec b/SPECS/perl-Data-Compare/perl-Data-Compare.spec new file mode 100644 index 00000000..0ca0ea73 --- /dev/null +++ b/SPECS/perl-Data-Compare/perl-Data-Compare.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Data-Compare +Version: 1.29 +Release: %autorelease +Summary: Compare perl data structures +License: Artistic-1.0 OR GPL-1.0-or-later +URL: https://metacpan.org/dist/Data-Compare +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DC/DCANTRELL/Data-Compare-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Clone) >= 0.43 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find::Rule) >= 0.1 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) >= 0.88 + +Requires: perl(Clone) >= 0.43 +Requires: perl(File::Find::Rule) >= 0.1 +Requires: perl(Test::More) >= 0.88 + +%description +Compare two perl data structures recursively. Returns 0 if the structures +differ, else returns 1. + +%prep +%setup -q -n Data-Compare-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc CHANGELOG MAINTAINERS-NOTE NOTES README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Data-Uniqid/perl-Data-Uniqid.spec b/SPECS/perl-Data-Uniqid/perl-Data-Uniqid.spec new file mode 100644 index 00000000..480113e4 --- /dev/null +++ b/SPECS/perl-Data-Uniqid/perl-Data-Uniqid.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Data-Uniqid +Version: 0.12 +Release: %autorelease +Summary: Perl extension for simple genrating of unique id's +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/Data-Uniqid +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MW/MWX/Data-Uniqid-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +Data::Uniqid provides three simple routines for generating unique ids. +These ids are coded with a Base62 systen to make them short and handy (e.g. +to use it as part of a URL). + +%prep +%setup -q -n Data-Uniqid-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Date-ISO8601/perl-Date-ISO8601.spec b/SPECS/perl-Date-ISO8601/perl-Date-ISO8601.spec new file mode 100644 index 00000000..3e5abbf6 --- /dev/null +++ b/SPECS/perl-Date-ISO8601/perl-Date-ISO8601.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Date-ISO8601 +Version: 0.005 +Release: %autorelease +Summary: Three ISO 8601 numerical calendars +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Date-ISO8601 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/Date-ISO8601-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(integer) +BuildRequires: perl(Module::Build) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +The international standard ISO 8601 "Data elements and interchange formats +- Information interchange - Representation of dates and times" defines +three distinct calendars by which days can be labelled. It also defines +textual formats for the representation of dates in these calendars. This +module provides functions to convert dates between these three calendars +and Chronological Julian Day Numbers, which is a suitable format to do +arithmetic with. It also supplies functions that describe the shape of +these calendars, to assist in calendrical calculations. It also supplies +functions to represent dates textually in the ISO 8601 formats. ISO 8601 +also covers time of day and time periods, but this module does nothing +relating to those parts of the standard; this is only about labelling days. + +%prep +%setup -q -n Date-ISO8601-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Date-Manip/perl-Date-Manip.spec b/SPECS/perl-Date-Manip/perl-Date-Manip.spec new file mode 100644 index 00000000..686af795 --- /dev/null +++ b/SPECS/perl-Date-Manip/perl-Date-Manip.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Date-Manip +Version: 6.98 +Release: %autorelease +Summary: Date manipulation routines +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Date-Manip +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SB/SBECK/Date-Manip-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::File) +BuildRequires: perl(Storable) +BuildRequires: perl(Test::Inter) >= 1.09 +BuildRequires: perl(Test::More) +BuildRequires: perl(utf8) + +%description +Date::Manip is a series of modules designed to make any common date/time +operation easy to do. Operations such as comparing two times, determining a +date a given amount of time from another, or parsing international times +are all easily done. It deals with time as it is used in the Gregorian +calendar (the one currently in use) with full support for time changes due +to daylight saving time. + +%prep +%setup -q -n Date-Manip-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README README.first + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-Calendar-Julian/perl-DateTime-Calendar-Julian.spec b/SPECS/perl-DateTime-Calendar-Julian/perl-DateTime-Calendar-Julian.spec new file mode 100644 index 00000000..7b5f85de --- /dev/null +++ b/SPECS/perl-DateTime-Calendar-Julian/perl-DateTime-Calendar-Julian.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-Calendar-Julian +Version: 0.107 +Release: %autorelease +Summary: Dates in the Julian calendar +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DateTime-Calendar-Julian +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/W/WY/WYANT/DateTime-Calendar-Julian-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.4 +BuildRequires: perl(DateTime) >= 1.48 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(DateTime) >= 1.48 + +%description +DateTime::Calendar::Julian implements the Julian Calendar. This module +implements all methods of DateTime; see the DateTime(3) manpage for +all methods. + +%prep +%setup -q -n DateTime-Calendar-Julian-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-Format-Builder/perl-DateTime-Format-Builder.spec b/SPECS/perl-DateTime-Format-Builder/perl-DateTime-Format-Builder.spec new file mode 100644 index 00000000..61f89c91 --- /dev/null +++ b/SPECS/perl-DateTime-Format-Builder/perl-DateTime-Format-Builder.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-Format-Builder +Version: 0.83 +Release: %autorelease +Summary: Create DateTime parser classes and objects +License: Artistic-2.0 +URL: https://metacpan.org/dist/DateTime-Format-Builder +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Builder-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(DateTime) >= 1.00 +BuildRequires: perl(DateTime::Format::Strptime) >= 1.04 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(lib) +BuildRequires: perl(Params::Validate) >= 0.72 +BuildRequires: perl(parent) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +Requires: perl(DateTime) >= 1.00 +Requires: perl(DateTime::Format::Strptime) >= 1.04 +Requires: perl(Params::Validate) >= 0.72 + +%description +DateTime::Format::Builder creates DateTime parsers. Many string formats of +dates and times are simple and just require a basic regular expression to +extract the relevant information. Builder provides a simple way to do this +without writing reams of structural code. + +%prep +%setup -q -n DateTime-Format-Builder-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc README.md tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-Format-Strptime/perl-DateTime-Format-Strptime.spec b/SPECS/perl-DateTime-Format-Strptime/perl-DateTime-Format-Strptime.spec new file mode 100644 index 00000000..824459af --- /dev/null +++ b/SPECS/perl-DateTime-Format-Strptime/perl-DateTime-Format-Strptime.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-Format-Strptime +Version: 1.79 +Release: %autorelease +Summary: Parse and format strp and strf time patterns +License: Artistic-2.0 +URL: https://metacpan.org/dist/DateTime-Format-Strptime +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Format-Strptime-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(DateTime) >= 1.00 +BuildRequires: perl(DateTime::Locale) >= 1.30 +BuildRequires: perl(DateTime::Locale::Base) +BuildRequires: perl(DateTime::Locale::FromData) +BuildRequires: perl(DateTime::TimeZone) >= 2.09 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(lib) +BuildRequires: perl(Params::ValidationCompiler) +BuildRequires: perl(parent) +BuildRequires: perl(Specio) >= 0.33 +BuildRequires: perl(Specio::Declare) +BuildRequires: perl(Specio::Exporter) +BuildRequires: perl(Specio::Library::Builtins) +BuildRequires: perl(Specio::Library::String) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) + +Requires: perl(DateTime) >= 1.00 +Requires: perl(DateTime::Locale) >= 1.30 +Requires: perl(DateTime::TimeZone) >= 2.09 +Requires: perl(Specio) >= 0.33 + +%description +This module implements most of strptime(3), the POSIX function that is the +reverse of strftime(3), for DateTime. While strftime takes a DateTime and a +pattern and returns a string, strptime takes a string and a pattern and +returns the DateTime object associated. + +%prep +%setup -q -n DateTime-Format-Strptime-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml bench Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-Locale/perl-DateTime-Locale.spec b/SPECS/perl-DateTime-Locale/perl-DateTime-Locale.spec new file mode 100644 index 00000000..a4455ba9 --- /dev/null +++ b/SPECS/perl-DateTime-Locale/perl-DateTime-Locale.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-Locale +Version: 1.45 +Release: %autorelease +Summary: Localization support for DateTime.pm +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DateTime-Locale +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-Locale-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.4 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(CPAN::Meta::Check) >= 0.011 +BuildRequires: perl(CPAN::Meta::Requirements) +BuildRequires: perl(Dist::CheckConflicts) >= 0.02 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::ShareDir) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IPC::System::Simple) +BuildRequires: perl(List::Util) >= 1.45 +BuildRequires: perl(namespace::autoclean) >= 0.19 +BuildRequires: perl(Params::ValidationCompiler) >= 0.13 +BuildRequires: perl(Path::Tiny) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Specio::Declare) +BuildRequires: perl(Specio::Library::String) +BuildRequires: perl(Storable) +BuildRequires: perl(strict) +BuildRequires: perl(Term::ANSIColor) +BuildRequires: perl(Test::File::ShareDir::Dist) +BuildRequires: perl(Test::More) >= 1.302015 +BuildRequires: perl(Test2::Plugin::NoWarnings) +BuildRequires: perl(Test2::Plugin::UTF8) +BuildRequires: perl(Test2::Require::Module) +BuildRequires: perl(Test2::V0) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) +# Manual +BuildRequires: perl(File::ShareDir::Install) + +Requires: perl(Dist::CheckConflicts) >= 0.02 +Requires: perl(List::Util) >= 1.45 +Requires: perl(namespace::autoclean) >= 0.19 +Requires: perl(Params::ValidationCompiler) >= 0.13 + +%description +DateTime::Locale is primarily a factory for the various locale subclasses. +It also provides some functions for getting information on all the +available locales. + +%prep +%setup -q -n DateTime-Locale-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE.cldr mise.toml perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-TimeZone-SystemV/perl-DateTime-TimeZone-SystemV.spec b/SPECS/perl-DateTime-TimeZone-SystemV/perl-DateTime-TimeZone-SystemV.spec new file mode 100644 index 00000000..7d3d5f36 --- /dev/null +++ b/SPECS/perl-DateTime-TimeZone-SystemV/perl-DateTime-TimeZone-SystemV.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-TimeZone-SystemV +Version: 0.010 +Release: %autorelease +Summary: System V and POSIX timezone strings +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DateTime-TimeZone-SystemV +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/DateTime-TimeZone-SystemV-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Date::ISO8601) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Params::Classify) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +An instance of this class represents a timezone that was specified by means +of a System V timezone recipe or an extended form of the same syntax (such +as that specified by POSIX). These can express a plain offset from +Universal Time, or a system of two offsets (standard and daylight saving +time) switching on a yearly cycle according to certain types of rule. + +%prep +%setup -q -n DateTime-TimeZone-SystemV-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-TimeZone-Tzfile/perl-DateTime-TimeZone-Tzfile.spec b/SPECS/perl-DateTime-TimeZone-Tzfile/perl-DateTime-TimeZone-Tzfile.spec new file mode 100644 index 00000000..bf77458e --- /dev/null +++ b/SPECS/perl-DateTime-TimeZone-Tzfile/perl-DateTime-TimeZone-Tzfile.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-TimeZone-Tzfile +Version: 0.011 +Release: %autorelease +Summary: Tzfile (zoneinfo) timezone files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DateTime-TimeZone-Tzfile +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/DateTime-TimeZone-Tzfile-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Date::ISO8601) +BuildRequires: perl(DateTime::TimeZone::SystemV) >= 0.009 +BuildRequires: perl(integer) +BuildRequires: perl(IO::File) >= 1.13 +BuildRequires: perl(IO::Handle) >= 1.08 +BuildRequires: perl(Module::Build) +BuildRequires: perl(Params::Classify) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +Requires: perl(DateTime::TimeZone::SystemV) >= 0.009 +Requires: perl(IO::File) >= 1.13 +Requires: perl(IO::Handle) >= 1.08 + +%description +An instance of this class represents a timezone that was encoded in a file +in the tzfile(5) format. These can express arbitrary patterns of offsets +from Universal Time, changing over time. Offsets and change times are +limited to a resolution of one second. + +%prep +%setup -q -n DateTime-TimeZone-Tzfile-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime-TimeZone/perl-DateTime-TimeZone.spec b/SPECS/perl-DateTime-TimeZone/perl-DateTime-TimeZone.spec new file mode 100644 index 00000000..f2d231a6 --- /dev/null +++ b/SPECS/perl-DateTime-TimeZone/perl-DateTime-TimeZone.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime-TimeZone +Version: 2.65 +Release: %autorelease +Summary: Time zone object base class and factory +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DateTime-TimeZone +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.4 +BuildRequires: perl(base) +BuildRequires: perl(Class::Singleton) >= 1.03 +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) >= 3 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Compare) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(Module::Runtime) +BuildRequires: perl(namespace::autoclean) +BuildRequires: perl(overload) +BuildRequires: perl(Params::ValidationCompiler) >= 0.13 +BuildRequires: perl(parent) +BuildRequires: perl(Specio::Library::Builtins) +BuildRequires: perl(Specio::Library::String) +BuildRequires: perl(Storable) +BuildRequires: perl(strict) +BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(warnings) + +Requires: perl(Class::Singleton) >= 1.03 +Requires: perl(Cwd) >= 3 +Requires: perl(List::Util) >= 1.33 +Requires: perl(Params::ValidationCompiler) >= 0.13 + +%description +This class is the base class for all time zone objects. A time zone is +represented internally as a set of observances, each of which describes the +offset from GMT for a given time period. + +%prep +%setup -q -n DateTime-TimeZone-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DateTime/perl-DateTime.spec b/SPECS/perl-DateTime/perl-DateTime.spec new file mode 100644 index 00000000..700ab603 --- /dev/null +++ b/SPECS/perl-DateTime/perl-DateTime.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DateTime +Version: 1.66 +Release: %autorelease +Summary: Date and time object for Perl +License: Artistic-2.0 +URL: https://metacpan.org/dist/DateTime +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.4 +BuildRequires: perl(Carp) +BuildRequires: perl(CPAN::Meta::Check) >= 0.011 +BuildRequires: perl(CPAN::Meta::Requirements) +BuildRequires: perl(DateTime::Locale) >= 1.06 +BuildRequires: perl(DateTime::TimeZone) >= 2.44 +BuildRequires: perl(Dist::CheckConflicts) >= 0.02 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(integer) +BuildRequires: perl(namespace::autoclean) >= 0.19 +BuildRequires: perl(overload) +BuildRequires: perl(Params::ValidationCompiler) >= 0.26 +BuildRequires: perl(parent) +BuildRequires: perl(POSIX) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Specio) >= 0.50 +BuildRequires: perl(Specio::Declare) +BuildRequires: perl(Specio::Exporter) +BuildRequires: perl(Specio::Library::Builtins) +BuildRequires: perl(Specio::Library::Numeric) +BuildRequires: perl(Specio::Library::String) +BuildRequires: perl(Specio::Subs) +BuildRequires: perl(Storable) +BuildRequires: perl(strict) +BuildRequires: perl(Term::ANSIColor) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Warnings) >= 0.005 +BuildRequires: perl(Test::Without::Module) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) +BuildRequires: perl(warnings::register) +BuildRequires: perl(XSLoader) + +Requires: perl(DateTime::Locale) >= 1.06 +Requires: perl(DateTime::TimeZone) >= 2.44 +Requires: perl(Dist::CheckConflicts) >= 0.02 +Requires: perl(namespace::autoclean) >= 0.19 +Requires: perl(Params::ValidationCompiler) >= 0.26 +Requires: perl(Specio) >= 0.50 + +%description +DateTime is a class for the representation of date/time combinations, and +is part of the Perl DateTime project. + +%prep +%setup -q -n DateTime-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md CREDITS leaptab.txt perlcriticrc perltidyrc precious.toml README.md TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-CallChecker/perl-Devel-CallChecker.spec b/SPECS/perl-Devel-CallChecker/perl-Devel-CallChecker.spec new file mode 100644 index 00000000..000935d4 --- /dev/null +++ b/SPECS/perl-Devel-CallChecker/perl-Devel-CallChecker.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-CallChecker +Version: 0.009 +Release: %autorelease +Summary: Custom op checking attached to subroutines +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Devel-CallChecker +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/Devel-CallChecker-%{version}.tar.gz + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(DynaLoader) +BuildRequires: perl(DynaLoader::Functions) >= 0.001 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::CBuilder) >= 0.15 +BuildRequires: perl(ExtUtils::ParseXS) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::File) >= 1.03 +BuildRequires: perl(Module::Build) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +Requires: perl(DynaLoader::Functions) >= 0.001 + +%description +This module makes some new features of the Perl 5.14.0 C API available to +XS modules running on older versions of Perl. The features are centred +around the function cv_set_call_checker, which allows XS code to attach a +magical annotation to a Perl subroutine, resulting in resolvable calls to +that subroutine being mutated at compile time by arbitrary C code. This +module makes cv_set_call_checker and several supporting functions +available. (It is possible to achieve the effect of cv_set_call_checker +from XS code on much earlier Perl versions, but it is painful to achieve +without the centralised facility.) + +%prep +%setup -q -n Devel-CallChecker-%{version} + +%build +perl Build.PL --installdirs=vendor optimize="%{optflags}" +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-Caller/perl-Devel-Caller.spec b/SPECS/perl-Devel-Caller/perl-Devel-Caller.spec new file mode 100644 index 00000000..7e068b0c --- /dev/null +++ b/SPECS/perl-Devel-Caller/perl-Devel-Caller.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-Caller +Version: 2.07 +Release: %autorelease +Summary: Meatier versions of caller +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Devel-Caller +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/Devel-Caller-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(PadWalker) >= 0.08 +BuildRequires: perl(Test::More) + +Requires: perl(PadWalker) >= 0.08 + +%description +caller_cv($level) + +%prep +%setup -q -n Devel-Caller-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-Cycle/perl-Devel-Cycle.spec b/SPECS/perl-Devel-Cycle/perl-Devel-Cycle.spec new file mode 100644 index 00000000..766dedb8 --- /dev/null +++ b/SPECS/perl-Devel-Cycle/perl-Devel-Cycle.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-Cycle +Version: 1.12 +Release: %autorelease +Summary: Find memory cycles in objects +License: Artistic-1.0 OR GPL-1.0-or-later +URL: https://metacpan.org/dist/Devel-Cycle +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LD/LDS/Devel-Cycle-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) + +%description +This is a simple developer's tool for finding circular references in +objects and other types of references. Because of Perl's reference-count +based memory management, circular references will cause memory leaks. + +%prep +%setup -q -n Devel-Cycle-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-GlobalDestruction/perl-Devel-GlobalDestruction.spec b/SPECS/perl-Devel-GlobalDestruction/perl-Devel-GlobalDestruction.spec new file mode 100644 index 00000000..47baedce --- /dev/null +++ b/SPECS/perl-Devel-GlobalDestruction/perl-Devel-GlobalDestruction.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-GlobalDestruction +Version: 0.14 +Release: %autorelease +Summary: Provides function returning the equivalent of ${^GLOBAL_PHASE} eq 'DESTRUCT' for older perls +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Devel-GlobalDestruction +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Devel-GlobalDestruction-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Sub::Exporter::Progressive) >= 0.001011 + +Requires: perl(Sub::Exporter::Progressive) >= 0.001011 + +%description +Perl's global destruction is a little tricky to deal with WRT finalizers +because it's not ordered and objects can sometimes disappear. + +%prep +%setup -q -n Devel-GlobalDestruction-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-Hide/perl-Devel-Hide.spec b/SPECS/perl-Devel-Hide/perl-Devel-Hide.spec new file mode 100644 index 00000000..26b443c8 --- /dev/null +++ b/SPECS/perl-Devel-Hide/perl-Devel-Hide.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-Hide +Version: 0.0015 +Release: %autorelease +Summary: Forces the unavailability of specified Perl modules (for testing) +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Devel-Hide +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DC/DCANTRELL/Devel-Hide-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Test::More) >= 0.82 + +%description +Given a list of Perl modules/filenames, this module makes require and +use statements fail (no matter the specified files/modules are +installed or not). + +%prep +%setup -q -n Devel-Hide-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-LexAlias/perl-Devel-LexAlias.spec b/SPECS/perl-Devel-LexAlias/perl-Devel-LexAlias.spec new file mode 100644 index 00000000..f22cdfa3 --- /dev/null +++ b/SPECS/perl-Devel-LexAlias/perl-Devel-LexAlias.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-LexAlias +Version: 0.05 +Release: %autorelease +Summary: Alias lexical variables +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Devel-LexAlias +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/Devel-LexAlias-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Devel::Caller) >= 0.03 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +Requires: perl(Devel::Caller) >= 0.03 + +%description +Devel::LexAlias provides the ability to alias a lexical variable in a +subroutines scope to one of your choosing. + +%prep +%setup -q -n Devel-LexAlias-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-StackTrace/perl-Devel-StackTrace.spec b/SPECS/perl-Devel-StackTrace/perl-Devel-StackTrace.spec new file mode 100644 index 00000000..3cb30666 --- /dev/null +++ b/SPECS/perl-Devel-StackTrace/perl-Devel-StackTrace.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-StackTrace +Version: 2.05 +Release: %autorelease +Summary: Object representing a stack trace +License: Artistic-2.0 +URL: https://metacpan.org/dist/Devel-StackTrace +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Devel-StackTrace-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(bytes) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +%description +The Devel::StackTrace module contains two classes, Devel::StackTrace and +Devel::StackTrace::Frame. These objects encapsulate the information that +can retrieved via Perl's caller function, as well as providing a simple +interface to this data. + +%prep +%setup -q -n Devel-StackTrace-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Devel-Symdump/perl-Devel-Symdump.spec b/SPECS/perl-Devel-Symdump/perl-Devel-Symdump.spec new file mode 100644 index 00000000..95d007ab --- /dev/null +++ b/SPECS/perl-Devel-Symdump/perl-Devel-Symdump.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Devel-Symdump +Version: 2.18 +Release: %autorelease +Summary: Dump symbol names or the symbol table +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Devel-Symdump +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AN/ANDK/Devel-Symdump-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.4.0 +BuildRequires: perl(Compress::Zlib) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +This little package serves to access the symbol table of perl. + +%prep +%setup -q -n Devel-Symdump-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Digest-Perl-MD5/perl-Digest-Perl-MD5.spec b/SPECS/perl-Digest-Perl-MD5/perl-Digest-Perl-MD5.spec new file mode 100644 index 00000000..f9fa8602 --- /dev/null +++ b/SPECS/perl-Digest-Perl-MD5/perl-Digest-Perl-MD5.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Digest-Perl-MD5 +Version: 1.9 +Release: %autorelease +Summary: Digest::Perl::MD5 Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Digest-Perl-MD5 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DE/DELTA/Digest-Perl-MD5-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This modules has the same interface as the much faster Digest::MD5. So you +can easily exchange them, e.g. + +%prep +%setup -q -n Digest-Perl-MD5-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc CHANGES rand.f + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Dist-CheckConflicts/perl-Dist-CheckConflicts.spec b/SPECS/perl-Dist-CheckConflicts/perl-Dist-CheckConflicts.spec new file mode 100644 index 00000000..bc548052 --- /dev/null +++ b/SPECS/perl-Dist-CheckConflicts/perl-Dist-CheckConflicts.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Dist-CheckConflicts +Version: 0.11 +Release: %autorelease +Summary: Declare version conflicts for your dist +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Dist-CheckConflicts +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DO/DOY/Dist-CheckConflicts-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Runtime) >= 0.009 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +Requires: perl(Module::Runtime) >= 0.009 + +%description +One shortcoming of the CPAN clients that currently exist is that they have +no way of specifying conflicting downstream dependencies of modules. This +module attempts to work around this issue by allowing you to specify +conflicting versions of modules separately, and deal with them after the +module is done installing. + +%prep +%setup -q -n Dist-CheckConflicts-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-DynaLoader-Functions/perl-DynaLoader-Functions.spec b/SPECS/perl-DynaLoader-Functions/perl-DynaLoader-Functions.spec new file mode 100644 index 00000000..5bf0d167 --- /dev/null +++ b/SPECS/perl-DynaLoader-Functions/perl-DynaLoader-Functions.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-DynaLoader-Functions +Version: 0.004 +Release: %autorelease +Summary: Deconstructed dynamic C library loading +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/DynaLoader-Functions +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/DynaLoader-Functions-%{version}.tar.gz + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Config) +BuildRequires: perl(DynaLoader) +BuildRequires: perl(Exporter) +BuildRequires: perl(Module::Build) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +This module provides a function-based interface to dynamic loading as used +by Perl. Some details of dynamic loading are very platform-dependent, so +correct use of these functions requires the programmer to be mindful of the +space of platform variations. + +%prep +%setup -q -n DynaLoader-Functions-%{version} + +%build +perl Build.PL --installdirs=vendor optimize="%{optflags}" +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Encode-EUCJPASCII/perl-Encode-EUCJPASCII.spec b/SPECS/perl-Encode-EUCJPASCII/perl-Encode-EUCJPASCII.spec new file mode 100644 index 00000000..cdfab1aa --- /dev/null +++ b/SPECS/perl-Encode-EUCJPASCII/perl-Encode-EUCJPASCII.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Encode-EUCJPASCII +Version: 0.03 +Release: %autorelease +Summary: EucJP-ascii - An eucJP-open mapping +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Encode-EUCJPASCII +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/N/NE/NEZUMI/Encode-EUCJPASCII-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Encode) >= 1.41 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +Requires: perl(Encode) >= 1.41 + +%description +This module provides eucJP-ascii, one of eucJP-open mappings, and its +derivative. Following encodings are supported. + +%prep +%setup -q -n Encode-EUCJPASCII-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Encode-HanExtra/perl-Encode-HanExtra.spec b/SPECS/perl-Encode-HanExtra/perl-Encode-HanExtra.spec new file mode 100644 index 00000000..b9c100ab --- /dev/null +++ b/SPECS/perl-Encode-HanExtra/perl-Encode-HanExtra.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Encode-HanExtra +Version: 0.23 +Release: %autorelease +Summary: Extra sets of Chinese encodings +License: MIT +URL: https://metacpan.org/dist/Encode-HanExtra +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AU/AUDREYT/Encode-HanExtra-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.7.3 +BuildRequires: perl(Encode) >= 1.41 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(inc::Module::Install) + +Requires: perl(Encode) >= 1.41 + +%description +Perl 5.7.3 and later ships with an adequate set of Chinese encodings, +including the commonly used CP950, CP936 (also known as GBK), Big5 (alias +for Big5-Eten), Big5-HKSCS, EUC-CN, HZ, and ISO-IR-165. + +%prep +%setup -q -n Encode-HanExtra-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Encode-JIS2K/perl-Encode-JIS2K.spec b/SPECS/perl-Encode-JIS2K/perl-Encode-JIS2K.spec new file mode 100644 index 00000000..66011791 --- /dev/null +++ b/SPECS/perl-Encode-JIS2K/perl-Encode-JIS2K.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Encode-JIS2K +Version: 0.05 +Release: %autorelease +Summary: JIS X 0212 (aka JIS 2000) Encodings +License: Artistic-1.0 +URL: https://metacpan.org/dist/Encode-JIS2K +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DANKOGAI/Encode-JIS2K-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Encode) >= 1.41 +BuildRequires: perl(ExtUtils::MakeMaker) + +Requires: perl(Encode) >= 1.41 + +%description +To find out how to use this module in detail, see Encode. + +%prep +%setup -q -n Encode-JIS2K-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Encode-Locale/perl-Encode-Locale.spec b/SPECS/perl-Encode-Locale/perl-Encode-Locale.spec new file mode 100644 index 00000000..9ceaaceb --- /dev/null +++ b/SPECS/perl-Encode-Locale/perl-Encode-Locale.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Encode-Locale +Version: 1.05 +Release: %autorelease +Summary: Determine the locale encoding +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Encode-Locale +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GA/GAAS/Encode-Locale-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Encode) >= 2 +BuildRequires: perl(Encode::Alias) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(I18N::Langinfo) +BuildRequires: perl(Test::More) + +Requires: perl(Encode) >= 2 + +%description +In many applications it's wise to let Perl use Unicode for the strings it +processes. Most of the interfaces Perl has to the outside world are still +byte based. Programs therefore need to decode byte strings that enter the +program from the outside and encode them again on the way out. + +%prep +%setup -q -n Encode-Locale-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Error/perl-Error.spec b/SPECS/perl-Error/perl-Error.spec new file mode 100644 index 00000000..f2235c82 --- /dev/null +++ b/SPECS/perl-Error/perl-Error.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Error +Version: 0.17030 +Release: %autorelease +Summary: Error/exception handling in an OO-ish way +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Error +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/Error-%{version}.tar.gz +BuildArch: noarch +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Build) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +%description +The Error package provides two interfaces. Firstly Error provides a +procedural interface to exception handling. Secondly Error is a base class +for errors/exceptions that can either be thrown, for subsequent catch, or +can simply be recorded. + +%prep +%setup -q -n Error-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_gen_filelist + +%files -f %{name}.files +%doc ChangeLog Changes examples README scripts weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Eval-Closure/perl-Eval-Closure.spec b/SPECS/perl-Eval-Closure/perl-Eval-Closure.spec new file mode 100644 index 00000000..ace7234b --- /dev/null +++ b/SPECS/perl-Eval-Closure/perl-Eval-Closure.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Eval-Closure +Version: 0.14 +Release: %autorelease +Summary: Safely and cleanly create closures via string eval +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Eval-Closure +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DO/DOY/Eval-Closure-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(B) +BuildRequires: perl(blib) >= 1.01 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Devel::LexAlias) >= 0.05 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(overload) +BuildRequires: perl(Perl::Tidy) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Requires) +BuildRequires: perl(warnings) + +Requires: perl(Devel::LexAlias) >= 0.05 + +%description +String eval is often used for dynamic code generation. For instance, Moose +uses it heavily, to generate inlined versions of accessors and +constructors, which speeds code up at runtime by a significant amount. +String eval is not without its issues however - it's difficult to control +the scope it's used in (which determines which variables are in scope +inside the eval), and it's easy to miss compilation errors, since eval +catches them and sticks them in $@ instead. + +%prep +%setup -q -n Eval-Closure-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Exception-Class/perl-Exception-Class.spec b/SPECS/perl-Exception-Class/perl-Exception-Class.spec new file mode 100644 index 00000000..36b84acc --- /dev/null +++ b/SPECS/perl-Exception-Class/perl-Exception-Class.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Exception-Class +Version: 1.45 +Release: %autorelease +Summary: Module that allows you to declare real exception classes in Perl +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Exception-Class +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Exception-Class-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Class::Data::Inheritable) >= 0.02 +BuildRequires: perl(Devel::StackTrace) >= 2.00 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +Requires: perl(Class::Data::Inheritable) >= 0.02 +Requires: perl(Devel::StackTrace) >= 2.00 + +%description +RECOMMENDATION 1: If you are writing modern Perl code with Moose or Moo I +highly recommend using Throwable instead of this module. + +%prep +%setup -q -n Exception-Class-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Exporter-Tiny/perl-Exporter-Tiny.spec b/SPECS/perl-Exporter-Tiny/perl-Exporter-Tiny.spec new file mode 100644 index 00000000..422ff831 --- /dev/null +++ b/SPECS/perl-Exporter-Tiny/perl-Exporter-Tiny.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Exporter-Tiny +Version: 1.006002 +Release: %autorelease +Summary: Exporter with the features of Sub::Exporter but only core dependencies +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Exporter-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.47 + +%description +Exporter::Tiny supports many of Sub::Exporter's external-facing features +including renaming imported functions with the -as, -prefix and -suffix +options; explicit destinations with the into option; and alternative +installers with the installer option. But it's written in only about 40% as +many lines of code and with zero non-core dependencies. + +%prep +%setup -q -n Exporter-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CREDITS doap.ttl NEWS README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-ExtUtils-Config/perl-ExtUtils-Config.spec b/SPECS/perl-ExtUtils-Config/perl-ExtUtils-Config.spec new file mode 100644 index 00000000..0e8ff6b7 --- /dev/null +++ b/SPECS/perl-ExtUtils-Config/perl-ExtUtils-Config.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-ExtUtils-Config +Version: 0.010 +Release: %autorelease +Summary: Wrapper for perl's configuration +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/ExtUtils-Config +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker::Config) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +%description +ExtUtils::Config is an abstraction around the %Config hash. By itself it is +not a particularly interesting module by any measure, however it ties +together a family of modern toolchain modules. + +%prep +%setup -q -n ExtUtils-Config-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-ExtUtils-HasCompiler/perl-ExtUtils-HasCompiler.spec b/SPECS/perl-ExtUtils-HasCompiler/perl-ExtUtils-HasCompiler.spec new file mode 100644 index 00000000..425bc3e3 --- /dev/null +++ b/SPECS/perl-ExtUtils-HasCompiler/perl-ExtUtils-HasCompiler.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-ExtUtils-HasCompiler +Version: 0.025 +Release: %autorelease +Summary: Check for the presence of a compiler +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/ExtUtils-HasCompiler +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/ExtUtils-HasCompiler-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) +BuildRequires: perl(DynaLoader) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::Mksymlists) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +This module tries to check if the current system is capable of compiling, +linking and loading an XS module. + +%prep +%setup -q -n ExtUtils-HasCompiler-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-ExtUtils-Helpers/perl-ExtUtils-Helpers.spec b/SPECS/perl-ExtUtils-Helpers/perl-ExtUtils-Helpers.spec new file mode 100644 index 00000000..cec3c3ea --- /dev/null +++ b/SPECS/perl-ExtUtils-Helpers/perl-ExtUtils-Helpers.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-ExtUtils-Helpers +Version: 0.028 +Release: %autorelease +Summary: Various portability utilities for module builders +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/ExtUtils-Helpers +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(lib) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(Text::ParseWords) >= 3.24 +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 +Requires: perl(Text::ParseWords) >= 3.24 + +%description +This module provides various portable helper functions for module +building modules. + +%prep +%setup -q -n ExtUtils-Helpers-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-ExtUtils-InstallPaths/perl-ExtUtils-InstallPaths.spec b/SPECS/perl-ExtUtils-InstallPaths/perl-ExtUtils-InstallPaths.spec new file mode 100644 index 00000000..0098a89f --- /dev/null +++ b/SPECS/perl-ExtUtils-InstallPaths/perl-ExtUtils-InstallPaths.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-ExtUtils-InstallPaths +Version: 0.014 +Release: %autorelease +Summary: Build.PL install path logic made easy +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/ExtUtils-InstallPaths +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::Config) >= 0.009 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) >= 0.83 +BuildRequires: perl(File::Temp) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +Requires: perl(ExtUtils::Config) >= 0.009 + +%description +This module tries to make install path resolution as easy as possible. + +%prep +%setup -q -n ExtUtils-InstallPaths-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-ExtUtils-LibBuilder/perl-ExtUtils-LibBuilder.spec b/SPECS/perl-ExtUtils-LibBuilder/perl-ExtUtils-LibBuilder.spec new file mode 100644 index 00000000..5e4bef14 --- /dev/null +++ b/SPECS/perl-ExtUtils-LibBuilder/perl-ExtUtils-LibBuilder.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-ExtUtils-LibBuilder +Version: 0.09 +Release: %autorelease +Summary: ExtUtils::LibBuilder Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/ExtUtils-LibBuilder +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AM/AMBS/ExtUtils-LibBuilder-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::CBuilder) >= 0.23 +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) + +%description +Some Perl modules need to ship C libraries together with their Perl code. +Although there are mechanisms to compile and link (or glue) C code in your +Perl programs, there isn't a clear method to compile standard, self- +contained C libraries. + +%prep +%setup -q -n ExtUtils-LibBuilder-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-ExtUtils-PkgConfig/perl-ExtUtils-PkgConfig.spec b/SPECS/perl-ExtUtils-PkgConfig/perl-ExtUtils-PkgConfig.spec new file mode 100644 index 00000000..54094919 --- /dev/null +++ b/SPECS/perl-ExtUtils-PkgConfig/perl-ExtUtils-PkgConfig.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-ExtUtils-PkgConfig +Version: 1.16 +Release: %autorelease +Summary: Simplistic interface to pkg-config +License: LGPL-2.0-or-later +URL: https://metacpan.org/dist/ExtUtils-PkgConfig +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +The pkg-config program retrieves information about installed libraries, +usually for the purposes of compiling against and linking to them. + +%prep +%setup -q -n ExtUtils-PkgConfig-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes perl-ExtUtils-PkgConfig.doap README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-FFI-CheckLib/perl-FFI-CheckLib.spec b/SPECS/perl-FFI-CheckLib/perl-FFI-CheckLib.spec new file mode 100644 index 00000000..774cc12b --- /dev/null +++ b/SPECS/perl-FFI-CheckLib/perl-FFI-CheckLib.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-FFI-CheckLib +Version: 0.31 +Release: %autorelease +Summary: Check that a library is available for FFI +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/FFI-CheckLib +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Which) +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(Test2::API) >= 1.302015 +BuildRequires: perl(Test2::Require::EnvVar) >= 0.000121 +BuildRequires: perl(Test2::Require::Module) >= 0.000121 +BuildRequires: perl(Test2::V0) >= 0.000121 + +Requires: perl(List::Util) >= 1.33 + +%description +This module checks whether a particular dynamic library is available for +FFI to use. It is modeled heavily on Devel::CheckLib, but will find dynamic +libraries even when development packages are not installed. It also +provides a find_lib function that will return the full path to the found +dynamic library, which can be feed directly into FFI::Platypus or another +FFI system. + +%prep +%setup -q -n FFI-CheckLib-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc author.yml Changes perlcriticrc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Copy-Recursive/perl-File-Copy-Recursive.spec b/SPECS/perl-File-Copy-Recursive/perl-File-Copy-Recursive.spec new file mode 100644 index 00000000..28fc8f55 --- /dev/null +++ b/SPECS/perl-File-Copy-Recursive/perl-File-Copy-Recursive.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Copy-Recursive +Version: 0.45 +Release: %autorelease +Summary: Perl extension for recursively copying files and directories +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Copy-Recursive +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DM/DMUEY/File-Copy-Recursive-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Cwd) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Glob) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Path::Tiny) +BuildRequires: perl(Test::Deep) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::File) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Warnings) + +%description +This module copies and moves directories recursively (or single files, +well... singley) to an optional depth and attempts to preserve each file or +directory's mode. + +%prep +%setup -q -n File-Copy-Recursive-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Find-Rule-Perl/perl-File-Find-Rule-Perl.spec b/SPECS/perl-File-Find-Rule-Perl/perl-File-Find-Rule-Perl.spec new file mode 100644 index 00000000..b6b0ab79 --- /dev/null +++ b/SPECS/perl-File-Find-Rule-Perl/perl-File-Find-Rule-Perl.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Find-Rule-Perl +Version: 1.16 +Release: %autorelease +Summary: Common rules for searching for Perl things +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Find-Rule-Perl +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/File-Find-Rule-Perl-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find::Rule) >= 0.20 +BuildRequires: perl(File::Spec) >= 0.82 +BuildRequires: perl(Params::Util) >= 0.38 +BuildRequires: perl(Parse::CPAN::Meta) >= 1.38 +BuildRequires: perl(Test::More) + +Requires: perl(File::Find::Rule) >= 0.20 +Requires: perl(File::Spec) >= 0.82 +Requires: perl(Params::Util) >= 0.38 +Requires: perl(Parse::CPAN::Meta) >= 1.38 + +%description +I write a lot of things that muck with Perl files. And it always annoyed +me that finding "perl files" requires a moderately complex +File::Find::Rule pattern. + +%prep +%setup -q -n File-Find-Rule-Perl-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Find-Rule/perl-File-Find-Rule.spec b/SPECS/perl-File-Find-Rule/perl-File-Find-Rule.spec new file mode 100644 index 00000000..a818488c --- /dev/null +++ b/SPECS/perl-File-Find-Rule/perl-File-Find-Rule.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Find-Rule +Version: 0.35 +Release: %autorelease +Summary: Alternative interface to File::Find +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Find-Rule +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/File-Find-Rule-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Number::Compare) +BuildRequires: perl(Test::More) +BuildRequires: perl(Text::Glob) >= 0.07 + +Requires: perl(Text::Glob) >= 0.07 + +%description +File::Find::Rule is a friendlier interface to File::Find. It allows you to +build rules which specify the desired files and directories. + +%prep +%setup -q -n File-Find-Rule-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes findrule + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-HomeDir/perl-File-HomeDir.spec b/SPECS/perl-File-HomeDir/perl-File-HomeDir.spec new file mode 100644 index 00000000..096c54a0 --- /dev/null +++ b/SPECS/perl-File-HomeDir/perl-File-HomeDir.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-HomeDir +Version: 1.006 +Release: %autorelease +Summary: Find your home and other directories on any platform +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-HomeDir +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/File-HomeDir-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.3 +BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) >= 3 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Path) >= 2.01 +BuildRequires: perl(File::Spec) >= 3 +BuildRequires: perl(File::Temp) >= 0.19 +BuildRequires: perl(File::Which) >= 0.05 +# Bruh we are on Linux +#BuildRequires: perl(Mac::SystemDirectory) >= 0.04 +BuildRequires: perl(Test::More) >= 0.9 + +Requires: perl(Cwd) >= 3.12 +Requires: perl(File::Path) >= 2.01 +Requires: perl(File::Spec) >= 3.12 +Requires: perl(File::Temp) >= 0.19 +Requires: perl(File::Which) >= 0.05 + +%description +File::HomeDir is a module for locating the directories that are "owned" by +a user (typically your user) and to solve the various issues that arise +trying to find them consistently across a wide variety of platforms. + +%prep +%setup -q -n File-HomeDir-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Listing/perl-File-Listing.spec b/SPECS/perl-File-Listing/perl-File-Listing.spec new file mode 100644 index 00000000..c206f060 --- /dev/null +++ b/SPECS/perl-File-Listing/perl-File-Listing.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Listing +Version: 6.16 +Release: %autorelease +Summary: Parse directory listing +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Listing +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/File-Listing-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(HTTP::Date) +BuildRequires: perl(Test::More) >= 0.98 + +Requires: perl(Exporter) >= 5.57 + +%description +This module exports a single function called parse_dir, which can be used +to parse directory listings. + +%prep +%setup -q -n File-Listing-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc author.yml Changes Changes.original perlcriticrc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Remove/perl-File-Remove.spec b/SPECS/perl-File-Remove/perl-File-Remove.spec new file mode 100644 index 00000000..841e040a --- /dev/null +++ b/SPECS/perl-File-Remove/perl-File-Remove.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Remove +Version: 1.61 +Release: %autorelease +Summary: Remove files and directories +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Remove +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/File-Remove-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) >= 3.29 +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Glob) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) >= 3.29 +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(Module::Build) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(Cwd) >= 3.29 +Requires: perl(File::Spec) >= 3.29 + +%description +File::Remove::remove removes files and directories. It acts like /bin/rm, +for the most part. Although unlink can be given a list of files, it will +not remove directories; this module remedies that. It also accepts +wildcards, * and ?, as arguments for filenames. + +%prep +%setup -q -n File-Remove-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README scripts weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-ShareDir-Install/perl-File-ShareDir-Install.spec b/SPECS/perl-File-ShareDir-Install/perl-File-ShareDir-Install.spec new file mode 100644 index 00000000..a010c06c --- /dev/null +++ b/SPECS/perl-File-ShareDir-Install/perl-File-ShareDir-Install.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-ShareDir-Install +Version: 0.14 +Release: %autorelease +Summary: Install shared files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-ShareDir-Install +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/File-ShareDir-Install-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Dir) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +File::ShareDir::Install allows you to install read-only data files from a +distribution. It is a companion module to File::ShareDir, which allows you +to locate these files after installation. + +%prep +%setup -q -n File-ShareDir-Install-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README testrules.yml + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-ShareDir/perl-File-ShareDir.spec b/SPECS/perl-File-ShareDir/perl-File-ShareDir.spec new file mode 100644 index 00000000..04c0e8a4 --- /dev/null +++ b/SPECS/perl-File-ShareDir/perl-File-ShareDir.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-ShareDir +Version: 1.118 +Release: %autorelease +Summary: Locate per-dist and per-module shared files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-ShareDir +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/File-ShareDir-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(Class::Inspector) >= 1.12 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Path) >= 2.08 +BuildRequires: perl(File::ShareDir::Install) >= 0.13 +BuildRequires: perl(File::Spec) >= 0.80 +BuildRequires: perl(List::MoreUtils) >= 0.428 +BuildRequires: perl(Params::Util) >= 1.07 +BuildRequires: perl(Test::More) >= 0.90 +BuildRequires: perl(warnings) + +Requires: perl(Class::Inspector) >= 1.12 +Requires: perl(File::Spec) >= 0.80 +Requires: perl(List::MoreUtils) >= 0.428 +Requires: perl(Params::Util) >= 1.07 + +%description +The intent of File::ShareDir is to provide a companion to Class::Inspector +and File::HomeDir, modules that take a process that is well-known by +advanced Perl developers but gets a little tricky, and make it more +available to the larger Perl community. + +%prep +%setup -q -n File-ShareDir-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md testrules.yml + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Slurper/perl-File-Slurper.spec b/SPECS/perl-File-Slurper/perl-File-Slurper.spec new file mode 100644 index 00000000..825d6569 --- /dev/null +++ b/SPECS/perl-File-Slurper/perl-File-Slurper.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Slurper +Version: 0.014 +Release: %autorelease +Summary: Simple, sane and efficient module to slurp a file +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Slurper +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/File-Slurper-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Encode) >= 2.11 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(PerlIO::encoding) +BuildRequires: perl(PerlIO::utf8_strict) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(warnings) + +Requires: perl(Encode) >= 2.11 +Requires: perl(Exporter) >= 5.57 + +%description +This module provides functions for fast and correct slurping and spewing. +All functions are optionally exported. All functions throw exceptions on +errors, write functions don't return any meaningful value. + +%prep +%setup -q -n File-Slurper-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc bench Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-Which/perl-File-Which.spec b/SPECS/perl-File-Which/perl-File-Which.spec new file mode 100644 index 00000000..c4c98b76 --- /dev/null +++ b/SPECS/perl-File-Which/perl-File-Which.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-Which +Version: 1.27 +Release: %autorelease +Summary: Perl implementation of the which utility as an API +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-Which +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PL/PLICEASE/File-Which-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Env) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.47 + +%description +File::Which finds the full or relative paths to executable programs on the +system. This is normally the function of which utility. which is typically +implemented as either a program or a built in shell command. On some +platforms, such as Microsoft Windows it is not provided as part of the core +operating system. This module provides a consistent API to this +functionality regardless of the underlying platform. + +%prep +%setup -q -n File-Which-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc author.yml Changes perlcriticrc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-File-chdir/perl-File-chdir.spec b/SPECS/perl-File-chdir/perl-File-chdir.spec new file mode 100644 index 00000000..2dcc82e2 --- /dev/null +++ b/SPECS/perl-File-chdir/perl-File-chdir.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-File-chdir +Version: 0.1011 +Release: %autorelease +Summary: More sensible way to change directories +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/File-chdir +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/File-chdir-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) >= 3.16 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) >= 3.27 +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(Cwd) >= 3.16 +Requires: perl(File::Spec::Functions) >= 3.27 + +%description +Perl's chdir() has the unfortunate problem of being very, very, very +global. If any part of your program calls chdir() or if any library you +use calls chdir(), it changes the current working directory for the +*whole* program. + +%prep +%setup -q -n File-chdir-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.mkdn perlcritic.rc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Font-AFM/perl-Font-AFM.spec b/SPECS/perl-Font-AFM/perl-Font-AFM.spec new file mode 100644 index 00000000..8caf8490 --- /dev/null +++ b/SPECS/perl-Font-AFM/perl-Font-AFM.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Font-AFM +Version: 1.20 +Release: %autorelease +Summary: Interface to Adobe Font Metrics files +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/Font-AFM +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GA/GAAS/Font-AFM-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module implements the Font::AFM class. Objects of this class are +initialised from an AFM (Adobe Font Metrics) file and allow you to +obtain information about the font and the metrics of the various glyphs +in the font. + +%prep +%setup -q -n Font-AFM-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes make_metrics README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Font-TTF/perl-Font-TTF.spec b/SPECS/perl-Font-TTF/perl-Font-TTF.spec new file mode 100644 index 00000000..fcef2cf9 --- /dev/null +++ b/SPECS/perl-Font-TTF/perl-Font-TTF.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Font-TTF +Version: 1.06 +Release: %autorelease +Summary: Perl module for TrueType Font hacking +License: Artistic-2.0 +URL: https://metacpan.org/dist/Font-TTF +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BH/BHALLISSY/Font-TTF-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module allows you to do almost anything to a TrueType/OpenType Font +including modify and inspect nearly all tables. + +%prep +%setup -q -n Font-TTF-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTORS README.TXT TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTML-Form/perl-HTML-Form.spec b/SPECS/perl-HTML-Form/perl-HTML-Form.spec new file mode 100644 index 00000000..3e8b2e4c --- /dev/null +++ b/SPECS/perl-HTML-Form/perl-HTML-Form.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTML-Form +Version: 6.12 +Release: %autorelease +Summary: Class that represents an HTML form element +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTML-Form +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/HTML-Form-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(Encode) >= 2 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(HTML::TokeParser) +BuildRequires: perl(HTTP::Request) >= 6 +BuildRequires: perl(HTTP::Request::Common) >= 6.03 +BuildRequires: perl(HTTP::Response) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(URI) >= 1.10 +BuildRequires: perl(warnings) + +Requires: perl(Encode) >= 2 +Requires: perl(HTTP::Request) >= 6 +Requires: perl(HTTP::Request::Common) >= 6.03 +Requires: perl(Test::More) >= 0.96 +Requires: perl(URI) >= 1.10 + +%description +Objects of the HTML::Form class represents a single HTML
...
+instance. A form consists of a sequence of inputs that usually have names, +and which can take on various values. The state of a form can be tweaked +and it can then be asked to provide HTTP::Request objects that can be +passed to the request() method of LWP::UserAgent. + +%prep +%setup -q -n HTML-Form-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes perltidyrc + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTML-Formatter/perl-HTML-Formatter.spec b/SPECS/perl-HTML-Formatter/perl-HTML-Formatter.spec new file mode 100644 index 00000000..5ac3a859 --- /dev/null +++ b/SPECS/perl-HTML-Formatter/perl-HTML-Formatter.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTML-Formatter +Version: 2.16 +Release: %autorelease +Summary: Base class for HTML formatters +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTML-Formatter +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/N/NI/NIGELM/HTML-Formatter-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(base) +BuildRequires: perl(blib) >= 1.01 +BuildRequires: perl(bytes) +BuildRequires: perl(Carp) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Slurper) +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(Font::Metrics::Courier) +BuildRequires: perl(Font::Metrics::CourierBold) +BuildRequires: perl(Font::Metrics::CourierBoldOblique) +BuildRequires: perl(Font::Metrics::CourierOblique) +BuildRequires: perl(Font::Metrics::Helvetica) +BuildRequires: perl(Font::Metrics::HelveticaBold) +BuildRequires: perl(Font::Metrics::HelveticaBoldOblique) +BuildRequires: perl(Font::Metrics::HelveticaOblique) +BuildRequires: perl(Font::Metrics::TimesBold) +BuildRequires: perl(Font::Metrics::TimesBoldItalic) +BuildRequires: perl(Font::Metrics::TimesItalic) +BuildRequires: perl(Font::Metrics::TimesRoman) +BuildRequires: perl(HTML::Element) >= 3.15 +BuildRequires: perl(HTML::TreeBuilder) +BuildRequires: perl(integer) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) + +Requires: perl(HTML::Element) >= 3.15 + +%description +HTML::Formatter is a base class for classes that take HTML and format it to +some output format. When you take an object of such a base class and call +$formatter-format( $tree )> with an HTML::TreeBuilder (or HTML::Element) +object, they return the appropriately formatted string for the input HTML. + +%prep +%setup -q -n HTML-Formatter-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTML-Parser/perl-HTML-Parser.spec b/SPECS/perl-HTML-Parser/perl-HTML-Parser.spec new file mode 100644 index 00000000..86f96e5f --- /dev/null +++ b/SPECS/perl-HTML-Parser/perl-HTML-Parser.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTML-Parser +Version: 3.83 +Release: %autorelease +Summary: HTML parser class +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTML-Parser +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/HTML-Parser-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Config) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(HTML::Tagset) +BuildRequires: perl(HTTP::Headers) +BuildRequires: perl(IO::File) +BuildRequires: perl(SelectSaver) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(URI) +BuildRequires: perl(URI::URL) +BuildRequires: perl(XSLoader) + +%description +Objects of the HTML::Parser class will recognize markup and separate it +from plain text (alias data content) in HTML documents. As different +kinds of markup and text are recognized, the corresponding event handlers +are invoked. + +%prep +%setup -q -n HTML-Parser-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes entities.html mkhctype mkpfunc README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTML-Tagset/perl-HTML-Tagset.spec b/SPECS/perl-HTML-Tagset/perl-HTML-Tagset.spec new file mode 100644 index 00000000..ed79428f --- /dev/null +++ b/SPECS/perl-HTML-Tagset/perl-HTML-Tagset.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTML-Tagset +Version: 3.24 +Release: %autorelease +Summary: Data tables useful in parsing HTML +License: Artistic-2.0 +URL: https://metacpan.org/dist/HTML-Tagset +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/HTML-Tagset-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.10.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.95 + +%description +This module contains several data tables useful in various kinds of HTML +parsing operations. + +%prep +%setup -q -n HTML-Tagset-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTML-Tree/perl-HTML-Tree.spec b/SPECS/perl-HTML-Tree/perl-HTML-Tree.spec new file mode 100644 index 00000000..72f84fbb --- /dev/null +++ b/SPECS/perl-HTML-Tree/perl-HTML-Tree.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# For the first time, we need to bootstrap this +# Change 0 to 1 after the first init build +%bcond bootstrap 1 + +Name: perl-HTML-Tree +Version: 5.07 +Release: %autorelease +Summary: Build and scan parse-trees of HTML +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTML-Tree +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/K/KE/KENTNL/HTML-Tree-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(HTML::Entities) +%if %{with bootstrap} +BuildRequires: perl(HTML::FormatText) +%endif +BuildRequires: perl(HTML::Parser) >= 3.46 +BuildRequires: perl(HTML::Tagset) >= 3.02 +BuildRequires: perl(integer) +BuildRequires: perl(LWP::UserAgent) >= 5.815 +BuildRequires: perl(Module::Build) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) + +Requires: perl(HTML::Parser) >= 3.46 +Requires: perl(HTML::Tagset) >= 3.02 +Requires: perl(LWP::UserAgent) >= 5.815 + +%description +HTML-Tree is a suite of Perl modules for making parse trees out of HTML +source. It consists of mainly two modules, whose documentation you should +refer to: HTML::TreeBuilder and HTML::Element. + +%prep +%setup -q -n HTML-Tree-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-CookieJar/perl-HTTP-CookieJar.spec b/SPECS/perl-HTTP-CookieJar/perl-HTTP-CookieJar.spec new file mode 100644 index 00000000..72bb2648 --- /dev/null +++ b/SPECS/perl-HTTP-CookieJar/perl-HTTP-CookieJar.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-CookieJar +Version: 0.014 +Release: %autorelease +Summary: Minimalist HTTP user agent cookie jar +License: Apache-2.0 +URL: https://metacpan.org/dist/HTTP-CookieJar +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/HTTP-CookieJar-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(HTTP::Date) +BuildRequires: perl(lib) +BuildRequires: perl(Mozilla::PublicSuffix) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Deep) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Time::Local) +BuildRequires: perl(URI) +BuildRequires: perl(warnings) + +Requires: perl(Time::Local) + +%description +This module implements a minimalist HTTP user agent cookie jar in +conformance with RFC 6265. + +%prep +%setup -q -n HTTP-CookieJar-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.mkdn perlcritic.rc README tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-Cookies/perl-HTTP-Cookies.spec b/SPECS/perl-HTTP-Cookies/perl-HTTP-Cookies.spec new file mode 100644 index 00000000..7b77a3a9 --- /dev/null +++ b/SPECS/perl-HTTP-Cookies/perl-HTTP-Cookies.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-Cookies +Version: 6.11 +Release: %autorelease +Summary: HTTP cookie jars +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTTP-Cookies +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-Cookies-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(HTTP::Date) >= 6 +BuildRequires: perl(HTTP::Headers::Util) >= 6 +BuildRequires: perl(HTTP::Request) +BuildRequires: perl(HTTP::Response) +BuildRequires: perl(locale) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(URI) +BuildRequires: perl(warnings) + +Requires: perl(HTTP::Date) >= 6 +Requires: perl(HTTP::Headers::Util) >= 6 + +%description +This class is for objects that represent a "cookie jar" -- that is, a +database of all the HTTP cookies that a given LWP::UserAgent object +knows about. + +%prep +%setup -q -n HTTP-Cookies-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTORS perlcriticrc perlimports.toml perltidyrc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-Daemon/perl-HTTP-Daemon.spec b/SPECS/perl-HTTP-Daemon/perl-HTTP-Daemon.spec new file mode 100644 index 00000000..99112c80 --- /dev/null +++ b/SPECS/perl-HTTP-Daemon/perl-HTTP-Daemon.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-Daemon +Version: 6.16 +Release: %autorelease +Summary: Simple http server class +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTTP-Daemon +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-Daemon-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(HTTP::Date) >= 6 +BuildRequires: perl(HTTP::Request) >= 6 +BuildRequires: perl(HTTP::Response) >= 6 +BuildRequires: perl(HTTP::Status) >= 6 +BuildRequires: perl(IO::Select) +BuildRequires: perl(IO::Socket::IP) >= 0.32 +BuildRequires: perl(lib) +BuildRequires: perl(LWP::MediaTypes) >= 6 +BuildRequires: perl(MIME::Base64) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Module::Metadata) +BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.98 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(warnings) + +Requires: perl(HTTP::Date) >= 6 +Requires: perl(HTTP::Request) >= 6 +Requires: perl(HTTP::Response) >= 6 +Requires: perl(HTTP::Status) >= 6 +Requires: perl(IO::Socket::IP) >= 0.32 +Requires: perl(LWP::MediaTypes) >= 6 + +%description +Instances of the HTTP::Daemon class are HTTP/1.1 servers that listen on a +socket for incoming requests. The HTTP::Daemon is a subclass of +IO::Socket::IP, so you can perform socket operations directly on it too. + +%prep +%setup -q -n HTTP-Daemon-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-Date/perl-HTTP-Date.spec b/SPECS/perl-HTTP-Date/perl-HTTP-Date.spec new file mode 100644 index 00000000..5380c4c9 --- /dev/null +++ b/SPECS/perl-HTTP-Date/perl-HTTP-Date.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-Date +Version: 6.06 +Release: %autorelease +Summary: HTTP::Date - date conversion routines +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTTP-Date +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-Date-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.2 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(Time::Local) >= 1.28 +BuildRequires: perl(Time::Zone) +BuildRequires: perl(warnings) + +Requires: perl(Time::Local) >= 1.28 + +%description +This module provides functions that deal the date formats used by the HTTP +protocol (and then some more). Only the first two functions, time2str() and +str2time(), are exported by default. + +%prep +%setup -q -n HTTP-Date-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTORS perlcriticrc perltidyrc README.md tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-Message/perl-HTTP-Message.spec b/SPECS/perl-HTTP-Message/perl-HTTP-Message.spec new file mode 100644 index 00000000..5408e4c8 --- /dev/null +++ b/SPECS/perl-HTTP-Message/perl-HTTP-Message.spec @@ -0,0 +1,90 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-Message +Version: 7.00 +Release: %autorelease +Summary: HTTP style message (base class) +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTTP-Message +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/HTTP-Message-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(Clone) >= 0.46 +BuildRequires: perl(Compress::Raw::Bzip2) +BuildRequires: perl(Compress::Raw::Zlib) >= 2.062 +BuildRequires: perl(Encode) >= 3.01 +BuildRequires: perl(Encode::Locale) >= 1 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(HTTP::Date) >= 6 +BuildRequires: perl(IO::Compress::Brotli) +BuildRequires: perl(IO::Compress::Bzip2) >= 2.021 +BuildRequires: perl(IO::Compress::Deflate) +BuildRequires: perl(IO::Compress::Gzip) +BuildRequires: perl(IO::HTML) +BuildRequires: perl(IO::Uncompress::Brotli) +BuildRequires: perl(IO::Uncompress::Inflate) +BuildRequires: perl(IO::Uncompress::RawInflate) +BuildRequires: perl(lib) +BuildRequires: perl(LWP::MediaTypes) >= 6 +BuildRequires: perl(MIME::Base64) >= 2.1 +BuildRequires: perl(MIME::QuotedPrint) +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(PerlIO::encoding) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(Time::Local) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(URI) >= 1.10 +BuildRequires: perl(URI::URL) +BuildRequires: perl(warnings) + +Requires: perl(Clone) >= 0.46 +Requires: perl(Compress::Raw::Zlib) >= 2.062 +Requires: perl(Encode) >= 3.01 +Requires: perl(Encode::Locale) >= 1 +Requires: perl(Exporter) >= 5.57 +Requires: perl(HTTP::Date) >= 6 +Requires: perl(IO::Compress::Brotli) +Requires: perl(IO::Compress::Bzip2) >= 2.021 +Requires: perl(IO::Uncompress::Brotli) +Requires: perl(LWP::MediaTypes) >= 6 +Requires: perl(MIME::Base64) >= 2.1 +Requires: perl(URI) >= 1.10 + +%description +An HTTP::Message object contains some headers and a content body. The +following methods are available: + +%prep +%setup -q -n HTTP-Message-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md CONTRIBUTORS perlcriticrc perltidyrc README.md tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-Negotiate/perl-HTTP-Negotiate.spec b/SPECS/perl-HTTP-Negotiate/perl-HTTP-Negotiate.spec new file mode 100644 index 00000000..17f5e995 --- /dev/null +++ b/SPECS/perl-HTTP-Negotiate/perl-HTTP-Negotiate.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-Negotiate +Version: 6.01 +Release: %autorelease +Summary: Choose a variant to serve +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTTP-Negotiate +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GA/GAAS/HTTP-Negotiate-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(HTTP::Headers) >= 6 + +Requires: perl(HTTP::Headers) >= 6 + +%description +This module provides a complete implementation of the HTTP content +negotiation algorithm specified in draft-ietf-http-v11-spec-00.ps chapter +12. Content negotiation allows for the selection of a preferred content +representation based upon attributes of the negotiable variants and the +value of the various Accept* header fields in the request. + +%prep +%setup -q -n HTTP-Negotiate-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-HTTP-Response-Encoding/perl-HTTP-Response-Encoding.spec b/SPECS/perl-HTTP-Response-Encoding/perl-HTTP-Response-Encoding.spec new file mode 100644 index 00000000..d27725e3 --- /dev/null +++ b/SPECS/perl-HTTP-Response-Encoding/perl-HTTP-Response-Encoding.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-HTTP-Response-Encoding +Version: 0.06 +Release: %autorelease +Summary: HTTP::Response::Encoding Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/HTTP-Response-Encoding +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DANKOGAI/HTTP-Response-Encoding-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Encode) >= 2 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(HTTP::Response) +BuildRequires: perl(Test::More) + +Requires: perl(Encode) >= 2 + +%description +SYNOPSIS use LWP::UserAgent; use HTTP::Response::Encoding; + +%prep +%setup -q -n HTTP-Response-Encoding-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Hook-LexWrap/perl-Hook-LexWrap.spec b/SPECS/perl-Hook-LexWrap/perl-Hook-LexWrap.spec new file mode 100644 index 00000000..ca1ea6e8 --- /dev/null +++ b/SPECS/perl-Hook-LexWrap/perl-Hook-LexWrap.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Hook-LexWrap +Version: 0.26 +Release: %autorelease +Summary: Lexically scoped subroutine wrappers +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Hook-LexWrap +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Hook-LexWrap-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(overload) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +Hook::LexWrap allows you to install a pre- or post-wrapper (or both) around +an existing subroutine. Unlike other modules that provide this capacity +(e.g. Hook::PreAndPost and Hook::WrapSub), Hook::LexWrap implements +wrappers in such a way that the standard caller function works correctly +within the wrapped subroutine. + +%prep +%setup -q -n Hook-LexWrap-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IO-Compress-Brotli/0001-use-system-brotli.patch b/SPECS/perl-IO-Compress-Brotli/0001-use-system-brotli.patch new file mode 100644 index 00000000..146ae0ba --- /dev/null +++ b/SPECS/perl-IO-Compress-Brotli/0001-use-system-brotli.patch @@ -0,0 +1,76 @@ +diff -u -r IO-Compress-Brotli-0.019.orig/Makefile.PL IO-Compress-Brotli-0.019/Makefile.PL +--- IO-Compress-Brotli-0.019.orig/Makefile.PL 2025-05-09 16:56:26.163965258 +0200 ++++ IO-Compress-Brotli-0.019/Makefile.PL 2025-05-09 17:15:04.015620812 +0200 +@@ -1,24 +1,24 @@ + use 5.008000; + use ExtUtils::MakeMaker; +-use Alien::cmake3; +-use File::Spec::Functions qw/catfile/; +-use Config; ++use ExtUtils::PkgConfig; + +-my $cmake_options; +-my $myextlib = 'brotli/libbrotlienc$(LIB_EXT) brotli/libbrotlidec$(LIB_EXT) brotli/libbrotlicommon$(LIB_EXT)'; ++my @requirements = qw(libbrotlidec libbrotlienc); ++my $libs = ''; ++my $inc = ''; + +-if ($Config{myuname} =~ /strawberry/i || $Config{osname} =~ /MSWin/i ) { +- if ($Config{cc} =~ /gcc/i) { +- $cmake_options = ' -G "MinGW Makefiles" '; +- } elsif ($Config{cc} =~ /cl/i) { +- $cmake_options = ' -G "NMake Makefiles" '; +- $myextlib = 'brotli/libbrotlienc$(LIB_EXT) brotli/libbrotlidec$(LIB_EXT) brotli/libbrotlicommon$(LIB_EXT)'; +- } else { +- $cmake_options = ''; +- $myextlib = 'brotli/libbrotlienc$(LIB_EXT) brotli/libbrotlidec$(LIB_EXT) brotli/libbrotlicommon$(LIB_EXT)'; +- } ++my %pkgcfg; ++foreach my $req (@requirements) { ++ eval{ ++ %pkgcfg = ExtUtils::PkgConfig->find($req); ++ }; ++ if ($@) { ++ die "Could not determine location of library $req."; ++ } ++ $libs .= $pkgcfg{libs}.' '; ++ $inc .= $pkgcfg{cflags}.' '; + } + ++ + WriteMakefile( + NAME => 'IO::Compress::Brotli', + VERSION_FROM => 'lib/IO/Compress/Brotli.pm', +@@ -33,29 +33,12 @@ + 'Getopt::Long' => '0', + 'Time::HiRes' => '0', + }, +- CONFIGURE_REQUIRES => { +- 'Alien::cmake3' => '0', +- }, +- BUILD_REQUIRES => { +- 'Alien::cmake3' => '0', +- }, +- INC => '-Ibrotli/c/include', +- MYEXTLIB => $myextlib, +- EXTRALIBS => ' brotli/libbrotlienc$(LIB_EXT) brotli/libbrotlidec$(LIB_EXT) brotli/libbrotlicommon$(LIB_EXT) ', +- clean => { FILES => "brotli/Makefile $myextlib brotli/CMakeCache.txt brotli/CMakeFiles/* brotli/CTestTestfile.cmake brotli/DartConfiguration.tcl brotli/brotli* brotli/cmake_install.cmake brotli/libbrotlicommon.pc brotli/libbrotlidec.pc brotli/libbrotlienc.pc" }, + META_ADD => { + dynamic_config => 0, + resources => { + repository => 'https://github.com/timlegge/perl-IO-Compress-Brotli', + }, +- } ++ }, ++ LIBS => $libs, ++ INC => $inc, + ); +- +-sub MY::postamble { +- my @dirs = Alien::cmake3->bin_dir; +- my $cmake = defined $dirs[0] ? catfile($dirs[0] , Alien::cmake3->exe) : Alien::cmake3->exe; +-' +-$(MYEXTLIB): brotli/CMakeLists.txt +- cd brotli && "' . $cmake . '"' . $cmake_options . ' -DCMAKE_MAKE_PROGRAM=$(MAKE) -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./installed . && $(MAKE) +-' +-} diff --git a/SPECS/perl-IO-Compress-Brotli/perl-IO-Compress-Brotli.spec b/SPECS/perl-IO-Compress-Brotli/perl-IO-Compress-Brotli.spec new file mode 100644 index 00000000..bc629f4d --- /dev/null +++ b/SPECS/perl-IO-Compress-Brotli/perl-IO-Compress-Brotli.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-IO-Compress-Brotli +Version: 0.019 +Release: %autorelease +Summary: Write Brotli buffers/streams +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/IO-Compress-Brotli +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TI/TIMLEGGE/IO-Compress-Brotli-%{version}.tar.gz + +# Use pkgconfig instead of bundled libbrotli +Patch0: 0001-use-system-brotli.patch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +#BuildRequires: perl(Alien::cmake3) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Slurper) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(Time::HiRes) +# Manual +BuildRequires: pkgconfig(libbrotlidec) +BuildRequires: pkgconfig(libbrotlienc) +BuildRequires: perl(ExtUtils::PkgConfig) + +%description +IO::Compress::Brotli is a module that compressed Brotli buffers and +streams. Despite its name, it is not a subclass of IO::Compress::Base +and does not implement its interface. This will be rectified in a +future release. + +%prep +%setup -q -n IO-Compress-Brotli-%{version} +%patch -P 0 -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IO-HTML/perl-IO-HTML.spec b/SPECS/perl-IO-HTML/perl-IO-HTML.spec new file mode 100644 index 00000000..dfdc10aa --- /dev/null +++ b/SPECS/perl-IO-HTML/perl-IO-HTML.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-IO-HTML +Version: 1.004 +Release: %autorelease +Summary: Open an HTML file with automatic charset detection +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/IO-HTML +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CJ/CJM/IO-HTML-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Encode) >= 2.10 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) >= 0.88 + +Requires: perl(Encode) >= 2.10 +Requires: perl(Exporter) >= 5.57 + +%description +IO::HTML provides an easy way to open a file containing HTML while +automatically determining its encoding. It uses the HTML5 encoding sniffing +algorithm specified in section 8.2.2.2 of the draft standard. + +%prep +%setup -q -n IO-HTML-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IO-Socket-SSL/perl-IO-Socket-SSL.spec b/SPECS/perl-IO-Socket-SSL/perl-IO-Socket-SSL.spec new file mode 100644 index 00000000..ad1e60d7 --- /dev/null +++ b/SPECS/perl-IO-Socket-SSL/perl-IO-Socket-SSL.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-IO-Socket-SSL +Version: 2.095 +Release: %autorelease +Summary: SSL sockets with IO::Socket interface +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/IO-Socket-SSL +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Mozilla::CA) +BuildRequires: perl(Net::SSLeay) >= 1.46 +BuildRequires: perl(Scalar::Util) + +Requires: perl(Net::SSLeay) >= 1.46 + +%description +IO::Socket::SSL makes using SSL/TLS much easier by wrapping the necessary +functionality into the familiar IO::Socket interface and providing secure +defaults whenever possible. This way, existing applications can be made SSL- +aware without much effort, at least if you do blocking I/O and don't use +select or poll. + +%prep +%setup -q -n IO-Socket-SSL-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc BUGS Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IO-String/perl-IO-String.spec b/SPECS/perl-IO-String/perl-IO-String.spec new file mode 100644 index 00000000..bbf09374 --- /dev/null +++ b/SPECS/perl-IO-String/perl-IO-String.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-IO-String +Version: 1.08 +Release: %autorelease +Summary: Emulate file interface for in-core strings +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/IO-String +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GA/GAAS/IO-String-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +The IO::String module provides the IO::File interface for in-core strings. +An IO::String object can be attached to a string, and makes it possible to +use the normal file operations for reading or writing data, as well as for +seeking to various locations of the string. This is useful when you want to +use a library module that only provides an interface to file handles on +data that you have in a string variable. + +%prep +%setup -q -n IO-String-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IO-Stringy/perl-IO-Stringy.spec b/SPECS/perl-IO-Stringy/perl-IO-Stringy.spec new file mode 100644 index 00000000..3a2f34e3 --- /dev/null +++ b/SPECS/perl-IO-Stringy/perl-IO-Stringy.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-IO-Stringy +Version: 2.113 +Release: %autorelease +Summary: IO::Stringy Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/IO-Stringy +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CA/CAPOEIRAB/IO-Stringy-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FileHandle) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Symbol) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Tester) +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 + +%description +This toolkit primarily provides modules for performing both traditional and +object-oriented i/o) on things other than normal filehandles; in +particular, IO::Scalar, IO::ScalarArray, and IO::Lines. + +%prep +%setup -q -n IO-Stringy-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes contrib examples README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IPC-Run3/perl-IPC-Run3.spec b/SPECS/perl-IPC-Run3/perl-IPC-Run3.spec new file mode 100644 index 00000000..7e4803f4 --- /dev/null +++ b/SPECS/perl-IPC-Run3/perl-IPC-Run3.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global tar_name IPC-Run3 + +Name: perl-IPC-Run3 +Version: 0.049 +Release: %autorelease +Summary: Run a subprocess in batch mode +License: GPL-1.0-or-later OR Artistic-1.0-Perl OR BSD-2-Clause +URL: https://metacpan.org/release/IPC-Run3 +#!RemoteAsset +Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{tar_name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-devel +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(POSIX) +BuildRequires: perl(Test) +BuildRequires: perl(Test::More) >= 0.31 +BuildRequires: perl(Time::HiRes) +BuildRequires: perl(constant) +BuildRequires: perl(strict) +# For improved tests +#BuildRequires: perl(Test::Pod::Coverage) +#BuildRequires: perl(Test::Pod) + +%description +This module allows you to run a subprocess and redirect stdin, stdout, +and/or stderr to files and perl data structures. It aims to satisfy 99% of +the need for using system, qx, and open3 with a simple, extremely Perlish +API and none of the bloat and rarely used features of IPC::Run. + +%conf +# No configure + +%build -p +%{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README +%license LICENSE + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-IPC-System-Simple/perl-IPC-System-Simple.spec b/SPECS/perl-IPC-System-Simple/perl-IPC-System-Simple.spec new file mode 100644 index 00000000..8b1b7327 --- /dev/null +++ b/SPECS/perl-IPC-System-Simple/perl-IPC-System-Simple.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-IPC-System-Simple +Version: 1.30 +Release: %autorelease +Summary: Run commands simply, with detailed diagnostics +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/IPC-System-Simple +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(List::Util) +BuildRequires: perl(POSIX) +BuildRequires: perl(re) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +Calling Perl's in-built system() function is easy, determining if it was +successful is hard. Let's face it, $? isn't the nicest variable in the +world to play with, and even if you do check it, producing a well-formatted +error string takes a lot of work. + +%prep +%setup -q -n IPC-System-Simple-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-JSON-XS/perl-JSON-XS.spec b/SPECS/perl-JSON-XS/perl-JSON-XS.spec new file mode 100644 index 00000000..47d67be0 --- /dev/null +++ b/SPECS/perl-JSON-XS/perl-JSON-XS.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-JSON-XS +Version: 4.04 +Release: %autorelease +Summary: JSON serialising/deserialising, done correctly and fast +License: CHECK(Distributable) +URL: https://metacpan.org/dist/JSON-XS +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/JSON-XS-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(common::sense) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Types::Serialiser) +BuildRequires: perl(Canary::Stability) + +%description +This module converts Perl data structures to JSON and vice versa. Its +primary goal is to be correct and its secondary goal is to be fast. To +reach the latter goal it was written in C. + +%prep +%setup -q -n JSON-XS-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-JSON/perl-JSON.spec b/SPECS/perl-JSON/perl-JSON.spec new file mode 100644 index 00000000..5d9fa90a --- /dev/null +++ b/SPECS/perl-JSON/perl-JSON.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-JSON +Version: 4.10 +Release: %autorelease +Summary: JSON (JavaScript Object Notation) encoder/decoder +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/JSON +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/I/IS/ISHIGAKI/JSON-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(JSON::XS) >= 2.34 +BuildRequires: perl(Test::More) + +Requires: perl(JSON::XS) >= 2.34 + +%description +This module is a thin wrapper for JSON::XS-compatible modules with a few +additional features. All the backend modules convert a Perl data structure +to a JSON text and vice versa. This module uses JSON::XS by default, and +when JSON::XS is not available, falls back on JSON::PP, which is in the +Perl core since 5.14. If JSON::PP is not available either, this module +then falls back on JSON::backportPP (which is actually JSON::PP in a +different .pm file) bundled in the same distribution as this module. You +can also explicitly specify to use Cpanel::JSON::XS, a fork of JSON::XS by +Reini Urban. + +%prep +%setup -q -n JSON-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Jcode/perl-Jcode.spec b/SPECS/perl-Jcode/perl-Jcode.spec new file mode 100644 index 00000000..c5d14f88 --- /dev/null +++ b/SPECS/perl-Jcode/perl-Jcode.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Jcode +Version: 2.07 +Release: %autorelease +Summary: Japanese Charset Handler +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/Jcode +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DANKOGAI/Jcode-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(MIME::Base64) >= 2.1 + +Requires: perl(MIME::Base64) >= 2.1 + +%description + + +%prep +%setup -q -n Jcode-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes Changes.ver0X README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-LWP-MediaTypes/perl-LWP-MediaTypes.spec b/SPECS/perl-LWP-MediaTypes/perl-LWP-MediaTypes.spec new file mode 100644 index 00000000..3c7fb79b --- /dev/null +++ b/SPECS/perl-LWP-MediaTypes/perl-LWP-MediaTypes.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-LWP-MediaTypes +Version: 6.04 +Release: %autorelease +Summary: Guess media type for a file or a URL +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/LWP-MediaTypes +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.2 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +This module provides functions for handling media (also known as MIME) +types and encodings. The mapping from file extensions to media types is +defined by the media.types file. If the ~/.media.types file exists it is +used instead. For backwards compatibility we will also look for +~/.mime.types. + +%prep +%setup -q -n LWP-MediaTypes-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Lingua-EN-Inflect/perl-Lingua-EN-Inflect.spec b/SPECS/perl-Lingua-EN-Inflect/perl-Lingua-EN-Inflect.spec new file mode 100644 index 00000000..c7e33f70 --- /dev/null +++ b/SPECS/perl-Lingua-EN-Inflect/perl-Lingua-EN-Inflect.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Lingua-EN-Inflect +Version: 1.905 +Release: %autorelease +Summary: Convert singular to plural. Select "a" or "an" +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Lingua-EN-Inflect +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DC/DCONWAY/Lingua-EN-Inflect-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +[Note: This module is strictly in maintenance mode now. Take a look at the +newer Lingua::EN::Inflexion module, which offers a cleaner and more +convenient interface, has many more features (including plural->singular +inflexions), and is also much better tested. If you have existing code that +relies on Lingua::EN::Inflect, see the section of the documentation +entitled "CONVERTING FROM LINGUA::EN::INFLECT". ] + +%prep +%setup -q -n Lingua-EN-Inflect-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-List-AllUtils/perl-List-AllUtils.spec b/SPECS/perl-List-AllUtils/perl-List-AllUtils.spec new file mode 100644 index 00000000..530c1da1 --- /dev/null +++ b/SPECS/perl-List-AllUtils/perl-List-AllUtils.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-List-AllUtils +Version: 0.19 +Release: %autorelease +Summary: Combines List::Util, List::SomeUtils and List::UtilsBy in one bite-sized package +License: Artistic-2.0 +URL: https://metacpan.org/dist/List-AllUtils +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/List-AllUtils-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(base) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(List::SomeUtils) >= 0.58 +BuildRequires: perl(List::Util) >= 1.56 +BuildRequires: perl(List::UtilsBy) >= 0.11 +BuildRequires: perl(strict) +BuildRequires: perl(Sub::Util) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +Requires: perl(List::SomeUtils) >= 0.58 +Requires: perl(List::Util) >= 1.56 +Requires: perl(List::UtilsBy) >= 0.11 + +%description +Are you sick of trying to remember whether a particular helper is defined +in List::Util, List::SomeUtils or List::UtilsBy? I sure am. Now you don't +have to remember. This module will export all of the functions that either +of those three modules defines. + +%prep +%setup -q -n List-AllUtils-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-List-MoreUtils-XS/perl-List-MoreUtils-XS.spec b/SPECS/perl-List-MoreUtils-XS/perl-List-MoreUtils-XS.spec new file mode 100644 index 00000000..5c4071bb --- /dev/null +++ b/SPECS/perl-List-MoreUtils-XS/perl-List-MoreUtils-XS.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-List-MoreUtils-XS +Version: 0.430 +Release: %autorelease +Summary: Provide compiled List::MoreUtils functions +License: Apache-2.0 +URL: https://metacpan.org/dist/List-MoreUtils-XS +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-XS-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Storable) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(XSLoader) >= 0.22 + +Requires: perl(XSLoader) >= 0.22 + +%description +List::MoreUtils::XS is a backend for List::MoreUtils. Even if it's possible +(because of user wishes) to have it practically independent from +List::MoreUtils, it technically depend on List::MoreUtils. Since it's only +a backend, the API is not public and can change without any warning. + +%prep +%setup -q -n List-MoreUtils-XS-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ARTISTIC-1.0 Changes GPL-1 MAINTAINER.md README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-List-MoreUtils/perl-List-MoreUtils.spec b/SPECS/perl-List-MoreUtils/perl-List-MoreUtils.spec new file mode 100644 index 00000000..5082efa7 --- /dev/null +++ b/SPECS/perl-List-MoreUtils/perl-List-MoreUtils.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-List-MoreUtils +Version: 0.430 +Release: %autorelease +Summary: Provide the stuff missing in List::Util +License: Apache-2.0 +URL: https://metacpan.org/dist/List-MoreUtils +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/List-MoreUtils-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Exporter::Tiny) >= 0.038 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(List::MoreUtils::XS) >= 0.430 +BuildRequires: perl(Storable) +BuildRequires: perl(Test::LeakTrace) +BuildRequires: perl(Test::More) >= 0.96 + +Requires: perl(Exporter::Tiny) >= 0.038 +Requires: perl(List::MoreUtils::XS) >= 0.430 + +%description +List::MoreUtils provides some trivial but commonly needed functionality on +lists which is not going to go into List::Util. + +%prep +%setup -q -n List-MoreUtils-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ARTISTIC-1.0 Changes GPL-1 README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-List-SomeUtils/perl-List-SomeUtils.spec b/SPECS/perl-List-SomeUtils/perl-List-SomeUtils.spec new file mode 100644 index 00000000..94bce6ee --- /dev/null +++ b/SPECS/perl-List-SomeUtils/perl-List-SomeUtils.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-List-SomeUtils +Version: 0.59 +Release: %autorelease +Summary: Provide the stuff missing in List::Util +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/List-SomeUtils +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/List-SomeUtils-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) +BuildRequires: perl(Module::Implementation) >= 0.04 +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Storable) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder::Module) +BuildRequires: perl(Test::LeakTrace) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Tie::Array) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(Module::Implementation) >= 0.04 + +%description +List::SomeUtils provides some trivial but commonly needed functionality on +lists which is not going to go into List::Util. + +%prep +%setup -q -n List-SomeUtils-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-List-UtilsBy/perl-List-UtilsBy.spec b/SPECS/perl-List-UtilsBy/perl-List-UtilsBy.spec new file mode 100644 index 00000000..01a83db6 --- /dev/null +++ b/SPECS/perl-List-UtilsBy/perl-List-UtilsBy.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-List-UtilsBy +Version: 0.12 +Release: %autorelease +Summary: Higher-order list utility functions +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/List-UtilsBy +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PE/PEVANS/List-UtilsBy-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) >= 0.88 + +Requires: perl(Exporter) >= 5.57 + +%description +This module provides a number of list utility functions, all of which take +an initial code block to control their behaviour. They are variations on +similar core perl or List::Util functions of similar names, but which use +the block to control their behaviour. For example, the core Perl function +sort takes a list of values and returns them, sorted into order by their +string value. The "sort_by" function sorts them according to the string +value returned by the extra function, when given each value. + +%prep +%setup -q -n List-UtilsBy-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Log-Dispatch-FileRotate/perl-Log-Dispatch-FileRotate.spec b/SPECS/perl-Log-Dispatch-FileRotate/perl-Log-Dispatch-FileRotate.spec new file mode 100644 index 00000000..12c7951e --- /dev/null +++ b/SPECS/perl-Log-Dispatch-FileRotate/perl-Log-Dispatch-FileRotate.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Log-Dispatch-FileRotate +Version: 1.38 +Release: %autorelease +Summary: Log to Files that Archive/Rotate Themselves +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Log-Dispatch-FileRotate +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MS/MSCHOUT/Log-Dispatch-FileRotate-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Date::Manip) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Log::Dispatch) >= 2.60 +BuildRequires: perl(Log::Dispatch::File) +BuildRequires: perl(Log::Dispatch::Output) +BuildRequires: perl(Log::Dispatch::Screen) +BuildRequires: perl(Path::Tiny) >= 0.018 +BuildRequires: perl(POSIX) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Warn) +BuildRequires: perl(utf8) +BuildRequires: perl(version) +BuildRequires: perl(warnings) + +Requires: perl(Log::Dispatch) >= 2.60 + +%description +This module extends the base class Log::Dispatch::Output to provides a +simple object for logging to files under the Log::Dispatch::* system, and +automatically rotating them according to different constraints. This is +basically a Log::Dispatch::File wrapper with additions. + +%prep +%setup -q -n Log-Dispatch-FileRotate-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Log-Dispatch/perl-Log-Dispatch.spec b/SPECS/perl-Log-Dispatch/perl-Log-Dispatch.spec new file mode 100644 index 00000000..f9ed8d31 --- /dev/null +++ b/SPECS/perl-Log-Dispatch/perl-Log-Dispatch.spec @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Log-Dispatch +Version: 2.71 +Release: %autorelease +Summary: Dispatches messages to one or more outputs +License: Artistic-2.0 +URL: https://metacpan.org/dist/Log-Dispatch +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Log-Dispatch-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Devel::GlobalDestruction) +BuildRequires: perl(Dist::CheckConflicts) >= 0.02 +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Run3) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Runtime) +BuildRequires: perl(namespace::autoclean) +BuildRequires: perl(Params::ValidationCompiler) +BuildRequires: perl(parent) +BuildRequires: perl(PerlIO) +BuildRequires: perl(POSIX) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Specio) >= 0.32 +BuildRequires: perl(Specio::Declare) +BuildRequires: perl(Specio::Exporter) +BuildRequires: perl(Specio::Library::Builtins) +BuildRequires: perl(Specio::Library::Numeric) +BuildRequires: perl(Specio::Library::String) +BuildRequires: perl(strict) +BuildRequires: perl(Sys::Syslog) >= 0.28 +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) + +Requires: perl(Dist::CheckConflicts) >= 0.02 +Requires: perl(Specio) >= 0.32 +Requires: perl(Sys::Syslog) >= 0.28 + +%description +This module manages a set of Log::Dispatch::* output objects that can be +logged to via a unified interface. + +%prep +%setup -q -n Log-Dispatch-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Log-Log4perl/perl-Log-Log4perl.spec b/SPECS/perl-Log-Log4perl/perl-Log-Log4perl.spec new file mode 100644 index 00000000..4b7b0a67 --- /dev/null +++ b/SPECS/perl-Log-Log4perl/perl-Log-Log4perl.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Log-Log4perl +Version: 1.57 +Release: %autorelease +Summary: Log4j implementation for Perl +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Log-Log4perl +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETJ/Log-Log4perl-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(DBD::CSV) >= 0.33 +BuildRequires: perl(DBD::SQLite) +BuildRequires: perl(DBI) >= 1.607 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Path) >= 2.07 +BuildRequires: perl(File::Spec) >= 0.82 +BuildRequires: perl(Log::Dispatch) +BuildRequires: perl(Log::Dispatch::FileRotate) >= 1.10 +BuildRequires: perl(SQL::Statement) >= 1.20 +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(XML::DOM) >= 1.29 + +Requires: perl(DBD::CSV) >= 0.33 +Requires: perl(DBI) >= 1.607 +Requires: perl(File::Path) >= 2.07 +Requires: perl(File::Spec) >= 0.82 +Requires: perl(Log::Dispatch::FileRotate) >= 1.10 +Requires: perl(SQL::Statement) >= 1.20 +Requires: perl(XML::DOM) >= 1.29 + +%description +Log::Log4perl lets you remote-control and fine-tune the logging behaviour +of your system from the outside. It implements the widely popular (Java- +based) Log4j logging package in pure Perl. + +%prep +%setup -q -n Log-Log4perl-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-MIME-Base32/perl-MIME-Base32.spec b/SPECS/perl-MIME-Base32/perl-MIME-Base32.spec new file mode 100644 index 00000000..d968e16a --- /dev/null +++ b/SPECS/perl-MIME-Base32/perl-MIME-Base32.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-MIME-Base32 +Version: 1.303 +Release: %autorelease +Summary: Base32 encoder and decoder +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/MIME-Base32 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/MIME-Base32-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.9 +BuildRequires: perl(utf8) + +%description +This module is for encoding/decoding data much the way that +MIME::Base64 does. + +%prep +%setup -q -n MIME-Base32-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ARTISTIC-1.0 Changes GPL-1 README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-MLDBM/perl-MLDBM.spec b/SPECS/perl-MLDBM/perl-MLDBM.spec new file mode 100644 index 00000000..8d504cd5 --- /dev/null +++ b/SPECS/perl-MLDBM/perl-MLDBM.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-MLDBM +Version: 2.05 +Release: %autorelease +Summary: Store multi-level Perl hash structure in single level tied hash +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/MLDBM +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CH/CHORNY/MLDBM-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.5.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Data::Dumper) >= 2.08 +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) + +Requires: perl(Data::Dumper) >= 2.08 + +%description +This module can serve as a transparent interface to any TIEHASH package +that is required to store arbitrary perl data, including nested references. +Thus, this module can be used for storing references and other arbitrary +data within DBM databases. + +%prep +%setup -q -n MLDBM-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-MRO-Compat/perl-MRO-Compat.spec b/SPECS/perl-MRO-Compat/perl-MRO-Compat.spec new file mode 100644 index 00000000..ea4cdda5 --- /dev/null +++ b/SPECS/perl-MRO-Compat/perl-MRO-Compat.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-MRO-Compat +Version: 0.15 +Release: %autorelease +Summary: Mro::* interface compatibility for Perls < 5.9.5 +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/MRO-Compat +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/MRO-Compat-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.47 + +%description +The "mro" namespace provides several utilities for dealing with method +resolution order and method caching in general in Perl 5.9.5 and higher. + +%prep +%setup -q -n MRO-Compat-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Math-Base-Convert/perl-Math-Base-Convert.spec b/SPECS/perl-Math-Base-Convert/perl-Math-Base-Convert.spec new file mode 100644 index 00000000..d335d346 --- /dev/null +++ b/SPECS/perl-Math-Base-Convert/perl-Math-Base-Convert.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Math-Base-Convert +Version: 0.13 +Release: %autorelease +Summary: Very fast base to base conversion +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/Math-Base-Convert +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MI/MIKER/Math-Base-Convert-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module provides fast functions and methods to convert between +arbitrary number bases from 2 (binary) thru 65535. + +%prep +%setup -q -n Math-Base-Convert-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc bitmaps Changes README recurse2txt + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-Build-Tiny/perl-Module-Build-Tiny.spec b/SPECS/perl-Module-Build-Tiny/perl-Module-Build-Tiny.spec new file mode 100644 index 00000000..8aec2839 --- /dev/null +++ b/SPECS/perl-Module-Build-Tiny/perl-Module-Build-Tiny.spec @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-Build-Tiny +Version: 0.052 +Release: %autorelease +Summary: Tiny replacement for Module::Build +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Module-Build-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(blib) +BuildRequires: perl(Carp) +BuildRequires: perl(CPAN::Meta) +BuildRequires: perl(CPAN::Requirements::Dynamic) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(DynaLoader) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::CBuilder) +BuildRequires: perl(ExtUtils::Config) >= 0.003 +BuildRequires: perl(ExtUtils::Helpers) >= 0.020 +BuildRequires: perl(ExtUtils::Install) +BuildRequires: perl(ExtUtils::InstallPaths) >= 0.002 +BuildRequires: perl(ExtUtils::ParseXS) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Getopt::Long) >= 2.36 +BuildRequires: perl(IO::File) +BuildRequires: perl(IPC::Open2) +BuildRequires: perl(JSON::PP) >= 2 +BuildRequires: perl(lib) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Pod::Man) +BuildRequires: perl(strict) +BuildRequires: perl(TAP::Harness::Env) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) + +Requires: perl(Exporter) >= 5.57 +Requires: perl(ExtUtils::Config) >= 0.003 +Requires: perl(ExtUtils::Helpers) >= 0.020 +Requires: perl(ExtUtils::InstallPaths) >= 0.002 +Requires: perl(Getopt::Long) >= 2.36 +Requires: perl(JSON::PP) >= 2 + +%description +Many Perl distributions use a Build.PL file instead of a Makefile.PL file +to drive distribution configuration, build, test and installation. +Traditionally, Build.PL uses Module::Build as the underlying build system. +This module provides a simple, lightweight, drop-in replacement. + +%prep +%setup -q -n Module-Build-Tiny-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install --destdir=%{buildroot} --create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README Todo + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-Build/perl-Module-Build.spec b/SPECS/perl-Module-Build/perl-Module-Build.spec new file mode 100644 index 00000000..79a96693 --- /dev/null +++ b/SPECS/perl-Module-Build/perl-Module-Build.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-Build +Version: 0.4234 +Release: %autorelease +Summary: Build and install Perl modules +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Module-Build +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/Module-Build-%{version}.tar.gz +BuildArch: noarch +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(CPAN::Meta) >= 2.142060 +BuildRequires: perl(CPAN::Meta::YAML) >= 0.003 +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(ExtUtils::CBuilder) >= 0.27 +BuildRequires: perl(ExtUtils::Install) >= 0.3 +BuildRequires: perl(ExtUtils::Manifest) >= 1.54 +BuildRequires: perl(ExtUtils::Mkbootstrap) +BuildRequires: perl(ExtUtils::ParseXS) >= 2.21 +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Compare) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) >= 0.82 +BuildRequires: perl(File::Temp) >= 0.15 +BuildRequires: perl(Getopt::Long) +#BuildRequires: perl(Module::Build) +BuildRequires: perl(Module::Metadata) >= 1.000002 +BuildRequires: perl(Parse::CPAN::Meta) >= 1.4401 +BuildRequires: perl(Perl::OSType) >= 1 +BuildRequires: perl(TAP::Harness) >= 3.29 +BuildRequires: perl(Test::More) >= 0.49 +BuildRequires: perl(Text::Abbrev) +BuildRequires: perl(Text::ParseWords) +BuildRequires: perl(version) >= 0.87 +Requires: perl(CPAN::Meta) >= 2.142060 +Requires: perl(ExtUtils::CBuilder) >= 0.27 +Requires: perl(ExtUtils::Install) >= 0.3 +Requires: perl(ExtUtils::Manifest) >= 1.54 +Requires: perl(ExtUtils::ParseXS) >= 2.21 +Requires: perl(File::Spec) >= 0.82 +Requires: perl(Module::Metadata) >= 1.000002 +Requires: perl(Perl::OSType) >= 1 +Requires: perl(TAP::Harness) >= 3.29 +Requires: perl(version) >= 0.87 + +%description +Module::Build is a system for building, testing, and installing Perl +modules. It is meant to be an alternative to ExtUtils::MakeMaker. +Developers may alter the behavior of the module through subclassing. It +also does not require a make on your system - most of the Module::Build +code is pure-perl and written in a very cross-platform way. + +%prep +%setup -q -n Module-Build-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes contrib README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-Implementation/perl-Module-Implementation.spec b/SPECS/perl-Module-Implementation/perl-Module-Implementation.spec new file mode 100644 index 00000000..89b383d5 --- /dev/null +++ b/SPECS/perl-Module-Implementation/perl-Module-Implementation.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-Implementation +Version: 0.09 +Release: %autorelease +Summary: Loads one of several alternate underlying implementations for a module +License: Artistic-2.0 +URL: https://metacpan.org/dist/Module-Implementation +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Runtime) >= 0.012 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) >= 0.006 +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(warnings) + +Requires: perl(Module::Runtime) >= 0.012 + +%description +This module abstracts out the process of choosing one of several underlying +implementations for a module. This can be used to provide XS and pure Perl +implementations of a module, or it could be used to load an implementation +for a given OS or any other case of needing to provide multiple +implementations. + +%prep +%setup -q -n Module-Implementation-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-Install/perl-Module-Install.spec b/SPECS/perl-Module-Install/perl-Module-Install.spec new file mode 100644 index 00000000..e8791cba --- /dev/null +++ b/SPECS/perl-Module-Install/perl-Module-Install.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-Install +Version: 1.21 +Release: %autorelease +Summary: Standalone, extensible Perl module installer +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Module-Install +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Module-Install-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Archive::Zip) >= 1.37 +BuildRequires: perl(autodie) +BuildRequires: perl(Devel::PPPort) >= 3.16 +BuildRequires: perl(ExtUtils::Install) >= 1.52 +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.59 +BuildRequires: perl(ExtUtils::ParseXS) >= 2.19 +BuildRequires: perl(File::HomeDir) >= 1 +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Remove) >= 1.42 +BuildRequires: perl(File::Spec) >= 3.28 +BuildRequires: perl(JSON) >= 2.9 +BuildRequires: perl(LWP::Simple) >= 6.00 +BuildRequires: perl(LWP::UserAgent) >= 6.05 +BuildRequires: perl(Module::Build) >= 0.29 +BuildRequires: perl(Module::CoreList) >= 2.17 +BuildRequires: perl(Module::ScanDeps) >= 1.09 +BuildRequires: perl(PAR::Dist) >= 0.29 +BuildRequires: perl(Parse::CPAN::Meta) >= 1.4413 +BuildRequires: perl(Test::Harness) >= 3.13 +BuildRequires: perl(Test::More) >= 0.86 +BuildRequires: perl(YAML::Tiny) >= 1.38 + +Requires: perl(Archive::Zip) >= 1.37 +Requires: perl(Devel::PPPort) >= 3.16 +Requires: perl(ExtUtils::Install) >= 1.52 +Requires: perl(ExtUtils::MakeMaker) >= 6.59 +Requires: perl(ExtUtils::ParseXS) >= 2.19 +Requires: perl(File::HomeDir) >= 1 +Requires: perl(File::Remove) >= 1.42 +Requires: perl(File::Spec) >= 3.28 +Requires: perl(JSON) >= 2.9 +Requires: perl(LWP::Simple) >= 6.00 +Requires: perl(LWP::UserAgent) >= 6.05 +Requires: perl(Module::Build) >= 0.29 +Requires: perl(Module::CoreList) >= 2.17 +Requires: perl(Module::ScanDeps) >= 1.09 +Requires: perl(PAR::Dist) >= 0.29 +Requires: perl(Parse::CPAN::Meta) >= 1.4413 +Requires: perl(YAML::Tiny) >= 1.38 + +%description +Module::Install is a package for writing installers for CPAN (or CPAN-like) +distributions that are clean, simple, minimalist, act in a strictly correct +manner with ExtUtils::MakeMaker, and will run on any Perl installation +version 5.005 or newer. + +%prep +%setup -q -n Module-Install-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-Pluggable/perl-Module-Pluggable.spec b/SPECS/perl-Module-Pluggable/perl-Module-Pluggable.spec new file mode 100644 index 00000000..e58faca6 --- /dev/null +++ b/SPECS/perl-Module-Pluggable/perl-Module-Pluggable.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-Pluggable +Version: 6.3 +Release: %autorelease +Summary: Automatically give your module the ability to have plugins +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Module-Pluggable +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SI/SIMONW/Module-Pluggable-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) >= 3.00 +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(if) +BuildRequires: perl(Module::Runtime) >= 0.012 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 +Requires: perl(File::Spec) >= 3.00 +Requires: perl(Module::Runtime) >= 0.012 + +%description +Provides a simple but, hopefully, extensible way of having 'plugins' for +your module. Obviously this isn't going to be the be all and end all of +solutions but it works for me. + +%prep +%setup -q -n Module-Pluggable-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-Runtime/perl-Module-Runtime.spec b/SPECS/perl-Module-Runtime/perl-Module-Runtime.spec new file mode 100644 index 00000000..f6308fbc --- /dev/null +++ b/SPECS/perl-Module-Runtime/perl-Module-Runtime.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-Runtime +Version: 0.018 +Release: %autorelease +Summary: Runtime module handling +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Module-Runtime +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Module-Runtime-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +The functions exported by this module deal with runtime handling of Perl +modules, which are normally handled at compile time. This module avoids +using any other modules, so that it can be used in low-level +infrastructure. + +%prep +%setup -q -n Module-Runtime-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes prereqs.yml README TODO weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Module-ScanDeps/perl-Module-ScanDeps.spec b/SPECS/perl-Module-ScanDeps/perl-Module-ScanDeps.spec new file mode 100644 index 00000000..e3a6b3ac --- /dev/null +++ b/SPECS/perl-Module-ScanDeps/perl-Module-ScanDeps.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Module-ScanDeps +Version: 1.37 +Release: %autorelease +Summary: Recursively scan Perl code for dependencies +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Module-ScanDeps +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RS/RSCHUPP/Module-ScanDeps-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.9 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IPC::Run3) >= 0.048 +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(Module::Metadata) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Text::ParseWords) +BuildRequires: perl(version) + +Requires: perl(List::Util) >= 1.33 + +%description +This module scans potential modules used by perl programs, and returns a +hash reference; its keys are the module names as appears in %INC (e.g. +Test/More.pm); the values are hash references with this structure: + +%prep +%setup -q -n Module-ScanDeps-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc AUTHORS Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Mojo-DOM58/perl-Mojo-DOM58.spec b/SPECS/perl-Mojo-DOM58/perl-Mojo-DOM58.spec new file mode 100644 index 00000000..325d2def --- /dev/null +++ b/SPECS/perl-Mojo-DOM58/perl-Mojo-DOM58.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Mojo-DOM58 +Version: 3.002 +Release: %autorelease +Summary: Minimalistic HTML/XML DOM parser with CSS selectors +License: Artistic-2.0 +URL: https://metacpan.org/dist/Mojo-DOM58 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DB/DBOOK/Mojo-DOM58-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(JSON::PP) +BuildRequires: perl(List::Util) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) >= 0.96 + +Requires: perl(Exporter) >= 5.57 + +%description +Mojo::DOM58 is a minimalistic and relaxed pure-perl HTML/XML DOM parser +based on Mojo::DOM. It supports the HTML Living Standard and Extensible +Markup Language (XML) 1.0, and matching based on CSS3 selectors. It will +even try to interpret broken HTML and XML, so you should not use it for +validation. + +%prep +%setup -q -n Mojo-DOM58-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md prereqs.yml README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Mozilla-CA/perl-Mozilla-CA.spec b/SPECS/perl-Mozilla-CA/perl-Mozilla-CA.spec new file mode 100644 index 00000000..d23a7bf0 --- /dev/null +++ b/SPECS/perl-Mozilla-CA/perl-Mozilla-CA.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Mozilla-CA +Version: 20250602 +Release: %autorelease +Summary: Mozilla's CA cert bundle in PEM format +License: MPL-2.0 +URL: https://metacpan.org/dist/Mozilla-CA +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LW/LWP/Mozilla-CA-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.94 + +%description +Mozilla::CA provides a copy of Mozilla's bundle of Certificate Authority +certificates in a form that can be consumed by modules and libraries based +on OpenSSL. + +%prep +%setup -q -n Mozilla-CA-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes maint README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Mozilla-PublicSuffix/perl-Mozilla-PublicSuffix.spec b/SPECS/perl-Mozilla-PublicSuffix/perl-Mozilla-PublicSuffix.spec new file mode 100644 index 00000000..d311f94f --- /dev/null +++ b/SPECS/perl-Mozilla-PublicSuffix/perl-Mozilla-PublicSuffix.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Mozilla-PublicSuffix +Version: 1.0.7 +Release: %autorelease +Summary: Get a domain name's public suffix via the Mozilla Public Suffix List +License: MIT +URL: https://metacpan.org/dist/Mozilla-PublicSuffix +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TO/TOMHUKINS/Mozilla-PublicSuffix-v%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Exporter) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) +BuildRequires: perl(URI) + +%description +This module provides a single function that returns the public suffix of a +domain name by referencing a parsed copy of Mozilla's Public Suffix List. +From the official website at http://publicsuffix.org/: + +%prep +%setup -q -n Mozilla-PublicSuffix-v%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install --destdir=%{buildroot} --create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes effective_tld_names.dat README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Net-HTTP/perl-Net-HTTP.spec b/SPECS/perl-Net-HTTP/perl-Net-HTTP.spec new file mode 100644 index 00000000..d7670ba4 --- /dev/null +++ b/SPECS/perl-Net-HTTP/perl-Net-HTTP.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Net-HTTP +Version: 6.24 +Release: %autorelease +Summary: Low-level HTTP connection (client) +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Net-HTTP +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/Net-HTTP-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.2 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Compress::Raw::Zlib) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IO::Select) +BuildRequires: perl(IO::Socket::INET) +BuildRequires: perl(IO::Uncompress::Gunzip) +BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(URI) +BuildRequires: perl(warnings) + +%description +The Net::HTTP class is a low-level HTTP client. An instance of the +Net::HTTP class represents a connection to an HTTP server. The HTTP +protocol is described in RFC 2616. The Net::HTTP class supports HTTP/1.0 +and HTTP/1.1. + +%prep +%setup -q -n Net-HTTP-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTORS perlcriticrc perltidyrc README.md tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Net-SSLeay/perl-Net-SSLeay.spec b/SPECS/perl-Net-SSLeay/perl-Net-SSLeay.spec new file mode 100644 index 00000000..6ac6927d --- /dev/null +++ b/SPECS/perl-Net-SSLeay/perl-Net-SSLeay.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Net-SSLeay +Version: 1.94 +Release: %autorelease +Summary: Perl bindings for OpenSSL and LibreSSL +License: Artistic-2.0 +URL: https://metacpan.org/dist/Net-SSLeay +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Config) +BuildRequires: perl(Cwd) +BuildRequires: perl(English) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(MIME::Base64) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(SelectSaver) +BuildRequires: perl(Socket) +BuildRequires: perl(Storable) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) >= 0.60_01 +# Manual +BuildRequires: openssl-devel +BuildRequires: zlib-devel + +%description +This module provides Perl bindings for libssl (an SSL/TLS API) and +libcrypto (a cryptography API). + +%prep +%setup -q -n Net-SSLeay-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md Credits QuickRef README README.OSX README.VMS README.Win32 + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Number-Compare/perl-Number-Compare.spec b/SPECS/perl-Number-Compare/perl-Number-Compare.spec new file mode 100644 index 00000000..f763bfe6 --- /dev/null +++ b/SPECS/perl-Number-Compare/perl-Number-Compare.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Number-Compare +Version: 0.03 +Release: %autorelease +Summary: Numeric comparisons +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Number-Compare +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/Number-Compare-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +Number::Compare compiles a simple comparison to an anonymous subroutine, +which you can call with a value to be tested again. + +%prep +%setup -q -n Number-Compare-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-OLE-Storage_Lite/perl-OLE-Storage_Lite.spec b/SPECS/perl-OLE-Storage_Lite/perl-OLE-Storage_Lite.spec new file mode 100644 index 00000000..e6639c80 --- /dev/null +++ b/SPECS/perl-OLE-Storage_Lite/perl-OLE-Storage_Lite.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-OLE-Storage_Lite +Version: 0.22 +Release: %autorelease +Summary: Simple Class for OLE document interface +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/OLE-Storage_Lite +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/J/JM/JMCNAMARA/OLE-Storage_Lite-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +OLE::Storage_Lite allows you to read and write an OLE structured file. + +%prep +%setup -q -n OLE-Storage_Lite-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PAR-Dist/perl-PAR-Dist.spec b/SPECS/perl-PAR-Dist/perl-PAR-Dist.spec new file mode 100644 index 00000000..0d049b71 --- /dev/null +++ b/SPECS/perl-PAR-Dist/perl-PAR-Dist.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PAR-Dist +Version: 0.53 +Release: %autorelease +Summary: Create and manipulate PAR distributions +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PAR-Dist +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RS/RSCHUPP/PAR-Dist-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Test::More) + +%description +This module creates and manipulates PAR distributions. They are architecture- +specific PAR files, containing everything under blib/ of CPAN distributions +after their make or Build stage, a META.yml describing metadata of the +original CPAN distribution, and a MANIFEST detailing all files within it. +Digitally signed PAR distributions will also contain a SIGNATURE file. + +%prep +%setup -q -n PAR-Dist-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PPI/perl-PPI.spec b/SPECS/perl-PPI/perl-PPI.spec new file mode 100644 index 00000000..e60ca2e3 --- /dev/null +++ b/SPECS/perl-PPI/perl-PPI.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PPI +Version: 1.283 +Release: %autorelease +Summary: Parse, Analyze and Manipulate Perl (without perl) +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PPI +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MI/MITHALDU/PPI-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(B) +BuildRequires: perl(Carp) +BuildRequires: perl(Class::Inspector) >= 1.22 +BuildRequires: perl(Clone) >= 0.30 +BuildRequires: perl(constant) +BuildRequires: perl(Digest::MD5) >= 2.35 +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) >= 0.84 +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(if) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(overload) +BuildRequires: perl(Params::Util) >= 1.00 +BuildRequires: perl(parent) +BuildRequires: perl(Safe::Isa) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Storable) >= 2.17 +BuildRequires: perl(strict) +BuildRequires: perl(Task::Weaken) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::NoWarnings) +BuildRequires: perl(Test::Object) >= 0.07 +BuildRequires: perl(Test::SubCalls) >= 1.07 +BuildRequires: perl(utf8) +BuildRequires: perl(version) >= 0.77 +BuildRequires: perl(warnings) +BuildRequires: perl(YAML::PP) + +Requires: perl(Clone) >= 0.30 +Requires: perl(Digest::MD5) >= 2.35 +Requires: perl(List::Util) >= 1.33 +Requires: perl(Params::Util) >= 1.00 +Requires: perl(Storable) >= 2.17 +Requires: perl(version) >= 0.77 + +%description +About this Document + +%prep +%setup -q -n PPI-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes dev_notes.txt README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PPIx-QuoteLike/perl-PPIx-QuoteLike.spec b/SPECS/perl-PPIx-QuoteLike/perl-PPIx-QuoteLike.spec new file mode 100644 index 00000000..237109a7 --- /dev/null +++ b/SPECS/perl-PPIx-QuoteLike/perl-PPIx-QuoteLike.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PPIx-QuoteLike +Version: 0.023 +Release: %autorelease +Summary: Parse Perl string literals and string-literal-like things +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PPIx-QuoteLike +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/W/WY/WYANT/PPIx-QuoteLike-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(charnames) +BuildRequires: perl(constant) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(List::Util) +BuildRequires: perl(Module::Build) +BuildRequires: perl(PPI::Document) >= 1.238 +BuildRequires: perl(PPI::Dumper) >= 1.238 +BuildRequires: perl(re) +BuildRequires: perl(Readonly) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +Requires: perl(PPI::Document) >= 1.238 +Requires: perl(PPI::Dumper) >= 1.238 + +%description +This Perl class parses Perl string literals and things that are reasonably +like string literals. Its real reason for being is to find interpolated +variables for Perl::Critic policies and similar code. + +%prep +%setup -q -n PPIx-QuoteLike-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING eg LICENSES README xt + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PPIx-Regexp/perl-PPIx-Regexp.spec b/SPECS/perl-PPIx-Regexp/perl-PPIx-Regexp.spec new file mode 100644 index 00000000..f1227fb0 --- /dev/null +++ b/SPECS/perl-PPIx-Regexp/perl-PPIx-Regexp.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PPIx-Regexp +Version: 0.089 +Release: %autorelease +Summary: Represent a regular expression of some sort +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PPIx-Regexp +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/W/WY/WYANT/PPIx-Regexp-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(charnames) +BuildRequires: perl(constant) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) +BuildRequires: perl(Module::Build) +BuildRequires: perl(overload) +BuildRequires: perl(PPI::Document) >= 1.238 +BuildRequires: perl(PPI::Dumper) >= 1.238 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Task::Weaken) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(warnings) + +Requires: perl(PPI::Document) >= 1.238 +Requires: perl(PPI::Dumper) >= 1.238 + +%description +The purpose of the PPIx-Regexp package is to parse regular expressions in a +manner similar to the way the PPI package parses Perl. This class forms the +root of the parse tree, playing a role similar to PPI::Document. + +%prep +%setup -q -n PPIx-Regexp-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING eg LICENSES README xt + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PPIx-Utilities/perl-PPIx-Utilities.spec b/SPECS/perl-PPIx-Utilities/perl-PPIx-Utilities.spec new file mode 100644 index 00000000..dd95585a --- /dev/null +++ b/SPECS/perl-PPIx-Utilities/perl-PPIx-Utilities.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PPIx-Utilities +Version: 1.001000 +Release: %autorelease +Summary: Extensions to PPI +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PPIx-Utilities +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/EL/ELLIOTJS/PPIx-Utilities-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(base) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Exception::Class) +BuildRequires: perl(Exporter) +BuildRequires: perl(Module::Build) +BuildRequires: perl(PPI) >= 1.208 +BuildRequires: perl(PPI::Document) >= 1.208 +BuildRequires: perl(PPI::Document::Fragment) >= 1.208 +BuildRequires: perl(PPI::Dumper) >= 1.208 +BuildRequires: perl(Readonly) +BuildRequires: perl(Readonly::XS) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Task::Weaken) +BuildRequires: perl(Test::Deep) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +Requires: perl(PPI) >= 1.208 +Requires: perl(PPI::Document::Fragment) >= 1.208 + +%description +This is a collection of functions for dealing with PPI objects, many of +which originated in Perl::Critic. They are organized into modules by the +kind of PPI class they relate to, by replacing the "PPI" at the front of +the module name with "PPIx::Utilities", e.g. functionality related to +PPI::Nodes is in PPIx::Utilities::Node. + +%prep +%setup -q -n PPIx-Utilities-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README xt + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PPIx-Utils/perl-PPIx-Utils.spec b/SPECS/perl-PPIx-Utils/perl-PPIx-Utils.spec new file mode 100644 index 00000000..fd00025d --- /dev/null +++ b/SPECS/perl-PPIx-Utils/perl-PPIx-Utils.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PPIx-Utils +Version: 0.004 +Release: %autorelease +Summary: Utility functions for PPI +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PPIx-Utils +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DB/DBOOK/PPIx-Utils-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(B::Keywords) >= 1.09 +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(PPI) >= 1.250 +BuildRequires: perl(PPI::Dumper) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) >= 0.88 + +Requires: perl(B::Keywords) >= 1.09 +Requires: perl(PPI) >= 1.250 + +%description +PPIx::Utils is a collection of utility functions for working with PPI +documents. The functions are organized into submodules, and may be imported +from the appropriate submodule or via this module. + +%prep +%setup -q -n PPIx-Utils-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md prereqs.yml README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Package-Stash-XS/perl-Package-Stash-XS.spec b/SPECS/perl-Package-Stash-XS/perl-Package-Stash-XS.spec new file mode 100644 index 00000000..dd45d343 --- /dev/null +++ b/SPECS/perl-Package-Stash-XS/perl-Package-Stash-XS.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Package-Stash-XS +Version: 0.30 +Release: %autorelease +Summary: Faster and more correct implementation of the Package::Stash API +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Package-Stash-XS +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Package-Stash-XS-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(B) +BuildRequires: perl(base) +BuildRequires: perl(constant) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(lib) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Symbol) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) + +%description +This is a backend for Package::Stash, which provides the functionality in a +way that's less buggy and much faster. It will be used by default if it's +installed, and should be preferred in all environments with a compiler. + +%prep +%setup -q -n Package-Stash-XS-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Package-Stash/perl-Package-Stash.spec b/SPECS/perl-Package-Stash/perl-Package-Stash.spec new file mode 100644 index 00000000..cc22a8fc --- /dev/null +++ b/SPECS/perl-Package-Stash/perl-Package-Stash.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Package-Stash +Version: 0.40 +Release: %autorelease +Summary: Routines for manipulating stashes +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Package-Stash +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Package-Stash-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(B) +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(CPAN::Meta::Check) >= 0.011 +BuildRequires: perl(CPAN::Meta::Requirements) +BuildRequires: perl(Dist::CheckConflicts) >= 0.02 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Implementation) >= 0.06 +BuildRequires: perl(Package::Stash::XS) >= 0.26 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Symbol) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(warnings) + +Requires: perl(Dist::CheckConflicts) >= 0.02 +Requires: perl(Module::Implementation) >= 0.06 +Requires: perl(Package::Stash::XS) >= 0.26 + +%description +Manipulating stashes (Perl's symbol tables) is occasionally necessary, but +incredibly messy, and easy to get wrong. This module hides all of that +behind a simple API. + +%prep +%setup -q -n Package-Stash-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PadWalker/perl-PadWalker.spec b/SPECS/perl-PadWalker/perl-PadWalker.spec new file mode 100644 index 00000000..8c1651f0 --- /dev/null +++ b/SPECS/perl-PadWalker/perl-PadWalker.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PadWalker +Version: 2.5 +Release: %autorelease +Summary: Play with other peoples' lexical variables +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PadWalker +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RO/ROBIN/PadWalker-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +PadWalker is a module which allows you to inspect (and even change!) +lexical variables in any subroutine which called you. It will only show +those variables which are in scope at the point of the call. + +%prep +%setup -q -n PadWalker-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Params-Classify/perl-Params-Classify.spec b/SPECS/perl-Params-Classify/perl-Params-Classify.spec new file mode 100644 index 00000000..1b71681f --- /dev/null +++ b/SPECS/perl-Params-Classify/perl-Params-Classify.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Params-Classify +Version: 0.015 +Release: %autorelease +Summary: Argument type classification +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Params-Classify +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/Params-Classify-%{version}.tar.gz + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(Devel::CallChecker) >= 0.003 +BuildRequires: perl(Exporter) +BuildRequires: perl(Module::Build) +BuildRequires: perl(parent) +BuildRequires: perl(Scalar::Util) >= 1.01 +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) + +Requires: perl(Devel::CallChecker) >= 0.003 +Requires: perl(Scalar::Util) >= 1.01 + +%description +This module provides various type-testing functions. These are intended +for functions that, unlike most Perl code, care what type of data they +are operating on. For example, some functions wish to behave +differently depending on the type of their arguments (like overloaded +functions in C++). + +%prep +%setup -q -n Params-Classify-%{version} + +%build +perl Build.PL --installdirs=vendor optimize="%{optflags}" +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Params-Util/perl-Params-Util.spec b/SPECS/perl-Params-Util/perl-Params-Util.spec new file mode 100644 index 00000000..ab0d3714 --- /dev/null +++ b/SPECS/perl-Params-Util/perl-Params-Util.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Params-Util +Version: 1.102 +Release: %autorelease +Summary: Simple, compact and correct param-checking functions +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Params-Util +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/Params-Util-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Scalar::Util) >= 1.18 +BuildRequires: perl(Storable) +BuildRequires: perl(Test::LeakTrace) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(XSLoader) >= 0.22 + +Requires: perl(Scalar::Util) >= 1.18 +Requires: perl(XSLoader) >= 0.22 + +%description +Params::Util provides a basic set of importable functions that makes +checking parameters a hell of a lot easier + +%prep +%setup -q -n Params-Util-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ARTISTIC-1.0 Changes GPL-1 README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Params-Validate/perl-Params-Validate.spec b/SPECS/perl-Params-Validate/perl-Params-Validate.spec new file mode 100644 index 00000000..86e24fcc --- /dev/null +++ b/SPECS/perl-Params-Validate/perl-Params-Validate.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Params-Validate +Version: 1.31 +Release: %autorelease +Summary: Validate method/function parameters +License: Artistic-2.0 +URL: https://metacpan.org/dist/Params-Validate +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Params-Validate-%{version}.tar.gz + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Devel::Peek) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(lib) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Module::Implementation) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) >= 1.10 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Tie::Array) +BuildRequires: perl(Tie::Hash) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) + +Requires: perl(Scalar::Util) >= 1.10 + +%description +I would recommend you consider using Params::ValidationCompiler instead. +That module, despite being pure Perl, is significantly faster than this +one, at the cost of having to adopt a type system such as Specio, +Type::Tiny, or the one shipped with Moose. + +%prep +%setup -q -n Params-Validate-%{version} + +%build +perl Build.PL --installdirs=vendor optimize="%{optflags}" +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc README.md tidyall.ini TODO weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Params-ValidationCompiler/perl-Params-ValidationCompiler.spec b/SPECS/perl-Params-ValidationCompiler/perl-Params-ValidationCompiler.spec new file mode 100644 index 00000000..438d8e7f --- /dev/null +++ b/SPECS/perl-Params-ValidationCompiler/perl-Params-ValidationCompiler.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Params-ValidationCompiler +Version: 0.31 +Release: %autorelease +Summary: Build an optimized subroutine parameter validator once, use it forever +License: Artistic-2.0 +URL: https://metacpan.org/dist/Params-ValidationCompiler +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(B) +BuildRequires: perl(Carp) +BuildRequires: perl(Class::XSAccessor) >= 1.17 +BuildRequires: perl(Eval::Closure) +BuildRequires: perl(Exception::Class) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Hash::Util) +BuildRequires: perl(List::Util) >= 1.29 +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Specio) >= 0.14 +BuildRequires: perl(strict) +BuildRequires: perl(Sub::Util) >= 1.40 +BuildRequires: perl(Test::More) >= 1.302015 +BuildRequires: perl(Test::Without::Module) +BuildRequires: perl(Test2::Plugin::NoWarnings) +BuildRequires: perl(Test2::Require::Module) +BuildRequires: perl(Test2::V0) +BuildRequires: perl(warnings) + +Requires: perl(Class::XSAccessor) >= 1.17 +Requires: perl(List::Util) >= 1.29 +Requires: perl(Sub::Util) >= 1.40 + +%description +This module creates a customized, highly efficient parameter checking +subroutine. It can handle named or positional parameters, and can return +the parameters as key/value pairs or a list of values. + +%prep +%setup -q -n Params-ValidationCompiler-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md test-matrix.als + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Parse-RecDescent/perl-Parse-RecDescent.spec b/SPECS/perl-Parse-RecDescent/perl-Parse-RecDescent.spec new file mode 100644 index 00000000..7e2d9ea8 --- /dev/null +++ b/SPECS/perl-Parse-RecDescent/perl-Parse-RecDescent.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Parse-RecDescent +Version: 1.967015 +Release: %autorelease +Summary: Generate Recursive-Descent Parsers +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Parse-RecDescent +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/J/JT/JTBRAUN/Parse-RecDescent-%{version}.tar.gz + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.5702 +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) +BuildRequires: perl(Text::Balanced) >= 1.95 + +Requires: perl(Text::Balanced) >= 1.95 + +%description +Overview + +%prep +%setup -q -n Parse-RecDescent-%{version} + +%build +perl Build.PL --installdirs=vendor optimize="%{optflags}" +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README ToDo + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Path-Tiny/perl-Path-Tiny.spec b/SPECS/perl-Path-Tiny/perl-Path-Tiny.spec new file mode 100644 index 00000000..44e3f3d5 --- /dev/null +++ b/SPECS/perl-Path-Tiny/perl-Path-Tiny.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Path-Tiny +Version: 0.150 +Release: %autorelease +Summary: File path utility +License: Apache-2.0 +URL: https://metacpan.org/dist/Path-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Path-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) +BuildRequires: perl(Digest) >= 1.03 +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(Digest::SHA) >= 5.45 +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Compare) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Glob) +BuildRequires: perl(File::Path) >= 2.07 +BuildRequires: perl(File::Spec) >= 0.86 +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Spec::Unix) +BuildRequires: perl(File::stat) +BuildRequires: perl(File::Temp) >= 0.19 +BuildRequires: perl(lib) +BuildRequires: perl(open) +BuildRequires: perl(overload) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Unicode::UTF8) >= 0.58 +BuildRequires: perl(warnings) +BuildRequires: perl(warnings::register) + +Requires: perl(Digest) >= 1.03 +Requires: perl(Digest::SHA) >= 5.45 +Requires: perl(Exporter) >= 5.57 +Requires: perl(File::Path) >= 2.07 +Requires: perl(File::Spec) >= 0.86 +Requires: perl(File::Temp) >= 0.19 +Requires: perl(Unicode::UTF8) >= 0.58 + +%description +This module provides a small, fast utility for working with file paths. It +is friendlier to use than File::Spec and provides easy access to functions +from several other core file handling modules. It aims to be smaller and +faster than many alternatives on CPAN, while helping people do many common +things in consistent and less error-prone ways. + +%prep +%setup -q -n Path-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.mkdn perlcritic.rc README tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Perl-Critic/perl-Perl-Critic.spec b/SPECS/perl-Perl-Critic/perl-Perl-Critic.spec new file mode 100644 index 00000000..fafab02f --- /dev/null +++ b/SPECS/perl-Perl-Critic/perl-Perl-Critic.spec @@ -0,0 +1,121 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Perl-Critic +Version: 1.156 +Release: %autorelease +Summary: Critique Perl source code for best-practices +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Perl-Critic +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/Perl-Critic-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.10.1 +BuildRequires: perl(B::Keywords) >= 1.23 +BuildRequires: perl(Carp) +BuildRequires: perl(charnames) +BuildRequires: perl(Config::Tiny) >= 2 +BuildRequires: perl(English) +BuildRequires: perl(Exception::Class) >= 1.23 +BuildRequires: perl(Exporter) >= 5.63 +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Unix) +BuildRequires: perl(File::Temp) +BuildRequires: perl(File::Which) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(lib) +BuildRequires: perl(List::SomeUtils) >= 0.55 +BuildRequires: perl(List::Util) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Module::Pluggable) >= 3.1 +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(Perl::Tidy) +BuildRequires: perl(Pod::PlainText) +BuildRequires: perl(Pod::Select) +BuildRequires: perl(Pod::Spell) >= 1 +BuildRequires: perl(Pod::Usage) +BuildRequires: perl(PPI) >= 1.277 +BuildRequires: perl(PPI::Document) >= 1.277 +BuildRequires: perl(PPI::Document::File) >= 1.277 +BuildRequires: perl(PPI::Node) >= 1.277 +BuildRequires: perl(PPI::Token::Quote::Single) >= 1.277 +BuildRequires: perl(PPI::Token::Whitespace) >= 1.277 +BuildRequires: perl(PPIx::QuoteLike) +BuildRequires: perl(PPIx::Regexp) >= 0.027 +BuildRequires: perl(PPIx::Regexp::Util) >= 0.068 +BuildRequires: perl(PPIx::Utils::Traversal) >= 0.003 +BuildRequires: perl(Readonly) >= 2 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(String::Format) >= 1.18 +BuildRequires: perl(Term::ANSIColor) >= 2.02 +BuildRequires: perl(Test::Builder) >= 0.92 +BuildRequires: perl(Test::More) +BuildRequires: perl(Text::ParseWords) >= 3 +BuildRequires: perl(version) >= 0.77 +BuildRequires: perl(warnings) +# Manual +BuildRequires: perl(Try::Tiny) + +Requires: perl(B::Keywords) >= 1.23 +Requires: perl(Config::Tiny) >= 2 +Requires: perl(Exception::Class) >= 1.23 +Requires: perl(Exporter) >= 5.63 +Requires: perl(List::SomeUtils) >= 0.55 +Requires: perl(Module::Pluggable) >= 3.1 +Requires: perl(Pod::Spell) >= 1 +Requires: perl(PPI) >= 1.277 +Requires: perl(PPI::Document) >= 1.277 +Requires: perl(PPI::Document::File) >= 1.277 +Requires: perl(PPI::Node) >= 1.277 +Requires: perl(PPI::Token::Quote::Single) >= 1.277 +Requires: perl(PPI::Token::Whitespace) >= 1.277 +Requires: perl(PPIx::Regexp) >= 0.027 +Requires: perl(PPIx::Regexp::Util) >= 0.068 +Requires: perl(PPIx::Utils::Traversal) >= 0.003 +Requires: perl(Readonly) >= 2 +Requires: perl(String::Format) >= 1.18 +Requires: perl(Term::ANSIColor) >= 2.02 +Requires: perl(Test::Builder) >= 0.92 +Requires: perl(Text::ParseWords) >= 3 +Requires: perl(version) >= 0.77 + +%description +Perl::Critic is an extensible framework for creating and applying coding +standards to Perl source code. Essentially, it is a static source code +analysis engine. Perl::Critic is distributed with a number of +Perl::Critic::Policy modules that attempt to enforce various coding +guidelines. Most Policy modules are based on Damian Conway's book Perl Best +Practices. However, Perl::Critic is not limited to PBP and will even +support Policies that contradict Conway. You can enable, disable, and +customize those Polices through the Perl::Critic interface. You can also +create new Policy modules that suit your own tastes. + +%prep +%setup -q -n Perl-Critic-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md examples extras perlcriticrc README README.md tools xt + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Perl-MinimumVersion/perl-Perl-MinimumVersion.spec b/SPECS/perl-Perl-MinimumVersion/perl-Perl-MinimumVersion.spec new file mode 100644 index 00000000..ff342612 --- /dev/null +++ b/SPECS/perl-Perl-MinimumVersion/perl-Perl-MinimumVersion.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Perl-MinimumVersion +Version: 1.44 +Release: %autorelease +Summary: Find a minimum required version of perl for Perl code +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Perl-MinimumVersion +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DB/DBOOK/Perl-MinimumVersion-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find::Rule) +BuildRequires: perl(File::Find::Rule::Perl) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(List::Util) >= 1.20 +BuildRequires: perl(Params::Util) >= 0.25 +BuildRequires: perl(PPI) >= 1.252 +BuildRequires: perl(PPI::Util) +BuildRequires: perl(PPIx::Regexp) >= 0.051 +BuildRequires: perl(PPIx::Utils) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.47 +BuildRequires: perl(vars) +BuildRequires: perl(version) >= 0.76 +BuildRequires: perl(warnings) + +Requires: perl(List::Util) >= 1.20 +Requires: perl(Params::Util) >= 0.25 +Requires: perl(PPI) >= 1.252 +Requires: perl(PPIx::Regexp) >= 0.051 +Requires: perl(version) >= 0.76 + +%description +Perl::MinimumVersion takes Perl source code and calculates the minimum +version of perl required to be able to run it. Because it is based on PPI, +it can do this without having to actually load the code. + +%prep +%setup -q -n Perl-MinimumVersion-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Perl-Tidy/perl-Perl-Tidy.spec b/SPECS/perl-Perl-Tidy/perl-Perl-Tidy.spec new file mode 100644 index 00000000..5ca6be14 --- /dev/null +++ b/SPECS/perl-Perl-Tidy/perl-Perl-Tidy.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Perl-Tidy +Version: 20250912 +Release: %autorelease +Summary: Parses and beautifies perl source +License: GPL-1.0-or-later +URL: https://metacpan.org/dist/Perl-Tidy +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHANCOCK/Perl-Tidy-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module makes the functionality of the perltidy utility available to +perl scripts. Any or all of the input parameters may be omitted, in which +case the @ARGV array will be used to provide input parameters as described +in the perltidy(1) man page. + +%prep +%setup -q -n Perl-Tidy-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc BUGS.md CHANGES.md INSTALL.md pm2pl README.md SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-PerlIO-utf8_strict/perl-PerlIO-utf8_strict.spec b/SPECS/perl-PerlIO-utf8_strict/perl-PerlIO-utf8_strict.spec new file mode 100644 index 00000000..7fcc8b68 --- /dev/null +++ b/SPECS/perl-PerlIO-utf8_strict/perl-PerlIO-utf8_strict.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-PerlIO-utf8_strict +Version: 0.010 +Release: %autorelease +Summary: Fast and correct UTF-8 IO +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/PerlIO-utf8_strict +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEONT/PerlIO-utf8_strict-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(lib) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Exception) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) + +%description +This module provides a fast and correct UTF-8 PerlIO layer. Unlike perl's +default :utf8 layer it checks the input for correctness. + +%prep +%setup -q -n PerlIO-utf8_strict-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes corpus README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Pod-Coverage/perl-Pod-Coverage.spec b/SPECS/perl-Pod-Coverage/perl-Pod-Coverage.spec new file mode 100644 index 00000000..1a4fb005 --- /dev/null +++ b/SPECS/perl-Pod-Coverage/perl-Pod-Coverage.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Pod-Coverage +Version: 0.23 +Release: %autorelease +Summary: Checks if the documentation of a module is comprehensive +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Pod-Coverage +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/Pod-Coverage-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Devel::Symdump) >= 2.01 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Pod::Find) >= 0.21 +BuildRequires: perl(Pod::Parser) >= 1.13 +BuildRequires: perl(Test::More) + +Requires: perl(Devel::Symdump) >= 2.01 +Requires: perl(Pod::Find) >= 0.21 +Requires: perl(Pod::Parser) >= 1.13 + +%description +Developers hate writing documentation. They'd hate it even more if their +computer tattled on them, but maybe they'll be even more thankful in the +long run. Even if not, perlmodstyle tells you to, so you must obey. + +%prep +%setup -q -n Pod-Coverage-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Pod-Parser/perl-Pod-Parser.spec b/SPECS/perl-Pod-Parser/perl-Pod-Parser.spec new file mode 100644 index 00000000..90130ac7 --- /dev/null +++ b/SPECS/perl-Pod-Parser/perl-Pod-Parser.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Pod-Parser +Version: 1.67 +Release: %autorelease +Summary: Base class for creating POD filters and translators +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Pod-Parser +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MA/MAREKR/Pod-Parser-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Cwd) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(Test::More) >= 0.6 + +Requires: perl(Test::More) >= 0.6 + +%description +NOTE: This module is considered legacy; modern Perl releases (5.31.1 and + higher) are going to remove Pod-Parser from core and use Pod::Simple + for all things POD. + +%prep +%setup -q -n Pod-Parser-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ANNOUNCE CHANGES README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Pod-Spell/perl-Pod-Spell.spec b/SPECS/perl-Pod-Spell/perl-Pod-Spell.spec new file mode 100644 index 00000000..79c9a5e5 --- /dev/null +++ b/SPECS/perl-Pod-Spell/perl-Pod-Spell.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Pod-Spell +Version: 1.27 +Release: %autorelease +Summary: Formatter for spellchecking Pod +License: Artistic-2.0 +URL: https://metacpan.org/dist/Pod-Spell +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Pod-Spell-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(Class::Tiny) +BuildRequires: perl(constant) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::ShareDir) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(Lingua::EN::Inflect) +BuildRequires: perl(locale) +BuildRequires: perl(parent) +BuildRequires: perl(Pod::Escapes) +BuildRequires: perl(Pod::Simple) >= 3.27 +BuildRequires: perl(POSIX) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Text::Wrap) +# Manual +BuildRequires: perl(File::ShareDir::Install) + +Requires: perl(Pod::Simple) >= 3.27 + +%description +Pod::Spell is a Pod formatter whose output is good for spellchecking. +Pod::Spell is rather like Pod::Text, except that it doesn't put much effort +into actual formatting, and it suppresses things that look like Perl +symbols or Perl jargon (so that your spellchecking program won't complain +about mystery words like "$thing" or "Foo::Bar" or "hashref"). + +%prep +%setup -q -n Pod-Spell-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING prereqs.yml README weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Readonly-XS/perl-Readonly-XS.spec b/SPECS/perl-Readonly-XS/perl-Readonly-XS.spec new file mode 100644 index 00000000..1f48c675 --- /dev/null +++ b/SPECS/perl-Readonly-XS/perl-Readonly-XS.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Readonly-XS +Version: 1.05 +Release: %autorelease +Summary: Companion module for Readonly.pm, to speed up read-only scalar variables +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/Readonly-XS +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RO/ROODE/Readonly-XS-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Readonly) >= 1.02 + +Requires: perl(Readonly) >= 1.02 + +%description +The Readonly module (q.v.) is an effective way to create non-modifiable +variables. However, it's relatively slow. + +%prep +%setup -q -n Readonly-XS-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Readonly/perl-Readonly.spec b/SPECS/perl-Readonly/perl-Readonly.spec new file mode 100644 index 00000000..9d1ec1e9 --- /dev/null +++ b/SPECS/perl-Readonly/perl-Readonly.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Readonly +Version: 2.05 +Release: %autorelease +Summary: Readonly Perl module +License: Artistic-2.0 +URL: https://metacpan.org/dist/Readonly +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SA/SANKO/Readonly-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.5.0 +BuildRequires: perl(Module::Build) +BuildRequires: perl(Test::More) +BuildRequires: perl(Module::Build::Tiny) + +%description +# Deep Read-only scalar +Readonly::Scalar $sca => $initial_value; Readonly::Scalar my $sca => +$initial_value; + +%prep +%setup -q -n Readonly-%{version} + +%build +perl Build.PL --installdirs=vendor +./Build + +%install +./Build install --destdir=%{buildroot} --create_packlist=0 +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes minil.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Ref-Util/perl-Ref-Util.spec b/SPECS/perl-Ref-Util/perl-Ref-Util.spec new file mode 100644 index 00000000..d555e91e --- /dev/null +++ b/SPECS/perl-Ref-Util/perl-Ref-Util.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Ref-Util +Version: 0.204 +Release: %autorelease +Summary: Utility functions for checking references +License: MIT +URL: https://metacpan.org/dist/Ref-Util +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AR/ARC/Ref-Util-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Test::More) >= 0.96 + +Requires: perl(Exporter) >= 5.57 + +%description +Ref::Util introduces several functions to help identify references in a +smarter (and usually faster) way. In short: + +%prep +%setup -q -n Ref-Util-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Role-Tiny/perl-Role-Tiny.spec b/SPECS/perl-Role-Tiny/perl-Role-Tiny.spec new file mode 100644 index 00000000..c014968c --- /dev/null +++ b/SPECS/perl-Role-Tiny/perl-Role-Tiny.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Role-Tiny +Version: 2.002004 +Release: %autorelease +Summary: Roles: a nouvelle cuisine portion size slice of Moose +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Role-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Role-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Class::Method::Modifiers) >= 1.05 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.88 + +Requires: perl(Class::Method::Modifiers) >= 1.05 +Requires: perl(Exporter) >= 5.57 + +%description +Role::Tiny is a minimalist role composition tool. + +%prep +%setup -q -n Role-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-SGMLSpm/perl-SGMLSpm.spec b/SPECS/perl-SGMLSpm/perl-SGMLSpm.spec new file mode 100644 index 00000000..16bcf3c5 --- /dev/null +++ b/SPECS/perl-SGMLSpm/perl-SGMLSpm.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global tar_name SGMLSpm + +Name: perl-SGMLSpm +Version: 1.03ii +Release: %autorelease +Summary: Perl library for parsing the output of nsgmls +License: GPL-2.0-or-later +URL: https://metacpan.org/release/SGMLSpm +#!RemoteAsset +Source0: https://cpan.metacpan.org/authors/id/D/DM/DMEGG/%{tar_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-devel +BuildRequires: perl-macros + +Requires: openjade + +%description +Perl programs can use the SGMLSpm module to help convert SGML, HTML or XML +documents into new formats. + +%prep +%setup -q -n SGMLSpm + +%build +# Daddy no build + +%install +install -d -m 755 $RPM_BUILD_ROOT{%{_bindir},%{perl_vendorlib}} +make install_system \ + BINDIR=$RPM_BUILD_ROOT%{_bindir} \ + PERL5DIR=$RPM_BUILD_ROOT%{perl_vendorlib} + +%files +%doc README COPYING +%{_bindir}/sgmlspl +%{perl_vendorlib}/SGMLS* +%{perl_vendorlib}/skel.pl + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-SQL-Statement/perl-SQL-Statement.spec b/SPECS/perl-SQL-Statement/perl-SQL-Statement.spec new file mode 100644 index 00000000..3a9b234f --- /dev/null +++ b/SPECS/perl-SQL-Statement/perl-SQL-Statement.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-SQL-Statement +Version: 1.414 +Release: %autorelease +Summary: SQL parsing and processing engine +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/SQL-Statement +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RE/REHSACK/SQL-Statement-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Clone) >= 0.30 +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Math::Base::Convert) +BuildRequires: perl(Math::Complex) >= 1.56 +BuildRequires: perl(Module::Runtime) +BuildRequires: perl(Params::Util) >= 1.00 +BuildRequires: perl(Scalar::Util) >= 1.0 +BuildRequires: perl(Test::Deep) +BuildRequires: perl(Test::More) >= 0.90 +BuildRequires: perl(Text::Balanced) +BuildRequires: perl(Text::Soundex) >= 3.04 + +Requires: perl(Clone) >= 0.30 +Requires: perl(Math::Complex) >= 1.56 +Requires: perl(Params::Util) >= 1.00 +Requires: perl(Scalar::Util) >= 1.0 +Requires: perl(Text::Soundex) >= 3.04 + +%description +The SQL::Statement module implements a pure Perl SQL parsing and execution +engine. While it by no means implements full ANSI standard, it does support +many features including column and table aliases, built-in and user-defined +functions, implicit and explicit joins, complex nested search conditions, +and other features. + +%prep +%setup -q -n SQL-Statement-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ARTISTIC-1.0 Changes GPL-1 GPL-2.0 README README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Safe-Isa/perl-Safe-Isa.spec b/SPECS/perl-Safe-Isa/perl-Safe-Isa.spec new file mode 100644 index 00000000..d9c5f204 --- /dev/null +++ b/SPECS/perl-Safe-Isa/perl-Safe-Isa.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Safe-Isa +Version: 1.000010 +Release: %autorelease +Summary: Call isa, can, does and DOES safely on things that may not be objects +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Safe-Isa +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Safe-Isa-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) + +Requires: perl(Exporter) >= 5.57 + +%description +How many times have you found yourself writing: + +%prep +%setup -q -n Safe-Isa-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Scalar-Properties/perl-Scalar-Properties.spec b/SPECS/perl-Scalar-Properties/perl-Scalar-Properties.spec new file mode 100644 index 00000000..4f9bf261 --- /dev/null +++ b/SPECS/perl-Scalar-Properties/perl-Scalar-Properties.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Scalar-Properties +Version: 1.100860 +Release: %autorelease +Summary: Run-time properties on scalar variables +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Scalar-Properties +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MA/MARCEL/Scalar-Properties-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(English) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Temp) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::More) >= 0.88 + +Requires: perl(Test::More) >= 0.88 + +%description +Scalar::Properties attempts to make Perl more object-oriented by taking an +idea from Ruby: Everything you manipulate is an object, and the results of +those manipulations are objects themselves. + +%prep +%setup -q -n Scalar-Properties-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Scope-Guard/perl-Scope-Guard.spec b/SPECS/perl-Scope-Guard/perl-Scope-Guard.spec new file mode 100644 index 00000000..cb3014a7 --- /dev/null +++ b/SPECS/perl-Scope-Guard/perl-Scope-Guard.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Scope-Guard +Version: 0.21 +Release: %autorelease +Summary: Lexically-scoped resource management +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Scope-Guard +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CH/CHOCOLATE/Scope-Guard-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +This module provides a convenient way to perform cleanup or other forms of +resource management at the end of a scope. It is particularly useful when +dealing with exceptions: the Scope::Guard constructor takes a reference to +a subroutine that is guaranteed to be called even if the thread of +execution is aborted prematurely. This effectively allows lexically-scoped +"promises" to be made that are automatically honoured by perl's garbage +collector. + +%prep +%setup -q -n Scope-Guard-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Sort-Versions/perl-Sort-Versions.spec b/SPECS/perl-Sort-Versions/perl-Sort-Versions.spec new file mode 100644 index 00000000..7706b59b --- /dev/null +++ b/SPECS/perl-Sort-Versions/perl-Sort-Versions.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Sort-Versions +Version: 1.62 +Release: %autorelease +Summary: Perl 5 module for sorting of revision-like numbers +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Sort-Versions +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/N/NE/NEILB/Sort-Versions-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +Sort::Versions allows easy sorting of mixed non-numeric and numeric +strings, like the 'version numbers' that many shared library systems and +revision control packages use. This is quite useful if you are trying to +deal with shared libraries. It can also be applied to applications that +intersperse variable-width numeric fields within text. Other applications +can undoubtedly be found. + +%prep +%setup -q -n Sort-Versions-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Specio/perl-Specio.spec b/SPECS/perl-Specio/perl-Specio.spec new file mode 100644 index 00000000..56e061b9 --- /dev/null +++ b/SPECS/perl-Specio/perl-Specio.spec @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Specio +Version: 0.52 +Release: %autorelease +Summary: Type constraints and coercions for Perl +License: Artistic-2.0 +URL: https://metacpan.org/dist/Specio +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Specio-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(B) +BuildRequires: perl(Carp) +BuildRequires: perl(Clone) +BuildRequires: perl(Clone::PP) +BuildRequires: perl(Devel::StackTrace) +BuildRequires: perl(Eval::Closure) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(IO::File) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) >= 1.33 +BuildRequires: perl(Module::Implementation) +BuildRequires: perl(Module::Runtime) +BuildRequires: perl(MRO::Compat) +BuildRequires: perl(open) +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(re) +BuildRequires: perl(Ref::Util) >= 0.112 +BuildRequires: perl(Role::Tiny) >= 1.003003 +BuildRequires: perl(Role::Tiny::With) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Sub::Quote) +BuildRequires: perl(Sub::Util) >= 1.40 +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(utf8) +BuildRequires: perl(version) >= 0.83 +BuildRequires: perl(warnings) +BuildRequires: perl(XString) + +Requires: perl(List::Util) >= 1.33 +Requires: perl(Ref::Util) >= 0.112 +Requires: perl(Role::Tiny) >= 1.003003 +Requires: perl(Sub::Util) >= 1.40 +Requires: perl(Test::More) >= 0.96 +Requires: perl(version) >= 0.83 + +%description +The Specio distribution provides classes for representing type constraints +and coercion, along with syntax sugar for declaring them. + +%prep +%setup -q -n Specio-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md dev-bin git GOVERNANCE.md mise.toml perlcriticrc perltidyrc precious.toml README.md SECURITY.md SUPPORT.md TODO.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Spreadsheet-ParseExcel/perl-Spreadsheet-ParseExcel.spec b/SPECS/perl-Spreadsheet-ParseExcel/perl-Spreadsheet-ParseExcel.spec new file mode 100644 index 00000000..31894276 --- /dev/null +++ b/SPECS/perl-Spreadsheet-ParseExcel/perl-Spreadsheet-ParseExcel.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Spreadsheet-ParseExcel +Version: 0.66 +Release: %autorelease +Summary: Read information from an Excel file +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Spreadsheet-ParseExcel +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/J/JM/JMCNAMARA/Spreadsheet-ParseExcel-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Crypt::RC4) +BuildRequires: perl(Digest::Perl::MD5) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Scalar) +BuildRequires: perl(OLE::Storage_Lite) >= 0.19 +BuildRequires: perl(Scalar::Util) + +Requires: perl(OLE::Storage_Lite) >= 0.19 + +%description +The Spreadsheet::ParseExcel module can be used to read information from +Excel 95-2003 binary files. + +%prep +%setup -q -n Spreadsheet-ParseExcel-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CP932Excel.map README README_Japan.htm + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Spreadsheet-WriteExcel/perl-Spreadsheet-WriteExcel.spec b/SPECS/perl-Spreadsheet-WriteExcel/perl-Spreadsheet-WriteExcel.spec new file mode 100644 index 00000000..509edcb7 --- /dev/null +++ b/SPECS/perl-Spreadsheet-WriteExcel/perl-Spreadsheet-WriteExcel.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Spreadsheet-WriteExcel +Version: 2.40 +Release: %autorelease +Summary: Write to a cross-platform Excel binary file +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Spreadsheet-WriteExcel +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/J/JM/JMCNAMARA/Spreadsheet-WriteExcel-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) +BuildRequires: perl(OLE::Storage_Lite) >= 0.19 +BuildRequires: perl(Parse::RecDescent) + +Requires: perl(OLE::Storage_Lite) >= 0.19 + +%description +The Spreadsheet::WriteExcel Perl module can be used to create a cross- +platform Excel binary file. Multiple worksheets can be added to a workbook +and formatting can be applied to cells. Text, numbers, formulas, +hyperlinks, images and charts can be written to the cells. + +%prep +%setup -q -n Spreadsheet-WriteExcel-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-String-Format/perl-String-Format.spec b/SPECS/perl-String-Format/perl-String-Format.spec new file mode 100644 index 00000000..0f84dff9 --- /dev/null +++ b/SPECS/perl-String-Format/perl-String-Format.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-String-Format +Version: 1.18 +Release: %autorelease +Summary: Sprintf-like string formatting capabilities with arbitrary format definitions +License: GPL-2.0-only +URL: https://metacpan.org/dist/String-Format +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SR/SREZIC/String-Format-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +String::Format lets you define arbitrary printf-like format sequences to be +expanded. This module would be most useful in configuration files and +reporting tools, where the results of a query need to be formatted in a +particular way. It was inspired by mutt's index_format and related +directives (see ). + +%prep +%setup -q -n String-Format-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Sub-Exporter-Progressive/perl-Sub-Exporter-Progressive.spec b/SPECS/perl-Sub-Exporter-Progressive/perl-Sub-Exporter-Progressive.spec new file mode 100644 index 00000000..1203ce95 --- /dev/null +++ b/SPECS/perl-Sub-Exporter-Progressive/perl-Sub-Exporter-Progressive.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Sub-Exporter-Progressive +Version: 0.001013 +Release: %autorelease +Summary: Only use Sub::Exporter if you need it +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Sub-Exporter-Progressive +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.88 + +%description +Sub::Exporter is an incredibly powerful module, but with that power comes +great responsibility, er- as well as some runtime penalties. This module is +a Sub::Exporter wrapper that will let your users just use Exporter if all +they are doing is picking exports, but use Sub::Exporter if your users try +to use Sub::Exporter's more advanced features, like renaming exports, if +they try to use them. + +%prep +%setup -q -n Sub-Exporter-Progressive-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Sub-Quote/perl-Sub-Quote.spec b/SPECS/perl-Sub-Quote/perl-Sub-Quote.spec new file mode 100644 index 00000000..1a6c74e7 --- /dev/null +++ b/SPECS/perl-Sub-Quote/perl-Sub-Quote.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Sub-Quote +Version: 2.006009 +Release: %autorelease +Summary: Efficient generation of subroutines via string eval +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Sub-Quote +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Sub-Quote-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Sub::Util) +BuildRequires: perl(Test::More) >= 0.94 + +%description +This package provides performant ways to generate subroutines from strings. + +%prep +%setup -q -n Sub-Quote-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Sub-Uplevel/perl-Sub-Uplevel.spec b/SPECS/perl-Sub-Uplevel/perl-Sub-Uplevel.spec new file mode 100644 index 00000000..978cd92b --- /dev/null +++ b/SPECS/perl-Sub-Uplevel/perl-Sub-Uplevel.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Sub-Uplevel +Version: 0.2800 +Release: %autorelease +Summary: Apparently run a function in a higher stack frame +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Sub-Uplevel +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(lib) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +Like Tcl's uplevel() function, but not quite so dangerous. The idea is +just to fool caller(). All the really naughty bits of Tcl's uplevel() +are avoided. + +%prep +%setup -q -n Sub-Uplevel-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.mkdn perlcritic.rc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Task-Weaken/perl-Task-Weaken.spec b/SPECS/perl-Task-Weaken/perl-Task-Weaken.spec new file mode 100644 index 00000000..b24e3e77 --- /dev/null +++ b/SPECS/perl-Task-Weaken/perl-Task-Weaken.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Task-Weaken +Version: 1.06 +Release: %autorelease +Summary: Ensure that a platform has weaken support +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Task-Weaken +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Task-Weaken-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(Scalar::Util) >= 1.14 +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +One recurring problem in modules that use Scalar::Util's weaken function is +that it is not present in the pure-perl variant. + +%prep +%setup -q -n Task-Weaken-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING Makefile.footer Makefile.header README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-CPAN-Meta/perl-Test-CPAN-Meta.spec b/SPECS/perl-Test-CPAN-Meta/perl-Test-CPAN-Meta.spec new file mode 100644 index 00000000..bc2e6b55 --- /dev/null +++ b/SPECS/perl-Test-CPAN-Meta/perl-Test-CPAN-Meta.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-CPAN-Meta +Version: 0.25 +Release: %autorelease +Summary: Validate your CPAN META.yml files +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test-CPAN-Meta +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BA/BARBIE/Test-CPAN-Meta-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(IO::File) +BuildRequires: perl(Parse::CPAN::Meta) >= 0.02 +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::Builder::Tester) +BuildRequires: perl(Test::More) >= 0.70 +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl(Test::Pod::Coverage) >= 0.08 + +Requires: perl(Parse::CPAN::Meta) >= 0.02 +Requires: perl(Test::Pod) >= 1.00 +Requires: perl(Test::Pod::Coverage) >= 0.08 + +%description +This distribution was written to ensure that a META.yml file, provided with +a standard distribution uploaded to CPAN, meets the specifications that are +slowly being introduced to module uploads, via the use of package makers +and installers such as ExtUtils::MakeMaker, Module::Build and +Module::Install. + +%prep +%setup -q -n Test-CPAN-Meta-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Deep/perl-Test-Deep.spec b/SPECS/perl-Test-Deep/perl-Test-Deep.spec new file mode 100644 index 00000000..34596b01 --- /dev/null +++ b/SPECS/perl-Test-Deep/perl-Test-Deep.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Deep +Version: 1.205 +Release: %autorelease +Summary: Extremely flexible deep comparison +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Deep +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Deep-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.12.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(List::Util) >= 1.09 +BuildRequires: perl(Scalar::Util) >= 1.09 +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Tester) >= 0.107 + +Requires: perl(List::Util) >= 1.09 +Requires: perl(Scalar::Util) >= 1.09 +Requires: perl(Test::More) >= 0.96 + +%description +If you don't know anything about automated testing in Perl then you should +probably read about Test::Simple and Test::More before preceding. +Test::Deep uses the Test::Builder framework. + +%prep +%setup -q -n Test-Deep-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Exception/perl-Test-Exception.spec b/SPECS/perl-Test-Exception/perl-Test-Exception.spec new file mode 100644 index 00000000..b586e2dd --- /dev/null +++ b/SPECS/perl-Test-Exception/perl-Test-Exception.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Exception +Version: 0.43 +Release: %autorelease +Summary: Test exception-based code +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Exception +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/EX/EXODIST/Test-Exception-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(overload) +BuildRequires: perl(strict) +BuildRequires: perl(Sub::Uplevel) >= 0.18 +BuildRequires: perl(Test::Builder) >= 0.7 +BuildRequires: perl(Test::Builder::Tester) >= 1.07 +BuildRequires: perl(Test::Harness) >= 2.03 +BuildRequires: perl(Test::More) >= 0.7 +BuildRequires: perl(warnings) + +Requires: perl(Sub::Uplevel) >= 0.18 +Requires: perl(Test::Builder) >= 0.7 +Requires: perl(Test::Builder::Tester) >= 1.07 +Requires: perl(Test::Harness) >= 2.03 + +%description +This module provides a few convenience methods for testing exception +based code. It is built with Test::Builder and plays happily with +Test::More and friends. + +%prep +%setup -q -n Test-Exception-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Fatal/perl-Test-Fatal.spec b/SPECS/perl-Test-Fatal/perl-Test-Fatal.spec new file mode 100644 index 00000000..52ce4d6a --- /dev/null +++ b/SPECS/perl-Test-Fatal/perl-Test-Fatal.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Fatal +Version: 0.017 +Release: %autorelease +Summary: Incredibly simple helpers for testing code with exceptions +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Fatal +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Test-Fatal-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(overload) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::Builder::Tester) +BuildRequires: perl(Test::More) >= 0.65 +BuildRequires: perl(Try::Tiny) >= 0.07 +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 +Requires: perl(Try::Tiny) >= 0.07 + +%description +Test::Fatal is an alternative to the popular Test::Exception. It does much +less, but should allow greater flexibility in testing exception-throwing +code with about the same amount of typing. + +%prep +%setup -q -n Test-Fatal-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-File-ShareDir/perl-Test-File-ShareDir.spec b/SPECS/perl-Test-File-ShareDir/perl-Test-File-ShareDir.spec new file mode 100644 index 00000000..4705053d --- /dev/null +++ b/SPECS/perl-Test-File-ShareDir/perl-Test-File-ShareDir.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-File-ShareDir +Version: 1.001002 +Release: %autorelease +Summary: Create a Fake ShareDir for your modules for testing +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-File-ShareDir +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/K/KE/KENTNL/Test-File-ShareDir-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Class::Tiny) +BuildRequires: perl(Cwd) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Copy::Recursive) +BuildRequires: perl(File::ShareDir) >= 1.00 +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(lib) +BuildRequires: perl(parent) +BuildRequires: perl(Path::Tiny) >= 0.018 +BuildRequires: perl(Scope::Guard) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 +Requires: perl(File::ShareDir) >= 1.00 +Requires: perl(Path::Tiny) >= 0.018 + +%description +Test::File::ShareDir is some low level plumbing to enable a distribution to +perform tests while consuming its own share directories in a manner similar +to how they will be once installed. + +%prep +%setup -q -n Test-File-ShareDir-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes dist.ini.meta perlcritic.rc README weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-File/perl-Test-File.spec b/SPECS/perl-Test-File/perl-Test-File.spec new file mode 100644 index 00000000..f32431f8 --- /dev/null +++ b/SPECS/perl-Test-File/perl-Test-File.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-File +Version: 1.995 +Release: %autorelease +Summary: Test file attributes +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test-File +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BR/BRIANDFOY/Test-File-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Builder) >= 1.001006 +BuildRequires: perl(Test::Builder::Tester) >= 1.04 +BuildRequires: perl(Test::More) >= 1 +BuildRequires: perl(version) >= 0.86 + +%description +This modules provides a collection of test utilities for file attributes. + +%prep +%setup -q -n Test-File-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CITATION.cff INSTALL.SKIP SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Inter/perl-Test-Inter.spec b/SPECS/perl-Test-Inter/perl-Test-Inter.spec new file mode 100644 index 00000000..7022ce80 --- /dev/null +++ b/SPECS/perl-Test-Inter/perl-Test-Inter.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Inter +Version: 1.12 +Release: %autorelease +Summary: Framework for more readable interactive test scripts +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Inter +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SB/SBECK/Test-Inter-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Cwd) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(IO::File) +BuildRequires: perl(Test::More) + +%description +This is another framework for writing test scripts. Much of the syntax is +loosely inspired by Test::More, and Test::Inter has most of it's +functionality, but it is not a drop-in replacement. + +%prep +%setup -q -n Test-Inter-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-LeakTrace/perl-Test-LeakTrace.spec b/SPECS/perl-Test-LeakTrace/perl-Test-LeakTrace.spec new file mode 100644 index 00000000..97c1dcb1 --- /dev/null +++ b/SPECS/perl-Test-LeakTrace/perl-Test-LeakTrace.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-LeakTrace +Version: 0.17 +Release: %autorelease +Summary: Traces memory leaks +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-LeakTrace +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/L/LE/LEEJO/Test-LeakTrace-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.62 + +Requires: perl(Exporter) >= 5.57 + +%description +Test::LeakTrace provides several functions that trace memory leaks. This +module scans arenas, the memory allocation system, so it can detect any +leaked SVs in given blocks. + +%prep +%setup -q -n Test-LeakTrace-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Memory-Cycle/perl-Test-Memory-Cycle.spec b/SPECS/perl-Test-Memory-Cycle/perl-Test-Memory-Cycle.spec new file mode 100644 index 00000000..cccc8656 --- /dev/null +++ b/SPECS/perl-Test-Memory-Cycle/perl-Test-Memory-Cycle.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Memory-Cycle +Version: 1.06 +Release: %autorelease +Summary: Test::Memory::Cycle Perl module +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test-Memory-Cycle +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/Test-Memory-Cycle-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Devel::Cycle) >= 1.07 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(PadWalker) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::Builder::Tester) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Simple) >= 0.62 + +Requires: perl(Devel::Cycle) >= 1.07 +Requires: perl(Test::Simple) >= 0.62 + +%description +Test::Memory::Cycle Perl module + +%prep +%setup -q -n Test-Memory-Cycle-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-MinimumVersion/perl-Test-MinimumVersion.spec b/SPECS/perl-Test-MinimumVersion/perl-Test-MinimumVersion.spec new file mode 100644 index 00000000..5b6ec197 --- /dev/null +++ b/SPECS/perl-Test-MinimumVersion/perl-Test-MinimumVersion.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-MinimumVersion +Version: 0.101083 +Release: %autorelease +Summary: Test::MinimumVersion Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-MinimumVersion +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Test-MinimumVersion-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(base) +BuildRequires: perl(CPAN::Meta) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find::Rule) +BuildRequires: perl(File::Find::Rule::Perl) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Perl::MinimumVersion) >= 1.32 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Tester) +BuildRequires: perl(version) >= 0.70 +BuildRequires: perl(warnings) + +Requires: perl(Perl::MinimumVersion) >= 1.32 +Requires: perl(version) >= 0.70 + +%description +Test::MinimumVersion Perl module + +%prep +%setup -q -n Test-MinimumVersion-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Needs/perl-Test-Needs.spec b/SPECS/perl-Test-Needs/perl-Test-Needs.spec new file mode 100644 index 00000000..5dc37fa7 --- /dev/null +++ b/SPECS/perl-Test-Needs/perl-Test-Needs.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Needs +Version: 0.002010 +Release: %autorelease +Summary: Skip tests when modules not available +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Needs +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Test-Needs-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.45 + +%description +Skip test scripts if modules are not available. The requested modules will +be loaded, and optionally have their versions checked. If the module is +missing, the test script will be skipped. Modules that are found but fail +to compile will exit with an error rather than skip. + +%prep +%setup -q -n Test-Needs-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-NoWarnings/perl-Test-NoWarnings.spec b/SPECS/perl-Test-NoWarnings/perl-Test-NoWarnings.spec new file mode 100644 index 00000000..fbc71df4 --- /dev/null +++ b/SPECS/perl-Test-NoWarnings/perl-Test-NoWarnings.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-NoWarnings +Version: 1.06 +Release: %autorelease +Summary: Make sure you didn't emit any warnings while testing +License: LGPL-2.0-or-later +URL: https://metacpan.org/dist/Test-NoWarnings +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HA/HAARG/Test-NoWarnings-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Builder) >= 0.86 +BuildRequires: perl(Test::More) >= 0.47 +BuildRequires: perl(Test::Tester) >= 0.107 + +Requires: perl(Test::Builder) >= 0.86 + +%description +In general, your tests shouldn't produce warnings. This modules causes any +warnings to be captured and stored. It automatically adds an extra test +that will run when your script ends to check that there were no warnings. +If there were any warnings, the test will give a "not ok" and diagnostics +of where, when and what the warning was, including a stack trace of what +was going on when the it occurred. + +%prep +%setup -q -n Test-NoWarnings-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Object/perl-Test-Object.spec b/SPECS/perl-Test-Object/perl-Test-Object.spec new file mode 100644 index 00000000..dcad04ca --- /dev/null +++ b/SPECS/perl-Test-Object/perl-Test-Object.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Object +Version: 0.08 +Release: %autorelease +Summary: Thoroughly testing objects via registered handlers +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Object +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Test-Object-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(FindBin) +BuildRequires: perl(lib) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) >= 1.16 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder::Tester) +BuildRequires: perl(Test::More) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(Scalar::Util) >= 1.16 + +%description +In situations where you have deep trees of classes, there is a common +situation in which you test a module 4 or 5 subclasses down, which should +follow the correct behaviour of not just the subclass, but of all the +parent classes. + +%prep +%setup -q -n Test-Object-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Output/perl-Test-Output.spec b/SPECS/perl-Test-Output/perl-Test-Output.spec new file mode 100644 index 00000000..09642dfe --- /dev/null +++ b/SPECS/perl-Test-Output/perl-Test-Output.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Output +Version: 1.036 +Release: %autorelease +Summary: Utilities to test STDOUT and STDERR messages +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test-Output +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BR/BRIANDFOY/Test-Output-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Capture::Tiny) >= 0.17 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) >= 0.17 +BuildRequires: perl(Test::More) >= 1 +BuildRequires: perl(Test::Tester) >= 0.107 +BuildRequires: perl(version) >= 0.86 + +Requires: perl(Capture::Tiny) >= 0.17 +Requires: perl(File::Temp) >= 0.17 + +%description +Test::Output provides a simple interface for testing output sent to STDOUT +or STDERR. A number of different utilities are included to try and be as +flexible as possible to the tester. + +%prep +%setup -q -n Test-Output-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes INSTALL.SKIP SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Pod-Coverage/perl-Test-Pod-Coverage.spec b/SPECS/perl-Test-Pod-Coverage/perl-Test-Pod-Coverage.spec new file mode 100644 index 00000000..3b4e4979 --- /dev/null +++ b/SPECS/perl-Test-Pod-Coverage/perl-Test-Pod-Coverage.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Pod-Coverage +Version: 1.10 +Release: %autorelease +Summary: Check for pod coverage in your distribution +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test-Pod-Coverage +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/N/NE/NEILB/Test-Pod-Coverage-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(lib) +BuildRequires: perl(Pod::Coverage) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::Builder::Tester) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +Test::Pod::Coverage is used to create a test for your distribution, to +ensure that all relevant files in your distribution are appropriately +documented in pod. + +%prep +%setup -q -n Test-Pod-Coverage-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Pod/perl-Test-Pod.spec b/SPECS/perl-Test-Pod/perl-Test-Pod.spec new file mode 100644 index 00000000..478a86bb --- /dev/null +++ b/SPECS/perl-Test-Pod/perl-Test-Pod.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Pod +Version: 1.52 +Release: %autorelease +Summary: Check for POD errors in files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Pod +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Test-Pod-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Pod::Simple) >= 3.05 +BuildRequires: perl(Test::Builder::Tester) >= 1.02 +BuildRequires: perl(Test::More) >= 0.62 + +Requires: perl(Pod::Simple) >= 3.05 +Requires: perl(Test::Builder::Tester) >= 1.02 +Requires: perl(Test::More) >= 0.62 + +%description +Check POD files for errors or warnings in a test file, using Pod::Simple to +do the heavy lifting. + +%prep +%setup -q -n Test-Pod-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Requires/perl-Test-Requires.spec b/SPECS/perl-Test-Requires/perl-Test-Requires.spec new file mode 100644 index 00000000..2eda151f --- /dev/null +++ b/SPECS/perl-Test-Requires/perl-Test-Requires.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Requires +Version: 0.11 +Release: %autorelease +Summary: Checks to see if the module can be loaded +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Requires +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TO/TOKUHIROM/Test-Requires-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Builder::Module) +BuildRequires: perl(Test::More) >= 0.47 + +Requires: perl(Test::More) >= 0.47 + +%description +Test::Requires checks to see if the module can be loaded. + +%prep +%setup -q -n Test-Requires-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes minil.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-RequiresInternet/perl-Test-RequiresInternet.spec b/SPECS/perl-Test-RequiresInternet/perl-Test-RequiresInternet.spec new file mode 100644 index 00000000..c6fc1db3 --- /dev/null +++ b/SPECS/perl-Test-RequiresInternet/perl-Test-RequiresInternet.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-RequiresInternet +Version: 0.05 +Release: %autorelease +Summary: Test::RequiresInternet Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-RequiresInternet +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/MA/MALLEN/Test-RequiresInternet-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +%description +SYNOPSIS use Test::More; use Test::RequiresInternet +('www.example.com' => 80, 'foobar.io' => 25); + +%prep +%setup -q -n Test-RequiresInternet-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-SubCalls/perl-Test-SubCalls.spec b/SPECS/perl-Test-SubCalls/perl-Test-SubCalls.spec new file mode 100644 index 00000000..8f17b0bb --- /dev/null +++ b/SPECS/perl-Test-SubCalls/perl-Test-SubCalls.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-SubCalls +Version: 1.10 +Release: %autorelease +Summary: Track the number of times subs are called +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-SubCalls +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Test-SubCalls-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) >= 0.80 +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(Hook::LexWrap) >= 0.20 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::Builder::Tester) +BuildRequires: perl(Test::More) >= 0.42 +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +Requires: perl(File::Spec) >= 0.80 +Requires: perl(Hook::LexWrap) >= 0.20 +Requires: perl(Test::More) >= 0.42 + +%description +There are a number of different situations (like testing caching code) +where you want to want to do a number of tests, and then verify that +some underlying subroutine deep within the code was called a specific +number of times. + +%prep +%setup -q -n Test-SubCalls-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Taint/perl-Test-Taint.spec b/SPECS/perl-Test-Taint/perl-Test-Taint.spec new file mode 100644 index 00000000..b47afbd7 --- /dev/null +++ b/SPECS/perl-Test-Taint/perl-Test-Taint.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Taint +Version: 1.08 +Release: %autorelease +Summary: Tools to test taintedness +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Taint +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/Test-Taint-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) +BuildRequires: perl(Tie::Array) +BuildRequires: perl(Tie::Hash) +BuildRequires: perl(Tie::Scalar) + +%description +Tainted data is data that comes from an unsafe source, such as the command +line, or, in the case of web apps, any GET or POST transactions. Read the +perlsec man page for details on why tainted data is bad, and how to +untaint the data. + +%prep +%setup -q -n Test-Taint-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Warn/perl-Test-Warn.spec b/SPECS/perl-Test-Warn/perl-Test-Warn.spec new file mode 100644 index 00000000..d7c3ef4c --- /dev/null +++ b/SPECS/perl-Test-Warn/perl-Test-Warn.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Warn +Version: 0.37 +Release: %autorelease +Summary: Perl extension to test methods for warnings +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Warn +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BI/BIGJ/Test-Warn-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) >= 1.22 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Sub::Uplevel) >= 0.12 +BuildRequires: perl(Test::Builder) >= 0.13 +BuildRequires: perl(Test::Builder::Tester) >= 1.02 +BuildRequires: perl(Test::More) + +Requires: perl(Carp) >= 1.22 +Requires: perl(Sub::Uplevel) >= 0.12 +Requires: perl(Test::Builder) >= 0.13 +Requires: perl(Test::Builder::Tester) >= 1.02 + +%description +A good style of Perl programming calls for a lot of diverse +regression tests. + +%prep +%setup -q -n Test-Warn-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Warnings/perl-Test-Warnings.spec b/SPECS/perl-Test-Warnings/perl-Test-Warnings.spec new file mode 100644 index 00000000..80f206e5 --- /dev/null +++ b/SPECS/perl-Test-Warnings/perl-Test-Warnings.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Warnings +Version: 0.038 +Release: %autorelease +Summary: Test for warnings and the lack of them +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Test-Warnings +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Test-Warnings-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(if) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Term::ANSIColor) +BuildRequires: perl(Test::Builder) +BuildRequires: perl(Test::More) >= 0.94 +BuildRequires: perl(warnings) + +%description +If you've ever tried to use Test::NoWarnings to confirm there are no +warnings generated by your tests, combined with the convenience of +done_testing to not have to declare a test count, you'll have discovered +that these two features do not play well together, as the test count will +be calculated before the warnings test is run, resulting in a TAP error. +(See examples/test_nowarnings.pl in this distribution for a demonstration.) + +%prep +%setup -q -n Test-Warnings-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test-Without-Module/perl-Test-Without-Module.spec b/SPECS/perl-Test-Without-Module/perl-Test-Without-Module.spec new file mode 100644 index 00000000..b1888975 --- /dev/null +++ b/SPECS/perl-Test-Without-Module/perl-Test-Without-Module.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test-Without-Module +Version: 0.23 +Release: %autorelease +Summary: Test fallback behaviour in absence of modules +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test-Without-Module +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CO/CORION/Test-Without-Module-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Test::More) + +%description +This module allows you to deliberately hide modules from a program even +though they are installed. This is mostly useful for testing modules that +have a fallback when a certain dependency module is not installed. + +%prep +%setup -q -n Test-Without-Module-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README README.mkdn testrules.yml + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Test2-Plugin-NoWarnings/perl-Test2-Plugin-NoWarnings.spec b/SPECS/perl-Test2-Plugin-NoWarnings/perl-Test2-Plugin-NoWarnings.spec new file mode 100644 index 00000000..e1bc7bde --- /dev/null +++ b/SPECS/perl-Test2-Plugin-NoWarnings/perl-Test2-Plugin-NoWarnings.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Test2-Plugin-NoWarnings +Version: 0.10 +Release: %autorelease +Summary: Fail if tests warn +License: Artistic-2.0 +URL: https://metacpan.org/dist/Test2-Plugin-NoWarnings +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Test2-Plugin-NoWarnings-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(IPC::Run3) +BuildRequires: perl(Module::Pluggable) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 1.302015 +BuildRequires: perl(Test2) >= 1.302167 +BuildRequires: perl(Test2::API) +BuildRequires: perl(Test2::Event) +BuildRequires: perl(Test2::Require::Module) +BuildRequires: perl(Test2::Util::HashBase) +BuildRequires: perl(Test2::V0) +BuildRequires: perl(warnings) + +Requires: perl(Test2) >= 1.302167 + +%description +Loading this plugin causes your tests to fail if there any warnings while +they run. Each warning generates a new failing test and the warning content +is outputted via diag. + +%prep +%setup -q -n Test2-Plugin-NoWarnings-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Text-BibTeX/perl-Text-BibTeX.spec b/SPECS/perl-Text-BibTeX/perl-Text-BibTeX.spec new file mode 100644 index 00000000..d7592519 --- /dev/null +++ b/SPECS/perl-Text-BibTeX/perl-Text-BibTeX.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Text-BibTeX +Version: 0.91 +Release: %autorelease +Summary: Interface to read and parse BibTeX files +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Text-BibTeX +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AM/AMBS/Text-BibTeX-%{version}.tar.gz + +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Capture::Tiny) >= 0.06 +BuildRequires: perl(Config::AutoConf) >= 0.320 +BuildRequires: perl(Cwd) +BuildRequires: perl(Encode) +BuildRequires: perl(ExtUtils::CBuilder) >= 0.27 +BuildRequires: perl(ExtUtils::LibBuilder) >= 0.02 +BuildRequires: perl(File::Copy) +BuildRequires: perl(Module::Build) +BuildRequires: perl(Scalar::Util) >= 1.42 +BuildRequires: perl(Unicode::Normalize) + +Requires: perl(Scalar::Util) >= 1.42 + +%description +The Text::BibTeX module serves mainly as a high-level introduction to the +Text::BibTeX library, for both code and documentation purposes. The code +loads the two fundamental modules for processing BibTeX files +(Text::BibTeX::File and Text::BibTeX::Entry), and this documentation gives +a broad overview of the whole library that isn't available in the +documentation for the individual modules that comprise it. + +%prep +%setup -q -n Text-BibTeX-%{version} + +%build +perl Build.PL --installdirs=vendor optimize="%{optflags}" +./Build + +%install +./Build install destdir=%{buildroot} create_packlist=0 +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc btparse Changes examples README README.OLD scripts THANKS xscode +%{_includedir}/btparse.h +%{_libdir}/libbtparse.so + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Text-CSV/perl-Text-CSV.spec b/SPECS/perl-Text-CSV/perl-Text-CSV.spec new file mode 100644 index 00000000..83621450 --- /dev/null +++ b/SPECS/perl-Text-CSV/perl-Text-CSV.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Text-CSV +Version: 2.06 +Release: %autorelease +Summary: Comma-separated values manipulator (using XS or PurePerl) +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Text-CSV +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/I/IS/ISHIGAKI/Text-CSV-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(Test::Harness) +BuildRequires: perl(Test::More) >= 0.92 +BuildRequires: perl(Text::CSV_XS) >= 1.60 + +Requires: perl(Test::More) >= 0.92 +Requires: perl(Text::CSV_XS) >= 1.60 + +%description +Text::CSV is a thin wrapper for Text::CSV_XS-compatible modules now. All +the backend modules provide facilities for the composition and +decomposition of comma-separated values. Text::CSV uses Text::CSV_XS by +default, and when Text::CSV_XS is not available, falls back on +Text::CSV_PP, which is bundled in the same distribution as this module. + +%prep +%setup -q -n Text-CSV-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Text-CSV_XS/perl-Text-CSV_XS.spec b/SPECS/perl-Text-CSV_XS/perl-Text-CSV_XS.spec new file mode 100644 index 00000000..24d4a218 --- /dev/null +++ b/SPECS/perl-Text-CSV_XS/perl-Text-CSV_XS.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Text-CSV_XS +Version: 1.61 +Release: %autorelease +Summary: Comma-separated values manipulation routines +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Text-CSV_XS +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/H/HM/HMBRAND/Text-CSV_XS-%{version}.tgz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.1 +BuildRequires: perl(Config) +BuildRequires: perl(Encode) >= 3.21 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(Test::More) +BuildRequires: perl(Tie::Scalar) +BuildRequires: perl(XSLoader) + +Requires: perl(Encode) >= 3.21 + +%description +Text::CSV_XS provides facilities for the composition and decomposition of +comma-separated values. An instance of the Text::CSV_XS class will combine +fields into a CSV string and parse a CSV string into fields. + +%prep +%setup -q -n Text-CSV_XS-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ChangeLog CONTRIBUTING.md LOVE_LETTER.md README SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Text-Glob/perl-Text-Glob.spec b/SPECS/perl-Text-Glob/perl-Text-Glob.spec new file mode 100644 index 00000000..2fdd329f --- /dev/null +++ b/SPECS/perl-Text-Glob/perl-Text-Glob.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Text-Glob +Version: 0.11 +Release: %autorelease +Summary: Match globbing patterns against text +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Text-Glob +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RC/RCLAMP/Text-Glob-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.5.0 +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) + +%description +Text::Glob implements glob(3) style matching that can be used to match +against text, rather than fetching names from a filesystem. If you want to +do full file globbing use the File::Glob module instead. + +%prep +%setup -q -n Text-Glob-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Text-Roman/perl-Text-Roman.spec b/SPECS/perl-Text-Roman/perl-Text-Roman.spec new file mode 100644 index 00000000..727e9f3d --- /dev/null +++ b/SPECS/perl-Text-Roman/perl-Text-Roman.spec @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Text-Roman +Version: 3.5 +Release: %autorelease +Summary: Allows conversion between Roman and Arabic algarisms +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Text-Roman +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SY/SYP/Text-Roman-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Temp) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Simple) +BuildRequires: perl(warnings) + +%description +This package supports both conventional Roman algarisms (which range from 1 +to 3999) and Milhar Romans, a variation which uses a bar across the +algarism to indicate multiplication by 1_000. For the purposes of this +module, acceptable syntax consists of an underscore suffixed to the +algarism e.g. IV_V = 4_005. The term Milhar apparently derives from the +Portuguese word for "thousands" and the range of this notation extends the +range of Roman numbers to 3999 * 1000 + 3999 = 4_002_999. + +%prep +%setup -q -n Text-Roman-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes perlcritic.rc README weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Text-Soundex/perl-Text-Soundex.spec b/SPECS/perl-Text-Soundex/perl-Text-Soundex.spec new file mode 100644 index 00000000..b7108931 --- /dev/null +++ b/SPECS/perl-Text-Soundex/perl-Text-Soundex.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Text-Soundex +Version: 3.05 +Release: %autorelease +Summary: Implementation of the soundex algorithm +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Text-Soundex +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Text-Soundex-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(if) + +%description +Soundex is a phonetic algorithm for indexing names by sound, as pronounced +in English. The goal is for names with the same pronunciation to be encoded +to the same representation so that they can be matched despite minor +differences in spelling. Soundex is the most widely known of all phonetic +algorithms and is often used (incorrectly) as a synonym for "phonetic +algorithm". Improvements to Soundex are the basis for many modern phonetic +algorithms. (Wikipedia, 2007) + +%prep +%setup -q -n Text-Soundex-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Tie-Cycle/perl-Tie-Cycle.spec b/SPECS/perl-Tie-Cycle/perl-Tie-Cycle.spec new file mode 100644 index 00000000..1b227874 --- /dev/null +++ b/SPECS/perl-Tie-Cycle/perl-Tie-Cycle.spec @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Tie-Cycle +Version: 1.231 +Release: %autorelease +Summary: Cycle through a list of values via a scalar +License: Artistic-2.0 +URL: https://metacpan.org/dist/Tie-Cycle +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/B/BR/BRIANDFOY/Tie-Cycle-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(Carp) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 1 +BuildRequires: perl(version) >= 0.86 + +%description +You use Tie::Cycle to go through a list over and over again. Once you get +to the end of the list, you go back to the beginning. You don't have to +worry about any of this since the magic of tie does that for you. + +%prep +%setup -q -n Tie-Cycle-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md INSTALL.SKIP SECURITY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Time-Local/perl-Time-Local.spec b/SPECS/perl-Time-Local/perl-Time-Local.spec new file mode 100644 index 00000000..0acf0cc1 --- /dev/null +++ b/SPECS/perl-Time-Local/perl-Time-Local.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Time-Local +Version: 1.35 +Release: %autorelease +Summary: Efficiently compute time from local and GMT time +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Time-Local +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/D/DR/DROLSKY/Time-Local-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(parent) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(warnings) + +%description +This module provides functions that are the inverse of built-in perl +functions localtime() and gmtime(). They accept a date as a six-element +array, and return the corresponding time(2) value in seconds since the +system epoch (Midnight, January 1, 1970 GMT on Unix, for example). This +value can be positive or negative, though POSIX only requires support for +positive values, so dates before the system's epoch may not work on all +operating systems. + +%prep +%setup -q -n Time-Local-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc azure-pipelines.yml Changes CODE_OF_CONDUCT.md CONTRIBUTING.md perlcriticrc perltidyrc precious.toml README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-TimeDate/perl-TimeDate.spec b/SPECS/perl-TimeDate/perl-TimeDate.spec new file mode 100644 index 00000000..dc6f2073 --- /dev/null +++ b/SPECS/perl-TimeDate/perl-TimeDate.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-TimeDate +Version: 2.33 +Release: %autorelease +Summary: TimeDate Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/TimeDate +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AT/ATOOMIC/TimeDate-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This distribution replaces my earlier GetDate distribution, which was only +a date parser. The date parser contained in this distribution is far +superior to the yacc based parser, and a *lot* fatser. + +%prep +%setup -q -n TimeDate-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ChangeLog README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Try-Tiny/perl-Try-Tiny.spec b/SPECS/perl-Try-Tiny/perl-Try-Tiny.spec new file mode 100644 index 00000000..51c9be5a --- /dev/null +++ b/SPECS/perl-Try-Tiny/perl-Try-Tiny.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Try-Tiny +Version: 0.32 +Release: %autorelease +Summary: Minimal try/catch with proper preservation of $@ +License: MIT +URL: https://metacpan.org/dist/Try-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/Try-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(if) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 + +%description +This module provides bare bones try/catch/finally statements that are +designed to minimize common mistakes with eval blocks, and NOTHING else. + +%prep +%setup -q -n Try-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING maint README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Types-Serialiser/perl-Types-Serialiser.spec b/SPECS/perl-Types-Serialiser/perl-Types-Serialiser.spec new file mode 100644 index 00000000..bc1f2ad7 --- /dev/null +++ b/SPECS/perl-Types-Serialiser/perl-Types-Serialiser.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Types-Serialiser +Version: 1.01 +Release: %autorelease +Summary: Simple data types for common serialisation formats +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Types-Serialiser +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/Types-Serialiser-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(common::sense) +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module provides some extra datatypes that are used by common +serialisation formats such as JSON or CBOR. The idea is to have a +repository of simple/small constants and containers that can be shared by +different implementations so they become interoperable between each other. + +%prep +%setup -q -n Types-Serialiser-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-URI/perl-URI.spec b/SPECS/perl-URI/perl-URI.spec new file mode 100644 index 00000000..85319697 --- /dev/null +++ b/SPECS/perl-URI/perl-URI.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-URI +Version: 5.32 +Release: %autorelease +Summary: Uniform Resource Identifiers (absolute and relative) +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/URI +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/URI-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(integer) +BuildRequires: perl(MIME::Base32) +BuildRequires: perl(MIME::Base64) >= 2 +BuildRequires: perl(Net::Domain) +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) + +Requires: perl(Exporter) >= 5.57 +Requires: perl(MIME::Base64) >= 2 + +%description +This module implements the URI class. Objects of this class represent +"Uniform Resource Identifier references" as specified in RFC 2396 (and +updated by RFC 2732). + +%prep +%setup -q -n URI-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md perlimports.toml README uri-test + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-Unicode-UTF8/perl-Unicode-UTF8.spec b/SPECS/perl-Unicode-UTF8/perl-Unicode-UTF8.spec new file mode 100644 index 00000000..f85f5454 --- /dev/null +++ b/SPECS/perl-Unicode-UTF8/perl-Unicode-UTF8.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-Unicode-UTF8 +Version: 0.62 +Release: %autorelease +Summary: Encoding and decoding of UTF-8 encoding form +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/Unicode-UTF8 +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/C/CH/CHANSEN/Unicode-UTF8-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Carp) +BuildRequires: perl(Encode) >= 1.9801 +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Fatal) >= 0.006 +BuildRequires: perl(Test::More) >= 0.47 +BuildRequires: perl(XSLoader) + +%description +This module provides functions to encode and decode UTF-8 encoding form as +specified by Unicode and ISO/IEC 10646:2011. + +%prep +%setup -q -n Unicode-UTF8-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-WWW-Mechanize/perl-WWW-Mechanize.spec b/SPECS/perl-WWW-Mechanize/perl-WWW-Mechanize.spec new file mode 100644 index 00000000..5f91fdf9 --- /dev/null +++ b/SPECS/perl-WWW-Mechanize/perl-WWW-Mechanize.spec @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-WWW-Mechanize +Version: 2.19 +Release: %autorelease +Summary: Handy web browsing in a Perl object +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/WWW-Mechanize +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/WWW-Mechanize-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(bytes) +BuildRequires: perl(Carp) +BuildRequires: perl(Compress::Zlib) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(HTML::Form) >= 6.08 +BuildRequires: perl(HTML::HeadParser) +BuildRequires: perl(HTML::TokeParser) +BuildRequires: perl(HTML::TreeBuilder) >= 5 +BuildRequires: perl(HTTP::Cookies) +BuildRequires: perl(HTTP::Daemon) >= 6.12 +BuildRequires: perl(HTTP::Request) >= 1.30 +BuildRequires: perl(HTTP::Request::Common) +BuildRequires: perl(lib) +BuildRequires: perl(LWP) +BuildRequires: perl(LWP::Simple) +BuildRequires: perl(LWP::UserAgent) +BuildRequires: perl(parent) +BuildRequires: perl(Path::Tiny) +BuildRequires: perl(Pod::Usage) +BuildRequires: perl(Scalar::Util) >= 1.14 +BuildRequires: perl(strict) +BuildRequires: perl(Test::Deep) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::Memory::Cycle) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Output) +BuildRequires: perl(Test::Taint) >= 1.08 +BuildRequires: perl(Test::Warnings) +BuildRequires: perl(Tie::RefHash) +BuildRequires: perl(URI) +BuildRequires: perl(URI::Escape) +BuildRequires: perl(URI::file) +BuildRequires: perl(URI::URL) +BuildRequires: perl(warnings) + +Requires: perl(HTML::Form) >= 6.08 +Requires: perl(HTML::TreeBuilder) >= 5 +Requires: perl(HTTP::Request) >= 1.30 +Requires: perl(Scalar::Util) >= 1.14 + +%description +WWW::Mechanize, or Mech for short, is a Perl module for stateful +programmatic web browsing, used for automating interaction with websites. + +%prep +%setup -q -n WWW-Mechanize-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTORS perlcriticrc perlimports.toml perltidyrc README.md tidyall.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-WWW-RobotRules/perl-WWW-RobotRules.spec b/SPECS/perl-WWW-RobotRules/perl-WWW-RobotRules.spec new file mode 100644 index 00000000..c75ca4c1 --- /dev/null +++ b/SPECS/perl-WWW-RobotRules/perl-WWW-RobotRules.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-WWW-RobotRules +Version: 6.02 +Release: %autorelease +Summary: Database of robots.txt-derived permissions +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/WWW-RobotRules +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(AnyDBM_File) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Fcntl) +BuildRequires: perl(URI) >= 1.10 + +Requires: perl(URI) >= 1.10 + +%description +This module parses /robots.txt files as specified in "A Standard for Robot +Exclusion", at Webmasters can +use the /robots.txt file to forbid conforming robots from accessing parts +of their web site. + +%prep +%setup -q -n WWW-RobotRules-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-DOM/perl-XML-DOM.spec b/SPECS/perl-XML-DOM/perl-XML-DOM.spec new file mode 100644 index 00000000..c595c3cb --- /dev/null +++ b/SPECS/perl-XML-DOM/perl-XML-DOM.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-DOM +Version: 1.46 +Release: %autorelease +Summary: Perl module for building DOM Level 1 compliant document structures +License: CHECK(Distributable) +URL: https://metacpan.org/dist/XML-DOM +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TJ/TJMATHER/XML-DOM-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(LWP::UserAgent) +BuildRequires: perl(XML::Parser) >= 2.30 +BuildRequires: perl(XML::Parser::PerlSAX) >= 0.07 +BuildRequires: perl(XML::RegExp) + +Requires: perl(XML::Parser) >= 2.30 +Requires: perl(XML::Parser::PerlSAX) >= 0.07 + +%description +This module extends the XML::Parser module by Clark Cooper. The XML::Parser +module is built on top of XML::Parser::Expat, which is a lower level +interface to James Clark's expat library. + +%prep +%setup -q -n XML-DOM-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc BUGS Changes FAQ.xml README XML-Parser-2.31.patch + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-LibXML/perl-XML-LibXML.spec b/SPECS/perl-XML-LibXML/perl-XML-LibXML.spec new file mode 100644 index 00000000..058f87c8 --- /dev/null +++ b/SPECS/perl-XML-LibXML/perl-XML-LibXML.spec @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-LibXML +Version: 2.0210 +Release: %autorelease +Summary: Perl Binding for libxml2 +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-LibXML +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Config) +BuildRequires: perl(constant) +BuildRequires: perl(DynaLoader) +BuildRequires: perl(Encode) +BuildRequires: perl(Errno) +BuildRequires: perl(Exporter) >= 5.57 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(locale) +BuildRequires: perl(overload) +BuildRequires: perl(parent) +BuildRequires: perl(POSIX) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(Tie::Hash) +BuildRequires: perl(utf8) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) +BuildRequires: perl(XML::NamespaceSupport) >= 1.07 +BuildRequires: perl(XML::SAX) >= 0.11 +BuildRequires: perl(XML::SAX::Base) +BuildRequires: perl(XML::SAX::DocumentLocator) +BuildRequires: perl(XML::SAX::Exception) +# Manual +BuildRequires: perl(Alien::Base::Wrapper) +BuildRequires: perl(Alien::Libxml2) +BuildRequires: libxml2-devel + +Requires: perl(Exporter) >= 5.57 +Requires: perl(XML::NamespaceSupport) >= 1.07 +Requires: perl(XML::SAX) >= 0.11 + +%description +This module is an interface to libxml2, providing XML and HTML parsers with +DOM, SAX and XMLReader interfaces, a large subset of DOM Layer 3 interface +and a XML::XPath-like interface to XPath API of libxml2. The module is +split into several packages which are not described in this section; unless +stated otherwise, you only need to use XML::LibXML; in your programs. + +%prep +%setup -q -n XML-LibXML-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes HACKING.txt README TODO + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-LibXSLT/perl-XML-LibXSLT.spec b/SPECS/perl-XML-LibXSLT/perl-XML-LibXSLT.spec new file mode 100644 index 00000000..58094ebe --- /dev/null +++ b/SPECS/perl-XML-LibXSLT/perl-XML-LibXSLT.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-LibXSLT +Version: 2.003000 +Release: %autorelease +Summary: Interface to the GNOME libxslt library +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-LibXSLT +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXSLT-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.14.0 +BuildRequires: perl(Encode) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Path) >= 2.06 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: perl(XML::LibXML) >= 1.70 +# Manual +BuildRequires: libxslt-devel +BuildRequires: libxml2-devel + +Requires: perl(File::Path) >= 2.06 +Requires: perl(XML::LibXML) >= 1.70 + +%description +This module is an interface to the GNOME project's libxslt. This is an +extremely good XSLT engine, highly compliant and also very fast. I have +tests showing this to be more than twice as fast as Sablotron. + +%prep +%setup -q -n XML-LibXSLT-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-NamespaceSupport/perl-XML-NamespaceSupport.spec b/SPECS/perl-XML-NamespaceSupport/perl-XML-NamespaceSupport.spec new file mode 100644 index 00000000..1a6bfbfa --- /dev/null +++ b/SPECS/perl-XML-NamespaceSupport/perl-XML-NamespaceSupport.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-NamespaceSupport +Version: 1.12 +Release: %autorelease +Summary: Simple generic namespace processor +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-NamespaceSupport +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(constant) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +%description +This module offers a simple to process namespaced XML names (unames) from +within any application that may need them. It also helps maintain a prefix +to namespace URI map, and provides a number of basic checks. + +%prep +%setup -q -n XML-NamespaceSupport-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-Parser/perl-XML-Parser.spec b/SPECS/perl-XML-Parser/perl-XML-Parser.spec new file mode 100644 index 00000000..c7595be1 --- /dev/null +++ b/SPECS/perl-XML-Parser/perl-XML-Parser.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-Parser +Version: 2.47 +Release: %autorelease +Summary: Perl module for parsing XML documents +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-Parser +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TO/TODDR/XML-Parser-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.4.50 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(LWP::UserAgent) +BuildRequires: perl(Test::More) +BuildRequires: perl(warnings) +# Manual +BuildRequires: expat-devel + +%description +This module provides ways to parse XML documents. It is built on top of +XML::Parser::Expat, which is a lower level interface to James Clark's expat +library. Each call to one of the parsing methods creates a new instance of +XML::Parser::Expat which is then used to parse the document. Expat options +may be provided when the XML::Parser object is created. These options are +then passed on to the Expat object on each parse call. They can also be +given as extra arguments to the parse methods, in which case they override +options given at XML::Parser creation time. + +%prep +%setup -q -n XML-Parser-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-RegExp/perl-XML-RegExp.spec b/SPECS/perl-XML-RegExp/perl-XML-RegExp.spec new file mode 100644 index 00000000..f90ce45c --- /dev/null +++ b/SPECS/perl-XML-RegExp/perl-XML-RegExp.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-RegExp +Version: 0.04 +Release: %autorelease +Summary: Regular expressions for XML tokens +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-RegExp +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TJ/TJMATHER/XML-RegExp-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This package contains regular expressions for the following XML tokens: +BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar, +EntityRef, CharRef, Reference, Name, NmToken, and AttValue. + +%prep +%setup -q -n XML-RegExp-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-SAX-Base/perl-XML-SAX-Base.spec b/SPECS/perl-XML-SAX-Base/perl-XML-SAX-Base.spec new file mode 100644 index 00000000..d83f5ff8 --- /dev/null +++ b/SPECS/perl-XML-SAX-Base/perl-XML-SAX-Base.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-SAX-Base +Version: 1.09 +Release: %autorelease +Summary: Base class SAX Drivers and Filters +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-SAX-Base +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-Base-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) >= 0.88 + +%description +This module has a very simple task - to be a base class for PerlSAX drivers +and filters. It's default behaviour is to pass the input directly to the +output unchanged. It can be useful to use this module as a base class so +you don't have to, for example, implement the characters() callback. + +%prep +%setup -q -n XML-SAX-Base-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XML-SAX/perl-XML-SAX.spec b/SPECS/perl-XML-SAX/perl-XML-SAX.spec new file mode 100644 index 00000000..fb1c7c99 --- /dev/null +++ b/SPECS/perl-XML-SAX/perl-XML-SAX.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XML-SAX +Version: 1.02 +Release: %autorelease +Summary: Simple API for XML +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XML-SAX +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Temp) +BuildRequires: perl(XML::NamespaceSupport) >= 0.03 +BuildRequires: perl(XML::SAX::Base) >= 1.05 + +Requires: perl(XML::NamespaceSupport) >= 0.03 +Requires: perl(XML::SAX::Base) >= 1.05 + +%description +XML::SAX is a SAX parser access API for Perl. It includes classes and APIs +required for implementing SAX drivers, along with a factory class for +returning any SAX parser installed on the user's system. + +%prep +%setup -q -n XML-SAX-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-XString/perl-XString.spec b/SPECS/perl-XString/perl-XString.spec new file mode 100644 index 00000000..d8f0f71b --- /dev/null +++ b/SPECS/perl-XString/perl-XString.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-XString +Version: 0.005 +Release: %autorelease +Summary: Isolated String helpers from B +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/XString +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/A/AT/ATOOMIC/XString-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Test::More) >= 0.87 + +%description +XString provides the B string helpers in one isolated package. Right now +only cstring and perlstring are available. + +%prep +%setup -q -n XString-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README tidyall.ini weaver.ini + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-YAML-PP/perl-YAML-PP.spec b/SPECS/perl-YAML-PP/perl-YAML-PP.spec new file mode 100644 index 00000000..f4128a16 --- /dev/null +++ b/SPECS/perl-YAML-PP/perl-YAML-PP.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-YAML-PP +Version: 0.39.0 +Release: %autorelease +Summary: YAML 1.2 processor +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/YAML-PP +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/T/TI/TINITA/YAML-PP-v%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(B) +BuildRequires: perl(B::Deparse) +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Encode) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(lib) +BuildRequires: perl(MIME::Base64) +BuildRequires: perl(Module::Load) +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) >= 1.07 +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.98 +BuildRequires: perl(Test::Warn) +BuildRequires: perl(Tie::Array) +BuildRequires: perl(Tie::Hash) +BuildRequires: perl(warnings) + +Requires: perl(Scalar::Util) >= 1.07 + +%description +YAML::PP is a modular YAML processor. + +%prep +%setup -q -n YAML-PP-v%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING.md etc examples Makefile.dev README.md test-suite xt + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-YAML-Tiny/perl-YAML-Tiny.spec b/SPECS/perl-YAML-Tiny/perl-YAML-Tiny.spec new file mode 100644 index 00000000..6b025268 --- /dev/null +++ b/SPECS/perl-YAML-Tiny/perl-YAML-Tiny.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-YAML-Tiny +Version: 1.76 +Release: %autorelease +Summary: Read/Write YAML files with as little code as possible +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/YAML-Tiny +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/YAML-Tiny-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(B) +BuildRequires: perl(base) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) >= 0.80 +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) >= 0.19 +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IO::Dir) +BuildRequires: perl(JSON::PP) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) +BuildRequires: perl(open) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(utf8) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) + +%description +YAML::Tiny is a perl class for reading and writing YAML-style files, +written with as little code as possible, reducing load time and +memory overhead. + +%prep +%setup -q -n YAML-Tiny-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-autovivification/perl-autovivification.spec b/SPECS/perl-autovivification/perl-autovivification.spec new file mode 100644 index 00000000..9b231c3b --- /dev/null +++ b/SPECS/perl-autovivification/perl-autovivification.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-autovivification +Version: 0.18 +Release: %autorelease +Summary: Lexically disable autovivification +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/autovivification +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/V/VP/VPIT/autovivification-%{version}.tar.gz + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.3 +BuildRequires: perl(Config) +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(POSIX) +BuildRequires: perl(Test::More) +BuildRequires: perl(XSLoader) + +%description +When an undefined variable is dereferenced, it gets silently upgraded to an +array or hash reference (depending of the type of the dereferencing). This +behaviour is called autovivification and usually does what you mean (e.g. +when you store a value) but it may be unnatural or surprising because your +variables gets populated behind your back. This is especially true when +several levels of dereferencing are involved, in which case all levels are +vivified up to the last, or when it happens in intuitively read-only +constructs like exists. + +%prep +%setup -q -n autovivification-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" +%{make_build} + +%install +%perl_make_install +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-common-sense/perl-common-sense.spec b/SPECS/perl-common-sense/perl-common-sense.spec new file mode 100644 index 00000000..20d62535 --- /dev/null +++ b/SPECS/perl-common-sense/perl-common-sense.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-common-sense +Version: 3.75 +Release: %autorelease +Summary: Save a tree AND a kitten, use common::sense! +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/common-sense +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/common-sense-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) + +%description +This module implements some sane defaults for Perl programs, as defined +by two typical (or not so typical - use your common sense) specimens of +Perl coders. + +%prep +%setup -q -n common-sense-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-gettext/perl-gettext.spec b/SPECS/perl-gettext/perl-gettext.spec new file mode 100644 index 00000000..66f250bd --- /dev/null +++ b/SPECS/perl-gettext/perl-gettext.spec @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# This package should be renamed into perl-Locale-gettext +%global tarname Locale-gettext + +Name: perl-gettext +Version: 1.07 +Release: %autorelease +Summary: Interface to gettext family of functions +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/release/gettext +#!RemoteAsset +Source0: https://cpan.metacpan.org/authors/id/P/PV/PVANDRY/%{tarname}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: perl +BuildRequires: perl-devel +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +# Run-time: +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) +BuildRequires: perl(DynaLoader) +BuildRequires: perl(POSIX) +# Optional +BuildRequires: perl(Encode) +# Tests: +BuildRequires: perl(Test) + +# Need to allow LANG=en_US.UTF-8 +BuildRequires: glibc-locale-base + +%description +The gettext module permits access from perl to the gettext() family of +functions for retrieving message strings from databases constructed to +internationalize software. + +%conf +# No configure + +%build -p +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 NO_PERLLOCAL=1 + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%defattr(-,root,root,755) +%doc README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-libintl-perl/perl-libintl-perl.spec b/SPECS/perl-libintl-perl/perl-libintl-perl.spec new file mode 100644 index 00000000..35dd333f --- /dev/null +++ b/SPECS/perl-libintl-perl/perl-libintl-perl.spec @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global tar_name libintl-perl + +Name: perl-libintl-perl +Version: 1.35 +Release: %autorelease +Summary: Internationalization library for Perl, compatible with gettext +License: GPL-3.0-or-later AND LGPL-2.0-or-later +URL: https://metacpan.org/release/libintl-perl +#!RemoteAsset +Source0: https://cpan.metacpan.org/authors/id/G/GU/GUIDO/%{tar_name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: perl +BuildRequires: perl-devel +BuildRequires: perl-macros +BuildRequires: make +BuildRequires: perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Find) +BuildRequires: perl(strict) +BuildRequires: perl(vars) +BuildRequires: sed +# Run-time: +BuildRequires: perl(base) +BuildRequires: perl(bytes) +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) +BuildRequires: perl(DynaLoader) +BuildRequires: perl(Encode) +BuildRequires: perl(Encode::Alias) +BuildRequires: perl(Exporter) +BuildRequires: perl(File::Spec) +BuildRequires: perl(integer) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(locale) +BuildRequires: perl(POSIX) +# Optional run-time: +# TODO: enable this back +#BuildRequires: perl(File::ShareDir) +BuildRequires: perl(I18N::Langinfo) +# Tests: +BuildRequires: perl(File::Basename) +BuildRequires: perl(Test) +BuildRequires: perl(Test::Harness) +Requires: perl(Carp) +Requires: perl(Encode::Alias) +Requires: perl(POSIX) + +%description +The package libintl-perl is an internationalization library for Perl that +aims to be compatible with the Uniforum message translations system as +implemented for example in GNU gettext. + +%conf +# No configure + +%prep -a +# Remove executable permissions +find -type f -exec chmod -x {} \; +# Remove shebang lines +find lib/Locale gettext_xs \( -name '*.pm' -o -name '*.pod' \) \ + -exec sed -i -e '/^#! \/bin\/false/d' {} \; +# Delete unwanted files +rm MANIFEST + +%build -p +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PERLLOCAL=1 + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes Credits FAQ NEWS README README.md README-oldversions README.solaris README.win32 REFERENCES THANKS TODO +%license COPYING + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-libwww-perl/perl-libwww-perl.spec b/SPECS/perl-libwww-perl/perl-libwww-perl.spec new file mode 100644 index 00000000..add2353d --- /dev/null +++ b/SPECS/perl-libwww-perl/perl-libwww-perl.spec @@ -0,0 +1,102 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-libwww-perl +Version: 6.80 +Release: %autorelease +Summary: libwww::perl Perl module +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/libwww-perl +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/O/OA/OALDERS/libwww-perl-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(Digest::MD5) +BuildRequires: perl(Encode) >= 2.12 +BuildRequires: perl(Encode::Locale) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Listing) >= 6 +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Temp) +BuildRequires: perl(FindBin) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(HTML::Entities) +BuildRequires: perl(HTML::HeadParser) >= 3.71 +BuildRequires: perl(HTTP::CookieJar::LWP) +BuildRequires: perl(HTTP::Cookies) >= 6 +BuildRequires: perl(HTTP::Daemon) >= 6.12 +BuildRequires: perl(HTTP::Date) >= 6 +BuildRequires: perl(HTTP::Negotiate) >= 6 +BuildRequires: perl(HTTP::Request) >= 6.18 +BuildRequires: perl(HTTP::Request::Common) >= 6.18 +BuildRequires: perl(HTTP::Response) >= 6.18 +BuildRequires: perl(HTTP::Status) >= 6.18 +BuildRequires: perl(IO::Select) +BuildRequires: perl(IO::Socket) +BuildRequires: perl(LWP::MediaTypes) >= 6 +BuildRequires: perl(MIME::Base64) >= 2.1 +BuildRequires: perl(Module::Load) +BuildRequires: perl(Net::FTP) >= 2.58 +BuildRequires: perl(Net::HTTP) >= 6.18 +BuildRequires: perl(parent) >= 0.217 +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.96 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(Test::RequiresInternet) +BuildRequires: perl(Try::Tiny) +BuildRequires: perl(URI) >= 1.10 +BuildRequires: perl(URI::Escape) +BuildRequires: perl(warnings) +BuildRequires: perl(WWW::RobotRules) >= 6 + +Requires: perl(Encode) >= 2.12 +Requires: perl(File::Listing) >= 6 +Requires: perl(HTML::HeadParser) >= 3.71 +Requires: perl(HTTP::Cookies) >= 6 +Requires: perl(HTTP::Date) >= 6 +Requires: perl(HTTP::Negotiate) >= 6 +Requires: perl(HTTP::Request) >= 6.18 +Requires: perl(HTTP::Request::Common) >= 6.18 +Requires: perl(HTTP::Response) >= 6.18 +Requires: perl(HTTP::Status) >= 6.18 +Requires: perl(LWP::MediaTypes) >= 6 +Requires: perl(MIME::Base64) >= 2.1 +Requires: perl(Net::FTP) >= 2.58 +Requires: perl(Net::HTTP) >= 6.18 +Requires: perl(parent) >= 0.217 +Requires: perl(URI) >= 1.10 +Requires: perl(WWW::RobotRules) >= 6 + +%description +As of libwww-perl v6.02 you need to install the LWP::Protocol::https module +from its own separate distribution to enable support for https://... URLs +for LWP::UserAgent. + +%prep +%setup -q -n libwww-perl-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes codecov.yml CONTRIBUTING.md perlimports.toml README.SSL talk-to-ourself + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-libxml-perl/perl-libxml-perl.spec b/SPECS/perl-libxml-perl/perl-libxml-perl.spec new file mode 100644 index 00000000..76c4fa64 --- /dev/null +++ b/SPECS/perl-libxml-perl/perl-libxml-perl.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-libxml-perl +Version: 0.08 +Release: %autorelease +Summary: libxml::perl Perl module +License: CHECK(GPL-1.0-or-later OR Artistic-1.0-Perl) +URL: https://metacpan.org/dist/libxml-perl +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/K/KM/KMACLEOD/libxml-perl-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(XML::Parser) >= 2.19 + +%description +libxml-perl is a collection of smaller Perl modules, scripts, and documents +for working with XML in Perl. libxml-perl software works in combination +with XML::Parser, PerlSAX, XML::DOM, XML::Grove and others. + +%prep +%setup -q -n libxml-perl-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc ChangeLog Changes libxml-perl-0.08.spec libxml-perl.spec README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-namespace-autoclean/perl-namespace-autoclean.spec b/SPECS/perl-namespace-autoclean/perl-namespace-autoclean.spec new file mode 100644 index 00000000..62c05b43 --- /dev/null +++ b/SPECS/perl-namespace-autoclean/perl-namespace-autoclean.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-namespace-autoclean +Version: 0.31 +Release: %autorelease +Summary: Keep imports out of your namespace +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/namespace-autoclean +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/namespace-autoclean-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.6.0 +BuildRequires: perl(B) +BuildRequires: perl(B::Hooks::EndOfScope) >= 0.12 +BuildRequires: perl(Carp) +BuildRequires: perl(constant) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Spec) +BuildRequires: perl(FindBin) +BuildRequires: perl(List::Util) +BuildRequires: perl(namespace::clean) >= 0.20 +BuildRequires: perl(overload) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Needs) +BuildRequires: perl(warnings) + +Requires: perl(B::Hooks::EndOfScope) >= 0.12 +Requires: perl(namespace::clean) >= 0.20 + +%description +When you import a function into a Perl package, it will naturally also be +available as a method. + +%prep +%setup -q -n namespace-autoclean-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes CONTRIBUTING README + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-namespace-clean/perl-namespace-clean.spec b/SPECS/perl-namespace-clean/perl-namespace-clean.spec new file mode 100644 index 00000000..488f08de --- /dev/null +++ b/SPECS/perl-namespace-clean/perl-namespace-clean.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-namespace-clean +Version: 0.27 +Release: %autorelease +Summary: Keep imports and functions out of your namespace +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/dist/namespace-clean +#!RemoteAsset +Source0: http://www.cpan.org/authors/id/R/RI/RIBASUSHI/namespace-clean-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: make +BuildRequires: perl-rpm-packaging +BuildRequires: perl-macros +BuildRequires: perl >= 5.8.1 +BuildRequires: perl(B::Hooks::EndOfScope) >= 0.12 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Package::Stash) >= 0.23 +BuildRequires: perl(Test::More) >= 0.47 + +Requires: perl(B::Hooks::EndOfScope) >= 0.12 +Requires: perl(Package::Stash) >= 0.23 + +%description +Keeping packages clean + +%prep +%setup -q -n namespace-clean-%{version} + +%build +perl Makefile.PL INSTALLDIRS=vendor +%{make_build} + +%install +%perl_make_install +%perl_process_packlist +%perl_gen_filelist + +%files -f %{name}.files +%doc Changes + +%changelog +%{?autochangelog} diff --git a/SPECS/perl-rpm-packaging/0001-fileattrs.diff b/SPECS/perl-rpm-packaging/0001-fileattrs.diff new file mode 100644 index 00000000..8efa1228 --- /dev/null +++ b/SPECS/perl-rpm-packaging/0001-fileattrs.diff @@ -0,0 +1,18 @@ +--- fileattrs/perl.attr.orig 2023-09-19 10:10:10.000000000 +0000 ++++ fileattrs/perl.attr 2023-10-09 12:58:36.893003334 +0000 +@@ -1,3 +1,4 @@ +-%__perl_requires %{_rpmconfigdir}/perl.req ++# disabled for now ++#%__perl_requires %{_rpmconfigdir}/perl.req + %__perl_magic ^.*[Pp]erl .*$ + %__perl_flags exeonly +--- fileattrs/perllib.attr.orig 2023-09-19 10:10:10.000000000 +0000 ++++ fileattrs/perllib.attr 2023-10-09 12:58:36.893003334 +0000 +@@ -1,5 +1,6 @@ + %__perllib_provides %{_rpmconfigdir}/perl.prov +-%__perllib_requires %{_rpmconfigdir}/perl.req ++#disabled for now ++#%__perllib_requires %{_rpmconfigdir}/perl.req + %__perllib_magic ^Perl[[:digit:]] module source.* + %__perllib_path \\.pm$ + %__perllib_flags magic_and_path diff --git a/SPECS/perl-rpm-packaging/perl-rpm-packaging.spec b/SPECS/perl-rpm-packaging/perl-rpm-packaging.spec new file mode 100644 index 00000000..18481b7c --- /dev/null +++ b/SPECS/perl-rpm-packaging/perl-rpm-packaging.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl-rpm-packaging +Version: 1.2 +Release: %autorelease +Summary: RPM dependency generator for Perl +License: GPL-2.0-or-later +URL: https://github.com/rpm-software-management/perl-rpm-packaging +#!RemoteAsset +Source0: https://github.com/rpm-software-management/perl-rpm-packaging/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: 0001-fileattrs.diff +BuildArch: noarch +Requires: perl + +%description +Tools for packaging Perl projects with rpm + +%prep +%autosetup -p0 + +%install +mkdir -p %{buildroot}%{_fileattrsdir} +install -Dm0644 fileattrs/* %{buildroot}%{_fileattrsdir} +install -Dm0755 scripts/* %{buildroot}%{_rpmconfigdir} + +%files +%doc README.md +%{_fileattrsdir}/perl.attr +%{_fileattrsdir}/perllib.attr +%{_rpmconfigdir}/perl.prov +%{_rpmconfigdir}/perl.req + +%changelog +%{?autochangelog} diff --git a/SPECS/perl/0001-remove-errno-check.patch b/SPECS/perl/0001-remove-errno-check.patch new file mode 100644 index 00000000..e4f08314 --- /dev/null +++ b/SPECS/perl/0001-remove-errno-check.patch @@ -0,0 +1,41 @@ +From: Brendan O'Dea +Date: Fri, 16 Dec 2005 01:32:14 +1100 +Subject: Remove Errno version check due to upgrade problems with long-running + processes. + +Bug-Debian: http://bugs.debian.org/343351 + +Remove version check which can cause problems for long running +processes embedding perl when upgrading to a newer version, +compatible, but built on a different machine. +--- + ext/Errno/Errno_pm.PL | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL +index 77aa19b..8e33044 100644 +--- a/ext/Errno/Errno_pm.PL ++++ b/ext/Errno/Errno_pm.PL +@@ -288,22 +288,6 @@ package Errno; + use Exporter 'import'; + use strict; + +-EDQ +- +- # Errno only needs Config to make sure it hasn't changed platforms. +- # If someone set $ENV{PERL_BUILD_EXPAND_CONFIG_VARS} at build time, +- # they've already declared perl doesn't need to worry about this risk. +- if(!$ENV{'PERL_BUILD_EXPAND_CONFIG_VARS'}) { +- print <<"CONFIG_CHECK_END"; +-use Config; +-"\$Config{'archname'}-\$Config{'osvers'}" eq +-"$archname-$osvers" or +- die "Errno architecture ($archname-$osvers) does not match executable architecture (\$Config{'archname'}-\$Config{'osvers'})"; +- +-CONFIG_CHECK_END +-} +- +- print <<"EDQ"; + our \$VERSION = "$VERSION"; + \$VERSION = eval \$VERSION; + diff --git a/SPECS/perl/config.over b/SPECS/perl/config.over new file mode 100644 index 00000000..dc164dfe --- /dev/null +++ b/SPECS/perl/config.over @@ -0,0 +1,6 @@ +#!/bin/sh +osvers="6.6.0" +myuname="openruyi" +myhostname="openruyi" +mydomain='.nonet' +cf_time=$(LC_ALL=C date --utc -d @$SOURCE_DATE_EPOCH) diff --git a/SPECS/perl/macros.perl b/SPECS/perl/macros.perl new file mode 100644 index 00000000..616c4d3e --- /dev/null +++ b/SPECS/perl/macros.perl @@ -0,0 +1,194 @@ +# macros.perl file +# macros for perl module building. handle with care. + +# Useful perl macros +# +%perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch) +%perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib) +%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) +%perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib) +%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) +%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) + +%perl_testdir %{_libexecdir}/perl5-tests +%cpan_dist_name %(eval echo %{name} | %{__sed} -e 's/^perl-//') + +%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!") +%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!") +%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!") +%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!") +%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!") +%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!") +%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!") +%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!") +%perl_prefix %{buildroot} + +%fix_shbang_line() \ +TMPHEAD=`mktemp`\ +TMPBODY=`mktemp`\ +for file in %* ; do \ + head -1 $file > $TMPHEAD\ + tail -n +2 $file > $TMPBODY\ + %{__perl} -pi -e '$f = /^#!/ ? "" : "#!%{__perl}$/"; $_="$f$_"' $TMPHEAD\ + cat $TMPHEAD $TMPBODY > $file\ +done\ +%{__perl} -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(qw{%*})"\ +%{__rm} $TMPHEAD $TMPBODY\ +%{nil} + +%perl_requires() \ +Requires: perl(:MODULE_COMPAT_%{perl_version}) + +%libperl_requires() \ +Requires: perl = %{perl_version} + +%perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor +%perl_process_packlist(n:) \ + if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then \ + find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm \ + if [ %{_target_cpu} == noarch ]; then \ + find $RPM_BUILD_ROOT%perl_vendorarch/auto -depth -type d -print0 | xargs -0 -r rmdir \ + fi \ + fi \ + rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ + %nil + +# macro: perl_gen_filelist +# do the rpmlint happy filelist generation +# with %dir in front of directories +# +%perl_gen_filelist(n)\ +FILES=%{name}.files\ +# fgen_dir func\ +# IN: dir\ +fgen_dir(){\ +%{__cat} >> $FILES << EOF\ +%dir ${1}\ +EOF\ +}\ +# fgen_file func\ +# IN: file\ +fgen_file(){\ +%{__cat} >> $FILES << EOF\ +${1}\ +EOF\ +}\ +# handle %{perl_vendorarch} (arch-specific vendor dir) if it exists\ +if [ -d ${RPM_BUILD_ROOT}%{perl_vendorarch} ]; then\ + # check for files in %{perl_vendorarch}\ + RES=`find ${RPM_BUILD_ROOT}%{perl_vendorarch} -maxdepth 1 -type f`\ + if [ -n "$RES" ]; then\ + for file in $RES; do\ + fgen_file "%{perl_vendorarch}/$(basename ${file})"\ + done\ + fi\ + \ + # get all dirs into array\ + base_dir="${RPM_BUILD_ROOT}%{perl_vendorarch}/"\ + all_dir=()\ + for dir in `find ${base_dir} -type d | sort`; do\ + if [ "$dir" = "${base_dir}" ]; then\ + continue\ + else\ + el=${dir#$base_dir}\ + all_dir=(${all_dir[@]} $el)\ + fi\ + done\ + \ + # build filelist\ + for i in ${all_dir[@]}; do\ + # do not add "dir {perl_vendorarch/arch}/auto", included in perl package\ + if [ "${i}" = "auto" ]; then\ + continue\ + fi\ + if [ "%{perl_vendorarch}/${i}" = "%{perl_vendorarch}/auto" ]; then\ + continue\ + else\ + if [ -d ${base_dir}/${i} ]; then\ + if [ "%{perl_vendorarch}/${i}" != "%{perl_vendorarch}" ]; then\ + fgen_dir "%{perl_vendorarch}/${i}"\ + fi\ + RES=`find "${base_dir}/${i}" -maxdepth 1 -type f`\ + for file in $RES; do\ + fgen_file "%{perl_vendorarch}/${i}/$(basename ${file})"\ + done\ + fi\ + fi\ + done\ +fi\ +\ +# handle %{perl_vendorlib} (pure-perl vendor dir) if it exists\ +if [ -d ${RPM_BUILD_ROOT}%{perl_vendorlib} ]; then\ + # check for files in %{perl_vendorlib}\ + RES=`find ${RPM_BUILD_ROOT}%{perl_vendorlib} -maxdepth 1 -type f`\ + if [ -n "$RES" ]; then\ + for file in $RES; do\ + fgen_file "%{perl_vendorlib}/$(basename ${file})"\ + done\ + fi\ + \ + # get all dirs into array\ + base_dir="${RPM_BUILD_ROOT}%{perl_vendorlib}/"\ + all_dir=()\ + for dir in `find ${base_dir} -type d | sort`; do\ + if [ "$dir" = "${base_dir}" ]; then\ + continue\ + else\ + el=${dir#$base_dir}\ + all_dir=(${all_dir[@]} $el)\ + fi\ + done\ + \ + # build filelist\ + for i in ${all_dir[@]}; do\ + # do not add auto directories either\ + if [ "${i}" = "auto" ]; then\ + continue\ + fi\ + if [ "%{perl_vendorlib}/${i}" = "%{perl_vendorlib}/auto" ]; then\ + continue\ + else\ + if [ -d ${base_dir}/${i} ]; then\ + if [ "%{perl_vendorlib}/${i}" != "%{perl_vendorlib}" ]; then\ + fgen_dir "%{perl_vendorlib}/${i}"\ + fi\ + RES=`find "${base_dir}/${i}" -maxdepth 1 -type f`\ + for file in $RES; do\ + fgen_file "%{perl_vendorlib}/${i}/$(basename ${file})"\ + done\ + fi\ + fi\ + done\ +fi\ +# add man pages\ +# if exist :)\ +if [ -d "${RPM_BUILD_ROOT}%{_mandir}" ]; then\ +EXT="%{perl_man3ext}"\ +for file in `cd "${RPM_BUILD_ROOT}%{_mandir}" && find . -type f -name "*${EXT}*"`; do \ + new="${file/${EXT}/${EXT}c}" \ + src="${RPM_BUILD_ROOT}%{_mandir}/$file" \ + dst="${RPM_BUILD_ROOT}%{_mandir}/$new" \ + if [ -e "$src" ]; then \ + mv "$src" "$dst" \ + elif [ -e "$src.gz" ]; then \ + mv "$src.gz" "$dst.gz" \ + fi \ +done \ +fgen_file "%{_mandir}/man?/*"\ +fi\ +\ +# add packlist file\ +# generated fom perllocal.pod\ +if [ -f "${RPM_BUILD_ROOT}/var/adm/perl-modules/%{name}" ]; then\ + fgen_file "/var/adm/perl-modules/%{name}"\ +fi\ +\ +# check for files in %{_bindir}\ +if [ -d ${RPM_BUILD_ROOT}%{_bindir} ]; then\ + RES=`find "${RPM_BUILD_ROOT}%{_bindir}" -maxdepth 1 -type f`\ + if [ -n "$RES" ]; then\ + for file in $RES; do\ + fgen_file "%{_bindir}/$(basename ${file})"\ + done\ + fi\ +fi diff --git a/SPECS/perl/perl.spec b/SPECS/perl/perl.spec new file mode 100644 index 00000000..1c880554 --- /dev/null +++ b/SPECS/perl/perl.spec @@ -0,0 +1,226 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: perl +Version: 5.42.0 +Release: %autorelease +Summary: Practical Extraction and Report Language +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://www.perl.org/ +#!RemoteAsset +Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz +# Use config.over to make build of perl reproducible +Source1: config.over +Source2: macros.perl +BuildSystem: autotools + +# Remove Errno version check +Patch0: 0001-remove-errno-check.patch + +# use "lib", not %%{_lib}, for privlib, sitelib, and vendorlib + +# Perl INC path (perl -V) in search order: +# - /usr/local/share/perl5 -- for CPAN (site lib) +# - /usr/local/lib/perl5 -- for CPAN (site arch) +# - /usr/share/perl5/vendor_perl -- 3rd party (vendor lib) +# - /usr/lib/perl5/vendor_perl -- 3rd party (vendor arch) +# - /usr/share/perl5 -- openRuyi (priv lib) +# - /usr/lib/perl5 -- openRuyi (arch lib) + +# If the %%{version} is 5.42.0, then %%{perl_abi} is 5.42 +%global perl_abi %(echo '%{version}' | sed 's/^\\([^.]*\\.[^.]*\\).*/\\1/') +%global privlib %{_prefix}/share/perl5 +%global archlib %{_prefix}/lib/perl5 +%global perl_vendorlib %{privlib}/vendor_perl +%global perl_vendorarch %{archlib}/vendor_perl + +BuildRequires: bash +BuildRequires: bzip2-devel +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: glibc +BuildRequires: make +BuildRequires: sed +BuildRequires: tar +BuildRequires: zlib-devel + +Provides: perl(:MODULE_COMPAT_%{version}) +Provides: /bin/perl +%description +Perl is a high-level programming language with roots in C, sed, awk and shell +scripting. Perl is good at handling processes and files, and is especially +good at handling text. Perl's hallmarks are practicality and efficiency. +While it is used to do a lot of different things, Perl's most common +applications are system administration utilities and web programming. + +This is a metapackage with all the Perl bits and core modules that can be +found in the upstream tarball from perl.org. + +If you need only a specific feature, you can install a specific package +instead. E.g. to handle Perl scripts with %{_bindir}/perl interpreter, +install perl-interpreter package. See perl-interpreter description for more +details on the Perl decomposition into packages. + +%package devel +Summary: Header files for use in perl development +License: (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 +Requires: perl(ExtUtils::ParseXS) +Requires: perl +Requires: perl(Devel::PPPort) +Requires: libxcrypt-devel + +%description devel +This package contains header files and development modules. +Most perl packages will need to install perl-devel to build. + +%package macros +Summary: Macros for rpmbuild +License: GPL-1.0-or-later OR Artistic-1.0-Perl +BuildArch: noarch +Requires: perl + +%description macros +RPM macros that are handy when building binary RPM packages. + +%prep -a +# Copy config.over to override Configure's guesses. +cp %{SOURCE1} . + +%conf +# It's called configure.gnu + +%build +export BUILD_BZIP2=0 +BZIP2_LIB=%{_libdir} + +cp -a lib savelib +# Let's build with shared libs +./configure.gnu -des \ + -Dusethreads \ + -Dcf_by='openRuyi' \ + -Doptimize="none" \ + -Dprefix=%{_prefix} \ + -Dinstallstyle=lib/perl5 \ + -Dvendorprefix=%{_prefix} \ + -Dprivlib="%{privlib}" \ + -Darchlib="%{archlib}" \ + -Dsitelib="%{_prefix}/local/share/perl5/%{perl_abi}" \ + -Dsitearch="%{_prefix}/local/lib/perl5/%{perl_abi}" \ + -Dvendorlib="%{perl_vendorlib}" \ + -Dvendorarch="%{perl_vendorarch}" \ + -Dscriptdir='%{_bindir}' \ + -Dman1dir=%{_mandir}/man1 \ + -Dman3dir=%{_mandir}/man3 \ + -Dman1ext=1perl \ + -Dman3ext=3perl \ + -Dinc_version_list=none \ + -Dlddlflags="-shared $RPM_LD_FLAGS" \ + -Dldflags="$RPM_LD_FLAGS" \ + -Dccflags="$RPM_OPT_FLAGS" \ + -Dccdlflags="-Wl,--enable-new-dtags -Wl,-E $RPM_LD_FLAGS" \ + -Duseshrplib + +make %{?_smp_mflags} +# Save a copy of libperl.so and Config files +cp -p libperl.so savelibperl.so +cp -p lib/Config.pm saveConfig.pm +cp -p lib/Config_heavy.pl saveConfig_heavy.pl + +# Let's cleanup and build again, this time without shared libs +make -j1 clobber +rm -rf lib +mv savelib lib + +./configure.gnu -des \ + -Dusethreads \ + -Dcf_by='openRuyi' \ + -Doptimize="none" \ + -Dprefix=%{_prefix} \ + -Dinstallstyle=lib/perl5 \ + -Dvendorprefix=%{_prefix} \ + -Dprivlib="%{privlib}" \ + -Darchlib="%{archlib}" \ + -Dsitelib="%{_prefix}/local/share/perl5/%{perl_abi}" \ + -Dsitearch="%{_prefix}/local/lib/perl5/%{perl_abi}" \ + -Dvendorlib="%{perl_vendorlib}" \ + -Dvendorarch="%{perl_vendorarch}" \ + -Dscriptdir='%{_bindir}' \ + -Dman1dir=%{_mandir}/man1 \ + -Dman3dir=%{_mandir}/man3 \ + -Dman1ext=1perl \ + -Dman3ext=3perl \ + -Dinc_version_list=none \ + -Dlddlflags="-shared $RPM_LD_FLAGS" \ + -Dldflags="$RPM_LD_FLAGS" \ + -Dccflags="$RPM_OPT_FLAGS" \ + -Dccdlflags="-Wl,--enable-new-dtags -Wl,-E $RPM_LD_FLAGS" + +make %{?_smp_mflags} + +%install +umask 022 +%make_install + +install -d -m 0755 %{buildroot}%{perl_vendorarch}/auto +install -d -m 0755 %{buildroot}%{perl_vendorlib} + +# %{archlib} & %{privlib} should have 0755 too +chmod 0755 %{buildroot}%{archlib} +chmod 0755 %{buildroot}%{privlib} + +find %{buildroot}%{archlib} -type d -exec chmod 0755 {} + +find %{buildroot}%{privlib} -type d -exec chmod 0755 {} + +find %{buildroot}%{archlib} -type f -name '*.pm' -exec chmod 0644 {} + +find %{buildroot}%{privlib} -type f -name '*.pm' -exec chmod 0644 {} + +find %{buildroot}%{archlib} -type f -name '*.so' -exec chmod 0755 {} + + +# Install saved files +install -m 555 savelibperl.so %{buildroot}%{archlib}/CORE/libperl.so +install -m 444 saveConfig.pm %{buildroot}%{archlib}/Config.pm +install -m 444 saveConfig_heavy.pl %{buildroot}%{archlib}/Config_heavy.pl + +# Install macros +mkdir -p ${RPM_BUILD_ROOT}%{_rpmmacrodir} +install -p -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_rpmmacrodir} + +# remove broken pm - we don't have the module +rm -f %{buildroot}%{archlib}/Pod/Perldoc/ToTk.pm +# we don't need this in here +rm -f %{buildroot}%{archlib}/CORE/libperl.a +# test CVE-2007-5116 +%{buildroot}%{_bindir}/perl -e '$r=chr(128)."\\x{100}";/$r/' +# test perl-regexp-refoverflow.diff, should not crash or hang +%{buildroot}%{_bindir}/perl -e 'eval "/\\6666666666/"' + +%files +%license Copying Artistic +%dir %attr(0755,root,root) %{archlib} +%dir %attr(0755,root,root) %{privlib} +%dir %attr(0755,root,root) %{perl_vendorlib} +%dir %attr(0755,root,root) %{perl_vendorarch} +%{_bindir}/* +%{archlib}/* +%{privlib}/* +%{_mandir}/man1/perl* +%{_mandir}/man1/*.gz +%{_mandir}/man3/* +%exclude %{archlib}/.packlist + +%files devel +%{_bindir}/h2xs +%{_mandir}/man1/h2xs* +%{_bindir}/perlivp +%{_mandir}/man1/perlivp* +%{archlib}/CORE/*.h +%dir %{privlib}/ExtUtils +%{privlib}/ExtUtils/typemap + +%files macros +%{_rpmmacrodir}/macros.perl + +%changelog +%{?autochangelog} diff --git a/SPECS/pesign/0001-cms_common-Fixed-Segmentation-fault.patch b/SPECS/pesign/0001-cms_common-Fixed-Segmentation-fault.patch new file mode 100644 index 00000000..4464ed03 --- /dev/null +++ b/SPECS/pesign/0001-cms_common-Fixed-Segmentation-fault.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nicolas Frayer +Date: Mon, 20 Feb 2023 15:26:20 +0100 +Subject: [PATCH] cms_common: Fixed Segmentation fault + +When running efikeygen, the binary crashes with a segfault due +to dereferencing a **ptr instead of a *ptr. + +Signed-off-by: Nicolas Frayer +(cherry picked from commit 227435af461f38fc4abeafe02884675ad4b1feb4) +--- + src/cms_common.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cms_common.c b/src/cms_common.c +index 24576f2..89d946a 100644 +--- a/src/cms_common.c ++++ b/src/cms_common.c +@@ -956,7 +956,7 @@ find_certificate_by_issuer_and_sn(cms_context *cms, + if (!ias) + cnreterr(-1, cms, "invalid issuer and serial number"); + +- return find_certificate_by_callback(cms, match_issuer_and_serial, &ias, cert); ++ return find_certificate_by_callback(cms, match_issuer_and_serial, ias, cert); + } + + int diff --git a/SPECS/pesign/0002-Fix-reversed-calloc-arguments.patch b/SPECS/pesign/0002-Fix-reversed-calloc-arguments.patch new file mode 100644 index 00000000..861993c1 --- /dev/null +++ b/SPECS/pesign/0002-Fix-reversed-calloc-arguments.patch @@ -0,0 +1,41 @@ +From 1f9e2fa0b4d872fdd01ca3ba81b04dfb1211a187 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 2 Feb 2024 09:32:48 -0500 +Subject: [PATCH] Fix reversed calloc() arguments + +The prototype is "void *calloc(size_t nelem, size_t elsize);" + +These two instances had them reversed, almost certainly leading to +buffer overflow issues. This was detected by +-Werror=calloc-transposed-args on gcc. + +Signed-off-by: Stephen Gallagher +--- + src/pesigcheck.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pesigcheck.c b/src/pesigcheck.c +index 6dc67f76a81..8119cf10a7b 100644 +--- a/src/pesigcheck.c ++++ b/src/pesigcheck.c +@@ -240,7 +240,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons, + + cert_iter iter; + +- reasonps = calloc(sizeof(struct reason), 512); ++ reasonps = calloc(512, sizeof(struct reason)); + if (!reasonps) + err(1, "check_signature"); + +@@ -281,7 +281,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons, + + num_reasons += 16; + +- new_reasons = calloc(sizeof(struct reason), num_reasons); ++ new_reasons = calloc(num_reasons, sizeof(struct reason)); + if (!new_reasons) + err(1, "check_signature"); + reasonps = new_reasons; +-- +2.41.0 + diff --git a/SPECS/pesign/0003-Work-around-OpenSC-changing-token-names-on-fedora-bu.patch b/SPECS/pesign/0003-Work-around-OpenSC-changing-token-names-on-fedora-bu.patch new file mode 100644 index 00000000..663f4c44 --- /dev/null +++ b/SPECS/pesign/0003-Work-around-OpenSC-changing-token-names-on-fedora-bu.patch @@ -0,0 +1,61 @@ +From dc17b1d248c705073a5160e7c871a52aa9ce6e99 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 21 Nov 2024 13:58:05 -0500 +Subject: [PATCH] Work around OpenSC changing token names on fedora builders + *again*. + +Once again OpenSC has changed how token names work in an incompatible +way, and we need to work around it even harder on the Fedora kernel +builders. + +Reviewed-by: Kevin Fenzi +Reviewed-by: Justin Forbes +Signed-off-by: Peter Jones +--- + src/macros.pesign | 3 ++- + src/pesign-rpmbuild-helper.in | 15 ++++++++++++++- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/src/macros.pesign b/src/macros.pesign +index b7d6af1f6f5..47e3f19f8ed 100644 +--- a/src/macros.pesign ++++ b/src/macros.pesign +@@ -9,7 +9,8 @@ + %__pesign_token %{nil}%{?pe_signing_token:--token "%{pe_signing_token}"} + %__pesign_cert %{!?pe_signing_cert:"Red Hat Test Certificate"}%{?pe_signing_cert:"%{pe_signing_cert}"} + +-%__pesign_client_token %{!?pe_signing_token:"OpenSC Card (Fedora Signer)"}%{?pe_signing_token:"%{pe_signing_token}"} ++# See the comment in pesign-rpmbuild-helper.in about the token name here. ++%__pesign_client_token %{!?pe_signing_token:"OpenSC Card"}%{?pe_signing_token:"%{pe_signing_token}"} + %__pesign_client_cert %{!?pe_signing_cert:"/CN=Fedora Secure Boot Signer"}%{?pe_signing_cert:"%{pe_signing_cert}"} + + %_pesign /usr/bin/pesign +diff --git a/src/pesign-rpmbuild-helper.in b/src/pesign-rpmbuild-helper.in +index 30d5441207b..42de1a1e002 100644 +--- a/src/pesign-rpmbuild-helper.in ++++ b/src/pesign-rpmbuild-helper.in +@@ -214,7 +214,20 @@ main() { + rm -rf "${sattrs}" "${sattrs}.sig" "${nssdir}" + elif [[ -n "${socket}" ]] ; then + ### welcome haaaaack city +- if [[ "${client_token[1]}" = "OpenSC Card (Fedora Signer)" ]] ; then ++ ### different versions of the opensc library name the token different ++ ### things, and as of this commit: ++ ### https://github.com/OpenSC/OpenSC/commit/259decf656a77a6d1bd3e944d6f198ed70832ff5 ++ ### that includes just not including the token label unless there's ++ ### more than one token. Unfortunately this is both for the displayed ++ ### info and for the token name you specify to /use/ the token, so we ++ ### have to handle all of those options here, and change the name to ++ ### match whatever the current version of opensc is using in the rpm ++ ### macro where we're setting it. Thankfully this is just a "is this ++ ### Fedora" check for us, and if it's RHEL we're not using OpenSC at ++ ### all. ++ if [[ "${client_token[1]}" = "OpenSC Card (Fedora Signer)" ]] \ ++ || [[ "${client_token[1]}" = "Fedora Signer" ]] \ ++ || [[ "${client_token[1]}" = "OpenSC Card" ]] ; then + if [[ "${input[1]}" =~ (/|^)vmlinuz($|[_.-]) ]] \ + || [[ "${input[1]}" =~ (/|^)bzImage($|[_.-]) ]] ; then + if [[ "${rhelcertfile}" =~ redhatsecureboot501.* ]] \ +-- +2.47.0 + diff --git a/SPECS/pesign/0004-cms_common-skip-authentication-on-the-Friendly-slot.patch b/SPECS/pesign/0004-cms_common-skip-authentication-on-the-Friendly-slot.patch new file mode 100644 index 00000000..d13e4544 --- /dev/null +++ b/SPECS/pesign/0004-cms_common-skip-authentication-on-the-Friendly-slot.patch @@ -0,0 +1,41 @@ +From 616ec5f25adbde1a4bd78cdcacd6dcd7ecfa5a5c Mon Sep 17 00:00:00 2001 +From: Gary Lin +Date: Thu, 22 Dec 2022 13:49:34 +0800 +Subject: [PATCH] cms_common: skip authentication on the 'Friendly' slot + +When finding a certificate in a 'Friendly' slot without the need of the +private key, it is not necessary to authenticate the slot. + +For example, when the signed attributes and the raw signature are +created in a server and the user has the certificate, signkey.x509, and +tries to import them into myapp.efi: + + $ certutil -N -d nssdb -f passwd + $ certutil -A -d nssdb -f passwd -n signkey -t CT,CT,CT \ + -i signkey.x509 + $ pesign -n nssdb -c signkey -i myapp.efi -o myapp.efi.signed \ + -d sha256 -I myapp.sattr -R myapp.sig + +Since the "signkey" is 'Friendly', i.e. publicly readable, and the +private key is not needed, we can just skip the authentication and find +"signkey" in the slot. + +Signed-off-by: Gary Lin +--- + src/cms_common.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/cms_common.c b/src/cms_common.c +index cf572ca..44e5cca 100644 +--- a/src/cms_common.c ++++ b/src/cms_common.c +@@ -628,7 +628,8 @@ find_certificate(cms_context *cms, int needs_private_key) + + int errnum; + SECStatus status; +- if (PK11_NeedLogin(psle->slot) && !PK11_IsLoggedIn(psle->slot, cms)) { ++ if ((needs_private_key || !PK11_IsFriendly(psle->slot)) && ++ (PK11_NeedLogin(psle->slot) && !PK11_IsLoggedIn(psle->slot, cms))) { + status = PK11_Authenticate(psle->slot, PR_TRUE, cms); + if (status != SECSuccess) { + save_port_err() { diff --git a/SPECS/pesign/pesign.py b/SPECS/pesign/pesign.py new file mode 100644 index 00000000..4ee59f8f --- /dev/null +++ b/SPECS/pesign/pesign.py @@ -0,0 +1,91 @@ +#!/usr/bin/python3 +# +# Copyright 2017 Peter Jones +# +# Distributed under terms of the GPLv3 license. + +""" +mock plugin to make sure pesign and mockbuild users have the right uid and +gid. +""" + +from mockbuild.trace_decorator import getLog, traceLog +import mockbuild.util + +requires_api_version = "1.1" + +@traceLog() +def init(plugins, conf, buildroot): + """ hello """ + Pesign(plugins, conf, buildroot) + +def getuid(name): + """ get a uid for a user name """ + output = mockbuild.util.do(["getent", "passwd", "%s" % (name,)], + returnOutput=1, printOutput=True) + output = output.split(':') + return output[2], output[3] + +def getgid(name): + """ get a gid for a group name """ + output = mockbuild.util.do(["getent", "group", "%s" % (name,)], + returnOutput=1, printOutput=True) + return output.split(':')[2] + +def newgroup(name, gid, rootdir): + """ create a group with a gid """ + getLog().info("creating group %s with gid %s" % (name, gid)) + mockbuild.util.do(["groupadd", + "-g", "%s" % (gid,), + "-R", "%s" % (rootdir,), + "%s" % (name,), + ]) + +def newuser(name, uid, gid, rootdir): + """ create a user with a uid """ + getLog().info("creating user %s with uid %s" % (name, uid)) + mockbuild.util.do(["useradd", + "-u", "%s" % (uid,), + "-g", "%s" % (gid,), + "-R", "%s" % (rootdir,), + "%s" % (name,)]) + +class Pesign(object): + """ Creates some stuff in our mock root """ + # pylint: disable=too-few-public-methods + @traceLog() + def __init__(self, plugins, conf, buildroot): + """ Effectively we're doing: + getent group pesign >/dev/null || groupadd -r pesign + getent passwd pesign >/dev/null || \ + useradd -r -g pesign -d /var/run/pesign -s /sbin/nologin \ + -c "Group for the pesign signing daemon" pesign + """ + + self.buildroot = buildroot + self.pesign_opts = conf + self.config = buildroot.config + self.state = buildroot.state + self.users = {} + self.groups = {} + plugins.add_hook("postinit", self._pesignPostInitHook) + + @traceLog() + def _pesignPostInitHook(self): + """ find our uid and gid lists """ + for user in self.pesign_opts['users']: + uid, gid = getuid(user) + self.users[user] = [user, uid, gid] + for group in self.pesign_opts['groups']: + gid = getgid(group) + self.groups[group] = [group, gid] + + # create our users + rootdir = self.buildroot.make_chroot_path() + for name, gid in self.groups.values(): + newgroup(name, gid, rootdir) + for name, uid, gid in self.users.values(): + newuser(name, uid, gid, rootdir) + +# -*- coding: utf-8 -*- +# vim:fenc=utf-8:tw=75 diff --git a/SPECS/pesign/pesign.spec b/SPECS/pesign/pesign.spec new file mode 100644 index 00000000..7c84d1c3 --- /dev/null +++ b/SPECS/pesign/pesign.spec @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pesign +Version: 116 +Release: %autorelease +Summary: Signing utility for UEFI binaries +License: GPL-2.0-only +#!RemoteAsset +URL: https://github.com/rhboot/pesign +Source0: https://github.com/rhboot/pesign/releases/download/%{version}/pesign-%{version}.tar.bz2 +Source1: pesign.py +Patch0: 0001-cms_common-Fixed-Segmentation-fault.patch +Patch1: 0002-Fix-reversed-calloc-arguments.patch +Patch2: 0003-Work-around-OpenSC-changing-token-names-on-fedora-bu.patch +Patch3: 0004-cms_common-skip-authentication-on-the-Friendly-slot.patch + +BuildSystem: autotools + +BuildOption(build): PREFIX=%{_prefix} +BuildOption(build): LIBDIR=%{_libdir} +BuildOption(build): LDFLAGS="${LDFLAGS} -pie -lnssutil3" +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): LIBDIR=%{_libdir} +BuildOption(install): INSTALLROOT=%{buildroot} +BuildOption(install): install_systemd + +BuildRequires: pkgconfig pkgconfig(efivar) +BuildRequires: mandoc pkgconfig(nspr) pkgconfig(nss-util) +BuildRequires: gcc make pkgconfig(nss) +BuildRequires: pkgconfig(popt) python3 libuuid util-linux-devel +BuildRequires: systemd-rpm-macros +BuildRequires: python3-devel +Requires: nss + +%description +This package contains the pesign utility for signing UEFI binaries as +well as other associated tools. + +# No configure +%conf + +# No tests +%check + +%install -a +mkdir -p %{buildroot}%{_sysconfdir}/pki/pesign/ +rm -rf %{buildroot}/boot %{buildroot}/usr/include +rm -rf %{buildroot}%{_libdir}/libdpe* + +mkdir -p %{buildroot}%{_rpmmacrodir} +mv %{buildroot}%{_sysconfdir}/rpm/macros.pesign %{buildroot}%{_rpmmacrodir}/ +rmdir %{buildroot}%{_sysconfdir}/rpm + +install -d -m 0755 %{buildroot}%{python3_sitelib}/mockbuild/plugins/ +install -m 0755 %{SOURCE1} %{buildroot}%{python3_sitelib}/mockbuild/plugins/ + + +cat >pesign.sysusers.conf < +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +Name: pigz +Version: 2.8 +Release: %autorelease +License: Zlib +Summary: Parallel implementation of gzip +URL: https://zlib.net/pigz/ +#!RemoteAsset +Source0: https://www.zlib.net/%{name}/%{name}-%{version}.tar.gz +BuildSystem: autotools +BuildRequires: which +BuildRequires: zlib-devel + +%description +pigz, which stands for parallel implementation of gzip, +is a fully functional replacement for gzip that exploits +multiple processors and multiple cores to the hilt when +compressing data. + +# no configure script +%conf +: + +%install +install -p -D pigz $RPM_BUILD_ROOT%{_bindir}/pigz +pushd $RPM_BUILD_ROOT%{_bindir}; ln pigz unpigz; popd +install -p -D pigz.1 -m 0644 $RPM_BUILD_ROOT%{_datadir}/man/man1/pigz.1 + +%files +%doc pigz.pdf README +%{_bindir}/pigz +%{_bindir}/unpigz +%{_datadir}/man/man1/pigz.* + +%changelog +%{?autochangelog} diff --git a/SPECS/pinentry/pinentry b/SPECS/pinentry/pinentry new file mode 100644 index 00000000..e4318dfe --- /dev/null +++ b/SPECS/pinentry/pinentry @@ -0,0 +1,80 @@ +#!/usr/bin/sh + +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2009 Fedora Project +# Copyright (c) 2014-2015 Red Hat +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugzilla.redhat.com/ +# +# Anna Bernathova 2006 +# Pavel Nemec 2006 +# Rex Dieter 2009 +# Pavol Rusnak 2009 +# Boris Ranto 2014 +# +# use proper binary (pinentry-qt, pinentry-gnome, pinentry-gtk-2 or pinentry-curses) + +kde_running= +arg= +display= +# look for a --display option +for opt in "$@"; do + if [ "$opt" = "--display" ]; then + arg=1 + elif [ -n "$arg" ]; then + display="$opt" + else + arg= + fi +done + +# export DISPLAY if pinentry is meant to be run on a different display +# check the KDE_FULL_SESSION variable otherwise +if [ -n "$display" ] && [ "$DISPLAY" != "$display" ]; then + export DISPLAY="$display" +elif [ -n "$KDE_FULL_SESSION" ]; then + kde_running=1 +fi + +# Check for presence of xprop binary +type xprop >/dev/null 2>/dev/null +XPROP=$? + +if [ -n "$DISPLAY" ] && [ $XPROP -eq 0 ]; then + xprop -root | grep "^KDE_FULL_SESSION" >/dev/null 2>/dev/null + if test $? -eq 0; then + kde_running=1 + fi +fi + +# if a user supplied a pinentry binary, use it +if [ -n "$PINENTRY_BINARY" ]; +then + export PINENTRY_BINARY="$PINENTRY_BINARY" +# if KDE is detected and pinentry-qt exists, use pinentry-qt +elif [ -n "$kde_running" ] && [ -x /usr/bin/pinentry-qt ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt" +# otherwise test if pinentry-gnome3 is installed +elif [ -n "$DISPLAY" ] && [ -x /usr/bin/pinentry-gnome3 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-gnome3" +# otherwise test if pinentry-gtk-2 is installed +elif [ -n "$DISPLAY" ] && [ -x /usr/bin/pinentry-gtk-2 ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-gtk-2" +# otherwise test if pinentry-qt exists although KDE is not detected +elif [ -n "$DISPLAY" ] && [ -x /usr/bin/pinentry-qt ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-qt" +# use pinentry-tty if installed +elif [ -x /usr/bin/pinentry-tty ] +then + export PINENTRY_BINARY="/usr/bin/pinentry-tty" +# pinentry-curses is installed by default +else + export PINENTRY_BINARY="/usr/bin/pinentry-curses" +fi +exec $PINENTRY_BINARY "$@" diff --git a/SPECS/pinentry/pinentry.spec b/SPECS/pinentry/pinentry.spec new file mode 100644 index 00000000..b009ca06 --- /dev/null +++ b/SPECS/pinentry/pinentry.spec @@ -0,0 +1,211 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# We don't have these yet +# If we have these, change the default to 1 +%bcond gnome 0 +%bcond gtk2 0 +%bcond qt6 0 +%bcond kf6 0 +# Remember password +%bcond libsecret 0 + +Name: pinentry +Version: 1.3.2 +Release: %autorelease +Summary: Collection of simple PIN or passphrase entry dialogs +License: GPL-2.0-or-later +URL: https://gnupg.org/ +#!RemoteAsset +Source0: %{url}/ftp/gcrypt/%{name}/%{name}-%{version}.tar.bz2 +#!RemoteAsset +Source1: %{url}/ftp/gcrypt/%{name}/%{name}-%{version}.tar.bz2.sig +# We need this wrapper +Source2: pinentry +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --disable-dependency-tracking +BuildOption(conf): --enable-pinentry-gnome3 +%if %{with gtk2} +BuildOption(conf): --enable-pinentry-gtk2 +%else +BuildOption(conf): --disable-pinentry-gtk2 +%endif +%if %{with qt6} +BuildOption(conf): --enable-pinentry-qt +%else +BuildOption(conf): --disable-pinentry-qt +%endif +BuildOption(conf): --disable-pinentry-qt5 +BuildOption(conf): --enable-pinentry-emacs +BuildOption(conf): --enable-pinentry-tty +%if %{with libsecret} +BuildOption(conf): --enable-libsecret +%else +BuildOption(conf): --disable-libsecret +%endif + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: make +BuildRequires: gettext-devel +BuildRequires: pkgconfig(libcap) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(gpg-error) +BuildRequires: pkgconfig(libassuan) +%if %{with gnome} +BuildRequires: pkgconfig(gcr-4) +%endif +%if %{with libsecret} +BuildRequires: pkgconfig(libsecret-1) +%endif +%if %{with gtk2} +BuildRequires: pkgconfig(gtk+-2.0) +%endif +%if %{with qt6} +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Gui) +BuildRequires: pkgconfig(Qt6Widgets) +BuildRequires: desktop-file-utils +%endif +%if %{with kf6} +BuildRequires: pkgconfig(KF6WindowSystem) +BuildRequires: pkgconfig(KF6GuiAddons) +%endif + +Provides: %{name}-curses = %{version}-%{release} + +%description +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the curses (text) based version of the PIN entry dialog. + +%if %{with gnome} +%package gnome3 +Summary: Passphrase/PIN entry dialog for GNOME 3 +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} + +%description gnome3 +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the GNOME 3 version of the PIN entry dialog. +%endif + +%if %{with gtk2} +%package gtk +Summary: Passphrase/PIN entry dialog based on GTK+ +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +Provides: pinentry-gtk2 = %{version}-%{release} + +%description gtk +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the GTK GUI based version of the PIN entry dialog. +%endif + +%if %{with qt6} +%package qt +Summary: Passphrase/PIN entry dialog based on Qt6 +Requires: %{name} = %{version}-%{release} +Provides: %{name}-gui = %{version}-%{release} +Provides: pinentry-qt6 = %{version}-%{release} +%if ! %{with gtk2} +# Special case to handle replacement of "default" pinentry implementation +Obsoletes: %{name}-gtk < %{version}-%{release} +%endif + +%description qt +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the Qt6 GUI based version of the PIN entry dialog. +%endif + +%package emacs +Summary: Passphrase/PIN entry dialog based on emacs +Requires: %{name} = %{version}-%{release} + +%description emacs +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the emacs based version of the PIN entry dialog. + +%package tty +Summary: Passphrase/PIN entry dialog in tty +Requires: %{name} = %{version}-%{release} + +%description tty +Pinentry is a collection of simple PIN or passphrase entry dialogs which +utilize the Assuan protocol as described by the aegypten project; see +http://www.gnupg.org/aegypten/ for details. +This package contains the tty version of the PIN entry dialog. + +%conf -p +export ACLOCAL_PATH=/usr/share/gettext/m4/ +autoreconf -fiv + +%install -a +# Symlink for Backward compatibility +%if %{with gtk2} +ln -s pinentry-gtk-2 $RPM_BUILD_ROOT%{_bindir}/pinentry-gtk +%endif +%if %{with qt6} +ln -s pinentry-qt $RPM_BUILD_ROOT%{_bindir}/pinentry-qt4 +ln -s pinentry-qt $RPM_BUILD_ROOT%{_bindir}/pinentry-qt5 +%endif +install -p -m755 -D %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/pinentry +# unpackaged files +rm -fv $RPM_BUILD_ROOT%{_infodir}/dir +%if %{with qt6} +desktop-file-validate %{buildroot}/%{_datadir}/applications/org.gnupg.pinentry-qt.desktop +%endif +install -d %{buildroot}%{_datadir}/pixmaps + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README THANKS TODO +%{_bindir}/pinentry-curses +%{_bindir}/pinentry +%{_infodir}/pinentry.info* + +%if %{with gnome} +%files gnome3 +%{_bindir}/pinentry-gnome3 +%endif + +%if %{with gtk2} +%files gtk +%{_bindir}/pinentry-gtk-2 +# symlink for backward compatibility +%{_bindir}/pinentry-gtk +%endif + +%if %{with qt6} +%files qt +%{_bindir}/pinentry-qt +# symlinks for backward compatibility +%{_bindir}/pinentry-qt4 +%{_bindir}/pinentry-qt5 +%{_datadir}/applications/org.gnupg.pinentry-qt.desktop +%{_datadir}/pixmaps/pinentry.png +%endif + +%files emacs +%{_bindir}/pinentry-emacs + +%files tty +%{_bindir}/pinentry-tty + +%changelog +%{?autochangelog} diff --git a/SPECS/pinfo/0001-pinfo-0.6.9-infopath.patch b/SPECS/pinfo/0001-pinfo-0.6.9-infopath.patch new file mode 100644 index 00000000..d5061e2c --- /dev/null +++ b/SPECS/pinfo/0001-pinfo-0.6.9-infopath.patch @@ -0,0 +1,12 @@ +diff -up pinfo-0.6.9/src/datatypes.c.infopath pinfo-0.6.9/src/datatypes.c +--- pinfo-0.6.9/src/datatypes.c.infopath 2006-03-09 21:54:53.000000000 +0100 ++++ pinfo-0.6.9/src/datatypes.c 2008-09-04 15:14:20.000000000 +0200 +@@ -31,7 +31,7 @@ char *ftpviewer = "lynx"; + char *maileditor = "mail"; + char *printutility = "lpr"; + char *manlinks = "1:8:2:3:4:5:6:7:9:n:l:p:o:3X11:3Xt:3X:3x"; +-char *configuredinfopath = ".:/usr/share/info:/usr/info:/usr/local/share/info:/usr/local/info:/opt/info"; ++char *configuredinfopath = "/usr/share/info:/usr/info:/usr/local/share/info:/usr/local/info:/opt/info:."; + char *ignoredmacros = 0; + char *rcfile = NULL; + diff --git a/SPECS/pinfo/0002-pinfo-0.6.9-xdg.patch b/SPECS/pinfo/0002-pinfo-0.6.9-xdg.patch new file mode 100644 index 00000000..18f7e3db --- /dev/null +++ b/SPECS/pinfo/0002-pinfo-0.6.9-xdg.patch @@ -0,0 +1,16 @@ +diff -up pinfo-0.6.9/src/pinforc.in.xdg pinfo-0.6.9/src/pinforc.in +--- pinfo-0.6.9/src/pinforc.in.xdg 2006-03-09 20:44:37.000000000 +0100 ++++ pinfo-0.6.9/src/pinforc.in 2007-10-03 18:35:21.000000000 +0200 +@@ -85,9 +85,9 @@ QUIT-CONFIRM-DEFAULT=no + CLEAR-SCREEN-AT-EXIT=true + CALL-READLINE-HISTORY=true + STDERR-REDIRECTION="2> /dev/null" +-HTTPVIEWER=lynx +-FTPVIEWER=lynx +-MAILEDITOR=clear; mail ++HTTPVIEWER=xdg-open ++FTPVIEWER=xdg-open ++MAILEDITOR=xdg-email + PRINTUTILITY=lpr + MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt:3x:3X + SAFE-USER=nobody diff --git a/SPECS/pinfo/0003-pinfo-0.6.10-man.patch b/SPECS/pinfo/0003-pinfo-0.6.10-man.patch new file mode 100644 index 00000000..bdbfb445 --- /dev/null +++ b/SPECS/pinfo/0003-pinfo-0.6.10-man.patch @@ -0,0 +1,26 @@ +diff --git a/doc/pinfo.1.in b/doc/pinfo.1.in +index 1882e7a..1a4da77 100644 +--- a/doc/pinfo.1.in ++++ b/doc/pinfo.1.in +@@ -72,6 +72,10 @@ synonym for -r. + .BR --apropos + \- if this is set, apropos is called when no man or info page could be found. + .P ++.BR "-p", ++.BR --plain-apropos ++\- if this is set, call only apropos. ++.P + .BR "-c", + .BR --cut-man-headers + \- if this is set, man parsing code will try to cut out the repeated man +@@ -82,6 +86,10 @@ headers. Use with care. ;) + cut empty lines from manual pages. This option enables auto cutting of every + repeated newline in a manual page. + .P ++.BR "-d", ++.BR --dont-handle-without-tag-table ++\- don't display texinfo pages without tag table. ++.P + .BR "-t", + .BR "--force-manual-tag-table" \- + forces manual detection of tag table. This allows you to view info pages, diff --git a/SPECS/pinfo/0004-pinfo-0.6.13-fnocommon.patch b/SPECS/pinfo/0004-pinfo-0.6.13-fnocommon.patch new file mode 100644 index 00000000..38d2b022 --- /dev/null +++ b/SPECS/pinfo/0004-pinfo-0.6.13-fnocommon.patch @@ -0,0 +1,22 @@ +From 16dba5978146b6d3a540ac7c8f415eda49280847 Mon Sep 17 00:00:00 2001 +From: Bas Zoetekouw +Date: Thu, 23 Jul 2020 20:11:24 +0200 +Subject: [PATCH] fix use of global variabel + +--- + src/parse_config.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/parse_config.h b/src/parse_config.h +index 2dffa4f..4e68bb4 100644 +--- a/src/parse_config.h ++++ b/src/parse_config.h +@@ -85,7 +85,7 @@ typedef struct colours + colours; + #endif /* HAVE_CURSES_COLOR */ + +-int use_manual; ++extern int use_manual; + + int parse_config (void); + int parse_line (char *line); diff --git a/SPECS/pinfo/0005-pinfo-0.6.13-gccwarn.patch b/SPECS/pinfo/0005-pinfo-0.6.13-gccwarn.patch new file mode 100644 index 00000000..a50b8d50 --- /dev/null +++ b/SPECS/pinfo/0005-pinfo-0.6.13-gccwarn.patch @@ -0,0 +1,63 @@ +From fc67ceacd81f0c74fcab85447c23a532ae482827 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 11 Nov 2021 18:59:57 +0000 +Subject: [PATCH 1/2] src/utils.c: suppres unused parameter warning + + utils.c:372:62: error: unused parameter 'completions' [-Werror=unused-parameter] + 372 | getstring_with_completion(char *prompt, const char * const * completions) + | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ +--- + src/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/utils.c b/src/utils.c +index 2e4139c..34c9b88 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -394,7 +394,7 @@ getstring_with_completion(char *prompt, const char * const * completions) + curs_set(0); + + #else +- ++ (void)completions; /* unused */ + move(maxy - 1, 0); + buf = readlinewrapper(prompt); + +-- +2.39.1 + +From ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 11 Nov 2021 19:02:24 +0000 +Subject: [PATCH 2/2] src/video.c: use %ld to print longs + +ncurses-6.3 added printf()-stype attribute annotations for gcc-like +compilers that can now detect argument mismatches: + + video.c:114:26: error: format '%d' expects argument of type 'int', + but argument 3 has type 'long unsigned int' [-Werror=format=] + 114 | printw(_("Viewing line %d/%d, 100%%"), lines, lines); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +--- + src/video.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/video.c b/src/video.c +index f6b444a..195d781 100644 +--- a/src/video.c ++++ b/src/video.c +@@ -109,9 +109,9 @@ showscreen(char **message, unsigned long lines, unsigned long pos, long cursor, + mymvhline(maxy - 1, 0, ' ', maxx); + move(maxy - 1, 0); + if ((pos < lines - 1) &&(lines > pos + maxy - 2)) +- printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines); ++ printw(_("Viewing line %ld/%ld, %ld%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines); + else +- printw(_("Viewing line %d/%d, 100%%"), lines, lines); ++ printw(_("Viewing line %ld/%ld, 100%%"), lines, lines); + info_add_highlights(pos, cursor, lines, column, message); + attrset(normal); + move(0, 0); +-- +2.39.1 + diff --git a/SPECS/pinfo/0006-pinfo-0.6.13-nogroup.patch b/SPECS/pinfo/0006-pinfo-0.6.13-nogroup.patch new file mode 100644 index 00000000..1c72ff2d --- /dev/null +++ b/SPECS/pinfo/0006-pinfo-0.6.13-nogroup.patch @@ -0,0 +1,22 @@ +--- pinfo-0.6.9/src/utils.c.nogroup 2006-03-16 15:14:30.000000000 +0100 ++++ pinfo-0.6.9/src/utils.c 2007-01-19 13:45:53.000000000 +0100 +@@ -32,7 +32,7 @@ + #endif + + char *safe_user = "nobody"; +-char *safe_group = "nogroup"; ++char *safe_group = "nobody"; + + #ifndef HAVE_DECL_CURS_SET + void +--- pinfo-0.6.9/src/pinforc.in.nogroup 2007-01-19 13:42:14.000000000 +0100 ++++ pinfo-0.6.9/src/pinforc.in 2007-01-19 13:45:35.000000000 +0100 +@@ -91,7 +91,7 @@ + PRINTUTILITY=lpr + MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt:3x:3X + SAFE-USER=nobody +-SAFE-GROUP=nogroup ++SAFE-GROUP=nobody + # + # Remember, HIGHLIGHTREGEXP may be slow (thus it's commented by default) + # diff --git a/SPECS/pinfo/0007-pinfo-0.6.13-stringop-overflow.patch b/SPECS/pinfo/0007-pinfo-0.6.13-stringop-overflow.patch new file mode 100644 index 00000000..a807b1c6 --- /dev/null +++ b/SPECS/pinfo/0007-pinfo-0.6.13-stringop-overflow.patch @@ -0,0 +1,40 @@ +From 23c169877fda839f0634b2d193eaf26de290f141 Mon Sep 17 00:00:00 2001 +From: Bas Zoetekouw +Date: Thu, 23 Jul 2020 20:39:04 +0200 +Subject: [PATCH] workaround false positie in gcc-10 stringop-overflow checks + +--- + src/utils.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/utils.c b/src/utils.c +index cb2fe76..2e4139c 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -848,10 +848,9 @@ char * + make_tempfile() + { + char *filename; +- size_t len; + + /* TODO: fix hardcoded /tmp */ +- char tmpfile_template[] = "/tmp/pinfo.XXXXXX"; ++ char tmpfile_template[32] = "/tmp/pinfo.XXXXXX"; + + /* create a tmpfile */ + int fd = mkstemp(tmpfile_template); +@@ -864,9 +863,8 @@ make_tempfile() + } + + /* allocate a new string and copy the filename there */ +- len = strlen(tmpfile_template)+1; +- filename = xmalloc(len+1); /* guarenteerd to be set to \0's */ +- strncpy(filename, tmpfile_template, len); ++ filename = xmalloc(33); /* guarenteerd to be set to \0's */ ++ strncpy(filename, tmpfile_template, 32); + + /* close the file */ + close(fd); +-- +2.39.1 + diff --git a/SPECS/pinfo/0008-pinfo-configure-c99.patch b/SPECS/pinfo/0008-pinfo-configure-c99.patch new file mode 100644 index 00000000..6a7661ea --- /dev/null +++ b/SPECS/pinfo/0008-pinfo-configure-c99.patch @@ -0,0 +1,38 @@ +Defining _XOPEN_SOURCE on its own hides definitions in other headers +(which is already mentioned in upstream commit f49941a). One way to +deal with this is to define _DEFAULT_SOURCE in addition to +_XOPEN_SOURCE, which is what this commit implements. + +This is one way to avoid an implicit function declaration in the +built-in mmap test that autoconf provides. It includes and +expects that to provide a declaration of getpagesize because the +earlier check for HAVE_GETPAGESIZE succeeded. Without addressing the +implicit function declaration, the outcome of this check will change +with future compilers which no longer support them by default. + +Submitted upstream: + + +diff --git a/macros/wchar.m4 b/macros/wchar.m4 +index 2dc3d3a940f6c6fd..a7d6e967024df594 100644 +--- a/macros/wchar.m4 ++++ b/macros/wchar.m4 +@@ -78,7 +78,8 @@ AC_DEFUN([AC_CHECK_WCHAR],[ + then + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( +- [[ ++ [[ ++ #define _DEFAULT_SOURCE + #define _XOPEN_SOURCE 600 + #include + ]], +@@ -87,7 +88,7 @@ AC_DEFUN([AC_CHECK_WCHAR],[ + [ + dnl if found, set variables and print result + have_wcwidth=true +- wchar_flags="$wchar_flags -D_XOPEN_SOURCE=600" ++ wchar_flags="$wchar_flags -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600" + AC_MSG_RESULT([with -D_XOPEN_SOURCE=600]) + ], + [ ] diff --git a/SPECS/pinfo/pinfo.spec b/SPECS/pinfo/pinfo.spec new file mode 100644 index 00000000..aa81c5f9 --- /dev/null +++ b/SPECS/pinfo/pinfo.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pinfo +Version: 0.6.13 +Release: %autorelease +Summary: An info file and man page viewer +License: GPL-2.0-only +URL: https://github.com/baszoetekouw/pinfo +#!RemoteAsset +Source: https://github.com/baszoetekouw/pinfo/archive/refs/tags/v%{version}.tar.gz +Patch0: 0001-pinfo-0.6.9-infopath.patch +Patch1: 0002-pinfo-0.6.9-xdg.patch +Patch2: 0003-pinfo-0.6.10-man.patch +Patch3: 0004-pinfo-0.6.13-fnocommon.patch +Patch4: 0005-pinfo-0.6.13-gccwarn.patch +Patch5: 0006-pinfo-0.6.13-nogroup.patch +Patch6: 0007-pinfo-0.6.13-stringop-overflow.patch +Patch7: 0008-pinfo-configure-c99.patch +BuildSystem: autotools + +BuildOption(conf): --without-readline + +BuildRequires: automake +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: libtool +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: texinfo + +Requires: xdg-utils + +%description +Pinfo is an info file (or man page) viewer with a user interface +similar to the Lynx Web browser. It supports searching using regular +expressions and is based on the ncurses library. + +%conf -p +./autogen.sh + + +%install -a +rm -f %{buildroot}%{_infodir}/dir +%find_lang %{name} + +%files -f %{name}.lang +%license COPYING +%doc AUTHORS NEWS README.md TECHSTUFF +%config(noreplace) %{_sysconfdir}/pinforc +%{_bindir}/pinfo +%{_infodir}/pinfo.info* +%{_mandir}/man1/pinfo.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/pixman/pixman.spec b/SPECS/pixman/pixman.spec new file mode 100644 index 00000000..a6ca371c --- /dev/null +++ b/SPECS/pixman/pixman.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pixman +Version: 0.46.4 +Release: %autorelease +Summary: Pixel manipulation library +License: MIT +URL: https://gitlab.freedesktop.org/pixman/pixman +#!RemoteAsset +Source: https://www.cairographics.org/releases/%{name}-%{version}.tar.gz +BuildSystem: meson + +BuildOption(conf): --auto-features=auto + +BuildRequires: meson + +%description +Pixman is a pixel manipulation library for X and cairo. This package contains +the runtime shared library. + +%package devel +Summary: Development files for the Pixel Manipulation library +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config file, and other development +files for the pixman library. + + +%ldconfig_scriptlets + +%files +%license COPYING +%{_libdir}/libpixman-1.so.* + +%files devel +%{_includedir}/pixman-1 +%{_libdir}/libpixman-1.so +%{_libdir}/pkgconfig/pixman-1.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/pixz/pixz.spec b/SPECS/pixz/pixz.spec new file mode 100644 index 00000000..bc826408 --- /dev/null +++ b/SPECS/pixz/pixz.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pixz +Version: 1.0.7 +Release: %autorelease +Summary: A parallel, indexing version of XZ +License: BSD-2-Clause +Group: Productivity/Archiving/Compression +URL: https://github.com/vasi/pixz +#!RemoteAsset +Source: https://github.com/vasi/pixz/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools +# build manpage when we have asciidoc +BuildOption(conf): --without-manpage +BuildOption(build): CFLAGS="%{optflags} -fcommon" + +BuildRequires: pkgconfig autoconf +BuildRequires: xz automake +BuildRequires: pkgconfig(libarchive) +BuildRequires: pkgconfig(liblzma) + +%description +Pixz is a parallel, indexing version of XZ. It produces a collection of +smaller blocks which makes random access to the original data possible. +This is especially useful for large tarballs. + +%conf -p +autoreconf -fiv + +%files +%license LICENSE +%doc NEWS TODO README.md +%{_bindir}/pixz + +%changelog +%{?autochangelog} diff --git a/SPECS/pkgconf/pkgconf.spec b/SPECS/pkgconf/pkgconf.spec new file mode 100644 index 00000000..ae2e6fc6 --- /dev/null +++ b/SPECS/pkgconf/pkgconf.spec @@ -0,0 +1,198 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# pkgconf acts as pkgconfig +%bcond_without pkgconfig_compat + +%if %{with pkgconfig_compat} +%global pkgconfig_ver 0.29.2 +# For obsoleting pkgconfig, bump the ver to a number higher than latest version +%global pkgconfig_obsver %{pkgconfig_ver}+1 +%endif + +# pkgconfig platform +%global pkgconf_target_platform %{_target_platform}%{?_gnu} + +# Search path for pc files for pkgconf +%global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig + +%global somajor 5 +%global libname lib%{name}%{somajor} +%global devname lib%{name}-devel + +Name: pkgconf +Version: 2.2.0 +Release: %autorelease +Summary: Package compiler and linker metadata toolkit +License: ISC +Group: Development/Tools/Building +URL: https://pkgconf.org/ +#!RemoteAsset +Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz +# Simple wrapper script to offer platform versions of pkgconfig from Fedora +Source1: platform-pkg-config.in + +Buildsystem: autotools +BuildOption(conf): --disable-static +BuildOption(conf): --with-pkg-config-dir=%{pkgconf_libdirs} +BuildOption(conf): --with-system-includedir=%{_includedir} +BuildOption(conf): --with-system-libdir=%{_libdir} + +BuildRequires: gcc +BuildRequires: make +# pkgconf uses libpkgconf internally +Requires: %{libname}%{?_isa} = %{version}-%{release} +# This is defined within pkgconf code as a virtual pc (just like in pkgconfig) +Provides: pkgconfig(pkgconf) = %{version} + +%description +pkgconf is a program which helps to configure compiler and linker flags +for development frameworks. It is similar to pkg-config from freedesktop.org +and handles .pc files in a similar manner as pkg-config. + +%package -n %{libname} +Summary: Backend library for %{name} +License: ISC +Group: System/Libraries + +%description -n %{libname} +This package provides libraries for applications to use the functionality +of %{name}. + +%package -n %{devname} +Summary: Development files for lib%{name} +License: ISC +Group: Development/Libraries/C and C++ +Requires: %{libname}%{?_isa} = %{version}-%{release} +# Avoid dependency loop on itself by specifying the Provides directly +Provides: pkgconfig(libpkgconf) = %{version} + +%description -n %{devname} +This package provides files necessary for developing applications +to use functionality provided by %{name}. + +%if %{with pkgconfig_compat} +%package m4 +Summary: m4 macros for pkgconf +License: GPL-2.0-or-later WITH Autoconf-exception-2.0 +Group: Development/Libraries/Other +BuildArch: noarch +# Ensure that it Conflicts and Obsoletes pkgconfig since it contains content formerly from it +Conflicts: pkgconfig < %{pkgconfig_obsver} +Obsoletes: pkgconfig < %{pkgconfig_obsver} + +%description m4 +This package includes m4 macros used to support PKG_CHECK_MODULES +when using pkgconf with autotools. + +%package pkg-config +Summary: %{name} shim to provide /usr/bin/pkg-config +# Ensure that it Conflicts with pkg-config and is considered "better" +License: ISC +Group: Development/Tools/Building +Conflicts: pkg-config < %{pkgconfig_obsver} +Obsoletes: pkg-config < %{pkgconfig_obsver} +Provides: pkg-config = %{pkgconfig_obsver} +Provides: pkg-config%{?_isa} = %{pkgconfig_obsver} +# This is in the original pkgconfig package, set to match output from pkgconf +Provides: pkgconfig(pkg-config) = %{version} +# Fedora/Mageia pkgconfig Provides for those who might use alternate package name +Provides: pkgconfig = %{pkgconfig_obsver} +Provides: pkgconfig%{?_isa} = %{pkgconfig_obsver} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-m4 = %{version}-%{release} + +%description pkg-config +This package provides the shim links for pkgconf to be automatically +used in place of pkgconfig. This ensures that pkgconf is used as +the system provider of pkg-config. + +%endif + +%install -a +mkdir -p %{buildroot}%{_sysconfdir}/pkgconfig/personality.d +mkdir -p %{buildroot}%{_datadir}/pkgconfig/personality.d + +# pkgconf rpm macros +mkdir -p %{buildroot}%{_rpmmacrodir}/ + +cat > %{buildroot}%{_rpmmacrodir}/macros.pkgconf < %{buildroot}%{_mandir}/man1/pkg-config.1 + +mkdir -p %{buildroot}%{_libdir}/pkgconfig +mkdir -p %{buildroot}%{_datadir}/pkgconfig +%endif + +# If we're not providing pkgconfig override & compat +# we should not provide the pkgconfig m4 macros +%if ! %{with pkgconfig_compat} +rm -rf %{buildroot}%{_datadir}/aclocal +rm -rf %{buildroot}%{_mandir}/man7 +%endif + +%ldconfig_scriptlets -n %{libname} + +%files +%license COPYING +%doc README.md AUTHORS NEWS +%{_bindir}/%{name} +%{_bindir}/bomtool +%{_mandir}/man1/%{name}.1* +%{_mandir}/man5/pc.5* +%{_mandir}/man5/%{name}-personality.5* +%{_rpmmacrodir}/macros.pkgconf +%dir %{_sysconfdir}/pkgconfig +%dir %{_sysconfdir}/pkgconfig/personality.d +%dir %{_datadir}/pkgconfig/personality.d + +%files -n %{libname} +%license COPYING +%{_libdir}/lib%{name}*.so.%{somajor} +%{_libdir}/lib%{name}*.so.%{somajor}.* + +%files -n %{devname} +%license COPYING +%{_libdir}/lib%{name}*.so +%{_includedir}/%{name}/ +%{_libdir}/pkgconfig/lib%{name}.pc + +%if %{with pkgconfig_compat} +%files m4 +%license COPYING +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/pkg.m4 +%{_mandir}/man7/pkg.m4.7%{?ext_man} + +%files pkg-config +%license COPYING +%{_bindir}/pkg-config +%{_bindir}/%{pkgconf_target_platform}-pkg-config +%{_mandir}/man1/pkg-config.1%{?ext_man} +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/pkgconf/platform-pkg-config.in b/SPECS/pkgconf/platform-pkg-config.in new file mode 100644 index 00000000..51c37d36 --- /dev/null +++ b/SPECS/pkgconf/platform-pkg-config.in @@ -0,0 +1,16 @@ +#!/bin/sh + +# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config +# Platform: @TARGET_PLATFORM@ + +if [ -z "${RPM_BUILD_ROOT}" ]; then + export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS_LOCAL@}" + export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR_LOCAL@}" + export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR_LOCAL@}" +else + export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}" + export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR@}" + export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR@}" +fi + +exec pkgconf "$@" diff --git a/SPECS/plog/plog.spec b/SPECS/plog/plog.spec new file mode 100644 index 00000000..95f76bd9 --- /dev/null +++ b/SPECS/plog/plog.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: plog +Version: 1.1.11 +Release: %autorelease +Summary: Development files for plog, a C++ logging library +License: MIT +URL: https://github.com/SergiusTheBest/plog +#!RemoteAsset +Source: https://github.com/SergiusTheBest/plog/archive/refs/tags/%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DPLOG_BUILD_TESTS:BOOL=OFF +BuildOption(conf): -DPLOG_BUILD_SAMPLES:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc-c++ + +%description +Plog is a C++ logging library that is designed to be as simple, +small and flexible as possible. It is created as an alternative +to existing large libraries and provides some unique features +as CSV log format and wide string support. + +%package devel +Summary: Development files for %{name} +Provides: %{name}-static = %{version} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%files devel +%license LICENSE +%doc %{_docdir}/%{name} +%doc README.md doc +%{_includedir}/plog/ +%{_libdir}/cmake/plog/ + +%changelog +%{?autochangelog} diff --git a/SPECS/plzip/plzip.spec b/SPECS/plzip/plzip.spec new file mode 100644 index 00000000..d1a5694b --- /dev/null +++ b/SPECS/plzip/plzip.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: plzip +Version: 1.12 +Release: %autorelease +Summary: Parallel lossless data compressor for the lzip format +License: GPLv2+ AND BSD-2-Clause +URL: https://www.nongnu.org/lzip/plzip.html +#!RemoteAsset +Source0: https://download.savannah.nongnu.org/releases/lzip/plzip/plzip-%{version}.tar.gz +#!RemoteAsset +Source1: https://download.savannah.nongnu.org/releases/lzip/plzip/plzip-%{version}.tar.gz.sig +BuildSystem: autotools +BuildRequires: gcc-c++ +BuildRequires: texinfo +BuildRequires: lzlib-devel +%description +Plzip is a massively parallel (multi-threaded) lossless data compressor +and decompressor that uses the lzip file format (.lz). Files produced by plzip +are fully compatible with lzip and can be rescued with lziprecover. +On multiprocessor machines, plzip can compress and decompress large files much +faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to +2%). The number of usable threads is limited by file size: on files of only a +few MiB, plzip is no faster than lzip. +Files that were compressed with regular lzip will also not be decompressed +faster by plzip, unless the @code{-b} option was used: lzip usually produces +single-member files which can't be decompressed in parallel. + +%install -a +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + +%ldconfig_scriptlets + +%files +%doc README +%license COPYING +%{_bindir}/plzip +%{_mandir}/man1/* +%{_infodir}/* + +%changelog +%{?autochangelog} diff --git a/SPECS/policycoreutils/0001-make_targets.patch b/SPECS/policycoreutils/0001-make_targets.patch new file mode 100644 index 00000000..12dcc832 --- /dev/null +++ b/SPECS/policycoreutils/0001-make_targets.patch @@ -0,0 +1,10 @@ +Index: policycoreutils-2.8/Makefile +=================================================================== +--- policycoreutils-2.8.orig/Makefile 2018-05-24 20:21:09.000000000 +0200 ++++ policycoreutils-2.8/Makefile 2018-11-21 15:59:44.968384128 +0100 +@@ -1,4 +1,4 @@ +-SUBDIRS = setfiles load_policy newrole run_init secon sestatus semodule setsebool scripts po man hll unsetfiles ++SUBDIRS = setfiles load_policy newrole run_init secon sestatus semodule setsebool scripts po man hll unsetfiles sepolicy audit2allow semanage sepolgen chcat semodule_expand semodule_link semodule_package + + all install relabel clean indent: + @for subdir in $(SUBDIRS); do \ diff --git a/SPECS/policycoreutils/policycoreutils.spec b/SPECS/policycoreutils/policycoreutils.spec new file mode 100644 index 00000000..74aa1377 --- /dev/null +++ b/SPECS/policycoreutils/policycoreutils.spec @@ -0,0 +1,315 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global _test_target test +# NOTE: When updating this package, update SELinux first. + +Name: policycoreutils +Version: 3.8 +Release: %autorelease +Summary: SELinux policy core utilities +License: GPL-2.0-or-later +URL: https://github.com/SELinuxProject/selinux +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz.asc +#!RemoteAsset +Source2: %{url}/releases/download/%{version}/selinux-dbus-%{version}.tar.gz +#!RemoteAsset +Source3: %{url}/releases/download/%{version}/selinux-dbus-%{version}.tar.gz.asc +#!RemoteAsset +Source4: %{url}/releases/download/%{version}/selinux-python-%{version}.tar.gz +#!RemoteAsset +Source5: %{url}/releases/download/%{version}/selinux-python-%{version}.tar.gz.asc +#!RemoteAsset +Source6: %{url}/releases/download/%{version}/selinux-gui-%{version}.tar.gz +#!RemoteAsset +Source7: %{url}/releases/download/%{version}/selinux-gui-%{version}.tar.gz.asc +#!RemoteAsset +Source8: %{url}/releases/download/%{version}/semodule-utils-%{version}.tar.gz +#!RemoteAsset +Source9: %{url}/releases/download/%{version}/semodule-utils-%{version}.tar.gz.asc +BuildSystem: autotools + +# Because the way we build this pacakge, so we need +# to change the make targets +Patch0: 0001-make_targets.patch + +BuildOption(install): SBINDIR="%{_sbindir}" + +BuildRequires: make +BuildRequires: gettext +BuildRequires: pkg-config +BuildRequires: libsepol-static +BuildRequires: audit-devel +BuildRequires: bash-completion +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(libsemanage) +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(libcap) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel +BuildRequires: python-rpm-macros + +Requires: util-linux + +%description +Security-enhanced Linux is a feature of the Linux┬« kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement┬«, Role-based Access +Control, and Multi-level Security. + +policycoreutils contains the policy core utilities that are required +for basic operation of a SELinux system. These utilities include +load_policy to load policies, setfiles to label filesystems, newrole +to switch roles. + +%package devel +Summary: SELinux policy core policy devel utilities +Requires: python-policycoreutils = %{version}-%{release} +Requires: make python3-dnf +Requires: (selinux-policy-devel if selinux-policy) + +%description devel +The policycoreutils-devel package contains the management tools use to develop policy in an SELinux environment. + +%package -n python-policycoreutils +Summary: SELinux policy core python utilities +Provides: python3-policycoreutils +Requires: policycoreutils = %{version}-%{release} +Requires: python3-libselinux +Requires: python3-setools +Requires: python3-libsemanage +BuildArch: noarch + +%description -n python-policycoreutils +The policycoreutils-python-utils package contains the management tools use to manage +an SELinux environment. + +%package dbus +Summary: SELinux policy core DBUS api +Requires: python3-policycoreutils = %{version}-%{release} +Requires: python3-gobject-base +Requires: polkit +BuildArch: noarch + +%description dbus +The policycoreutils-dbus package contains the management DBUS API use to manage +an SELinux environment. + +%package gui +Summary: SELinux configuration GUI +Requires: policycoreutils-devel = %{version}-%{release} +Requires: python3-policycoreutils = %{version}-%{release} +Requires: policycoreutils-dbus = %{version}-%{release} +Requires: python3-gobject +BuildRequires: desktop-file-utils +BuildArch: noarch + +%description gui +system-config-selinux is a utility for managing the SELinux environment + +%package newrole +Summary: The newrole application for RBAC/MLS +Requires: policycoreutils = %{version}-%{release} + +%description newrole +RBAC/MLS policy machines require newrole as a way of changing the role +or level of a logged in user. + +%prep +%setup -q -a2 -a4 -a6 -a8 +setools_python_pwd="$PWD/selinux-python-%{version}" +semodule_utils_pwd="$PWD/semodule-utils-%{version}" +%patch -P 0 -p1 +mv ${setools_python_pwd}/audit2allow ${setools_python_pwd}/chcat ${setools_python_pwd}/semanage ${setools_python_pwd}/sepolgen ${setools_python_pwd}/sepolicy . +mv ${semodule_utils_pwd}/semodule_expand ${semodule_utils_pwd}/semodule_link ${semodule_utils_pwd}/semodule_package . + +%conf +# No configure + +%install -p +mkdir -p %{buildroot}%{_localstatedir}/lib/selinux +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_mandir}/man1 +mkdir -p %{buildroot}%{_mandir}/man8 +mkdir -p %{buildroot}%{_sysconfdir}/pam.d + +%install -a +# dbus +(cd selinux-dbus-%{version} && make DESTDIR=%{buildroot} install) +# GUI apps +(cd selinux-gui-%{version} && make DESTDIR=%{buildroot} install) + +mkdir -p %{buildroot}%{_libexecdir}/selinux/hll/ +mkdir -p %{buildroot}%{_localstatedir}/lib/sepolgen + +(cd selinux-python-%{version}/po && make DESTDIR=%{buildroot} install) + +# Fix perms on newrole so that objcopy can process it +chmod 0755 %{buildroot}%{_bindir}/newrole + +# Manually invoke the python byte compile macro for each path that needs byte +# compilation. +%py_byte_compile %{__python3} %{buildroot}%{_datadir}/system-config-selinux + +# We don't need these because we have systemd +# If we need /etc/init.d support then we can add it back +rm -f %{buildroot}%{_sbindir}/open_init_pty +rm -f %{buildroot}%{_sbindir}/run_init +rm -f %{buildroot}/usr/share/man/man8/open_init_pty.8 +rm -f %{buildroot}/usr/share/man/man8/run_init.8* +rm -f %{buildroot}/etc/pam.d/run_init* + +# Illegal char '@' (0x40) in: %package langpack-sr@latin +# So we can't use --generate-subpackages +%find_lang %{name} +# We changed the name of these, also can't use it here +%find_lang selinux-python +%find_lang selinux-gui + +%files -f %{name}.lang +%license LICENSE +%{_sbindir}/restorecon +%{_sbindir}/restorecon_xattr +%{_sbindir}/fixfiles +%{_sbindir}/setfiles +%{_sbindir}/load_policy +%{_sbindir}/genhomedircon +%{_sbindir}/setsebool +%{_sbindir}/semodule +%{_sbindir}/unsetfiles +%if "%{_sbindir}" != "%{_bindir}" +# symlink to %%{_bindir}/sestatus +%{_sbindir}/sestatus +%endif +%{_bindir}/secon +%{_bindir}/semodule_expand +%{_bindir}/semodule_link +%{_bindir}/semodule_package +%{_bindir}/semodule_unpackage +%{_bindir}/sestatus +%{_libexecdir}/selinux/hll +%config(noreplace) %{_sysconfdir}/sestatus.conf +%{_mandir}/man5/selinux_config.5.gz +%{_mandir}/man5/sestatus.conf.5.gz +%{_mandir}/man8/fixfiles.8* +%{_mandir}/man8/load_policy.8* +%{_mandir}/man8/restorecon.8* +%{_mandir}/man8/restorecon_xattr.8* +%{_mandir}/man8/semodule.8* +%{_mandir}/man8/sestatus.8* +%{_mandir}/man8/setfiles.8* +%{_mandir}/man8/setsebool.8* +%{_mandir}/man1/secon.1* +%{_mandir}/man1/unsetfiles.1* +%{_mandir}/man8/genhomedircon.8* +%{_mandir}/man8/semodule_expand.8* +%{_mandir}/man8/semodule_link.8* +%{_mandir}/man8/semodule_unpackage.8* +%{_mandir}/man8/semodule_package.8* +%{bash_completions_dir}/setsebool + +%files devel +%{_bindir}/sepolgen +%{_bindir}/sepolgen-ifgen +%{_bindir}/sepolgen-ifgen-attr-helper +%dir /var/lib/sepolgen +/var/lib/sepolgen/perm_map +%{_bindir}/sepolicy +%{_mandir}/man8/sepolgen.8* +%{_mandir}/man8/sepolicy-booleans.8* +%{_mandir}/man8/sepolicy-generate.8* +%{_mandir}/man8/sepolicy-interface.8* +%{_mandir}/man8/sepolicy-network.8* +%{_mandir}/man8/sepolicy.8* +%{_mandir}/man8/sepolicy-communicate.8* +%{_mandir}/man8/sepolicy-manpage.8* +%{_mandir}/man8/sepolicy-transition.8* +%{bash_completions_dir}/sepolicy + +%files -f selinux-python.lang -n python-policycoreutils +%{_sbindir}/semanage +%{_bindir}/chcat +%{_bindir}/audit2allow +%{_bindir}/audit2why +%{_mandir}/man1/audit2allow.1* +%{_mandir}/man1/audit2why.1* +%{_sysconfdir}/dbus-1/system.d/org.selinux.conf +%{_mandir}/man8/chcat.8* +%{_mandir}/man8/semanage*.8* +%{bash_completions_dir}/semanage +%{python3_sitelib}/seobject.py* +#{python3_sitelib}/__pycache__ +%{python3_sitelib}/sepolgen +%dir %{python3_sitelib}/sepolicy +%{python3_sitelib}/sepolicy/templates +%dir %{python3_sitelib}/sepolicy/help +%{python3_sitelib}/sepolicy/help/* +%{python3_sitelib}/sepolicy/__init__.py* +%{python3_sitelib}/sepolicy/booleans.py* +%{python3_sitelib}/sepolicy/communicate.py* +%{python3_sitelib}/sepolicy/generate.py* +%{python3_sitelib}/sepolicy/interface.py* +%{python3_sitelib}/sepolicy/manpage.py* +%{python3_sitelib}/sepolicy/network.py* +%{python3_sitelib}/sepolicy/transition.py* +%{python3_sitelib}/sepolicy/sedbus.py* +%{python3_sitelib}/sepolicy*.dist-info/ +%{python3_sitelib}/sepolicy/__pycache__ + +%files dbus +%{_sysconfdir}/dbus-1/system.d/org.selinux.conf +%{_datadir}/dbus-1/system-services/org.selinux.service +%{_datadir}/polkit-1/actions/org.selinux.policy +%{_datadir}/polkit-1/actions/org.selinux.config.policy +%{_datadir}/system-config-selinux/selinux_server.py +%dir %{_datadir}/system-config-selinux/__pycache__ +%{_datadir}/system-config-selinux/__pycache__/selinux_server.* + +%files -f selinux-gui.lang gui +%{_bindir}/system-config-selinux +%{_bindir}/selinux-polgengui +%{_datadir}/applications/sepolicy.desktop +%{_datadir}/applications/system-config-selinux.desktop +%{_datadir}/applications/selinux-polgengui.desktop +%{_datadir}/icons/hicolor/24x24/apps/system-config-selinux.png +%{_datadir}/pixmaps/system-config-selinux.png +%dir %{_datadir}/system-config-selinux +%dir %{_datadir}/system-config-selinux/__pycache__ +%{_datadir}/system-config-selinux/system-config-selinux.png +%{_datadir}/system-config-selinux/*Page.py +%{_datadir}/system-config-selinux/__pycache__/*Page.* +%{_datadir}/system-config-selinux/system-config-selinux.py +%{_datadir}/system-config-selinux/__pycache__/system-config-selinux.* +%{_datadir}/system-config-selinux/*.ui +%{python3_sitelib}/sepolicy/gui.py* +%{python3_sitelib}/sepolicy/sepolicy.glade +%{_datadir}/icons/hicolor/*/apps/sepolicy.png +%{_datadir}/pixmaps/sepolicy.png +%{_mandir}/man8/system-config-selinux.8* +%{_mandir}/man8/selinux-polgengui.8* +%{_mandir}/man8/sepolicy-gui.8* + +%files newrole +%attr(0755,root,root) %caps(cap_dac_read_search,cap_setpcap,cap_audit_write,cap_sys_admin,cap_fowner,cap_chown,cap_dac_override=pe) %{_bindir}/newrole +%{_mandir}/man1/newrole.1.gz +%config(noreplace) %{_sysconfdir}/pam.d/newrole + +%changelog +%{?autochangelog} diff --git a/SPECS/polkit/50-default.rules b/SPECS/polkit/50-default.rules new file mode 100644 index 00000000..ebc17227 --- /dev/null +++ b/SPECS/polkit/50-default.rules @@ -0,0 +1,14 @@ +/* make sure that users that are in an admin group always authenticate with + * their own password and don't get a choice. Users not in an admin group get + * the full choice and may also authenticate as root */ +polkit._openruyi_admin_groups = []; +polkit.addAdminRule(function(action, subject) { + var rules = ["unix-user:0"]; + for (var i in polkit._openruyi_admin_groups) { + var g = polkit._openruyi_admin_groups[i]; + if (subject.isInGroup(g)) + return ["unix-user:"+subject.user]; + rules.push("unix-group:"+g); + } + return rules; +}); \ No newline at end of file diff --git a/SPECS/polkit/polkit.spec b/SPECS/polkit/polkit.spec new file mode 100644 index 00000000..fa0047ba --- /dev/null +++ b/SPECS/polkit/polkit.spec @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: polkit +Version: 126 +Release: %autorelease +Summary: PolicyKit Authorization Framework +License: LGPL-2.1-or-later +URL: https://gitlab.freedesktop.org/polkit/polkit/ +#!RemoteAsset +Source0: https://github.com/polkit-org/polkit/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: system-user-polkitd.conf +Source2: 50-default.rules +BuildSystem: meson + +BuildOption(conf): -D session_tracking=logind +BuildOption(conf): -D systemdsystemunitdir="%{_unitdir}" +BuildOption(conf): -D os_type=suse +BuildOption(conf): -D pam_module_dir="%{_pam_moduledir}" +BuildOption(conf): -D pam_prefix="%{_pam_vendordir}" +BuildOption(conf): -D examples=false +BuildOption(conf): -D tests=false +BuildOption(conf): -D man=false +BuildOption(conf): -D c_args="%{optflags} -Wno-error=deprecated-declarations" +BuildOption(conf): -D introspection=false +BuildOption(conf): -D gtk_doc=false + +BuildRequires: python3 meson ninja +BuildRequires: gcc-c++ expat-devel pam-devel pkgconfig sysuser-tools +BuildRequires: pkgconfig(duktape) >= 2.2.0 +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gmodule-2.0) +BuildRequires: pkgconfig(libsystemd) + +%sysusers_requires +%systemd_ordering + +%description +PolicyKit is a toolkit for defining and handling authorizations. + +%package devel +Summary: Development files for PolicyKit +Requires: %{name} = %{version} +Requires: pkgconfig + +%description devel +Development files for the PolicyKit Authorization Framework. + +%install -a +install -d %{buildroot}%{_localstatedir}/lib/polkit +install -m0644 %{SOURCE2} %{buildroot}%{_datadir}/polkit-1/rules.d/ +install -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/ +mkdir -p %{buildroot}%{_sysconfdir}/polkit-1/actions +rm -rf %{buildroot}%{_datadir}/locale + +%post +# The implied (systemctl preset) will fail and complain, but the macro hides +# and ignores the fact. This is in fact what we want, polkit.service does not +# have an [Install] section and it is always started on demand. +%systemd_post polkit.service + +%preun +%systemd_preun polkit.service + +%postun +%systemd_postun_with_restart polkit.service + +%files +%license COPYING +%doc NEWS.md README.md +%{_libdir}/libpolkit-agent-1.so.* +%{_libdir}/libpolkit-gobject-1.so.* +%{_bindir}/pkaction +%{_bindir}/pkcheck +%{_bindir}/pkttyagent +%verify(not mode) %attr(4755,root,root) %{_bindir}/pkexec +%dir /usr/lib/polkit-1 +/usr/lib/polkit-1/polkitd +%verify(not mode) %attr(4755,root,root) /usr/lib/polkit-1/polkit-agent-helper-1 +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/system-services/org.freedesktop.PolicyKit1.service +%dir %{_datadir}/dbus-1/system.d +%{_datadir}/dbus-1/system.d/org.freedesktop.PolicyKit1.conf +%dir %{_datadir}/polkit-1 +%{_datadir}/polkit-1/policyconfig-1.dtd +%dir %{_datadir}/polkit-1/actions +%{_datadir}/polkit-1/actions/org.freedesktop.policykit.policy +%attr(0555,root,root) %dir %{_datadir}/polkit-1/rules.d +%{_datadir}/polkit-1/rules.d/50-default.rules +%{_pam_vendordir}/polkit-1 +%dir %{_sysconfdir}/polkit-1 +%attr(0750,root,polkitd) %dir %{_sysconfdir}/polkit-1/rules.d +%dir %{_sysconfdir}/polkit-1/actions +%dir %{_localstatedir}/lib/polkit +%{_sysusersdir}/system-user-polkitd.conf +%{_unitdir}/polkit.service +%{_sysusersdir}/polkit.conf +%{_tmpfilesdir}/polkit-tmpfiles.conf +%{_datadir}/gettext/its/polkit.its +%{_datadir}/gettext/its/polkit.loc + +%files devel +%{_libdir}/libpolkit-agent-1.so +%{_libdir}/libpolkit-gobject-1.so +%{_libdir}/pkgconfig/polkit-agent-1.pc +%{_libdir}/pkgconfig/polkit-gobject-1.pc +%{_includedir}/polkit-1/ + +%changelog +%{?autochangelog} diff --git a/SPECS/polkit/system-user-polkitd.conf b/SPECS/polkit/system-user-polkitd.conf new file mode 100644 index 00000000..1af7b213 --- /dev/null +++ b/SPECS/polkit/system-user-polkitd.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u polkitd - "User for polkitd" /var/lib/polkit - diff --git a/SPECS/popt/0001-popt-libc-updates.patch b/SPECS/popt/0001-popt-libc-updates.patch new file mode 100644 index 00000000..5cbf374d --- /dev/null +++ b/SPECS/popt/0001-popt-libc-updates.patch @@ -0,0 +1,87 @@ +Index: popt-1.19/configure.ac +=================================================================== +--- popt-1.19.orig/configure.ac ++++ popt-1.19/configure.ac +@@ -9,7 +9,6 @@ AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([1.10 foreign -Wall]) + + m4_version_prereq([2.70], [], [AC_PROG_CC_STDC]) +-AC_PROG_CC + AC_USE_SYSTEM_EXTENSIONS + AM_PROG_AR + +Index: popt-1.19/src/system.h +=================================================================== +--- popt-1.19.orig/src/system.h ++++ popt-1.19/src/system.h +@@ -2,9 +2,7 @@ + * @file + */ + +-#ifdef HAVE_CONFIG_H + #include "config.h" +-#endif + + #include + +@@ -57,6 +55,8 @@ static inline char * stpcpy (char *dest, + #define getenv(_s) secure_getenv(_s) + #elif defined(HAVE___SECURE_GETENV) + #define getenv(_s) __secure_getenv(_s) ++#else ++#error neither secure_getenv nor __secure_getenv is available + #endif + + #if !defined(__GNUC__) && !defined(__attribute__) +Index: popt-1.19/src/popt.c +=================================================================== +--- popt-1.19.orig/src/popt.c ++++ popt-1.19/src/popt.c +@@ -181,7 +181,7 @@ poptContext poptGetContext(const char * + con->execAbsolute = 1; + con->arg_strip = NULL; + +- if (getenv("POSIXLY_CORRECT") || getenv("POSIX_ME_HARDER")) ++ if (secure_getenv("POSIXLY_CORRECT") || secure_getenv("POSIX_ME_HARDER")) + con->flags |= POPT_CONTEXT_POSIXMEHARDER; + + if (name) +@@ -418,7 +418,7 @@ const char * findProgramPath(const char + if (strchr(argv0, '/')) + return xstrdup(argv0); + +- if ((path = getenv("PATH")) == NULL || (path = xstrdup(path)) == NULL) ++ if ((path = secure_getenv("PATH")) == NULL || (path = xstrdup(path)) == NULL) + return NULL; + + /* The return buffer in t is big enough for any path. */ +@@ -1633,6 +1633,7 @@ const char * poptBadOption(poptContext c + + const char * poptStrerror(const int error) + { ++ char errbuf[1024]; + switch (error) { + case POPT_ERROR_NOARG: + return POPT_("missing argument"); +@@ -1657,7 +1658,7 @@ const char * poptStrerror(const int erro + case POPT_ERROR_BADCONFIG: + return POPT_("config file failed sanity test"); + case POPT_ERROR_ERRNO: +- return strerror(errno); ++ return strerror_r(errno, errbuf, sizeof errbuf); + default: + return POPT_("unknown error"); + } +Index: popt-1.19/src/poptconfig.c +=================================================================== +--- popt-1.19.orig/src/poptconfig.c ++++ popt-1.19/src/poptconfig.c +@@ -467,7 +467,7 @@ int poptReadDefaultConfig(poptContext co + if (rc) goto exit; + #endif + +- if ((home = getenv("HOME"))) { ++ if ((home = secure_getenv("HOME"))) { + char * fn = malloc(strlen(home) + 20); + if (fn != NULL) { + (void) stpcpy(stpcpy(fn, home), "/.popt"); diff --git a/SPECS/popt/popt.spec b/SPECS/popt/popt.spec new file mode 100644 index 00000000..84e6908d --- /dev/null +++ b/SPECS/popt/popt.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: popt +Version: 1.19 +Release: %autorelease +License: MIT +Summary: Command line option parsing library +URL: https://github.com/rpm-software-management/popt +#!RemoteAsset +Source0: http://ftp.rpm.org/popt/releases/popt-1.x/popt-%{version}.tar.gz +Patch: 0001-popt-libc-updates.patch +BuildSystem: autotools +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: automake +BuildRequires: autoconf +BuildOption(conf): --disable-static + +%description +Popt is a C library for parsing command line parameters. Popt was +heavily influenced by the getopt() and getopt_long() functions. It +improves on them by allowing more powerful argument expansion. Popt can +parse arbitrary argv[] style arrays and automatically set variables +based on command line arguments. Popt allows command line arguments to +be aliased via configuration files and includes utility functions for +parsing arbitrary strings into argv[] arrays using shell-like rules. + + +%package devel +Summary: Development files for the popt library +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} +Requires: glibc-devel + +%description devel +The popt-devel package includes header files and libraries necessary +for developing programs which use the popt C library. It contains the +API documentation of the popt library, too. + +%conf -p +autoreconf -fiv + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%{_libdir}/libpopt.so.* + + +%post -n %{name} -p /sbin/ldconfig +%postun -n %{name} -p /sbin/ldconfig + +%files devel +%license COPYING +%doc README +%{_libdir}/libpopt.so +%{_includedir}/popt.h +%{_mandir}/man3/popt.3* +%{_libdir}/pkgconfig/popt.pc + + +%changelog +%{?autochangelog} diff --git a/SPECS/powertop/powertop-2.7-always-create-params.patch b/SPECS/powertop/powertop-2.7-always-create-params.patch new file mode 100644 index 00000000..87ddf7db --- /dev/null +++ b/SPECS/powertop/powertop-2.7-always-create-params.patch @@ -0,0 +1,35 @@ +diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp +index 9a5688a..6a232cd 100644 +--- a/src/parameters/persistent.cpp ++++ b/src/parameters/persistent.cpp +@@ -145,9 +145,6 @@ void save_parameters(const char *filename) + + // printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size()); + +- if (!global_power_valid()) +- return; +- + pathname = get_param_directory(filename); + + file.open(pathname, ios::out); +@@ -156,12 +153,15 @@ void save_parameters(const char *filename) + return; + } + +- map::iterator it; ++ if (global_power_valid()) ++ { ++ map::iterator it; + +- for (it = param_index.begin(); it != param_index.end(); it++) { +- int index; +- index = it->second; +- file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n"; ++ for (it = param_index.begin(); it != param_index.end(); it++) { ++ int index; ++ index = it->second; ++ file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n"; ++ } + } + file.close(); + } diff --git a/SPECS/powertop/powertop.service b/SPECS/powertop/powertop.service new file mode 100644 index 00000000..4c3099b4 --- /dev/null +++ b/SPECS/powertop/powertop.service @@ -0,0 +1,21 @@ +[Unit] +Description=PowerTOP autotuner + +[Service] +# added automatically, for details please see +# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort +ProtectSystem=full +ProtectHome=true +PrivateDevices=true +ProtectHostname=true +ProtectClock=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +# end of automatic additions +Type=oneshot +ExecStart=/usr/sbin/powertop --auto-tune + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/SPECS/powertop/powertop.spec b/SPECS/powertop/powertop.spec new file mode 100644 index 00000000..c677e333 --- /dev/null +++ b/SPECS/powertop/powertop.spec @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: powertop +Version: 2.15 +Release: %autorelease +Summary: Power consumption monitor +License: GPL-2.0-only +URL: https://github.com/fenrus75/powertop +#!RemoteAsset +Source0: https://github.com/fenrus75/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: powertop.service +Patch1: powertop-2.7-always-create-params.patch + +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: autoconf-archive +BuildRequires: automake +BuildRequires: make +BuildRequires: libtool +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: systemd +BuildRequires: gettext-devel +BuildRequires: ncurses-devel +BuildRequires: pciutils-devel +BuildRequires: zlib-devel +BuildRequires: libnl-devel +BuildRequires: bash-completion +Requires(post): coreutils +%{?systemd_requires} +Provides: bundled(kernel-event-lib) + +%description +PowerTOP is a Linux* tool used to diagnose issues with power consumption and +power management. In addition to being a diagnostic tool, PowerTOP also has +an interactive mode you can use to experiment with various power management +settings, for cases where the Linux distribution has not enabled those settings. + +%conf -p +# https://www.gnu.org/software/gettext/manual/html_node/autopoint-Invocation.html +sed -i -e 's|AM_GNU_GETTEXT_VERSION|AM_GNU_GETTEXT_REQUIRE_VERSION|' configure.ac +# workaroud for 'error: too many loops' +autoreconf -fi || autoreconf -fi + +%install -a +# Prepares cache files to ensure persistence of saved parameters and results upon first run +install -Dd %{buildroot}%{_localstatedir}/cache/%{name} +touch %{buildroot}%{_localstatedir}/cache/%{name}/{saved_parameters.powertop,saved_results.powertop} +%find_lang %{name} --generate-subpackages + +install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service + +%preun +%systemd_preun powertop.service + +%postun +%systemd_postun_with_restart powertop.service + +%post +%systemd_post powertop.service +# Hack for powertop not to show warnings on first start +touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop} &> /dev/null || : + +%files +%license COPYING +%doc README.md README.traceevent CONTRIBUTE.md TODO +%{_sbindir}/powertop +%{_unitdir}/powertop.service +%dir %{_localstatedir}/cache/powertop +%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop +%ghost %{_localstatedir}/cache/powertop/saved_results.powertop +%{_datadir}/bash-completion/completions/powertop +%{_datadir}/locale/en_*/LC_MESSAGES/powertop.mo +%{_mandir}/man8/powertop.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/priv_wrapper/0001-priv_wrapper-fix-cmocka-1.1.6+-support.patch b/SPECS/priv_wrapper/0001-priv_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 00000000..05a8cbf4 --- /dev/null +++ b/SPECS/priv_wrapper/0001-priv_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,30 @@ +From 295bcbe9de1fb37531678d482efb12583b77c6d0 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 17 Feb 2023 17:51:27 +0100 +Subject: [PATCH] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Schneider +Reviewed-by: Pavel Filipenský +--- + tests/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index d33cf15..46147cf 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,5 +1,9 @@ + project(tests C) + ++if (TARGET cmocka::cmocka) ++ set(CMOCKA_LIBRARY cmocka::cmocka) ++endif() ++ + include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +-- +2.39.2 diff --git a/SPECS/priv_wrapper/priv_wrapper.spec b/SPECS/priv_wrapper/priv_wrapper.spec new file mode 100644 index 00000000..d6c9bb39 --- /dev/null +++ b/SPECS/priv_wrapper/priv_wrapper.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: priv_wrapper +Version: 1.0.1 +Release: %autorelease +Summary: A library to disable resource limits and other privilege dropping +License: GPL-3.0-or-later +URL: http://cwrap.org/ +#!RemoteAsset +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc +BuildSystem: cmake + +# Fix cmocka detection for versions 1.1.6 and later +Patch0: 0001-priv_wrapper-fix-cmocka-1.1.6+-support.patch + +BuildOption(conf): -DUNIT_TESTING=ON + +BuildRequires: cmake +BuildRequires: cmocka-cmake + +Recommends: cmake +Recommends: pkgconfig + +%description +priv_wrapper aims to help running processes which are dropping privileges or +are restricting resources in test environments. +It can disable chroot, prctl, pledge and setrlmit system calls. A disabled call +always succeeds (i.e. returns 0) and does nothing. +The system call pledge exists only on OpenBSD. + +To use it, set the following environment variables: + +LD_PRELOAD=libpriv_wrapper.so +PRIV_WRAPPER_CHROOT_DISABLE=1 + +This package does not have a devel package, because this project is for +development/testing. + +%ldconfig_scriptlets + +%files +%doc AUTHORS README.md CHANGELOG.md +%license LICENSE +%{_libdir}/libpriv_wrapper.so* +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/priv_wrapper +%{_libdir}/cmake/priv_wrapper/priv_wrapper-config-version.cmake +%{_libdir}/cmake/priv_wrapper/priv_wrapper-config.cmake +%{_libdir}/pkgconfig/priv_wrapper.pc +%{_mandir}/man1/priv_wrapper.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/procps/procps.spec b/SPECS/procps/procps.spec new file mode 100644 index 00000000..f2961913 --- /dev/null +++ b/SPECS/procps/procps.spec @@ -0,0 +1,109 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define sonum 1 +%define libname libproc2 + +Name: procps-ng +Version: 4.0.5 +Release: %autorelease +Summary: System and process monitoring utilities +Provides: procps +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: https://gitlab.com/procps-ng/procps +#!RemoteAsset +Source0: https://downloads.sourceforge.net/project/%{name}/Production/%{name}-%{version}.tar.xz + +BuildSystem: autotools +BuildOption(conf): --disable-kill +BuildOption(conf): --enable-watch8bit +BuildOption(conf): --with-systemd +BuildOption(conf): --sbindir=%{_bindir} +BuildOption(check): LD_LIBRARY_PATH=$PWD/proc/.libs + +BuildRequires: make, gcc +BuildRequires: autoconf, automake, libtool +BuildRequires: ncurses-devel, gettext-devel +BuildRequires: pkgconfig(libsystemd) + +%description +The procps-ng package contains a set of system utilities that provide +system information, such as ps, top, free, vmstat, and watch. + +%package devel +Summary: Development files for procps-ng +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries for procps-ng. + +%package lang +Summary: Translations for procps-ng +License: GPL-2.0-or-later AND LGPL-2.1-or-later +BuildArch: noarch + +%description lang +This package contains the translations for the procps-ng utilities. + +%conf -p +# Use autoreconf to regenerate build files, this is more robust than ./autogen.sh +autoreconf -fiv + +%install -a +# Cleanup unnecessary files. +rm -f %{buildroot}%{_libdir}/*.la +# kill and uptime are provided by other core packages (util-linux). +rm -f %{buildroot}%{_bindir}/kill +rm -f %{buildroot}%{_bindir}/uptime +rm -f %{buildroot}%{_mandir}/man1/kill.1* +rm -f %{buildroot}%{_mandir}/man1/uptime.1* +rm -rf %{buildroot}%{_mandir}/pl/man5 +rm -rf %{buildroot}%{_mandir}/{fr,de,pt_BR}/man3 + +# Package localization files using the find_lang macro for the -lang subpackage. +%find_lang %{name} --all-name --with-man + +%ldconfig_scriptlets + +%files +%license COPYING COPYING.LIB +%doc doc/bugs.md doc/FAQ NEWS README.md +%{_libdir}/%{libname}.so.%{sonum}* +%{_bindir}/free +%{_bindir}/hugetop +%{_bindir}/pgrep +%{_bindir}/pkill +%{_bindir}/pidof +%{_bindir}/pidwait +%{_bindir}/pmap +%{_bindir}/ps +%{_bindir}/pwdx +%{_bindir}/slabtop +%{_bindir}/sysctl +%{_bindir}/tload +%{_bindir}/top +%{_bindir}/w +%{_bindir}/watch +%{_bindir}/vmstat +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man8/* + +%files devel +%dir %{_includedir}/%{libname} +%{_includedir}/%{libname}/*.h +%{_libdir}/%{libname}.so +%{_libdir}/pkgconfig/%{libname}.pc +%{_libdir}/%{libname}.a +%{_mandir}/man3/* + + +%files lang -f %{name}.lang + +%changelog +%{?autochangelog} diff --git a/SPECS/protobuf-c/protobuf-c.spec b/SPECS/protobuf-c/protobuf-c.spec new file mode 100644 index 00000000..52d1b757 --- /dev/null +++ b/SPECS/protobuf-c/protobuf-c.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: protobuf-c +Version: 1.5.2 +Release: %autorelease +Summary: C bindings for Google's Protocol Buffers + +License: BSD-2-Clause +URL: https://github.com/protobuf-c/protobuf-c +#!RemoteAsset +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: pkgconfig(protobuf) +BuildSystem: autotools +BuildOption(conf): --disable-static +%description +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. This package provides a code generator and run-time +libraries to use Protocol Buffers from pure C (not C++). + +It uses a modified version of protoc called protoc-c. + +%package compiler +Summary: Protocol Buffers C compiler +Requires: %{name} = %{version}-%{release} + +%description compiler +This package contains a modified version of the Protocol Buffers +compiler for the C programming language called protoc-c. + +%package devel +Summary: Protocol Buffers C headers and libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-compiler = %{version}-%{release} + +%description devel +This package contains protobuf-c headers and libraries. + +%files +%license LICENSE +%doc README.md TODO +%{_libdir}/libprotobuf-c.so.1* + +%files compiler +%{_bindir}/protoc-c +%{_bindir}/protoc-gen-c + +%files devel +%dir %{_includedir}/google +%{_includedir}/protobuf-c/ +%{_includedir}/google/protobuf-c/ +%{_libdir}/libprotobuf-c.so +%{_libdir}/pkgconfig/libprotobuf-c.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/protobuf/protobuf.spec b/SPECS/protobuf/protobuf.spec new file mode 100644 index 00000000..fad9b11f --- /dev/null +++ b/SPECS/protobuf/protobuf.spec @@ -0,0 +1,107 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: protobuf +Version: 32.0 +Release: %autorelease +Summary: Protocol Buffers - Google's data interchange format +License: BSD-3-Clause +Group: Development/Libraries/C and C++ +URL: https://github.com/protocolbuffers/protobuf +#!RemoteAsset +Source0: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: cmake +BuildOption(conf): -Dprotobuf_BUILD_TESTS=OFF +BuildOption(conf): -Dprotobuf_ABSL_PROVIDER=package + +BuildRequires: cmake +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(absl_absl_check) +BuildRequires: pkgconfig(absl_absl_log) +BuildRequires: pkgconfig(absl_algorithm) +BuildRequires: pkgconfig(absl_base) +BuildRequires: pkgconfig(absl_bind_front) +BuildRequires: pkgconfig(absl_bits) +BuildRequires: pkgconfig(absl_btree) +BuildRequires: pkgconfig(absl_cleanup) +BuildRequires: pkgconfig(absl_cord) +BuildRequires: pkgconfig(absl_core_headers) +BuildRequires: pkgconfig(absl_debugging) +BuildRequires: pkgconfig(absl_die_if_null) +BuildRequires: pkgconfig(absl_dynamic_annotations) +BuildRequires: pkgconfig(absl_flags) +BuildRequires: pkgconfig(absl_flat_hash_map) +BuildRequires: pkgconfig(absl_flat_hash_set) +BuildRequires: pkgconfig(absl_function_ref) +BuildRequires: pkgconfig(absl_hash) +BuildRequires: pkgconfig(absl_layout) +BuildRequires: pkgconfig(absl_log_globals) +BuildRequires: pkgconfig(absl_log_initialize) +BuildRequires: pkgconfig(absl_log_severity) +BuildRequires: pkgconfig(absl_memory) +BuildRequires: pkgconfig(absl_node_hash_map) +BuildRequires: pkgconfig(absl_node_hash_set) +BuildRequires: pkgconfig(absl_optional) +BuildRequires: pkgconfig(absl_random_distributions) +BuildRequires: pkgconfig(absl_random_random) +BuildRequires: pkgconfig(absl_span) +BuildRequires: pkgconfig(absl_status) +BuildRequires: pkgconfig(absl_statusor) +BuildRequires: pkgconfig(absl_strings) +BuildRequires: pkgconfig(absl_synchronization) +BuildRequires: pkgconfig(absl_time) +BuildRequires: pkgconfig(absl_type_traits) +BuildRequires: pkgconfig(absl_utility) +BuildRequires: pkgconfig(absl_variant) +BuildRequires: pkgconfig(zlib) + +%description +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%package devel +Summary: Header files, libraries and development documentation for %{name} +Group: Development/Libraries/C and C++ +Requires: protobuf +Provides: libprotobuf-devel +# java related, haven't decided how to deal with it +# currently mvn file will not be installed +# brought from openSUSE: +# Not generated automatically without javapackages-local as dependency +# provides: mvn(com.google.protobuf:protoc:exe:linux-%{protoc_arch}:) + +# vim related files are not installed, too + +%description devel +Protocol Buffers are a way of encoding structured data in an efficient yet +extensible format. Google uses Protocol Buffers for almost all of its internal +RPC protocols and file formats. + +%files +%license LICENSE +%{_libdir}/lib*.so* + +%files devel +%license LICENSE +%doc CONTRIBUTORS.txt README.md +%{_bindir}/protoc* +%{_includedir}/google +%{_includedir}/upb +%{_includedir}/*.h +%{_libdir}/cmake/protobuf +%{_libdir}/cmake/utf8_range +%{_libdir}/pkgconfig/* +# the UPB static lib is included, used for development +%{_libdir}/libupb.a + +%changelog +%{?autochangelog} diff --git a/SPECS/psimd/psimd.spec b/SPECS/psimd/psimd.spec new file mode 100644 index 00000000..e596dc6f --- /dev/null +++ b/SPECS/psimd/psimd.spec @@ -0,0 +1,34 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define commit 072586a71b55b7f8c584153d223e95687148a900 +%define commitdate 20200517 + +Name: psimd-devel +Version: 0.0.%{commitdate} +Release: %autorelease +Summary: P(ortable) SIMD intrinsics library (header-only) +License: MIT +URL: https://github.com/Maratyszcza/psimd +#!RemoteAsset +Source0: https://github.com/Maratyszcza/psimd/archive/%{commit}/psimd-072586a.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM:STRING=3.5 +BuildRequires: cmake + +%description +psimd is a header-only C/C++ library that provides a portable interface to +128-bit SIMD intrinsics on x86, ARM, and WebAssembly. + +%files +%doc README.md +%license LICENSE +%{_includedir}/psimd.h + +%changelog +%{?autochangelog} diff --git a/SPECS/psmisc/psmisc.spec b/SPECS/psmisc/psmisc.spec new file mode 100644 index 00000000..998e2466 --- /dev/null +++ b/SPECS/psmisc/psmisc.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: psmisc +Version: 23.7 +Release: %autorelease +Summary: Utilities for managing processes on your system +License: GPL-2.0-or-later +URL: https://gitlab.com/psmisc/psmisc +#!RemoteAsset +Source0: %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): --enable-selinux +BuildOption(conf): --disable-rpath + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +BuildRequires: gettext +BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(ncurses) + +%description +The psmisc package contains utilities for managing processes on your +system: pstree, killall, fuser and pslog. The pstree command displays +a tree structure of all of the running processes on your system. The +killall command sends a specified signal (SIGTERM if nothing is specified) +to processes identified by name. The fuser command identifies the PIDs +of processes that are using specified files or filesystems. The pslog +command shows the path of log files owned by a given process. + +%conf -p +# We need to generate po/POTFILES.in +# Otherwise build will fail +grep -h src/ po/*.po|\ + sed -r 's/^#: //'|\ + tr ' ' '\n'|\ + sort -t : -k1,1 -u|\ + sed -r 's/:[0-9]+$//' > po/POTFILES.in +echo %version > .tarball-version +autoreconf -fiv + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%license COPYING +%doc AUTHORS ChangeLog README +%{_bindir}/fuser +%{_bindir}/killall +%{_bindir}/pstree +%{_bindir}/pstree.x11 +%{_bindir}/prtstat +%{_bindir}/pslog +%{_mandir}/man1/fuser.1* +%{_mandir}/man1/killall.1* +%{_mandir}/man1/pstree.1* +%{_mandir}/man1/prtstat.1* +%{_mandir}/man1/pslog.1* +#{_bindir}/peekfd +%exclude %{_mandir}/man1/peekfd.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/psutils/psutils.spec b/SPECS/psutils/psutils.spec new file mode 100644 index 00000000..a9fb2e7b --- /dev/null +++ b/SPECS/psutils/psutils.spec @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# If we want to enable gnulib, change this to 1 +%bcond gnulib 0 + +Name: psutils +Version: 2.10 +Release: %autorelease +Summary: PostScript utilities +License: GPL-3.0-or-later +URL: https://github.com/rrthomas/%{name} +#!RemoteAsset +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: autotools + +BuildOption(conf): --disable-relocatable + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bash +BuildRequires: coreutils +BuildRequires: gcc +%if %{with gnulib} +BuildRequires: gnulib-devel +%endif +BuildRequires: grep +BuildRequires: make +BuildRequires: perl +BuildRequires: sed +BuildRequires: paper +BuildRequires: perl(base) +BuildRequires: perl(Exporter) +BuildRequires: perl(Fcntl) +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(IPC::Run3) +BuildRequires: perl(List::Util) +BuildRequires: perl(POSIX) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) + +Provides: %{name}-perl = %{version}-%{release} + +%description +Utilities for manipulating PostScript documents. +Page selection and rearrangement are supported, including arrangement into +signatures for booklet printing, and page merging for n-up printing. + +%prep -a +%if %{with gnulib} +gnulib-tool --import --no-changelog relocatable-perl +%endif +autoreconf -fi + +%files +%license COPYING +%doc README +%{_bindir}/epsffit +%{_bindir}/extractres +%{_bindir}/includeres +%{_bindir}/psbook +%{_bindir}/psjoin +%{_bindir}/psnup +%{_bindir}/psresize +%{_bindir}/psselect +%{_bindir}/pstops +%{_datadir}/%{name} +%{_mandir}/man1/epsffit.1* +%{_mandir}/man1/extractres.1* +%{_mandir}/man1/includeres.1* +%{_mandir}/man1/psbook.1* +%{_mandir}/man1/psjoin.1* +%{_mandir}/man1/psnup.1* +%{_mandir}/man1/psresize.1* +%{_mandir}/man1/psselect.1* +%{_mandir}/man1/pstops.1* +%{_mandir}/man1/psutils.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/publicsuffix-list/index.txt b/SPECS/publicsuffix-list/index.txt new file mode 100644 index 00000000..dbdb0fa8 --- /dev/null +++ b/SPECS/publicsuffix-list/index.txt @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/SPECS/publicsuffix-list/public_suffix_list.dat b/SPECS/publicsuffix-list/public_suffix_list.dat new file mode 100644 index 00000000..9f8d34f7 --- /dev/null +++ b/SPECS/publicsuffix-list/public_suffix_list.dat @@ -0,0 +1,15993 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat, +// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. + +// VERSION: 2025-10-08_12-46-28_UTC +// COMMIT: ee7dec4a99602baaf51879dd8469b6642881a494 + +// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/. + +// ===BEGIN ICANN DOMAINS=== + +// ac : http://nic.ac/rules.htm +ac +com.ac +edu.ac +gov.ac +mil.ac +net.ac +org.ac + +// ad : https://www.iana.org/domains/root/db/ad.html +// Confirmed by Amadeu Abril i Abril (CORE) 2024-11-17 +ad + +// ae : https://www.iana.org/domains/root/db/ae.html +ae +ac.ae +co.ae +gov.ae +mil.ae +net.ae +org.ae +sch.ae + +// aero : https://information.aero/registration/policies/dmp +aero +// 2LDs +airline.aero +airport.aero +// 2LDs (currently not accepting registration, seemingly never have) +// As of 2024-07, these are marked as reserved for potential 3LD +// registrations (clause 11 "allocated subdomains" in the 2006 TLD +// policy), but the relevant industry partners have not opened them up +// for registration. Current status can be determined from the TLD's +// policy document: 2LDs that are open for registration must list +// their policy in the TLD's policy. Any 2LD without such a policy is +// not open for registrations. +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +air-surveillance.aero +air-traffic-control.aero +aircraft.aero +airtraffic.aero +ambulance.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +marketplace.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +taxi.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : https://www.nic.af/domain-price +af +com.af +edu.af +gov.af +net.af +org.af + +// ag : http://www.nic.ag/prices.htm +ag +co.ag +com.ag +net.ag +nom.ag +org.ag + +// ai : http://nic.com.ai/ +ai +com.ai +net.ai +off.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : https://www.amnic.net/policy/en/Policy_EN.pdf +// Confirmed by ISOC AM 2024-11-18 +am +co.am +com.am +commune.am +net.am +org.am + +// ao : https://www.iana.org/domains/root/db/ao.html +// https://www.dns.ao/ao/ +ao +co.ao +ed.ao +edu.ao +gov.ao +gv.ao +it.ao +og.ao +org.ao +pb.ao + +// aq : https://www.iana.org/domains/root/db/aq.html +aq + +// ar : https://nic.ar/es/nic-argentina/normativa +ar +bet.ar +com.ar +coop.ar +edu.ar +gob.ar +gov.ar +int.ar +mil.ar +musica.ar +mutual.ar +net.ar +org.ar +seg.ar +senasa.ar +tur.ar + +// arpa : https://www.iana.org/domains/root/db/arpa.html +// Confirmed by registry 2008-06-18 +arpa +e164.arpa +home.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : https://www.iana.org/domains/root/db/as.html +as +gov.as + +// asia : https://www.iana.org/domains/root/db/asia.html +asia + +// at : https://www.iana.org/domains/root/db/at.html +// Confirmed by registry 2008-06-17 +at +ac.at +sth.ac.at +co.at +gv.at +or.at + +// au : https://www.iana.org/domains/root/db/au.html +// https://www.auda.org.au/ +// Confirmed by registry 2025-07-16 +au +// 2LDs +asn.au +com.au +edu.au +gov.au +id.au +net.au +org.au +// Historic 2LDs (closed to new registration, but sites still exist) +conf.au +oz.au +// CGDNs : https://www.auda.org.au/au-domain-names/the-different-au-domain-names/state-and-territory-domain-names/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au +// 3LDs +act.edu.au +catholic.edu.au +// eq.edu.au - Removed at the request of the Queensland Department of Education +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +// act.gov.au - Bug 984824 - Removed at request of Greg Tankard +// nsw.gov.au - Bug 547985 - Removed at request of +// nt.gov.au - Bug 940478 - Removed at request of Greg Connors +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au +// 4LDs +// education.tas.edu.au - Removed at the request of the Department of Education Tasmania +// schools.nsw.edu.au - Removed at the request of the New South Wales Department of Education. + +// aw : https://www.iana.org/domains/root/db/aw.html +aw +com.aw + +// ax : https://www.iana.org/domains/root/db/ax.html +ax + +// az : https://www.iana.org/domains/root/db/az.html +// Confirmed via https://whois.az/?page_id=10 2024-12-11 +az +biz.az +co.az +com.az +edu.az +gov.az +info.az +int.az +mil.az +name.az +net.az +org.az +pp.az +// No longer available for registration, however domains exist as of 2024-12-11 +// see https://whois.az/?page_id=783 +pro.az + +// ba : https://www.iana.org/domains/root/db/ba.html +ba +com.ba +edu.ba +gov.ba +mil.ba +net.ba +org.ba + +// bb : https://www.iana.org/domains/root/db/bb.html +bb +biz.bb +co.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb +tv.bb + +// bd : https://www.iana.org/domains/root/db/bd.html +*.bd + +// be : https://www.iana.org/domains/root/db/be.html +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : https://www.iana.org/domains/root/db/bf.html +bf +gov.bf + +// bg : https://www.iana.org/domains/root/db/bg.html +// https://www.register.bg/user/static/rules/en/index.html +bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg + +// bh : https://www.iana.org/domains/root/db/bh.html +bh +com.bh +edu.bh +gov.bh +net.bh +org.bh + +// bi : https://www.iana.org/domains/root/db/bi.html +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : https://www.iana.org/domains/root/db/biz.html +biz + +// bj : https://nic.bj/bj-suffixes.txt +// Submitted by registry +bj +africa.bj +agro.bj +architectes.bj +assur.bj +avocats.bj +co.bj +com.bj +eco.bj +econo.bj +edu.bj +info.bj +loisirs.bj +money.bj +net.bj +org.bj +ote.bj +restaurant.bj +resto.bj +tourism.bj +univ.bj + +// bm : https://www.bermudanic.bm/domain-registration/index.php +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : http://www.bnnic.bn/faqs +bn +com.bn +edu.bn +gov.bn +net.bn +org.bn + +// bo : https://nic.bo +// Confirmed by registry 2024-11-19 +bo +com.bo +edu.bo +gob.bo +int.bo +mil.bo +net.bo +org.bo +tv.bo +web.bo +// Social Domains +academia.bo +agro.bo +arte.bo +blog.bo +bolivia.bo +ciencia.bo +cooperativa.bo +democracia.bo +deporte.bo +ecologia.bo +economia.bo +empresa.bo +indigena.bo +industria.bo +info.bo +medicina.bo +movimiento.bo +musica.bo +natural.bo +nombre.bo +noticias.bo +patria.bo +plurinacional.bo +politica.bo +profesional.bo +pueblo.bo +revista.bo +salud.bo +tecnologia.bo +tksat.bo +transporte.bo +wiki.bo + +// br : http://registro.br/dominio/categoria.html +// Submitted by registry +br +9guacu.br +abc.br +adm.br +adv.br +agr.br +aju.br +am.br +anani.br +aparecida.br +api.br +app.br +arq.br +art.br +ato.br +b.br +barueri.br +belem.br +bet.br +bhz.br +bib.br +bio.br +blog.br +bmd.br +boavista.br +bsb.br +campinagrande.br +campinas.br +caxias.br +cim.br +cng.br +cnt.br +com.br +contagem.br +coop.br +coz.br +cri.br +cuiaba.br +curitiba.br +def.br +des.br +det.br +dev.br +ecn.br +eco.br +edu.br +emp.br +enf.br +eng.br +esp.br +etc.br +eti.br +far.br +feira.br +flog.br +floripa.br +fm.br +fnd.br +fortal.br +fot.br +foz.br +fst.br +g12.br +geo.br +ggf.br +goiania.br +gov.br +// gov.br 26 states + df https://en.wikipedia.org/wiki/States_of_Brazil +ac.gov.br +al.gov.br +am.gov.br +ap.gov.br +ba.gov.br +ce.gov.br +df.gov.br +es.gov.br +go.gov.br +ma.gov.br +mg.gov.br +ms.gov.br +mt.gov.br +pa.gov.br +pb.gov.br +pe.gov.br +pi.gov.br +pr.gov.br +rj.gov.br +rn.gov.br +ro.gov.br +rr.gov.br +rs.gov.br +sc.gov.br +se.gov.br +sp.gov.br +to.gov.br +gru.br +ia.br +imb.br +ind.br +inf.br +jab.br +jampa.br +jdf.br +joinville.br +jor.br +jus.br +leg.br +leilao.br +lel.br +log.br +londrina.br +macapa.br +maceio.br +manaus.br +maringa.br +mat.br +med.br +mil.br +morena.br +mp.br +mus.br +natal.br +net.br +niteroi.br +*.nom.br +not.br +ntr.br +odo.br +ong.br +org.br +osasco.br +palmas.br +poa.br +ppg.br +pro.br +psc.br +psi.br +pvh.br +qsl.br +radio.br +rec.br +recife.br +rep.br +ribeirao.br +rio.br +riobranco.br +riopreto.br +salvador.br +sampa.br +santamaria.br +santoandre.br +saobernardo.br +saogonca.br +seg.br +sjc.br +slg.br +slz.br +social.br +sorocaba.br +srv.br +taxi.br +tc.br +tec.br +teo.br +the.br +tmp.br +trd.br +tur.br +tv.br +udi.br +vet.br +vix.br +vlog.br +wiki.br +xyz.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +edu.bs +gov.bs +net.bs +org.bs + +// bt : https://www.iana.org/domains/root/db/bt.html +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry +bv + +// bw : https://www.iana.org/domains/root/db/bw.html +// https://nic.net.bw/bw-name-structure +bw +ac.bw +co.bw +gov.bw +net.bw +org.bw + +// by : https://www.iana.org/domains/root/db/by.html +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by +// http://hoster.by/ +of.by + +// bz : https://www.iana.org/domains/root/db/bz.html +// http://www.belizenic.bz/ +bz +co.bz +com.bz +edu.bz +gov.bz +net.bz +org.bz + +// ca : https://www.iana.org/domains/root/db/ca.html +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: https://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : https://www.iana.org/domains/root/db/cat.html +cat + +// cc : https://www.iana.org/domains/root/db/cc.html +cc + +// cd : https://www.iana.org/domains/root/db/cd.html +// https://www.nic.cd +cd +gov.cd + +// cf : https://www.iana.org/domains/root/db/cf.html +cf + +// cg : https://www.iana.org/domains/root/db/cg.html +cg + +// ch : https://www.iana.org/domains/root/db/ch.html +ch + +// ci : https://www.iana.org/domains/root/db/ci.html +ci +ac.ci +aéroport.ci +asso.ci +co.ci +com.ci +ed.ci +edu.ci +go.ci +gouv.ci +int.ci +net.ci +or.ci +org.ci + +// ck : https://www.iana.org/domains/root/db/ck.html +*.ck +!www.ck + +// cl : https://www.nic.cl +// Confirmed by .CL registry +cl +co.cl +gob.cl +gov.cl +mil.cl + +// cm : https://www.iana.org/domains/root/db/cm.html plus bug 981927 +cm +co.cm +com.cm +gov.cm +net.cm + +// cn : https://www.iana.org/domains/root/db/cn.html +// Submitted by registry +cn +ac.cn +com.cn +edu.cn +gov.cn +mil.cn +net.cn +org.cn +公司.cn +網絡.cn +网络.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gx.cn +gz.cn +ha.cn +hb.cn +he.cn +hi.cn +hk.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +mo.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +tw.cn +xj.cn +xz.cn +yn.cn +zj.cn + +// co : https://www.iana.org/domains/root/db/co.html +// https://www.cointernet.com.co/como-funciona-un-dominio-restringido +// Confirmed by registry 2024-11-18 +co +com.co +edu.co +gov.co +mil.co +net.co +nom.co +org.co + +// com : https://www.iana.org/domains/root/db/com.html +com + +// coop : https://www.iana.org/domains/root/db/coop.html +coop + +// cr : https://nic.cr/capitulo-1-registro-de-un-nombre-de-dominio/ +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : https://www.iana.org/domains/root/db/cu.html +cu +com.cu +edu.cu +gob.cu +inf.cu +nat.cu +net.cu +org.cu + +// cv : https://www.iana.org/domains/root/db/cv.html +// https://ola.cv/domain-extensions-under-cv/ +// Confirmed by registry 2024-11-26 +cv +com.cv +edu.cv +id.cv +int.cv +net.cv +nome.cv +org.cv +publ.cv + +// cw : https://www.uoc.cw/cw-registry +// Confirmed by registry 2024-11-19 +cw +com.cw +edu.cw +net.cw +org.cw + +// cx : https://www.iana.org/domains/root/db/cx.html +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://www.nic.cy/ +// Submitted by Panayiotou Fotia +// https://nic.cy/wp-content/uploads/2024/01/Create-Request-for-domain-name-registration-1.pdf +cy +ac.cy +biz.cy +com.cy +ekloges.cy +gov.cy +ltd.cy +mil.cy +net.cy +org.cy +press.cy +pro.cy +tm.cy + +// cz : https://www.iana.org/domains/root/db/cz.html +// Confirmed by registry 2025-08-06 +cz +gov.cz + +// de : https://www.iana.org/domains/root/db/de.html +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : https://www.iana.org/domains/root/db/dj.html +dj + +// dk : https://www.iana.org/domains/root/db/dk.html +// Confirmed by registry 2008-06-17 +dk + +// dm : https://www.iana.org/domains/root/db/dm.html +// https://nic.dm/policies/pdf/DMRulesandGuidelines2024v1.pdf +// Confirmed by registry 2024-11-19 +dm +co.dm +com.dm +edu.dm +gov.dm +net.dm +org.dm + +// do : https://www.iana.org/domains/root/db/do.html +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : http://www.nic.dz/images/pdf_nic/charte.pdf +dz +art.dz +asso.dz +com.dz +edu.dz +gov.dz +net.dz +org.dz +pol.dz +soc.dz +tm.dz + +// ec : https://www.nic.ec/ +// Submitted by registry +ec +abg.ec +adm.ec +agron.ec +arqt.ec +art.ec +bar.ec +chef.ec +com.ec +cont.ec +cpa.ec +cue.ec +dent.ec +dgn.ec +disco.ec +doc.ec +edu.ec +eng.ec +esm.ec +fin.ec +fot.ec +gal.ec +gob.ec +gov.ec +gye.ec +ibr.ec +info.ec +k12.ec +lat.ec +loj.ec +med.ec +mil.ec +mktg.ec +mon.ec +net.ec +ntr.ec +odont.ec +org.ec +pro.ec +prof.ec +psic.ec +psiq.ec +pub.ec +rio.ec +rrpp.ec +sal.ec +tech.ec +tul.ec +tur.ec +uio.ec +vet.ec +xxx.ec + +// edu : https://www.iana.org/domains/root/db/edu.html +edu + +// ee : https://www.internet.ee/domains/general-domains-and-procedure-for-registration-of-sub-domains-under-general-domains +ee +aip.ee +com.ee +edu.ee +fie.ee +gov.ee +lib.ee +med.ee +org.ee +pri.ee +riik.ee + +// eg : https://www.iana.org/domains/root/db/eg.html +// https://domain.eg/en/domain-rules/subdomain-names-types/ +eg +ac.eg +com.eg +edu.eg +eun.eg +gov.eg +info.eg +me.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg +sport.eg +tv.eg + +// er : https://www.iana.org/domains/root/db/er.html +*.er + +// es : https://www.dominios.es/en +es +com.es +edu.es +gob.es +nom.es +org.es + +// et : https://www.iana.org/domains/root/db/et.html +et +biz.et +com.et +edu.et +gov.et +info.et +name.et +net.et +org.et + +// eu : https://www.iana.org/domains/root/db/eu.html +eu + +// fi : https://www.iana.org/domains/root/db/fi.html +fi +// aland.fi : https://www.iana.org/domains/root/db/ax.html +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +aland.fi + +// fj : http://domains.fj/ +// Submitted by registry 2020-02-11 +fj +ac.fj +biz.fj +com.fj +gov.fj +info.fj +mil.fj +name.fj +net.fj +org.fj +pro.fj + +// fk : https://www.iana.org/domains/root/db/fk.html +*.fk + +// fm : https://www.iana.org/domains/root/db/fm.html +fm +com.fm +edu.fm +net.fm +org.fm + +// fo : https://www.iana.org/domains/root/db/fo.html +fo + +// fr : https://www.afnic.fr/ https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf +fr +asso.fr +com.fr +gouv.fr +nom.fr +prd.fr +tm.fr +// Other SLDs now selfmanaged out of AFNIC range. Former "domaines sectoriels", still registration suffixes +avoues.fr +cci.fr +greta.fr +huissier-justice.fr + +// ga : https://www.iana.org/domains/root/db/ga.html +ga + +// gb : This registry is effectively dormant +// Submitted by registry +gb + +// gd : https://www.iana.org/domains/root/db/gd.html +gd +edu.gd +gov.gd + +// ge : https://nic.ge/en/administrator/the-ge-domain-regulations +// Confirmed by registry 2024-11-20 +ge +com.ge +edu.ge +gov.ge +net.ge +org.ge +pvt.ge +school.ge + +// gf : https://www.iana.org/domains/root/db/gf.html +gf + +// gg : https://www.channelisles.net/register-1/register-direct +// Confirmed by registry 2013-11-28 +gg +co.gg +net.gg +org.gg + +// gh : https://www.iana.org/domains/root/db/gh.html +// https://www.nic.gh/ +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +biz.gh +com.gh +edu.gh +gov.gh +mil.gh +net.gh +org.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +edu.gi +gov.gi +ltd.gi +mod.gi +org.gi + +// gl : https://www.iana.org/domains/root/db/gl.html +// http://nic.gl +gl +co.gl +com.gl +edu.gl +net.gl +org.gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry +gn +ac.gn +com.gn +edu.gn +gov.gn +net.gn +org.gn + +// gov : https://www.iana.org/domains/root/db/gov.html +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +asso.gp +com.gp +edu.gp +mobi.gp +net.gp +org.gp + +// gq : https://www.iana.org/domains/root/db/gq.html +gq + +// gr : https://www.iana.org/domains/root/db/gr.html +// Submitted by registry +gr +com.gr +edu.gr +gov.gr +net.gr +org.gr + +// gs : https://www.iana.org/domains/root/db/gs.html +gs + +// gt : https://www.gt/sitio/registration_policy.php?lang=en +gt +com.gt +edu.gt +gob.gt +ind.gt +mil.gt +net.gt +org.gt + +// gu : http://gadao.gov.gu/register.html +// University of Guam : https://www.uog.edu +// Submitted by uognoc@triton.uog.edu +gu +com.gu +edu.gu +gov.gu +guam.gu +info.gu +net.gu +org.gu +web.gu + +// gw : https://www.iana.org/domains/root/db/gw.html +// gw : https://nic.gw/regras/ +gw + +// gy : https://www.iana.org/domains/root/db/gy.html +// http://registry.gy/ +gy +co.gy +com.gy +edu.gy +gov.gy +net.gy +org.gy + +// hk : https://www.hkirc.hk +// Submitted by registry +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +个人.hk +個人.hk +公司.hk +政府.hk +敎育.hk +教育.hk +箇人.hk +組織.hk +組织.hk +網絡.hk +網络.hk +组織.hk +组织.hk +网絡.hk +网络.hk + +// hm : https://www.iana.org/domains/root/db/hm.html +hm + +// hn : https://www.iana.org/domains/root/db/hn.html +hn +com.hn +edu.hn +gob.hn +mil.hn +net.hn +org.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +com.hr +from.hr +iz.hr +name.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +adult.ht +art.ht +asso.ht +com.ht +coop.ht +edu.ht +firm.ht +gouv.ht +info.ht +med.ht +net.ht +org.ht +perso.ht +pol.ht +pro.ht +rel.ht +shop.ht + +// hu : https://www.iana.org/domains/root/db/hu.html +// Confirmed by registry 2008-06-12 +hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +co.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +info.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +org.hu +priv.hu +reklam.hu +sex.hu +shop.hu +sport.hu +suli.hu +szex.hu +tm.hu +tozsde.hu +utazas.hu +video.hu + +// id : https://www.iana.org/domains/root/db/id.html +id +ac.id +biz.id +co.id +desa.id +go.id +kop.id +mil.id +my.id +net.id +or.id +ponpes.id +sch.id +web.id + +// ie : https://www.iana.org/domains/root/db/ie.html +ie +gov.ie + +// il : http://www.isoc.org.il/domains/ +// see also: https://en.isoc.org.il/il-cctld/registration-rules +// ISOC-IL (operated by .il Registry) +il +ac.il +co.il +gov.il +idf.il +k12.il +muni.il +net.il +org.il +// xn--4dbrk0ce ("Israel", Hebrew) : IL +ישראל +// xn--4dbgdty6c.xn--4dbrk0ce. +אקדמיה.ישראל +// xn--5dbhl8d.xn--4dbrk0ce. +ישוב.ישראל +// xn--8dbq2a.xn--4dbrk0ce. +צהל.ישראל +// xn--hebda8b.xn--4dbrk0ce. +ממשל.ישראל + +// im : https://www.nic.im/ +// Submitted by registry +im +ac.im +co.im +ltd.co.im +plc.co.im +com.im +net.im +org.im +tt.im +tv.im + +// in : https://www.iana.org/domains/root/db/in.html +// see also: https://registry.in/policies +// Please note, that nic.in is not an official eTLD, but used by most +// government institutions. +in +5g.in +6g.in +ac.in +ai.in +am.in +bihar.in +biz.in +business.in +ca.in +cn.in +co.in +com.in +coop.in +cs.in +delhi.in +dr.in +edu.in +er.in +firm.in +gen.in +gov.in +gujarat.in +ind.in +info.in +int.in +internet.in +io.in +me.in +mil.in +net.in +nic.in +org.in +pg.in +post.in +pro.in +res.in +travel.in +tv.in +uk.in +up.in +us.in + +// info : https://www.iana.org/domains/root/db/info.html +info + +// int : https://www.iana.org/domains/root/db/int.html +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.htm +io +co.io +com.io +edu.io +gov.io +mil.io +net.io +nom.io +org.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +com.iq +edu.iq +gov.iq +mil.iq +net.iq +org.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2024-11-17 +is + +// it : https://www.iana.org/domains/root/db/it.html +// https://www.nic.it/ +it +edu.it +gov.it +// Regions (3.3.1) +// https://www.nic.it/en/manage-your-it/forms-and-docs -> "Assignment and Management of domain names" +abr.it +abruzzo.it +aosta-valley.it +aostavalley.it +bas.it +basilicata.it +cal.it +calabria.it +cam.it +campania.it +emilia-romagna.it +emiliaromagna.it +emr.it +friuli-v-giulia.it +friuli-ve-giulia.it +friuli-vegiulia.it +friuli-venezia-giulia.it +friuli-veneziagiulia.it +friuli-vgiulia.it +friuliv-giulia.it +friulive-giulia.it +friulivegiulia.it +friulivenezia-giulia.it +friuliveneziagiulia.it +friulivgiulia.it +fvg.it +laz.it +lazio.it +lig.it +liguria.it +lom.it +lombardia.it +lombardy.it +lucania.it +mar.it +marche.it +mol.it +molise.it +piedmont.it +piemonte.it +pmn.it +pug.it +puglia.it +sar.it +sardegna.it +sardinia.it +sic.it +sicilia.it +sicily.it +taa.it +tos.it +toscana.it +trentin-sud-tirol.it +trentin-süd-tirol.it +trentin-sudtirol.it +trentin-südtirol.it +trentin-sued-tirol.it +trentin-suedtirol.it +trentino.it +trentino-a-adige.it +trentino-aadige.it +trentino-alto-adige.it +trentino-altoadige.it +trentino-s-tirol.it +trentino-stirol.it +trentino-sud-tirol.it +trentino-süd-tirol.it +trentino-sudtirol.it +trentino-südtirol.it +trentino-sued-tirol.it +trentino-suedtirol.it +trentinoa-adige.it +trentinoaadige.it +trentinoalto-adige.it +trentinoaltoadige.it +trentinos-tirol.it +trentinostirol.it +trentinosud-tirol.it +trentinosüd-tirol.it +trentinosudtirol.it +trentinosüdtirol.it +trentinosued-tirol.it +trentinosuedtirol.it +trentinsud-tirol.it +trentinsüd-tirol.it +trentinsudtirol.it +trentinsüdtirol.it +trentinsued-tirol.it +trentinsuedtirol.it +tuscany.it +umb.it +umbria.it +val-d-aosta.it +val-daosta.it +vald-aosta.it +valdaosta.it +valle-aosta.it +valle-d-aosta.it +valle-daosta.it +valleaosta.it +valled-aosta.it +valledaosta.it +vallee-aoste.it +vallée-aoste.it +vallee-d-aoste.it +vallée-d-aoste.it +valleeaoste.it +valléeaoste.it +valleedaoste.it +valléedaoste.it +vao.it +vda.it +ven.it +veneto.it +// Provinces (3.3.2) +ag.it +agrigento.it +al.it +alessandria.it +alto-adige.it +altoadige.it +an.it +ancona.it +andria-barletta-trani.it +andria-trani-barletta.it +andriabarlettatrani.it +andriatranibarletta.it +ao.it +aosta.it +aoste.it +ap.it +aq.it +aquila.it +ar.it +arezzo.it +ascoli-piceno.it +ascolipiceno.it +asti.it +at.it +av.it +avellino.it +ba.it +balsan.it +balsan-sudtirol.it +balsan-südtirol.it +balsan-suedtirol.it +bari.it +barletta-trani-andria.it +barlettatraniandria.it +belluno.it +benevento.it +bergamo.it +bg.it +bi.it +biella.it +bl.it +bn.it +bo.it +bologna.it +bolzano.it +bolzano-altoadige.it +bozen.it +bozen-sudtirol.it +bozen-südtirol.it +bozen-suedtirol.it +br.it +brescia.it +brindisi.it +bs.it +bt.it +bulsan.it +bulsan-sudtirol.it +bulsan-südtirol.it +bulsan-suedtirol.it +bz.it +ca.it +cagliari.it +caltanissetta.it +campidano-medio.it +campidanomedio.it +campobasso.it +carbonia-iglesias.it +carboniaiglesias.it +carrara-massa.it +carraramassa.it +caserta.it +catania.it +catanzaro.it +cb.it +ce.it +cesena-forli.it +cesena-forlì.it +cesenaforli.it +cesenaforlì.it +ch.it +chieti.it +ci.it +cl.it +cn.it +co.it +como.it +cosenza.it +cr.it +cremona.it +crotone.it +cs.it +ct.it +cuneo.it +cz.it +dell-ogliastra.it +dellogliastra.it +en.it +enna.it +fc.it +fe.it +fermo.it +ferrara.it +fg.it +fi.it +firenze.it +florence.it +fm.it +foggia.it +forli-cesena.it +forlì-cesena.it +forlicesena.it +forlìcesena.it +fr.it +frosinone.it +ge.it +genoa.it +genova.it +go.it +gorizia.it +gr.it +grosseto.it +iglesias-carbonia.it +iglesiascarbonia.it +im.it +imperia.it +is.it +isernia.it +kr.it +la-spezia.it +laquila.it +laspezia.it +latina.it +lc.it +le.it +lecce.it +lecco.it +li.it +livorno.it +lo.it +lodi.it +lt.it +lu.it +lucca.it +macerata.it +mantova.it +massa-carrara.it +massacarrara.it +matera.it +mb.it +mc.it +me.it +medio-campidano.it +mediocampidano.it +messina.it +mi.it +milan.it +milano.it +mn.it +mo.it +modena.it +monza.it +monza-brianza.it +monza-e-della-brianza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +ms.it +mt.it +na.it +naples.it +napoli.it +no.it +novara.it +nu.it +nuoro.it +og.it +ogliastra.it +olbia-tempio.it +olbiatempio.it +or.it +oristano.it +ot.it +pa.it +padova.it +padua.it +palermo.it +parma.it +pavia.it +pc.it +pd.it +pe.it +perugia.it +pesaro-urbino.it +pesarourbino.it +pescara.it +pg.it +pi.it +piacenza.it +pisa.it +pistoia.it +pn.it +po.it +pordenone.it +potenza.it +pr.it +prato.it +pt.it +pu.it +pv.it +pz.it +ra.it +ragusa.it +ravenna.it +rc.it +re.it +reggio-calabria.it +reggio-emilia.it +reggiocalabria.it +reggioemilia.it +rg.it +ri.it +rieti.it +rimini.it +rm.it +rn.it +ro.it +roma.it +rome.it +rovigo.it +sa.it +salerno.it +sassari.it +savona.it +si.it +siena.it +siracusa.it +so.it +sondrio.it +sp.it +sr.it +ss.it +südtirol.it +suedtirol.it +sv.it +ta.it +taranto.it +te.it +tempio-olbia.it +tempioolbia.it +teramo.it +terni.it +tn.it +to.it +torino.it +tp.it +tr.it +trani-andria-barletta.it +trani-barletta-andria.it +traniandriabarletta.it +tranibarlettaandria.it +trapani.it +trento.it +treviso.it +trieste.it +ts.it +turin.it +tv.it +ud.it +udine.it +urbino-pesaro.it +urbinopesaro.it +va.it +varese.it +vb.it +vc.it +ve.it +venezia.it +venice.it +verbania.it +vercelli.it +verona.it +vi.it +vibo-valentia.it +vibovalentia.it +vicenza.it +viterbo.it +vr.it +vs.it +vt.it +vv.it + +// je : https://www.iana.org/domains/root/db/je.html +// Confirmed by registry 2013-11-28 +je +co.je +net.je +org.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : https://www.dns.jo/JoFamily.aspx +// Confirmed by registry 2024-11-17 +jo +agri.jo +ai.jo +com.jo +edu.jo +eng.jo +fm.jo +gov.jo +mil.jo +net.jo +org.jo +per.jo +phd.jo +sch.jo +tv.jo + +// jobs : https://www.iana.org/domains/root/db/jobs.html +jobs + +// jp : https://www.iana.org/domains/root/db/jp.html +// http://jprs.co.jp/en/jpdomain.html +// Confirmed by registry 2024-11-22 +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp prefecture type names +aichi.jp +akita.jp +aomori.jp +chiba.jp +ehime.jp +fukui.jp +fukuoka.jp +fukushima.jp +gifu.jp +gunma.jp +hiroshima.jp +hokkaido.jp +hyogo.jp +ibaraki.jp +ishikawa.jp +iwate.jp +kagawa.jp +kagoshima.jp +kanagawa.jp +kochi.jp +kumamoto.jp +kyoto.jp +mie.jp +miyagi.jp +miyazaki.jp +nagano.jp +nagasaki.jp +nara.jp +niigata.jp +oita.jp +okayama.jp +okinawa.jp +osaka.jp +saga.jp +saitama.jp +shiga.jp +shimane.jp +shizuoka.jp +tochigi.jp +tokushima.jp +tokyo.jp +tottori.jp +toyama.jp +wakayama.jp +yamagata.jp +yamaguchi.jp +yamanashi.jp +三重.jp +京都.jp +佐賀.jp +兵庫.jp +北海道.jp +千葉.jp +和歌山.jp +埼玉.jp +大分.jp +大阪.jp +奈良.jp +宮城.jp +宮崎.jp +富山.jp +山口.jp +山形.jp +山梨.jp +岐阜.jp +岡山.jp +岩手.jp +島根.jp +広島.jp +徳島.jp +愛媛.jp +愛知.jp +新潟.jp +東京.jp +栃木.jp +沖縄.jp +滋賀.jp +熊本.jp +石川.jp +神奈川.jp +福井.jp +福岡.jp +福島.jp +秋田.jp +群馬.jp +茨城.jp +長崎.jp +長野.jp +青森.jp +静岡.jp +香川.jp +高知.jp +鳥取.jp +鹿児島.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +// 2024-11-22: JPRS confirmed that jp geographic type names no longer accept new registrations. +// Once all existing registrations expire (marking full discontinuation), these suffixes +// will be removed from the PSL. +*.kawasaki.jp +!city.kawasaki.jp +*.kitakyushu.jp +!city.kitakyushu.jp +*.kobe.jp +!city.kobe.jp +*.nagoya.jp +!city.nagoya.jp +*.sapporo.jp +!city.sapporo.jp +*.sendai.jp +!city.sendai.jp +*.yokohama.jp +!city.yokohama.jp +// 4th level registration +aisai.aichi.jp +ama.aichi.jp +anjo.aichi.jp +asuke.aichi.jp +chiryu.aichi.jp +chita.aichi.jp +fuso.aichi.jp +gamagori.aichi.jp +handa.aichi.jp +hazu.aichi.jp +hekinan.aichi.jp +higashiura.aichi.jp +ichinomiya.aichi.jp +inazawa.aichi.jp +inuyama.aichi.jp +isshiki.aichi.jp +iwakura.aichi.jp +kanie.aichi.jp +kariya.aichi.jp +kasugai.aichi.jp +kira.aichi.jp +kiyosu.aichi.jp +komaki.aichi.jp +konan.aichi.jp +kota.aichi.jp +mihama.aichi.jp +miyoshi.aichi.jp +nishio.aichi.jp +nisshin.aichi.jp +obu.aichi.jp +oguchi.aichi.jp +oharu.aichi.jp +okazaki.aichi.jp +owariasahi.aichi.jp +seto.aichi.jp +shikatsu.aichi.jp +shinshiro.aichi.jp +shitara.aichi.jp +tahara.aichi.jp +takahama.aichi.jp +tobishima.aichi.jp +toei.aichi.jp +togo.aichi.jp +tokai.aichi.jp +tokoname.aichi.jp +toyoake.aichi.jp +toyohashi.aichi.jp +toyokawa.aichi.jp +toyone.aichi.jp +toyota.aichi.jp +tsushima.aichi.jp +yatomi.aichi.jp +akita.akita.jp +daisen.akita.jp +fujisato.akita.jp +gojome.akita.jp +hachirogata.akita.jp +happou.akita.jp +higashinaruse.akita.jp +honjo.akita.jp +honjyo.akita.jp +ikawa.akita.jp +kamikoani.akita.jp +kamioka.akita.jp +katagami.akita.jp +kazuno.akita.jp +kitaakita.akita.jp +kosaka.akita.jp +kyowa.akita.jp +misato.akita.jp +mitane.akita.jp +moriyoshi.akita.jp +nikaho.akita.jp +noshiro.akita.jp +odate.akita.jp +oga.akita.jp +ogata.akita.jp +semboku.akita.jp +yokote.akita.jp +yurihonjo.akita.jp +aomori.aomori.jp +gonohe.aomori.jp +hachinohe.aomori.jp +hashikami.aomori.jp +hiranai.aomori.jp +hirosaki.aomori.jp +itayanagi.aomori.jp +kuroishi.aomori.jp +misawa.aomori.jp +mutsu.aomori.jp +nakadomari.aomori.jp +noheji.aomori.jp +oirase.aomori.jp +owani.aomori.jp +rokunohe.aomori.jp +sannohe.aomori.jp +shichinohe.aomori.jp +shingo.aomori.jp +takko.aomori.jp +towada.aomori.jp +tsugaru.aomori.jp +tsuruta.aomori.jp +abiko.chiba.jp +asahi.chiba.jp +chonan.chiba.jp +chosei.chiba.jp +choshi.chiba.jp +chuo.chiba.jp +funabashi.chiba.jp +futtsu.chiba.jp +hanamigawa.chiba.jp +ichihara.chiba.jp +ichikawa.chiba.jp +ichinomiya.chiba.jp +inzai.chiba.jp +isumi.chiba.jp +kamagaya.chiba.jp +kamogawa.chiba.jp +kashiwa.chiba.jp +katori.chiba.jp +katsuura.chiba.jp +kimitsu.chiba.jp +kisarazu.chiba.jp +kozaki.chiba.jp +kujukuri.chiba.jp +kyonan.chiba.jp +matsudo.chiba.jp +midori.chiba.jp +mihama.chiba.jp +minamiboso.chiba.jp +mobara.chiba.jp +mutsuzawa.chiba.jp +nagara.chiba.jp +nagareyama.chiba.jp +narashino.chiba.jp +narita.chiba.jp +noda.chiba.jp +oamishirasato.chiba.jp +omigawa.chiba.jp +onjuku.chiba.jp +otaki.chiba.jp +sakae.chiba.jp +sakura.chiba.jp +shimofusa.chiba.jp +shirako.chiba.jp +shiroi.chiba.jp +shisui.chiba.jp +sodegaura.chiba.jp +sosa.chiba.jp +tako.chiba.jp +tateyama.chiba.jp +togane.chiba.jp +tohnosho.chiba.jp +tomisato.chiba.jp +urayasu.chiba.jp +yachimata.chiba.jp +yachiyo.chiba.jp +yokaichiba.chiba.jp +yokoshibahikari.chiba.jp +yotsukaido.chiba.jp +ainan.ehime.jp +honai.ehime.jp +ikata.ehime.jp +imabari.ehime.jp +iyo.ehime.jp +kamijima.ehime.jp +kihoku.ehime.jp +kumakogen.ehime.jp +masaki.ehime.jp +matsuno.ehime.jp +matsuyama.ehime.jp +namikata.ehime.jp +niihama.ehime.jp +ozu.ehime.jp +saijo.ehime.jp +seiyo.ehime.jp +shikokuchuo.ehime.jp +tobe.ehime.jp +toon.ehime.jp +uchiko.ehime.jp +uwajima.ehime.jp +yawatahama.ehime.jp +echizen.fukui.jp +eiheiji.fukui.jp +fukui.fukui.jp +ikeda.fukui.jp +katsuyama.fukui.jp +mihama.fukui.jp +minamiechizen.fukui.jp +obama.fukui.jp +ohi.fukui.jp +ono.fukui.jp +sabae.fukui.jp +sakai.fukui.jp +takahama.fukui.jp +tsuruga.fukui.jp +wakasa.fukui.jp +ashiya.fukuoka.jp +buzen.fukuoka.jp +chikugo.fukuoka.jp +chikuho.fukuoka.jp +chikujo.fukuoka.jp +chikushino.fukuoka.jp +chikuzen.fukuoka.jp +chuo.fukuoka.jp +dazaifu.fukuoka.jp +fukuchi.fukuoka.jp +hakata.fukuoka.jp +higashi.fukuoka.jp +hirokawa.fukuoka.jp +hisayama.fukuoka.jp +iizuka.fukuoka.jp +inatsuki.fukuoka.jp +kaho.fukuoka.jp +kasuga.fukuoka.jp +kasuya.fukuoka.jp +kawara.fukuoka.jp +keisen.fukuoka.jp +koga.fukuoka.jp +kurate.fukuoka.jp +kurogi.fukuoka.jp +kurume.fukuoka.jp +minami.fukuoka.jp +miyako.fukuoka.jp +miyama.fukuoka.jp +miyawaka.fukuoka.jp +mizumaki.fukuoka.jp +munakata.fukuoka.jp +nakagawa.fukuoka.jp +nakama.fukuoka.jp +nishi.fukuoka.jp +nogata.fukuoka.jp +ogori.fukuoka.jp +okagaki.fukuoka.jp +okawa.fukuoka.jp +oki.fukuoka.jp +omuta.fukuoka.jp +onga.fukuoka.jp +onojo.fukuoka.jp +oto.fukuoka.jp +saigawa.fukuoka.jp +sasaguri.fukuoka.jp +shingu.fukuoka.jp +shinyoshitomi.fukuoka.jp +shonai.fukuoka.jp +soeda.fukuoka.jp +sue.fukuoka.jp +tachiarai.fukuoka.jp +tagawa.fukuoka.jp +takata.fukuoka.jp +toho.fukuoka.jp +toyotsu.fukuoka.jp +tsuiki.fukuoka.jp +ukiha.fukuoka.jp +umi.fukuoka.jp +usui.fukuoka.jp +yamada.fukuoka.jp +yame.fukuoka.jp +yanagawa.fukuoka.jp +yukuhashi.fukuoka.jp +aizubange.fukushima.jp +aizumisato.fukushima.jp +aizuwakamatsu.fukushima.jp +asakawa.fukushima.jp +bandai.fukushima.jp +date.fukushima.jp +fukushima.fukushima.jp +furudono.fukushima.jp +futaba.fukushima.jp +hanawa.fukushima.jp +higashi.fukushima.jp +hirata.fukushima.jp +hirono.fukushima.jp +iitate.fukushima.jp +inawashiro.fukushima.jp +ishikawa.fukushima.jp +iwaki.fukushima.jp +izumizaki.fukushima.jp +kagamiishi.fukushima.jp +kaneyama.fukushima.jp +kawamata.fukushima.jp +kitakata.fukushima.jp +kitashiobara.fukushima.jp +koori.fukushima.jp +koriyama.fukushima.jp +kunimi.fukushima.jp +miharu.fukushima.jp +mishima.fukushima.jp +namie.fukushima.jp +nango.fukushima.jp +nishiaizu.fukushima.jp +nishigo.fukushima.jp +okuma.fukushima.jp +omotego.fukushima.jp +ono.fukushima.jp +otama.fukushima.jp +samegawa.fukushima.jp +shimogo.fukushima.jp +shirakawa.fukushima.jp +showa.fukushima.jp +soma.fukushima.jp +sukagawa.fukushima.jp +taishin.fukushima.jp +tamakawa.fukushima.jp +tanagura.fukushima.jp +tenei.fukushima.jp +yabuki.fukushima.jp +yamato.fukushima.jp +yamatsuri.fukushima.jp +yanaizu.fukushima.jp +yugawa.fukushima.jp +anpachi.gifu.jp +ena.gifu.jp +gifu.gifu.jp +ginan.gifu.jp +godo.gifu.jp +gujo.gifu.jp +hashima.gifu.jp +hichiso.gifu.jp +hida.gifu.jp +higashishirakawa.gifu.jp +ibigawa.gifu.jp +ikeda.gifu.jp +kakamigahara.gifu.jp +kani.gifu.jp +kasahara.gifu.jp +kasamatsu.gifu.jp +kawaue.gifu.jp +kitagata.gifu.jp +mino.gifu.jp +minokamo.gifu.jp +mitake.gifu.jp +mizunami.gifu.jp +motosu.gifu.jp +nakatsugawa.gifu.jp +ogaki.gifu.jp +sakahogi.gifu.jp +seki.gifu.jp +sekigahara.gifu.jp +shirakawa.gifu.jp +tajimi.gifu.jp +takayama.gifu.jp +tarui.gifu.jp +toki.gifu.jp +tomika.gifu.jp +wanouchi.gifu.jp +yamagata.gifu.jp +yaotsu.gifu.jp +yoro.gifu.jp +annaka.gunma.jp +chiyoda.gunma.jp +fujioka.gunma.jp +higashiagatsuma.gunma.jp +isesaki.gunma.jp +itakura.gunma.jp +kanna.gunma.jp +kanra.gunma.jp +katashina.gunma.jp +kawaba.gunma.jp +kiryu.gunma.jp +kusatsu.gunma.jp +maebashi.gunma.jp +meiwa.gunma.jp +midori.gunma.jp +minakami.gunma.jp +naganohara.gunma.jp +nakanojo.gunma.jp +nanmoku.gunma.jp +numata.gunma.jp +oizumi.gunma.jp +ora.gunma.jp +ota.gunma.jp +shibukawa.gunma.jp +shimonita.gunma.jp +shinto.gunma.jp +showa.gunma.jp +takasaki.gunma.jp +takayama.gunma.jp +tamamura.gunma.jp +tatebayashi.gunma.jp +tomioka.gunma.jp +tsukiyono.gunma.jp +tsumagoi.gunma.jp +ueno.gunma.jp +yoshioka.gunma.jp +asaminami.hiroshima.jp +daiwa.hiroshima.jp +etajima.hiroshima.jp +fuchu.hiroshima.jp +fukuyama.hiroshima.jp +hatsukaichi.hiroshima.jp +higashihiroshima.hiroshima.jp +hongo.hiroshima.jp +jinsekikogen.hiroshima.jp +kaita.hiroshima.jp +kui.hiroshima.jp +kumano.hiroshima.jp +kure.hiroshima.jp +mihara.hiroshima.jp +miyoshi.hiroshima.jp +naka.hiroshima.jp +onomichi.hiroshima.jp +osakikamijima.hiroshima.jp +otake.hiroshima.jp +saka.hiroshima.jp +sera.hiroshima.jp +seranishi.hiroshima.jp +shinichi.hiroshima.jp +shobara.hiroshima.jp +takehara.hiroshima.jp +abashiri.hokkaido.jp +abira.hokkaido.jp +aibetsu.hokkaido.jp +akabira.hokkaido.jp +akkeshi.hokkaido.jp +asahikawa.hokkaido.jp +ashibetsu.hokkaido.jp +ashoro.hokkaido.jp +assabu.hokkaido.jp +atsuma.hokkaido.jp +bibai.hokkaido.jp +biei.hokkaido.jp +bifuka.hokkaido.jp +bihoro.hokkaido.jp +biratori.hokkaido.jp +chippubetsu.hokkaido.jp +chitose.hokkaido.jp +date.hokkaido.jp +ebetsu.hokkaido.jp +embetsu.hokkaido.jp +eniwa.hokkaido.jp +erimo.hokkaido.jp +esan.hokkaido.jp +esashi.hokkaido.jp +fukagawa.hokkaido.jp +fukushima.hokkaido.jp +furano.hokkaido.jp +furubira.hokkaido.jp +haboro.hokkaido.jp +hakodate.hokkaido.jp +hamatonbetsu.hokkaido.jp +hidaka.hokkaido.jp +higashikagura.hokkaido.jp +higashikawa.hokkaido.jp +hiroo.hokkaido.jp +hokuryu.hokkaido.jp +hokuto.hokkaido.jp +honbetsu.hokkaido.jp +horokanai.hokkaido.jp +horonobe.hokkaido.jp +ikeda.hokkaido.jp +imakane.hokkaido.jp +ishikari.hokkaido.jp +iwamizawa.hokkaido.jp +iwanai.hokkaido.jp +kamifurano.hokkaido.jp +kamikawa.hokkaido.jp +kamishihoro.hokkaido.jp +kamisunagawa.hokkaido.jp +kamoenai.hokkaido.jp +kayabe.hokkaido.jp +kembuchi.hokkaido.jp +kikonai.hokkaido.jp +kimobetsu.hokkaido.jp +kitahiroshima.hokkaido.jp +kitami.hokkaido.jp +kiyosato.hokkaido.jp +koshimizu.hokkaido.jp +kunneppu.hokkaido.jp +kuriyama.hokkaido.jp +kuromatsunai.hokkaido.jp +kushiro.hokkaido.jp +kutchan.hokkaido.jp +kyowa.hokkaido.jp +mashike.hokkaido.jp +matsumae.hokkaido.jp +mikasa.hokkaido.jp +minamifurano.hokkaido.jp +mombetsu.hokkaido.jp +moseushi.hokkaido.jp +mukawa.hokkaido.jp +muroran.hokkaido.jp +naie.hokkaido.jp +nakagawa.hokkaido.jp +nakasatsunai.hokkaido.jp +nakatombetsu.hokkaido.jp +nanae.hokkaido.jp +nanporo.hokkaido.jp +nayoro.hokkaido.jp +nemuro.hokkaido.jp +niikappu.hokkaido.jp +niki.hokkaido.jp +nishiokoppe.hokkaido.jp +noboribetsu.hokkaido.jp +numata.hokkaido.jp +obihiro.hokkaido.jp +obira.hokkaido.jp +oketo.hokkaido.jp +okoppe.hokkaido.jp +otaru.hokkaido.jp +otobe.hokkaido.jp +otofuke.hokkaido.jp +otoineppu.hokkaido.jp +oumu.hokkaido.jp +ozora.hokkaido.jp +pippu.hokkaido.jp +rankoshi.hokkaido.jp +rebun.hokkaido.jp +rikubetsu.hokkaido.jp +rishiri.hokkaido.jp +rishirifuji.hokkaido.jp +saroma.hokkaido.jp +sarufutsu.hokkaido.jp +shakotan.hokkaido.jp +shari.hokkaido.jp +shibecha.hokkaido.jp +shibetsu.hokkaido.jp +shikabe.hokkaido.jp +shikaoi.hokkaido.jp +shimamaki.hokkaido.jp +shimizu.hokkaido.jp +shimokawa.hokkaido.jp +shinshinotsu.hokkaido.jp +shintoku.hokkaido.jp +shiranuka.hokkaido.jp +shiraoi.hokkaido.jp +shiriuchi.hokkaido.jp +sobetsu.hokkaido.jp +sunagawa.hokkaido.jp +taiki.hokkaido.jp +takasu.hokkaido.jp +takikawa.hokkaido.jp +takinoue.hokkaido.jp +teshikaga.hokkaido.jp +tobetsu.hokkaido.jp +tohma.hokkaido.jp +tomakomai.hokkaido.jp +tomari.hokkaido.jp +toya.hokkaido.jp +toyako.hokkaido.jp +toyotomi.hokkaido.jp +toyoura.hokkaido.jp +tsubetsu.hokkaido.jp +tsukigata.hokkaido.jp +urakawa.hokkaido.jp +urausu.hokkaido.jp +uryu.hokkaido.jp +utashinai.hokkaido.jp +wakkanai.hokkaido.jp +wassamu.hokkaido.jp +yakumo.hokkaido.jp +yoichi.hokkaido.jp +aioi.hyogo.jp +akashi.hyogo.jp +ako.hyogo.jp +amagasaki.hyogo.jp +aogaki.hyogo.jp +asago.hyogo.jp +ashiya.hyogo.jp +awaji.hyogo.jp +fukusaki.hyogo.jp +goshiki.hyogo.jp +harima.hyogo.jp +himeji.hyogo.jp +ichikawa.hyogo.jp +inagawa.hyogo.jp +itami.hyogo.jp +kakogawa.hyogo.jp +kamigori.hyogo.jp +kamikawa.hyogo.jp +kasai.hyogo.jp +kasuga.hyogo.jp +kawanishi.hyogo.jp +miki.hyogo.jp +minamiawaji.hyogo.jp +nishinomiya.hyogo.jp +nishiwaki.hyogo.jp +ono.hyogo.jp +sanda.hyogo.jp +sannan.hyogo.jp +sasayama.hyogo.jp +sayo.hyogo.jp +shingu.hyogo.jp +shinonsen.hyogo.jp +shiso.hyogo.jp +sumoto.hyogo.jp +taishi.hyogo.jp +taka.hyogo.jp +takarazuka.hyogo.jp +takasago.hyogo.jp +takino.hyogo.jp +tamba.hyogo.jp +tatsuno.hyogo.jp +toyooka.hyogo.jp +yabu.hyogo.jp +yashiro.hyogo.jp +yoka.hyogo.jp +yokawa.hyogo.jp +ami.ibaraki.jp +asahi.ibaraki.jp +bando.ibaraki.jp +chikusei.ibaraki.jp +daigo.ibaraki.jp +fujishiro.ibaraki.jp +hitachi.ibaraki.jp +hitachinaka.ibaraki.jp +hitachiomiya.ibaraki.jp +hitachiota.ibaraki.jp +ibaraki.ibaraki.jp +ina.ibaraki.jp +inashiki.ibaraki.jp +itako.ibaraki.jp +iwama.ibaraki.jp +joso.ibaraki.jp +kamisu.ibaraki.jp +kasama.ibaraki.jp +kashima.ibaraki.jp +kasumigaura.ibaraki.jp +koga.ibaraki.jp +miho.ibaraki.jp +mito.ibaraki.jp +moriya.ibaraki.jp +naka.ibaraki.jp +namegata.ibaraki.jp +oarai.ibaraki.jp +ogawa.ibaraki.jp +omitama.ibaraki.jp +ryugasaki.ibaraki.jp +sakai.ibaraki.jp +sakuragawa.ibaraki.jp +shimodate.ibaraki.jp +shimotsuma.ibaraki.jp +shirosato.ibaraki.jp +sowa.ibaraki.jp +suifu.ibaraki.jp +takahagi.ibaraki.jp +tamatsukuri.ibaraki.jp +tokai.ibaraki.jp +tomobe.ibaraki.jp +tone.ibaraki.jp +toride.ibaraki.jp +tsuchiura.ibaraki.jp +tsukuba.ibaraki.jp +uchihara.ibaraki.jp +ushiku.ibaraki.jp +yachiyo.ibaraki.jp +yamagata.ibaraki.jp +yawara.ibaraki.jp +yuki.ibaraki.jp +anamizu.ishikawa.jp +hakui.ishikawa.jp +hakusan.ishikawa.jp +kaga.ishikawa.jp +kahoku.ishikawa.jp +kanazawa.ishikawa.jp +kawakita.ishikawa.jp +komatsu.ishikawa.jp +nakanoto.ishikawa.jp +nanao.ishikawa.jp +nomi.ishikawa.jp +nonoichi.ishikawa.jp +noto.ishikawa.jp +shika.ishikawa.jp +suzu.ishikawa.jp +tsubata.ishikawa.jp +tsurugi.ishikawa.jp +uchinada.ishikawa.jp +wajima.ishikawa.jp +fudai.iwate.jp +fujisawa.iwate.jp +hanamaki.iwate.jp +hiraizumi.iwate.jp +hirono.iwate.jp +ichinohe.iwate.jp +ichinoseki.iwate.jp +iwaizumi.iwate.jp +iwate.iwate.jp +joboji.iwate.jp +kamaishi.iwate.jp +kanegasaki.iwate.jp +karumai.iwate.jp +kawai.iwate.jp +kitakami.iwate.jp +kuji.iwate.jp +kunohe.iwate.jp +kuzumaki.iwate.jp +miyako.iwate.jp +mizusawa.iwate.jp +morioka.iwate.jp +ninohe.iwate.jp +noda.iwate.jp +ofunato.iwate.jp +oshu.iwate.jp +otsuchi.iwate.jp +rikuzentakata.iwate.jp +shiwa.iwate.jp +shizukuishi.iwate.jp +sumita.iwate.jp +tanohata.iwate.jp +tono.iwate.jp +yahaba.iwate.jp +yamada.iwate.jp +ayagawa.kagawa.jp +higashikagawa.kagawa.jp +kanonji.kagawa.jp +kotohira.kagawa.jp +manno.kagawa.jp +marugame.kagawa.jp +mitoyo.kagawa.jp +naoshima.kagawa.jp +sanuki.kagawa.jp +tadotsu.kagawa.jp +takamatsu.kagawa.jp +tonosho.kagawa.jp +uchinomi.kagawa.jp +utazu.kagawa.jp +zentsuji.kagawa.jp +akune.kagoshima.jp +amami.kagoshima.jp +hioki.kagoshima.jp +isa.kagoshima.jp +isen.kagoshima.jp +izumi.kagoshima.jp +kagoshima.kagoshima.jp +kanoya.kagoshima.jp +kawanabe.kagoshima.jp +kinko.kagoshima.jp +kouyama.kagoshima.jp +makurazaki.kagoshima.jp +matsumoto.kagoshima.jp +minamitane.kagoshima.jp +nakatane.kagoshima.jp +nishinoomote.kagoshima.jp +satsumasendai.kagoshima.jp +soo.kagoshima.jp +tarumizu.kagoshima.jp +yusui.kagoshima.jp +aikawa.kanagawa.jp +atsugi.kanagawa.jp +ayase.kanagawa.jp +chigasaki.kanagawa.jp +ebina.kanagawa.jp +fujisawa.kanagawa.jp +hadano.kanagawa.jp +hakone.kanagawa.jp +hiratsuka.kanagawa.jp +isehara.kanagawa.jp +kaisei.kanagawa.jp +kamakura.kanagawa.jp +kiyokawa.kanagawa.jp +matsuda.kanagawa.jp +minamiashigara.kanagawa.jp +miura.kanagawa.jp +nakai.kanagawa.jp +ninomiya.kanagawa.jp +odawara.kanagawa.jp +oi.kanagawa.jp +oiso.kanagawa.jp +sagamihara.kanagawa.jp +samukawa.kanagawa.jp +tsukui.kanagawa.jp +yamakita.kanagawa.jp +yamato.kanagawa.jp +yokosuka.kanagawa.jp +yugawara.kanagawa.jp +zama.kanagawa.jp +zushi.kanagawa.jp +aki.kochi.jp +geisei.kochi.jp +hidaka.kochi.jp +higashitsuno.kochi.jp +ino.kochi.jp +kagami.kochi.jp +kami.kochi.jp +kitagawa.kochi.jp +kochi.kochi.jp +mihara.kochi.jp +motoyama.kochi.jp +muroto.kochi.jp +nahari.kochi.jp +nakamura.kochi.jp +nankoku.kochi.jp +nishitosa.kochi.jp +niyodogawa.kochi.jp +ochi.kochi.jp +okawa.kochi.jp +otoyo.kochi.jp +otsuki.kochi.jp +sakawa.kochi.jp +sukumo.kochi.jp +susaki.kochi.jp +tosa.kochi.jp +tosashimizu.kochi.jp +toyo.kochi.jp +tsuno.kochi.jp +umaji.kochi.jp +yasuda.kochi.jp +yusuhara.kochi.jp +amakusa.kumamoto.jp +arao.kumamoto.jp +aso.kumamoto.jp +choyo.kumamoto.jp +gyokuto.kumamoto.jp +kamiamakusa.kumamoto.jp +kikuchi.kumamoto.jp +kumamoto.kumamoto.jp +mashiki.kumamoto.jp +mifune.kumamoto.jp +minamata.kumamoto.jp +minamioguni.kumamoto.jp +nagasu.kumamoto.jp +nishihara.kumamoto.jp +oguni.kumamoto.jp +ozu.kumamoto.jp +sumoto.kumamoto.jp +takamori.kumamoto.jp +uki.kumamoto.jp +uto.kumamoto.jp +yamaga.kumamoto.jp +yamato.kumamoto.jp +yatsushiro.kumamoto.jp +ayabe.kyoto.jp +fukuchiyama.kyoto.jp +higashiyama.kyoto.jp +ide.kyoto.jp +ine.kyoto.jp +joyo.kyoto.jp +kameoka.kyoto.jp +kamo.kyoto.jp +kita.kyoto.jp +kizu.kyoto.jp +kumiyama.kyoto.jp +kyotamba.kyoto.jp +kyotanabe.kyoto.jp +kyotango.kyoto.jp +maizuru.kyoto.jp +minami.kyoto.jp +minamiyamashiro.kyoto.jp +miyazu.kyoto.jp +muko.kyoto.jp +nagaokakyo.kyoto.jp +nakagyo.kyoto.jp +nantan.kyoto.jp +oyamazaki.kyoto.jp +sakyo.kyoto.jp +seika.kyoto.jp +tanabe.kyoto.jp +uji.kyoto.jp +ujitawara.kyoto.jp +wazuka.kyoto.jp +yamashina.kyoto.jp +yawata.kyoto.jp +asahi.mie.jp +inabe.mie.jp +ise.mie.jp +kameyama.mie.jp +kawagoe.mie.jp +kiho.mie.jp +kisosaki.mie.jp +kiwa.mie.jp +komono.mie.jp +kumano.mie.jp +kuwana.mie.jp +matsusaka.mie.jp +meiwa.mie.jp +mihama.mie.jp +minamiise.mie.jp +misugi.mie.jp +miyama.mie.jp +nabari.mie.jp +shima.mie.jp +suzuka.mie.jp +tado.mie.jp +taiki.mie.jp +taki.mie.jp +tamaki.mie.jp +toba.mie.jp +tsu.mie.jp +udono.mie.jp +ureshino.mie.jp +watarai.mie.jp +yokkaichi.mie.jp +furukawa.miyagi.jp +higashimatsushima.miyagi.jp +ishinomaki.miyagi.jp +iwanuma.miyagi.jp +kakuda.miyagi.jp +kami.miyagi.jp +kawasaki.miyagi.jp +marumori.miyagi.jp +matsushima.miyagi.jp +minamisanriku.miyagi.jp +misato.miyagi.jp +murata.miyagi.jp +natori.miyagi.jp +ogawara.miyagi.jp +ohira.miyagi.jp +onagawa.miyagi.jp +osaki.miyagi.jp +rifu.miyagi.jp +semine.miyagi.jp +shibata.miyagi.jp +shichikashuku.miyagi.jp +shikama.miyagi.jp +shiogama.miyagi.jp +shiroishi.miyagi.jp +tagajo.miyagi.jp +taiwa.miyagi.jp +tome.miyagi.jp +tomiya.miyagi.jp +wakuya.miyagi.jp +watari.miyagi.jp +yamamoto.miyagi.jp +zao.miyagi.jp +aya.miyazaki.jp +ebino.miyazaki.jp +gokase.miyazaki.jp +hyuga.miyazaki.jp +kadogawa.miyazaki.jp +kawaminami.miyazaki.jp +kijo.miyazaki.jp +kitagawa.miyazaki.jp +kitakata.miyazaki.jp +kitaura.miyazaki.jp +kobayashi.miyazaki.jp +kunitomi.miyazaki.jp +kushima.miyazaki.jp +mimata.miyazaki.jp +miyakonojo.miyazaki.jp +miyazaki.miyazaki.jp +morotsuka.miyazaki.jp +nichinan.miyazaki.jp +nishimera.miyazaki.jp +nobeoka.miyazaki.jp +saito.miyazaki.jp +shiiba.miyazaki.jp +shintomi.miyazaki.jp +takaharu.miyazaki.jp +takanabe.miyazaki.jp +takazaki.miyazaki.jp +tsuno.miyazaki.jp +achi.nagano.jp +agematsu.nagano.jp +anan.nagano.jp +aoki.nagano.jp +asahi.nagano.jp +azumino.nagano.jp +chikuhoku.nagano.jp +chikuma.nagano.jp +chino.nagano.jp +fujimi.nagano.jp +hakuba.nagano.jp +hara.nagano.jp +hiraya.nagano.jp +iida.nagano.jp +iijima.nagano.jp +iiyama.nagano.jp +iizuna.nagano.jp +ikeda.nagano.jp +ikusaka.nagano.jp +ina.nagano.jp +karuizawa.nagano.jp +kawakami.nagano.jp +kiso.nagano.jp +kisofukushima.nagano.jp +kitaaiki.nagano.jp +komagane.nagano.jp +komoro.nagano.jp +matsukawa.nagano.jp +matsumoto.nagano.jp +miasa.nagano.jp +minamiaiki.nagano.jp +minamimaki.nagano.jp +minamiminowa.nagano.jp +minowa.nagano.jp +miyada.nagano.jp +miyota.nagano.jp +mochizuki.nagano.jp +nagano.nagano.jp +nagawa.nagano.jp +nagiso.nagano.jp +nakagawa.nagano.jp +nakano.nagano.jp +nozawaonsen.nagano.jp +obuse.nagano.jp +ogawa.nagano.jp +okaya.nagano.jp +omachi.nagano.jp +omi.nagano.jp +ookuwa.nagano.jp +ooshika.nagano.jp +otaki.nagano.jp +otari.nagano.jp +sakae.nagano.jp +sakaki.nagano.jp +saku.nagano.jp +sakuho.nagano.jp +shimosuwa.nagano.jp +shinanomachi.nagano.jp +shiojiri.nagano.jp +suwa.nagano.jp +suzaka.nagano.jp +takagi.nagano.jp +takamori.nagano.jp +takayama.nagano.jp +tateshina.nagano.jp +tatsuno.nagano.jp +togakushi.nagano.jp +togura.nagano.jp +tomi.nagano.jp +ueda.nagano.jp +wada.nagano.jp +yamagata.nagano.jp +yamanouchi.nagano.jp +yasaka.nagano.jp +yasuoka.nagano.jp +chijiwa.nagasaki.jp +futsu.nagasaki.jp +goto.nagasaki.jp +hasami.nagasaki.jp +hirado.nagasaki.jp +iki.nagasaki.jp +isahaya.nagasaki.jp +kawatana.nagasaki.jp +kuchinotsu.nagasaki.jp +matsuura.nagasaki.jp +nagasaki.nagasaki.jp +obama.nagasaki.jp +omura.nagasaki.jp +oseto.nagasaki.jp +saikai.nagasaki.jp +sasebo.nagasaki.jp +seihi.nagasaki.jp +shimabara.nagasaki.jp +shinkamigoto.nagasaki.jp +togitsu.nagasaki.jp +tsushima.nagasaki.jp +unzen.nagasaki.jp +ando.nara.jp +gose.nara.jp +heguri.nara.jp +higashiyoshino.nara.jp +ikaruga.nara.jp +ikoma.nara.jp +kamikitayama.nara.jp +kanmaki.nara.jp +kashiba.nara.jp +kashihara.nara.jp +katsuragi.nara.jp +kawai.nara.jp +kawakami.nara.jp +kawanishi.nara.jp +koryo.nara.jp +kurotaki.nara.jp +mitsue.nara.jp +miyake.nara.jp +nara.nara.jp +nosegawa.nara.jp +oji.nara.jp +ouda.nara.jp +oyodo.nara.jp +sakurai.nara.jp +sango.nara.jp +shimoichi.nara.jp +shimokitayama.nara.jp +shinjo.nara.jp +soni.nara.jp +takatori.nara.jp +tawaramoto.nara.jp +tenkawa.nara.jp +tenri.nara.jp +uda.nara.jp +yamatokoriyama.nara.jp +yamatotakada.nara.jp +yamazoe.nara.jp +yoshino.nara.jp +aga.niigata.jp +agano.niigata.jp +gosen.niigata.jp +itoigawa.niigata.jp +izumozaki.niigata.jp +joetsu.niigata.jp +kamo.niigata.jp +kariwa.niigata.jp +kashiwazaki.niigata.jp +minamiuonuma.niigata.jp +mitsuke.niigata.jp +muika.niigata.jp +murakami.niigata.jp +myoko.niigata.jp +nagaoka.niigata.jp +niigata.niigata.jp +ojiya.niigata.jp +omi.niigata.jp +sado.niigata.jp +sanjo.niigata.jp +seiro.niigata.jp +seirou.niigata.jp +sekikawa.niigata.jp +shibata.niigata.jp +tagami.niigata.jp +tainai.niigata.jp +tochio.niigata.jp +tokamachi.niigata.jp +tsubame.niigata.jp +tsunan.niigata.jp +uonuma.niigata.jp +yahiko.niigata.jp +yoita.niigata.jp +yuzawa.niigata.jp +beppu.oita.jp +bungoono.oita.jp +bungotakada.oita.jp +hasama.oita.jp +hiji.oita.jp +himeshima.oita.jp +hita.oita.jp +kamitsue.oita.jp +kokonoe.oita.jp +kuju.oita.jp +kunisaki.oita.jp +kusu.oita.jp +oita.oita.jp +saiki.oita.jp +taketa.oita.jp +tsukumi.oita.jp +usa.oita.jp +usuki.oita.jp +yufu.oita.jp +akaiwa.okayama.jp +asakuchi.okayama.jp +bizen.okayama.jp +hayashima.okayama.jp +ibara.okayama.jp +kagamino.okayama.jp +kasaoka.okayama.jp +kibichuo.okayama.jp +kumenan.okayama.jp +kurashiki.okayama.jp +maniwa.okayama.jp +misaki.okayama.jp +nagi.okayama.jp +niimi.okayama.jp +nishiawakura.okayama.jp +okayama.okayama.jp +satosho.okayama.jp +setouchi.okayama.jp +shinjo.okayama.jp +shoo.okayama.jp +soja.okayama.jp +takahashi.okayama.jp +tamano.okayama.jp +tsuyama.okayama.jp +wake.okayama.jp +yakage.okayama.jp +aguni.okinawa.jp +ginowan.okinawa.jp +ginoza.okinawa.jp +gushikami.okinawa.jp +haebaru.okinawa.jp +higashi.okinawa.jp +hirara.okinawa.jp +iheya.okinawa.jp +ishigaki.okinawa.jp +ishikawa.okinawa.jp +itoman.okinawa.jp +izena.okinawa.jp +kadena.okinawa.jp +kin.okinawa.jp +kitadaito.okinawa.jp +kitanakagusuku.okinawa.jp +kumejima.okinawa.jp +kunigami.okinawa.jp +minamidaito.okinawa.jp +motobu.okinawa.jp +nago.okinawa.jp +naha.okinawa.jp +nakagusuku.okinawa.jp +nakijin.okinawa.jp +nanjo.okinawa.jp +nishihara.okinawa.jp +ogimi.okinawa.jp +okinawa.okinawa.jp +onna.okinawa.jp +shimoji.okinawa.jp +taketomi.okinawa.jp +tarama.okinawa.jp +tokashiki.okinawa.jp +tomigusuku.okinawa.jp +tonaki.okinawa.jp +urasoe.okinawa.jp +uruma.okinawa.jp +yaese.okinawa.jp +yomitan.okinawa.jp +yonabaru.okinawa.jp +yonaguni.okinawa.jp +zamami.okinawa.jp +abeno.osaka.jp +chihayaakasaka.osaka.jp +chuo.osaka.jp +daito.osaka.jp +fujiidera.osaka.jp +habikino.osaka.jp +hannan.osaka.jp +higashiosaka.osaka.jp +higashisumiyoshi.osaka.jp +higashiyodogawa.osaka.jp +hirakata.osaka.jp +ibaraki.osaka.jp +ikeda.osaka.jp +izumi.osaka.jp +izumiotsu.osaka.jp +izumisano.osaka.jp +kadoma.osaka.jp +kaizuka.osaka.jp +kanan.osaka.jp +kashiwara.osaka.jp +katano.osaka.jp +kawachinagano.osaka.jp +kishiwada.osaka.jp +kita.osaka.jp +kumatori.osaka.jp +matsubara.osaka.jp +minato.osaka.jp +minoh.osaka.jp +misaki.osaka.jp +moriguchi.osaka.jp +neyagawa.osaka.jp +nishi.osaka.jp +nose.osaka.jp +osakasayama.osaka.jp +sakai.osaka.jp +sayama.osaka.jp +sennan.osaka.jp +settsu.osaka.jp +shijonawate.osaka.jp +shimamoto.osaka.jp +suita.osaka.jp +tadaoka.osaka.jp +taishi.osaka.jp +tajiri.osaka.jp +takaishi.osaka.jp +takatsuki.osaka.jp +tondabayashi.osaka.jp +toyonaka.osaka.jp +toyono.osaka.jp +yao.osaka.jp +ariake.saga.jp +arita.saga.jp +fukudomi.saga.jp +genkai.saga.jp +hamatama.saga.jp +hizen.saga.jp +imari.saga.jp +kamimine.saga.jp +kanzaki.saga.jp +karatsu.saga.jp +kashima.saga.jp +kitagata.saga.jp +kitahata.saga.jp +kiyama.saga.jp +kouhoku.saga.jp +kyuragi.saga.jp +nishiarita.saga.jp +ogi.saga.jp +omachi.saga.jp +ouchi.saga.jp +saga.saga.jp +shiroishi.saga.jp +taku.saga.jp +tara.saga.jp +tosu.saga.jp +yoshinogari.saga.jp +arakawa.saitama.jp +asaka.saitama.jp +chichibu.saitama.jp +fujimi.saitama.jp +fujimino.saitama.jp +fukaya.saitama.jp +hanno.saitama.jp +hanyu.saitama.jp +hasuda.saitama.jp +hatogaya.saitama.jp +hatoyama.saitama.jp +hidaka.saitama.jp +higashichichibu.saitama.jp +higashimatsuyama.saitama.jp +honjo.saitama.jp +ina.saitama.jp +iruma.saitama.jp +iwatsuki.saitama.jp +kamiizumi.saitama.jp +kamikawa.saitama.jp +kamisato.saitama.jp +kasukabe.saitama.jp +kawagoe.saitama.jp +kawaguchi.saitama.jp +kawajima.saitama.jp +kazo.saitama.jp +kitamoto.saitama.jp +koshigaya.saitama.jp +kounosu.saitama.jp +kuki.saitama.jp +kumagaya.saitama.jp +matsubushi.saitama.jp +minano.saitama.jp +misato.saitama.jp +miyashiro.saitama.jp +miyoshi.saitama.jp +moroyama.saitama.jp +nagatoro.saitama.jp +namegawa.saitama.jp +niiza.saitama.jp +ogano.saitama.jp +ogawa.saitama.jp +ogose.saitama.jp +okegawa.saitama.jp +omiya.saitama.jp +otaki.saitama.jp +ranzan.saitama.jp +ryokami.saitama.jp +saitama.saitama.jp +sakado.saitama.jp +satte.saitama.jp +sayama.saitama.jp +shiki.saitama.jp +shiraoka.saitama.jp +soka.saitama.jp +sugito.saitama.jp +toda.saitama.jp +tokigawa.saitama.jp +tokorozawa.saitama.jp +tsurugashima.saitama.jp +urawa.saitama.jp +warabi.saitama.jp +yashio.saitama.jp +yokoze.saitama.jp +yono.saitama.jp +yorii.saitama.jp +yoshida.saitama.jp +yoshikawa.saitama.jp +yoshimi.saitama.jp +aisho.shiga.jp +gamo.shiga.jp +higashiomi.shiga.jp +hikone.shiga.jp +koka.shiga.jp +konan.shiga.jp +kosei.shiga.jp +koto.shiga.jp +kusatsu.shiga.jp +maibara.shiga.jp +moriyama.shiga.jp +nagahama.shiga.jp +nishiazai.shiga.jp +notogawa.shiga.jp +omihachiman.shiga.jp +otsu.shiga.jp +ritto.shiga.jp +ryuoh.shiga.jp +takashima.shiga.jp +takatsuki.shiga.jp +torahime.shiga.jp +toyosato.shiga.jp +yasu.shiga.jp +akagi.shimane.jp +ama.shimane.jp +gotsu.shimane.jp +hamada.shimane.jp +higashiizumo.shimane.jp +hikawa.shimane.jp +hikimi.shimane.jp +izumo.shimane.jp +kakinoki.shimane.jp +masuda.shimane.jp +matsue.shimane.jp +misato.shimane.jp +nishinoshima.shimane.jp +ohda.shimane.jp +okinoshima.shimane.jp +okuizumo.shimane.jp +shimane.shimane.jp +tamayu.shimane.jp +tsuwano.shimane.jp +unnan.shimane.jp +yakumo.shimane.jp +yasugi.shimane.jp +yatsuka.shimane.jp +arai.shizuoka.jp +atami.shizuoka.jp +fuji.shizuoka.jp +fujieda.shizuoka.jp +fujikawa.shizuoka.jp +fujinomiya.shizuoka.jp +fukuroi.shizuoka.jp +gotemba.shizuoka.jp +haibara.shizuoka.jp +hamamatsu.shizuoka.jp +higashiizu.shizuoka.jp +ito.shizuoka.jp +iwata.shizuoka.jp +izu.shizuoka.jp +izunokuni.shizuoka.jp +kakegawa.shizuoka.jp +kannami.shizuoka.jp +kawanehon.shizuoka.jp +kawazu.shizuoka.jp +kikugawa.shizuoka.jp +kosai.shizuoka.jp +makinohara.shizuoka.jp +matsuzaki.shizuoka.jp +minamiizu.shizuoka.jp +mishima.shizuoka.jp +morimachi.shizuoka.jp +nishiizu.shizuoka.jp +numazu.shizuoka.jp +omaezaki.shizuoka.jp +shimada.shizuoka.jp +shimizu.shizuoka.jp +shimoda.shizuoka.jp +shizuoka.shizuoka.jp +susono.shizuoka.jp +yaizu.shizuoka.jp +yoshida.shizuoka.jp +ashikaga.tochigi.jp +bato.tochigi.jp +haga.tochigi.jp +ichikai.tochigi.jp +iwafune.tochigi.jp +kaminokawa.tochigi.jp +kanuma.tochigi.jp +karasuyama.tochigi.jp +kuroiso.tochigi.jp +mashiko.tochigi.jp +mibu.tochigi.jp +moka.tochigi.jp +motegi.tochigi.jp +nasu.tochigi.jp +nasushiobara.tochigi.jp +nikko.tochigi.jp +nishikata.tochigi.jp +nogi.tochigi.jp +ohira.tochigi.jp +ohtawara.tochigi.jp +oyama.tochigi.jp +sakura.tochigi.jp +sano.tochigi.jp +shimotsuke.tochigi.jp +shioya.tochigi.jp +takanezawa.tochigi.jp +tochigi.tochigi.jp +tsuga.tochigi.jp +ujiie.tochigi.jp +utsunomiya.tochigi.jp +yaita.tochigi.jp +aizumi.tokushima.jp +anan.tokushima.jp +ichiba.tokushima.jp +itano.tokushima.jp +kainan.tokushima.jp +komatsushima.tokushima.jp +matsushige.tokushima.jp +mima.tokushima.jp +minami.tokushima.jp +miyoshi.tokushima.jp +mugi.tokushima.jp +nakagawa.tokushima.jp +naruto.tokushima.jp +sanagochi.tokushima.jp +shishikui.tokushima.jp +tokushima.tokushima.jp +wajiki.tokushima.jp +adachi.tokyo.jp +akiruno.tokyo.jp +akishima.tokyo.jp +aogashima.tokyo.jp +arakawa.tokyo.jp +bunkyo.tokyo.jp +chiyoda.tokyo.jp +chofu.tokyo.jp +chuo.tokyo.jp +edogawa.tokyo.jp +fuchu.tokyo.jp +fussa.tokyo.jp +hachijo.tokyo.jp +hachioji.tokyo.jp +hamura.tokyo.jp +higashikurume.tokyo.jp +higashimurayama.tokyo.jp +higashiyamato.tokyo.jp +hino.tokyo.jp +hinode.tokyo.jp +hinohara.tokyo.jp +inagi.tokyo.jp +itabashi.tokyo.jp +katsushika.tokyo.jp +kita.tokyo.jp +kiyose.tokyo.jp +kodaira.tokyo.jp +koganei.tokyo.jp +kokubunji.tokyo.jp +komae.tokyo.jp +koto.tokyo.jp +kouzushima.tokyo.jp +kunitachi.tokyo.jp +machida.tokyo.jp +meguro.tokyo.jp +minato.tokyo.jp +mitaka.tokyo.jp +mizuho.tokyo.jp +musashimurayama.tokyo.jp +musashino.tokyo.jp +nakano.tokyo.jp +nerima.tokyo.jp +ogasawara.tokyo.jp +okutama.tokyo.jp +ome.tokyo.jp +oshima.tokyo.jp +ota.tokyo.jp +setagaya.tokyo.jp +shibuya.tokyo.jp +shinagawa.tokyo.jp +shinjuku.tokyo.jp +suginami.tokyo.jp +sumida.tokyo.jp +tachikawa.tokyo.jp +taito.tokyo.jp +tama.tokyo.jp +toshima.tokyo.jp +chizu.tottori.jp +hino.tottori.jp +kawahara.tottori.jp +koge.tottori.jp +kotoura.tottori.jp +misasa.tottori.jp +nanbu.tottori.jp +nichinan.tottori.jp +sakaiminato.tottori.jp +tottori.tottori.jp +wakasa.tottori.jp +yazu.tottori.jp +yonago.tottori.jp +asahi.toyama.jp +fuchu.toyama.jp +fukumitsu.toyama.jp +funahashi.toyama.jp +himi.toyama.jp +imizu.toyama.jp +inami.toyama.jp +johana.toyama.jp +kamiichi.toyama.jp +kurobe.toyama.jp +nakaniikawa.toyama.jp +namerikawa.toyama.jp +nanto.toyama.jp +nyuzen.toyama.jp +oyabe.toyama.jp +taira.toyama.jp +takaoka.toyama.jp +tateyama.toyama.jp +toga.toyama.jp +tonami.toyama.jp +toyama.toyama.jp +unazuki.toyama.jp +uozu.toyama.jp +yamada.toyama.jp +arida.wakayama.jp +aridagawa.wakayama.jp +gobo.wakayama.jp +hashimoto.wakayama.jp +hidaka.wakayama.jp +hirogawa.wakayama.jp +inami.wakayama.jp +iwade.wakayama.jp +kainan.wakayama.jp +kamitonda.wakayama.jp +katsuragi.wakayama.jp +kimino.wakayama.jp +kinokawa.wakayama.jp +kitayama.wakayama.jp +koya.wakayama.jp +koza.wakayama.jp +kozagawa.wakayama.jp +kudoyama.wakayama.jp +kushimoto.wakayama.jp +mihama.wakayama.jp +misato.wakayama.jp +nachikatsuura.wakayama.jp +shingu.wakayama.jp +shirahama.wakayama.jp +taiji.wakayama.jp +tanabe.wakayama.jp +wakayama.wakayama.jp +yuasa.wakayama.jp +yura.wakayama.jp +asahi.yamagata.jp +funagata.yamagata.jp +higashine.yamagata.jp +iide.yamagata.jp +kahoku.yamagata.jp +kaminoyama.yamagata.jp +kaneyama.yamagata.jp +kawanishi.yamagata.jp +mamurogawa.yamagata.jp +mikawa.yamagata.jp +murayama.yamagata.jp +nagai.yamagata.jp +nakayama.yamagata.jp +nanyo.yamagata.jp +nishikawa.yamagata.jp +obanazawa.yamagata.jp +oe.yamagata.jp +oguni.yamagata.jp +ohkura.yamagata.jp +oishida.yamagata.jp +sagae.yamagata.jp +sakata.yamagata.jp +sakegawa.yamagata.jp +shinjo.yamagata.jp +shirataka.yamagata.jp +shonai.yamagata.jp +takahata.yamagata.jp +tendo.yamagata.jp +tozawa.yamagata.jp +tsuruoka.yamagata.jp +yamagata.yamagata.jp +yamanobe.yamagata.jp +yonezawa.yamagata.jp +yuza.yamagata.jp +abu.yamaguchi.jp +hagi.yamaguchi.jp +hikari.yamaguchi.jp +hofu.yamaguchi.jp +iwakuni.yamaguchi.jp +kudamatsu.yamaguchi.jp +mitou.yamaguchi.jp +nagato.yamaguchi.jp +oshima.yamaguchi.jp +shimonoseki.yamaguchi.jp +shunan.yamaguchi.jp +tabuse.yamaguchi.jp +tokuyama.yamaguchi.jp +toyota.yamaguchi.jp +ube.yamaguchi.jp +yuu.yamaguchi.jp +chuo.yamanashi.jp +doshi.yamanashi.jp +fuefuki.yamanashi.jp +fujikawa.yamanashi.jp +fujikawaguchiko.yamanashi.jp +fujiyoshida.yamanashi.jp +hayakawa.yamanashi.jp +hokuto.yamanashi.jp +ichikawamisato.yamanashi.jp +kai.yamanashi.jp +kofu.yamanashi.jp +koshu.yamanashi.jp +kosuge.yamanashi.jp +minami-alps.yamanashi.jp +minobu.yamanashi.jp +nakamichi.yamanashi.jp +nanbu.yamanashi.jp +narusawa.yamanashi.jp +nirasaki.yamanashi.jp +nishikatsura.yamanashi.jp +oshino.yamanashi.jp +otsuki.yamanashi.jp +showa.yamanashi.jp +tabayama.yamanashi.jp +tsuru.yamanashi.jp +uenohara.yamanashi.jp +yamanakako.yamanashi.jp +yamanashi.yamanashi.jp + +// ke : http://www.kenic.or.ke/index.php/en/ke-domains/ke-domains +ke +ac.ke +co.ke +go.ke +info.ke +me.ke +mobi.ke +ne.ke +or.ke +sc.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +com.kg +edu.kg +gov.kg +mil.kg +net.kg +org.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : https://www.iana.org/domains/root/db/ki.html +ki +biz.ki +com.ki +edu.ki +gov.ki +info.ki +net.ki +org.ki + +// km : https://www.iana.org/domains/root/db/km.html +// http://www.domaine.km/documents/charte.doc +km +ass.km +com.km +edu.km +gov.km +mil.km +nom.km +org.km +prd.km +tm.km +// These are only mentioned as proposed suggestions at domaine.km, but +// https://www.iana.org/domains/root/db/km.html says they're available for registration: +asso.km +coop.km +gouv.km +medecin.km +notaires.km +pharmaciens.km +presse.km +veterinaire.km + +// kn : https://www.iana.org/domains/root/db/kn.html +// http://www.dot.kn/domainRules.html +kn +edu.kn +gov.kn +net.kn +org.kn + +// kp : http://www.kcce.kp/en_index.php +kp +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : https://www.iana.org/domains/root/db/kr.html +// see also: https://krnic.kisa.or.kr/jsp/infoboard/law/domBylawsReg.jsp +kr +ac.kr +ai.kr +co.kr +es.kr +go.kr +hs.kr +io.kr +it.kr +kg.kr +me.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : https://www.nic.kw/policies/ +// Confirmed by registry +kw +com.kw +edu.kw +emb.kw +gov.kw +ind.kw +net.kw +org.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +com.ky +edu.ky +net.ky +org.ky + +// kz : https://www.iana.org/domains/root/db/kz.html +// see also: http://www.nic.kz/rules/index.jsp +kz +com.kz +edu.kz +gov.kz +mil.kz +net.kz +org.kz + +// la : https://www.iana.org/domains/root/db/la.html +// Submitted by registry +la +com.la +edu.la +gov.la +info.la +int.la +net.la +org.la +per.la + +// lb : https://www.iana.org/domains/root/db/lb.html +// Submitted by registry +lb +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : https://www.iana.org/domains/root/db/lc.html +// see also: http://www.nic.lc/rules.htm +lc +co.lc +com.lc +edu.lc +gov.lc +net.lc +org.lc + +// li : https://www.iana.org/domains/root/db/li.html +li + +// lk : https://www.iana.org/domains/root/db/lk.html +lk +ac.lk +assn.lk +com.lk +edu.lk +gov.lk +grp.lk +hotel.lk +int.lk +ltd.lk +net.lk +ngo.lk +org.lk +sch.lk +soc.lk +web.lk + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry +lr +com.lr +edu.lr +gov.lr +net.lr +org.lr + +// ls : http://www.nic.ls/ +// Confirmed by registry +ls +ac.ls +biz.ls +co.ls +edu.ls +gov.ls +info.ls +net.ls +org.ls +sc.ls + +// lt : https://www.iana.org/domains/root/db/lt.html +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : https://www.iana.org/domains/root/db/lv.html +lv +asn.lv +com.lv +conf.lv +edu.lv +gov.lv +id.lv +mil.lv +net.lv +org.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +edu.ly +gov.ly +id.ly +med.ly +net.ly +org.ly +plc.ly +sch.ly + +// ma : https://www.iana.org/domains/root/db/ma.html +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +ac.ma +co.ma +gov.ma +net.ma +org.ma +press.ma + +// mc : http://www.nic.mc/ +mc +asso.mc +tm.mc + +// md : https://www.iana.org/domains/root/db/md.html +md + +// me : https://www.iana.org/domains/root/db/me.html +me +ac.me +co.me +edu.me +gov.me +its.me +net.me +org.me +priv.me + +// mg : https://nic.mg +mg +co.mg +com.mg +edu.mg +gov.mg +mil.mg +nom.mg +org.mg +prd.mg + +// mh : https://www.iana.org/domains/root/db/mh.html +mh + +// mil : https://www.iana.org/domains/root/db/mil.html +mil + +// mk : https://www.iana.org/domains/root/db/mk.html +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +edu.mk +gov.mk +inf.mk +name.mk +net.mk +org.mk + +// ml : https://www.iana.org/domains/root/db/ml.html +// Confirmed by Boubacar NDIAYE 2024-12-31 +ml +ac.ml +art.ml +asso.ml +com.ml +edu.ml +gouv.ml +gov.ml +info.ml +inst.ml +net.ml +org.ml +pr.ml +presse.ml + +// mm : https://www.iana.org/domains/root/db/mm.html +*.mm + +// mn : https://www.iana.org/domains/root/db/mn.html +mn +edu.mn +gov.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +edu.mo +gov.mo +net.mo +org.mo + +// mobi : https://www.iana.org/domains/root/db/mobi.html +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : https://www.iana.org/domains/root/db/mq.html +mq + +// mr : https://www.iana.org/domains/root/db/mr.html +mr +gov.mr + +// ms : https://www.iana.org/domains/root/db/ms.html +ms +com.ms +edu.ms +gov.ms +net.ms +org.ms + +// mt : https://www.nic.org.mt/go/policy +// Submitted by registry +mt +com.mt +edu.mt +net.mt +org.mt + +// mu : https://www.iana.org/domains/root/db/mu.html +mu +ac.mu +co.mu +com.mu +gov.mu +net.mu +or.mu +org.mu + +// museum : https://welcome.museum/wp-content/uploads/2018/05/20180525-Registration-Policy-MUSEUM-EN_VF-2.pdf https://welcome.museum/buy-your-dot-museum-2/ +museum + +// mv : https://www.iana.org/domains/root/db/mv.html +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry +mx +com.mx +edu.mx +gob.mx +net.mx +org.mx + +// my : http://www.mynic.my/ +// Available strings: https://mynic.my/resources/domains/buying-a-domain/ +my +biz.my +com.my +edu.my +gov.my +mil.my +name.my +net.my +org.my + +// mz : http://www.uem.mz/ +// Submitted by registry +mz +ac.mz +adv.mz +co.mz +edu.mz +gov.mz +mil.mz +net.mz +org.mz + +// na : http://www.na-nic.com.na/ +na +alt.na +co.na +com.na +gov.na +net.na +org.na + +// name : http://www.nic.name/ +// Regarding 2LDs: https://github.com/publicsuffix/list/issues/2306 +name + +// nc : http://www.cctld.nc/ +nc +asso.nc +nom.nc + +// ne : https://www.iana.org/domains/root/db/ne.html +ne + +// net : https://www.iana.org/domains/root/db/net.html +net + +// nf : https://www.iana.org/domains/root/db/nf.html +nf +arts.nf +com.nf +firm.nf +info.nf +net.nf +other.nf +per.nf +rec.nf +store.nf +web.nf + +// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds +ng +com.ng +edu.ng +gov.ng +i.ng +mil.ng +mobi.ng +name.ng +net.ng +org.ng +sch.ng + +// ni : http://www.nic.ni/ +ni +ac.ni +biz.ni +co.ni +com.ni +edu.ni +gob.ni +in.ni +info.ni +int.ni +mil.ni +net.ni +nom.ni +org.ni +web.ni + +// nl : https://www.iana.org/domains/root/db/nl.html +// https://www.sidn.nl/ +nl + +// no : https://www.norid.no/en/om-domenenavn/regelverk-for-no/ +// Norid geographical second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-b/ +// Norid category second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-c/ +// Norid category second-level domains managed by parties other than Norid : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-d/ +// RSS feed: https://teknisk.norid.no/en/feed/ +no +// Norid category second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-c/ +fhs.no +folkebibl.no +fylkesbibl.no +idrett.no +museum.no +priv.no +vgs.no +// Norid category second-level domains managed by parties other than Norid : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-d/ +dep.no +herad.no +kommune.no +mil.no +stat.no +// Norid geographical second level domains : https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-b/ +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +åkrehamn.no +algard.no +ålgård.no +arna.no +bronnoysund.no +brønnøysund.no +brumunddal.no +bryne.no +drobak.no +drøbak.no +egersund.no +fetsund.no +floro.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +hønefoss.no +jessheim.no +jorpeland.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +langevåg.no +leirvik.no +mjondalen.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +osøyro.no +raholt.no +råholt.no +sandnessjoen.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +aarborte.no +aejrie.no +afjord.no +åfjord.no +agdenes.no +nes.akershus.no +aknoluokta.no +ákŋoluokta.no +al.no +ål.no +alaheadju.no +álaheadju.no +alesund.no +ålesund.no +alstahaug.no +alta.no +áltá.no +alvdal.no +amli.no +åmli.no +amot.no +åmot.no +andasuolo.no +andebu.no +andoy.no +andøy.no +ardal.no +årdal.no +aremark.no +arendal.no +ås.no +aseral.no +åseral.no +asker.no +askim.no +askoy.no +askøy.no +askvoll.no +asnes.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +averøy.no +badaddja.no +bådåddjå.no +bærum.no +bahcavuotna.no +báhcavuotna.no +bahccavuotna.no +báhccavuotna.no +baidar.no +báidár.no +bajddar.no +bájddar.no +balat.no +bálát.no +balestrand.no +ballangen.no +balsfjord.no +bamble.no +bardu.no +barum.no +batsfjord.no +båtsfjord.no +bearalvahki.no +bearalváhki.no +beardu.no +beiarn.no +berg.no +bergen.no +berlevag.no +berlevåg.no +bievat.no +bievát.no +bindal.no +birkenes.no +bjarkoy.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +bodø.no +bokn.no +bomlo.no +bømlo.no +bremanger.no +bronnoy.no +brønnøy.no +budejju.no +nes.buskerud.no +bygland.no +bykle.no +cahcesuolo.no +čáhcesuolo.no +davvenjarga.no +davvenjárga.no +davvesiida.no +deatnu.no +dielddanuorri.no +divtasvuodna.no +divttasvuotna.no +donna.no +dønna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +dyrøy.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenassi.no +evenášši.no +evenes.no +evje-og-hornnes.no +farsund.no +fauske.no +fedje.no +fet.no +finnoy.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +fla.no +flå.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +folldal.no +forde.no +førde.no +forsand.no +fosnes.no +fræna.no +frana.no +frei.no +frogn.no +froland.no +frosta.no +froya.no +frøya.no +fuoisku.no +fuossko.no +fusa.no +fyresdal.no +gaivuotna.no +gáivuotna.no +galsa.no +gálsá.no +gamvik.no +gangaviika.no +gáŋgaviika.no +gaular.no +gausdal.no +giehtavuoatna.no +gildeskal.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +grue.no +gulen.no +guovdageaidnu.no +ha.no +hå.no +habmer.no +hábmer.no +hadsel.no +hægebostad.no +hagebostad.no +halden.no +halsa.no +hamar.no +hamaroy.no +hammarfeasta.no +hámmárfeasta.no +hammerfest.no +hapmir.no +hápmir.no +haram.no +hareid.no +harstad.no +hasvik.no +hattfjelldal.no +haugesund.no +os.hedmark.no +valer.hedmark.no +våler.hedmark.no +hemne.no +hemnes.no +hemsedal.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +holtålen.no +os.hordaland.no +hornindal.no +horten.no +hoyanger.no +høyanger.no +hoylandet.no +høylandet.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +ibestad.no +inderoy.no +inderøy.no +iveland.no +ivgu.no +jevnaker.no +jolster.no +jølster.no +jondal.no +kafjord.no +kåfjord.no +karasjohka.no +kárášjohka.no +karasjok.no +karlsoy.no +karmoy.no +karmøy.no +kautokeino.no +klabu.no +klæbu.no +klepp.no +kongsberg.no +kongsvinger.no +kraanghke.no +kråanghke.no +kragero.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +krødsherad.no +kvæfjord.no +kvænangen.no +kvafjord.no +kvalsund.no +kvam.no +kvanangen.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +kvitsøy.no +laakesvuemie.no +lærdal.no +lahppi.no +láhppi.no +lardal.no +larvik.no +lavagis.no +lavangen.no +leangaviika.no +leaŋgaviika.no +lebesby.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +lerdal.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindas.no +lindås.no +lindesnes.no +loabat.no +loabát.no +lodingen.no +lødingen.no +lom.no +loppa.no +lorenskog.no +lørenskog.no +loten.no +løten.no +lund.no +lunner.no +luroy.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +malatvuopmi.no +málatvuopmi.no +malselv.no +målselv.no +malvik.no +mandal.no +marker.no +marnardal.no +masfjorden.no +masoy.no +måsøy.no +matta-varjjat.no +mátta-várjjat.no +meland.no +meldal.no +melhus.no +meloy.no +meløy.no +meraker.no +meråker.no +midsund.no +midtre-gauldal.no +moareke.no +moåreke.no +modalen.no +modum.no +molde.no +heroy.more-og-romsdal.no +sande.more-og-romsdal.no +herøy.møre-og-romsdal.no +sande.møre-og-romsdal.no +moskenes.no +moss.no +mosvik.no +muosat.no +muosát.no +naamesjevuemie.no +nååmesjevuemie.no +nærøy.no +namdalseid.no +namsos.no +namsskogan.no +nannestad.no +naroy.no +narviika.no +narvik.no +naustdal.no +navuotna.no +návuotna.no +nedre-eiker.no +nesna.no +nesodden.no +nesseby.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +bo.nordland.no +bø.nordland.no +heroy.nordland.no +herøy.nordland.no +nordre-land.no +nordreisa.no +nore-og-uvdal.no +notodden.no +notteroy.no +nøtterøy.no +odda.no +oksnes.no +øksnes.no +omasvuotna.no +oppdal.no +oppegard.no +oppegård.no +orkdal.no +orland.no +ørland.no +orskog.no +ørskog.no +orsta.no +ørsta.no +osen.no +osteroy.no +osterøy.no +valer.ostfold.no +våler.østfold.no +ostre-toten.no +østre-toten.no +overhalla.no +ovre-eiker.no +øvre-eiker.no +oyer.no +øyer.no +oygarden.no +øygarden.no +oystre-slidre.no +øystre-slidre.no +porsanger.no +porsangu.no +porsáŋgu.no +porsgrunn.no +rade.no +råde.no +radoy.no +radøy.no +rælingen.no +rahkkeravju.no +ráhkkerávju.no +raisa.no +ráisa.no +rakkestad.no +ralingen.no +rana.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +risor.no +risør.no +rissa.no +roan.no +rodoy.no +rødøy.no +rollag.no +romsa.no +romskog.no +rømskog.no +roros.no +røros.no +rost.no +røst.no +royken.no +røyken.no +royrvik.no +røyrvik.no +ruovat.no +rygge.no +salangen.no +salat.no +sálat.no +sálát.no +saltdal.no +samnanger.no +sandefjord.no +sandnes.no +sandoy.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +siellak.no +sigdal.no +siljan.no +sirdal.no +skanit.no +skánit.no +skanland.no +skånland.no +skaun.no +skedsmo.no +ski.no +skien.no +skierva.no +skiervá.no +skiptvet.no +skjak.no +skjåk.no +skjervoy.no +skjervøy.no +skodje.no +smola.no +smøla.no +snaase.no +snåase.no +snasa.no +snåsa.no +snillfjord.no +snoasa.no +sogndal.no +sogne.no +søgne.no +sokndal.no +sola.no +solund.no +somna.no +sømna.no +sondre-land.no +søndre-land.no +songdalen.no +sor-aurdal.no +sør-aurdal.no +sor-fron.no +sør-fron.no +sor-odal.no +sør-odal.no +sor-varanger.no +sør-varanger.no +sorfold.no +sørfold.no +sorreisa.no +sørreisa.no +sortland.no +sorum.no +sørum.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +tana.no +bo.telemark.no +bø.telemark.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +tjome.no +tjøme.no +tokke.no +tolga.no +tonsberg.no +tønsberg.no +torsken.no +træna.no +trana.no +tranoy.no +tranøy.no +troandin.no +trogstad.no +trøgstad.no +tromsa.no +tromso.no +tromsø.no +trondheim.no +trysil.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +tysnes.no +tysvær.no +tysvar.no +ullensaker.no +ullensvang.no +ulvik.no +unjarga.no +unjárga.no +utsira.no +vaapste.no +vadso.no +vadsø.no +værøy.no +vaga.no +vågå.no +vagan.no +vågan.no +vagsoy.no +vågsøy.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +vardø.no +varggat.no +várggát.no +varoy.no +vefsn.no +vega.no +vegarshei.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +sande.vestfold.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +voagat.no +volda.no +voss.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Submitted by registry +nr +biz.nr +com.nr +edu.nr +gov.nr +info.nr +net.nr +org.nr + +// nu : https://www.iana.org/domains/root/db/nu.html +nu + +// nz : https://www.iana.org/domains/root/db/nz.html +// Submitted by registry +nz +ac.nz +co.nz +cri.nz +geek.nz +gen.nz +govt.nz +health.nz +iwi.nz +kiwi.nz +maori.nz +māori.nz +mil.nz +net.nz +org.nz +parliament.nz +school.nz + +// om : https://www.iana.org/domains/root/db/om.html +om +co.om +com.om +edu.om +gov.om +med.om +museum.om +net.om +org.om +pro.om + +// onion : https://tools.ietf.org/html/rfc7686 +onion + +// org : https://www.iana.org/domains/root/db/org.html +org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +abo.pa +ac.pa +com.pa +edu.pa +gob.pa +ing.pa +med.pa +net.pa +nom.pa +org.pa +sld.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +com.pe +edu.pe +gob.pe +mil.pe +net.pe +nom.pe +org.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +edu.pf +org.pf + +// pg : https://www.iana.org/domains/root/db/pg.html +*.pg + +// ph : https://www.iana.org/domains/root/db/ph.html +// Submitted by registry +ph +com.ph +edu.ph +gov.ph +i.ph +mil.ph +net.ph +ngo.ph +org.ph + +// pk : https://pk5.pknic.net.pk/pk5/msgNamepk.PK +// Contact Email: staff@pknic.net.pk +pk +ac.pk +biz.pk +com.pk +edu.pk +fam.pk +gkp.pk +gob.pk +gog.pk +gok.pk +gop.pk +gos.pk +gov.pk +net.pk +org.pk +web.pk + +// pl : https://www.dns.pl/en/ +// Confirmed by registry 2024-11-18 +pl +com.pl +net.pl +org.pl +// pl functional domains : https://www.dns.pl/en/list_of_functional_domain_names +agro.pl +aid.pl +atm.pl +auto.pl +biz.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +media.pl +miasta.pl +mil.pl +nieruchomosci.pl +nom.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// Government domains : https://www.dns.pl/informacje_o_rejestracji_domen_gov_pl +// In accordance with the .gov.pl Domain Name Regulations : https://www.dns.pl/regulamin_gov_pl +gov.pl +ap.gov.pl +griw.gov.pl +ic.gov.pl +is.gov.pl +kmpsp.gov.pl +konsulat.gov.pl +kppsp.gov.pl +kwp.gov.pl +kwpsp.gov.pl +mup.gov.pl +mw.gov.pl +oia.gov.pl +oirm.gov.pl +oke.gov.pl +oow.gov.pl +oschr.gov.pl +oum.gov.pl +pa.gov.pl +pinb.gov.pl +piw.gov.pl +po.gov.pl +pr.gov.pl +psp.gov.pl +psse.gov.pl +pup.gov.pl +rzgw.gov.pl +sa.gov.pl +sdn.gov.pl +sko.gov.pl +so.gov.pl +sr.gov.pl +starostwo.gov.pl +ug.gov.pl +ugim.gov.pl +um.gov.pl +umig.gov.pl +upow.gov.pl +uppo.gov.pl +us.gov.pl +uw.gov.pl +uzs.gov.pl +wif.gov.pl +wiih.gov.pl +winb.gov.pl +wios.gov.pl +witd.gov.pl +wiw.gov.pl +wkz.gov.pl +wsa.gov.pl +wskr.gov.pl +wsse.gov.pl +wuoz.gov.pl +wzmiuw.gov.pl +zp.gov.pl +zpisdn.gov.pl +// pl regional domains : https://www.dns.pl/en/list_of_regional_domain_names +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kazimierz-dolny.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorskie.pl +pomorze.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +skoczow.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl + +// pm : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf +pm + +// pn : https://www.iana.org/domains/root/db/pn.html +pn +co.pn +edu.pn +gov.pn +net.pn +org.pn + +// post : https://www.iana.org/domains/root/db/post.html +post + +// pr : http://www.nic.pr/index.asp?f=1 +pr +biz.pr +com.pr +edu.pr +gov.pr +info.pr +isla.pr +name.pr +net.pr +org.pr +pro.pr +// these aren't mentioned on nic.pr, but on https://www.iana.org/domains/root/db/pr.html +ac.pr +est.pr +prof.pr + +// pro : http://registry.pro/get-pro +pro +aaa.pro +aca.pro +acct.pro +avocat.pro +bar.pro +cpa.pro +eng.pro +jur.pro +law.pro +med.pro +recht.pro + +// ps : https://www.iana.org/domains/root/db/ps.html +// http://www.nic.ps/registration/policy.html#reg +ps +com.ps +edu.ps +gov.ps +net.ps +org.ps +plo.ps +sec.ps + +// pt : https://www.dns.pt/en/domain/pt-terms-and-conditions-registration-rules/ +pt +com.pt +edu.pt +gov.pt +int.pt +net.pt +nome.pt +org.pt +publ.pt + +// pw : https://www.iana.org/domains/root/db/pw.html +// Confirmed by registry in private correspondence with @dnsguru 2024-12-09 +pw +gov.pw + +// py : https://www.iana.org/domains/root/db/py.html +// Submitted by registry +py +com.py +coop.py +edu.py +gov.py +mil.py +net.py +org.py + +// qa : http://domains.qa/en/ +qa +com.qa +edu.qa +gov.qa +mil.qa +name.qa +net.qa +org.qa +sch.qa + +// re : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf +// Confirmed by registry 2024-11-18 +re +// Closed for registration on 2013-03-15 but domains are still maintained +asso.re +com.re + +// ro : http://www.rotld.ro/ +ro +arts.ro +com.ro +firm.ro +info.ro +nom.ro +nt.ro +org.ro +rec.ro +store.ro +tm.ro +www.ro + +// rs : https://www.rnids.rs/en/domains/national-domains +rs +ac.rs +co.rs +edu.rs +gov.rs +in.rs +org.rs + +// ru : https://cctld.ru/files/pdf/docs/en/rules_ru-rf.pdf +// Submitted by George Georgievsky +ru + +// rw : https://www.iana.org/domains/root/db/rw.html +rw +ac.rw +co.rw +coop.rw +gov.rw +mil.rw +net.rw +org.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +edu.sa +gov.sa +med.sa +net.sa +org.sa +pub.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +edu.sc +gov.sc +net.sc +org.sc + +// sd : https://www.iana.org/domains/root/db/sd.html +// Submitted by registry +sd +com.sd +edu.sd +gov.sd +info.sd +med.sd +net.sd +org.sd +tv.sd + +// se : https://www.iana.org/domains/root/db/se.html +// https://data.internetstiftelsen.se/barred_domains_list.txt -> Second level domains & Sub-domains +// Confirmed by Registry Services 2024-11-20 +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : https://www.sgnic.sg/domain-registration/sg-categories-rules +// Confirmed by registry 2024-11-19 +sg +com.sg +edu.sg +gov.sg +net.sg +org.sg + +// sh : http://nic.sh/rules.htm +sh +com.sh +gov.sh +mil.sh +net.sh +org.sh + +// si : https://www.iana.org/domains/root/db/si.html +si + +// sj : No registrations at this time. +// Submitted by registry +sj + +// sk : https://www.iana.org/domains/root/db/sk.html +sk + +// sl : http://www.nic.sl +// Submitted by registry +sl +com.sl +edu.sl +gov.sl +net.sl +org.sl + +// sm : https://www.iana.org/domains/root/db/sm.html +sm + +// sn : https://www.iana.org/domains/root/db/sn.html +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://sonic.so/policies/ +so +com.so +edu.so +gov.so +me.so +net.so +org.so + +// sr : https://www.iana.org/domains/root/db/sr.html +sr + +// ss : https://registry.nic.ss/ +// Submitted by registry +ss +biz.ss +co.ss +com.ss +edu.ss +gov.ss +me.ss +net.ss +org.ss +sch.ss + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : https://www.iana.org/domains/root/db/su.html +su + +// sv : https://www.iana.org/domains/root/db/sv.html +sv +com.sv +edu.sv +gob.sv +org.sv +red.sv + +// sx : https://www.iana.org/domains/root/db/sx.html +// Submitted by registry +sx +gov.sx + +// sy : https://www.iana.org/domains/root/db/sy.html +sy +com.sy +edu.sy +gov.sy +mil.sy +net.sy +org.sy + +// sz : https://www.iana.org/domains/root/db/sz.html +// http://www.sispa.org.sz/ +sz +ac.sz +co.sz +org.sz + +// tc : https://www.iana.org/domains/root/db/tc.html +tc + +// td : https://www.iana.org/domains/root/db/td.html +td + +// tel : https://www.iana.org/domains/root/db/tel.html +// http://www.telnic.org/ +tel + +// tf : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf +tf + +// tg : https://www.iana.org/domains/root/db/tg.html +// http://www.nic.tg/ +tg + +// th : https://www.iana.org/domains/root/db/th.html +// Submitted by registry +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.html +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : https://www.iana.org/domains/root/db/tk.html +tk + +// tl : https://www.iana.org/domains/root/db/tl.html +tl +gov.tl + +// tm : https://www.nic.tm/local.html +// Confirmed by registry 2024-11-19 +tm +co.tm +com.tm +edu.tm +gov.tm +mil.tm +net.tm +nom.tm +org.tm + +// tn : http://www.registre.tn/fr/ +// https://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +info.tn +intl.tn +mincom.tn +nat.tn +net.tn +org.tn +perso.tn +tourism.tn + +// to : https://www.iana.org/domains/root/db/to.html +// Submitted by registry +to +com.to +edu.to +gov.to +mil.to +net.to +org.to + +// tr : https://nic.tr/ +// https://nic.tr/forms/eng/policies.pdf +// https://nic.tr/index.php?USRACTN=PRICELST +tr +av.tr +bbs.tr +bel.tr +biz.tr +com.tr +dr.tr +edu.tr +gen.tr +gov.tr +info.tr +k12.tr +kep.tr +mil.tr +name.tr +net.tr +org.tr +pol.tr +tel.tr +tsk.tr +tv.tr +web.tr +// Used by Northern Cyprus +nc.tr +// Used by government agencies of Northern Cyprus +gov.nc.tr + +// tt : https://www.nic.tt/ +// Confirmed by registry 2024-11-19 +tt +biz.tt +co.tt +com.tt +edu.tt +gov.tt +info.tt +mil.tt +name.tt +net.tt +org.tt +pro.tt + +// tv : https://www.iana.org/domains/root/db/tv.html +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : https://www.iana.org/domains/root/db/tw.html +// https://twnic.tw/dnservice_catag.php +// Confirmed by registry 2024-11-26 +tw +club.tw +com.tw +ebiz.tw +edu.tw +game.tw +gov.tw +idv.tw +mil.tw +net.tw +org.tw + +// tz : http://www.tznic.or.tz/index.php/domains +// Submitted by registry +tz +ac.tz +co.tz +go.tz +hotel.tz +info.tz +me.tz +mil.tz +mobi.tz +ne.tz +or.tz +sc.tz +tv.tz + +// ua : https://hostmaster.ua/policy/?ua +// Submitted by registry +ua +// ua 2LD +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geographic names +// https://hostmaster.ua/2ld/ +cherkassy.ua +cherkasy.ua +chernigov.ua +chernihiv.ua +chernivtsi.ua +chernovtsy.ua +ck.ua +cn.ua +cr.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +dnipropetrovsk.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkiv.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +khmelnytskyi.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +kropyvnytskyi.ua +krym.ua +ks.ua +kv.ua +kyiv.ua +lg.ua +lt.ua +lugansk.ua +luhansk.ua +lutsk.ua +lv.ua +lviv.ua +mk.ua +mykolaiv.ua +nikolaev.ua +od.ua +odesa.ua +odessa.ua +pl.ua +poltava.ua +rivne.ua +rovno.ua +rv.ua +sb.ua +sebastopol.ua +sevastopol.ua +sm.ua +sumy.ua +te.ua +ternopil.ua +uz.ua +uzhgorod.ua +uzhhorod.ua +vinnica.ua +vinnytsia.ua +vn.ua +volyn.ua +yalta.ua +zakarpattia.ua +zaporizhzhe.ua +zaporizhzhia.ua +zhitomir.ua +zhytomyr.ua +zp.ua +zt.ua + +// ug : https://www.registry.co.ug/ +// https://www.registry.co.ug, https://whois.co.ug +// Confirmed by registry 2025-01-20 +ug +ac.ug +co.ug +com.ug +edu.ug +go.ug +gov.ug +mil.ug +ne.ug +or.ug +org.ug +sc.ug +us.ug + +// uk : https://www.iana.org/domains/root/db/uk.html +// Submitted by registry +uk +ac.uk +co.uk +gov.uk +ltd.uk +me.uk +net.uk +nhs.uk +org.uk +plc.uk +police.uk +*.sch.uk + +// us : https://www.iana.org/domains/root/db/us.html +// Confirmed via the .us zone file by William Harrison 2024-12-10 +us +dni.us +isa.us +nsn.us +// Geographic Names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +va.us +vi.us +vt.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us - Bug 614565 - Hawaii has a state-wide DOE login +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +// k12.nd.us - Bug 1028347 - Removed at request of Travis Rosso +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +// k12.ri.us - Removed at request of Kim Cournoyer +k12.sc.us +// k12.sd.us - Bug 934131 - Removed at request of James Booze +k12.tn.us +k12.tx.us +k12.ut.us +k12.va.us +k12.vi.us +k12.vt.us +k12.wa.us +k12.wi.us +// k12.wv.us - Bug 947705 - Removed at request of Verne Britton +cc.ak.us +lib.ak.us +cc.al.us +lib.al.us +cc.ar.us +lib.ar.us +cc.as.us +lib.as.us +cc.az.us +lib.az.us +cc.ca.us +lib.ca.us +cc.co.us +lib.co.us +cc.ct.us +lib.ct.us +cc.dc.us +lib.dc.us +cc.de.us +cc.fl.us +lib.fl.us +cc.ga.us +lib.ga.us +cc.gu.us +lib.gu.us +cc.hi.us +lib.hi.us +cc.ia.us +lib.ia.us +cc.id.us +lib.id.us +cc.il.us +lib.il.us +cc.in.us +lib.in.us +cc.ks.us +lib.ks.us +cc.ky.us +lib.ky.us +cc.la.us +lib.la.us +cc.ma.us +lib.ma.us +cc.md.us +lib.md.us +cc.me.us +lib.me.us +cc.mi.us +lib.mi.us +cc.mn.us +lib.mn.us +cc.mo.us +lib.mo.us +cc.ms.us +cc.mt.us +lib.mt.us +cc.nc.us +lib.nc.us +cc.nd.us +lib.nd.us +cc.ne.us +lib.ne.us +cc.nh.us +lib.nh.us +cc.nj.us +lib.nj.us +cc.nm.us +lib.nm.us +cc.nv.us +lib.nv.us +cc.ny.us +lib.ny.us +cc.oh.us +lib.oh.us +cc.ok.us +lib.ok.us +cc.or.us +lib.or.us +cc.pa.us +lib.pa.us +cc.pr.us +lib.pr.us +cc.ri.us +lib.ri.us +cc.sc.us +lib.sc.us +cc.sd.us +lib.sd.us +cc.tn.us +lib.tn.us +cc.tx.us +lib.tx.us +cc.ut.us +lib.ut.us +cc.va.us +lib.va.us +cc.vi.us +lib.vi.us +cc.vt.us +lib.vt.us +cc.wa.us +lib.wa.us +cc.wi.us +lib.wi.us +cc.wv.us +cc.wy.us +k12.wy.us +// lib.wv.us - Bug 941670 - Removed at request of Larry W Arnold +lib.wy.us +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed independently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated directly to the +// 5LD operators. +chtr.k12.ma.us +paroch.k12.ma.us +pvt.k12.ma.us +// Merit Network, Inc. maintains the registry for =~ /(k12|cc|lib).mi.us/ and the following +// see also: https://domreg.merit.edu : domreg@merit.edu +// see also: whois -h whois.domreg.merit.edu help +ann-arbor.mi.us +cog.mi.us +dst.mi.us +eaton.mi.us +gen.mi.us +mus.mi.us +tec.mi.us +washtenaw.mi.us + +// uy : http://www.nic.org.uy/ +uy +com.uy +edu.uy +gub.uy +mil.uy +net.uy +org.uy + +// uz : http://www.reg.uz/ +uz +co.uz +com.uz +net.uz +org.uz + +// va : https://www.iana.org/domains/root/db/va.html +va + +// vc : https://www.iana.org/domains/root/db/vc.html +// Submitted by registry +vc +com.vc +edu.vc +gov.vc +mil.vc +net.vc +org.vc + +// ve : https://registro.nic.ve/ +// Submitted by registry nic@nic.ve and nicve@conatel.gob.ve +ve +arts.ve +bib.ve +co.ve +com.ve +e12.ve +edu.ve +emprende.ve +firm.ve +gob.ve +gov.ve +info.ve +int.ve +mil.ve +net.ve +nom.ve +org.ve +rar.ve +rec.ve +store.ve +tec.ve +web.ve + +// vg : https://www.iana.org/domains/root/db/vg.html +// Confirmed by registry 2025-01-10 +vg +edu.vg + +// vi : https://www.iana.org/domains/root/db/vi.html +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.vnnic.vn/en/domain/cctld-vn +// https://vnnic.vn/sites/default/files/tailieu/vn.cctld.domains.txt +vn +ac.vn +ai.vn +biz.vn +com.vn +edu.vn +gov.vn +health.vn +id.vn +info.vn +int.vn +io.vn +name.vn +net.vn +org.vn +pro.vn + +// vn geographical names +angiang.vn +bacgiang.vn +backan.vn +baclieu.vn +bacninh.vn +baria-vungtau.vn +bentre.vn +binhdinh.vn +binhduong.vn +binhphuoc.vn +binhthuan.vn +camau.vn +cantho.vn +caobang.vn +daklak.vn +daknong.vn +danang.vn +dienbien.vn +dongnai.vn +dongthap.vn +gialai.vn +hagiang.vn +haiduong.vn +haiphong.vn +hanam.vn +hanoi.vn +hatinh.vn +haugiang.vn +hoabinh.vn +hungyen.vn +khanhhoa.vn +kiengiang.vn +kontum.vn +laichau.vn +lamdong.vn +langson.vn +laocai.vn +longan.vn +namdinh.vn +nghean.vn +ninhbinh.vn +ninhthuan.vn +phutho.vn +phuyen.vn +quangbinh.vn +quangnam.vn +quangngai.vn +quangninh.vn +quangtri.vn +soctrang.vn +sonla.vn +tayninh.vn +thaibinh.vn +thainguyen.vn +thanhhoa.vn +thanhphohochiminh.vn +thuathienhue.vn +tiengiang.vn +travinh.vn +tuyenquang.vn +vinhlong.vn +vinhphuc.vn +yenbai.vn + +// vu : https://www.iana.org/domains/root/db/vu.html +// http://www.vunic.vu/ +vu +com.vu +edu.vu +net.vu +org.vu + +// wf : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf +wf + +// ws : https://www.iana.org/domains/root/db/ws.html +// http://samoanic.ws/index.dhtml +ws +com.ws +edu.ws +gov.ws +net.ws +org.ws + +// yt : https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf +yt + +// IDN ccTLDs +// When submitting patches, please maintain a sort by ISO 3166 ccTLD, then +// U-label, and follow this format: +// // A-Label ("", [, variant info]) : +// // [sponsoring org] +// U-Label + +// xn--mgbaam7a8h ("Emerat", Arabic) : AE +// http://nic.ae/english/arabicdomain/rules.jsp +امارات + +// xn--y9a3aq ("hye", Armenian) : AM +// ISOC AM (operated by .am Registry) +հայ + +// xn--54b7fta0cc ("Bangla", Bangla) : BD +বাংলা + +// xn--90ae ("bg", Bulgarian) : BG +бг + +// xn--mgbcpq6gpa1a ("albahrain", Arabic) : BH +البحرين + +// xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY +// Operated by .by registry +бел + +// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN +// CNNIC +// https://www.cnnic.cn/11/192/index.html +中国 + +// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN +// CNNIC +// https://www.cnnic.com.cn/AU/MediaC/Announcement/201609/t20160905_54470.htm +中國 + +// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ +الجزائر + +// xn--wgbh1c ("Egypt/Masr", Arabic) : EG +// http://www.dotmasr.eg/ +مصر + +// xn--e1a4c ("eu", Cyrillic) : EU +// https://eurid.eu +ею + +// xn--qxa6a ("eu", Greek) : EU +// https://eurid.eu +ευ + +// xn--mgbah1a3hjkrd ("Mauritania", Arabic) : MR +موريتانيا + +// xn--node ("ge", Georgian Mkhedruli) : GE +გე + +// xn--qxam ("el", Greek) : GR +// Hellenic Ministry of Infrastructure, Transport, and Networks +ελ + +// xn--j6w193g ("Hong Kong", Chinese) : HK +// https://www.hkirc.hk +// Submitted by registry +// https://www.hkirc.hk/content.jsp?id=30#!/34 +香港 +個人.香港 +公司.香港 +政府.香港 +教育.香港 +組織.香港 +網絡.香港 + +// xn--2scrj9c ("Bharat", Kannada) : IN +// India +ಭಾರತ + +// xn--3hcrj9c ("Bharat", Oriya) : IN +// India +ଭାରତ + +// xn--45br5cyl ("Bharatam", Assamese) : IN +// India +ভাৰত + +// xn--h2breg3eve ("Bharatam", Sanskrit) : IN +// India +भारतम् + +// xn--h2brj9c8c ("Bharot", Santali) : IN +// India +भारोत + +// xn--mgbgu82a ("Bharat", Sindhi) : IN +// India +ڀارت + +// xn--rvc1e0am3e ("Bharatam", Malayalam) : IN +// India +ഭാരതം + +// xn--h2brj9c ("Bharat", Devanagari) : IN +// India +भारत + +// xn--mgbbh1a ("Bharat", Kashmiri) : IN +// India +بارت + +// xn--mgbbh1a71e ("Bharat", Arabic) : IN +// India +بھارت + +// xn--fpcrj9c3d ("Bharat", Telugu) : IN +// India +భారత్ + +// xn--gecrj9c ("Bharat", Gujarati) : IN +// India +ભારત + +// xn--s9brj9c ("Bharat", Gurmukhi) : IN +// India +ਭਾਰਤ + +// xn--45brj9c ("Bharat", Bengali) : IN +// India +ভারত + +// xn--xkc2dl3a5ee0h ("India", Tamil) : IN +// India +இந்தியா + +// xn--mgba3a4f16a ("Iran", Persian) : IR +ایران + +// xn--mgba3a4fra ("Iran", Arabic) : IR +ايران + +// xn--mgbtx2b ("Iraq", Arabic) : IQ +// Communications and Media Commission +عراق + +// xn--mgbayh7gpa ("al-Ordon", Arabic) : JO +// National Information Technology Center (NITC) +// Royal Scientific Society, Al-Jubeiha +الاردن + +// xn--3e0b707e ("Republic of Korea", Hangul) : KR +한국 + +// xn--80ao21a ("Kaz", Kazakh) : KZ +қаз + +// xn--q7ce6a ("Lao", Lao) : LA +ລາວ + +// xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK +// https://nic.lk +ලංකා + +// xn--xkc2al3hye2a ("Ilangai", Tamil) : LK +// https://nic.lk +இலங்கை + +// xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA +المغرب + +// xn--d1alf ("mkd", Macedonian) : MK +// MARnet +мкд + +// xn--l1acc ("mon", Mongolian) : MN +мон + +// xn--mix891f ("Macao", Chinese, Traditional) : MO +// MONIC / HNET Asia (Registry Operator for .mo) +澳門 + +// xn--mix082f ("Macao", Chinese, Simplified) : MO +澳门 + +// xn--mgbx4cd0ab ("Malaysia", Malay) : MY +مليسيا + +// xn--mgb9awbf ("Oman", Arabic) : OM +عمان + +// xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK +پاکستان + +// xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK +پاكستان + +// xn--ygbi2ammx ("Falasteen", Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +فلسطين + +// xn--90a3ac ("srb", Cyrillic) : RS +// https://www.rnids.rs/en/domains/national-domains +срб +ак.срб +обр.срб +од.срб +орг.срб +пр.срб +упр.срб + +// xn--p1ai ("rf", Russian-Cyrillic) : RU +// https://cctld.ru/files/pdf/docs/en/rules_ru-rf.pdf +// Submitted by George Georgievsky +рф + +// xn--wgbl6a ("Qatar", Arabic) : QA +// http://www.ict.gov.qa/ +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA +// http://www.nic.net.sa/ +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant): SA +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA +السعوديه + +// xn--mgbpl2fh ("sudan", Arabic) : SD +// Operated by .sd registry +سودان + +// xn--yfro4i67o Singapore ("Singapore", Chinese) : SG +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG +சிங்கப்பூர் + +// xn--ogbpf8fl ("Syria", Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria", Arabic, variant) : SY +سوريا + +// xn--o3cw4h ("Thai", Thai) : TH +// http://www.thnic.co.th +ไทย +ทหาร.ไทย +ธุรกิจ.ไทย +เน็ต.ไทย +รัฐบาล.ไทย +ศึกษา.ไทย +องค์กร.ไทย + +// xn--pgbs0dh ("Tunisia", Arabic) : TN +// http://nic.tn +تونس + +// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW +// https://twnic.tw/dnservice_catag.php +台灣 + +// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台湾 + +// xn--nnx388a ("Taiwan", Chinese, variant) : TW +臺灣 + +// xn--j1amh ("ukr", Cyrillic) : UA +укр + +// xn--mgb2ddes ("AlYemen", Arabic) : YE +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +ye +com.ye +edu.ye +gov.ye +mil.ye +net.ye +org.ye + +// za : https://www.iana.org/domains/root/db/za.html +ac.za +agric.za +alt.za +co.za +edu.za +gov.za +grondar.za +law.za +mil.za +net.za +ngo.za +nic.za +nis.za +nom.za +org.za +school.za +tm.za +web.za + +// zm : https://zicta.zm/ +// Submitted by registry +zm +ac.zm +biz.zm +co.zm +com.zm +edu.zm +gov.zm +info.zm +mil.zm +net.zm +org.zm +sch.zm + +// zw : https://www.potraz.gov.zw/ +// Confirmed by registry 2017-01-25 +zw +ac.zw +co.zw +gov.zw +mil.zw +org.zw + +// newGTLDs + +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2025-10-01T15:18:26Z +// This list is auto-generated, don't edit it manually. +// aaa : American Automobile Association, Inc. +// https://www.iana.org/domains/root/db/aaa.html +aaa + +// aarp : AARP +// https://www.iana.org/domains/root/db/aarp.html +aarp + +// abb : ABB Ltd +// https://www.iana.org/domains/root/db/abb.html +abb + +// abbott : Abbott Laboratories, Inc. +// https://www.iana.org/domains/root/db/abbott.html +abbott + +// abbvie : AbbVie Inc. +// https://www.iana.org/domains/root/db/abbvie.html +abbvie + +// abc : Disney Enterprises, Inc. +// https://www.iana.org/domains/root/db/abc.html +abc + +// able : Able Inc. +// https://www.iana.org/domains/root/db/able.html +able + +// abogado : Registry Services, LLC +// https://www.iana.org/domains/root/db/abogado.html +abogado + +// abudhabi : Abu Dhabi Systems and Information Centre +// https://www.iana.org/domains/root/db/abudhabi.html +abudhabi + +// academy : Binky Moon, LLC +// https://www.iana.org/domains/root/db/academy.html +academy + +// accenture : Accenture plc +// https://www.iana.org/domains/root/db/accenture.html +accenture + +// accountant : dot Accountant Limited +// https://www.iana.org/domains/root/db/accountant.html +accountant + +// accountants : Binky Moon, LLC +// https://www.iana.org/domains/root/db/accountants.html +accountants + +// aco : ACO Severin Ahlmann GmbH & Co. KG +// https://www.iana.org/domains/root/db/aco.html +aco + +// actor : Dog Beach, LLC +// https://www.iana.org/domains/root/db/actor.html +actor + +// ads : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/ads.html +ads + +// adult : ICM Registry AD LLC +// https://www.iana.org/domains/root/db/adult.html +adult + +// aeg : Aktiebolaget Electrolux +// https://www.iana.org/domains/root/db/aeg.html +aeg + +// aetna : Aetna Life Insurance Company +// https://www.iana.org/domains/root/db/aetna.html +aetna + +// afl : Australian Football League +// https://www.iana.org/domains/root/db/afl.html +afl + +// africa : ZA Central Registry NPC trading as Registry.Africa +// https://www.iana.org/domains/root/db/africa.html +africa + +// agakhan : Fondation Aga Khan (Aga Khan Foundation) +// https://www.iana.org/domains/root/db/agakhan.html +agakhan + +// agency : Binky Moon, LLC +// https://www.iana.org/domains/root/db/agency.html +agency + +// aig : American International Group, Inc. +// https://www.iana.org/domains/root/db/aig.html +aig + +// airbus : Airbus S.A.S. +// https://www.iana.org/domains/root/db/airbus.html +airbus + +// airforce : Dog Beach, LLC +// https://www.iana.org/domains/root/db/airforce.html +airforce + +// airtel : Bharti Airtel Limited +// https://www.iana.org/domains/root/db/airtel.html +airtel + +// akdn : Fondation Aga Khan (Aga Khan Foundation) +// https://www.iana.org/domains/root/db/akdn.html +akdn + +// alibaba : Alibaba Group Holding Limited +// https://www.iana.org/domains/root/db/alibaba.html +alibaba + +// alipay : Alibaba Group Holding Limited +// https://www.iana.org/domains/root/db/alipay.html +alipay + +// allfinanz : Allfinanz Deutsche Vermögensberatung Aktiengesellschaft +// https://www.iana.org/domains/root/db/allfinanz.html +allfinanz + +// allstate : Allstate Fire and Casualty Insurance Company +// https://www.iana.org/domains/root/db/allstate.html +allstate + +// ally : Ally Financial Inc. +// https://www.iana.org/domains/root/db/ally.html +ally + +// alsace : Region Grand Est +// https://www.iana.org/domains/root/db/alsace.html +alsace + +// alstom : ALSTOM +// https://www.iana.org/domains/root/db/alstom.html +alstom + +// amazon : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/amazon.html +amazon + +// americanexpress : American Express Travel Related Services Company, Inc. +// https://www.iana.org/domains/root/db/americanexpress.html +americanexpress + +// americanfamily : AmFam, Inc. +// https://www.iana.org/domains/root/db/americanfamily.html +americanfamily + +// amex : American Express Travel Related Services Company, Inc. +// https://www.iana.org/domains/root/db/amex.html +amex + +// amfam : AmFam, Inc. +// https://www.iana.org/domains/root/db/amfam.html +amfam + +// amica : Amica Mutual Insurance Company +// https://www.iana.org/domains/root/db/amica.html +amica + +// amsterdam : Gemeente Amsterdam +// https://www.iana.org/domains/root/db/amsterdam.html +amsterdam + +// analytics : Campus IP LLC +// https://www.iana.org/domains/root/db/analytics.html +analytics + +// android : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/android.html +android + +// anquan : Beijing Qihu Keji Co., Ltd. +// https://www.iana.org/domains/root/db/anquan.html +anquan + +// anz : Australia and New Zealand Banking Group Limited +// https://www.iana.org/domains/root/db/anz.html +anz + +// aol : Yahoo Inc. +// https://www.iana.org/domains/root/db/aol.html +aol + +// apartments : Binky Moon, LLC +// https://www.iana.org/domains/root/db/apartments.html +apartments + +// app : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/app.html +app + +// apple : Apple Inc. +// https://www.iana.org/domains/root/db/apple.html +apple + +// aquarelle : Aquarelle.com +// https://www.iana.org/domains/root/db/aquarelle.html +aquarelle + +// arab : League of Arab States +// https://www.iana.org/domains/root/db/arab.html +arab + +// aramco : Aramco Services Company +// https://www.iana.org/domains/root/db/aramco.html +aramco + +// archi : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/archi.html +archi + +// army : Dog Beach, LLC +// https://www.iana.org/domains/root/db/army.html +army + +// art : UK Creative Ideas Limited +// https://www.iana.org/domains/root/db/art.html +art + +// arte : Association Relative à la Télévision Européenne G.E.I.E. +// https://www.iana.org/domains/root/db/arte.html +arte + +// asda : Asda Stores Limited +// https://www.iana.org/domains/root/db/asda.html +asda + +// associates : Binky Moon, LLC +// https://www.iana.org/domains/root/db/associates.html +associates + +// athleta : The Gap, Inc. +// https://www.iana.org/domains/root/db/athleta.html +athleta + +// attorney : Dog Beach, LLC +// https://www.iana.org/domains/root/db/attorney.html +attorney + +// auction : Dog Beach, LLC +// https://www.iana.org/domains/root/db/auction.html +auction + +// audi : AUDI Aktiengesellschaft +// https://www.iana.org/domains/root/db/audi.html +audi + +// audible : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/audible.html +audible + +// audio : XYZ.COM LLC +// https://www.iana.org/domains/root/db/audio.html +audio + +// auspost : Australian Postal Corporation +// https://www.iana.org/domains/root/db/auspost.html +auspost + +// author : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/author.html +author + +// auto : XYZ.COM LLC +// https://www.iana.org/domains/root/db/auto.html +auto + +// autos : XYZ.COM LLC +// https://www.iana.org/domains/root/db/autos.html +autos + +// aws : AWS Registry LLC +// https://www.iana.org/domains/root/db/aws.html +aws + +// axa : AXA Group Operations SAS +// https://www.iana.org/domains/root/db/axa.html +axa + +// azure : Microsoft Corporation +// https://www.iana.org/domains/root/db/azure.html +azure + +// baby : XYZ.COM LLC +// https://www.iana.org/domains/root/db/baby.html +baby + +// baidu : Baidu, Inc. +// https://www.iana.org/domains/root/db/baidu.html +baidu + +// banamex : Citigroup Inc. +// https://www.iana.org/domains/root/db/banamex.html +banamex + +// band : Dog Beach, LLC +// https://www.iana.org/domains/root/db/band.html +band + +// bank : fTLD Registry Services LLC +// https://www.iana.org/domains/root/db/bank.html +bank + +// bar : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +// https://www.iana.org/domains/root/db/bar.html +bar + +// barcelona : Municipi de Barcelona +// https://www.iana.org/domains/root/db/barcelona.html +barcelona + +// barclaycard : Barclays Bank PLC +// https://www.iana.org/domains/root/db/barclaycard.html +barclaycard + +// barclays : Barclays Bank PLC +// https://www.iana.org/domains/root/db/barclays.html +barclays + +// barefoot : Gallo Vineyards, Inc. +// https://www.iana.org/domains/root/db/barefoot.html +barefoot + +// bargains : Binky Moon, LLC +// https://www.iana.org/domains/root/db/bargains.html +bargains + +// baseball : MLB Advanced Media DH, LLC +// https://www.iana.org/domains/root/db/baseball.html +baseball + +// basketball : Fédération Internationale de Basketball (FIBA) +// https://www.iana.org/domains/root/db/basketball.html +basketball + +// bauhaus : Werkhaus GmbH +// https://www.iana.org/domains/root/db/bauhaus.html +bauhaus + +// bayern : Bayern Connect GmbH +// https://www.iana.org/domains/root/db/bayern.html +bayern + +// bbc : British Broadcasting Corporation +// https://www.iana.org/domains/root/db/bbc.html +bbc + +// bbt : BB&T Corporation +// https://www.iana.org/domains/root/db/bbt.html +bbt + +// bbva : BANCO BILBAO VIZCAYA ARGENTARIA, S.A. +// https://www.iana.org/domains/root/db/bbva.html +bbva + +// bcg : The Boston Consulting Group, Inc. +// https://www.iana.org/domains/root/db/bcg.html +bcg + +// bcn : Municipi de Barcelona +// https://www.iana.org/domains/root/db/bcn.html +bcn + +// beats : Beats Electronics, LLC +// https://www.iana.org/domains/root/db/beats.html +beats + +// beauty : XYZ.COM LLC +// https://www.iana.org/domains/root/db/beauty.html +beauty + +// beer : Registry Services, LLC +// https://www.iana.org/domains/root/db/beer.html +beer + +// berlin : dotBERLIN GmbH & Co. KG +// https://www.iana.org/domains/root/db/berlin.html +berlin + +// best : BestTLD Pty Ltd +// https://www.iana.org/domains/root/db/best.html +best + +// bestbuy : BBY Solutions, Inc. +// https://www.iana.org/domains/root/db/bestbuy.html +bestbuy + +// bet : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/bet.html +bet + +// bharti : Bharti Enterprises (Holding) Private Limited +// https://www.iana.org/domains/root/db/bharti.html +bharti + +// bible : American Bible Society +// https://www.iana.org/domains/root/db/bible.html +bible + +// bid : dot Bid Limited +// https://www.iana.org/domains/root/db/bid.html +bid + +// bike : Binky Moon, LLC +// https://www.iana.org/domains/root/db/bike.html +bike + +// bing : Microsoft Corporation +// https://www.iana.org/domains/root/db/bing.html +bing + +// bingo : Binky Moon, LLC +// https://www.iana.org/domains/root/db/bingo.html +bingo + +// bio : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/bio.html +bio + +// black : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/black.html +black + +// blackfriday : Registry Services, LLC +// https://www.iana.org/domains/root/db/blackfriday.html +blackfriday + +// blockbuster : Dish DBS Corporation +// https://www.iana.org/domains/root/db/blockbuster.html +blockbuster + +// blog : Knock Knock WHOIS There, LLC +// https://www.iana.org/domains/root/db/blog.html +blog + +// bloomberg : Bloomberg IP Holdings LLC +// https://www.iana.org/domains/root/db/bloomberg.html +bloomberg + +// blue : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/blue.html +blue + +// bms : Bristol-Myers Squibb Company +// https://www.iana.org/domains/root/db/bms.html +bms + +// bmw : Bayerische Motoren Werke Aktiengesellschaft +// https://www.iana.org/domains/root/db/bmw.html +bmw + +// bnpparibas : BNP Paribas +// https://www.iana.org/domains/root/db/bnpparibas.html +bnpparibas + +// boats : XYZ.COM LLC +// https://www.iana.org/domains/root/db/boats.html +boats + +// boehringer : Boehringer Ingelheim International GmbH +// https://www.iana.org/domains/root/db/boehringer.html +boehringer + +// bofa : Bank of America Corporation +// https://www.iana.org/domains/root/db/bofa.html +bofa + +// bom : Núcleo de Informação e Coordenação do Ponto BR - NIC.br +// https://www.iana.org/domains/root/db/bom.html +bom + +// bond : ShortDot SA +// https://www.iana.org/domains/root/db/bond.html +bond + +// boo : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/boo.html +boo + +// book : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/book.html +book + +// booking : Booking.com B.V. +// https://www.iana.org/domains/root/db/booking.html +booking + +// bosch : Robert Bosch GMBH +// https://www.iana.org/domains/root/db/bosch.html +bosch + +// bostik : Bostik SA +// https://www.iana.org/domains/root/db/bostik.html +bostik + +// boston : Registry Services, LLC +// https://www.iana.org/domains/root/db/boston.html +boston + +// bot : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/bot.html +bot + +// boutique : Binky Moon, LLC +// https://www.iana.org/domains/root/db/boutique.html +boutique + +// box : Intercap Registry Inc. +// https://www.iana.org/domains/root/db/box.html +box + +// bradesco : Banco Bradesco S.A. +// https://www.iana.org/domains/root/db/bradesco.html +bradesco + +// bridgestone : Bridgestone Corporation +// https://www.iana.org/domains/root/db/bridgestone.html +bridgestone + +// broadway : Celebrate Broadway, Inc. +// https://www.iana.org/domains/root/db/broadway.html +broadway + +// broker : Dog Beach, LLC +// https://www.iana.org/domains/root/db/broker.html +broker + +// brother : Brother Industries, Ltd. +// https://www.iana.org/domains/root/db/brother.html +brother + +// brussels : DNS.be vzw +// https://www.iana.org/domains/root/db/brussels.html +brussels + +// build : Plan Bee LLC +// https://www.iana.org/domains/root/db/build.html +build + +// builders : Binky Moon, LLC +// https://www.iana.org/domains/root/db/builders.html +builders + +// business : Binky Moon, LLC +// https://www.iana.org/domains/root/db/business.html +business + +// buy : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/buy.html +buy + +// buzz : DOTSTRATEGY CO. +// https://www.iana.org/domains/root/db/buzz.html +buzz + +// bzh : Association www.bzh +// https://www.iana.org/domains/root/db/bzh.html +bzh + +// cab : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cab.html +cab + +// cafe : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cafe.html +cafe + +// cal : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/cal.html +cal + +// call : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/call.html +call + +// calvinklein : PVH gTLD Holdings LLC +// https://www.iana.org/domains/root/db/calvinklein.html +calvinklein + +// cam : Cam Connecting SARL +// https://www.iana.org/domains/root/db/cam.html +cam + +// camera : Binky Moon, LLC +// https://www.iana.org/domains/root/db/camera.html +camera + +// camp : Binky Moon, LLC +// https://www.iana.org/domains/root/db/camp.html +camp + +// canon : Canon Inc. +// https://www.iana.org/domains/root/db/canon.html +canon + +// capetown : ZA Central Registry NPC trading as ZA Central Registry +// https://www.iana.org/domains/root/db/capetown.html +capetown + +// capital : Binky Moon, LLC +// https://www.iana.org/domains/root/db/capital.html +capital + +// capitalone : Capital One Financial Corporation +// https://www.iana.org/domains/root/db/capitalone.html +capitalone + +// car : XYZ.COM LLC +// https://www.iana.org/domains/root/db/car.html +car + +// caravan : Caravan International, Inc. +// https://www.iana.org/domains/root/db/caravan.html +caravan + +// cards : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cards.html +cards + +// care : Binky Moon, LLC +// https://www.iana.org/domains/root/db/care.html +care + +// career : dotCareer LLC +// https://www.iana.org/domains/root/db/career.html +career + +// careers : Binky Moon, LLC +// https://www.iana.org/domains/root/db/careers.html +careers + +// cars : XYZ.COM LLC +// https://www.iana.org/domains/root/db/cars.html +cars + +// casa : Registry Services, LLC +// https://www.iana.org/domains/root/db/casa.html +casa + +// case : Digity, LLC +// https://www.iana.org/domains/root/db/case.html +case + +// cash : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cash.html +cash + +// casino : Binky Moon, LLC +// https://www.iana.org/domains/root/db/casino.html +casino + +// catering : Binky Moon, LLC +// https://www.iana.org/domains/root/db/catering.html +catering + +// catholic : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +// https://www.iana.org/domains/root/db/catholic.html +catholic + +// cba : COMMONWEALTH BANK OF AUSTRALIA +// https://www.iana.org/domains/root/db/cba.html +cba + +// cbn : The Christian Broadcasting Network, Inc. +// https://www.iana.org/domains/root/db/cbn.html +cbn + +// cbre : CBRE, Inc. +// https://www.iana.org/domains/root/db/cbre.html +cbre + +// center : Binky Moon, LLC +// https://www.iana.org/domains/root/db/center.html +center + +// ceo : XYZ.COM LLC +// https://www.iana.org/domains/root/db/ceo.html +ceo + +// cern : European Organization for Nuclear Research ("CERN") +// https://www.iana.org/domains/root/db/cern.html +cern + +// cfa : CFA Institute +// https://www.iana.org/domains/root/db/cfa.html +cfa + +// cfd : ShortDot SA +// https://www.iana.org/domains/root/db/cfd.html +cfd + +// chanel : Chanel International B.V. +// https://www.iana.org/domains/root/db/chanel.html +chanel + +// channel : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/channel.html +channel + +// charity : Public Interest Registry +// https://www.iana.org/domains/root/db/charity.html +charity + +// chase : JPMorgan Chase Bank, National Association +// https://www.iana.org/domains/root/db/chase.html +chase + +// chat : Binky Moon, LLC +// https://www.iana.org/domains/root/db/chat.html +chat + +// cheap : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cheap.html +cheap + +// chintai : CHINTAI Corporation +// https://www.iana.org/domains/root/db/chintai.html +chintai + +// christmas : XYZ.COM LLC +// https://www.iana.org/domains/root/db/christmas.html +christmas + +// chrome : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/chrome.html +chrome + +// church : Binky Moon, LLC +// https://www.iana.org/domains/root/db/church.html +church + +// cipriani : Hotel Cipriani Srl +// https://www.iana.org/domains/root/db/cipriani.html +cipriani + +// circle : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/circle.html +circle + +// cisco : Cisco Technology, Inc. +// https://www.iana.org/domains/root/db/cisco.html +cisco + +// citadel : Citadel Domain LLC +// https://www.iana.org/domains/root/db/citadel.html +citadel + +// citi : Citigroup Inc. +// https://www.iana.org/domains/root/db/citi.html +citi + +// citic : CITIC Group Corporation +// https://www.iana.org/domains/root/db/citic.html +citic + +// city : Binky Moon, LLC +// https://www.iana.org/domains/root/db/city.html +city + +// claims : Binky Moon, LLC +// https://www.iana.org/domains/root/db/claims.html +claims + +// cleaning : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cleaning.html +cleaning + +// click : Waterford Limited +// https://www.iana.org/domains/root/db/click.html +click + +// clinic : Binky Moon, LLC +// https://www.iana.org/domains/root/db/clinic.html +clinic + +// clinique : The Estée Lauder Companies Inc. +// https://www.iana.org/domains/root/db/clinique.html +clinique + +// clothing : Binky Moon, LLC +// https://www.iana.org/domains/root/db/clothing.html +clothing + +// cloud : Aruba PEC S.p.A. +// https://www.iana.org/domains/root/db/cloud.html +cloud + +// club : Registry Services, LLC +// https://www.iana.org/domains/root/db/club.html +club + +// clubmed : Club Méditerranée S.A. +// https://www.iana.org/domains/root/db/clubmed.html +clubmed + +// coach : Binky Moon, LLC +// https://www.iana.org/domains/root/db/coach.html +coach + +// codes : Binky Moon, LLC +// https://www.iana.org/domains/root/db/codes.html +codes + +// coffee : Binky Moon, LLC +// https://www.iana.org/domains/root/db/coffee.html +coffee + +// college : XYZ.COM LLC +// https://www.iana.org/domains/root/db/college.html +college + +// cologne : dotKoeln GmbH +// https://www.iana.org/domains/root/db/cologne.html +cologne + +// commbank : COMMONWEALTH BANK OF AUSTRALIA +// https://www.iana.org/domains/root/db/commbank.html +commbank + +// community : Binky Moon, LLC +// https://www.iana.org/domains/root/db/community.html +community + +// company : Binky Moon, LLC +// https://www.iana.org/domains/root/db/company.html +company + +// compare : Registry Services, LLC +// https://www.iana.org/domains/root/db/compare.html +compare + +// computer : Binky Moon, LLC +// https://www.iana.org/domains/root/db/computer.html +computer + +// comsec : VeriSign, Inc. +// https://www.iana.org/domains/root/db/comsec.html +comsec + +// condos : Binky Moon, LLC +// https://www.iana.org/domains/root/db/condos.html +condos + +// construction : Binky Moon, LLC +// https://www.iana.org/domains/root/db/construction.html +construction + +// consulting : Dog Beach, LLC +// https://www.iana.org/domains/root/db/consulting.html +consulting + +// contact : Dog Beach, LLC +// https://www.iana.org/domains/root/db/contact.html +contact + +// contractors : Binky Moon, LLC +// https://www.iana.org/domains/root/db/contractors.html +contractors + +// cooking : Registry Services, LLC +// https://www.iana.org/domains/root/db/cooking.html +cooking + +// cool : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cool.html +cool + +// corsica : Collectivité de Corse +// https://www.iana.org/domains/root/db/corsica.html +corsica + +// country : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/country.html +country + +// coupon : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/coupon.html +coupon + +// coupons : Binky Moon, LLC +// https://www.iana.org/domains/root/db/coupons.html +coupons + +// courses : Registry Services, LLC +// https://www.iana.org/domains/root/db/courses.html +courses + +// cpa : American Institute of Certified Public Accountants +// https://www.iana.org/domains/root/db/cpa.html +cpa + +// credit : Binky Moon, LLC +// https://www.iana.org/domains/root/db/credit.html +credit + +// creditcard : Binky Moon, LLC +// https://www.iana.org/domains/root/db/creditcard.html +creditcard + +// creditunion : DotCooperation LLC +// https://www.iana.org/domains/root/db/creditunion.html +creditunion + +// cricket : dot Cricket Limited +// https://www.iana.org/domains/root/db/cricket.html +cricket + +// crown : Crown Equipment Corporation +// https://www.iana.org/domains/root/db/crown.html +crown + +// crs : Federated Co-operatives Limited +// https://www.iana.org/domains/root/db/crs.html +crs + +// cruise : Viking River Cruises (Bermuda) Ltd. +// https://www.iana.org/domains/root/db/cruise.html +cruise + +// cruises : Binky Moon, LLC +// https://www.iana.org/domains/root/db/cruises.html +cruises + +// cuisinella : SCHMIDT GROUPE S.A.S. +// https://www.iana.org/domains/root/db/cuisinella.html +cuisinella + +// cymru : Nominet UK +// https://www.iana.org/domains/root/db/cymru.html +cymru + +// cyou : ShortDot SA +// https://www.iana.org/domains/root/db/cyou.html +cyou + +// dad : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/dad.html +dad + +// dance : Dog Beach, LLC +// https://www.iana.org/domains/root/db/dance.html +dance + +// data : Dish DBS Corporation +// https://www.iana.org/domains/root/db/data.html +data + +// date : dot Date Limited +// https://www.iana.org/domains/root/db/date.html +date + +// dating : Binky Moon, LLC +// https://www.iana.org/domains/root/db/dating.html +dating + +// datsun : NISSAN MOTOR CO., LTD. +// https://www.iana.org/domains/root/db/datsun.html +datsun + +// day : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/day.html +day + +// dclk : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/dclk.html +dclk + +// dds : Registry Services, LLC +// https://www.iana.org/domains/root/db/dds.html +dds + +// deal : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/deal.html +deal + +// dealer : Intercap Registry Inc. +// https://www.iana.org/domains/root/db/dealer.html +dealer + +// deals : Binky Moon, LLC +// https://www.iana.org/domains/root/db/deals.html +deals + +// degree : Dog Beach, LLC +// https://www.iana.org/domains/root/db/degree.html +degree + +// delivery : Binky Moon, LLC +// https://www.iana.org/domains/root/db/delivery.html +delivery + +// dell : Dell Inc. +// https://www.iana.org/domains/root/db/dell.html +dell + +// deloitte : Deloitte Touche Tohmatsu +// https://www.iana.org/domains/root/db/deloitte.html +deloitte + +// delta : Delta Air Lines, Inc. +// https://www.iana.org/domains/root/db/delta.html +delta + +// democrat : Dog Beach, LLC +// https://www.iana.org/domains/root/db/democrat.html +democrat + +// dental : Binky Moon, LLC +// https://www.iana.org/domains/root/db/dental.html +dental + +// dentist : Dog Beach, LLC +// https://www.iana.org/domains/root/db/dentist.html +dentist + +// desi +// https://www.iana.org/domains/root/db/desi.html +desi + +// design : Registry Services, LLC +// https://www.iana.org/domains/root/db/design.html +design + +// dev : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/dev.html +dev + +// dhl : Deutsche Post AG +// https://www.iana.org/domains/root/db/dhl.html +dhl + +// diamonds : Binky Moon, LLC +// https://www.iana.org/domains/root/db/diamonds.html +diamonds + +// diet : XYZ.COM LLC +// https://www.iana.org/domains/root/db/diet.html +diet + +// digital : Binky Moon, LLC +// https://www.iana.org/domains/root/db/digital.html +digital + +// direct : Binky Moon, LLC +// https://www.iana.org/domains/root/db/direct.html +direct + +// directory : Binky Moon, LLC +// https://www.iana.org/domains/root/db/directory.html +directory + +// discount : Binky Moon, LLC +// https://www.iana.org/domains/root/db/discount.html +discount + +// discover : Discover Financial Services +// https://www.iana.org/domains/root/db/discover.html +discover + +// dish : Dish DBS Corporation +// https://www.iana.org/domains/root/db/dish.html +dish + +// diy : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/diy.html +diy + +// dnp : Dai Nippon Printing Co., Ltd. +// https://www.iana.org/domains/root/db/dnp.html +dnp + +// docs : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/docs.html +docs + +// doctor : Binky Moon, LLC +// https://www.iana.org/domains/root/db/doctor.html +doctor + +// dog : Binky Moon, LLC +// https://www.iana.org/domains/root/db/dog.html +dog + +// domains : Binky Moon, LLC +// https://www.iana.org/domains/root/db/domains.html +domains + +// dot : Dish DBS Corporation +// https://www.iana.org/domains/root/db/dot.html +dot + +// download : dot Support Limited +// https://www.iana.org/domains/root/db/download.html +download + +// drive : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/drive.html +drive + +// dtv : Dish DBS Corporation +// https://www.iana.org/domains/root/db/dtv.html +dtv + +// dubai : Dubai Smart Government Department +// https://www.iana.org/domains/root/db/dubai.html +dubai + +// dunlop : The Goodyear Tire & Rubber Company +// https://www.iana.org/domains/root/db/dunlop.html +dunlop + +// dupont : DuPont Specialty Products USA, LLC +// https://www.iana.org/domains/root/db/dupont.html +dupont + +// durban : ZA Central Registry NPC trading as ZA Central Registry +// https://www.iana.org/domains/root/db/durban.html +durban + +// dvag : Deutsche Vermögensberatung Aktiengesellschaft DVAG +// https://www.iana.org/domains/root/db/dvag.html +dvag + +// dvr : DISH Technologies L.L.C. +// https://www.iana.org/domains/root/db/dvr.html +dvr + +// earth : Interlink Systems Innovation Institute K.K. +// https://www.iana.org/domains/root/db/earth.html +earth + +// eat : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/eat.html +eat + +// eco : Big Room Inc. +// https://www.iana.org/domains/root/db/eco.html +eco + +// edeka : EDEKA Verband kaufmännischer Genossenschaften e.V. +// https://www.iana.org/domains/root/db/edeka.html +edeka + +// education : Binky Moon, LLC +// https://www.iana.org/domains/root/db/education.html +education + +// email : Binky Moon, LLC +// https://www.iana.org/domains/root/db/email.html +email + +// emerck : Merck KGaA +// https://www.iana.org/domains/root/db/emerck.html +emerck + +// energy : Binky Moon, LLC +// https://www.iana.org/domains/root/db/energy.html +energy + +// engineer : Dog Beach, LLC +// https://www.iana.org/domains/root/db/engineer.html +engineer + +// engineering : Binky Moon, LLC +// https://www.iana.org/domains/root/db/engineering.html +engineering + +// enterprises : Binky Moon, LLC +// https://www.iana.org/domains/root/db/enterprises.html +enterprises + +// epson : Seiko Epson Corporation +// https://www.iana.org/domains/root/db/epson.html +epson + +// equipment : Binky Moon, LLC +// https://www.iana.org/domains/root/db/equipment.html +equipment + +// ericsson : Telefonaktiebolaget L M Ericsson +// https://www.iana.org/domains/root/db/ericsson.html +ericsson + +// erni : ERNI Group Holding AG +// https://www.iana.org/domains/root/db/erni.html +erni + +// esq : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/esq.html +esq + +// estate : Binky Moon, LLC +// https://www.iana.org/domains/root/db/estate.html +estate + +// eurovision : European Broadcasting Union (EBU) +// https://www.iana.org/domains/root/db/eurovision.html +eurovision + +// eus : Puntueus Fundazioa +// https://www.iana.org/domains/root/db/eus.html +eus + +// events : Binky Moon, LLC +// https://www.iana.org/domains/root/db/events.html +events + +// exchange : Binky Moon, LLC +// https://www.iana.org/domains/root/db/exchange.html +exchange + +// expert : Binky Moon, LLC +// https://www.iana.org/domains/root/db/expert.html +expert + +// exposed : Binky Moon, LLC +// https://www.iana.org/domains/root/db/exposed.html +exposed + +// express : Binky Moon, LLC +// https://www.iana.org/domains/root/db/express.html +express + +// extraspace : Extra Space Storage LLC +// https://www.iana.org/domains/root/db/extraspace.html +extraspace + +// fage : Fage International S.A. +// https://www.iana.org/domains/root/db/fage.html +fage + +// fail : Binky Moon, LLC +// https://www.iana.org/domains/root/db/fail.html +fail + +// fairwinds : FairWinds Partners, LLC +// https://www.iana.org/domains/root/db/fairwinds.html +fairwinds + +// faith : dot Faith Limited +// https://www.iana.org/domains/root/db/faith.html +faith + +// family : Dog Beach, LLC +// https://www.iana.org/domains/root/db/family.html +family + +// fan : Dog Beach, LLC +// https://www.iana.org/domains/root/db/fan.html +fan + +// fans : ZDNS International Limited +// https://www.iana.org/domains/root/db/fans.html +fans + +// farm : Binky Moon, LLC +// https://www.iana.org/domains/root/db/farm.html +farm + +// farmers : Farmers Insurance Exchange +// https://www.iana.org/domains/root/db/farmers.html +farmers + +// fashion : Registry Services, LLC +// https://www.iana.org/domains/root/db/fashion.html +fashion + +// fast : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/fast.html +fast + +// fedex : Federal Express Corporation +// https://www.iana.org/domains/root/db/fedex.html +fedex + +// feedback : Top Level Spectrum, Inc. +// https://www.iana.org/domains/root/db/feedback.html +feedback + +// ferrari : Fiat Chrysler Automobiles N.V. +// https://www.iana.org/domains/root/db/ferrari.html +ferrari + +// ferrero : Ferrero Trading Lux S.A. +// https://www.iana.org/domains/root/db/ferrero.html +ferrero + +// fidelity : Fidelity Brokerage Services LLC +// https://www.iana.org/domains/root/db/fidelity.html +fidelity + +// fido : Rogers Communications Canada Inc. +// https://www.iana.org/domains/root/db/fido.html +fido + +// film : Motion Picture Domain Registry Pty Ltd +// https://www.iana.org/domains/root/db/film.html +film + +// final : Núcleo de Informação e Coordenação do Ponto BR - NIC.br +// https://www.iana.org/domains/root/db/final.html +final + +// finance : Binky Moon, LLC +// https://www.iana.org/domains/root/db/finance.html +finance + +// financial : Binky Moon, LLC +// https://www.iana.org/domains/root/db/financial.html +financial + +// fire : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/fire.html +fire + +// firestone : Bridgestone Licensing Services, Inc +// https://www.iana.org/domains/root/db/firestone.html +firestone + +// firmdale : Firmdale Holdings Limited +// https://www.iana.org/domains/root/db/firmdale.html +firmdale + +// fish : Binky Moon, LLC +// https://www.iana.org/domains/root/db/fish.html +fish + +// fishing : Registry Services, LLC +// https://www.iana.org/domains/root/db/fishing.html +fishing + +// fit : Registry Services, LLC +// https://www.iana.org/domains/root/db/fit.html +fit + +// fitness : Binky Moon, LLC +// https://www.iana.org/domains/root/db/fitness.html +fitness + +// flickr : Flickr, Inc. +// https://www.iana.org/domains/root/db/flickr.html +flickr + +// flights : Binky Moon, LLC +// https://www.iana.org/domains/root/db/flights.html +flights + +// flir : FLIR Systems, Inc. +// https://www.iana.org/domains/root/db/flir.html +flir + +// florist : Binky Moon, LLC +// https://www.iana.org/domains/root/db/florist.html +florist + +// flowers : XYZ.COM LLC +// https://www.iana.org/domains/root/db/flowers.html +flowers + +// fly : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/fly.html +fly + +// foo : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/foo.html +foo + +// food : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/food.html +food + +// football : Binky Moon, LLC +// https://www.iana.org/domains/root/db/football.html +football + +// ford : Ford Motor Company +// https://www.iana.org/domains/root/db/ford.html +ford + +// forex : Dog Beach, LLC +// https://www.iana.org/domains/root/db/forex.html +forex + +// forsale : Dog Beach, LLC +// https://www.iana.org/domains/root/db/forsale.html +forsale + +// forum : Waterford Limited +// https://www.iana.org/domains/root/db/forum.html +forum + +// foundation : Public Interest Registry +// https://www.iana.org/domains/root/db/foundation.html +foundation + +// fox : FOX Registry, LLC +// https://www.iana.org/domains/root/db/fox.html +fox + +// free : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/free.html +free + +// fresenius : Fresenius Immobilien-Verwaltungs-GmbH +// https://www.iana.org/domains/root/db/fresenius.html +fresenius + +// frl : FRLregistry B.V. +// https://www.iana.org/domains/root/db/frl.html +frl + +// frogans : OP3FT +// https://www.iana.org/domains/root/db/frogans.html +frogans + +// frontier : Frontier Communications Corporation +// https://www.iana.org/domains/root/db/frontier.html +frontier + +// ftr : Frontier Communications Corporation +// https://www.iana.org/domains/root/db/ftr.html +ftr + +// fujitsu : Fujitsu Limited +// https://www.iana.org/domains/root/db/fujitsu.html +fujitsu + +// fun : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/fun.html +fun + +// fund : Binky Moon, LLC +// https://www.iana.org/domains/root/db/fund.html +fund + +// furniture : Binky Moon, LLC +// https://www.iana.org/domains/root/db/furniture.html +furniture + +// futbol : Dog Beach, LLC +// https://www.iana.org/domains/root/db/futbol.html +futbol + +// fyi : Binky Moon, LLC +// https://www.iana.org/domains/root/db/fyi.html +fyi + +// gal : Asociación puntoGAL +// https://www.iana.org/domains/root/db/gal.html +gal + +// gallery : Binky Moon, LLC +// https://www.iana.org/domains/root/db/gallery.html +gallery + +// gallo : Gallo Vineyards, Inc. +// https://www.iana.org/domains/root/db/gallo.html +gallo + +// gallup : Gallup, Inc. +// https://www.iana.org/domains/root/db/gallup.html +gallup + +// game : XYZ.COM LLC +// https://www.iana.org/domains/root/db/game.html +game + +// games : Dog Beach, LLC +// https://www.iana.org/domains/root/db/games.html +games + +// gap : The Gap, Inc. +// https://www.iana.org/domains/root/db/gap.html +gap + +// garden : Registry Services, LLC +// https://www.iana.org/domains/root/db/garden.html +garden + +// gay : Registry Services, LLC +// https://www.iana.org/domains/root/db/gay.html +gay + +// gbiz : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/gbiz.html +gbiz + +// gdn : Joint Stock Company "Navigation-information systems" +// https://www.iana.org/domains/root/db/gdn.html +gdn + +// gea : GEA Group Aktiengesellschaft +// https://www.iana.org/domains/root/db/gea.html +gea + +// gent : Easyhost BV +// https://www.iana.org/domains/root/db/gent.html +gent + +// genting : Resorts World Inc Pte. Ltd. +// https://www.iana.org/domains/root/db/genting.html +genting + +// george : Wal-Mart Stores, Inc. +// https://www.iana.org/domains/root/db/george.html +george + +// ggee : GMO Internet, Inc. +// https://www.iana.org/domains/root/db/ggee.html +ggee + +// gift : DotGift, LLC +// https://www.iana.org/domains/root/db/gift.html +gift + +// gifts : Binky Moon, LLC +// https://www.iana.org/domains/root/db/gifts.html +gifts + +// gives : Public Interest Registry +// https://www.iana.org/domains/root/db/gives.html +gives + +// giving : Public Interest Registry +// https://www.iana.org/domains/root/db/giving.html +giving + +// glass : Binky Moon, LLC +// https://www.iana.org/domains/root/db/glass.html +glass + +// gle : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/gle.html +gle + +// global : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/global.html +global + +// globo : Globo Comunicação e Participações S.A +// https://www.iana.org/domains/root/db/globo.html +globo + +// gmail : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/gmail.html +gmail + +// gmbh : Binky Moon, LLC +// https://www.iana.org/domains/root/db/gmbh.html +gmbh + +// gmo : GMO Internet, Inc. +// https://www.iana.org/domains/root/db/gmo.html +gmo + +// gmx : 1&1 Mail & Media GmbH +// https://www.iana.org/domains/root/db/gmx.html +gmx + +// godaddy : Go Daddy East, LLC +// https://www.iana.org/domains/root/db/godaddy.html +godaddy + +// gold : Binky Moon, LLC +// https://www.iana.org/domains/root/db/gold.html +gold + +// goldpoint : YODOBASHI CAMERA CO.,LTD. +// https://www.iana.org/domains/root/db/goldpoint.html +goldpoint + +// golf : Binky Moon, LLC +// https://www.iana.org/domains/root/db/golf.html +golf + +// goo : NTT DOCOMO, INC. +// https://www.iana.org/domains/root/db/goo.html +goo + +// goodyear : The Goodyear Tire & Rubber Company +// https://www.iana.org/domains/root/db/goodyear.html +goodyear + +// goog : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/goog.html +goog + +// google : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/google.html +google + +// gop : Republican State Leadership Committee, Inc. +// https://www.iana.org/domains/root/db/gop.html +gop + +// got : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/got.html +got + +// grainger : Grainger Registry Services, LLC +// https://www.iana.org/domains/root/db/grainger.html +grainger + +// graphics : Binky Moon, LLC +// https://www.iana.org/domains/root/db/graphics.html +graphics + +// gratis : Binky Moon, LLC +// https://www.iana.org/domains/root/db/gratis.html +gratis + +// green : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/green.html +green + +// gripe : Binky Moon, LLC +// https://www.iana.org/domains/root/db/gripe.html +gripe + +// grocery : Wal-Mart Stores, Inc. +// https://www.iana.org/domains/root/db/grocery.html +grocery + +// group : Binky Moon, LLC +// https://www.iana.org/domains/root/db/group.html +group + +// gucci : Guccio Gucci S.p.a. +// https://www.iana.org/domains/root/db/gucci.html +gucci + +// guge : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/guge.html +guge + +// guide : Binky Moon, LLC +// https://www.iana.org/domains/root/db/guide.html +guide + +// guitars : XYZ.COM LLC +// https://www.iana.org/domains/root/db/guitars.html +guitars + +// guru : Binky Moon, LLC +// https://www.iana.org/domains/root/db/guru.html +guru + +// hair : XYZ.COM LLC +// https://www.iana.org/domains/root/db/hair.html +hair + +// hamburg : Hamburg Top-Level-Domain GmbH +// https://www.iana.org/domains/root/db/hamburg.html +hamburg + +// hangout : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/hangout.html +hangout + +// haus : Dog Beach, LLC +// https://www.iana.org/domains/root/db/haus.html +haus + +// hbo : HBO Registry Services, Inc. +// https://www.iana.org/domains/root/db/hbo.html +hbo + +// hdfc : HDFC BANK LIMITED +// https://www.iana.org/domains/root/db/hdfc.html +hdfc + +// hdfcbank : HDFC BANK LIMITED +// https://www.iana.org/domains/root/db/hdfcbank.html +hdfcbank + +// health : Registry Services, LLC +// https://www.iana.org/domains/root/db/health.html +health + +// healthcare : Binky Moon, LLC +// https://www.iana.org/domains/root/db/healthcare.html +healthcare + +// help : Innovation service Limited +// https://www.iana.org/domains/root/db/help.html +help + +// helsinki : City of Helsinki +// https://www.iana.org/domains/root/db/helsinki.html +helsinki + +// here : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/here.html +here + +// hermes : HERMES INTERNATIONAL +// https://www.iana.org/domains/root/db/hermes.html +hermes + +// hiphop : Dot Hip Hop, LLC +// https://www.iana.org/domains/root/db/hiphop.html +hiphop + +// hisamitsu : Hisamitsu Pharmaceutical Co.,Inc. +// https://www.iana.org/domains/root/db/hisamitsu.html +hisamitsu + +// hitachi : Hitachi, Ltd. +// https://www.iana.org/domains/root/db/hitachi.html +hitachi + +// hiv : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/hiv.html +hiv + +// hkt : PCCW-HKT DataCom Services Limited +// https://www.iana.org/domains/root/db/hkt.html +hkt + +// hockey : Binky Moon, LLC +// https://www.iana.org/domains/root/db/hockey.html +hockey + +// holdings : Binky Moon, LLC +// https://www.iana.org/domains/root/db/holdings.html +holdings + +// holiday : Binky Moon, LLC +// https://www.iana.org/domains/root/db/holiday.html +holiday + +// homedepot : Home Depot Product Authority, LLC +// https://www.iana.org/domains/root/db/homedepot.html +homedepot + +// homegoods : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/homegoods.html +homegoods + +// homes : XYZ.COM LLC +// https://www.iana.org/domains/root/db/homes.html +homes + +// homesense : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/homesense.html +homesense + +// honda : Honda Motor Co., Ltd. +// https://www.iana.org/domains/root/db/honda.html +honda + +// horse : Registry Services, LLC +// https://www.iana.org/domains/root/db/horse.html +horse + +// hospital : Binky Moon, LLC +// https://www.iana.org/domains/root/db/hospital.html +hospital + +// host : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/host.html +host + +// hosting : XYZ.COM LLC +// https://www.iana.org/domains/root/db/hosting.html +hosting + +// hot : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/hot.html +hot + +// hotel : HOTEL Top-Level-Domain S.a.r.l +// https://www.iana.org/domains/root/db/hotel.html +hotel + +// hotels : Booking.com B.V. +// https://www.iana.org/domains/root/db/hotels.html +hotels + +// hotmail : Microsoft Corporation +// https://www.iana.org/domains/root/db/hotmail.html +hotmail + +// house : Binky Moon, LLC +// https://www.iana.org/domains/root/db/house.html +house + +// how : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/how.html +how + +// hsbc : HSBC Global Services (UK) Limited +// https://www.iana.org/domains/root/db/hsbc.html +hsbc + +// hughes : Hughes Satellite Systems Corporation +// https://www.iana.org/domains/root/db/hughes.html +hughes + +// hyatt : Hyatt GTLD, L.L.C. +// https://www.iana.org/domains/root/db/hyatt.html +hyatt + +// hyundai : Hyundai Motor Company +// https://www.iana.org/domains/root/db/hyundai.html +hyundai + +// ibm : International Business Machines Corporation +// https://www.iana.org/domains/root/db/ibm.html +ibm + +// icbc : Industrial and Commercial Bank of China Limited +// https://www.iana.org/domains/root/db/icbc.html +icbc + +// ice : IntercontinentalExchange, Inc. +// https://www.iana.org/domains/root/db/ice.html +ice + +// icu : ShortDot SA +// https://www.iana.org/domains/root/db/icu.html +icu + +// ieee : IEEE Global LLC +// https://www.iana.org/domains/root/db/ieee.html +ieee + +// ifm : ifm electronic gmbh +// https://www.iana.org/domains/root/db/ifm.html +ifm + +// ikano : Ikano S.A. +// https://www.iana.org/domains/root/db/ikano.html +ikano + +// imamat : Fondation Aga Khan (Aga Khan Foundation) +// https://www.iana.org/domains/root/db/imamat.html +imamat + +// imdb : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/imdb.html +imdb + +// immo : Binky Moon, LLC +// https://www.iana.org/domains/root/db/immo.html +immo + +// immobilien : Dog Beach, LLC +// https://www.iana.org/domains/root/db/immobilien.html +immobilien + +// inc : Intercap Registry Inc. +// https://www.iana.org/domains/root/db/inc.html +inc + +// industries : Binky Moon, LLC +// https://www.iana.org/domains/root/db/industries.html +industries + +// infiniti : NISSAN MOTOR CO., LTD. +// https://www.iana.org/domains/root/db/infiniti.html +infiniti + +// ing : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/ing.html +ing + +// ink : Registry Services, LLC +// https://www.iana.org/domains/root/db/ink.html +ink + +// institute : Binky Moon, LLC +// https://www.iana.org/domains/root/db/institute.html +institute + +// insurance : fTLD Registry Services LLC +// https://www.iana.org/domains/root/db/insurance.html +insurance + +// insure : Binky Moon, LLC +// https://www.iana.org/domains/root/db/insure.html +insure + +// international : Binky Moon, LLC +// https://www.iana.org/domains/root/db/international.html +international + +// intuit : Intuit Administrative Services, Inc. +// https://www.iana.org/domains/root/db/intuit.html +intuit + +// investments : Binky Moon, LLC +// https://www.iana.org/domains/root/db/investments.html +investments + +// ipiranga : Ipiranga Produtos de Petroleo S.A. +// https://www.iana.org/domains/root/db/ipiranga.html +ipiranga + +// irish : Binky Moon, LLC +// https://www.iana.org/domains/root/db/irish.html +irish + +// ismaili : Fondation Aga Khan (Aga Khan Foundation) +// https://www.iana.org/domains/root/db/ismaili.html +ismaili + +// ist : Istanbul Metropolitan Municipality +// https://www.iana.org/domains/root/db/ist.html +ist + +// istanbul : Istanbul Metropolitan Municipality +// https://www.iana.org/domains/root/db/istanbul.html +istanbul + +// itau : Itau Unibanco Holding S.A. +// https://www.iana.org/domains/root/db/itau.html +itau + +// itv : ITV Services Limited +// https://www.iana.org/domains/root/db/itv.html +itv + +// jaguar : Jaguar Land Rover Ltd +// https://www.iana.org/domains/root/db/jaguar.html +jaguar + +// java : Oracle Corporation +// https://www.iana.org/domains/root/db/java.html +java + +// jcb : JCB Co., Ltd. +// https://www.iana.org/domains/root/db/jcb.html +jcb + +// jeep : FCA US LLC. +// https://www.iana.org/domains/root/db/jeep.html +jeep + +// jetzt : Binky Moon, LLC +// https://www.iana.org/domains/root/db/jetzt.html +jetzt + +// jewelry : Binky Moon, LLC +// https://www.iana.org/domains/root/db/jewelry.html +jewelry + +// jio : Reliance Industries Limited +// https://www.iana.org/domains/root/db/jio.html +jio + +// jll : Jones Lang LaSalle Incorporated +// https://www.iana.org/domains/root/db/jll.html +jll + +// jmp : Matrix IP LLC +// https://www.iana.org/domains/root/db/jmp.html +jmp + +// jnj : Johnson & Johnson Services, Inc. +// https://www.iana.org/domains/root/db/jnj.html +jnj + +// joburg : ZA Central Registry NPC trading as ZA Central Registry +// https://www.iana.org/domains/root/db/joburg.html +joburg + +// jot : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/jot.html +jot + +// joy : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/joy.html +joy + +// jpmorgan : JPMorgan Chase Bank, National Association +// https://www.iana.org/domains/root/db/jpmorgan.html +jpmorgan + +// jprs : Japan Registry Services Co., Ltd. +// https://www.iana.org/domains/root/db/jprs.html +jprs + +// juegos : Dog Beach, LLC +// https://www.iana.org/domains/root/db/juegos.html +juegos + +// juniper : JUNIPER NETWORKS, INC. +// https://www.iana.org/domains/root/db/juniper.html +juniper + +// kaufen : Dog Beach, LLC +// https://www.iana.org/domains/root/db/kaufen.html +kaufen + +// kddi : KDDI CORPORATION +// https://www.iana.org/domains/root/db/kddi.html +kddi + +// kerryhotels : Kerry Trading Co. Limited +// https://www.iana.org/domains/root/db/kerryhotels.html +kerryhotels + +// kerryproperties : Kerry Trading Co. Limited +// https://www.iana.org/domains/root/db/kerryproperties.html +kerryproperties + +// kfh : Kuwait Finance House +// https://www.iana.org/domains/root/db/kfh.html +kfh + +// kia : KIA MOTORS CORPORATION +// https://www.iana.org/domains/root/db/kia.html +kia + +// kids : DotKids Foundation Limited +// https://www.iana.org/domains/root/db/kids.html +kids + +// kim : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/kim.html +kim + +// kindle : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/kindle.html +kindle + +// kitchen : Binky Moon, LLC +// https://www.iana.org/domains/root/db/kitchen.html +kitchen + +// kiwi : DOT KIWI LIMITED +// https://www.iana.org/domains/root/db/kiwi.html +kiwi + +// koeln : dotKoeln GmbH +// https://www.iana.org/domains/root/db/koeln.html +koeln + +// komatsu : Komatsu Ltd. +// https://www.iana.org/domains/root/db/komatsu.html +komatsu + +// kosher : Kosher Marketing Assets LLC +// https://www.iana.org/domains/root/db/kosher.html +kosher + +// kpmg : KPMG International Cooperative (KPMG International Genossenschaft) +// https://www.iana.org/domains/root/db/kpmg.html +kpmg + +// kpn : Koninklijke KPN N.V. +// https://www.iana.org/domains/root/db/kpn.html +kpn + +// krd : KRG Department of Information Technology +// https://www.iana.org/domains/root/db/krd.html +krd + +// kred : KredTLD Pty Ltd +// https://www.iana.org/domains/root/db/kred.html +kred + +// kuokgroup : Kerry Trading Co. Limited +// https://www.iana.org/domains/root/db/kuokgroup.html +kuokgroup + +// kyoto : Academic Institution: Kyoto Jyoho Gakuen +// https://www.iana.org/domains/root/db/kyoto.html +kyoto + +// lacaixa : Fundación Bancaria Caixa d’Estalvis i Pensions de Barcelona, “la Caixa” +// https://www.iana.org/domains/root/db/lacaixa.html +lacaixa + +// lamborghini : Automobili Lamborghini S.p.A. +// https://www.iana.org/domains/root/db/lamborghini.html +lamborghini + +// lamer : The Estée Lauder Companies Inc. +// https://www.iana.org/domains/root/db/lamer.html +lamer + +// land : Binky Moon, LLC +// https://www.iana.org/domains/root/db/land.html +land + +// landrover : Jaguar Land Rover Ltd +// https://www.iana.org/domains/root/db/landrover.html +landrover + +// lanxess : LANXESS Corporation +// https://www.iana.org/domains/root/db/lanxess.html +lanxess + +// lasalle : Jones Lang LaSalle Incorporated +// https://www.iana.org/domains/root/db/lasalle.html +lasalle + +// lat : XYZ.COM LLC +// https://www.iana.org/domains/root/db/lat.html +lat + +// latino : Dish DBS Corporation +// https://www.iana.org/domains/root/db/latino.html +latino + +// latrobe : La Trobe University +// https://www.iana.org/domains/root/db/latrobe.html +latrobe + +// law : Registry Services, LLC +// https://www.iana.org/domains/root/db/law.html +law + +// lawyer : Dog Beach, LLC +// https://www.iana.org/domains/root/db/lawyer.html +lawyer + +// lds : IRI Domain Management, LLC +// https://www.iana.org/domains/root/db/lds.html +lds + +// lease : Binky Moon, LLC +// https://www.iana.org/domains/root/db/lease.html +lease + +// leclerc : A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc +// https://www.iana.org/domains/root/db/leclerc.html +leclerc + +// lefrak : LeFrak Organization, Inc. +// https://www.iana.org/domains/root/db/lefrak.html +lefrak + +// legal : Binky Moon, LLC +// https://www.iana.org/domains/root/db/legal.html +legal + +// lego : LEGO Juris A/S +// https://www.iana.org/domains/root/db/lego.html +lego + +// lexus : TOYOTA MOTOR CORPORATION +// https://www.iana.org/domains/root/db/lexus.html +lexus + +// lgbt : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/lgbt.html +lgbt + +// lidl : Schwarz Domains und Services GmbH & Co. KG +// https://www.iana.org/domains/root/db/lidl.html +lidl + +// life : Binky Moon, LLC +// https://www.iana.org/domains/root/db/life.html +life + +// lifeinsurance : American Council of Life Insurers +// https://www.iana.org/domains/root/db/lifeinsurance.html +lifeinsurance + +// lifestyle : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/lifestyle.html +lifestyle + +// lighting : Binky Moon, LLC +// https://www.iana.org/domains/root/db/lighting.html +lighting + +// like : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/like.html +like + +// lilly : Eli Lilly and Company +// https://www.iana.org/domains/root/db/lilly.html +lilly + +// limited : Binky Moon, LLC +// https://www.iana.org/domains/root/db/limited.html +limited + +// limo : Binky Moon, LLC +// https://www.iana.org/domains/root/db/limo.html +limo + +// lincoln : Ford Motor Company +// https://www.iana.org/domains/root/db/lincoln.html +lincoln + +// link : Nova Registry Ltd +// https://www.iana.org/domains/root/db/link.html +link + +// live : Dog Beach, LLC +// https://www.iana.org/domains/root/db/live.html +live + +// living : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/living.html +living + +// llc : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/llc.html +llc + +// llp : Intercap Registry Inc. +// https://www.iana.org/domains/root/db/llp.html +llp + +// loan : dot Loan Limited +// https://www.iana.org/domains/root/db/loan.html +loan + +// loans : Binky Moon, LLC +// https://www.iana.org/domains/root/db/loans.html +loans + +// locker : Orange Domains LLC +// https://www.iana.org/domains/root/db/locker.html +locker + +// locus : Locus Analytics LLC +// https://www.iana.org/domains/root/db/locus.html +locus + +// lol : XYZ.COM LLC +// https://www.iana.org/domains/root/db/lol.html +lol + +// london : Dot London Domains Limited +// https://www.iana.org/domains/root/db/london.html +london + +// lotte : Lotte Holdings Co., Ltd. +// https://www.iana.org/domains/root/db/lotte.html +lotte + +// lotto : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/lotto.html +lotto + +// love : Waterford Limited +// https://www.iana.org/domains/root/db/love.html +love + +// lpl : LPL Holdings, Inc. +// https://www.iana.org/domains/root/db/lpl.html +lpl + +// lplfinancial : LPL Holdings, Inc. +// https://www.iana.org/domains/root/db/lplfinancial.html +lplfinancial + +// ltd : Binky Moon, LLC +// https://www.iana.org/domains/root/db/ltd.html +ltd + +// ltda : InterNetX, Corp +// https://www.iana.org/domains/root/db/ltda.html +ltda + +// lundbeck : H. Lundbeck A/S +// https://www.iana.org/domains/root/db/lundbeck.html +lundbeck + +// luxe : Registry Services, LLC +// https://www.iana.org/domains/root/db/luxe.html +luxe + +// luxury : Luxury Partners, LLC +// https://www.iana.org/domains/root/db/luxury.html +luxury + +// madrid : Comunidad de Madrid +// https://www.iana.org/domains/root/db/madrid.html +madrid + +// maif : Mutuelle Assurance Instituteur France (MAIF) +// https://www.iana.org/domains/root/db/maif.html +maif + +// maison : Binky Moon, LLC +// https://www.iana.org/domains/root/db/maison.html +maison + +// makeup : XYZ.COM LLC +// https://www.iana.org/domains/root/db/makeup.html +makeup + +// man : MAN Truck & Bus SE +// https://www.iana.org/domains/root/db/man.html +man + +// management : Binky Moon, LLC +// https://www.iana.org/domains/root/db/management.html +management + +// mango : PUNTO FA S.L. +// https://www.iana.org/domains/root/db/mango.html +mango + +// map : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/map.html +map + +// market : Dog Beach, LLC +// https://www.iana.org/domains/root/db/market.html +market + +// marketing : Binky Moon, LLC +// https://www.iana.org/domains/root/db/marketing.html +marketing + +// markets : Dog Beach, LLC +// https://www.iana.org/domains/root/db/markets.html +markets + +// marriott : Marriott Worldwide Corporation +// https://www.iana.org/domains/root/db/marriott.html +marriott + +// marshalls : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/marshalls.html +marshalls + +// mattel : Mattel IT Services, Inc. +// https://www.iana.org/domains/root/db/mattel.html +mattel + +// mba : Binky Moon, LLC +// https://www.iana.org/domains/root/db/mba.html +mba + +// mckinsey : McKinsey Holdings, Inc. +// https://www.iana.org/domains/root/db/mckinsey.html +mckinsey + +// med : Medistry LLC +// https://www.iana.org/domains/root/db/med.html +med + +// media : Binky Moon, LLC +// https://www.iana.org/domains/root/db/media.html +media + +// meet : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/meet.html +meet + +// melbourne : The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation +// https://www.iana.org/domains/root/db/melbourne.html +melbourne + +// meme : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/meme.html +meme + +// memorial : Dog Beach, LLC +// https://www.iana.org/domains/root/db/memorial.html +memorial + +// men : Exclusive Registry Limited +// https://www.iana.org/domains/root/db/men.html +men + +// menu : Dot Menu Registry, LLC +// https://www.iana.org/domains/root/db/menu.html +menu + +// merck : Merck Registry Holdings, Inc. +// https://www.iana.org/domains/root/db/merck.html +merck + +// merckmsd : MSD Registry Holdings, Inc. +// https://www.iana.org/domains/root/db/merckmsd.html +merckmsd + +// miami : Registry Services, LLC +// https://www.iana.org/domains/root/db/miami.html +miami + +// microsoft : Microsoft Corporation +// https://www.iana.org/domains/root/db/microsoft.html +microsoft + +// mini : Bayerische Motoren Werke Aktiengesellschaft +// https://www.iana.org/domains/root/db/mini.html +mini + +// mint : Intuit Administrative Services, Inc. +// https://www.iana.org/domains/root/db/mint.html +mint + +// mit : Massachusetts Institute of Technology +// https://www.iana.org/domains/root/db/mit.html +mit + +// mitsubishi : Mitsubishi Corporation +// https://www.iana.org/domains/root/db/mitsubishi.html +mitsubishi + +// mlb : MLB Advanced Media DH, LLC +// https://www.iana.org/domains/root/db/mlb.html +mlb + +// mls : The Canadian Real Estate Association +// https://www.iana.org/domains/root/db/mls.html +mls + +// mma : MMA IARD +// https://www.iana.org/domains/root/db/mma.html +mma + +// mobile : Dish DBS Corporation +// https://www.iana.org/domains/root/db/mobile.html +mobile + +// moda : Dog Beach, LLC +// https://www.iana.org/domains/root/db/moda.html +moda + +// moe : Interlink Systems Innovation Institute K.K. +// https://www.iana.org/domains/root/db/moe.html +moe + +// moi : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/moi.html +moi + +// mom : XYZ.COM LLC +// https://www.iana.org/domains/root/db/mom.html +mom + +// monash : Monash University +// https://www.iana.org/domains/root/db/monash.html +monash + +// money : Binky Moon, LLC +// https://www.iana.org/domains/root/db/money.html +money + +// monster : XYZ.COM LLC +// https://www.iana.org/domains/root/db/monster.html +monster + +// mormon : IRI Domain Management, LLC +// https://www.iana.org/domains/root/db/mormon.html +mormon + +// mortgage : Dog Beach, LLC +// https://www.iana.org/domains/root/db/mortgage.html +mortgage + +// moscow : Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +// https://www.iana.org/domains/root/db/moscow.html +moscow + +// moto : Motorola Trademark Holdings, LLC +// https://www.iana.org/domains/root/db/moto.html +moto + +// motorcycles : XYZ.COM LLC +// https://www.iana.org/domains/root/db/motorcycles.html +motorcycles + +// mov : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/mov.html +mov + +// movie : Binky Moon, LLC +// https://www.iana.org/domains/root/db/movie.html +movie + +// msd : MSD Registry Holdings, Inc. +// https://www.iana.org/domains/root/db/msd.html +msd + +// mtn : MTN Dubai Limited +// https://www.iana.org/domains/root/db/mtn.html +mtn + +// mtr : MTR Corporation Limited +// https://www.iana.org/domains/root/db/mtr.html +mtr + +// music : DotMusic Limited +// https://www.iana.org/domains/root/db/music.html +music + +// nab : National Australia Bank Limited +// https://www.iana.org/domains/root/db/nab.html +nab + +// nagoya : GMO Registry, Inc. +// https://www.iana.org/domains/root/db/nagoya.html +nagoya + +// navy : Dog Beach, LLC +// https://www.iana.org/domains/root/db/navy.html +navy + +// nba : NBA REGISTRY, LLC +// https://www.iana.org/domains/root/db/nba.html +nba + +// nec : NEC Corporation +// https://www.iana.org/domains/root/db/nec.html +nec + +// netbank : COMMONWEALTH BANK OF AUSTRALIA +// https://www.iana.org/domains/root/db/netbank.html +netbank + +// netflix : Netflix, Inc. +// https://www.iana.org/domains/root/db/netflix.html +netflix + +// network : Binky Moon, LLC +// https://www.iana.org/domains/root/db/network.html +network + +// neustar : NeuStar, Inc. +// https://www.iana.org/domains/root/db/neustar.html +neustar + +// new : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/new.html +new + +// news : Dog Beach, LLC +// https://www.iana.org/domains/root/db/news.html +news + +// next : Next plc +// https://www.iana.org/domains/root/db/next.html +next + +// nextdirect : Next plc +// https://www.iana.org/domains/root/db/nextdirect.html +nextdirect + +// nexus : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/nexus.html +nexus + +// nfl : NFL Reg Ops LLC +// https://www.iana.org/domains/root/db/nfl.html +nfl + +// ngo : Public Interest Registry +// https://www.iana.org/domains/root/db/ngo.html +ngo + +// nhk : Japan Broadcasting Corporation (NHK) +// https://www.iana.org/domains/root/db/nhk.html +nhk + +// nico : DWANGO Co., Ltd. +// https://www.iana.org/domains/root/db/nico.html +nico + +// nike : NIKE, Inc. +// https://www.iana.org/domains/root/db/nike.html +nike + +// nikon : NIKON CORPORATION +// https://www.iana.org/domains/root/db/nikon.html +nikon + +// ninja : Dog Beach, LLC +// https://www.iana.org/domains/root/db/ninja.html +ninja + +// nissan : NISSAN MOTOR CO., LTD. +// https://www.iana.org/domains/root/db/nissan.html +nissan + +// nissay : Nippon Life Insurance Company +// https://www.iana.org/domains/root/db/nissay.html +nissay + +// nokia : Nokia Corporation +// https://www.iana.org/domains/root/db/nokia.html +nokia + +// norton : Gen Digital Inc. +// https://www.iana.org/domains/root/db/norton.html +norton + +// now : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/now.html +now + +// nowruz +// https://www.iana.org/domains/root/db/nowruz.html +nowruz + +// nowtv : Starbucks (HK) Limited +// https://www.iana.org/domains/root/db/nowtv.html +nowtv + +// nra : National Rifle Association of America +// https://www.iana.org/domains/root/db/nra.html +nra + +// nrw : Minds + Machines GmbH +// https://www.iana.org/domains/root/db/nrw.html +nrw + +// ntt : NIPPON TELEGRAPH AND TELEPHONE CORPORATION +// https://www.iana.org/domains/root/db/ntt.html +ntt + +// nyc : The City of New York by and through the New York City Department of Information Technology & Telecommunications +// https://www.iana.org/domains/root/db/nyc.html +nyc + +// obi : OBI Group Holding SE & Co. KGaA +// https://www.iana.org/domains/root/db/obi.html +obi + +// observer : Fegistry, LLC +// https://www.iana.org/domains/root/db/observer.html +observer + +// office : Microsoft Corporation +// https://www.iana.org/domains/root/db/office.html +office + +// okinawa : BRregistry, Inc. +// https://www.iana.org/domains/root/db/okinawa.html +okinawa + +// olayan : Competrol (Luxembourg) Sarl +// https://www.iana.org/domains/root/db/olayan.html +olayan + +// olayangroup : Competrol (Luxembourg) Sarl +// https://www.iana.org/domains/root/db/olayangroup.html +olayangroup + +// ollo : Dish DBS Corporation +// https://www.iana.org/domains/root/db/ollo.html +ollo + +// omega : The Swatch Group Ltd +// https://www.iana.org/domains/root/db/omega.html +omega + +// one : One.com A/S +// https://www.iana.org/domains/root/db/one.html +one + +// ong : Public Interest Registry +// https://www.iana.org/domains/root/db/ong.html +ong + +// onl : iRegistry GmbH +// https://www.iana.org/domains/root/db/onl.html +onl + +// online : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/online.html +online + +// ooo : INFIBEAM AVENUES LIMITED +// https://www.iana.org/domains/root/db/ooo.html +ooo + +// open : American Express Travel Related Services Company, Inc. +// https://www.iana.org/domains/root/db/open.html +open + +// oracle : Oracle Corporation +// https://www.iana.org/domains/root/db/oracle.html +oracle + +// orange : Orange Brand Services Limited +// https://www.iana.org/domains/root/db/orange.html +orange + +// organic : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/organic.html +organic + +// origins : The Estée Lauder Companies Inc. +// https://www.iana.org/domains/root/db/origins.html +origins + +// osaka : Osaka Registry Co., Ltd. +// https://www.iana.org/domains/root/db/osaka.html +osaka + +// otsuka : Otsuka Holdings Co., Ltd. +// https://www.iana.org/domains/root/db/otsuka.html +otsuka + +// ott : Dish DBS Corporation +// https://www.iana.org/domains/root/db/ott.html +ott + +// ovh : MédiaBC +// https://www.iana.org/domains/root/db/ovh.html +ovh + +// page : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/page.html +page + +// panasonic : Panasonic Holdings Corporation +// https://www.iana.org/domains/root/db/panasonic.html +panasonic + +// paris : City of Paris +// https://www.iana.org/domains/root/db/paris.html +paris + +// pars +// https://www.iana.org/domains/root/db/pars.html +pars + +// partners : Binky Moon, LLC +// https://www.iana.org/domains/root/db/partners.html +partners + +// parts : Binky Moon, LLC +// https://www.iana.org/domains/root/db/parts.html +parts + +// party : Blue Sky Registry Limited +// https://www.iana.org/domains/root/db/party.html +party + +// pay : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/pay.html +pay + +// pccw : PCCW Enterprises Limited +// https://www.iana.org/domains/root/db/pccw.html +pccw + +// pet : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/pet.html +pet + +// pfizer : Pfizer Inc. +// https://www.iana.org/domains/root/db/pfizer.html +pfizer + +// pharmacy : National Association of Boards of Pharmacy +// https://www.iana.org/domains/root/db/pharmacy.html +pharmacy + +// phd : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/phd.html +phd + +// philips : Koninklijke Philips N.V. +// https://www.iana.org/domains/root/db/philips.html +philips + +// phone : Dish DBS Corporation +// https://www.iana.org/domains/root/db/phone.html +phone + +// photo : Registry Services, LLC +// https://www.iana.org/domains/root/db/photo.html +photo + +// photography : Binky Moon, LLC +// https://www.iana.org/domains/root/db/photography.html +photography + +// photos : Binky Moon, LLC +// https://www.iana.org/domains/root/db/photos.html +photos + +// physio : PhysBiz Pty Ltd +// https://www.iana.org/domains/root/db/physio.html +physio + +// pics : XYZ.COM LLC +// https://www.iana.org/domains/root/db/pics.html +pics + +// pictet : Banque Pictet & Cie SA +// https://www.iana.org/domains/root/db/pictet.html +pictet + +// pictures : Binky Moon, LLC +// https://www.iana.org/domains/root/db/pictures.html +pictures + +// pid : Top Level Spectrum, Inc. +// https://www.iana.org/domains/root/db/pid.html +pid + +// pin : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/pin.html +pin + +// ping : Ping Registry Provider, Inc. +// https://www.iana.org/domains/root/db/ping.html +ping + +// pink : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/pink.html +pink + +// pioneer : Pioneer Corporation +// https://www.iana.org/domains/root/db/pioneer.html +pioneer + +// pizza : Binky Moon, LLC +// https://www.iana.org/domains/root/db/pizza.html +pizza + +// place : Binky Moon, LLC +// https://www.iana.org/domains/root/db/place.html +place + +// play : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/play.html +play + +// playstation : Sony Interactive Entertainment Inc. +// https://www.iana.org/domains/root/db/playstation.html +playstation + +// plumbing : Binky Moon, LLC +// https://www.iana.org/domains/root/db/plumbing.html +plumbing + +// plus : Binky Moon, LLC +// https://www.iana.org/domains/root/db/plus.html +plus + +// pnc : PNC Domain Co., LLC +// https://www.iana.org/domains/root/db/pnc.html +pnc + +// pohl : Deutsche Vermögensberatung Aktiengesellschaft DVAG +// https://www.iana.org/domains/root/db/pohl.html +pohl + +// poker : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/poker.html +poker + +// politie : Politie Nederland +// https://www.iana.org/domains/root/db/politie.html +politie + +// porn : ICM Registry PN LLC +// https://www.iana.org/domains/root/db/porn.html +porn + +// praxi : Praxi S.p.A. +// https://www.iana.org/domains/root/db/praxi.html +praxi + +// press : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/press.html +press + +// prime : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/prime.html +prime + +// prod : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/prod.html +prod + +// productions : Binky Moon, LLC +// https://www.iana.org/domains/root/db/productions.html +productions + +// prof : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/prof.html +prof + +// progressive : Progressive Casualty Insurance Company +// https://www.iana.org/domains/root/db/progressive.html +progressive + +// promo : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/promo.html +promo + +// properties : Binky Moon, LLC +// https://www.iana.org/domains/root/db/properties.html +properties + +// property : Digital Property Infrastructure Limited +// https://www.iana.org/domains/root/db/property.html +property + +// protection : XYZ.COM LLC +// https://www.iana.org/domains/root/db/protection.html +protection + +// pru : Prudential Financial, Inc. +// https://www.iana.org/domains/root/db/pru.html +pru + +// prudential : Prudential Financial, Inc. +// https://www.iana.org/domains/root/db/prudential.html +prudential + +// pub : Dog Beach, LLC +// https://www.iana.org/domains/root/db/pub.html +pub + +// pwc : PricewaterhouseCoopers LLP +// https://www.iana.org/domains/root/db/pwc.html +pwc + +// qpon : dotQPON LLC +// https://www.iana.org/domains/root/db/qpon.html +qpon + +// quebec : PointQuébec Inc +// https://www.iana.org/domains/root/db/quebec.html +quebec + +// quest : XYZ.COM LLC +// https://www.iana.org/domains/root/db/quest.html +quest + +// racing : Premier Registry Limited +// https://www.iana.org/domains/root/db/racing.html +racing + +// radio : European Broadcasting Union (EBU) +// https://www.iana.org/domains/root/db/radio.html +radio + +// read : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/read.html +read + +// realestate : dotRealEstate LLC +// https://www.iana.org/domains/root/db/realestate.html +realestate + +// realtor : Real Estate Domains LLC +// https://www.iana.org/domains/root/db/realtor.html +realtor + +// realty : Waterford Limited +// https://www.iana.org/domains/root/db/realty.html +realty + +// recipes : Binky Moon, LLC +// https://www.iana.org/domains/root/db/recipes.html +recipes + +// red : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/red.html +red + +// redumbrella : Travelers TLD, LLC +// https://www.iana.org/domains/root/db/redumbrella.html +redumbrella + +// rehab : Dog Beach, LLC +// https://www.iana.org/domains/root/db/rehab.html +rehab + +// reise : Binky Moon, LLC +// https://www.iana.org/domains/root/db/reise.html +reise + +// reisen : Binky Moon, LLC +// https://www.iana.org/domains/root/db/reisen.html +reisen + +// reit : National Association of Real Estate Investment Trusts, Inc. +// https://www.iana.org/domains/root/db/reit.html +reit + +// reliance : Reliance Industries Limited +// https://www.iana.org/domains/root/db/reliance.html +reliance + +// ren : ZDNS International Limited +// https://www.iana.org/domains/root/db/ren.html +ren + +// rent : XYZ.COM LLC +// https://www.iana.org/domains/root/db/rent.html +rent + +// rentals : Binky Moon, LLC +// https://www.iana.org/domains/root/db/rentals.html +rentals + +// repair : Binky Moon, LLC +// https://www.iana.org/domains/root/db/repair.html +repair + +// report : Binky Moon, LLC +// https://www.iana.org/domains/root/db/report.html +report + +// republican : Dog Beach, LLC +// https://www.iana.org/domains/root/db/republican.html +republican + +// rest : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable +// https://www.iana.org/domains/root/db/rest.html +rest + +// restaurant : Binky Moon, LLC +// https://www.iana.org/domains/root/db/restaurant.html +restaurant + +// review : dot Review Limited +// https://www.iana.org/domains/root/db/review.html +review + +// reviews : Dog Beach, LLC +// https://www.iana.org/domains/root/db/reviews.html +reviews + +// rexroth : Robert Bosch GMBH +// https://www.iana.org/domains/root/db/rexroth.html +rexroth + +// rich : iRegistry GmbH +// https://www.iana.org/domains/root/db/rich.html +rich + +// richardli : Pacific Century Asset Management (HK) Limited +// https://www.iana.org/domains/root/db/richardli.html +richardli + +// ricoh : Ricoh Company, Ltd. +// https://www.iana.org/domains/root/db/ricoh.html +ricoh + +// ril : Reliance Industries Limited +// https://www.iana.org/domains/root/db/ril.html +ril + +// rio : Empresa Municipal de Informática SA - IPLANRIO +// https://www.iana.org/domains/root/db/rio.html +rio + +// rip : Dog Beach, LLC +// https://www.iana.org/domains/root/db/rip.html +rip + +// rocks : Dog Beach, LLC +// https://www.iana.org/domains/root/db/rocks.html +rocks + +// rodeo : Registry Services, LLC +// https://www.iana.org/domains/root/db/rodeo.html +rodeo + +// rogers : Rogers Communications Canada Inc. +// https://www.iana.org/domains/root/db/rogers.html +rogers + +// room : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/room.html +room + +// rsvp : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/rsvp.html +rsvp + +// rugby : World Rugby Strategic Developments Limited +// https://www.iana.org/domains/root/db/rugby.html +rugby + +// ruhr : dotSaarland GmbH +// https://www.iana.org/domains/root/db/ruhr.html +ruhr + +// run : Binky Moon, LLC +// https://www.iana.org/domains/root/db/run.html +run + +// rwe : RWE AG +// https://www.iana.org/domains/root/db/rwe.html +rwe + +// ryukyu : BRregistry, Inc. +// https://www.iana.org/domains/root/db/ryukyu.html +ryukyu + +// saarland : dotSaarland GmbH +// https://www.iana.org/domains/root/db/saarland.html +saarland + +// safe : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/safe.html +safe + +// safety : Safety Registry Services, LLC. +// https://www.iana.org/domains/root/db/safety.html +safety + +// sakura : SAKURA Internet Inc. +// https://www.iana.org/domains/root/db/sakura.html +sakura + +// sale : Dog Beach, LLC +// https://www.iana.org/domains/root/db/sale.html +sale + +// salon : Binky Moon, LLC +// https://www.iana.org/domains/root/db/salon.html +salon + +// samsclub : Wal-Mart Stores, Inc. +// https://www.iana.org/domains/root/db/samsclub.html +samsclub + +// samsung : SAMSUNG SDS CO., LTD +// https://www.iana.org/domains/root/db/samsung.html +samsung + +// sandvik : Sandvik AB +// https://www.iana.org/domains/root/db/sandvik.html +sandvik + +// sandvikcoromant : Sandvik AB +// https://www.iana.org/domains/root/db/sandvikcoromant.html +sandvikcoromant + +// sanofi : Sanofi +// https://www.iana.org/domains/root/db/sanofi.html +sanofi + +// sap : SAP AG +// https://www.iana.org/domains/root/db/sap.html +sap + +// sarl : Binky Moon, LLC +// https://www.iana.org/domains/root/db/sarl.html +sarl + +// sas : Research IP LLC +// https://www.iana.org/domains/root/db/sas.html +sas + +// save : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/save.html +save + +// saxo : Saxo Bank A/S +// https://www.iana.org/domains/root/db/saxo.html +saxo + +// sbi : STATE BANK OF INDIA +// https://www.iana.org/domains/root/db/sbi.html +sbi + +// sbs : ShortDot SA +// https://www.iana.org/domains/root/db/sbs.html +sbs + +// scb : The Siam Commercial Bank Public Company Limited ("SCB") +// https://www.iana.org/domains/root/db/scb.html +scb + +// schaeffler : Schaeffler Technologies AG & Co. KG +// https://www.iana.org/domains/root/db/schaeffler.html +schaeffler + +// schmidt : SCHMIDT GROUPE S.A.S. +// https://www.iana.org/domains/root/db/schmidt.html +schmidt + +// scholarships : Scholarships.com, LLC +// https://www.iana.org/domains/root/db/scholarships.html +scholarships + +// school : Binky Moon, LLC +// https://www.iana.org/domains/root/db/school.html +school + +// schule : Binky Moon, LLC +// https://www.iana.org/domains/root/db/schule.html +schule + +// schwarz : Schwarz Domains und Services GmbH & Co. KG +// https://www.iana.org/domains/root/db/schwarz.html +schwarz + +// science : dot Science Limited +// https://www.iana.org/domains/root/db/science.html +science + +// scot : Dot Scot Registry Limited +// https://www.iana.org/domains/root/db/scot.html +scot + +// search : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/search.html +search + +// seat : SEAT, S.A. (Sociedad Unipersonal) +// https://www.iana.org/domains/root/db/seat.html +seat + +// secure : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/secure.html +secure + +// security : XYZ.COM LLC +// https://www.iana.org/domains/root/db/security.html +security + +// seek : Seek Limited +// https://www.iana.org/domains/root/db/seek.html +seek + +// select : Registry Services, LLC +// https://www.iana.org/domains/root/db/select.html +select + +// sener : Sener Ingeniería y Sistemas, S.A. +// https://www.iana.org/domains/root/db/sener.html +sener + +// services : Binky Moon, LLC +// https://www.iana.org/domains/root/db/services.html +services + +// seven : Seven West Media Ltd +// https://www.iana.org/domains/root/db/seven.html +seven + +// sew : SEW-EURODRIVE GmbH & Co KG +// https://www.iana.org/domains/root/db/sew.html +sew + +// sex : ICM Registry SX LLC +// https://www.iana.org/domains/root/db/sex.html +sex + +// sexy : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/sexy.html +sexy + +// sfr : Societe Francaise du Radiotelephone - SFR +// https://www.iana.org/domains/root/db/sfr.html +sfr + +// shangrila : Shangri‐La International Hotel Management Limited +// https://www.iana.org/domains/root/db/shangrila.html +shangrila + +// sharp : Sharp Corporation +// https://www.iana.org/domains/root/db/sharp.html +sharp + +// shell : Shell Information Technology International Inc +// https://www.iana.org/domains/root/db/shell.html +shell + +// shia +// https://www.iana.org/domains/root/db/shia.html +shia + +// shiksha : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/shiksha.html +shiksha + +// shoes : Binky Moon, LLC +// https://www.iana.org/domains/root/db/shoes.html +shoes + +// shop : GMO Registry, Inc. +// https://www.iana.org/domains/root/db/shop.html +shop + +// shopping : Binky Moon, LLC +// https://www.iana.org/domains/root/db/shopping.html +shopping + +// shouji : Beijing Qihu Keji Co., Ltd. +// https://www.iana.org/domains/root/db/shouji.html +shouji + +// show : Binky Moon, LLC +// https://www.iana.org/domains/root/db/show.html +show + +// silk : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/silk.html +silk + +// sina : Sina Corporation +// https://www.iana.org/domains/root/db/sina.html +sina + +// singles : Binky Moon, LLC +// https://www.iana.org/domains/root/db/singles.html +singles + +// site : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/site.html +site + +// ski : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/ski.html +ski + +// skin : XYZ.COM LLC +// https://www.iana.org/domains/root/db/skin.html +skin + +// sky : Sky UK Limited +// https://www.iana.org/domains/root/db/sky.html +sky + +// skype : Microsoft Corporation +// https://www.iana.org/domains/root/db/skype.html +skype + +// sling : DISH Technologies L.L.C. +// https://www.iana.org/domains/root/db/sling.html +sling + +// smart : Smart Communications, Inc. (SMART) +// https://www.iana.org/domains/root/db/smart.html +smart + +// smile : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/smile.html +smile + +// sncf : Société Nationale SNCF +// https://www.iana.org/domains/root/db/sncf.html +sncf + +// soccer : Binky Moon, LLC +// https://www.iana.org/domains/root/db/soccer.html +soccer + +// social : Dog Beach, LLC +// https://www.iana.org/domains/root/db/social.html +social + +// softbank : SoftBank Group Corp. +// https://www.iana.org/domains/root/db/softbank.html +softbank + +// software : Dog Beach, LLC +// https://www.iana.org/domains/root/db/software.html +software + +// sohu : Sohu.com Limited +// https://www.iana.org/domains/root/db/sohu.html +sohu + +// solar : Binky Moon, LLC +// https://www.iana.org/domains/root/db/solar.html +solar + +// solutions : Binky Moon, LLC +// https://www.iana.org/domains/root/db/solutions.html +solutions + +// song : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/song.html +song + +// sony : Sony Corporation +// https://www.iana.org/domains/root/db/sony.html +sony + +// soy : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/soy.html +soy + +// spa : Asia Spa and Wellness Promotion Council Limited +// https://www.iana.org/domains/root/db/spa.html +spa + +// space : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/space.html +space + +// sport : SportAccord +// https://www.iana.org/domains/root/db/sport.html +sport + +// spot : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/spot.html +spot + +// srl : InterNetX, Corp +// https://www.iana.org/domains/root/db/srl.html +srl + +// stada : STADA Arzneimittel AG +// https://www.iana.org/domains/root/db/stada.html +stada + +// staples : Staples, Inc. +// https://www.iana.org/domains/root/db/staples.html +staples + +// star : Star India Private Limited +// https://www.iana.org/domains/root/db/star.html +star + +// statebank : STATE BANK OF INDIA +// https://www.iana.org/domains/root/db/statebank.html +statebank + +// statefarm : State Farm Mutual Automobile Insurance Company +// https://www.iana.org/domains/root/db/statefarm.html +statefarm + +// stc : Saudi Telecom Company +// https://www.iana.org/domains/root/db/stc.html +stc + +// stcgroup : Saudi Telecom Company +// https://www.iana.org/domains/root/db/stcgroup.html +stcgroup + +// stockholm : Stockholms kommun +// https://www.iana.org/domains/root/db/stockholm.html +stockholm + +// storage : XYZ.COM LLC +// https://www.iana.org/domains/root/db/storage.html +storage + +// store : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/store.html +store + +// stream : dot Stream Limited +// https://www.iana.org/domains/root/db/stream.html +stream + +// studio : Dog Beach, LLC +// https://www.iana.org/domains/root/db/studio.html +studio + +// study : Registry Services, LLC +// https://www.iana.org/domains/root/db/study.html +study + +// style : Binky Moon, LLC +// https://www.iana.org/domains/root/db/style.html +style + +// sucks : Vox Populi Registry Ltd. +// https://www.iana.org/domains/root/db/sucks.html +sucks + +// supplies : Binky Moon, LLC +// https://www.iana.org/domains/root/db/supplies.html +supplies + +// supply : Binky Moon, LLC +// https://www.iana.org/domains/root/db/supply.html +supply + +// support : Binky Moon, LLC +// https://www.iana.org/domains/root/db/support.html +support + +// surf : Registry Services, LLC +// https://www.iana.org/domains/root/db/surf.html +surf + +// surgery : Binky Moon, LLC +// https://www.iana.org/domains/root/db/surgery.html +surgery + +// suzuki : SUZUKI MOTOR CORPORATION +// https://www.iana.org/domains/root/db/suzuki.html +suzuki + +// swatch : The Swatch Group Ltd +// https://www.iana.org/domains/root/db/swatch.html +swatch + +// swiss : Swiss Confederation +// https://www.iana.org/domains/root/db/swiss.html +swiss + +// sydney : State of New South Wales, Department of Premier and Cabinet +// https://www.iana.org/domains/root/db/sydney.html +sydney + +// systems : Binky Moon, LLC +// https://www.iana.org/domains/root/db/systems.html +systems + +// tab : Tabcorp Holdings Limited +// https://www.iana.org/domains/root/db/tab.html +tab + +// taipei : Taipei City Government +// https://www.iana.org/domains/root/db/taipei.html +taipei + +// talk : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/talk.html +talk + +// taobao : Alibaba Group Holding Limited +// https://www.iana.org/domains/root/db/taobao.html +taobao + +// target : Target Domain Holdings, LLC +// https://www.iana.org/domains/root/db/target.html +target + +// tatamotors : Tata Motors Ltd +// https://www.iana.org/domains/root/db/tatamotors.html +tatamotors + +// tatar : Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic" +// https://www.iana.org/domains/root/db/tatar.html +tatar + +// tattoo : Registry Services, LLC +// https://www.iana.org/domains/root/db/tattoo.html +tattoo + +// tax : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tax.html +tax + +// taxi : Binky Moon, LLC +// https://www.iana.org/domains/root/db/taxi.html +taxi + +// tci +// https://www.iana.org/domains/root/db/tci.html +tci + +// tdk : TDK Corporation +// https://www.iana.org/domains/root/db/tdk.html +tdk + +// team : Binky Moon, LLC +// https://www.iana.org/domains/root/db/team.html +team + +// tech : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/tech.html +tech + +// technology : Binky Moon, LLC +// https://www.iana.org/domains/root/db/technology.html +technology + +// temasek : Temasek Holdings (Private) Limited +// https://www.iana.org/domains/root/db/temasek.html +temasek + +// tennis : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tennis.html +tennis + +// teva : Teva Pharmaceutical Industries Limited +// https://www.iana.org/domains/root/db/teva.html +teva + +// thd : Home Depot Product Authority, LLC +// https://www.iana.org/domains/root/db/thd.html +thd + +// theater : Binky Moon, LLC +// https://www.iana.org/domains/root/db/theater.html +theater + +// theatre : XYZ.COM LLC +// https://www.iana.org/domains/root/db/theatre.html +theatre + +// tiaa : Teachers Insurance and Annuity Association of America +// https://www.iana.org/domains/root/db/tiaa.html +tiaa + +// tickets : XYZ.COM LLC +// https://www.iana.org/domains/root/db/tickets.html +tickets + +// tienda : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tienda.html +tienda + +// tips : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tips.html +tips + +// tires : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tires.html +tires + +// tirol : punkt Tirol GmbH +// https://www.iana.org/domains/root/db/tirol.html +tirol + +// tjmaxx : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/tjmaxx.html +tjmaxx + +// tjx : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/tjx.html +tjx + +// tkmaxx : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/tkmaxx.html +tkmaxx + +// tmall : Alibaba Group Holding Limited +// https://www.iana.org/domains/root/db/tmall.html +tmall + +// today : Binky Moon, LLC +// https://www.iana.org/domains/root/db/today.html +today + +// tokyo : GMO Registry, Inc. +// https://www.iana.org/domains/root/db/tokyo.html +tokyo + +// tools : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tools.html +tools + +// top : .TOP Registry +// https://www.iana.org/domains/root/db/top.html +top + +// toray : Toray Industries, Inc. +// https://www.iana.org/domains/root/db/toray.html +toray + +// toshiba : TOSHIBA Corporation +// https://www.iana.org/domains/root/db/toshiba.html +toshiba + +// total : TotalEnergies SE +// https://www.iana.org/domains/root/db/total.html +total + +// tours : Binky Moon, LLC +// https://www.iana.org/domains/root/db/tours.html +tours + +// town : Binky Moon, LLC +// https://www.iana.org/domains/root/db/town.html +town + +// toyota : TOYOTA MOTOR CORPORATION +// https://www.iana.org/domains/root/db/toyota.html +toyota + +// toys : Binky Moon, LLC +// https://www.iana.org/domains/root/db/toys.html +toys + +// trade : Elite Registry Limited +// https://www.iana.org/domains/root/db/trade.html +trade + +// trading : Dog Beach, LLC +// https://www.iana.org/domains/root/db/trading.html +trading + +// training : Binky Moon, LLC +// https://www.iana.org/domains/root/db/training.html +training + +// travel : Dog Beach, LLC +// https://www.iana.org/domains/root/db/travel.html +travel + +// travelers : Travelers TLD, LLC +// https://www.iana.org/domains/root/db/travelers.html +travelers + +// travelersinsurance : Travelers TLD, LLC +// https://www.iana.org/domains/root/db/travelersinsurance.html +travelersinsurance + +// trust : Internet Naming Company LLC +// https://www.iana.org/domains/root/db/trust.html +trust + +// trv : Travelers TLD, LLC +// https://www.iana.org/domains/root/db/trv.html +trv + +// tube : Latin American Telecom LLC +// https://www.iana.org/domains/root/db/tube.html +tube + +// tui : TUI AG +// https://www.iana.org/domains/root/db/tui.html +tui + +// tunes : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/tunes.html +tunes + +// tushu : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/tushu.html +tushu + +// tvs : T V SUNDRAM IYENGAR & SONS LIMITED +// https://www.iana.org/domains/root/db/tvs.html +tvs + +// ubank : National Australia Bank Limited +// https://www.iana.org/domains/root/db/ubank.html +ubank + +// ubs : UBS AG +// https://www.iana.org/domains/root/db/ubs.html +ubs + +// unicom : China United Network Communications Corporation Limited +// https://www.iana.org/domains/root/db/unicom.html +unicom + +// university : Binky Moon, LLC +// https://www.iana.org/domains/root/db/university.html +university + +// uno : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/uno.html +uno + +// uol : UBN INTERNET LTDA. +// https://www.iana.org/domains/root/db/uol.html +uol + +// ups : UPS Market Driver, Inc. +// https://www.iana.org/domains/root/db/ups.html +ups + +// vacations : Binky Moon, LLC +// https://www.iana.org/domains/root/db/vacations.html +vacations + +// vana : D3 Registry LLC +// https://www.iana.org/domains/root/db/vana.html +vana + +// vanguard : The Vanguard Group, Inc. +// https://www.iana.org/domains/root/db/vanguard.html +vanguard + +// vegas : Dot Vegas, Inc. +// https://www.iana.org/domains/root/db/vegas.html +vegas + +// ventures : Binky Moon, LLC +// https://www.iana.org/domains/root/db/ventures.html +ventures + +// verisign : VeriSign, Inc. +// https://www.iana.org/domains/root/db/verisign.html +verisign + +// versicherung : tldbox GmbH +// https://www.iana.org/domains/root/db/versicherung.html +versicherung + +// vet : Dog Beach, LLC +// https://www.iana.org/domains/root/db/vet.html +vet + +// viajes : Binky Moon, LLC +// https://www.iana.org/domains/root/db/viajes.html +viajes + +// video : Dog Beach, LLC +// https://www.iana.org/domains/root/db/video.html +video + +// vig : VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe +// https://www.iana.org/domains/root/db/vig.html +vig + +// viking : Viking River Cruises (Bermuda) Ltd. +// https://www.iana.org/domains/root/db/viking.html +viking + +// villas : Binky Moon, LLC +// https://www.iana.org/domains/root/db/villas.html +villas + +// vin : Binky Moon, LLC +// https://www.iana.org/domains/root/db/vin.html +vin + +// vip : Registry Services, LLC +// https://www.iana.org/domains/root/db/vip.html +vip + +// virgin : Virgin Enterprises Limited +// https://www.iana.org/domains/root/db/virgin.html +virgin + +// visa : Visa Worldwide Pte. Limited +// https://www.iana.org/domains/root/db/visa.html +visa + +// vision : Binky Moon, LLC +// https://www.iana.org/domains/root/db/vision.html +vision + +// viva : Saudi Telecom Company +// https://www.iana.org/domains/root/db/viva.html +viva + +// vivo : Telefonica Brasil S.A. +// https://www.iana.org/domains/root/db/vivo.html +vivo + +// vlaanderen : DNS.be vzw +// https://www.iana.org/domains/root/db/vlaanderen.html +vlaanderen + +// vodka : Registry Services, LLC +// https://www.iana.org/domains/root/db/vodka.html +vodka + +// volvo : Volvo Holding Sverige Aktiebolag +// https://www.iana.org/domains/root/db/volvo.html +volvo + +// vote : Monolith Registry LLC +// https://www.iana.org/domains/root/db/vote.html +vote + +// voting : Valuetainment Corp. +// https://www.iana.org/domains/root/db/voting.html +voting + +// voto : Monolith Registry LLC +// https://www.iana.org/domains/root/db/voto.html +voto + +// voyage : Binky Moon, LLC +// https://www.iana.org/domains/root/db/voyage.html +voyage + +// wales : Nominet UK +// https://www.iana.org/domains/root/db/wales.html +wales + +// walmart : Wal-Mart Stores, Inc. +// https://www.iana.org/domains/root/db/walmart.html +walmart + +// walter : Sandvik AB +// https://www.iana.org/domains/root/db/walter.html +walter + +// wang : Zodiac Wang Limited +// https://www.iana.org/domains/root/db/wang.html +wang + +// wanggou : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/wanggou.html +wanggou + +// watch : Binky Moon, LLC +// https://www.iana.org/domains/root/db/watch.html +watch + +// watches : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/watches.html +watches + +// weather : International Business Machines Corporation +// https://www.iana.org/domains/root/db/weather.html +weather + +// weatherchannel : The Weather Company, LLC +// https://www.iana.org/domains/root/db/weatherchannel.html +weatherchannel + +// webcam : dot Webcam Limited +// https://www.iana.org/domains/root/db/webcam.html +webcam + +// weber : Saint-Gobain Weber SA +// https://www.iana.org/domains/root/db/weber.html +weber + +// website : Radix Technologies Inc SEZC +// https://www.iana.org/domains/root/db/website.html +website + +// wed +// https://www.iana.org/domains/root/db/wed.html +wed + +// wedding : Registry Services, LLC +// https://www.iana.org/domains/root/db/wedding.html +wedding + +// weibo : Sina Corporation +// https://www.iana.org/domains/root/db/weibo.html +weibo + +// weir : Weir Group IP Limited +// https://www.iana.org/domains/root/db/weir.html +weir + +// whoswho : Who's Who Registry +// https://www.iana.org/domains/root/db/whoswho.html +whoswho + +// wien : punkt.wien GmbH +// https://www.iana.org/domains/root/db/wien.html +wien + +// wiki : Registry Services, LLC +// https://www.iana.org/domains/root/db/wiki.html +wiki + +// williamhill : William Hill Organization Limited +// https://www.iana.org/domains/root/db/williamhill.html +williamhill + +// win : First Registry Limited +// https://www.iana.org/domains/root/db/win.html +win + +// windows : Microsoft Corporation +// https://www.iana.org/domains/root/db/windows.html +windows + +// wine : Binky Moon, LLC +// https://www.iana.org/domains/root/db/wine.html +wine + +// winners : The TJX Companies, Inc. +// https://www.iana.org/domains/root/db/winners.html +winners + +// wme : William Morris Endeavor Entertainment, LLC +// https://www.iana.org/domains/root/db/wme.html +wme + +// wolterskluwer : Wolters Kluwer N.V. +// https://www.iana.org/domains/root/db/wolterskluwer.html +wolterskluwer + +// woodside : Woodside Petroleum Limited +// https://www.iana.org/domains/root/db/woodside.html +woodside + +// work : Registry Services, LLC +// https://www.iana.org/domains/root/db/work.html +work + +// works : Binky Moon, LLC +// https://www.iana.org/domains/root/db/works.html +works + +// world : Binky Moon, LLC +// https://www.iana.org/domains/root/db/world.html +world + +// wow : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/wow.html +wow + +// wtc : World Trade Centers Association, Inc. +// https://www.iana.org/domains/root/db/wtc.html +wtc + +// wtf : Binky Moon, LLC +// https://www.iana.org/domains/root/db/wtf.html +wtf + +// xbox : Microsoft Corporation +// https://www.iana.org/domains/root/db/xbox.html +xbox + +// xerox : Xerox DNHC LLC +// https://www.iana.org/domains/root/db/xerox.html +xerox + +// xihuan : Beijing Qihu Keji Co., Ltd. +// https://www.iana.org/domains/root/db/xihuan.html +xihuan + +// xin : Elegant Leader Limited +// https://www.iana.org/domains/root/db/xin.html +xin + +// xn--11b4c3d : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--11b4c3d.html +कॉम + +// xn--1ck2e1b : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--1ck2e1b.html +セール + +// xn--1qqw23a : Guangzhou YU Wei Information Technology Co., Ltd. +// https://www.iana.org/domains/root/db/xn--1qqw23a.html +佛山 + +// xn--30rr7y : Excellent First Limited +// https://www.iana.org/domains/root/db/xn--30rr7y.html +慈善 + +// xn--3bst00m : Eagle Horizon Limited +// https://www.iana.org/domains/root/db/xn--3bst00m.html +集团 + +// xn--3ds443g : Beijing TLD Registry Technology Limited +// https://www.iana.org/domains/root/db/xn--3ds443g.html +在线 + +// xn--3pxu8k : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--3pxu8k.html +点看 + +// xn--42c2d9a : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--42c2d9a.html +คอม + +// xn--45q11c : Zodiac Gemini Ltd +// https://www.iana.org/domains/root/db/xn--45q11c.html +八卦 + +// xn--4gbrim : Helium TLDs Ltd +// https://www.iana.org/domains/root/db/xn--4gbrim.html +موقع + +// xn--55qw42g : China Organizational Name Administration Center +// https://www.iana.org/domains/root/db/xn--55qw42g.html +公益 + +// xn--55qx5d : China Internet Network Information Center (CNNIC) +// https://www.iana.org/domains/root/db/xn--55qx5d.html +公司 + +// xn--5su34j936bgsg : Shangri‐La International Hotel Management Limited +// https://www.iana.org/domains/root/db/xn--5su34j936bgsg.html +香格里拉 + +// xn--5tzm5g : Global Website TLD Asia Limited +// https://www.iana.org/domains/root/db/xn--5tzm5g.html +网站 + +// xn--6frz82g : Identity Digital Domains Limited +// https://www.iana.org/domains/root/db/xn--6frz82g.html +移动 + +// xn--6qq986b3xl : Tycoon Treasure Limited +// https://www.iana.org/domains/root/db/xn--6qq986b3xl.html +我爱你 + +// xn--80adxhks : Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) +// https://www.iana.org/domains/root/db/xn--80adxhks.html +москва + +// xn--80aqecdr1a : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +// https://www.iana.org/domains/root/db/xn--80aqecdr1a.html +католик + +// xn--80asehdb : CORE Association +// https://www.iana.org/domains/root/db/xn--80asehdb.html +онлайн + +// xn--80aswg : CORE Association +// https://www.iana.org/domains/root/db/xn--80aswg.html +сайт + +// xn--8y0a063a : China United Network Communications Corporation Limited +// https://www.iana.org/domains/root/db/xn--8y0a063a.html +联通 + +// xn--9dbq2a : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--9dbq2a.html +קום + +// xn--9et52u : RISE VICTORY LIMITED +// https://www.iana.org/domains/root/db/xn--9et52u.html +时尚 + +// xn--9krt00a : Sina Corporation +// https://www.iana.org/domains/root/db/xn--9krt00a.html +微博 + +// xn--b4w605ferd : Temasek Holdings (Private) Limited +// https://www.iana.org/domains/root/db/xn--b4w605ferd.html +淡马锡 + +// xn--bck1b9a5dre4c : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--bck1b9a5dre4c.html +ファッション + +// xn--c1avg : Public Interest Registry +// https://www.iana.org/domains/root/db/xn--c1avg.html +орг + +// xn--c2br7g : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--c2br7g.html +नेट + +// xn--cck2b3b : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--cck2b3b.html +ストア + +// xn--cckwcxetd : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--cckwcxetd.html +アマゾン + +// xn--cg4bki : SAMSUNG SDS CO., LTD +// https://www.iana.org/domains/root/db/xn--cg4bki.html +삼성 + +// xn--czr694b : Internet DotTrademark Organisation Limited +// https://www.iana.org/domains/root/db/xn--czr694b.html +商标 + +// xn--czrs0t : Binky Moon, LLC +// https://www.iana.org/domains/root/db/xn--czrs0t.html +商店 + +// xn--czru2d : Zodiac Aquarius Limited +// https://www.iana.org/domains/root/db/xn--czru2d.html +商城 + +// xn--d1acj3b : The Foundation for Network Initiatives “The Smart Internet” +// https://www.iana.org/domains/root/db/xn--d1acj3b.html +дети + +// xn--eckvdtc9d : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--eckvdtc9d.html +ポイント + +// xn--efvy88h : Guangzhou YU Wei Information Technology Co., Ltd. +// https://www.iana.org/domains/root/db/xn--efvy88h.html +新闻 + +// xn--fct429k : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--fct429k.html +家電 + +// xn--fhbei : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--fhbei.html +كوم + +// xn--fiq228c5hs : TLD REGISTRY LIMITED OY +// https://www.iana.org/domains/root/db/xn--fiq228c5hs.html +中文网 + +// xn--fiq64b : CITIC Group Corporation +// https://www.iana.org/domains/root/db/xn--fiq64b.html +中信 + +// xn--fjq720a : Binky Moon, LLC +// https://www.iana.org/domains/root/db/xn--fjq720a.html +娱乐 + +// xn--flw351e : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/xn--flw351e.html +谷歌 + +// xn--fzys8d69uvgm : PCCW Enterprises Limited +// https://www.iana.org/domains/root/db/xn--fzys8d69uvgm.html +電訊盈科 + +// xn--g2xx48c : Nawang Heli(Xiamen) Network Service Co., LTD. +// https://www.iana.org/domains/root/db/xn--g2xx48c.html +购物 + +// xn--gckr3f0f : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--gckr3f0f.html +クラウド + +// xn--gk3at1e : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--gk3at1e.html +通販 + +// xn--hxt814e : Zodiac Taurus Limited +// https://www.iana.org/domains/root/db/xn--hxt814e.html +网店 + +// xn--i1b6b1a6a2e : Public Interest Registry +// https://www.iana.org/domains/root/db/xn--i1b6b1a6a2e.html +संगठन + +// xn--imr513n : Internet DotTrademark Organisation Limited +// https://www.iana.org/domains/root/db/xn--imr513n.html +餐厅 + +// xn--io0a7i : China Internet Network Information Center (CNNIC) +// https://www.iana.org/domains/root/db/xn--io0a7i.html +网络 + +// xn--j1aef : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--j1aef.html +ком + +// xn--jlq480n2rg : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--jlq480n2rg.html +亚马逊 + +// xn--jvr189m : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--jvr189m.html +食品 + +// xn--kcrx77d1x4a : Koninklijke Philips N.V. +// https://www.iana.org/domains/root/db/xn--kcrx77d1x4a.html +飞利浦 + +// xn--kput3i : Beijing RITT-Net Technology Development Co., Ltd +// https://www.iana.org/domains/root/db/xn--kput3i.html +手机 + +// xn--mgba3a3ejt : Aramco Services Company +// https://www.iana.org/domains/root/db/xn--mgba3a3ejt.html +ارامكو + +// xn--mgba7c0bbn0a : Competrol (Luxembourg) Sarl +// https://www.iana.org/domains/root/db/xn--mgba7c0bbn0a.html +العليان + +// xn--mgbab2bd : CORE Association +// https://www.iana.org/domains/root/db/xn--mgbab2bd.html +بازار + +// xn--mgbca7dzdo : Abu Dhabi Systems and Information Centre +// https://www.iana.org/domains/root/db/xn--mgbca7dzdo.html +ابوظبي + +// xn--mgbi4ecexp : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +// https://www.iana.org/domains/root/db/xn--mgbi4ecexp.html +كاثوليك + +// xn--mgbt3dhd +// https://www.iana.org/domains/root/db/xn--mgbt3dhd.html +همراه + +// xn--mk1bu44c : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--mk1bu44c.html +닷컴 + +// xn--mxtq1m : Net-Chinese Co., Ltd. +// https://www.iana.org/domains/root/db/xn--mxtq1m.html +政府 + +// xn--ngbc5azd : International Domain Registry Pty. Ltd. +// https://www.iana.org/domains/root/db/xn--ngbc5azd.html +شبكة + +// xn--ngbe9e0a : Kuwait Finance House +// https://www.iana.org/domains/root/db/xn--ngbe9e0a.html +بيتك + +// xn--ngbrx : League of Arab States +// https://www.iana.org/domains/root/db/xn--ngbrx.html +عرب + +// xn--nqv7f : Public Interest Registry +// https://www.iana.org/domains/root/db/xn--nqv7f.html +机构 + +// xn--nqv7fs00ema : Public Interest Registry +// https://www.iana.org/domains/root/db/xn--nqv7fs00ema.html +组织机构 + +// xn--nyqy26a : Stable Tone Limited +// https://www.iana.org/domains/root/db/xn--nyqy26a.html +健康 + +// xn--otu796d : Jiang Yu Liang Cai Technology Company Limited +// https://www.iana.org/domains/root/db/xn--otu796d.html +招聘 + +// xn--p1acf : Rusnames Limited +// https://www.iana.org/domains/root/db/xn--p1acf.html +рус + +// xn--pssy2u : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--pssy2u.html +大拿 + +// xn--q9jyb4c : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/xn--q9jyb4c.html +みんな + +// xn--qcka1pmc : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/xn--qcka1pmc.html +グーグル + +// xn--rhqv96g : Stable Tone Limited +// https://www.iana.org/domains/root/db/xn--rhqv96g.html +世界 + +// xn--rovu88b : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/xn--rovu88b.html +書籍 + +// xn--ses554g : KNET Co., Ltd. +// https://www.iana.org/domains/root/db/xn--ses554g.html +网址 + +// xn--t60b56a : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--t60b56a.html +닷넷 + +// xn--tckwe : VeriSign Sarl +// https://www.iana.org/domains/root/db/xn--tckwe.html +コム + +// xn--tiq49xqyj : Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +// https://www.iana.org/domains/root/db/xn--tiq49xqyj.html +天主教 + +// xn--unup4y : Binky Moon, LLC +// https://www.iana.org/domains/root/db/xn--unup4y.html +游戏 + +// xn--vermgensberater-ctb : Deutsche Vermögensberatung Aktiengesellschaft DVAG +// https://www.iana.org/domains/root/db/xn--vermgensberater-ctb.html +vermögensberater + +// xn--vermgensberatung-pwb : Deutsche Vermögensberatung Aktiengesellschaft DVAG +// https://www.iana.org/domains/root/db/xn--vermgensberatung-pwb.html +vermögensberatung + +// xn--vhquv : Binky Moon, LLC +// https://www.iana.org/domains/root/db/xn--vhquv.html +企业 + +// xn--vuq861b : Beijing Tele-info Technology Co., Ltd. +// https://www.iana.org/domains/root/db/xn--vuq861b.html +信息 + +// xn--w4r85el8fhu5dnra : Kerry Trading Co. Limited +// https://www.iana.org/domains/root/db/xn--w4r85el8fhu5dnra.html +嘉里大酒店 + +// xn--w4rs40l : Kerry Trading Co. Limited +// https://www.iana.org/domains/root/db/xn--w4rs40l.html +嘉里 + +// xn--xhq521b : Guangzhou YU Wei Information Technology Co., Ltd. +// https://www.iana.org/domains/root/db/xn--xhq521b.html +广东 + +// xn--zfr164b : China Organizational Name Administration Center +// https://www.iana.org/domains/root/db/xn--zfr164b.html +政务 + +// xyz : XYZ.COM LLC +// https://www.iana.org/domains/root/db/xyz.html +xyz + +// yachts : XYZ.COM LLC +// https://www.iana.org/domains/root/db/yachts.html +yachts + +// yahoo : Yahoo Inc. +// https://www.iana.org/domains/root/db/yahoo.html +yahoo + +// yamaxun : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/yamaxun.html +yamaxun + +// yandex : YANDEX, LLC +// https://www.iana.org/domains/root/db/yandex.html +yandex + +// yodobashi : YODOBASHI CAMERA CO.,LTD. +// https://www.iana.org/domains/root/db/yodobashi.html +yodobashi + +// yoga : Registry Services, LLC +// https://www.iana.org/domains/root/db/yoga.html +yoga + +// yokohama : GMO Registry, Inc. +// https://www.iana.org/domains/root/db/yokohama.html +yokohama + +// you : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/you.html +you + +// youtube : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/youtube.html +youtube + +// yun : Beijing Qihu Keji Co., Ltd. +// https://www.iana.org/domains/root/db/yun.html +yun + +// zappos : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/zappos.html +zappos + +// zara : Industria de Diseño Textil, S.A. (INDITEX, S.A.) +// https://www.iana.org/domains/root/db/zara.html +zara + +// zero : Amazon Registry Services, Inc. +// https://www.iana.org/domains/root/db/zero.html +zero + +// zip : Charleston Road Registry Inc. +// https://www.iana.org/domains/root/db/zip.html +zip + +// zone : Binky Moon, LLC +// https://www.iana.org/domains/root/db/zone.html +zone + +// zuerich : Kanton Zürich (Canton of Zurich) +// https://www.iana.org/domains/root/db/zuerich.html +zuerich + +// ===END ICANN DOMAINS=== + +// ===BEGIN PRIVATE DOMAINS=== + +// (Note: these are in alphabetical order by company name) + +// .KRD : https://nic.krd +co.krd +edu.krd + +// .pl domains (grandfathered) +art.pl +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// 12CHARS : https://12chars.com +// Submitted by Kenny Niehage +12chars.dev +12chars.it +12chars.pro + +// 1GB LLC : https://www.1gb.ua/ +// Submitted by 1GB LLC +cc.ua +inf.ua +ltd.ua + +// 611 blockchain domain name system : https://sixone.one/ +611.to + +// A2 Hosting +// Submitted by Tyler Hall +a2hosted.com +cpserver.com + +// Acorn Labs : https://acorn.io +// Submitted by Craig Jellick +*.on-acorn.io + +// ActiveTrail : https://www.activetrail.biz/ +// Submitted by Ofer Kalaora +activetrail.biz + +// Adaptable.io : https://adaptable.io +// Submitted by Mark Terrel +adaptable.app + +// addr.tools : https://addr.tools/ +// Submitted by Brian Shea +myaddr.dev +myaddr.io +dyn.addr.tools +myaddr.tools + +// Adobe : https://www.adobe.com/ +// Submitted by Ian Boston and Lars Trieloff +adobeaemcloud.com +*.dev.adobeaemcloud.com +aem.live +hlx.live +adobeaemcloud.net +aem.network +aem.page +hlx.page +aem.reviews + +// Adobe Developer Platform : https://developer.adobe.com +// Submitted by Jesse MacFadyen +adobeio-static.net +adobeioruntime.net + +// Africa.com Web Solutions Ltd : https://registry.africa.com +// Submitted by Gavin Brown +africa.com + +// Agnat sp. z o.o. : https://domena.pl +// Submitted by Przemyslaw Plewa +beep.pl + +// Aiven : https://aiven.io/ +// Submitted by Aiven Security Team +aiven.app +aivencloud.com + +// Akamai : https://www.akamai.com/ +// Submitted by Akamai Team +akadns.net +akamai.net +akamai-staging.net +akamaiedge.net +akamaiedge-staging.net +akamaihd.net +akamaihd-staging.net +akamaiorigin.net +akamaiorigin-staging.net +akamaized.net +akamaized-staging.net +edgekey.net +edgekey-staging.net +edgesuite.net +edgesuite-staging.net + +// alboto.ca : http://alboto.ca +// Submitted by Anton Avramov +barsy.ca + +// Alces Software Ltd : http://alces-software.com +// Submitted by Mark J. Titorenko +*.compute.estate +*.alces.network + +// Alibaba Cloud API Gateway +// Submitted by Alibaba Cloud Security +alibabacloudcs.com + +// all-inkl.com : https://all-inkl.com +// Submitted by Werner Kaltofen +kasserver.com + +// Altervista : https://www.altervista.org +// Submitted by Carlo Cannas +altervista.org + +// alwaysdata : https://www.alwaysdata.com +// Submitted by Cyril +alwaysdata.net + +// Amaze Software : https://amaze.co +// Submitted by Domain Admin +myamaze.net + +// Amazon : https://www.amazon.com/ +// Submitted by AWS Security +// Subsections of Amazon/subsidiaries will appear until "concludes" tag + +// Amazon API Gateway +// Submitted by AWS Security +// Reference: 6a4f5a95-8c7d-4077-a7af-9cf1abec0a53 +execute-api.cn-north-1.amazonaws.com.cn +execute-api.cn-northwest-1.amazonaws.com.cn +execute-api.af-south-1.amazonaws.com +execute-api.ap-east-1.amazonaws.com +execute-api.ap-northeast-1.amazonaws.com +execute-api.ap-northeast-2.amazonaws.com +execute-api.ap-northeast-3.amazonaws.com +execute-api.ap-south-1.amazonaws.com +execute-api.ap-south-2.amazonaws.com +execute-api.ap-southeast-1.amazonaws.com +execute-api.ap-southeast-2.amazonaws.com +execute-api.ap-southeast-3.amazonaws.com +execute-api.ap-southeast-4.amazonaws.com +execute-api.ap-southeast-5.amazonaws.com +execute-api.ca-central-1.amazonaws.com +execute-api.ca-west-1.amazonaws.com +execute-api.eu-central-1.amazonaws.com +execute-api.eu-central-2.amazonaws.com +execute-api.eu-north-1.amazonaws.com +execute-api.eu-south-1.amazonaws.com +execute-api.eu-south-2.amazonaws.com +execute-api.eu-west-1.amazonaws.com +execute-api.eu-west-2.amazonaws.com +execute-api.eu-west-3.amazonaws.com +execute-api.il-central-1.amazonaws.com +execute-api.me-central-1.amazonaws.com +execute-api.me-south-1.amazonaws.com +execute-api.sa-east-1.amazonaws.com +execute-api.us-east-1.amazonaws.com +execute-api.us-east-2.amazonaws.com +execute-api.us-gov-east-1.amazonaws.com +execute-api.us-gov-west-1.amazonaws.com +execute-api.us-west-1.amazonaws.com +execute-api.us-west-2.amazonaws.com + +// Amazon CloudFront +// Submitted by Donavan Miller +// Reference: 54144616-fd49-4435-8535-19c6a601bdb3 +cloudfront.net + +// Amazon Cognito +// Submitted by AWS Security +// Reference: e7c02dc1-02f4-4a23-bde3-a8527c830127 +auth.af-south-1.amazoncognito.com +auth.ap-east-1.amazoncognito.com +auth.ap-northeast-1.amazoncognito.com +auth.ap-northeast-2.amazoncognito.com +auth.ap-northeast-3.amazoncognito.com +auth.ap-south-1.amazoncognito.com +auth.ap-south-2.amazoncognito.com +auth.ap-southeast-1.amazoncognito.com +auth.ap-southeast-2.amazoncognito.com +auth.ap-southeast-3.amazoncognito.com +auth.ap-southeast-4.amazoncognito.com +auth.ap-southeast-5.amazoncognito.com +auth.ap-southeast-7.amazoncognito.com +auth.ca-central-1.amazoncognito.com +auth.ca-west-1.amazoncognito.com +auth.eu-central-1.amazoncognito.com +auth.eu-central-2.amazoncognito.com +auth.eu-north-1.amazoncognito.com +auth.eu-south-1.amazoncognito.com +auth.eu-south-2.amazoncognito.com +auth.eu-west-1.amazoncognito.com +auth.eu-west-2.amazoncognito.com +auth.eu-west-3.amazoncognito.com +auth.il-central-1.amazoncognito.com +auth.me-central-1.amazoncognito.com +auth.me-south-1.amazoncognito.com +auth.mx-central-1.amazoncognito.com +auth.sa-east-1.amazoncognito.com +auth.us-east-1.amazoncognito.com +auth-fips.us-east-1.amazoncognito.com +auth.us-east-2.amazoncognito.com +auth-fips.us-east-2.amazoncognito.com +auth-fips.us-gov-east-1.amazoncognito.com +auth-fips.us-gov-west-1.amazoncognito.com +auth.us-west-1.amazoncognito.com +auth-fips.us-west-1.amazoncognito.com +auth.us-west-2.amazoncognito.com +auth-fips.us-west-2.amazoncognito.com + +// Amazon EC2 +// Submitted by Luke Wells +// Reference: 4c38fa71-58ac-4768-99e5-689c1767e537 +*.compute.amazonaws.com.cn +*.compute.amazonaws.com +*.compute-1.amazonaws.com +us-east-1.amazonaws.com + +// Amazon EMR +// Submitted by AWS Security +// Reference: 82f43f9f-bbb8-400e-8349-854f5a62f20d +emrappui-prod.cn-north-1.amazonaws.com.cn +emrnotebooks-prod.cn-north-1.amazonaws.com.cn +emrstudio-prod.cn-north-1.amazonaws.com.cn +emrappui-prod.cn-northwest-1.amazonaws.com.cn +emrnotebooks-prod.cn-northwest-1.amazonaws.com.cn +emrstudio-prod.cn-northwest-1.amazonaws.com.cn +emrappui-prod.af-south-1.amazonaws.com +emrnotebooks-prod.af-south-1.amazonaws.com +emrstudio-prod.af-south-1.amazonaws.com +emrappui-prod.ap-east-1.amazonaws.com +emrnotebooks-prod.ap-east-1.amazonaws.com +emrstudio-prod.ap-east-1.amazonaws.com +emrappui-prod.ap-northeast-1.amazonaws.com +emrnotebooks-prod.ap-northeast-1.amazonaws.com +emrstudio-prod.ap-northeast-1.amazonaws.com +emrappui-prod.ap-northeast-2.amazonaws.com +emrnotebooks-prod.ap-northeast-2.amazonaws.com +emrstudio-prod.ap-northeast-2.amazonaws.com +emrappui-prod.ap-northeast-3.amazonaws.com +emrnotebooks-prod.ap-northeast-3.amazonaws.com +emrstudio-prod.ap-northeast-3.amazonaws.com +emrappui-prod.ap-south-1.amazonaws.com +emrnotebooks-prod.ap-south-1.amazonaws.com +emrstudio-prod.ap-south-1.amazonaws.com +emrappui-prod.ap-south-2.amazonaws.com +emrnotebooks-prod.ap-south-2.amazonaws.com +emrstudio-prod.ap-south-2.amazonaws.com +emrappui-prod.ap-southeast-1.amazonaws.com +emrnotebooks-prod.ap-southeast-1.amazonaws.com +emrstudio-prod.ap-southeast-1.amazonaws.com +emrappui-prod.ap-southeast-2.amazonaws.com +emrnotebooks-prod.ap-southeast-2.amazonaws.com +emrstudio-prod.ap-southeast-2.amazonaws.com +emrappui-prod.ap-southeast-3.amazonaws.com +emrnotebooks-prod.ap-southeast-3.amazonaws.com +emrstudio-prod.ap-southeast-3.amazonaws.com +emrappui-prod.ap-southeast-4.amazonaws.com +emrnotebooks-prod.ap-southeast-4.amazonaws.com +emrstudio-prod.ap-southeast-4.amazonaws.com +emrappui-prod.ca-central-1.amazonaws.com +emrnotebooks-prod.ca-central-1.amazonaws.com +emrstudio-prod.ca-central-1.amazonaws.com +emrappui-prod.ca-west-1.amazonaws.com +emrnotebooks-prod.ca-west-1.amazonaws.com +emrstudio-prod.ca-west-1.amazonaws.com +emrappui-prod.eu-central-1.amazonaws.com +emrnotebooks-prod.eu-central-1.amazonaws.com +emrstudio-prod.eu-central-1.amazonaws.com +emrappui-prod.eu-central-2.amazonaws.com +emrnotebooks-prod.eu-central-2.amazonaws.com +emrstudio-prod.eu-central-2.amazonaws.com +emrappui-prod.eu-north-1.amazonaws.com +emrnotebooks-prod.eu-north-1.amazonaws.com +emrstudio-prod.eu-north-1.amazonaws.com +emrappui-prod.eu-south-1.amazonaws.com +emrnotebooks-prod.eu-south-1.amazonaws.com +emrstudio-prod.eu-south-1.amazonaws.com +emrappui-prod.eu-south-2.amazonaws.com +emrnotebooks-prod.eu-south-2.amazonaws.com +emrstudio-prod.eu-south-2.amazonaws.com +emrappui-prod.eu-west-1.amazonaws.com +emrnotebooks-prod.eu-west-1.amazonaws.com +emrstudio-prod.eu-west-1.amazonaws.com +emrappui-prod.eu-west-2.amazonaws.com +emrnotebooks-prod.eu-west-2.amazonaws.com +emrstudio-prod.eu-west-2.amazonaws.com +emrappui-prod.eu-west-3.amazonaws.com +emrnotebooks-prod.eu-west-3.amazonaws.com +emrstudio-prod.eu-west-3.amazonaws.com +emrappui-prod.il-central-1.amazonaws.com +emrnotebooks-prod.il-central-1.amazonaws.com +emrstudio-prod.il-central-1.amazonaws.com +emrappui-prod.me-central-1.amazonaws.com +emrnotebooks-prod.me-central-1.amazonaws.com +emrstudio-prod.me-central-1.amazonaws.com +emrappui-prod.me-south-1.amazonaws.com +emrnotebooks-prod.me-south-1.amazonaws.com +emrstudio-prod.me-south-1.amazonaws.com +emrappui-prod.sa-east-1.amazonaws.com +emrnotebooks-prod.sa-east-1.amazonaws.com +emrstudio-prod.sa-east-1.amazonaws.com +emrappui-prod.us-east-1.amazonaws.com +emrnotebooks-prod.us-east-1.amazonaws.com +emrstudio-prod.us-east-1.amazonaws.com +emrappui-prod.us-east-2.amazonaws.com +emrnotebooks-prod.us-east-2.amazonaws.com +emrstudio-prod.us-east-2.amazonaws.com +emrappui-prod.us-gov-east-1.amazonaws.com +emrnotebooks-prod.us-gov-east-1.amazonaws.com +emrstudio-prod.us-gov-east-1.amazonaws.com +emrappui-prod.us-gov-west-1.amazonaws.com +emrnotebooks-prod.us-gov-west-1.amazonaws.com +emrstudio-prod.us-gov-west-1.amazonaws.com +emrappui-prod.us-west-1.amazonaws.com +emrnotebooks-prod.us-west-1.amazonaws.com +emrstudio-prod.us-west-1.amazonaws.com +emrappui-prod.us-west-2.amazonaws.com +emrnotebooks-prod.us-west-2.amazonaws.com +emrstudio-prod.us-west-2.amazonaws.com + +// Amazon Managed Workflows for Apache Airflow +// Submitted by AWS Security +// Reference: 2f697e23-58d6-4b97-be6b-77a26e811dad +*.airflow.af-south-1.on.aws +*.airflow.ap-east-1.on.aws +*.airflow.ap-northeast-1.on.aws +*.airflow.ap-northeast-2.on.aws +*.airflow.ap-northeast-3.on.aws +*.airflow.ap-south-1.on.aws +*.airflow.ap-south-2.on.aws +*.airflow.ap-southeast-1.on.aws +*.airflow.ap-southeast-2.on.aws +*.airflow.ap-southeast-3.on.aws +*.airflow.ap-southeast-4.on.aws +*.airflow.ap-southeast-5.on.aws +*.airflow.ca-central-1.on.aws +*.airflow.ca-west-1.on.aws +*.airflow.eu-central-1.on.aws +*.airflow.eu-central-2.on.aws +*.airflow.eu-north-1.on.aws +*.airflow.eu-south-1.on.aws +*.airflow.eu-south-2.on.aws +*.airflow.eu-west-1.on.aws +*.airflow.eu-west-2.on.aws +*.airflow.eu-west-3.on.aws +*.airflow.il-central-1.on.aws +*.airflow.me-central-1.on.aws +*.airflow.me-south-1.on.aws +*.airflow.sa-east-1.on.aws +*.airflow.us-east-1.on.aws +*.airflow.us-east-2.on.aws +*.airflow.us-west-1.on.aws +*.airflow.us-west-2.on.aws +*.cn-north-1.airflow.amazonaws.com.cn +*.cn-northwest-1.airflow.amazonaws.com.cn +*.airflow.cn-north-1.on.amazonwebservices.com.cn +*.airflow.cn-northwest-1.on.amazonwebservices.com.cn +*.af-south-1.airflow.amazonaws.com +*.ap-east-1.airflow.amazonaws.com +*.ap-northeast-1.airflow.amazonaws.com +*.ap-northeast-2.airflow.amazonaws.com +*.ap-northeast-3.airflow.amazonaws.com +*.ap-south-1.airflow.amazonaws.com +*.ap-south-2.airflow.amazonaws.com +*.ap-southeast-1.airflow.amazonaws.com +*.ap-southeast-2.airflow.amazonaws.com +*.ap-southeast-3.airflow.amazonaws.com +*.ap-southeast-4.airflow.amazonaws.com +*.ap-southeast-5.airflow.amazonaws.com +*.ca-central-1.airflow.amazonaws.com +*.ca-west-1.airflow.amazonaws.com +*.eu-central-1.airflow.amazonaws.com +*.eu-central-2.airflow.amazonaws.com +*.eu-north-1.airflow.amazonaws.com +*.eu-south-1.airflow.amazonaws.com +*.eu-south-2.airflow.amazonaws.com +*.eu-west-1.airflow.amazonaws.com +*.eu-west-2.airflow.amazonaws.com +*.eu-west-3.airflow.amazonaws.com +*.il-central-1.airflow.amazonaws.com +*.me-central-1.airflow.amazonaws.com +*.me-south-1.airflow.amazonaws.com +*.sa-east-1.airflow.amazonaws.com +*.us-east-1.airflow.amazonaws.com +*.us-east-2.airflow.amazonaws.com +*.us-west-1.airflow.amazonaws.com +*.us-west-2.airflow.amazonaws.com + +// Amazon S3 +// Submitted by AWS Security +// Reference: ada5c9df-55e1-4195-a1ce-732d6c81e357 +s3.dualstack.cn-north-1.amazonaws.com.cn +s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn +s3-website.dualstack.cn-north-1.amazonaws.com.cn +s3.cn-north-1.amazonaws.com.cn +s3-accesspoint.cn-north-1.amazonaws.com.cn +s3-deprecated.cn-north-1.amazonaws.com.cn +s3-object-lambda.cn-north-1.amazonaws.com.cn +s3-website.cn-north-1.amazonaws.com.cn +s3.dualstack.cn-northwest-1.amazonaws.com.cn +s3-accesspoint.dualstack.cn-northwest-1.amazonaws.com.cn +s3.cn-northwest-1.amazonaws.com.cn +s3-accesspoint.cn-northwest-1.amazonaws.com.cn +s3-object-lambda.cn-northwest-1.amazonaws.com.cn +s3-website.cn-northwest-1.amazonaws.com.cn +s3.dualstack.af-south-1.amazonaws.com +s3-accesspoint.dualstack.af-south-1.amazonaws.com +s3-website.dualstack.af-south-1.amazonaws.com +s3.af-south-1.amazonaws.com +s3-accesspoint.af-south-1.amazonaws.com +s3-object-lambda.af-south-1.amazonaws.com +s3-website.af-south-1.amazonaws.com +s3.dualstack.ap-east-1.amazonaws.com +s3-accesspoint.dualstack.ap-east-1.amazonaws.com +s3.ap-east-1.amazonaws.com +s3-accesspoint.ap-east-1.amazonaws.com +s3-object-lambda.ap-east-1.amazonaws.com +s3-website.ap-east-1.amazonaws.com +s3.dualstack.ap-northeast-1.amazonaws.com +s3-accesspoint.dualstack.ap-northeast-1.amazonaws.com +s3-website.dualstack.ap-northeast-1.amazonaws.com +s3.ap-northeast-1.amazonaws.com +s3-accesspoint.ap-northeast-1.amazonaws.com +s3-object-lambda.ap-northeast-1.amazonaws.com +s3-website.ap-northeast-1.amazonaws.com +s3.dualstack.ap-northeast-2.amazonaws.com +s3-accesspoint.dualstack.ap-northeast-2.amazonaws.com +s3-website.dualstack.ap-northeast-2.amazonaws.com +s3.ap-northeast-2.amazonaws.com +s3-accesspoint.ap-northeast-2.amazonaws.com +s3-object-lambda.ap-northeast-2.amazonaws.com +s3-website.ap-northeast-2.amazonaws.com +s3.dualstack.ap-northeast-3.amazonaws.com +s3-accesspoint.dualstack.ap-northeast-3.amazonaws.com +s3-website.dualstack.ap-northeast-3.amazonaws.com +s3.ap-northeast-3.amazonaws.com +s3-accesspoint.ap-northeast-3.amazonaws.com +s3-object-lambda.ap-northeast-3.amazonaws.com +s3-website.ap-northeast-3.amazonaws.com +s3.dualstack.ap-south-1.amazonaws.com +s3-accesspoint.dualstack.ap-south-1.amazonaws.com +s3-website.dualstack.ap-south-1.amazonaws.com +s3.ap-south-1.amazonaws.com +s3-accesspoint.ap-south-1.amazonaws.com +s3-object-lambda.ap-south-1.amazonaws.com +s3-website.ap-south-1.amazonaws.com +s3.dualstack.ap-south-2.amazonaws.com +s3-accesspoint.dualstack.ap-south-2.amazonaws.com +s3-website.dualstack.ap-south-2.amazonaws.com +s3.ap-south-2.amazonaws.com +s3-accesspoint.ap-south-2.amazonaws.com +s3-object-lambda.ap-south-2.amazonaws.com +s3-website.ap-south-2.amazonaws.com +s3.dualstack.ap-southeast-1.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-1.amazonaws.com +s3-website.dualstack.ap-southeast-1.amazonaws.com +s3.ap-southeast-1.amazonaws.com +s3-accesspoint.ap-southeast-1.amazonaws.com +s3-object-lambda.ap-southeast-1.amazonaws.com +s3-website.ap-southeast-1.amazonaws.com +s3.dualstack.ap-southeast-2.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-2.amazonaws.com +s3-website.dualstack.ap-southeast-2.amazonaws.com +s3.ap-southeast-2.amazonaws.com +s3-accesspoint.ap-southeast-2.amazonaws.com +s3-object-lambda.ap-southeast-2.amazonaws.com +s3-website.ap-southeast-2.amazonaws.com +s3.dualstack.ap-southeast-3.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com +s3-website.dualstack.ap-southeast-3.amazonaws.com +s3.ap-southeast-3.amazonaws.com +s3-accesspoint.ap-southeast-3.amazonaws.com +s3-object-lambda.ap-southeast-3.amazonaws.com +s3-website.ap-southeast-3.amazonaws.com +s3.dualstack.ap-southeast-4.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com +s3-website.dualstack.ap-southeast-4.amazonaws.com +s3.ap-southeast-4.amazonaws.com +s3-accesspoint.ap-southeast-4.amazonaws.com +s3-object-lambda.ap-southeast-4.amazonaws.com +s3-website.ap-southeast-4.amazonaws.com +s3.dualstack.ap-southeast-5.amazonaws.com +s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com +s3-website.dualstack.ap-southeast-5.amazonaws.com +s3.ap-southeast-5.amazonaws.com +s3-accesspoint.ap-southeast-5.amazonaws.com +s3-deprecated.ap-southeast-5.amazonaws.com +s3-object-lambda.ap-southeast-5.amazonaws.com +s3-website.ap-southeast-5.amazonaws.com +s3.dualstack.ca-central-1.amazonaws.com +s3-accesspoint.dualstack.ca-central-1.amazonaws.com +s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com +s3-fips.dualstack.ca-central-1.amazonaws.com +s3-website.dualstack.ca-central-1.amazonaws.com +s3.ca-central-1.amazonaws.com +s3-accesspoint.ca-central-1.amazonaws.com +s3-accesspoint-fips.ca-central-1.amazonaws.com +s3-fips.ca-central-1.amazonaws.com +s3-object-lambda.ca-central-1.amazonaws.com +s3-website.ca-central-1.amazonaws.com +s3.dualstack.ca-west-1.amazonaws.com +s3-accesspoint.dualstack.ca-west-1.amazonaws.com +s3-accesspoint-fips.dualstack.ca-west-1.amazonaws.com +s3-fips.dualstack.ca-west-1.amazonaws.com +s3-website.dualstack.ca-west-1.amazonaws.com +s3.ca-west-1.amazonaws.com +s3-accesspoint.ca-west-1.amazonaws.com +s3-accesspoint-fips.ca-west-1.amazonaws.com +s3-fips.ca-west-1.amazonaws.com +s3-object-lambda.ca-west-1.amazonaws.com +s3-website.ca-west-1.amazonaws.com +s3.dualstack.eu-central-1.amazonaws.com +s3-accesspoint.dualstack.eu-central-1.amazonaws.com +s3-website.dualstack.eu-central-1.amazonaws.com +s3.eu-central-1.amazonaws.com +s3-accesspoint.eu-central-1.amazonaws.com +s3-object-lambda.eu-central-1.amazonaws.com +s3-website.eu-central-1.amazonaws.com +s3.dualstack.eu-central-2.amazonaws.com +s3-accesspoint.dualstack.eu-central-2.amazonaws.com +s3-website.dualstack.eu-central-2.amazonaws.com +s3.eu-central-2.amazonaws.com +s3-accesspoint.eu-central-2.amazonaws.com +s3-object-lambda.eu-central-2.amazonaws.com +s3-website.eu-central-2.amazonaws.com +s3.dualstack.eu-north-1.amazonaws.com +s3-accesspoint.dualstack.eu-north-1.amazonaws.com +s3.eu-north-1.amazonaws.com +s3-accesspoint.eu-north-1.amazonaws.com +s3-object-lambda.eu-north-1.amazonaws.com +s3-website.eu-north-1.amazonaws.com +s3.dualstack.eu-south-1.amazonaws.com +s3-accesspoint.dualstack.eu-south-1.amazonaws.com +s3-website.dualstack.eu-south-1.amazonaws.com +s3.eu-south-1.amazonaws.com +s3-accesspoint.eu-south-1.amazonaws.com +s3-object-lambda.eu-south-1.amazonaws.com +s3-website.eu-south-1.amazonaws.com +s3.dualstack.eu-south-2.amazonaws.com +s3-accesspoint.dualstack.eu-south-2.amazonaws.com +s3-website.dualstack.eu-south-2.amazonaws.com +s3.eu-south-2.amazonaws.com +s3-accesspoint.eu-south-2.amazonaws.com +s3-object-lambda.eu-south-2.amazonaws.com +s3-website.eu-south-2.amazonaws.com +s3.dualstack.eu-west-1.amazonaws.com +s3-accesspoint.dualstack.eu-west-1.amazonaws.com +s3-website.dualstack.eu-west-1.amazonaws.com +s3.eu-west-1.amazonaws.com +s3-accesspoint.eu-west-1.amazonaws.com +s3-deprecated.eu-west-1.amazonaws.com +s3-object-lambda.eu-west-1.amazonaws.com +s3-website.eu-west-1.amazonaws.com +s3.dualstack.eu-west-2.amazonaws.com +s3-accesspoint.dualstack.eu-west-2.amazonaws.com +s3.eu-west-2.amazonaws.com +s3-accesspoint.eu-west-2.amazonaws.com +s3-object-lambda.eu-west-2.amazonaws.com +s3-website.eu-west-2.amazonaws.com +s3.dualstack.eu-west-3.amazonaws.com +s3-accesspoint.dualstack.eu-west-3.amazonaws.com +s3-website.dualstack.eu-west-3.amazonaws.com +s3.eu-west-3.amazonaws.com +s3-accesspoint.eu-west-3.amazonaws.com +s3-object-lambda.eu-west-3.amazonaws.com +s3-website.eu-west-3.amazonaws.com +s3.dualstack.il-central-1.amazonaws.com +s3-accesspoint.dualstack.il-central-1.amazonaws.com +s3-website.dualstack.il-central-1.amazonaws.com +s3.il-central-1.amazonaws.com +s3-accesspoint.il-central-1.amazonaws.com +s3-object-lambda.il-central-1.amazonaws.com +s3-website.il-central-1.amazonaws.com +s3.dualstack.me-central-1.amazonaws.com +s3-accesspoint.dualstack.me-central-1.amazonaws.com +s3-website.dualstack.me-central-1.amazonaws.com +s3.me-central-1.amazonaws.com +s3-accesspoint.me-central-1.amazonaws.com +s3-object-lambda.me-central-1.amazonaws.com +s3-website.me-central-1.amazonaws.com +s3.dualstack.me-south-1.amazonaws.com +s3-accesspoint.dualstack.me-south-1.amazonaws.com +s3.me-south-1.amazonaws.com +s3-accesspoint.me-south-1.amazonaws.com +s3-object-lambda.me-south-1.amazonaws.com +s3-website.me-south-1.amazonaws.com +s3.amazonaws.com +s3-1.amazonaws.com +s3-ap-east-1.amazonaws.com +s3-ap-northeast-1.amazonaws.com +s3-ap-northeast-2.amazonaws.com +s3-ap-northeast-3.amazonaws.com +s3-ap-south-1.amazonaws.com +s3-ap-southeast-1.amazonaws.com +s3-ap-southeast-2.amazonaws.com +s3-ca-central-1.amazonaws.com +s3-eu-central-1.amazonaws.com +s3-eu-north-1.amazonaws.com +s3-eu-west-1.amazonaws.com +s3-eu-west-2.amazonaws.com +s3-eu-west-3.amazonaws.com +s3-external-1.amazonaws.com +s3-fips-us-gov-east-1.amazonaws.com +s3-fips-us-gov-west-1.amazonaws.com +mrap.accesspoint.s3-global.amazonaws.com +s3-me-south-1.amazonaws.com +s3-sa-east-1.amazonaws.com +s3-us-east-2.amazonaws.com +s3-us-gov-east-1.amazonaws.com +s3-us-gov-west-1.amazonaws.com +s3-us-west-1.amazonaws.com +s3-us-west-2.amazonaws.com +s3-website-ap-northeast-1.amazonaws.com +s3-website-ap-southeast-1.amazonaws.com +s3-website-ap-southeast-2.amazonaws.com +s3-website-eu-west-1.amazonaws.com +s3-website-sa-east-1.amazonaws.com +s3-website-us-east-1.amazonaws.com +s3-website-us-gov-west-1.amazonaws.com +s3-website-us-west-1.amazonaws.com +s3-website-us-west-2.amazonaws.com +s3.dualstack.sa-east-1.amazonaws.com +s3-accesspoint.dualstack.sa-east-1.amazonaws.com +s3-website.dualstack.sa-east-1.amazonaws.com +s3.sa-east-1.amazonaws.com +s3-accesspoint.sa-east-1.amazonaws.com +s3-object-lambda.sa-east-1.amazonaws.com +s3-website.sa-east-1.amazonaws.com +s3.dualstack.us-east-1.amazonaws.com +s3-accesspoint.dualstack.us-east-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-east-1.amazonaws.com +s3-fips.dualstack.us-east-1.amazonaws.com +s3-website.dualstack.us-east-1.amazonaws.com +s3.us-east-1.amazonaws.com +s3-accesspoint.us-east-1.amazonaws.com +s3-accesspoint-fips.us-east-1.amazonaws.com +s3-deprecated.us-east-1.amazonaws.com +s3-fips.us-east-1.amazonaws.com +s3-object-lambda.us-east-1.amazonaws.com +s3-website.us-east-1.amazonaws.com +s3.dualstack.us-east-2.amazonaws.com +s3-accesspoint.dualstack.us-east-2.amazonaws.com +s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com +s3-fips.dualstack.us-east-2.amazonaws.com +s3-website.dualstack.us-east-2.amazonaws.com +s3.us-east-2.amazonaws.com +s3-accesspoint.us-east-2.amazonaws.com +s3-accesspoint-fips.us-east-2.amazonaws.com +s3-deprecated.us-east-2.amazonaws.com +s3-fips.us-east-2.amazonaws.com +s3-object-lambda.us-east-2.amazonaws.com +s3-website.us-east-2.amazonaws.com +s3.dualstack.us-gov-east-1.amazonaws.com +s3-accesspoint.dualstack.us-gov-east-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-gov-east-1.amazonaws.com +s3-fips.dualstack.us-gov-east-1.amazonaws.com +s3.us-gov-east-1.amazonaws.com +s3-accesspoint.us-gov-east-1.amazonaws.com +s3-accesspoint-fips.us-gov-east-1.amazonaws.com +s3-fips.us-gov-east-1.amazonaws.com +s3-object-lambda.us-gov-east-1.amazonaws.com +s3-website.us-gov-east-1.amazonaws.com +s3.dualstack.us-gov-west-1.amazonaws.com +s3-accesspoint.dualstack.us-gov-west-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-gov-west-1.amazonaws.com +s3-fips.dualstack.us-gov-west-1.amazonaws.com +s3.us-gov-west-1.amazonaws.com +s3-accesspoint.us-gov-west-1.amazonaws.com +s3-accesspoint-fips.us-gov-west-1.amazonaws.com +s3-fips.us-gov-west-1.amazonaws.com +s3-object-lambda.us-gov-west-1.amazonaws.com +s3-website.us-gov-west-1.amazonaws.com +s3.dualstack.us-west-1.amazonaws.com +s3-accesspoint.dualstack.us-west-1.amazonaws.com +s3-accesspoint-fips.dualstack.us-west-1.amazonaws.com +s3-fips.dualstack.us-west-1.amazonaws.com +s3-website.dualstack.us-west-1.amazonaws.com +s3.us-west-1.amazonaws.com +s3-accesspoint.us-west-1.amazonaws.com +s3-accesspoint-fips.us-west-1.amazonaws.com +s3-fips.us-west-1.amazonaws.com +s3-object-lambda.us-west-1.amazonaws.com +s3-website.us-west-1.amazonaws.com +s3.dualstack.us-west-2.amazonaws.com +s3-accesspoint.dualstack.us-west-2.amazonaws.com +s3-accesspoint-fips.dualstack.us-west-2.amazonaws.com +s3-fips.dualstack.us-west-2.amazonaws.com +s3-website.dualstack.us-west-2.amazonaws.com +s3.us-west-2.amazonaws.com +s3-accesspoint.us-west-2.amazonaws.com +s3-accesspoint-fips.us-west-2.amazonaws.com +s3-deprecated.us-west-2.amazonaws.com +s3-fips.us-west-2.amazonaws.com +s3-object-lambda.us-west-2.amazonaws.com +s3-website.us-west-2.amazonaws.com + +// Amazon SageMaker Ground Truth +// Submitted by AWS Security +// Reference: 98dbfde4-7802-48c3-8751-b60f204e0d9c +labeling.ap-northeast-1.sagemaker.aws +labeling.ap-northeast-2.sagemaker.aws +labeling.ap-south-1.sagemaker.aws +labeling.ap-southeast-1.sagemaker.aws +labeling.ap-southeast-2.sagemaker.aws +labeling.ca-central-1.sagemaker.aws +labeling.eu-central-1.sagemaker.aws +labeling.eu-west-1.sagemaker.aws +labeling.eu-west-2.sagemaker.aws +labeling.us-east-1.sagemaker.aws +labeling.us-east-2.sagemaker.aws +labeling.us-west-2.sagemaker.aws + +// Amazon SageMaker Notebook Instances +// Submitted by AWS Security +// Reference: b5ea56df-669e-43cc-9537-14aa172f5dfc +notebook.af-south-1.sagemaker.aws +notebook.ap-east-1.sagemaker.aws +notebook.ap-northeast-1.sagemaker.aws +notebook.ap-northeast-2.sagemaker.aws +notebook.ap-northeast-3.sagemaker.aws +notebook.ap-south-1.sagemaker.aws +notebook.ap-south-2.sagemaker.aws +notebook.ap-southeast-1.sagemaker.aws +notebook.ap-southeast-2.sagemaker.aws +notebook.ap-southeast-3.sagemaker.aws +notebook.ap-southeast-4.sagemaker.aws +notebook.ca-central-1.sagemaker.aws +notebook-fips.ca-central-1.sagemaker.aws +notebook.ca-west-1.sagemaker.aws +notebook-fips.ca-west-1.sagemaker.aws +notebook.eu-central-1.sagemaker.aws +notebook.eu-central-2.sagemaker.aws +notebook.eu-north-1.sagemaker.aws +notebook.eu-south-1.sagemaker.aws +notebook.eu-south-2.sagemaker.aws +notebook.eu-west-1.sagemaker.aws +notebook.eu-west-2.sagemaker.aws +notebook.eu-west-3.sagemaker.aws +notebook.il-central-1.sagemaker.aws +notebook.me-central-1.sagemaker.aws +notebook.me-south-1.sagemaker.aws +notebook.sa-east-1.sagemaker.aws +notebook.us-east-1.sagemaker.aws +notebook-fips.us-east-1.sagemaker.aws +notebook.us-east-2.sagemaker.aws +notebook-fips.us-east-2.sagemaker.aws +notebook.us-gov-east-1.sagemaker.aws +notebook-fips.us-gov-east-1.sagemaker.aws +notebook.us-gov-west-1.sagemaker.aws +notebook-fips.us-gov-west-1.sagemaker.aws +notebook.us-west-1.sagemaker.aws +notebook-fips.us-west-1.sagemaker.aws +notebook.us-west-2.sagemaker.aws +notebook-fips.us-west-2.sagemaker.aws +notebook.cn-north-1.sagemaker.com.cn +notebook.cn-northwest-1.sagemaker.com.cn + +// Amazon SageMaker Studio +// Submitted by AWS Security +// Reference: 475f237e-ab88-4041-9f41-7cfccdf66aeb +studio.af-south-1.sagemaker.aws +studio.ap-east-1.sagemaker.aws +studio.ap-northeast-1.sagemaker.aws +studio.ap-northeast-2.sagemaker.aws +studio.ap-northeast-3.sagemaker.aws +studio.ap-south-1.sagemaker.aws +studio.ap-southeast-1.sagemaker.aws +studio.ap-southeast-2.sagemaker.aws +studio.ap-southeast-3.sagemaker.aws +studio.ca-central-1.sagemaker.aws +studio.eu-central-1.sagemaker.aws +studio.eu-central-2.sagemaker.aws +studio.eu-north-1.sagemaker.aws +studio.eu-south-1.sagemaker.aws +studio.eu-south-2.sagemaker.aws +studio.eu-west-1.sagemaker.aws +studio.eu-west-2.sagemaker.aws +studio.eu-west-3.sagemaker.aws +studio.il-central-1.sagemaker.aws +studio.me-central-1.sagemaker.aws +studio.me-south-1.sagemaker.aws +studio.sa-east-1.sagemaker.aws +studio.us-east-1.sagemaker.aws +studio.us-east-2.sagemaker.aws +studio.us-gov-east-1.sagemaker.aws +studio-fips.us-gov-east-1.sagemaker.aws +studio.us-gov-west-1.sagemaker.aws +studio-fips.us-gov-west-1.sagemaker.aws +studio.us-west-1.sagemaker.aws +studio.us-west-2.sagemaker.aws +studio.cn-north-1.sagemaker.com.cn +studio.cn-northwest-1.sagemaker.com.cn + +// Amazon SageMaker with MLflow +// Submited by: AWS Security +// Reference: c19f92b3-a82a-452d-8189-831b572eea7e +*.experiments.sagemaker.aws + +// Analytics on AWS +// Submitted by AWS Security +// Reference: 955f9f40-a495-4e73-ae85-67b77ac9cadd +analytics-gateway.ap-northeast-1.amazonaws.com +analytics-gateway.ap-northeast-2.amazonaws.com +analytics-gateway.ap-south-1.amazonaws.com +analytics-gateway.ap-southeast-1.amazonaws.com +analytics-gateway.ap-southeast-2.amazonaws.com +analytics-gateway.eu-central-1.amazonaws.com +analytics-gateway.eu-west-1.amazonaws.com +analytics-gateway.us-east-1.amazonaws.com +analytics-gateway.us-east-2.amazonaws.com +analytics-gateway.us-west-2.amazonaws.com + +// AWS Amplify +// Submitted by AWS Security +// Reference: c35bed18-6f4f-424f-9298-5756f2f7d72b +amplifyapp.com + +// AWS App Runner +// Submitted by AWS Security +// Reference: 6828c008-ba5d-442f-ade5-48da4e7c2316 +*.awsapprunner.com + +// AWS Cloud9 +// Submitted by: AWS Security +// Reference: 30717f72-4007-4f0f-8ed4-864c6f2efec9 +webview-assets.aws-cloud9.af-south-1.amazonaws.com +vfs.cloud9.af-south-1.amazonaws.com +webview-assets.cloud9.af-south-1.amazonaws.com +webview-assets.aws-cloud9.ap-east-1.amazonaws.com +vfs.cloud9.ap-east-1.amazonaws.com +webview-assets.cloud9.ap-east-1.amazonaws.com +webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com +vfs.cloud9.ap-northeast-1.amazonaws.com +webview-assets.cloud9.ap-northeast-1.amazonaws.com +webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com +vfs.cloud9.ap-northeast-2.amazonaws.com +webview-assets.cloud9.ap-northeast-2.amazonaws.com +webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com +vfs.cloud9.ap-northeast-3.amazonaws.com +webview-assets.cloud9.ap-northeast-3.amazonaws.com +webview-assets.aws-cloud9.ap-south-1.amazonaws.com +vfs.cloud9.ap-south-1.amazonaws.com +webview-assets.cloud9.ap-south-1.amazonaws.com +webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com +vfs.cloud9.ap-southeast-1.amazonaws.com +webview-assets.cloud9.ap-southeast-1.amazonaws.com +webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com +vfs.cloud9.ap-southeast-2.amazonaws.com +webview-assets.cloud9.ap-southeast-2.amazonaws.com +webview-assets.aws-cloud9.ca-central-1.amazonaws.com +vfs.cloud9.ca-central-1.amazonaws.com +webview-assets.cloud9.ca-central-1.amazonaws.com +webview-assets.aws-cloud9.eu-central-1.amazonaws.com +vfs.cloud9.eu-central-1.amazonaws.com +webview-assets.cloud9.eu-central-1.amazonaws.com +webview-assets.aws-cloud9.eu-north-1.amazonaws.com +vfs.cloud9.eu-north-1.amazonaws.com +webview-assets.cloud9.eu-north-1.amazonaws.com +webview-assets.aws-cloud9.eu-south-1.amazonaws.com +vfs.cloud9.eu-south-1.amazonaws.com +webview-assets.cloud9.eu-south-1.amazonaws.com +webview-assets.aws-cloud9.eu-west-1.amazonaws.com +vfs.cloud9.eu-west-1.amazonaws.com +webview-assets.cloud9.eu-west-1.amazonaws.com +webview-assets.aws-cloud9.eu-west-2.amazonaws.com +vfs.cloud9.eu-west-2.amazonaws.com +webview-assets.cloud9.eu-west-2.amazonaws.com +webview-assets.aws-cloud9.eu-west-3.amazonaws.com +vfs.cloud9.eu-west-3.amazonaws.com +webview-assets.cloud9.eu-west-3.amazonaws.com +webview-assets.aws-cloud9.il-central-1.amazonaws.com +vfs.cloud9.il-central-1.amazonaws.com +webview-assets.aws-cloud9.me-south-1.amazonaws.com +vfs.cloud9.me-south-1.amazonaws.com +webview-assets.cloud9.me-south-1.amazonaws.com +webview-assets.aws-cloud9.sa-east-1.amazonaws.com +vfs.cloud9.sa-east-1.amazonaws.com +webview-assets.cloud9.sa-east-1.amazonaws.com +webview-assets.aws-cloud9.us-east-1.amazonaws.com +vfs.cloud9.us-east-1.amazonaws.com +webview-assets.cloud9.us-east-1.amazonaws.com +webview-assets.aws-cloud9.us-east-2.amazonaws.com +vfs.cloud9.us-east-2.amazonaws.com +webview-assets.cloud9.us-east-2.amazonaws.com +webview-assets.aws-cloud9.us-west-1.amazonaws.com +vfs.cloud9.us-west-1.amazonaws.com +webview-assets.cloud9.us-west-1.amazonaws.com +webview-assets.aws-cloud9.us-west-2.amazonaws.com +vfs.cloud9.us-west-2.amazonaws.com +webview-assets.cloud9.us-west-2.amazonaws.com + +// AWS Directory Service +// Submitted by AWS Security +// Reference: a13203e8-42dc-4045-a0d2-2ee67bed1068 +awsapps.com + +// AWS Elastic Beanstalk +// Submitted by AWS Security +// Reference: bb5a965c-dec3-4967-aa22-e306ad064797 +cn-north-1.eb.amazonaws.com.cn +cn-northwest-1.eb.amazonaws.com.cn +elasticbeanstalk.com +af-south-1.elasticbeanstalk.com +ap-east-1.elasticbeanstalk.com +ap-northeast-1.elasticbeanstalk.com +ap-northeast-2.elasticbeanstalk.com +ap-northeast-3.elasticbeanstalk.com +ap-south-1.elasticbeanstalk.com +ap-southeast-1.elasticbeanstalk.com +ap-southeast-2.elasticbeanstalk.com +ap-southeast-3.elasticbeanstalk.com +ca-central-1.elasticbeanstalk.com +eu-central-1.elasticbeanstalk.com +eu-north-1.elasticbeanstalk.com +eu-south-1.elasticbeanstalk.com +eu-west-1.elasticbeanstalk.com +eu-west-2.elasticbeanstalk.com +eu-west-3.elasticbeanstalk.com +il-central-1.elasticbeanstalk.com +me-south-1.elasticbeanstalk.com +sa-east-1.elasticbeanstalk.com +us-east-1.elasticbeanstalk.com +us-east-2.elasticbeanstalk.com +us-gov-east-1.elasticbeanstalk.com +us-gov-west-1.elasticbeanstalk.com +us-west-1.elasticbeanstalk.com +us-west-2.elasticbeanstalk.com + +// (AWS) Elastic Load Balancing +// Submitted by Luke Wells +// Reference: 12a3d528-1bac-4433-a359-a395867ffed2 +*.elb.amazonaws.com.cn +*.elb.amazonaws.com + +// AWS Global Accelerator +// Submitted by Daniel Massaguer +// Reference: d916759d-a08b-4241-b536-4db887383a6a +awsglobalaccelerator.com + +// AWS re:Post Private +// Submitted by AWS Security +// Reference: 83385945-225f-416e-9aa0-ad0632bfdcee +*.private.repost.aws + +// AWS Transfer Family web apps +// Submitted by AWS Security +// Reference: 57a658c4-8899-410c-aa24-5b01e4a178d2 +transfer-webapp.af-south-1.on.aws +transfer-webapp.ap-east-1.on.aws +transfer-webapp.ap-northeast-1.on.aws +transfer-webapp.ap-northeast-2.on.aws +transfer-webapp.ap-northeast-3.on.aws +transfer-webapp.ap-south-1.on.aws +transfer-webapp.ap-south-2.on.aws +transfer-webapp.ap-southeast-1.on.aws +transfer-webapp.ap-southeast-2.on.aws +transfer-webapp.ap-southeast-3.on.aws +transfer-webapp.ap-southeast-4.on.aws +transfer-webapp.ap-southeast-5.on.aws +transfer-webapp.ca-central-1.on.aws +transfer-webapp.ca-west-1.on.aws +transfer-webapp.eu-central-1.on.aws +transfer-webapp.eu-central-2.on.aws +transfer-webapp.eu-north-1.on.aws +transfer-webapp.eu-south-1.on.aws +transfer-webapp.eu-south-2.on.aws +transfer-webapp.eu-west-1.on.aws +transfer-webapp.eu-west-2.on.aws +transfer-webapp.eu-west-3.on.aws +transfer-webapp.il-central-1.on.aws +transfer-webapp.me-central-1.on.aws +transfer-webapp.me-south-1.on.aws +transfer-webapp.sa-east-1.on.aws +transfer-webapp.us-east-1.on.aws +transfer-webapp.us-east-2.on.aws +transfer-webapp.us-gov-east-1.on.aws +transfer-webapp-fips.us-gov-east-1.on.aws +transfer-webapp.us-gov-west-1.on.aws +transfer-webapp-fips.us-gov-west-1.on.aws +transfer-webapp.us-west-1.on.aws +transfer-webapp.us-west-2.on.aws +transfer-webapp.cn-north-1.on.amazonwebservices.com.cn +transfer-webapp.cn-northwest-1.on.amazonwebservices.com.cn + +// eero +// Submitted by Yue Kang +// Reference: 264afe70-f62c-4c02-8ab9-b5281ed24461 +eero.online +eero-stage.online + +// concludes Amazon + +// Apigee : https://apigee.com/ +// Submitted by Apigee Security Team +apigee.io + +// Apis Networks : https://apisnetworks.com +// Submitted by Matt Saladna +panel.dev + +// Apphud : https://apphud.com +// Submitted by Alexander Selivanov +siiites.com + +// Appspace : https://www.appspace.com +// Submitted by Appspace Security Team +appspacehosted.com +appspaceusercontent.com + +// Appudo UG (haftungsbeschränkt) : https://www.appudo.com +// Submitted by Alexander Hochbaum +appudo.net + +// Appwrite : https://appwrite.io +// Submitted by Steven Nguyen +appwrite.global +*.appwrite.run + +// Aptible : https://www.aptible.com/ +// Submitted by Thomas Orozco +on-aptible.com + +// Aquapal : https://aquapal.net/ +// Submitted by Aki Ueno +f5.si + +// ArvanCloud EdgeCompute +// Submitted by ArvanCloud CDN +arvanedge.ir + +// ASEINet : https://www.aseinet.com/ +// Submitted by Asei SEKIGUCHI +user.aseinet.ne.jp +gv.vc +d.gv.vc + +// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/ +// Submitted by Hector Martin +user.party.eus + +// Association potager.org : https://potager.org/ +// Submitted by Lunar +pimienta.org +poivron.org +potager.org +sweetpepper.org + +// ASUSTOR Inc. : http://www.asustor.com +// Submitted by Vincent Tseng +myasustor.com + +// Atlassian : https://atlassian.com +// Submitted by Sam Smyth +cdn.prod.atlassian-dev.net + +// Authentick UG (haftungsbeschränkt) : https://authentick.net +// Submitted by Lukas Reschke +translated.page + +// AVM : https://avm.de +// Submitted by Andreas Weise +myfritz.link +myfritz.net + +// AVStack Pte. Ltd. : https://avstack.io +// Submitted by Jasper Hugo +onavstack.net + +// AW AdvisorWebsites.com Software Inc : https://advisorwebsites.com +// Submitted by James Kennedy +*.awdev.ca +*.advisor.ws + +// AZ.pl sp. z.o.o : https://az.pl +// Submitted by Krzysztof Wolski +ecommerce-shop.pl + +// b-data GmbH : https://www.b-data.io +// Submitted by Olivier Benz +b-data.io + +// Balena : https://www.balena.io +// Submitted by Petros Angelatos +balena-devices.com + +// BASE, Inc. : https://binc.jp +// Submitted by Yuya NAGASAWA +base.ec +official.ec +buyshop.jp +fashionstore.jp +handcrafted.jp +kawaiishop.jp +supersale.jp +theshop.jp +shopselect.net +base.shop + +// BeagleBoard.org Foundation : https://beagleboard.org +// Submitted by Jason Kridner +beagleboard.io + +// Beget Ltd +// Submitted by Lev Nekrasov +*.beget.app + +// Besties : https://besties.house +// Submitted by Hazel Cora +pages.gay + +// BinaryLane : http://www.binarylane.com +// Submitted by Nathan O'Sullivan +bnr.la + +// Bitbucket : http://bitbucket.org +// Submitted by Andy Ortlieb +bitbucket.io + +// Blackbaud, Inc. : https://www.blackbaud.com +// Submitted by Paul Crowder +blackbaudcdn.net + +// Blatech : http://www.blatech.net +// Submitted by Luke Bratch +of.je + +// Block, Inc. : https://block.xyz +// Submitted by Jonathan Boice +square.site + +// Blue Bite, LLC : https://bluebite.com +// Submitted by Joshua Weiss +bluebite.io + +// Boomla : https://boomla.com +// Submitted by Tibor Halter +boomla.net + +// Boutir : https://www.boutir.com +// Submitted by Eric Ng Ka Ka +boutir.com + +// Boxfuse : https://boxfuse.com +// Submitted by Axel Fontaine +boxfuse.io + +// bplaced : https://www.bplaced.net/ +// Submitted by Miroslav Bozic +square7.ch +bplaced.com +bplaced.de +square7.de +bplaced.net +square7.net + +// Brave : https://brave.com +// Submitted by Andrea Brancaleoni +brave.app +*.s.brave.app +brave.io +*.s.brave.io + +// Brendly : https://brendly.rs +// Submitted by Dusan Radovanovic +shop.brendly.ba +shop.brendly.hr +shop.brendly.rs + +// BrowserSafetyMark +// Submitted by Dave Tharp +browsersafetymark.io + +// BRS Media : https://brsmedia.com/ +// Submitted by Gavin Brown +radio.am +radio.fm + +// Bubble : https://bubble.io/ +// Submitted by Merlin Zhao +cdn.bubble.io +bubbleapps.io + +// Bytemark Hosting : https://www.bytemark.co.uk +// Submitted by Paul Cammish +uk0.bigv.io +dh.bytemark.co.uk +vm.bytemark.co.uk + +// Caf.js Labs LLC : https://www.cafjs.com +// Submitted by Antonio Lain +cafjs.com + +// Canva Pty Ltd : https://canva.com/ +// Submitted by Joel Aquilina +canva-apps.cn +my.canvasite.cn +canva-apps.com +rice-labs.com +canva.run +my.canva.site + +// Carrd : https://carrd.co +// Submitted by AJ +drr.ac +uwu.ai +carrd.co +crd.co +ju.mp + +// CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk +// Submitted by Jamie Tanna +api.gov.uk + +// CDN77.com : http://www.cdn77.com +// Submitted by Jan Krpes +cdn77-storage.com +rsc.contentproxy9.cz +r.cdn77.net +cdn77-ssl.net +c.cdn77.org +rsc.cdn77.org +ssl.origin.cdn77-secure.org + +// CentralNic : https://teaminternet.com/ +// Submitted by registry +za.bz +br.com +cn.com +de.com +eu.com +jpn.com +mex.com +ru.com +sa.com +uk.com +us.com +za.com +com.de +gb.net +hu.net +jp.net +se.net +uk.net +ae.org +com.se + +// Cityhost LLC : https://cityhost.ua +// Submitted by Maksym Rivtin +cx.ua + +// Civilized Discourse Construction Kit, Inc. : https://www.discourse.org/ +// Submitted by Rishabh Nambiar & Michael Brown +discourse.group +discourse.team + +// Clerk : https://www.clerk.dev +// Submitted by Colin Sidoti +clerk.app +clerkstage.app +*.lcl.dev +*.lclstage.dev +*.stg.dev +*.stgstage.dev + +// Clever Cloud : https://www.clever-cloud.com/ +// Submitted by Quentin Adam +cleverapps.cc +*.services.clever-cloud.com +cleverapps.io +cleverapps.tech + +// ClickRising : https://clickrising.com/ +// Submitted by Umut Gumeli +clickrising.net + +// Cloud DNS Ltd : http://www.cloudns.net +// Submitted by Aleksander Hristov & Boyan Peychev +cloudns.asia +cloudns.be +cloud-ip.biz +cloudns.biz +cloud-ip.cc +cloudns.cc +cloudns.ch +cloudns.cl +cloudns.club +abrdns.com +dnsabr.com +ip-ddns.com +cloudns.cx +cloudns.eu +cloudns.in +cloudns.info +ddns-ip.net +dns-cloud.net +dns-dynamic.net +cloudns.nz +cloudns.org +ip-dynamic.org +cloudns.ph +cloudns.pro +cloudns.pw +cloudns.us + +// Cloud66 : https://www.cloud66.com/ +// Submitted by Khash Sajadi +c66.me +cloud66.ws + +// CloudAccess.net : https://www.cloudaccess.net/ +// Submitted by Pawel Panek +jdevcloud.com +wpdevcloud.com +cloudaccess.host +freesite.host +cloudaccess.net + +// Cloudbees, Inc. : https://www.cloudbees.com/ +// Submitted by Mohideen Shajith +cloudbeesusercontent.io + +// Cloudera, Inc. : https://www.cloudera.com/ +// Submitted by Kedarnath Waikar +*.cloudera.site + +// Cloudflare, Inc. : https://www.cloudflare.com/ +// Submitted by Cloudflare Team +cf-ipfs.com +cloudflare-ipfs.com +trycloudflare.com +pages.dev +r2.dev +workers.dev +cloudflare.net +cdn.cloudflare.net +cdn.cloudflareanycast.net +cdn.cloudflarecn.net +cdn.cloudflareglobal.net + +// cloudscale.ch AG : https://www.cloudscale.ch/ +// Submitted by Gaudenz Steinlin +cust.cloudscale.ch +objects.lpg.cloudscale.ch +objects.rma.cloudscale.ch +lpg.objectstorage.ch +rma.objectstorage.ch + +// Clovyr : https://clovyr.io +// Submitted by Patrick Nielsen +wnext.app + +// CNPY : https://cnpy.gdn +// Submitted by Angelo Gladding +cnpy.gdn + +// Co & Co : https://co-co.nl/ +// Submitted by Govert Versluis +*.otap.co + +// co.ca : http://registry.co.ca/ +co.ca + +// co.com Registry, LLC : https://registry.co.com +// Submitted by Gavin Brown +co.com + +// Codeberg e. V. : https://codeberg.org +// Submitted by Moritz Marquardt +codeberg.page + +// CodeSandbox B.V. : https://codesandbox.io +// Submitted by Ives van Hoorne +csb.app +preview.csb.app + +// CoDNS B.V. +co.nl +co.no + +// Cognition AI, Inc. : https://cognition.ai +// Submitted by Philip Papurt +*.devinapps.com + +// Combell.com : https://www.combell.com +// Submitted by Thomas Wouters +webhosting.be +hosting-cluster.nl + +// Contentful GmbH : https://www.contentful.com +// Submitted by Contentful Developer Experience Team +ctfcloud.net + +// Convex : https://convex.dev/ +// Submitted by James Cowling +convex.app +convex.cloud +convex.site + +// Coordination Center for TLD RU and XN--P1AI : https://cctld.ru/en/domains/domens_ru/reserved/ +// Submitted by George Georgievsky +ac.ru +edu.ru +gov.ru +int.ru +mil.ru + +// COSIMO GmbH : http://www.cosimo.de +// Submitted by Rene Marticke +dyn.cosidns.de +dnsupdater.de +dynamisches-dns.de +internet-dns.de +l-o-g-i-n.de +dynamic-dns.info +feste-ip.net +knx-server.net +static-access.net + +// Craft Docs Ltd : https://www.craft.do/ +// Submitted by Zsombor Fuszenecker +craft.me + +// Craynic, s.r.o. : http://www.craynic.com/ +// Submitted by Ales Krajnik +realm.cz + +// Crisp IM SAS : https://crisp.chat/ +// Submitted by Baptiste Jamin +on.crisp.email + +// Cryptonomic : https://cryptonomic.net/ +// Submitted by Andrew Cady +*.cryptonomic.net + +// cyber_Folks S.A. : https://cyberfolks.pl +// Submitted by Bartlomiej Kida +cfolks.pl + +// cyon GmbH : https://www.cyon.ch/ +// Submitted by Dominic Luechinger +cyon.link +cyon.site + +// Dansk.net : http://www.dansk.net/ +// Submitted by Anani Voule +biz.dk +co.dk +firm.dk +reg.dk +store.dk + +// dappnode.io : https://dappnode.io/ +// Submitted by Abel Boldu / DAppNode Team +dyndns.dappnode.io + +// Dark, Inc. : https://darklang.com +// Submitted by Paul Biggar +builtwithdark.com +darklang.io + +// DataDetect, LLC. : https://datadetect.com +// Submitted by Andrew Banchich +demo.datadetect.com +instance.datadetect.com + +// Datawire, Inc : https://www.datawire.io +// Submitted by Richard Li +edgestack.me + +// Datto, Inc. : https://www.datto.com/ +// Submitted by Philipp Heckel +dattolocal.com +dattorelay.com +dattoweb.com +mydatto.com +dattolocal.net +mydatto.net + +// ddnss.de : https://www.ddnss.de/ +// Submitted by Robert Niedziela +ddnss.de +dyn.ddnss.de +dyndns.ddnss.de +dyn-ip24.de +dyndns1.de +home-webserver.de +dyn.home-webserver.de +myhome-server.de +ddnss.org + +// Debian : https://www.debian.org/ +// Submitted by Peter Palfrader / Debian Sysadmin Team +debian.net + +// Definima : http://www.definima.com/ +// Submitted by Maxence Bitterli +definima.io +definima.net + +// Deno Land Inc : https://deno.com/ +// Submitted by Luca Casonato +deno.dev +deno-staging.dev +deno.net + +// deSEC : https://desec.io/ +// Submitted by Peter Thomassen +dedyn.io + +// Deta : https://www.deta.sh/ +// Submitted by Aavash Shrestha +deta.app +deta.dev + +// Dfinity Foundation: https://dfinity.org/ +// Submitted by Dfinity Team +icp0.io +*.raw.icp0.io +icp1.io +*.raw.icp1.io +*.icp.net +caffeine.site + +// dhosting.pl Sp. z o.o. : https://dhosting.pl/ +// Submitted by Michal Kokoszkiewicz +dfirma.pl +dkonto.pl +you2.pl + +// DigitalOcean App Platform : https://www.digitalocean.com/products/app-platform/ +// Submitted by Braxton Huggins +ondigitalocean.app + +// DigitalOcean Spaces : https://www.digitalocean.com/products/spaces/ +// Submitted by Robin H. Johnson +*.digitaloceanspaces.com + +// DigitalPlat : https://www.digitalplat.org/ +// Submitted by Edward Hsing +qzz.io +us.kg +xx.kg +dpdns.org + +// Discord Inc : https://discord.com +// Submitted by Sahn Lam +discordsays.com +discordsez.com + +// DNS Africa Ltd : https://dns.business +// Submitted by Calvin Browne +jozi.biz + +// DNShome : https://www.dnshome.de/ +// Submitted by Norbert Auler +dnshome.de + +// DotArai : https://www.dotarai.com/ +// Submitted by Atsadawat Netcharadsang +online.th +shop.th + +// DrayTek Corp. : https://www.draytek.com/ +// Submitted by Paul Fang +drayddns.com + +// DreamCommerce : https://shoper.pl/ +// Submitted by Konrad Kotarba +shoparena.pl + +// DreamHost : http://www.dreamhost.com/ +// Submitted by Andrew Farmer +dreamhosters.com + +// Dreamyoungs, Inc. : https://durumis.com +// Submitted by Infra Team +durumis.com + +// DuckDNS : http://www.duckdns.org/ +// Submitted by Richard Harper +duckdns.org + +// dy.fi : http://dy.fi/ +// Submitted by Heikki Hannikainen +dy.fi +tunk.org + +// DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ +dyndns.biz +for-better.biz +for-more.biz +for-some.biz +for-the.biz +selfip.biz +webhop.biz +ftpaccess.cc +game-server.cc +myphotos.cc +scrapping.cc +blogdns.com +cechire.com +dnsalias.com +dnsdojo.com +doesntexist.com +dontexist.com +doomdns.com +dyn-o-saur.com +dynalias.com +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +from-ak.com +from-al.com +from-ar.com +from-ca.com +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-ma.com +from-md.com +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +getmyip.com +gotdns.com +hobby-site.com +homelinux.com +homeunix.com +iamallama.com +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bulls-fan.com +is-a-caterer.com +is-a-chef.com +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-certified.com +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-not-certified.com +is-slick.com +is-uberleet.com +is-with-theband.com +isa-geek.com +isa-hockeynut.com +issmarterthanyou.com +likes-pie.com +likescandy.com +neat-url.com +saves-the-whales.com +selfip.com +sells-for-less.com +sells-for-u.com +servebbs.com +simple-url.com +space-to-rent.com +teaches-yoga.com +writesthisblog.com +ath.cx +fuettertdasnetz.de +isteingeek.de +istmein.de +lebtimnetz.de +leitungsen.de +traeumtgerade.de +barrel-of-knowledge.info +barrell-of-knowledge.info +dyndns.info +for-our.info +groks-the.info +groks-this.info +here-for-more.info +knowsitall.info +selfip.info +webhop.info +forgot.her.name +forgot.his.name +at-band-camp.net +blogdns.net +broke-it.net +buyshouses.net +dnsalias.net +dnsdojo.net +does-it.net +dontexist.net +dynalias.net +dynathome.net +endofinternet.net +from-az.net +from-co.net +from-la.net +from-ny.net +gets-it.net +ham-radio-op.net +homeftp.net +homeip.net +homelinux.net +homeunix.net +in-the-band.net +is-a-chef.net +is-a-geek.net +isa-geek.net +kicks-ass.net +office-on-the.net +podzone.net +scrapper-site.net +selfip.net +sells-it.net +servebbs.net +serveftp.net +thruhere.net +webhop.net +merseine.nu +mine.nu +shacknet.nu +blogdns.org +blogsite.org +boldlygoingnowhere.org +dnsalias.org +dnsdojo.org +doesntexist.org +dontexist.org +doomdns.org +dvrdns.org +dynalias.org +dyndns.org +go.dyndns.org +home.dyndns.org +endofinternet.org +endoftheinternet.org +from-me.org +game-host.org +gotdns.org +hobby-site.org +homedns.org +homeftp.org +homelinux.org +homeunix.org +is-a-bruinsfan.org +is-a-candidate.org +is-a-celticsfan.org +is-a-chef.org +is-a-geek.org +is-a-knight.org +is-a-linux-user.org +is-a-patsfan.org +is-a-soxfan.org +is-found.org +is-lost.org +is-saved.org +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +isa-geek.org +kicks-ass.org +misconfused.org +podzone.org +readmyblog.org +selfip.org +sellsyourhome.org +servebbs.org +serveftp.org +servegame.org +stuff-4-sale.org +webhop.org +better-than.tv +dyndns.tv +on-the-web.tv +worse-than.tv +is-by.us +land-4-sale.us +stuff-4-sale.us +dyndns.ws +mypets.ws + +// Dynu.com : https://www.dynu.com/ +// Submitted by Sue Ye +ddnsfree.com +ddnsgeek.com +giize.com +gleeze.com +kozow.com +loseyourip.com +ooguy.com +theworkpc.com +casacam.net +dynu.net +accesscam.org +camdvr.org +freeddns.org +mywire.org +webredirect.org +myddns.rocks + +// dynv6 : https://dynv6.com +// Submitted by Dominik Menke +dynv6.net + +// E4YOU spol. s.r.o. : https://e4you.cz/ +// Submitted by Vladimir Dudr +e4.cz + +// Easypanel : https://easypanel.io +// Submitted by Andrei Canta +easypanel.app +easypanel.host + +// EasyWP : https://www.easywp.com +// Submitted by +*.ewp.live + +// eDirect Corp. : https://hosting.url.com.tw/ +// Submitted by C.S. chang +twmail.cc +twmail.net +twmail.org +mymailer.com.tw +url.tw + +// Electromagnetic Field : https://www.emfcamp.org +// Submitted by +at.emf.camp + +// Elefunc, Inc. : https://elefunc.com +// Submitted by Cetin Sert +rt.ht + +// Elementor : Elementor Ltd. +// Submitted by Anton Barkan +elementor.cloud +elementor.cool + +// En root‽ : https://en-root.org +// Submitted by Emmanuel Raviart +en-root.fr + +// Enalean SAS : https://www.enalean.com +// Submitted by Enalean Security Team +mytuleap.com +tuleap-partners.com + +// Encoretivity AB : https://encore.cloud +// Submitted by André Eriksson +encr.app +frontend.encr.app +encoreapi.com +lp.dev +api.lp.dev +objects.lp.dev + +// encoway GmbH : https://www.encoway.de +// Submitted by Marcel Daus +eu.encoway.cloud + +// EU.org : https://eu.org/ +// Submitted by Pierre Beyssac +eu.org +al.eu.org +asso.eu.org +at.eu.org +au.eu.org +be.eu.org +bg.eu.org +ca.eu.org +cd.eu.org +ch.eu.org +cn.eu.org +cy.eu.org +cz.eu.org +de.eu.org +dk.eu.org +edu.eu.org +ee.eu.org +es.eu.org +fi.eu.org +fr.eu.org +gr.eu.org +hr.eu.org +hu.eu.org +ie.eu.org +il.eu.org +in.eu.org +int.eu.org +is.eu.org +it.eu.org +jp.eu.org +kr.eu.org +lt.eu.org +lu.eu.org +lv.eu.org +me.eu.org +mk.eu.org +mt.eu.org +my.eu.org +net.eu.org +ng.eu.org +nl.eu.org +no.eu.org +nz.eu.org +pl.eu.org +pt.eu.org +ro.eu.org +ru.eu.org +se.eu.org +si.eu.org +sk.eu.org +tr.eu.org +uk.eu.org +us.eu.org + +// Eurobyte : https://eurobyte.ru +// Submitted by Evgeniy Subbotin +eurodir.ru + +// Evennode : http://www.evennode.com/ +// Submitted by Michal Kralik +eu-1.evennode.com +eu-2.evennode.com +eu-3.evennode.com +eu-4.evennode.com +us-1.evennode.com +us-2.evennode.com +us-3.evennode.com +us-4.evennode.com + +// Evervault : https://evervault.com +// Submitted by Hannah Neary +relay.evervault.app +relay.evervault.dev + +// Expo : https://expo.dev/ +// Submitted by James Ide +expo.app +staging.expo.app + +// Fabrica Technologies, Inc. : https://www.fabrica.dev/ +// Submitted by Eric Jiang +onfabrica.com + +// FAITID : https://faitid.org/ +// Submitted by Maxim Alzoba +// https://www.flexireg.net/stat_info +ru.net +adygeya.ru +bashkiria.ru +bir.ru +cbg.ru +com.ru +dagestan.ru +grozny.ru +kalmykia.ru +kustanai.ru +marine.ru +mordovia.ru +msk.ru +mytis.ru +nalchik.ru +nov.ru +pyatigorsk.ru +spb.ru +vladikavkaz.ru +vladimir.ru +abkhazia.su +adygeya.su +aktyubinsk.su +arkhangelsk.su +armenia.su +ashgabad.su +azerbaijan.su +balashov.su +bashkiria.su +bryansk.su +bukhara.su +chimkent.su +dagestan.su +east-kazakhstan.su +exnet.su +georgia.su +grozny.su +ivanovo.su +jambyl.su +kalmykia.su +kaluga.su +karacol.su +karaganda.su +karelia.su +khakassia.su +krasnodar.su +kurgan.su +kustanai.su +lenug.su +mangyshlak.su +mordovia.su +msk.su +murmansk.su +nalchik.su +navoi.su +north-kazakhstan.su +nov.su +obninsk.su +penza.su +pokrovsk.su +sochi.su +spb.su +tashkent.su +termez.su +togliatti.su +troitsk.su +tselinograd.su +tula.su +tuva.su +vladikavkaz.su +vladimir.su +vologda.su + +// Fancy Bits, LLC : http://getchannels.com +// Submitted by Aman Gupta +channelsdvr.net +u.channelsdvr.net + +// Fastly Inc. : http://www.fastly.com/ +// Submitted by Fastly Security +edgecompute.app +fastly-edge.com +fastly-terrarium.com +freetls.fastly.net +map.fastly.net +a.prod.fastly.net +global.prod.fastly.net +a.ssl.fastly.net +b.ssl.fastly.net +global.ssl.fastly.net +fastlylb.net +map.fastlylb.net + +// Fastmail : https://www.fastmail.com/ +// Submitted by Marc Bradshaw +*.user.fm + +// FASTVPS EESTI OU : https://fastvps.ru/ +// Submitted by Likhachev Vasiliy +fastvps-server.com +fastvps.host +myfast.host +fastvps.site +myfast.space + +// FearWorks Media Ltd. : https://fearworksmedia.co.uk +// Submitted by Keith Fairley +conn.uk +copro.uk +hosp.uk + +// Fedora : https://fedoraproject.org/ +// Submitted by Patrick Uiterwijk +fedorainfracloud.org +fedorapeople.org +cloud.fedoraproject.org +app.os.fedoraproject.org +app.os.stg.fedoraproject.org + +// Fermax : https://fermax.com/ +// Submitted by Koen Van Isterdael +mydobiss.com + +// FH Muenster : https://www.fh-muenster.de +// Submitted by Robin Naundorf +fh-muenster.io + +// Figma : https://www.figma.com +// Submitted by Nick Frost +figma.site +preview.site + +// Filegear Inc. : https://www.filegear.com +// Submitted by Jason Zhu +filegear.me + +// Firebase, Inc. +// Submitted by Chris Raynor +firebaseapp.com + +// FlashDrive : https://flashdrive.io +// Submitted by Eric Chan +fldrv.com + +// Fleek Labs Inc : https://fleek.xyz +// Submitted by Parsa Ghadimi +on-fleek.app + +// FlutterFlow : https://flutterflow.io +// Submitted by Anton Emelyanov +flutterflow.app + +// fly.io : https://fly.io +// Submitted by Kurt Mackey +fly.dev +shw.io +edgeapp.net + +// Forgerock : https://www.forgerock.com +// Submitted by Roderick Parr +forgeblocks.com +id.forgerock.io + +// FoundryLabs, Inc : https://e2b.dev/ +// Submitted by Jiri Sveceny +e2b.app + +// Framer : https://www.framer.com +// Submitted by Koen Rouwhorst +framer.ai +framer.app +framercanvas.com +framer.media +framer.photos +framer.website +framer.wiki + +// Frederik Braun : https://frederik-braun.com +// Submitted by Frederik Braun +*.0e.vc + +// Freebox : http://www.freebox.fr +// Submitted by Romain Fliedel +freebox-os.com +freeboxos.com +fbx-os.fr +fbxos.fr +freebox-os.fr +freeboxos.fr + +// freedesktop.org : https://www.freedesktop.org +// Submitted by Daniel Stone +freedesktop.org + +// freemyip.com : https://freemyip.com +// Submitted by Cadence +freemyip.com + +// Frusky MEDIA&PR : https://www.frusky.de +// Submitted by Victor Pupynin +*.frusky.de + +// FunkFeuer - Verein zur Förderung freier Netze : https://www.funkfeuer.at +// Submitted by Daniel A. Maierhofer +wien.funkfeuer.at + +// Future Versatile Group. : https://www.fvg-on.net/ +// T.Kabu +daemon.asia +dix.asia +mydns.bz +0am.jp +0g0.jp +0j0.jp +0t0.jp +mydns.jp +pgw.jp +wjg.jp +keyword-on.net +live-on.net +server-on.net +mydns.tw +mydns.vc + +// Futureweb GmbH : https://www.futureweb.at +// Submitted by Andreas Schnederle-Wagner +*.futurecms.at +*.ex.futurecms.at +*.in.futurecms.at +futurehosting.at +futuremailing.at +*.ex.ortsinfo.at +*.kunden.ortsinfo.at +*.statics.cloud + +// GCom Internet : https://www.gcom.net.au +// Submitted by Leo Julius +aliases121.com + +// GDS : https://www.gov.uk/service-manual/technology/managing-domain-names +// Submitted by Stephen Ford +campaign.gov.uk +service.gov.uk +independent-commission.uk +independent-inquest.uk +independent-inquiry.uk +independent-panel.uk +independent-review.uk +public-inquiry.uk +royal-commission.uk + +// Gehirn Inc. : https://www.gehirn.co.jp/ +// Submitted by Kohei YOSHIDA +gehirn.ne.jp +usercontent.jp + +// Gentlent, Inc. : https://www.gentlent.com +// Submitted by Tom Klein +gentapps.com +gentlentapis.com +cdn-edges.net + +// GignoSystemJapan : http://gsj.bz +// Submitted by GignoSystemJapan +gsj.bz + +// GitHub, Inc. +// Submitted by Patrick Toomey +github.app +githubusercontent.com +githubpreview.dev +github.io + +// GitLab, Inc. : https://about.gitlab.com/ +// Submitted by Alex Hanselka +gitlab.io + +// Gitplac.si : https://gitplac.si +// Submitted by Aljaž Starc +gitapp.si +gitpage.si + +// Global NOG Alliance : https://nogalliance.org/ +// Submitted by Sander Steffann +nog.community + +// Globe Hosting SRL : https://www.globehosting.com/ +// Submitted by Gavin Brown +co.ro +shop.ro + +// GMO Pepabo, Inc. : https://pepabo.com/ +// Submitted by Hosting Div +lolipop.io +angry.jp +babyblue.jp +babymilk.jp +backdrop.jp +bambina.jp +bitter.jp +blush.jp +boo.jp +boy.jp +boyfriend.jp +but.jp +candypop.jp +capoo.jp +catfood.jp +cheap.jp +chicappa.jp +chillout.jp +chips.jp +chowder.jp +chu.jp +ciao.jp +cocotte.jp +coolblog.jp +cranky.jp +cutegirl.jp +daa.jp +deca.jp +deci.jp +digick.jp +egoism.jp +fakefur.jp +fem.jp +flier.jp +floppy.jp +fool.jp +frenchkiss.jp +girlfriend.jp +girly.jp +gloomy.jp +gonna.jp +greater.jp +hacca.jp +heavy.jp +her.jp +hiho.jp +hippy.jp +holy.jp +hungry.jp +icurus.jp +itigo.jp +jellybean.jp +kikirara.jp +kill.jp +kilo.jp +kuron.jp +littlestar.jp +lolipopmc.jp +lolitapunk.jp +lomo.jp +lovepop.jp +lovesick.jp +main.jp +mods.jp +mond.jp +mongolian.jp +moo.jp +namaste.jp +nikita.jp +nobushi.jp +noor.jp +oops.jp +parallel.jp +parasite.jp +pecori.jp +peewee.jp +penne.jp +pepper.jp +perma.jp +pigboat.jp +pinoko.jp +punyu.jp +pupu.jp +pussycat.jp +pya.jp +raindrop.jp +readymade.jp +sadist.jp +schoolbus.jp +secret.jp +staba.jp +stripper.jp +sub.jp +sunnyday.jp +thick.jp +tonkotsu.jp +under.jp +upper.jp +velvet.jp +verse.jp +versus.jp +vivian.jp +watson.jp +weblike.jp +whitesnow.jp +zombie.jp +heteml.net + +// GoDaddy Registry : https://registry.godaddy +// Submitted by Rohan Durrant +graphic.design + +// GoIP DNS Services : http://www.goip.de +// Submitted by Christian Poulter +goip.de + +// Google, Inc. +// Submitted by Shannon McCabe +*.hosted.app +*.run.app +*.mtls.run.app +web.app +*.0emm.com +appspot.com +*.r.appspot.com +blogspot.com +codespot.com +googleapis.com +googlecode.com +pagespeedmobilizer.com +withgoogle.com +withyoutube.com +*.gateway.dev +cloud.goog +translate.goog +*.usercontent.goog +cloudfunctions.net + +// Goupile : https://goupile.fr +// Submitted by Niels Martignene +goupile.fr + +// GOV.UK Pay : https://www.payments.service.gov.uk/ +// Submitted by Richard Baker +pymnt.uk + +// GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/ +// Submitted by Tom Whitwell +cloudapps.digital +london.cloudapps.digital + +// Government of the Netherlands : https://www.government.nl +// Submitted by +gov.nl + +// Grafana Labs : https://grafana.com/ +// Submitted by Platform Engineering +grafana-dev.net + +// GrayJay Web Solutions Inc. : https://grayjaysports.ca +// Submitted by Matt Yamkowy +grayjayleagues.com + +// GünstigBestellen : https://günstigbestellen.de +// Submitted by Furkan Akkoc +günstigbestellen.de +günstigliefern.de + +// Hackclub Nest : https://hackclub.app +// Submitted by Cyteon +hackclub.app + +// Häkkinen.fi : https://www.häkkinen.fi/ +// Submitted by Eero Häkkinen +häkkinen.fi + +// Hashbang : https://hashbang.sh +hashbang.sh + +// Hasura : https://hasura.io +// Submitted by Shahidh K Muhammed +hasura.app +hasura-app.io + +// Hatena Co., Ltd. : https://hatena.co.jp +// Submitted by Masato Nakamura +hatenablog.com +hatenadiary.com +hateblo.jp +hatenablog.jp +hatenadiary.jp +hatenadiary.org + +// Heilbronn University of Applied Sciences - Faculty Informatics (GitLab Pages) : https://www.hs-heilbronn.de +// Submitted by Richard Zowalla +pages.it.hs-heilbronn.de +pages-research.it.hs-heilbronn.de + +// HeiyuSpace : https://lazycat.cloud +// Submitted by Xia Bin +heiyu.space + +// Helio Networks : https://heliohost.org +// Submitted by Ben Frede +helioho.st +heliohost.us + +// Hepforge : https://www.hepforge.org +// Submitted by David Grellscheid +hepforge.org + +// Heroku : https://www.heroku.com/ +// Submitted by Shumon Huque +herokuapp.com + +// Heyflow : https://www.heyflow.com +// Submitted by Mirko Nitschke +heyflow.page +heyflow.site + +// Hibernating Rhinos +// Submitted by Oren Eini +ravendb.cloud +ravendb.community +development.run +ravendb.run + +// HiDNS : https://www.hidoha.net +// Submitted by ifeng +hidns.co +hidns.vip + +// home.pl S.A. : https://home.pl +// Submitted by Krzysztof Wolski +homesklep.pl + +// Homebase : https://homebase.id/ +// Submitted by Jason Babo +*.kin.one +*.id.pub +*.kin.pub + +// Hoplix : https://www.hoplix.com +// Submitted by Danilo De Franco +hoplix.shop + +// HOSTBIP REGISTRY : https://www.hostbip.com/ +// Submitted by Atanunu Igbunuroghene +orx.biz +biz.ng +co.biz.ng +dl.biz.ng +go.biz.ng +lg.biz.ng +on.biz.ng +col.ng +firm.ng +gen.ng +ltd.ng +ngo.ng +plc.ng + +// HostyHosting : https://hostyhosting.com +hostyhosting.io + +// Hugging Face : https://huggingface.co +// Submitted by Eliott Coyac +hf.space +static.hf.space + +// Hypernode B.V. : https://www.hypernode.com/ +// Submitted by Cipriano Groenendal +hypernode.io + +// I-O DATA DEVICE, INC. : http://www.iodata.com/ +// Submitted by Yuji Minagawa +iobb.net + +// i-registry s.r.o. : http://www.i-registry.cz/ +// Submitted by Martin Semrad +co.cz + +// Ici la Lune : http://www.icilalune.com/ +// Submitted by Simon Morvan +*.moonscale.io +moonscale.net + +// iDOT Services Limited : http://www.domain.gr.com +// Submitted by Gavin Brown +gr.com + +// iki.fi +// Submitted by Hannu Aronsson +iki.fi + +// iliad italia : https://www.iliad.it +// Submitted by Marios Makassikis +ibxos.it +iliadboxos.it + +// Incsub, LLC : https://incsub.com/ +// Submitted by Aaron Edwards +smushcdn.com +wphostedmail.com +wpmucdn.com +tempurl.host +wpmudev.host + +// Individual Network Berlin e.V. : https://www.in-berlin.de/ +// Submitted by Christian Seitz +dyn-berlin.de +in-berlin.de +in-brb.de +in-butter.de +in-dsl.de +in-vpn.de +in-dsl.net +in-vpn.net +in-dsl.org +in-vpn.org + +// Inferno Communications : https://inferno.co.uk +// Submitted by Connor McFarlane +oninferno.net + +// info.at : http://www.info.at/ +biz.at +info.at + +// info.cx : http://info.cx +// Submitted by June Slater +info.cx + +// Interlegis : http://www.interlegis.leg.br +// Submitted by Gabriel Ferreira +ac.leg.br +al.leg.br +am.leg.br +ap.leg.br +ba.leg.br +ce.leg.br +df.leg.br +es.leg.br +go.leg.br +ma.leg.br +mg.leg.br +ms.leg.br +mt.leg.br +pa.leg.br +pb.leg.br +pe.leg.br +pi.leg.br +pr.leg.br +rj.leg.br +rn.leg.br +ro.leg.br +rr.leg.br +rs.leg.br +sc.leg.br +se.leg.br +sp.leg.br +to.leg.br + +// intermetrics GmbH : https://pixolino.com/ +// Submitted by Wolfgang Schwarz +pixolino.com + +// Internet-Pro, LLP : https://netangels.ru/ +// Submitted by Vasiliy Sheredeko +na4u.ru + +// Inventor Services : https://inventor.gg/ +// Submitted by Inventor Team +botdash.app +botdash.dev +botdash.gg +botdash.net +botda.sh +botdash.xyz + +// IONOS SE : https://www.ionos.com/ +// IONOS Group SE : https://www.ionos-group.com/ +// Submitted by Henrik Willert +apps-1and1.com +live-website.com +webspace-host.com +apps-1and1.net +websitebuilder.online +app-ionos.space + +// iopsys software solutions AB : https://iopsys.eu/ +// Submitted by Roman Azarenko +iopsys.se + +// IPFS Project : https://ipfs.tech/ +// Submitted by Interplanetary Shipyard +*.inbrowser.dev +*.dweb.link +*.inbrowser.link + +// IPiFony Systems, Inc. : https://www.ipifony.com/ +// Submitted by Matthew Hardeman +ipifony.net + +// ir.md : https://nic.ir.md +// Submitted by Ali Soizi +ir.md + +// is-a-good.dev : https://is-a-good.dev +// Submitted by William Harrison +is-a-good.dev + +// IServ GmbH : https://iserv.de +// Submitted by Kim Brodowski +iservschule.de +mein-iserv.de +schuldock.de +schulplattform.de +schulserver.de +test-iserv.de +iserv.dev +iserv.host + +// Jelastic, Inc. : https://jelastic.com/ +// Submitted by Ihor Kolodyuk +mel.cloudlets.com.au +cloud.interhostsolutions.be +alp1.ae.flow.ch +appengine.flow.ch +es-1.axarnet.cloud +diadem.cloud +vip.jelastic.cloud +jele.cloud +it1.eur.aruba.jenv-aruba.cloud +it1.jenv-aruba.cloud +keliweb.cloud +cs.keliweb.cloud +oxa.cloud +tn.oxa.cloud +uk.oxa.cloud +primetel.cloud +uk.primetel.cloud +ca.reclaim.cloud +uk.reclaim.cloud +us.reclaim.cloud +ch.trendhosting.cloud +de.trendhosting.cloud +jele.club +dopaas.com +paas.hosted-by-previder.com +rag-cloud.hosteur.com +rag-cloud-ch.hosteur.com +jcloud.ik-server.com +jcloud-ver-jpc.ik-server.com +demo.jelastic.com +paas.massivegrid.com +jed.wafaicloud.com +ryd.wafaicloud.com +j.scaleforce.com.cy +jelastic.dogado.eu +fi.cloudplatform.fi +demo.datacenter.fi +paas.datacenter.fi +jele.host +mircloud.host +paas.beebyte.io +sekd1.beebyteapp.io +jele.io +jc.neen.it +jcloud.kz +cloudjiffy.net +fra1-de.cloudjiffy.net +west1-us.cloudjiffy.net +jls-sto1.elastx.net +jls-sto2.elastx.net +jls-sto3.elastx.net +fr-1.paas.massivegrid.net +lon-1.paas.massivegrid.net +lon-2.paas.massivegrid.net +ny-1.paas.massivegrid.net +ny-2.paas.massivegrid.net +sg-1.paas.massivegrid.net +jelastic.saveincloud.net +nordeste-idc.saveincloud.net +j.scaleforce.net +sdscloud.pl +unicloud.pl +mircloud.ru +enscaled.sg +jele.site +jelastic.team +orangecloud.tn +j.layershift.co.uk +phx.enscaled.us +mircloud.us + +// Jino : https://www.jino.ru +// Submitted by Sergey Ulyashin +myjino.ru +*.hosting.myjino.ru +*.landing.myjino.ru +*.spectrum.myjino.ru +*.vps.myjino.ru + +// Jotelulu S.L. : https://jotelulu.com +// Submitted by Daniel Fariña +jote.cloud +jotelulu.cloud +jote-dr-lt1.com +jote-rd-lt1.com + +// JouwWeb B.V. : https://www.jouwweb.nl +// Submitted by Camilo Sperberg +webadorsite.com +jouwweb.site + +// Joyent : https://www.joyent.com/ +// Submitted by Brian Bennett +*.cns.joyent.com +*.triton.zone + +// JS.ORG : http://dns.js.org +// Submitted by Stefan Keim +js.org + +// KaasHosting : http://www.kaashosting.nl/ +// Submitted by Wouter Bakker +kaas.gg +khplay.nl + +// Kapsi : https://kapsi.fi +// Submitted by Tomi Juntunen +kapsi.fi + +// Katholieke Universiteit Leuven : https://www.kuleuven.be +// Submitted by Abuse KU Leuven +ezproxy.kuleuven.be +kuleuven.cloud + +// Keyweb AG : https://www.keyweb.de +// Submitted by Martin Dannehl +keymachine.de + +// KingHost : https://king.host +// Submitted by Felipe Keller Braz +kinghost.net +uni5.net + +// KnightPoint Systems, LLC : http://www.knightpoint.com/ +// Submitted by Roy Keene +knightpoint.systems + +// KoobinEvent, SL : https://www.koobin.com +// Submitted by Iván Oliva +koobin.events + +// Krellian Ltd. : https://krellian.com +// Submitted by Ben Francis +webthings.io +krellian.net + +// KUROKU LTD : https://kuroku.ltd/ +// Submitted by DisposaBoy +oya.to + +// KV GmbH : https://www.nic.co.de +// Submitted by KV GmbH +// Abuse reports to +co.de + +// Laravel Holdings, Inc. : https://laravel.com +// Submitted by André Valentin & James Brooks +laravel.cloud +on-forge.com +on-vapor.com + +// LCube - Professional hosting e.K. : https://www.lcube-webhosting.de +// Submitted by Lars Laehn +git-repos.de +lcube-server.de +svn-repos.de + +// Leadpages : https://www.leadpages.net +// Submitted by Greg Dallavalle +leadpages.co +lpages.co +lpusercontent.com + +// Leapcell : https://leapcell.io/ +// Submitted by Leapcell Team +leapcell.app +leapcell.dev +leapcell.online + +// Liara : https://liara.ir +// Submitted by Amirhossein Badinloo +liara.run +iran.liara.run + +// libp2p project : https://libp2p.io +// Submitted by Interplanetary Shipyard +libp2p.direct + +// Libre IT Ltd : https://libre.nz +// Submitted by Tomas Maggio +runcontainers.dev + +// Lifetime Hosting : https://Lifetime.Hosting/ +// Submitted by Mike Fillator +co.business +co.education +co.events +co.financial +co.network +co.place +co.technology + +// linkyard ldt : https://www.linkyard.ch/ +// Submitted by Mario Siegenthaler +linkyard-cloud.ch +linkyard.cloud + +// Linode : https://linode.com +// Submitted by +members.linode.com +*.nodebalancer.linode.com +*.linodeobjects.com +ip.linodeusercontent.com + +// LiquidNet Ltd : http://www.liquidnetlimited.com/ +// Submitted by Victor Velchev +we.bs + +// Listen53 : https://www.l53.net +// Submitted by Gerry Keh +filegear-sg.me +ggff.net + +// Localcert : https://localcert.dev +// Submitted by Lann Martin +*.user.localcert.dev + +// Localtonet : https://localtonet.com/ +// Submitted by Burak Isleyici +localtonet.com +*.localto.net + +// Lodz University of Technology LODMAN regional domains : https://www.man.lodz.pl/dns +// Submitted by Piotr Wilk +lodz.pl +pabianice.pl +plock.pl +sieradz.pl +skierniewice.pl +zgierz.pl + +// Log'in Line : https://www.loginline.com/ +// Submitted by Rémi Mach +loginline.app +loginline.dev +loginline.io +loginline.services +loginline.site + +// Lõhmus Family, The : https://lohmus.me/ +// Submitted by Heiki Lõhmus +lohmus.me + +// Lovable : https://lovable.dev +// Submitted by Fabian Hedin +lovable.app +lovableproject.com +lovable.run +lovable.sh + +// LubMAN UMCS Sp. z o.o : https://lubman.pl/ +// Submitted by Ireneusz Maliszewski +krasnik.pl +leczna.pl +lubartow.pl +lublin.pl +poniatowa.pl +swidnik.pl + +// Lug.org.uk : https://lug.org.uk +// Submitted by Jon Spriggs +glug.org.uk +lug.org.uk +lugs.org.uk + +// Lukanet Ltd : https://lukanet.com +// Submitted by Anton Avramov +barsy.bg +barsy.club +barsycenter.com +barsyonline.com +barsy.de +barsy.dev +barsy.eu +barsy.gr +barsy.in +barsy.info +barsy.io +barsy.me +barsy.menu +barsyonline.menu +barsy.mobi +barsy.net +barsy.online +barsy.org +barsy.pro +barsy.pub +barsy.ro +barsy.rs +barsy.shop +barsyonline.shop +barsy.site +barsy.store +barsy.support +barsy.uk +barsy.co.uk +barsyonline.co.uk + +// Lutra : https://lutra.ai +// Submitted by Joshua Newman +*.lutrausercontent.com + +// Luyani Inc. : https://luyani.com/ +// Submitted by Umut Gumeli +luyani.app +luyani.net + +// Magento Commerce +// Submitted by Damien Tournoud +*.magentosite.cloud + +// Mail.Ru Group : https://hb.cldmail.ru +// Submitted by Ilya Zaretskiy +hb.cldmail.ru + +// MathWorks : https://www.mathworks.com/ +// Submitted by Emily Reed +matlab.cloud +modelscape.com +mwcloudnonprod.com +polyspace.com + +// May First - People Link : https://mayfirst.org/ +// Submitted by Jamie McClelland +mayfirst.info +mayfirst.org + +// Maze Play : https://www.mazeplay.com +// Submitted by Adam Humpherys +mazeplay.com + +// McHost : https://mchost.ru +// Submitted by Evgeniy Subbotin +mcdir.me +mcdir.ru +vps.mcdir.ru +mcpre.ru + +// Mediatech : https://mediatech.by +// Submitted by Evgeniy Kozhuhovskiy +mediatech.by +mediatech.dev + +// Medicom Health : https://medicomhealth.com +// Submitted by Michael Olson +hra.health + +// MedusaJS, Inc : https://medusajs.com/ +// Submitted by Stevche Radevski +medusajs.app + +// Memset hosting : https://www.memset.com +// Submitted by Tom Whitwell +miniserver.com +memset.net + +// Messerli Informatik AG : https://www.messerli.ch/ +// Submitted by Ruben Schmidmeister +messerli.app + +// Meta Platforms, Inc. : https://meta.com/ +// Submitted by Jacob Cordero +atmeta.com +apps.fbsbx.com + +// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/ +// Submitted by Zdeněk Šustr and Radim Janča +*.cloud.metacentrum.cz +custom.metacentrum.cz +flt.cloud.muni.cz +usr.cloud.muni.cz + +// Meteor Development Group : https://www.meteor.com/hosting +// Submitted by Pierre Carrier +meteorapp.com +eu.meteorapp.com + +// Michau Enterprises Limited : http://www.co.pl/ +co.pl + +// Microsoft Corporation : http://microsoft.com +// Submitted by Public Suffix List Admin +// Managed by Corporate Domains +// Microsoft Azure : https://home.azure +*.azurecontainer.io +azure-api.net +azure-mobile.net +azureedge.net +azurefd.net +azurestaticapps.net +1.azurestaticapps.net +2.azurestaticapps.net +3.azurestaticapps.net +4.azurestaticapps.net +5.azurestaticapps.net +6.azurestaticapps.net +7.azurestaticapps.net +centralus.azurestaticapps.net +eastasia.azurestaticapps.net +eastus2.azurestaticapps.net +westeurope.azurestaticapps.net +westus2.azurestaticapps.net +azurewebsites.net +cloudapp.net +trafficmanager.net +blob.core.windows.net +servicebus.windows.net + +// MikroTik : https://mikrotik.com +// Submitted by MikroTik SysAdmin Team +routingthecloud.com +sn.mynetname.net +routingthecloud.net +routingthecloud.org + +// Million Software, Inc : https://million.dev/ +// Submitted by Rayhan Noufal Arayilakath +same-app.com +same-preview.com + +// minion.systems : http://minion.systems +// Submitted by Robert Böttinger +csx.cc + +// Mittwald CM Service GmbH & Co. KG : https://mittwald.de +// Submitted by Marco Rieger +mydbserver.com +webspaceconfig.de +mittwald.info +mittwaldserver.info +typo3server.info +project.space + +// MODX Systems LLC : https://modx.com +// Submitted by Elizabeth Southwell +modx.dev + +// Mozilla Foundation : https://mozilla.org/ +// Submitted by glob +bmoattachments.org + +// MSK-IX : https://www.msk-ix.ru/ +// Submitted by Khannanov Roman +net.ru +org.ru +pp.ru + +// Mythic Beasts : https://www.mythic-beasts.com +// Submitted by Paul Cammish +hostedpi.com +caracal.mythic-beasts.com +customer.mythic-beasts.com +fentiger.mythic-beasts.com +lynx.mythic-beasts.com +ocelot.mythic-beasts.com +oncilla.mythic-beasts.com +onza.mythic-beasts.com +sphinx.mythic-beasts.com +vs.mythic-beasts.com +x.mythic-beasts.com +yali.mythic-beasts.com +cust.retrosnub.co.uk + +// Nabu Casa : https://www.nabucasa.com +// Submitted by Paulus Schoutsen +ui.nabu.casa + +// Net at Work Gmbh : https://www.netatwork.de +// Submitted by Jan Jaeschke +cloud.nospamproxy.com +o365.cloud.nospamproxy.com + +// Net libre : https://www.netlib.re +// Submitted by Philippe PITTOLI +netlib.re + +// Netfy Domains : https://netfy.domains +// Submitted by Suranga Ranasinghe +netfy.app + +// Netlify : https://www.netlify.com +// Submitted by Jessica Parsons +netlify.app + +// Neustar Inc. +// Submitted by Trung Tran +4u.com + +// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ +// Submitted by Jeff Wheelhouse +nfshost.com + +// NFT.Storage : https://nft.storage/ +// Submitted by Vasco Santos or +ipfs.nftstorage.link + +// NGO.US Registry : https://nic.ngo.us +// Submitted by Alstra Solutions Ltd. Networking Team +ngo.us + +// ngrok : https://ngrok.com/ +// Submitted by Alan Shreve +ngrok.app +ngrok-free.app +ngrok.dev +ngrok-free.dev +ngrok.io +ap.ngrok.io +au.ngrok.io +eu.ngrok.io +in.ngrok.io +jp.ngrok.io +sa.ngrok.io +us.ngrok.io +ngrok.pizza +ngrok.pro + +// Nicolaus Copernicus University in Torun - MSK TORMAN : https://www.man.torun.pl +torun.pl + +// Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/ +// Submitted by Nicholas Ford +nh-serv.co.uk +nimsite.uk + +// No-IP.com : https://noip.com/ +// Submitted by Deven Reza +mmafan.biz +myftp.biz +no-ip.biz +no-ip.ca +fantasyleague.cc +gotdns.ch +3utilities.com +blogsyte.com +ciscofreak.com +damnserver.com +ddnsking.com +ditchyourip.com +dnsiskinky.com +dynns.com +geekgalaxy.com +health-carereform.com +homesecuritymac.com +homesecuritypc.com +myactivedirectory.com +mysecuritycamera.com +myvnc.com +net-freaks.com +onthewifi.com +point2this.com +quicksytes.com +securitytactics.com +servebeer.com +servecounterstrike.com +serveexchange.com +serveftp.com +servegame.com +servehalflife.com +servehttp.com +servehumour.com +serveirc.com +servemp3.com +servep2p.com +servepics.com +servequake.com +servesarcasm.com +stufftoread.com +unusualperson.com +workisboring.com +dvrcam.info +ilovecollege.info +no-ip.info +brasilia.me +ddns.me +dnsfor.me +hopto.me +loginto.me +noip.me +webhop.me +bounceme.net +ddns.net +eating-organic.net +mydissent.net +myeffect.net +mymediapc.net +mypsx.net +mysecuritycamera.net +nhlfan.net +no-ip.net +pgafan.net +privatizehealthinsurance.net +redirectme.net +serveblog.net +serveminecraft.net +sytes.net +cable-modem.org +collegefan.org +couchpotatofries.org +hopto.org +mlbfan.org +myftp.org +mysecuritycamera.org +nflfan.org +no-ip.org +read-books.org +ufcfan.org +zapto.org +no-ip.co.uk +golffan.us +noip.us +pointto.us + +// NodeArt : https://nodeart.io +// Submitted by Konstantin Nosov +stage.nodeart.io + +// Noop : https://noop.app +// Submitted by Nathaniel Schweinberg +*.developer.app +noop.app + +// Northflank Ltd. : https://northflank.com/ +// Submitted by Marco Suter +*.northflank.app +*.build.run +*.code.run +*.database.run +*.migration.run + +// Noticeable : https://noticeable.io +// Submitted by Laurent Pellegrino +noticeable.news + +// Notion Labs, Inc : https://www.notion.so/ +// Submitted by Jess Yao +notion.site + +// Now-DNS : https://now-dns.com +// Submitted by Steve Russell +dnsking.ch +mypi.co +myiphost.com +forumz.info +soundcast.me +tcp4.me +dnsup.net +hicam.net +now-dns.net +ownip.net +vpndns.net +dynserv.org +now-dns.org +x443.pw +ntdll.top +freeddns.us + +// nsupdate.info : https://www.nsupdate.info/ +// Submitted by Thomas Waldmann +nsupdate.info +nerdpol.ovh + +// NYC.mn : https://dot.nyc.mn/ +// Submitted by NYC.mn Subdomain Service +nyc.mn + +// O3O.Foundation : https://o3o.foundation/ +// Submitted by the prvcy.page Registry Team +prvcy.page + +// Obl.ong : https://obl.ong +// Submitted by Reese Armstrong +obl.ong + +// Observable, Inc. : https://observablehq.com +// Submitted by Mike Bostock +observablehq.cloud +static.observableusercontent.com + +// OMG.LOL : https://omg.lol +// Submitted by Adam Newbold +omg.lol + +// Omnibond Systems, LLC. : https://www.omnibond.com +// Submitted by Cole Estep +cloudycluster.net + +// OmniWe Limited : https://omniwe.com +// Submitted by Vicary Archangel +omniwe.site + +// One.com : https://www.one.com/ +// Submitted by Jacob Bunk Nielsen +123webseite.at +123website.be +simplesite.com.br +123website.ch +simplesite.com +123webseite.de +123hjemmeside.dk +123miweb.es +123kotisivu.fi +123siteweb.fr +simplesite.gr +123homepage.it +123website.lu +123website.nl +123hjemmeside.no +service.one +simplesite.pl +123paginaweb.pt +123minsida.se + +// ONID : https://get.onid.ca +// Submitted by ONID Engineering Team +onid.ca + +// Open Domains : https://open-domains.net +// Submitted by William Harrison +is-a-fullstack.dev +is-cool.dev +is-not-a.dev +localplayer.dev +is-local.org + +// Open Social : https://www.getopensocial.com/ +// Submitted by Alexander Varwijk +opensocial.site + +// OpenAI : https://openai.com +// Submitted by Thomas Shadwell +*.oaiusercontent.com + +// OpenCraft GmbH : http://opencraft.com/ +// Submitted by Sven Marnach +opencraft.hosting + +// OpenHost : https://registry.openhost.uk +// Submitted by OpenHost Registry Team +16-b.it +32-b.it +64-b.it + +// OpenResearch GmbH : https://openresearch.com/ +// Submitted by Philipp Schmid +orsites.com + +// Opera Software, A.S.A. +// Submitted by Yngve Pettersen +operaunite.com + +// Oracle Dyn : https://cloud.oracle.com/home https://dyn.com/dns/ +// Submitted by Gregory Drake +// Note: This is intended to also include customer-oci.com due to wildcards implicitly including the current label +*.customer-oci.com +*.oci.customer-oci.com +*.ocp.customer-oci.com +*.ocs.customer-oci.com +*.oraclecloudapps.com +*.oraclegovcloudapps.com +*.oraclegovcloudapps.uk + +// Orange : https://www.orange.com +// Submitted by Alexandre Linte +tech.orange + +// OsSav Technology Ltd. : https://ossav.com/ +// Submitted by OsSav Technology Ltd. +// https://nic.can.re +can.re + +// Oursky Limited : https://authgear.com/ +// Submitted by Authgear Team & Skygear Developer +authgear-staging.com +authgearapps.com +skygearapp.com + +// OutSystems +// Submitted by Duarte Santos +outsystemscloud.com + +// OVHcloud : https://ovhcloud.com +// Submitted by Vincent Cassé +*.hosting.ovh.net +*.webpaas.ovh.net + +// OwnProvider GmbH : http://www.ownprovider.com +// Submitted by Jan Moennich +ownprovider.com +own.pm + +// OwO : https://whats-th.is/ +// Submitted by Dean Sheather +*.owo.codes + +// OX : http://www.ox.rs +// Submitted by Adam Grand +ox.rs + +// oy.lc +// Submitted by Charly Coste +oy.lc + +// Pagefog : https://pagefog.com/ +// Submitted by Derek Myers +pgfog.com + +// PageXL : https://pagexl.com +// Submitted by Yann Guichard +pagexl.com + +// Pantheon Systems, Inc. : https://pantheon.io/ +// Submitted by Gary Dylina +gotpantheon.com +pantheonsite.io + +// Paywhirl, Inc : https://paywhirl.com/ +// Submitted by Daniel Netzer +*.paywhirl.com + +// pcarrier.ca Software Inc : https://pcarrier.ca/ +// Submitted by Pierre Carrier +*.xmit.co +xmit.dev +madethis.site +srv.us +gh.srv.us +gl.srv.us + +// PE Ulyanov Kirill Sergeevich : https://airy.host +// Submitted by Kirill Ulyanov +lk3.ru + +// Peplink | Pepwave : http://peplink.com/ +// Submitted by Steve Leung +mypep.link + +// Perspecta : https://perspecta.com/ +// Submitted by Kenneth Van Alstyne +perspecta.cloud + +// Plain : https://www.plain.com/ +// Submitted by Jesús Hernández +support.site + +// Planet-Work : https://www.planet-work.com/ +// Submitted by Frédéric VANNIÈRE +on-web.fr + +// Platform.sh : https://platform.sh +// Submitted by Nikola Kotur +*.upsun.app +upsunapp.com +ent.platform.sh +eu.platform.sh +us.platform.sh +*.platformsh.site +*.tst.site + +// Platter : https://platter.dev +// Submitted by Patrick Flor +platter-app.dev +platterp.us + +// Pley AB : https://www.pley.com/ +// Submitted by Henning Pohl +pley.games + +// Porter : https://porter.run/ +// Submitted by Rudraksh MK +onporter.run + +// Positive Codes Technology Company : http://co.bn/faq.html +// Submitted by Zulfais +co.bn + +// Postman, Inc : https://postman.com +// Submitted by Rahul Dhawan +postman-echo.com +pstmn.io +mock.pstmn.io +httpbin.org + +// prequalifyme.today : https://prequalifyme.today +// Submitted by DeepakTiwari deepak@ivylead.io +prequalifyme.today + +// prgmr.com : https://prgmr.com/ +// Submitted by Sarah Newman +xen.prgmr.com + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry +priv.at + +// PROJECT ELIV : https://eliv.kr/ +// Submitted by PROJECT ELIV Domain Team +c01.kr +eliv-cdn.kr +eliv-dns.kr +mmv.kr +vki.kr + +// project-study : https://project-study.com +// Submitted by yumenewa +dev.project-study.com + +// Protonet GmbH : http://protonet.io +// Submitted by Martin Meier +protonet.io + +// PT Ekossistim Indo Digital : https://e.id +// Submitted by Eid Team +e.id + +// Publication Presse Communication SARL : https://ppcom.fr +// Submitted by Yaacov Akiba Slama +chirurgiens-dentistes-en-france.fr +byen.site + +// pubtls.org : https://www.pubtls.org +// Submitted by Kor Nielsen +pubtls.org + +// PythonAnywhere LLP : https://www.pythonanywhere.com +// Submitted by Giles Thomas +pythonanywhere.com +eu.pythonanywhere.com + +// QA2 +// Submitted by Daniel Dent : https://www.danieldent.com/ +qa2.com + +// QCX +// Submitted by Cassandra Beelen +qcx.io +*.sys.qcx.io + +// QNAP System Inc : https://www.qnap.com +// Submitted by Nick Chang +myqnapcloud.cn +alpha-myqnapcloud.com +dev-myqnapcloud.com +mycloudnas.com +mynascloud.com +myqnapcloud.com + +// QOTO, Org. +// Submitted by Jeffrey Phillips Freeman +qoto.io + +// Qualifio : https://qualifio.com/ +// Submitted by Xavier De Cock +qualifioapp.com + +// Quality Unit : https://qualityunit.com +// Submitted by Vasyl Tsalko +ladesk.com + +// Qualy : https://qualyhq.com +// Submitted by Raphael Arias +*.qualyhqpartner.com +*.qualyhqportal.com + +// QuickBackend : https://www.quickbackend.com +// Submitted by Dani Biro +qbuser.com + +// Quip : https://quip.com +// Submitted by Patrick Linehan +*.quipelements.com + +// Qutheory LLC : http://qutheory.io +// Submitted by Jonas Schwartz +vapor.cloud +vaporcloud.io + +// Rackmaze LLC : https://www.rackmaze.com +// Submitted by Kirill Pertsev +rackmaze.com +rackmaze.net + +// Rad Web Hosting : https://radwebhosting.com +// Submitted by Scott Claeys +cloudsite.builders +myradweb.net +servername.us + +// Radix FZC : http://domains.in.net +// Submitted by Gavin Brown +web.in +in.net + +// Raidboxes GmbH : https://raidboxes.de +// Submitted by Auke Tembrink +myrdbx.io +site.rb-hosting.io + +// Railway Corporation : https://railway.com +// Submitted by Phineas Walton +up.railway.app + +// Rancher Labs, Inc : https://rancher.com +// Submitted by Vincent Fiduccia +*.on-rancher.cloud +*.on-k3s.io +*.on-rio.io + +// RavPage : https://www.ravpage.co.il +// Submitted by Roni Horowitz +ravpage.co.il + +// Read The Docs, Inc : https://www.readthedocs.org +// Submitted by David Fischer +readthedocs-hosted.com +readthedocs.io + +// Red Hat, Inc. OpenShift : https://openshift.redhat.com/ +// Submitted by Tim Kramer +rhcloud.com + +// Redgate Software : https://red-gate.com +// Submitted by Andrew Farries +instances.spawn.cc + +// Render : https://render.com +// Submitted by Anurag Goel +onrender.com +app.render.com + +// Repl.it : https://repl.it +// Submitted by Lincoln Bergeson +replit.app +id.replit.app +firewalledreplit.co +id.firewalledreplit.co +repl.co +id.repl.co +replit.dev +archer.replit.dev +bones.replit.dev +canary.replit.dev +global.replit.dev +hacker.replit.dev +id.replit.dev +janeway.replit.dev +kim.replit.dev +kira.replit.dev +kirk.replit.dev +odo.replit.dev +paris.replit.dev +picard.replit.dev +pike.replit.dev +prerelease.replit.dev +reed.replit.dev +riker.replit.dev +sisko.replit.dev +spock.replit.dev +staging.replit.dev +sulu.replit.dev +tarpit.replit.dev +teams.replit.dev +tucker.replit.dev +wesley.replit.dev +worf.replit.dev +repl.run + +// Resin.io : https://resin.io +// Submitted by Tim Perry +resindevice.io +devices.resinstaging.io + +// RethinkDB : https://www.rethinkdb.com/ +// Submitted by Chris Kastorff +hzc.io + +// Rico Developments Limited : https://adimo.co +// Submitted by Colin Brown +adimo.co.uk + +// Riseup Networks : https://riseup.net +// Submitted by Micah Anderson +itcouldbewor.se + +// Roar Domains LLC : https://roar.basketball/ +// Submitted by Gavin Brown +aus.basketball +nz.basketball + +// ROBOT PAYMENT INC. : https://www.robotpayment.co.jp/ +// Submitted by Kentaro Takamori +subsc-pay.com +subsc-pay.net + +// Rochester Institute of Technology : http://www.rit.edu/ +// Submitted by Jennifer Herting +git-pages.rit.edu + +// Rocky Enterprise Software Foundation : https://resf.org +// Submitted by Neil Hanlon +rocky.page + +// Ruhr University Bochum : https://www.ruhr-uni-bochum.de/ +// Submitted by Andreas Jobs +rub.de +ruhr-uni-bochum.de +io.noc.ruhr-uni-bochum.de + +// Rusnames Limited : http://rusnames.ru/ +// Submitted by Sergey Zotov +биз.рус +ком.рус +крым.рус +мир.рус +мск.рус +орг.рус +самара.рус +сочи.рус +спб.рус +я.рус + +// Russian Academy of Sciences +// Submitted by Tech Support +ras.ru + +// Sakura Frp : https://www.natfrp.com +// Submitted by Bobo Liu +nyat.app + +// SAKURA Internet Inc. : https://www.sakura.ad.jp/ +// Submitted by Internet Service Department +180r.com +dojin.com +sakuratan.com +sakuraweb.com +x0.com +2-d.jp +bona.jp +crap.jp +daynight.jp +eek.jp +flop.jp +halfmoon.jp +jeez.jp +matrix.jp +mimoza.jp +ivory.ne.jp +mail-box.ne.jp +mints.ne.jp +mokuren.ne.jp +opal.ne.jp +sakura.ne.jp +sumomo.ne.jp +topaz.ne.jp +netgamers.jp +nyanta.jp +o0o0.jp +rdy.jp +rgr.jp +rulez.jp +s3.isk01.sakurastorage.jp +s3.isk02.sakurastorage.jp +saloon.jp +sblo.jp +skr.jp +tank.jp +uh-oh.jp +undo.jp +rs.webaccel.jp +user.webaccel.jp +websozai.jp +xii.jp +squares.net +jpn.org +kirara.st +x0.to +from.tv +sakura.tv + +// Salesforce.com, Inc. : https://salesforce.com/ +// Submitted by Salesforce Public Suffix List Team +*.builder.code.com +*.dev-builder.code.com +*.stg-builder.code.com +*.001.test.code-builder-stg.platform.salesforce.com +*.d.crm.dev +*.w.crm.dev +*.wa.crm.dev +*.wb.crm.dev +*.wc.crm.dev +*.wd.crm.dev +*.we.crm.dev +*.wf.crm.dev + +// Sandstorm Development Group, Inc. : https://sandcats.io/ +// Submitted by Asheesh Laroia +sandcats.io + +// SBE network solutions GmbH : https://www.sbe.de/ +// Submitted by Norman Meilick +logoip.com +logoip.de + +// Scaleway : https://www.scaleway.com/ +// Submitted by Scaleway PSL Maintainer +fr-par-1.baremetal.scw.cloud +fr-par-2.baremetal.scw.cloud +nl-ams-1.baremetal.scw.cloud +cockpit.fr-par.scw.cloud +ddl.fr-par.scw.cloud +dtwh.fr-par.scw.cloud +fnc.fr-par.scw.cloud +functions.fnc.fr-par.scw.cloud +ifr.fr-par.scw.cloud +k8s.fr-par.scw.cloud +nodes.k8s.fr-par.scw.cloud +kafk.fr-par.scw.cloud +mgdb.fr-par.scw.cloud +rdb.fr-par.scw.cloud +s3.fr-par.scw.cloud +s3-website.fr-par.scw.cloud +scbl.fr-par.scw.cloud +whm.fr-par.scw.cloud +priv.instances.scw.cloud +pub.instances.scw.cloud +k8s.scw.cloud +cockpit.nl-ams.scw.cloud +ddl.nl-ams.scw.cloud +dtwh.nl-ams.scw.cloud +ifr.nl-ams.scw.cloud +k8s.nl-ams.scw.cloud +nodes.k8s.nl-ams.scw.cloud +kafk.nl-ams.scw.cloud +mgdb.nl-ams.scw.cloud +rdb.nl-ams.scw.cloud +s3.nl-ams.scw.cloud +s3-website.nl-ams.scw.cloud +scbl.nl-ams.scw.cloud +whm.nl-ams.scw.cloud +cockpit.pl-waw.scw.cloud +ddl.pl-waw.scw.cloud +dtwh.pl-waw.scw.cloud +ifr.pl-waw.scw.cloud +k8s.pl-waw.scw.cloud +nodes.k8s.pl-waw.scw.cloud +kafk.pl-waw.scw.cloud +mgdb.pl-waw.scw.cloud +rdb.pl-waw.scw.cloud +s3.pl-waw.scw.cloud +s3-website.pl-waw.scw.cloud +scbl.pl-waw.scw.cloud +scalebook.scw.cloud +smartlabeling.scw.cloud +dedibox.fr + +// schokokeks.org GbR : https://schokokeks.org/ +// Submitted by Hanno Böck +schokokeks.net + +// Scottish Government : https://www.gov.scot +// Submitted by Martin Ellis +gov.scot +service.gov.scot + +// Scry Security : http://www.scrysec.com +// Submitted by Shante Adam +scrysec.com + +// Scrypted : https://scrypted.app +// Submitted by Koushik Dutta +client.scrypted.io + +// Securepoint GmbH : https://www.securepoint.de +// Submitted by Erik Anders +firewall-gateway.com +firewall-gateway.de +my-gateway.de +my-router.de +spdns.de +spdns.eu +firewall-gateway.net +my-firewall.org +myfirewall.org +spdns.org + +// Seidat : https://www.seidat.com +// Submitted by Artem Kondratev +seidat.net + +// Sellfy : https://sellfy.com +// Submitted by Yuriy Romadin +sellfy.store + +// Sendmsg : https://www.sendmsg.co.il +// Submitted by Assaf Stern +minisite.ms + +// Senseering GmbH : https://www.senseering.de +// Submitted by Felix Mönckemeyer +senseering.net + +// Servebolt AS : https://servebolt.com +// Submitted by Daniel Kjeserud +servebolt.cloud + +// Service Online LLC : http://drs.ua/ +// Submitted by Serhii Bulakh +biz.ua +co.ua +pp.ua + +// Shanghai Accounting Society : https://www.sasf.org.cn +// Submitted by Information Administration +as.sh.cn + +// Sheezy.Art : https://sheezy.art +// Submitted by Nyoom +sheezy.games + +// Shopblocks : http://www.shopblocks.com/ +// Submitted by Alex Bowers +myshopblocks.com + +// Shopify : https://www.shopify.com +// Submitted by Alex Richter +myshopify.com + +// Shopit : https://www.shopitcommerce.com/ +// Submitted by Craig McMahon +shopitsite.com + +// shopware AG : https://shopware.com +// Submitted by Jens Küper +shopware.shop +shopware.store + +// Siemens Mobility GmbH +// Submitted by Oliver Graebner +mo-siemens.io + +// SinaAppEngine : http://sae.sina.com.cn/ +// Submitted by SinaAppEngine +1kapp.com +appchizi.com +applinzi.com +sinaapp.com +vipsinaapp.com + +// Siteleaf : https://www.siteleaf.com/ +// Submitted by Skylar Challand +siteleaf.net + +// Small Technology Foundation : https://small-tech.org +// Submitted by Aral Balkan +small-web.org + +// Smallregistry by Promopixel SARL : https://www.smallregistry.net +// Former AFNIC's SLDs +// Submitted by Jérôme Lipowicz +aeroport.fr +avocat.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// Smoove.io : https://www.smoove.io/ +// Submitted by Dan Kozak +vp4.me + +// Snowflake Inc : https://www.snowflake.com/ +// Submitted by Sam Haar +*.snowflake.app +*.privatelink.snowflake.app +streamlit.app +streamlitapp.com + +// Snowplow Analytics : https://snowplowanalytics.com/ +// Submitted by Ian Streeter +try-snowplow.com + +// Software Consulting Michal Zalewski : https://www.mafelo.com +// Submitted by Michal Zalewski +mafelo.net + +// Sony Interactive Entertainment LLC : https://sie.com/ +// Submitted by David Coles +playstation-cloud.com + +// SourceHut : https://sourcehut.org +// Submitted by Drew DeVault +srht.site + +// SourceLair PC : https://www.sourcelair.com +// Submitted by Antonis Kalipetis +apps.lair.io +*.stolos.io + +// sourceWAY GmbH : https://sourceway.de +// Submitted by Richard Reiber +4.at +my.at +my.de +*.nxa.eu +nx.gw + +// SpeedPartner GmbH : https://www.speedpartner.de/ +// Submitted by Stefan Neufeind +customer.speedpartner.de + +// Spreadshop (sprd.net AG) : https://www.spreadshop.com/ +// Submitted by Martin Breest +myspreadshop.at +myspreadshop.com.au +myspreadshop.be +myspreadshop.ca +myspreadshop.ch +myspreadshop.com +myspreadshop.de +myspreadshop.dk +myspreadshop.es +myspreadshop.fi +myspreadshop.fr +myspreadshop.ie +myspreadshop.it +myspreadshop.net +myspreadshop.nl +myspreadshop.no +myspreadshop.pl +myspreadshop.se +myspreadshop.co.uk + +// StackBlitz : https://stackblitz.com +// Submitted by Dominic Elm & Albert Pai +w-corp-staticblitz.com +w-credentialless-staticblitz.com +w-staticblitz.com +bolt.host + +// Stackhero : https://www.stackhero.io +// Submitted by Adrien Gillon +stackhero-network.com + +// STACKIT GmbH & Co. KG : https://www.stackit.de/en/ +// Submitted by STACKIT-DNS Team (Simon Stier) +runs.onstackit.cloud +stackit.gg +stackit.rocks +stackit.run +stackit.zone + +// Staclar : https://staclar.com +// Submitted by Q Misell +// Submitted by Matthias Merkel +musician.io +novecore.site + +// Standard Library : https://stdlib.com +// Submitted by Jacob Lee +api.stdlib.com + +// stereosense GmbH : https://www.involve.me +// Submitted by Florian Burmann +feedback.ac +forms.ac +assessments.cx +calculators.cx +funnels.cx +paynow.cx +quizzes.cx +researched.cx +tests.cx +surveys.so + +// Storacha Network : https://storacha.network +// Submitted by Alan Shaw +ipfs.storacha.link +ipfs.w3s.link + +// Storebase : https://www.storebase.io +// Submitted by Tony Schirmer +storebase.store + +// Storipress : https://storipress.com +// Submitted by Benno Liu +storipress.app + +// Storj Labs Inc. : https://storj.io/ +// Submitted by Philip Hutchins +storj.farm + +// Strapi : https://strapi.io/ +// Submitted by Florent Baldino +strapiapp.com +media.strapiapp.com + +// Strategic System Consulting (eApps Hosting) : https://www.eapps.com/ +// Submitted by Alex Oancea +vps-host.net +atl.jelastic.vps-host.net +njs.jelastic.vps-host.net +ric.jelastic.vps-host.net + +// Streak : https://streak.com +// Submitted by Blake Kadatz +streak-link.com +streaklinks.com +streakusercontent.com + +// Student-Run Computing Facility : https://www.srcf.net/ +// Submitted by Edwin Balani +soc.srcf.net +user.srcf.net + +// Studenten Net Twente : http://www.snt.utwente.nl/ +// Submitted by Silke Hofstra +utwente.io + +// Sub 6 Limited : http://www.sub6.com +// Submitted by Dan Miller +temp-dns.com + +// Supabase : https://supabase.io +// Submitted by Supabase Security +supabase.co +realtime.supabase.co +storage.supabase.co +supabase.in +supabase.net + +// Syncloud : https://syncloud.org +// Submitted by Boris Rybalkin +syncloud.it + +// Synology, Inc. : https://www.synology.com/ +// Submitted by Rony Weng +dscloud.biz +direct.quickconnect.cn +dsmynas.com +familyds.com +diskstation.me +dscloud.me +i234.me +myds.me +synology.me +dscloud.mobi +dsmynas.net +familyds.net +dsmynas.org +familyds.org +direct.quickconnect.to +vpnplus.to + +// Tabit Technologies Ltd. : https://tabit.cloud/ +// Submitted by Oren Agiv +mytabit.com +mytabit.co.il +tabitorder.co.il + +// TAIFUN Software AG : http://taifun-software.de +// Submitted by Bjoern Henke +taifun-dns.de + +// Tailor Inc. : https://www.tailor.tech +// Submitted by Ryuzo Yamamoto +erp.dev +web.erp.dev + +// Tailscale Inc. : https://www.tailscale.com +// Submitted by David Anderson +ts.net +*.c.ts.net + +// TASK geographical domains : https://task.gda.pl/en/services/for-entrepreneurs/ +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl + +// Tave Creative Corp : https://tave.com/ +// Submitted by Adrian Ziemkowski +taveusercontent.com + +// tawk.to, Inc : https://www.tawk.to +// Submitted by tawk.to developer team +p.tawk.email +p.tawkto.email + +// Tche.br : https://tche.br +// Submitted by Bruno Lorensi +tche.br + +// team.blue : https://team.blue +// Submitted by Cedric Dubois +site.tb-hosting.com + +// Teckids e.V. : https://www.teckids.org +// Submitted by Dominik George +edugit.io +s3.teckids.org + +// Telebit : https://telebit.cloud +// Submitted by AJ ONeal +telebit.app +telebit.io +*.telebit.xyz + +// Teleport : https://goteleport.com +// Submitted by Rob Picard +teleport.sh + +// Thingdust AG : https://thingdust.com/ +// Submitted by Adrian Imboden +*.firenet.ch +*.svc.firenet.ch +reservd.com +thingdustdata.com +cust.dev.thingdust.io +reservd.dev.thingdust.io +cust.disrec.thingdust.io +reservd.disrec.thingdust.io +cust.prod.thingdust.io +cust.testing.thingdust.io +reservd.testing.thingdust.io + +// ticket i/O GmbH : https://ticket.io +// Submitted by Christian Franke +tickets.io + +// Tlon.io : https://tlon.io +// Submitted by Mark Staarink +arvo.network +azimuth.network +tlon.network + +// Tor Project, Inc. : https://torproject.org +// Submitted by Antoine Beaupré +torproject.net +pages.torproject.net + +// TownNews.com : http://www.townnews.com +// Submitted by Dustin Ward +townnews-staging.com + +// TrafficPlex GmbH : https://www.trafficplex.de/ +// Submitted by Phillipp Röll +12hp.at +2ix.at +4lima.at +lima-city.at +12hp.ch +2ix.ch +4lima.ch +lima-city.ch +trafficplex.cloud +de.cool +12hp.de +2ix.de +4lima.de +lima-city.de +1337.pictures +clan.rip +lima-city.rocks +webspace.rocks +lima.zone + +// TransIP : https://www.transip.nl +// Submitted by Rory Breuk and Cedric Dubois +*.transurl.be +*.transurl.eu +site.transip.me +*.transurl.nl + +// TuxFamily : http://tuxfamily.org +// Submitted by TuxFamily administrators +tuxfamily.org + +// TwoDNS : https://www.twodns.de/ +// Submitted by TwoDNS-Support +dd-dns.de +dray-dns.de +draydns.de +dyn-vpn.de +dynvpn.de +mein-vigor.de +my-vigor.de +my-wan.de +syno-ds.de +synology-diskstation.de +synology-ds.de +diskstation.eu +diskstation.org + +// Typedream : https://typedream.com +// Submitted by Putri Karunia +typedream.app + +// Typeform : https://www.typeform.com +// Submitted by Typeform +pro.typeform.com + +// Uberspace : https://uberspace.de +// Submitted by Moritz Werner +uber.space + +// UDR Limited : http://www.udr.hk.com +// Submitted by registry +hk.com +inc.hk +ltd.hk +hk.org + +// UK Intis Telecom LTD : https://it.com +// Submitted by ITComdomains +it.com + +// Unison Computing, PBC : https://unison.cloud +// Submitted by Simon Højberg +unison-services.cloud + +// United Gameserver GmbH : https://united-gameserver.de +// Submitted by Stefan Schwarz +virtual-user.de +virtualuser.de + +// United States Writing Corporation : https://uswriting.co +// Submitted by Andrew Sampson +obj.ag + +// UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/ +// see also: whois -h whois.udr.org.yt help +// Submitted by Atanunu Igbunuroghene +name.pm +sch.tf +biz.wf +sch.wf +org.yt + +// University of Banja Luka : https://unibl.org +// Domains for Republic of Srpska administrative entity. +// Submitted by Marko Ivanovic +rs.ba + +// University of Bielsko-Biala regional domain : http://dns.bielsko.pl/ +// Submitted by Marcin +bielsko.pl + +// urown.net : https://urown.net +// Submitted by Hostmaster +urown.cloud +dnsupdate.info + +// US REGISTRY LLC : http://us.org +// Submitted by Gavin Brown +us.org + +// V.UA Domain Registry: https://www.v.ua/ +// Submitted by Serhii Rostilo +v.ua + +// Val Town, Inc : https://val.town/ +// Submitted by Tom MacWright +val.run +web.val.run + +// Vercel, Inc : https://vercel.com/ +// Submitted by Laurens Duijvesteijn +vercel.app +v0.build +vercel.dev +vusercontent.net +vercel.run +now.sh + +// VeryPositive SIA : http://very.lv +// Submitted by Danko Aleksejevs +2038.io + +// Virtual-Info : https://www.virtual-info.info/ +// Submitted by Adnan RIHAN +v-info.info + +// VistaBlog : https://vistablog.ir/ +// Submitted by Hossein Piri +vistablog.ir + +// Viva Republica, Inc. : https://toss.im/ +// Submitted by Deus Team +deus-canvas.com + +// Voorloper.com : https://voorloper.com +// Submitted by Nathan van Bakel +voorloper.cloud + +// Vultr Objects : https://www.vultr.com/products/object-storage/ +// Submitted by Niels Maumenee +*.vultrobjects.com + +// Waffle Computer Inc., Ltd. : https://docs.waffleinfo.com +// Submitted by Masayuki Note +wafflecell.com + +// Walrus : https://walrus.xyz +// Submitted by Max Spector +wal.app + +// Webflow, Inc. : https://www.webflow.com +// Submitted by Webflow Security Team +webflow.io +webflowtest.io + +// WebHare bv : https://www.webhare.com/ +// Submitted by Arnold Hendriks +*.webhare.dev + +// WebHotelier Technologies Ltd : https://www.webhotelier.net/ +// Submitted by Apostolos Tsakpinis +bookonline.app +hotelwithflight.com +reserve-online.com +reserve-online.net + +// WebPros International, LLC : https://webpros.com/ +// Submitted by Nicolas Rochelemagne +cprapid.com +pleskns.com +wp2.host +pdns.page +plesk.page +cpanel.site +wpsquared.site + +// WebWaddle Ltd : https://webwaddle.com/ +// Submitted by Merlin Glander +*.wadl.top + +// Western Digital Technologies, Inc : https://www.wdc.com +// Submitted by Jung Jin +remotewd.com + +// Whatbox Inc. : https://whatbox.ca/ +// Submitted by Anthony Ryan +box.ca + +// WIARD Enterprises : https://wiardweb.com +// Submitted by Kidd Hustle +pages.wiardweb.com + +// Wikimedia Foundation : https://wikitech.wikimedia.org +// Submitted by Timo Tijhof +toolforge.org +wmcloud.org +beta.wmcloud.org +wmflabs.org + +// William Harrison : https://wharrison.com.au +// Submitted by William Harrison +wdh.app +hrsn.au +vps.hrsn.au +hrsn.dev +is-a.dev +localcert.net + +// Windsurf : https://windsurf.com +// Submitted by Douglas Chen +windsurf.app +windsurf.build + +// WISP : https://wisp.gg +// Submitted by Stepan Fedotov +panel.gg +daemon.panel.gg + +// Wix.com, Inc. : https://www.wix.com +// Submitted by Shahar Talmi / Alon Kochba +wixsite.com +wixstudio.com +editorx.io +wixstudio.io +wix.run + +// Wizard Zines : https://wizardzines.com +// Submitted by Julia Evans +messwithdns.com + +// WoltLab GmbH : https://www.woltlab.com +// Submitted by Tim Düsterhus +woltlab-demo.com +myforum.community +community-pro.de +diskussionsbereich.de +community-pro.net +meinforum.net + +// Woods Valldata : https://www.woodsvalldata.co.uk/ +// Submitted by Chris Whittle +affinitylottery.org.uk +raffleentry.org.uk +weeklylottery.org.uk + +// WP Engine : https://wpengine.com/ +// Submitted by Michael Smith +// Submitted by Brandon DuRette +wpenginepowered.com +js.wpenginepowered.com + +// XenonCloud GbR : https://xenoncloud.net +// Submitted by Julian Uphoff +*.xenonconnect.de +half.host + +// XnBay Technology : http://www.xnbay.com/ +// Submitted by XnBay Developer +xnbay.com +u2.xnbay.com +u2-local.xnbay.com + +// XS4ALL Internet bv : https://www.xs4all.nl/ +// Submitted by Daniel Mostertman +cistron.nl +demon.nl +xs4all.space + +// Yandex.Cloud LLC : https://cloud.yandex.com +// Submitted by Alexander Lodin +yandexcloud.net +storage.yandexcloud.net +website.yandexcloud.net +sourcecraft.site + +// YesCourse Pty Ltd : https://yescourse.com +// Submitted by Atul Bhouraskar +official.academy + +// Yola : https://www.yola.com/ +// Submitted by Stefano Rivera +yolasite.com + +// Yunohost : https://yunohost.org +// Submitted by Valentin Grimaud +ynh.fr +nohost.me +noho.st + +// ZaNiC : http://www.za.net/ +// Submitted by registry +za.net +za.org + +// ZAP-Hosting GmbH & Co. KG : https://zap-hosting.com +// Submitted by Julian Alker +zap.cloud + +// Zeabur : https://zeabur.com/ +// Submitted by Zeabur Team +zeabur.app + +// Zerops : https://zerops.io/ +// Submitted by Zerops Team +*.zerops.app + +// Zine EOOD : https://zine.bg/ +// Submitted by Martin Angelov +bss.design + +// Zitcom A/S : https://www.zitcom.dk +// Submitted by Emil Stahl +basicserver.io +virtualserver.io +enterprisecloud.nu + +// Zone.ID: https://zone.id +// Submitted by Gx1.org +zone.id + +// ZoneABC : https://zoneabc.net +// Submitted by ZoneABC Team +zabc.net + +// ===END PRIVATE DOMAINS=== \ No newline at end of file diff --git a/SPECS/publicsuffix-list/publicsuffix-list.spec b/SPECS/publicsuffix-list/publicsuffix-list.spec new file mode 100644 index 00000000..582f8b34 --- /dev/null +++ b/SPECS/publicsuffix-list/publicsuffix-list.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: publicsuffix-list +Version: 20251008 +Release: %autorelease +Summary: Cross-vendor public domain suffix database +License: MPL-2.0 +URL: https://publicsuffix.org/ +# https://publicsuffix.org/list/public_suffix_list.dat +Source0: public_suffix_list.dat +# https://www.mozilla.org/media/MPL/2.0/index.txt +Source1: index.txt +# https://github.com/publicsuffix/list/raw/main/tests/test_psl.txt +Source2: test_psl.txt + +%description +The Public Suffix List is a cross-vendor initiative to provide an accurate list +of domain name suffixes. Web clients use this list to restrict where cookies +may be set, protecting users from cross-site tracking. + +%prep +%setup -c -T +cp -p %{SOURCE0} . +cp -p %{SOURCE1} . +cp -p %{SOURCE2} . + +%install +install -d -m 755 %{buildroot}%{_datadir}/publicsuffix +install -m 644 -p public_suffix_list.dat %{buildroot}%{_datadir}/publicsuffix/ +install -m 644 -p test_psl.txt %{buildroot}%{_datadir}/publicsuffix/ +install -m 644 -p index.txt %{buildroot}%{_datadir}/publicsuffix/ +ln -s public_suffix_list.dat %{buildroot}%{_datadir}/publicsuffix/effective_tld_names.dat + +%files +%dir %{_datadir}/publicsuffix +%{_datadir}/publicsuffix/effective_tld_names.dat +%{_datadir}/publicsuffix/public_suffix_list.dat +%{_datadir}/publicsuffix/test_psl.txt +%{_datadir}/publicsuffix/index.txt + +%changelog +%{?autochangelog} diff --git a/SPECS/publicsuffix-list/test_psl.txt b/SPECS/publicsuffix-list/test_psl.txt new file mode 100644 index 00000000..ad606de6 --- /dev/null +++ b/SPECS/publicsuffix-list/test_psl.txt @@ -0,0 +1,98 @@ +// Any copyright is dedicated to the Public Domain. +// https://creativecommons.org/publicdomain/zero/1.0/ + +// null input. +checkPublicSuffix(null, null); +// Mixed case. +checkPublicSuffix('COM', null); +checkPublicSuffix('example.COM', 'example.com'); +checkPublicSuffix('WwW.example.COM', 'example.com'); +// Leading dot. +checkPublicSuffix('.com', null); +checkPublicSuffix('.example', null); +checkPublicSuffix('.example.com', null); +checkPublicSuffix('.example.example', null); +// Unlisted TLD. +checkPublicSuffix('example', null); +checkPublicSuffix('example.example', 'example.example'); +checkPublicSuffix('b.example.example', 'example.example'); +checkPublicSuffix('a.b.example.example', 'example.example'); +// Listed, but non-Internet, TLD. +//checkPublicSuffix('local', null); +//checkPublicSuffix('example.local', null); +//checkPublicSuffix('b.example.local', null); +//checkPublicSuffix('a.b.example.local', null); +// TLD with only 1 rule. +checkPublicSuffix('biz', null); +checkPublicSuffix('domain.biz', 'domain.biz'); +checkPublicSuffix('b.domain.biz', 'domain.biz'); +checkPublicSuffix('a.b.domain.biz', 'domain.biz'); +// TLD with some 2-level rules. +checkPublicSuffix('com', null); +checkPublicSuffix('example.com', 'example.com'); +checkPublicSuffix('b.example.com', 'example.com'); +checkPublicSuffix('a.b.example.com', 'example.com'); +checkPublicSuffix('uk.com', null); +checkPublicSuffix('example.uk.com', 'example.uk.com'); +checkPublicSuffix('b.example.uk.com', 'example.uk.com'); +checkPublicSuffix('a.b.example.uk.com', 'example.uk.com'); +checkPublicSuffix('test.ac', 'test.ac'); +// TLD with only 1 (wildcard) rule. +checkPublicSuffix('mm', null); +checkPublicSuffix('c.mm', null); +checkPublicSuffix('b.c.mm', 'b.c.mm'); +checkPublicSuffix('a.b.c.mm', 'b.c.mm'); +// More complex TLD. +checkPublicSuffix('jp', null); +checkPublicSuffix('test.jp', 'test.jp'); +checkPublicSuffix('www.test.jp', 'test.jp'); +checkPublicSuffix('ac.jp', null); +checkPublicSuffix('test.ac.jp', 'test.ac.jp'); +checkPublicSuffix('www.test.ac.jp', 'test.ac.jp'); +checkPublicSuffix('kyoto.jp', null); +checkPublicSuffix('test.kyoto.jp', 'test.kyoto.jp'); +checkPublicSuffix('ide.kyoto.jp', null); +checkPublicSuffix('b.ide.kyoto.jp', 'b.ide.kyoto.jp'); +checkPublicSuffix('a.b.ide.kyoto.jp', 'b.ide.kyoto.jp'); +checkPublicSuffix('c.kobe.jp', null); +checkPublicSuffix('b.c.kobe.jp', 'b.c.kobe.jp'); +checkPublicSuffix('a.b.c.kobe.jp', 'b.c.kobe.jp'); +checkPublicSuffix('city.kobe.jp', 'city.kobe.jp'); +checkPublicSuffix('www.city.kobe.jp', 'city.kobe.jp'); +// TLD with a wildcard rule and exceptions. +checkPublicSuffix('ck', null); +checkPublicSuffix('test.ck', null); +checkPublicSuffix('b.test.ck', 'b.test.ck'); +checkPublicSuffix('a.b.test.ck', 'b.test.ck'); +checkPublicSuffix('www.ck', 'www.ck'); +checkPublicSuffix('www.www.ck', 'www.ck'); +// US K12. +checkPublicSuffix('us', null); +checkPublicSuffix('test.us', 'test.us'); +checkPublicSuffix('www.test.us', 'test.us'); +checkPublicSuffix('ak.us', null); +checkPublicSuffix('test.ak.us', 'test.ak.us'); +checkPublicSuffix('www.test.ak.us', 'test.ak.us'); +checkPublicSuffix('k12.ak.us', null); +checkPublicSuffix('test.k12.ak.us', 'test.k12.ak.us'); +checkPublicSuffix('www.test.k12.ak.us', 'test.k12.ak.us'); +// IDN labels. +checkPublicSuffix('食狮.com.cn', '食狮.com.cn'); +checkPublicSuffix('食狮.公司.cn', '食狮.公司.cn'); +checkPublicSuffix('www.食狮.公司.cn', '食狮.公司.cn'); +checkPublicSuffix('shishi.公司.cn', 'shishi.公司.cn'); +checkPublicSuffix('公司.cn', null); +checkPublicSuffix('食狮.中国', '食狮.中国'); +checkPublicSuffix('www.食狮.中国', '食狮.中国'); +checkPublicSuffix('shishi.中国', 'shishi.中国'); +checkPublicSuffix('中国', null); +// Same as above, but punycoded. +checkPublicSuffix('xn--85x722f.com.cn', 'xn--85x722f.com.cn'); +checkPublicSuffix('xn--85x722f.xn--55qx5d.cn', 'xn--85x722f.xn--55qx5d.cn'); +checkPublicSuffix('www.xn--85x722f.xn--55qx5d.cn', 'xn--85x722f.xn--55qx5d.cn'); +checkPublicSuffix('shishi.xn--55qx5d.cn', 'shishi.xn--55qx5d.cn'); +checkPublicSuffix('xn--55qx5d.cn', null); +checkPublicSuffix('xn--85x722f.xn--fiqs8s', 'xn--85x722f.xn--fiqs8s'); +checkPublicSuffix('www.xn--85x722f.xn--fiqs8s', 'xn--85x722f.xn--fiqs8s'); +checkPublicSuffix('shishi.xn--fiqs8s', 'shishi.xn--fiqs8s'); +checkPublicSuffix('xn--fiqs8s', null); \ No newline at end of file diff --git a/SPECS/pyproject-rpm-macros/LICENSE b/SPECS/pyproject-rpm-macros/LICENSE new file mode 100644 index 00000000..4be62ae8 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/LICENSE @@ -0,0 +1,7 @@ +Copyright 2019 pyproject-rpm-macros contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/SPECS/pyproject-rpm-macros/macros.aaa-pyproject-srpm b/SPECS/pyproject-rpm-macros/macros.aaa-pyproject-srpm new file mode 100644 index 00000000..b394be58 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/macros.aaa-pyproject-srpm @@ -0,0 +1,17 @@ +# This file is called macros.aaa-pyproject-srpm +# to sort alphabetically before macros.pyproject. +# When this file is installed but macros.pyproject is not +# this macro will cause the package with the real macro to be installed. +# When macros.pyproject is installed, it overrides this macro. +# Note: This takes arbitrary options, to ease addition of new options to the real macro. +%pyproject_buildrequires(-) echo 'pyproject-rpm-macros' && exit 0 + + +# Declarative buildsystem, requires RPM 4.20+ to work +# https://rpm-software-management.github.io/rpm/manual/buildsystem.html +# This is the minimal implementation to be in the srpm package, +# as required even before the BuildRequires are installed +%buildsystem_pyproject_conf() %nil +%buildsystem_pyproject_generate_buildrequires() %pyproject_buildrequires %* +%buildsystem_pyproject_build() %nil +%buildsystem_pyproject_install() %nil diff --git a/SPECS/pyproject-rpm-macros/macros.pyproject b/SPECS/pyproject-rpm-macros/macros.pyproject new file mode 100644 index 00000000..34bdea51 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/macros.pyproject @@ -0,0 +1,245 @@ +# This is a backward-compatible suffix used in all pyproject-rpm-macros directories +# For the main Python it's empty, for all others it's "-3.X" +%_pyproject_files_pkgversion %{expr:"%{python3_pkgversion}" != "3" ? "-%{python3_pkgversion}" : ""} + +# This is a directory where wheels are stored and installed from, absolute +%_pyproject_wheeldir %{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-wheeldir%{_pyproject_files_pkgversion} + +# This is a directory used as TMPDIR, where pip copies sources to and builds from, relative to PWD +# For proper debugsource packages, we create TMPDIR within PWD +# See https://github.com/pypa/pip/issues/7555#issuecomment-595180864 +# +# This will be used in debugsource package paths (applies to extension modules only) +# NB: pytest collects tests from here if not hidden +# https://docs.pytest.org/en/latest/reference.html#confval-norecursedirs +%_pyproject_builddir %{_builddir}%{?buildsubdir:/%{buildsubdir}}/.pyproject-builddir%{_pyproject_files_pkgversion} + +# We prefix all created files with this value to make them unique +# Ideally, we would put them into %%{buildsubdir}, but that value changes during the spec +# The used value is similar to the one used to define the default %%buildroot +%_pyproject_files_prefix %{name}-%{version}-%{release}.%{_arch}%{_pyproject_files_pkgversion} + +%pyproject_files %{_builddir}/%{_pyproject_files_prefix}-pyproject-files +%_pyproject_modules %{_builddir}/%{_pyproject_files_prefix}-pyproject-modules +%_pyproject_ghost_distinfo %{_builddir}/%{_pyproject_files_prefix}-pyproject-ghost-distinfo +%_pyproject_record %{_builddir}/%{_pyproject_files_prefix}-pyproject-record +%_pyproject_buildrequires %{_builddir}/%{_pyproject_files_prefix}-pyproject-buildrequires + +# Internal macro, takes %%set_build_flags and strips all the exports +# TODO: Make such a list an actual source of %%set_build_flags +# Cannot use %%gsub directly to preserve EL 9 compatibility +%_pyproject_build_flags %{lua:local exports = rpm.expand('%{set_build_flags} ;'); print((exports:gsub('%s*;+%s+export%s+[%u_]+%s*;+%s*', ' ')))} + +# Avoid leaking %%{_pyproject_builddir} to pytest collection +# The value is read and used by the %%pytest and %%tox macros: +%_set_pytest_addopts %global __pytest_addopts --ignore=%{_pyproject_builddir} + +%pyproject_wheel(C:) %{expand:\\\ +%_set_pytest_addopts +mkdir -p "%{_pyproject_builddir}" +%{_pyproject_build_flags} \\\ +TMPDIR="%{_pyproject_builddir}" \\\ +%{__python3} -Bs %{_rpmconfigdir}/openruyi/pyproject_wheel.py %{?**} %{_pyproject_wheeldir} +} + + +%pyproject_build_lib %{!?__pyproject_build_lib_warned:%{warn:The %%{pyproject_build_lib} macro is deprecated. +It only works with setuptools and is not build-backend-agnostic. +The macro is not scheduled for removal, but there is a possibility of incompatibilities with future versions of setuptools. +As a replacement for the macro for the setuptools backend, you can use $PWD/build/lib for pure Python packages, +or $PWD/build/lib.%%{python3_platform}-cpython-%%{python3_version_nodots} for packages with extension modules. +Other build backends and older distributions may need different paths. +}%global __pyproject_build_lib_warned 1}%{expand:\\\ +$( +pyproject_build_lib=() +if [ -d build/lib.%{python3_platform}-cpython-%{python3_version_nodots} ]; then + pyproject_build_lib+=( "${PWD}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}" ) +fi +if [ -d build/lib.%{python3_platform}-%{python3_version} ]; then + pyproject_build_lib+=( "${PWD}/build/lib.%{python3_platform}-%{python3_version}" ) +fi +if [ -d build/lib ]; then + pyproject_build_lib+=( "${PWD}/build/lib" ) +fi +for directory in $(find "%{_pyproject_builddir}" -type d -wholename "%{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}" 2>/dev/null); do + pyproject_build_lib+=( "${directory}" ) +done +for directory in $(find "%{_pyproject_builddir}" -type d -wholename "%{_pyproject_builddir}/pip-req-build-*/build/lib" 2>/dev/null); do + pyproject_build_lib+=( "${directory}" ) +done +echo $(IFS=:; echo "${pyproject_build_lib[*]}") +)} + + +%pyproject_install() %{expand:\\\ +specifier=$(ls %{_pyproject_wheeldir}/*.whl | xargs basename --multiple | sed -E 's/([^-]+)-([^-]+)-.+\\\.whl/\\\1==\\\2/') +if [ -z "$specifier" ]; then + echo 'ERROR: %%%%pyproject_install found no wheel in %%%%{_pyproject_wheeldir} %{_pyproject_wheeldir}' >&2 + exit 1 +fi +TMPDIR="%{_pyproject_builddir}" %{__python3} -m pip install --root %{buildroot} --prefix %{_prefix} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links %{_pyproject_wheeldir} $specifier +if [ -d %{buildroot}%{_bindir} ]; then + %py3_shebang_fix %{buildroot}%{_bindir}/* + rm -rfv %{buildroot}%{_bindir}/__pycache__ +fi +rm -f %{_pyproject_ghost_distinfo} +site_dirs=() +# Process %%{python3_sitelib} if exists +if [ -d %{buildroot}%{python3_sitelib} ]; then + site_dirs+=( "%{python3_sitelib}" ) +fi +# Process %%{python3_sitearch} if exists and does not equal to %%{python3_sitelib} +if [ %{buildroot}%{python3_sitearch} != %{buildroot}%{python3_sitelib} ] && [ -d %{buildroot}%{python3_sitearch} ]; then + site_dirs+=( "%{python3_sitearch}" ) +fi +# Process all *.dist-info dirs in sitelib/sitearch +for site_dir in ${site_dirs[@]}; do + for distinfo in %{buildroot}$site_dir/*.dist-info; do + echo "%ghost ${distinfo#%{buildroot}}" >> %{_pyproject_ghost_distinfo} + sed -i 's/pip/rpm/' ${distinfo}/INSTALLER + PYTHONPATH=%{_rpmconfigdir}/openruyi \\ + %{__python3} -B %{_rpmconfigdir}/openruyi/pyproject_preprocess_record.py \\ + --buildroot %{buildroot} --record ${distinfo}/RECORD --output %{_pyproject_record} + rm -fv ${distinfo}/RECORD + rm -fv ${distinfo}/REQUESTED + done +done +lines=$(wc -l %{_pyproject_ghost_distinfo} | cut -f1 -d" ") +if [ $lines -ne 1 ]; then + echo -e "\\n\\nWARNING: %%%%pyproject_extras_subpkg won't work without explicit -i or -F, found $lines dist-info directories.\\n\\n" >&2 + rm %{_pyproject_ghost_distinfo} # any attempt to use this will fail +fi +} + + +# Note: the three times nested questionmarked -i -f -F pattern means: If none of those options was used -- in that case, we inject our own -f +%pyproject_extras_subpkg(n:i:f:FaA) %{expand:%{?python_extras_subpkg:%{python_extras_subpkg%{?!-i:%{?!-f:%{?!-F: -f %{_pyproject_ghost_distinfo}}}} %**}}} + + +# Escaping shell-globs, percentage signs and spaces was reworked in RPM 4.19+ +# https://github.com/rpm-software-management/rpm/issues/1749#issuecomment-1020420616 +# Since we support both ways, we pass either 4.19 or 4.18 to the script, so it knows which one to use +# Rather than passing the actual version, we let RPM compare the versions, as it is easier done here than in Python +%pyproject_save_files(lLM) %{expand:\\\ +%{expr:v"0%{?rpmversion}" >= v"4.18.90" ? "RPM_FILES_ESCAPE=4.19" : "RPM_FILES_ESCAPE=4.18" } \\ +%{__python3} %{_rpmconfigdir}/openruyi/pyproject_save_files.py \\ + --output-files "%{pyproject_files}" \\ + --output-modules "%{_pyproject_modules}" \\ + --buildroot "%{buildroot}" \\ + --sitelib "%{python3_sitelib}" \\ + --sitearch "%{python3_sitearch}" \\ + --python-version "%{python3_version}" \\ + --pyproject-record "%{_pyproject_record}" \\ + --prefix "%{_prefix}" \\ + %{**} +} + +# -t - Process only top-level modules +# -e - Exclude the module names matching given glob, may be used repeatedly +%pyproject_check_import(e:t) %{expand:\\\ +if [ ! -f "%{_pyproject_modules}" ]; then + echo 'ERROR: %%%%pyproject_check_import only works when %%%%pyproject_save_files is used' >&2 + exit 1 +fi +%py3_check_import -f "%{_pyproject_modules}" %{?**} +} + + +%_pyproject_check_import_allow_no_modules(e:t) \ +if [ -z "$(cat %{_pyproject_modules})" ]; then\ + echo "No modules to check found, exiting check"\ +else\ + %pyproject_check_import %{?**}\ +fi + + +%default_toxenv py%{python3_version_nodots} +%toxenv %{default_toxenv} + +%_pyproject_tomlidep %["%{python3_pkgversion}" == "3"\ + ? "echo '(python%{python3_pkgversion}dist(tomli) if python%{python3_pkgversion}-devel < 3.11)'"\ + : "%[v"%{python3_pkgversion}" < v"3.11"\ + ? "echo 'python%{python3_pkgversion}dist(tomli)'"\ + : "true # will use tomllib, echo nothing"\ + ]"\ + ] + +%pyproject_buildrequires(rRxtNwpe:g:C:) %{expand:\\\ +%_set_pytest_addopts +# The default flags expect the package note file to exist +%{?_package_note_flags:%_generate_package_note_file} +%{-R: +%{-r:%{error:The -R and -r options are mutually exclusive}} +%{-x:%{error:The -R and -x options are mutually exclusive}} +%{-e:%{error:The -R and -e options are mutually exclusive}} +%{-t:%{error:The -R and -t options are mutually exclusive}} +%{-w:%{error:The -R and -w options are mutually exclusive}} +%{-p:%{error:The -R and -p options are mutually exclusive}} +} +%{-N: +%{-r:%{error:The -N and -r options are mutually exclusive}} +%{-x:%{error:The -N and -x options are mutually exclusive}} +%{-e:%{error:The -N and -e options are mutually exclusive}} +%{-t:%{error:The -N and -t options are mutually exclusive}} +%{-w:%{error:The -N and -w options are mutually exclusive}} +%{-p:%{error:The -N and -p options are mutually exclusive}} +%{-C:%{error:The -N and -C options are mutually exclusive}} +%{-g:if [ -f pyproject.toml ]; then + %_pyproject_tomlidep +fi} +} +%{-w: +%{!?__pyproject_buildrequires_w_warned:%{warn:The %%pyproject_buildrequires -w option is deprecated. +It's not efficient to build the wheel several times during the build. +The option is not scheduled for removal, but packagers should use the -p option instead. +}%global __pyproject_buildrequires_w_warned 1} +%{-p:%{error:The -w and -p options are mutually exclusive}} +} +%{-e:%{expand:%global toxenv %(%{__python3} -s %{_rpmconfigdir}/openruyi/pyproject_construct_toxenv.py %{?**})}} +echo 'pyproject-rpm-macros' # first stdout line matches the implementation in macros.aaa-pyproject-srpm +echo 'python%{python3_pkgversion}-devel' +echo 'python%{python3_pkgversion}dist(packaging)' +%{!-N:echo 'python%{python3_pkgversion}dist(pip) >= 19' +if [ -f pyproject.toml ]; then + %_pyproject_tomlidep +elif [ -f setup.py ]; then + # Note: If the default requirements change, also change them in the script! + echo 'python%{python3_pkgversion}dist(setuptools) >= 40.8' +else + echo 'ERROR: Neither pyproject.toml nor setup.py found, consider using %%%%pyproject_buildrequires -N if this is not a Python package.' >&2 + exit 1 +fi} +# setuptools assumes no pre-existing dist-info +rm -rfv *.dist-info/ >&2 +if [ -f %{__python3} ]; then + mkdir -p "%{_pyproject_builddir}" + echo -n > %{_pyproject_buildrequires} + %{_pyproject_build_flags} \\\ + TMPDIR="%{_pyproject_builddir}" \\\ + RPM_TOXENV="%{toxenv}" HOSTNAME="rpmbuild" %{__python3} -Bs %{_rpmconfigdir}/openruyi/pyproject_buildrequires.py %{?!_python_no_extras_requires:--generate-extras} --python3_pkgversion %{python3_pkgversion} --wheeldir %{_pyproject_wheeldir} --output %{_pyproject_buildrequires} %{?**} >&2 + cat %{_pyproject_buildrequires} +fi +# Incomplete .dist-info dir might confuse importlib.metadata +rm -rfv *.dist-info/ >&2 +} + + +%tox(e:) %{expand:\\\ +TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \\ +%{?py3_test_envvars}%{?!py3_test_envvars:PYTHONDONTWRITEBYTECODE=1 \\ +PATH="%{buildroot}%{_bindir}:$PATH" \\ +PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \\ +%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"}} \\ +HOSTNAME="rpmbuild" \\ +%{__python3} -m tox --current-env --assert-config -q --recreate -e "%{-e:%{-e*}}%{!-e:%{toxenv}}" %{?*} +} + + +# Declarative buildsystem, requires RPM 4.20+ to work +# https://rpm-software-management.github.io/rpm/manual/buildsystem.html +%buildsystem_pyproject_conf() %nil +%buildsystem_pyproject_generate_buildrequires() %pyproject_buildrequires %* +%buildsystem_pyproject_build() %pyproject_wheel %* +%buildsystem_pyproject_install() %["%{shrink:%*}" == "" ? "%{error:BuildOption(install) is mandatory with pyproject BuildSystem.}" : "%pyproject_install \ +%pyproject_save_files %*"] +%buildsystem_pyproject_check() %pyproject_check_import %* diff --git a/SPECS/pyproject-rpm-macros/pyproject-rpm-macros.spec b/SPECS/pyproject-rpm-macros/pyproject-rpm-macros.spec new file mode 100644 index 00000000..c6d5c0fc --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject-rpm-macros.spec @@ -0,0 +1,104 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pyproject-rpm-macros +Version: 1.18.3 +Release: %autorelease +Summary: RPM macros for PEP 517 Python packages +License: MIT +# I know... +URL: https://src.fedoraproject.org/rpms/pyproject-rpm-macros +# Macro files +Source0: macros.pyproject +Source1: macros.aaa-pyproject-srpm +# Implementation files +Source2: pyproject_buildrequires.py +Source3: pyproject_save_files.py +Source4: pyproject_convert.py +Source5: pyproject_preprocess_record.py +Source6: pyproject_construct_toxenv.py +Source7: pyproject_requirements_txt.py +Source8: pyproject_wheel.py +Source9: LICENSE +BuildArch: noarch + +BuildRequires: rpm-build >= 4.14.90 +BuildRequires: python-rpm-macros +BuildRequires: python-srpm-macros +BuildRequires: python3-rpm-macros +Requires: python-rpm-macros +Requires: python-srpm-macros +Requires: python3-rpm-macros + +Requires: /usr/bin/find +Requires: /usr/bin/sed + + +%description +These macros allow projects that follow the Python packaging specifications +to be packaged as RPMs. + +They work for: + +* traditional Setuptools-based projects that use the setup.py file, +* newer Setuptools-based projects that have a setup.cfg file, +* general Python projects that use the PEP 517 pyproject.toml file + (which allows using any build system, such as setuptools, flit or poetry). + +These macros replace %%py3_build and %%py3_install, +which only work with setup.py. + +%package -n pyproject-srpm-macros +Summary: Minimal implementation of %%pyproject_buildrequires +Requires: pyproject-rpm-macros = %{version}-%{release} +Requires: (rpm-build >= 4.14.90 if rpm-build) + +%description -n pyproject-srpm-macros +This package contains a minimal implementation of %%pyproject_buildrequires. +When used in %%generate_buildrequires, it will generate BuildRequires +for pyproject-rpm-macros. When both packages are installed, the full version +takes precedence. + +%prep +# Not strictly necessary but allows working on file names instead +# of source numbers in install section +%setup -c -T +cp -p %{sources} . + +%generate_buildrequires +# Nothing to do + +%install +mkdir -p %{buildroot}%{_rpmmacrodir} +mkdir -p %{buildroot}%{_rpmconfigdir}/openruyi +install -pm 644 macros.pyproject %{buildroot}%{_rpmmacrodir}/ +install -pm 644 macros.aaa-pyproject-srpm %{buildroot}%{_rpmmacrodir}/ +install -pm 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -pm 644 pyproject_convert.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -pm 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -pm 644 pyproject_preprocess_record.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -pm 644 pyproject_construct_toxenv.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/openruyi/ + +%files +%license LICENSE +%{_rpmmacrodir}/macros.pyproject +%{_rpmconfigdir}/openruyi/pyproject_buildrequires.py +%{_rpmconfigdir}/openruyi/pyproject_convert.py +%{_rpmconfigdir}/openruyi/pyproject_save_files.py +%{_rpmconfigdir}/openruyi/pyproject_preprocess_record.py +%{_rpmconfigdir}/openruyi/pyproject_construct_toxenv.py +%{_rpmconfigdir}/openruyi/pyproject_requirements_txt.py +%{_rpmconfigdir}/openruyi/pyproject_wheel.py + +%files -n pyproject-srpm-macros +%license LICENSE +%{_rpmmacrodir}/macros.aaa-pyproject-srpm + +%changelog +%{?autochangelog} diff --git a/SPECS/pyproject-rpm-macros/pyproject_buildrequires.py b/SPECS/pyproject-rpm-macros/pyproject_buildrequires.py new file mode 100644 index 00000000..9ae3811b --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_buildrequires.py @@ -0,0 +1,743 @@ +import glob +import io +import os +import sys +import importlib.metadata +import argparse +import traceback +import json +import subprocess +import re +import tempfile +import email.parser +import functools +import pathlib +import zipfile + +from pyproject_requirements_txt import convert_requirements_txt +from pyproject_wheel import parse_config_settings_args + + +# Some valid Python version specifiers are not supported. +# Allow only the forms we know we can handle. +VERSION_RE = re.compile(r'[a-zA-Z0-9.-]+(\.\*)?') + +TOX_ASSERT_CONFIG_OPTS = ('--assert-config',) + + +class EndPass(Exception): + """End current pass of generating requirements""" + + +# nb: we don't use functools.partial to be able to use pytest's capsys +# see https://github.com/pytest-dev/pytest/issues/8900 +def print_err(*args, **kwargs): + kwargs.setdefault('file', sys.stderr) + print(*args, **kwargs) + + +try: + from packaging.markers import Marker + from packaging.requirements import Requirement, InvalidRequirement + from packaging.utils import canonicalize_name +except ImportError as e: + print_err('Import error:', e) + # already echoed by the %pyproject_buildrequires macro + sys.exit(0) + +# uses packaging, needs to be imported after packaging is verified to be present +from pyproject_convert import convert + + +def guess_reason_for_invalid_requirement(requirement_str): + if ':' in requirement_str: + message = ( + 'It might be an URL. ' + '%pyproject_buildrequires cannot handle all URL-based requirements. ' + 'Add PackageName@ (see PEP 508) to the URL to at least require any version of PackageName.' + ) + if '@' in requirement_str: + message += ' (but note that URLs might not work well with other features)' + return message + if '/' in requirement_str: + return ( + 'It might be a local path. ' + '%pyproject_buildrequires cannot handle local paths as requirements. ' + 'Use an URL with PackageName@ (see PEP 508) to at least require any version of PackageName.' + ) + # No more ideas + return None + + +class Requirements: + """Requirement gatherer. The macro will eventually print out output_lines.""" + def __init__(self, get_installed_version, extras=None, + generate_extras=False, python3_pkgversion='3', config_settings=None): + self.get_installed_version = get_installed_version + self.output_lines = [] + self.extras = set() + + if extras: + for extra in extras: + self.add_extras(*extra.split(',')) + + self.missing_requirements = False + self.ignored_alien_requirements = [] + + self.generate_extras = generate_extras + self.python3_pkgversion = python3_pkgversion + self.config_settings = config_settings + + def add_extras(self, *extras): + self.extras |= set(e.strip() for e in extras) + + @property + def marker_envs(self): + if self.extras: + return [{'extra': e} for e in sorted(self.extras)] + return [{'extra': ''}] + + def evaluate_all_environments(self, requirement): + for marker_env in self.marker_envs: + if requirement.marker.evaluate(environment=marker_env): + return True + return False + + def add(self, requirement, *, package_name=None, source=None, extra=None): + """Output a Python-style requirement string as RPM dep""" + + requirement_str = str(requirement) + print_err(f'Handling {requirement_str} from {source}') + + # requirements read initially from the metadata are strings + # further on we work with them as Requirement instances + if not isinstance(requirement, Requirement): + try: + requirement = Requirement(requirement) + except InvalidRequirement: + hint = guess_reason_for_invalid_requirement(requirement) + message = f'Requirement {requirement!r} from {source} is invalid.' + if hint: + message += f' Hint: {hint}' + raise ValueError(message) + + if requirement.url: + print_err( + f'WARNING: Simplifying {requirement_str!r} to {requirement.name!r}.' + ) + + name = canonicalize_name(requirement.name) + + if extra is not None: + extra_str = f'extra == "{extra}"' + if requirement.marker is not None: + extra_str = f'({requirement.marker}) and {extra_str}' + requirement.marker = Marker(extra_str) + + if (requirement.marker is not None and + not self.evaluate_all_environments(requirement)): + print_err(f'Ignoring alien requirement:', requirement_str) + self.ignored_alien_requirements.append(requirement) + return + + # Handle self-referencing requirements + if package_name and canonicalize_name(package_name) == name: + # Self-referential extras need to be handled specially + if requirement.extras: + if not (requirement.extras <= self.extras): # only handle it if needed + # let all further requirements know we want those extras + self.add_extras(*requirement.extras) + # re-add all of the alien requirements ignored in the past + # they might no longer be alien now + self.readd_ignored_alien_requirements(package_name=package_name) + else: + print_err(f'Ignoring self-referential requirement without extras:', requirement_str) + return + + # We need to always accept pre-releases as satisfying the requirement + # Otherwise e.g. installed cffi version 1.15.0rc2 won't even satisfy the requirement for "cffi" + requirement.specifier.prereleases = True + + try: + # TODO: check if requirements with extras are satisfied + installed = self.get_installed_version(requirement.name) + except importlib.metadata.PackageNotFoundError: + print_err(f'Requirement not satisfied: {requirement_str}') + installed = None + if installed and installed in requirement.specifier: + print_err(f'Requirement satisfied: {requirement_str}') + print_err(f' (installed: {requirement.name} {installed})') + if requirement.extras: + print_err(f' (extras are currently not checked)') + else: + self.missing_requirements = True + + if self.generate_extras: + extra_names = [f'{name}[{extra.lower()}]' for extra in sorted(requirement.extras)] + else: + extra_names = [] + + for name in [name] + extra_names: + together = [] + for specifier in sorted( + requirement.specifier, + key=lambda s: (s.operator, s.version), + ): + if not VERSION_RE.fullmatch(str(specifier.version)): + raise ValueError( + f'Unknown character in version: {specifier.version}. ' + + '(This might be a bug in pyproject-rpm-macros.)', + ) + together.append(convert(python3dist(name, python3_pkgversion=self.python3_pkgversion), + specifier.operator, specifier.version)) + if len(together) == 0: + dep = python3dist(name, python3_pkgversion=self.python3_pkgversion) + self.output_lines.append(dep) + elif len(together) == 1: + self.output_lines.append(together[0]) + else: + self.output_lines.append(f"({' with '.join(together)})") + + def check(self, *, source=None): + """End current pass if any unsatisfied dependencies were output""" + if self.missing_requirements: + print_err(f'Exiting dependency generation pass: {source}') + raise EndPass(source) + + def extend(self, requirement_strs, **kwargs): + """add() several requirements""" + for req_str in requirement_strs: + self.add(req_str, **kwargs) + + def readd_ignored_alien_requirements(self, **kwargs): + """add() previously ignored alien requirements again.""" + requirements, self.ignored_alien_requirements = self.ignored_alien_requirements, [] + kwargs.setdefault('source', 'Previously ignored alien requirements') + self.extend(requirements, **kwargs) + + +def toml_load(opened_binary_file): + try: + # tomllib is in the standard library since 3.11.0b1 + import tomllib + except ImportError: + try: + import tomli as tomllib + except ImportError as e: + print_err('Import error:', e) + # already echoed by the %pyproject_buildrequires macro + sys.exit(0) + return tomllib.load(opened_binary_file) + + +@functools.cache +def load_pyproject(): + try: + f = open('pyproject.toml', 'rb') + except FileNotFoundError: + pyproject_data = {} + else: + with f: + pyproject_data = toml_load(f) + return pyproject_data + + +def get_backend(requirements): + pyproject_data = load_pyproject() + + buildsystem_data = pyproject_data.get('build-system', {}) + requirements.extend( + buildsystem_data.get('requires', ()), + source='build-system.requires', + ) + + backend_name = buildsystem_data.get('build-backend') + if not backend_name: + # https://www.python.org/dev/peps/pep-0517/: + # If the pyproject.toml file is absent, or the build-backend key is + # missing, the source tree is not using this specification, and tools + # should revert to the legacy behaviour of running setup.py + # (either directly, or by implicitly invoking the [following] backend). + # If setup.py is also not present program will mimick pip's behavior + # and end with an error. + if not os.path.exists('setup.py'): + raise FileNotFoundError('File "setup.py" not found for legacy project.') + backend_name = 'setuptools.build_meta:__legacy__' + + # Note: For projects without pyproject.toml, this was already echoed + # by the %pyproject_buildrequires macro, but this also handles cases + # with pyproject.toml without a specified build backend. + # If the default requirements change, also change them in the macro! + requirements.add('setuptools >= 40.8', source='default build backend') + + requirements.check(source='build backend') + + backend_path = buildsystem_data.get('backend-path') + if backend_path: + # PEP 517 example shows the path as a list, but some projects don't follow that + if isinstance(backend_path, str): + backend_path = [backend_path] + sys.path = backend_path + sys.path + + module_name, _, object_name = backend_name.partition(":") + backend_module = importlib.import_module(module_name) + + if object_name: + return getattr(backend_module, object_name) + + return backend_module + + +def generate_build_requirements(backend, requirements): + get_requires = getattr(backend, 'get_requires_for_build_wheel', None) + if get_requires: + new_reqs = get_requires(requirements.config_settings) + requirements.extend(new_reqs, source='get_requires_for_build_wheel') + requirements.check(source='get_requires_for_build_wheel') + + +def parse_metadata_file(metadata_file): + return email.parser.Parser().parse(metadata_file, headersonly=True) + + +def requires_from_parsed_metadata_file(message): + return {k: message.get_all(k, ()) for k in ('Requires-Dist',)} + + +def package_name_from_parsed_metadata_file(message): + return message.get('name') + + +def package_name_and_requires_from_metadata_file(metadata_file): + message = parse_metadata_file(metadata_file) + package_name = package_name_from_parsed_metadata_file(message) + requires = requires_from_parsed_metadata_file(message) + return package_name, requires + + +def generate_run_requirements_hook(backend, requirements): + hook_name = 'prepare_metadata_for_build_wheel' + prepare_metadata = getattr(backend, hook_name, None) + if not prepare_metadata: + raise ValueError( + 'The build backend cannot provide build metadata ' + '(incl. runtime requirements) before build. ' + 'If the dependencies are specified in the pyproject.toml [project] ' + 'table, you can use the -p flag to read them. ' + 'Alternatively, use the -R flag not to generate runtime dependencies.' + ) + dir_basename = prepare_metadata('.', requirements.config_settings) + with open(dir_basename + '/METADATA') as metadata_file: + name, requires = package_name_and_requires_from_metadata_file(metadata_file) + for key, req in requires.items(): + requirements.extend(req, + package_name=name, + source=f'hook generated metadata: {key} ({name})') + + +def find_built_wheel(wheeldir): + wheels = glob.glob(os.path.join(wheeldir, '*.whl')) + if not wheels: + return None + if len(wheels) > 1: + raise RuntimeError('Found multiple wheels in %{_pyproject_wheeldir}, ' + 'this is not supported with %pyproject_buildrequires -w.') + return wheels[0] + + +def generate_run_requirements_wheel(backend, requirements, wheeldir): + # Reuse the wheel from the previous round of %pyproject_buildrequires (if it exists) + wheel = find_built_wheel(wheeldir) + if not wheel: + # pip is already echoed from the macro + # but we need to explicitly restart if has not yet been installed + requirements.add('pip >= 19', source='%pyproject_buildrequires -w') + requirements.check(source='%pyproject_buildrequires -w') + import pyproject_wheel + returncode = pyproject_wheel.build_wheel( + wheeldir=wheeldir, + stdout=sys.stderr, + config_settings=requirements.config_settings, + ) + if returncode != 0: + raise RuntimeError('Failed to build the wheel for %pyproject_buildrequires -w.') + wheel = find_built_wheel(wheeldir) + if not wheel: + raise RuntimeError('Cannot locate the built wheel for %pyproject_buildrequires -w.') + + print_err(f'Reading metadata from {wheel}') + with zipfile.ZipFile(wheel) as wheelfile: + for name in wheelfile.namelist(): + if name.count('/') == 1 and name.endswith('.dist-info/METADATA'): + with io.TextIOWrapper(wheelfile.open(name), encoding='utf-8') as metadata_file: + name, requires = package_name_and_requires_from_metadata_file(metadata_file) + for key, req in requires.items(): + requirements.extend(req, + package_name=name, + source=f'built wheel metadata: {key} ({name})') + break + else: + raise RuntimeError('Could not find *.dist-info/METADATA in built wheel.') + + +def generate_run_requirements_pyproject(requirements): + pyproject_data = load_pyproject() + + if not (project_table := pyproject_data.get('project', {})): + raise ValueError('Could not find the [project] table in pyproject.toml.') + + dynamic_fields = project_table.get('dynamic', []) + if 'dependencies' in dynamic_fields or 'optional-dependencies' in dynamic_fields: + raise ValueError('Could not read the dependencies or optional-dependencies ' + 'from the [project] table in pyproject.toml, as the field is dynamic.') + + dependencies = project_table.get('dependencies', []) + name = project_table.get('name') + requirements.extend(dependencies, + package_name=name, + source=f'pyproject.toml generated metadata: [dependencies] ({name})') + + optional_dependencies = project_table.get('optional-dependencies', {}) + for extra, dependencies in optional_dependencies.items(): + requirements.extend(dependencies, + package_name=name, + source=f'pyproject.toml generated metadata: [optional-dependencies] {extra} ({name})', + extra=extra) + + +def generate_run_requirements(backend, requirements, *, build_wheel, read_pyproject_dependencies, wheeldir): + if read_pyproject_dependencies: + generate_run_requirements_pyproject(requirements) + elif build_wheel: + generate_run_requirements_wheel(backend, requirements, wheeldir) + else: + generate_run_requirements_hook(backend, requirements) + + +def generate_tox_requirements(toxenv, requirements): + toxenv = ','.join(toxenv) + requirements.add('tox-current-env >= 0.0.16', source='tox itself') + requirements.check(source='tox itself') + with tempfile.NamedTemporaryFile('r') as deps, \ + tempfile.NamedTemporaryFile('r') as extras, \ + tempfile.NamedTemporaryFile('r') as provision: + r = subprocess.run( + [sys.executable, '-m', 'tox', + '--print-deps-to', deps.name, + '--print-extras-to', extras.name, + '--no-provision', provision.name, + *TOX_ASSERT_CONFIG_OPTS, + '-q', '-r', '-e', toxenv], + check=False, + encoding='utf-8', + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + if r.stdout: + print_err(r.stdout, end='') + + provision_content = provision.read() + if provision_content and r.returncode != 0: + provision_requires = json.loads(provision_content) + if provision_requires.get('minversion') is not None: + requirements.add(f'tox >= {provision_requires["minversion"]}', + source='tox provision (minversion)') + if 'requires' in provision_requires: + requirements.extend(provision_requires["requires"], + source='tox provision (requires)') + requirements.check(source='tox provision') # this terminates the script + raise RuntimeError( + 'Dependencies requested by tox provisioning appear installed, ' + 'but tox disagreed.') + else: + r.check_returncode() + + deplines = deps.read().splitlines() + packages = convert_requirements_txt(deplines) + requirements.add_extras(*extras.read().splitlines()) + requirements.extend(packages, + source=f'tox --print-deps-only: {toxenv}') + + +def tox_dependency_groups(toxenv): + # We call this command separately instead of folding it into the previous one + # becasue --print-dependency-groups-to only works with tox 4.22+ and tox-current-env 0.0.14+. + # We handle failure gracefully: upstreams using dependency_groups should require tox >= 4.22. + toxenv = ','.join(toxenv) + with tempfile.NamedTemporaryFile('r') as groups: + r = subprocess.run( + [sys.executable, '-m', 'tox', + '--print-dependency-groups-to', groups.name, + '-q', '-e', toxenv], + check=False, + encoding='utf-8', + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + if r.returncode == 0: + if r.stdout: + print_err(r.stdout, end='') + if output := groups.read().strip(): + return output.splitlines() + return [] + + +def generate_dependency_groups(requested_groups, requirements): + """Adapted from https://peps.python.org/pep-0735/#reference-implementation (public domain)""" + from collections import defaultdict + + def _normalize_name(name: str) -> str: + return re.sub(r"[-_.]+", "-", name).lower() + + def _normalize_group_names(dependency_groups: dict) -> dict: + original_names = defaultdict(list) + normalized_groups = {} + + for group_name, value in dependency_groups.items(): + normed_group_name = _normalize_name(group_name) + original_names[normed_group_name].append(group_name) + normalized_groups[normed_group_name] = value + + errors = [] + for normed_name, names in original_names.items(): + if len(names) > 1: + errors.append(f"{normed_name} ({', '.join(names)})") + if errors: + raise ValueError(f"Duplicate dependency group names: {', '.join(errors)}") + + return normalized_groups + + def _resolve_dependency_group( + dependency_groups: dict, group: str, past_groups: tuple[str, ...] = () + ) -> list[str]: + if group in past_groups: + raise ValueError(f"Cyclic dependency group include: {group} -> {past_groups}") + + if group not in dependency_groups: + raise LookupError(f"Dependency group '{group}' not found") + + raw_group = dependency_groups[group] + if not isinstance(raw_group, list): + raise ValueError(f"Dependency group '{group}' is not a list") + + realized_group = [] + for item in raw_group: + if isinstance(item, str): + realized_group.append(item) + elif isinstance(item, dict): + if tuple(item.keys()) != ("include-group",): + raise ValueError(f"Invalid dependency group item: {item}") + + include_group = _normalize_name(next(iter(item.values()))) + realized_group.extend( + _resolve_dependency_group( + dependency_groups, include_group, past_groups + (group,) + ) + ) + else: + raise ValueError(f"Invalid dependency group item: {item}") + + return realized_group + + def resolve(dependency_groups: dict, group: str) -> list[str]: + if not isinstance(dependency_groups, dict): + raise TypeError("Dependency Groups table is not a dict") + return _resolve_dependency_group(dependency_groups, _normalize_name(group)) + + pyproject_data = load_pyproject() + dependency_groups_raw = pyproject_data.get("dependency-groups", {}) + dependency_groups = _normalize_group_names(dependency_groups_raw) + + for group_names in requested_groups: + for group_name in group_names.split(","): + requirements.extend( + resolve(dependency_groups, group_name), + source=f"Dependency group {group_name}", + ) + + +def python3dist(name, op=None, version=None, python3_pkgversion="3"): + prefix = f"python{python3_pkgversion}dist" + + if op is None: + if version is not None: + raise AssertionError('op and version go together') + return f'{prefix}({name})' + else: + return f'{prefix}({name}) {op} {version}' + + +def generate_requires( + *, include_runtime=False, build_wheel=False, wheeldir=None, toxenv=None, extras=None, dependency_groups=None, + get_installed_version=importlib.metadata.version, # for dep injection + generate_extras=False, python3_pkgversion="3", requirement_files=None, use_build_system=True, + read_pyproject_dependencies=False, + output, config_settings=None, +): + """Generate the BuildRequires for the project in the current directory + + The generated BuildRequires are written to the provided output. + + This is the main Python entry point. + """ + requirements = Requirements( + get_installed_version, extras=extras or [], + generate_extras=generate_extras, + python3_pkgversion=python3_pkgversion, + config_settings=config_settings, + ) + + dependency_groups = dependency_groups or [] + try: + if (include_runtime or toxenv or read_pyproject_dependencies) and not use_build_system: + raise ValueError('-N option cannot be used in combination with -r, -e, -t, -x, -p options') + if requirement_files: + for req_file in requirement_files: + requirements.extend( + convert_requirements_txt(req_file, pathlib.Path(req_file.name)), + source=f'requirements file {req_file.name}' + ) + requirements.check(source='all requirements files') + if use_build_system: + backend = get_backend(requirements) + generate_build_requirements(backend, requirements) + if toxenv: + include_runtime = True + generate_tox_requirements(toxenv, requirements) + dependency_groups.extend(tox_dependency_groups(toxenv)) + if dependency_groups: + generate_dependency_groups(dependency_groups, requirements) + if include_runtime: + generate_run_requirements(backend, requirements, build_wheel=build_wheel, + read_pyproject_dependencies=read_pyproject_dependencies, wheeldir=wheeldir) + except EndPass: + return + finally: + output.write_text(os.linesep.join(requirements.output_lines) + os.linesep) + + +def main(argv): + parser = argparse.ArgumentParser( + description='Generate BuildRequires for a Python project.', + prog='%pyproject_buildrequires', + add_help=False, + ) + parser.add_argument( + '--help', action='help', + default=argparse.SUPPRESS, + help=argparse.SUPPRESS, + ) + parser.add_argument( + '-r', '--runtime', action='store_true', default=True, + help=argparse.SUPPRESS, # Generate run-time requirements (backwards-compatibility only) + ) + parser.add_argument( + '--generate-extras', action='store_true', + help=argparse.SUPPRESS, + ) + parser.add_argument( + '--python3_pkgversion', metavar='PYTHON3_PKGVERSION', + default="3", help=argparse.SUPPRESS, + ) + parser.add_argument( + '--output', type=pathlib.Path, required=True, help=argparse.SUPPRESS, + ) + parser.add_argument( + '--wheeldir', metavar='PATH', default=None, + help=argparse.SUPPRESS, + ) + parser.add_argument( + '-x', '--extras', metavar='EXTRAS', action='append', + help='comma separated list of "extras" for runtime requirements ' + '(e.g. -x testing,feature-x) (implies --runtime, can be repeated)', + ) + parser.add_argument( + '-g', '--dependency-groups', metavar='GROUPS', action='append', + help='comma separated list of dependency groups (PEP 735) for requirements ' + '(e.g. -g tests,docs) (can be repeated)', + ) + parser.add_argument( + '-t', '--tox', action='store_true', + help=('generate test tequirements from tox environment ' + '(implies --runtime)'), + ) + parser.add_argument( + '-e', '--toxenv', metavar='TOXENVS', action='append', + help=('specify tox environments (comma separated and/or repeated)' + '(implies --tox)'), + ) + parser.add_argument( + '-w', '--wheel', action='store_true', default=False, + help=('Generate run-time requirements by building the wheel ' + '(useful for build backends without the prepare_metadata_for_build_wheel hook, deprecated)'), + ) + parser.add_argument( + '-p', '--read-pyproject-dependencies', action='store_true', default=False, + help=('Generate dependencies from [project] table of pyproject.toml ' + 'instead of calling prepare_metadata_for_build_wheel hook)'), + ) + parser.add_argument( + '-R', '--no-runtime', action='store_false', dest='runtime', + help="Don't generate run-time requirements (implied by -N)", + ) + parser.add_argument( + '-N', '--no-use-build-system', dest='use_build_system', + action='store_false', help='Use -N to indicate that project does not use any build system', + ) + parser.add_argument( + 'requirement_files', nargs='*', type=argparse.FileType('r'), + metavar='REQUIREMENTS.TXT', + help=('Add buildrequires from file'), + ) + parser.add_argument( + '-C', + dest='config_settings', + action='append', + help='Configuration settings to pass to the PEP 517 backend', + ) + + args = parser.parse_args(argv) + + if not args.use_build_system: + args.runtime = False + + if args.wheel: + if not args.wheeldir: + raise ValueError('--wheeldir must be set when -w.') + + if args.toxenv: + args.tox = True + + if args.tox: + args.runtime = True + if not args.toxenv: + _default = f'py{sys.version_info.major}{sys.version_info.minor}' + args.toxenv = [os.getenv('RPM_TOXENV', _default)] + + if args.extras: + args.runtime = True + + try: + generate_requires( + include_runtime=args.runtime, + build_wheel=args.wheel, + wheeldir=args.wheeldir, + toxenv=args.toxenv, + extras=args.extras, + dependency_groups=args.dependency_groups, + generate_extras=args.generate_extras, + python3_pkgversion=args.python3_pkgversion, + requirement_files=args.requirement_files, + use_build_system=args.use_build_system, + read_pyproject_dependencies=args.read_pyproject_dependencies, + output=args.output, + config_settings=parse_config_settings_args(args.config_settings), + ) + except Exception: + # Log the traceback explicitly (it's useful debug info) + traceback.print_exc() + exit(1) + + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/SPECS/pyproject-rpm-macros/pyproject_construct_toxenv.py b/SPECS/pyproject-rpm-macros/pyproject_construct_toxenv.py new file mode 100644 index 00000000..a2a5f965 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_construct_toxenv.py @@ -0,0 +1,15 @@ +import argparse +import sys + + +def main(argv): + parser = argparse.ArgumentParser( + description='Parse -e arguments instead of RPM getopt.' + ) + parser.add_argument('-e', '--toxenv', action='append') + args, _ = parser.parse_known_args(argv) + return ','.join(args.toxenv) + + +if __name__ == '__main__': + print(main(sys.argv[1:])) diff --git a/SPECS/pyproject-rpm-macros/pyproject_convert.py b/SPECS/pyproject-rpm-macros/pyproject_convert.py new file mode 100644 index 00000000..ea01bc33 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_convert.py @@ -0,0 +1,171 @@ +# Copyright 2019 Gordon Messmer +# +# Upstream: https://github.com/gordonmessmer/pyreq2rpm +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +from packaging.requirements import Requirement +from packaging.version import parse as parse_version + +class RpmVersion(): + def __init__(self, version_id): + version = parse_version(version_id) + if isinstance(version._version, str): + self.version = version._version + else: + self.epoch = version._version.epoch + self.version = list(version._version.release) + self.pre = version._version.pre + self.dev = version._version.dev + self.post = version._version.post + # version.local is ignored as it is not expected to appear + # in public releases + # https://www.python.org/dev/peps/pep-0440/#local-version-identifiers + + def is_legacy(self): + return isinstance(self.version, str) + + def increment(self): + self.version[-1] += 1 + self.pre = None + self.dev = None + self.post = None + return self + + def __str__(self): + if self.is_legacy(): + return self.version + if self.epoch: + rpm_epoch = str(self.epoch) + ':' + else: + rpm_epoch = '' + while len(self.version) > 1 and self.version[-1] == 0: + self.version.pop() + rpm_version = '.'.join(str(x) for x in self.version) + if self.pre: + rpm_suffix = '~{}'.format(''.join(str(x) for x in self.pre)) + elif self.dev: + rpm_suffix = '~~{}'.format(''.join(str(x) for x in self.dev)) + elif self.post: + rpm_suffix = '^post{}'.format(self.post[1]) + else: + rpm_suffix = '' + return '{}{}{}'.format(rpm_epoch, rpm_version, rpm_suffix) + +def convert_compatible(name, operator, version_id): + if version_id.endswith('.*'): + return 'Invalid version' + version = RpmVersion(version_id) + if version.is_legacy(): + # LegacyVersions are not supported in this context + return 'Invalid version' + if len(version.version) == 1: + return 'Invalid version' + upper_version = RpmVersion(version_id) + upper_version.version.pop() + upper_version.increment() + return '({} >= {} with {} < {})'.format( + name, version, name, upper_version) + +def convert_equal(name, operator, version_id): + if version_id.endswith('.*'): + version_id = version_id[:-2] + '.0' + return convert_compatible(name, '~=', version_id) + version = RpmVersion(version_id) + return '{} = {}'.format(name, version) + +def convert_arbitrary_equal(name, operator, version_id): + if version_id.endswith('.*'): + return 'Invalid version' + version = RpmVersion(version_id) + return '{} = {}'.format(name, version) + +def convert_not_equal(name, operator, version_id): + if version_id.endswith('.*'): + version_id = version_id[:-2] + version = RpmVersion(version_id) + if version.is_legacy(): + # LegacyVersions are not supported in this context + return 'Invalid version' + version_gt = RpmVersion(version_id).increment() + version_gt_operator = '>=' + # Prevent dev and pre-releases from satisfying a < requirement + version = '{}~~'.format(version) + else: + version = RpmVersion(version_id) + version_gt = version + version_gt_operator = '>' + return '({} < {} or {} {} {})'.format( + name, version, name, version_gt_operator, version_gt) + +def convert_ordered(name, operator, version_id): + if version_id.endswith('.*'): + # PEP 440 does not define semantics for prefix matching + # with ordered comparisons + # see: https://github.com/pypa/packaging/issues/320 + # and: https://github.com/pypa/packaging/issues/321 + # This style of specifier is officially "unsupported", + # even though it is processed. Support may be removed + # in version 21.0. + version_id = version_id[:-2] + version = RpmVersion(version_id) + if operator == '>': + # distutils will allow a prefix match with '>' + operator = '>=' + if operator == '<=': + # distutils will not allow a prefix match with '<=' + operator = '<' + else: + version = RpmVersion(version_id) + # For backwards compatibility, fallback to previous behavior with LegacyVersions + if not version.is_legacy(): + # Prevent dev and pre-releases from satisfying a < requirement + if operator == '<' and not version.pre and not version.dev and not version.post: + version = '{}~~'.format(version) + # Prevent post-releases from satisfying a > requirement + if operator == '>' and not version.pre and not version.dev and not version.post: + version = '{}.0'.format(version) + return '{} {} {}'.format(name, operator, version) + +OPERATORS = {'~=': convert_compatible, + '==': convert_equal, + '===': convert_arbitrary_equal, + '!=': convert_not_equal, + '<=': convert_ordered, + '<': convert_ordered, + '>=': convert_ordered, + '>': convert_ordered} + +def convert(name, operator, version_id): + return OPERATORS[operator](name, operator, version_id) + +def convert_requirement(req): + parsed_req = Requirement.parse(req) + reqs = [] + for spec in parsed_req.specs: + reqs.append(convert(parsed_req.project_name, spec[0], spec[1])) + if len(reqs) == 0: + return parsed_req.project_name + if len(reqs) == 1: + return reqs[0] + else: + reqs.sort() + return '({})'.format(' with '.join(reqs)) diff --git a/SPECS/pyproject-rpm-macros/pyproject_preprocess_record.py b/SPECS/pyproject-rpm-macros/pyproject_preprocess_record.py new file mode 100644 index 00000000..f8667556 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_preprocess_record.py @@ -0,0 +1,85 @@ +import argparse +import csv +import json +import os +from pathlib import PosixPath + +from pyproject_save_files import BuildrootPath + + +def read_record(record_path): + """ + A generator yielding individual RECORD triplets. + + https://www.python.org/dev/peps/pep-0376/#record + + The triplet is str-path, hash, size -- the last two optional. + We will later care only for the paths anyway. + + Example: + + >>> g = read_record(PosixPath('./test_RECORD')) + >>> next(g) + ['../../../bin/__pycache__/tldr.cpython-....pyc', '', ''] + >>> next(g) + ['../../../bin/tldr', 'sha256=...', '12766'] + >>> next(g) + ['../../../bin/tldr.py', 'sha256=...', '12766'] + """ + with open(record_path, newline="", encoding="utf-8") as f: + yield from csv.reader( + f, delimiter=",", quotechar='"', lineterminator=os.linesep + ) + + +def parse_record(record_path, record_content): + """ + Returns a list with BuildrootPaths parsed from record_content + + params: + record_path: RECORD BuildrootPath + record_content: list of RECORD triplets + first item is a str-path relative to directory where dist-info directory is + (it can also be absolute according to the standard, but not from pip) + + Examples: + >>> parse_record(BuildrootPath('/usr/lib/python3.7/site-packages/requests-2.22.0.dist-info/RECORD'), + ... [('requests/sessions.py', 'sha256=xxx', '666')]) + ['/usr/lib/python3.7/site-packages/requests/sessions.py'] + + >>> parse_record(BuildrootPath('/usr/lib/python3.7/site-packages/tldr-0.5.dist-info/RECORD'), + ... [('../../../bin/tldr', 'sha256=yyy', '777')]) + ['/usr/bin/tldr'] + """ + sitedir = record_path.parent.parent # trough the dist-info directory + # / with absolute right operand will remove the left operand + # any .. parts are resolved via normpath + return [str((sitedir / row[0]).normpath()) for row in record_content] + + +def save_parsed_record(record_path, parsed_record, output_file): + content = {} + if output_file.is_file(): + content = json.loads(output_file.read_text()) + content[str(record_path)] = parsed_record + output_file.write_text(json.dumps(content)) + + +def main(cli_args): + record_path = BuildrootPath.from_real(cli_args.record, root=cli_args.buildroot) + parsed_record = parse_record(record_path, read_record(cli_args.record)) + save_parsed_record(record_path, parsed_record, cli_args.output) + + +def argparser(): + parser = argparse.ArgumentParser() + r = parser.add_argument_group("required arguments") + r.add_argument("--buildroot", type=PosixPath, required=True) + r.add_argument("--record", type=PosixPath, required=True) + r.add_argument("--output", type=PosixPath, required=True) + return parser + + +if __name__ == "__main__": + cli_args = argparser().parse_args() + main(cli_args) diff --git a/SPECS/pyproject-rpm-macros/pyproject_requirements_txt.py b/SPECS/pyproject-rpm-macros/pyproject_requirements_txt.py new file mode 100644 index 00000000..5ff1f26f --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_requirements_txt.py @@ -0,0 +1,101 @@ +"""Best-effort parser for requirements.txt files""" + +import urllib.parse +from pathlib import Path +import sys +import os +import re + +# `#` starts a comment only at end of line and after whitespace +COMMENT_RE = re.compile(r'(^|\s+)#.*$') + +# Assume URLs start with a scheme; don't look for "egg=" URLs otherwise +URL_START_RE = re.compile(r'^[-_+a-zA-Z0-9]+://') + +ENV_VAR_RE = re.compile(r'(?P\$\{(?P[A-Z0-9_]+)\})') +PKGNAME_RE = re.compile(r'^[-_a-zA-Z0-9]+') + +# The requirements.txt format evolved rather organically; expect weirdness. + +def convert_requirements_txt(lines, path:Path = None): + """Convert lines of a requirements file to PEP 440-style requirement strs + + This does NOT handle all of requirements.txt features (only pip can do + that), but tries its best. + + The resulting requirements might not actually be valid (either because + they're wrong in the file, or because we missed a special case). + + path is the path to the requirements.txt file, used for options like `-r`. + """ + requirements = [] + lines = combine_logical_lines(lines) + lines = strip_comments(lines) + lines = expand_env_vars(lines) + if path: + filename = path.name + else: + filename = '' + for line in lines: + if URL_START_RE.match(line): + # Handle URLs with "egg=..." fragments + # see https://pip.pypa.io/en/stable/cli/pip_install/#vcs-support + parsed_url = urllib.parse.urlparse(line) + parsed_fragment = urllib.parse.parse_qs(parsed_url.fragment) + if 'egg' in parsed_fragment: + # Prepend the package name to the URL. + match = PKGNAME_RE.match(parsed_fragment['egg'][0]) + if match: + pkg_name = match[0] + requirements.append(f'{pkg_name}@{line}') + continue + # If that didn't work, pass the line on; + # the caller will deal with invalid requirements + requirements.append(line) + elif line.startswith('-r'): + recursed_path = line[2:].strip() + if path: + recursed_path = path.parent / recursed_path + recursed_path = Path(recursed_path) + with recursed_path.open() as f: + requirements.extend(convert_requirements_txt(f, recursed_path)) + elif line.startswith('-'): + raise ValueError(f'{filename}: unsupported requirements file option: {line}') + else: + requirements.append(line) + return requirements + +def combine_logical_lines(lines): + """Combine logical lines together (backslash line-continuation)""" + pieces = [] + for line in lines: + line = line.rstrip('\n') + # Whole-line comments *only* are removed before line-contionuation + if COMMENT_RE.match(line): + continue + if line.endswith('\\'): + pieces.append(line[:-1]) + else: + # trailing whitespace is only removed from full logical lines + pieces.append(line.rstrip()) + yield ''.join(pieces) + pieces = [] + yield ''.join(pieces) + + +def strip_comments(lines): + for line in lines: + line, *rest = COMMENT_RE.split(line, maxsplit=1) + line = line.strip() + if line: + yield line + + +def expand_env_vars(lines): + def repl(match): + value = os.getenv(match['name']) + if value is None: + return match['var'] + return value + for line in lines: + yield ENV_VAR_RE.sub(repl, line) diff --git a/SPECS/pyproject-rpm-macros/pyproject_save_files.py b/SPECS/pyproject-rpm-macros/pyproject_save_files.py new file mode 100644 index 00000000..02021744 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_save_files.py @@ -0,0 +1,902 @@ +import argparse +import fnmatch +import json +import os +import re + +from collections import defaultdict +from keyword import iskeyword +from pathlib import PosixPath, PurePosixPath +from importlib.metadata import Distribution + + +# From RPM's build/files.c strtokWithQuotes delim argument +RPM_FILES_DELIMETERS = ' \n\t' +RPM_GLOB_SYMBOLS = '[]{}*?!' +# Combined for escape_rpm_path_4_19() +RPM_SPECIAL_SYMBOLS = RPM_FILES_DELIMETERS + RPM_GLOB_SYMBOLS + '"' + "\\" +RPM_ESCAPE_REGEX = re.compile(f"([{re.escape(RPM_SPECIAL_SYMBOLS)}])") + +# See the comment in the macro that wraps this script +RPM_FILES_ESCAPE = os.getenv('RPM_FILES_ESCAPE', '4.19') + +PYCACHED_SUFFIX = '{,.opt-?}.pyc' + +# RPM hardcodes the lists of manpage extensions and directories, +# so we have to maintain separate ones :( +# There is an issue for RPM to provide the lists as macros: +# https://github.com/rpm-software-management/rpm/issues/1865 +# The original lists can be found here: +# https://github.com/rpm-software-management/rpm/blob/master/scripts/brp-compress +MANPAGE_EXTENSIONS = ['gz', 'Z', 'bz2', 'xz', 'lzma', 'zst', 'zstd'] +MANDIRS = [ + '/man/man*', + '/man/*/man*', + '/info', + '/share/man/man*', + '/share/man/*/man*', + '/share/info', + '/kerberos/man', + '/X11R6/man/man*', + '/lib/perl5/man/man*', + '/share/doc/*/man/man*', + '/lib/*/man/man*', + '/share/fish/man/man*', +] + + +class BuildrootPath(PurePosixPath): + """ + This path represents a path in a buildroot. + When absolute, it is "relative" to a buildroot. + + E.g. /usr/lib means %{buildroot}/usr/lib + The object carries no buildroot information. + """ + + @staticmethod + def from_real(realpath, *, root): + """ + For a given real disk path, return a BuildrootPath in the given root. + + For example:: + + >>> BuildrootPath.from_real(PosixPath('/tmp/buildroot/foo'), root=PosixPath('/tmp/buildroot')) + BuildrootPath('/foo') + """ + return BuildrootPath("/") / realpath.relative_to(root) + + def to_real(self, root): + """ + Return a real PosixPath in the given root + + For example:: + + >>> BuildrootPath('/foo').to_real(PosixPath('/tmp/buildroot')) + PosixPath('/tmp/buildroot/foo') + """ + return root / self.relative_to("/") + + def normpath(self): + """ + Normalize all the potential /../ parts of the path without touching real files. + + PurePaths don't have .resolve(). + Paths have .resolve() but it touches real files. + This is an alternative. It assumes there are no symbolic links. + + Example: + + >>> BuildrootPath('/usr/lib/python/../pypy').normpath() + BuildrootPath('/usr/lib/pypy') + """ + return type(self)(os.path.normpath(self)) + + +def pycache_dir(script): + """ + For a script BuildrootPath, return a BuildrootPath of its __pycache__ directory. + + Example: + + >>> pycache_dir(BuildrootPath('/whatever/bar.py')) + BuildrootPath('/whatever/__pycache__') + + >>> pycache_dir(BuildrootPath('/opt/python3.10/foo.py')) + BuildrootPath('/opt/python3.10/__pycache__') + """ + return script.parent / "__pycache__" + + +def pycached(script, python_version): + """ + For a script BuildrootPath, return a list with that path and its bytecode glob. + Like the %pycached macro. + + The glob is represented as a BuildrootPath. + + Examples: + + >>> pycached(BuildrootPath('/whatever/bar.py'), '3.8') + [BuildrootPath('/whatever/bar.py'), BuildrootPath('/whatever/__pycache__/bar.cpython-38{,.opt-?}.pyc')] + + >>> pycached(BuildrootPath('/opt/python3.10/foo.py'), '3.10') + [BuildrootPath('/opt/python3.10/foo.py'), BuildrootPath('/opt/python3.10/__pycache__/foo.cpython-310{,.opt-?}.pyc')] + """ + assert script.suffix == ".py" + pyver = "".join(python_version.split(".")[:2]) + pycname = f"{script.stem}.cpython-{pyver}{PYCACHED_SUFFIX}" + pyc = pycache_dir(script) / pycname + pyc.glob_suffix_len = len(PYCACHED_SUFFIX) + return [script, pyc] + + +def add_file_to_module(paths, module_name, module_type, files_dirs, *files): + """ + Helper procedure, adds given files to the module_name of a given module_type + """ + for module in paths["modules"][module_name]: + if module["type"] == module_type: + if files[0] not in module[files_dirs]: + module[files_dirs].extend(files) + break + else: + paths["modules"][module_name].append( + {"type": module_type, "files": [], "dirs": [], files_dirs: list(files)} + ) + + +def add_py_file_to_module(paths, module_name, module_type, path, python_version, + *, include_pycache_dir): + """ + Helper procedure, adds given .py file to the module_name of a given module_type + Always also adds the bytecode cache. + If include_pycache_dir is set, also include the __pycache__ directory. + """ + add_file_to_module(paths, module_name, module_type, "files", *pycached(path, python_version)) + if include_pycache_dir: + add_file_to_module(paths, module_name, module_type, "dirs", pycache_dir(path)) + + +def add_lang_to_module(paths, module_name, path): + """ + Helper procedure, divides lang files by language and adds them to the module_name + + Returns True if the language code detection was successful + """ + for i, parent in enumerate(path.parents): + if parent.name == 'LC_MESSAGES': + lang_country_code = path.parents[i+1].name + break + else: + return False + # convert potential en_US to plain en + lang_code = lang_country_code.partition('_')[0] + if module_name not in paths["lang"]: + paths["lang"].update({module_name: defaultdict(list)}) + paths["lang"][module_name][lang_code].append(path) + return True + + +def prepend_mandirs(prefix): + """ + Return the list of man page directories prepended with the given prefix. + """ + return [str(prefix) + mandir for mandir in MANDIRS] + + +def normalize_manpage_filename(prefix, path): + """ + If a path is processed by RPM's brp-compress script, strip it of the extension + (if the extension matches one of the listed by brp-compress), + append '*' to the filename and return it. If not, return the unchanged path. + + Examples: + + >>> normalize_manpage_filename(PosixPath('/usr'), BuildrootPath('/usr/share/man/de/man1/linkchecker.1')) + BuildrootPath('/usr/share/man/de/man1/linkchecker.1*') + + >>> normalize_manpage_filename(PosixPath('/usr'), BuildrootPath('/usr/share/doc/en/man/man1/getmac.1')) + BuildrootPath('/usr/share/doc/en/man/man1/getmac.1*') + + >>> normalize_manpage_filename(PosixPath('/usr'), BuildrootPath('/usr/share/man/man8/abc.8.zstd')) + BuildrootPath('/usr/share/man/man8/abc.8*') + + >>> normalize_manpage_filename(PosixPath('/usr'), BuildrootPath('/usr/kerberos/man/dir')) + BuildrootPath('/usr/kerberos/man/dir') + + >>> normalize_manpage_filename(PosixPath('/usr'), BuildrootPath('/usr/kerberos/man/dir.1')) + BuildrootPath('/usr/kerberos/man/dir.1*') + + >>> normalize_manpage_filename(PosixPath('/usr'), BuildrootPath('/usr/bin/getmac')) + BuildrootPath('/usr/bin/getmac') + """ + + prefixed_mandirs = prepend_mandirs(prefix) + for mandir in prefixed_mandirs: + # "dir" is explicitly excluded by RPM + # https://github.com/rpm-software-management/rpm/blob/rpm-4.17.0-release/scripts/brp-compress#L24 + if fnmatch.fnmatch(str(path.parent), mandir) and path.name != "dir": + # "abc.1.gz2" -> "abc.1*" + if path.suffix[1:] in MANPAGE_EXTENSIONS: + path = BuildrootPath(path.parent / (path.stem + "*")) + # "abc.1 -> abc.1*" + else: + path = BuildrootPath(path.parent / (path.name + "*")) + path.glob_suffix_len = 1 + return path + else: + return path + + +def is_valid_module_name(s): + """Return True if a string is considered a valid module name and False otherwise. + + String must be a valid Python name, not a Python keyword and must not + start with underscore - we treat those as private. + Examples: + + >>> is_valid_module_name('module_name') + True + + >>> is_valid_module_name('12module_name') + False + + >>> is_valid_module_name('module-name') + False + + >>> is_valid_module_name('return') + False + + >>> is_valid_module_name('_module_name') + False + """ + if (s.isidentifier() and not iskeyword(s) and not s.startswith("_")): + return True + return False + + +def module_names_from_path(path): + """Get all importable module names from given path. + + Paths containing ".py" and ".so" files are considered importable modules, + and so their respective directories (ie. "foo/bar/baz.py": "foo", "foo.bar", + "foo.bar.baz"). + Paths containing invalid Python strings are discarded. + + Return set of all valid possibilities. + """ + # Discard all files that are not valid modules + if path.suffix not in (".py", ".so"): + return set() + + parts = list(path.parts) + + # Modify the file names according to their suffixes + if path.suffix == ".py": + parts[-1] = path.stem + elif path.suffix == ".so": + # .so files can have two suffixes - cut both of them + parts[-1] = PosixPath(path.stem).stem + + # '__init__' indicates a module but we don't want to import the actual file + # It's unclear whether there can be __init__.so files in the Python packages. + # The idea to implement this file was raised in 2008 on Python-ideas mailing list + # (https://mail.python.org/pipermail/python-ideas/2008-October/002292.html) + # and there are a few reports of people compiling their __init__.py to __init__.so. + # However it's not officially documented nor forbidden, + # so we're checking for the stem after stripping the suffix from the file. + if parts[-1] == "__init__": + del parts[-1] + + # For each part of the path check whether it's valid + # If not, discard the whole path - return an empty set + for path_part in parts: + if not is_valid_module_name(path_part): + return set() + else: + return {'.'.join(parts[:x+1]) for x in range(len(parts))} + + +def is_license_file(path, license_files, license_directories): + """ + Check if the given BuildrootPath path matches any of the "License-File" entries. + The path is considered matched when resolved from any of the license_directories + matches string-wise what is stored in any "License-File" entry (license_files). + + Examples: + >>> site_packages = BuildrootPath('/usr/lib/python3.12/site-packages') + >>> distinfo = site_packages / 'foo-1.0.dist-info' + >>> license_directories = [distinfo / 'licenses', distinfo] + >>> license_files = ['LICENSE.txt', 'AUTHORS.md'] + >>> is_license_file(distinfo / 'AUTHORS.md', license_files, license_directories) + True + >>> is_license_file(distinfo / 'licenses/LICENSE.txt', license_files, license_directories) + True + >>> # we don't match based on directory only + >>> is_license_file(distinfo / 'licenses/COPYING', license_files, license_directories) + False + >>> is_license_file(site_packages / 'foo/LICENSE.txt', license_files, license_directories) + False + """ + if not license_files or not license_directories: + return False + for license_dir in license_directories: + if (path.is_relative_to(license_dir) and + str(path.relative_to(license_dir)) in license_files): + return True + return False + + +def classify_paths( + record_path, parsed_record_content, metadata, sitedirs, python_version, prefix +): + """ + For each BuildrootPath in parsed_record_content classify it to a dict structure + that allows to filter the files for the %files and %check section easier. + + For the dict structure, look at the beginning of this function's code. + + Each "module" is a dict with "type" ("package", "script", "extension"), and "files" and "dirs". + """ + distinfo = record_path.parent + paths = { + "metadata": { + "files": [], # regular %file entries with dist-info content + "dirs": [distinfo], # %dir %file entries with dist-info directory + "docs": [], # to be used once there is upstream way to recognize READMEs + "licenses": [], # %license entries parsed from dist-info METADATA file + }, + "lang": {}, # %lang entries: [module_name or None][language_code] lists of .mo and .qm files + "modules": defaultdict(list), # each importable module (directory, .py, .so) + "module_names": set(), # qualified names of each importable module ("foo.bar.baz") + "other": {"files": []}, # regular %file entries we could not parse :( + } + + license_files = metadata.get_all('License-File') + license_directory = distinfo / 'licenses' # See PEP 639 "Root License Directory" + # setuptools was the first known build backend to implement License-File. + # Unfortunately they didn't put licenses to the license directory in setuptools<78: + # https://github.com/pypa/setuptools/issues/3596 + # Hence, we check licenses in both licenses and dist-info + license_directories = (license_directory, distinfo) + + # In RECORDs generated by pip, there are no directories, only files. + # The example RECORD from PEP 376 does not contain directories either. + # Hence, we'll only assume files, but TODO get it officially documented. + for path in parsed_record_content: + if path.suffix == ".pyc": + # we handle bytecode separately + continue + + if distinfo in path.parents: + if path.parent == distinfo and path.name in ("RECORD", "REQUESTED"): + # RECORD and REQUESTED files are removed in %pyproject_install + # See PEP 627 + continue + if is_license_file(path, license_files, license_directories): + paths["metadata"]["licenses"].append(path) + else: + paths["metadata"]["files"].append(path) + # nested directories within distinfo + index = path.parents.index(distinfo) + for parent in list(path.parents)[:index]: # no direct slice until Python 3.10 + if parent not in paths["metadata"]["dirs"]: + paths["metadata"]["dirs"].append(parent) + continue + + for sitedir in sitedirs: + if sitedir in path.parents: + # Get only the part without sitedir prefix to classify module names + relative_path = path.relative_to(sitedir) + paths["module_names"].update(module_names_from_path(relative_path)) + if path.parent == sitedir: + if path.suffix == ".so": + # extension modules can have 2 suffixes + name = BuildrootPath(path.stem).stem + add_file_to_module(paths, name, "extension", "files", path) + elif path.suffix == ".py": + name = path.stem + # we add the .pyc files, but not top-level __pycache__ + add_py_file_to_module( + paths, name, "script", path, python_version, + include_pycache_dir=False + ) + else: + paths["other"]["files"].append(path) + else: + # this file is inside a dir, we add all dirs upwards until sitedir + index = path.parents.index(sitedir) + module_dir = path.parents[index - 1] + for parent in list(path.parents)[:index]: # no direct slice until Python 3.10 + add_file_to_module(paths, module_dir.name, "package", "dirs", parent) + is_lang = False + if path.suffix == ".mo" or path.suffix == ".qm": + is_lang = add_lang_to_module(paths, module_dir.name, path) + if not is_lang: + if path.suffix == ".py": + # we add the .pyc files, and their __pycache__ + add_py_file_to_module( + paths, module_dir.name, "package", path, python_version, + include_pycache_dir=True + ) + else: + add_file_to_module(paths, module_dir.name, "package", "files", path) + break + else: + if path.suffix == ".mo" or path.suffix == ".qm": + add_lang_to_module(paths, None, path) or paths["other"]["files"].append(path) + else: + path = normalize_manpage_filename(prefix, path) + paths["other"]["files"].append(path) + + return paths + + +def escape_rpm_path_4_19(path): + r""" + Escape special characters in string-paths or BuildrootPaths, RPM >= 4.19 + + E.g. a space in path otherwise makes RPM think it's multiple paths, + unless we escape it. + Or a literal % symbol in path might be expanded as a macro if not escaped by %%. + + See https://github.com/rpm-software-management/rpm/pull/2103 + and https://github.com/rpm-software-management/rpm/pull/2206 + + If the path ends with a glob produced by our other functions, + we cannot escape that part. + The BuildrootPath.glob_suffix_len attribute is used to indicate such globs. + When such suffix exists, it is not escaped. + + + Examples: + + >>> escape_rpm_path_4_19(BuildrootPath('/usr/lib/python3.9/site-packages/setuptools')) + '/usr/lib/python3.9/site-packages/setuptools' + + >>> escape_rpm_path_4_19('/usr/lib/python3.9/site-packages/setuptools/script (dev).tmpl') + '/usr/lib/python3.9/site-packages/setuptools/script\\ (dev).tmpl' + + >>> escape_rpm_path_4_19('/usr/share/data/100%valid.path') + '/usr/share/data/100%%valid.path' + + >>> escape_rpm_path_4_19('/usr/share/data/100 % valid.path') + '/usr/share/data/100\\ %%\\ valid.path' + + >>> escape_rpm_path_4_19('/usr/share/data/1000 %% valid.path') + '/usr/share/data/1000\\ %%%%\\ valid.path' + + >>> escape_rpm_path_4_19('/usr/share/data/spaces and "quotes" and ?') + '/usr/share/data/spaces\\ and\\ \\"quotes\\"\\ and\\ \\?' + + >>> escape_rpm_path_4_19('/usr/share/data/spaces and [square brackets]') + '/usr/share/data/spaces\\ and\\ \\[square\\ brackets\\]' + + >>> path = BuildrootPath('/whatever/__pycache__/bar.cpython-38{,.opt-?}.pyc') + >>> path.glob_suffix_len = len('{,.opt-?}.pyc') + >>> escape_rpm_path_4_19(path) + '/whatever/__pycache__/bar.cpython-38{,.opt-?}.pyc' + + >>> path = BuildrootPath('/spa ces/__pycache__/bar.cpython-38{,.opt-?}.pyc') + >>> path.glob_suffix_len = len('{,.opt-?}.pyc') + >>> escape_rpm_path_4_19(path) + '/spa\\ ces/__pycache__/bar.cpython-38{,.opt-?}.pyc' + + >>> path = BuildrootPath('/usr/man/man5/ipykernel.5*') + >>> path.glob_suffix_len = 1 + >>> escape_rpm_path_4_19(path) + '/usr/man/man5/ipykernel.5*' + """ + glob_suffix_len = getattr(path, "glob_suffix_len", 0) + suffix = "" + path = str(path) + if glob_suffix_len: + suffix = path[-glob_suffix_len:] + path = path[:-glob_suffix_len] + if "%" in path: + path = path.replace("%", "%%") + # Prepend all matched/special characters (\1) with a backslash (escaped, hence \\): + return RPM_ESCAPE_REGEX.sub(r'\\\1', path) + suffix + + +def escape_rpm_path_4_18(path): + """ + Escape special characters in string-paths or BuildrootPaths, RPM < 4.19 + + E.g. a space in path otherwise makes RPM think it's multiple paths, + unless we put it in "quotes". + Or a literal % symbol in path might be expanded as a macro if not escaped. + + Due to limitations in RPM < 4.19, + some paths with spaces and other special characters are not supported. + + See this thread http://lists.rpm.org/pipermail/rpm-list/2021-June/002048.html + + Examples: + + >>> escape_rpm_path_4_18(BuildrootPath('/usr/lib/python3.9/site-packages/setuptools')) + '/usr/lib/python3.9/site-packages/setuptools' + + >>> escape_rpm_path_4_18('/usr/lib/python3.9/site-packages/setuptools/script (dev).tmpl') + '"/usr/lib/python3.9/site-packages/setuptools/script (dev).tmpl"' + + >>> escape_rpm_path_4_18('/usr/share/data/100%valid.path') + '/usr/share/data/100%%%%%%%%valid.path' + + >>> escape_rpm_path_4_18('/usr/share/data/100 % valid.path') + '"/usr/share/data/100 %%%%%%%% valid.path"' + + >>> escape_rpm_path_4_18('/usr/share/data/1000 %% valid.path') + '"/usr/share/data/1000 %%%%%%%%%%%%%%%% valid.path"' + + >>> escape_rpm_path_4_18('/usr/share/data/spaces and "quotes"') + Traceback (most recent call last): + ... + NotImplementedError: ... + + >>> escape_rpm_path_4_18('/usr/share/data/spaces and [square brackets]') + Traceback (most recent call last): + ... + NotImplementedError: ... + """ + orig_path = path = str(path) + if "%" in path: + # Escaping an actual percentage sign in path by 8 signs + # has been verified in RPM 4.16 and 4.17: + path = path.replace("%", "%" * 8) + if any(symbol in path for symbol in RPM_FILES_DELIMETERS): + if '"' in path: + # As far as we know, RPM < 4.19 cannot list such file individually + # See this thread http://lists.rpm.org/pipermail/rpm-list/2021-June/002048.html + raise NotImplementedError(f'" symbol in path with spaces is not supported by %pyproject_save_files on RPM < 4.19: {orig_path!r}') + if "[" in path or "]" in path: + # See https://github.com/rpm-software-management/rpm/issues/1749 + raise NotImplementedError(f'[ or ] symbol in path with spaces is not supported by %pyproject_save_files on RPM < 4.19: {orig_path!r}') + return f'"{path}"' + return path + + +if RPM_FILES_ESCAPE == "4.19": + escape_rpm_path = escape_rpm_path_4_19 +elif RPM_FILES_ESCAPE == "4.18": + escape_rpm_path = escape_rpm_path_4_18 +else: + raise RuntimeError("RPM_FILES_ESCAPE must be 4.18 or 4.19") + + +def generate_file_list(paths_dict, module_globs, include_others=False): + """ + This function takes the classified paths_dict and turns it into lines + for the %files section. Returns list with text lines, no Path objects. + + Only includes files from modules that match module_globs, metadata and + optionaly all other files. + + It asserts that all globs match at least one module, raises ValueError otherwise. + Multiple globs matching identical module(s) are OK. + """ + files = set() + + if include_others: + files.update(f"{escape_rpm_path(p)}" for p in paths_dict["other"]["files"]) + try: + for lang_code in paths_dict["lang"][None]: + files.update(f"%lang({lang_code}) {escape_rpm_path(p)}" for p in paths_dict["lang"][None][lang_code]) + except KeyError: + pass + + files.update(f"{escape_rpm_path(p)}" for p in paths_dict["metadata"]["files"]) + for macro in "dir", "doc", "license": + files.update(f"%{macro} {escape_rpm_path(p)}" for p in paths_dict["metadata"][f"{macro}s"]) + + modules = paths_dict["modules"] + done_modules = set() + done_globs = set() + + for glob in module_globs: + for name in modules: + if fnmatch.fnmatchcase(name, glob): + if name not in done_modules: + try: + for lang_code in paths_dict["lang"][name]: + files.update(f"%lang({lang_code}) {escape_rpm_path(p)}" for p in paths_dict["lang"][name][lang_code]) + except KeyError: + pass + for module in modules[name]: + files.update(f"%dir {escape_rpm_path(p)}" for p in module["dirs"]) + files.update(f"{escape_rpm_path(p)}" for p in module["files"]) + done_modules.add(name) + done_globs.add(glob) + + # Users using '*' don't care about the files in the package, so it's ok + # not to fail the build when no modules are detected + # There can be legitimate reasons to create a package without Python modules + if not modules: + for glob in module_globs: + if fnmatch.fnmatchcase("", glob): + done_globs.add(glob) + + missed = module_globs - done_globs + if missed: + missed_text = ", ".join(sorted(missed)) + raise ValueError(f"Globs did not match any module: {missed_text}") + + return sorted(files) + + +def generate_module_list(paths_dict, module_globs): + """ + This function takes the paths_dict created by the classify_paths() function and + reads the modules names from it. + It filters those whose top-level module names match any of the provided module_globs. + + Returns list with matching qualified module names. + + Examples: + + >>> generate_module_list({'module_names': {'foo', 'foo.bar', 'baz'}}, {'foo'}) + ['foo', 'foo.bar'] + + >>> generate_module_list({'module_names': {'foo', 'foo.bar', 'baz'}}, {'*foo'}) + ['foo', 'foo.bar'] + + >>> generate_module_list({'module_names': {'foo', 'foo.bar', 'baz'}}, {'foo', 'baz'}) + ['baz', 'foo', 'foo.bar'] + + >>> generate_module_list({'module_names': {'foo', 'foo.bar', 'baz'}}, {'*'}) + ['baz', 'foo', 'foo.bar'] + + >>> generate_module_list({'module_names': {'foo', 'foo.bar', 'baz'}}, {'bar'}) + [] + + Submodules aren't discovered: + + >>> generate_module_list({'module_names': {'foo', 'foo.bar', 'baz'}}, {'*bar'}) + [] + """ + + module_names = paths_dict['module_names'] + filtered_module_names = set() + + for glob in module_globs: + for name in module_names: + # Match the top-level part of the qualified name, eg. 'foo.bar.baz' -> 'foo' + top_level_name = name.split('.')[0] + if fnmatch.fnmatchcase(top_level_name, glob): + filtered_module_names.add(name) + + return sorted(filtered_module_names) + + +def parse_varargs(varargs): + """ + Parse varargs from the %pyproject_save_files macro + + Arguments starting with + are treated as a flags, everything else is a glob + + Returns as set of globs, boolean flag whether to include all the other files + + Raises ValueError for unknown flags and globs with dots (namespace packages). + + Good examples: + + >>> parse_varargs(['*']) + ({'*'}, False) + + >>> mods, auto = parse_varargs(['requests*', 'kerberos', '+auto']) + >>> auto + True + >>> sorted(mods) + ['kerberos', 'requests*'] + + >>> mods, auto = parse_varargs(['tldr', 'tensorf*']) + >>> auto + False + >>> sorted(mods) + ['tensorf*', 'tldr'] + + >>> parse_varargs(['+auto']) + (set(), True) + + Bad examples: + + >>> parse_varargs(['+kinkdir']) + Traceback (most recent call last): + ... + ValueError: Invalid argument: +kinkdir + + >>> parse_varargs(['good', '+bad', '*ugly*']) + Traceback (most recent call last): + ... + ValueError: Invalid argument: +bad + + >>> parse_varargs(['+bad', 'my.bad']) + Traceback (most recent call last): + ... + ValueError: Invalid argument: +bad + + >>> parse_varargs(['mod', 'mod.*']) + Traceback (most recent call last): + ... + ValueError: Attempted to use a namespaced package with . in the glob: mod.*. ... + + >>> parse_varargs(['my.bad', '+bad']) + Traceback (most recent call last): + ... + ValueError: Attempted to use a namespaced package with . in the glob: my.bad. ... + + >>> parse_varargs(['mod/submod']) + Traceback (most recent call last): + ... + ValueError: Attempted to use a namespaced package with / in the glob: mod/submod. ... + """ + include_auto = False + globs = set() + namespace_error_template = ( + "Attempted to use a namespaced package with {symbol} in the glob: {arg}. " + "That is not (yet) supported. Use {top} instead." + ) + for arg in varargs: + if arg.startswith("+"): + if arg == "+auto": + include_auto = True + else: + raise ValueError(f"Invalid argument: {arg}") + elif "." in arg: + top, *_ = arg.partition(".") + raise ValueError(namespace_error_template.format(symbol=".", arg=arg, top=top)) + elif "/" in arg: + top, *_ = arg.partition("/") + raise ValueError(namespace_error_template.format(symbol="/", arg=arg, top=top)) + else: + globs.add(arg) + + return globs, include_auto + + +def load_parsed_record(pyproject_record): + parsed_record = {} + with open(pyproject_record) as pyproject_record_file: + content = json.load(pyproject_record_file) + + if len(content) > 1: + raise FileExistsError("%pyproject_install has found more than one *.dist-info/RECORD file. " + "Currently, %pyproject_save_files supports only one wheel → one file list mapping. " + "Feel free to open a bugzilla for pyproject-rpm-macros and describe your usecase.") + + # Redefine strings stored in JSON to BuildRootPaths + for record_path, files in content.items(): + parsed_record[BuildrootPath(record_path)] = [BuildrootPath(f) for f in files] + + return parsed_record + + +def dist_metadata(buildroot, record_path): + """ + Returns distribution metadata (email.message.EmailMessage), possibly empty + """ + real_dist_path = record_path.parent.to_real(buildroot) + dist = Distribution.at(real_dist_path) + return dist.metadata + + +def pyproject_save_files_and_modules(buildroot, sitelib, sitearch, python_version, pyproject_record, prefix, assert_license, allow_no_modules, varargs): + """ + Takes arguments from the %{pyproject_save_files} macro + + Returns tuple: list of paths for the %files section and list of module names + for the %check section + + Raises ValueError when assert_license is true and no License-File (PEP 639) + is found. + """ + # On 32 bit architectures, sitelib equals to sitearch + # This saves us browsing one directory twice + sitedirs = sorted({sitelib, sitearch}) + + globs, include_auto = parse_varargs(varargs) + if not globs and not allow_no_modules: + raise ValueError( + "At least one module glob needs to be provided to %pyproject_save_files. " + "Alternatively, use -M to indicate no Python modules should be saved." + ) + if globs and allow_no_modules: + raise ValueError( + "%pyproject_save_files -M cannot be used together with module globs." + ) + parsed_records = load_parsed_record(pyproject_record) + + final_file_list = [] + final_module_list = [] + + # we assume OK when not asserting + license_ok = not assert_license + + for record_path, files in parsed_records.items(): + metadata = dist_metadata(buildroot, record_path) + paths_dict = classify_paths( + record_path, files, metadata, sitedirs, python_version, prefix + ) + license_ok = license_ok or bool(paths_dict["metadata"]["licenses"]) + + final_file_list.extend( + generate_file_list(paths_dict, globs, include_auto) + ) + final_module_list.extend( + generate_module_list(paths_dict, globs) + ) + + if not license_ok: + raise ValueError( + "No License-File (PEP 639) in upstream metadata found. " + "Adjust the upstream metadata " + "if the project's build backend supports PEP 639 " + "or use `%pyproject_save_files -L` " + "and include the %license file in %files manually." + ) + + return final_file_list, final_module_list + + +def main(cli_args): + file_section, module_names = pyproject_save_files_and_modules( + cli_args.buildroot, + cli_args.sitelib, + cli_args.sitearch, + cli_args.python_version, + cli_args.pyproject_record, + cli_args.prefix, + cli_args.assert_license, + cli_args.allow_no_modules, + cli_args.varargs, + ) + + cli_args.output_files.write_text("\n".join(file_section) + "\n", encoding="utf-8") + cli_args.output_modules.write_text("\n".join(module_names) + "\n", encoding="utf-8") + + +def argparser(): + parser = argparse.ArgumentParser( + description="Create %{pyproject_files} for a Python project.", + prog="%pyproject_save_files", + add_help=False, + # custom usage to add +auto + usage="%(prog)s [-l|-L] MODULE_GLOB|-M [MODULE_GLOB ...] [+auto]", + ) + parser.add_argument( + '--help', action='help', + default=argparse.SUPPRESS, + help=argparse.SUPPRESS, + ) + r = parser.add_argument_group("required arguments") + r.add_argument("--output-files", type=PosixPath, required=True, help=argparse.SUPPRESS) + r.add_argument("--output-modules", type=PosixPath, required=True, help=argparse.SUPPRESS) + r.add_argument("--buildroot", type=PosixPath, required=True, help=argparse.SUPPRESS) + r.add_argument("--sitelib", type=BuildrootPath, required=True, help=argparse.SUPPRESS) + r.add_argument("--sitearch", type=BuildrootPath, required=True, help=argparse.SUPPRESS) + r.add_argument("--python-version", type=str, required=True, help=argparse.SUPPRESS) + r.add_argument("--pyproject-record", type=PosixPath, required=True, help=argparse.SUPPRESS) + r.add_argument("--prefix", type=PosixPath, required=True, help=argparse.SUPPRESS) + parser.add_argument( + "-l", "--assert-license", action="store_true", default=False, + help="Fail when no License-File (PEP 639) is found.", + ) + parser.add_argument( + "-L", "--no-assert-license", action="store_false", dest="assert_license", + help="Don't fail when no License-File (PEP 639) is found (the default).", + ) + parser.add_argument( + "-M", "--allow-no-modules", action="store_true", default=False, + help="Don't fail when no globs are provided, only include non-modules data in the generated filelist.", + ) + parser.add_argument( + "varargs", nargs="*", metavar="MODULE_GLOB", + help="Shell-like glob matching top-level module names to save into %%{pyproject_files}", + ) + return parser + + +if __name__ == "__main__": + cli_args = argparser().parse_args() + main(cli_args) diff --git a/SPECS/pyproject-rpm-macros/pyproject_wheel.py b/SPECS/pyproject-rpm-macros/pyproject_wheel.py new file mode 100644 index 00000000..6d621763 --- /dev/null +++ b/SPECS/pyproject-rpm-macros/pyproject_wheel.py @@ -0,0 +1,78 @@ +import argparse +import sys +import subprocess + + +def parse_config_settings_args(config_settings): + """ + Given a list of config `KEY=VALUE` formatted config settings, + return a dictionary that can be passed to PEP 517 hook functions. + """ + if not config_settings: + return config_settings + new_config_settings = {} + for arg in config_settings: + key, _, value = arg.partition('=') + if key in new_config_settings: + if not isinstance(new_config_settings[key], list): + # convert the existing value to a list + new_config_settings[key] = [new_config_settings[key]] + new_config_settings[key].append(value) + else: + new_config_settings[key] = value + return new_config_settings + + +def get_config_settings_args(config_settings): + """ + Given a dictionary of PEP 517 backend config_settings, + yield --config-settings args that can be passed to pip's CLI + """ + if not config_settings: + return + for key, values in config_settings.items(): + if not isinstance(values, list): + values = [values] + for value in values: + if value == '': + yield f'--config-settings={key}' + else: + yield f'--config-settings={key}={value}' + + +def build_wheel(*, wheeldir, stdout=None, config_settings=None): + command = ( + sys.executable, + '-m', 'pip', + 'wheel', + '--wheel-dir', wheeldir, + '--no-deps', + '--use-pep517', + '--no-build-isolation', + '--disable-pip-version-check', + '--no-clean', + '--progress-bar', 'off', + '--verbose', + *get_config_settings_args(config_settings), + '.', + ) + cp = subprocess.run(command, stdout=stdout) + return cp.returncode + + +def parse_args(argv=None): + parser = argparse.ArgumentParser(prog='%pyproject_wheel') + parser.add_argument('wheeldir', help=argparse.SUPPRESS) + parser.add_argument( + '-C', + dest='config_settings', + action='append', + help='Configuration settings to pass to the PEP 517 backend', + ) + args = parser.parse_args(argv) + args.config_settings = parse_config_settings_args(args.config_settings) + return args + + +if __name__ == '__main__': + sys.exit(build_wheel(**vars(parse_args()))) diff --git a/SPECS/pytest/pytest.spec b/SPECS/pytest/pytest.spec new file mode 100644 index 00000000..02d2bac8 --- /dev/null +++ b/SPECS/pytest/pytest.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: pytest +Version: 8.3.5 +Release: %autorelease +Summary: Simple powerful testing with Python +License: MIT +URL: https://pytest.org +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros + +%description +The pytest framework makes it easy to write small tests, yet scales to support +complex functional testing for applications and libraries. + +%package -n python3-%{name} +Summary: Simple powerful testing with Python +Provides: pytest = %{version}-%{release} + +%description -n python3-%{name} +The pytest framework makes it easy to write small tests, yet scales to support +complex functional testing for applications and libraries. + +%prep +%autosetup -p1 + +%generate_buildrequires +%pyproject_buildrequires -r + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files _pytest pytest py + +mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python3_version} +ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest-3 +mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python3_version} +ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test-3 + +# We use 3.X per default +ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest +ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test + +# remove shebangs from all scripts +find %{buildroot}%{python3_sitelib} \ + -name '*.py' \ + -exec sed -i -e '1{/^#!/d}' {} \; + +%files -n python3-%{name} -f %{pyproject_files} +%{_bindir}/pytest +%{_bindir}/pytest-3 +%{_bindir}/pytest-%{python3_version} +%{_bindir}/py.test +%{_bindir}/py.test-3 +%{_bindir}/py.test-%{python3_version} + +%changelog +%{?autochangelog} diff --git a/SPECS/python-Cython/python-Cython.spec b/SPECS/python-Cython/python-Cython.spec new file mode 100644 index 00000000..bf7dcf51 --- /dev/null +++ b/SPECS/python-Cython/python-Cython.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# This bcond allows to ship a non-compiled version +# Slower, but sometimes necessary with alpha Python versions +%bcond cython_compile 1 + +Name: python-Cython +Version: 3.1.3 +Release: %autorelease +Summary: Language for writing Python extension modules +License: Apache-2.0 +URL: http://www.cython.org +#!RemoteAsset +Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz + +BuildRequires: python3-devel +BuildRequires: expat + +%if %{with cython_compile} +BuildRequires: gcc +%else +BuildArch: noarch +%endif + +%description +The Cython language makes writing C extensions for the Python language as easy +as Python itself. Cython is a source code translator based on Pyrex, +but supports more cutting edge functionality and optimizations. + +The Cython language is a superset of the Python language (almost all Python +code is also valid Cython code), but Cython additionally supports optional +static typing to natively call C functions, operate with C++ classes and +declare fast C types on variables and class attributes. +This allows the compiler to generate very efficient C code from Cython code. + +This makes Cython the ideal language for writing glue code for external C/C++ +libraries, and for fast C modules that speed up the execution of Python code. + +%package -n python3-Cython +Summary: %{summary} +Provides: Cython = %{version}-%{release} +Provides: Cython%{?_isa} = %{version}-%{release} +Provides: cython = %{version}-%{release} +Provides: cython%{?_isa} = %{version}-%{release} +%py_provides python3-Cython +# For lazy people - 251 +%py_provides python3-cython +# A small templating library is bundled in Cython/Tempita +# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita +# but the bundled copy is patched and reorganized. +# Upstream homepage is inaccessible. +Provides: bundled(python3dist(tempita)) + +%description -n python3-Cython +The Cython language makes writing C extensions for the Python language as easy +as Python itself. Cython is a source code translator based on Pyrex, +but supports more cutting edge functionality and optimizations. + +The Cython language is a superset of the Python language (almost all Python +code is also valid Cython code), but Cython additionally supports optional +static typing to natively call C functions, operate with C++ classes and +declare fast C types on variables and class attributes. +This allows the compiler to generate very efficient C code from Cython code. + +This makes Cython the ideal language for writing glue code for external C/C++ +libraries, and for fast C modules that speed up the execution of Python code. + +%prep +%autosetup -n cython-%{version} -p1 + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel %{!?with_cython_compile:-C--global-option=--no-cython-compile} + +%install +%pyproject_install +%pyproject_save_files Cython cython pyximport + +%files -n python3-Cython -f %{pyproject_files} +%doc README.rst CHANGES.rst USAGE.txt Demos Doc Tools +%{_bindir}/cython +%{_bindir}/cygdb +%{_bindir}/cythonize + +%changelog +%{?autochangelog} diff --git a/SPECS/python-PyYAML/python-PyYAML.spec b/SPECS/python-PyYAML/python-PyYAML.spec new file mode 100644 index 00000000..28e3fbbd --- /dev/null +++ b/SPECS/python-PyYAML/python-PyYAML.spec @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: python-PyYAML +Version: 6.0.2 +Release: %autorelease +Summary: YAML parser and emitter for Python +License: MIT +URL: https://github.com/yaml/pyyaml +#!RemoteAsset +Source: https://github.com/yaml/pyyaml/archive/%{version}.tar.gz + +BuildRequires: libyaml-devel +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: expat + +%description +YAML is a data serialization format designed for human readability and +interaction with scripting languages. PyYAML is a YAML parser and +emitter for Python. + +PyYAML features a complete YAML 1.1 parser, Unicode support, pickle +support, capable extension API, and sensible error messages. PyYAML +supports standard YAML tags and provides Python-specific tags that +allow to represent an arbitrary Python object. + +PyYAML is applicable for a broad range of tasks from complex +configuration files to object serialization and persistence. + +%package -n python3-PyYAML +Summary: YAML parser and emitter for Python +%py_provides python3-yaml +# For lazy people - 251 +%py_provides python3-pyyaml + +%description -n python3-PyYAML +YAML is a data serialization format designed for human readability and +interaction with scripting languages. PyYAML is a YAML parser and +emitter for Python. + +PyYAML features a complete YAML 1.1 parser, Unicode support, pickle +support, capable extension API, and sensible error messages. PyYAML +supports standard YAML tags and provides Python-specific tags that +allow to represent an arbitrary Python object. + +PyYAML is applicable for a broad range of tasks from complex +configuration files to object serialization and persistence. + +%prep +%autosetup -p1 -n pyyaml-%{version} +chmod a-x examples/yaml-highlight/yaml_hl.py + +# remove pre-generated file +rm -rf ext/_yaml.c + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files yaml _yaml + +%files -n python3-PyYAML -f %{pyproject_files} +%doc CHANGES README.md examples + +%changelog +%{?autochangelog} diff --git a/SPECS/python-appdirs/python-appdirs.spec b/SPECS/python-appdirs/python-appdirs.spec new file mode 100644 index 00000000..1e5c9ce3 --- /dev/null +++ b/SPECS/python-appdirs/python-appdirs.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname appdirs + +Name: python-%{srcname} +Version: 1.4.4 +Release: %autorelease +License: MIT +URL: https://github.com/ActiveState/appdirs +Summary: Determine platform-specific dirs, e.g. a "user data dir" +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +A small Python module for determining appropriate " + " platform-specific +directories, e.g. a "user data dir". + + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.rst CHANGES.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-argparse-manpage/python-argparse-manpage.spec b/SPECS/python-argparse-manpage/python-argparse-manpage.spec new file mode 100644 index 00000000..16409a1e --- /dev/null +++ b/SPECS/python-argparse-manpage/python-argparse-manpage.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname argparse-manpage + +Name: python-%{srcname} +Version: 4.7 +Release: %autorelease +License: Apache-2.0 +URL: https://github.com/praiskup/argparse-manpage +Summary: Build manual page from Python's ArgumentParser object +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/argparse_manpage-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: pyproject-rpm-macros +BuildRequires: pytest +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l argparse_manpage build_manpages +auto +%description +This package provides tools to build manual pages from Python's +@code{ArgumentParser} object. + +%pyproject_extras_subpkg -n python3-%{srcname} setuptools + +%generate_buildrequires +%pyproject_buildrequires + + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-asgiref/python-asgiref.spec b/SPECS/python-asgiref/python-asgiref.spec new file mode 100644 index 00000000..c87f5f2a --- /dev/null +++ b/SPECS/python-asgiref/python-asgiref.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname asgiref + +Name: python-%{srcname} +Version: 3.8.1 +Release: %autorelease +# bundled async-timeout is Apache-2.0 +License: BSD-3-Clause AND Apache-2.0 +URL: https://github.com/django/asgiref/ +Summary: ASGI specs, helper code, and adapters +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto + +# https://github.com/django/asgiref/commit/9c6df6e02700092eb19adefff3552d44388f69b8 +# This code is modified and probably cannot be unvendored. +Provides: bundled(python3dist(async-timeout)) == 3.0.1 + +%description +ASGI is a standard for Python asynchronous web apps and servers to +communicate with each other, and positioned as an asynchronous successor to +WSGI. This package includes libraries for implementing ASGI servers. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-attrs/python-attrs.spec b/SPECS/python-attrs/python-attrs.spec new file mode 100644 index 00000000..c3e88291 --- /dev/null +++ b/SPECS/python-attrs/python-attrs.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname attrs + +Name: python-%{srcname} +Version: 25.4.0 +Release: %autorelease +License: MIT +URL: https://github.com/python-attrs/attrs/ +Summary: Attributes without boilerplate +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l attr %{srcname} +auto +%description +attrs is an MIT-licensed Python package with class decorators that +ease the chores of implementing the most common attribute-related +object protocols. + + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-boolean-py/python-boolean-py.spec b/SPECS/python-boolean-py/python-boolean-py.spec new file mode 100644 index 00000000..f4a0b460 --- /dev/null +++ b/SPECS/python-boolean-py/python-boolean-py.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname boolean_py + +Name: python-boolean-py +Version: 5.0 +Release: %autorelease +License: BSD-2-clause +URL: https://github.com/bastikr/boolean.py +Summary: Boolean algebra in one Python module +Provides: python3-boolean-py +%python_provide python3-boolean-py +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l boolean +auto +%description +This is a small Python library that implements boolean algebra. +It defines two base elements, @code{TRUE} and @code{FALSE}, and a +@code{Symbol} class that can take on one of these two values. Calculations +are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other +compositions like @code{XOR} and @code{NAND} are emulated on top of them. +Expressions are constructed from parsed strings or directly in Python. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-build/python-build.spec b/SPECS/python-build/python-build.spec new file mode 100644 index 00000000..d083fcbc --- /dev/null +++ b/SPECS/python-build/python-build.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname build + +Name: python-%{srcname} +Version: 1.3.0 +Release: %autorelease +License: MIT +URL: https://pypa-build.readthedocs.io/en/latest/ +Summary: Simple Python PEP 517 package builder +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): build +auto +%description +The @command{build} command invokes the PEP 517 hooks to +build a distribution package. It is a simple build tool and does not perform +any dependency management. It aims to keep dependencies to a minimum, in +order to make bootstrapping easier. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* +%license LICENSE +%changelog +%{?autochangelog} diff --git a/SPECS/python-certifi/python-certifi.spec b/SPECS/python-certifi/python-certifi.spec new file mode 100644 index 00000000..729d972b --- /dev/null +++ b/SPECS/python-certifi/python-certifi.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname certifi + +Name: python-%{srcname} +Version: 2022.6.15 +Release: %autorelease +Summary: Python CA certificate bundle +License: MIT +URL: https://certifi.io/ +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +%description +Certifi is a Python library that contains a CA certificate bundle, which +is used by the Requests library to verify HTTPS requests. + +%generate_buildrequires +%pyproject_buildrequires + + +%files -f %{pyproject_files} +%license LICENSE +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-cffi/python-cffi.spec b/SPECS/python-cffi/python-cffi.spec new file mode 100644 index 00000000..838e6f0b --- /dev/null +++ b/SPECS/python-cffi/python-cffi.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname cffi + +Name: python-%{srcname} +Version: 1.17.1 +Release: %autorelease +Summary: Foreign function interface for Python +License: MIT +URL: https://cffi.readthedocs.io/ +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildRequires: python3-devel +BuildRequires: libffi-devel +BuildRequires: pkg-config +BuildRequires: gcc +BuildSystem: pyproject +BuildOption(install): _cffi_backend cffi +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +%description +Foreign Function Interface for Python calling C code. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-charset_normalizer/python-charset_normalizer.spec b/SPECS/python-charset_normalizer/python-charset_normalizer.spec new file mode 100644 index 00000000..1aaabd09 --- /dev/null +++ b/SPECS/python-charset_normalizer/python-charset_normalizer.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname charset_normalizer + +Name: python-%{srcname} +Version: 3.4.3 +Release: %autorelease +License: MIT +URL: https://github.com/ousret/charset_normalizer +Summary: Universal Charset Detector, alternative to Chardet +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: pyproject-rpm-macros +BuildRequires: pytest +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +A library that helps you read text from an unknown charset encoding. +Motivated by chardet, trying to resolve the issue by taking +a new approach. All IANA character set names for which the Python core +library provides codecs are supported. + +%prep -a +# Drop mypy from build dependencies +sed -i 's/"mypy.*"//' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires -r + +%check +%pytest + +%files -f %{pyproject_files} +%doc README* +%{_bindir}/normalizer + +%changelog +%{?autochangelog} diff --git a/SPECS/python-colorama/python-colorama.spec b/SPECS/python-colorama/python-colorama.spec new file mode 100644 index 00000000..d12d6d2f --- /dev/null +++ b/SPECS/python-colorama/python-colorama.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname colorama + +Name: python-%{srcname} +Version: 0.4.6 +Release: %autorelease +License: BSD-3-Clause +URL: https://pypi.org/project/colorama/ +Summary: Colored terminal text rendering for Python +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +Makes ANSI escape character sequences, for producing colored +terminal text and cursor positioning, work under MS Windows. + +ANSI escape character sequences have long been used to produce colored terminal +text and cursor positioning on Unix and Macs. Colorama makes this work on +Windows, too. +It also provides some shortcuts to help generate ANSI sequences, and works fine +in conjunction with any other ANSI sequence generation library, such as +Termcolor. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc CHANGELOG.rst README.rst +%license LICENSE.txt + +%changelog +%{?autochangelog} diff --git a/SPECS/python-dateutil/0001-relax-setuptools_scm-requires.patch b/SPECS/python-dateutil/0001-relax-setuptools_scm-requires.patch new file mode 100644 index 00000000..4547a36a --- /dev/null +++ b/SPECS/python-dateutil/0001-relax-setuptools_scm-requires.patch @@ -0,0 +1,12 @@ +diff -U 3 -dHrN a/pyproject.toml b/pyproject.toml +--- a/pyproject.toml 2024-03-01 19:35:19.000000000 +0100 ++++ b/pyproject.toml 2025-05-08 17:56:27.011526557 +0200 +@@ -3,7 +3,7 @@ + "setuptools; python_version != '3.3'", + "setuptools<40.0; python_version == '3.3'", + "wheel", +- "setuptools_scm<8.0" ++ "setuptools_scm" + ] + build-backend = "setuptools.build_meta" + diff --git a/SPECS/python-dateutil/0002-fix-sphinx-import.patch b/SPECS/python-dateutil/0002-fix-sphinx-import.patch new file mode 100644 index 00000000..bb41aef9 --- /dev/null +++ b/SPECS/python-dateutil/0002-fix-sphinx-import.patch @@ -0,0 +1,12 @@ +diff -U 3 -dHrN a/docs/conf.py c/docs/conf.py +--- a/docs/conf.py 2024-03-01 19:35:19.000000000 +0100 ++++ c/docs/conf.py 2025-05-08 18:19:19.766473207 +0200 +@@ -20,7 +20,7 @@ + # add these directories to sys.path here. If the directory is relative to the + # documentation root, use os.path.abspath to make it absolute, like shown here. + #sys.path.insert(0, os.path.abspath('.')) +-sys.path.insert(0, os.path.abspath('../')) ++sys.path.insert(0, os.path.abspath('../src/')) + + # -- General configuration ------------------------------------------------ + diff --git a/SPECS/python-dateutil/python-dateutil.spec b/SPECS/python-dateutil/python-dateutil.spec new file mode 100644 index 00000000..5ee9588f --- /dev/null +++ b/SPECS/python-dateutil/python-dateutil.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname dateutil + +Name: python-%{srcname} +Version: 2.9.0.post0 +Release: %autorelease +Summary: Powerful extensions to the standard datetime module +License: (Apache-2.0 AND BSD-3-Clause) OR BSD-3-Clause +URL: https://github.com/dateutil/dateutil +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz +BuildArch: noarch + +# Otherwise will nothing provides python3dist(setuptools-scm) < 8~~ +Patch0: 0001-relax-setuptools_scm-requires.patch +# Fix sphinx import path +Patch1: 0002-fix-sphinx-import.patch + +BuildRequires: python3-devel +BuildRequires: python3-PyYAML +BuildRequires: expat + +%description +The dateutil module provides powerful extensions to the standard datetime +module available in Python. + +%package -n python3-%{srcname} +Summary: Powerful extensions to the standard datetime module +Requires: tzdata + +%description -n python3-%{srcname} +The dateutil module provides powerful extensions to the standard datetime +module available in Python. + +%prep +%autosetup -p1 -n %{name}-%{version} +# Convert NEWS file to UTF-8 +iconv --from=ISO-8859-1 --to=UTF-8 NEWS > NEWS.new +mv NEWS.new NEWS + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel +#make -C docs html + +%install +%pyproject_install +%pyproject_save_files %{srcname} -l + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc NEWS README.rst +#doc docs/_build/html +%license LICENSE + +%changelog +%{?autochangelog} diff --git a/SPECS/python-decorator/python-decorator.spec b/SPECS/python-decorator/python-decorator.spec new file mode 100644 index 00000000..55bb2c8a --- /dev/null +++ b/SPECS/python-decorator/python-decorator.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname decorator + +Name: python-%{srcname} +Version: 5.2.1 +Release: %autorelease +License: BSD-2-Clause +URL: https://pypi.org/project/decorator/ +Summary: Python module to simplify usage of decorators +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +The aim of the decorator module is to simplify the usage of decorators +for the average programmer, and to popularize decorators usage giving examples +of useful decorators, such as memoize, tracing, redirecting_stdout, locked, +etc. The core of this module is a decorator factory. + +%generate_buildrequires +%pyproject_buildrequires + +%check -a +%{py3_test_envvars} %{python3} -m unittest tests/test.py + +%files -f %{pyproject_files} +%doc README.rst CHANGES.md +%license LICENSE.txt + +%changelog +%{?autochangelog} diff --git a/SPECS/python-distlib/python-distlib.spec b/SPECS/python-distlib/python-distlib.spec new file mode 100644 index 00000000..20483598 --- /dev/null +++ b/SPECS/python-distlib/python-distlib.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname distlib + +Name: python-%{srcname} +Version: 0.3.7 +Release: %autorelease +License: LicenseRef-Callaway-Python +URL: https://github.com/pypa/distlib +Summary: Distribution utilities +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} +auto +%description +Distlib is a library which implements low-level functions that +relate to packaging and distribution of Python software. It is intended to be +used as the basis for third-party packaging tools. + +%generate_buildrequires +%pyproject_buildrequires + +%prep -a +rm distlib/*.exe + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-distro/python-distro.spec b/SPECS/python-distro/python-distro.spec new file mode 100644 index 00000000..5492178f --- /dev/null +++ b/SPECS/python-distro/python-distro.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname distro + +Name: python-%{srcname} +Version: 1.6.0 +Release: %autorelease +Summary: OS platform information API +License: Apache-2.0 +URL: https://github.com/nir0s/distro +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l distro +auto +%description +distro provides information about the OS distribution it runs on, +such as a reliable machine-readable ID, or version information. + +It is the recommended replacement for Python's original +`platform.linux_distribution` function (which will be removed in Python 3.8). +distro also provides a command-line interface to output the platform +information in various formats. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-docopt-ng/python-docopt-ng.spec b/SPECS/python-docopt-ng/python-docopt-ng.spec new file mode 100644 index 00000000..9f11e2e6 --- /dev/null +++ b/SPECS/python-docopt-ng/python-docopt-ng.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname docopt-ng + +Name: python-%{srcname} +Version: 0.9.0 +Release: %autorelease +License: MIT +URL: https://github.com/jazzband/docopt-ng +Summary: Jazzband-maintained fork of docopt, the humane command line arguments parser. +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/docopt_ng-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): docopt +auto +%description +This library allows the user to define a command-line +interface from a program's help message rather than specifying it +programmatically with command-line parsers like @code{getopt} and +@code{argparse}. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* +%license LICENSE-MIT +%changelog +%{?autochangelog} diff --git a/SPECS/python-docutils/python-docutils.spec b/SPECS/python-docutils/python-docutils.spec new file mode 100644 index 00000000..a7a3fdf4 --- /dev/null +++ b/SPECS/python-docutils/python-docutils.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname docutils + +Name: python-%{srcname} +Version: 0.21.2 +Release: %autorelease +License: BSD-2-Clause AND Python-2.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND LicenseRef-openRuyi-Public-Domain +URL: https://docutils.sourceforge.net/ +Summary: Python Documentation Utilities +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildSystem: pyproject +BuildRequires: python3-devel + +BuildOption(install): -l %{srcname} +auto +%description +Docutils is a modular system for processing documentation into useful +formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an +easy to use markup language, for input. + +This package provides tools for converting @file{.rst} files to other formats +via commands such as @command{rst2man}, as well as supporting Python code. + +%generate_buildrequires +%pyproject_buildrequires + +%check + +%files -f %{pyproject_files} +%doc README* +%{_bindir}/docutils +%{_bindir}/rst2html +%{_bindir}/rst2html4 +%{_bindir}/rst2html5 +%{_bindir}/rst2latex +%{_bindir}/rst2man +%{_bindir}/rst2odt +%{_bindir}/rst2pseudoxml +%{_bindir}/rst2s5 +%{_bindir}/rst2xetex +%{_bindir}/rst2xml + +%changelog +%{?autochangelog} diff --git a/SPECS/python-dotenv/python-dotenv.spec b/SPECS/python-dotenv/python-dotenv.spec new file mode 100644 index 00000000..d2ff6695 --- /dev/null +++ b/SPECS/python-dotenv/python-dotenv.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname python-dotenv + +Name: python-dotenv +Version: 1.1.1 +Release: %autorelease +License: BSD-3-Clause +URL: https://saurabh-kumar.com/python-dotenv/ +Summary: Setup environment variables according to .env files +Provides: python3-dotenv +%python_provide python3-dotenv +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/python_dotenv-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l dotenv +auto +%description +This package provides the @code{python-dotenv} Python module to read +key-value pairs from a @code{.env} file and set them as environment variables. + + +%prep -a +sed -i -e '/ipython/d' requirements.txt tox.ini + +%generate_buildrequires +%pyproject_buildrequires -t + + +%check + + +%pyproject_extras_subpkg -n python%{python3_pkgversion}-dotenv cli +%{_bindir}/dotenv + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-editables/python-editables.spec b/SPECS/python-editables/python-editables.spec new file mode 100644 index 00000000..65946efe --- /dev/null +++ b/SPECS/python-editables/python-editables.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname editables + +Name: python-%{srcname} +Version: 0.5 +Release: %autorelease +License: MIT +URL: https://github.com/pfmoore/editables +Summary: Editable installations +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +%description +A Python library for creating “editable wheels” + +This library supports the building of wheels which, when installed, will expose +packages in a local directory on sys.path in “editable mode”. In other words, +changes to the package source will be reflected in the package visible to +Python, without needing a reinstall. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-filelock/python-filelock.spec b/SPECS/python-filelock/python-filelock.spec new file mode 100644 index 00000000..4b7fc53c --- /dev/null +++ b/SPECS/python-filelock/python-filelock.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname filelock + +Name: python-%{srcname} +Version: 3.16.1 +Release: %autorelease +License: Unlicense +URL: https://github.com/tox-dev/py-filelock +Summary: Platform independent file lock +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +@code{filelock} contains a single module implementing +a platform independent file lock in Python, which provides a simple way of +inter-process communication. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-flit-core/_multibuild b/SPECS/python-flit-core/_multibuild new file mode 100644 index 00000000..2eb4fdaf --- /dev/null +++ b/SPECS/python-flit-core/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/SPECS/python-flit-core/python-flit-core.spec b/SPECS/python-flit-core/python-flit-core.spec new file mode 100644 index 00000000..7a468df8 --- /dev/null +++ b/SPECS/python-flit-core/python-flit-core.spec @@ -0,0 +1,101 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global flavor @BUILD_FLAVOR@%{nil} +# When bootstrapping new Python we need to build flit in bootstrap mode. +# The Python RPM dependency generators and pip are not yet available. +# Change to 1 for bootstrap +%if "%{flavor}" == "bootstrap" +%bcond bootstrap 1 +%else +%bcond bootstrap 0 +%endif + +%global srcname flit_core + +%if "%{flavor}" == "bootstrap" +Name: python-flit-core-bootstrap +%else +Name: python-flit-core +%endif +Version: 3.12.0 +Release: %autorelease +Summary: PEP 517 build backend for packages using Flit +License: BSD-3-Clause AND BSD-2-Clause +URL: https://flit.pypa.io/ +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +%if %{without bootstrap} +BuildRequires: python3-packaging +BuildRequires: python3-pip +%endif +BuildRequires: expat + +%description +This provides a PEP 517 build backend for packages using Flit. +The only public interface is the API specified by PEP 517, +at flit_core.buildapi. + +%package -n python3-flit-core +Summary: %{summary} + +# RPM generators are not yet available when we bootstrap +%if %{with bootstrap} +Provides: python3dist(flit-core) = %{version} +Provides: python%{python3_version}dist(flit-core) = %{version} +Requires: python(abi) = %{python3_version} +%endif + +%description -n python3-flit-core +This provides a PEP 517 build backend for packages using Flit. +The only public interface is the API specified by PEP 517, +at flit_core.buildapi. + +%prep +%autosetup -p1 -n flit_core-%{version} + +# Remove vendored tomli that flit_core includes to solve the circular dependency on older Pythons +# (flit_core requires tomli, but flit_core is needed to build tomli). +# We don't use this, as tomllib is a part of standard library since Python 3.11. +# Remove the bits looking for the license files of the vendored tomli. +rm -rf flit_core/vendor +sed -iE 's/, *"flit_core\/vendor\/\*\*\/LICENSE\*"//' pyproject.toml + +%if %{without bootstrap} +%generate_buildrequires +%pyproject_buildrequires +%endif + +%if %{with bootstrap} +%{python3} -m flit_core.wheel +%else +%pyproject_wheel +%endif + +%install +%if %{with bootstrap} +%{python3} bootstrap_install.py --install-root %{buildroot} --installdir %{python3_sitelib} dist/flit_core-%{version}-py3-none-any.whl +# for consistency with %%pyproject_install/brp-python-rpm-in-distinfo: +echo rpm > %{buildroot}%{python3_sitelib}/flit_core-%{version}.dist-info/INSTALLER +rm %{buildroot}%{python3_sitelib}/flit_core-%{version}.dist-info/RECORD +%else +%pyproject_install +%endif + +%files -n python3-flit-core +%doc README.rst +%{python3_sitelib}/flit_core-*.dist-info/ +%license %{python3_sitelib}/flit_core-*.dist-info/licenses/LICENSE +%{python3_sitelib}/flit_core/ + +%changelog +%{?autochangelog} diff --git a/SPECS/python-flit_scm/python-flit_scm.spec b/SPECS/python-flit_scm/python-flit_scm.spec new file mode 100644 index 00000000..5ed6ddbd --- /dev/null +++ b/SPECS/python-flit_scm/python-flit_scm.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname flit_scm + +Name: python-%{srcname} +Version: 1.7.0 +Release: %autorelease +License: MIT +URL: https://gitlab.com/WillDaSilva/flit_scm +Summary: PEP 518 build backend that uses setuptools_scm and flit +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +A PEP 518 build backend that uses setuptools_scm to generate a version file +from your version control system, then flit_core to build the package. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-hatch-vcs/python-hatch-vcs.spec b/SPECS/python-hatch-vcs/python-hatch-vcs.spec new file mode 100644 index 00000000..e3cdbd90 --- /dev/null +++ b/SPECS/python-hatch-vcs/python-hatch-vcs.spec @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname hatch_vcs + +Name: python-hatch-vcs +Version: 0.5.0 +Release: %autorelease +Summary: Hatch plugin for versioning with your preferred VCS +License: MIT +URL: https://github.com/ofek/hatch-vcs +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/h/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l hatch_vcs + +BuildRequires: python3-devel +BuildRequires: python3-packaging +BuildRequires: python3-pip +BuildRequires: python3-hatchling +BuildRequires: python3-pluggy +BuildRequires: python3-setuptools_scm +BuildRequires: expat + +%description +This provides a plugin for Hatch that uses your preferred version control +system (like Git) to determine project versions. + +%package -n python3-hatch-vcs +Summary: %{summary} + +%description -n python3-hatch-vcs +This provides a plugin for Hatch that uses your preferred version control +system (like Git) to determine project versions. + +%files -n python3-hatch-vcs -f %{pyproject_files} +%doc README.md +%doc HISTORY.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-hatch_fancy_pypi_readme/python-hatch_fancy_pypi_readme.spec b/SPECS/python-hatch_fancy_pypi_readme/python-hatch_fancy_pypi_readme.spec new file mode 100644 index 00000000..7abdf023 --- /dev/null +++ b/SPECS/python-hatch_fancy_pypi_readme/python-hatch_fancy_pypi_readme.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname hatch_fancy_pypi_readme + +Name: python-%{srcname} +Version: 25.1.0 +Release: %autorelease +License: MIT +URL: https://github.com/hynek/hatch-fancy-pypi-readme +Summary: Fancy PyPI READMEs with Hatch +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/h/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +This hatch plugin allows defining a project description in +terms of concatenated fragments that are based on static strings, files and +parts of files defined using cut-off points or regular expressions. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-hatchling/python-hatchling.spec b/SPECS/python-hatchling/python-hatchling.spec new file mode 100644 index 00000000..ec03a51a --- /dev/null +++ b/SPECS/python-hatchling/python-hatchling.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname hatchling + +Name: python-%{srcname} +Version: 1.27.0 +Release: %autorelease +Summary: The build backend used by Hatch +License: MIT +URL: https://pypi.org/project/hatchling +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/h/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l hatchling + +BuildRequires: python3-devel +BuildRequires: python3-packaging +BuildRequires: python3-pip +BuildRequires: python3-pathspec +BuildRequires: python3-pluggy +BuildRequires: python3-trove-classifiers +BuildRequires: expat + +%description +This is the extensible, standards compliant build backend used by Hatch. + +%package -n python3-hatchling +Summary: %{summary} + +%description -n python3-hatchling +This is the extensible, standards compliant build backend used by Hatch. + +%files -n python3-hatchling -f %{pyproject_files} +%doc README.md +%{_bindir}/hatchling + +%changelog +%{?autochangelog} diff --git a/SPECS/python-idna/python-idna.spec b/SPECS/python-idna/python-idna.spec new file mode 100644 index 00000000..97907868 --- /dev/null +++ b/SPECS/python-idna/python-idna.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname idna + +Name: python-%{srcname} +Version: 3.10 +Release: %autorelease +Summary: Internationalized domain names in applications +License: BSD-3-Clause +URL: https://github.com/kjd/idna +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +%description +This is a library to support the Internationalised Domain Names in +Applications (IDNA) protocol as specified in RFC 5891. This version of the +protocol is often referred to as “IDNA2008” and can produce different results +from the earlier standard from 2003. The library is also intended to act as a +suitable drop-in replacement for the “encodings.idna” module that comes with +the Python standard library but currently only supports the older 2003 +specification. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE.md +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-iniconfig/python-iniconfig.spec b/SPECS/python-iniconfig/python-iniconfig.spec new file mode 100644 index 00000000..94c61b0e --- /dev/null +++ b/SPECS/python-iniconfig/python-iniconfig.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname iniconfig + +Name: python-%{srcname} +Version: 2.1.0 +Release: %autorelease +Summary: Brain-dead simple parsing of ini files +License: MIT +URL: http://github.com/RonnyPfannschmidt/iniconfig +#!RemoteAsset +Source0: %{url}/archive/v%{version}/iniconfig-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pluggy +BuildRequires: python3-hatch-vcs +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: python3-hatchling +BuildRequires: python3-packaging +BuildRequires: python3-pip +BuildRequires: expat + +%description +iniconfig is a small and simple INI-file parser module +having a unique set of features: + +* tested against Python2.4 across to Python3.2, Jython, PyPy +* maintains order of sections and entries +* supports multi-line values with or without line-continuations +* supports "#" comments everywhere +* raises errors with proper line-numbers +* no bells and whistles like automatic substitutions +* iniconfig raises an Error if two sections have the same name. + +%package -n python3-iniconfig +Summary: %{summary} + +%description -n python3-iniconfig +iniconfig is a small and simple INI-file parser module +having a unique set of features: + +* tested against Python2.4 across to Python3.2, Jython, PyPy +* maintains order of sections and entries +* supports multi-line values with or without line-continuations +* supports "#" comments everywhere +* raises errors with proper line-numbers +* no bells and whistles like automatic substitutions +* iniconfig raises an Error if two sections have the same name. + +%prep +%autosetup -p1 -n iniconfig-%{version} + +%generate_buildrequires +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} +%pyproject_buildrequires + +%build +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files -l iniconfig + +%files -n python3-iniconfig -f %{pyproject_files} +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-installer/python-installer.spec b/SPECS/python-installer/python-installer.spec new file mode 100644 index 00000000..bfb99879 --- /dev/null +++ b/SPECS/python-installer/python-installer.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname installer + +Name: python-%{srcname} +Version: 0.7.0 +Release: %autorelease +License: MIT +URL: https://installer.rtfd.io/ +Summary: Installer library for Python wheels +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/i/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: pytest +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +This package provides a low-level library for installing a Python +package from a wheel distribution. It provides basic functionality and +abstractions for handling wheels and installing packages from wheels. + +%generate_buildrequires +%pyproject_buildrequires + +%check -a +%pytest + +%files -f %{pyproject_files} +%license LICENSE +%doc CONTRIBUTING.md README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-jinja2/python-jinja2.spec b/SPECS/python-jinja2/python-jinja2.spec new file mode 100644 index 00000000..008945f5 --- /dev/null +++ b/SPECS/python-jinja2/python-jinja2.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname jinja2 + +Name: python-%{srcname} +Version: 3.1.6 +Release: %autorelease +Summary: General purpose template engine +License: BSD-3-Clause +URL: https://palletsprojects.com/p/jinja/ +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/j/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +%description +Jinja2 is a template engine written in pure Python. It provides a +Django inspired non-XML syntax but supports inline expressions and an +optional sandboxed environment. + +If you have any exposure to other text-based template languages, such +as Smarty or Django, you should feel right at home with Jinja2. It's +both designer and developer friendly by sticking to Python's +principles and adding functionality useful for templating +environments. + +%package -n python3-jinja2 +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: expat + +%description -n python3-jinja2 +Jinja2 is a template engine written in pure Python. It provides a +Django inspired non-XML syntax but supports inline expressions and an +optional sandboxed environment. + +If you have any exposure to other text-based template languages, such +as Smarty or Django, you should feel right at home with Jinja2. It's +both designer and developer friendly by sticking to Python's +principles and adding functionality useful for templating +environments. + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files jinja2 + +%files -n python3-jinja2 -f %{pyproject_files} +%doc README.md +%doc docs/examples +%license LICENSE.txt + +%changelog +%{?autochangelog} diff --git a/SPECS/python-libarchive_c/python-libarchive_c.spec b/SPECS/python-libarchive_c/python-libarchive_c.spec new file mode 100644 index 00000000..fe76da39 --- /dev/null +++ b/SPECS/python-libarchive_c/python-libarchive_c.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname libarchive_c + +Name: python-%{srcname} +Version: 5.3 +Release: %autorelease +License: public-domain +URL: https://github.com/Changaco/python-libarchive-c +Summary: Python interface to libarchive +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildRequires: python3-devel +Requires: libarchive + +BuildSystem: pyproject +BuildOption(install): -l libarchive +auto +%description +This package provides Python bindings to libarchive, a C library to +access possibly compressed archives in many different formats. It uses +Python's @code{ctypes} foreign function interface (FFI). + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-linux-procfs/python-linux-procfs.spec b/SPECS/python-linux-procfs/python-linux-procfs.spec new file mode 100644 index 00000000..0ddb5bbc --- /dev/null +++ b/SPECS/python-linux-procfs/python-linux-procfs.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: python-linux-procfs +Version: 0.7.3 +Release: %autorelease +Summary: Linux /proc abstraction classes +License: GPL-2.0-only +URL: https://rt.wiki.kernel.org/index.php/Tuna +#!RemoteAsset +Source0: https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: expat + +%description +Abstractions to extract information from the Linux kernel /proc files. + +%package -n python3-linux-procfs +Summary: %{summary} +%python_provide python3-linux-procfs +Requires: python3-six + +%description -n python3-linux-procfs +Abstractions to extract information from the Linux kernel /proc files. + +%prep +%autosetup -p1 + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +#rm -rf %{buildroot} +%pyproject_install + +%files -n python3-linux-procfs +%defattr(0755,root,root,0755) +%{_bindir}/pflags +%{python3_sitelib}/procfs/ +%defattr(0644,root,root,0755) +%{python3_sitelib}/python_linux_procfs*.dist-info +%license COPYING + +%changelog +%{?autochangelog} diff --git a/SPECS/python-lxml/python-lxml.spec b/SPECS/python-lxml/python-lxml.spec new file mode 100644 index 00000000..cc73dc2f --- /dev/null +++ b/SPECS/python-lxml/python-lxml.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname lxml + +# We currently don't bundle extra stuff +%bcond extras 0 + +Name: python-%{srcname} +Version: 6.0.1 +Release: %autorelease +Summary: XML processing library combining libxml2/libxslt with the ElementTree API +License: BSD-3-Clause AND GPL-2.0-or-later +URL: https://github.com/lxml/lxml +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildRequires: libxml2-devel +BuildRequires: libxslt-devel +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: expat + +%description +lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It +provides safe and convenient access to these libraries using the ElementTree It +extends the ElementTree API significantly to offer support for XPath, RelaxNG, +XML Schema, XSLT, C14N and much more. + +%package -n python3-lxml +Summary: XML processing library combining libxml2/libxslt with the ElementTree API +%if %{with extras} +Suggests: python3-lxml+cssselect +Suggests: python3-lxml+html5 +Suggests: python3-lxml+htmlsoup +Suggests: python3-lxml+html_clean +%endif + +%description -n python3-lxml +lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It +provides safe and convenient access to these libraries using the ElementTree It +extends the ElementTree API significantly to offer support for XPath, RelaxNG, +XML Schema, XSLT, C14N and much more. + +%if %{with extras} +%pyproject_extras_subpkg -n python3-lxml cssselect html5 htmlsoup html_clean +%endif + +%prep +%autosetup -n lxml-%{version} -p1 + +# Don't run html5lib tests if we are not building with extras +%if %{without extras} +rm src/lxml/html/tests/test_html5parser.py +%endif + +# Remove limit for version of Cython +sed -i "s/Cython.*/Cython/" requirements.txt +sed -i 's/"Cython.*",/"Cython",/' pyproject.toml + +%generate_buildrequires +# If extras are enabled, generate build requirements for them +# Otherwise, generate basic build requirements without extras +%if %{with extras} +%pyproject_buildrequires -e cssselect,html5,htmlsoup,html_clean +%else +%pyproject_buildrequires +%endif + +%build +# Remove pregenerated Cython C sources +# We need to do this after %%pyproject_buildrequires because setup.py errors +# without Cython and without the .c files. +find -type f -name '*.c' -print -delete >&2 +export WITH_CYTHON=true +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files lxml + +%files -n python3-lxml -f %{pyproject_files} +%license doc/licenses/BSD.txt doc/licenses/elementtree.txt +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-mako/python-mako.spec b/SPECS/python-mako/python-mako.spec new file mode 100644 index 00000000..fcb7d934 --- /dev/null +++ b/SPECS/python-mako/python-mako.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global src_version 1_3_10 + +Name: python-mako +Version: 1.3.10 +Release: %autorelease +Summary: Mako template library for Python +License: MIT AND Python-2.0.1 AND BSD-3-Clause +URL: https://www.makotemplates.org/ +#!RemoteAsset +Source0: https://github.com/sqlalchemy/mako/archive/rel_%{src_version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-markupsafe +BuildRequires: expat + +%description +Mako is a template library written in Python. It provides a familiar, non-XML +syntax which compiles into Python modules for maximum performance. Mako's +syntax and API borrows from the best ideas of many others, including Django +templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded +Python (i.e. Python Server Page) language, which refines the familiar ideas of +componentized layout and inheritance to produce one of the most straightforward +and flexible models available, while also maintaining close ties to Python +calling and scoping semantics. + +%package -n python3-mako +Summary: %{summary} +%python_provide python3-mako +Requires: python3-six + +%description -n python3-mako +This package contains the mako module built for use with python3 + +Mako is a template library written in Python. It provides a familiar, non-XML +syntax which compiles into Python modules for maximum performance. Mako's +syntax and API borrows from the best ideas of many others, including Django +templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded +Python (i.e. Python Server Page) language, which refines the familiar ideas of +componentized layout and inheritance to produce one of the most straightforward +and flexible models available, while also maintaining close ties to Python +calling and scoping semantics. + +%prep +%autosetup -p1 -n mako-rel_%(echo %{version} | sed "s/\./_/g") +# the package ends up installed as %%{version}.dev0 otherwise: +sed -i '/tag_build = dev/d' setup.cfg + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +#rm -rf %{buildroot} +%pyproject_install +%pyproject_save_files mako + +mv %{buildroot}/%{_bindir}/mako-render %{buildroot}/%{_bindir}/mako-render-%{python3_version} +ln -s ./mako-render-%{python3_version} %{buildroot}/%{_bindir}/mako-render-3 +ln -s ./mako-render-%{python3_version} %{buildroot}/%{_bindir}/mako-render + +%files -n python3-mako -f %{pyproject_files} +%license LICENSE +%doc CHANGES README.rst examples +%{_bindir}/mako-render +%{_bindir}/mako-render-3 +%{_bindir}/mako-render-%{python3_version} + +%changelog +%{?autochangelog} diff --git a/SPECS/python-markdown/python-markdown.spec b/SPECS/python-markdown/python-markdown.spec new file mode 100644 index 00000000..80b23a50 --- /dev/null +++ b/SPECS/python-markdown/python-markdown.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname markdown + +Name: python-%{srcname} +Version: 3.8.2 +Release: %autorelease +Summary: Markdown implementation in Python +License: BSD-3-Clause +URL: https://python-markdown.github.io/ +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-PyYAML +BuildRequires: expat + +%description +This is a Python implementation of John Gruber’s Markdown. It is +almost completely compliant with the reference implementation, though +there are a few very minor differences. + +%package -n python3-%{srcname} +Summary: %{summary} + +%description -n python3-%{srcname} +This is a Python implementation of John Gruber’s Markdown. It is +almost completely compliant with the reference implementation, though +there are a few very minor differences. + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{srcname} + +# process license file +PYTHONPATH=%{buildroot}%{python3_sitelib} \ + %{buildroot}%{_bindir}/markdown_py \ + LICENSE.md > LICENSE.html + +%files -n python3-%{srcname} -f %{pyproject_files} +# temporarily skip packaging docs - see also +# https://github.com/Python-Markdown/markdown/issues/621 +#doc python3/build/docs/* +%license LICENSE.html LICENSE.md +%{_bindir}/markdown_py + +%changelog +%{?autochangelog} diff --git a/SPECS/python-markupsafe/python-markupsafe.spec b/SPECS/python-markupsafe/python-markupsafe.spec new file mode 100644 index 00000000..c53936a5 --- /dev/null +++ b/SPECS/python-markupsafe/python-markupsafe.spec @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname markupsafe + +Name: python-markupsafe +Version: 3.0.2 +Release: %autorelease +Summary: Implements a XML/HTML/XHTML Markup safe string for Python +License: BSD-3-Clause +URL: https://palletsprojects.com/p/markupsafe/ +#!RemoteAsset +Source0: https://github.com/pallets/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz + +BuildRequires: python3-devel +BuildRequires: expat + +%description +MarkupSafe implements a text object that escapes characters so it is +safe to use in HTML and XML. Characters that have special meanings are +replaced so that they display as the actual characters. This mitigates +injection attacks, meaning untrusted user input can safely be displayed +on a page. + +%package -n python3-markupsafe +Summary: %{summary} + +%description -n python3-markupsafe +MarkupSafe implements a text object that escapes characters so it is +safe to use in HTML and XML. Characters that have special meanings are +replaced so that they display as the actual characters. This mitigates +injection attacks, meaning untrusted user input can safely be displayed +on a page. + +%prep +%autosetup -n markupsafe-%{version} +# Exclude C source from the package: +echo 'global-exclude *.c' >> MANIFEST.in +# Allow older setuptools +sed -i '/setuptools/s/>=.*"/"/' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files markupsafe + +%files -n python3-markupsafe -f %{pyproject_files} +%doc CHANGES.rst README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-mccabe/python-mccabe.spec b/SPECS/python-mccabe/python-mccabe.spec new file mode 100644 index 00000000..001d3cd8 --- /dev/null +++ b/SPECS/python-mccabe/python-mccabe.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname mccabe + +Name: python-%{srcname} +Version: 0.7.0 +Release: %autorelease +License: MIT +URL: https://github.com/PyCQA/mccabe +Summary: McCabe checker, plugin for flake8 +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +This package provides a Flake8 plug-in to compute the McCabe cyclomatic +complexity of Python source code. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-mpmath/python-mpmath.spec b/SPECS/python-mpmath/python-mpmath.spec new file mode 100644 index 00000000..1c854cd1 --- /dev/null +++ b/SPECS/python-mpmath/python-mpmath.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname mpmath + +Name: python-%{srcname} +Version: 1.3.0 +Release: %autorelease +License: BSD-3-Clause +URL: https://mpmath.org +Summary: Arbitrary-precision floating-point arithmetic in python +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pytest +BuildRequires: python3dist(setuptools) >= 40.8 +BuildRequires: python3dist(packaging) +BuildRequires: python3dist(pip) +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +@code{mpmath} can be used as an arbitrary-precision substitute for +Python's float/complex types and math/cmath modules, but also does much +more advanced mathematics. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-packaging/_multibuild b/SPECS/python-packaging/_multibuild new file mode 100644 index 00000000..2eb4fdaf --- /dev/null +++ b/SPECS/python-packaging/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/SPECS/python-packaging/python-packaging.spec b/SPECS/python-packaging/python-packaging.spec new file mode 100644 index 00000000..786758a6 --- /dev/null +++ b/SPECS/python-packaging/python-packaging.spec @@ -0,0 +1,88 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname packaging + +%global flavor @BUILD_FLAVOR@%{nil} +# Set this to 1 to bootstrap. +# This mode is needed, because python3-rpm-generators need packaging +%if "%{flavor}" == "bootstrap" +%bcond bootstrap 1 +%else +%bcond bootstrap 0 +%endif + + +%if %{with bootstrap} +Name: python-%{srcname}-bootstrap +%else +Name: python-%{srcname} +%endif +Version: 25.0 +Release: %autorelease +Summary: Core utilities for Python packages +License: BSD-2-Clause OR Apache-2.0 +URL: https://github.com/pypa/packaging +#!RemoteAsset +Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: unzip + +%if %{with bootstrap} +BuildRequires: python3-flit-core +%endif + +%description +python-packaging provides core utilities for Python packages like utilities for +dealing with versions, specifiers, markers etc. + +%package -n python3-%{srcname} +Summary: %{summary} +%if %{with bootstrap} +Provides: python3dist(packaging) = %{version} +Provides: python%{python3_version}dist(packaging) = %{version} +Requires: python(abi) = %{python3_version} +%endif + +%description -n python3-%{srcname} +python-packaging provides core utilities for Python packages like utilities for +dealing with versions, specifiers, markers etc. + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%if %{without bootstrap} +%generate_buildrequires +%pyproject_buildrequires -r +%endif + +%build +%if %{with bootstrap} +%{python3} -m flit_core.wheel +%else +%pyproject_wheel +%endif + +%install +%if %{with bootstrap} +mkdir -p %{buildroot}%{python3_sitelib} +unzip dist/packaging-%{version}-py3-none-any.whl -d %{buildroot}%{python3_sitelib} -x packaging-%{version}.dist-info/RECORD +echo '%{python3_sitelib}/packaging*' > %{pyproject_files} +%else +%pyproject_install +%pyproject_save_files %{srcname} +%endif + +%files -n python3-%{srcname} -f %{pyproject_files} +%license LICENSE LICENSE.APACHE LICENSE.BSD +%doc README.rst CHANGELOG.rst CONTRIBUTING.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pathspec/python-pathspec.spec b/SPECS/python-pathspec/python-pathspec.spec new file mode 100644 index 00000000..d0720b7d --- /dev/null +++ b/SPECS/python-pathspec/python-pathspec.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pathspec + +Name: python-%{srcname} +Version: 0.12.1 +Release: %autorelease +Summary: Utility library for gitignore style pattern matching of file paths +License: MIT +URL: https://github.com/cpburnz/python-path-specification +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): pathspec + +BuildRequires: python3-devel +BuildRequires: python3-packaging +BuildRequires: python3-pip +BuildRequires: python3-flit-core +BuildRequires: expat + +%generate_buildrequires +%pyproject_buildrequires + +%description +Path Specification (pathspec) is a utility library for pattern matching of file +paths. So far this only includes Git's wildmatch pattern matching which itself +is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. + +%package -n python3-pathspec +Summary: %{summary} + +%description -n python3-pathspec +Path Specification (pathspec) is a utility library for pattern matching of file +paths. So far this only includes Git's wildmatch pattern matching which itself +is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. + +%files -n python3-pathspec -f %{pyproject_files} +%doc README.rst +%license LICENSE + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pdm_backend/python-pdm_backend.spec b/SPECS/python-pdm_backend/python-pdm_backend.spec new file mode 100644 index 00000000..a4c76276 --- /dev/null +++ b/SPECS/python-pdm_backend/python-pdm_backend.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pdm_backend + +Name: python-%{srcname} +Version: 2.4.3 +Release: %autorelease +License: MIT +URL: https://pdm-backend.fming.dev/ +Summary: PEP 517 build backend for PDM +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): pdm +auto +%description +PDM-Backend is a build backend that supports the latest packaging +standards, which includes PEP 517, PEP 621 and PEP 660. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* +%license LICENSE +%changelog +%{?autochangelog} diff --git a/SPECS/python-pip/python-pip.spec b/SPECS/python-pip/python-pip.spec new file mode 100644 index 00000000..6d56d1ec --- /dev/null +++ b/SPECS/python-pip/python-pip.spec @@ -0,0 +1,154 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pip +%global python_wheel_name %{srcname}-%{version}-py3-none-any.whl + +# Set this to 0 if we have proper bash +%bcond bash 1 + +# Virtual provides for the packages bundled by pip. +# You can generate it with: +# %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%%{1}dist' src/pip/_vendor/vendor.txt +%global bundled() %{expand: +Provides: bundled(python%{1}dist(cachecontrol)) = 0.14.2 +Provides: bundled(python%{1}dist(certifi)) = 2025.1.31 +Provides: bundled(python%{1}dist(dependency-groups)) = 1.3.1 +Provides: bundled(python%{1}dist(distlib)) = 0.3.9 +Provides: bundled(python%{1}dist(distro)) = 1.9 +Provides: bundled(python%{1}dist(idna)) = 3.10 +Provides: bundled(python%{1}dist(msgpack)) = 1.1 +Provides: bundled(python%{1}dist(packaging)) = 25 +Provides: bundled(python%{1}dist(platformdirs)) = 4.3.7 +Provides: bundled(python%{1}dist(pygments)) = 2.19.1 +Provides: bundled(python%{1}dist(pyproject-hooks)) = 1.2 +Provides: bundled(python%{1}dist(requests)) = 2.32.3 +Provides: bundled(python%{1}dist(resolvelib)) = 1.1 +Provides: bundled(python%{1}dist(rich)) = 14 +Provides: bundled(python%{1}dist(setuptools)) = 70.3 +Provides: bundled(python%{1}dist(tomli)) = 2.2.1 +Provides: bundled(python%{1}dist(tomli-w)) = 1.2 +Provides: bundled(python%{1}dist(truststore)) = 0.10.1 +Provides: bundled(python%{1}dist(typing-extensions)) = 4.13.2 +Provides: bundled(python%{1}dist(urllib3)) = 1.26.20 +} + +Name: python-%{srcname} +Version: 25.1.1 +Release: %autorelease +Summary: A tool for installing and managing Python packages +License: MIT AND Python-2.0.1 AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) +URL: https://pip.pypa.io/ +#!RemoteAsset +Source0: https://github.com/pypa/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +%undefine _py3_shebang_s + +%description +pip is a package management system used to install and manage software packages +written in Python. Many packages can be found in the Python Package Index +(PyPI). pip is a recursive acronym that can stand for either "Pip Installs +Packages" or "Pip Installs Python". + +%package -n python3-%{srcname} +Summary: A tool for installing and managing Python3 packages +BuildRequires: python3-devel +# python3 bootstrap: this is rebuilt before the final build of python3, which +# adds the dependency on python3-rpm-generators, so we require it manually +# Note that the package prefix is always python3-, even if we build for 3.X +BuildRequires: python3-rpm-generators +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-setuptools +%if %{without bash} +BuildRequires: bash-completion +%endif +BuildRequires: ca-certificates +Requires: ca-certificates +# Virtual provides for the packages bundled by pip: +%{bundled 3} +Provides: pip = %{version}-%{release} + +%description -n python3-%{srcname} +pip is a package management system used to install and manage software packages +written in Python. Many packages can be found in the Python Package Index +(PyPI). pip is a recursive acronym that can stand for either "Pip Installs +Packages" or "Pip Installs Python". + +%package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel +Summary: The pip wheel +Requires: ca-certificates +# Virtual provides for the packages bundled by pip: +%{bundled 3} + +%description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel +A Python wheel of pip to use with venv. + +# We use our own way to build python packages +%prep +%autosetup -p1 -n %{srcname}-%{version} + +# Remove windows executable binaries +rm -v src/pip/_vendor/distlib/*.exe +sed -i '/\.exe/d' pyproject.toml + +# Remove unused test requirements +sed -Ei '/(pytest-(cov|xdist|rerunfailures)|proxy\.py)/d' tests/requirements.txt + +%build +export PYTHONPATH=./src/ +%pyproject_wheel + +%install +export PYTHONPATH=./src/ +%pyproject_install +%pyproject_save_files -l pip + +# Provide symlinks to executables +mv %{buildroot}%{_bindir}/pip %{buildroot}%{_bindir}/pip%{python3_version} +rm %{buildroot}%{_bindir}/pip3 + +%global alternate_names pip-%{python3_version} pip-3 pip3 pip +for pip in %{alternate_names}; do + ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/$pip +done + +%if %{without bash} +mkdir -p %{buildroot}%{bash_completions_dir} +PYTHONPATH=%{buildroot}%{python3_sitelib} \ + %{buildroot}%{_bindir}/pip%{python3_version} completion --bash \ + > %{buildroot}%{bash_completions_dir}/pip%{python3_version} + +# Make bash completion apply to all alternate names symlinks we install +sed -i -e "s/^\\(complete.*\\) pip%{python3_version}\$/\\1 pip%{python3_version} %{alternate_names}/" \ + -e s/_pip_completion/_pip%{python3_version_nodots}_completion/ \ + %{buildroot}%{bash_completions_dir}/pip%{python3_version} +%endif + +mkdir -p %{buildroot}%{python_wheel_dir} +install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} + +%files -n python3-%{srcname} -f %{pyproject_files} +%doc README.rst +%{_bindir}/pip +%{_bindir}/pip3 +%{_bindir}/pip-3 +%{_bindir}/pip%{python3_version} +%{_bindir}/pip-%{python3_version} +%if %{without bash} +%dir %{bash_completions_dir} +%{bash_completions_dir}/pip%{python3_version} +%endif + +%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel +%license LICENSE.txt +# we own the dir for simplicity +%dir %{python_wheel_dir}/ +%{python_wheel_dir}/%{python_wheel_name} + +%changelog +%{?autochangelog} diff --git a/SPECS/python-platformdirs/python-platformdirs.spec b/SPECS/python-platformdirs/python-platformdirs.spec new file mode 100644 index 00000000..00619f28 --- /dev/null +++ b/SPECS/python-platformdirs/python-platformdirs.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname platformdirs + +Name: python-%{srcname} +Version: 4.4.0 +Release: %autorelease +License: MIT +URL: https://github.com/platformdirs/platformdirs +Summary: Determine the appropriate platform-specific directories +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +When writing applications, finding the right location to +store user data and configuration varies per platform. Even for +single-platform apps, there may by plenty of nuances in figuring out the right +location. This small Python module determines the appropriate +platform-specific directories, e.g. the ``user data dir''. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pluggy/python-pluggy.spec b/SPECS/python-pluggy/python-pluggy.spec new file mode 100644 index 00000000..df32fe04 --- /dev/null +++ b/SPECS/python-pluggy/python-pluggy.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pluggy + +Name: python-%{srcname} +Version: 1.6.0 +Release: %autorelease +Summary: The plugin manager stripped of pytest specific details +License: MIT +URL: https://github.com/pytest-dev/pluggy +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): pluggy + +BuildRequires: python3-devel +BuildRequires: python3-packaging +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: python3-setuptools_scm+toml +BuildRequires: expat + +%description +The plugin manager stripped of pytest specific details. + +%package -n python3-pluggy +Summary: %{summary} + +%description -n python3-pluggy +The plugin manager stripped of pytest specific details. + +%files -n python3-pluggy -f %{pyproject_files} +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-poetry_core/python-poetry_core.spec b/SPECS/python-poetry_core/python-poetry_core.spec new file mode 100644 index 00000000..03ce4c8f --- /dev/null +++ b/SPECS/python-poetry_core/python-poetry_core.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname poetry_core + +Name: python-%{srcname} +Version: 2.1.2 +Release: %autorelease +License: MIT +URL: https://github.com/python-poetry/poetry-core +Summary: Poetry PEP 517 build back-end +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): poetry +auto +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +%description +The poetry-core module provides a PEP 517 build back-end +implementation developed for Poetry. This project is intended to be +a light weight, fully compliant, self-contained package allowing PEP 517 +compatible build front-ends to build Poetry managed projects. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-psutil/python-psutil.spec b/SPECS/python-psutil/python-psutil.spec new file mode 100644 index 00000000..b3f8909a --- /dev/null +++ b/SPECS/python-psutil/python-psutil.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname psutil + +Name: python-%{srcname} +Version: 7.0.0 +Release: %autorelease +License: BSD-3-Clause +URL: https://github.com/giampaolo/psutil +Summary: Library for retrieving information on running processes +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: sed +BuildRequires: python3-devel +BuildRequires: pytest +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +@code{psutil} (Python system and process utilities) is a library for +retrieving information on running processes and system utilization (CPU, +memory, disks, network) in Python. It is useful mainly for system monitoring, +profiling and limiting process resources and management of running processes. +It implements many functionalities offered by command line tools such as: ps, +top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, +iotop, uptime, pidof, tty, taskset, pmap. + +%generate_buildrequires +%pyproject_buildrequires + +%check +%pytest + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pycparser/python-pycparser.spec b/SPECS/python-pycparser/python-pycparser.spec new file mode 100644 index 00000000..7f5ff245 --- /dev/null +++ b/SPECS/python-pycparser/python-pycparser.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pycparser + +Name: python-%{srcname} +Version: 2.21 +Release: %autorelease +Summary: C parser in Python +License: BSD-3-Clause +URL: https://github.com/eliben/pycparser +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +%description +Pycparser is a complete parser of the C language, written in pure Python +using the PLY parsing library. It parses C code into an AST and can serve as +a front-end for C compilers or analysis tools. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pyelftools/python-pyelftools.spec b/SPECS/python-pyelftools/python-pyelftools.spec new file mode 100644 index 00000000..7a3e4ad3 --- /dev/null +++ b/SPECS/python-pyelftools/python-pyelftools.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pyelftools + +Name: python-%{srcname} +Version: 0.32 +Release: %autorelease +License: Public-Domain +URL: https://github.com/eliben/pyelftools +Summary: Analyze binary and library file information +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l elftools +auto +%description +This Python library provides interfaces for parsing and analyzing two +binary and library file formats ; the Executable and Linking Format (ELF), and +debugging information in the Debugging With Attributed Record +Format (DWARF). + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pygobject/python-pygobject.spec b/SPECS/python-pygobject/python-pygobject.spec new file mode 100644 index 00000000..a776e710 --- /dev/null +++ b/SPECS/python-pygobject/python-pygobject.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: python-pygobject +%define major_version 3 +%define minor_version 54 +%define patch_version 2 +Version: %{major_version}.%{minor_version}.%{patch_version} +Release: %autorelease +Summary: Python bindings for GObject Introspection +License: LGPL-2.1-or-later +URL: https://wiki.gnome.org/Projects/PyGObject +#!RemoteAsset +Source0: https://download.gnome.org/sources/pygobject/%{major_version}.%{minor_version}/pygobject-%{version}.tar.gz +BuildSystem: meson +BuildOption(conf): -Dpython=%{__python3} +BuildOption(conf): -Dpycairo=disabled + +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(libffi) +BuildRequires: meson +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest + +%description +The %{name} package provides a convenient wrapper for the GObject library +for use in Python programs. + +%package -n python3-pygobject +Summary: Python 3 bindings for GObject Introspection + +%description -n python3-pygobject +The python3-gobject package provides a convenient wrapper for the GObject +library and and other libraries that are compatible with GObject Introspection, +for use in Python 3 programs. + + +%package -n python3-pygobject-devel +Summary: Development files for embedding PyGObject introspection support +Requires: python3-pygobject +Requires: gobject-introspection-devel + +%description -n python3-pygobject-devel +This package contains files required to embed PyGObject + +%files -n python3-pygobject +%license COPYING +%doc NEWS +%dir %{python3_sitearch}/gi/ +%{python3_sitearch}/gi/overrides/ +%{python3_sitearch}/gi/repository/ +%pycached %{python3_sitearch}/gi/*.py +%{python3_sitearch}/gi/_gi.*.so +%{python3_sitearch}/PyGObject-*.dist-info/ +%{python3_sitearch}/pygtkcompat/ + +%files -n python3-pygobject-devel +%dir %{_includedir}/pygobject-3.0/ +%{_includedir}/pygobject-3.0/pygobject.h +%{_libdir}/pkgconfig/pygobject-3.0.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pyparsing/python-pyparsing.spec b/SPECS/python-pyparsing/python-pyparsing.spec new file mode 100644 index 00000000..581323d2 --- /dev/null +++ b/SPECS/python-pyparsing/python-pyparsing.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pyparsing + +Name: python-%{srcname} +Version: 3.2.1 +Release: %autorelease +License: MIT +URL: https://github.com/pyparsing/pyparsing +Summary: Python parsing class library +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +The pyparsing module is an alternative approach to creating and +executing simple grammars, vs. the traditional lex/yacc approach, or the use +of regular expressions. The pyparsing module provides a library of classes +that client code uses to construct the grammar directly in Python code. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pyproject-metadata/python-pyproject-metadata.spec b/SPECS/python-pyproject-metadata/python-pyproject-metadata.spec new file mode 100644 index 00000000..62000930 --- /dev/null +++ b/SPECS/python-pyproject-metadata/python-pyproject-metadata.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pyproject-metadata + +Name: python-%{srcname} +Version: 0.9.1 +Release: %autorelease +Summary: PEP 621 metadata parsing +License: MIT +URL: https://github.com/FFY00/python-pyproject-metadata +#!RemoteAsset +Source0: https://github.com/FFY00/python-pyproject-metadata/archive/refs/tags/%{version}.tar.gz#/pyproject-metadata-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l pyproject_metadata +auto + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +%description +Dataclass for PEP 621 metadata with support for core metadata generation + +This project does not implement the parsing of `pyproject.toml` +containing PEP 621 metadata. + +Instead, given a Python data structure representing PEP 621 metadata (already +parsed), it will validate this input and generate a PEP 643-compliant metadata +file (e.g. `PKG-INFO`). + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pyproject_hooks/python-pyproject_hooks.spec b/SPECS/python-pyproject_hooks/python-pyproject_hooks.spec new file mode 100644 index 00000000..9aac220f --- /dev/null +++ b/SPECS/python-pyproject_hooks/python-pyproject_hooks.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pyproject_hooks + +Name: python-%{srcname} +Version: 1.2.0 +Release: %autorelease +License: MIT +URL: https://github.com/pypa/pyproject-hooks +Summary: Low-level library for calling @file{pyproject.toml} backends +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +@code{pyproject-hooks} is a low-level library for calling build backends +in @file{pyproject.toml}-based projects. It provides basic functionality to +write tooling that generates distribution files from Python projects. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pytest-mock/python-pytest-mock.spec b/SPECS/python-pytest-mock/python-pytest-mock.spec new file mode 100644 index 00000000..654fb8ba --- /dev/null +++ b/SPECS/python-pytest-mock/python-pytest-mock.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pytest-mock + +Name: python-%{srcname} +Version: 3.14.0 +Release: %autorelease +License: MIT +URL: https://github.com/pytest-dev/pytest-mock/ +Summary: Thin-wrapper around the mock package for easier use with py.test +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): pytest_mock +auto +%description +This plugin installs a @code{mocker} fixture which is a thin-wrapper +around the patching API provided by the @code{mock} package, but with the +benefit of not having to worry about undoing patches at the end of a test. +The mocker fixture has the same API as @code{mock.patch}, supporting the +same arguments. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-pytz/python-pytz.spec b/SPECS/python-pytz/python-pytz.spec new file mode 100644 index 00000000..08f73cd0 --- /dev/null +++ b/SPECS/python-pytz/python-pytz.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pytz + +Name: python-%{srcname} +Version: 2025.1 +Release: %autorelease +Summary: Python timezone library +License: MIT +URL: http://pythonhosted.org/pytz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: pyproject-rpm-macros +BuildRequires: tzdata +Requires: tzdata +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto + +%description +This library brings the Olson tz database into Python. It +allows accurate and cross platform timezone calculations using Python 2.4 or +higher. It also solves the issue of ambiguous times at the end of daylight +saving time. Almost all of the Olson timezones are supported. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE.txt +%doc README* +%changelog +%{?autochangelog} diff --git a/SPECS/python-pyudev/python-pyudev.spec b/SPECS/python-pyudev/python-pyudev.spec new file mode 100644 index 00000000..a4404799 --- /dev/null +++ b/SPECS/python-pyudev/python-pyudev.spec @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname pyudev + +Name: python-%{srcname} +Version: 0.24.3 +Release: %autorelease +Summary: A libudev binding +License: LGPL-2.1-or-later +URL: https://pypi.python.org/pypi/pyudev +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: expat + +%description +pyudev is a LGPL licensed, pure Python binding for libudev, the device +and hardware management and information library for Linux. It supports +almost all libudev functionality, you can enumerate devices, query device +properties and attributes or monitor devices, including asynchronous +monitoring with threads, or within the event loops of Qt, Glib or wxPython. +The binding supports CPython 3 and PyPy. + +%package -n python3-%{srcname} +Summary: A libudev binding +BuildRequires: python3-devel +# Needed for libudev, loaded through ctypes +Requires: systemd-libs + +%description -n python3-%{srcname} +pyudev is a LGPL licensed, pure Python binding for libudev, the device +and hardware management and information library for Linux. It supports +almost all libudev functionality, you can enumerate devices, query device +properties and attributes or monitor devices, including asynchronous +monitoring with threads, or within the event loops of Qt, Glib or wxPython. +The binding supports CPython 3 and PyPy. + +%prep +%autosetup -n %{srcname}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install + +%files -n python3-%{srcname} +%license COPYING +%doc README.rst +%{python3_sitelib}/pyudev +%{python3_sitelib}/pyudev-%{version}.dist-info +%exclude %{python3_sitelib}/pyudev/glib.py +%exclude %{python3_sitelib}/pyudev/__pycache__/glib.* +%exclude %{python3_sitelib}/pyudev/pyqt4.py +%exclude %{python3_sitelib}/pyudev/__pycache__/pyqt4.* +%exclude %{python3_sitelib}/pyudev/pyqt5.py +%exclude %{python3_sitelib}/pyudev/__pycache__/pyqt5.* +%exclude %{python3_sitelib}/pyudev/pyside.py +%exclude %{python3_sitelib}/pyudev/__pycache__/pyside.* +%exclude %{python3_sitelib}/pyudev/wx.py +%exclude %{python3_sitelib}/pyudev/__pycache__/wx.* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-requests/python-requests.spec b/SPECS/python-requests/python-requests.spec new file mode 100644 index 00000000..4a988b45 --- /dev/null +++ b/SPECS/python-requests/python-requests.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname requests + +Name: python-%{srcname} +Version: 2.32.5 +Release: %autorelease +License: Apache-2.0 +URL: https://requests.readthedocs.io/ +Summary: Python HTTP library +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +Requests is a Python HTTP client library. It aims to be easier to use +than Python’s urllib2 library. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-resolvelib/python-resolvelib.spec b/SPECS/python-resolvelib/python-resolvelib.spec new file mode 100644 index 00000000..fcdce7b7 --- /dev/null +++ b/SPECS/python-resolvelib/python-resolvelib.spec @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname resolvelib + +Name: python-%{srcname} +Version: 1.1.0 +Release: %autorelease +License: ISC +URL: https://github.com/sarugaku/resolvelib +Summary: Abstract dependencies resolver +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +The ResolveLib library provides a @code{Resolver} class that includes +dependency resolution logic. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-rpm-generators/COPYING b/SPECS/python-rpm-generators/COPYING new file mode 100644 index 00000000..3ffa0ab9 --- /dev/null +++ b/SPECS/python-rpm-generators/COPYING @@ -0,0 +1,842 @@ +RPM and it's source code are covered under two separate licenses. + +The entire code base may be distributed under the terms of the GNU General +Public License (GPL), which appears immediately below. Alternatively, +all of the source code in the lib subdirectory of the RPM source code +distribution as well as any code derived from that code may instead be +distributed under the GNU Library General Public License (LGPL), at the +choice of the distributor. The complete text of the LGPL appears +at the bottom of this file. + +This alternatively is allowed to enable applications to be linked against +the RPM library (commonly called librpm) without forcing such applications +to be distributed under the GPL. + +Any questions regarding the licensing of RPM should be addressed to +rpm-maint@lists.rpm.org + +--------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE 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. + + 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 +convey 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) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + 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, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision 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, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This 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 Library General +Public License instead of this License. + +--------------------------------------------------------------------------- + + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey 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 library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/SPECS/python-rpm-generators/python-rpm-generators.spec b/SPECS/python-rpm-generators/python-rpm-generators.spec new file mode 100644 index 00000000..3553311e --- /dev/null +++ b/SPECS/python-rpm-generators/python-rpm-generators.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: python-rpm-generators +Version: 14 +Release: %autorelease +Summary: Dependency generators for Python RPMs +License: GPL-2.0-or-later AND LGPL-2.1-or-later AND (LicenseRef-Fedora-Public-Domain OR LGPL-2.1-or-later OR GPL-2.0-or-later) +# I know... +URL: https://src.fedoraproject.org/rpms/python-rpm-generators +Source0: COPYING +Source1: python.attr +Source2: pythondist.attr +Source3: pythonname.attr +Source4: pythondistdeps.py +Source5: pythonbundles.py +BuildArch: noarch + +%description +%{summary}. + +%package -n python3-rpm-generators +Summary: %{summary} +Requires: python3-packaging +Requires: rpm +Requires: python-srpm-macros + +%description -n python3-rpm-generators +%{summary}. + +%prep +%autosetup -c -T +cp -a %{sources} . + +%install +install -Dpm0644 -t %{buildroot}%{_fileattrsdir} *.attr +install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} *.py + +%files -n python3-rpm-generators +%license COPYING +%{_fileattrsdir}/python.attr +%{_fileattrsdir}/pythondist.attr +%{_fileattrsdir}/pythonname.attr +%{_rpmconfigdir}/pythondistdeps.py +%{_rpmconfigdir}/pythonbundles.py + +%changelog +%{?autochangelog} diff --git a/SPECS/python-rpm-generators/python.attr b/SPECS/python-rpm-generators/python.attr new file mode 100644 index 00000000..cf5ae390 --- /dev/null +++ b/SPECS/python-rpm-generators/python.attr @@ -0,0 +1,31 @@ +%__python_provides() %{lua: + -- Match buildroot/payload paths of the form + -- /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR + -- generating a line of the form + -- python(abi) = MAJOR.MINOR + -- (Don't match against -config tools e.g. /usr/bin/python2.6-config) + local path = rpm.expand('%1') + -- Use /usr prefix by default, and /app for flatpak builds + local prefix = rpm.expand('%{?!flatpak:/usr}%{?flatpak:/app}') + if path:match(prefix .. '/bin/python%d+%.%d+$') then + local provides = path:gsub('.*' .. prefix .. '/bin/python(%d+%.%d+)', 'python(abi) = %1') + print(provides) + end +} + +%__python_requires() %{lua: + -- Match buildroot paths of the form + -- /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and + -- /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ + -- generating a line of the form: + -- python(abi) = MAJOR.MINOR + local path = rpm.expand('%1') + -- Use /usr prefix by default, and /app for flatpak builds + local prefix = rpm.expand('%{?!flatpak:/usr}%{?flatpak:/app}') + if path:match(prefix .. '/lib%d*/python%d+%.%d+/.*') then + local requires = path:gsub('.*' .. prefix .. '/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1') + print(requires) + end +} + +%__python_path ^((%{?!flatpak:/usr}%{?flatpak:/app}/lib(64)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$ diff --git a/SPECS/python-rpm-generators/pythonbundles.py b/SPECS/python-rpm-generators/pythonbundles.py new file mode 100644 index 00000000..b0e5ecf6 --- /dev/null +++ b/SPECS/python-rpm-generators/pythonbundles.py @@ -0,0 +1,94 @@ +#!/usr/bin/python3 -sB +# (imports pythondistdeps from /usr/lib/rpm, hence -B) +# +# This program is free software. +# +# It is placed in the public domain or under the CC0-1.0-Universal license, +# whichever you choose. +# +# Alternatively, it may be redistributed and/or modified under the terms of +# the LGPL version 2.1 (or later) or GPL version 2 (or later). +# +# Use this script to generate bundled provides, e.g.: +# ./pythonbundles.py setuptools-47.1.1/pkg_resources/_vendor/vendored.txt + +import pathlib +import sys + +from packaging import requirements + +import pythondistdeps + +def generate_bundled_provides(paths, namespace): + provides = set() + + for path in paths: + for line in path.read_text().splitlines(): + line, _, comment = line.partition('#') + if comment.startswith('egg='): + # not a real comment + # e.g. git+https://github.com/monty/spam.git@master#egg=spam&... + egg, *_ = comment.strip().partition(' ') + egg, *_ = egg.strip().partition('&') + name = pythondistdeps.normalize_name(egg[4:]) + provides.add(f'Provides: bundled({namespace}({name}))') + continue + line = line.strip() + if line: + requirement = requirements.Requirement(line) + for spec in requirement.specifier: + if spec.operator == '==': + version = spec.version + break + else: + raise ValueError('pythonbundles.py only handles exactly one == requirement') + name = pythondistdeps.normalize_name(requirement.name) + bundled_name = f"bundled({namespace}({name}))" + python_provide = pythondistdeps.convert(bundled_name, '==', version) + provides.add(f'Provides: {python_provide}') + + return provides + + +def compare(expected, given): + stripped = (l.strip() for l in given) + no_comments = set(l for l in stripped if not l.startswith('#')) + no_comments.discard('') + if expected == no_comments: + return True + extra_expected = expected - no_comments + extra_given = no_comments - expected + if extra_expected: + print('Missing expected provides:', file=sys.stderr) + for provide in sorted(extra_expected): + print(f' - {provide}', file=sys.stderr) + if extra_given: + print('Redundant unexpected provides:', file=sys.stderr) + for provide in sorted(extra_given): + print(f' + {provide}', file=sys.stderr) + return False + + +if __name__ == '__main__': + import argparse + + parser = argparse.ArgumentParser(prog=sys.argv[0], + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('vendored', metavar='VENDORED.TXT', nargs='+', type=pathlib.Path, + help='Upstream information about vendored libraries') + parser.add_argument('-c', '--compare-with', action='store', + help='A string value to compare with and verify') + parser.add_argument('-n', '--namespace', action='store', + help='What namespace of provides will used', default='python3dist') + args = parser.parse_args() + + provides = generate_bundled_provides(args.vendored, args.namespace) + + if args.compare_with: + given = args.compare_with.splitlines() + same = compare(provides, given) + if not same: + sys.exit(1) + else: + for provide in sorted(provides): + print(provide) diff --git a/SPECS/python-rpm-generators/pythondist.attr b/SPECS/python-rpm-generators/pythondist.attr new file mode 100644 index 00000000..ede3a515 --- /dev/null +++ b/SPECS/python-rpm-generators/pythondist.attr @@ -0,0 +1,3 @@ +%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --normalized-names-format pep503 --package-name %{name} --majorver-provides-versions %{__default_python3_version} %{?!_python_dist_allow_version_zero:--fail-if-zero} +%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires --normalized-names-format pep503 --package-name %{name} %{?!_python_no_extras_requires:--require-extras-subpackages} --console-scripts-nodep-setuptools-since 3.10 +%__pythondist_path ^%{?!flatpak:/usr}%{?flatpak:/app}/lib(64)?/python[3-9]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$ diff --git a/SPECS/python-rpm-generators/pythondistdeps.py b/SPECS/python-rpm-generators/pythondistdeps.py new file mode 100644 index 00000000..14ef016f --- /dev/null +++ b/SPECS/python-rpm-generators/pythondistdeps.py @@ -0,0 +1,625 @@ +#!/usr/bin/python3 -s +# -*- coding: utf-8 -*- +# +# Copyright 2010 Per Øyvind Karlsen +# Copyright 2015 Neal Gompa +# Copyright 2020 SUSE LLC +# +# This program is free software. It may be redistributed and/or modified under +# the terms of the LGPL version 2.1 (or later). +# +# RPM python dependency generator, using .egg-info/.egg-link/.dist-info data +# + +from __future__ import print_function +import argparse +from os.path import dirname, sep +import re +from sys import argv, stdin, stderr, version_info +from sysconfig import get_path +from warnings import warn + +from packaging.requirements import Requirement as Requirement_ +from packaging.version import parse +import packaging.markers + +# Monkey patching packaging.markers to handle extras names in a +# case-insensitive manner: +# pip considers dnspython[DNSSEC] and dnspython[dnssec] to be equal, but +# packaging markers treat extras in a case-sensitive manner. To solve this +# issue, we introduce a comparison operator that compares case-insensitively +# if both sides of the comparison are strings. And then we inject this +# operator into packaging.markers to be used when comparing names of extras. +# Upstream issue: https://discuss.python.org/t/what-extras-names-are-treated-as-equal-and-why/7614 +# - After it's established upstream what is the canonical form of an extras +# name, we plan to open an issue with packaging to hopefully solve this +# there without having to resort to monkeypatching. +def str_lower_eq(a, b): + if isinstance(a, str) and isinstance(b, str): + return a.lower() == b.lower() + else: + return a == b +packaging.markers._operators["=="] = str_lower_eq + +try: + from importlib.metadata import PathDistribution +except ImportError: + from importlib_metadata import PathDistribution + +try: + from pathlib import Path +except ImportError: + from pathlib2 import Path + + +def normalize_name(name): + """https://www.python.org/dev/peps/pep-0503/#normalized-names""" + return re.sub(r'[-_.]+', '-', name).lower() + + +def legacy_normalize_name(name): + """Like pkg_resources Distribution.key property""" + return re.sub(r'[-_]+', '-', name).lower() + + +class Requirement(Requirement_): + def __init__(self, requirement_string): + super(Requirement, self).__init__(requirement_string) + self.normalized_name = normalize_name(self.name) + self.legacy_normalized_name = legacy_normalize_name(self.name) + + +class Distribution(PathDistribution): + def __init__(self, path): + super(Distribution, self).__init__(Path(path)) + + # Check that the initialization went well and metadata are not missing or corrupted + # name is the most important attribute, if it doesn't exist, import failed + if not self.name or not isinstance(self.name, str): + print("*** PYTHON_METADATA_FAILED_TO_PARSE_ERROR___SEE_STDERR ***") + print('Error: Python metadata at `{}` are missing or corrupted.'.format(path), file=stderr) + exit(65) # os.EX_DATAERR + + self.normalized_name = normalize_name(self.name) + self.legacy_normalized_name = legacy_normalize_name(self.name) + self.requirements = [Requirement(r) for r in self.requires or []] + self.extras = [ + v.lower() for k, v in self.metadata.items() if k == 'Provides-Extra'] + self.py_version = self._parse_py_version(path) + + # `name` is defined as a property exactly like this in Python 3.10 in the + # PathDistribution class. Due to that we can't redefine `name` as a normal + # attribute. So we copied the Python 3.10 definition here into the code so + # that it works also on previous Python/importlib_metadata versions. + @property + def name(self): + """Return the 'Name' metadata for the distribution package or None.""" + return self.metadata.get('Name') + + def _parse_py_version(self, path): + # Try to parse the Python version from the path the metadata + # resides at (e.g. /usr/lib/pythonX.Y/site-packages/...) + res = re.search(r"/python(?P\d+\.\d+)/", path) + if res: + return res.group('pyver') + # If that hasn't worked, attempt to parse it from the metadata + # directory name + res = re.search(r"-py(?P\d+.\d+)[.-]egg-info$", path) + if res: + return res.group('pyver') + return None + + def requirements_for_extra(self, extra): + extra_deps = [] + # we are only interested in dependencies with extra == 'our_extra' marker + for req in self.requirements: + # no marker at all, nothing to evaluate + if not req.marker: + continue + # does the marker include extra == 'our_extra'? + # we can only evaluate the marker as a whole, + # so we evaluate it twice (using 2 different marker_envs) + # and see if it only evaluates to True with our extra + if (req.marker.evaluate(get_marker_env(self, extra)) and + not req.marker.evaluate(get_marker_env(self, None))): + extra_deps.append(req) + return extra_deps + + def __repr__(self): + return '{} from {}'.format(self.name, self._path) + + +class RpmVersion(): + def __init__(self, version_id): + version = parse(version_id) + if isinstance(version._version, str): + self.version = version._version + else: + self.epoch = version._version.epoch + self.version = list(version._version.release) + self.pre = version._version.pre + self.dev = version._version.dev + self.post = version._version.post + # version.local is ignored as it is not expected to appear + # in public releases + # https://www.python.org/dev/peps/pep-0440/#local-version-identifiers + + def is_legacy(self): + return isinstance(self.version, str) + + def increment(self): + self.version[-1] += 1 + self.pre = None + self.dev = None + self.post = None + return self + + def is_zero(self): + return self.__str__() == '0' + + def __str__(self): + if self.is_legacy(): + return self.version + if self.epoch: + rpm_epoch = str(self.epoch) + ':' + else: + rpm_epoch = '' + while len(self.version) > 1 and self.version[-1] == 0: + self.version.pop() + rpm_version = '.'.join(str(x) for x in self.version) + if self.pre: + rpm_suffix = '~{}'.format(''.join(str(x) for x in self.pre)) + elif self.dev: + rpm_suffix = '~~{}'.format(''.join(str(x) for x in self.dev)) + elif self.post: + rpm_suffix = '^post{}'.format(self.post[1]) + else: + rpm_suffix = '' + return '{}{}{}'.format(rpm_epoch, rpm_version, rpm_suffix) + + +def convert_compatible(name, operator, version_id): + if version_id.endswith('.*'): + print("*** INVALID_REQUIREMENT_ERROR___SEE_STDERR ***") + print('Invalid requirement: {} {} {}'.format(name, operator, version_id), file=stderr) + exit(65) # os.EX_DATAERR + version = RpmVersion(version_id) + if version.is_legacy(): + # LegacyVersions are not supported in this context + print("*** INVALID_REQUIREMENT_ERROR___SEE_STDERR ***") + print('Invalid requirement: {} {} {}'.format(name, operator, version_id), file=stderr) + exit(65) # os.EX_DATAERR + if len(version.version) == 1: + print("*** INVALID_REQUIREMENT_ERROR___SEE_STDERR ***") + print('Invalid requirement: {} {} {}'.format(name, operator, version_id), file=stderr) + exit(65) # os.EX_DATAERR + upper_version = RpmVersion(version_id) + upper_version.version.pop() + upper_version.increment() + return '({} >= {} with {} < {})'.format( + name, version, name, upper_version) + + +def convert_equal(name, operator, version_id): + if version_id.endswith('.*'): + version_id = version_id[:-2] + '.0' + return convert_compatible(name, '~=', version_id) + version = RpmVersion(version_id) + return '{} = {}'.format(name, version) + + +def convert_arbitrary_equal(name, operator, version_id): + if version_id.endswith('.*'): + print("*** INVALID_REQUIREMENT_ERROR___SEE_STDERR ***") + print('Invalid requirement: {} {} {}'.format(name, operator, version_id), file=stderr) + exit(65) # os.EX_DATAERR + version = RpmVersion(version_id) + return '{} = {}'.format(name, version) + + +def convert_not_equal(name, operator, version_id): + if version_id.endswith('.*'): + version_id = version_id[:-2] + version = RpmVersion(version_id) + if version.is_legacy(): + # LegacyVersions are not supported in this context + print("*** INVALID_REQUIREMENT_ERROR___SEE_STDERR ***") + print('Invalid requirement: {} {} {}'.format(name, operator, version_id), file=stderr) + exit(65) # os.EX_DATAERR + version_gt = RpmVersion(version_id).increment() + version_gt_operator = '>=' + # Prevent dev and pre-releases from satisfying a < requirement + version = '{}~~'.format(version) + else: + version = RpmVersion(version_id) + version_gt = version + version_gt_operator = '>' + return '({} < {} or {} {} {})'.format( + name, version, name, version_gt_operator, version_gt) + + +def convert_ordered(name, operator, version_id): + if version_id.endswith('.*'): + # PEP 440 does not define semantics for prefix matching + # with ordered comparisons + # see: https://github.com/pypa/packaging/issues/320 + # and: https://github.com/pypa/packaging/issues/321 + # This style of specifier is officially "unsupported", + # even though it is processed. Support may be removed + # in version 21.0. + version_id = version_id[:-2] + version = RpmVersion(version_id) + if operator == '>': + # distutils will allow a prefix match with '>' + operator = '>=' + if operator == '<=': + # distutils will not allow a prefix match with '<=' + operator = '<' + else: + version = RpmVersion(version_id) + # For backwards compatibility, fallback to previous behavior with LegacyVersions + if not version.is_legacy(): + # Prevent dev and pre-releases from satisfying a < requirement + if operator == '<' and not version.pre and not version.dev and not version.post: + version = '{}~~'.format(version) + # Prevent post-releases from satisfying a > requirement + if operator == '>' and not version.pre and not version.dev and not version.post: + version = '{}.0'.format(version) + return '{} {} {}'.format(name, operator, version) + + +OPERATORS = {'~=': convert_compatible, + '==': convert_equal, + '===': convert_arbitrary_equal, + '!=': convert_not_equal, + '<=': convert_ordered, + '<': convert_ordered, + '>=': convert_ordered, + '>': convert_ordered} + + +def convert(name, operator, version_id): + try: + return OPERATORS[operator](name, operator, version_id) + except Exception as exc: + raise RuntimeError("Cannot process Python package version `{}` for name `{}`". + format(version_id, name)) from exc + + +def get_marker_env(dist, extra): + # packaging uses a default environment using + # platform.python_version to evaluate if a dependency is relevant + # based on environment markers [1], + # e.g. requirement `argparse;python_version<"2.7"` + # + # Since we're running this script on one Python version while + # possibly evaluating packages for different versions, we + # set up an environment with the version we want to evaluate. + # + # [1] https://www.python.org/dev/peps/pep-0508/#environment-markers + return {"python_full_version": dist.py_version, + "python_version": dist.py_version, + "extra": extra} + + +def main(): + """To allow this script to be importable (and its classes/functions + reused), actions are defined in the main function and are performed only + when run as a main script.""" + parser = argparse.ArgumentParser(prog=argv[0]) + group = parser.add_mutually_exclusive_group(required=True) + group.add_argument('-P', '--provides', action='store_true', help='Print Provides') + group.add_argument('-R', '--requires', action='store_true', help='Print Requires') + group.add_argument('-r', '--recommends', action='store_true', help='Print Recommends') + group.add_argument('-C', '--conflicts', action='store_true', help='Print Conflicts') + group.add_argument('-E', '--extras', action='store_true', help='[Unused] Generate spec file snippets for extras subpackages') + group_majorver = parser.add_mutually_exclusive_group() + group_majorver.add_argument('-M', '--majorver-provides', action='store_true', help='Print extra Provides with Python major version only') + group_majorver.add_argument('--majorver-provides-versions', action='append', + help='Print extra Provides with Python major version only for listed ' + 'Python VERSIONS (appended or comma separated without spaces, e.g. 2.7,3.9)') + parser.add_argument('-m', '--majorver-only', action='store_true', help='Print Provides/Requires with Python major version only') + parser.add_argument('-n', '--normalized-names-format', action='store', + default="legacy-dots", choices=["pep503", "legacy-dots"], + help='Format of normalized names according to pep503 or legacy format that allows dots [default]') + parser.add_argument('--normalized-names-provide-both', action='store_true', + help='Provide both `pep503` and `legacy-dots` format of normalized names (useful for a transition period)') + parser.add_argument('-L', '--legacy-provides', action='store_true', help='Print extra legacy pythonegg Provides') + parser.add_argument('-l', '--legacy', action='store_true', help='Print legacy pythonegg Provides/Requires instead') + parser.add_argument('--console-scripts-nodep-setuptools-since', action='store', + help='An optional Python version (X.Y), at least 3.8. ' + 'For that version and any newer version, ' + 'a dependency on "setuptools" WILL NOT be generated for packages with console_scripts/gui_scripts entry points. ' + 'By setting this flag, you guarantee that setuptools >= 47.2.0 is used ' + 'during the build of packages for this and any newer Python version.') + parser.add_argument('--require-extras-subpackages', action='store_true', + help="If there is a dependency on a package with extras functionality, require the extras subpackage") + parser.add_argument('--package-name', action='store', help="Name of the RPM package that's being inspected. Required for extras requires/provides to work.") + parser.add_argument('--namespace', action='store', help="Namespace for the printed Requires, Provides, Recommends and Conflicts") + parser.add_argument('--fail-if-zero', action='store_true', help='Fail the script if the automatically generated Provides version was 0, which usually indicates a packaging error.') + parser.add_argument('files', nargs=argparse.REMAINDER, help="Files from the RPM package that are to be inspected, can also be supplied on stdin") + args = parser.parse_args() + + if args.fail_if_zero and not args.provides: + raise parser.error('--fail-if-zero only works with --provides') + + py_abi = args.requires + py_deps = {} + + if args.majorver_provides_versions: + # Go through the arguments (can be specified multiple times), + # and parse individual versions (can be comma-separated) + args.majorver_provides_versions = [v for vstring in args.majorver_provides_versions + for v in vstring.split(",")] + + # If normalized_names_require_pep503 is True we require the pep503 + # normalized name, if it is False we provide the legacy normalized name + normalized_names_require_pep503 = args.normalized_names_format == "pep503" + + # If normalized_names_provide_pep503/legacy is True we provide the + # pep503/legacy normalized name, if it is False we don't + normalized_names_provide_pep503 = \ + args.normalized_names_format == "pep503" or args.normalized_names_provide_both + normalized_names_provide_legacy = \ + args.normalized_names_format == "legacy-dots" or args.normalized_names_provide_both + + # At least one type of normalization must be provided + assert normalized_names_provide_pep503 or normalized_names_provide_legacy + + if args.console_scripts_nodep_setuptools_since: + nodep_setuptools_pyversion = parse(args.console_scripts_nodep_setuptools_since) + if nodep_setuptools_pyversion < parse("3.8"): + print("Only version 3.8+ is supported in --console-scripts-nodep-setuptools-since", file=stderr) + print("*** PYTHON_EXTRAS_ARGUMENT_ERROR___SEE_STDERR ***") + exit(65) # os.EX_DATAERR + else: + nodep_setuptools_pyversion = None + + # Is this script being run for an extras subpackage? + extras_subpackage = None + if args.package_name and '+' in args.package_name: + # The extras names are encoded in the package names after the + sign. + # We take the part after the rightmost +, ignoring when empty, + # this allows packages like nicotine+ or c++ to work fine. + # While packages with names like +spam or foo+bar would break, + # names started with the plus sign are not very common + # and pluses in the middle can be easily replaced with dashes. + # Python extras names don't contain pluses according to PEP 508. + package_name_parts = args.package_name.rpartition('+') + extras_subpackage = package_name_parts[2].lower() or None + + namespace = (args.namespace + "({})") if args.namespace else "{}" + + for f in (args.files or stdin.readlines()): + f = f.strip() + lower = f.lower() + name = 'python(abi)' + # add dependency based on path, versioned if within versioned python directory + if py_abi and (lower.endswith('.py') or lower.endswith('.pyc') or lower.endswith('.pyo')): + if name not in py_deps: + py_deps[name] = [] + running_python_version = '{}.{}'.format(*version_info[:2]) + purelib = get_path('purelib').split(running_python_version)[0] + platlib = get_path('platlib').split(running_python_version)[0] + for lib in (purelib, platlib): + if lib in f: + spec = ('==', f.split(lib)[1].split(sep)[0]) + if spec not in py_deps[name]: + py_deps[name].append(spec) + + # XXX: hack to workaround RPM internal dependency generator not passing directories + lower_dir = dirname(lower) + if lower_dir.endswith('.egg') or \ + lower_dir.endswith('.egg-info') or \ + lower_dir.endswith('.dist-info'): + lower = lower_dir + f = dirname(f) + # Determine provide, requires, conflicts & recommends based on egg/dist metadata + if lower.endswith('.egg') or \ + lower.endswith('.egg-info') or \ + lower.endswith('.dist-info'): + dist = Distribution(f) + if not dist.py_version: + warn("Version for {!r} has not been found".format(dist), RuntimeWarning) + continue + + # If processing an extras subpackage: + # Check that the extras name is declared in the metadata, or + # that there are some dependencies associated with the extras + # name in the requires.txt (this is an outdated way to declare + # extras packages). + # - If there is an extras package declared only in requires.txt + # without any dependencies, this check will fail. In that case + # make sure to use updated metadata and declare the extras + # package there. + if extras_subpackage and extras_subpackage not in dist.extras and not dist.requirements_for_extra(extras_subpackage): + print("*** PYTHON_EXTRAS_NOT_FOUND_ERROR___SEE_STDERR ***") + print(f"\nError: The package name contains an extras name `{extras_subpackage}` that was not found in the metadata.\n" + "Check if the extras were removed from the project. If so, consider removing the subpackage and obsoleting it from another.\n", file=stderr) + exit(65) # os.EX_DATAERR + + if args.majorver_provides or args.majorver_provides_versions or \ + args.majorver_only or args.legacy_provides or args.legacy: + # Get the Python major version + pyver_major = dist.py_version.split('.')[0] + if args.provides: + extras_suffix = f"[{extras_subpackage}]" if extras_subpackage else "" + # If egg/dist metadata says package name is python, we provide python(abi) + if dist.normalized_name == 'python': + name = namespace.format('python(abi)') + if name not in py_deps: + py_deps[name] = [] + py_deps[name].append(('==', dist.py_version)) + if not args.legacy or not args.majorver_only: + if normalized_names_provide_legacy: + name = namespace.format('python{}dist({}{})').format(dist.py_version, dist.legacy_normalized_name, extras_suffix) + if name not in py_deps: + py_deps[name] = [] + if normalized_names_provide_pep503: + name_ = namespace.format('python{}dist({}{})').format(dist.py_version, dist.normalized_name, extras_suffix) + if name_ not in py_deps: + py_deps[name_] = [] + if args.majorver_provides or args.majorver_only or \ + (args.majorver_provides_versions and dist.py_version in args.majorver_provides_versions): + if normalized_names_provide_legacy: + pymajor_name = namespace.format('python{}dist({}{})').format(pyver_major, dist.legacy_normalized_name, extras_suffix) + if pymajor_name not in py_deps: + py_deps[pymajor_name] = [] + if normalized_names_provide_pep503: + pymajor_name_ = namespace.format('python{}dist({}{})').format(pyver_major, dist.normalized_name, extras_suffix) + if pymajor_name_ not in py_deps: + py_deps[pymajor_name_] = [] + if args.legacy or args.legacy_provides: + legacy_name = namespace.format('pythonegg({})({})').format(pyver_major, dist.legacy_normalized_name) + if legacy_name not in py_deps: + py_deps[legacy_name] = [] + if dist.version: + version = dist.version + spec = ('==', version) + if args.fail_if_zero: + if RpmVersion(version).is_zero(): + print('*** PYTHON_PROVIDED_VERSION_NORMALIZES_TO_ZERO___SEE_STDERR ***') + print(f'\nError: The version in the Python package metadata {version} normalizes to zero.\n' + 'It\'s likely a packaging error caused by missing version information\n' + '(e.g. when using a version control system snapshot as a source).\n' + 'Try providing the version information manually when building the Python package,\n' + 'for example by setting the SETUPTOOLS_SCM_PRETEND_VERSION environment variable if the package uses setuptools_scm.\n' + 'If you are confident that the version of the Python package is intentionally zero,\n' + 'you may %define the _python_dist_allow_version_zero macro in the spec file to disable this check.\n', file=stderr) + exit(65) # os.EX_DATAERR + + if normalized_names_provide_legacy: + if spec not in py_deps[name]: + py_deps[name].append(spec) + if args.majorver_provides or \ + (args.majorver_provides_versions and dist.py_version in args.majorver_provides_versions): + py_deps[pymajor_name].append(spec) + if normalized_names_provide_pep503: + if spec not in py_deps[name_]: + py_deps[name_].append(spec) + if args.majorver_provides or \ + (args.majorver_provides_versions and dist.py_version in args.majorver_provides_versions): + py_deps[pymajor_name_].append(spec) + if args.legacy or args.legacy_provides: + if spec not in py_deps[legacy_name]: + py_deps[legacy_name].append(spec) + if args.requires or (args.recommends and dist.extras): + name = namespace.format('python(abi)') + # If egg/dist metadata says package name is python, we don't add dependency on python(abi) + if dist.normalized_name == 'python': + py_abi = False + if name in py_deps: + py_deps.pop(name) + elif py_abi and dist.py_version: + if name not in py_deps: + py_deps[name] = [] + spec = ('==', dist.py_version) + if spec not in py_deps[name]: + py_deps[name].append(spec) + + if extras_subpackage: + deps = [d for d in dist.requirements_for_extra(extras_subpackage)] + else: + deps = dist.requirements + + # console_scripts/gui_scripts entry points needed pkg_resources from setuptools + # on new Python/setuptools versions, this is no longer required + if nodep_setuptools_pyversion is None or parse(dist.py_version) < nodep_setuptools_pyversion: + if (dist.entry_points and + (lower.endswith('.egg') or + lower.endswith('.egg-info'))): + groups = {ep.group for ep in dist.entry_points} + if {"console_scripts", "gui_scripts"} & groups: + # stick them first so any more specific requirement + # overrides it + deps.insert(0, Requirement('setuptools')) + # add requires/recommends based on egg/dist metadata + for dep in deps: + # Even if we're requiring `foo[bar]`, also require `foo` + # to be safe, and to make it discoverable through + # `repoquery --whatrequires` + extras_suffixes = [""] + if args.require_extras_subpackages and dep.extras: + # A dependency can have more than one extras, + # i.e. foo[bar,baz], so let's go through all of them + extras_suffixes += [f"[{e.lower()}]" for e in dep.extras] + + for extras_suffix in extras_suffixes: + if normalized_names_require_pep503: + dep_normalized_name = dep.normalized_name + else: + dep_normalized_name = dep.legacy_normalized_name + + if args.legacy: + name = namespace.format('pythonegg({})({})').format(pyver_major, dep.legacy_normalized_name) + else: + if args.majorver_only: + name = namespace.format('python{}dist({}{})').format(pyver_major, dep_normalized_name, extras_suffix) + else: + name = namespace.format('python{}dist({}{})').format(dist.py_version, dep_normalized_name, extras_suffix) + + if dep.marker and not args.recommends and not extras_subpackage: + if not dep.marker.evaluate(get_marker_env(dist, '')): + continue + + if name not in py_deps: + py_deps[name] = [] + for spec in dep.specifier: + if (spec.operator, spec.version) not in py_deps[name]: + py_deps[name].append((spec.operator, spec.version)) + + # Unused, for automatic sub-package generation based on 'extras' from egg/dist metadata + # TODO: implement in rpm later, or...? + if args.extras: + print(dist.extras) + for extra in dist.extras: + print('%%package\textras-{}'.format(extra)) + print('Summary:\t{} extra for {} python package'.format(extra, dist.legacy_normalized_name)) + print('Group:\t\tDevelopment/Python') + for dep in dist.requirements_for_extra(extra): + for spec in dep.specifier: + if spec.operator == '!=': + print('Conflicts:\t{} {} {}'.format(dep.legacy_normalized_name, '==', spec.version)) + else: + print('Requires:\t{} {} {}'.format(dep.legacy_normalized_name, spec.operator, spec.version)) + print('%%description\t{}'.format(extra)) + print('{} extra for {} python package'.format(extra, dist.legacy_normalized_name)) + print('%%files\t\textras-{}\n'.format(extra)) + if args.conflicts: + # Should we really add conflicts for extras? + # Creating a meta package per extra with recommends on, which has + # the requires/conflicts in stead might be a better solution... + for dep in dist.requirements: + for spec in dep.specifier: + if spec.operator == '!=': + if dep.legacy_normalized_name not in py_deps: + py_deps[dep.legacy_normalized_name] = [] + spec = ('==', spec.version) + if spec not in py_deps[dep.legacy_normalized_name]: + py_deps[dep.legacy_normalized_name].append(spec) + + for name in sorted(py_deps): + if py_deps[name]: + # Print out versioned provides, requires, recommends, conflicts + spec_list = [] + for spec in py_deps[name]: + spec_list.append(convert(name, spec[0], spec[1])) + if len(spec_list) == 1: + print(spec_list[0]) + else: + # Sort spec_list so that the results can be tested easily + print('({})'.format(' with '.join(sorted(spec_list)))) + else: + # Print out unversioned provides, requires, recommends, conflicts + print(name) + + +if __name__ == "__main__": + """To allow this script to be importable (and its classes/functions + reused), actions are performed only when run as a main script.""" + try: + main() + except Exception as exc: + print("*** PYTHONDISTDEPS_GENERATORS_FAILED ***", flush=True) + raise RuntimeError("Error: pythondistdeps.py generator encountered an unhandled exception and was terminated.") from exc + diff --git a/SPECS/python-rpm-generators/pythonname.attr b/SPECS/python-rpm-generators/pythonname.attr new file mode 100644 index 00000000..ec8e3d46 --- /dev/null +++ b/SPECS/python-rpm-generators/pythonname.attr @@ -0,0 +1,32 @@ +%__pythonname_provides() %{lua: + local python = require 'openruyi.srpm.python' + local name = rpm.expand('%{name}') + local evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}') + local provides = python.python_altprovides_once(name, evr) + -- provides is either an array/table or nil + -- nil means the function was already called with the same arguments: + -- either with another file in %1 or manually via %py_provides + if provides then + for i, provide in ipairs(provides) do + print(provide .. ' ') + end + end +} + +%__pythonname_obsoletes() %{lua: + -- We don't ship ecosystem packages for alternative Python interpreters. + local python = require 'openruyi.srpm.python' + local name = rpm.expand('%{name}') + local evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}') + local obsoletes = python.python_altobsoletes_once(name, evr) + -- obsoletes is either an array/table or nil + -- nil means the function was already called with the same arguments: + -- either with another file in %1 or manually via %py_provides + if obsoletes then + for i, obsolete in ipairs(obsoletes) do + print(obsolete .. ' ') + end + end +} + +%__pythonname_path ^/ diff --git a/SPECS/python-rpm-macros/brp-fix-pyc-reproducibility b/SPECS/python-rpm-macros/brp-fix-pyc-reproducibility new file mode 100644 index 00000000..05857b39 --- /dev/null +++ b/SPECS/python-rpm-macros/brp-fix-pyc-reproducibility @@ -0,0 +1,18 @@ +#!/bin/bash -eu + +# If using normal root, avoid changing anything. +if [[ -z "${RPM_BUILD_ROOT:-}" ]] || [[ "${RPM_BUILD_ROOT:-}" = "/" ]]; then + exit 0 +fi + +# Defined as %py_reproducible_pyc_path macro and passed here as +# the first command-line argument +path_to_fix=${1:?} + +# First, check that the parser is available: +if [[ ! -x /usr/bin/marshalparser ]]; then + echo "ERROR: If %py_reproducible_pyc_path is defined, you have to also BuildRequire: /usr/bin/marshalparser !" + exit 1 +fi + +find "$path_to_fix" -type f -name '*.pyc' -exec /usr/bin/marshalparser --fix --overwrite '{}' '+' diff --git a/SPECS/python-rpm-macros/brp-python-bytecompile b/SPECS/python-rpm-macros/brp-python-bytecompile new file mode 100644 index 00000000..eb056c56 --- /dev/null +++ b/SPECS/python-rpm-macros/brp-python-bytecompile @@ -0,0 +1,55 @@ +#!/bin/bash +errors_terminate=$2 + +compileall_flags="$4" + +# If using normal root, avoid changing anything. +if [[ -z "$RPM_BUILD_ROOT" ]] || [[ "$RPM_BUILD_ROOT" = "/" ]]; then + exit 0 +fi + +# This function now implements Python byte-compilation. +# It uses the compileall module from the standard library. +function python_bytecompile() +{ + local python_binary=$1 + local python_libdir="$2" + local compileall_flags="$3" + + # PYTHONPATH is needed for compileall2, but doesn't hurt for the stdlib + # -o 0 -o 1 are the optimization levels + # -q disables verbose output + # -f forces the process to overwrite existing compiled files + # -e excludes symbolic links pointing outside the build root + # -s strips $RPM_BUILD_ROOT from the path + # -p prepends the leading slash to the path to make it absolute + # --invalidation-mode=timestamp forces the TIMESTAMP invalidation mode + PYTHONPATH=/usr/lib/rpm/openruyi/ $python_binary -B -m compileall $compileall_flags -o 0 -o 1 -q -f -s "$RPM_BUILD_ROOT" -p / --hardlink-dupes --invalidation-mode=timestamp -e "$RPM_BUILD_ROOT" "$python_libdir" +} + +# .pyc/.pyo files embed a "magic" value, identifying the ABI version of Python +# bytecode that they are for. +# +# The files below RPM_BUILD_ROOT could be targeting multiple versions of +# python (e.g. a single build that emits several subpackages e.g. a +# python26-foo subpackage, a python31-foo subpackage etc) +# +# Support this by assuming that below each /usr/lib/python$VERSION/, all +# .pyc/.pyo files are to be compiled for /usr/bin/python$VERSION. +# +# For example, below /usr/lib/python2.6/, we're targeting /usr/bin/python2.6 +# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1 + +shopt -s nullglob +find "$RPM_BUILD_ROOT" -type d -print0|grep -z -E "/(usr|app)/lib(64)?/python[0-9]\.[0-9]+$" | while read -d "" python_libdir; +do + python_binary=$(basename "$python_libdir") + echo "Bytecompiling .py files below $python_libdir using $python_binary" + + # Generate byte-compiled files. + python_bytecompile "$python_binary" "$python_libdir" "$compileall_flags" + if [[ $? -ne 0 ]] && [[ 0"$errors_terminate" -ne 0 ]]; then + # One or more of the files had a syntax error + exit 1 + fi +done diff --git a/SPECS/python-rpm-macros/brp-python-hardlink b/SPECS/python-rpm-macros/brp-python-hardlink new file mode 100644 index 00000000..5fd1b43b --- /dev/null +++ b/SPECS/python-rpm-macros/brp-python-hardlink @@ -0,0 +1,25 @@ +#!/bin/sh + +# If using normal root, avoid changing anything. +if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then + exit 0 +fi + +hardlink_if_same() { + if cmp -s "$1" "$2" ; then + ln -f "$1" "$2" + return 0 + fi + return 1 +} + +# Hardlink identical *.pyc, *.pyo, and *.opt-[12].pyc. +# Originally from PLD's rpm-build-macros +find "$RPM_BUILD_ROOT" -type f -name "*.pyc" -not -name "*.opt-[12].pyc" | while read pyc ; do + hardlink_if_same "$pyc" "${pyc%c}o" + o1pyc="${pyc%pyc}opt-1.pyc" + hardlink_if_same "$pyc" "$o1pyc" + o2pyc="${pyc%pyc}opt-2.pyc" + hardlink_if_same "$pyc" "$o2pyc" || hardlink_if_same "$o1pyc" "$o2pyc" +done +exit 0 diff --git a/SPECS/python-rpm-macros/brp-python-rpm-in-distinfo b/SPECS/python-rpm-macros/brp-python-rpm-in-distinfo new file mode 100644 index 00000000..b72d7041 --- /dev/null +++ b/SPECS/python-rpm-macros/brp-python-rpm-in-distinfo @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +set -eu +# If using normal root, avoid changing anything. +if [[ "${RPM_BUILD_ROOT:-/}" = "/" ]] ; then + exit 0 +fi + +find "$RPM_BUILD_ROOT" -name 'INSTALLER' -type f -print0|grep -z -E "/usr/lib(64)?/python3\.[0-9]+/site-packages/[^/]+\.dist-info/INSTALLER" | while read -d "" installer ; do + if cmp -s <(echo pip) "$installer" ; then + echo "rpm" > "$installer" + rm -f "$(dirname "$installer")/RECORD" + fi +done +exit 0 diff --git a/SPECS/python-rpm-macros/clamp_source_mtime.py b/SPECS/python-rpm-macros/clamp_source_mtime.py new file mode 100644 index 00000000..1d03a6b5 --- /dev/null +++ b/SPECS/python-rpm-macros/clamp_source_mtime.py @@ -0,0 +1,163 @@ +"""Module/script to clamp the mtimes of all .py files to $SOURCE_DATE_EPOCH + +When called as a script with arguments, this compiles the directories +given as arguments recursively. + +If upstream is interested, this can be later integrated to the compileall module +as an additional option (e.g. --clamp-source-mtime). + +License: +This has been derived from the Python's compileall module +and it follows Python licensing. For more info see: https://www.python.org/psf/license/ +""" +from __future__ import print_function +import os +import sys + +# Python 3.6 and higher +PY36 = sys.version_info[0:2] >= (3, 6) + +__all__ = ["clamp_dir", "clamp_file"] + + +def _walk_dir(dir, maxlevels, quiet=0): + if PY36 and quiet < 2 and isinstance(dir, os.PathLike): + dir = os.fspath(dir) + else: + dir = str(dir) + if not quiet: + print('Listing {!r}...'.format(dir)) + try: + names = os.listdir(dir) + except OSError: + if quiet < 2: + print("Can't list {!r}".format(dir)) + names = [] + names.sort() + for name in names: + if name == '__pycache__': + continue + fullname = os.path.join(dir, name) + if not os.path.isdir(fullname): + yield fullname + elif (maxlevels > 0 and name != os.curdir and name != os.pardir and + os.path.isdir(fullname) and not os.path.islink(fullname)): + for result in _walk_dir(fullname, maxlevels=maxlevels - 1, + quiet=quiet): + yield result + + +def clamp_dir(dir, source_date_epoch, quiet=0): + """Clamp the mtime of all modules in the given directory tree. + + Arguments: + + dir: the directory to byte-compile + source_date_epoch: integer parsed from $SOURCE_DATE_EPOCH + quiet: full output with False or 0, errors only with 1, + no output with 2 + """ + maxlevels = sys.getrecursionlimit() + files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels) + success = True + for file in files: + if not clamp_file(file, source_date_epoch, quiet=quiet): + success = False + return success + + +def clamp_file(fullname, source_date_epoch, quiet=0): + """Clamp the mtime of one file. + + Arguments: + + fullname: the file to byte-compile + source_date_epoch: integer parsed from $SOURCE_DATE_EPOCH + quiet: full output with False or 0, errors only with 1, + no output with 2 + """ + if PY36 and quiet < 2 and isinstance(fullname, os.PathLike): + fullname = os.fspath(fullname) + else: + fullname = str(fullname) + name = os.path.basename(fullname) + + if os.path.isfile(fullname) and not os.path.islink(fullname): + if name[-3:] == '.py': + try: + mtime = int(os.stat(fullname).st_mtime) + atime = int(os.stat(fullname).st_atime) + except OSError as e: + if quiet >= 2: + return False + elif quiet: + print('*** Error checking mtime of {!r}...'.format(fullname)) + else: + print('*** ', end='') + print(e.__class__.__name__ + ':', e) + return False + if mtime > source_date_epoch: + if not quiet: + print('Clamping mtime of {!r}'.format(fullname)) + try: + os.utime(fullname, (atime, source_date_epoch)) + except OSError as e: + if quiet >= 2: + return False + elif quiet: + print('*** Error clamping mtime of {!r}...'.format(fullname)) + else: + print('*** ', end='') + print(e.__class__.__name__ + ':', e) + return False + return True + + +def main(): + """Script main program.""" + import argparse + + source_date_epoch = os.getenv('SOURCE_DATE_EPOCH') + if not source_date_epoch: + print("Not clamping source mtimes, $SOURCE_DATE_EPOCH not set") + return True # This is a success, no action needed + try: + source_date_epoch = int(source_date_epoch) + except ValueError: + print("$SOURCE_DATE_EPOCH must be an integer") + return False + + parser = argparse.ArgumentParser( + description='Clamp .py source mtime to $SOURCE_DATE_EPOCH.') + parser.add_argument('-q', action='count', dest='quiet', default=0, + help='output only error messages; -qq will suppress ' + 'the error messages as well.') + parser.add_argument('clamp_dest', metavar='FILE|DIR', nargs='+', + help=('zero or more file and directory paths ' + 'to clamp')) + + args = parser.parse_args() + clamp_dests = args.clamp_dest + + success = True + try: + for dest in clamp_dests: + if os.path.isfile(dest): + if not clamp_file(dest, quiet=args.quiet, + source_date_epoch=source_date_epoch): + success = False + else: + if not clamp_dir(dest, quiet=args.quiet, + source_date_epoch=source_date_epoch): + success = False + return success + except KeyboardInterrupt: + if args.quiet < 2: + print("\n[interrupted]") + return False + return True + + +if __name__ == '__main__': + exit_status = int(not main()) + sys.exit(exit_status) diff --git a/SPECS/python-rpm-macros/compileall2.py b/SPECS/python-rpm-macros/compileall2.py new file mode 100644 index 00000000..ea7e76f9 --- /dev/null +++ b/SPECS/python-rpm-macros/compileall2.py @@ -0,0 +1,521 @@ +"""Module/script to byte-compile all .py files to .pyc files. + +When called as a script with arguments, this compiles the directories +given as arguments recursively; the -l option prevents it from +recursing into directories. + +Without arguments, it compiles all modules on sys.path, without +recursing into subdirectories. (Even though it should do so for +packages -- for now, you'll have to deal with packages separately.) + +See module py_compile for details of the actual byte-compilation. + +License: +Compileall2 is an enhanced copy of Python's compileall module +and it follows Python licensing. For more info see: https://www.python.org/psf/license/ +""" +import os +import sys +import importlib.util +import py_compile +import struct +import filecmp + +from functools import partial +from pathlib import Path + +# Python 3.7 and higher +PY37 = sys.version_info[0:2] >= (3, 7) +# Python 3.6 and higher +PY36 = sys.version_info[0:2] >= (3, 6) +# Python 3.5 and higher +PY35 = sys.version_info[0:2] >= (3, 5) + +# Python 3.7 and above has a different structure and length +# of pyc files header. Also, multiple ways how to invalidate pyc file was +# introduced in Python 3.7. These cases are covered by variables here or by PY37 +# variable itself. +if PY37: + pyc_struct_format = '<4sLL' + pyc_header_lenght = 12 + pyc_header_format = (pyc_struct_format, importlib.util.MAGIC_NUMBER, 0) +else: + pyc_struct_format = '<4sL' + pyc_header_lenght = 8 + pyc_header_format = (pyc_struct_format, importlib.util.MAGIC_NUMBER) + +__all__ = ["compile_dir","compile_file","compile_path"] + +def optimization_kwarg(opt): + """Returns opt as a dictionary {optimization: opt} for use as **kwarg + for Python >= 3.5 and empty dictionary for Python 3.4""" + if PY35: + return dict(optimization=opt) + else: + # `debug_override` is a way how to enable optimized byte-compiled files + # (.pyo) in Python <= 3.4 + if opt: + return dict(debug_override=False) + else: + return dict() + +def _walk_dir(dir, maxlevels, quiet=0): + if PY36 and quiet < 2 and isinstance(dir, os.PathLike): + dir = os.fspath(dir) + else: + dir = str(dir) + if not quiet: + print('Listing {!r}...'.format(dir)) + try: + names = os.listdir(dir) + except OSError: + if quiet < 2: + print("Can't list {!r}".format(dir)) + names = [] + names.sort() + for name in names: + if name == '__pycache__': + continue + fullname = os.path.join(dir, name) + if not os.path.isdir(fullname): + yield fullname + elif (maxlevels > 0 and name != os.curdir and name != os.pardir and + os.path.isdir(fullname) and not os.path.islink(fullname)): + yield from _walk_dir(fullname, maxlevels=maxlevels - 1, + quiet=quiet) + +def compile_dir(dir, maxlevels=None, ddir=None, force=False, + rx=None, quiet=0, legacy=False, optimize=-1, workers=1, + invalidation_mode=None, stripdir=None, + prependdir=None, limit_sl_dest=None, hardlink_dupes=False): + """Byte-compile all modules in the given directory tree. + + Arguments (only dir is required): + + dir: the directory to byte-compile + maxlevels: maximum recursion level (default `sys.getrecursionlimit()`) + ddir: the directory that will be prepended to the path to the + file as it is compiled into each byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: int or list of optimization levels or -1 for level of + the interpreter. Multiple levels leads to multiple compiled + files each with one optimization level. + workers: maximum number of parallel workers + invalidation_mode: how the up-to-dateness of the pyc will be checked + stripdir: part of path to left-strip from source file path + prependdir: path to prepend to beginning of original file path, applied + after stripdir + limit_sl_dest: ignore symlinks if they are pointing outside of + the defined path + hardlink_dupes: hardlink duplicated pyc files + """ + ProcessPoolExecutor = None + if ddir is not None and (stripdir is not None or prependdir is not None): + raise ValueError(("Destination dir (ddir) cannot be used " + "in combination with stripdir or prependdir")) + if ddir is not None: + stripdir = dir + prependdir = ddir + ddir = None + if workers < 0: + raise ValueError('workers must be greater or equal to 0') + if workers != 1: + # Check if this is a system where ProcessPoolExecutor can function. + from concurrent.futures.process import _check_system_limits + try: + _check_system_limits() + except NotImplementedError: + workers = 1 + else: + from concurrent.futures import ProcessPoolExecutor + if maxlevels is None: + maxlevels = sys.getrecursionlimit() + files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels) + success = True + if workers != 1 and ProcessPoolExecutor is not None: + mp_context_arg = {} + if PY37: + import multiprocessing + if multiprocessing.get_start_method() == 'fork': + mp_context = multiprocessing.get_context('forkserver') + else: + mp_context = None + mp_context_arg = {"mp_context": mp_context} + # If workers == 0, let ProcessPoolExecutor choose + workers = workers or None + with ProcessPoolExecutor(max_workers=workers, + **mp_context_arg) as executor: + results = executor.map(partial(compile_file, + ddir=ddir, force=force, + rx=rx, quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode, + stripdir=stripdir, + prependdir=prependdir, + limit_sl_dest=limit_sl_dest), + files) + success = min(results, default=True) + else: + for file in files: + if not compile_file(file, ddir, force, rx, quiet, + legacy, optimize, invalidation_mode, + stripdir=stripdir, prependdir=prependdir, + limit_sl_dest=limit_sl_dest, + hardlink_dupes=hardlink_dupes): + success = False + return success + +def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, + legacy=False, optimize=-1, + invalidation_mode=None, stripdir=None, prependdir=None, + limit_sl_dest=None, hardlink_dupes=False): + """Byte-compile one file. + + Arguments (only fullname is required): + + fullname: the file to byte-compile + ddir: if given, the directory name compiled in to the + byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: int or list of optimization levels or -1 for level of + the interpreter. Multiple levels leads to multiple compiled + files each with one optimization level. + invalidation_mode: how the up-to-dateness of the pyc will be checked + stripdir: part of path to left-strip from source file path + prependdir: path to prepend to beginning of original file path, applied + after stripdir + limit_sl_dest: ignore symlinks if they are pointing outside of + the defined path. + hardlink_dupes: hardlink duplicated pyc files + """ + + if ddir is not None and (stripdir is not None or prependdir is not None): + raise ValueError(("Destination dir (ddir) cannot be used " + "in combination with stripdir or prependdir")) + + success = True + fullname = os.fspath(fullname) + stripdir = os.fspath(stripdir) if stripdir is not None else None + name = os.path.basename(fullname) + + dfile = None + + if ddir is not None: + if not PY36: + ddir = str(ddir) + dfile = os.path.join(ddir, name) + + if stripdir is not None: + fullname_parts = fullname.split(os.path.sep) + stripdir_parts = stripdir.split(os.path.sep) + + if stripdir_parts != fullname_parts[:len(stripdir_parts)]: + if quiet < 2: + print("The stripdir path {!r} is not a valid prefix for " + "source path {!r}; ignoring".format(stripdir, fullname)) + else: + dfile = os.path.join(*fullname_parts[len(stripdir_parts):]) + + if prependdir is not None: + if dfile is None: + dfile = os.path.join(prependdir, fullname) + else: + dfile = os.path.join(prependdir, dfile) + + if isinstance(optimize, int): + optimize = [optimize] + + if hardlink_dupes: + raise ValueError(("Hardlinking of duplicated bytecode makes sense " + "only for more than one optimization level.")) + + if rx is not None: + mo = rx.search(fullname) + if mo: + return success + + if limit_sl_dest is not None and os.path.islink(fullname): + if Path(limit_sl_dest).resolve() not in Path(fullname).resolve().parents: + return success + + opt_cfiles = {} + + if os.path.isfile(fullname): + for opt_level in optimize: + if legacy: + opt_cfiles[opt_level] = fullname + 'c' + else: + if opt_level >= 0: + opt = opt_level if opt_level >= 1 else '' + opt_kwarg = optimization_kwarg(opt) + cfile = (importlib.util.cache_from_source( + fullname, **opt_kwarg)) + opt_cfiles[opt_level] = cfile + else: + cfile = importlib.util.cache_from_source(fullname) + opt_cfiles[opt_level] = cfile + + head, tail = name[:-3], name[-3:] + if tail == '.py': + if not force: + try: + mtime = int(os.stat(fullname).st_mtime) + expect = struct.pack(*(pyc_header_format + (mtime & 0xFFFF_FFFF,))) + for cfile in opt_cfiles.values(): + with open(cfile, 'rb') as chandle: + actual = chandle.read(pyc_header_lenght) + if expect != actual: + break + else: + return success + except OSError: + pass + if not quiet: + print('Compiling {!r}...'.format(fullname)) + try: + for index, opt_level in enumerate(sorted(optimize)): + cfile = opt_cfiles[opt_level] + if PY37: + ok = py_compile.compile(fullname, cfile, dfile, True, + optimize=opt_level, + invalidation_mode=invalidation_mode) + else: + ok = py_compile.compile(fullname, cfile, dfile, True, + optimize=opt_level) + + if index > 0 and hardlink_dupes: + previous_cfile = opt_cfiles[optimize[index - 1]] + if previous_cfile == cfile and optimize[0] not in (1, 2): + # Python 3.4 has only one .pyo file for -O and -OO so + # we hardlink it only if there is a .pyc file + # with the same content + previous_cfile = opt_cfiles[optimize[0]] + if previous_cfile != cfile and filecmp.cmp(cfile, previous_cfile, shallow=False): + os.unlink(cfile) + os.link(previous_cfile, cfile) + + except py_compile.PyCompileError as err: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + # escape non-printable characters in msg + encoding = sys.stdout.encoding or sys.getdefaultencoding() + msg = err.msg.encode(encoding, errors='backslashreplace').decode(encoding) + print(msg) + except (SyntaxError, UnicodeError, OSError) as e: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + print(e.__class__.__name__ + ':', e) + else: + if ok == 0: + success = False + return success + +def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0, + legacy=False, optimize=-1, + invalidation_mode=None): + """Byte-compile all module on sys.path. + + Arguments (all optional): + + skip_curdir: if true, skip current directory (default True) + maxlevels: max recursion level (default 0) + force: as for compile_dir() (default False) + quiet: as for compile_dir() (default 0) + legacy: as for compile_dir() (default False) + optimize: as for compile_dir() (default -1) + invalidation_mode: as for compiler_dir() + """ + success = True + for dir in sys.path: + if (not dir or dir == os.curdir) and skip_curdir: + if quiet < 2: + print('Skipping current directory') + else: + success = success and compile_dir( + dir, + maxlevels, + None, + force, + quiet=quiet, + legacy=legacy, + optimize=optimize, + invalidation_mode=invalidation_mode, + ) + return success + + +def main(): + """Script main program.""" + import argparse + + parser = argparse.ArgumentParser( + description='Utilities to support installing Python libraries.') + parser.add_argument('-l', action='store_const', const=0, + default=None, dest='maxlevels', + help="don't recurse into subdirectories") + parser.add_argument('-r', type=int, dest='recursion', + help=('control the maximum recursion level. ' + 'if `-l` and `-r` options are specified, ' + 'then `-r` takes precedence.')) + parser.add_argument('-f', action='store_true', dest='force', + help='force rebuild even if timestamps are up to date') + parser.add_argument('-q', action='count', dest='quiet', default=0, + help='output only error messages; -qq will suppress ' + 'the error messages as well.') + parser.add_argument('-b', action='store_true', dest='legacy', + help='use legacy (pre-PEP3147) compiled file locations') + parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None, + help=('directory to prepend to file paths for use in ' + 'compile-time tracebacks and in runtime ' + 'tracebacks in cases where the source file is ' + 'unavailable')) + parser.add_argument('-s', metavar='STRIPDIR', dest='stripdir', + default=None, + help=('part of path to left-strip from path ' + 'to source file - for example buildroot. ' + '`-d` and `-s` options cannot be ' + 'specified together.')) + parser.add_argument('-p', metavar='PREPENDDIR', dest='prependdir', + default=None, + help=('path to add as prefix to path ' + 'to source file - for example / to make ' + 'it absolute when some part is removed ' + 'by `-s` option. ' + '`-d` and `-p` options cannot be ' + 'specified together.')) + parser.add_argument('-x', metavar='REGEXP', dest='rx', default=None, + help=('skip files matching the regular expression; ' + 'the regexp is searched for in the full path ' + 'of each file considered for compilation')) + parser.add_argument('-i', metavar='FILE', dest='flist', + help=('add all the files and directories listed in ' + 'FILE to the list considered for compilation; ' + 'if "-", names are read from stdin')) + parser.add_argument('compile_dest', metavar='FILE|DIR', nargs='*', + help=('zero or more file and directory names ' + 'to compile; if no arguments given, defaults ' + 'to the equivalent of -l sys.path')) + parser.add_argument('-j', '--workers', default=1, + type=int, help='Run compileall concurrently') + parser.add_argument('-o', action='append', type=int, dest='opt_levels', + help=('Optimization levels to run compilation with. ' + 'Default is -1 which uses the optimization level ' + 'of the Python interpreter itself (see -O).')) + parser.add_argument('-e', metavar='DIR', dest='limit_sl_dest', + help='Ignore symlinks pointing outsite of the DIR') + parser.add_argument('--hardlink-dupes', action='store_true', + dest='hardlink_dupes', + help='Hardlink duplicated pyc files') + + if PY37: + invalidation_modes = [mode.name.lower().replace('_', '-') + for mode in py_compile.PycInvalidationMode] + parser.add_argument('--invalidation-mode', + choices=sorted(invalidation_modes), + help=('set .pyc invalidation mode; defaults to ' + '"checked-hash" if the SOURCE_DATE_EPOCH ' + 'environment variable is set, and ' + '"timestamp" otherwise.')) + + args = parser.parse_args() + compile_dests = args.compile_dest + + if args.rx: + import re + args.rx = re.compile(args.rx) + + if args.limit_sl_dest == "": + args.limit_sl_dest = None + + if args.recursion is not None: + maxlevels = args.recursion + else: + maxlevels = args.maxlevels + + if args.opt_levels is None: + args.opt_levels = [-1] + + if len(args.opt_levels) == 1 and args.hardlink_dupes: + parser.error(("Hardlinking of duplicated bytecode makes sense " + "only for more than one optimization level.")) + + if args.ddir is not None and ( + args.stripdir is not None or args.prependdir is not None + ): + parser.error("-d cannot be used in combination with -s or -p") + + # if flist is provided then load it + if args.flist: + try: + with (sys.stdin if args.flist=='-' else + open(args.flist, encoding="utf-8")) as f: + for line in f: + compile_dests.append(line.strip()) + except OSError: + if args.quiet < 2: + print("Error reading file list {}".format(args.flist)) + return False + + if PY37 and args.invalidation_mode: + ivl_mode = args.invalidation_mode.replace('-', '_').upper() + invalidation_mode = py_compile.PycInvalidationMode[ivl_mode] + else: + invalidation_mode = None + + success = True + try: + if compile_dests: + for dest in compile_dests: + if os.path.isfile(dest): + if not compile_file(dest, args.ddir, args.force, args.rx, + args.quiet, args.legacy, + invalidation_mode=invalidation_mode, + stripdir=args.stripdir, + prependdir=args.prependdir, + optimize=args.opt_levels, + limit_sl_dest=args.limit_sl_dest, + hardlink_dupes=args.hardlink_dupes): + success = False + else: + if not compile_dir(dest, maxlevels, args.ddir, + args.force, args.rx, args.quiet, + args.legacy, workers=args.workers, + invalidation_mode=invalidation_mode, + stripdir=args.stripdir, + prependdir=args.prependdir, + optimize=args.opt_levels, + limit_sl_dest=args.limit_sl_dest, + hardlink_dupes=args.hardlink_dupes): + success = False + return success + else: + return compile_path(legacy=args.legacy, force=args.force, + quiet=args.quiet, + invalidation_mode=invalidation_mode) + except KeyboardInterrupt: + if args.quiet < 2: + print("\n[interrupted]") + return False + return True + + +if __name__ == '__main__': + exit_status = int(not main()) + sys.exit(exit_status) diff --git a/SPECS/python-rpm-macros/import_all_modules.py b/SPECS/python-rpm-macros/import_all_modules.py new file mode 100644 index 00000000..1db1e3b5 --- /dev/null +++ b/SPECS/python-rpm-macros/import_all_modules.py @@ -0,0 +1,187 @@ +'''Script to perform import of each module given to %%py_check_import +''' +import argparse +import importlib +import fnmatch +import os +import re +import site +import sys +import traceback + +from contextlib import contextmanager +from pathlib import Path + + +def read_modules_files(file_paths): + '''Read module names from the files (modules must be newline separated). + + Return the module names list or, if no files were provided, an empty list. + ''' + + if not file_paths: + return [] + + modules = [] + for file in file_paths: + file_contents = file.read_text() + modules.extend(file_contents.split()) + return modules + + +def read_modules_from_cli(argv): + '''Read module names from command-line arguments (space or comma separated). + + Return the module names list. + ''' + + if not argv: + return [] + + # %%py3_check_import allows to separate module list with comma or whitespace, + # we need to unify the output to a list of particular elements + modules_as_str = ' '.join(argv) + modules = re.split(r'[\s,]+', modules_as_str) + # Because of shell expansion in some less typical cases it may happen + # that a trailing space will occur at the end of the list. + # Remove the empty items from the list before passing it further + modules = [m for m in modules if m] + return modules + + +def filter_top_level_modules_only(modules): + '''Filter out entries with nested modules (containing dot) ie. 'foo.bar'. + + Return the list of top-level modules. + ''' + + return [module for module in modules if '.' not in module] + + +def any_match(text, globs): + '''Return True if any of given globs fnmatchcase's the given text.''' + + return any(fnmatch.fnmatchcase(text, g) for g in globs) + + +def exclude_unwanted_module_globs(globs, modules): + '''Filter out entries which match the either of the globs given as argv. + + Return the list of filtered modules. + ''' + + return [m for m in modules if not any_match(m, globs)] + + +def read_modules_from_all_args(args): + '''Return a joined list of modules from all given command-line arguments. + ''' + + modules = read_modules_files(args.filename) + modules.extend(read_modules_from_cli(args.modules)) + if args.exclude: + modules = exclude_unwanted_module_globs(args.exclude, modules) + + if args.top_level: + modules = filter_top_level_modules_only(modules) + + # Error when someone accidentally managed to filter out everything + if len(modules) == 0: + raise ValueError('No modules to check were left') + + return modules + + +def import_modules(modules): + '''Procedure to perform import check for each module name from the given list of modules. + + Return a list of failed modules. + ''' + + failed_modules = [] + + for module in modules: + print('Check import:', module, file=sys.stderr) + try: + importlib.import_module(module) + except Exception: + traceback.print_exc(file=sys.stderr) + failed_modules.append(module) + + if failed_modules: + print(f'Failed to import: {", ".join(failed_modules)}', file=sys.stderr) + + return failed_modules + + +def argparser(): + parser = argparse.ArgumentParser( + description='Generate list of all importable modules for import check.' + ) + parser.add_argument( + 'modules', nargs='*', + help=('Add modules to check the import (space or comma separated).'), + ) + parser.add_argument( + '-f', '--filename', action='append', type=Path, + help='Add importable module names list from file.', + ) + parser.add_argument( + '-t', '--top-level', action='store_true', + help='Check only top-level modules.', + ) + parser.add_argument( + '-e', '--exclude', action='append', + help='Provide modules globs to be excluded from the check.', + ) + return parser + + +@contextmanager +def remove_unwanteds_from_sys_path(): + '''Remove cwd and this script's parent from sys.path for the import test. + Bring the original contents back after import is done (or failed) + ''' + + cwd_absolute = Path.cwd().absolute() + this_file_parent = Path(__file__).parent.absolute() + old_sys_path = list(sys.path) + for path in old_sys_path: + if Path(path).absolute() in (cwd_absolute, this_file_parent): + sys.path.remove(path) + try: + yield + finally: + sys.path = old_sys_path + + +def addsitedirs_from_environ(): + '''Load directories from the _PYTHONSITE environment variable (separated by :) + and load the ones already present in sys.path via site.addsitedir() + to handle .pth files in them. + + This is needed to properly import old-style namespace packages with nspkg.pth files.''' + for path in os.getenv('_PYTHONSITE', '').split(':'): + if path in sys.path: + site.addsitedir(path) + + +def main(argv=None): + + cli_args = argparser().parse_args(argv) + + if not cli_args.modules and not cli_args.filename: + raise ValueError('No modules to check were provided') + + modules = read_modules_from_all_args(cli_args) + + with remove_unwanteds_from_sys_path(): + addsitedirs_from_environ() + failed_modules = import_modules(modules) + + if failed_modules: + raise SystemExit(1) + + +if __name__ == '__main__': + main() diff --git a/SPECS/python-rpm-macros/macros.pybytecompile b/SPECS/python-rpm-macros/macros.pybytecompile new file mode 100644 index 00000000..c71645ab --- /dev/null +++ b/SPECS/python-rpm-macros/macros.pybytecompile @@ -0,0 +1,37 @@ +# Note that the path could itself be a python file, or a directory + +# Note that the py_byte_compile macro should work for all Python versions +# Which unfortunately makes the definition more complicated than it should be + +# Usage: +# %%py_byte_compile +# Example: +# %%py_byte_compile %%{__python3} %%{buildroot}%%{_datadir}/spam/plugins/ + +# This will terminate build on SyntaxErrors, if you want to avoid that, +# use it in a subshell like this: +# (%%{py_byte_compile }) || : + +%py_byte_compile()\ +clamp_source_mtime () {\ + python_binary="%{__env_unset_source_date_epoch_if_not_clamp_mtime} %1"\ + bytecode_compilation_path="%2"\ + PYTHONPATH="%{_rpmconfigdir}/openruyi" $python_binary -s -B -m clamp_source_mtime $bytecode_compilation_path \ +}\ +\ +py_byte_compile () {\ + python_binary="%{__env_unset_source_date_epoch_if_not_clamp_mtime} PYTHONHASHSEED=0 %1"\ + bytecode_compilation_path="%2"\ + $python_binary -s -B -m compileall %{?_smp_build_ncpus:-j%{_smp_build_ncpus}} -o 0 -o 1 -s $RPM_BUILD_ROOT -p / --hardlink-dupes --invalidation-mode=timestamp $bytecode_compilation_path \ +}\ +\ +# Path to intepreter should not contain any arguments \ +[[ "%1" =~ " -" ]] && echo "ERROR py_byte_compile: Path to interpreter should not contain any arguments" >&2 && exit 1 \ +# First, clamp source mtime \ +clamp_source_mtime "%1" "%2"; \ +# Get version without a dot (36 instead of 3.6), bash doesn't compare floats well \ +python_version=$(%1 -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") \ +# compileall2 is an enhanced fork of stdlib compileall module for Python >= 3.4 \ +# and it was merged back to stdlib in Python >= 3.9 \ +# Only Python 3.7+ supports and needs the --invalidation-mode option \ +py_byte_compile "%1" "%2"; diff --git a/SPECS/python-rpm-macros/macros.python b/SPECS/python-rpm-macros/macros.python new file mode 100644 index 00000000..937baf45 --- /dev/null +++ b/SPECS/python-rpm-macros/macros.python @@ -0,0 +1,158 @@ +# Memoize a macro to avoid calling the same expensive code multiple times in +# the specfile. +# There is no error handling, +# memoizing an undefined macro (or using such a key) has undefined behavior. +# Options: +# -n - The name of the macro to wrap +# -k - The name of the macro to use as a cache key +%_python_memoize(n:k:) %{lua: +local name = opt.n +-- NB: We use rpm.expand() here instead of the macros table to make sure errors +-- are propogated properly. +local cache_key = rpm.expand("%{" .. opt.k .. "}") +if not _python_macro_cache then + -- This is intentionally a global lua table + _python_macro_cache = {} +end +if not _python_macro_cache[cache_key] then + _python_macro_cache[cache_key] = {} +end +if not _python_macro_cache[cache_key][name] then + _python_macro_cache[cache_key][name] = rpm.expand("%{" .. name .. "}") +end +print(_python_macro_cache[cache_key][name]) +} + +# unversioned macros: used with user defined __python, no longer part of rpm >= 4.15 +# __python is defined to error by default in the srpm macros +# nb: $RPM_BUILD_ROOT is not set when the macros are expanded (at spec parse time) +# so we set it manually (to empty string), making our Python prefer the correct install scheme location +# platbase/base is explicitly set to %%{_prefix} to support custom values, such as /app for flatpaks +%__python_sitelib %(RPM_BUILD_ROOT= %{__python} -Esc "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") +%python_sitelib %{_python_memoize -n __python_sitelib -k __python} + +%__python_sitearch %(RPM_BUILD_ROOT= %{__python} -Esc "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") +%python_sitearch %{_python_memoize -n __python_sitearch -k __python} + +%__python_version %(RPM_BUILD_ROOT= %{__python} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") +%python_version %{_python_memoize -n __python_version -k __python} + +%__python_version_nodots %(RPM_BUILD_ROOT= %{__python} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") +%python_version_nodots %{_python_memoize -n __python_version_nodots -k __python} + +%__python_platform %(RPM_BUILD_ROOT= %{__python} -Esc "import sysconfig; print(sysconfig.get_platform())") +%python_platform %{_python_memoize -n __python_platform -k __python} + +%__python_platform_triplet %(RPM_BUILD_ROOT= %{__python} -Esc "import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))") +%python_platform_triplet %{_python_memoize -n __python_platform_triplet -k __python} + +%__python_ext_suffix %(RPM_BUILD_ROOT= %{__python} -Esc "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") +%python_ext_suffix %{_python_memoize -n __python_ext_suffix -k __python} + +%__python_cache_tag %(RPM_BUILD_ROOT= %{__python} -Esc "import sys; print(sys.implementation.cache_tag)") +%python_cache_tag %{_python_memoize -n __python_cache_tag -k __python} + +%py_setup setup.py +%_py_shebang_s s +%__py_shebang_P %(RPM_BUILD_ROOT= %{__python} -Esc "import sys; print('P' if hasattr(sys.flags, 'safe_path') else '')") +%_py_shebang_P %{_python_memoize -n __py_shebang_P -k __python} +%py_shbang_opts -%{?_py_shebang_s}%{?_py_shebang_P} +%py_shbang_opts_nodash %(opts=%{py_shbang_opts}; echo ${opts#-}) +%py_shebang_flags %(opts=%{py_shbang_opts}; echo ${opts#-}) +%py_shebang_fix %{expand:\\\ + if [ -z "%{?py_shebang_flags}" ]; then + shebang_flags="-k" + else + shebang_flags="-ka%{py_shebang_flags}" + fi + %{__python} -B %{_rpmconfigdir}/openruyi/pathfix.py -pni %{__python} $shebang_flags} + +%py_install_wheel() %{expand:\\\ + %{__python} -m pip install -I dist/%{1} --root %{buildroot} --prefix %{_prefix} --no-deps --no-index --no-warn-script-location + rm -rfv %{buildroot}%{_bindir}/__pycache__ + for distinfo in %{buildroot}%{python_sitelib}/*.dist-info %{buildroot}%{python_sitearch}/*.dist-info; do + if [ -f ${distinfo}/direct_url.json ]; then + rm -fv ${distinfo}/direct_url.json + sed -i '/direct_url.json/d' ${distinfo}/RECORD + fi + done +} + +# With $PATH and $PYTHONPATH set to the %%buildroot, +# try to import the Python module(s) given as command-line args or read from file (-f). +# Respect the custom values of %%py_shebang_flags or set nothing if it's undefined. +# Filter and check import on only top-level modules using -t flag. +# Exclude unwanted modules by passing their globs to -e option. +# Useful as a smoke test in %%check when running tests is not feasible. +# Use spaces or commas as separators if providing list directly. +# Use newlines as separators if providing list in a file. +%py_check_import(e:tf:) %{expand:\\\ + PATH="%{buildroot}%{_bindir}:$PATH"\\\ + PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}}"\\\ + _PYTHONSITE="%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}"\\\ + PYTHONDONTWRITEBYTECODE=1\\\ + %{lua: + local command = "%{__python} " + if rpm.expand("%{?py_shebang_flags}") ~= "" then + command = command .. "-%{py_shebang_flags}" + end + command = command .. " %{_rpmconfigdir}/openruyi/import_all_modules.py " + -- handle multiline arguments correctly + local args=rpm.expand('%{?**}'):gsub("[%s\\\\]*%s+", " ") + print(command .. args) + } +} + +%python_provide() %{lua: + local python = require "openruyi.srpm.python" + function string.starts(String,Start) + return string.sub(String,1,string.len(Start))==Start + end + local package = rpm.expand("%{?1}") + local vr = rpm.expand("%{?epoch:%{epoch}:}%{version}-%{release}") + local provides = python.python_altprovides(package, vr) + local default_python3_pkgversion = rpm.expand("%{__default_python3_pkgversion}") + if (string.starts(package, "python3-")) then + for i, provide in ipairs(provides) do + print("\\nProvides: " .. provide) + end + --Obsoleting the previous default python package (if it doesn't have isa) + if (string.sub(package, "-1") ~= ")") then + print("\\nObsoletes: python-") + print(string.sub(package,9,string.len(package))) + print(" < " .. vr) + end + elseif (string.starts(package, "python" .. default_python3_pkgversion .. "-")) then + for i, provide in ipairs(provides) do + print("\\nProvides: " .. provide) + end + --Obsoleting the previous default python package (if it doesn't have isa) + if (string.sub(package, "-1") ~= ")") then + print("\\nObsoletes: python-") + print(string.sub(package,8+string.len(default_python3_pkgversion),string.len(package))) + print(" < " .. vr) + end + elseif (string.starts(package, "python")) then + --No unversioned provides as other python3 cases are not the default + elseif (string.starts(package, "pypy")) then + --No unversioned provides as pypy is not default either + else + print("%python_provide: ERROR: ") + print(package) + print(" not recognized.") + end +} + +# Environment variables for testing used standalone, e.g.: +# %%{py_test_envvars} %%{python} -m unittest +%py_test_envvars %{expand:\\\ + CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ + PATH="%{buildroot}%{_bindir}:$PATH"\\\ + PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}}"\\\ + PYTHONDONTWRITEBYTECODE=1\\\ + %{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"}\\\ + PYTEST_XDIST_AUTO_NUM_WORKERS="${PYTEST_XDIST_AUTO_NUM_WORKERS:-%{_smp_build_ncpus}}"} + +%python_disable_dependency_generator() \ +%undefine __pythondist_requires \ +%{nil} diff --git a/SPECS/python-rpm-macros/macros.python-srpm b/SPECS/python-rpm-macros/macros.python-srpm new file mode 100644 index 00000000..d0a3bcb6 --- /dev/null +++ b/SPECS/python-rpm-macros/macros.python-srpm @@ -0,0 +1,255 @@ +# There are multiple Python 3 versions packaged, but only one can be the "main" version +# That means that it owns the "python3" namespace: +# - python3 package name +# - /usr/bin/python3 command +# - python3-foo packages are meant for this version +# Other versions of Python 3 always contain the version in the namespace: +# - python3.XX package name +# - /usr/bin/python3.XX command +# - python3.XX-foo packages (if allowed) +# +# Python spec files use the version defined here to determine defaults for the +# %%py_provides and %%python_provide macros, as well as for the "pythonname" generator that +# provides python3-foo for python3.XX-foo and vice versa for the default "main" version. +# E.g. python3.9-foo will provide python3-foo, +# python3-foo will provide python3.9-foo. +# +# There are two macros: +# +# This always contains the major.minor version (with dots), default for %%python3_version. +%__default_python3_version 3.13 +# +# The pkgname version that determines the alternative provide name (e.g. python3.9-foo), +# set to the same as above, but historically hasn't included the dot. +# This is left intentionally a separate macro, in case the naming convention ever changes. +%__default_python3_pkgversion %__default_python3_version + +# python3_pkgversion specifies the version of Python 3 in the distro. +# This is usually just "3". +# It can be a specific version distro-wide (e.g. "36"). +# Alternatively, it can be overridden in spec (e.g. to "3.8") when building for alternate Python stacks. +%python3_pkgversion 3 + +# Define the Python interpreter paths in the SRPM macros so that +# - they can be used in Build/Requires +# - they can be used in non-Python packages where requiring pythonX-devel would +# be an overkill + +# use the underscored macros to redefine the behavior of %%python3_version etc. +%__python2 /usr/bin/python2 +%__python3 /usr/bin/python%{python3_pkgversion} + +# use the non-underscored macros to refer to Python in spec, etc. +%python2 %__python2 +%python3 %__python3 + +# Make the unversioned %%{__python} macro error by default +%__python %{error:attempt to use unversioned python, define %%__python to %{__python2} or %{__python3} explicitly} + +# Users can use %%python only if they redefined %%__python (e.g. to %%__python3) +%python %__python + +# Define where Python wheels will be stored and the prefix of -wheel packages +# We want wheel subpackages named e.g. `python-pip-wheel` that +# install packages into `/usr/share/python-wheels`. Both names are not +# versioned, because they're used by all Python 3 stacks. +%python_wheel_pkg_prefix python +%python_wheel_dir %{_datadir}/%{python_wheel_pkg_prefix}-wheels + + +### BRP scripts (and related macros) + +## Modifies installation method in .dist-info/INSTALLER file to rpm +%python_rpm_in_distinfo 1 +## Automatically compile python files +%py_auto_byte_compile 1 +## Should python bytecompilation errors terminate a build? +%_python_bytecompile_errors_terminate_build 1 +## Should python bytecompilation compile outside python specific directories? +## This always causes errors when enabled +%_python_bytecompile_extra 0 +## Helper macro to unset $SOURCE_DATE_EPOCH if %%clamp_mtime_to_source_date_epoch is not set +%__env_unset_source_date_epoch_if_not_clamp_mtime %[0%{?clamp_mtime_to_source_date_epoch} == 0 ? "env -u SOURCE_DATE_EPOCH" : "env"] + +## The individual BRP scripts +%__brp_python_rpm_in_distinfo %{_rpmconfigdir}/openruyi/brp-python-rpm-in-distinfo +%__brp_python_bytecompile %{__env_unset_source_date_epoch_if_not_clamp_mtime} %{_rpmconfigdir}/openruyi/brp-python-bytecompile "" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}" "%{?_smp_build_ncpus:-j%{_smp_build_ncpus}}" +%__brp_fix_pyc_reproducibility %{_rpmconfigdir}/openruyi/brp-fix-pyc-reproducibility +%__brp_python_hardlink %{_rpmconfigdir}/openruyi/brp-python-hardlink + +## This macro is included in rpm-openruyi-config's %%__os_install_post +# Note that the order matters: +# 1. brp-python-rpm-in-distinfo modifies .dist-info/INSTALLER file +# 2. brp-python-bytecompile can create (or replace) pyc files +# 3. brp-fix-pyc-reproducibility can modify the pyc files from above +# 4. brp-python-hardlink de-duplicates identical pyc files +%__os_install_post_python \ + %{?python_rpm_in_distinfo:%{?__brp_python_rpm_in_distinfo}} \ + %{?py_auto_byte_compile:%{?__brp_python_bytecompile}} \ + %{?py_reproducible_pyc_path:%{?__brp_fix_pyc_reproducibility} "%{py_reproducible_pyc_path}"} \ + %{?__brp_python_hardlink} \ +%{nil} + + +# === Macros for Build/Requires tags using Python dist tags === +# - These macros need to be in macros.python-srpm, because BuildRequires tags +# get rendered as runtime requires into the metadata of SRPMs. + +# Converts Python dist name to a canonical format +%py_dist_name() %{lua:\ + name = rpm.expand("%{?1:%{1}}");\ + canonical = string.gsub(string.lower(name), "[^%w%[%]]+", "-");\ + print(canonical);\ +} + +# Creates Python 3 dist tag(s) after converting names to canonical format +# Needs to first put all arguments into a list, because invoking a different +# macro (%%py_dist_name) overwrites them +%py3_dist() %{lua:\ + python3_pkgversion = rpm.expand("%python3_pkgversion");\ + args = {}\ + arg = 1\ + while (true) do\ + name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\ + if (name == nil or name == '') then\ + break\ + end\ + args[arg] = name\ + arg = arg + 1\ + end\ + for arg, name in ipairs(args) do\ + canonical = rpm.expand("%py_dist_name " .. name);\ + print("python" .. python3_pkgversion .. "dist(" .. canonical .. ") ");\ + end\ +} + +# Macro to replace overly complicated references to PyPI source files. +# Expands to the pythonhosted URL for a package +# Accepts zero to three arguments: +# 1: The PyPI project name, defaulting to %%srcname if it is defined, then +# %%pypi_name if it is defined, then just %%name. +# 2: The PYPI version, defaulting to %%version with tildes stripped. +# 3: The file extension, defaulting to "tar.gz". (A period will be added +# automatically.) +# Requires %%__pypi_url and %%__pypi_default_extension to be defined. +%__pypi_url https://files.pythonhosted.org/packages/source/ +%__pypi_default_extension tar.gz + +%pypi_source() %{lua: + local src = rpm.expand('%1') + local ver = rpm.expand('%2') + local ext = rpm.expand('%3') + local url = rpm.expand('%__pypi_url') +\ + -- If no first argument, try %srcname, then %pypi_name, then %name + -- Note that rpm leaves macros unchanged if they are not defined. + if src == '%1' then + src = rpm.expand('%srcname') + end + if src == '%srcname' then + src = rpm.expand('%pypi_name') + end + if src == '%pypi_name' then + src = rpm.expand('%name') + end +\ + -- If no second argument, use %version + if ver == '%2' then + ver = rpm.expand('%version'):gsub('~', '') + end +\ + -- If no third argument, use the preset default extension + if ext == '%3' then + ext = rpm.expand('%__pypi_default_extension') + end +\ + local first = string.sub(src, 1, 1) +\ + print(url .. first .. '/' .. src .. '/' .. src .. '-' .. ver .. '.' .. ext) +} + +%py_provides() %{lua: + local python = require 'openruyi.srpm.python' + local name = rpm.expand('%1') + if name == '%1' then + rpm.expand('%{error:%%py_provides requires at least 1 argument, the name to provide}') + end + local evr = rpm.expand('%2') + if evr == '%2' then + evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}') + end + print('Provides: ' .. name .. ' = ' .. evr .. '\\n') + local provides = python.python_altprovides(name, evr) + for i, provide in ipairs(provides) do + print('Provides: ' .. provide .. '\\n') + end +} + +%python_extras_subpkg(n:i:f:FaA) %{expand:%{lua: + local option_n = '-n (name of the base package)' + local option_i = '-i (buildroot path to metadata)' + local option_f = '-f (builddir path to a filelist)' + local option_F = '-F (skip %%files section)' + local option_a = '-a (insert BuildArch: noarch)' + local option_A = '-A (do not insert BuildArch: noarch (default))' + local value_n = rpm.expand('%{-n*}') + local value_i = rpm.expand('%{-i*}') + local value_f = rpm.expand('%{-f*}') + local value_F = rpm.expand('%{-F}') + local value_a = rpm.expand('%{-a}') + local value_A = rpm.expand('%{-A}') + local args = rpm.expand('%{*}') + if value_n == '' then + rpm.expand('%{error:%%%0: missing option ' .. option_n .. '}') + end + if value_i == '' and value_f == '' and value_F == '' then + rpm.expand('%{error:%%%0: missing option ' .. option_i .. ' or ' .. option_f .. ' or ' .. option_F .. '}') + end + if value_i ~= '' and value_f ~= '' then + rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_f .. ' options are not possible}') + end + if value_i ~= '' and value_F ~= '' then + rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_F .. ' options are not possible}') + end + if value_f ~= '' and value_F ~= '' then + rpm.expand('%{error:%%%0: simultaneous ' .. option_f .. ' and ' .. option_F .. ' options are not possible}') + end + if value_a ~= '' and value_A ~= '' then + rpm.expand('%{error:%%%0: simultaneous ' .. option_a .. ' and ' .. option_A .. ' options are not possible}') + end + if args == '' then + rpm.expand('%{error:%%%0 requires at least one argument with "extras" name}') + end + local requires = 'Requires: ' .. value_n .. ' = %{?epoch:%{epoch}:}%{version}-%{release}' + for extras in args:gmatch('[^%s,]+') do + local rpmname = value_n .. '+' .. extras + local pkgdef = '%package -n ' .. rpmname + local summary = 'Summary: Metapackage for ' .. value_n .. ': ' .. extras .. ' extras' + local description = '%description -n ' .. rpmname .. '\\\n' + local current_line = 'This is a metapackage bringing in' + for _, word in ipairs({extras, 'extras', 'requires', 'for', value_n .. '.'}) do + local line = current_line .. ' ' .. word + if line:len() > 79 then + description = description .. current_line .. '\\\n' + current_line = word + else + current_line = line + end + end + description = description .. current_line .. '\\\n' .. + 'It makes sure the dependencies are installed.\\\n' + local files = '' + if value_i ~= '' then + files = '%files -n ' .. rpmname .. '\\\n' .. '%ghost ' .. value_i + elseif value_f ~= '' then + files = '%files -n ' .. rpmname .. ' -f ' .. value_f + end + local tags = summary .. '\\\n' .. requires + if value_a ~= '' then + tags = tags .. '\\\nBuildArch: noarch' + end + for i, line in ipairs({pkgdef, tags, description, files, ''}) do + print(line .. '\\\n') + end + end +}} diff --git a/SPECS/python-rpm-macros/macros.python3 b/SPECS/python-rpm-macros/macros.python3 new file mode 100644 index 00000000..8004a406 --- /dev/null +++ b/SPECS/python-rpm-macros/macros.python3 @@ -0,0 +1,108 @@ +# nb: $RPM_BUILD_ROOT is not set when the macros are expanded (at spec parse time) +# so we set it manually (to empty string), making our Python prefer the correct install scheme location +# platbase/base is explicitly set to %%{_prefix} to support custom values, such as /app for flatpaks +%__python3_sitelib %(RPM_BUILD_ROOT= %{__python3} -Esc "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") +%python3_sitelib %{_python_memoize -n __python3_sitelib -k __python3} + +%__python3_sitearch %(RPM_BUILD_ROOT= %{__python3} -Esc "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '%{_prefix}', 'base': '%{_prefix}'}))") +%python3_sitearch %{_python_memoize -n __python3_sitearch -k __python3} + +%__python3_version %(RPM_BUILD_ROOT= %{__python3} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") +%python3_version %{_python_memoize -n __python3_version -k __python3} + +%__python3_version_nodots %(RPM_BUILD_ROOT= %{__python3} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") +%python3_version_nodots %{_python_memoize -n __python3_version_nodots -k __python3} + +%__python3_platform %(RPM_BUILD_ROOT= %{__python3} -Esc "import sysconfig; print(sysconfig.get_platform())") +%python3_platform %{_python_memoize -n __python3_platform -k __python3} + +%__python3_platform_triplet %(RPM_BUILD_ROOT= %{__python3} -Esc "import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))") +%python3_platform_triplet %{_python_memoize -n __python3_platform_triplet -k __python3} + +%__python3_ext_suffix %(RPM_BUILD_ROOT= %{__python3} -Esc "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") +%python3_ext_suffix %{_python_memoize -n __python3_ext_suffix -k __python3} + +%__python3_cache_tag %(RPM_BUILD_ROOT= %{__python3} -Esc "import sys; print(sys.implementation.cache_tag)") +%python3_cache_tag %{_python_memoize -n __python3_cache_tag -k __python3} + +%py3dir %{_builddir}/python3-%{name}-%{version}-%{release} + +%_py3_shebang_s s +%__py3_shebang_P %(RPM_BUILD_ROOT= %{__python3} -Ic "import sys; print('P' if hasattr(sys.flags, 'safe_path') else '')") +%_py3_shebang_P %{_python_memoize -n __py3_shebang_P -k __python3} +%py3_shbang_opts -%{?_py3_shebang_s}%{?_py3_shebang_P} +%py3_shbang_opts_nodash %(opts=%{py3_shbang_opts}; echo ${opts#-}) +%py3_shebang_flags %(opts=%{py3_shbang_opts}; echo ${opts#-}) +%py3_shebang_fix %{expand:\\\ + if [ -z "%{?py3_shebang_flags}" ]; then + shebang_flags="-k" + else + shebang_flags="-ka%{py3_shebang_flags}" + fi + %{__python3} -B %{_rpmconfigdir}/openruyi/pathfix.py -pni %{__python3} $shebang_flags} + +%py3_install_wheel() %{expand:\\\ + %{__python3} -m pip install -I dist/%{1} --root %{buildroot} --prefix %{_prefix} --no-deps --no-index --no-warn-script-location + rm -rfv %{buildroot}%{_bindir}/__pycache__ + for distinfo in %{buildroot}%{python3_sitelib}/*.dist-info %{buildroot}%{python3_sitearch}/*.dist-info; do + if [ -f ${distinfo}/direct_url.json ]; then + rm -fv ${distinfo}/direct_url.json + sed -i '/direct_url.json/d' ${distinfo}/RECORD + fi + done +} + +# With $PATH and $PYTHONPATH set to the %%buildroot, +# try to import the Python 3 module(s) given as command-line args or read from file (-f). +# Respect the custom values of %%py3_shebang_flags or set nothing if it's undefined. +# Filter and check import on only top-level modules using -t flag. +# Exclude unwanted modules by passing their globs to -e option. +# Useful as a smoke test in %%check when running tests is not feasible. +# Use spaces or commas as separators if providing list directly. +# Use newlines as separators if providing list in a file. +%py3_check_import(e:tf:) %{expand:\\\ + PATH="%{buildroot}%{_bindir}:$PATH"\\\ + PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\ + _PYTHONSITE="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}"\\\ + PYTHONDONTWRITEBYTECODE=1\\\ + %{lua: + local command = "%{__python3} " + if rpm.expand("%{?py3_shebang_flags}") ~= "" then + command = command .. "-%{py3_shebang_flags}" + end + command = command .. " %{_rpmconfigdir}/openruyi/import_all_modules.py " + -- handle multiline arguments correctly + local args=rpm.expand('%{?**}'):gsub("[%s\\\\]*%s+", " ") + print(command .. args) + } +} + +# This only supports Python 3.5+ and will never work with Python 2. +# Hence, it has no Python version in the name. +%pycached() %{lua: + path = rpm.expand("%{?*}") + if (string.sub(path, "-3") ~= ".py") then + rpm.expand("%{error:%%pycached can only be used with paths explicitly ending with .py}") + else + print(path) + pyminor = path:match("/python3.(%d+)/") or "*" + dirname = path:match("(.*/)") + modulename = path:match(".*/([^/]+).py") + -- %%python3_cache_tag is not used here because this macro supports not-installed CPythons + print("\\n" .. dirname .. "__pycache__/" .. modulename .. ".cpython-3" .. pyminor .. "{,.opt-?}.pyc") + end +} + +# Environment variables used by %%pytest, %%tox or standalone, e.g.: +# %%{py3_test_envvars} %%{python3} -m unittest +%py3_test_envvars %{expand:\\\ + CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ + PATH="%{buildroot}%{_bindir}:$PATH"\\\ + PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\ + PYTHONDONTWRITEBYTECODE=1\\\ + %{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"}\\\ + PYTEST_XDIST_AUTO_NUM_WORKERS="${PYTEST_XDIST_AUTO_NUM_WORKERS:-%{_smp_build_ncpus}}"} + +# This is intended for Python 3 only, hence also no Python version in the name. +%__pytest /usr/bin/pytest%(test %{python3_pkgversion} == 3 || echo -%{python3_version}) +%pytest %py3_test_envvars %__pytest diff --git a/SPECS/python-rpm-macros/pathfix.py b/SPECS/python-rpm-macros/pathfix.py new file mode 100644 index 00000000..68083822 --- /dev/null +++ b/SPECS/python-rpm-macros/pathfix.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 + +import sys +import os +from stat import * +import getopt + +err = sys.stderr.write +dbg = err +rep = sys.stdout.write + +new_interpreter = None +preserve_timestamps = False +create_backup = True +keep_flags = False +add_flags = b'' + + +def main(): + global new_interpreter + global preserve_timestamps + global create_backup + global keep_flags + global add_flags + + usage = ('usage: %s -i /interpreter -p -n -k -a file-or-directory ...\n' % + sys.argv[0]) + try: + opts, args = getopt.getopt(sys.argv[1:], 'i:a:kpn') + except getopt.error as msg: + err(str(msg) + '\n') + err(usage) + sys.exit(2) + for o, a in opts: + if o == '-i': + new_interpreter = a.encode() + if o == '-p': + preserve_timestamps = True + if o == '-n': + create_backup = False + if o == '-k': + keep_flags = True + if o == '-a': + add_flags = a.encode() + if b' ' in add_flags: + err("-a option doesn't support whitespaces") + sys.exit(2) + if not new_interpreter or not new_interpreter.startswith(b'/') or \ + not args: + err('-i option or file-or-directory missing\n') + err(usage) + sys.exit(2) + bad = 0 + for arg in args: + if os.path.isdir(arg): + if recursedown(arg): bad = 1 + elif os.path.islink(arg): + err(arg + ': will not process symbolic links\n') + else: + if fix(arg): bad = 1 + sys.exit(bad) + + +def ispython(name): + return name.endswith('.py') + + +def recursedown(dirname): + dbg('recursedown(%r)\n' % (dirname,)) + bad = 0 + try: + names = os.listdir(dirname) + except OSError as msg: + err('%s: cannot list directory: %r\n' % (dirname, msg)) + return 1 + names.sort() + subdirs = [] + for name in names: + if name in (os.curdir, os.pardir): continue + fullname = os.path.join(dirname, name) + if os.path.islink(fullname): pass + elif os.path.isdir(fullname): + subdirs.append(fullname) + elif ispython(name): + if fix(fullname): bad = 1 + for fullname in subdirs: + if recursedown(fullname): bad = 1 + return bad + + +def fix(filename): +## dbg('fix(%r)\n' % (filename,)) + try: + f = open(filename, 'rb') + except IOError as msg: + err('%s: cannot open: %r\n' % (filename, msg)) + return 1 + with f: + line = f.readline() + fixed = fixline(line) + if line == fixed: + rep(filename+': no change\n') + return + head, tail = os.path.split(filename) + tempname = os.path.join(head, '@' + tail) + try: + g = open(tempname, 'wb') + except IOError as msg: + err('%s: cannot create: %r\n' % (tempname, msg)) + return 1 + with g: + rep(filename + ': updating\n') + g.write(fixed) + BUFSIZE = 8*1024 + while 1: + buf = f.read(BUFSIZE) + if not buf: break + g.write(buf) + + # Finishing touch -- move files + + mtime = None + atime = None + # First copy the file's mode to the temp file + try: + statbuf = os.stat(filename) + mtime = statbuf.st_mtime + atime = statbuf.st_atime + os.chmod(tempname, statbuf[ST_MODE] & 0o7777) + except OSError as msg: + err('%s: warning: chmod failed (%r)\n' % (tempname, msg)) + # Then make a backup of the original file as filename~ + if create_backup: + try: + os.rename(filename, filename + '~') + except OSError as msg: + err('%s: warning: backup failed (%r)\n' % (filename, msg)) + else: + try: + os.remove(filename) + except OSError as msg: + err('%s: warning: removing failed (%r)\n' % (filename, msg)) + # Now move the temp file to the original file + try: + os.rename(tempname, filename) + except OSError as msg: + err('%s: rename failed (%r)\n' % (filename, msg)) + return 1 + if preserve_timestamps: + if atime and mtime: + try: + os.utime(filename, (atime, mtime)) + except OSError as msg: + err('%s: reset of timestamp failed (%r)\n' % (filename, msg)) + return 1 + # Return success + return 0 + + +def parse_shebang(shebangline): + shebangline = shebangline.rstrip(b'\n') + start = shebangline.find(b' -') + if start == -1: + return b'' + return shebangline[start:] + + +def populate_flags(shebangline): + old_flags = b'' + if keep_flags: + old_flags = parse_shebang(shebangline) + if old_flags: + old_flags = old_flags[2:] + if not (old_flags or add_flags): + return b'' + # On Linux, the entire string following the interpreter name + # is passed as a single argument to the interpreter. + # e.g. "#! /usr/bin/python3 -W Error -s" runs "/usr/bin/python3 "-W Error -s" + # so shebang should have single '-' where flags are given and + # flag might need argument for that reasons adding new flags is + # between '-' and original flags + # e.g. #! /usr/bin/python3 -sW Error + return b' -' + add_flags + old_flags + + +def fixline(line): + if not line.startswith(b'#!'): + return line + + if b"python" not in line: + return line + + flags = populate_flags(line) + return b'#! ' + new_interpreter + flags + b'\n' + + +if __name__ == '__main__': + main() diff --git a/SPECS/python-rpm-macros/python-rpm-macros.spec b/SPECS/python-rpm-macros/python-rpm-macros.spec new file mode 100644 index 00000000..4aa3be78 --- /dev/null +++ b/SPECS/python-rpm-macros/python-rpm-macros.spec @@ -0,0 +1,147 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# The packages are called python(3)-(s)rpm-macros +# We never want python3-rpm-macros to provide python-rpm-macros +# We opt out from all Python name-based automatic provides and obsoletes +%undefine __pythonname_provides +%undefine __pythonname_obsoletes + +Name: python-rpm-macros +# The package version MUST be always the same as %%{__default_python3_version}. +# To have only one source of truth, we load the macro and use it. +# The macro is defined in python-srpm-macros. +%{lua: +if posix.stat(rpm.expand('%{SOURCE1}')) then + rpm.load(rpm.expand('%{SOURCE1}')) +elseif posix.stat('macros.python-srpm') then + -- something is parsing the spec without _sourcedir macro properly set + rpm.load('macros.python-srpm') +end +} +Version: %{__default_python3_version} +Release: %autorelease +Summary: The common Python RPM macros +License: MIT AND PSF-2.0 AND GPL-2.0-or-later +# Yeah I know... (sigh) +URL: https://src.fedoraproject.org/rpms/python-rpm-macros/ +# Macros +Source0: macros.python +Source1: macros.python-srpm +Source2: macros.python3 +Source3: macros.pybytecompile +# Lua files +Source4: python.lua +# Python code +%global compileall2_version 0.8.0 +Source5: https://github.com/fedora-python/compileall2/raw/v%{compileall2_version}/compileall2.py +Source6: import_all_modules.py +%global pathfix_version 1.0.0 +Source7: https://github.com/fedora-python/pathfix/raw/v%{pathfix_version}/pathfix.py +Source8: clamp_source_mtime.py +# BuildRoot Policy scripts +Source9: brp-python-bytecompile +Source10: brp-python-hardlink +Source11: brp-fix-pyc-reproducibility +Source12: brp-python-rpm-in-distinfo +BuildArch: noarch + +# For %%__default_python3_pkgversion used in %%python_provide +# For python.lua +# For compileall2.py +Requires: python-srpm-macros = %{version}-%{release} + +%description +This package contains the unversioned Python RPM macros, that most +implementations should rely on. + +You should not need to install this package manually as the various +python?-devel packages require it. So install a python-devel package instead. + +%package -n python-srpm-macros +Summary: RPM macros for building Python source packages + +# For directory structure and flags macros +# Versions before 190 contained some brp scripts moved into python-srpm-macros +Requires: rpm-config-openruyi + +# Bundle something +Provides: bundled(python3dist(compileall2)) = %{compileall2_version} + +%description -n python-srpm-macros +RPM macros for building Python source packages. + +%package -n python3-rpm-macros +Summary: RPM macros for building Python 3 packages + +# For %%__python3 and %%python3 +Requires: python-srpm-macros = %{version}-%{release} + +# For %%py_setup and import_all_modules.py +Requires: python-rpm-macros = %{version}-%{release} + +%description -n python3-rpm-macros +RPM macros for building Python 3 packages. + +%prep +%autosetup -c -T +cp -a %{sources} . + +# We want to have shebang in the script upstream but not here so +# the package with macros does not depend on Python. +sed -i '1s=^#!/usr/bin/env python3==' pathfix.py + +%install +mkdir -p %{buildroot}%{_rpmmacrodir} +install -m 644 macros.* %{buildroot}%{_rpmmacrodir}/ + +mkdir -p %{buildroot}%{_rpmluadir}/openruyi/srpm +install -p -m 644 -t %{buildroot}%{_rpmluadir}/openruyi/srpm python.lua + +mkdir -p %{buildroot}%{_rpmconfigdir}/openruyi +install -m 644 compileall2.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -m 644 clamp_source_mtime.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -m 644 import_all_modules.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -m 644 pathfix.py %{buildroot}%{_rpmconfigdir}/openruyi/ +install -m 755 brp-* %{buildroot}%{_rpmconfigdir}/openruyi/ + +# We define our own BRPs here to use the ones from the %%{buildroot}, +# that way, this package can be built when it includes them for the first time. +# It also ensures that: +# - our BRPs can execute +# - if our BRPs affect this package, we don't need to build it twice +%define add_buildroot() %{lua:print((macros[macros[1]]:gsub(macros._rpmconfigdir, macros.buildroot .. macros._rpmconfigdir)))} +%global __brp_python_bytecompile %{add_buildroot __brp_python_bytecompile} +%global __brp_python_hardlink %{add_buildroot __brp_python_hardlink} +%global __brp_fix_pyc_reproducibility %{add_buildroot __brp_fix_pyc_reproducibility} +%global __brp_python_rpm_in_distinfo %{add_buildroot __brp_python_rpm_in_distinfo} + +%check +# no macros in comments +grep -E '^#[^%%]*%%[^%%]' %{buildroot}%{_rpmmacrodir}/macros.* && exit 1 || true + +%files +%{_rpmmacrodir}/macros.python +%{_rpmmacrodir}/macros.pybytecompile +%{_rpmconfigdir}/openruyi/import_all_modules.py +%{_rpmconfigdir}/openruyi/pathfix.py + +%files -n python-srpm-macros +%{_rpmmacrodir}/macros.python-srpm +%{_rpmconfigdir}/openruyi/compileall2.py +%{_rpmconfigdir}/openruyi/clamp_source_mtime.py +%{_rpmconfigdir}/openruyi/brp-python-bytecompile +%{_rpmconfigdir}/openruyi/brp-python-hardlink +%{_rpmconfigdir}/openruyi/brp-fix-pyc-reproducibility +%{_rpmconfigdir}/openruyi/brp-python-rpm-in-distinfo +%{_rpmluadir}/openruyi/srpm/python.lua + +%files -n python3-rpm-macros +%{_rpmmacrodir}/macros.python3 + +%changelog +%{?autochangelog} diff --git a/SPECS/python-rpm-macros/python.lua b/SPECS/python-rpm-macros/python.lua new file mode 100644 index 00000000..bd30a857 --- /dev/null +++ b/SPECS/python-rpm-macros/python.lua @@ -0,0 +1,101 @@ +-- Convenience Lua functions that can be used within Python srpm/rpm macros + +-- Determine alternate names provided from the given name. +-- Used in pythonname provides generator, python_provide and py_provides. +-- If only_3_to_3_X is false/nil/unused there are 2 rules: +-- python3-foo -> python-foo, python3.X-foo +-- python3.X-foo -> python-foo, python3-foo +-- If only_3_to_3_X is true there is only 1 rule: +-- python3-foo -> python3.X-foo +-- There is no python-foo -> rule, python-foo packages are version agnostic. +-- Returns a table/array with strings. Empty when no rule matched. +local function python_altnames(name, only_3_to_3_X) + local xy = rpm.expand('%{__default_python3_pkgversion}') + local altnames = {} + local replaced + -- NB: dash needs to be escaped! + if name:match('^python3%-') then + local prefixes = only_3_to_3_X and {} or {'python-'} + for i, prefix in ipairs({'python' .. xy .. '-', table.unpack(prefixes)}) do + replaced = name:gsub('^python3%-', prefix) + table.insert(altnames, replaced) + end + elseif name:match('^python' .. xy .. '%-') and not only_3_to_3_X then + for i, prefix in ipairs({'python-', 'python3-'}) do + replaced = name:gsub('^python' .. xy .. '%-', prefix) + table.insert(altnames, replaced) + end + end + return altnames +end + + +local function __python_alttags(name, evr, tag_type) + -- for the "provides" tag_type we want also unversioned provides + local only_3_to_3_X = tag_type ~= "provides" + local operator = tag_type == "provides" and ' = ' or ' < ' + + -- global cache that tells what package NEVRs were already processed for the + -- given tag type + if __python_alttags_beenthere == nil then + __python_alttags_beenthere = {} + end + if __python_alttags_beenthere[tag_type] == nil then + __python_alttags_beenthere[tag_type] = {} + end + __python_alttags_beenthere[tag_type][name .. ' ' .. evr] = true + local alttags = {} + for i, altname in ipairs(python_altnames(name, only_3_to_3_X)) do + table.insert(alttags, altname .. operator .. evr) + end + return alttags +end + +-- For any given name and epoch-version-release, return provides except self. +-- Uses python_altnames under the hood +-- Returns a table/array with strings. +local function python_altprovides(name, evr) + return __python_alttags(name, evr, "provides") +end + +-- For any given name and epoch-version-release, return versioned obsoletes except self. +-- Uses python_altnames under the hood +-- Returns a table/array with strings. +local function python_altobsoletes(name, evr) + return __python_alttags(name, evr, "obsoletes") +end + + +local function __python_alttags_once(name, evr, tag_type) + -- global cache that tells what provides were already processed + if __python_alttags_beenthere == nil + or __python_alttags_beenthere[tag_type] == nil + or __python_alttags_beenthere[tag_type][name .. ' ' .. evr] == nil then + return __python_alttags(name, evr, tag_type) + else + return nil + end +end + +-- Like python_altprovides but only return something once. +-- For each argument can only be used once, returns nil otherwise. +-- Previous usage of python_altprovides counts as well. +local function python_altprovides_once(name, evr) + return __python_alttags_once(name, evr, "provides") +end + +-- Like python_altobsoletes but only return something once. +-- For each argument can only be used once, returns nil otherwise. +-- Previous usage of python_altobsoletes counts as well. +local function python_altobsoletes_once(name, evr) + return __python_alttags_once(name, evr, "obsoletes") +end + + +return { + python_altnames = python_altnames, + python_altprovides = python_altprovides, + python_altobsoletes = python_altobsoletes, + python_altprovides_once = python_altprovides_once, + python_altobsoletes_once = python_altobsoletes_once, +} diff --git a/SPECS/python-setuptools-gettext/python-setuptools-gettext.spec b/SPECS/python-setuptools-gettext/python-setuptools-gettext.spec new file mode 100644 index 00000000..6925dfe9 --- /dev/null +++ b/SPECS/python-setuptools-gettext/python-setuptools-gettext.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname setuptools_gettext + +Name: python-setuptools-gettext +Version: 0.1.14 +Release: %autorelease +License: GPL-2.0-or-later +URL: https://github.com/breezy-team/setuptools-gettext +Summary: Setuptools plugin for gettext +Provides: python3-setuptools-gettext +%python_provide python3-setuptools-gettext +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pytest +BuildRequires: gettext +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +This package provides a plugin for Setuptools for gettext. + +%generate_buildrequires +%pyproject_buildrequires + +%check -a +%pytest -v -rs + +%files -f %{pyproject_files} +%doc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-setuptools/0001-Revert-Always-rewrite-a-Python-shebang-to-python.patch b/SPECS/python-setuptools/0001-Revert-Always-rewrite-a-Python-shebang-to-python.patch new file mode 100644 index 00000000..7800fb4d --- /dev/null +++ b/SPECS/python-setuptools/0001-Revert-Always-rewrite-a-Python-shebang-to-python.patch @@ -0,0 +1,44 @@ +From 06a246f1fbd79d70951488d65d5fe6bfa4afd4ef Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Thu, 13 Mar 2025 11:52:42 +0100 +Subject: [PATCH] Revert "Always rewrite a Python shebang to #!python." + +This reverts commit c71266345c64fd662b5f95bbbc6e4536172f496d. +--- + setuptools/_distutils/command/build_scripts.py | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/setuptools/_distutils/command/build_scripts.py b/setuptools/_distutils/command/build_scripts.py +index 127c51d8d..05ba2c93c 100644 +--- a/setuptools/_distutils/command/build_scripts.py ++++ b/setuptools/_distutils/command/build_scripts.py +@@ -5,6 +5,7 @@ Implements the Distutils 'build_scripts' command.""" + import os + import re + import tokenize ++from distutils import sysconfig + from distutils._log import log + from stat import ST_MODE + from typing import ClassVar +@@ -105,8 +106,18 @@ class build_scripts(Command): + if shebang_match: + log.info("copying and adjusting %s -> %s", script, self.build_dir) + if not self.dry_run: ++ if not sysconfig.python_build: ++ executable = self.executable ++ else: ++ executable = os.path.join( ++ sysconfig.get_config_var("BINDIR"), ++ "python{}{}".format( ++ sysconfig.get_config_var("VERSION"), ++ sysconfig.get_config_var("EXE"), ++ ), ++ ) + post_interp = shebang_match.group(1) or '' +- shebang = f"#!python{post_interp}\n" ++ shebang = "#!" + executable + post_interp + "\n" + self._validate_shebang(shebang, f.encoding) + with open(outfile, "w", encoding=f.encoding) as outf: + outf.write(shebang) +-- +2.48.1 diff --git a/SPECS/python-setuptools/_multibuild b/SPECS/python-setuptools/_multibuild new file mode 100644 index 00000000..2eb4fdaf --- /dev/null +++ b/SPECS/python-setuptools/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/SPECS/python-setuptools/python-setuptools.spec b/SPECS/python-setuptools/python-setuptools.spec new file mode 100644 index 00000000..7e70b383 --- /dev/null +++ b/SPECS/python-setuptools/python-setuptools.spec @@ -0,0 +1,175 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global flavor @BUILD_FLAVOR@%{nil} +%global srcname setuptools +%global python_wheel_name %{srcname}-%{version}-py3-none-any.whl + +# If it is set to 1, the bootstrap process will be included +%if "%{flavor}" == "bootstrap" +%bcond bootstrap 1 +%else +%bcond bootstrap 0 +%endif + +%if %{with bootstrap} +Name: python-%{srcname}-bootstrap +%else +Name: python-%{srcname} +%endif +Version: 78.1.1 +Release: %autorelease +Summary: Easily build and distribute Python packages +License: MIT AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0) AND Python-2.0.1 AND LGPL-3.0-only +URL: https://pypi.python.org/pypi/setuptools +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +# setuptools rewrites all shebangs to "#!python" which breaks workflows +# where no external installers (usually rewriting this) are involved. +# https://github.com/pypa/setuptools/issues/4883 +# - Resolution: deprecated functionality won't be fixed. +# brp-mangle-shebang script cannot mangle this and fails for many pkgs. +Patch0: 0001-Revert-Always-rewrite-a-Python-shebang-to-python.patch + +BuildRequires: python3-devel +BuildRequires: expat + +%if %{with bootstrap} +BuildRequires: unzip +%endif + +# python3 bootstrap: this is built before the final build of python3, which +# adds the dependency on python3-rpm-generators, so we require it manually +BuildRequires: python3-rpm-generators +# we also use %%{_pyproject_wheeldir}, so an explicit requirement on the pyproject-macros is needed +BuildRequires: pyproject-rpm-macros + +%if %{without bootstrap} +# Not to use the pre-generated egg-info, we use setuptools from previous build to generate it +BuildRequires: python3-setuptools +%endif + +%description +Setuptools is a collection of enhancements to the Python distutils that allow +you to more easily build and distribute Python packages, especially ones that +have dependencies on other packages. + +This package also contains the runtime components of setuptools, necessary to +execute the software that requires pkg_resources. + +# Virtual provides for the packages bundled by setuptools. +# Bundled packages are defined in multiple files. Generate the list with: +# pip freeze --path setuptools/_vendor > vendored.txt +# %%{_rpmconfigdir}/pythonbundles.py --namespace 'python%3dist' vendored.txt +%global bundled %{expand: +Provides: bundled(python3dist(autocommand)) = 2.2.2 +Provides: bundled(python3dist(backports-tarfile)) = 1.2 +Provides: bundled(python3dist(importlib-metadata)) = 8 +Provides: bundled(python3dist(inflect)) = 7.3.1 +Provides: bundled(python3dist(jaraco-collections)) = 5.1 +Provides: bundled(python3dist(jaraco-context)) = 5.3 +Provides: bundled(python3dist(jaraco-functools)) = 4.0.1 +Provides: bundled(python3dist(jaraco-text)) = 3.12.1 +Provides: bundled(python3dist(more-itertools)) = 10.3 +Provides: bundled(python3dist(packaging)) = 24.2 +Provides: bundled(python3dist(platformdirs)) = 4.2.2 +Provides: bundled(python3dist(tomli)) = 2.0.1 +Provides: bundled(python3dist(typeguard)) = 4.3 +Provides: bundled(python3dist(typing-extensions)) = 4.12.2 +Provides: bundled(python3dist(wheel)) = 0.45.1 +Provides: bundled(python3dist(zipp)) = 3.19.2 +} + +%package -n python3-setuptools +Summary: Easily build and distribute Python 3 packages +%{bundled} + +# For users who might see ModuleNotFoundError: No module named 'pkg_resoureces' +# NB: Those are two different provides: one contains underscore, the other hyphen +%py_provides python3-pkg_resources +%py_provides python3-pkg-resources + +%description -n python3-setuptools +Setuptools is a collection of enhancements to the Python 3 distutils that allow +you to more easily build and distribute Python 3 packages, especially ones that +have dependencies on other packages. + +This package also contains the runtime components of setuptools, necessary to +execute the software that requires pkg_resources. + +%package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel +Summary: The setuptools wheel +%{bundled} + +%description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel +A Python wheel of setuptools to use with venv. + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +# Strip shbang +find setuptools pkg_resources -name \*.py | xargs sed -i -e '1 {/^#!\//d}' +# Remove bundled exes +rm -f setuptools/*.exe +# Don't ship these +rm -r docs/conf.py + +%if %{without bootstrap} +%generate_buildrequires +%pyproject_buildrequires -r +%endif + +%build +%if %{with bootstrap} +%{python3} setup.py bdist_wheel +mkdir -p %{_pyproject_wheeldir} +mv dist/%{python_wheel_name} %{_pyproject_wheeldir} +%else +%pyproject_wheel +%endif + +%install +%if %{with bootstrap} +mkdir -p %{buildroot}%{python3_sitelib} +unzip %{_pyproject_wheeldir}/%{python_wheel_name} -d %{buildroot}%{python3_sitelib} -x setuptools-%{version}.dist-info/RECORD +echo rpm > %{buildroot}%{python3_sitelib}/setuptools-%{version}.dist-info/INSTALLER +%else +%pyproject_install +%pyproject_save_files -l setuptools pkg_resources _distutils_hack +sed -Ei '/\/tests\b/d' %{pyproject_files} +%endif + +# https://github.com/pypa/setuptools/issues/2709 +find %{buildroot}%{python3_sitelib} -name tests -print0 | xargs -0 rm -r + +# Install the wheel for the python-setuptools-wheel package +mkdir -p %{buildroot}%{python_wheel_dir} +install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir} + +%files -n python3-setuptools %{?!with_bootstrap:-f %{pyproject_files}} +%doc docs/* NEWS.rst README.rst +%{python3_sitelib}/distutils-precedence.pth +%if %{with bootstrap} +%{python3_sitelib}/setuptools-%{version}.dist-info/ +%license %{python3_sitelib}/setuptools-%{version}.dist-info/licenses/LICENSE +%{python3_sitelib}/pkg_resources/ +%{python3_sitelib}/setuptools/ +%{python3_sitelib}/_distutils_hack/ +%endif + +%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel +%license LICENSE +# we own the dir for simplicity +%dir %{python_wheel_dir}/ +%{python_wheel_dir}/%{python_wheel_name} + +%changelog +%{?autochangelog} diff --git a/SPECS/python-setuptools_scm/python-setuptools_scm.spec b/SPECS/python-setuptools_scm/python-setuptools_scm.spec new file mode 100644 index 00000000..0cbb9a25 --- /dev/null +++ b/SPECS/python-setuptools_scm/python-setuptools_scm.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname setuptools_scm + +Name: python-%{srcname} +Version: 8.3.1 +Release: %autorelease +Summary: Blessed package to manage your versions by SCM tags +License: MIT +URL: https://github.com/pypa/setuptools_scm/ +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: expat + +%description +Setuptools_scm handles managing your Python package versions in SCM metadata. +It also handles file finders for the supported SCMs. + +%package -n python3-setuptools_scm +Summary: %{summary} + +%description -n python3-setuptools_scm +Setuptools_scm handles managing your Python package versions in SCM metadata. +It also handles file finders for the supported SCMs. + +%pyproject_extras_subpkg -n python%{python3_pkgversion}-setuptools_scm toml,rich + +%prep +%autosetup -p1 -n setuptools_scm-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files setuptools_scm + +%files -n python3-setuptools_scm -f %{pyproject_files} +%doc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-simplejson/python-simplejson.spec b/SPECS/python-simplejson/python-simplejson.spec new file mode 100644 index 00000000..f6ef277e --- /dev/null +++ b/SPECS/python-simplejson/python-simplejson.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname simplejson + +Name: python-%{srcname} +Version: 3.17.6 +Release: %autorelease +Summary: Json library for Python +License: (LicenseRef-Callaway-MIT OR LicenseRef-Callaway-AFL) AND (LicenseRef-Callaway-MIT OR GPL-2.0-only) +URL: https://simplejson.readthedocs.io/en/latest +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} + +%description +JSON (JavaScript Object Notation) is a subset of JavaScript +syntax (ECMA-262 3rd edition) used as a lightweight data interchange +format. + +%package -n python3-%{srcname} +Summary: Json library for Python + +%description -n python3-%{srcname} +JSON (JavaScript Object Notation) is a subset of JavaScript +syntax (ECMA-262 3rd edition) used as a lightweight data interchange +format. + +Simplejson exposes an API familiar to users of the standard library marshal +and pickle modules. It is the externally maintained version of the json +library contained in Python 2.6, but maintains compatibility with Python 2.5 +and (currently) has significant performance advantages, even without using +the optional C extension for speedups. Simplejson is also supported on +Python 3.3+. + +%generate_buildrequires +%pyproject_buildrequires + +%files -n python3-%{srcname} -f %{pyproject_files} +%license LICENSE* +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-six/python-six.spec b/SPECS/python-six/python-six.spec new file mode 100644 index 00000000..f20ac43e --- /dev/null +++ b/SPECS/python-six/python-six.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname six + +Name: python-%{srcname} +Version: 1.17.0 +Release: %autorelease +Summary: Python 2 and 3 compatibility utilities +License: MIT +URL: https://github.com/benjaminp/six +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: expat + +%description +Six is a Python 2 and 3 compatibility library. It provides utility functions +for smoothing over the differences between the Python versions with the goal +of writing Python code that is compatible on both Python versions. + +%package -n python3-six +Summary: %{summary} + +%description -n python3-six +Six is a Python 2 and 3 compatibility library. It provides utility functions +for smoothing over the differences between the Python versions with the goal +of writing Python code that is compatible on both Python versions. + +%prep +%autosetup -p1 -n six-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files -l six + +%files -n python3-six -f %{pyproject_files} +%doc README.rst documentation/index.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-smartypants/python-smartypants.spec b/SPECS/python-smartypants/python-smartypants.spec new file mode 100644 index 00000000..b2cad94c --- /dev/null +++ b/SPECS/python-smartypants/python-smartypants.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname smartypants + +Name: python-%{srcname} +Version: 2.0.2 +Release: %autorelease +License: BSD-3-Clause AND BSD-2-Clause +URL: https://github.com/leohemsted/smartypants.py +Summary: Translate punctuation characters into smart quotes +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +SmartyPants is a free web publishing plug-in for Movable +Type, Blosxom, and BBEdit that easily translates plain ASCII +punctuation characters into “smart” typographic punctuation HTML +entities. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-sphinxcontrib-devhelp/python-sphinxcontrib-devhelp.spec b/SPECS/python-sphinxcontrib-devhelp/python-sphinxcontrib-devhelp.spec new file mode 100644 index 00000000..7e8af76f --- /dev/null +++ b/SPECS/python-sphinxcontrib-devhelp/python-sphinxcontrib-devhelp.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: python-sphinxcontrib-devhelp +Version: 2.0.0 +Release: %autorelease +License: BSD-2-Clause +URL: https://github.com/sphinx-doc/sphinxcontrib-devhelp +Summary: Sphinx extension for creating Devhelp documents +Provides: python3-sphinxcontrib-devhelp +%python_provide python3-sphinxcontrib-devhelp +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib_devhelp/sphinxcontrib_devhelp-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l sphinxcontrib +auto +%description +sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. + +%generate_buildrequires +%pyproject_buildrequires + +%check + +%files -f %{pyproject_files} +%license LICENCE.rst +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-sphinxcontrib-serializinghtml/python-sphinxcontrib-serializinghtml.spec b/SPECS/python-sphinxcontrib-serializinghtml/python-sphinxcontrib-serializinghtml.spec new file mode 100644 index 00000000..f442498d --- /dev/null +++ b/SPECS/python-sphinxcontrib-serializinghtml/python-sphinxcontrib-serializinghtml.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname sphinxcontrib-serializinghtml + +Name: python-%{srcname} +Version: 2.0.0 +Release: %autorelease +License: BSD-2-clause +URL: https://github.com/sphinx-doc/sphinxcontrib-serializinghtml +Summary: Sphinx extension to serialize HTML files +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/sphinxcontrib_serializinghtml-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): -l sphinxcontrib +auto +%description +@code{sphinxcontrib-serializinghtml} is a Sphinx extension which outputs +"serialized" HTML files. + +%generate_buildrequires +%pyproject_buildrequires + +%check + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-sqlparse/python-sqlparse.spec b/SPECS/python-sqlparse/python-sqlparse.spec new file mode 100644 index 00000000..0b43f650 --- /dev/null +++ b/SPECS/python-sqlparse/python-sqlparse.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname sqlparse + +Name: python-%{srcname} +Version: 0.5.3 +Release: %autorelease +License: BSD-3-Clause +URL: https://github.com/andialbrecht/sqlparse +Summary: Non-validating SQL parser +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +Sqlparse is a non-validating SQL parser for Python. It +provides support for parsing, splitting and formatting SQL statements. + +%generate_buildrequires +%pyproject_buildrequires + +%check +%pytest -v tests + +%files -f %{pyproject_files} +%doc CHANGELOG README.rst +%{_bindir}/sqlformat + +%changelog +%{?autochangelog} diff --git a/SPECS/python-systemd/0001-docs-update-intersphinx-_-mapping.patch b/SPECS/python-systemd/0001-docs-update-intersphinx-_-mapping.patch new file mode 100644 index 00000000..b548edfd --- /dev/null +++ b/SPECS/python-systemd/0001-docs-update-intersphinx-_-mapping.patch @@ -0,0 +1,27 @@ +From 48bda63c81b43abde0d584b02c017aeb080316ac Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 19 Jan 2025 16:52:41 +0100 +Subject: [PATCH] docs: update intersphinx_mapping + +Newer sphinx doesn't like the old syntax: + Running Sphinx v8.1.3 + loading translations [en]... done + making output directory... done + Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`. + ERROR: Invalid value `None` in intersphinx_mapping['http://docs.python.org/']. Expected a two-element tuple or list. +--- + docs/conf.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/docs/conf.py b/docs/conf.py +index 05df507..c4ca874 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -275,6 +275,5 @@ + # Allow duplicate toc entries. + #epub_tocdup = True + +- + # Example configuration for intersphinx: refer to the Python standard library. +-intersphinx_mapping = {'http://docs.python.org/': None} ++intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/SPECS/python-systemd/python-systemd.spec b/SPECS/python-systemd/python-systemd.spec new file mode 100644 index 00000000..6028b115 --- /dev/null +++ b/SPECS/python-systemd/python-systemd.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: python-systemd +Version: 235 +Release: %autorelease +Summary: Python module wrapping libsystemd functionality +License: LGPL-2.1-or-later +URL: https://github.com/systemd/python-systemd +Provides: python3-systemd +%python_provide python3-systemd +#!RemoteAsset +Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: pyproject + +# https://github.com/systemd/python-systemd/pull/140 +Patch0: 0001-docs-update-intersphinx-_-mapping.patch + +BuildOption(install): systemd +auto + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python-rpm-macros +BuildRequires: pytest +BuildRequires: pkgconfig(libsystemd) + +%description +Python module for native access to the libsystemd facilities. Functionality +includes sending of structured messages to the journal and reading journal +files, querying machine and boot identifiers and a lists of message identifiers +provided by systemd. Other functionality provided the library is also wrapped. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* +%license LICENSE.txt +%changelog +%{?autochangelog} diff --git a/SPECS/python-toml/python-toml.spec b/SPECS/python-toml/python-toml.spec new file mode 100644 index 00000000..d5df548b --- /dev/null +++ b/SPECS/python-toml/python-toml.spec @@ -0,0 +1,37 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname toml + +Name: python-%{srcname} +Version: 0.10.2 +Release: %autorelease +Summary: Library for TOML +License: MIT +URL: https://github.com/uiri/toml +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +python-toml is a library for parsing and creating Tom's Obvious, Minimal +Language (TOML) configuration files. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%license LICENSE +%doc README.rst + +%changelog +%{?autochangelog} diff --git a/SPECS/python-tomlkit/python-tomlkit.spec b/SPECS/python-tomlkit/python-tomlkit.spec new file mode 100644 index 00000000..6c133d62 --- /dev/null +++ b/SPECS/python-tomlkit/python-tomlkit.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname tomlkit + +Name: python-%{srcname} +Version: 0.13.2 +Release: %autorelease +License: MIT +URL: https://github.com/sdispater/tomlkit +Summary: Style-preserving TOML library +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros + +BuildRequires: pytest +BuildRequires: python3dist(pyyaml) + +BuildSystem: pyproject +BuildOption(install): %{srcname} +auto +%description +TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that +preserves all comments, indentations, whitespace and internal element ordering, +and makes them accessible and editable via an intuitive API. It can also +create new TOML documents from scratch using the provided helpers. Part of the +implementation has been adapted, improved, and fixed from Molten. + +%generate_buildrequires +%pyproject_buildrequires -r + +%check +%pytest + +%files -f %{pyproject_files} +%license LICENSE +%doc README.md + +%changelog +%{?autochangelog} diff --git a/SPECS/python-trove-classifiers/0001-Move-to-PEP-621-declarative-metadata.patch b/SPECS/python-trove-classifiers/0001-Move-to-PEP-621-declarative-metadata.patch new file mode 100644 index 00000000..a42c5367 --- /dev/null +++ b/SPECS/python-trove-classifiers/0001-Move-to-PEP-621-declarative-metadata.patch @@ -0,0 +1,105 @@ +From 5f61e6432496f3382b9d57bd88ca114b6e1efdb8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= +Date: Fri, 1 Nov 2024 14:02:23 +0100 +Subject: [PATCH] Move to PEP 621 declarative metadata +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Co-Authored-By: Bartek Sokorski +Co-Authored-By: Miro HronĨok +--- + pyproject.toml | 34 +++++++++++++++++++++++++++++++++- + setup.py | 36 ------------------------------------ + 2 files changed, 33 insertions(+), 37 deletions(-) + delete mode 100644 setup.py + +diff --git a/pyproject.toml b/pyproject.toml +index 05374a2..d91f3c9 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,7 +1,39 @@ + [build-system] +-requires = ["setuptools", "calver"] ++requires = ["setuptools >= 61.0"] + build-backend = "setuptools.build_meta" + ++[project] ++name = "trove-classifiers" ++version = "@@VERSION@@" ++readme = "README.md" ++description = "Canonical source for classifiers on PyPI (pypi.org)." ++authors = [{name = "The PyPI Admins", email = "admin@pypi.org"}] ++classifiers = [ ++ "Development Status :: 5 - Production/Stable", ++ "Intended Audience :: Developers", ++ "License :: OSI Approved :: Apache Software License", ++ "Programming Language :: Python :: 3", ++ "Typing :: Typed", ++] ++keywords = ["classifiers"] ++ ++[project.urls] ++Homepage = "https://github.com/pypa/trove-classifiers" ++ ++[project.scripts] ++trove-classifiers = "trove_classifiers.__main__:cli" ++ ++[tool.setuptools] ++package-dir = {"" = "src"} ++include-package-data = false ++ ++[tool.setuptools.packages.find] ++where = ["src"] ++namespaces = false ++ ++[tool.setuptools.package-data] ++"*" = ["py.typed"] ++ + [tool.mypy] + strict = true + warn_unreachable = true +diff --git a/setup.py b/setup.py +deleted file mode 100644 +index d8d85e4..0000000 +--- a/setup.py ++++ /dev/null +@@ -1,36 +0,0 @@ +-from io import open +-from os import path +- +-from setuptools import setup, find_packages +- +-here = path.abspath(path.dirname(__file__)) +- +-# Get the long description from the README file +-with open(path.join(here, "README.md"), encoding="utf-8") as f: +- long_description = f.read() +- +-setup( +- name="trove-classifiers", +- description="Canonical source for classifiers on PyPI (pypi.org).", +- long_description=long_description, +- long_description_content_type="text/markdown", +- url="https://github.com/pypa/trove-classifiers", +- author="The PyPI Admins", +- author_email="admin@pypi.org", +- classifiers=[ +- "Development Status :: 5 - Production/Stable", +- "Intended Audience :: Developers", +- "License :: OSI Approved :: Apache Software License", +- "Programming Language :: Python :: 3", +- "Typing :: Typed", +- ], +- keywords="classifiers", +- package_dir={"": "src"}, +- packages=find_packages(where="src"), +- package_data={"": ["py.typed"]}, +- use_calver="%Y.%m.%d.%H", +- setup_requires=["calver"], +- entry_points={ +- "console_scripts": ["trove-classifiers=trove_classifiers.__main__:cli"], +- }, +-) +-- +2.49.0 diff --git a/SPECS/python-trove-classifiers/python-trove-classifiers.spec b/SPECS/python-trove-classifiers/python-trove-classifiers.spec new file mode 100644 index 00000000..433dfe60 --- /dev/null +++ b/SPECS/python-trove-classifiers/python-trove-classifiers.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname trove_classifiers + +Name: python-trove-classifiers +Version: 2025.8.26.11 +Release: %autorelease +Summary: Canonical source for classifiers on PyPI (pypi.org) +License: Apache-2.0 +URL: https://github.com/pypa/trove-classifiers +# TODO: Use %%{pypi_source %%{srcname} %%{version}} in the future - 251 +# Otherwise https://files.pythonhosted.org/packages/source/a/abc/%%{srcname}-%%{version}.tar.gz +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +# Drop dependency on calver which is not packaged +# This patch is rebased version of upstream PR: +# https://github.com/pypa/trove-classifiers/pull/126/commits/809156bb35852bcaa1c753e0165f1814f2bcedf6 +Patch0: 0001-Move-to-PEP-621-declarative-metadata.patch + +BuildOption(install): trove_classifiers + +BuildRequires: python3-devel +BuildRequires: python3-packaging +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: expat + +%description +Canonical source for classifiers on PyPI. +Classifiers categorize projects per PEP 301. Use this package to validate +classifiers in packages for PyPI upload or download. + +%package -n python3-trove-classifiers +Summary: %{summary} + +%description -n python3-trove-classifiers +Canonical source for classifiers on PyPI. +Classifiers categorize projects per PEP 301. Use this package to validate +classifiers in packages for PyPI upload or download. + +%prep -a +# Replace @@VERSION@@ with %%version +sed -i 's/@@VERSION@@/%{version}/g' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires + +%files -n python3-trove-classifiers -f %{pyproject_files} +%doc README.* +%{_bindir}/trove-classifiers + +%changelog +%{?autochangelog} diff --git a/SPECS/python-typogrify/python-typogrify.spec b/SPECS/python-typogrify/python-typogrify.spec new file mode 100644 index 00000000..1f9d50fd --- /dev/null +++ b/SPECS/python-typogrify/python-typogrify.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname typogrify + +Name: python-%{srcname} +Version: 2.1.0 +Release: %autorelease +License: BSD-3-Clause +URL: https://github.com/justinmayer/typogrify +Summary: Filters to transform text into typographically-improved HTML +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{srcname} +auto + +BuildRequires: python3-devel +# For check +BuildRequires: pytest +BuildRequires: python3-jinja2 +BuildRequires: python3-django + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +%description +@code{typogrify} provides a set of custom filters that automatically +apply various transformations to plain text in order to yield +typographically-improved HTML. While often used in conjunction with Jinja and +Django template systems, the filters can be used in any environment. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-urllib3/python-urllib3.spec b/SPECS/python-urllib3/python-urllib3.spec new file mode 100644 index 00000000..3905bded --- /dev/null +++ b/SPECS/python-urllib3/python-urllib3.spec @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname urllib3 + +Name: python-%{srcname} +Version: 2.5.0 +Release: %autorelease +License: MIT +URL: https://urllib3.readthedocs.io/ +Summary: HTTP library with thread-safe connection pooling +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/u/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: pytest +BuildSystem: pyproject +BuildOption(install): -l %{srcname} +auto +%description +Urllib3 supports features left out of urllib and urllib2 libraries. It +can reuse the same socket connection for multiple requests, it can POST files, +supports url redirection and retries, and also gzip and deflate decoding. + +%generate_buildrequires +%pyproject_buildrequires + +# TODO: Add tests requires. +%check + + + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-webencodings/python-webencodings.spec b/SPECS/python-webencodings/python-webencodings.spec new file mode 100644 index 00000000..59b21358 --- /dev/null +++ b/SPECS/python-webencodings/python-webencodings.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname webencodings + +Name: python-%{srcname} +Version: 0.5.1 +Release: %autorelease +License: BSD-3-Clause +URL: https://github.com/SimonSapin/python-webencodings +Summary: Character encoding aliases for legacy web content +Provides: python3-%{srcname} +%python_provide python3-%{srcname} +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/w/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: python3-devel +BuildSystem: pyproject +BuildOption(install): %{srcname} +auto +%description +In order to be compatible with legacy web content when interpreting +something like @code{Content-Type: text/html; charset=latin1}, tools need +to use a particular set of aliases for encoding labels as well as some +overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on +the web are actually aliases for @code{windows-1252}, and a @code{UTF-8} +or @code{UTF-16} BOM takes precedence over any other encoding declaration. +The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard +defines all such details so that implementations do not have to +reverse-engineer each other. + +This module implements the Encoding standard and has encoding labels and +BOM detection, but the actual implementation for encoders and decoders +is Python’s. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README* + +%changelog +%{?autochangelog} diff --git a/SPECS/python-wheel/0001-3028d3.patch b/SPECS/python-wheel/0001-3028d3.patch new file mode 100644 index 00000000..8bec63f5 --- /dev/null +++ b/SPECS/python-wheel/0001-3028d3.patch @@ -0,0 +1,125 @@ +From 3028d38b5aec19f966660de8e24c45bb5c23f359 Mon Sep 17 00:00:00 2001 +From: shenxianpeng +Date: Sun, 16 Mar 2025 01:35:32 +0800 +Subject: [PATCH] Fixed test failures (#651) + +--- + tests/test_bdist_wheel.py | 4 ++-- + tests/test_tagopt.py | 18 +++++++++--------- + tests/testdata/unicode.dist/setup.py | 2 +- + 3 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/tests/test_bdist_wheel.py b/tests/test_bdist_wheel.py +index fcb2dfc4..21eddd02 100644 +--- a/tests/test_bdist_wheel.py ++++ b/tests/test_bdist_wheel.py +@@ -79,9 +79,9 @@ def test_no_scripts(wheel_paths): + + + def test_unicode_record(wheel_paths): +- path = next(path for path in wheel_paths if "unicode.dist" in path) ++ path = next(path for path in wheel_paths if "unicode_dist" in path) + with ZipFile(path) as zf: +- record = zf.read("unicode.dist-0.1.dist-info/RECORD") ++ record = zf.read("unicode_dist-0.1.dist-info/RECORD") + + assert "åäö_日本語.py".encode() in record + +diff --git a/tests/test_tagopt.py b/tests/test_tagopt.py +index 5335af44..5733e1a9 100644 +--- a/tests/test_tagopt.py ++++ b/tests/test_tagopt.py +@@ -14,7 +14,7 @@ + from setuptools import setup, Extension + + setup( +- name="Test", ++ name="test", + version="1.0", + author_email="author@example.com", + py_modules=["test"], +@@ -63,7 +63,7 @@ def test_default_tag(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name == f"Test-1.0-py{sys.version_info[0]}-none-any.whl" ++ assert wheels[0].name == f"test-1.0-py{sys.version_info[0]}-none-any.whl" + assert wheels[0].suffix == ".whl" + + +@@ -76,7 +76,7 @@ def test_build_number(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name == f"Test-1.0-1-py{sys.version_info[0]}-none-any.whl" ++ assert wheels[0].name == f"test-1.0-1-py{sys.version_info[0]}-none-any.whl" + assert wheels[0].suffix == ".whl" + + +@@ -89,7 +89,7 @@ def test_explicit_tag(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name.startswith("Test-1.0-py32-") ++ assert wheels[0].name.startswith("test-1.0-py32-") + assert wheels[0].suffix == ".whl" + + +@@ -101,7 +101,7 @@ def test_universal_tag(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name.startswith("Test-1.0-py2.py3-") ++ assert wheels[0].name.startswith("test-1.0-py2.py3-") + assert wheels[0].suffix == ".whl" + + +@@ -114,7 +114,7 @@ def test_universal_beats_explicit_tag(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name.startswith("Test-1.0-py2.py3-") ++ assert wheels[0].name.startswith("test-1.0-py2.py3-") + assert wheels[0].suffix == ".whl" + + +@@ -129,7 +129,7 @@ def test_universal_in_setup_cfg(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name.startswith("Test-1.0-py2.py3-") ++ assert wheels[0].name.startswith("test-1.0-py2.py3-") + assert wheels[0].suffix == ".whl" + + +@@ -144,7 +144,7 @@ def test_pythontag_in_setup_cfg(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name.startswith("Test-1.0-py32-") ++ assert wheels[0].name.startswith("test-1.0-py32-") + assert wheels[0].suffix == ".whl" + + +@@ -157,7 +157,7 @@ def test_legacy_wheel_section_in_setup_cfg(temp_pkg): + assert dist_dir.is_dir() + wheels = list(dist_dir.iterdir()) + assert len(wheels) == 1 +- assert wheels[0].name.startswith("Test-1.0-py2.py3-") ++ assert wheels[0].name.startswith("test-1.0-py2.py3-") + assert wheels[0].suffix == ".whl" + + +diff --git a/tests/testdata/unicode.dist/setup.py b/tests/testdata/unicode.dist/setup.py +index ec66d1e6..46ef0a10 100644 +--- a/tests/testdata/unicode.dist/setup.py ++++ b/tests/testdata/unicode.dist/setup.py +@@ -3,7 +3,7 @@ + from setuptools import setup + + setup( +- name="unicode.dist", ++ name="unicode_dist", + version="0.1", + description="A testing distribution \N{SNOWMAN}", + packages=["unicodedist"], diff --git a/SPECS/python-wheel/0002-adjusts-tests-for-setuptools-78.patch b/SPECS/python-wheel/0002-adjusts-tests-for-setuptools-78.patch new file mode 100644 index 00000000..484182e1 --- /dev/null +++ b/SPECS/python-wheel/0002-adjusts-tests-for-setuptools-78.patch @@ -0,0 +1,42 @@ +From 0d9b84905461d58892907296e1af5d530a32894c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Wed, 16 Apr 2025 14:05:09 +0200 +Subject: [PATCH] Adjusts tests for setuptools 78+ + +--- + tests/test_bdist_wheel.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/test_bdist_wheel.py b/tests/test_bdist_wheel.py +index fcb2dfc..2feef0d 100644 +--- a/tests/test_bdist_wheel.py ++++ b/tests/test_bdist_wheel.py +@@ -132,7 +132,7 @@ def test_licenses_default(dummy_dist, monkeypatch, tmp_path): + ) + with WheelFile("dist/dummy_dist-1.0-py2.py3-none-any.whl") as wf: + license_files = { +- "dummy_dist-1.0.dist-info/" + fname for fname in DEFAULT_LICENSE_FILES ++ "dummy_dist-1.0.dist-info/licenses/" + fname for fname in DEFAULT_LICENSE_FILES + } + assert set(wf.namelist()) == DEFAULT_FILES | license_files + +@@ -146,7 +146,7 @@ def test_licenses_deprecated(dummy_dist, monkeypatch, tmp_path): + [sys.executable, "setup.py", "bdist_wheel", "-b", str(tmp_path), "--universal"] + ) + with WheelFile("dist/dummy_dist-1.0-py2.py3-none-any.whl") as wf: +- license_files = {"dummy_dist-1.0.dist-info/DUMMYFILE"} ++ license_files = {"dummy_dist-1.0.dist-info/licenses/licenses/DUMMYFILE"} + assert set(wf.namelist()) == DEFAULT_FILES | license_files + + +@@ -171,7 +171,7 @@ def test_licenses_override(dummy_dist, monkeypatch, tmp_path, config_file, confi + ) + with WheelFile("dist/dummy_dist-1.0-py2.py3-none-any.whl") as wf: + license_files = { +- "dummy_dist-1.0.dist-info/" + fname for fname in {"DUMMYFILE", "LICENSE"} ++ "dummy_dist-1.0.dist-info/licenses/" + fname for fname in {"licenses/DUMMYFILE", "LICENSE"} + } + assert set(wf.namelist()) == DEFAULT_FILES | license_files + +-- +2.49.0 diff --git a/SPECS/python-wheel/python-wheel.spec b/SPECS/python-wheel/python-wheel.spec new file mode 100644 index 00000000..2b47f785 --- /dev/null +++ b/SPECS/python-wheel/python-wheel.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Virtual provides for the packages bundled by wheel. +# %%{_rpmconfigdir}/pythonbundles.py src/wheel/vendored/vendor.txt --namespace 'python%%{python3_pkgversion}dist' +%global bundled %{expand: +Provides: bundled(python%{python3_pkgversion}dist(packaging)) = 24 +} + +Name: python-wheel +Version: 0.45.1 +Release: %autorelease +Summary: Built-package format for Python +License: MIT AND (Apache-2.0 OR BSD-2-Clause) +URL: https://github.com/pypa/wheel +#!RemoteAsset +Source: %{url}/archive/%{version}/wheel-%{version}.tar.gz +BuildArch: noarch + +# Compatibility with the setuptools 75+ +# https://github.com/pypa/wheel/issues/650 +# https://github.com/pypa/wheel/commit/3028d3.patch +Patch: 0001-3028d3.patch +# Compatibility with the setuptools 78+ (PEP 639) +# Upstream has removed this code entirely instead +# https://github.com/pypa/wheel/pull/655 +Patch: 0002-adjusts-tests-for-setuptools-78.patch + +BuildRequires: python3-devel +BuildRequires: expat + +%description +This is a command line tool for manipulating Python wheel files, +as defined in PEP 427. It contains the following functionality: + +- Convert .egg archives into .whl. +- Unpack wheel archives. +- Repack wheel archives. +- Add or remove tags in existing wheel archives. + +%package -n python3-wheel +Summary: %{summary} +%{bundled} + +%description -n python3-wheel +This is a command line tool for manipulating Python wheel files, +as defined in PEP 427. It contains the following functionality: + +- Convert .egg archives into .whl. +- Unpack wheel archives. +- Repack wheel archives. +- Add or remove tags in existing wheel archives. + +%prep +%autosetup -n wheel-%{version} -p1 + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files -l wheel +mv %{buildroot}%{_bindir}/wheel{,-3} +ln -s wheel-3 %{buildroot}%{_bindir}/wheel + +%files -n python%{python3_pkgversion}-wheel -f %{pyproject_files} +%doc README.rst +%{_bindir}/wheel-3 +%{_bindir}/wheel + +%changelog +%{?autochangelog} diff --git a/SPECS/python/0001-change-user-install-location.patch b/SPECS/python/0001-change-user-install-location.patch new file mode 100644 index 00000000..a4a78b66 --- /dev/null +++ b/SPECS/python/0001-change-user-install-location.patch @@ -0,0 +1,174 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 15 Feb 2021 12:19:27 +0100 +Subject: 00251: Change user install location +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Set values of base and platbase in sysconfig from /usr +to /usr/local when RPM build is not detected +to make pip and similar tools install into separate location. + +Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe +Downstream only. + +We've tried to rework in Fedora 36/Python 3.10 to follow https://bugs.python.org/issue43976 +but we have identified serious problems with that approach, +see https://bugzilla.redhat.com/2026979 or https://bugzilla.redhat.com/2097183 + +pypa/distutils integration: https://github.com/pypa/distutils/pull/70 + +Co-authored-by: Petr Viktorin +Co-authored-by: Miro Hrončok +Co-authored-by: Michal Cyprian +Co-authored-by: Lumír Balhar +--- + Lib/site.py | 9 ++++++- + Lib/sysconfig/__init__.py | 50 +++++++++++++++++++++++++++++++++++++- + Lib/test/test_sysconfig.py | 17 +++++++++++-- + 3 files changed, 72 insertions(+), 4 deletions(-) + +diff --git a/Lib/site.py b/Lib/site.py +index aedf36399c..2ae49a8029 100644 +--- a/Lib/site.py ++++ b/Lib/site.py +@@ -415,8 +415,15 @@ def getsitepackages(prefixes=None): + return sitepackages + + def addsitepackages(known_paths, prefixes=None): +- """Add site-packages to sys.path""" ++ """Add site-packages to sys.path ++ ++ '/usr/local' is included in PREFIXES if RPM build is not detected ++ to make packages installed into this location visible. ++ ++ """ + _trace("Processing global site-packages") ++ if ENABLE_USER_SITE and 'RPM_BUILD_ROOT' not in os.environ: ++ PREFIXES.insert(0, "/usr/local") + for sitedir in getsitepackages(prefixes): + if os.path.isdir(sitedir): + addsitedir(sitedir, known_paths) +diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py +index 510c7b9568..6e4e07e43b 100644 +--- a/Lib/sysconfig/__init__.py ++++ b/Lib/sysconfig/__init__.py +@@ -106,6 +106,12 @@ + else: + _INSTALL_SCHEMES['venv'] = _INSTALL_SCHEMES['posix_venv'] + ++# For a brief period of time in the Fedora 36 life cycle, ++# this installation scheme existed and was documented in the release notes. ++# For backwards compatibility, we keep it here (at least on 3.10 and 3.11). ++_INSTALL_SCHEMES['rpm_prefix'] = _INSTALL_SCHEMES['posix_prefix'] ++ ++ + def _get_implementation(): + return 'Python' + +@@ -167,6 +173,19 @@ def joinuser(*args): + }, + } + ++# This is used by distutils.command.install in the stdlib ++# as well as pypa/distutils (e.g. bundled in setuptools). ++# The self.prefix value is set to sys.prefix + /local/ ++# if neither RPM build nor virtual environment is ++# detected to make distutils install packages ++# into the separate location. ++# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++if (not (hasattr(sys, 'real_prefix') or ++ sys.prefix != sys.base_prefix) and ++ 'RPM_BUILD_ROOT' not in os.environ): ++ _prefix_addition = '/local' ++ ++ + _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include', + 'scripts', 'data') + +@@ -266,11 +285,40 @@ def _extend_dict(target_dict, other_dict): + target_dict[key] = value + + ++_CONFIG_VARS_LOCAL = None ++ ++ ++def _config_vars_local(): ++ # This function returns the config vars with prefixes amended to /usr/local ++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++ global _CONFIG_VARS_LOCAL ++ if _CONFIG_VARS_LOCAL is None: ++ _CONFIG_VARS_LOCAL = dict(get_config_vars()) ++ _CONFIG_VARS_LOCAL['base'] = '/usr/local' ++ _CONFIG_VARS_LOCAL['platbase'] = '/usr/local' ++ return _CONFIG_VARS_LOCAL ++ ++ + def _expand_vars(scheme, vars): + res = {} + if vars is None: + vars = {} +- _extend_dict(vars, get_config_vars()) ++ ++ # when we are not in a virtual environment or an RPM build ++ # we change '/usr' to '/usr/local' ++ # to avoid surprises, we explicitly check for the /usr/ prefix ++ # Python virtual environments have different prefixes ++ # we only do this for posix_prefix, not to mangle the venv scheme ++ # posix_prefix is used by sudo pip install ++ # we only change the defaults here, so explicit --prefix will take precedence ++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++ if (scheme == 'posix_prefix' and ++ sys.prefix == '/usr' and ++ 'RPM_BUILD_ROOT' not in os.environ): ++ _extend_dict(vars, _config_vars_local()) ++ else: ++ _extend_dict(vars, get_config_vars()) ++ + if os.name == 'nt': + # On Windows we want to substitute 'lib' for schemes rather + # than the native value (without modifying vars, in case it +diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py +index aca02c06bc..a4d0db0da8 100644 +--- a/Lib/test/test_sysconfig.py ++++ b/Lib/test/test_sysconfig.py +@@ -130,8 +130,19 @@ def test_get_path(self): + for scheme in _INSTALL_SCHEMES: + for name in _INSTALL_SCHEMES[scheme]: + expected = _INSTALL_SCHEMES[scheme][name].format(**config_vars) ++ tested = get_path(name, scheme) ++ # https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe ++ if tested.startswith('/usr/local'): ++ # /usr/local should only be used in posix_prefix ++ self.assertEqual(scheme, 'posix_prefix') ++ # Fedora CI runs tests for venv and virtualenv that check for other prefixes ++ self.assertEqual(sys.prefix, '/usr') ++ # When building the RPM of Python, %check runs this with RPM_BUILD_ROOT set ++ # Fedora CI runs this with RPM_BUILD_ROOT unset ++ self.assertNotIn('RPM_BUILD_ROOT', os.environ) ++ tested = tested.replace('/usr/local', '/usr') + self.assertEqual( +- os.path.normpath(get_path(name, scheme)), ++ os.path.normpath(tested), + os.path.normpath(expected), + ) + +@@ -386,7 +397,7 @@ def test_get_config_h_filename(self): + self.assertTrue(os.path.isfile(config_h), config_h) + + def test_get_scheme_names(self): +- wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv'] ++ wanted = ['nt', 'posix_home', 'posix_prefix', 'posix_venv', 'nt_venv', 'venv', 'rpm_prefix'] + if HAS_USER_BASE: + wanted.extend(['nt_user', 'osx_framework_user', 'posix_user']) + self.assertEqual(get_scheme_names(), tuple(sorted(wanted))) +@@ -398,6 +409,8 @@ def test_symlink(self): # Issue 7880 + cmd = "-c", "import sysconfig; print(sysconfig.get_platform())" + self.assertEqual(py.call_real(*cmd), py.call_link(*cmd)) + ++ @unittest.skipIf('RPM_BUILD_ROOT' not in os.environ, ++ "Test doesn't expect Fedora's paths") + def test_user_similar(self): + # Issue #8759: make sure the posix scheme for the users + # is similar to the global posix_prefix one diff --git a/SPECS/python/_multibuild b/SPECS/python/_multibuild new file mode 100644 index 00000000..2eb4fdaf --- /dev/null +++ b/SPECS/python/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/SPECS/python/python.spec b/SPECS/python/python.spec new file mode 100644 index 00000000..217096da --- /dev/null +++ b/SPECS/python/python.spec @@ -0,0 +1,710 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global flavor @BUILD_FLAVOR@%{nil} + +# If we don't have python then we need to bootstrap it +# Set this to 1 in order to enable bootstrap +%if "%{flavor}" == "bootstrap" +%bcond bootstrap 1 +%else +%bcond bootstrap 0 +%endif + +%global _test_target test +%global pybasever 3.13 +# pybasever without the dot +%global pyshortver 313 + +%if %{with bootstrap} +%global pkgname python3-bootstrap +%else +%global pkgname python3 +%endif + + +# Whether to use RPM build wheels from the python-{pip,setuptools,wheel}-wheel packages +# Uses upstream bundled prebuilt wheels otherwise +%bcond rpmwheels %{without bootstrap} + +# If the rpmwheels condition is disabled, we use the bundled wheel packages +# from Python with the versions below. +# This needs to be manually updated when we update Python. +# Explore the sources tarball (you need the version before %%prep is executed): +# $ tar -tf Python-%%{upstream_version}.tar.xz | grep whl +%global pip_version 25.2 +%global setuptools_version 79.0.1 +# All of those also include a list of indirect bundled libs: +# pip +# $ %%{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt) +%global pip_bundled_provides %{expand: +Provides: bundled(python3dist(cachecontrol)) = 0.14.3 +Provides: bundled(python3dist(certifi)) = 2025.7.14 +Provides: bundled(python3dist(dependency-groups)) = 1.3.1 +Provides: bundled(python3dist(distlib)) = 0.4 +Provides: bundled(python3dist(distro)) = 1.9 +Provides: bundled(python3dist(idna)) = 3.10 +Provides: bundled(python3dist(msgpack)) = 1.1.1 +Provides: bundled(python3dist(packaging)) = 25 +Provides: bundled(python3dist(platformdirs)) = 4.3.8 +Provides: bundled(python3dist(pygments)) = 2.19.2 +Provides: bundled(python3dist(pyproject-hooks)) = 1.2 +Provides: bundled(python3dist(requests)) = 2.32.4 +Provides: bundled(python3dist(resolvelib)) = 1.2 +Provides: bundled(python3dist(rich)) = 14.1 +Provides: bundled(python3dist(setuptools)) = 70.3 +Provides: bundled(python3dist(tomli)) = 2.2.1 +Provides: bundled(python3dist(tomli-w)) = 1.2 +Provides: bundled(python3dist(truststore)) = 0.10.1 +Provides: bundled(python3dist(urllib3)) = 1.26.20 +} +# setuptools +# vendor.txt not in .whl +# %%{_rpmconfigdir}/pythonbundles.py <(unzip -l Lib/test/wheeldata/setuptools-*.whl | grep -E '_vendor/.+dist-info/RECORD' | sed -E 's@^.*/([^-]+)-([^-]+)\.dist-info/.*$@\1==\2@') +%global setuptools_bundled_provides %{expand: +Provides: bundled(python3dist(autocommand)) = 2.2.2 +Provides: bundled(python3dist(backports-tarfile)) = 1.2 +Provides: bundled(python3dist(importlib-metadata)) = 8 +Provides: bundled(python3dist(inflect)) = 7.3.1 +Provides: bundled(python3dist(jaraco-collections)) = 5.1 +Provides: bundled(python3dist(jaraco-context)) = 5.3 +Provides: bundled(python3dist(jaraco-functools)) = 4.0.1 +Provides: bundled(python3dist(jaraco-text)) = 3.12.1 +Provides: bundled(python3dist(more-itertools)) = 10.3 +Provides: bundled(python3dist(packaging)) = 24.2 +Provides: bundled(python3dist(platformdirs)) = 4.2.2 +Provides: bundled(python3dist(tomli)) = 2.0.1 +Provides: bundled(python3dist(typeguard)) = 4.3 +Provides: bundled(python3dist(typing-extensions)) = 4.12.2 +Provides: bundled(python3dist(wheel)) = 0.45.1 +Provides: bundled(python3dist(zipp)) = 3.19.2 +} + +%global pylibdir %{_libdir}/python%{pybasever} +%global dynload_dir %{pylibdir}/lib-dynload + +# We use the upstream arch triplets, we convert them from %%{_arch}-linux%%{_gnu} +%global platform_triplet %{expand:%(echo %{_arch}-linux%{_gnu})} + +# All bytecode files are in a __pycache__ subdirectory, with a name +# reflecting the version of the bytecode. +# See PEP 3147: http://www.python.org/dev/peps/pep-3147/ +# For example, +# foo/bar.py +# has bytecode at: +# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc +# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc +# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc +%global bytecode_suffixes .cpython-%{pyshortver}*.pyc + +%if "%{flavor}" == "bootstrap" +Name: python-bootstrap +%else +Name: python +%endif + +Version: 3.13.8 +Release: %autorelease +Summary: Python 3 Interpreter +License: Python-2.0.1 +URL: https://www.python.org +#!RemoteAsset +Source0: %{url}/ftp/python/%{version}/Python-%{version}.tar.xz +#!RemoteAsset +Source1: %{url}/ftp/python/%{version}/Python-%{version}.tar.xz.asc +BuildSystem: autotools + +# Set values of base and platbase in sysconfig from /usr to /usr/local +Patch0: 0001-change-user-install-location.patch + +BuildOption(conf): --without-ensurepip +BuildOption(conf): --with-platlibdir=%{_lib} +BuildOption(conf): --enable-ipv6 +BuildOption(conf): --enable-shared +BuildOption(conf): --with-system-expat +BuildOption(conf): --with-lto +BuildOption(conf): --with-dbmliborder=gdbm:ndbm + +%if %{without bootstrap} +# Regenerate generated files (needs python3) +BuildOption(build): regen-all PYTHON_FOR_REGEN="python%{pybasever}" +%endif + +BuildRequires: unzip +BuildRequires: autoconf +BuildRequires: bzip2-devel +BuildRequires: expat-devel +BuildRequires: gdbm-devel +BuildRequires: libffi-devel +BuildRequires: ncurses-devel +BuildRequires: make +BuildRequires: mpdecimal-devel +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: python-rpm-macros +BuildRequires: sqlite-devel +BuildRequires: zlib-devel + +%if %{with rpmwheels} +# Python 3.12 removed the deprecated imp module, +# the first compatible version of pip is 23.1.2. +BuildRequires: python-pip-wheel >= 23.1.2 +%endif + +%if %{without bootstrap} +BuildRequires: python%{pybasever} +# for proper automatic provides +BuildRequires: python3-rpm-generators +%endif + +%description +Python %{pybasever} is an accessible, high-level, dynamically typed, interpreted +programming language, designed with an emphasis on code readability. +It includes an extensive standard library, and has a vast ecosystem of +third-party libraries. + +%package -n %{pkgname} +Summary: Python %{pybasever} interpreter + +# For consistency, we provide python3.X from python3 as well. +Provides: python%{pybasever} = %{version}-%{release} +Provides: python%{pybasever}%{?_isa} = %{version}-%{release} +# We recommend /usr/bin/python so users get it by default +Recommends: %{_bindir}/python +# Packages with Python modules in standard locations automatically +# depend on python(abi). Provide that here. +Provides: python(abi) = %{pybasever} +Provides: /bin/python3 +Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} + +# This prevents ALL subpackages built from this spec to require +# /usr/bin/python3* or python(abi). Granularity per subpackage is impossible. +# It's intended for the libs package not to drag in the interpreter +# All other packages require %%{pkgname} explicitly. +%global __requires_exclude ^(/usr/bin/python3|python\\(abi\\)) + +%description -n %{pkgname} +Python %{pybasever} is an accessible, high-level, dynamically typed, interpreted +programming language, designed with an emphasis on code readability. +It includes an extensive standard library, and has a vast ecosystem of +third-party libraries. + +The %{pkgname} package provides the "%{pkgname}" executable: the reference +interpreter for the Python language, version 3. +The majority of its standard library is provided in the %{pkgname}-libs package, +which should be installed automatically along with %{pkgname}. +The remaining parts of the Python standard library are broken out into the +%{pkgname}-tkinter and %{pkgname}-test packages, which may need to be installed +separately. + +Documentation for Python is provided in the %{pkgname}-docs package. + +Packages containing additional libraries for Python are generally named with +the "%{pkgname}-" prefix. + +%package -n python-unversioned-command +Summary: The "python" command that runs Python 3 +BuildArch: noarch +Requires: python3 == %{version}-%{release} +Provides: python = %{version}-%{release} +# Something like https://launchpad.net/ubuntu/noble/+package/python-is-python3 +Provides: python-is-python3 = %{version}-%{release} + +%description -n python-unversioned-command +This package contains /usr/bin/python - the "python" command that runs Python 3. + +%package -n %{pkgname}-libs +Summary: Python runtime libraries +%if %{with rpmwheels} +Requires: python-pip-wheel >= 23.1.2 +License: Python-2.0.1 AND CC0-1.0 AND MIT +%else +Provides: bundled(python3dist(pip)) = %{pip_version} +%pip_bundled_provides +License: Python-2.0.1 AND CC0-1.0 AND MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND LGPL-2.1-only AND MPL-2.0 AND (Apache-2.0 OR BSD-2-Clause) +%endif +# Bundled internal headers are used even when building with system libb2 +# last updated by https://github.com/python/cpython/pull/6286 +Provides: bundled(libb2) = 0.98.1 +# Bundled mimalloc version in Include/internal/mimalloc/mimalloc.h +# Python's version is modified, differences are listed in: +# https://github.com/python/cpython/issues/113141 +Provides: bundled(mimalloc) = 2.12 +# There are files in the standard library that have python shebang. +# We've filtered the automatic requirement out so libs are installable without +# the main package. This however makes it pulled in by default. +Recommends: %{pkgname}%{?_isa} = %{version}-%{release} +# tkinter is part of the standard library, +# but it is torn out to save an unwanted dependency on tk and X11. +# we recommend it when tk is already installed (for better UX) +Recommends: (%{pkgname}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa}) +# The zoneinfo module needs tzdata +Requires: tzdata + +%description -n %{pkgname}-libs +This package contains runtime libraries for use by Python: +- the majority of the Python standard library +- a dynamically linked library for use by applications that embed Python as + a scripting language, and by the main "%{exename}" executable + +%package -n %{pkgname}-devel +Summary: Libraries and header files needed for Python development +License: Python-2.0.1 AND MIT +Requires: %{pkgname} = %{version}-%{release} +Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} +# The RPM related dependencies bring nothing to a non-RPM Python developer +# But we want them when packages BuildRequire python3-devel +Requires: python-rpm-macros +Requires: python3-rpm-macros +Requires: pyproject-rpm-macros +Requires: unzip +Recommends: %{pkgname}-pip +# tox users are likely to need the devel subpackage +Supplements: tox + +%if %{without bootstrap} +# Generators run on the main Python 3 so we cannot require them when bootstrapping it +Requires: python3-rpm-generators +%endif + +%description -n %{pkgname}-devel +This package contains the header files and configuration needed to compile +Python extension modules (typically written in C or C++), to embed Python +into other programs, and to make binary distributions for Python libraries. + +%package -n %{pkgname}-idle +Summary: A basic graphical development environment for Python +Requires: %{pkgname} = %{version}-%{release} +Requires: %{pkgname}-tkinter = %{version}-%{release} +Provides: idle3 = %{version}-%{release} +Provides: idle = %{version}-%{release} +Provides: %{pkgname}-tools = %{version}-%{release} +Provides: %{pkgname}-tools%{?_isa} = %{version}-%{release} + +%description -n %{pkgname}-idle +IDLE is Python’s Integrated Development and Learning Environment. + +IDLE has the following features: Python shell window (interactive +interpreter) with colorizing of code input, output, and error messages; +multi-window text editor with multiple undo, Python colorizing, +smart indent, call tips, auto completion, and other features; +search within any window, replace within editor windows, and +search through multiple files (grep); debugger with persistent +breakpoints, stepping, and viewing of global and local namespaces; +configuration, browsers, and other dialogs. + +%package -n %{pkgname}-tkinter +Summary: A GUI toolkit for Python +Requires: %{pkgname} = %{version}-%{release} + +# The importable module "turtle" is here, so provide python3-turtle. +# (We don't provide python3-turtledemo, that's not too useful when imported.) +%py_provides %{pkgname}-turtle + +%description -n %{pkgname}-tkinter +The Tkinter (Tk interface) library is a graphical user interface toolkit for +the Python programming language. + +%package -n %{pkgname}-test +Summary: The self-test suite for the main python3 package +Requires: %{pkgname} = %{version}-%{release} +Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release} +%if %{with rpmwheels} +Requires: python-setuptools-wheel +%else +Provides: bundled(python3dist(setuptools)) = %{setuptools_version} +%setuptools_bundled_provides +License: Python-2.0.1 AND MIT AND Apache-2.0 AND (Apache-2.0 OR BSD-2-Clause) +%endif + +%description -n %{pkgname}-test +The self-test suite for the Python interpreter. + +This is only useful to test Python itself. For testing general Python code, +you should use the unittest module from %{pkgname}-libs, or a library such as +%{pkgname}-pytest. + +%prep -a +# Verify the second level of bundled provides is up to date +# Arguably this should be done in %%check, but %%prep has a faster feedback loop +# setuptools.whl does not contain the vendored.txt files +if [ -f %{_rpmconfigdir}/pythonbundles.py ]; then + %{_rpmconfigdir}/pythonbundles.py <(unzip -p Lib/ensurepip/_bundled/pip-*.whl pip/_vendor/vendor.txt) --compare-with '%pip_bundled_provides' + %{_rpmconfigdir}/pythonbundles.py <(unzip -l Lib/test/wheeldata/setuptools-*.whl | grep -E '_vendor/.+dist-info/RECORD' | sed -E 's@^.*/([^-]+)-([^-]+)\.dist-info/.*$@\1==\2@') --compare-with '%setuptools_bundled_provides' +fi + +%if %{with rpmwheels} +rm Lib/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl +rm Lib/test/wheeldata/setuptools-%{setuptools_version}-py3-none-any.whl +%endif + +# Remove all exe files to ensure we are not shipping prebuilt binaries +# note that those are only used to create Microsoft Windows installers +# and that functionality is broken on Linux anyway +find -name '*.exe' -print -delete + +# Remove bundled libraries to ensure that we're using the system copy. +rm -r Modules/expat +rm -r Modules/_decimal/libmpdec + +# Remove files that should be generated by the build +# (This is after patching, so that we can use patches directly from upstream) +rm configure pyconfig.h.in + +%conf -p +# Tell configure to not use git. +export HAS_GIT=not-found + +# Regenerate the configure script and pyconfig.h.in +autoconf +autoheader + +%build -p +# Set common compiler/linker flags +export CFLAGS="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv" +export CXXFLAGS="%{build_cxxflags}" +export OPT="%{build_cflags}" +export LINKCC="gcc" + +%install -p +# For compatibility +%global _pyconfig32_h pyconfig-32.h +%global _pyconfig64_h pyconfig-64.h +%global _pyconfig_h pyconfig-%{__isa_bits}.h + +%install -a +# Rename the -devel script that differs on different arches to arch specific name +mv %{buildroot}%{_bindir}/python%{pybasever}-{,`uname -m`-}config +echo -e '#!/bin/sh\nexec %{_bindir}/python'%{pybasever}'-`uname -m`-config "$@"' > \ + %{buildroot}%{_bindir}/python%{pybasever}-config + chmod +x %{buildroot}%{_bindir}/python%{pybasever}-config + +# Make python3-devel multilib-ready +mv %{buildroot}%{_includedir}/python%{pybasever}/pyconfig.h \ + %{buildroot}%{_includedir}/python%{pybasever}/%{_pyconfig_h} +cat > %{buildroot}%{_includedir}/python%{pybasever}/pyconfig.h << EOF +#include + +#if __WORDSIZE == 32 +#include "%{_pyconfig32_h}" +#elif __WORDSIZE == 64 +#include "%{_pyconfig64_h}" +#else +#error "Unknown word size" +#endif +EOF + +# Install directories for additional packages +install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ +%if "%{_lib}" == "lib64" +# The 64-bit version needs to create "site-packages" in /usr/lib/ (for +# pure-Python modules) as well as in /usr/lib64/ (for packages with extension +# modules). +# Note that rpmlint will complain about hardcoded library path; +# this is intentional. +install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__ +%endif + +# Make sure sysconfig looks at the right pyconfig-32.h/pyconfig-64.h file instead of pyconfig.h +sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ + %{buildroot}%{pylibdir}/sysconfig/*.py + +# Install i18n tools to bindir +for tool in pygettext msgfmt; do + cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py + ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py +done + +# Switch all shebangs to refer to the specific Python version. +# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, +# so handle files named using other naming scheme separately. +LD_LIBRARY_PATH=. ./python \ + %{_rpmconfigdir}/openruyi/pathfix.py \ + -i "%{_bindir}/python%{pybasever}" -pn \ + %{buildroot} \ + %{buildroot}%{_bindir}/*%{pybasever}.py + +# Remove shebang lines from .py files that aren't executable, and +# remove executability from .py files that don't have a shebang line: +find %{buildroot} -name \*.py \ + \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ + -print -exec sed -i '1d' {} \; \) -o \( \ + -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ + -exec chmod a-x {} \; \) \) + +# Get rid of DOS batch files: +find %{buildroot} -name \*.bat -exec rm {} \; + +# Get rid of backup files: +find %{buildroot}/ -name "*~" -exec rm -f {} \; +find . -name "*~" -exec rm -f {} \; + +# compileall CMD line options: +# -f - force rebuild even if timestamps are up to date +# -o - optimization levels to run compilation with +# -s - part of path to left-strip from path to source file (buildroot) +# -p - path to add as prefix to path to source file (/ to make it absolute) +# --hardlink-dupes - hardlink different optimization level pycs together if identical (saves space) +# --invalidation-mode - we prefer the timestamp invalidation mode for performance reasons +# -x - skip test modules with SyntaxErrors (taken from the Makefile) +LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \ +%{buildroot}%{_bindir}/python%{pybasever} -s -B -m compileall \ +-f %{_smp_mflags} -o 0 -o 1 -o 2 -s %{buildroot} -p / %{buildroot} --hardlink-dupes --invalidation-mode=timestamp \ +-x 'bad_coding|badsyntax|site-packages' + +# Turn this BRP off, it is done by compileall2 --hardlink-dupes above +%global __brp_python_hardlink %{nil} + +# Since we have *.py files in bindir, this is created, but we don't want it +rm -rf %{buildroot}%{_bindir}/__pycache__ + +# Fixup permissions for shared libraries from non-standard 555 to standard 755: +find %{buildroot} -perm 555 -exec chmod 755 {} \; + +ln -s ./python3 %{buildroot}%{_bindir}/python +ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc +ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py +ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py +ln -s ./idle3 %{buildroot}%{_bindir}/idle +ln -s ./python3-config %{buildroot}%{_bindir}/python-config +ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 +ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc + +# Remove large, autogenerated sources and keep only the non-optimized pycache +for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do + directory=$(dirname ${file}) + module=$(basename ${file%%.py}) + mv ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.pyc,${module}.pyc} + rm ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.opt-?.pyc,${module}.py} +done + +%if "%{flavor}" == "bootstrap" +%check +%endif + +%files -n %{pkgname} +%doc README.rst +%{_bindir}/pydoc* +%{_bindir}/python3 +%{_bindir}/python%{pybasever} +%{_mandir}/*/*3* + +%files -n python-unversioned-command +%{_bindir}/python +%{_mandir}/*/python.1* + +%files -n %{pkgname}-libs +%doc README.rst +%dir %{pylibdir} +%dir %{dynload_dir} +%license %{pylibdir}/LICENSE.txt +# Pure Python modules +%{pylibdir}/*.py +%dir %{pylibdir}/__pycache__/ +%{pylibdir}/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/_pyrepl/ +%{pylibdir}/asyncio/ +%{pylibdir}/collections/ +%{pylibdir}/concurrent/ +%{pylibdir}/ctypes/ +%{pylibdir}/curses/ +%{pylibdir}/dbm/ +%{pylibdir}/encodings/ +%{pylibdir}/html/ +%{pylibdir}/http/ +%{pylibdir}/importlib/ +%{pylibdir}/json/ +%{pylibdir}/logging/ +%{pylibdir}/multiprocessing/ +%{pylibdir}/pathlib/ +%{pylibdir}/pydoc_data/ +%{pylibdir}/re/ +%{pylibdir}/sqlite3/ +%{pylibdir}/sysconfig/ +%{pylibdir}/tomllib/ +%{pylibdir}/unittest/ +%{pylibdir}/urllib/ +%{pylibdir}/venv/ +%{pylibdir}/wsgiref/ +%{pylibdir}/xml/ +%{pylibdir}/xmlrpc/ +%{pylibdir}/zipfile/ +%{pylibdir}/zoneinfo/ +# Handle the email module in detail to mark architecture.rst as %%doc +%dir %{pylibdir}/email/ +%dir %{pylibdir}/email/__pycache__/ +%{pylibdir}/email/*.py +%{pylibdir}/email/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/email/mime/ +%doc %{pylibdir}/email/architecture.rst +# Handle the ensurepip module in detail to not accidentally ship wheels +%dir %{pylibdir}/ensurepip/ +%dir %{pylibdir}/ensurepip/__pycache__/ +%{pylibdir}/ensurepip/*.py +%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes} +%if %{with rpmwheels} +%exclude %{pylibdir}/ensurepip/_bundled +%else +%dir %{pylibdir}/ensurepip/_bundled +%{pylibdir}/ensurepip/_bundled/pip-%{pip_version}-py3-none-any.whl +%endif +# This will be in the tkinter package +%exclude %{pylibdir}/turtle.py +%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} +# Extension modules +%{dynload_dir}/_asyncio.*.so +%{dynload_dir}/_bisect.*.so +%{dynload_dir}/_blake2.*.so +%{dynload_dir}/_bz2.*.so +%{dynload_dir}/_codecs_cn.*.so +%{dynload_dir}/_codecs_hk.*.so +%{dynload_dir}/_codecs_iso2022.*.so +%{dynload_dir}/_codecs_jp.*.so +%{dynload_dir}/_codecs_kr.*.so +%{dynload_dir}/_codecs_tw.*.so +%{dynload_dir}/_contextvars.*.so +%{dynload_dir}/_csv.*.so +%{dynload_dir}/_ctypes.*.so +%{dynload_dir}/_curses.*.so +%{dynload_dir}/_curses_panel.*.so +%{dynload_dir}/_datetime.*.so +%{dynload_dir}/_dbm.*.so +%{dynload_dir}/_gdbm.*.so +%{dynload_dir}/_decimal.*.so +%{dynload_dir}/_elementtree.*.so +%{dynload_dir}/_hashlib.*.so +%{dynload_dir}/_heapq.*.so +%{dynload_dir}/_interpchannels.*.so +%{dynload_dir}/_interpqueues.*.so +%{dynload_dir}/_interpreters.*.so +%{dynload_dir}/_json.*.so +%{dynload_dir}/_lsprof.*.so +#%{dynload_dir}/_lzma.*.so +%{dynload_dir}/_md5.*.so +%{dynload_dir}/_multibytecodec.*.so +%{dynload_dir}/_multiprocessing.*.so +%{dynload_dir}/_opcode.*.so +%{dynload_dir}/_pickle.*.so +%{dynload_dir}/_posixshmem.*.so +%{dynload_dir}/_posixsubprocess.*.so +%{dynload_dir}/_queue.*.so +%{dynload_dir}/_random.*.so +%{dynload_dir}/_sha1.*.so +%{dynload_dir}/_sha2.*.so +%{dynload_dir}/_sha3.*.so +%{dynload_dir}/_socket.*.so +%{dynload_dir}/_sqlite3.*.so +%{dynload_dir}/_ssl.*.so +%{dynload_dir}/_statistics.*.so +%{dynload_dir}/_struct.*.so +#{dynload_dir}/_uuid.*.so +%{dynload_dir}/_zoneinfo.*.so +%{dynload_dir}/array.*.so +%{dynload_dir}/binascii.*.so +%{dynload_dir}/cmath.*.so +%{dynload_dir}/fcntl.*.so +%{dynload_dir}/grp.*.so +%{dynload_dir}/math.*.so +%{dynload_dir}/mmap.*.so +%{dynload_dir}/pyexpat.*.so +#{dynload_dir}/readline.*.so +%{dynload_dir}/resource.*.so +%{dynload_dir}/select.*.so +%{dynload_dir}/syslog.*.so +%{dynload_dir}/termios.*.so +%{dynload_dir}/unicodedata.*.so +%{dynload_dir}/zlib.*.so + +%dir %{pylibdir}/site-packages/ +%dir %{pylibdir}/site-packages/__pycache__/ +%{pylibdir}/site-packages/README.txt + +%if "%{_lib}" == "lib64" +%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/ +%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/ +%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/ +%endif + +# "Makefile" and the config-32/64.h file are needed by +# sysconfig.get_config_vars(), so we include them in the core +# package, along with their parent directories: +%dir %{pylibdir}/config-%{pybasever}-%{platform_triplet}/ +%{pylibdir}/config-%{pybasever}-%{platform_triplet}/Makefile +%dir %{_includedir}/python%{pybasever}/ +%{_includedir}/python%{pybasever}/%{_pyconfig_h} + +%{_libdir}/*.so +%{_libdir}/*.so.* + +%files -n %{pkgname}-devel +%{pylibdir}/config-%{pybasever}-%{platform_triplet}/* +%exclude %{pylibdir}/config-%{pybasever}-%{platform_triplet}/Makefile +%exclude %{_includedir}/python%{pybasever}/%{_pyconfig_h} +%{_includedir}/python%{pybasever}/*.h +%{_includedir}/python%{pybasever}/internal/ +%{_includedir}/python%{pybasever}/cpython/ + +%{_bindir}/python3-config +%{_bindir}/python-config +%{_libdir}/pkgconfig/python3.pc +%{_libdir}/pkgconfig/python.pc +%{_libdir}/pkgconfig/python3-embed.pc +%{_bindir}/pygettext3.py +%{_bindir}/pygettext.py +%{_bindir}/msgfmt3.py +%{_bindir}/msgfmt.py + +%{_bindir}/pygettext%{pybasever}.py +%{_bindir}/msgfmt%{pybasever}.py + +%{_bindir}/python%{pybasever}-config +%{_bindir}/python*-config +%{_bindir}/python*-*-config +%{_libdir}/pkgconfig/python-*.pc +%{_libdir}/pkgconfig/python-*-embed.pc +%{_libdir}/pkgconfig/python-%{pybasever}.pc +%{_libdir}/pkgconfig/python-%{pybasever}-embed.pc + +%files -n %{pkgname}-idle +%{_bindir}/idle* +%{pylibdir}/idlelib + +%files -n %{pkgname}-tkinter +%{pylibdir}/tkinter +%{pylibdir}/turtle.py +%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} +%dir %{pylibdir}/turtledemo +%{pylibdir}/turtledemo/*.py +%{pylibdir}/turtledemo/*.cfg +%dir %{pylibdir}/turtledemo/__pycache__/ +%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes} + +%files -n %{pkgname}-test +%{pylibdir}/test/ +# Pure Python modules +%{pylibdir}/__phello__/ +# Extension modules +%{dynload_dir}/_ctypes_test.*.so +%{dynload_dir}/_testbuffer.*.so +%{dynload_dir}/_testcapi.*.so +%{dynload_dir}/_testclinic.*.so +%{dynload_dir}/_testclinic_limited.*.so +%{dynload_dir}/_testexternalinspection.*.so +%{dynload_dir}/_testimportmultiple.*.so +%{dynload_dir}/_testinternalcapi.*.so +%{dynload_dir}/_testlimitedcapi.*.so +%{dynload_dir}/_testmultiphase.*.so +%{dynload_dir}/_testsinglephase.*.so +%{dynload_dir}/_xxtestfuzz.*.so +%{dynload_dir}/xxlimited.*.so +%{dynload_dir}/xxlimited_35.*.so +%{dynload_dir}/xxsubtype.*.so + +%undefine _debuginfo_subpackages + +%changelog +%{?autochangelog} diff --git a/SPECS/rapidjson/rapidjson.spec b/SPECS/rapidjson/rapidjson.spec new file mode 100644 index 00000000..e121feda --- /dev/null +++ b/SPECS/rapidjson/rapidjson.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define commit 24b5e7a + +Name: rapidjson +Version: 1.1.0.%{commit} +Release: %autorelease +Summary: Fast JSON parser and generator for C++ +License: MIT AND BSD-3-Clause +URL: https://rapidjson.org/ +#!RemoteAsset +Source: https://github.com/Tencent/rapidjson/archive/%{commit}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DRAPIDJSON_BUILD_DOC:BOOL=ON +BuildOption(conf): -DRAPIDJSON_BUILD_EXAMPLES:BOOL=OFF +BuildOption(conf): -DRAPIDJSON_BUILD_TESTS:BOOL=OFF +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +BuildRequires: cmake +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: doxygen + +%description +RapidJSON is a fast, self-contained, header-only C++ library for parsing +and generating JSON. It is compliant with RFC8259 and ECMA-404. + +%package devel +Summary: Header files for the RapidJSON C++ library +Provides: %{name}-static = %{version} + +%description devel +This package contains the header files, CMake/pkg-config files, and +documentation needed to develop applications that use RapidJSON. + +%prep -a +rm -rf thirdparty +find . -type f -name CMakeLists.txt -print0 | xargs -0 sed -i -e "s/-march=native/ /g" -e "s/-Werror//g" + +%files devel +%license license.txt +%doc %{_docdir}/RapidJSON/ +%{_libdir}/cmake/RapidJSON/ +%{_libdir}/pkgconfig/*.pc +%{_includedir}/rapidjson/ + +%changelog +%{?autochangelog} diff --git a/SPECS/rdfind/rdfind.spec b/SPECS/rdfind/rdfind.spec new file mode 100644 index 00000000..cb0a3000 --- /dev/null +++ b/SPECS/rdfind/rdfind.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: rdfind +Version: 1.7.0 +Release: %autorelease +Summary: Find duplicate files utility +License: GPL-2.0-or-later +URL: https://rdfind.pauldreik.se/ +#!RemoteAsset +Source0: https://rdfind.pauldreik.se/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://rdfind.pauldreik.se/%{name}-%{version}.tar.gz.asc + +BuildSystem: autotools + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: nettle-devel + +%description +Rdfind is a program that finds duplicate files. It is useful for compressing +backup directories or just finding duplicate files. It compares files based on +their content, NOT on their file names. + +%files +%license COPYING LICENSE +%doc AUTHORS ChangeLog +%{_bindir}/rdfind +%{_mandir}/man1/rdfind.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/re2/re2.spec b/SPECS/re2/re2.spec new file mode 100644 index 00000000..9846405c --- /dev/null +++ b/SPECS/re2/re2.spec @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define date 2025-08-12 +Name: re2 +Version: 2025.08.12 +Release: %autorelease +Summary: A fast, safe, and thread-friendly regular expression engine +License: BSD-3-Clause +URL: https://github.com/google/re2/ +#!RemoteAsset +Source0: https://github.com/google/re2/archive/%{date}/re2-%{date}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DRE2_TEST:BOOL=OFF +BuildOption(conf): -DRE2_USE_ICU:BOOL=ON + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: ninja +BuildRequires: abseil-cpp-devel +BuildRequires: icu4c-devel + +%description +RE2 is a fast, safe, thread-friendly alternative to backtracking regular +expression engines like those used in PCRE, Perl, and Python. It is a C++ library. + +%package devel +Summary: Development files for the re2 library +Requires: %{name} = %{version} + +%description devel +This package contains the C++ header files, libraries, and build system files +needed to develop applications that use the re2 library. + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md +%{_libdir}/libre2.so.* + +%files devel +%{_includedir}/re2 +%{_libdir}/libre2.so +%{_libdir}/cmake/re2 +%{_libdir}/pkgconfig/re2.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/re2c/re2c.spec b/SPECS/re2c/re2c.spec new file mode 100644 index 00000000..de50c711 --- /dev/null +++ b/SPECS/re2c/re2c.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Summary: Lexer generator for C/C++ +Name: re2c +Version: 4.3 +Release: %autorelease +License: Public Domain +URL: https://re2c.org/ +#!RemoteAsset +Source: https://github.com/skvadrik/re2c/releases/download/%{version}/re2c-%{version}.tar.xz + +BuildSystem: autotools +BuildRequires: python3 +BuildRequires: gcc-c++ + +%description +re2c is a tool for writing very fast and very flexible scanners. Unlike any +other such tool, re2c focuses on generating high efficient code for regular +expression matching. As a result this allows a much broader range of use than +any traditional lexer offers. And Last but not least re2c generates warning +free code that is equal to hand-written code in terms of size, speed and +quality. + +%files +%license LICENSE +%doc CHANGELOG README.md examples/ doc/* +%{_bindir}/re2c +%{_bindir}/re2d +%{_bindir}/re2go +%{_bindir}/re2hs +%{_bindir}/re2js +%{_bindir}/re2ocaml +%{_bindir}/re2py +%{_bindir}/re2rust +%{_bindir}/re2swift +%{_bindir}/re2v +%{_bindir}/re2zig +%{_datadir}/re2c/ +%{_mandir}/man1/*.1.* + +%changelog +%{?autochangelog} diff --git a/SPECS/readline/0001-readline-8.3-patch-1.patch b/SPECS/readline/0001-readline-8.3-patch-1.patch new file mode 100644 index 00000000..4fdf1571 --- /dev/null +++ b/SPECS/readline/0001-readline-8.3-patch-1.patch @@ -0,0 +1,38 @@ +diff --git a/input.c b/input.c +--- a/input.c ++++ b/input.c +@@ -261,13 +261,16 @@ rl_gather_tyi (void) + input = 0; + tty = fileno (rl_instream); + +- /* Move this up here to give it first shot, but it can't set chars_avail */ ++ /* Move this up here to give it first shot, but it can't set chars_avail, ++ so we assume a single character is available. */ + /* XXX - need rl_chars_available_hook? */ + if (rl_input_available_hook) + { + result = (*rl_input_available_hook) (); + if (result == 0) + result = -1; ++ else ++ chars_avail = 1; + } + + #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) +@@ -285,6 +288,7 @@ rl_gather_tyi (void) + #endif + if (result <= 0) + return 0; /* Nothing to read. */ ++ result = -1; /* there is something, so check how many chars below */ + } + #endif + +diff --git a/patchlevel b/patchlevel +index d8c9df7..fdf4740 100644 +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-0 ++1 diff --git a/SPECS/readline/0010-readline-link-ncurses.patch b/SPECS/readline/0010-readline-link-ncurses.patch new file mode 100644 index 00000000..9a892e91 --- /dev/null +++ b/SPECS/readline/0010-readline-link-ncurses.patch @@ -0,0 +1,18 @@ +This patch is to make sure that `libncurses' is among the `NEEDED' +dependencies of `libreadline.so' and `libhistory.so'. + +Failing to do that, applications linking against Readline are +forced to explicitly link against libncurses as well; in addition, +this trick doesn't work when using GNU ld's `--as-needed'. + +--- a/shlib/Makefile.in 2009-01-06 18:03:22.000000000 +0100 ++++ b/shlib/Makefile.in 2009-07-27 14:43:25.000000000 +0200 +@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ + SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ + SHOBJ_LIBS = @SHOBJ_LIBS@ + +-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ ++SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncursesw + SHLIB_LIBS = @SHLIB_LIBS@ + + SHLIB_DOT = @SHLIB_DOT@ diff --git a/SPECS/readline/readline.spec b/SPECS/readline/readline.spec new file mode 100644 index 00000000..63ceffbd --- /dev/null +++ b/SPECS/readline/readline.spec @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: readline +Version: 8.3 +Release: %autorelease +Summary: A library for editing typed command lines +License: GPL-3.0-or-later AND GPL-2.0-or-later AND GFDL-1.3-no-invariants-or-later +URL: https://tiswww.case.edu/php/chet/readline/rltop.html +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig +BuildSystem: autotools + +# Official upstream patches +# Patches are converted to apply with '-p1' +Patch0: 0001-readline-8.3-patch-1.patch + +# Other patches +# symbol lookup error: /usr/lib64/libreadline.so.8: undefined symbol: UP +Patch1: 0010-readline-link-ncurses.patch + +BuildOption(conf): --with-curses +BuildOption(conf): --disable-install-examples + +BuildRequires: make +BuildRequires: ncurses-devel + +%description +The Readline library provides a set of functions that allow users to +edit command lines. Both Emacs and vi editing modes are available. The +Readline library includes additional functions for maintaining a list +of previously-entered command lines for recalling or editing those +lines, and for performing csh-like history expansion on previous +commands. + +%package devel +Summary: Files needed to develop programs which use the readline library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The Readline library provides a set of functions that allow users to +edit typed command lines. If you want to develop programs that will +use the readline library, you need to have the readline-devel package +installed. You also need to have the readline package installed. + +%install -a +# Don't need these +rm -vrf %{buildroot}%{_docdir}/readline +rm -vf %{buildroot}%{_infodir}/dir* + +%ldconfig_scriptlets + +%files +%license COPYING USAGE +%{_libdir}/libreadline.so.* +%{_libdir}/libhistory.so.* +%{_infodir}/history.info* +%{_infodir}/rluserman.info* + +%files devel +%doc CHANGES NEWS README +%doc examples/*.c examples/*.h examples/rlfe +%{_includedir}/readline/ +%{_libdir}/libreadline.so +%{_libdir}/libhistory.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/history.pc +%{_mandir}/man3/readline.3* +%{_mandir}/man3/history.3* +%{_infodir}/readline.info* +%{_libdir}/libreadline.a +%{_libdir}/libhistory.a + +%changelog +%{?autochangelog} diff --git a/SPECS/recutils/0001-recutils-1.9-mdbtools-0.9.patch b/SPECS/recutils/0001-recutils-1.9-mdbtools-0.9.patch new file mode 100644 index 00000000..72295554 --- /dev/null +++ b/SPECS/recutils/0001-recutils-1.9-mdbtools-0.9.patch @@ -0,0 +1,20 @@ +diff --git a/utils/mdb2rec.c b/utils/mdb2rec.c +index 1e25397..f190c5b 100644 +--- a/utils/mdb2rec.c ++++ b/utils/mdb2rec.c +@@ -428,14 +428,12 @@ process_mdb (void) + recutl_out_of_memory (); + + /* Initialize libmdb and open the input file. */ +- mdb_init(); +- mdb_set_date_fmt ("%Y-%m-%dT%H:%M:%S%z"); /* ISO 8601 */ + + mdb = mdb_open (mdb2rec_mdb_file, MDB_NOFLAGS); + if (!mdb) + recutl_fatal (_("could not open file %s\n"), + mdb2rec_mdb_file); +- ++ mdb_set_date_fmt (mdb, "%Y-%m-%dT%H:%M:%S%z"); /* ISO 8601 */ + /* Read the catalog. */ + if (!mdb_read_catalog (mdb, MDB_TABLE)) + recutl_fatal (_("file does not appear to be an Access database\n")); diff --git a/SPECS/recutils/0002-recutils-c99.patch b/SPECS/recutils/0002-recutils-c99.patch new file mode 100644 index 00000000..5b81aa43 --- /dev/null +++ b/SPECS/recutils/0002-recutils-c99.patch @@ -0,0 +1,58 @@ +diff --git a/src/rec-sex-lex.h b/src/rec-sex-lex.h +new file mode 100644 +index 0000000..aa5e9f2 +--- /dev/null ++++ b/src/rec-sex-lex.h +@@ -0,0 +1,7 @@ ++/* Declarations exported from the generated lexer. */ ++ ++int sexlex_init (void **); ++void sexset_extra (void *, void *); ++int sexlex_destroy (void *); ++union YYSTYPE; ++int sexlex (union YYSTYPE *, void *); +\ No newline at end of file +diff --git a/src/rec-sex-lex.l b/src/rec-sex-lex.l +index 1e537bf..2d4a891 100644 +--- a/src/rec-sex-lex.l ++++ b/src/rec-sex-lex.l +@@ -26,12 +26,12 @@ + %option bison-bridge + %option extra-type="void *" + +-%option header-file="rec-sex-lex.h" + %option nounput + %option noinput + %top { + /* This code goes at the "top" of the generated file. */ + #include ++ #include "rec-sex-lex.h" + } + + %{ +diff --git a/src/rec-sex-parser.c b/src/rec-sex-parser.c +index e5bcd33..4eb188a 100644 +--- a/src/rec-sex-parser.c ++++ b/src/rec-sex-parser.c +@@ -25,7 +25,7 @@ + + #include + #include "rec-sex-tab.h" +-/*#include "rec-sex-lex.h" */ ++#include "rec-sex-lex.h" + + struct rec_sex_parser_s + { +diff --git a/src/rec-sex-tab.y b/src/rec-sex-tab.y +index 6c31edd..f011bc4 100644 +--- a/src/rec-sex-tab.y ++++ b/src/rec-sex-tab.y +@@ -33,7 +33,7 @@ + #include + #include + #include "rec-sex-tab.h" +- /* #include "rec-sex-lex.h" */ ++ #include "rec-sex-lex.h" + + void sexerror (rec_sex_parser_t context, const char *err) + { diff --git a/SPECS/recutils/recutils.spec b/SPECS/recutils/recutils.spec new file mode 100644 index 00000000..bc5f4fd5 --- /dev/null +++ b/SPECS/recutils/recutils.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: recutils +Version: 1.9 +Release: %autorelease +Summary: A set of tools to access GNU recfile databases +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/recutils/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/recutils/recutils-%{version}.tar.gz +Patch0: 0001-recutils-1.9-mdbtools-0.9.patch +Patch1: 0002-recutils-c99.patch +BuildSystem: autotools + +BuildOption(conf): CFLAGS="%{optflags} -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types" +BuildOption(conf): --disable-static +BuildOption(conf): --disable-rpath +BuildOption(conf): --without-mdb +BuildOption(conf): --without-emacs +BuildRequires: make autoconf +BuildRequires: gcc automake libtool +BuildRequires: libgcrypt-devel +BuildRequires: bison +BuildRequires: flex +BuildRequires: util-linux-devel +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(check) + +%description +Recutils is a set of tools and libraries to access human-editable, +text-based databases called recfiles. + +%package devel +Summary: Libraries and header files for recutils +Requires: %{name} = %{version} + +%description devel +This package contains the libraries and header files for developing +applications that use the recutils library. + +%conf -p +autoreconf -fiv + +%install -a +rm -f %{buildroot}%{_infodir}/dir +%find_lang %{name} --generate-subpackages +%ldconfig_scriptlets + +%files +%doc AUTHORS ChangeLog NEWS README +%license COPYING +%{_libdir}/*.so.* +%{_bindir}/* +%{_mandir}/man1/* +%{_datadir}/recutils +%{_infodir}/*.info* + +%files devel +%{_includedir}/rec.h +%{_libdir}/*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/rhash/rhash.spec b/SPECS/rhash/rhash.spec new file mode 100644 index 00000000..7721d8a7 --- /dev/null +++ b/SPECS/rhash/rhash.spec @@ -0,0 +1,113 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: rhash +Version: 1.4.6 +Release: %autorelease +Summary: Recursive Hasher +License: 0BSD +URL: https://github.com/rhash/RHash +#!RemoteAsset +Source: https://github.com/rhash/RHash/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +BuildSystem: autotools +BuildRequires: pkgconfig +BuildRequires: pkgconfig(openssl) + +BuildOption(prep): -n RHash-%{version} +BuildOption(install): install-lib-so-link +BuildOption(install): install-lib-headers +BuildOption(install): install-gmo + +%description +RHash (Recurcive Hasher) is a console utility for computing and +verifying magnet links and hash sums of files. +It supports CRC32, MD4, MD5, SHA1/SHA2, Tiger, DC++ TTH, BitTorrent +BTIH, AICH, eDonkey hash, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, +Whirlpool and Snefru hash algorithms. Hash sums are used to ensure and +verify integrity of large volumes of data for a long-term storing or +transferring. + +Program features: + * Calculation of Magnet links and EDonkey 2000 links. + * Output in a predefined (SFV, BSD-like) or a user-defined format. + * Updating crc files (adding hash sums of files missing in the crc + file). + * Ability to process directories recursively. + +%package devel +Summary: Headers and Static Library for LibRHash + +%description devel +LibRHash is a professional, portable, thread-safe C library for +computing a wide variety of hash sums, such as CRC32, MD4, MD5, SHA1, +SHA256, SHA512, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R +34.11-94, RIPEMD-160 HAS-160, EDON-R, Whirlpool and Snefru. +Hash sums are used to ensure and verify integrity of large volumes of +data for a long-term storing or transferring. + +This package includes LibRHash development files. + +%lang_package + +%conf +# repleace unwanted fomit-frame pointer with desirable optflags +sed -i "s|-fomit-frame-pointer|%{optflags}|g" configure +# not a autotools configure +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --sysconfdir=%{_sysconfdir} \ + --enable-lib-shared \ + --enable-gettext + +%install -a +%find_lang %{name} %{?no_lang_C} + +%ldconfig_scriptlets + +%files +%license COPYING +%doc ChangeLog README.md +%config(noreplace) %{_sysconfdir}/rhashrc +%{_bindir}/ed2k-link +%{_bindir}/edonr256-hash +%{_bindir}/edonr512-hash +%{_bindir}/gost12-256-hash +%{_bindir}/gost12-512-hash +%{_bindir}/has160-hash +%{_bindir}/magnet-link +%{_bindir}/rhash +%{_bindir}/sfv-hash +%{_bindir}/tiger-hash +%{_bindir}/tth-hash +%{_bindir}/whirlpool-hash +%{_mandir}/man1/ed2k-link.1%{?ext_man} +%{_mandir}/man1/edonr256-hash.1%{?ext_man} +%{_mandir}/man1/edonr512-hash.1%{?ext_man} +%{_mandir}/man1/gost12-256-hash.1%{?ext_man} +%{_mandir}/man1/gost12-512-hash.1%{?ext_man} +%{_mandir}/man1/has160-hash.1%{?ext_man} +%{_mandir}/man1/magnet-link.1%{?ext_man} +%{_mandir}/man1/rhash.1%{?ext_man} +%{_mandir}/man1/sfv-hash.1%{?ext_man} +%{_mandir}/man1/tiger-hash.1%{?ext_man} +%{_mandir}/man1/tth-hash.1%{?ext_man} +%{_mandir}/man1/whirlpool-hash.1%{?ext_man} +%{_libdir}/librhash.so.* + +%files devel +%license COPYING +%doc ChangeLog README.md +%{_includedir}/rhash.h +%{_includedir}/rhash_torrent.h +%{_libdir}/librhash.so + +%files lang -f %{name}.lang + +%changelog +%{?autochangelog} diff --git a/SPECS/rocksdb/0001-no_rpath.patch b/SPECS/rocksdb/0001-no_rpath.patch new file mode 100644 index 00000000..2fdc8114 --- /dev/null +++ b/SPECS/rocksdb/0001-no_rpath.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1575,6 +1575,7 @@ + endif() + + if(WITH_BENCHMARK_TOOLS) ++ set(CMAKE_SKIP_BUILD_RPATH TRUE) + add_executable(db_bench${ARTIFACT_SUFFIX} + tools/simulated_hybrid_file_system.cc + tools/db_bench.cc diff --git a/SPECS/rocksdb/0002-disable_static.patch b/SPECS/rocksdb/0002-disable_static.patch new file mode 100644 index 00000000..59e54983 --- /dev/null +++ b/SPECS/rocksdb/0002-disable_static.patch @@ -0,0 +1,70 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1076,10 +1076,9 @@ + include_directories(${BOOST_INCLUDE_DIR}) + add_definitions(-DUSE_FOLLY -DFOLLY_NO_CONFIG) + list(APPEND THIRDPARTY_LIBS glog) +-endif() ++ endif() + +-set(ROCKSDB_STATIC_LIB rocksdb${ARTIFACT_SUFFIX}) +-set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX}) ++ set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX}) + + + if(WIN32) +@@ -1147,12 +1146,6 @@ + set(BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/build_version.cc) + configure_file(util/build_version.cc.in ${BUILD_VERSION_CC} @ONLY) + +-add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) +-target_include_directories(${ROCKSDB_STATIC_LIB} PUBLIC +- $) +-target_link_libraries(${ROCKSDB_STATIC_LIB} PRIVATE +- ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) +- + if(ROCKSDB_BUILD_SHARED) + add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES} ${BUILD_VERSION_CC}) + target_include_directories(${ROCKSDB_SHARED_LIB} PUBLIC +@@ -1163,10 +1156,8 @@ + if(WIN32) + set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES + COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") +- if(MSVC) +- set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES +- COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") +- set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES ++ if(MSVC) ++ set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES + COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_SHARED_LIB}.pdb") + endif() + else() +@@ -1180,8 +1171,6 @@ + + if(ROCKSDB_BUILD_SHARED AND NOT WIN32) + set(ROCKSDB_LIB ${ROCKSDB_SHARED_LIB}) +-else() +- set(ROCKSDB_LIB ${ROCKSDB_STATIC_LIB}) + endif() + + option(WITH_JNI "build with JNI" OFF) +@@ -1244,17 +1233,9 @@ + endforeach() + endforeach() + +- install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) +- +- install( +- TARGETS ${ROCKSDB_STATIC_LIB} +- EXPORT RocksDBTargets +- COMPONENT devel +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +- ) ++ install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) + +- if(ROCKSDB_BUILD_SHARED) ++ if(ROCKSDB_BUILD_SHARED) + install( + TARGETS ${ROCKSDB_SHARED_LIB} + EXPORT RocksDBTargets diff --git a/SPECS/rocksdb/rocksdb.spec b/SPECS/rocksdb/rocksdb.spec new file mode 100644 index 00000000..ff8637a9 --- /dev/null +++ b/SPECS/rocksdb/rocksdb.spec @@ -0,0 +1,94 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Xuhai Chang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: rocksdb +Version: 10.5.1 +Release: %autorelease +Summary: A Persistent Key-Value Store for Flash and RAM Storage +License: GPL-2.0-only OR Apache-2.0 AND LicenseRef-Callaway-BSD +URL: https://github.com/facebook/rocksdb +#!RemoteAsset +Source: https://github.com/facebook/rocksdb/archive/refs/tags/v10.5.1.tar.gz +Patch0: 0001-no_rpath.patch +Patch1: 0002-disable_static.patch + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: liburing-devel +BuildRequires: bzip2-devel +BuildRequires: lz4-devel +BuildRequires: snappy-devel +BuildRequires: zlib-devel +BuildRequires: gflags-devel +BuildRequires: zstd-devel +BuildRequires: perl +BuildRequires: python3-devel +BuildSystem: cmake +BuildOption(conf): -DWITH_BZ2=ON +BuildOption(conf): -DWITH_SNAPPY=ON +BuildOption(conf): -DWITH_LZ4=ON +BuildOption(conf): -DWITH_ZSTD=ON +BuildOption(conf): -DWITH_ZLIB=ON +BuildOption(conf): -DZSTD_INCLUDE_DIRS=%{_includedir} +BuildOption(conf): -DWITH_BENCHMARK_TOOLS=ON +BuildOption(conf): -DWITH_CORE_TOOLS=ON +BuildOption(conf): -DWITH_TOOLS=ON +BuildOption(conf): -DUSE_RTTI=ON +BuildOption(conf): -DPORTABLE=1 +BuildOption(conf): -DFAIL_ON_WARNINGS=OFF +BuildOption(conf): -DWITH_TESTS=ON + +%description +RocksDB is a library that forms the core building block for a fast key value +server, especially suited for storing data on flash drives. It has a +Log-Structured-Merge-Database (LSM) design with flexible trade offs between +Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF) and +Space-Amplification-Factor (SAF). It has multi-threaded compaction, making it +specially suitable for storing multiple terabytes of data in a single database. + +%package devel +Summary: Development files for RocksDB +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for RocksDB. + +%install -a +# Missing steps in build script +install -dD -m 755 %{buildroot}%{_bindir} +install -m 755 %{__cmake_builddir}/cache_bench %{buildroot}%{_bindir}/cache_bench +install -m 755 %{__cmake_builddir}/db_bench %{buildroot}%{_bindir}/db_bench +install -m 755 %{__cmake_builddir}/tools/ldb %{buildroot}%{_bindir}/ldb +install -m 755 %{__cmake_builddir}/tools/sst_dump %{buildroot}%{_bindir}/sst_dump + +%files +%doc README.md +%doc HISTORY.md +%doc AUTHORS +%license COPYING +%license LICENSE.Apache +%license LICENSE.leveldb +%{_libdir}/librocksdb.so.10 +%{_libdir}/librocksdb.so.10.5.1 +%{_bindir}/cache_bench +%{_bindir}/db_bench +%{_bindir}/ldb +%{_bindir}/sst_dump + +%files devel +%doc README.md +%doc LANGUAGE-BINDINGS.md +%license COPYING +%license LICENSE.Apache +%license LICENSE.leveldb +%{_libdir}/librocksdb.so +%{_libdir}/cmake/rocksdb +%{_libdir}/pkgconfig/rocksdb.pc +%{_includedir}/rocksdb + +%changelog +%{?autochangelog} diff --git a/SPECS/rpm-config-openruyi/rpm-config-openruyi.spec b/SPECS/rpm-config-openruyi/rpm-config-openruyi.spec new file mode 100644 index 00000000..9042650d --- /dev/null +++ b/SPECS/rpm-config-openruyi/rpm-config-openruyi.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# ignore the explicit bash requires from the kernel mod scripts +%define __requires_exclude ^/bin/bash$ +Name: rpm-config-openruyi +Version: 20250821 +Release: %autorelease +Summary: specific RPM configuration files +License: GPL-2.0-or-later +Group: System/Packages +URL: https://git.oerv.ac.cn/openruyi/rpm-config-openruyi +Source: https://git.oerv.ac.cn/openruyi/rpm-config-openruyi/archive/%{version}.tar.gz +BuildRequires: gzip +#!BuildIgnore: rpm-config-openruyi +# RPM owns the directories we need +Requires: rpm +Provides: rpm-config +BuildArch: noarch + +%description +This package contains the RPM configuration data for the openruyi +distribution families. + +%prep +%autosetup -p1 -n rpm-config-openruyi + +%build +# Set up the macros +sed -e 's/@ul_version@/%{?ul_version}%{!?ul_version:0}/' \ + -e '/@is_openruyi@%{?is_openruyi:nomatch}/d' \ + -e 's/@is_openruyi@/%{?is_openruyi}%{!?is_openruyi:0}/' \ + < macros.in > macros + +%install +# Install vendor macros and rpmrc +mkdir -p %{buildroot}%{_rpmconfigdir}/openruyi +cp -a macros %{buildroot}%{_rpmconfigdir}/openruyi/macros + +# Install vendor dependency generators +cp -a fileattrs %{buildroot}%{_rpmconfigdir} +cp -a scripts/* %{buildroot}%{_rpmconfigdir} +cp -a macros.d %{buildroot}%{_rpmconfigdir} + +%files +%license COPYING +%doc README.md +%{_rpmconfigdir}/openruyi/ +%{_rpmconfigdir}/macros.d/macros.* +%{_rpmconfigdir}/fileattrs/* +%{_rpmconfigdir}/brp-openruyi +%{_rpmconfigdir}/firmware.prov +%{_rpmconfigdir}/sysvinitdeps.sh +%{_rpmconfigdir}/locale.prov +# kmod deps +%{_rpmconfigdir}/find-provides.ksyms +%{_rpmconfigdir}/find-requires.ksyms +%{_rpmconfigdir}/find-supplements.ksyms + +%changelog +%{?autochangelog} diff --git a/SPECS/rpm/0002-log-build-time-if-it-is-set-from-SOURCE_DATE_EPOCH.patch b/SPECS/rpm/0002-log-build-time-if-it-is-set-from-SOURCE_DATE_EPOCH.patch new file mode 100644 index 00000000..71bed157 --- /dev/null +++ b/SPECS/rpm/0002-log-build-time-if-it-is-set-from-SOURCE_DATE_EPOCH.patch @@ -0,0 +1,15 @@ +--- build/build.c.orig 2024-12-16 09:50:41.468083747 +0000 ++++ build/build.c 2024-12-16 09:50:48.428069376 +0000 +@@ -45,8 +45,11 @@ static rpm_time_t getBuildTime(void) + epoch = strtol(srcdate, &endptr, 10); + if (srcdate == endptr || *endptr || errno != 0) + rpmlog(RPMLOG_ERR, _("unable to parse SOURCE_DATE_EPOCH\n")); +- else ++ else { + buildTime = (uint32_t) epoch; ++ rpmlog(RPMLOG_NOTICE, _("using %s with value %ld as build time\n"), ++ "SOURCE_DATE_EPOCH", buildTime); ++ } + } else + buildTime = (uint32_t) time(NULL); + free(btMacro); diff --git a/SPECS/rpm/0003-Error-out-on-a-missing-changelog-date.patch b/SPECS/rpm/0003-Error-out-on-a-missing-changelog-date.patch new file mode 100644 index 00000000..d4053db2 --- /dev/null +++ b/SPECS/rpm/0003-Error-out-on-a-missing-changelog-date.patch @@ -0,0 +1,14 @@ +--- build/build.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ build/build.c 2024-12-16 09:50:14.728138966 +0000 +@@ -385,8 +385,10 @@ static int buildSpec(rpmts ts, BTA_t bui + setenv("SOURCE_DATE_EPOCH", sdestr, 0); + rpmtdFreeData(&td); + } else { +- rpmlog(RPMLOG_WARNING, _("%%source_date_epoch_from_changelog is set, but " ++ rpmlog(RPMLOG_ERR, _("%%source_date_epoch_from_changelog is set, but " + "%%changelog has no entries to take a date from\n")); ++ rc = RPMRC_FAIL; ++ goto exit; + } + } + diff --git a/SPECS/rpm/archcheck.diff b/SPECS/rpm/archcheck.diff new file mode 100644 index 00000000..d6ad7921 --- /dev/null +++ b/SPECS/rpm/archcheck.diff @@ -0,0 +1,28 @@ +--- build/parsePreamble.c.orig 2025-04-25 09:33:36.850778834 +0000 ++++ build/parsePreamble.c 2025-04-25 09:33:51.002755713 +0000 +@@ -1332,6 +1332,11 @@ int parsePreamble(rpmSpec spec, int init + "%{dirname:%{buildroot}}", RMIL_GLOBAL, 0); + } + ++ /* XXX Skip valid arch check if not building binary package */ ++ if (!(spec->flags & RPMSPEC_ANYARCH) && checkForValidArchitectures(spec)) { ++ goto exit; ++ } ++ + /* if we get down here nextPart has been set to non-error */ + res = nextPart; + +--- build/parseSpec.c.orig 2025-04-25 09:34:05.770731591 +0000 ++++ build/parseSpec.c 2025-04-25 09:34:20.242707943 +0000 +@@ -1355,11 +1355,6 @@ static rpmRC finalizeSpec(rpmSpec spec) + char *os = rpmExpand("%{_target_os}", NULL); + char *optflags = rpmExpand("%{optflags}", NULL); + +- /* XXX Skip valid arch check if not building binary package */ +- if (!(spec->flags & RPMSPEC_ANYARCH) && checkForValidArchitectures(spec)) { +- goto exit; +- } +- + fillOutMainPackage(spec->packages->header); + /* Define group tag to something when group is undefined in main package*/ + if (!headerIsEntry(spec->packages->header, RPMTAG_GROUP)) { diff --git a/SPECS/rpm/auto-config-update-aarch64-ppc64le.diff b/SPECS/rpm/auto-config-update-aarch64-ppc64le.diff new file mode 100644 index 00000000..e4ce6e88 --- /dev/null +++ b/SPECS/rpm/auto-config-update-aarch64-ppc64le.diff @@ -0,0 +1,31 @@ +--- build/parseSimpleScript.c.orig 2024-12-16 09:59:01.199053527 +0000 ++++ build/parseSimpleScript.c 2024-12-16 10:08:22.389914963 +0000 +@@ -59,6 +59,28 @@ int parseSimpleScript(rpmSpec spec, cons + target = &buf; + } + ++ if (!mode && !*target && !strcmp(name, "build")) { ++ *target = newStringBuf(); ++ appendLineStringBuf(*target, ++ "ref=/usr/lib/rpm\n" ++ "mints=0\n" ++ "case $(uname -m) in\n" ++ " aarch64) mints=20120610;;\n" ++ " ppc64le) mints=20130610;;\n" ++ " riscv64) mints=20160911;;\n" ++ " loongarch64) mints=20201222;;\n" ++ "esac\n" ++ "for s in guess sub; do\n" ++ " for c in $(find -maxdepth 8 -name \"config.$s\"); do\n" ++ " grep -q config-patches@ $c || continue\n" ++ " timestamp=$(sed -n \"/^timestamp=/{s///;s/[-'\\\"]//g;p;q;}\" $c)\n" ++ " test -n \"$timestamp\" || timestamp=0\n" ++ " test $timestamp -ge $mints || install -m 755 $ref/config.$s $c\n" ++ " done\n" ++ "done\n" ++ ); ++ } ++ + res = parseLines(spec, STRIP_NOTHING, NULL, target); + + if (buf) { diff --git a/SPECS/rpm/brp-compress-no-img.patch b/SPECS/rpm/brp-compress-no-img.patch new file mode 100644 index 00000000..cd12289e --- /dev/null +++ b/SPECS/rpm/brp-compress-no-img.patch @@ -0,0 +1,11 @@ +--- scripts/brp-compress.orig 2022-12-02 13:18:54.498881077 +0000 ++++ scripts/brp-compress 2022-12-02 13:20:00.038727777 +0000 +@@ -52,6 +52,8 @@ do + while IFS= read -r -d '' f; do + [ -f "$f" ] || continue + ++ case $(file "$f") in *"image data"*) continue;; esac ++ + case "$f" in + *.gz|*.Z) gunzip -f "$f" || check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(gz\|Z\)$//'`;; + *.bz2) bunzip2 -f "$f" || check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;; diff --git a/SPECS/rpm/brp.diff b/SPECS/rpm/brp.diff new file mode 100644 index 00000000..c642dc77 --- /dev/null +++ b/SPECS/rpm/brp.diff @@ -0,0 +1,21 @@ +--- scripts/brp-strip-comment-note.orig 2024-10-07 09:35:46.000000000 +0000 ++++ scripts/brp-strip-comment-note 2024-12-16 09:15:41.572425334 +0000 +@@ -15,7 +15,7 @@ esac + + # Strip .comment and .note sections (the latter only if it is not allocated) + # for already stripped elf files in the build root +-for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'" ARG0`; do ++for f in `find "$RPM_BUILD_ROOT" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -print0 | xargs -0 -r -P$NCPUS -n32 sh -c "file \"\\$@\" | grep -v \"^${RPM_BUILD_ROOT}/\?usr/lib/debug\" | grep -v ' shared object,' | grep -v '/lib/modules/' | sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped.*/\1/p'" ARG0`; do + note="-R .note" + if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ + grep ALLOC >/dev/null; then +--- scripts/brp-strip.orig 2024-10-07 09:35:46.000000000 +0000 ++++ scripts/brp-strip 2024-12-16 09:15:41.572425334 +0000 +@@ -37,6 +37,7 @@ strip_elf_binaries() + ! -name "*.py" ! -name "*.js" ! -name "*.rb" \ + ! -name "*.go" -links "${nlinks}" -print0 | \ + xargs -0 -r -P${nprocs} -n${MAX_ARGS} sh -c "file \"\$@\" | \ ++ grep -v ' shared object,' | grep -v '/lib/modules/ | \ + sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p' | \ + grep -v 'no machine' | \ + xargs -I\{\} $STRIP -g \{\}" ARG0 diff --git a/SPECS/rpm/brpcompress.diff b/SPECS/rpm/brpcompress.diff new file mode 100644 index 00000000..f8284e91 --- /dev/null +++ b/SPECS/rpm/brpcompress.diff @@ -0,0 +1,80 @@ +--- scripts/brp-compress.orig 2022-04-07 11:13:19.072518377 +0000 ++++ scripts/brp-compress 2022-12-02 13:12:31.239774558 +0000 +@@ -5,6 +5,9 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_B + exit 0 + fi + ++LC_ALL= ++LANG= ++LC_TIME=POSIX + PREFIX=${1:-/usr} + + cd "$RPM_BUILD_ROOT" +@@ -13,6 +16,30 @@ cd "$RPM_BUILD_ROOT" + COMPRESS=${COMPRESS:-gzip -9 -n} + COMPRESS_EXT=${COMPRESS_EXT:-.gz} + ++check_for_hard_link() ++{ ++ dir=$1 ++ b=$2 ++ ++ inode=`ls -i $b | awk '{ print $1 }'` ++ others=`find $dir -type f -inum $inode` ++ for afile in $others ; do ++ [ "$afile" != "$b" ] && rm -f "$afile" ++ done ++ ++ case $b in ++ *.Z|*.gz) gunzip $b ;; ++ *.bz2) bunzip2 $b ;; ++ *.xz|*.lzma) unxz $b ;; ++ *.zst|*.zstd) unzstd --rm $b ;; ++ esac ++ ++ type=${b##*.} ++ for afile in $others ; do ++ [ "${afile%.$type}" != "${b%.$type}" ] && ln ${b%.$type} ${afile%.$type} ++ done ++} ++ + for d in .${PREFIX}/man/man* .${PREFIX}/man/*/man* .${PREFIX}/info \ + .${PREFIX}/share/man/man* .${PREFIX}/share/man/*/man* \ + .${PREFIX}/share/info .${PREFIX}/kerberos/man \ +@@ -26,10 +53,10 @@ do + [ -f "$f" ] || continue + + case "$f" in +- *.gz|*.Z) gunzip -f "$f"; b=`echo "$f" | sed -e 's/\.\(gz\|Z\)$//'`;; +- *.bz2) bunzip2 -f "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;; +- *.xz|*.lzma) unxz -f "$f"; b=`echo "$f" | sed -e 's/\.\(xz\|lzma\)$//'`;; +- *.zst|*.zstd) unzstd -f --rm $f; b=`echo "$f" | sed -e 's/\.\(zst\|zstd\)$//'`;; ++ *.gz|*.Z) gunzip -f "$f" || check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(gz\|Z\)$//'`;; ++ *.bz2) bunzip2 -f "$f" || check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.bz2$//'`;; ++ *.xz|*.lzma) unxz -f "$f" || check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(xz\|lzma\)$//'`;; ++ *.zst|*.zstd) unzstd -f --rm $f || check_for_hard_link $d "$f"; b=`echo "$f" | sed -e 's/\.\(zst\|zstd\)$//'`;; + *) b="$f";; + esac + +@@ -38,7 +65,7 @@ do + others="`find $d -type f -inum $inode`" + if [ -n "$others" ]; then + for afile in $others ; do +- [ "$afile" != "$b" ] && rm -f $afile ++ [ "$afile" != "$b" ] && rm -f "$afile" + done + $COMPRESS -f "$b" + for afile in $others ; do +@@ -52,9 +79,9 @@ do + + find $d -type l -print0 | + while IFS= read -r -d '' f; do +- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'` +- rm -f $f +- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'` ++ l=`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'` ++ rm -f "$f" ++ b=`echo "$f" | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'` + ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT" + done + done diff --git a/SPECS/rpm/buildroot-symlink.diff b/SPECS/rpm/buildroot-symlink.diff new file mode 100644 index 00000000..b9e3f63c --- /dev/null +++ b/SPECS/rpm/buildroot-symlink.diff @@ -0,0 +1,10 @@ +--- scripts/check-files.orig 2024-12-17 09:47:18.016502845 +0000 ++++ scripts/check-files 2024-12-17 09:50:09.872159687 +0000 +@@ -27,6 +27,6 @@ trap "rm -f \"${FILES_DISK}\"" 0 2 3 5 1 + + # Find non-directory files in the build root and compare to the manifest. + # TODO: regex chars in last sed(1) expression should be escaped +-find "${RPM_BUILD_ROOT}" -type f -o -type l | LC_ALL=C sort > "${FILES_DISK}" ++find -H "${RPM_BUILD_ROOT}" -type f -o -type l | LC_ALL=C sort > "${FILES_DISK}" + LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n -e 's!^\(-\|< \)'"${RPM_BUILD_ROOT}"'/usr/share/info/dir$!!' -e 's!^\(-\|< \)'"${RPM_BUILD_ROOT}"'\(.*\)$! \2!gp' + diff --git a/SPECS/rpm/buildsysprep.diff b/SPECS/rpm/buildsysprep.diff new file mode 100644 index 00000000..5b0c40a7 --- /dev/null +++ b/SPECS/rpm/buildsysprep.diff @@ -0,0 +1,33 @@ +--- build/parseSpec.c.orig 2025-04-25 09:58:26.712300888 +0000 ++++ build/parseSpec.c 2025-04-25 09:58:54.224255916 +0000 +@@ -987,7 +987,7 @@ int checkBuildsystem(rpmSpec spec, const + } + + static rpmRC parseBuildsysSect(rpmSpec spec, const char *prefix, +- struct sectname_s *sc, FD_t fd) ++ struct sectname_s *sc, FD_t fd, int *foundp) + { + rpmRC rc = RPMRC_OK; + +@@ -1015,6 +1015,7 @@ static rpmRC parseBuildsysSect(rpmSpec s + } + free(buf); + free(args); ++ *foundp = 1; + } + free(mn); + } +@@ -1038,9 +1039,10 @@ static rpmRC parseBuildsystem(rpmSpec sp + } + + for (struct sectname_s *sc = sectList; !rc && sc->name; sc++) { +- rc = parseBuildsysSect(spec, buildsystem, sc, fd); +- if (!rc && spec->sections[sc->section] == NULL) +- rc = parseBuildsysSect(spec, "default", sc, fd); ++ int found = 0; ++ rc = parseBuildsysSect(spec, buildsystem, sc, fd, &found); ++ if (!rc && !found) ++ rc = parseBuildsysSect(spec, "default", sc, fd, &found); + } + + if (!rc) diff --git a/SPECS/rpm/canongnu.diff b/SPECS/rpm/canongnu.diff new file mode 100644 index 00000000..44efdcc4 --- /dev/null +++ b/SPECS/rpm/canongnu.diff @@ -0,0 +1,32 @@ +--- CMakeLists.txt.orig 2024-10-07 09:35:46.000000000 +0000 ++++ CMakeLists.txt 2024-12-16 09:42:51.221054406 +0000 +@@ -153,14 +153,26 @@ function(makemacros) + + list(GET db_backends 0 DB_BACKEND) + +- set(host_cpu ${CMAKE_HOST_SYSTEM_PROCESSOR}) ++ if (RPM_HOST_SYSTEM_CPU) ++ set(host_cpu ${RPM_HOST_SYSTEM_CPU}) ++ else() ++ set(host_cpu ${CMAKE_HOST_SYSTEM_PROCESSOR}) ++ endif() + string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} host_os) + set(host_vendor ${RPM_VENDOR}) +- set(host ${host_cpu}-${host_vendor}-${host_os}) ++ if (RPM_HOST_SYSTEM_ABI) ++ set(host ${host_cpu}-${host_vendor}-${host_os}-${RPM_HOST_SYSTEM_ABI}) ++ else() ++ set(host ${host_cpu}-${host_vendor}-${host_os}) ++ endif() + + set(RPMCANONVENDOR ${host_vendor}) + set(RPMCANONOS ${host_os}) +- set(RPMCANONGNU -gnu) ++ if (RPM_HOST_SYSTEM_ABI) ++ set(RPMCANONGNU -${RPM_HOST_SYSTEM_ABI}) ++ else() ++ set(RPMCANONGNU -gnu) ++ endif() + + configure_file(platform.in platform @ONLY) + configure_file(rpmrc.in rpmrc @ONLY) diff --git a/SPECS/rpm/checkfilesnoinfodir.diff b/SPECS/rpm/checkfilesnoinfodir.diff new file mode 100644 index 00000000..e05ee6c2 --- /dev/null +++ b/SPECS/rpm/checkfilesnoinfodir.diff @@ -0,0 +1,11 @@ +Exclude /usr/share/info/dir from check-files. + +--- scripts/check-files.orig 2020-09-30 12:36:56.398762048 +0000 ++++ scripts/check-files 2020-09-30 12:41:15.294176572 +0000 +@@ -28,5 +28,5 @@ trap "rm -f \"${FILES_DISK}\"" 0 2 3 5 1 + # Find non-directory files in the build root and compare to the manifest. + # TODO: regex chars in last sed(1) expression should be escaped + find "${RPM_BUILD_ROOT}" -type f -o -type l | LC_ALL=C sort > "${FILES_DISK}" +-LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n 's!^\(-\|< \)'"${RPM_BUILD_ROOT}"'\(.*\)$! \2!gp' ++LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n -e 's!^\(-\|< \)'"${RPM_BUILD_ROOT}"'/usr/share/info/dir$!!' -e 's!^\(-\|< \)'"${RPM_BUILD_ROOT}"'\(.*\)$! \2!gp' + diff --git a/SPECS/rpm/checksepwarn.diff b/SPECS/rpm/checksepwarn.diff new file mode 100644 index 00000000..66c58965 --- /dev/null +++ b/SPECS/rpm/checksepwarn.diff @@ -0,0 +1,68 @@ +--- build/parseReqs.c.orig 2019-06-26 14:17:31.396985719 +0000 ++++ build/parseReqs.c 2019-10-02 12:10:51.879570016 +0000 +@@ -42,7 +42,7 @@ static rpmRC checkEpoch(const char *s, c + return RPMRC_OK; + } + +-static rpmRC checkDep(rpmSpec spec, char *N, char *EVR, char **emsg) ++static rpmRC checkDep(rpmSpec spec, rpmsenseFlags tagflags, char *N, char *EVR, char **emsg) + { + /* + * Tokens must begin with alphanumeric, _, or /, but we don't know +@@ -65,6 +65,11 @@ static rpmRC checkDep(rpmSpec spec, char + + if (rpmExpandNumeric("%{?_wrong_version_format_terminate_build}")) + return RPMRC_FAIL; ++ if (tagflags & (RPMSENSE_FIND_REQUIRES|RPMSENSE_FIND_PROVIDES)) ++ rpmlog(RPMLOG_WARNING, "%s\n", *emsg); ++ else ++ rpmlog(RPMLOG_WARNING, _("line %d: %s: %s\n"), spec->lineNum, *emsg, spec->line); ++ *emsg = _free(*emsg); + } + } + return RPMRC_OK; +@@ -72,6 +77,7 @@ static rpmRC checkDep(rpmSpec spec, char + + struct parseRCPOTRichData { + rpmSpec spec; ++ rpmsenseFlags tagflags; + StringBuf sb; + }; + +@@ -109,7 +115,7 @@ static rpmRC parseRCPOTRichCB(void *cbda + appendStringBuf(sb, rel); + appendStringBuf(sb, EVR); + } +- rc = checkDep(data->spec, N, EVR, emsg); ++ rc = checkDep(data->spec, data->tagflags, N, EVR, emsg); + _free(N); + _free(EVR); + } else if (type == RPMRICH_PARSE_OP) { +@@ -223,6 +229,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + goto exit; + } + data.spec = spec; ++ data.tagflags = tagflags; + data.sb = newStringBuf(); + if (rpmrichParseForTag(&r, &emsg, parseRCPOTRichCB, &data, nametag) != RPMRC_OK) { + freeStringBuf(data.sb); +@@ -274,7 +281,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package p + } + + /* check that dependency is well-formed */ +- if (checkDep(spec, N, EVR, &emsg)) ++ if (checkDep(spec, tagflags, N, EVR, &emsg)) + goto exit; + + if (nametag == RPMTAG_OBSOLETENAME) { +--- macros.in.orig 2019-10-02 12:10:45.431583601 +0000 ++++ macros.in 2019-10-02 12:10:51.879570016 +0000 +@@ -452,7 +452,7 @@ package or when debugging this package.\ + %_invalid_encoding_terminates_build 1 + + # Should invalid version format in requires, provides, ... terminate a build? +-%_wrong_version_format_terminate_build 1 ++%_wrong_version_format_terminate_build 0 + + # + # Should rpm try to download missing sources at build-time? diff --git a/SPECS/rpm/cmake_fhardened.diff b/SPECS/rpm/cmake_fhardened.diff new file mode 100644 index 00000000..ce5967e3 --- /dev/null +++ b/SPECS/rpm/cmake_fhardened.diff @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2025-03-26 13:46:52.439473029 +0000 ++++ CMakeLists.txt 2025-03-26 13:47:07.991447862 +0000 +@@ -436,7 +436,7 @@ foreach (flag -fno-strict-overflow -fno- + if (found) + add_compile_options(${flag}) + endif() +- unset(found) ++ unset(found CACHE) + endforeach() + + # generated sources diff --git a/SPECS/rpm/cmake_python_version.diff b/SPECS/rpm/cmake_python_version.diff new file mode 100644 index 00000000..124c4826 --- /dev/null +++ b/SPECS/rpm/cmake_python_version.diff @@ -0,0 +1,15 @@ +--- CMakeLists.txt.orig 2024-12-16 09:43:16.909001370 +0000 ++++ CMakeLists.txt 2024-12-16 09:45:05.892776434 +0000 +@@ -277,7 +277,11 @@ endif() + list(APPEND db_backends dummy) + + if (ENABLE_PYTHON) +- find_package(Python3 3.7 COMPONENTS Interpreter Development REQUIRED) ++ if (WITH_PYTHON_VERSION) ++ find_package(Python3 ${WITH_PYTHON_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED) ++ else() ++ find_package(Python3 3.7 COMPONENTS Interpreter Development REQUIRED) ++ endif() + endif() + + if (WITH_CAP) diff --git a/SPECS/rpm/db_conversion.diff b/SPECS/rpm/db_conversion.diff new file mode 100644 index 00000000..931493bf --- /dev/null +++ b/SPECS/rpm/db_conversion.diff @@ -0,0 +1,169 @@ +--- lib/backend/bdb_ro.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/backend/bdb_ro.c 2024-12-16 09:28:13.146864067 +0000 +@@ -793,6 +793,7 @@ static unsigned int bdbro_pkgdbKey(dbiIn + struct rpmdbOps_s bdbro_dbops = { + .name = "bdb_ro", + .path = "Packages", ++ .readonly = 1, + + .open = bdbro_Open, + .close = bdbro_Close, +--- lib/backend/dbi.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/backend/dbi.c 2024-12-16 09:28:13.150864059 +0000 +@@ -138,11 +138,20 @@ exit: + } + + rdb->db_descr = rdb->db_ops->name; ++ rdb->db_ops_config = cfg; + + if (db_backend) + free(db_backend); + } + ++int dbiNeedConversion(rpmdb rdb) ++{ ++ if (!rdb->db_ops) ++ dbDetectBackend(rdb); ++ return rdb->db_ops->readonly && rdb->db_ops_config ++ && rdb->db_ops_config->path && !rdb->db_ops_config->readonly; ++} ++ + const char * dbiName(dbiIndex dbi) + { + return dbi->dbi_file; +--- lib/backend/dbi.h.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/backend/dbi.h 2024-12-16 09:28:13.150864059 +0000 +@@ -13,6 +13,7 @@ enum rpmdbFlags { + RPMDB_FLAG_REBUILD = (1 << 1), + RPMDB_FLAG_VERIFYONLY = (1 << 2), + RPMDB_FLAG_SALVAGE = (1 << 3), ++ RPMDB_FLAG_CONVERT = (1 << 4), + }; + + typedef enum dbCtrlOp_e { +@@ -54,6 +55,7 @@ struct rpmdb_s { + int db_buildindex; /*!< Index rebuild indicator */ + + const struct rpmdbOps_s * db_ops; /*!< backend ops */ ++ const struct rpmdbOps_s * db_ops_config; /*!< configured backend ops */ + + /* dbenv and related parameters */ + void * db_dbenv; /*!< Backend private handle */ +@@ -194,6 +196,14 @@ RPM_GNUC_INTERNAL + const char * dbiName(dbiIndex dbi); + + /** \ingroup dbi ++ * Check if the database needs to be converted to a different format ++ * @param db rpm database ++ * @return boolean ++ */ ++RPM_GNUC_INTERNAL ++int dbiNeedConversion(rpmdb rdb); ++ ++/** \ingroup dbi + * Open a database cursor. + * @param dbi index database handle + * @param flags DBC_WRITE if writing, or 0 (DBC_READ) for reading +@@ -237,6 +247,7 @@ const void * idxdbKey(dbiIndex dbi, dbiC + struct rpmdbOps_s { + const char *name; /* backend name */ + const char *path; /* main database name */ ++ int readonly; /* cannot modify database */ + + int (*open)(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags); + int (*close)(dbiIndex dbi, unsigned int flags); +--- lib/backend/ndb/rpmpkg.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/backend/ndb/rpmpkg.c 2024-12-16 09:28:13.150864059 +0000 +@@ -1111,11 +1111,12 @@ static int rpmpkgPutInternal(rpmpkgdb pk + if (rpmpkgWriteBlob(pkgdb, pkgidx, blkoff, blkcnt, blob, blobl, pkgdb->generation)) { + return RPMRC_FAIL; + } ++ /* update nextpkgidx if needed */ ++ if (pkgidx >= pkgdb->nextpkgidx) { ++ pkgdb->nextpkgidx = pkgidx + 1; ++ } + /* write slot */ + slotno = oldslot ? oldslot->slotno : pkgdb->freeslot; +- if (!slotno) { +- return RPMRC_FAIL; +- } + if (rpmpkgWriteslot(pkgdb, slotno, pkgidx, blkoff, blkcnt)) { + free(pkgdb->slots); + pkgdb->slots = 0; +--- lib/rpmdb.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/rpmdb.c 2024-12-16 09:29:39.686685792 +0000 +@@ -466,7 +466,12 @@ static int openDatabase(const char * pre + /* Open just bare minimum when rebuilding a potentially damaged db */ + int justPkgs = (db->db_flags & RPMDB_FLAG_REBUILD) && + ((db->db_mode & O_ACCMODE) == O_RDONLY); +- rc = doOpen(db, justPkgs); ++ if (!db->db_pkgs && !justCheck && (mode & O_ACCMODE) == O_RDWR && dbiNeedConversion(db)) { ++ rc = rpmdbRebuild(prefix, NULL, NULL, RPMDB_REBUILD_FLAG_CONVERT); ++ db->db_ops = NULL; /* force re-detection of backend */ ++ } ++ if (!rc) ++ rc = doOpen(db, justPkgs); + + if (!db->db_descr) + db->db_descr = "unknown db"; +@@ -2209,6 +2214,15 @@ int rpmdbAdd(rpmdb db, Header h) + if (db == NULL) + return 0; + ++ if ((db->db_flags & RPMDB_FLAG_CONVERT) != 0) { ++ /* keep old instance numbers when converting */ ++ hdrNum = headerGetInstance(h); ++ if (hdrNum == 0) { ++ ret = -1; ++ goto exit; ++ } ++ } ++ + hdrBlob = (uint8_t *)headerExport(h, &hdrLen); + if (hdrBlob == NULL || hdrLen == 0) { + ret = -1; +@@ -2404,7 +2418,22 @@ int rpmdbRebuild(const char * prefix, rp + } + rootdbpath = rpmGetPath(prefix, dbpath, NULL); + +- newdbpath = rpmGetPath("%{?_dbpath_rebuild}", NULL); ++ if ((rebuildflags & RPMDB_REBUILD_FLAG_CONVERT) != 0) { ++ char lbuf[PATH_MAX]; ++ ssize_t s = readlink(rootdbpath, lbuf, PATH_MAX); ++ if (s > 0 && s < PATH_MAX) { ++ lbuf[s] = 0; ++ free(dbpath); ++ if (lbuf[0] == '/') ++ dbpath = strdup(lbuf); ++ else ++ dbpath = rpmGetPath("%{?_dbpath}", "/../", lbuf, NULL); ++ free(rootdbpath); ++ rootdbpath = rpmGetPath(prefix, dbpath, NULL); ++ } ++ newdbpath = strdup(""); ++ } else ++ newdbpath = rpmGetPath("%{?_dbpath_rebuild}", NULL); + if (rstreq(newdbpath, "") || rstreq(newdbpath, dbpath)) { + newdbpath = _free(newdbpath); + rasprintf(&newdbpath, "%srebuilddb.%d", dbpath, (int) getpid()); +@@ -2430,7 +2459,9 @@ int rpmdbRebuild(const char * prefix, rp + goto exit; + } + if (openDatabase(prefix, newdbpath, &newdb, +- (O_RDWR | O_CREAT), 0644, RPMDB_FLAG_REBUILD)) { ++ (O_RDWR | O_CREAT), 0644, RPMDB_FLAG_REBUILD | ++ (rebuildflags & RPMDB_REBUILD_FLAG_CONVERT ? ++ RPMDB_FLAG_CONVERT : 0))) { + rc = 1; + goto exit; + } +--- lib/rpmdb_internal.h.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/rpmdb_internal.h 2024-12-16 09:28:13.150864059 +0000 +@@ -18,6 +18,7 @@ + + enum rpmdbRebuildFlags_e { + RPMDB_REBUILD_FLAG_SALVAGE = (1 << 0), ++ RPMDB_REBUILD_FLAG_CONVERT = (1 << 1), + }; + + /** \ingroup rpmdb diff --git a/SPECS/rpm/emptymanifest.diff b/SPECS/rpm/emptymanifest.diff new file mode 100644 index 00000000..80fd65b3 --- /dev/null +++ b/SPECS/rpm/emptymanifest.diff @@ -0,0 +1,11 @@ +--- macros.in.orig 2017-01-20 10:15:12.677868723 +0000 ++++ macros.in 2017-01-20 10:15:30.385819715 +0000 +@@ -403,7 +403,7 @@ package or when debugging this package.\ + # Should empty %files manifest file terminate a build? + # + # Note: The default value should be 0 for legacy compatibility. +-%_empty_manifest_terminate_build 1 ++%_empty_manifest_terminate_build 0 + + # + # Should binaries in noarch packages terminate a build? diff --git a/SPECS/rpm/emptypw.diff b/SPECS/rpm/emptypw.diff new file mode 100644 index 00000000..afd990c5 --- /dev/null +++ b/SPECS/rpm/emptypw.diff @@ -0,0 +1,34 @@ +--- lib/rpmug.c.orig 2025-04-25 09:48:27.153273090 +0000 ++++ lib/rpmug.c 2025-04-25 09:50:00.113122450 +0000 +@@ -1,6 +1,7 @@ + #include "system.h" + + #include ++#include + #include + #include + #include +@@ -62,12 +63,11 @@ static int lookup_field(const char *path + while ((str = fgets(buf, sizeof(buf), f)) != NULL) { + int nf = vcol > rcol ? vcol : rcol; + const char *fields[nf + 1]; +- char *tok, *save = NULL; + int col = -1; + +- while ((tok = strtok_r(str, ":", &save)) != NULL) { +- fields[++col] = tok; +- str = NULL; ++ ARGV_t tokens = argvSplitString(str, ":", ARGV_NONE); ++ for (ARGV_const_t tok = tokens; tok && *tok; tok++) { ++ fields[++col] = *tok; + if (col >= nf) + break; + } +@@ -78,6 +78,7 @@ static int lookup_field(const char *path + rc = 0; + } + } ++ argvFree(tokens); + } + + fclose(f); diff --git a/SPECS/rpm/enable-postin-scripts-error.diff b/SPECS/rpm/enable-postin-scripts-error.diff new file mode 100644 index 00000000..023392e2 --- /dev/null +++ b/SPECS/rpm/enable-postin-scripts-error.diff @@ -0,0 +1,35 @@ +--- lib/rpmscript.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ lib/rpmscript.c 2024-12-16 09:26:15.035107390 +0000 +@@ -462,7 +462,7 @@ rpmRC rpmScriptRun(rpmScript script, int + if (script == NULL) return RPMRC_OK; + + ARGV_t args = NULL; +- rpmlogLvl lvl = (script->flags & RPMSCRIPT_FLAG_CRITICAL) ? ++ rpmlogLvl lvl = (rpmScriptFlags(script) & RPMSCRIPT_FLAG_CRITICAL) ? + RPMLOG_ERR : RPMLOG_WARNING; + rpmRC rc; + int script_type = RPMSCRIPTLET_FORK | RPMSCRIPTLET_EXEC; +@@ -724,5 +724,8 @@ rpmscriptTypes rpmScriptType(rpmScript s + + rpmscriptFlags rpmScriptFlags(rpmScript script) + { +- return (script != NULL) ? script->flags : 0; ++ rpmscriptFlags flags = (script != NULL) ? script->flags : 0; ++ if (script && script->tag == RPMTAG_POSTIN && rpmExpandNumeric("%{_fail_on_postinstall_errors}")) ++ flags |= RPMSCRIPT_FLAG_CRITICAL; ++ return flags; + } +--- macros.in.orig 2024-12-16 09:26:03.635130873 +0000 ++++ macros.in 2024-12-16 09:26:15.035107390 +0000 +@@ -1390,6 +1390,11 @@ end + # Global buildsystem defaults + %buildsystem_default_prep() %autosetup -C -p1 %* + ++# Should errors in %post scriptlet be propagated as errors? ++# ++# Note: set to 1 for legacy compatibility. ++%_fail_on_postinstall_errors 0 ++ + # \endverbatim + #*/ + diff --git a/SPECS/rpm/fileattrs.diff b/SPECS/rpm/fileattrs.diff new file mode 100644 index 00000000..c8b1e333 --- /dev/null +++ b/SPECS/rpm/fileattrs.diff @@ -0,0 +1,9 @@ +--- fileattrs/elf.attr.orig 2024-10-07 09:35:46.000000000 +0000 ++++ fileattrs/elf.attr 2024-12-16 09:23:29.831448715 +0000 +@@ -1,5 +1,5 @@ + %__elf_provides %{_rpmconfigdir}/elfdeps --provides --multifile + %__elf_requires %{_rpmconfigdir}/elfdeps --requires --multifile + %__elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$ +-%__elf_exclude_path ^/lib/modules/.*\\.ko?(\\.[[:alnum:]]*)$ ++%__elf_exclude_path (^/usr/lib/debug/)|(^/lib/modules/.*\\.ko?(\\.[[:alnum:]]*)$) + %__elf_protocol multifile diff --git a/SPECS/rpm/find-lang-qt-qm.patch b/SPECS/rpm/find-lang-qt-qm.patch new file mode 100644 index 00000000..f6c44fec --- /dev/null +++ b/SPECS/rpm/find-lang-qt-qm.patch @@ -0,0 +1,13 @@ +--- scripts/find-lang.sh.orig 2021-09-23 19:57:49.046595975 +0000 ++++ scripts/find-lang.sh 2021-09-23 19:59:36.182374732 +0000 +@@ -305,7 +305,9 @@ s:%lang(C) :: + + find "$TOP_DIR" -type f -o -type l|sed ' + s:'"$TOP_DIR"':: +-'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\+\([_@].*\)\?\)\.qm$\):%lang(\2) \1: ++'"$ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\([^/]\+_qt\.qm$\):%lang(\2) \1\2\3\4: ++'"$NO_ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\('"$NAME"'_qt\.qm$\):%lang(\2) \1\2\3\4: ++'"$NO_ALL_NAME$QT"'s:^\([^%].*/'"$NAME"'_\([a-zA-Z]\+\([_@].*\)\?\)\.qm$\):%lang(\2) \1: + '"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1: + '"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1: + '"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1: diff --git a/SPECS/rpm/findsupplements.diff b/SPECS/rpm/findsupplements.diff new file mode 100644 index 00000000..6c92b44f --- /dev/null +++ b/SPECS/rpm/findsupplements.diff @@ -0,0 +1,17 @@ +--- scripts/CMakeLists.txt.orig 2024-10-07 09:35:46.000000000 +0000 ++++ scripts/CMakeLists.txt 2024-12-16 09:27:43.274925606 +0000 +@@ -4,7 +4,7 @@ install(PROGRAMS + brp-strip-static-archive brp-elfperms brp-remove-la-files + check-files check-prereqs + check-buildroot check-rpaths check-rpaths-worker +- find-lang.sh find-requires find-provides ++ find-lang.sh find-requires find-provides find-supplements + pkgconfigdeps.sh + ocamldeps.sh + fontconfig.prov script.req +--- scripts/find-supplements.orig 2024-12-16 09:27:13.626986691 +0000 ++++ scripts/find-supplements 2024-12-16 09:27:13.626986691 +0000 +@@ -0,0 +1,3 @@ ++#!/bin/sh ++ ++/usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --supplements diff --git a/SPECS/rpm/headeradddb.diff b/SPECS/rpm/headeradddb.diff new file mode 100644 index 00000000..01601939 --- /dev/null +++ b/SPECS/rpm/headeradddb.diff @@ -0,0 +1,55 @@ +Add rpmtsHeaderAddDB and rpmtsHeaderRemoveDB so that +convertdb1 will build again. + +--- lib/rpmts.c.orig 2011-05-12 13:21:03.000000000 +0000 ++++ lib/rpmts.c 2011-05-12 13:26:25.000000000 +0000 +@@ -159,6 +159,24 @@ int rpmtsVerifyDB(rpmts ts) + return rc; + } + ++int rpmtsHeaderAddDB(rpmts ts, Header h) ++{ ++ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT))) ++ return RPMRC_FAIL; ++ if (rpmdbAdd(rpmtsGetRdb(ts), h) != 0) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++} ++ ++int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum) ++{ ++ if (rpmtsOpenDB(ts, (O_RDWR|O_CREAT))) ++ return RPMRC_FAIL; ++ if (rpmdbRemove(rpmtsGetRdb(ts), hdrNum) != 0) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++} ++ + /* keyp might no be defined. */ + rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmDbiTagVal rpmtag, + const void * keyp, size_t keylen) +--- include/rpm/lib/rpmts.h.orig 2011-05-12 13:21:11.000000000 +0000 ++++ include/rpm/rpmts.h 2011-05-12 13:28:32.000000000 +0000 +@@ -264,6 +264,22 @@ int rpmtsRebuildDB(rpmts ts); + int rpmtsVerifyDB(rpmts ts); + + /** \ingroup rpmts ++ * Add a header to the database used by the transaction. ++ * @param ts transaction set ++ * @param h header to add ++ * @return 0 on success ++ */ ++int rpmtsHeaderAddDB(rpmts ts, Header h); ++ ++/** \ingroup rpmts ++ * Remove a header from the database used by the transaction. ++ * @param ts transaction set ++ * @param hdrNum index of header to remove ++ * @return 0 on success ++ */ ++int rpmtsHeaderRemoveDB(rpmts ts, unsigned int hdrNum); ++ ++/** \ingroup rpmts + * Return transaction database iterator. + * @param ts transaction set + * @param rpmtag database index tag diff --git a/SPECS/rpm/headerchk2.diff b/SPECS/rpm/headerchk2.diff new file mode 100644 index 00000000..1144b936 --- /dev/null +++ b/SPECS/rpm/headerchk2.diff @@ -0,0 +1,12 @@ +--- lib/header.c.orig 2017-12-01 15:54:04.254399473 +0000 ++++ lib/header.c 2017-12-01 15:55:36.389131237 +0000 +@@ -929,7 +929,8 @@ rpmRC hdrblobImport(hdrblob blob, int fa + + rdlen += REGION_TAG_COUNT; + +- if (rdlen != blob->dl) ++ /* should be equality test, but can be off if entries are not perfectly aligned */ ++ if (rdlen > blob->dl) + goto errxit; + } + diff --git a/SPECS/rpm/localetag.diff b/SPECS/rpm/localetag.diff new file mode 100644 index 00000000..29c087b4 --- /dev/null +++ b/SPECS/rpm/localetag.diff @@ -0,0 +1,197 @@ +Convert output to the current locale. Assumes utf8 input if the +decoding works, otherwise iso-8859-1. + +--- lib/tagexts.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/tagexts.c 2025-04-25 11:59:49.808794382 +0000 +@@ -2,6 +2,7 @@ + * \file lib/formats.c + */ + ++#include + #include "system.h" + + #include +@@ -192,6 +193,115 @@ typedef enum tMode_e { + TRANSFILETRIGGER = 2, + } tMode; + ++static char * strtolocale(char *str) ++{ ++ wchar_t *wstr, *wp; ++ const unsigned char *cp; ++ char *cc; ++ int state = 0; ++ int c; ++ int ccl, cca, mb_cur_max; ++ size_t l; ++ mbstate_t ps; ++ int strisutf8 = 1; ++ int locisutf8 = 1; ++ ++ if (!str) ++ return 0; ++ if (!*str) ++ return str; ++ wstr = (wchar_t *)xmalloc((strlen(str) + 1) * sizeof(*wstr)); ++ wp = wstr; ++ cp = (const unsigned char *)str; ++ while ((c = *cp++) != 0) { ++ if (state) { ++ if ((c & 0xc0) != 0x80) { ++ /* encoding error */ ++ break; ++ } ++ c = (c & 0x3f) | (state << 6); ++ if (!(state & 0x40000000)) { ++ /* check for overlong sequences */ ++ if ((c & 0x820823e0) == 0x80000000) ++ c = 0xfdffffff; ++ else if ((c & 0x020821f0) == 0x02000000) ++ c = 0xfff7ffff; ++ else if ((c & 0x000820f8) == 0x00080000) ++ c = 0xffffd000; ++ else if ((c & 0x0000207c) == 0x00002000) ++ c = 0xffffff70; ++ } ++ } else { ++ /* new sequence */ ++ if (c >= 0xfe) ++ c = 0xfffd; ++ else if (c >= 0xfc) ++ c = (c & 0x01) | 0xbffffffc; /* 5 bytes to follow */ ++ else if (c >= 0xf8) ++ c = (c & 0x03) | 0xbfffff00; /* 4 */ ++ else if (c >= 0xf0) ++ c = (c & 0x07) | 0xbfffc000; /* 3 */ ++ else if (c >= 0xe0) ++ c = (c & 0x0f) | 0xbff00000; /* 2 */ ++ else if (c >= 0xc2) ++ c = (c & 0x1f) | 0xfc000000; /* 1 */ ++ else if (c >= 0xc0) ++ c = 0xfdffffff; /* overlong */ ++ else if (c >= 0x80) ++ c = 0xfffd; ++ } ++ state = (c & 0x80000000) ? c : 0; ++ if (state) ++ continue; ++ *wp++ = (wchar_t)c; ++ } ++ if (state) { ++ /* encoding error, assume latin1 */ ++ strisutf8 = 0; ++ cp = (const unsigned char *)str; ++ wp = wstr; ++ while ((c = *cp++) != 0) { ++ *wp++ = (wchar_t)c; ++ } ++ } ++ *wp = 0; ++ mb_cur_max = MB_CUR_MAX; ++ memset(&ps, 0, sizeof(ps)); ++ cc = xmalloc(mb_cur_max); ++ /* test locale encoding */ ++ if (wcrtomb(cc, 0x20ac, &ps) != 3 || memcmp(cc, "\342\202\254", 3)) ++ locisutf8 = 0; ++ if (locisutf8 == strisutf8) { ++ _free(cc); ++ wstr = _free(wstr); ++ return str; ++ } ++ str = _free((char *)str); ++ memset(&ps, 0, sizeof(ps)); ++ ccl = cca = 0; ++ for (wp = wstr; ; wp++) { ++ l = wcrtomb(cc + ccl, *wp, &ps); ++ if (*wp == 0) ++ break; ++ if (l == (size_t)-1) { ++ if (*wp < (wchar_t)256 && mbsinit(&ps)) { ++ cc[ccl] = *wp; ++ l = 1; ++ } else ++ l = wcrtomb(cc + ccl, (wchar_t)'?', &ps); ++ } ++ if (l == 0 || l == (size_t)-1) ++ continue; ++ ccl += l; ++ if (ccl > cca) { ++ cca = ccl + 16; ++ cc = xrealloc(cc, cca + mb_cur_max); ++ } ++ } ++ wstr = _free(wstr); ++ return (char *)cc; ++} ++ + /** + * Retrieve trigger info. + * @param mode type of trigger (see tMode_e) +@@ -606,10 +716,41 @@ static int i18nTag(Header h, rpmTag tag, + #endif + + rc = headerGet(h, tag, td, HEADERGET_ALLOC); ++ if (rc && td->data) { ++ td->data = strtolocale(td->data); ++ } + return rc; + } + + /** ++ * Retrieve text and convert to locale. ++ */ ++static int localeTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags) ++{ ++ int rc; ++ rc = headerGet(h, tag, td, HEADERGET_ALLOC); ++ if (!rc) ++ return 0; ++ if (td->type == RPM_STRING_TYPE) { ++ td->data = strtolocale(td->data); ++ td->count = 1; ++ } else if (td->type == RPM_STRING_ARRAY_TYPE) { ++ char **arr; ++ int i; ++ arr = xmalloc(td->count * sizeof(*arr)); ++ for (i = 0; i < td->count; i++) { ++ arr[i] = xstrdup(((char **)td->data)[i]); ++ arr[i] = strtolocale(arr[i]); ++ } ++ _free(td->data); ++ td->data = arr; ++ td->flags = RPMTD_ALLOCED | RPMTD_PTR_ALLOCED; ++ } ++ return rc; ++} ++ ++ ++/** + * Retrieve summary text. + * @param h header + * @param[out] td tag data container +@@ -633,6 +774,16 @@ static int descriptionTag(Header h, rpmt + return i18nTag(h, RPMTAG_DESCRIPTION, td, hgflags); + } + ++static int changelognameTag(Header h, rpmtd td, headerGetFlags hgflags) ++{ ++ return localeTag(h, RPMTAG_CHANGELOGNAME, td, hgflags); ++} ++ ++static int changelogtextTag(Header h, rpmtd td, headerGetFlags hgflags) ++{ ++ return localeTag(h, RPMTAG_CHANGELOGTEXT, td, hgflags); ++} ++ + /** + * Retrieve group text. + * @param h header +@@ -1022,6 +1173,8 @@ static const struct headerTagFunc_s rpmH + { RPMTAG_LONGARCHIVESIZE, longarchivesizeTag }, + { RPMTAG_LONGSIZE, longsizeTag }, + { RPMTAG_LONGSIGSIZE, longsigsizeTag }, ++ { RPMTAG_CHANGELOGNAME, changelognameTag }, ++ { RPMTAG_CHANGELOGTEXT, changelogtextTag }, + { RPMTAG_DBINSTANCE, dbinstanceTag }, + { RPMTAG_EVR, evrTag }, + { RPMTAG_NVR, nvrTag }, diff --git a/SPECS/rpm/mtime_policy_set.diff b/SPECS/rpm/mtime_policy_set.diff new file mode 100644 index 00000000..55d990a5 --- /dev/null +++ b/SPECS/rpm/mtime_policy_set.diff @@ -0,0 +1,34 @@ +--- build/files.c.orig 2025-02-12 13:27:08.131721537 +0000 ++++ build/files.c 2025-02-12 13:32:28.371151422 +0000 +@@ -1049,10 +1049,10 @@ static void genCpioListAndHeader(FileLis + } + } + +- if (!strcmp(mtime_policy_str, "clamp_to_buildtime")) { ++ if (!strcmp(mtime_policy_str, "clamp_to_buildtime") || !strcmp(mtime_policy_str, "set_to_buildtime")) { + mtime_clamp = spec->buildTime; +- override_date = 1; +- } else if (!strcmp(mtime_policy_str, "clamp_to_source_date_epoch")) { ++ override_date = mtime_policy_str[0] == 's' ? 2 : 1; ++ } else if (!strcmp(mtime_policy_str, "clamp_to_source_date_epoch") || !strcmp(mtime_policy_str, "set_to_source_date_epoch")) { + /* Limit the maximum date to SOURCE_DATE_EPOCH if defined + * similar to the tar --clamp-mtime option + * https://reproducible-builds.org/specs/source-date-epoch/ +@@ -1065,7 +1065,7 @@ static void genCpioListAndHeader(FileLis + rpmlog(RPMLOG_ERR, _("unable to parse %s=%s\n"), "SOURCE_DATE_EPOCH", srcdate); + fl->processingFailed = 1; + } +- override_date = 1; ++ override_date = mtime_policy_str[0] == 's' ? 2 : 1; + } + } else if (*mtime_policy_str) { + rpmlog(RPMLOG_WARNING, +@@ -1214,7 +1214,7 @@ static void genCpioListAndHeader(FileLis + } + } + +- if (override_date && flp->fl_mtime > mtime_clamp) { ++ if (override_date && (flp->fl_mtime > mtime_clamp || override_date == 2)) { + flp->fl_mtime = mtime_clamp; + } + /* diff --git a/SPECS/rpm/nextiteratorheaderblob.diff b/SPECS/rpm/nextiteratorheaderblob.diff new file mode 100644 index 00000000..4484557b --- /dev/null +++ b/SPECS/rpm/nextiteratorheaderblob.diff @@ -0,0 +1,68 @@ +--- lib/rpmdb.c.orig 2020-11-27 13:09:17.968992873 +0000 ++++ lib/rpmdb.c 2020-11-27 13:14:21.524165780 +0000 +@@ -2679,6 +2679,48 @@ int rpmdbCtrl(rpmdb db, rpmdbCtrlOp ctrl + return dbctrl ? dbCtrl(db, dbctrl) : 1; + } + ++const unsigned char *rpmdbNextIteratorHeaderBlob(rpmdbMatchIterator mi, unsigned int *size) ++{ ++ dbiIndex dbi = NULL; ++ unsigned char * uh; ++ unsigned int uhlen; ++ int rc; ++ if (mi == NULL || mi->mi_re != NULL) ++ return NULL; ++ if (pkgdbOpen(mi->mi_db, 0, &dbi)) ++ return NULL; ++ if (mi->mi_dbc == NULL) ++ mi->mi_dbc = dbiCursorInit(dbi, mi->mi_cflags); ++ miFreeHeader(mi, dbi); ++ uh = NULL; ++ uhlen = 0; ++ do { ++ if (mi->mi_set) { ++ if (!(mi->mi_setx < mi->mi_set->count)) ++ return NULL; ++ mi->mi_offset = dbiIndexRecordOffset(mi->mi_set, mi->mi_setx); ++ mi->mi_filenum = dbiIndexRecordFileNumber(mi->mi_set, mi->mi_setx); ++ } else { ++ rc = pkgdbGet(dbi, mi->mi_dbc, 0, &uh, &uhlen); ++ if (rc == 0) ++ mi->mi_offset = pkgdbKey(dbi, mi->mi_dbc); ++ ++ /* Terminate on error or end of keys */ ++ if (rc || (mi->mi_setx && mi->mi_offset == 0)) ++ return NULL; ++ } ++ mi->mi_setx++; ++ } while (mi->mi_offset == 0); ++ if (uh == NULL) { ++ rc = pkgdbGet(dbi, mi->mi_dbc, mi->mi_offset, &uh, &uhlen); ++ if (rc || uh == NULL) ++ return NULL; ++ } ++ if (size) ++ *size = uhlen; ++ return uh; ++} ++ + char *rpmdbCookie(rpmdb db) + { + void *cookie = NULL; +--- include/rpm/rpmdb.h.orig 2020-11-27 13:09:17.968992873 +0000 ++++ include/rpm/rpmdb.h 2020-11-27 13:09:36.352942782 +0000 +@@ -253,6 +253,14 @@ int rpmdbStat(const char *prefix, struct + */ + int rpmdbFStat(rpmdb db, struct stat *statbuf); + ++/** \ingroup rpmdb ++ * Return next unverified package header blob from iteration. ++ * @param mi rpm database iterator ++ * @retval size header blob size in bytes ++ * @return NULL on end of iteration. ++ */ ++const unsigned char *rpmdbNextIteratorHeaderBlob(rpmdbMatchIterator mi, unsigned int *size); ++ + #ifdef __cplusplus + } + #endif diff --git a/SPECS/rpm/nomagiccheck.diff b/SPECS/rpm/nomagiccheck.diff new file mode 100644 index 00000000..91597388 --- /dev/null +++ b/SPECS/rpm/nomagiccheck.diff @@ -0,0 +1,13 @@ +Don't let rpm complain about a missing /etc/magic.mgc file + +--- build/rpmfc.c.orig 2020-09-30 13:08:18.770584384 +0000 ++++ build/rpmfc.c 2020-09-30 13:08:54.306508417 +0000 +@@ -1159,7 +1159,7 @@ static uint32_t getElfColor(const char * + + rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode) + { +- int msflags = MAGIC_CHECK | MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS | MAGIC_ERROR; ++ int msflags = MAGIC_COMPRESS | MAGIC_NO_CHECK_TOKENS | MAGIC_ERROR; + int mimeflags = msflags | MAGIC_MIME_TYPE; + int nerrors = 0; + rpmRC rc = RPMRC_FAIL; diff --git a/SPECS/rpm/noprereqdeprec.diff b/SPECS/rpm/noprereqdeprec.diff new file mode 100644 index 00000000..76504a4a --- /dev/null +++ b/SPECS/rpm/noprereqdeprec.diff @@ -0,0 +1,20 @@ +--- build/parsePreamble.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ build/parsePreamble.c 2024-12-16 09:21:44.247668941 +0000 +@@ -1103,7 +1103,7 @@ static struct PreambleRec_s const preamb + {RPMTAG_SUGGESTNAME, 2, 0, 0, 0, LEN_AND_STR("suggests")}, + {RPMTAG_SUPPLEMENTNAME, 2, 0, 0, 0, LEN_AND_STR("supplements")}, + {RPMTAG_ENHANCENAME, 2, 0, 0, 0, LEN_AND_STR("enhances")}, +- {RPMTAG_PREREQ, 2, 1, 0, 0, LEN_AND_STR("prereq")}, ++ {RPMTAG_PREREQ, 2, 0, 0, 0, LEN_AND_STR("prereq")}, + {RPMTAG_CONFLICTNAME, 0, 0, 0, 0, LEN_AND_STR("conflicts")}, + {RPMTAG_OBSOLETENAME, 0, 0, 0, 0, LEN_AND_STR("obsoletes")}, + {RPMTAG_PREFIXES, 0, 0, 1, 0, LEN_AND_STR("prefixes")}, +@@ -1113,7 +1113,7 @@ static struct PreambleRec_s const preamb + {RPMTAG_BUILDARCHS, 0, 0, 0, 0, LEN_AND_STR("buildarch")}, + {RPMTAG_BUILDCONFLICTS, 0, 0, 0, 1, LEN_AND_STR("buildconflicts")}, + {RPMTAG_BUILDOPTION, 2, 0, 0, 1, LEN_AND_STR("buildoption")}, +- {RPMTAG_BUILDPREREQ, 0, 1, 0, 1, LEN_AND_STR("buildprereq")}, ++ {RPMTAG_BUILDPREREQ, 0, 0, 0, 1, LEN_AND_STR("buildprereq")}, + {RPMTAG_BUILDREQUIRES, 0, 0, 0, 1, LEN_AND_STR("buildrequires")}, + {RPMTAG_BUILDSYSTEM, 0, 0, 1, 1, LEN_AND_STR("buildsystem")}, + {RPMTAG_AUTOREQPROV, 0, 0, 0, 0, LEN_AND_STR("autoreqprov")}, diff --git a/SPECS/rpm/posttrans.diff b/SPECS/rpm/posttrans.diff new file mode 100644 index 00000000..9dbaacdd --- /dev/null +++ b/SPECS/rpm/posttrans.diff @@ -0,0 +1,415 @@ +--- include/rpm/rpmcli.h.orig 2025-02-19 15:29:33.000000000 +0000 ++++ include/rpm/rpmcli.h 2025-04-14 13:20:00.048365266 +0000 +@@ -306,6 +306,7 @@ enum rpmInstallFlags_e { + INSTALL_ALLMATCHES = (1 << 9), /*!< from --allmatches */ + INSTALL_REINSTALL = (1 << 10), /*!< from --reinstall */ + INSTALL_RESTORE = (1 << 11), /*!< from --restore */ ++ INSTALL_RUNPOSTTRANS = (1 << 12), /*!< from --runposttrans */ + }; + + typedef rpmFlags rpmInstallFlags; +@@ -396,6 +397,15 @@ int rpmErase(rpmts ts, struct rpmInstall + int rpmRestore(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv); + + /** \ingroup rpmcli ++ * Run posttrans scriptlets ++ * @param ts transaction set ++ * @param ia control args/bits ++ * @param argv array of trigger manifest file names (NULL terminated) ++ * @return 0 on success ++ */ ++int rpmRunPostTrans(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t argv); ++ ++/** \ingroup rpmcli + */ + extern struct rpmInstallArguments_s rpmIArgs; + +--- include/rpm/rpmts.h.orig 2025-04-14 13:19:55.520372147 +0000 ++++ include/rpm/rpmts.h 2025-04-14 13:20:00.052365260 +0000 +@@ -253,6 +253,15 @@ int rpmtsOrder(rpmts ts); + int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet); + + /** \ingroup rpmts ++ * Run all posttrans scriptlets described in the manifest data. ++ * ++ * @param ts transaction set ++ * @param manifest the manifest data ++ * @return 0 on success, -1 on error ++ */ ++int rpmtsRunPostTrans(rpmts ts, ARGV_const_t manifest); ++ ++/** \ingroup rpmts + * Reference a transaction set instance. + * @param ts transaction set + * @return new transaction set reference +--- lib/poptI.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/poptI.c 2025-04-14 13:20:00.052365260 +0000 +@@ -283,6 +283,10 @@ struct poptOption rpmInstallPoptTable[] + &rpmIArgs.installInterfaceFlags, (INSTALL_RESTORE), + N_("restore package(s)"), + N_("+") }, ++ { "runposttrans", '\0', POPT_BIT_SET, ++ &rpmIArgs.installInterfaceFlags, INSTALL_RUNPOSTTRANS, ++ N_("run posttrans scriptlet"), ++ N_("") }, + + POPT_TABLEEND + }; +--- lib/psm.c.orig 2025-04-14 13:19:55.504372171 +0000 ++++ lib/psm.c 2025-04-14 13:20:00.052365260 +0000 +@@ -1009,7 +1009,7 @@ static rpmRC rpmPackageErase(rpmts ts, r + } + if (rc) break; + +- if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERPOSTUN))) { ++ if (ts->dump_posttrans || !(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERPOSTUN))) { + /* Prepare post transaction uninstall triggers */ + rpmtriggersPrepPostUnTransFileTrigs(psm->ts, psm->te); + } +--- lib/rpminstall.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/rpminstall.c 2025-04-25 09:21:50.799906982 +0000 +@@ -6,6 +6,8 @@ + + #include + ++#include ++ + #include + #include + #include /* rpmReadPackageFile, vercmp etc */ +@@ -90,6 +92,24 @@ static rpmVSFlags setvsFlags(struct rpmI + return vsflags; + } + ++static const char * ++posttranstag2str(rpmTagVal stag) ++{ ++ switch (stag) { ++ case RPMTAG_POSTTRANS: ++ return "posttrans"; ++ case RPMTAG_POSTUNTRANS: ++ return "postuntrans"; ++ case RPMTAG_TRIGGERIN: ++ return "transfiletriggerin"; ++ case RPMTAG_TRIGGERUN: ++ return "transfiletriggerun"; ++ case RPMTAG_TRIGGERPOSTUN: ++ return "transfiletriggerpostun"; ++ } ++ return rpmTagGetName(stag); ++} ++ + void * rpmShowProgress(const void * arg, + const rpmCallbackType what, + const rpm_loff_t amount, +@@ -213,8 +233,20 @@ void * rpmShowProgress(const void * arg, + case RPMCALLBACK_CPIO_ERROR: + break; + case RPMCALLBACK_SCRIPT_ERROR: ++ if (flags & INSTALL_RUNPOSTTRANS) { ++ rpmTagVal stag = (rpmTagVal)amount; ++ char *s = headerGetAsString(h, RPMTAG_NEVRA); ++ fprintf(stdout, "Error from %%%s(%s)\n", posttranstag2str(stag), s); ++ free(s); ++ } + break; + case RPMCALLBACK_SCRIPT_START: ++ if (flags & INSTALL_RUNPOSTTRANS) { ++ rpmTagVal stag = (rpmTagVal)amount; ++ char *s = headerGetAsString(h, RPMTAG_NEVRA); ++ fprintf(stdout, "Running %%%s(%s)\n", posttranstag2str(stag), s); ++ free(s); ++ } + break; + case RPMCALLBACK_SCRIPT_STOP: + break; +@@ -831,3 +863,33 @@ int rpmInstallSource(rpmts ts, const cha + return rc; + } + ++int rpmRunPostTrans(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_const_t fileArgv) ++{ ++ ARGV_t manifest = NULL; ++ FILE *f; ++ char line[BUFSIZ], *s, *p; ++ int rc = 1; ++ ++ if (fileArgv == NULL) return 0; ++ if (!fileArgv[0] || fileArgv[1] != NULL) { ++ rpmlog(RPMLOG_ERR, _("runposttrans needs exactly one manifest file\n")); ++ goto exit; ++ } ++ if (!(f = fopen(fileArgv[0], "r"))) { ++ rpmlog(RPMLOG_ERR, _("cannot open %s: %s\n"), fileArgv[0], strerror(errno)); ++ goto exit; ++ } ++ while ((s = fgets(line, sizeof(line) - 1, f)) != 0) { ++ if ((p = strrchr(s, '\n')) != 0) ++ *p = 0; ++ argvAdd(&manifest, s); ++ } ++ fclose(f); ++ rpmlog(RPMLOG_DEBUG, "running posttrans scriptlets\n"); ++ rpmtsClean(ts); ++ setNotifyFlag(ia, ts); ++ rc = rpmtsRunPostTrans(ts, manifest); ++exit: ++ argvFree(manifest); ++ return rc; ++} +--- lib/rpmtriggers.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/rpmtriggers.c 2025-04-14 13:20:00.052365260 +0000 +@@ -1,5 +1,6 @@ + #include "system.h" + ++#include + #include + #include + #include +@@ -34,7 +35,7 @@ rpmtriggers rpmtriggersFree(rpmtriggers + return NULL; + } + +-static void rpmtriggersAdd(rpmtriggers trigs, unsigned int hdrNum, ++void rpmtriggersAdd(rpmtriggers trigs, unsigned int hdrNum, + unsigned int tix, unsigned int priority) + { + if (trigs->count == trigs->alloced) { +@@ -190,6 +191,14 @@ int runPostUnTransFileTrigs(rpmts ts) + if (trigH == NULL) + continue; + ++ if (ts->dump_posttrans) { ++ char *trigNEVRA = headerGetAsString(trigH, RPMTAG_NEVRA); ++ rpmlog(RPMLOG_NOTICE, "dump_posttrans: transfiletriggerpostun %u %u %s\n", trigs->triggerInfo[i].tix, trigs->triggerInfo[i].hdrNum, trigNEVRA); ++ free(trigNEVRA); ++ headerFree(trigH); ++ continue; ++ } ++ + /* Prepare and run script */ + script = rpmScriptFromTriggerTag(trigH, + triggertag(RPMSENSE_TRIGGERPOSTUN), +@@ -613,6 +622,16 @@ rpmRC runImmedFileTriggers(rpmts ts, rpm + rpmTagVal priorityTag; + rpmtriggers triggers; + ++ if (sense == RPMSENSE_TRIGGERIN && tm == RPMSCRIPT_TRANSFILETRIGGER && ts->dump_posttrans) { ++ unsigned int hdrNum = headerGetInstance(trigH); ++ if (hdrNum) { ++ char *trigNEVRA = headerGetAsString(trigH, RPMTAG_NEVRA); ++ rpmlog(RPMLOG_NOTICE, "dump_posttrans: install %u %s\n", hdrNum, trigNEVRA); ++ free(trigNEVRA); ++ } ++ headerFree(trigH); ++ return RPMRC_OK; ++ } + if (tm == RPMSCRIPT_FILETRIGGER) { + priorityTag = RPMTAG_FILETRIGGERPRIORITIES; + } else { +--- lib/rpmtriggers.h.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/rpmtriggers.h 2025-04-14 13:20:00.052365260 +0000 +@@ -24,6 +24,10 @@ rpmtriggers rpmtriggersCreate(unsigned i + RPM_GNUC_INTERNAL + rpmtriggers rpmtriggersFree(rpmtriggers triggers); + ++RPM_GNUC_INTERNAL ++void rpmtriggersAdd(rpmtriggers trigs, unsigned int hdrNum, ++ unsigned int tix, unsigned int priority); ++ + /* + * Prepare post trans uninstall file triggers. After transcation uninstalled + * files are not saved anywhere. So we need during uninstalation of every +--- lib/rpmts_internal.h.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/rpmts_internal.h 2025-04-14 13:20:00.052365260 +0000 +@@ -83,6 +83,8 @@ struct rpmts_s { + int min_writes; /*!< macro minimize_writes used */ + + time_t overrideTime; /*!< Time value used when overriding system clock. */ ++ ++ int dump_posttrans; /*!< macro dump_posttrans used */ + }; + + /** \ingroup rpmts +--- lib/transaction.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ lib/transaction.c 2025-04-14 13:20:00.056365254 +0000 +@@ -1475,6 +1475,8 @@ static int rpmtsSetup(rpmts ts, rpmprobF + /* Get available space on mounted file systems. */ + (void) rpmtsInitDSI(ts); + ++ /* Initialize the dump_posttrans flag */ ++ ts->dump_posttrans = (rpmExpandNumeric("%{?_dump_posttrans}") > 0); + return 0; + } + +@@ -1858,6 +1860,15 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rp + /* Actually install and remove packages */ + nfailed = rpmtsProcess(ts); + ++ if (ts->dump_posttrans) { ++ rpmlog(RPMLOG_NOTICE, "dump_posttrans: enabled\n"); ++ runPostUnTransFileTrigs(ts); ++ runTransScripts(ts, PKG_TRANSFILETRIGGERIN); ++ /* Final exit code */ ++ rc = nfailed ? -1 : 0; ++ goto exit; ++ } ++ + /* Run %posttrans scripts unless disabled */ + if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS))) { + rpmlog(RPMLOG_DEBUG, "running %%posttrans scripts\n"); +@@ -1901,3 +1912,117 @@ exit: + sigaction(SIGPIPE, &oact, NULL); + return rc; + } ++ ++static unsigned int runPostTransFindPkgNum(const char **lpp) ++{ ++ const char *lp = *lpp; ++ unsigned int num = strtoul(lp, 0, 10); ++ while (*lp >= '0' && *lp <= '9') ++ lp++; ++ while (*lp == ' ') ++ lp++; ++ *lpp = lp; ++ return num; ++} ++ ++static Header runPostTransFindPkg(rpmts ts, const char *lp) ++{ ++ rpmdbMatchIterator mi; ++ Header h = NULL; ++ unsigned int hdrnum = runPostTransFindPkgNum(&lp); ++ if (!*lp) ++ return NULL; ++ if (hdrnum) { ++ mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES, &hdrnum, sizeof(hdrnum)); ++ h = headerLink(rpmdbNextIterator(mi)); ++ rpmdbFreeIterator(mi); ++ } ++ if (h) { ++ char *NEVRA = headerGetAsString(h, RPMTAG_NEVRA); ++ if (!NEVRA || strcmp(NEVRA, lp) != 0) ++ h = headerFree(h); ++ _free(NEVRA); ++ } ++ if (!h) { ++ mi = rpmtsInitIterator(ts, RPMDBI_LABEL, lp, strlen(lp)); ++ h = headerLink(rpmdbNextIterator(mi)); ++ rpmdbFreeIterator(mi); ++ } ++ if (!h) ++ rpmlog(RPMLOG_WARNING, "package %s is not installed\n", lp); ++ return h; ++} ++ ++int rpmtsRunPostTrans(rpmts ts, ARGV_const_t manifest) ++{ ++ int rc = -1; /* assume failure */ ++ /* setup */ ++ tsMembers tsmem = rpmtsMembers(ts); ++ rpmtxn txn = NULL; ++ /* Ignore SIGPIPE for the duration of transaction */ ++ struct sigaction act, oact; ++ memset(&act, 0, sizeof(act)); ++ act.sa_handler = SIG_IGN; ++ sigaction(SIGPIPE, &act, &oact); ++ /* Force default 022 umask during transaction for consistent results */ ++ mode_t oldmask = umask(022); ++ ++ if (tsmem->orderCount) ++ goto exit; ++ char *line; ++ while ((line = *manifest++) != 0) { ++ if (!strncmp(line, "dump_posttrans: install ", 24)) { ++ const char *lp = line + 24; ++ Header h = runPostTransFindPkg(ts, lp); ++ if (!h) ++ continue; ++ rpmte p = rpmteNew(ts, h, TR_ADDED, line + 45, NULL, RPMTE_INSTALL); ++ if (tsmem->orderCount >= tsmem->orderAlloced) { ++ tsmem->orderAlloced += (tsmem->orderCount - tsmem->orderAlloced) + tsmem->delta; ++ tsmem->order = xrealloc(tsmem->order, tsmem->orderAlloced * sizeof(*tsmem->order)); ++ } ++ tsmem->order[tsmem->orderCount++] = p; ++ ++ if (tsmem->addedPackages == NULL) ++ tsmem->addedPackages = rpmalCreate(ts, 5); ++ rpmalAdd(tsmem->addedPackages, p); ++ packageHashAddEntry(tsmem->installedPackages, headerGetInstance(h), p); ++ } else if (!strncmp(line, "dump_posttrans: transfiletriggerpostun ", 39)) { ++ const char *lp = line + 39; ++ unsigned int tix = runPostTransFindPkgNum(&lp); ++ Header h = runPostTransFindPkg(ts, lp); ++ struct rpmtd_s priorities; ++ if (!h) ++ continue; ++ headerGet(h, RPMTAG_TRANSFILETRIGGERPRIORITIES, &priorities, HEADERGET_MINMEM); ++ if (rpmtdSetIndex(&priorities, tix) >= 0) ++ rpmtriggersAdd(ts->trigs2run, headerGetInstance(h), tix, *rpmtdGetUint32(&priorities)); ++ headerFree(h); ++ } ++ } ++ ++ if (!(txn = rpmtxnBegin(ts, RPMTXN_WRITE))) ++ goto exit; ++ ++ if (rpmChrootSet(rpmtsRootDir(ts))) ++ goto exit; ++ ++ /* run posttrans scripts */ ++ rpmlog(RPMLOG_DEBUG, "running post-transaction scripts\n"); ++ runTransScripts(ts, PKG_POSTTRANS); ++ runTransScripts(ts, PKG_POSTUNTRANS); ++ /* run %transfiletriggerin scripts */ ++ runFileTriggers(ts, NULL, -1, RPMSENSE_TRIGGERIN, RPMSCRIPT_TRANSFILETRIGGER, 0); ++ /* run %transfiletriggerpostun scrips */ ++ runPostUnTransFileTrigs(ts); ++ /* Run immed %transfiletriggerin scripts */ ++ runTransScripts(ts, PKG_TRANSFILETRIGGERIN); ++ rc = 0; ++ ++exit: ++ (void) umask(oldmask); ++ rpmtxnEnd(txn); ++ sigaction(SIGPIPE, &oact, NULL); ++ rpmtsEmpty(ts); ++ return rc; ++} +--- tools/rpm.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ tools/rpm.c 2025-04-14 13:20:00.056365254 +0000 +@@ -21,6 +21,7 @@ enum modes { + MODE_ERASE = (1 << 2), + MODE_RESTORE = (1 << 4), + #define MODES_IE (MODE_INSTALL | MODE_ERASE) ++ MODE_RUNPOSTTRANS = (1 << 5), + + MODE_UNKNOWN = 0 + }; +@@ -115,6 +116,11 @@ int main(int argc, char *argv[]) + int eflags = (ia->installInterfaceFlags & INSTALL_ERASE); + int rflags = (ia->installInterfaceFlags & INSTALL_RESTORE); + ++ if (ia->installInterfaceFlags & INSTALL_RUNPOSTTRANS) { ++ if (iflags || eflags || rflags) ++ argerror(_("only one major mode may be specified")); ++ bigMode = MODE_RUNPOSTTRANS; ++ } + if (iflags & eflags & rflags) + argerror(_("only one major mode may be specified")); + else if (iflags) +@@ -293,6 +299,14 @@ int main(int argc, char *argv[]) + ec = rpmcliVerify(ts, qva, (ARGV_const_t) poptGetArgs(optCon)); + } break; + ++ case MODE_RUNPOSTTRANS: ++ if (!poptPeekArg(optCon)) { ++ argerror(_("need posttrans manifest for --runposttrans")); ++ } else { ++ ec += rpmRunPostTrans(ts, ia, (ARGV_const_t) poptGetArgs(optCon)); ++ } ++ break; ++ + case MODE_UNKNOWN: + if (poptPeekArg(optCon) != NULL || argc <= 1) { + printUsage(optCon, stderr, 0); diff --git a/SPECS/rpm/refreshtestarch.diff b/SPECS/rpm/refreshtestarch.diff new file mode 100644 index 00000000..6f232a29 --- /dev/null +++ b/SPECS/rpm/refreshtestarch.diff @@ -0,0 +1,10 @@ +--- lib/psm.c.orig 2023-09-19 10:10:10.000000000 +0000 ++++ lib/psm.c 2023-10-09 12:21:38.576812293 +0000 +@@ -709,6 +709,7 @@ void rpmpsmNotify(rpmpsm psm, int what, + static void markReplacedInstance(rpmts ts, rpmte te) + { + rpmdbMatchIterator mi = rpmtsTeIterator(ts, te, 1); ++ rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_STRCMP, rpmteA(te)); + while (rpmdbNextIterator(mi) != NULL) { + rpmteSetDBInstance(te, rpmdbGetIteratorOffset(mi)); + break; diff --git a/SPECS/rpm/remove-brp-strips.diff b/SPECS/rpm/remove-brp-strips.diff new file mode 100644 index 00000000..600117dd --- /dev/null +++ b/SPECS/rpm/remove-brp-strips.diff @@ -0,0 +1,13 @@ +Subject: remove references to removed brp scripts + +--- platform.in.orig 2021-09-23 19:23:57.822814696 +0000 ++++ platform.in 2021-09-23 19:24:31.534745951 +0000 +@@ -96,8 +96,6 @@ + %{?__brp_compress} \ + %{?__brp_elfperms} \ + %{?__brp_strip} \ +- %{?__brp_strip_static_archive} \ +- %{?__brp_strip_comment_note} \ + %{?__brp_remove_la_files} \ + %{nil} + diff --git a/SPECS/rpm/rpm-shorten-changelog.diff b/SPECS/rpm/rpm-shorten-changelog.diff new file mode 100644 index 00000000..f9d9947c --- /dev/null +++ b/SPECS/rpm/rpm-shorten-changelog.diff @@ -0,0 +1,86 @@ +--- build/pack.c.orig ++++ build/pack.c +@@ -683,6 +683,71 @@ + return rc; + } + ++static void trimChangelog(Header h) ++{ ++ static int oneshot; ++ static int cuttime, minnum, maxnum; ++ rpm_count_t i, keep; ++ struct rpmtd_s timestd, namestd, textstd; ++ rpm_count_t count; ++ ++ if (!oneshot) { ++ char *binarychangelogtrim = rpmExpand("%{?_binarychangelogtrim}", NULL); ++ oneshot = 1; ++ if (binarychangelogtrim && *binarychangelogtrim) { ++ maxnum = atoi(binarychangelogtrim); ++ binarychangelogtrim = strchr(binarychangelogtrim, ','); ++ if (binarychangelogtrim) ++ binarychangelogtrim++; ++ } ++ if (binarychangelogtrim && *binarychangelogtrim) { ++ cuttime = atoi(binarychangelogtrim); ++ binarychangelogtrim = strchr(binarychangelogtrim, ','); ++ if (binarychangelogtrim) ++ binarychangelogtrim++; ++ } ++ if (binarychangelogtrim && *binarychangelogtrim) { ++ minnum = atoi(binarychangelogtrim); ++ binarychangelogtrim = strchr(binarychangelogtrim, ','); ++ } ++ } ++ if (!cuttime && !minnum && !maxnum) { ++ return; ++ } ++ ++ if (!headerGet(h, RPMTAG_CHANGELOGTIME, ×td, HEADERGET_MINMEM)) ++ return; ++ count = rpmtdCount(×td); ++ if ((!cuttime || count <= minnum) && (!maxnum || count <= maxnum)) { ++ rpmtdFreeData(×td); ++ return; ++ } ++ keep = count; ++ if (maxnum && keep > maxnum) ++ keep = maxnum; ++ if (cuttime) { ++ for (i = 0; i < keep; i++) { ++ uint32_t *tp = rpmtdNextUint32(×td); ++ if (i >= minnum && tp && *tp < cuttime) ++ break; ++ } ++ keep = i; ++ } ++ if (keep >= count) { ++ rpmtdFreeData(×td); ++ return; ++ } ++ headerGet(h, RPMTAG_CHANGELOGNAME, &namestd, HEADERGET_MINMEM); ++ headerGet(h, RPMTAG_CHANGELOGTEXT, &textstd, HEADERGET_MINMEM); ++ timestd.count = namestd.count = textstd.count = keep; ++ headerMod(h, ×td); ++ headerMod(h, &namestd); ++ headerMod(h, &textstd); ++ rpmtdFreeData(&textstd); ++ rpmtdFreeData(&namestd); ++ rpmtdFreeData(×td); ++} ++ + static rpmRC packageBinary(rpmSpec spec, Package pkg, const char *cookie, int cheating, char** filename) + { + rpmRC rc = RPMRC_OK; +@@ -699,7 +764,10 @@ + + /* Copy changelog from src rpm */ + #pragma omp critical +- headerCopyTags(spec->sourcePackage->header, pkg->header, copyTags); ++ { ++ headerCopyTags(spec->sourcePackage->header, pkg->header, copyTags); ++ trimChangelog(pkg->header); ++ } + + headerPutString(pkg->header, RPMTAG_RPMVERSION, VERSION); + headerPutString(pkg->header, RPMTAG_BUILDHOST, spec->buildHost); diff --git a/SPECS/rpm/rpm.spec b/SPECS/rpm/rpm.spec new file mode 100644 index 00000000..5b5a08be --- /dev/null +++ b/SPECS/rpm/rpm.spec @@ -0,0 +1,444 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global librpmsover 10 +%bcond python 1 + +Name: rpm +%if %{with python} +BuildRequires: python-devel +%endif +BuildRequires: config +BuildRequires: binutils +BuildRequires: bzip2 +BuildRequires: cmake +BuildRequires: file-devel +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: glibc-devel +BuildRequires: gzip +BuildRequires: acl-devel +BuildRequires: libarchive-devel +BuildRequires: bzip2-devel +BuildRequires: libcap-devel +BuildRequires: libdw-devel +BuildRequires: libelf-devel +BuildRequires: libgcrypt-devel +BuildRequires: libselinux-devel +BuildRequires: libsemanage-devel +BuildRequires: libtool +BuildRequires: lua-devel +Requires: lua +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: patch +BuildRequires: perl +BuildRequires: popt-devel +BuildRequires: rpm-build +BuildRequires: xz-devel +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(zlib) +Provides: rpminst +Requires: rpm-config +Summary: The RPM Package Manager +License: GPL-2.0-or-later +Version: 4.20.1 +Release: %autorelease +URL: https://rpm.org/ +#!RemoteAsset +Source: https://ftp.osuosl.org/pub/rpm/releases/rpm-4.20.x/rpm-%{version}.tar.bz2 +#!RemoteAsset: git+https://github.com/rpm-software-management/rpmpgp_legacy#1.1 +#!CreateArchive +Source1: rpmpgp_legacy-1.1.tar.gz +Source5: rpmsort +Source8: rpmconfigcheck +Source13: rpmconfigcheck.service +# quilt patches start here +Patch5: usr-lib-sysimage-rpm.patch +Patch12: localetag.diff +Patch18: refreshtestarch.diff +Patch24: brp.diff +Patch25: brpcompress.diff +Patch26: checkfilesnoinfodir.diff +Patch33: rpmpopt.diff +Patch36: rpmqpack.diff +Patch43: rpm-shorten-changelog.diff +Patch46: remove-brp-strips.diff +Patch51: specfilemacro.diff +Patch60: safeugid.diff +Patch61: noprereqdeprec.diff +Patch67: headeradddb.diff +Patch70: fileattrs.diff +Patch71: nomagiccheck.diff +Patch78: headerchk2.diff +Patch85: brp-compress-no-img.patch +Patch94: checksepwarn.diff +Patch99: enable-postin-scripts-error.diff +Patch102: emptymanifest.diff +Patch103: find-lang-qt-qm.patch +Patch117: findsupplements.diff +Patch122: db_conversion.diff +Patch123: nextiteratorheaderblob.diff +Patch131: posttrans.diff +Patch133: zstdpool.diff +Patch135: selinux_transactional_update.patch +Patch136: rpmsort_reverse.diff +Patch138: canongnu.diff +Patch139: cmake_python_version.diff +Patch141: 0002-log-build-time-if-it-is-set-from-SOURCE_DATE_EPOCH.patch +Patch142: 0003-Error-out-on-a-missing-changelog-date.patch +Patch150: unshare.diff +Patch151: buildroot-symlink.diff +Patch154: undefbuildroot.diff +Patch155: rpm2archive.diff +Patch156: mtime_policy_set.diff +Patch157: cmake_fhardened.diff +Patch158: archcheck.diff +Patch159: emptypw.diff +Patch160: buildsysprep.diff +Patch6464: auto-config-update-aarch64-ppc64le.diff +# +# avoid bootstrapping problem +%define _binary_payload w9.bzdio + +%description +RPM Package Manager is the main tool for managing the software packages +of the openRuyi Linux distribution. + +RPM can be used to install and remove software packages. With rpm, it +is easy to update packages. RPM keeps track of all these manipulations +in a central database. This way it is possible to get an overview of +all installed packages. RPM also supports database queries. + +%package -n librpmbuild%{librpmsover} +Summary: Library for building RPM packages +# Was part of rpm before +Conflicts: rpm < %{version} + +%description -n librpmbuild%{librpmsover} +Thie package contains a library with functions for building RPM packages. + +%package -n python3-rpm +Summary: python binding for RPM +%python_provide python3-rpm +Requires: rpm = %{version} + +%description -n python3-rpm +Thie package provides python binding for RPM + + +%package devel +Summary: Development files for librpm +Requires: rpm = %{version} +# for people confusing the one with the other +Recommends: rpm-build = %{version} +Requires: popt-devel + +%description devel +This package contains the RPM C library and header files. These +development files will simplify the process of writing programs which +manipulate RPM packages and databases and are intended to make it +easier to create graphical package managers or any other tools that +need an intimate knowledge of RPM packages in order to function. + +%package build +Summary: Tools and Scripts to create rpm packages +Requires: librpmbuild%{librpmsover} = %{version} +Requires: rpm = %{version} +Provides: rpm:%_bindir/rpmbuild +Provides: rpmbuild +# build essentials +Requires: binutils +Requires: bzip2 +Requires: coreutils +Requires: diffutils +Requires: dwz +Requires: file +Requires: findutils +Requires: gawk +Requires: gcc +#Requires: gcc-PIE +Requires: /usr/bin/gzip +Requires: gettext-tools +Requires: glibc-devel +Requires: glibc-locale-base +Requires: grep +Requires: make +Requires: patch +Requires: sed +Requires: systemd-rpm-macros +Requires: tar +Requires: util-linux +Requires: which +Requires: xz +# needed for debuginfo generation +Requires: debugedit >= 5.0 +# drop candidates +Requires: cpio +Requires: (perl-rpm-packaging if perl) +Requires: file +# The point of the split +Conflicts: rpm < 4.15.0 + +%description build +If you want to build a rpm, you need this package. It provides rpmbuild +and requires some packages that are usually required. + +%package plugin-unshare +Summary: Rpm plugin for Linux namespace isolation functionality +Requires: rpm = %{version} + +%description plugin-unshare +Rpm plugin for Linux namespace isolation functionality. + +%prep +%setup -q -n rpm-%{version} +pushd rpmio +tar xf %{SOURCE1} +ln -s rpmpgp_legacy-* rpmpgp_legacy +popd + +rm -rf sqlite +%patch -P 5 -P 12 -P 18 +%patch -P 24 -P 25 -P 26 +%patch -P 33 -P 36 +%patch -P 43 -P 46 +%patch -P 51 +%patch -P 60 -P 61 -P 67 +%patch -P 70 -P 71 -P 78 +%patch -P 85 +%patch -P 94 -P 99 +%patch -P 102 -P 103 +%patch -P 117 +%patch -P 122 -P 123 +%patch -P 131 -P 133 -P 135 -P 136 -P 138 +%patch -P 139 +%patch -P 141 -P 142 +%patch -P 150 -P 151 -P 154 -P 155 -P 156 -P 157 -P 158 -P 159 +%patch -P 160 + +%ifarch aarch64 riscv64 +%patch -P 6464 +%endif + +rm -f m4/libtool.m4 +rm -f m4/lt*.m4 + +%build +export CFLAGS="%{optflags} -ffunction-sections" +export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" +%ifarch alpha +export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections" +%endif + +cpu="%{_target_cpu}" +# convert to gnu style cpu version, see config.sub +%ifarch ppc ppc64 ppc64le +cpu="${cpu/#ppc/powerpc}" +%endif + +mkdir _build +cd _build +cmake .. \ + -DRPM_HOST_SYSTEM_CPU="$cpu" \ +%ifarch %arm + -DRPM_HOST_SYSTEM_ABI=gnueabi \ +%endif + -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \ + -DCMAKE_INSTALL_MANDIR:PATH=share/man \ + -DCMAKE_INSTALL_INFODIR:PATH=share/info \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_defaultdocdir}/%{NAME} \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ + -DCMAKE_INSTALL_FULL_SYSCONFDIR:PATH=/etc \ + -DCMAKE_INSTALL_FULL_LOCALSTATEDIR:PATH=/var \ + -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=/var/lib \ + -DCMAKE_INSTALL_FULL_SHAREDSTATEDIR:PATH=/var/lib \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DRPM_VENDOR=openruyi \ + -DWITH_ARCHIVE=ON \ + -DWITH_READLINE=OFF \ + -DWITH_SELINUX=ON \ + -DWITH_SEQUOIA=OFF \ + -DWITH_LEGACY_OPENPGP=ON \ + -DENABLE_NDB=ON \ + -DENABLE_BDB_RO=ON \ + -DENABLE_SQLITE=OFF \ + -DWITH_AUDIT=OFF \ + -DWITH_DBUS=OFF \ + -DENABLE_PYTHON=%{?with_python:ON}%{?!with_python:OFF} \ + -DENABLE_TESTSUITE=OFF \ + -D__FIND_DEBUGINFO=/usr/lib/rpm/find-debuginfo \ + -D__AR:FILEPATH=ar -D__AS:FILEPATH=as \ + -D__CC:FILEPATH=gcc -D__CPP:FILEPATH="gcc -E" -D__CXX:FILEPATH=g++ \ + -D__GPG:FILEPATH=/usr/bin/gpg2 -D__AWK:FILEPATH=/usr/bin/gawk +make %{?_smp_mflags} + +%install +mkdir -p %{buildroot}/usr/lib +mkdir -p %{buildroot}/usr/share/locale +ln -s ../share/locale %{buildroot}/usr/lib/locale +pushd _build +%make_install +popd +mkdir -p %{buildroot}/bin +mkdir -p %{buildroot}/usr/sbin +install -m 755 %{SOURCE8} %{buildroot}/usr/sbin +mkdir -p %{buildroot}/usr/lib/systemd/system +install -m 644 %{SOURCE13} %{buildroot}/usr/lib/systemd/system/ +mkdir -p %{buildroot}/usr/lib/rpm/macros.d +mkdir -p %{buildroot}/usr/lib/rpm/openruyi +for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do + mkdir -p %{buildroot}/usr/src/packages/$d + chmod 755 %{buildroot}/usr/src/packages/$d +done +for d in %{buildroot}/usr/lib/rpm/platform/*-linux/macros ; do + dd=${d%%-linux/macros} + dd=${dd##*/} + mkdir %{buildroot}/usr/src/packages/RPMS/$dd + chmod 755 %{buildroot}/usr/src/packages/RPMS/$dd +done +mkdir -p %{buildroot}/usr/lib/sysimage/rpm +export RPM_BUILD_ROOT +%ifarch s390x +[ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux +%endif +rm -f %{buildroot}/usr/lib/rpmpopt +rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk} +rm -f %{buildroot}%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo +rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2 +install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm +rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc +mkdir -p %{buildroot}/etc/rpm +chmod 755 %{buildroot}/etc/rpm +# remove some nonsense or non-working scripts +pushd %{buildroot}/usr/lib/rpm/ +for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ + ocaml-find-provides.sh ocaml-find-requires.sh fileattrs/ocaml.attr \ + magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \ + brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ + brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile +do + rm -f $f +done +for i in /usr/share/automake-*/*; do + if test -f "$i" && test -f "${i##*/}"; then + rm -f "${i##*/}" + fi +done +popd +%ifarch aarch64 ppc64le riscv64 loongarch64 +install $(command -v config.guess) %{buildroot}/usr/lib/rpm +install -m 755 $(command -v config.sub) %{buildroot}/usr/lib/rpm +%endif + +bash %{buildroot}/usr/lib/rpm/find-lang.sh %{buildroot} rpm +# On arm the kernel architecture is ignored. Not the best idea, but lets stay compatible with other distros +%ifarch armv7hl armv6hl +# rpm is using the host_cpu as default for the platform, but armv6/7hl is not known by the kernel. +# so we need to enforce the platform here. +echo -n "%{_target_cpu}-openruyi-linux-gnueabi" > %{buildroot}/etc/rpm/platform +%endif + +# disable sysuser handling for now +rm %{buildroot}/usr/lib/rpm/sysusers.sh +sed -e '/^%%__systemd_sysusers/s/^/#/' -i %{buildroot}/usr/lib/rpm/macros + +%files -f %{name}.lang +%defattr(-,root,root) +%license COPYING +%exclude /usr/lib/rpm/macros.d/macros.transaction_unshare +%exclude %{_mandir}/man8/rpm-plugin-unshare* + /etc/rpm + %{_bindir}/gendiff + %{_bindir}/rpm + %{_bindir}/rpm2archive + %{_bindir}/rpm2cpio + %{_bindir}/rpmdb + %{_bindir}/rpmgraph + %{_bindir}/rpmkeys + %{_bindir}/rpmlua + %{_bindir}/rpmqpack + %{_bindir}/rpmquery + %{_bindir}/rpmsign + %{_bindir}/rpmverify + %{_bindir}/rpmsort + /usr/sbin/rpmconfigcheck + /usr/lib/systemd/system/rpmconfigcheck.service + %dir /usr/lib/rpm + /usr/lib/rpm/macros + /usr/lib/rpm/macros.d/ + /usr/lib/rpm/platform/ + /usr/lib/rpm/rpm.supp + /usr/lib/rpm/rpmdb_* + /usr/lib/rpm/rpmpopt-* + /usr/lib/rpm/rpmrc + /usr/lib/rpm/rpmsort + /usr/lib/rpm/rpmdump + /usr/lib/rpm/openruyi + /usr/lib/rpm/tgpg + %{_libdir}/rpm-plugins + %{_libdir}/librpm.so.* + %{_libdir}/librpmio.so.* + %{_libdir}/librpmsign.so.* +%doc %{_mandir}/man[18]/*.[18]* +%dir /usr/lib/sysimage/rpm +%ghost /var/lib/rpm +%dir %attr(755,root,root) /usr/src/packages/BUILD +%dir %attr(755,root,root) /usr/src/packages/SPECS +%dir %attr(755,root,root) /usr/src/packages/SOURCES +%dir %attr(755,root,root) /usr/src/packages/SRPMS +%dir %attr(755,root,root) /usr/src/packages/RPMS +%dir %attr(755,root,root) /usr/src/packages/BUILDROOT +%dir %attr(755,root,root) /usr/src/packages/RPMS/* + +%files -n librpmbuild%{librpmsover} +%{_libdir}/librpmbuild.so.%{librpmsover} +%{_libdir}/librpmbuild.so.%{librpmsover}.* + +%files -n python3-rpm +%license COPYING +%{_libdir}/python*/* + +%files build +%defattr(-,root,root) +/usr/bin/rpmbuild +/usr/lib/rpm/pkgconfigdeps.sh +/usr/lib/rpm/ocamldeps.sh +/usr/lib/rpm/rpm_macros_provides.sh +/usr/lib/rpm/elfdeps +/usr/lib/rpm/rpmdeps +/usr/lib/rpm/rpmuncompress +/usr/bin/rpmspec +/usr/lib/rpm/brp-* +/usr/lib/rpm/check-* +/usr/lib/rpm/*find* +/usr/lib/rpm/fileattrs/ +/usr/lib/rpm/*.prov +/usr/lib/rpm/*.req +%ifarch aarch64 ppc64le riscv64 loongarch64 +/usr/lib/rpm/config.guess +/usr/lib/rpm/config.sub +%endif + +%files devel +%defattr(644,root,root,755) +/usr/include/rpm +%{_libdir}/librpm.so +%{_libdir}/librpmbuild.so +%{_libdir}/librpmio.so +%{_libdir}/librpmsign.so +%{_libdir}/pkgconfig/rpm.pc +%{_libdir}/cmake/rpm +%doc %{_docdir}/rpm + +%files plugin-unshare +%defattr(-,root,root) +/usr/lib/rpm/macros.d/macros.transaction_unshare +%doc %{_mandir}/man8/rpm-plugin-unshare* + +%changelog +%{?autochangelog} diff --git a/SPECS/rpm/rpm2archive.diff b/SPECS/rpm/rpm2archive.diff new file mode 100644 index 00000000..189eed39 --- /dev/null +++ b/SPECS/rpm/rpm2archive.diff @@ -0,0 +1,589 @@ +--- tools/CMakeLists.txt.orig 2025-03-07 13:25:15.637092178 +0000 ++++ tools/CMakeLists.txt 2025-03-07 13:26:53.764950409 +0000 +@@ -41,7 +41,6 @@ if (READLINE_FOUND) + endif() + + add_executable(rpm2archive rpm2archive.c) +-target_link_libraries(rpm2archive PRIVATE PkgConfig::LIBARCHIVE) + install(TARGETS rpm2archive) + + # Everything links to these +--- tools/rpm2archive.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ tools/rpm2archive.c 2025-03-07 13:25:19.881086047 +0000 +@@ -2,6 +2,14 @@ + + #include "system.h" + ++#if defined(MAJOR_IN_MKDEV) ++#include ++#elif defined(MAJOR_IN_SYSMACROS) ++#include ++#else ++#include /* already included from system.h */ ++#endif ++ + #include /* rpmReadPackageFile .. */ + #include + #include +@@ -12,8 +20,11 @@ + + #include + ++#if 0 + #include + #include ++#endif ++ + #include + #include + #include +@@ -36,6 +47,8 @@ static struct poptOption optionsTable[] + POPT_TABLEEND + }; + ++#if 0 ++ + static void fill_archive_entry(struct archive_entry * entry, rpmfi fi, + char **hardlink) + { +@@ -282,6 +295,540 @@ static int process_package(rpmts ts, con + return rc; + } + ++#else ++ ++static int do_fwrite(FD_t fdo, const void *p, size_t l) ++{ ++ if (Fwrite(p, l, 1, fdo) != l) { ++ fprintf(stderr, "Error writing archive: %s\n", Fstrerror(fdo)); ++ return RPMRC_FAIL; ++ } ++ return RPMRC_OK; ++} ++ ++static int do_fwrite_content(FD_t fdo, char * buf, rpmfi fi) ++{ ++ rpm_loff_t left = rpmfiFSize(fi); ++ size_t len, read; ++ ++ while (left) { ++ len = (left > BUFSIZE ? BUFSIZE : left); ++ read = rpmfiArchiveRead(fi, buf, len); ++ if (read != len) { ++ fprintf(stderr, "Error reading file from rpm payload\n"); ++ break; ++ } ++ if (do_fwrite(fdo, buf, len)) { ++ fprintf(stderr, "Error writing archive: %s\n", Fstrerror(fdo)); ++ break; ++ } ++ left -= len; ++ } ++ return (left > 0); ++} ++ ++/* cpio support */ ++ ++static inline void write_cpio_entry_num(unsigned char *p, unsigned long val) ++{ ++ char space[64]; ++ sprintf(space, "%8.8lx", val); ++ memcpy(p, space, 8); ++} ++ ++static int write_cpio_entry(FD_t fdo, rpmfi fi, const char *filename, struct stat *st, const char *flink, const char *hlink, char *buf) ++{ ++ unsigned char cpioh[110]; ++ memcpy(cpioh, "070701", 6); ++ if (!fi) { ++ memset(cpioh + 6, '0', sizeof(cpioh) - 6); ++ write_cpio_entry_num(cpioh + 38, 1); ++ write_cpio_entry_num(cpioh + 94, 11); ++ if (do_fwrite(fdo, cpioh, sizeof(cpioh))) ++ return RPMRC_FAIL; ++ if (do_fwrite(fdo, "TRAILER!!!\0\0\0", 11 + 3)) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++ } ++ if (st->st_size > UINT32_MAX) { ++ fprintf(stderr, "Warning: file too large for format, skipping: %s\n", filename); ++ return RPMRC_OK; ++ } ++ size_t fnl = strlen(filename); ++ write_cpio_entry_num(cpioh + 6, st->st_ino); ++ write_cpio_entry_num(cpioh + 14, st->st_mode); ++ write_cpio_entry_num(cpioh + 22, st->st_uid); ++ write_cpio_entry_num(cpioh + 30, st->st_gid); ++ write_cpio_entry_num(cpioh + 38, st->st_nlink); ++ write_cpio_entry_num(cpioh + 46, st->st_mtime); ++ write_cpio_entry_num(cpioh + 54, st->st_size); ++ write_cpio_entry_num(cpioh + 62, major(st->st_dev)); ++ write_cpio_entry_num(cpioh + 70, minor(st->st_dev)); ++ write_cpio_entry_num(cpioh + 78, major(st->st_rdev)); ++ write_cpio_entry_num(cpioh + 86, minor(st->st_rdev)); ++ write_cpio_entry_num(cpioh + 94, fnl + 1); ++ write_cpio_entry_num(cpioh + 102, 0); ++ if (do_fwrite(fdo, cpioh, sizeof(cpioh))) ++ return RPMRC_FAIL; ++ if (do_fwrite(fdo, filename, fnl + 1)) ++ return RPMRC_FAIL; ++ fnl = (110 + fnl + 1) & 3; ++ if (fnl && do_fwrite(fdo, "\0\0\0", 4 - fnl)) ++ return RPMRC_FAIL; ++ if (S_ISLNK(st->st_mode)) { ++ if (st->st_size != strlen(flink)) ++ return RPMRC_FAIL; ++ if (do_fwrite(fdo, flink, st->st_size)) ++ return RPMRC_FAIL; ++ } else if (S_ISREG(st->st_mode)) { ++ if (st->st_size && do_fwrite_content(fdo, buf, fi)) ++ return RPMRC_FAIL; ++ } else { ++ return RPMRC_OK; ++ } ++ fnl = (st->st_size) & 3; ++ if (fnl && do_fwrite(fdo, "\0\0\0", 4 - fnl)) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++} ++ ++/* pax support */ ++ ++static void add_pax_attrib(char **paxbuf, const char *pax, const char *val) ++{ ++ size_t ten, len = 1 + strlen(pax) + 1 + strlen(val) + 1; ++ for (ten = 1; ten <= len; ten *= 10) ++ len++; ++ if (*paxbuf) ++ *paxbuf = realloc(*paxbuf, strlen(*paxbuf) + len + 1); ++ else { ++ *paxbuf = xmalloc(len + 1); ++ **paxbuf = 0; ++ } ++ sprintf(*paxbuf + strlen(*paxbuf), "%llu %s=%s\n", (unsigned long long)len, pax, val); ++} ++ ++static void set_pax_entry_num_base256(unsigned char *p, unsigned long long val, int size) ++{ ++ /* use base-256 encoding */ ++ unsigned char *pe = p + size; ++ for (; pe > p; val >>= 8) ++ *pe-- = (unsigned char)(val & 255); ++ *p |= 0x80; ++} ++ ++static inline void set_pax_entry_num(unsigned char *p, unsigned long long val, int size, char *pax, char **paxbuf) ++{ ++ char space[64]; ++ int sz = size == 12 ? size - 1 : size - 2; ++ if (paxbuf && val >= (unsigned long long)1 << (sz * 3)) { ++ /* add pax header */ ++ sprintf(space, "%llu", val); ++ add_pax_attrib(paxbuf, pax, space); ++ } ++ if (val >= (unsigned long long)1 << (size * 3)) { ++ set_pax_entry_num_base256(p, val, size); ++ return; ++ } ++ sprintf(space, "%0*llo ", sz, val); ++ memcpy(p, space, size); ++} ++ ++static int pax_is_ascii(const char *val) ++{ ++ for (; *val; val++) ++ if (*(const unsigned char *)val >= 0x80) ++ return 0; ++ return 1; ++} ++ ++static inline void set_pax_entry_str(unsigned char *p, const char *val, int size, char *pax, char **paxbuf) ++{ ++ size_t l = strlen(val); ++ if (paxbuf && (l > size || !pax_is_ascii(val))) ++ add_pax_attrib(paxbuf, pax, val); ++ memcpy(p, val, l < size ? l : size); ++} ++ ++static void set_pax_path_mangle(unsigned char *paxh, const char *filename, const char *insert) ++{ ++ size_t l = strlen(filename); ++ size_t ilen = insert ? strlen(insert) + 1 : 0; ++ const char *p, *p2, *bn; ++ int isdir = 0; ++ /* strip trailing '/' and '/.' components */ ++ while (l && (filename[l - 1] == '/' || (filename[l - 1] == '.' && l > 1 && filename[l - 2] == '/'))) { ++ l--; ++ isdir = 1; ++ } ++ if (ilen) { ++ isdir = 0; /* no trailing slash for a PaxHeader */ ++ if (l == 0) { ++ filename = "/rootdir"; ++ l = 8; ++ } else if (l == 1 && filename[0] == '.') { ++ filename = "currentdir"; ++ l = 10; ++ } else if (l == 2 && filename[0] == '.' && filename[1] == '.') { ++ filename = "parrentdir"; ++ l = 10; ++ } ++ } ++ /* find the basename */ ++ bn = filename + l; ++ while (bn > filename && bn[-1] != '/') ++ bn--; ++ /* truncate basename (we use 99 like libarchive so we can add a '/' if the prefix is empty) */ ++ l -= bn - filename; ++ if (l > 99 - (ilen + isdir)) ++ l = 99 - (ilen + isdir); ++ /* calculate prefix */ ++ if (bn - filename <= 100 - (l + ilen + isdir)) { ++ p = filename; /* no need for a prefix */ ++ } else { ++ p = bn - filename > 155 ? filename + 155 : bn; ++ while (p > filename && *p != '/') ++ p--; ++ /* move as much of the prefix into name as possible */ ++ if (p > filename && bn - p < 99 - (l + ilen + isdir)) { ++ p2 = strchr(bn - (99 - (l + ilen + isdir)), '/'); ++ if (p2 && p2 < p) ++ p = p2; ++ } ++ } ++ /* copy the prefix */ ++ if (p != filename) { ++ memcpy(paxh + 345, filename, p - filename); ++ p++; /* skip the '/' */ ++ } ++ /* copy rest of the dir */ ++ p2 = p + (99 - (l + ilen + isdir)) > bn ? bn : p + (99 - (l + ilen + isdir)); ++ while (p2 > p && *p2 != '/') ++ p2--; ++ if (p2 < bn && *p2 == '/') ++ p2++; /* always fits as we used 99 as size limit above */ ++ memcpy(paxh, p, p2 - p); ++ /* copy the insert */ ++ if (ilen) { ++ memcpy(paxh + (p2 - p), insert, ilen); ++ paxh[p2 - p + ilen - 1] = '/'; ++ } ++ /* copy the basename */ ++ memcpy(paxh + (p2 - p) + ilen, bn, l); ++ if (isdir) ++ paxh[p2 - p + ilen + l] = '/'; ++} ++ ++static int set_pax_path(unsigned char *paxh, const char *filename) ++{ ++ size_t l = strlen(filename); ++ if (l <= 100) { ++ memcpy(paxh, filename, l); ++ return 0; ++ } ++ const char *p = strchr(filename + l - 100 - 1, '/'); ++ if (p == filename) ++ p = strchr(filename + 1, '/'); ++ if (p && p[1] && p - filename <= 155) { ++ memcpy(paxh, p + 1, l - (p + 1 - filename)); ++ memcpy(paxh + 345, filename, p - filename); ++ return 0; ++ } ++ set_pax_path_mangle(paxh, filename, NULL); ++ return 1; ++} ++ ++static int write_pax_entry_pax(FD_t fdo, rpmfi fi, const char *filename, struct stat *st, char *paxbuf); ++ ++static int write_pax_entry(FD_t fdo, rpmfi fi, const char *filename, struct stat *st, const char *flink, const char *hlink, char *buf) ++{ ++ unsigned char paxh[512]; ++ int tartype = -1; ++ rpm_loff_t size = 0; ++ ++ memset(paxh, 0, sizeof(paxh)); ++ if (!fi) { ++ if (do_fwrite(fdo, paxh, sizeof(paxh))) ++ return RPMRC_FAIL; ++ if (do_fwrite(fdo, paxh, sizeof(paxh))) ++ return RPMRC_FAIL; ++ return RPMRC_OK; ++ } ++ if (filename == NULL && flink) ++ tartype = 'x'; ++ else if (S_ISREG(st->st_mode)) ++ tartype = st->st_nlink > 1 && !rpmfiArchiveHasContent(fi) ? '1' : '0'; ++ else if (S_ISLNK(st->st_mode)) ++ tartype = '2'; ++ else if (S_ISCHR(st->st_mode)) ++ tartype = '3'; ++ else if (S_ISBLK(st->st_mode)) ++ tartype = '4'; ++ else if (S_ISDIR(st->st_mode)) ++ tartype = '5'; ++ else if (S_ISFIFO(st->st_mode)) ++ tartype = '6'; ++ if (tartype == -1) { ++ fprintf(stderr, "Warning: unsupported file type, skipping: %s\n", filename); ++ return RPMRC_OK; ++ } ++ if (tartype == '5') { ++ size_t l = strlen(filename); ++ if (!l || filename[l - 1] != '/') { ++ char *dirfilename = rstrscat(NULL, filename, "/", NULL); ++ int r = write_pax_entry(fdo, fi, dirfilename, st, flink, hlink, buf); ++ _free(dirfilename); ++ return r; ++ } ++ } ++ if (tartype == '0' || tartype == '1') ++ size = rpmfiFSize(fi); ++ else if (tartype == 'x') ++ size = (rpm_loff_t)strlen(buf); ++ ++ /* fill entry header */ ++ char *paxbuf = NULL; ++ char **paxbufp = tartype == 'x' ? NULL : &paxbuf; ++ if (tartype == 'x') { ++ set_pax_path_mangle(paxh, flink, "PaxHeader"); ++ } else { ++ if (set_pax_path(paxh, filename) || !pax_is_ascii(filename)) ++ add_pax_attrib(paxbufp, "path", filename); ++ } ++ set_pax_entry_num(paxh + 100, st->st_mode & 07777, 8, NULL, NULL); ++ set_pax_entry_num(paxh + 108, st->st_uid, 8, "uid", paxbufp); ++ set_pax_entry_num(paxh + 116, st->st_gid, 8, "gid", paxbufp); ++ set_pax_entry_num(paxh + 124, size, 12, "size", paxbufp); ++ set_pax_entry_num(paxh + 136, st->st_mtime, 12, "mtime", paxbufp); ++ memset(paxh + 148, ' ', 8); ++ paxh[156] = tartype; ++ if (tartype == '1' || tartype == '2') ++ set_pax_entry_str(paxh + 157, tartype == '1' ? hlink : flink, 100, "linkpath", paxbufp); ++ memcpy(paxh + 257, "ustar\00000", 8); ++ set_pax_entry_str(paxh + 265, rpmfiFUser(fi), 32, "user", paxbufp); ++ set_pax_entry_str(paxh + 297, rpmfiFGroup(fi), 32, "group", paxbufp); ++ set_pax_entry_num(paxh + 329, major(st->st_rdev), 8, "SCHILY.devmajor", paxbufp); ++ set_pax_entry_num(paxh + 337, minor(st->st_rdev), 8, "SCHILY.devminor", paxbufp); ++ int i, checksum = 0; ++ for (i = 0; i < 512; i++) ++ checksum += paxh[i]; ++ set_pax_entry_num(paxh + 148, checksum, 8, NULL, NULL); ++ paxh[148 + 6] = 0; ++ paxh[148 + 7] = ' '; ++ /* write pax header if we need it */ ++ if (paxbuf) { ++ int r = write_pax_entry_pax(fdo, fi, filename, st, paxbuf); ++ free(paxbuf); ++ if (r) ++ return RPMRC_FAIL; ++ } ++ /* write entry header */ ++ if (do_fwrite(fdo, paxh, 512)) ++ return RPMRC_FAIL; ++ if (tartype != '0' && tartype != 'x') ++ return RPMRC_OK; /* no content for those types */ ++ /* write content */ ++ if (tartype == '0' && size && do_fwrite_content(fdo, buf, fi)) ++ return RPMRC_FAIL; ++ if (tartype == 'x' && size && do_fwrite(fdo, buf, size)) ++ return RPMRC_FAIL; ++ /* write padding */ ++ size &= 511; ++ if (size) { ++ memset(paxh, 0, sizeof(paxh)); ++ if (do_fwrite(fdo, paxh, 512 - size)) ++ return RPMRC_FAIL; ++ } ++ return RPMRC_OK; ++} ++ ++static int write_pax_entry_pax(FD_t fdo, rpmfi fi, const char *filename, struct stat *st, char *paxbuf) ++{ ++ /* tweak stat data and filename */ ++ struct stat paxst = *st; ++ paxst.st_size = strlen(paxbuf); ++ paxst.st_mode = paxst.st_mode & 0777; ++ if (paxst.st_uid >= (1 << 18)) ++ paxst.st_uid = (1 << 18) - 1; ++ if (paxst.st_gid >= (1 << 18)) ++ paxst.st_gid = (1 << 18) - 1; ++ if (paxst.st_mtime < 0) ++ paxst.st_mtime = 0; ++ if ((unsigned long long)paxst.st_mtime >= 1ULL << 33) ++ paxst.st_mtime = (time_t)((1ULL << 33) - 1); ++ return write_pax_entry(fdo, fi, NULL, &paxst, filename, NULL, paxbuf); ++} ++ ++static int process_package(rpmts ts, const char * filename) ++{ ++ FD_t fdi; ++ FD_t gzdi; ++ FD_t fdo; ++ Header h; ++ int rc = 0; ++ char * rpmio_flags = NULL; ++ int iscpio = 0; ++ ++ if (!strcmp(filename, "-")) { ++ if(isatty(STDIN_FILENO)) { ++ fprintf(stderr, "Error: missing input RPM package\n"); ++ exit(EXIT_FAILURE); ++ } ++ fdi = fdDup(STDIN_FILENO); ++ } else { ++ fdi = Fopen(filename, "r.ufdio"); ++ } ++ ++ if (Ferror(fdi)) { ++ fprintf(stderr, "rpm2archive: %s: %s\n", ++ filename, Fstrerror(fdi)); ++ exit(EXIT_FAILURE); ++ } ++ ++ rc = rpmReadPackageFile(ts, fdi, "rpm2cpio", &h); ++ ++ switch (rc) { ++ case RPMRC_OK: ++ case RPMRC_NOKEY: ++ case RPMRC_NOTTRUSTED: ++ break; ++ case RPMRC_NOTFOUND: ++ fprintf(stderr, _("argument is not an RPM package\n")); ++ exit(EXIT_FAILURE); ++ break; ++ case RPMRC_FAIL: ++ default: ++ fprintf(stderr, _("error reading header from package\n")); ++ exit(EXIT_FAILURE); ++ break; ++ } ++ ++ ++ /* Retrieve payload size and compression type. */ ++ { const char *compr = headerGetString(h, RPMTAG_PAYLOADCOMPRESSOR); ++ rpmio_flags = rstrscat(NULL, "r.", compr ? compr : "gzip", NULL); ++ } ++ ++ gzdi = Fdopen(fdi, rpmio_flags); /* XXX gzdi == fdi */ ++ free(rpmio_flags); ++ ++ if (gzdi == NULL) { ++ fprintf(stderr, _("cannot re-open payload: %s\n"), Fstrerror(gzdi)); ++ exit(EXIT_FAILURE); ++ } ++ ++ if (rstreq(format, "pax")) { ++ iscpio = 0; ++ } else if (rstreq(format, "cpio")) { ++ iscpio = 1; ++ } else { ++ fprintf(stderr, "Error: Format %s is not supported\n", format); ++ exit(EXIT_FAILURE); ++ } ++ ++ if (!isatty(STDOUT_FILENO)) { ++ fdo = fdDup(STDOUT_FILENO); ++ } else { ++ if (!strcmp(filename, "-")) { ++ fprintf(stderr, "Error: refusing to output archive data to a terminal.\n"); ++ exit(EXIT_FAILURE); ++ } ++ char * outname; ++ if (urlIsURL(filename)) { ++ const char * fname = strrchr(filename, '/'); ++ if (fname != NULL) { ++ fname++; ++ } else { ++ fname = filename; ++ } ++ outname = rstrscat(NULL, fname, NULL); ++ } else { ++ outname = rstrscat(NULL, filename, NULL); ++ } ++ if (compress) { ++ outname = rstrscat(&outname, ".tgz", NULL); ++ } else { ++ outname = rstrscat(&outname, ".tar", NULL); ++ } ++ fdo = Fopen(outname, "w.ufdio"); ++ if (!fdo) { ++ fprintf(stderr, "Error: Can't open output file: %s\n", outname); ++ exit(EXIT_FAILURE); ++ } ++ _free(outname); ++ } ++ if (compress && fdo) ++ fdo = Fdopen(fdo, "w.gzdio"); ++ if (!fdo) { ++ fprintf(stderr, "Error: Can't setup output file\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ char * buf = (char *)xmalloc(BUFSIZE); ++ char * hardlink = NULL; ++ ++ rpmfiles files = rpmfilesNew(NULL, h, 0, RPMFI_KEEPHEADER); ++ rpmfi fi = rpmfiNewArchiveReader(gzdi, files, iscpio ? RPMFI_ITER_READ_ARCHIVE : RPMFI_ITER_READ_ARCHIVE_CONTENT_FIRST); ++ ++ while ((rc = rpmfiNext(fi)) >= 0) { ++ struct stat st; ++ const char *dn, *flink; ++ char *filename; ++ if (rpmfiStat(fi, 0, &st)) { ++ break; ++ } ++ dn = rpmfiDN(fi); ++ if (!strcmp(dn, "")) dn = "/"; ++ filename = rstrscat(NULL, ".", dn, rpmfiBN(fi), NULL); ++ flink = S_ISLNK(st.st_mode) ? rpmfiFLink(fi) : NULL; ++ if (st.st_nlink > 1 && !iscpio) { ++ if (rpmfiArchiveHasContent(fi)) { ++ /* hardlink sizes are special, see rpmfiStat() */ ++ _free(hardlink); ++ hardlink = xstrdup(filename); ++ } ++ } ++ if (iscpio) ++ rc = write_cpio_entry(fdo, fi, filename, &st, flink, st.st_nlink > 1 ? hardlink : NULL, buf); ++ else ++ rc = write_pax_entry(fdo, fi, filename, &st, flink, st.st_nlink > 1 ? hardlink : NULL, buf); ++ _free(filename); ++ if (rc == RPMRC_FAIL) ++ break; ++ } ++ /* End of iteration is not an error, everything else is */ ++ if (rc == RPMERR_ITER_END) { ++ rc = 0; ++ } else { ++ rc = 1; ++ } ++ ++ /* write trailer */ ++ if (!rc) { ++ if (iscpio) ++ rc = write_cpio_entry(fdo, NULL, NULL, NULL, NULL, NULL, buf); ++ else ++ rc = write_pax_entry(fdo, NULL, NULL, NULL, NULL, NULL, buf); ++ rc = rc == RPMRC_FAIL ? 1 : 0; ++ } ++ ++ if (Fclose(fdo) && !rc) { ++ fprintf(stderr, "Error writing archive\n"); ++ rc = 1; ++ } ++ ++ _free(hardlink); ++ ++ Fclose(gzdi); /* XXX gzdi == fdi */ ++ buf = _free(buf); ++ rpmfilesFree(files); ++ rpmfiFree(fi); ++ headerFree(h); ++ return rc; ++} ++#endif ++ ++ + int main(int argc, char *argv[]) + { + int rc = 0; diff --git a/SPECS/rpm/rpmconfigcheck b/SPECS/rpm/rpmconfigcheck new file mode 100644 index 00000000..317a0650 --- /dev/null +++ b/SPECS/rpm/rpmconfigcheck @@ -0,0 +1,49 @@ +#! /bin/sh +# Copyright (c) 2002 SUSE GmbH Nuernberg, Germany. +# +# Author: Michael Schroeder +# +# Script to scan for unresolved .rpmnew, .rpmorig, and .rpmsave files +# + +configcheckfile=/var/adm/rpmconfigcheck +packages=/var/lib/rpm/Packages.db + +if test -s $packages -a \( ! -e $configcheckfile -o -s $configcheckfile -o ! $packages -ot $configcheckfile \) ; then + echo "Searching for unresolved configuration files" + if test ! -e $configcheckfile -o ! $packages -ot $configcheckfile ; then + test -e $configcheckfile && mv -f $configcheckfile $configcheckfile.old + rpm -qalc | sort | while read line; do + for suffix in new orig save; do + [ -e "${line}.rpm${suffix}" ] && echo "${line}.rpm${suffix}" + done + done > $configcheckfile + else + mv -f $configcheckfile $configcheckfile.old + while read l; do + test -e $l && echo $l + done < $configcheckfile.old > $configcheckfile + fi + if test -s $configcheckfile; then + echo "Please check the following files (see /var/adm/rpmconfigcheck):" + sed -e 's/^/ /' < $configcheckfile + touch $configcheckfile.old + cat $configcheckfile $configcheckfile.old | sort | uniq -d > $configcheckfile.dup + cat $configcheckfile $configcheckfile.dup | sort | uniq -u > $configcheckfile.new + if test -s $configcheckfile.new ; then + ( + echo "----------------------------------------------------------------------" + echo "----------------------------------------------------------------------" + echo "rpmconfigcheck" + date + echo "----------------------------------------" + echo "This is a warning message." + echo "rpmconfigcheck has found the following new unresolved config files" + echo "(all files are listed in /var/adm/rpmconfigcheck):" + cat $configcheckfile.new + echo "----------------------------------------" + ) >> /var/log/update-messages + fi + fi + rm -f $configcheckfile.old $configcheckfile.dup $configcheckfile.new +fi diff --git a/SPECS/rpm/rpmconfigcheck.service b/SPECS/rpm/rpmconfigcheck.service new file mode 100644 index 00000000..31cbfdea --- /dev/null +++ b/SPECS/rpm/rpmconfigcheck.service @@ -0,0 +1,10 @@ +[Unit] +Description=Scan for unresolved .rpmnew, .rpmorig, and .rpmsave files +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/rpmconfigcheck + +[Install] +WantedBy=default.target diff --git a/SPECS/rpm/rpmpopt.diff b/SPECS/rpm/rpmpopt.diff new file mode 100644 index 00000000..c043fd5e --- /dev/null +++ b/SPECS/rpm/rpmpopt.diff @@ -0,0 +1,12 @@ +--- rpmpopt.in.orig 2017-12-01 14:58:11.404041985 +0000 ++++ rpmpopt.in 2017-12-01 14:59:06.275882759 +0000 +@@ -101,7 +101,8 @@ Relocations : %|PREFIXES?{[%{PREFIXES} ] + %|URL?{URL : %{URL}\n}|\ + %|BUGURL?{Bug URL : %{BUGURL}\n}|\ + Summary : %{SUMMARY}\n\ +-Description :\n%{DESCRIPTION}\n' \ ++Description :\n%{DESCRIPTION}\n\ ++Distribution: %{DISTRIBUTION}\n' \ + --POPTdesc=$"list descriptive information from package(s)" + + rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ diff --git a/SPECS/rpm/rpmqpack.diff b/SPECS/rpm/rpmqpack.diff new file mode 100644 index 00000000..0f6c663d --- /dev/null +++ b/SPECS/rpm/rpmqpack.diff @@ -0,0 +1,120 @@ +--- docs/man/CMakeLists.txt.orig 2025-02-19 15:29:33.000000000 +0000 ++++ docs/man/CMakeLists.txt 2025-03-07 13:16:59.913873002 +0000 +@@ -2,6 +2,7 @@ set(core + gendiff.1 rpm2cpio.8 rpm2archive.8 + rpm.8 rpmbuild.8 rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8 + rpmdeps.8 rpmgraph.8 rpmlua.8 rpm-misc.8 rpmsort.8 ++ rpmqpack.8 + ) + set(extra + rpm-plugins.8 rpm-plugin-prioreset.8 rpm-plugin-syslog.8 +--- docs/man/rpmqpack.8.orig 2025-03-07 13:16:59.913873002 +0000 ++++ docs/man/rpmqpack.8 2025-03-07 13:16:59.913873002 +0000 +@@ -0,0 +1,25 @@ ++.TH RPMQPACK 8 "Mar 2002" ++.SH NAME ++rpmqpack \- check for installed rpm packages ++ ++.SH SYNOPSIS ++.B rpmqpack ++.RI [ pack1 "] [" pack2 ]... ++ ++.SH DESCRIPTION ++rpmqpack checks if packages given as arguments are installed in ++the system. It prints each installed package to stdout. ++If no arguments are given all installed packages are printed. ++ ++.SH EXIT STATUS ++rpmqpack returns 0 if all given packages are installed, otherwise ++1. ++ ++.SH SEE ALSO ++.BR rpm (1) ++ ++.SH COPYRIGHT ++2002 SUSE Linux AG Nuernberg, Germany. ++ ++.SH AUTHOR ++Michael Schroeder +--- tools/CMakeLists.txt.orig 2025-02-19 15:29:33.000000000 +0000 ++++ tools/CMakeLists.txt 2025-03-07 13:16:59.913873002 +0000 +@@ -6,6 +6,7 @@ add_executable(rpmkeys rpmkeys.c cliutil + add_executable(rpmsign rpmsign.c cliutils) + add_executable(rpmbuild rpmbuild.c cliutils) + add_executable(rpmspec rpmspec.c cliutils) ++add_executable(rpmqpack rpmqpack.c) + + add_executable(rpmdeps rpmdeps.c) + add_executable(rpmgraph rpmgraph.c) +@@ -73,7 +74,7 @@ endif() + + install(TARGETS + rpm rpmdb rpmkeys rpmsign rpmbuild rpmspec +- rpmlua rpmgraph ++ rpmlua rpmgraph rpmqpack + ) + install(TARGETS rpmdeps rpmdump rpmuncompress DESTINATION ${RPM_CONFIGDIR}) + +--- tools/rpmqpack.c.orig 2025-03-07 13:16:59.913873002 +0000 ++++ tools/rpmqpack.c 2025-03-07 13:16:59.913873002 +0000 +@@ -0,0 +1,60 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++int ++main(int argc, char **argv) ++{ ++ int ret = 0; ++ rpmts ts; ++ ++ rpmDefineMacro(NULL, "_dbpath /var/lib/rpm", 0); ++ ts = rpmtsCreate(); ++ if (!ts) ++ { ++ fprintf(stderr, "rpmtsCreate failed\n"); ++ exit(1); ++ } ++ if (rpmtsOpenDB(ts, O_RDONLY)) ++ { ++ perror("rpmtsOpenDB"); ++ exit(1); ++ } ++ if (argc <= 1) ++ { ++ rpmdbIndexIterator ii; ++ ii = rpmdbIndexIteratorInit(rpmtsGetRdb(ts), RPMDBI_NAME); ++ if (ii) ++ { ++ const void *key = 0; ++ size_t keylen = 0; ++ while ((rpmdbIndexIteratorNext(ii, &key, &keylen)) == 0) ++ printf("%*.*s\n", (int)keylen, (int)keylen, (char *)key); ++ } ++ rpmdbIndexIteratorFree(ii); ++ } ++ else ++ { ++ argc--; ++ while (argc--) ++ { ++ rpmdbMatchIterator mi; ++ argv++; ++ mi = rpmdbInitIterator(rpmtsGetRdb(ts), RPMDBI_NAME, (void *)*argv, strlen(*argv)); ++ if (mi && rpmdbGetIteratorCount(mi)) ++ printf("%s\n", *argv); ++ else ++ ret = 1; ++ rpmdbFreeIterator(mi); ++ } ++ } ++ rpmtsFree(ts); ++ return ret; ++} diff --git a/SPECS/rpm/rpmsort b/SPECS/rpm/rpmsort new file mode 100644 index 00000000..19d56145 --- /dev/null +++ b/SPECS/rpm/rpmsort @@ -0,0 +1,76 @@ +#!/bin/sh +# rpmsort implemented mostly in Lua +# Copyright (c) 2020 SUSE LLC +# SPDX-License-Identifier: GPL-2.0-or-later +# Author: fvogt@suse.de +# Enhanced by: mwilck@suse.com + +rpmsort() { + direction=$1 + script=' +function parse(ver) + local epoch, version, release = 0, ver, 0 + _, eend, e = ver:find("^(%d+):") + if eend then + ver = ver:sub(eend + 1) + version = ver + epoch = e + end + _, _, v, r = ver:find("(.+)%-(.+)$") + if v then + version = v + release = r + end + return epoch, version, release +end + +function pkgvercmp(a, b) + local ae, av, ar = parse(a) + local be, bv, br = parse(b) + + local ecmp = rpm.vercmp(ae, be) + if ecmp ~= 0 then return ecmp end + + local vcmp = rpm.vercmp(av, bv) + if vcmp ~= 0 then return vcmp end + + return rpm.vercmp(ar, br) +end + +vers = {} +for line in io.stdin:lines() do + table.insert(vers, line) +end +table.sort(vers, function(a, b) return pkgvercmp(a, b) == '"$direction"' end) +print(table.concat(vers, "\n")) +' + + rpm --eval "%{lua: ${script}}" +} + +usage() { + cat >&2 <&2;; + esac + shift +done + +rpmsort "$DIRECTION" diff --git a/SPECS/rpm/rpmsort_reverse.diff b/SPECS/rpm/rpmsort_reverse.diff new file mode 100644 index 00000000..cf283d61 --- /dev/null +++ b/SPECS/rpm/rpmsort_reverse.diff @@ -0,0 +1,48 @@ +--- tools/rpmsort.c.orig 2023-10-11 11:38:36.639686209 +0000 ++++ tools/rpmsort.c 2023-10-11 12:01:36.112837741 +0000 +@@ -119,6 +119,11 @@ exit: + return vercmpflag; + } + ++static int package_version_compare_reverse(const void *p, const void *q) ++{ ++ return -package_version_compare(p, q); ++} ++ + static void add_input(const char *filename, char ***package_names, + size_t *n_package_names) + { +@@ -169,7 +174,13 @@ static void add_input(const char *filena + *n_package_names = n_names; + } + +-static struct poptOption optionsTable[] = { POPT_AUTOHELP POPT_TABLEEND }; ++static int reverse = 0; ++ ++static struct poptOption optionsTable[] = { ++ { "reverse", 'r', POPT_ARG_VAL, &reverse, 1, ++ N_("reverse the result of comparisons"), NULL }, ++ POPT_AUTOHELP POPT_TABLEEND ++}; + + int main(int argc, const char *argv[]) + { +@@ -181,7 +192,7 @@ int main(int argc, const char *argv[]) + + optCon = poptGetContext(NULL, argc, argv, optionsTable, 0); + poptSetOtherOptionHelp(optCon, ""); +- if (poptGetNextOpt(optCon) == 0) { ++ if (poptGetNextOpt(optCon) != -1) { + poptPrintUsage(optCon, stderr, 0); + exit(EXIT_FAILURE); + } +@@ -201,7 +212,8 @@ int main(int argc, const char *argv[]) + } + + qsort(package_names, n_package_names, sizeof(char *), +- package_version_compare); ++ reverse ? package_version_compare_reverse ++ : package_version_compare); + + /* Send sorted list to stdout. */ + for (int i = 0; i < n_package_names; i++) { diff --git a/SPECS/rpm/safeugid.diff b/SPECS/rpm/safeugid.diff new file mode 100644 index 00000000..4367b409 --- /dev/null +++ b/SPECS/rpm/safeugid.diff @@ -0,0 +1,214 @@ +--- ../safeugid.diff 2019-10-02 13:37:13.191868203 +0200 ++++ P 2019-10-02 13:36:09.036002978 +0200 +@@ -0,0 +1,211 @@ ++--- lib/rpmchroot.c.orig 2019-06-26 14:17:31.411985696 +0000 +++++ lib/rpmchroot.c 2019-10-02 11:35:58.788024507 +0000 ++@@ -126,6 +126,7 @@ int rpmChrootIn(void) ++ ++ if (chdir("/") == 0 && chroot(rootState.rootDir) == 0) { ++ rootState.chrootDone = 1; +++ rpmugChroot(1); ++ } else { ++ rpmlog(RPMLOG_ERR, _("Unable to change root directory: %m\n")); ++ rc = -1; ++@@ -151,6 +152,7 @@ int rpmChrootOut(void) ++ } else if (rootState.chrootDone == 1) { ++ if (chroot(".") == 0 && fchdir(rootState.cwd) == 0) { ++ rootState.chrootDone = 0; +++ rpmugChroot(0); ++ } else { ++ rpmlog(RPMLOG_ERR, _("Unable to restore root directory: %m\n")); ++ rc = -1; ++--- lib/rpmug.c.orig 2019-06-26 14:17:31.418985685 +0000 +++++ lib/rpmug.c 2019-10-02 11:35:58.788024507 +0000 ++@@ -11,6 +11,47 @@ ++ #include "lib/rpmug.h" ++ #include "debug.h" ++ +++#if defined(__GLIBC__) +++ +++static int inchroot; +++ +++/* +++ * Unfortunatelly glibc caches nss/nscd data and there is no +++ * good way to flush those caches when we did a chroot(). Thus +++ * we need to parse /etc/passwd and /etc/group ourselfs. +++ */ +++static int safe_lookup(const char * file, const char * name) +++{ +++ FILE *fp; +++ int l; +++ char buf[4096], *p; +++ +++ if (!name || !*name) +++ return -1; +++ l = strlen(name); +++ if ((fp = fopen(file, "r")) == 0) +++ return -1; +++ while ((p = fgets(buf, sizeof(buf), fp)) != 0) { +++ if (*p == '#') +++ continue; +++ while (*p && (*p == ' ' || *p == '\t')) +++ p++; +++ if (strncmp(p, name, l) != 0 || p[l] != ':') +++ continue; +++ p = strchr(p + l + 1, ':'); +++ if (!p) +++ continue; +++ fclose(fp); +++ p++; +++ while (*p && (*p == ' ' || *p == '\t')) +++ p++; +++ return atoi(p); +++ } +++ fclose(fp); +++ return -1; +++} +++#endif +++ ++ /* ++ * These really ought to use hash tables. I just made the ++ * guess that most files would be owned by root or the same person/group ++@@ -44,17 +85,28 @@ int rpmugUid(const char * thisUname, uid ++ lastUnameAlloced = thisUnameLen + 10; ++ lastUname = xrealloc(lastUname, lastUnameAlloced); /* XXX memory leak */ ++ } ++- strcpy(lastUname, thisUname); ++ ++- pwent = getpwnam(thisUname); ++- if (pwent == NULL) { ++- /* FIX: shrug */ ++- endpwent(); +++#if defined(__GLIBC__) +++ if (inchroot) { +++ int uid = safe_lookup("/etc/passwd", thisUname); +++ if (uid < 0) +++ return -1; +++ lastUid = uid; +++ } else +++#endif +++ { ++ pwent = getpwnam(thisUname); ++- if (pwent == NULL) return -1; +++ if (pwent == NULL) { +++ /* FIX: shrug */ +++ endpwent(); +++ pwent = getpwnam(thisUname); +++ if (pwent == NULL) return -1; +++ } +++ lastUid = pwent->pw_uid; ++ } ++ ++- lastUid = pwent->pw_uid; +++ strcpy(lastUname, thisUname); +++ lastUnameLen = thisUnameLen; ++ } ++ ++ *uid = lastUid; ++@@ -87,18 +139,29 @@ int rpmugGid(const char * thisGname, gid ++ lastGnameAlloced = thisGnameLen + 10; ++ lastGname = xrealloc(lastGname, lastGnameAlloced); /* XXX memory leak */ ++ } ++- strcpy(lastGname, thisGname); ++ ++- grent = getgrnam(thisGname); ++- if (grent == NULL) { ++- /* FIX: shrug */ ++- endgrent(); +++#if defined(__GLIBC__) +++ if (inchroot) { +++ int gid = safe_lookup("/etc/group", thisGname); +++ if (gid < 0) +++ return -1; +++ lastGid = gid; +++ } else +++#endif +++ { ++ grent = getgrnam(thisGname); ++ if (grent == NULL) { ++- return -1; +++ /* FIX: shrug */ +++ endgrent(); +++ grent = getgrnam(thisGname); +++ if (grent == NULL) { +++ return -1; +++ } ++ } +++ lastGid = grent->gr_gid; ++ } ++- lastGid = grent->gr_gid; +++ strcpy(lastGname, thisGname); +++ lastGnameLen = thisGnameLen; ++ } ++ ++ *gid = lastGid; ++@@ -110,7 +173,7 @@ const char * rpmugUname(uid_t uid) ++ { ++ static uid_t lastUid = (uid_t) -1; ++ static char * lastUname = NULL; ++- static size_t lastUnameLen = 0; +++ static size_t lastUnameAlloced = 0; ++ ++ if (uid == (uid_t) -1) { ++ lastUid = (uid_t) -1; ++@@ -127,9 +190,9 @@ const char * rpmugUname(uid_t uid) ++ ++ lastUid = uid; ++ len = strlen(pwent->pw_name); ++- if (lastUnameLen < len + 1) { ++- lastUnameLen = len + 20; ++- lastUname = xrealloc(lastUname, lastUnameLen); +++ if (lastUnameAlloced < len + 1) { +++ lastUnameAlloced = len + 20; +++ lastUname = xrealloc(lastUname, lastUnameAlloced); ++ } ++ strcpy(lastUname, pwent->pw_name); ++ ++@@ -141,7 +204,7 @@ const char * rpmugGname(gid_t gid) ++ { ++ static gid_t lastGid = (gid_t) -1; ++ static char * lastGname = NULL; ++- static size_t lastGnameLen = 0; +++ static size_t lastGnameAlloced = 0; ++ ++ if (gid == (gid_t) -1) { ++ lastGid = (gid_t) -1; ++@@ -158,9 +221,9 @@ const char * rpmugGname(gid_t gid) ++ ++ lastGid = gid; ++ len = strlen(grent->gr_name); ++- if (lastGnameLen < len + 1) { ++- lastGnameLen = len + 20; ++- lastGname = xrealloc(lastGname, lastGnameLen); +++ if (lastGnameAlloced < len + 1) { +++ lastGnameAlloced = len + 20; +++ lastGname = xrealloc(lastGname, lastGnameAlloced); ++ } ++ strcpy(lastGname, grent->gr_name); ++ ++@@ -192,3 +255,16 @@ void rpmugFree(void) ++ rpmugUname(-1); ++ rpmugGname(-1); ++ } +++ +++void rpmugChroot(int in) +++{ +++ /* tell libc to drop caches / file descriptors */ +++ endpwent(); +++ endgrent(); +++ /* drop our own caches */ +++ rpmugUid(NULL, NULL); +++ rpmugGid(NULL, NULL); +++#if defined(__GLIBC__) +++ inchroot = in; +++#endif +++} ++--- lib/rpmug.h.orig 2019-06-26 14:17:31.418985685 +0000 +++++ lib/rpmug.h 2019-10-02 11:35:58.788024507 +0000 ++@@ -15,4 +15,6 @@ int rpmugInit(void); ++ ++ void rpmugFree(void); ++ +++void rpmugChroot(int in); +++ ++ #endif /* _RPMUG_H */ diff --git a/SPECS/rpm/selinux_transactional_update.patch b/SPECS/rpm/selinux_transactional_update.patch new file mode 100644 index 00000000..76389570 --- /dev/null +++ b/SPECS/rpm/selinux_transactional_update.patch @@ -0,0 +1,22 @@ +--- plugins/selinux.c.orig 2023-12-12 10:57:31.000000000 +0000 ++++ plugins/selinux.c 2023-12-13 13:28:30.509647090 +0000 +@@ -1,3 +1,5 @@ ++#include ++ + #include "system.h" + + #include +@@ -166,6 +168,13 @@ static rpmRC selinux_fsm_file_prepare(rp + + if (conrc == 0 || (conrc < 0 && errno == EOPNOTSUPP)) + rc = RPMRC_OK; ++ else { ++ char *tup = getenv("TRANSACTIONAL_UPDATE"); ++ if (tup != NULL && !strncmp(tup, "true", 4)) { ++ rpmlog(RPMLOG_DEBUG, "lsetfilecon failed, will be healed upon reboot (transactional update): (%s, %s)\n", path, scon); ++ rc = RPMRC_OK; ++ } ++ } + + rpmlog(loglvl(rc != RPMRC_OK), "lsetfilecon: (%d %s, %s) %s\n", + fd, path, scon, (conrc < 0 ? strerror(errno) : "")); diff --git a/SPECS/rpm/specfilemacro.diff b/SPECS/rpm/specfilemacro.diff new file mode 100644 index 00000000..07814921 --- /dev/null +++ b/SPECS/rpm/specfilemacro.diff @@ -0,0 +1,10 @@ +--- build/parseSpec.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ build/parseSpec.c 2024-12-16 09:19:43.511920745 +0000 +@@ -1309,6 +1309,7 @@ static rpmSpec parseSpec(const char *spe + spec = newSpec(); + + spec->specFile = rpmGetPath(specFile, NULL); ++ addMacro(spec->macros, "_specfile", NULL, spec->specFile, RMIL_SPEC); + pushOFI(spec, spec->specFile); + /* If explicit --buildroot was passed, grab hold of it */ + if (buildRoot) diff --git a/SPECS/rpm/sysconfig.services-rpm b/SPECS/rpm/sysconfig.services-rpm new file mode 100644 index 00000000..18643bce --- /dev/null +++ b/SPECS/rpm/sysconfig.services-rpm @@ -0,0 +1,17 @@ +## Path: System/Services + +## Type: yesno +## Default: no +# +# Do you want to disable the automatic restart of services when +# a new version gets installed? +# +DISABLE_RESTART_ON_UPDATE="no" + +## Type: yesno +## Default: no +# +# Do you want to disable the automatic shutdown of services when +# the corresponding package gets erased? +# +DISABLE_STOP_ON_REMOVAL="no" diff --git a/SPECS/rpm/undefbuildroot.diff b/SPECS/rpm/undefbuildroot.diff new file mode 100644 index 00000000..49424ff3 --- /dev/null +++ b/SPECS/rpm/undefbuildroot.diff @@ -0,0 +1,15 @@ +--- build/parseSpec.c.orig 2025-01-07 09:55:58.006136886 +0000 ++++ build/parseSpec.c 2025-01-07 09:56:23.618086661 +0000 +@@ -1321,9 +1321,11 @@ static rpmSpec parseSpec(const char *spe + rpmPushMacroFlags(spec->macros, "_top_builddir", NULL, + top_builddir, RMIL_GLOBAL, RPMMACRO_LITERAL); + +- /* Undefine (!!) %_builddir so %global misuses fall through */ ++ /* Undefine (!!) %_builddir and %buildroot so %global misuses fall through */ + while (rpmMacroIsDefined(spec->macros, "_builddir")) + rpmPopMacro(spec->macros, "_builddir"); ++ while (rpmMacroIsDefined(spec->macros, "buildroot")) ++ rpmPopMacro(spec->macros, "buildroot"); + free(top_builddir); + } + diff --git a/SPECS/rpm/unshare.diff b/SPECS/rpm/unshare.diff new file mode 100644 index 00000000..60b7bf90 --- /dev/null +++ b/SPECS/rpm/unshare.diff @@ -0,0 +1,28 @@ +--- plugins/unshare.c.orig 2025-02-19 15:29:33.000000000 +0000 ++++ plugins/unshare.c 2025-03-07 13:21:21.145450130 +0000 +@@ -15,6 +15,16 @@ + static ARGV_t private_mounts = NULL; + static int unshare_flags = 0; + ++static int in_chroot() ++{ ++ struct stat sta, stb; ++ if (stat("/", &sta)) ++ return 0; ++ if (stat("/proc/1/root", &stb)) ++ return 1; /* proc not mounted, assume chroot */ ++ return sta.st_dev == stb.st_dev && sta.st_ino == stb.st_ino ? 0 : 1; ++} ++ + static rpmRC unshare_init(rpmPlugin plugin, rpmts ts) + { + char *paths = rpmExpand("%{?__transaction_unshare_paths}", NULL); +@@ -24,7 +34,7 @@ static rpmRC unshare_init(rpmPlugin plug + * Changing mount propagation from inside a chroot fails if the root + * is not also a mount point, disable for now. + */ +- if (strcmp(rpmtsRootDir(ts), "/")) { ++ if (strcmp(rpmtsRootDir(ts), "/") || in_chroot()) { + rpmlog(RPMLOG_WARNING, + "private mounts in chroot not implemented\n"); + } else { diff --git a/SPECS/rpm/usr-lib-sysimage-rpm.patch b/SPECS/rpm/usr-lib-sysimage-rpm.patch new file mode 100644 index 00000000..87b00dae --- /dev/null +++ b/SPECS/rpm/usr-lib-sysimage-rpm.patch @@ -0,0 +1,11 @@ +--- macros.in.orig 2021-08-20 08:44:56.264259007 +0000 ++++ macros.in 2021-09-23 18:57:26.654059458 +0000 +@@ -140,7 +140,7 @@ + %_buildshell /bin/sh + + # The location of the rpm database file(s). +-%_dbpath %{_var}/lib/rpm ++%_dbpath %{_usr}/lib/sysimage/rpm + + # The location of the rpm database file(s) after "rpm --rebuilddb". + %_dbpath_rebuild %{_dbpath} diff --git a/SPECS/rpm/zstdpool.diff b/SPECS/rpm/zstdpool.diff new file mode 100644 index 00000000..026237ae --- /dev/null +++ b/SPECS/rpm/zstdpool.diff @@ -0,0 +1,68 @@ +--- rpmio/rpmio.c.orig 2024-10-07 09:35:46.000000000 +0000 ++++ rpmio/rpmio.c 2024-12-16 09:42:02.197155600 +0000 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -996,6 +997,7 @@ const FDIO_t lzdio = &lzdio_s; + /* Support for ZSTD library. */ + #ifdef HAVE_ZSTD + ++#define ZSTD_STATIC_LINKING_ONLY + #include + + typedef struct rpmzstd_s { +@@ -1013,6 +1015,29 @@ typedef struct rpmzstd_s { + ZSTD_outBuffer zob; /*!< ZSTD_outBuffer */ + } * rpmzstd; + ++#if ZSTD_VERSION_NUMBER >= 10407 ++ ++static pthread_once_t zstdThreadPoolCreated = PTHREAD_ONCE_INIT; ++static ZSTD_threadPool *zstdThreadPool; ++static int zstdThreadPoolThreads; ++ ++static void zstdCreateThreadPool(void) ++{ ++ int numthreads = rpmExpandNumeric("%{?_zstd_pool_threads}%{?!_zstd_pool_threads:-1}"); ++ if (numthreads == 0) ++ numthreads = rpmExpandNumeric("%{getncpus:thread}"); ++ if (numthreads > 0) { ++ zstdThreadPoolThreads = numthreads; ++ zstdThreadPool = ZSTD_createThreadPool(numthreads); ++ if (!zstdThreadPool) ++ rpmlog(RPMLOG_WARNING, "Could not create zstd thread pool for %d threads\n", numthreads); ++ else ++ rpmlog(RPMLOG_DEBUG, "Created zstd thread pool for %d threads\n", numthreads); ++ } ++} ++ ++#endif ++ + static rpmzstd rpmzstdNew(int fdno, const char *fmode) + { + rpmzstd zstd = NULL; +@@ -1119,8 +1144,18 @@ static rpmzstd rpmzstdNew(int fdno, cons + } + + if (threads > 0) { +- if (ZSTD_isError (ZSTD_CCtx_setParameter(zstd->stream.c, ZSTD_c_nbWorkers, threads))) ++ if (ZSTD_isError (ZSTD_CCtx_setParameter(zstd->stream.c, ZSTD_c_nbWorkers, threads))) { + rpmlog(RPMLOG_DEBUG, "zstd library does not support multi-threading\n"); ++ } else { ++#if ZSTD_VERSION_NUMBER >= 10407 ++ pthread_once(&zstdThreadPoolCreated, zstdCreateThreadPool); ++ if (zstdThreadPool) { ++ if (threads > zstdThreadPoolThreads) ++ ZSTD_CCtx_setParameter(zstd->stream.c, ZSTD_c_nbWorkers, zstdThreadPoolThreads); ++ ZSTD_CCtx_refThreadPool(zstd->stream.c, zstdThreadPool); ++ } ++#endif ++ } + } + + nb = ZSTD_CStreamOutSize(); diff --git a/SPECS/rsync/rsync.spec b/SPECS/rsync/rsync.spec new file mode 100644 index 00000000..92fc1b81 --- /dev/null +++ b/SPECS/rsync/rsync.spec @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: rsync +Version: 3.4.1 +Release: %autorelease +Summary: Fast and versatile file copying tool for remote and local files +License: GPL-3.0-or-later +URL: https://rsync.samba.org/ +#!RemoteAsset +Source0: https://rsync.samba.org/ftp/rsync/src/rsync-%{version}.tar.gz +Source1: rsyncd.conf + + +BuildSystem: autotools + +BuildOption(conf): --enable-ipv6 +BuildOption(conf): --disable-debug +BuildOption(conf): --with-included-popt=no +BuildOption(conf): --with-included-zlib=no +BuildOption(conf): --enable-acl-support +BuildOption(conf): --enable-xattr-support +BuildOption(conf): --enable-openssl +BuildOption(conf): --enable-lz4 +BuildOption(conf): --enable-zstd + +BuildRequires: make, gcc, autoconf, automake, libtool +BuildRequires: python3 +BuildRequires: acl-devel, lz4-devel, popt-devel, xxhash-devel, zlib-devel, zstd-devel +BuildRequires: pkgconfig(openssl) + +Requires: acl, lz4, openssl, popt, xxhash, zlib, zstd + +%description +Rsync is a fast and extraordinarily versatile file copying tool. It is famous +for its delta-transfer algorithm, which reduces the amount of data sent over +the network. This package provides the `rsync` client utility. + +%package daemon +Summary: The rsync daemon for serving files +Requires: %{name}%{?_isa} = %{version}-%{release} +%{?systemd_requires} + +%description daemon +This package contains the `rsyncd` daemon and the necessary systemd units +to run this machine as an rsync server. + +%install -a +# Install systemd units directly from the source tree +install -Dm644 packaging/systemd/rsync.service %{buildroot}%{_unitdir}/rsync.service +install -Dm644 packaging/systemd/rsync.socket %{buildroot}%{_unitdir}/rsync.socket +install -Dm644 packaging/systemd/rsync@.service %{buildroot}%{_unitdir}/rsync@.service +# Install the default rsyncd.conf +install -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rsyncd.conf + +# Systemd scriptlets belong to the -daemon package. +%systemd_post daemon rsync.service +%systemd_preun daemon rsync.service +%systemd_postun daemon rsync.service + +%files +%license COPYING +%doc README.md NEWS.md tech_report.tex support/ +%{_bindir}/rsync +%{_bindir}/rsync-ssl +%{_mandir}/man1/rsync.1.gz +%{_mandir}/man5/rsyncd.conf.5.gz +%{_mandir}/man1/rsync-ssl.1.gz + +%files daemon +%config(noreplace) %{_sysconfdir}/rsyncd.conf +%{_unitdir}/rsync.service +%{_unitdir}/rsync.socket +%{_unitdir}/rsync@.service + + +%changelog +%{?autochangelog} diff --git a/SPECS/rsync/rsyncd.conf b/SPECS/rsync/rsyncd.conf new file mode 100644 index 00000000..a3d5dde6 --- /dev/null +++ b/SPECS/rsync/rsyncd.conf @@ -0,0 +1,49 @@ +# /etc/rsyncd.conf +# Default configuration for the rsync daemon. +# See rsyncd.conf(5) man page for all available options. + +# PID file location. +pid file = /run/rsyncd.pid + +# Log file location. +log file = /var/log/rsyncd.log + +# Run transfers as this user/group. 'nobody' is a safe default. +uid = nobody +gid = nobody + +# Controls chrooting to the module path. 'no' is easier for initial setup, +# but 'yes' is strongly recommended for better security in production. +use chroot = no + +# Default to read-only for all modules. This is a critical security setting. +# To allow uploads, you must set 'read only = false' within a module's definition. +read only = yes + +# Limit the number of concurrent connections to prevent resource exhaustion. +max connections = 4 + +# Enable per-file transfer logging. +transfer logging = true + + +# --- Module Definitions --- +# No modules are enabled by default. Uncomment and customize the example below. + +# [module_name] +# # Path to the directory to be shared. +# path = /srv/rsync/public_data +# +# # A descriptive comment for the module. +# comment = Public Data Archive +# +# # Uncomment the line below to allow clients to write to this module. +# # read only = false +# +# # Uncomment to restrict access to specific clients. +# # hosts allow = 192.168.1.0/24 +# # hosts deny = * +# +# # Uncomment for password authentication. +# # auth users = your_user +# # secrets file = /etc/rsyncd.secrets diff --git a/SPECS/rust-bin/rust-bin.spec b/SPECS/rust-bin/rust-bin.spec new file mode 100644 index 00000000..4daad83a --- /dev/null +++ b/SPECS/rust-bin/rust-bin.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Ruoqing He +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define __os_install_post %{nil} +Name: rust-bin +Version: 1.90.0 +Release: %autorelease +Summary: A systems programming language +License: Apache-2.0 OR MIT +Group: Development/Languages/Rust +URL: https://forge.rust-lang.org/infra/other-installation-methods.html#standalone +#!RemoteAsset +Source0: https://static.rust-lang.org/dist/rust-%{version}-riscv64gc-unknown-linux-gnu.tar.gz +ExclusiveArch: riscv64 + +BuildRequires: bash, tar, gzip +Provides: rust = %{version} +Provides: cargo = %{version} + +%description +Rust is a systems programming language focused on three goals: safety, +speed, and concurrency. + +⚠️ This is the Rust toolchain intended for build pipelines. If you +want to install Rust for a development environment, you should install +'rustup' instead. + +%prep +tar xf %{SOURCE0} --strip-components=1 + +%build + +%install +./install.sh --prefix=%{buildroot}/%{_prefix} --components=rustc,cargo,rust-std-%{_arch}gc-unknown-linux-gnu +mv %{buildroot}%{_prefix}%{_sysconfdir} %{buildroot} +rm %{buildroot}%{_prefix}/lib/rustlib/install.log +rm %{buildroot}%{_prefix}/lib/rustlib/manifest-* + +%ldconfig_scriptlets + +%files +%defattr(-,root,root,-) +%{_bindir}/*{cargo,rust}* +%{_sysconfdir}/bash_completion.d/cargo +%{_mandir}/man1/{cargo,rust}* +%{_datadir}/doc/{cargo,rust} +%dir %{_datadir}/zsh +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_cargo +%dir %{_prefix}/libexec +%{_prefix}/libexec/* +%{_prefix}/lib/rustlib +%{_prefix}/lib/*.so + +%changelog +%{?autochangelog} + diff --git a/SPECS/samurai/samurai.spec b/SPECS/samurai/samurai.spec new file mode 100644 index 00000000..57edfbb1 --- /dev/null +++ b/SPECS/samurai/samurai.spec @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: samurai +Version: 1.2 +Release: %autorelease +Summary: ninja-compatible build tool written in C +License: Apache-2.0 +URL: https://github.com/michaelforney/samurai +#!RemoteAsset +Source: https://github.com/michaelforney/samurai/archive/refs/tags/%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): CC=%{__cc} +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): MANDIR=%{_mandir} + +BuildRequires: make +BuildRequires: gcc + +%description +samurai is a ninja-compatible build tool written in C99 +with a focus on simplicity, speed, and portability. + +# No configure +%conf + +# No test suite +%check + +%install -a +ln -s samu %{buildroot}%{_bindir}/ninja + +%files +%license LICENSE +%doc README.md +%{_bindir}/samu +%{_mandir}/man1/samu.1* + + +%package ninja +Summary: samu as ninja +Provides: ninja +Requires: %{name}%{?_isa} = %{version}-%{release} + + +%description ninja +This package provides ninja command, implemented as a symbolic link to the samu command +of samurai package. + +%files ninja +%license LICENSE +%doc README.md +%{_bindir}/ninja + + +%changelog +%{?autochangelog} diff --git a/SPECS/scdoc/scdoc.spec b/SPECS/scdoc/scdoc.spec new file mode 100644 index 00000000..a63f41f0 --- /dev/null +++ b/SPECS/scdoc/scdoc.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: scdoc +Version: 1.11.3 +Release: %autorelease +Summary: Tool for generating roff manual pages +License: MIT +URL: https://git.sr.ht/~sircmpwn/%{name} +#!RemoteAsset +Source0: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): PREFIX=%{_prefix} +BuildOption(install): PREFIX=%{_prefix} PCDIR=%{_datadir}/pkgconfig %{?_smp_mflags} + +BuildRequires: make +BuildRequires: sed +BuildRequires: glibc + +%description +scdoc is a tool designed to make the process of writing man pages more +friendly. It reads scdoc syntax from stdin and writes roff to stdout, suitable +for reading with man. + +%prep -a +# Disable static linking +sed -i '/-static/d' Makefile + +%conf +# No configure + +%files +%license COPYING +%doc README.md +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1* +%{_mandir}/man5/%{name}.5* +# scdoc is a development tool so no devel +%{_datarootdir}/pkgconfig/%{name}.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/sdbus-cpp/sdbus-cpp.spec b/SPECS/sdbus-cpp/sdbus-cpp.spec new file mode 100644 index 00000000..53ee2907 --- /dev/null +++ b/SPECS/sdbus-cpp/sdbus-cpp.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sdbus-cpp +Version: 2.1.0 +Release: %autorelease +Summary: A C++ D-Bus library for Linux +License: LGPL-2.1-or-later WITH LGPL-3.0-linking-exception +URL: https://github.com/Kistler-Group/sdbus-cpp +#!RemoteAsset +Source0: https://github.com/Kistler-Group/sdbus-cpp/archive/refs/tags/v%{version}.tar.gz + +BuildSystem: cmake + +BuildOption(conf): -DBUILD_TESTING:BOOL=OFF +BuildOption(conf): -DBUILD_EXAMPLES:BOOL=OFF +BuildOption(conf): -DBUILD_DOC:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libxml-2.0) +# BuildRequires: doxygen graphviz + +%description +sdbus-cpp is a modern C++ D-Bus library for Linux, designed as a lightweight +wrapper around sd-bus, the D-Bus API of systemd. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config file, and CMake configuration +files needed to develop applications that use the sdbus-cpp library. + +%ldconfig_scriptlets + +%files +%license COPYING COPYING-LGPL-Exception +%doc README.md +%doc %{_docdir}/sdbus-c++ +%{_libdir}/libsdbus-c++.so.* + +%files devel +%{_includedir}/sdbus-c++/ +%{_libdir}/libsdbus-c++.so +%{_libdir}/pkgconfig/sdbus-c++.pc +%dir %{_libdir}/cmake/sdbus-c++ +%{_libdir}/cmake/sdbus-c++/* + +%changelog +%{?autochangelog} diff --git a/SPECS/sed/sed.spec b/SPECS/sed/sed.spec new file mode 100644 index 00000000..fa3afa65 --- /dev/null +++ b/SPECS/sed/sed.spec @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sed +Version: 4.9 +Release: %autorelease +Summary: A Stream-Oriented Non-Interactive Text Editor +License: GPL-3.0-or-later +Group: System/Base +URL: https://www.gnu.org/software/sed/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/sed/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/sed/%{name}-%{version}.tar.xz.sig +BuildRequires: acl-devel +BuildRequires: libselinux-devel +Provides: base:/bin/sed + +BuildSystem: autotools +BuildOption(conf): --without-included-regex + +%description +Sed takes text input, performs one or more operations on it, and +outputs the modified text. Sed is typically used for extracting parts +of a file using pattern matching or for substituting multiple +occurrences of a string within a file. + +%install -a +%find_lang %{name} --generate-subpackages + +%files +%license COPYING* +%doc AUTHORS BUGS NEWS README* THANKS +%{_bindir}/sed +%{_mandir}/man*/*%{ext_man} +%{_infodir}/sed.info*%{ext_info} + +%changelog +%{?autochangelog} diff --git a/SPECS/setup/COPYING b/SPECS/setup/COPYING new file mode 100644 index 00000000..be825890 --- /dev/null +++ b/SPECS/setup/COPYING @@ -0,0 +1,4 @@ +Setup package is public domain. + +You are free to use, copy, distribute or modify included files +without restrictions. diff --git a/SPECS/setup/aliases b/SPECS/setup/aliases new file mode 100644 index 00000000..5d7b9e2a --- /dev/null +++ b/SPECS/setup/aliases @@ -0,0 +1,97 @@ +# +# Aliases in this file will NOT be expanded in the header from +# Mail, but WILL be visible over networks or from /bin/mail. +# +# >>>>>>>>>> The program "newaliases" must be run after +# >> NOTE >> this file is updated for any changes to +# >>>>>>>>>> show through to sendmail. +# + +# Basic system aliases -- these MUST be present. +mailer-daemon: postmaster +postmaster: root + +# General redirections for pseudo accounts. +bin: root +daemon: root +adm: root +lp: root +sync: root +shutdown: root +halt: root +mail: root +news: root +uucp: root +operator: root +games: root +gopher: root +ftp: root +nobody: root +radiusd: root +nut: root +dbus: root +vcsa: root +canna: root +wnn: root +rpm: root +nscd: root +pcap: root +apache: root +webalizer: root +dovecot: root +fax: root +quagga: root +radvd: root +pvm: root +amandabackup: root +privoxy: root +ident: root +named: root +xfs: root +gdm: root +mailnull: root +postgres: root +sshd: root +smmsp: root +postfix: root +netdump: root +ldap: root +squid: root +ntp: root +mysql: root +desktop: root +rpcuser: root +rpc: root +nfsnobody: root +pcp: root + +ingres: root +system: root +toor: root +manager: root +dumper: root +abuse: root + +newsadm: news +newsadmin: news +usenet: news +ftpadm: ftp +ftpadmin: ftp +ftp-adm: ftp +ftp-admin: ftp +www: webmaster +webmaster: root +noc: root +security: root +hostmaster: root +info: postmaster +marketing: postmaster +sales: postmaster +support: postmaster + + +# trap decode to catch security attacks +decode: root + +# Person who should get root's mail +#root: marc diff --git a/SPECS/setup/bashrc b/SPECS/setup/bashrc new file mode 100644 index 00000000..1b09f031 --- /dev/null +++ b/SPECS/setup/bashrc @@ -0,0 +1,90 @@ +# /etc/bashrc + +# System wide functions and aliases +# Environment stuff goes in /etc/profile + +# It's NOT a good idea to change this file unless you know what you +# are doing. It's much better to create a custom.sh shell script in +# /etc/profile.d/ to make custom changes to your environment, as this +# will prevent the need for merging in future updates. + +# Prevent doublesourcing +if [ -z "$BASHRCSOURCED" ]; then + BASHRCSOURCED="Y" + + # are we an interactive shell? + if [ "$PS1" ]; then + if [ -z "$PROMPT_COMMAND" ]; then + declare -a PROMPT_COMMAND + case $TERM in + xterm*) + if [ -e /etc/sysconfig/bash-prompt-xterm ]; then + PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm + else + PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' + fi + ;; + screen*) + if [ -e /etc/sysconfig/bash-prompt-screen ]; then + PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen + else + PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' + fi + ;; + *) + [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default + ;; + esac + fi + # Turn on parallel history + shopt -s histappend + # Turn on checkwinsize + shopt -s checkwinsize + # Change the default prompt string + [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " + # You might want to have e.g. tty in prompt (e.g. more virtual machines) + # and console windows + # If you want to do so, just add e.g. + # if [ "$PS1" ]; then + # PS1="[\u@\h:\l \W]\\$ " + # fi + # to your custom modification shell script in /etc/profile.d/ directory + fi + + if ! shopt -q login_shell ; then # We're not a login shell + # Need to redefine pathmunge, it gets undefined at the end of /etc/profile + pathmunge () { + case ":${PATH}:" in + *:"$1":*) + ;; + *) + if [ "$2" = "after" ] ; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi + esac + } + + # Set default umask for non-login shell only if it is set to 0 + [ `umask` -eq 0 ] && umask 022 + + SHELL=/bin/bash + # Only display echos from profile.d scripts if we are no login shell + # and interactive - otherwise just process them to set envvars + for i in /etc/profile.d/*.sh; do + if [ -r "$i" ]; then + if [ "$PS1" ]; then + . "$i" + else + . "$i" >/dev/null + fi + fi + done + + unset i + unset -f pathmunge + fi + +fi +# vim:ts=4:sw=4 diff --git a/SPECS/setup/csh.cshrc b/SPECS/setup/csh.cshrc new file mode 100644 index 00000000..8f169a14 --- /dev/null +++ b/SPECS/setup/csh.cshrc @@ -0,0 +1,66 @@ +# /etc/cshrc +# +# csh configuration for all shell invocations. + +# Set default umask for non-login shell only if it is set to 0 +if ( `umask` == 0 ) then + umask 022 +endif + +if ($?prompt) then + if ($?tcsh) then + set promptchars='$#' + set prompt='[%n@%m %c]%# ' + # make completion work better by default + set autolist + else + set prompt=\[$user@`/usr/bin/hostname`\]\$\ + endif +endif + +if ( $?tcsh ) then + bindkey "^[[3~" delete-char +endif + +bindkey "^R" i-search-back +set echo_style = both +set histdup = erase +set savehist = (1024 merge) + +if ($?prompt) then + if ($?TERM) then + switch($TERM) + case xterm*: + if ($?tcsh) then + set prompt='%{\033]0;%n@%m:%c\007%}[%n@%m %c]%# ' + endif + breaksw + case screen: + if ($?tcsh) then + set prompt='%{\033k%n@%m:%c\033\\%}[%n@%m %c]%# ' + endif + breaksw + default: + breaksw + endsw + endif +endif + +setenv MAIL "/var/spool/mail/$USER" + +# Check if we aren't a loginshell and do stuff if we aren't +if (! $?loginsh) then + if ( -d /etc/profile.d ) then + set nonomatch + foreach i ( /etc/profile.d/*.csh ) + if ( -r "$i" ) then + if ($?prompt) then + source "$i" + else + source "$i" >&/dev/null + endif + endif + end + unset i nonomatch + endif +endif diff --git a/SPECS/setup/csh.login b/SPECS/setup/csh.login new file mode 100644 index 00000000..e520bd8f --- /dev/null +++ b/SPECS/setup/csh.login @@ -0,0 +1,61 @@ +# /etc/csh.login + +# System wide environment and startup programs, for login setup + +if ( ! ${?PATH} ) then + if ( $uid == 0 ) then + setenv PATH "/usr/local/sbin:/usr/sbin:/usr/local/bin:/usr/bin" + else + setenv PATH "/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin" + endif +else + #add sbin directories to the path + foreach p ( /usr/local/sbin /usr/sbin ) + switch (":${PATH}:") + case "*:${p}:*": + breaksw + default: + if ( $uid == 0 ) then + set path = ( ${p} ${path:q} ) + else + set path = ( ${path:q} ${p} ) + endif + breaksw + endsw + end + unset p +endif + +if ( -ex /usr/bin/hostnamectl ) then + setenv HOSTNAME `/usr/bin/hostnamectl --transient` + if ( $? != 0 ) then + unsetenv HOSTNAME + endif +endif +if ( ! $?HOSTNAME ) then + if ( -ex /usr/bin/hostname ) then + setenv HOSTNAME `/usr/bin/hostname` + if ( $? != 0 ) then + unsetenv HOSTNAME + endif + endif +endif +if ( ! $?HOSTNAME ) then + setenv HOSTNAME `/usr/bin/uname -n` +endif + +set history=1000 + +if ( -d /etc/profile.d ) then + set nonomatch + foreach i ( /etc/profile.d/*.csh /etc/profile.d/csh.local ) + if ( -r "$i" ) then + if ($?prompt) then + source "$i" + else + source "$i" >& /dev/null + endif + endif + end + unset i nonomatch +endif diff --git a/SPECS/setup/ethertypes b/SPECS/setup/ethertypes new file mode 100644 index 00000000..813177b7 --- /dev/null +++ b/SPECS/setup/ethertypes @@ -0,0 +1,39 @@ +# +# Ethernet frame types +# This file describes some of the various Ethernet +# protocol types that are used on Ethernet networks. +# +# This list could be found on: +# http://www.iana.org/assignments/ethernet-numbers +# http://www.iana.org/assignments/ieee-802-numbers +# +# ... #Comment +# +IPv4 0800 ip ip4 # Internet IP (IPv4) +X25 0805 +ARP 0806 ether-arp # +FR_ARP 0808 # Frame Relay ARP [RFC1701] +BPQ 08FF # G8BPQ AX.25 Ethernet Packet +DEC 6000 # DEC Assigned proto +DNA_DL 6001 # DEC DNA Dump/Load +DNA_RC 6002 # DEC DNA Remote Console +DNA_RT 6003 # DEC DNA Routing +LAT 6004 # DEC LAT +DIAG 6005 # DEC Diagnostics +CUST 6006 # DEC Customer use +SCA 6007 # DEC Systems Comms Arch +TEB 6558 # Trans Ether Bridging [RFC1701] +RAW_FR 6559 # Raw Frame Relay [RFC1701] +RARP 8035 # Reverse ARP [RFC903] +AARP 80F3 # Appletalk AARP +ATALK 809B # Appletalk +802_1Q 8100 8021q 1q 802.1q dot1q # 802.1Q Virtual LAN tagged frame +IPX 8137 # Novell IPX +NetBEUI 8191 # NetBEUI +IPv6 86DD ip6 # IP version 6 +PPP 880B # PPP +ATMMPOA 884C # MultiProtocol over ATM +PPP_DISC 8863 # PPPoE discovery messages +PPP_SES 8864 # PPPoE session messages +ATMFATE 8884 # Frame-based ATM Transport over Ethernet +LOOP 9000 loopback # loop proto diff --git a/SPECS/setup/filesystems b/SPECS/setup/filesystems new file mode 100644 index 00000000..45bdb1c3 --- /dev/null +++ b/SPECS/setup/filesystems @@ -0,0 +1,10 @@ +ext4 +ext3 +ext2 +nodev proc +nodev devpts +iso9660 +vfat +hfs +hfsplus +* diff --git a/SPECS/setup/host.conf b/SPECS/setup/host.conf new file mode 100644 index 00000000..d1a59f73 --- /dev/null +++ b/SPECS/setup/host.conf @@ -0,0 +1 @@ +multi on diff --git a/SPECS/setup/hosts b/SPECS/setup/hosts new file mode 100644 index 00000000..48dce7c5 --- /dev/null +++ b/SPECS/setup/hosts @@ -0,0 +1,7 @@ +# Loopback entries; do not change. +# For historical reasons, localhost precedes localhost.localdomain: +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 +# See hosts(5) for proper format and other examples: +# 192.168.1.10 foo.example.org foo +# 192.168.1.13 bar.example.org bar diff --git a/SPECS/setup/inputrc b/SPECS/setup/inputrc new file mode 100644 index 00000000..3167531f --- /dev/null +++ b/SPECS/setup/inputrc @@ -0,0 +1,42 @@ +# do not bell on tab-completion +#set bell-style none + +set meta-flag on +set input-meta on +set convert-meta off +set output-meta on + +# Completed names which are symbolic links to +# directories have a slash appended. +set mark-symlinked-directories on + +$if mode=emacs + +# for linux console and RH/Debian xterm +"\e[1~": beginning-of-line +"\e[4~": end-of-line +# commented out keymappings for pgup/pgdown to reach begin/end of history +#"\e[5~": beginning-of-history +#"\e[6~": end-of-history +"\e[5~": history-search-backward +"\e[6~": history-search-forward +"\e[3~": delete-char +"\e[2~": overwrite-mode +"\e[5C": forward-word +"\e[5D": backward-word +"\e[1;5C": forward-word +"\e[1;5D": backward-word + +# for rxvt +"\e[8~": end-of-line +"\eOc": forward-word +"\eOd": backward-word + +# for non RH/Debian xterm, can't hurt for RH/DEbian xterm +"\eOH": beginning-of-line +"\eOF": end-of-line + +# for freebsd console +"\e[H": beginning-of-line +"\e[F": end-of-line +$endif diff --git a/SPECS/setup/lang.csh b/SPECS/setup/lang.csh new file mode 100644 index 00000000..564ae246 --- /dev/null +++ b/SPECS/setup/lang.csh @@ -0,0 +1,109 @@ +# /etc/profile.d/lang.csh - exports environment variables, and provides fallback +# for CJK languages that can't be displayed in console. +# Resets the locale if unavailable. + +unset LANG_backup + +# If unavailable, reset to the default. Do this before reading in any +# explicit user configuration. We simply check if locale emits any +# warnings, and assume that the settings are invalid if it does. +set locale_error=`(/usr/bin/locale >/dev/null) |& cat` +if ("${locale_error}" != "") then + if (${?LANG}) then + setenv LANG C.UTF-8 + endif + unsetenv LC_ALL + setenv LC_CTYPE C.UTF-8 + setenv LC_NUMERIC C.UTF-8 + setenv LC_TIME C.UTF-8 + setenv LC_COLLATE C.UTF-8 + setenv LC_MONETARY C.UTF-8 + setenv LC_MESSAGES C.UTF-8 + setenv LC_PAPER C.UTF-8 + setenv LC_NAME C.UTF-8 + setenv LC_ADDRESS C.UTF-8 + setenv LC_TELEPHONE C.UTF-8 + setenv LC_MEASUREMENT C.UTF-8 + setenv LC_IDENTIFICATION C.UTF-8 +else + if (${?LANG}) then + set LANG_backup=${LANG} + endif +endif + +foreach config (/etc/locale.conf "${HOME}/.i18n") + if (-f "${config}") then + # NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files. + eval `/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/setenv \1 \2;/;t;d' ${config}` + endif +end + +if (${?LANG_backup}) then + setenv LANG "${LANG_backup}" +endif + +unset LANG_backup config locale_error + +# ---------------------------------------------- + +# The LC_ALL is not supposed to be set in /etc/locale.conf according to 'man 5 locale.conf'. +# If it is set, then we expect it is user's explicit override (most likely from ~/.i18n file). +# See 'man 7 locale' for more info about LC_ALL. +if (${?LC_ALL}) then + if (${?LANG}) then + if (${LC_ALL} != ${LANG}) then + setenv LC_ALL + else + unsetenv LC_ALL + endif + else + unsetenv LC_ALL + endif +endif + +# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*): +set in_console=`/usr/bin/tty | /usr/bin/grep -vc -e '/dev/tty'` + +if (${?LANG} && ${?TERM}) then + if (${TERM} == 'linux' && $in_console == 0) then + set utf8_used=`echo ${LANG} | /usr/bin/grep -vc -E -i -e '^.+\.utf-?8$'` + + if (${utf8_used} == 0) then + switch (${LANG}) + case en_IN*: + breaksw + case ja*: + case ko*: + case si*: + case zh*: + case ar*: + case fa*: + case he*: + case *_IN*: + setenv LANG en_US.UTF-8 + breaksw + endsw + else + switch (${LANG}) + case en_IN*: + breaksw + case ja*: + case ko*: + case si*: + case zh*: + case ar*: + case fa*: + case he*: + case *_IN*: + setenv LANG en_US + breaksw + endsw + endif + + # NOTE: We are not exporting the ${LANG} here again on purpose. + # If user starts GUI session from console manually, then + # the previously set LANG should be okay to use. + endif +endif + +unset in_console utf8_used diff --git a/SPECS/setup/lang.sh b/SPECS/setup/lang.sh new file mode 100644 index 00000000..f42efa6b --- /dev/null +++ b/SPECS/setup/lang.sh @@ -0,0 +1,91 @@ +# /etc/profile.d/lang.sh - exports environment variables, and provides fallback +# for CJK languages that can't be displayed in console. +# Resets the locale if unavailable. + +unset LANG_backup + +# If unavailable, reset to the default. Do this before reading in any +# explicit user configuration. We simply check if locale emits any +# warnings, and assume that the settings are invalid if it does. +if [ -n "$(/usr/bin/locale 2>&1 1>/dev/null)" ]; then + [ -z "$LANG" ] || LANG=C.UTF-8 + unset LC_ALL + LC_CTYPE="C.UTF-8" + LC_NUMERIC="C.UTF-8" + LC_TIME="C.UTF-8" + LC_COLLATE="C.UTF-8" + LC_MONETARY="C.UTF-8" + LC_MESSAGES="C.UTF-8" + LC_PAPER="C.UTF-8" + LC_NAME="C.UTF-8" + LC_ADDRESS="C.UTF-8" + LC_TELEPHONE="C.UTF-8" + LC_MEASUREMENT="C.UTF-8" + LC_IDENTIFICATION="C.UTF-8" +else + LANG_backup="${LANG}" +fi + +for config in /etc/locale.conf "${HOME}/.i18n"; do + if [ -f "${config}" ]; then + # NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files. + if [ -x /usr/bin/sed ]; then + eval $(/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config}) + else + #but if we don't have sed, let's go old way and source it + [ -f "${config}" ] && . "${config}" + fi + fi +done + +if [ -n "${LANG_backup}" ]; then + LANG="${LANG_backup}" +fi + +unset LANG_backup config + +# ---------------------------------------------- + +# The LC_ALL is not supposed to be set in /etc/locale.conf according to 'man 5 locale.conf'. +# If it is set, then we we expect it is user's explicit override (most likely from ~/.i18n file). +# See 'man 7 locale' for more info about LC_ALL. +if [ -n "${LC_ALL}" ]; then + if [ "${LC_ALL}" != "${LANG}" -a -n "${LANG}" ]; then + export LC_ALL + else + unset LC_ALL + fi +fi + +# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*): +if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && /usr/bin/tty | /usr/bin/grep --quiet -e '/dev/tty'; then + if /usr/bin/grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then + case ${LANG} in + ja*) LANG=en_US.UTF-8 ;; + ko*) LANG=en_US.UTF-8 ;; + si*) LANG=en_US.UTF-8 ;; + zh*) LANG=en_US.UTF-8 ;; + ar*) LANG=en_US.UTF-8 ;; + fa*) LANG=en_US.UTF-8 ;; + he*) LANG=en_US.UTF-8 ;; + en_IN*) true ;; + *_IN*) LANG=en_US.UTF-8 ;; + esac + else + case ${LANG} in + ja*) LANG=en_US ;; + ko*) LANG=en_US ;; + si*) LANG=en_US ;; + zh*) LANG=en_US ;; + ar*) LANG=en_US ;; + fa*) LANG=en_US ;; + he*) LANG=en_US ;; + en_IN*) true ;; + *_IN*) LANG=en_US ;; + esac + fi + + # NOTE: We are not exporting the ${LANG} here again on purpose. + # If user starts GUI session from console manually, then + # the previously set LANG should be okay to use. +fi diff --git a/SPECS/setup/networks b/SPECS/setup/networks new file mode 100644 index 00000000..9a46fc80 --- /dev/null +++ b/SPECS/setup/networks @@ -0,0 +1,3 @@ +default 0.0.0.0 +loopback 127.0.0.0 +link-local 169.254.0.0 diff --git a/SPECS/setup/printcap b/SPECS/setup/printcap new file mode 100644 index 00000000..9f88f827 --- /dev/null +++ b/SPECS/setup/printcap @@ -0,0 +1,7 @@ +# /etc/printcap +# +# Please don't edit this file directly unless you know what you are doing! +# This file will be automatically generated by cupsd(8) from the +# /etc/cups/printers.conf file. All changes to this file +# will be lost. + diff --git a/SPECS/setup/profile b/SPECS/setup/profile new file mode 100644 index 00000000..8bcc0e85 --- /dev/null +++ b/SPECS/setup/profile @@ -0,0 +1,87 @@ +# /etc/profile + +# System wide environment and startup programs, for login setup +# Functions and aliases go in /etc/bashrc + +# It's NOT a good idea to change this file unless you know what you +# are doing. It's much better to create a custom.sh shell script in +# /etc/profile.d/ to make custom changes to your environment, as this +# will prevent the need for merging in future updates. + +pathmunge () { + # If the path is a compat symlink, do nothing. + [ -h "$1" ] && return + + case ":${PATH}:" in + *:"$1":*) + ;; + *) + if [ "$2" = "after" ] ; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi + esac +} + + +if [ -x /usr/bin/id ]; then + if [ -z "$EUID" ]; then + # ksh workaround + EUID=`/usr/bin/id -u` + UID=`/usr/bin/id -ru` + fi + USER="`/usr/bin/id -un`" + LOGNAME=$USER + MAIL="/var/spool/mail/$USER" +fi + +# Path manipulation +if [ "$EUID" = "0" ]; then + pathmunge /usr/sbin + pathmunge /usr/local/sbin +else + pathmunge /usr/local/sbin after + pathmunge /usr/sbin after +fi + +HOSTNAME=$(/usr/bin/hostnamectl --transient 2>/dev/null) || \ +HOSTNAME=$(/usr/bin/hostname 2>/dev/null) || \ +HOSTNAME=$(/usr/bin/uname -n) + +if [ -z "$HISTSIZE" ] ; then + HISTSIZE=1000 +fi + +if [ "$HISTCONTROL" = "ignorespace" ] ; then + export HISTCONTROL=ignoreboth +else + export HISTCONTROL=ignoredups +fi + +export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL + +for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do + if [ -r "$i" ]; then + if [ "${-#*i}" != "$-" ]; then + . "$i" + else + . "$i" >/dev/null + fi + fi +done + +unset i +unset -f pathmunge + +# Source global bash config, when interactive but not posix or sh mode +if test "$BASH" &&\ + test -z "$POSIXLY_CORRECT" &&\ + test "${0#-}" != sh &&\ + test -r /etc/bashrc +then + # Bash login shells run only /etc/profile + # Bash non-login shells run only /etc/bashrc + # Check for double sourcing is done in /etc/bashrc. + . /etc/bashrc +fi diff --git a/SPECS/setup/protocols b/SPECS/setup/protocols new file mode 100644 index 00000000..75e88ba2 --- /dev/null +++ b/SPECS/setup/protocols @@ -0,0 +1,170 @@ +# /etc/protocols: +# $Id: protocols,v 1.13 2025/05/14 15:30 mosvald Exp $ +# +# Internet (IP) protocols +# +# from: @(#)protocols 5.1 (Berkeley) 4/17/89 +# +# Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992). +# Last IANA update included dated 2025-01-08 +# +# See also http://www.iana.org/assignments/protocol-numbers + +ip 0 IP # internet protocol, pseudo protocol number +hopopt 0 HOPOPT # hop-by-hop options for ipv6 +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # internet group management protocol +ggp 3 GGP # gateway-gateway protocol +ipv4 4 IPv4 # IPv4 encapsulation +st 5 ST # ST datagram mode +tcp 6 TCP # transmission control protocol +cbt 7 CBT # CBT, Tony Ballardie +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco: for IGRP) +bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring +nvp 11 NVP-II # Network Voice Protocol +pup 12 PUP # PARC universal packet protocol +argus 13 ARGUS # ARGUS (deprecated) +emcon 14 EMCON # EMCON +xnet 15 XNET # Cross Net Debugger +chaos 16 CHAOS # Chaos +udp 17 UDP # user datagram protocol +mux 18 MUX # Multiplexing protocol +dcn 19 DCN-MEAS # DCN Measurement Subsystems +hmp 20 HMP # host monitoring protocol +prm 21 PRM # packet radio measurement protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +trunk-1 23 TRUNK-1 # Trunk-1 +trunk-2 24 TRUNK-2 # Trunk-2 +leaf-1 25 LEAF-1 # Leaf-1 +leaf-2 26 LEAF-2 # Leaf-2 +rdp 27 RDP # "reliable datagram" protocol +irtp 28 IRTP # Internet Reliable Transaction Protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4 +netblt 30 NETBLT # Bulk Data Transfer Protocol +mfe-nsp 31 MFE-NSP # MFE Network Services Protocol +merit-inp 32 MERIT-INP # MERIT Internodal Protocol +dccp 33 DCCP # Datagram Congestion Control Protocol +3pc 34 3PC # Third Party Connect Protocol +idpr 35 IDPR # Inter-Domain Policy Routing Protocol +xtp 36 XTP # Xpress Tranfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto +tp++ 39 TP++ # TP++ Transport Protocol +il 40 IL # IL Transport Protocol +ipv6 41 IPv6 # IPv6 encapsulation +sdrp 42 SDRP # Source Demand Routing Protocol +ipv6-route 43 IPv6-Route # Routing Header for IPv6 +ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Resource ReSerVation Protocol +gre 47 GRE # Generic Routing Encapsulation +dsr 48 DSR # Dynamic Source Routing Protocol +bna 49 BNA # BNA +esp 50 ESP # Encap Security Payload +ipv6-crypt 50 IPv6-Crypt # Encryption Header for IPv6 (not in official list) +ah 51 AH # Authentication Header +ipv6-auth 51 IPv6-Auth # Authentication Header for IPv6 (not in official list) +i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA +swipe 53 SWIPE # IP with Encryption (deprecated) +narp 54 NARP # NBMA Address Resolution Protocol +mobile 55 MOBILE # IP Mobility +tlsp 56 TLSP # Transport Layer Security Protocol +skip 57 SKIP # SKIP +ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6 +ipv6-opts 60 IPv6-Opts # Destination Options for IPv6 +# 61 # any host internal protocol +cftp 62 CFTP # CFTP +# 63 # any local network +sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK +kryptolan 65 KRYPTOLAN # Kryptolan +rvd 66 RVD # MIT Remote Virtual Disk Protocol +ippc 67 IPPC # Internet Pluribus Packet Core +# 68 # any distributed file system +sat-mon 69 SAT-MON # SATNET Monitoring +visa 70 VISA # VISA Protocol +ipcv 71 IPCV # Internet Packet Core Utility +cpnx 72 CPNX # Computer Protocol Network Executive +cphb 73 CPHB # Computer Protocol Heart Beat +wsn 74 WSN # Wang Span Network +pvp 75 PVP # Packet Video Protocol +br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring +sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary +wb-mon 78 WB-MON # WIDEBAND Monitoring +wb-expak 79 WB-EXPAK # WIDEBAND EXPAK +iso-ip 80 ISO-IP # ISO Internet Protocol +vmtp 81 VMTP # Versatile Message Transport +secure-vmtp 82 SECURE-VMTP # SECURE-VMTP +vines 83 VINES # VINES +ttp 84 TTP # TTP +nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP +dgp 86 DGP # Dissimilar Gateway Protocol +tcf 87 TCF # TCF +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol +larp 91 LARP # Locus Address Resolution Protocol +mtp 92 MTP # Multicast Transport Protocol +ax.25 93 AX.25 # AX.25 Frames +ipip 94 IPIP # Yet Another IP encapsulation +micp 95 MICP # Mobile Internetworking Control Pro. (deprecated) +scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro. +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation +encap 98 ENCAP # Yet Another IP encapsulation +# 99 # any private encryption scheme +gmtp 100 GMTP # GMTP +ifmp 101 IFMP # Ipsilon Flow Management Protocol +pnni 102 PNNI # PNNI over IP +pim 103 PIM # Protocol Independent Multicast +aris 104 ARIS # ARIS +scps 105 SCPS # SCPS +qnx 106 QNX # QNX +a/n 107 A/N # Active Networks +ipcomp 108 IPComp # IP Payload Compression Protocol +snp 109 SNP # Sitara Networks Protocol +compaq-peer 110 Compaq-Peer # Compaq Peer Protocol +ipx-in-ip 111 IPX-in-IP # IPX in IP +vrrp 112 VRRP # Virtual Router Redundancy Protocol +pgm 113 PGM # PGM Reliable Transport Protocol +# 114 # any 0-hop protocol +l2tp 115 L2TP # Layer Two Tunneling Protocol +ddx 116 DDX # D-II Data Exchange +iatp 117 IATP # Interactive Agent Transfer Protocol +stp 118 STP # Schedule Transfer +srp 119 SRP # SpectraLink Radio Protocol +uti 120 UTI # UTI +smp 121 SMP # Simple Message Protocol +sm 122 SM # SM (deprecated) +ptp 123 PTP # Performance Transparency Protocol +isis 124 ISIS # ISIS over IPv4 +fire 125 FIRE +crtp 126 CRTP # Combat Radio Transport Protocol +crudp 127 CRUDP # Combat Radio User Datagram +sscopmce 128 SSCOPMCE +iplt 129 IPLT +sps 130 SPS # Secure Packet Shield +pipe 131 PIPE # Private IP Encapsulation within IP +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +rsvp-e2e-ignore 134 RSVP-E2E-IGNORE +mobility-header 135 Mobility-Header # Mobility Header +udplite 136 UDPLite +mpls-in-ip 137 MPLS-in-IP +manet 138 manet # MANET Protocols +hip 139 HIP # Host Identity Protocol +shim6 140 Shim6 # Shim6 Protocol +wesp 141 WESP # Wrapped Encapsulating Security Payload +rohc 142 ROHC # Robust Header Compression +ethernet 143 Ethernet # Ethernet encapsulation for SRv6 +aggfrag 144 AGGFRAG # AGGFRAG encapsulation payload for ESP +nsh 145 NSH # Network Service Header +homa 146 Homa # Homa +bit-emu 147 BIT-EMU # Bit-stream Emulation +# 148-252 Unassigned [IANA] +# 253 Use for experimentation and testing [RFC3692] +# 254 Use for experimentation and testing [RFC3692] +# 255 Reserved [IANA] +# The following entries have not been assigned by IANA but are used +# internally by the Linux kernel. +mptcp 262 MPTCP # Multipath TCP connection diff --git a/SPECS/setup/services b/SPECS/setup/services new file mode 100644 index 00000000..50ad944a --- /dev/null +++ b/SPECS/setup/services @@ -0,0 +1,11607 @@ +# /etc/services: +# $Id: services,v 1.49 2017/08/18 12:43:23 ovasik Exp $ +# +# Network services, Internet style +# IANA services version: last updated 2021-01-19 +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, most entries here have two entries +# even if the protocol doesn't support UDP operations. +# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports +# are included, only the more common ones. +# +# The latest IANA port assignments can be gotten from +# http://www.iana.org/assignments/port-numbers +# The Well Known Ports are those from 0 through 1023. +# The Registered Ports are those from 1024 through 49151 +# The Dynamic and/or Private Ports are those from 49152 through 65535 +# +# Each line describes one service, and is of the form: +# +# service-name port/protocol [aliases ...] [# comment] + +tcpmux 1/tcp # TCP port service multiplexer +tcpmux 1/udp # TCP port service multiplexer +rje 5/tcp # Remote Job Entry +rje 5/udp # Remote Job Entry +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +systat 11/udp users +daytime 13/tcp +daytime 13/udp +qotd 17/tcp quote +qotd 17/udp quote +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp-data 20/udp +# 21 is registered to ftp, but also used by fsp +ftp 21/tcp +ftp 21/udp fsp fspd +ssh 22/tcp # The Secure Shell (SSH) Protocol +ssh 22/udp # The Secure Shell (SSH) Protocol +telnet 23/tcp +telnet 23/udp +# 24 - private mail system +lmtp 24/tcp # LMTP Mail Delivery +lmtp 24/udp # LMTP Mail Delivery +smtp 25/tcp mail +smtp 25/udp mail +time 37/tcp timserver +time 37/udp timserver +#rap 38/tcp # Route Access Protocol +#rap 38/udp # Route Access Protocol +rlp 39/tcp resource # resource location +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +nameserver 42/udp name # IEN 116 +nicname 43/tcp whois +nicname 43/udp whois +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp # Login Host Protocol (TACACS) +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp # Remote Mail Checking Protocol +domain 53/tcp # name-domain server +domain 53/udp +whois++ 63/tcp whoispp +whois++ 63/udp whoispp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp dhcpc # BOOTP client +bootpc 68/udp dhcpc +tftp 69/tcp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +netrjs-1 71/tcp # Remote Job Service +netrjs-1 71/udp # Remote Job Service +netrjs-2 72/tcp # Remote Job Service +netrjs-2 72/udp # Remote Job Service +netrjs-3 73/tcp # Remote Job Service +netrjs-3 73/udp # Remote Job Service +netrjs-4 74/tcp # Remote Job Service +netrjs-4 74/udp # Remote Job Service +finger 79/tcp +finger 79/udp +http 80/tcp www www-http # WorldWideWeb HTTP +http 80/udp www www-http # HyperText Transfer Protocol +http 80/sctp # HyperText Transfer Protocol +kerberos 88/tcp kerberos5 krb5 # Kerberos v5 +kerberos 88/udp kerberos5 krb5 # Kerberos v5 +supdup 95/tcp +supdup 95/udp +hostname 101/tcp hostnames # usually from sri-nic +hostname 101/udp hostnames # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE. +csnet-ns 105/tcp cso # also used by CSO name server +csnet-ns 105/udp cso +# unfortunately the poppassd (Eudora) uses a port which has already +# been assigned to a different service. We list the poppassd as an +# alias here. This should work for programs asking for this service. +# (due to a bug in inetd the 3com-tsmux line is disabled) +#3com-tsmux 106/tcp poppassd +#3com-tsmux 106/udp poppassd +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp pop-2 postoffice # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper rpcbind # RPC 4.0 portmapper TCP +sunrpc 111/udp portmapper rpcbind # RPC 4.0 portmapper UDP +auth 113/tcp authentication tap ident +auth 113/udp authentication tap ident +sftp 115/tcp +sftp 115/udp +uucp-path 117/tcp +uucp-path 117/udp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +nntp 119/udp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap 143/tcp imap2 # Interim Mail Access Proto v2 +imap 143/udp imap2 +snmp 161/tcp # Simple Net Mgmt Proto +snmp 161/udp # Simple Net Mgmt Proto +snmptrap 162/tcp # SNMPTRAP +snmptrap 162/udp snmp-trap # Traps for SNMP +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # MAILQ +mailq 174/udp # MAILQ +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Proto. +bgp 179/udp +bgp 179/sctp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp # Quick Mail Transfer Protocol +z39.50 210/tcp z3950 z39-50 wais # NISO Z39.50 database +z39.50 210/udp z3950 z39-50 wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +link 245/tcp ttylink +link 245/udp ttylink +gist 270/udp # Q-mode encapsulation for GIST messages +fatserv 347/tcp # Fatmen Server +fatserv 347/udp # Fatmen Server +rsvp_tunnel 363/tcp rsvp-tunnel +rsvp_tunnel 363/udp rsvp-tunnel +odmr 366/tcp # odmr required by fetchmail +odmr 366/udp # odmr required by fetchmail +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +ulistproc 372/tcp ulistserv # UNIX Listserv +ulistproc 372/udp ulistserv +ldap 389/tcp +ldap 389/udp +osb-sd 400/tcp # Oracle Secure Backup +osb-sd 400/udp # Oracle Secure Backup +svrloc 427/tcp # Server Location +svrloc 427/udp # Server Location +mobileip-agent 434/tcp +mobileip-agent 434/udp +mobilip-mn 435/tcp +mobilip-mn 435/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp # http protocol over TLS/SSL +https 443/sctp # http protocol over TLS/SSL +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp # Simple Network Paging Protocol +microsoft-ds 445/tcp +microsoft-ds 445/udp +kpasswd 464/tcp kpwd # Kerberos "passwd" +kpasswd 464/udp kpwd # Kerberos "passwd" +photuris 468/tcp +photuris 468/udp +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp # Simple Asynchronous File Transfer +gss-http 488/tcp +gss-http 488/udp +pim-rp-disc 496/tcp +pim-rp-disc 496/udp +isakmp 500/tcp +isakmp 500/udp +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp # GNUstep distributed objects +iiop 535/tcp +iiop 535/udp +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp # Real Time Stream Control Protocol +nntps 563/tcp # NNTP over SSL +nntps 563/udp # NNTP over SSL +whoami 565/tcp +whoami 565/udp +submission 587/tcp msa # mail message submission +submission 587/udp msa # mail message submission +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster # npmp-local / DQS +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd # npmp-gui / DQS +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell # HMMP Indication / DQS +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp # Internet Printing Protocol +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp # LDAP over SSL +acap 674/tcp +acap 674/udp +ha-cluster 694/tcp # Heartbeat HA-cluster +ha-cluster 694/udp # Heartbeat HA-cluster +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +kerberos-adm 749/udp # kerberos administration +kerberos-iv 750/udp kerberos4 kerberos-sec kdc loadav +kerberos-iv 750/tcp kerberos4 kerberos-sec kdc rfile +webster 765/tcp # Network dictionary +webster 765/udp +phonebook 767/tcp # Network phonebook +phonebook 767/udp +rsync 873/tcp # rsync +rsync 873/udp # rsync +#rquotad unreserved in IANA! +rquotad 875/tcp # rquota daemon +#rquotad unreserved in IANA! +rquotad 875/udp # rquota daemon +telnets 992/tcp +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp # IMAP over SSL +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp # POP-3 over SSL + +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +printer 515/udp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +utime 519/tcp unixtime +utime 519/udp unixtime +efs 520/tcp +router 520/udp route routed # RIP +ripng 521/tcp +ripng 521/udp +timed 525/tcp timeserver +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp +netwall 533/udp # -for emergency broadcasts +#nmsp 537/tcp # Networked Media Streaming Protocol +#nmsp 537/udp # Networked Media Streaming Protocol +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp # AFP over TCP +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem + +## FileMaker Inc +# http-alt 591/tcp # FileMaker, Inc. - HTTP Alternate (see Port 80) +# http-alt 591/udp # FileMaker, Inc. - HTTP Alternate (see Port 80) +#epp 700/tcp # Extensible Provisioning Protocol +#epp 700/udp # Extensible Provisioning Protocol + +# +# From ``PORT NUMBERS'': +# +#>REGISTERED PORT NUMBERS +#> +#>The Registered Ports are listed by the IANA and on most systems can be +#>used by ordinary user processes or programs executed by ordinary +#>users. +#> +#>Ports are used in the TCP [RFC793] to name the ends of logical +#>connections which carry long term conversations. For the purpose of +#>providing services to unknown callers, a service contact port is +#>defined. This list specifies the port used by the server process as +#>its contact port. +#> +#>The IANA registers uses of these ports as a convienence to the +#>community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp # socks proxy server + +# Port 1236 is registered as `bvcontrol', but is also used by the +# Gracilis Packeten remote config server. The official name is listed as +# the primary name, with the unregistered name as an alias. +bvcontrol 1236/tcp rmtcfg # Daniel J. Walsh, Gracilis Packeten remote config server +bvcontrol 1236/udp # Daniel J. Walsh + +h323hostcallsc 1300/tcp # H.323 Secure Call Control +h323hostcallsc 1300/udp # H.323 Secure Call Control +ms-sql-s 1433/tcp # Microsoft-SQL-Server +ms-sql-s 1433/udp # Microsoft-SQL-Server +ms-sql-m 1434/tcp # Microsoft-SQL-Monitor +ms-sql-m 1434/udp # Microsoft-SQL-Monitor +#csdmbase 1467/tcp # CSDMBASE +#csdmbase 1467/udp # CSDMBASE +#csdm 1468/tcp # CSDM +#csdm 1468/udp # CSDM +ica 1494/tcp # Citrix ICA Client +ica 1494/udp # Citrix ICA Client +wins 1512/tcp # Microsoft's Windows Internet Name Service +wins 1512/udp # Microsoft's Windows Internet Name Service +#ricardo-lm 1522/tcp # Ricardo North America License Manager +#ricardo-lm 1522/udp # Ricardo North America License Manager +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp orasrv # Prospero non-privileged/oracle +prospero-np 1525/udp orasrv +datametrics 1645/tcp old-radius sightline # datametrics / old radius entry +datametrics 1645/udp old-radius sightline # datametrics / old radius entry +sa-msg-port 1646/tcp old-radacct # sa-msg-port / old radacct entry +sa-msg-port 1646/udp old-radacct # sa-msg-port / old radacct entry +kermit 1649/tcp +kermit 1649/udp +l2tp 1701/tcp l2f +l2tp 1701/udp l2f +h323gatedisc 1718/tcp +h323gatedisc 1718/udp +h323gatestat 1719/tcp +h323gatestat 1719/udp +h323hostcall 1720/tcp +h323hostcall 1720/udp +h323hostcall 1720/sctp # H.323 Call Control +tftp-mcast 1758/tcp +tftp-mcast 1758/udp +mtftp 1759/udp spss-lm +vdab 1775/tcp # data interchange between visual processing containers +hello 1789/tcp +hello 1789/udp +radius 1812/tcp # Radius +radius 1812/udp # Radius +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct # Radius Accounting +mtp 1911/tcp # +mtp 1911/udp # +hsrp 1985/tcp # Cisco Hot Standby Router Protocol +hsrp 1985/udp # Cisco Hot Standby Router Protocol +licensedaemon 1986/tcp +licensedaemon 1986/udp +gdp-port 1997/tcp # Cisco Gateway Discovery Protocol +gdp-port 1997/udp # Cisco Gateway Discovery Protocol +sieve-filter 2000/tcp cisco-sccp # Sieve Mail Filter Daemon +sieve-filter 2000/udp cisco-sccp # Sieve Mail Filter Daemon +#raid-cd 2006/udp # raid +nfs 2049/tcp nfsd shilp # Network File System +nfs 2049/udp nfsd shilp # Network File System +nfs 2049/sctp nfsd shilp # Network File System +zephyr-srv 2102/tcp # Zephyr server +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/tcp # Zephyr serv-hm connection +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/tcp # Zephyr hostmanager +zephyr-hm 2104/udp # Zephyr hostmanager +#nvd 2184/tcp # NVD User +#nvd 2184/udp # NVD User +dali 2378/udp # DALI lighting control +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp # CVS client/server operations +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effectQ +#unicontrol 2437/tcp # UniControl +#unicontrol 2437/udp # UniControl + + +# Ports numbered 2600 through 2606 are used by the zebra package without +# being registred. The primary names are the registered names, and the +# unregistered names used by zebra are listed as aliases. +hpstgmgr 2600/tcp zebrasrv # HPSTGMGR +hpstgmgr 2600/udp # HPSTGMGR +discp-client 2601/tcp zebra # discp client +discp-client 2601/udp # discp client +discp-server 2602/tcp ripd # discp server +discp-server 2602/udp # discp server +servicemeter 2603/tcp ripngd # Service Meter +servicemeter 2603/udp # Service Meter +nsc-ccs 2604/tcp ospfd # NSC CCS +nsc-ccs 2604/udp # NSC CCS +nsc-posa 2605/tcp bgpd # NSC POSA +nsc-posa 2605/udp # NSC POSA +netmon 2606/tcp ospf6d # Dell Netmon +netmon 2606/udp # Dell Netmon +dict 2628/tcp # RFC 2229 +dict 2628/udp # RFC 2229 +corbaloc 2809/tcp # CORBA naming service locator +#nmsigport 2817/tcp # NMSig Port +#nmsigport 2817/udp # NMSig Port +icpv2 3130/tcp # Internet Cache Protocol V2 (Squid) +icpv2 3130/udp # Internet Cache Protocol V2 (Squid) +#ceph 3300/tcp # Ceph monitor +mysql 3306/tcp # MySQL +mysql 3306/udp # MySQL +trnsprntproxy 3346/tcp # Trnsprnt Proxy +trnsprntproxy 3346/udp # Trnsprnt Proxy +pxe 4011/udp altserviceboot # PXE server +minirem 4120/tcp # MiniRem Remote Telemetry and Control +aws-wsp 4195/tcp # AWS protocol for cloud remoting solution +aws-wsp 4195/udp # AWS protocol for cloud remoting solution +aws-wsp 4195/sctp # AWS protocol for cloud remoting solution +aws-wsp 4195/dccp # AWS protocol for cloud remoting solution +fud 4201/udp # Cyrus IMAP FUD Daemon +opentelemetry 4317/tcp # OpenTelemetry Protocol +rwhois 4321/tcp # Remote Who Is +rwhois 4321/udp # Remote Who Is +getty-focus 4332/tcp # Getty Images FOCUS service +krb524 4444/tcp nv-video # Kerberos 5 to 4 ticket xlator +krb524 4444/udp nv-video # Kerberos 5 to 4 ticket xlator +ntske 4460/tcp # Network Time Security Key Establishment +sixid 4606/tcp # Secure ID to IP registration and lookup +dots-signal 4646/tcp # DOTS Signal Channel Protocol. +dots-signal 4646/udp # DOTS Signal Channel Protocol. +xcap-portal 4888/tcp # xcap code analysis portal public user access +xcap-control 4889/tcp # xcap code analysis portal cluster control and administration +burp 4971/tcp # BackUp and Restore Program +rfe 5002/tcp # Radio Free Ethernet +rfe 5002/udp # Actually uses UDP only +cfengine 5308/tcp # CFengine +cfengine 5308/udp # CFengine + +coap 5683/tcp # Constrained Application Protocol (CoAP) +coaps 5684/tcp # Constrained Application Protocol (CoAP) +cvsup 5999/tcp CVSup # CVSup file transfer/John Polstra/FreeBSD +cvsup 5999/udp CVSup # CVSup file transfer/John Polstra/FreeBSD +x11 6000/tcp X # the X Window System +heliosd 6440/tcp # heliosd daemon +checkmk-agent 6556/tcp # Checkmk Monitoring Agent +babel-dtls 6699/udp # Babel Routing Protocol over DTLS +split-ping 6924/tcp # Ping with RX/TX latency/loss split +split-ping 6924/udp # Ping with RX/TX latency/loss split +afs3-fileserver 7000/tcp # file server itself +afs3-fileserver 7000/udp # file server itself +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp # callbacks to cache managers +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp # users & groups database +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp # volume location database +afs3-kaserver 7004/tcp # AFS/Kerberos authentication service +afs3-kaserver 7004/udp # AFS/Kerberos authentication service +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp # volume managment server +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp # error interpretation service +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp # basic overseer process +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp # server-to-server updater +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp # remote cache manager service +loreji-panel 7026/tcp # Loreji Webhosting Panel +iba-cfg 7072/tcp # iba Device Configuration Protocol +iba-cfg-disc 7072/udp # iba Device Configuration Protocol +asa-gateways 7234/tcp # Traffic forwarding for Okta cloud infra +ipluminary 7420/udp # Multichannel real-time lighting control +rome 7663/tcp # Proprietary immutable distributed data storage +rome 7663/udp # Proprietary immutable distributed data storage +p2pevolvenet 8004/tcp # Opensource Evolv Enterprise Platform P2P Network Node Connection Prot +warppipe 8007/tcp # I/O oriented cluster computing software +warppipe 8007/udp # I/O oriented cluster computing software +nvme-disc 8009/tcp # NVMe over Fabrics Discovery Service +cfg-cloud 8015/tcp # Configuration Cloud Service +ads-s 8016/tcp # Beckhoff Automation Device Specification +arca-api 8023/tcp # ARCATrust vault API +arca-api 8023/udp # ARCATrust vault API +papachi-p2p-srv 8027/tcp # peer tracker and data relay service +papachi-p2p-srv 8027/udp # peer tracker and data relay service +enguity-xccetp 8041/tcp # Xcorpeon ASIC Carrier Ethernet Transport +enguity-xccetp 8041/udp # Xcorpeon ASIC Carrier Ethernet Transport +websnp 8084/tcp # Snarl Network Protocol over HTTP +skynetflow 8111/udp # Skynetflow network services +aruba-papi 8211/udp # Aruba Networks AP management +espeasy-p2p 8266/udp # ESPeasy peer-2-peer communication +semi-grpc 8710/tcp # gRPC for SEMI Standards implementations +core-of-source 8767/tcp # Online mobile multiplayer game +sandpolis 8768/tcp # Sandpolis Server +oktaauthenticat 8769/tcp # Okta MultiPlatform Access Mgmt for Cloud Svcs +pfcp 8805/udp # Destination Port number for PFCP +hes-clip 8807/udp # HES-CLIP Interoperability protocol +3gpp-monp 8809/udp # MCPTT Off-Network Protocol (MONP) +dpp 8908/tcp # WFA Device Provisioning Protocol + +d-star 9011/udp # D-Star Routing digital voice+data for amateur radio +cisco-aqos 9081/udp # Required for Adaptive Quality of Service +hexxorecore 9111/tcp # Multiple Purpose, Distributed Message Bus +hexxorecore 9111/udp # Multiple Purpose, Distributed Message Bus +sapms 9310/tcp # SAP Message Server +gnmi-gnoi 9339/tcp # gRPC Network Mgmt/Operations Interface +p4runtime 9559/tcp # P4Runtime gRPC Service +x510 9877/tcp # The X.510 wrapper protocol +visweather 9979/tcp # Valley Information Systems Weather station data +amanda 10080/tcp # amanda backup services +amanda 10080/udp # amanda backup services +cimple 10125/tcp # HotLink CIMple REST API +cirrossp 10443/tcp # CirrosSP Workstation Communication +xcompute 11235/tcp # numerical systems messaging +xcompute 11235/sctp # numerical systems messaging +pgpkeyserver 11371/tcp hkp # PGP/GPG public keyserver +pgpkeyserver 11371/udp hkp # PGP/GPG public keyserver +asgcypresstcps 11489/tcp # ASG Cypress Secure Only +h323callsigalt 11720/tcp 323callsigalt # H323 Call Signal Alternate +h323callsigalt 11720/udp 323callsigalt # H323 Call Signal Alternate +tibsd 11971/tcp # TiBS Service +bprd 13720/tcp # BPRD (VERITAS NetBackup) +bprd 13720/udp # BPRD (VERITAS NetBackup) +bpdbm 13721/tcp # BPDBM (VERITAS NetBackup) +bpdbm 13721/udp # BPDBM (VERITAS NetBackup) +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp # BP Java MSVC Protocol +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp # Veritas Network Utility +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp # VERITAS NetBackup +vopied 13783/tcp # VOPIED Protocol +vopied 13783/udp # VOPIED Protocol + +heythings 18516/udp # HeyThings Device communicate service +faircom-db 19790/tcp # FairCom Database +trinket-agent 21212/tcp # Distributed artificial intelligence +cohesity-agent 21213/tcp # Cohesity backup agents + + + +# This port is registered as wnn6, but also used under the unregistered name +# "wnn4" by the FreeWnn package. +wnn6 22273/tcp wnn4 +wnn6 22273/udp wnn4 + +showcockpit-net 22333/tcp # ShowCockpit Networking +showcockpit-net 22333/udp # ShowCockpit Networking +vrmg-ip 24323/tcp # Verimag mobile class protocol over TCP + + +quake 26000/tcp +quake 26000/udp +wnn6-ds 26208/tcp +wnn6-ds 26208/udp +flex-lmadmin 27010/tcp # A protocol for managing license services +mongodb 27017/tcp # Mongo database system +gruber-cashreg 28010/tcp # Gruber cash registry protocol +saltd-licensing 29000/tcp # Siemens Licensing Server +gs-realtime 30400/tcp # GroundStar RealTime System +wg-endpt-comms 33000/tcp # WatchGuard Endpoint Communications + +traceroute 33434/tcp +traceroute 33434/udp + +mtrace 33435/udp # IP Multicast Traceroute + +digilent-adept 33890/tcp # Adept IP protocol +3gpp-w1ap 37472/sctp # W1 signalling transport +ng-control 38412/sctp # NG Control Plane (3GPP) +xn-control 38422/sctp # Xn Control Plane (3GPP) +e1-interface 38462/sctp # E1 signalling transport (3GPP) +f1-control 38472/sctp # F1 Control Plane (3GPP) +hmip-routing 43438/udp # HmIP LAN Routing +acronis-backup 44445/tcp # Acronis Backup Gateway service port +juka 48048/tcp # Juliar Programming Language Protocol +inspider 49150/tcp # InSpider System + + + + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +# +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unregistered/unofficial. Sites +# running v4 should uncomment these and comment out the v5 entries above. +# +kerberos_master 751/udp pump # Kerberos authentication +kerberos_master 751/tcp pump # Kerberos authentication +passwd_server 752/udp qrh # Kerberos passwd server +krbupdate 760/tcp kreg ns # Kerberos registration +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp lot105-ds-upd # Kerberos de-multiplexor + +# +# Kerberos 5 services, also not registered with IANA +# +krb5_prop 754/tcp tell # Kerberos slave propagation +eklogin 2105/tcp minipay # Kerberos encrypted rlogin + +# +# Unregistered but necessary(?) (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp kwdb-commn # SUP debugging + +# +# Unregistered but useful/necessary other services +# +netstat 15/tcp # (was once asssigned, no more) +poppassd 106/tcp # Eudora +poppassd 106/udp # Eudora +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd # online mirror +swat 901/tcp smpnameres # Samba Web Administration Tool +rndc 953/tcp # rndc control sockets (BIND 9) +rndc 953/udp # rndc control sockets (BIND 9) +skkserv 1178/tcp sgi-storman # SKK Japanese input method +xtel 1313/tcp bmc_patroldb bmc-patroldb # french minitel +support 1529/tcp prmsd gnatsd coauthor # GNATS, cygnus bug tracker +cfinger 2003/tcp brutus # GNU Finger +ninstall 2150/tcp dynamic3d # ninstall service +ninstall 2150/udp dynamic3d # ninstall service +afbackup 2988/tcp hippad # Afbackup system +afbackup 2988/udp hippad # Afbackup system +squid 3128/tcp ndl-aas # squid web proxy +prsvp 3455/tcp # RSVP Port +prsvp 3455/udp # RSVP Port +distcc 3632/tcp # distcc +svn 3690/tcp # Subversion +svn 3690/udp # Subversion +postgres 5432/tcp postgresql # POSTGRES +postgres 5432/udp postgresql # POSTGRES +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +sgi-dgl 5232/tcp csedaemon # SGI Distributed Graphics +sgi-dgl 5232/udp +llmnr 5355/tcp hostmon # LLMNR +llmnr 5355/udp hostmon # LLMNR +canna 5680/tcp auriga-router +x11-ssh-offset 6010/tcp # SSH X11 forwarding offset +xfs 7100/tcp font-service # X font server +tircproxy 7666/tcp # Tircproxy +# IANA claims 8008 for http-alt +webcache 8080/tcp http-alt # WWW caching service +webcache 8080/udp http-alt # WWW caching service +tproxy 8081/tcp sunproxyadmin # Transparent Proxy +tproxy 8081/udp sunproxyadmin # Transparent Proxy +jetdirect 9100/tcp laserjet hplj hp-pdl-datastr pdl-datastream +mandelspawn 9359/udp mandelbrot # network mandelbrot +kamanda 10081/tcp famdc # amanda backup services (Kerberos) +kamanda 10081/udp famdc # amanda backup services (Kerberos) +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp # isdn logging system +wnn4_Kr 22305/tcp cis # used by the kWnn package +wnn4_Cn 22289/tcp # used by the cWnn package +wnn4_Tw 22321/tcp # used by the tWnn package +binkp 24554/tcp # Binkley +binkp 24554/udp # Binkley +sdtvwcam 24666/tcp # Service used by SmarDTV to communicate between a CAM and second screen application +canditv 24676/tcp # Canditv Message Service +canditv 24676/udp # Canditv Message Service +asp 27374/tcp # Address Search Protocol +asp 27374/udp # Address Search Protocol +tfido 60177/tcp # Ifmail +tfido 60177/udp # Ifmail +fido 60179/tcp # Ifmail +fido 60179/udp # Ifmail + + +# Updated additional list from IANA with all missing services 10/04/2015 +#spr-itunes 0/tcp spl-itunes # Shirt Pocket netTunes - no port allocated +compressnet 2/tcp # Management Utility +compressnet 2/udp # Management Utility +#compressnet 3/tcp # Compression Process +#compressnet 3/udp # Compression Process +discard 9/sctp # Discard +discard 9/dccp # Discard SC:DISC +ftp-data 20/sctp # FTP +ftp 21/sctp # FTP +ssh 22/sctp # SSH +nsw-fe 27/tcp # NSW User System FE +nsw-fe 27/udp # NSW User System FE +msg-icp 29/tcp # MSG ICP +msg-icp 29/udp # MSG ICP +msg-auth 31/tcp # MSG Authentication +msg-auth 31/udp # MSG Authentication +dsp 33/tcp # Display Support Protocol +dsp 33/udp # Display Support Protocol +graphics 41/tcp # Graphics +graphics 41/udp # Graphics +mpm-flags 44/tcp # MPM FLAGS Protocol +mpm-flags 44/udp # MPM FLAGS Protocol +mpm 45/tcp # Message Processing Module [recv] +mpm 45/udp # Message Processing Module [recv] +mpm-snd 46/tcp # MPM [default send] +mpm-snd 46/udp # MPM [default send] +ni-ftp 47/tcp # NI FTP +ni-ftp 47/udp # NI FTP +auditd 48/tcp # Digital Audit Daemon +auditd 48/udp # Digital Audit Daemon +la-maint 51/tcp # IMP Logical Address Maintenance +la-maint 51/udp # IMP Logical Address Maintenance +xns-time 52/tcp # XNS Time Protocol +xns-time 52/udp # XNS Time Protocol +xns-ch 54/tcp # XNS Clearinghouse +xns-ch 54/udp # XNS Clearinghouse +isi-gl 55/tcp # ISI Graphics Language +isi-gl 55/udp # ISI Graphics Language +xns-auth 56/tcp # XNS Authentication +xns-auth 56/udp # XNS Authentication +xns-mail 58/tcp # XNS Mail +xns-mail 58/udp # XNS Mail +ni-mail 61/tcp # NI MAIL +ni-mail 61/udp # NI MAIL +acas 62/tcp # ACA Services +acas 62/udp # ACA Services +covia 64/tcp # Communications Integrator (CI) +covia 64/udp # Communications Integrator (CI) +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp # TACACS-Database Service +sql*net 66/tcp # Oracle SQL*NET +sql*net 66/udp # Oracle SQL*NET +deos 76/tcp # Distributed External Object Store +deos 76/udp # Distributed External Object Store +vettcp 78/tcp # vettcp +vettcp 78/udp # vettcp +xfer 82/tcp # XFER Utility +xfer 82/udp # XFER Utility +ctf 84/tcp # Common Trace Facility +ctf 84/udp # Common Trace Facility +mfcobol 86/tcp # Micro Focus Cobol +mfcobol 86/udp # Micro Focus Cobol +su-mit-tg 89/tcp # SU/MIT Telnet Gateway +su-mit-tg 89/udp # SU/MIT Telnet Gateway +dnsix 90/tcp # DNSIX Securit Attribute Token Map +dnsix 90/udp # DNSIX Securit Attribute Token Map +mit-dov 91/tcp # MIT Dover Spooler +mit-dov 91/udp # MIT Dover Spooler +#npp 92/tcp # Network Printing Protocol +#npp 92/udp # Network Printing Protocol +dcp 93/tcp # Device Control Protocol +dcp 93/udp # Device Control Protocol +objcall 94/tcp # Tivoli Object Dispatcher +objcall 94/udp # Tivoli Object Dispatcher +dixie 96/tcp # DIXIE Protocol Specification +dixie 96/udp # DIXIE Protocol Specification +swift-rvf 97/tcp # Swift Remote Virtural File Protocol +swift-rvf 97/udp # Swift Remote Virtural File Protocol +tacnews 98/tcp # TAC News +tacnews 98/udp # TAC News +metagram 99/tcp # Metagram Relay +metagram 99/udp # Metagram Relay +newacct 100/tcp # [unauthorized use] +iso-tsap 102/udp # ISO-TSAP Class 0 +gppitnp 103/tcp # Genesis Point-to-Point Trans Net +gppitnp 103/udp # Genesis Point-to-Point Trans Net +acr-nema 104/tcp # ACR-NEMA Digital Imag. & Comm. 300 +acr-nema 104/udp # ACR-NEMA Digital Imag. & Comm. 300 +snagas 108/tcp # SNA Gateway Access Server +snagas 108/udp # SNA Gateway Access Server +mcidas 112/tcp # McIDAS Data Transmission Protocol +mcidas 112/udp # McIDAS Data Transmission Protocol +ansanotify 116/tcp # ANSA REX Notify +ansanotify 116/udp # ANSA REX Notify +sqlserv 118/tcp # SQL Services +sqlserv 118/udp # SQL Services +cfdptkt 120/tcp # CFDPTKT +cfdptkt 120/udp # CFDPTKT +erpc 121/tcp # Encore Expedited Remote Pro.Call +erpc 121/udp # Encore Expedited Remote Pro.Call +smakynet 122/tcp # SMAKYNET +smakynet 122/udp # SMAKYNET +ansatrader 124/tcp # ANSA REX Trader +ansatrader 124/udp # ANSA REX Trader +locus-map 125/tcp # Locus PC-Interface Net Map Ser +locus-map 125/udp # Locus PC-Interface Net Map Ser +nxedit 126/tcp # NXEdit +nxedit 126/udp # NXEdit +locus-con 127/tcp # Locus PC-Interface Conn Server +locus-con 127/udp # Locus PC-Interface Conn Server +gss-xlicen 128/tcp # GSS X License Verification +gss-xlicen 128/udp # GSS X License Verification +pwdgen 129/tcp # Password Generator Protocol +pwdgen 129/udp # Password Generator Protocol +cisco-fna 130/tcp # cisco FNATIVE +cisco-fna 130/udp # cisco FNATIVE +cisco-tna 131/tcp # cisco TNATIVE +cisco-tna 131/udp # cisco TNATIVE +cisco-sys 132/tcp # cisco SYSMAINT +cisco-sys 132/udp # cisco SYSMAINT +statsrv 133/tcp # Statistics Service +statsrv 133/udp # Statistics Service +ingres-net 134/tcp # INGRES-NET Service +ingres-net 134/udp # INGRES-NET Service +epmap 135/tcp # DCE endpoint resolution +epmap 135/udp # DCE endpoint resolution +profile 136/tcp # PROFILE Naming System +profile 136/udp # PROFILE Naming System +emfis-data 140/tcp # EMFIS Data Service +emfis-data 140/udp # EMFIS Data Service +emfis-cntl 141/tcp # EMFIS Control Service +emfis-cntl 141/udp # EMFIS Control Service +bl-idm 142/tcp # Britton-Lee IDM +bl-idm 142/udp # Britton-Lee IDM +uaac 145/tcp # UAAC Protocol +uaac 145/udp # UAAC Protocol +iso-tp0 146/tcp # ISO-IP0 +iso-tp0 146/udp # ISO-IP0 +iso-ip 147/tcp # ISO-IP +iso-ip 147/udp # ISO-IP +jargon 148/tcp # Jargon +jargon 148/udp # Jargon +aed-512 149/tcp # AED 512 Emulation Service +aed-512 149/udp # AED 512 Emulation Service +sql-net 150/tcp # SQL-NET +sql-net 150/udp # SQL-NET +hems 151/tcp # HEMS +hems 151/udp # HEMS +bftp 152/tcp # Background File Transfer Program +bftp 152/udp # Background File Transfer Program +sgmp 153/tcp # SGMP +sgmp 153/udp # SGMP +netsc-prod 154/tcp # NETSC +netsc-prod 154/udp # NETSC +netsc-dev 155/tcp # NETSC +netsc-dev 155/udp # NETSC +sqlsrv 156/tcp # SQL Service +sqlsrv 156/udp # SQL Service +knet-cmp 157/tcp # KNET/VM Command/Message Protocol +knet-cmp 157/udp # KNET/VM Command/Message Protocol +pcmail-srv 158/tcp # PCMail Server +pcmail-srv 158/udp # PCMail Server +nss-routing 159/tcp # NSS-Routing +nss-routing 159/udp # NSS-Routing +sgmp-traps 160/tcp # SGMP-TRAPS +sgmp-traps 160/udp # SGMP-TRAPS +xns-courier 165/tcp # Xerox +xns-courier 165/udp # Xerox +s-net 166/tcp # Sirius Systems +s-net 166/udp # Sirius Systems +namp 167/tcp # NAMP +namp 167/udp # NAMP +rsvd 168/tcp # RSVD +rsvd 168/udp # RSVD +send 169/tcp # SEND +send 169/udp # SEND +print-srv 170/tcp # Network PostScript +print-srv 170/udp # Network PostScript +multiplex 171/tcp # Network Innovations Multiplex +multiplex 171/udp # Network Innovations Multiplex +cl/1 172/tcp cl-1 # Network Innovations CL/1 +cl/1 172/udp cl-1 # Network Innovations CL/1 +xyplex-mux 173/tcp # Xyplex +xyplex-mux 173/udp # Xyplex +vmnet 175/tcp # VMNET +vmnet 175/udp # VMNET +genrad-mux 176/tcp # GENRAD-MUX +genrad-mux 176/udp # GENRAD-MUX +ris 180/tcp # Intergraph +ris 180/udp # Intergraph +unify 181/tcp # Unify +unify 181/udp # Unify +audit 182/tcp # Unisys Audit SITP +audit 182/udp # Unisys Audit SITP +ocbinder 183/tcp # OCBinder +ocbinder 183/udp # OCBinder +ocserver 184/tcp # OCServer +ocserver 184/udp # OCServer +remote-kis 185/tcp # Remote-KIS +remote-kis 185/udp # Remote-KIS +kis 186/tcp # KIS Protocol +kis 186/udp # KIS Protocol +aci 187/tcp # Application Communication Interface +aci 187/udp # Application Communication Interface +mumps 188/tcp # Plus Five's MUMPS +mumps 188/udp # Plus Five's MUMPS +qft 189/tcp # Queued File Transport +qft 189/udp # Queued File Transport +gacp 190/tcp # Gateway Access Control Protocol +gacp 190/udp # Gateway Access Control Protocol +osu-nms 192/tcp # OSU Network Monitoring System +osu-nms 192/udp # OSU Network Monitoring System +srmp 193/tcp # Spider Remote Monitoring Protocol +srmp 193/udp # Spider Remote Monitoring Protocol +dn6-nlm-aud 195/tcp # DNSIX Network Level Module Audit +dn6-nlm-aud 195/udp # DNSIX Network Level Module Audit +dn6-smm-red 196/tcp # DNSIX Session Mgt Module Audit Redir +dn6-smm-red 196/udp # DNSIX Session Mgt Module Audit Redir +dls-mon 198/tcp # Directory Location Service Monitor +dls-mon 198/udp # Directory Location Service Monitor +src 200/tcp # IBM System Resource Controller +src 200/udp # IBM System Resource Controller +at-3 203/tcp # AppleTalk Unused +at-3 203/udp # AppleTalk Unused +at-5 205/tcp # AppleTalk Unused +at-5 205/udp # AppleTalk Unused +at-7 207/tcp # AppleTalk Unused +at-7 207/udp # AppleTalk Unused +at-8 208/tcp # AppleTalk Unused +at-8 208/udp # AppleTalk Unused +914c/g 211/tcp 914c-g # Texas Instruments 914C/G Terminal +914c/g 211/udp 914c-g # Texas Instruments 914C/G Terminal +anet 212/tcp # ATEXSSTR +anet 212/udp # ATEXSSTR +vmpwscs 214/tcp # VM PWSCS +vmpwscs 214/udp # VM PWSCS +softpc 215/tcp # Insignia Solutions +softpc 215/udp # Insignia Solutions +CAIlic 216/tcp # Computer Associates Int'l License Server +CAIlic 216/udp # Computer Associates Int'l License Server +dbase 217/tcp # dBASE Unix +dbase 217/udp # dBASE Unix +mpp 218/tcp # Netix Message Posting Protocol +mpp 218/udp # Netix Message Posting Protocol +uarps 219/tcp # Unisys ARPs +uarps 219/udp # Unisys ARPs +fln-spx 221/tcp # Berkeley rlogind with SPX auth +fln-spx 221/udp # Berkeley rlogind with SPX auth +rsh-spx 222/tcp # Berkeley rshd with SPX auth +rsh-spx 222/udp # Berkeley rshd with SPX auth +cdc 223/tcp # Certificate Distribution Center +cdc 223/udp # Certificate Distribution Center +masqdialer 224/tcp # masqdialer +masqdialer 224/udp # masqdialer +direct 242/tcp # Direct +direct 242/udp # Direct +sur-meas 243/tcp # Survey Measurement +sur-meas 243/udp # Survey Measurement +inbusiness 244/tcp # inbusiness +inbusiness 244/udp # inbusiness +dsp3270 246/tcp # Display Systems Protocol +dsp3270 246/udp # Display Systems Protocol +subntbcst_tftp 247/tcp subntbcst-tftp # SUBNTBCST_TFTP +subntbcst_tftp 247/udp subntbcst-tftp # SUBNTBCST_TFTP +bhfhs 248/tcp # bhfhs +bhfhs 248/udp # bhfhs +set 257/tcp # Secure Electronic Transaction +set 257/udp # Secure Electronic Transaction +esro-gen 259/tcp # Efficient Short Remote Operations +esro-gen 259/udp # Efficient Short Remote Operations +openport 260/tcp # Openport +openport 260/udp # Openport +nsiiops 261/tcp # IIOP Name Service over TLS/SSL +nsiiops 261/udp # IIOP Name Service over TLS/SSL +arcisdms 262/tcp # Arcisdms +arcisdms 262/udp # Arcisdms +hdap 263/tcp # HDAP +hdap 263/udp # HDAP +bgmp 264/tcp # BGMP +bgmp 264/udp # BGMP +x-bone-ctl 265/tcp # X-Bone CTL +x-bone-ctl 265/udp # X-Bone CTL +sst 266/tcp # SCSI on ST +sst 266/udp # SCSI on ST +td-service 267/tcp # Tobit David Service Layer +td-service 267/udp # Tobit David Service Layer +td-replica 268/tcp # Tobit David Replica +td-replica 268/udp # Tobit David Replica +manet 269/tcp # MANET Protocols +manet 269/udp # MANET Protocols [RFC5498] +http-mgmt 280/tcp # http-mgmt +http-mgmt 280/udp # http-mgmt +personal-link 281/tcp # Personal Link +personal-link 281/udp # Personal Link +cableport-ax 282/tcp # Cable Port A/X +cableport-ax 282/udp # Cable Port A/X +rescap 283/tcp # rescap +rescap 283/udp # rescap +corerjd 284/tcp # corerjd +corerjd 284/udp # corerjd +k-block 287/tcp # K-BLOCK +k-block 287/udp # K-BLOCK +novastorbakcup 308/tcp # Novastor Backup +novastorbakcup 308/udp # Novastor Backup +entrusttime 309/tcp # EntrustTime +entrusttime 309/udp # EntrustTime +bhmds 310/tcp # bhmds +bhmds 310/udp # bhmds +asip-webadmin 311/tcp # AppleShare IP WebAdmin +asip-webadmin 311/udp # AppleShare IP WebAdmin +vslmp 312/tcp # VSLMP +vslmp 312/udp # VSLMP +magenta-logic 313/tcp # Magenta Logic +magenta-logic 313/udp # Magenta Logic +opalis-robot 314/tcp # Opalis Robot +opalis-robot 314/udp # Opalis Robot +dpsi 315/tcp # DPSI +dpsi 315/udp # DPSI +decauth 316/tcp # decAuth +decauth 316/udp # decAuth +zannet 317/tcp # Zannet +zannet 317/udp # Zannet +pkix-timestamp 318/tcp # PKIX TimeStamp +pkix-timestamp 318/udp # PKIX TimeStamp +ptp-event 319/tcp # PTP Event +ptp-event 319/udp # PTP Event +ptp-general 320/tcp # PTP General +ptp-general 320/udp # PTP General +rtsps 322/tcp # RTSPS +rtsps 322/udp # RTSPS +rpki-rtr 323/tcp # Resource PKI to Router +rpki-rtr-tls 324/tcp # Resource PKI to Router +texar 333/tcp # Texar Security Port +texar 333/udp # Texar Security Port +pdap 344/tcp # Prospero Data Access Protocol +pdap 344/udp # Prospero Data Access Protocol +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp # Perf Analysis Workbench +zserv 346/tcp # Zebra server +zserv 346/udp # Zebra server +csi-sgwp 348/tcp # Cabletron Management Protocol +csi-sgwp 348/udp # Cabletron Management Protocol +matip-type-a 350/tcp # MATIP Type A +matip-type-a 350/udp # MATIP Type A +matip-type-b 351/tcp bhoetty # MATIP Type B / bhoetty (added 5/21/97) +matip-type-b 351/udp bhoetty # MATIP Type B / bhoetty +dtag-ste-sb 352/tcp bhoedap4 # DTAG (assigned long ago) / bhoedap4 +dtag-ste-sb 352/udp bhoedap4 # DTAG / bhoedap4 +ndsauth 353/tcp # NDSAUTH +ndsauth 353/udp # NDSAUTH +bh611 354/tcp # bh611 +bh611 354/udp # bh611 +datex-asn 355/tcp # DATEX-ASN +datex-asn 355/udp # DATEX-ASN +cloanto-net-1 356/tcp # Cloanto Net 1 +cloanto-net-1 356/udp # Cloanto Net 1 +bhevent 357/tcp # bhevent +bhevent 357/udp # bhevent +shrinkwrap 358/tcp # Shrinkwrap +shrinkwrap 358/udp # Shrinkwrap +nsrmp 359/tcp # Network Security Risk Management Protocol +nsrmp 359/udp # Network Security Risk Management Protocol +scoi2odialog 360/tcp # scoi2odialog +scoi2odialog 360/udp # scoi2odialog +semantix 361/tcp # Semantix +semantix 361/udp # Semantix +srssend 362/tcp # SRS Send +srssend 362/udp # SRS Send +aurora-cmgr 364/tcp # Aurora CMGR +aurora-cmgr 364/udp # Aurora CMGR +dtk 365/tcp # DTK +dtk 365/udp # DTK +mortgageware 367/tcp # MortgageWare +mortgageware 367/udp # MortgageWare +qbikgdp 368/tcp # QbikGDP +qbikgdp 368/udp # QbikGDP +clearcase 371/tcp # Clearcase +clearcase 371/udp # Clearcase +legent-1 373/tcp # Legent Corporation +legent-1 373/udp # Legent Corporation +legent-2 374/tcp # Legent Corporation +legent-2 374/udp # Legent Corporation +hassle 375/tcp # Hassle +hassle 375/udp # Hassle +nip 376/tcp # Amiga Envoy Network Inquiry Proto +nip 376/udp # Amiga Envoy Network Inquiry Proto +tnETOS 377/tcp # NEC Corporation +tnETOS 377/udp # NEC Corporation +dsETOS 378/tcp # NEC Corporation +dsETOS 378/udp # NEC Corporation +is99c 379/tcp # TIA/EIA/IS-99 modem client +is99c 379/udp # TIA/EIA/IS-99 modem client +is99s 380/tcp # TIA/EIA/IS-99 modem server +is99s 380/udp # TIA/EIA/IS-99 modem server +hp-collector 381/tcp # hp performance data collector +hp-collector 381/udp # hp performance data collector +hp-managed-node 382/tcp # hp performance data managed node +hp-managed-node 382/udp # hp performance data managed node +hp-alarm-mgr 383/tcp # hp performance data alarm manager +hp-alarm-mgr 383/udp # hp performance data alarm manager +arns 384/tcp # A Remote Network Server System +arns 384/udp # A Remote Network Server System +ibm-app 385/tcp # IBM Application +ibm-app 385/udp # IBM Application +asa 386/tcp # ASA Message Router Object Def. +asa 386/udp # ASA Message Router Object Def. +aurp 387/tcp # Appletalk Update-Based Routing Pro. +aurp 387/udp # Appletalk Update-Based Routing Pro. +unidata-ldm 388/tcp # Unidata LDM +unidata-ldm 388/udp # Unidata LDM +uis 390/tcp # UIS +uis 390/udp # UIS +synotics-relay 391/tcp # SynOptics SNMP Relay Port +synotics-relay 391/udp # SynOptics SNMP Relay Port +synotics-broker 392/tcp # SynOptics Port Broker Port +synotics-broker 392/udp # SynOptics Port Broker Port +meta5 393/tcp # Meta5 +meta5 393/udp # Meta5 +embl-ndt 394/tcp # EMBL Nucleic Data Transfer +embl-ndt 394/udp # EMBL Nucleic Data Transfer +netcp 395/tcp # NETscout Control Protocol +netcp 395/udp # NETscout Control Protocol +netware-ip 396/tcp # Novell Netware over IP +netware-ip 396/udp # Novell Netware over IP +mptn 397/tcp # Multi Protocol Trans. Net. +mptn 397/udp # Multi Protocol Trans. Net. +kryptolan 398/tcp # Kryptolan +kryptolan 398/udp # Kryptolan +iso-tsap-c2 399/tcp # ISO Transport Class 2 Non-Control over TCP +iso-tsap-c2 399/udp # ISO Transport Class 2 Non-Control over UDP +ups 401/tcp # Uninterruptible Power Supply +ups 401/udp # Uninterruptible Power Supply +genie 402/tcp # Genie Protocol +genie 402/udp # Genie Protocol +decap 403/tcp # decap +decap 403/udp # decap +nced 404/tcp # nced +nced 404/udp # nced +ncld 405/tcp # ncld +ncld 405/udp # ncld +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp # Interactive Mail Support Protocol +timbuktu 407/tcp # Timbuktu +timbuktu 407/udp # Timbuktu +prm-sm 408/tcp # Prospero Resource Manager Sys. Man. +prm-sm 408/udp # Prospero Resource Manager Sys. Man. +prm-nm 409/tcp # Prospero Resource Manager Node Man. +prm-nm 409/udp # Prospero Resource Manager Node Man. +decladebug 410/tcp # DECLadebug Remote Debug Protocol +decladebug 410/udp # DECLadebug Remote Debug Protocol +rmt 411/tcp # Remote MT Protocol +rmt 411/udp # Remote MT Protocol +synoptics-trap 412/tcp # Trap Convention Port +synoptics-trap 412/udp # Trap Convention Port +smsp 413/tcp # Storage Management Services Protocol +smsp 413/udp # Storage Management Services Protocol +infoseek 414/tcp # InfoSeek +infoseek 414/udp # InfoSeek +bnet 415/tcp # BNet +bnet 415/udp # BNet +silverplatter 416/tcp # Silverplatter +silverplatter 416/udp # Silverplatter +onmux 417/tcp # Onmux +onmux 417/udp # Onmux +hyper-g 418/tcp # Hyper-G +hyper-g 418/udp # Hyper-G +ariel1 419/tcp # Ariel 1 +ariel1 419/udp # Ariel 1 +smpte 420/tcp # SMPTE +smpte 420/udp # SMPTE +ariel2 421/tcp # Ariel 2 +ariel2 421/udp # Ariel 2 +ariel3 422/tcp # Ariel 3 +ariel3 422/udp # Ariel 3 +opc-job-start 423/tcp # IBM Operations Planning and Control Start +opc-job-start 423/udp # IBM Operations Planning and Control Start +opc-job-track 424/tcp # IBM Operations Planning and Control Track +opc-job-track 424/udp # IBM Operations Planning and Control Track +icad-el 425/tcp # ICAD +icad-el 425/udp # ICAD +smartsdp 426/tcp # smartsdp +smartsdp 426/udp # smartsdp +ocs_cmu 428/tcp ocs-cmu # OCS_CMU +ocs_cmu 428/udp ocs-cmu # OCS_CMU +ocs_amu 429/tcp ocs-amu # OCS_AMU +ocs_amu 429/udp ocs-amu # OCS_AMU +utmpsd 430/tcp # UTMPSD +utmpsd 430/udp # UTMPSD +utmpcd 431/tcp # UTMPCD +utmpcd 431/udp # UTMPCD +iasd 432/tcp # IASD +iasd 432/udp # IASD +nnsp 433/tcp # NNSP +nnsp 433/udp # NNSP +dna-cml 436/tcp # DNA-CML +dna-cml 436/udp # DNA-CML +comscm 437/tcp # comscm +comscm 437/udp # comscm +dsfgw 438/tcp # dsfgw +dsfgw 438/udp # dsfgw +dasp 439/tcp # dasp Thomas Obermair +dasp 439/udp # dasp tommy&inlab.m.eunet.de +sgcp 440/tcp # sgcp +sgcp 440/udp # sgcp +decvms-sysmgt 441/tcp # decvms-sysmgt +decvms-sysmgt 441/udp # decvms-sysmgt +cvc_hostd 442/tcp cvc-hostd # cvc_hostd +cvc_hostd 442/udp cvc-hostd # cvc_hostd +ddm-rdb 446/tcp # DDM-Remote Relational Database Access +ddm-rdb 446/udp # DDM-Remote Relational Database Access +ddm-dfm 447/tcp # DDM-Distributed File Management +ddm-dfm 447/udp # DDM-Distributed File Management +ddm-ssl 448/tcp # DDM-Remote DB Access Using Secure Sockets +ddm-ssl 448/udp # DDM-Remote DB Access Using Secure Sockets +as-servermap 449/tcp # AS Server Mapper +as-servermap 449/udp # AS Server Mapper +tserver 450/tcp # Computer Supported Telecomunication Applications +tserver 450/udp # Computer Supported Telecomunication Applications +sfs-smp-net 451/tcp # Cray Network Semaphore server +sfs-smp-net 451/udp # Cray Network Semaphore server +sfs-config 452/tcp # Cray SFS config server +sfs-config 452/udp # Cray SFS config server +macon-tcp 456/tcp # macon-tcp +macon-udp 456/udp # macon-udp +scohelp 457/tcp # scohelp +scohelp 457/udp # scohelp +appleqtc 458/tcp # apple quick time +appleqtc 458/udp # apple quick time +ampr-rcmd 459/tcp # ampr-rcmd +ampr-rcmd 459/udp # ampr-rcmd +skronk 460/tcp # skronk +skronk 460/udp # skronk +datasurfsrv 461/tcp # DataRampSrv +datasurfsrv 461/udp # DataRampSrv +datasurfsrvsec 462/tcp # DataRampSrvSec +datasurfsrvsec 462/udp # DataRampSrvSec +alpes 463/tcp # alpes +alpes 463/udp # alpes +urd 465/tcp smtps # URL Rendesvous Directory for SSM / SMTP over SSL (TLS) +igmpv3lite 465/udp # IGMP over UDP for SSM +digital-vrc 466/tcp # digital-vrc +digital-vrc 466/udp # digital-vrc +mylex-mapd 467/tcp # mylex-mapd +mylex-mapd 467/udp # mylex-mapd +rcp 469/tcp # Radio Control Protocol +rcp 469/udp # Radio Control Protocol +scx-proxy 470/tcp # scx-proxy +scx-proxy 470/udp # scx-proxy +mondex 471/tcp # Mondex +mondex 471/udp # Mondex +ljk-login 472/tcp # ljk-login +ljk-login 472/udp # ljk-login +hybrid-pop 473/tcp # hybrid-pop +hybrid-pop 473/udp # hybrid-pop +tn-tl-w1 474/tcp # tn-tl-w1 +tn-tl-w2 474/udp # tn-tl-w2 +tcpnethaspsrv 475/tcp # tcpnethaspsrv +tcpnethaspsrv 475/udp # tcpnethaspsrv +tn-tl-fd1 476/tcp # tn-tl-fd1 +tn-tl-fd1 476/udp # tn-tl-fd1 +ss7ns 477/tcp # ss7ns +ss7ns 477/udp # ss7ns +spsc 478/tcp # spsc +spsc 478/udp # spsc +iafserver 479/tcp # iafserver +iafserver 479/udp # iafserver +iafdbase 480/tcp # iafdbase +iafdbase 480/udp # iafdbase +ph 481/tcp # Ph service +ph 481/udp # Ph service +bgs-nsi 482/tcp # bgs-nsi +bgs-nsi 482/udp # bgs-nsi +ulpnet 483/tcp # ulpnet +ulpnet 483/udp # ulpnet +integra-sme 484/tcp # Integra Software Management Environment +integra-sme 484/udp # Integra Software Management Environment +powerburst 485/tcp # Air Soft Power Burst +powerburst 485/udp # Air Soft Power Burst +avian 486/tcp # avian +avian 486/udp # avian +nest-protocol 489/tcp # nest-protocol +nest-protocol 489/udp # nest-protocol +micom-pfs 490/tcp # micom-pfs +micom-pfs 490/udp # micom-pfs +go-login 491/tcp # go-login +go-login 491/udp # go-login +ticf-1 492/tcp # Transport Independent Convergence for FNA +ticf-1 492/udp # Transport Independent Convergence for FNA +ticf-2 493/tcp # Transport Independent Convergence for FNA +ticf-2 493/udp # Transport Independent Convergence for FNA +pov-ray 494/tcp # POV-Ray +pov-ray 494/udp # POV-Ray +intecourier 495/tcp # intecourier +intecourier 495/udp # intecourier +retrospect 497/tcp # Retrospect backup +retrospect 497/udp # Retrospect backup +siam 498/tcp # siam +siam 498/udp # siam +iso-ill 499/tcp # ISO ILL Protocol +iso-ill 499/udp # ISO ILL Protocol +stmf 501/tcp # STMF +stmf 501/udp # STMF +mbap 502/tcp # Modbus Application Protocol +mbap 502/udp # Modbus Application Protocol +intrinsa 503/tcp # Intrinsa +intrinsa 503/udp # Intrinsa +citadel 504/tcp # citadel +citadel 504/udp # citadel +mailbox-lm 505/tcp # mailbox-lm +mailbox-lm 505/udp # mailbox-lm +ohimsrv 506/tcp # ohimsrv +ohimsrv 506/udp # ohimsrv +crs 507/tcp # crs +crs 507/udp # crs +xvttp 508/tcp # xvttp +xvttp 508/udp # xvttp +snare 509/tcp # snare +snare 509/udp # snare +fcp 510/tcp # FirstClass Protocol +fcp 510/udp # FirstClass Protocol +passgo 511/tcp # PassGo +passgo 511/udp # PassGo +videotex 516/tcp # videotex +videotex 516/udp # videotex +talk 517/tcp # like tenex link, but across +ntalk 518/tcp # +ulp 522/tcp # ULP +ulp 522/udp # ULP +ibm-db2 523/tcp # IBM-DB2 +ibm-db2 523/udp # IBM-DB2 +ncp 524/tcp # NCP +ncp 524/udp # NCP +tempo 526/udp # newdate +stx 527/tcp # Stock IXChange +stx 527/udp # Stock IXChange +custix 528/tcp # Customer IXChange +custix 528/udp # Customer IXChange +irc-serv 529/tcp # IRC-SERV +irc-serv 529/udp # IRC-SERV +courier 530/udp # rpc +conference 531/udp # chat +netnews 532/udp # readnews +netwall 533/tcp # for emergency broadcasts +windream 534/tcp # windream Admin +windream 534/udp # windream Admin +opalis-rdv 536/tcp # opalis-rdv +opalis-rdv 536/udp # opalis-rdv +apertus-ldp 539/tcp # Apertus Technologies Load Determination +apertus-ldp 539/udp # Apertus Technologies Load Determination +uucp 540/udp # uucpd +uucp-rlogin 541/tcp # uucp-rlogin +uucp-rlogin 541/udp # uucp-rlogin +commerce 542/tcp # commerce +commerce 542/udp # commerce +klogin 543/udp # +kshell 544/udp # krcmd +appleqtcsrvr 545/tcp # appleqtcsrvr +appleqtcsrvr 545/udp # appleqtcsrvr +idfp 549/tcp # IDFP +idfp 549/udp # IDFP +new-rwho 550/tcp # new-who +new-rwho 550/udp # new-who +cybercash 551/tcp # cybercash +cybercash 551/udp # cybercash +devshr-nts 552/tcp # DeviceShare +devshr-nts 552/udp # DeviceShare +pirp 553/tcp # pirp +pirp 553/udp # pirp +dsf 555/tcp # +dsf 555/udp # +remotefs 556/udp # rfs server +openvms-sysipc 557/tcp # openvms-sysipc +openvms-sysipc 557/udp # openvms-sysipc +sdnskmp 558/tcp # SDNSKMP +sdnskmp 558/udp # SDNSKMP +teedtap 559/tcp # TEEDTAP +teedtap 559/udp # TEEDTAP +rmonitor 560/tcp # rmonitord +rmonitor 560/udp # rmonitord +monitor 561/tcp # +monitor 561/udp # +chshell 562/tcp # chcmd +chshell 562/udp # chcmd +9pfs 564/tcp # plan 9 file service +9pfs 564/udp # plan 9 file service +streettalk 566/tcp # streettalk +streettalk 566/udp # streettalk +banyan-rpc 567/tcp # banyan-rpc +banyan-rpc 567/udp # banyan-rpc +ms-shuttle 568/tcp # microsoft shuttle +ms-shuttle 568/udp # microsoft shuttle +ms-rome 569/tcp # microsoft rome +ms-rome 569/udp # microsoft rome +#meter 570/tcp # demon +#meter 570/udp # demon +#meter 571/tcp # udemon +#meter 571/udp # udemon +sonar 572/tcp # sonar +sonar 572/udp # sonar +banyan-vip 573/tcp # banyan-vip +banyan-vip 573/udp # banyan-vip +ftp-agent 574/tcp # FTP Software Agent System +ftp-agent 574/udp # FTP Software Agent System +vemmi 575/tcp # VEMMI +vemmi 575/udp # VEMMI +ipcd 576/tcp # ipcd +ipcd 576/udp # ipcd +vnas 577/tcp # vnas +vnas 577/udp # vnas +ipdd 578/tcp # ipdd +ipdd 578/udp # ipdd +decbsrv 579/tcp # decbsrv +decbsrv 579/udp # decbsrv +sntp-heartbeat 580/tcp # SNTP HEARTBEAT +sntp-heartbeat 580/udp # SNTP HEARTBEAT +bdp 581/tcp # Bundle Discovery Protocol +bdp 581/udp # Bundle Discovery Protocol +scc-security 582/tcp # SCC Security +scc-security 582/udp # SCC Security +philips-vc 583/tcp # Philips Video-Conferencing +philips-vc 583/udp # Philips Video-Conferencing +keyserver 584/tcp # Key Server +keyserver 584/udp # Key Server +password-chg 586/tcp # Password Change +password-chg 586/udp # Password Change +cal 588/tcp # CAL +cal 588/udp # CAL +eyelink 589/tcp # EyeLink +eyelink 589/udp # EyeLink +tns-cml 590/tcp # TNS CML +tns-cml 590/udp # TNS CML +eudora-set 592/tcp # Eudora Set +eudora-set 592/udp # Eudora Set +http-rpc-epmap 593/tcp # HTTP RPC Ep Map +http-rpc-epmap 593/udp # HTTP RPC Ep Map +tpip 594/tcp # TPIP +tpip 594/udp # TPIP +cab-protocol 595/tcp # CAB Protocol +cab-protocol 595/udp # CAB Protocol +smsd 596/tcp # SMSD +smsd 596/udp # SMSD +ptcnameservice 597/tcp # PTC Name Service +ptcnameservice 597/udp # PTC Name Service +sco-websrvrmg3 598/tcp # SCO Web Server Manager 3 +sco-websrvrmg3 598/udp # SCO Web Server Manager 3 +acp 599/tcp # Aeolon Core Protocol +acp 599/udp # Aeolon Core Protocol +ipcserver 600/tcp # Sun IPC server +ipcserver 600/udp # Sun IPC server +syslog-conn 601/tcp # Reliable Syslog Service +syslog-conn 601/udp # Reliable Syslog Service +xmlrpc-beep 602/tcp # XML-RPC over BEEP +xmlrpc-beep 602/udp # XML-RPC over BEEP +idxp 603/tcp # IDXP +idxp 603/udp # IDXP +tunnel 604/tcp # TUNNEL +tunnel 604/udp # TUNNEL +soap-beep 605/tcp # SOAP over BEEP +soap-beep 605/udp # SOAP over BEEP +urm 606/tcp # Cray Unified Resource Manager +urm 606/udp # Cray Unified Resource Manager +nqs 607/tcp # nqs +nqs 607/udp # nqs +sift-uft 608/tcp # Sender-Initiated/Unsolicited File Transfer +sift-uft 608/udp # Sender-Initiated/Unsolicited File Transfer +npmp-trap 609/tcp # npmp-trap +npmp-trap 609/udp # npmp-trap +hmmp-op 613/tcp # HMMP Operation +hmmp-op 613/udp # HMMP Operation +sshell 614/tcp # SSLshell +sshell 614/udp # SSLshell +sco-inetmgr 615/tcp # Internet Configuration Manager +sco-inetmgr 615/udp # Internet Configuration Manager +sco-sysmgr 616/tcp gii # SCO System Administration Server +sco-sysmgr 616/udp # SCO System Administration Server +sco-dtmgr 617/tcp # SCO Desktop Administration Server +sco-dtmgr 617/udp # SCO Desktop Administration Server +dei-icda 618/tcp # DEI-ICDA +dei-icda 618/udp # DEI-ICDA +compaq-evm 619/tcp # Compaq EVM +compaq-evm 619/udp # Compaq EVM +sco-websrvrmgr 620/tcp # SCO WebServer Manager +sco-websrvrmgr 620/udp # SCO WebServer Manager +escp-ip 621/tcp # ESCP +escp-ip 621/udp # ESCP +collaborator 622/tcp # Collaborator +collaborator 622/udp # Collaborator +oob-ws-http 623/tcp # DMTF out-of-band web services management protocol +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +cryptoadmin 624/tcp # Crypto Admin +cryptoadmin 624/udp # Crypto Admin +dec_dlm 625/tcp dec-dlm # DEC DLM +dec_dlm 625/udp dec-dlm # DEC DLM +asia 626/tcp # ASIA +asia 626/udp # ASIA +passgo-tivoli 627/tcp # PassGo Tivoli +passgo-tivoli 627/udp # PassGo Tivoli +qmqp 628/tcp # QMQP +qmqp 628/udp # QMQP +3com-amp3 629/tcp # 3Com AMP3 +3com-amp3 629/udp # 3Com AMP3 +rda 630/tcp # RDA +rda 630/udp # RDA +bmpp 632/tcp # bmpp +bmpp 632/udp # bmpp +servstat 633/tcp # Service Status update (Sterling Software) +servstat 633/udp # Service Status update (Sterling Software) +ginad 634/tcp # ginad +ginad 634/udp # ginad +rlzdbase 635/tcp # RLZ DBase +rlzdbase 635/udp # RLZ DBase +lanserver 637/tcp # lanserver +lanserver 637/udp # lanserver +mcns-sec 638/tcp # mcns-sec +mcns-sec 638/udp # mcns-sec +msdp 639/tcp # MSDP +msdp 639/udp # MSDP +entrust-sps 640/tcp # entrust-sps +entrust-sps 640/udp # entrust-sps +repcmd 641/tcp # repcmd +repcmd 641/udp # repcmd +esro-emsdp 642/tcp # ESRO-EMSDP V1.3 +esro-emsdp 642/udp # ESRO-EMSDP V1.3 +sanity 643/tcp # SANity +sanity 643/udp # SANity +dwr 644/tcp # dwr +dwr 644/udp # dwr +pssc 645/tcp # PSSC +pssc 645/udp # PSSC +ldp 646/tcp # LDP +ldp 646/udp # LDP +dhcp-failover 647/tcp # DHCP Failover +dhcp-failover 647/udp # DHCP Failover +rrp 648/tcp # Registry Registrar Protocol (RRP) +rrp 648/udp # Registry Registrar Protocol (RRP) +cadview-3d 649/tcp # Cadview-3d - streaming 3d models over the internet +cadview-3d 649/udp # Cadview-3d - streaming 3d models over the internet +obex 650/tcp # OBEX +obex 650/udp # OBEX +ieee-mms 651/tcp # IEEE MMS +ieee-mms 651/udp # IEEE MMS +hello-port 652/tcp # HELLO_PORT +hello-port 652/udp # HELLO_PORT +repscmd 653/tcp # RepCmd +repscmd 653/udp # RepCmd +aodv 654/tcp # AODV +aodv 654/udp # AODV +tinc 655/tcp # TINC +tinc 655/udp # TINC +spmp 656/tcp # SPMP +spmp 656/udp # SPMP +rmc 657/tcp # RMC +rmc 657/udp # RMC +tenfold 658/tcp # TenFold +tenfold 658/udp # TenFold +mac-srvr-admin 660/tcp # MacOS Server Admin +mac-srvr-admin 660/udp # MacOS Server Admin +hap 661/tcp # HAP +hap 661/udp # HAP +pftp 662/tcp # PFTP +pftp 662/udp # PFTP +purenoise 663/tcp # PureNoise +purenoise 663/udp # PureNoise +oob-ws-https 664/tcp # DMTF out-of-band secure web services management protocol +asf-secure-rmcp 664/udp # ASF Secure Remote Management and Control Protocol +sun-dr 665/tcp # Sun DR +sun-dr 665/udp # Sun DR +mdqs 666/tcp doom # doom Id Software +mdqs 666/udp doom # doom Id Software +disclose 667/tcp # campaign contribution disclosures - SDR Technologies +disclose 667/udp # campaign contribution disclosures - SDR Technologies +mecomm 668/tcp # MeComm +mecomm 668/udp # MeComm +meregister 669/tcp # MeRegister +meregister 669/udp # MeRegister +vacdsm-sws 670/tcp # VACDSM-SWS +vacdsm-sws 670/udp # VACDSM-SWS +vacdsm-app 671/tcp # VACDSM-APP +vacdsm-app 671/udp # VACDSM-APP +vpps-qua 672/tcp # VPPS-QUA +vpps-qua 672/udp # VPPS-QUA +cimplex 673/tcp # CIMPLEX +cimplex 673/udp # CIMPLEX +dctp 675/tcp # DCTP +dctp 675/udp # DCTP +vpps-via 676/tcp # VPPS Via +vpps-via 676/udp # VPPS Via +vpp 677/tcp # Virtual Presence Protocol +vpp 677/udp # Virtual Presence Protocol +ggf-ncp 678/tcp # GNU Generation Foundation NCP +ggf-ncp 678/udp # GNU Generation Foundation NCP +mrm 679/tcp # MRM +mrm 679/udp # MRM +entrust-aaas 680/tcp # entrust-aaas +entrust-aaas 680/udp # entrust-aaas +entrust-aams 681/tcp # entrust-aams +entrust-aams 681/udp # entrust-aams +xfr 682/tcp # XFR +xfr 682/udp # XFR +corba-iiop 683/tcp # CORBA IIOP +corba-iiop 683/udp # CORBA IIOP +corba-iiop-ssl 684/tcp # CORBA IIOP SSL +corba-iiop-ssl 684/udp # CORBA IIOP SSL +mdc-portmapper 685/tcp # MDC Port Mapper +mdc-portmapper 685/udp # MDC Port Mapper +hcp-wismar 686/tcp # Hardware Control Protocol Wismar +hcp-wismar 686/udp # Hardware Control Protocol Wismar +asipregistry 687/tcp # asipregistry +asipregistry 687/udp # asipregistry +realm-rusd 688/tcp # ApplianceWare managment protocol +realm-rusd 688/udp # ApplianceWare managment protocol +nmap 689/tcp # NMAP +nmap 689/udp # NMAP +vatp 690/tcp # Velneo Application Transfer Protocol +vatp 690/udp # Velneo Application Transfer Protocol +msexch-routing 691/tcp # MS Exchange Routing +msexch-routing 691/udp # MS Exchange Routing +hyperwave-isp 692/tcp # Hyperwave-ISP +hyperwave-isp 692/udp # Hyperwave-ISP +connendp 693/tcp # almanid Connection Endpoint +connendp 693/udp # almanid Connection Endpoint +ieee-mms-ssl 695/tcp # IEEE-MMS-SSL +ieee-mms-ssl 695/udp # IEEE-MMS-SSL +rushd 696/tcp # RUSHD +rushd 696/udp # RUSHD +uuidgen 697/tcp # UUIDGEN +uuidgen 697/udp # UUIDGEN +olsr 698/tcp # OLSR +olsr 698/udp # OLSR +accessnetwork 699/tcp # Access Network +accessnetwork 699/udp # Access Network +#epp 700/tcp # Extensible Provisioning Protocol +#epp 700/udp # Extensible Provisioning Protocol +lmp 701/tcp # Link Management Protocol (LMP) +lmp 701/udp # Link Management Protocol (LMP) +iris-beep 702/tcp # IRIS over BEEP +iris-beep 702/udp # IRIS over BEEP +elcsd 704/tcp # errlog copy/server daemon +elcsd 704/udp # errlog copy/server daemon +agentx 705/tcp # AgentX +agentx 705/udp # AgentX +silc 706/tcp # SILC +silc 706/udp # SILC +borland-dsj 707/tcp # Borland DSJ +borland-dsj 707/udp # Borland DSJ +entrust-kmsh 709/tcp # Entrust Key Management Service Handler +entrust-kmsh 709/udp # Entrust Key Management Service Handler +entrust-ash 710/tcp # Entrust Administration Service Handler +entrust-ash 710/udp # Entrust Administration Service Handler +cisco-tdp 711/tcp # Cisco TDP +cisco-tdp 711/udp # Cisco TDP +tbrpf 712/tcp # TBRPF +tbrpf 712/udp # TBRPF +iris-xpc 713/tcp # IRIS over XPC +iris-xpc 713/udp # IRIS over XPC +iris-xpcs 714/tcp # IRIS over XPCS +iris-xpcs 714/udp # IRIS over XPCS +iris-lwz 715/tcp # IRIS-LWZ +iris-lwz 715/udp # IRIS-LWZ +pana 716/udp # PANA Messages +netviewdm1 729/tcp # IBM NetView DM/6000 Server/Client +netviewdm1 729/udp # IBM NetView DM/6000 Server/Client +netviewdm2 730/tcp # IBM NetView DM/6000 send/tcp +netviewdm2 730/udp # IBM NetView DM/6000 send/tcp +netviewdm3 731/tcp # IBM NetView DM/6000 receive/tcp +netviewdm3 731/udp # IBM NetView DM/6000 receive/tcp +netgw 741/tcp # netGW +netgw 741/udp # netGW +netrcs 742/tcp # Network based Rev. Cont. Sys. +netrcs 742/udp # Network based Rev. Cont. Sys. +flexlm 744/tcp # Flexible License Manager +flexlm 744/udp # Flexible License Manager +fujitsu-dev 747/tcp # Fujitsu Device Control +fujitsu-dev 747/udp # Fujitsu Device Control +ris-cm 748/tcp # Russell Info Sci Calendar Manager +ris-cm 748/udp # Russell Info Sci Calendar Manager +qrh 752/tcp # +rrh 753/tcp # +rrh 753/udp # +tell 754/udp # send +nlogin 758/tcp # +nlogin 758/udp # +con 759/tcp # +con 759/udp # +ns 760/udp # +rxe 761/tcp # +rxe 761/udp # +quotad 762/tcp # +quotad 762/udp # +cycleserv 763/tcp # +cycleserv 763/udp # +omserv 764/tcp # +omserv 764/udp # +vid 769/tcp # +vid 769/udp # +cadlock 770/tcp # +cadlock 770/udp # +rtip 771/tcp # +rtip 771/udp # +cycleserv2 772/tcp # +cycleserv2 772/udp # +submit 773/tcp # +notify 773/udp # +rpasswd 774/tcp # +acmaint_dbd 774/udp acmaint-dbd # +entomb 775/tcp # +acmaint_transd 775/udp acmaint-transd # +wpages 776/tcp # +wpages 776/udp # +multiling-http 777/tcp # Multiling HTTP +multiling-http 777/udp # Multiling HTTP +wpgs 780/tcp # +wpgs 780/udp # +mdbs_daemon 800/tcp mdbs-daemon # +mdbs_daemon 800/udp mdbs-daemon # +device 801/tcp # +device 801/udp # +mbap-s 802/tcp # Modbus Application Protocol Secure +mbap-s 802/udp # Modbus Application Protocol Secure +fcp-udp 810/tcp # FCP +fcp-udp 810/udp # FCP Datagram +itm-mcell-s 828/tcp # itm-mcell-s +itm-mcell-s 828/udp # itm-mcell-s +pkix-3-ca-ra 829/tcp # PKIX-3 CA/RA +pkix-3-ca-ra 829/udp # PKIX-3 CA/RA +netconf-ssh 830/tcp # NETCONF over SSH +netconf-ssh 830/udp # NETCONF over SSH +netconf-beep 831/tcp # NETCONF over BEEP +netconf-beep 831/udp # NETCONF over BEEP +netconfsoaphttp 832/tcp # NETCONF for SOAP over HTTPS +netconfsoaphttp 832/udp # NETCONF for SOAP over HTTPS +netconfsoapbeep 833/tcp # NETCONF for SOAP over BEEP +netconfsoapbeep 833/udp # NETCONF for SOAP over BEEP +dhcp-failover2 847/tcp # dhcp-failover 2 +dhcp-failover2 847/udp # dhcp-failover 2 +gdoi 848/tcp # GDOI +gdoi 848/udp # GDOI +domain-s 853/tcp # DNS query-response protocol +domain-s 853/udp # DNS query-response protocol +iscsi 860/tcp # iSCSI +iscsi 860/udp # iSCSI +owamp-control 861/tcp # OWAMP-Control +owamp-control 861/udp # OWAMP-Control +twamp-control 862/tcp # Two-way Active Measurement Protocol (TWAMP) Control +twamp-control 862/udp # Two-way Active Measurement Protocol (TWAMP) Control +iclcnet-locate 886/tcp # ICL coNETion locate server +iclcnet-locate 886/udp # ICL coNETion locate server +iclcnet_svinfo 887/tcp iclcnet-svinfo # ICL coNETion server info +iclcnet_svinfo 887/udp iclcnet-svinfo # ICL coNETion server info +#accessbuilder 888/tcp # AccessBuilder +#accessbuilder 888/udp # AccessBuilder +cddbp 888/tcp # CD Database Protocol +omginitialrefs 900/tcp # OMG Initial Refs +omginitialrefs 900/udp # OMG Initial Refs +smpnameres 901/udp # SMPNAMERES +ideafarm-door 902/tcp # self documenting Telnet Door +ideafarm-door 902/udp # self documenting Door: send 0x00 for info +ideafarm-panic 903/tcp # self documenting Telnet Panic Door +ideafarm-panic 903/udp # self documenting Panic Door: send 0x00 for info +kink 910/tcp # Kerberized Internet Negotiation of Keys (KINK) +kink 910/udp # Kerberized Internet Negotiation of Keys (KINK) +xact-backup 911/tcp # xact-backup +xact-backup 911/udp # xact-backup +apex-mesh 912/tcp # APEX relay-relay service +apex-mesh 912/udp # APEX relay-relay service +apex-edge 913/tcp # APEX endpoint-relay service +apex-edge 913/udp # APEX endpoint-relay service +ftps-data 989/tcp # ftp protocol, data, over TLS/SSL +ftps-data 989/udp # ftp protocol, data, over TLS/SSL +ftps 990/tcp # ftp protocol, control, over TLS/SSL +ftps 990/udp # ftp protocol, control, over TLS/SSL +nas 991/tcp # Netnews Administration System +nas 991/udp # Netnews Administration System +vsinet 996/tcp # vsinet +vsinet 996/udp # vsinet +maitrd 997/tcp # +maitrd 997/udp # +busboy 998/tcp # +puparp 998/udp # +garcon 999/tcp # +applix 999/udp # Applix ac +#puprouter 999/tcp # +#puprouter 999/udp # +cadlock2 1000/tcp # +cadlock2 1000/udp # +surf 1010/tcp # surf +surf 1010/udp # surf +exp1 1021/tcp # RFC3692-style Experiment 1 (*) [RFC4727] +exp1 1021/udp # RFC3692-style Experiment 1 (*) [RFC4727] +exp1 1021/sctp # RFC3692-style Experiment 1 (*) [RFC4727] +exp1 1021/dccp # RFC3692-style Experiment 1 (*) [RFC4727] +exp2 1022/tcp # RFC3692-style Experiment 2 (*) [RFC4727] +exp2 1022/udp # RFC3692-style Experiment 2 (*) [RFC4727] +exp2 1022/sctp # RFC3692-style Experiment 2 (*) [RFC4727] +exp2 1022/dccp # RFC3692-style Experiment 2 (*) [RFC4727] +blackjack 1025/tcp # network blackjack +blackjack 1025/udp # network blackjack +cap 1026/tcp # Calendar Access Protocol +cap 1026/udp # Calendar Access Protocol +6a44 1027/udp # IPv6 Behind NAT44 CPEs +solid-mux 1029/tcp # Solid Mux Server +solid-mux 1029/udp # Solid Mux Server +netinfo-local 1033/tcp # local netinfo port +netinfo-local 1033/udp # local netinfo port +activesync 1034/tcp # ActiveSync Notifications +activesync 1034/udp # ActiveSync Notifications +mxxrlogin 1035/tcp # MX-XR RPC +mxxrlogin 1035/udp # MX-XR RPC +nsstp 1036/tcp # Nebula Secure Segment Transfer Protocol +nsstp 1036/udp # Nebula Secure Segment Transfer Protocol +ams 1037/tcp # AMS +ams 1037/udp # AMS +mtqp 1038/tcp # Message Tracking Query Protocol +mtqp 1038/udp # Message Tracking Query Protocol +sbl 1039/tcp # Streamlined Blackhole +sbl 1039/udp # Streamlined Blackhole +netarx 1040/tcp # Netarx Netcare +netarx 1040/udp # Netarx Netcare +danf-ak2 1041/tcp # AK2 Product +danf-ak2 1041/udp # AK2 Product +afrog 1042/tcp # Subnet Roaming +afrog 1042/udp # Subnet Roaming +boinc-client 1043/tcp # BOINC Client Control +boinc-client 1043/udp # BOINC Client Control +dcutility 1044/tcp # Dev Consortium Utility +dcutility 1044/udp # Dev Consortium Utility +fpitp 1045/tcp # Fingerprint Image Transfer Protocol +fpitp 1045/udp # Fingerprint Image Transfer Protocol +wfremotertm 1046/tcp # WebFilter Remote Monitor +wfremotertm 1046/udp # WebFilter Remote Monitor +neod1 1047/tcp # Sun's NEO Object Request Broker +neod1 1047/udp # Sun's NEO Object Request Broker +neod2 1048/tcp # Sun's NEO Object Request Broker +neod2 1048/udp # Sun's NEO Object Request Broker +td-postman 1049/tcp # Tobit David Postman VPMN +td-postman 1049/udp # Tobit David Postman VPMN +cma 1050/tcp # CORBA Management Agent +cma 1050/udp # CORBA Management Agent +optima-vnet 1051/tcp # Optima VNET +optima-vnet 1051/udp # Optima VNET +ddt 1052/tcp # Dynamic DNS Tools +ddt 1052/udp # Dynamic DNS Tools +remote-as 1053/tcp # Remote Assistant (RA) +remote-as 1053/udp # Remote Assistant (RA) +brvread 1054/tcp # BRVREAD +brvread 1054/udp # BRVREAD +ansyslmd 1055/tcp # ANSYS - License Manager +ansyslmd 1055/udp # ANSYS - License Manager +vfo 1056/tcp # VFO +vfo 1056/udp # VFO +startron 1057/tcp # STARTRON +startron 1057/udp # STARTRON +nim 1058/tcp # nim +nim 1058/udp # nim +nimreg 1059/tcp # nimreg +nimreg 1059/udp # nimreg +polestar 1060/tcp # POLESTAR +polestar 1060/udp # POLESTAR +kiosk 1061/tcp # KIOSK +kiosk 1061/udp # KIOSK +veracity 1062/tcp # Veracity +veracity 1062/udp # Veracity +kyoceranetdev 1063/tcp # KyoceraNetDev +kyoceranetdev 1063/udp # KyoceraNetDev +jstel 1064/tcp # JSTEL +jstel 1064/udp # JSTEL +syscomlan 1065/tcp # SYSCOMLAN +syscomlan 1065/udp # SYSCOMLAN +fpo-fns 1066/tcp # FPO-FNS +fpo-fns 1066/udp # FPO-FNS +instl_boots 1067/tcp instl-boots # Installation Bootstrap Proto. Serv. +instl_boots 1067/udp instl-boots # Installation Bootstrap Proto. Serv. +instl_bootc 1068/tcp instl-bootc # Installation Bootstrap Proto. Cli. +instl_bootc 1068/udp instl-bootc # Installation Bootstrap Proto. Cli. +cognex-insight 1069/tcp # COGNEX-INSIGHT +cognex-insight 1069/udp # COGNEX-INSIGHT +gmrupdateserv 1070/tcp # GMRUpdateSERV +gmrupdateserv 1070/udp # GMRUpdateSERV +bsquare-voip 1071/tcp # BSQUARE-VOIP +bsquare-voip 1071/udp # BSQUARE-VOIP +cardax 1072/tcp # CARDAX +cardax 1072/udp # CARDAX +bridgecontrol 1073/tcp # Bridge Control +bridgecontrol 1073/udp # Bridge Control +warmspotMgmt 1074/tcp # Warmspot Management Protocol +warmspotMgmt 1074/udp # Warmspot Management Protocol +rdrmshc 1075/tcp # RDRMSHC +rdrmshc 1075/udp # RDRMSHC +dab-sti-c 1076/tcp # DAB STI-C +dab-sti-c 1076/udp # DAB STI-C +imgames 1077/tcp # IMGames +imgames 1077/udp # IMGames +avocent-proxy 1078/tcp # Avocent Proxy Protocol +avocent-proxy 1078/udp # Avocent Proxy Protocol +asprovatalk 1079/tcp # ASPROVATalk +asprovatalk 1079/udp # ASPROVATalk +pvuniwien 1081/tcp # PVUNIWIEN +pvuniwien 1081/udp # PVUNIWIEN +amt-esd-prot 1082/tcp # AMT-ESD-PROT +amt-esd-prot 1082/udp # AMT-ESD-PROT +ansoft-lm-1 1083/tcp # Anasoft License Manager +ansoft-lm-1 1083/udp # Anasoft License Manager +ansoft-lm-2 1084/tcp # Anasoft License Manager +ansoft-lm-2 1084/udp # Anasoft License Manager +webobjects 1085/tcp # Web Objects +webobjects 1085/udp # Web Objects +cplscrambler-lg 1086/tcp # CPL Scrambler Logging +cplscrambler-lg 1086/udp # CPL Scrambler Logging +cplscrambler-in 1087/tcp # CPL Scrambler Internal +cplscrambler-in 1087/udp # CPL Scrambler Internal +cplscrambler-al 1088/tcp # CPL Scrambler Alarm Log +cplscrambler-al 1088/udp # CPL Scrambler Alarm Log +ff-annunc 1089/tcp # FF Annunciation +ff-annunc 1089/udp # FF Annunciation +ff-fms 1090/tcp # FF Fieldbus Message Specification +ff-fms 1090/udp # FF Fieldbus Message Specification +ff-sm 1091/tcp # FF System Management +ff-sm 1091/udp # FF System Management +obrpd 1092/tcp # Open Business Reporting Protocol +obrpd 1092/udp # Open Business Reporting Protocol +proofd 1093/tcp # PROOFD +proofd 1093/udp # PROOFD +rootd 1094/tcp # ROOTD +rootd 1094/udp # ROOTD +nicelink 1095/tcp # NICELink +nicelink 1095/udp # NICELink +cnrprotocol 1096/tcp # Common Name Resolution Protocol +cnrprotocol 1096/udp # Common Name Resolution Protocol +sunclustermgr 1097/tcp # Sun Cluster Manager +sunclustermgr 1097/udp # Sun Cluster Manager +rmiactivation 1098/tcp # RMI Activation +rmiactivation 1098/udp # RMI Activation +rmiregistry 1099/tcp # RMI Registry +rmiregistry 1099/udp # RMI Registry +mctp 1100/tcp # MCTP +mctp 1100/udp # MCTP +pt2-discover 1101/tcp # PT2-DISCOVER +pt2-discover 1101/udp # PT2-DISCOVER +adobeserver-1 1102/tcp # ADOBE SERVER 1 +adobeserver-1 1102/udp # ADOBE SERVER 1 +adobeserver-2 1103/tcp # ADOBE SERVER 2 +adobeserver-2 1103/udp # ADOBE SERVER 2 +xrl 1104/tcp # XRL +xrl 1104/udp # XRL +ftranhc 1105/tcp # FTRANHC +ftranhc 1105/udp # FTRANHC +isoipsigport-1 1106/tcp # ISOIPSIGPORT-1 +isoipsigport-1 1106/udp # ISOIPSIGPORT-1 +isoipsigport-2 1107/tcp # ISOIPSIGPORT-2 +isoipsigport-2 1107/udp # ISOIPSIGPORT-2 +ratio-adp 1108/tcp # ratio-adp +ratio-adp 1108/udp # ratio-adp +webadmstart 1110/tcp # Start web admin server +nfsd-keepalive 1110/udp # Client status info +lmsocialserver 1111/tcp # LM Social Server +lmsocialserver 1111/udp # LM Social Server +icp 1112/tcp # Intelligent Communication Protocol +icp 1112/udp # Intelligent Communication Protocol +ltp-deepspace 1113/tcp # Licklider Transmission Protocol +ltp-deepspace 1113/udp # Licklider Transmission Protocol +ltp-deepspace 1113/dccp # Licklider Transmission Protocol +mini-sql 1114/tcp # Mini SQL +mini-sql 1114/udp # Mini SQL +ardus-trns 1115/tcp # ARDUS Transfer +ardus-trns 1115/udp # ARDUS Transfer +ardus-cntl 1116/tcp # ARDUS Control +ardus-cntl 1116/udp # ARDUS Control +ardus-mtrns 1117/tcp # ARDUS Multicast Transfer +ardus-mtrns 1117/udp # ARDUS Multicast Transfer +sacred 1118/tcp # SACRED +sacred 1118/udp # SACRED +bnetgame 1119/tcp # Battle.net Chat/Game Protocol +bnetgame 1119/udp # Battle.net Chat/Game Protocol +bnetfile 1120/tcp # Battle.net File Transfer Protocol +bnetfile 1120/udp # Battle.net File Transfer Protocol +rmpp 1121/tcp # Datalode RMPP +rmpp 1121/udp # Datalode RMPP +availant-mgr 1122/tcp # availant-mgr +availant-mgr 1122/udp # availant-mgr +murray 1123/tcp # Murray +murray 1123/udp # Murray +hpvmmcontrol 1124/tcp # HP VMM Control +hpvmmcontrol 1124/udp # HP VMM Control +hpvmmagent 1125/tcp # HP VMM Agent +hpvmmagent 1125/udp # HP VMM Agent +hpvmmdata 1126/tcp # HP VMM Agent +hpvmmdata 1126/udp # HP VMM Agent +kwdb-commn 1127/udp # KWDB Remote Communication +saphostctrl 1128/tcp # SAPHostControl over SOAP/HTTP +saphostctrl 1128/udp # SAPHostControl over SOAP/HTTP +saphostctrls 1129/tcp # SAPHostControl over SOAP/HTTPS +saphostctrls 1129/udp # SAPHostControl over SOAP/HTTPS +casp 1130/tcp # CAC App Service Protocol +casp 1130/udp # CAC App Service Protocol +caspssl 1131/tcp # CAC App Service Protocol Encripted +caspssl 1131/udp # CAC App Service Protocol Encripted +kvm-via-ip 1132/tcp # KVM-via-IP Management Service +kvm-via-ip 1132/udp # KVM-via-IP Management Service +dfn 1133/tcp # Data Flow Network +dfn 1133/udp # Data Flow Network +aplx 1134/tcp # MicroAPL APLX +aplx 1134/udp # MicroAPL APLX +omnivision 1135/tcp # OmniVision Communication Service +omnivision 1135/udp # OmniVision Communication Service +hhb-gateway 1136/tcp # HHB Gateway Control +hhb-gateway 1136/udp # HHB Gateway Control +trim 1137/tcp # TRIM Workgroup Service +trim 1137/udp # TRIM Workgroup Service +encrypted_admin 1138/tcp encrypted-admin # encrypted admin requests +encrypted_admin 1138/udp encrypted-admin # encrypted admin requests +evm 1139/tcp # Enterprise Virtual Manager +evm 1139/udp # Enterprise Virtual Manager +autonoc 1140/tcp # AutoNOC Network Operations Protocol +autonoc 1140/udp # AutoNOC Network Operations Protocol +mxomss 1141/tcp # User Message Service +mxomss 1141/udp # User Message Service +edtools 1142/tcp # User Discovery Service +edtools 1142/udp # User Discovery Service +imyx 1143/tcp # Infomatryx Exchange +imyx 1143/udp # Infomatryx Exchange +fuscript 1144/tcp # Fusion Script +fuscript 1144/udp # Fusion Script +x9-icue 1145/tcp # X9 iCue Show Control +x9-icue 1145/udp # X9 iCue Show Control +audit-transfer 1146/tcp # audit transfer +audit-transfer 1146/udp # audit transfer +capioverlan 1147/tcp # CAPIoverLAN +capioverlan 1147/udp # CAPIoverLAN +elfiq-repl 1148/tcp # Elfiq Replication Service +elfiq-repl 1148/udp # Elfiq Replication Service +bvtsonar 1149/tcp # BlueView Sonar Service +bvtsonar 1149/udp # BlueView Sonar Service +blaze 1150/tcp # Blaze File Server +blaze 1150/udp # Blaze File Server +unizensus 1151/tcp # Unizensus Login Server +unizensus 1151/udp # Unizensus Login Server +winpoplanmess 1152/tcp # Winpopup LAN Messenger +winpoplanmess 1152/udp # Winpopup LAN Messenger +c1222-acse 1153/tcp # ANSI C12.22 Port +c1222-acse 1153/udp # ANSI C12.22 Port +resacommunity 1154/tcp # Community Service +resacommunity 1154/udp # Community Service +nfa 1155/tcp # Network File Access +nfa 1155/udp # Network File Access +iascontrol-oms 1156/tcp # iasControl OMS +iascontrol-oms 1156/udp # iasControl OMS +iascontrol 1157/tcp # Oracle iASControl +iascontrol 1157/udp # Oracle iASControl +dbcontrol-oms 1158/tcp # dbControl OMS +dbcontrol-oms 1158/udp # dbControl OMS +oracle-oms 1159/tcp # Oracle OMS +oracle-oms 1159/udp # Oracle OMS +olsv 1160/tcp # DB Lite Mult-User Server +olsv 1160/udp # DB Lite Mult-User Server +health-polling 1161/tcp # Health Polling +health-polling 1161/udp # Health Polling +health-trap 1162/tcp # Health Trap +health-trap 1162/udp # Health Trap +sddp 1163/tcp # SmartDialer Data Protocol +sddp 1163/udp # SmartDialer Data Protocol +qsm-proxy 1164/tcp # QSM Proxy Service +qsm-proxy 1164/udp # QSM Proxy Service +qsm-gui 1165/tcp # QSM GUI Service +qsm-gui 1165/udp # QSM GUI Service +qsm-remote 1166/tcp # QSM RemoteExec +qsm-remote 1166/udp # QSM RemoteExec +cisco-ipsla 1167/tcp # Cisco IP SLAs Control Protocol +cisco-ipsla 1167/udp # Cisco IP SLAs Control Protocol +cisco-ipsla 1167/sctp # Cisco IP SLAs Control Protocol +vchat 1168/tcp # VChat Conference Service +vchat 1168/udp # VChat Conference Service +tripwire 1169/tcp # TRIPWIRE +tripwire 1169/udp # TRIPWIRE +atc-lm 1170/tcp # AT+C License Manager +atc-lm 1170/udp # AT+C License Manager +atc-appserver 1171/tcp # AT+C FmiApplicationServer +atc-appserver 1171/udp # AT+C FmiApplicationServer +dnap 1172/tcp # DNA Protocol +dnap 1172/udp # DNA Protocol +d-cinema-rrp 1173/tcp # D-Cinema Request-Response +d-cinema-rrp 1173/udp # D-Cinema Request-Response +fnet-remote-ui 1174/tcp # FlashNet Remote Admin +fnet-remote-ui 1174/udp # FlashNet Remote Admin +dossier 1175/tcp # Dossier Server +dossier 1175/udp # Dossier Server +indigo-server 1176/tcp # Indigo Home Server +indigo-server 1176/udp # Indigo Home Server +dkmessenger 1177/tcp # DKMessenger Protocol +dkmessenger 1177/udp # DKMessenger Protocol +sgi-storman 1178/udp # SGI Storage Manager +b2n 1179/tcp # Backup To Neighbor +b2n 1179/udp # Backup To Neighbor +mc-client 1180/tcp # Millicent Client Proxy +mc-client 1180/udp # Millicent Client Proxy +3comnetman 1181/tcp # 3Com Net Management +3comnetman 1181/udp # 3Com Net Management +accelenet 1182/tcp # AcceleNet Control +accelenet-data 1182/udp # AcceleNet Data +llsurfup-http 1183/tcp # LL Surfup HTTP +llsurfup-http 1183/udp # LL Surfup HTTP +llsurfup-https 1184/tcp # LL Surfup HTTPS +llsurfup-https 1184/udp # LL Surfup HTTPS +catchpole 1185/tcp # Catchpole port +catchpole 1185/udp # Catchpole port +mysql-cluster 1186/tcp # MySQL Cluster Manager +mysql-cluster 1186/udp # MySQL Cluster Manager +alias 1187/tcp # Alias Service +alias 1187/udp # Alias Service +hp-webadmin 1188/tcp # HP Web Admin +hp-webadmin 1188/udp # HP Web Admin +unet 1189/tcp # Unet Connection +unet 1189/udp # Unet Connection +commlinx-avl 1190/tcp # CommLinx GPS / AVL System +commlinx-avl 1190/udp # CommLinx GPS / AVL System +gpfs 1191/tcp # General Parallel File System +gpfs 1191/udp # General Parallel File System +caids-sensor 1192/tcp # caids sensors channel +caids-sensor 1192/udp # caids sensors channel +fiveacross 1193/tcp # Five Across Server +fiveacross 1193/udp # Five Across Server +openvpn 1194/tcp # OpenVPN +openvpn 1194/udp # OpenVPN +rsf-1 1195/tcp # RSF-1 clustering +rsf-1 1195/udp # RSF-1 clustering +netmagic 1196/tcp # Network Magic +netmagic 1196/udp # Network Magic +carrius-rshell 1197/tcp # Carrius Remote Access +carrius-rshell 1197/udp # Carrius Remote Access +cajo-discovery 1198/tcp # cajo reference discovery +cajo-discovery 1198/udp # cajo reference discovery +dmidi 1199/tcp # DMIDI +dmidi 1199/udp # DMIDI +scol 1200/tcp # SCOL +scol 1200/udp # SCOL +nucleus-sand 1201/tcp # Nucleus Sand Database Server +nucleus-sand 1201/udp # Nucleus Sand Database Server +caiccipc 1202/tcp # caiccipc +caiccipc 1202/udp # caiccipc +ssslic-mgr 1203/tcp # License Validation +ssslic-mgr 1203/udp # License Validation +ssslog-mgr 1204/tcp # Log Request Listener +ssslog-mgr 1204/udp # Log Request Listener +accord-mgc 1205/tcp # Accord-MGC +accord-mgc 1205/udp # Accord-MGC +anthony-data 1206/tcp # Anthony Data +anthony-data 1206/udp # Anthony Data +metasage 1207/tcp # MetaSage +metasage 1207/udp # MetaSage +seagull-ais 1208/tcp # SEAGULL AIS +seagull-ais 1208/udp # SEAGULL AIS +ipcd3 1209/tcp # IPCD3 +ipcd3 1209/udp # IPCD3 +eoss 1210/tcp # EOSS +eoss 1210/udp # EOSS +groove-dpp 1211/tcp # Groove DPP +groove-dpp 1211/udp # Groove DPP +lupa 1212/tcp # lupa +lupa 1212/udp # lupa +mpc-lifenet 1213/tcp # MPC LIFENET +mpc-lifenet 1213/udp # MPC LIFENET +kazaa 1214/tcp # KAZAA +kazaa 1214/udp # KAZAA +scanstat-1 1215/tcp # scanSTAT 1.0 +scanstat-1 1215/udp # scanSTAT 1.0 +etebac5 1216/tcp # ETEBAC 5 +etebac5 1216/udp # ETEBAC 5 +hpss-ndapi 1217/tcp # HPSS NonDCE Gateway +hpss-ndapi 1217/udp # HPSS NonDCE Gateway +aeroflight-ads 1218/tcp # AeroFlight-ADs +aeroflight-ads 1218/udp # AeroFlight-ADs +aeroflight-ret 1219/tcp # AeroFlight-Ret +aeroflight-ret 1219/udp # AeroFlight-Ret +qt-serveradmin 1220/tcp # QT SERVER ADMIN +qt-serveradmin 1220/udp # QT SERVER ADMIN +sweetware-apps 1221/tcp # SweetWARE Apps +sweetware-apps 1221/udp # SweetWARE Apps +nerv 1222/tcp # SNI R&D network +nerv 1222/udp # SNI R&D network +tgp 1223/tcp # TrulyGlobal Protocol +tgp 1223/udp # TrulyGlobal Protocol +vpnz 1224/tcp # VPNz +vpnz 1224/udp # VPNz +slinkysearch 1225/tcp # SLINKYSEARCH +slinkysearch 1225/udp # SLINKYSEARCH +stgxfws 1226/tcp # STGXFWS +stgxfws 1226/udp # STGXFWS +dns2go 1227/tcp # DNS2Go +dns2go 1227/udp # DNS2Go +florence 1228/tcp # FLORENCE +florence 1228/udp # FLORENCE +zented 1229/tcp # ZENworks Tiered Electronic Distribution +zented 1229/udp # ZENworks Tiered Electronic Distribution +periscope 1230/tcp # Periscope +periscope 1230/udp # Periscope +menandmice-lpm 1231/tcp # menandmice-lpm +menandmice-lpm 1231/udp # menandmice-lpm +first-defense 1232/tcp # Remote systems monitoring +first-defense 1232/udp # Remote systems monitoring +univ-appserver 1233/tcp # Universal App Server +univ-appserver 1233/udp # Universal App Server +search-agent 1234/tcp # Infoseek Search Agent +search-agent 1234/udp # Infoseek Search Agent +mosaicsyssvc1 1235/tcp # mosaicsyssvc1 +mosaicsyssvc1 1235/udp # mosaicsyssvc1 +tsdos390 1237/tcp # tsdos390 +tsdos390 1237/udp # tsdos390 +hacl-qs 1238/tcp # hacl-qs +hacl-qs 1238/udp # hacl-qs +nmsd 1239/tcp # NMSD +nmsd 1239/udp # NMSD +instantia 1240/tcp # Instantia +instantia 1240/udp # Instantia +nessus 1241/tcp # nessus +nessus 1241/udp # nessus +nmasoverip 1242/tcp # NMAS over IP +nmasoverip 1242/udp # NMAS over IP +serialgateway 1243/tcp # SerialGateway +serialgateway 1243/udp # SerialGateway +isbconference1 1244/tcp # isbconference1 +isbconference1 1244/udp # isbconference1 +isbconference2 1245/tcp # isbconference2 +isbconference2 1245/udp # isbconference2 +payrouter 1246/tcp # payrouter +payrouter 1246/udp # payrouter +visionpyramid 1247/tcp # VisionPyramid +visionpyramid 1247/udp # VisionPyramid +hermes 1248/tcp # hermes +hermes 1248/udp # hermes +mesavistaco 1249/tcp # Mesa Vista Co +mesavistaco 1249/udp # Mesa Vista Co +swldy-sias 1250/tcp # swldy-sias +swldy-sias 1250/udp # swldy-sias +servergraph 1251/tcp # servergraph +servergraph 1251/udp # servergraph +bspne-pcc 1252/tcp # bspne-pcc +bspne-pcc 1252/udp # bspne-pcc +q55-pcc 1253/tcp # q55-pcc +q55-pcc 1253/udp # q55-pcc +de-noc 1254/tcp # de-noc +de-noc 1254/udp # de-noc +de-cache-query 1255/tcp # de-cache-query +de-cache-query 1255/udp # de-cache-query +de-server 1256/tcp # de-server +de-server 1256/udp # de-server +shockwave2 1257/tcp # Shockwave 2 +shockwave2 1257/udp # Shockwave 2 +opennl 1258/tcp # Open Network Library +opennl 1258/udp # Open Network Library +opennl-voice 1259/tcp # Open Network Library Voice +opennl-voice 1259/udp # Open Network Library Voice +ibm-ssd 1260/tcp # ibm-ssd +ibm-ssd 1260/udp # ibm-ssd +mpshrsv 1261/tcp # mpshrsv +mpshrsv 1261/udp # mpshrsv +qnts-orb 1262/tcp # QNTS-ORB +qnts-orb 1262/udp # QNTS-ORB +dka 1263/tcp # dka +dka 1263/udp # dka +prat 1264/tcp # PRAT +prat 1264/udp # PRAT +dssiapi 1265/tcp # DSSIAPI +dssiapi 1265/udp # DSSIAPI +dellpwrappks 1266/tcp # DELLPWRAPPKS +dellpwrappks 1266/udp # DELLPWRAPPKS +epc 1267/tcp # eTrust Policy Compliance +epc 1267/udp # eTrust Policy Compliance +propel-msgsys 1268/tcp # PROPEL-MSGSYS +propel-msgsys 1268/udp # PROPEL-MSGSYS +watilapp 1269/tcp # WATiLaPP +watilapp 1269/udp # WATiLaPP +opsmgr 1270/tcp # Microsoft Operations Manager +opsmgr 1270/udp # Microsoft Operations Manager +excw 1271/tcp # eXcW +excw 1271/udp # eXcW +cspmlockmgr 1272/tcp # CSPMLockMgr +cspmlockmgr 1272/udp # CSPMLockMgr +emc-gateway 1273/tcp # EMC-Gateway +emc-gateway 1273/udp # EMC-Gateway +t1distproc 1274/tcp # t1distproc +t1distproc 1274/udp # t1distproc +ivcollector 1275/tcp # ivcollector +ivcollector 1275/udp # ivcollector +miva-mqs 1277/tcp # mqs +miva-mqs 1277/udp # mqs +dellwebadmin-1 1278/tcp # Dell Web Admin 1 +dellwebadmin-1 1278/udp # Dell Web Admin 1 +dellwebadmin-2 1279/tcp # Dell Web Admin 2 +dellwebadmin-2 1279/udp # Dell Web Admin 2 +pictrography 1280/tcp # Pictrography +pictrography 1280/udp # Pictrography +healthd 1281/tcp # healthd +healthd 1281/udp # healthd +emperion 1282/tcp # Emperion +emperion 1282/udp # Emperion +productinfo 1283/tcp # Product Information +productinfo 1283/udp # Product Information +iee-qfx 1284/tcp # IEE-QFX +iee-qfx 1284/udp # IEE-QFX +neoiface 1285/tcp # neoiface +neoiface 1285/udp # neoiface +netuitive 1286/tcp # netuitive +netuitive 1286/udp # netuitive +routematch 1287/tcp # RouteMatch Com +routematch 1287/udp # RouteMatch Com +navbuddy 1288/tcp # NavBuddy +navbuddy 1288/udp # NavBuddy +jwalkserver 1289/tcp # JWalkServer +jwalkserver 1289/udp # JWalkServer +winjaserver 1290/tcp # WinJaServer +winjaserver 1290/udp # WinJaServer +seagulllms 1291/tcp # SEAGULLLMS +seagulllms 1291/udp # SEAGULLLMS +dsdn 1292/tcp # dsdn +dsdn 1292/udp # dsdn +pkt-krb-ipsec 1293/tcp # PKT-KRB-IPSec +pkt-krb-ipsec 1293/udp # PKT-KRB-IPSec +cmmdriver 1294/tcp # CMMdriver +cmmdriver 1294/udp # CMMdriver +ehtp 1295/tcp # End-by-Hop Transmission Protocol +ehtp 1295/udp # End-by-Hop Transmission Protocol +dproxy 1296/tcp # dproxy +dproxy 1296/udp # dproxy +sdproxy 1297/tcp # sdproxy +sdproxy 1297/udp # sdproxy +lpcp 1298/tcp # lpcp +lpcp 1298/udp # lpcp +hp-sci 1299/tcp # hp-sci +hp-sci 1299/udp # hp-sci +ci3-software-1 1301/tcp # CI3-Software-1 +ci3-software-1 1301/udp # CI3-Software-1 +ci3-software-2 1302/tcp # CI3-Software-2 +ci3-software-2 1302/udp # CI3-Software-2 +sftsrv 1303/tcp # sftsrv +sftsrv 1303/udp # sftsrv +boomerang 1304/tcp # Boomerang +boomerang 1304/udp # Boomerang +pe-mike 1305/tcp # pe-mike +pe-mike 1305/udp # pe-mike +re-conn-proto 1306/tcp # RE-Conn-Proto +re-conn-proto 1306/udp # RE-Conn-Proto +pacmand 1307/tcp # Pacmand +pacmand 1307/udp # Pacmand +odsi 1308/tcp # Optical Domain Service Interconnect (ODSI) +odsi 1308/udp # Optical Domain Service Interconnect (ODSI) +jtag-server 1309/tcp # JTAG server +jtag-server 1309/udp # JTAG server +husky 1310/tcp # Husky +husky 1310/udp # Husky +rxmon 1311/tcp # RxMon +rxmon 1311/udp # RxMon +sti-envision 1312/tcp # STI Envision +sti-envision 1312/udp # STI Envision +bmc_patroldb 1313/udp bmc-patroldb # BMC_PATROLDB +pdps 1314/tcp # Photoscript Distributed Printing System +pdps 1314/udp # Photoscript Distributed Printing System +els 1315/tcp # E.L.S., Event Listener Service +els 1315/udp # E.L.S., Event Listener Service +exbit-escp 1316/tcp # Exbit-ESCP +exbit-escp 1316/udp # Exbit-ESCP +vrts-ipcserver 1317/tcp # vrts-ipcserver +vrts-ipcserver 1317/udp # vrts-ipcserver +krb5gatekeeper 1318/tcp # krb5gatekeeper +krb5gatekeeper 1318/udp # krb5gatekeeper +amx-icsp 1319/tcp # AMX-ICSP +amx-icsp 1319/udp # AMX-ICSP +amx-axbnet 1320/tcp # AMX-AXBNET +amx-axbnet 1320/udp # AMX-AXBNET +novation 1322/tcp # Novation +novation 1322/udp # Novation +brcd 1323/tcp # brcd +brcd 1323/udp # brcd +delta-mcp 1324/tcp # delta-mcp +delta-mcp 1324/udp # delta-mcp +dx-instrument 1325/tcp # DX-Instrument +dx-instrument 1325/udp # DX-Instrument +wimsic 1326/tcp # WIMSIC +wimsic 1326/udp # WIMSIC +ultrex 1327/tcp # Ultrex +ultrex 1327/udp # Ultrex +ewall 1328/tcp # EWALL +ewall 1328/udp # EWALL +netdb-export 1329/tcp # netdb-export +netdb-export 1329/udp # netdb-export +streetperfect 1330/tcp # StreetPerfect +streetperfect 1330/udp # StreetPerfect +intersan 1331/tcp # intersan +intersan 1331/udp # intersan +pcia-rxp-b 1332/tcp # PCIA RXP-B +pcia-rxp-b 1332/udp # PCIA RXP-B +passwrd-policy 1333/tcp # Password Policy +passwrd-policy 1333/udp # Password Policy +writesrv 1334/tcp # writesrv +writesrv 1334/udp # writesrv +digital-notary 1335/tcp # Digital Notary Protocol +digital-notary 1335/udp # Digital Notary Protocol +ischat 1336/tcp # Instant Service Chat +ischat 1336/udp # Instant Service Chat +menandmice-dns 1337/tcp # menandmice DNS +menandmice-dns 1337/udp # menandmice DNS +wmc-log-svc 1338/tcp # WMC-log-svr +wmc-log-svc 1338/udp # WMC-log-svr +kjtsiteserver 1339/tcp # kjtsiteserver +kjtsiteserver 1339/udp # kjtsiteserver +naap 1340/tcp # NAAP +naap 1340/udp # NAAP +qubes 1341/tcp # QuBES +qubes 1341/udp # QuBES +esbroker 1342/tcp # ESBroker +esbroker 1342/udp # ESBroker +re101 1343/tcp # re101 +re101 1343/udp # re101 +icap 1344/tcp # ICAP +icap 1344/udp # ICAP +vpjp 1345/tcp # VPJP +vpjp 1345/udp # VPJP +alta-ana-lm 1346/tcp # Alta Analytics License Manager +alta-ana-lm 1346/udp # Alta Analytics License Manager +bbn-mmc 1347/tcp # multi media conferencing +bbn-mmc 1347/udp # multi media conferencing +bbn-mmx 1348/tcp # multi media conferencing +bbn-mmx 1348/udp # multi media conferencing +sbook 1349/tcp # Registration Network Protocol +sbook 1349/udp # Registration Network Protocol +editbench 1350/tcp # Registration Network Protocol +editbench 1350/udp # Registration Network Protocol +equationbuilder 1351/tcp # Digital Tool Works (MIT) +equationbuilder 1351/udp # Digital Tool Works (MIT) +lotusnote 1352/tcp # Lotus Note +lotusnote 1352/udp # Lotus Note +relief 1353/tcp # Relief Consulting +relief 1353/udp # Relief Consulting +XSIP-network 1354/tcp # Five Across XSIP Network +XSIP-network 1354/udp # Five Across XSIP Network +intuitive-edge 1355/tcp # Intuitive Edge +intuitive-edge 1355/udp # Intuitive Edge +cuillamartin 1356/tcp # CuillaMartin Company +cuillamartin 1356/udp # CuillaMartin Company +pegboard 1357/tcp # Electronic PegBoard +pegboard 1357/udp # Electronic PegBoard +connlcli 1358/tcp # CONNLCLI +connlcli 1358/udp # CONNLCLI +ftsrv 1359/tcp # FTSRV +ftsrv 1359/udp # FTSRV +mimer 1360/tcp # MIMER +mimer 1360/udp # MIMER +linx 1361/tcp # LinX +linx 1361/udp # LinX +timeflies 1362/tcp # TimeFlies +timeflies 1362/udp # TimeFlies +ndm-requester 1363/tcp # Network DataMover Requester +ndm-requester 1363/udp # Network DataMover Requester +ndm-server 1364/tcp # Network DataMover Server +ndm-server 1364/udp # Network DataMover Server +adapt-sna 1365/tcp # Network Software Associates +adapt-sna 1365/udp # Network Software Associates +netware-csp 1366/tcp # Novell NetWare Comm Service Platform +netware-csp 1366/udp # Novell NetWare Comm Service Platform +dcs 1367/tcp # DCS +dcs 1367/udp # DCS +screencast 1368/tcp # ScreenCast +screencast 1368/udp # ScreenCast +gv-us 1369/tcp # GlobalView to Unix Shell +gv-us 1369/udp # GlobalView to Unix Shell +us-gv 1370/tcp # Unix Shell to GlobalView +us-gv 1370/udp # Unix Shell to GlobalView +fc-cli 1371/tcp # Fujitsu Config Protocol +fc-cli 1371/udp # Fujitsu Config Protocol +fc-ser 1372/tcp # Fujitsu Config Protocol +fc-ser 1372/udp # Fujitsu Config Protocol +chromagrafx 1373/tcp # Chromagrafx +chromagrafx 1373/udp # Chromagrafx +molly 1374/tcp # EPI Software Systems +molly 1374/udp # EPI Software Systems +bytex 1375/tcp # Bytex +bytex 1375/udp # Bytex +ibm-pps 1376/tcp # IBM Person to Person Software +ibm-pps 1376/udp # IBM Person to Person Software +cichlid 1377/tcp # Cichlid License Manager +cichlid 1377/udp # Cichlid License Manager +elan 1378/tcp # Elan License Manager +elan 1378/udp # Elan License Manager +dbreporter 1379/tcp # Integrity Solutions +dbreporter 1379/udp # Integrity Solutions +telesis-licman 1380/tcp # Telesis Network License Manager +telesis-licman 1380/udp # Telesis Network License Manager +apple-licman 1381/tcp # Apple Network License Manager +apple-licman 1381/udp # Apple Network License Manager +udt_os 1382/tcp # udt_os +udt_os 1382/udp # udt_os +gwha 1383/tcp # GW Hannaway Network License Manager +gwha 1383/udp # GW Hannaway Network License Manager +os-licman 1384/tcp # Objective Solutions License Manager +os-licman 1384/udp # Objective Solutions License Manager +atex_elmd 1385/tcp atex-elmd # Atex Publishing License Manager +atex_elmd 1385/udp atex-elmd # Atex Publishing License Manager +checksum 1386/tcp # CheckSum License Manager +checksum 1386/udp # CheckSum License Manager +cadsi-lm 1387/tcp # Computer Aided Design Software Inc LM +cadsi-lm 1387/udp # Computer Aided Design Software Inc LM +objective-dbc 1388/tcp # Objective Solutions DataBase Cache +objective-dbc 1388/udp # Objective Solutions DataBase Cache +iclpv-dm 1389/tcp # Document Manager +iclpv-dm 1389/udp # Document Manager +iclpv-sc 1390/tcp # Storage Controller +iclpv-sc 1390/udp # Storage Controller +iclpv-sas 1391/tcp # Storage Access Server +iclpv-sas 1391/udp # Storage Access Server +iclpv-pm 1392/tcp # Print Manager +iclpv-pm 1392/udp # Print Manager +iclpv-nls 1393/tcp # Network Log Server +iclpv-nls 1393/udp # Network Log Server +iclpv-nlc 1394/tcp # Network Log Client +iclpv-nlc 1394/udp # Network Log Client +iclpv-wsm 1395/tcp # PC Workstation Manager software +iclpv-wsm 1395/udp # PC Workstation Manager software +dvl-activemail 1396/tcp # DVL Active Mail +dvl-activemail 1396/udp # DVL Active Mail +audio-activmail 1397/tcp # Audio Active Mail +audio-activmail 1397/udp # Audio Active Mail +video-activmail 1398/tcp # Video Active Mail +video-activmail 1398/udp # Video Active Mail +cadkey-licman 1399/tcp # Cadkey License Manager +cadkey-licman 1399/udp # Cadkey License Manager +cadkey-tablet 1400/tcp # Cadkey Tablet Daemon +cadkey-tablet 1400/udp # Cadkey Tablet Daemon +goldleaf-licman 1401/tcp # Goldleaf License Manager +goldleaf-licman 1401/udp # Goldleaf License Manager +prm-sm-np 1402/tcp # Prospero Resource Manager +prm-sm-np 1402/udp # Prospero Resource Manager +prm-nm-np 1403/tcp # Prospero Resource Manager +prm-nm-np 1403/udp # Prospero Resource Manager +igi-lm 1404/tcp # Infinite Graphics License Manager +igi-lm 1404/udp # Infinite Graphics License Manager +ibm-res 1405/tcp # IBM Remote Execution Starter +ibm-res 1405/udp # IBM Remote Execution Starter +netlabs-lm 1406/tcp # NetLabs License Manager +netlabs-lm 1406/udp # NetLabs License Manager +tibet-server 1407/tcp # TIBET Data Server +sophia-lm 1408/tcp # Sophia License Manager +sophia-lm 1408/udp # Sophia License Manager +here-lm 1409/tcp # Here License Manager +here-lm 1409/udp # Here License Manager +hiq 1410/tcp # HiQ License Manager +hiq 1410/udp # HiQ License Manager +af 1411/tcp # AudioFile +af 1411/udp # AudioFile +innosys 1412/tcp # InnoSys +innosys 1412/udp # InnoSys +innosys-acl 1413/tcp # Innosys-ACL +innosys-acl 1413/udp # Innosys-ACL +ibm-mqseries 1414/tcp # IBM MQSeries +ibm-mqseries 1414/udp # IBM MQSeries +dbstar 1415/tcp # DBStar +dbstar 1415/udp # DBStar +novell-lu6.2 1416/tcp novell-lu6-2 # Novell LU6.2 +novell-lu6.2 1416/udp novell-lu6-2 # Novell LU6.2 +timbuktu-srv1 1417/tcp # Timbuktu Service 1 Port +timbuktu-srv1 1417/udp # Timbuktu Service 1 Port +timbuktu-srv2 1418/tcp # Timbuktu Service 2 Port +timbuktu-srv2 1418/udp # Timbuktu Service 2 Port +timbuktu-srv3 1419/tcp # Timbuktu Service 3 Port +timbuktu-srv3 1419/udp # Timbuktu Service 3 Port +timbuktu-srv4 1420/tcp # Timbuktu Service 4 Port +timbuktu-srv4 1420/udp # Timbuktu Service 4 Port +gandalf-lm 1421/tcp # Gandalf License Manager +gandalf-lm 1421/udp # Gandalf License Manager +autodesk-lm 1422/tcp # Autodesk License Manager +autodesk-lm 1422/udp # Autodesk License Manager +essbase 1423/tcp # Essbase Arbor Software +essbase 1423/udp # Essbase Arbor Software +hybrid 1424/tcp # Hybrid Encryption Protocol +hybrid 1424/udp # Hybrid Encryption Protocol +zion-lm 1425/tcp # Zion Software License Manager +zion-lm 1425/udp # Zion Software License Manager +sais 1426/tcp # Satellite-data Acquisition System 1 +sais 1426/udp # Satellite-data Acquisition System 1 +mloadd 1427/tcp # mloadd monitoring tool +mloadd 1427/udp # mloadd monitoring tool +informatik-lm 1428/tcp # Informatik License Manager +informatik-lm 1428/udp # Informatik License Manager +nms 1429/tcp # Hypercom NMS +nms 1429/udp # Hypercom NMS +tpdu 1430/tcp # Hypercom TPDU +tpdu 1430/udp # Hypercom TPDU +rgtp 1431/tcp # Reverse Gossip Transport +rgtp 1431/udp # Reverse Gossip Transport +blueberry-lm 1432/tcp # Blueberry Software License Manager +blueberry-lm 1432/udp # Blueberry Software License Manager +ibm-cics 1435/tcp # IBM CICS +ibm-cics 1435/udp # IBM CICS +saism 1436/tcp # Satellite-data Acquisition System 2 +saism 1436/udp # Satellite-data Acquisition System 2 +tabula 1437/tcp # Tabula +tabula 1437/udp # Tabula +eicon-server 1438/tcp # Eicon Security Agent/Server +eicon-server 1438/udp # Eicon Security Agent/Server +eicon-x25 1439/tcp # Eicon X25/SNA Gateway +eicon-x25 1439/udp # Eicon X25/SNA Gateway +eicon-slp 1440/tcp # Eicon Service Location Protocol +eicon-slp 1440/udp # Eicon Service Location Protocol +cadis-1 1441/tcp # Cadis License Management +cadis-1 1441/udp # Cadis License Management +cadis-2 1442/tcp # Cadis License Management +cadis-2 1442/udp # Cadis License Management +ies-lm 1443/tcp # Integrated Engineering Software +ies-lm 1443/udp # Integrated Engineering Software +marcam-lm 1444/tcp # Marcam License Management +marcam-lm 1444/udp # Marcam License Management +proxima-lm 1445/tcp # Proxima License Manager +proxima-lm 1445/udp # Proxima License Manager +ora-lm 1446/tcp # Optical Research Associates License Manager +ora-lm 1446/udp # Optical Research Associates License Manager +apri-lm 1447/tcp # Applied Parallel Research LM +apri-lm 1447/udp # Applied Parallel Research LM +oc-lm 1448/tcp # OpenConnect License Manager +oc-lm 1448/udp # OpenConnect License Manager +peport 1449/tcp # PEport +peport 1449/udp # PEport +dwf 1450/tcp # Tandem Distributed Workbench Facility +dwf 1450/udp # Tandem Distributed Workbench Facility +infoman 1451/tcp # IBM Information Management +infoman 1451/udp # IBM Information Management +gtegsc-lm 1452/tcp # GTE Government Systems License Man +gtegsc-lm 1452/udp # GTE Government Systems License Man +genie-lm 1453/tcp # Genie License Manager +genie-lm 1453/udp # Genie License Manager +interhdl_elmd 1454/tcp interhdl-elmd # interHDL License Manager +interhdl_elmd 1454/udp interhdl-elmd # interHDL License Manager +esl-lm 1455/tcp # ESL License Manager +esl-lm 1455/udp # ESL License Manager +dca 1456/tcp # DCA +dca 1456/udp # DCA +valisys-lm 1457/tcp # Valisys License Manager +valisys-lm 1457/udp # Valisys License Manager +nrcabq-lm 1458/tcp # Nichols Research Corp. +nrcabq-lm 1458/udp # Nichols Research Corp. +proshare1 1459/tcp # Proshare Notebook Application +proshare1 1459/udp # Proshare Notebook Application +proshare2 1460/tcp # Proshare Notebook Application +proshare2 1460/udp # Proshare Notebook Application +ibm_wrless_lan 1461/tcp ibm-wrless-lan # IBM Wireless LAN +ibm_wrless_lan 1461/udp ibm-wrless-lan # IBM Wireless LAN +world-lm 1462/tcp # World License Manager +world-lm 1462/udp # World License Manager +nucleus 1463/tcp # Nucleus +nucleus 1463/udp # Nucleus +msl_lmd 1464/tcp msl-lmd # MSL License Manager +msl_lmd 1464/udp msl-lmd # MSL License Manager +pipes 1465/tcp # Pipes Platform +pipes 1465/udp # Pipes Platform +oceansoft-lm 1466/tcp # Ocean Software License Manager +oceansoft-lm 1466/udp # Ocean Software License Manager +aal-lm 1469/tcp # Active Analysis Limited License Manager +aal-lm 1469/udp # Active Analysis Limited License Manager +uaiact 1470/tcp # Universal Analytics +uaiact 1470/udp # Universal Analytics +openmath 1473/tcp # OpenMath +openmath 1473/udp # OpenMath +telefinder 1474/tcp # Telefinder +telefinder 1474/udp # Telefinder +taligent-lm 1475/tcp # Taligent License Manager +taligent-lm 1475/udp # Taligent License Manager +clvm-cfg 1476/tcp # clvm-cfg +clvm-cfg 1476/udp # clvm-cfg +ms-sna-server 1477/tcp # ms-sna-server +ms-sna-server 1477/udp # ms-sna-server +ms-sna-base 1478/tcp # ms-sna-base +ms-sna-base 1478/udp # ms-sna-base +dberegister 1479/tcp # dberegister +dberegister 1479/udp # dberegister +pacerforum 1480/tcp # PacerForum +pacerforum 1480/udp # PacerForum +airs 1481/tcp # AIRS +airs 1481/udp # AIRS +miteksys-lm 1482/tcp # Miteksys License Manager +miteksys-lm 1482/udp # Miteksys License Manager +afs 1483/tcp # AFS License Manager +afs 1483/udp # AFS License Manager +confluent 1484/tcp # Confluent License Manager +confluent 1484/udp # Confluent License Manager +lansource 1485/tcp # LANSource +lansource 1485/udp # LANSource +nms_topo_serv 1486/tcp nms-topo-serv # nms_topo_serv +nms_topo_serv 1486/udp nms-topo-serv # nms_topo_serv +localinfosrvr 1487/tcp # LocalInfoSrvr +localinfosrvr 1487/udp # LocalInfoSrvr +docstor 1488/tcp # DocStor +docstor 1488/udp # DocStor +dmdocbroker 1489/tcp # dmdocbroker +dmdocbroker 1489/udp # dmdocbroker +insitu-conf 1490/tcp # insitu-conf +insitu-conf 1490/udp # insitu-conf +stone-design-1 1492/tcp # stone-design-1 +stone-design-1 1492/udp # stone-design-1 +netmap_lm 1493/tcp netmap-lm # netmap_lm +netmap_lm 1493/udp netmap-lm # netmap_lm +cvc 1495/tcp # cvc +cvc 1495/udp # cvc +liberty-lm 1496/tcp # liberty-lm +liberty-lm 1496/udp # liberty-lm +rfx-lm 1497/tcp # rfx-lm +rfx-lm 1497/udp # rfx-lm +sybase-sqlany 1498/tcp # Sybase SQL Any +sybase-sqlany 1498/udp # Sybase SQL Any +fhc 1499/tcp # Federico Heinz Consultora +fhc 1499/udp # Federico Heinz Consultora +vlsi-lm 1500/tcp # VLSI License Manager +vlsi-lm 1500/udp # VLSI License Manager +saiscm 1501/tcp # Satellite-data Acquisition System 3 +saiscm 1501/udp # Satellite-data Acquisition System 3 +shivadiscovery 1502/tcp # Shiva +shivadiscovery 1502/udp # Shiva +imtc-mcs 1503/tcp # Databeam +imtc-mcs 1503/udp # Databeam +evb-elm 1504/tcp # EVB Software Engineering License Manager +evb-elm 1504/udp # EVB Software Engineering License Manager +funkproxy 1505/tcp # Funk Software, Inc. +funkproxy 1505/udp # Funk Software, Inc. +utcd 1506/tcp # Universal Time daemon (utcd) +utcd 1506/udp # Universal Time daemon (utcd) +symplex 1507/tcp # symplex +symplex 1507/udp # symplex +diagmond 1508/tcp # diagmond +diagmond 1508/udp # diagmond +robcad-lm 1509/tcp # Robcad, Ltd. License Manager +robcad-lm 1509/udp # Robcad, Ltd. License Manager +mvx-lm 1510/tcp # Midland Valley Exploration Ltd. Lic. Man. +mvx-lm 1510/udp # Midland Valley Exploration Ltd. Lic. Man. +3l-l1 1511/tcp # 3l-l1 +3l-l1 1511/udp # 3l-l1 +fujitsu-dtc 1513/tcp # Fujitsu Systems Business of America, Inc +fujitsu-dtc 1513/udp # Fujitsu Systems Business of America, Inc +fujitsu-dtcns 1514/tcp # Fujitsu Systems Business of America, Inc +fujitsu-dtcns 1514/udp # Fujitsu Systems Business of America, Inc +ifor-protocol 1515/tcp # ifor-protocol +ifor-protocol 1515/udp # ifor-protocol +vpad 1516/tcp # Virtual Places Audio data +vpad 1516/udp # Virtual Places Audio data +vpac 1517/tcp # Virtual Places Audio control +vpac 1517/udp # Virtual Places Audio control +vpvd 1518/tcp # Virtual Places Video data +vpvd 1518/udp # Virtual Places Video data +vpvc 1519/tcp # Virtual Places Video control +vpvc 1519/udp # Virtual Places Video control +atm-zip-office 1520/tcp # atm zip office +atm-zip-office 1520/udp # atm zip office +ncube-lm 1521/tcp # nCube License Manager +ncube-lm 1521/udp # nCube License Manager +cichild-lm 1523/tcp # cichild +cichild-lm 1523/udp # cichild +pdap-np 1526/tcp # Prospero Data Access Prot non-priv +pdap-np 1526/udp # Prospero Data Access Prot non-priv +tlisrv 1527/tcp # oracle +tlisrv 1527/udp # oracle +coauthor 1529/udp # oracle +rap-service 1530/tcp # rap-service +rap-service 1530/udp # rap-service +rap-listen 1531/tcp # rap-listen +rap-listen 1531/udp # rap-listen +miroconnect 1532/tcp # miroconnect +miroconnect 1532/udp # miroconnect +virtual-places 1533/tcp # Virtual Places Software +virtual-places 1533/udp # Virtual Places Software +micromuse-lm 1534/tcp # micromuse-lm +micromuse-lm 1534/udp # micromuse-lm +ampr-info 1535/tcp # ampr-info +ampr-info 1535/udp # ampr-info +ampr-inter 1536/tcp # ampr-inter +ampr-inter 1536/udp # ampr-inter +sdsc-lm 1537/tcp # isi-lm +sdsc-lm 1537/udp # isi-lm +3ds-lm 1538/tcp # 3ds-lm +3ds-lm 1538/udp # 3ds-lm +intellistor-lm 1539/tcp # Intellistor License Manager +intellistor-lm 1539/udp # Intellistor License Manager +rds 1540/tcp # rds +rds 1540/udp # rds +rds2 1541/tcp # rds2 +rds2 1541/udp # rds2 +gridgen-elmd 1542/tcp # gridgen-elmd +gridgen-elmd 1542/udp # gridgen-elmd +simba-cs 1543/tcp # simba-cs +simba-cs 1543/udp # simba-cs +aspeclmd 1544/tcp # aspeclmd +aspeclmd 1544/udp # aspeclmd +vistium-share 1545/tcp # vistium-share +vistium-share 1545/udp # vistium-share +abbaccuray 1546/tcp # abbaccuray +abbaccuray 1546/udp # abbaccuray +laplink 1547/tcp # laplink +laplink 1547/udp # laplink +axon-lm 1548/tcp # Axon License Manager +axon-lm 1548/udp # Axon License Manager +shivahose 1549/tcp # Shiva Hose +shivasound 1549/udp # Shiva Sound +3m-image-lm 1550/tcp # Image Storage license manager 3M Company +3m-image-lm 1550/udp # Image Storage license manager 3M Company +hecmtl-db 1551/tcp # HECMTL-DB +hecmtl-db 1551/udp # HECMTL-DB +pciarray 1552/tcp # pciarray +pciarray 1552/udp # pciarray +sna-cs 1553/tcp # sna-cs +sna-cs 1553/udp # sna-cs +caci-lm 1554/tcp # CACI Products Company License Manager +caci-lm 1554/udp # CACI Products Company License Manager +livelan 1555/tcp # livelan +livelan 1555/udp # livelan +veritas_pbx 1556/tcp veritas-pbx # VERITAS Private Branch Exchange +veritas_pbx 1556/udp veritas-pbx # VERITAS Private Branch Exchange +arbortext-lm 1557/tcp # ArborText License Manager +arbortext-lm 1557/udp # ArborText License Manager +xingmpeg 1558/tcp # xingmpeg +xingmpeg 1558/udp # xingmpeg +web2host 1559/tcp # web2host +web2host 1559/udp # web2host +asci-val 1560/tcp # ASCI-RemoteSHADOW +asci-val 1560/udp # ASCI-RemoteSHADOW +facilityview 1561/tcp # facilityview +facilityview 1561/udp # facilityview +pconnectmgr 1562/tcp # pconnectmgr +pconnectmgr 1562/udp # pconnectmgr +cadabra-lm 1563/tcp # Cadabra License Manager +cadabra-lm 1563/udp # Cadabra License Manager +pay-per-view 1564/tcp # Pay-Per-View +pay-per-view 1564/udp # Pay-Per-View +winddlb 1565/tcp # WinDD +winddlb 1565/udp # WinDD +corelvideo 1566/tcp # CORELVIDEO +corelvideo 1566/udp # CORELVIDEO +jlicelmd 1567/tcp # jlicelmd +jlicelmd 1567/udp # jlicelmd +tsspmap 1568/tcp # tsspmap +tsspmap 1568/udp # tsspmap +ets 1569/tcp # ets +ets 1569/udp # ets +orbixd 1570/tcp # orbixd +orbixd 1570/udp # orbixd +rdb-dbs-disp 1571/tcp # Oracle Remote Data Base +rdb-dbs-disp 1571/udp # Oracle Remote Data Base +chip-lm 1572/tcp # Chipcom License Manager +chip-lm 1572/udp # Chipcom License Manager +itscomm-ns 1573/tcp # itscomm-ns +itscomm-ns 1573/udp # itscomm-ns +mvel-lm 1574/tcp # mvel-lm +mvel-lm 1574/udp # mvel-lm +oraclenames 1575/tcp # oraclenames +oraclenames 1575/udp # oraclenames +moldflow-lm 1576/tcp # Moldflow License Manager +moldflow-lm 1576/udp # Moldflow License Manager +hypercube-lm 1577/tcp # hypercube-lm +hypercube-lm 1577/udp # hypercube-lm +jacobus-lm 1578/tcp # Jacobus License Manager +jacobus-lm 1578/udp # Jacobus License Manager +ioc-sea-lm 1579/tcp # ioc-sea-lm +ioc-sea-lm 1579/udp # ioc-sea-lm +tn-tl-r1 1580/tcp # tn-tl-r1 +tn-tl-r2 1580/udp # tn-tl-r2 +mil-2045-47001 1581/tcp # MIL-2045-47001 +mil-2045-47001 1581/udp # MIL-2045-47001 +msims 1582/tcp # MSIMS +msims 1582/udp # MSIMS +simbaexpress 1583/tcp # simbaexpress +simbaexpress 1583/udp # simbaexpress +tn-tl-fd2 1584/tcp # tn-tl-fd2 +tn-tl-fd2 1584/udp # tn-tl-fd2 +intv 1585/tcp # intv +intv 1585/udp # intv +ibm-abtact 1586/tcp # ibm-abtact +ibm-abtact 1586/udp # ibm-abtact +pra_elmd 1587/tcp pra-elmd # pra_elmd +pra_elmd 1587/udp pra-elmd # pra_elmd +triquest-lm 1588/tcp # triquest-lm +triquest-lm 1588/udp # triquest-lm +vqp 1589/tcp # VQP +vqp 1589/udp # VQP +gemini-lm 1590/tcp # gemini-lm +gemini-lm 1590/udp # gemini-lm +ncpm-pm 1591/tcp # ncpm-pm +ncpm-pm 1591/udp # ncpm-pm +commonspace 1592/tcp # commonspace +commonspace 1592/udp # commonspace +mainsoft-lm 1593/tcp # mainsoft-lm +mainsoft-lm 1593/udp # mainsoft-lm +sixtrak 1594/tcp # sixtrak +sixtrak 1594/udp # sixtrak +radio 1595/tcp # radio +radio 1595/udp # radio +radio-sm 1596/tcp # radio-sm +radio-bc 1596/udp # radio-bc +orbplus-iiop 1597/tcp # orbplus-iiop +orbplus-iiop 1597/udp # orbplus-iiop +picknfs 1598/tcp # picknfs +picknfs 1598/udp # picknfs +simbaservices 1599/tcp # simbaservices +simbaservices 1599/udp # simbaservices +issd 1600/tcp # issd +issd 1600/udp # issd +aas 1601/tcp # aas +aas 1601/udp # aas +inspect 1602/tcp # inspect +inspect 1602/udp # inspect +picodbc 1603/tcp # pickodbc +picodbc 1603/udp # pickodbc +icabrowser 1604/tcp # icabrowser +icabrowser 1604/udp # icabrowser +slp 1605/tcp # Salutation Manager (Salutation Protocol) +slp 1605/udp # Salutation Manager (Salutation Protocol) +slm-api 1606/tcp # Salutation Manager (SLM-API) +slm-api 1606/udp # Salutation Manager (SLM-API) +stt 1607/tcp # stt +stt 1607/udp # stt +smart-lm 1608/tcp # Smart Corp. License Manager +smart-lm 1608/udp # Smart Corp. License Manager +isysg-lm 1609/tcp # isysg-lm +isysg-lm 1609/udp # isysg-lm +taurus-wh 1610/tcp # taurus-wh +taurus-wh 1610/udp # taurus-wh +ill 1611/tcp # Inter Library Loan +ill 1611/udp # Inter Library Loan +netbill-trans 1612/tcp # NetBill Transaction Server +netbill-trans 1612/udp # NetBill Transaction Server +netbill-keyrep 1613/tcp # NetBill Key Repository +netbill-keyrep 1613/udp # NetBill Key Repository +netbill-cred 1614/tcp # NetBill Credential Server +netbill-cred 1614/udp # NetBill Credential Server +netbill-auth 1615/tcp # NetBill Authorization Server +netbill-auth 1615/udp # NetBill Authorization Server +netbill-prod 1616/tcp # NetBill Product Server +netbill-prod 1616/udp # NetBill Product Server +nimrod-agent 1617/tcp # Nimrod Inter-Agent Communication +nimrod-agent 1617/udp # Nimrod Inter-Agent Communication +skytelnet 1618/tcp # skytelnet +skytelnet 1618/udp # skytelnet +xs-openstorage 1619/tcp # xs-openstorage +xs-openstorage 1619/udp # xs-openstorage +faxportwinport 1620/tcp # faxportwinport +faxportwinport 1620/udp # faxportwinport +softdataphone 1621/tcp # softdataphone +softdataphone 1621/udp # softdataphone +ontime 1622/tcp # ontime +ontime 1622/udp # ontime +jaleosnd 1623/tcp # jaleosnd +jaleosnd 1623/udp # jaleosnd +udp-sr-port 1624/tcp # udp-sr-port +udp-sr-port 1624/udp # udp-sr-port +svs-omagent 1625/tcp # svs-omagent +svs-omagent 1625/udp # svs-omagent +shockwave 1626/tcp # Shockwave +shockwave 1626/udp # Shockwave +t128-gateway 1627/tcp # T.128 Gateway +t128-gateway 1627/udp # T.128 Gateway +lontalk-norm 1628/tcp # LonTalk normal +lontalk-norm 1628/udp # LonTalk normal +lontalk-urgnt 1629/tcp # LonTalk urgent +lontalk-urgnt 1629/udp # LonTalk urgent +oraclenet8cman 1630/tcp # Oracle Net8 Cman +oraclenet8cman 1630/udp # Oracle Net8 Cman +visitview 1631/tcp # Visit view +visitview 1631/udp # Visit view +pammratc 1632/tcp # PAMMRATC +pammratc 1632/udp # PAMMRATC +pammrpc 1633/tcp # PAMMRPC +pammrpc 1633/udp # PAMMRPC +loaprobe 1634/tcp # Log On America Probe +loaprobe 1634/udp # Log On America Probe +edb-server1 1635/tcp # EDB Server 1 +edb-server1 1635/udp # EDB Server 1 +isdc 1636/tcp # ISP shared public data control +isdc 1636/udp # ISP shared public data control +islc 1637/tcp # ISP shared local data control +islc 1637/udp # ISP shared local data control +ismc 1638/tcp # ISP shared management control +ismc 1638/udp # ISP shared management control +cert-initiator 1639/tcp # cert-initiator +cert-initiator 1639/udp # cert-initiator +cert-responder 1640/tcp # cert-responder +cert-responder 1640/udp # cert-responder +invision 1641/tcp # InVision +invision 1641/udp # InVision +isis-am 1642/tcp # isis-am +isis-am 1642/udp # isis-am +isis-ambc 1643/tcp # isis-ambc +isis-ambc 1643/udp # isis-ambc +saiseh 1644/tcp # Satellite-data Acquisition System 4 +saiseh 1644/udp # Satellite-data Acquisition System 4 +rsap 1647/tcp # rsap +rsap 1647/udp # rsap +concurrent-lm 1648/tcp # concurrent-lm +concurrent-lm 1648/udp # concurrent-lm +nkd 1650/tcp # nkdn +nkd 1650/udp # nkd +shiva_confsrvr 1651/tcp shiva-confsrvr # shiva_confsrvr +shiva_confsrvr 1651/udp shiva-confsrvr # shiva_confsrvr +xnmp 1652/tcp # xnmp +xnmp 1652/udp # xnmp +alphatech-lm 1653/tcp # alphatech-lm +alphatech-lm 1653/udp # alphatech-lm +stargatealerts 1654/tcp # stargatealerts +stargatealerts 1654/udp # stargatealerts +dec-mbadmin 1655/tcp # dec-mbadmin +dec-mbadmin 1655/udp # dec-mbadmin +dec-mbadmin-h 1656/tcp # dec-mbadmin-h +dec-mbadmin-h 1656/udp # dec-mbadmin-h +fujitsu-mmpdc 1657/tcp # fujitsu-mmpdc +fujitsu-mmpdc 1657/udp # fujitsu-mmpdc +sixnetudr 1658/tcp # sixnetudr +sixnetudr 1658/udp # sixnetudr +sg-lm 1659/tcp # Silicon Grail License Manager +sg-lm 1659/udp # Silicon Grail License Manager +skip-mc-gikreq 1660/tcp # skip-mc-gikreq +skip-mc-gikreq 1660/udp # skip-mc-gikreq +netview-aix-1 1661/tcp # netview-aix-1 +netview-aix-1 1661/udp # netview-aix-1 +netview-aix-2 1662/tcp # netview-aix-2 +netview-aix-2 1662/udp # netview-aix-2 +netview-aix-3 1663/tcp # netview-aix-3 +netview-aix-3 1663/udp # netview-aix-3 +netview-aix-4 1664/tcp # netview-aix-4 +netview-aix-4 1664/udp # netview-aix-4 +netview-aix-5 1665/tcp # netview-aix-5 +netview-aix-5 1665/udp # netview-aix-5 +netview-aix-6 1666/tcp # netview-aix-6 +netview-aix-6 1666/udp # netview-aix-6 +netview-aix-7 1667/tcp # netview-aix-7 +netview-aix-7 1667/udp # netview-aix-7 +netview-aix-8 1668/tcp # netview-aix-8 +netview-aix-8 1668/udp # netview-aix-8 +netview-aix-9 1669/tcp # netview-aix-9 +netview-aix-9 1669/udp # netview-aix-9 +netview-aix-10 1670/tcp # netview-aix-10 +netview-aix-10 1670/udp # netview-aix-10 +netview-aix-11 1671/tcp # netview-aix-11 +netview-aix-11 1671/udp # netview-aix-11 +netview-aix-12 1672/tcp # netview-aix-12 +netview-aix-12 1672/udp # netview-aix-12 +proshare-mc-1 1673/tcp # Intel Proshare Multicast +proshare-mc-1 1673/udp # Intel Proshare Multicast +proshare-mc-2 1674/tcp # Intel Proshare Multicast +proshare-mc-2 1674/udp # Intel Proshare Multicast +pdp 1675/tcp # Pacific Data Products +pdp 1675/udp # Pacific Data Products +netcomm1 1676/tcp # netcomm1 +netcomm2 1676/udp # netcomm2 +groupwise 1677/tcp # groupwise +groupwise 1677/udp # groupwise +prolink 1678/tcp # prolink +prolink 1678/udp # prolink +darcorp-lm 1679/tcp # darcorp-lm +darcorp-lm 1679/udp # darcorp-lm +microcom-sbp 1680/tcp # microcom-sbp +microcom-sbp 1680/udp # microcom-sbp +sd-elmd 1681/tcp # sd-elmd +sd-elmd 1681/udp # sd-elmd +lanyon-lantern 1682/tcp # lanyon-lantern +lanyon-lantern 1682/udp # lanyon-lantern +ncpm-hip 1683/tcp # ncpm-hip +ncpm-hip 1683/udp # ncpm-hip +snaresecure 1684/tcp # SnareSecure +snaresecure 1684/udp # SnareSecure +n2nremote 1685/tcp # n2nremote +n2nremote 1685/udp # n2nremote +cvmon 1686/tcp # cvmon +cvmon 1686/udp # cvmon +nsjtp-ctrl 1687/tcp # nsjtp-ctrl +nsjtp-ctrl 1687/udp # nsjtp-ctrl +nsjtp-data 1688/tcp # nsjtp-data +nsjtp-data 1688/udp # nsjtp-data +firefox 1689/tcp # firefox +firefox 1689/udp # firefox +ng-umds 1690/tcp # ng-umds +ng-umds 1690/udp # ng-umds +empire-empuma 1691/tcp # empire-empuma +empire-empuma 1691/udp # empire-empuma +sstsys-lm 1692/tcp # sstsys-lm +sstsys-lm 1692/udp # sstsys-lm +rrirtr 1693/tcp # rrirtr +rrirtr 1693/udp # rrirtr +rrimwm 1694/tcp # rrimwm +rrimwm 1694/udp # rrimwm +rrilwm 1695/tcp # rrilwm +rrilwm 1695/udp # rrilwm +rrifmm 1696/tcp # rrifmm +rrifmm 1696/udp # rrifmm +rrisat 1697/tcp # rrisat +rrisat 1697/udp # rrisat +rsvp-encap-1 1698/tcp # RSVP-ENCAPSULATION-1 +rsvp-encap-1 1698/udp # RSVP-ENCAPSULATION-1 +rsvp-encap-2 1699/tcp # RSVP-ENCAPSULATION-2 +rsvp-encap-2 1699/udp # RSVP-ENCAPSULATION-2 +mps-raft 1700/tcp # mps-raft +mps-raft 1700/udp # mps-raft +deskshare 1702/tcp # deskshare +deskshare 1702/udp # deskshare +hb-engine 1703/tcp # hb-engine +hb-engine 1703/udp # hb-engine +bcs-broker 1704/tcp # bcs-broker +bcs-broker 1704/udp # bcs-broker +slingshot 1705/tcp # slingshot +slingshot 1705/udp # slingshot +jetform 1706/tcp # jetform +jetform 1706/udp # jetform +vdmplay 1707/tcp # vdmplay +vdmplay 1707/udp # vdmplay +gat-lmd 1708/tcp # gat-lmd +gat-lmd 1708/udp # gat-lmd +centra 1709/tcp # centra +centra 1709/udp # centra +impera 1710/tcp # impera +impera 1710/udp # impera +pptconference 1711/tcp # pptconference +pptconference 1711/udp # pptconference +registrar 1712/tcp # resource monitoring service +registrar 1712/udp # resource monitoring service +conferencetalk 1713/tcp # ConferenceTalk +conferencetalk 1713/udp # ConferenceTalk +sesi-lm 1714/tcp # sesi-lm +sesi-lm 1714/udp # sesi-lm +houdini-lm 1715/tcp # houdini-lm +houdini-lm 1715/udp # houdini-lm +xmsg 1716/tcp # xmsg +xmsg 1716/udp # xmsg +fj-hdnet 1717/tcp # fj-hdnet +fj-hdnet 1717/udp # fj-hdnet +caicci 1721/tcp # caicci +caicci 1721/udp # caicci +hks-lm 1722/tcp # HKS License Manager +hks-lm 1722/udp # HKS License Manager +pptp 1723/tcp # pptp +pptp 1723/udp # pptp +csbphonemaster 1724/tcp # csbphonemaster +csbphonemaster 1724/udp # csbphonemaster +iden-ralp 1725/tcp # iden-ralp +iden-ralp 1725/udp # iden-ralp +iberiagames 1726/tcp # IBERIAGAMES +iberiagames 1726/udp # IBERIAGAMES +winddx 1727/tcp # winddx +winddx 1727/udp # winddx +telindus 1728/tcp # TELINDUS +telindus 1728/udp # TELINDUS +citynl 1729/tcp # CityNL License Management +citynl 1729/udp # CityNL License Management +roketz 1730/tcp # roketz +roketz 1730/udp # roketz +msiccp 1731/tcp # MSICCP +msiccp 1731/udp # MSICCP +proxim 1732/tcp # proxim +proxim 1732/udp # proxim +siipat 1733/tcp # SIMS - SIIPAT Protocol for Alarm Transmission +siipat 1733/udp # SIMS - SIIPAT Protocol for Alarm Transmission +cambertx-lm 1734/tcp # Camber Corporation License Management +cambertx-lm 1734/udp # Camber Corporation License Management +privatechat 1735/tcp # PrivateChat +privatechat 1735/udp # PrivateChat +street-stream 1736/tcp # street-stream +street-stream 1736/udp # street-stream +ultimad 1737/tcp # ultimad +ultimad 1737/udp # ultimad +gamegen1 1738/tcp # GameGen1 +gamegen1 1738/udp # GameGen1 +webaccess 1739/tcp # webaccess +webaccess 1739/udp # webaccess +encore 1740/tcp # encore +encore 1740/udp # encore +cisco-net-mgmt 1741/tcp # cisco-net-mgmt +cisco-net-mgmt 1741/udp # cisco-net-mgmt +3Com-nsd 1742/tcp # 3Com-nsd +3Com-nsd 1742/udp # 3Com-nsd +cinegrfx-lm 1743/tcp # Cinema Graphics License Manager +cinegrfx-lm 1743/udp # Cinema Graphics License Manager +ncpm-ft 1744/tcp # ncpm-ft +ncpm-ft 1744/udp # ncpm-ft +remote-winsock 1745/tcp # remote-winsock +remote-winsock 1745/udp # remote-winsock +ftrapid-1 1746/tcp # ftrapid-1 +ftrapid-1 1746/udp # ftrapid-1 +ftrapid-2 1747/tcp # ftrapid-2 +ftrapid-2 1747/udp # ftrapid-2 +oracle-em1 1748/tcp # oracle-em1 +oracle-em1 1748/udp # oracle-em1 +aspen-services 1749/tcp # aspen-services +aspen-services 1749/udp # aspen-services +sslp 1750/tcp # Simple Socket Library's PortMaster +sslp 1750/udp # Simple Socket Library's PortMaster +swiftnet 1751/tcp # SwiftNet +swiftnet 1751/udp # SwiftNet +lofr-lm 1752/tcp # Leap of Faith Research License Manager +lofr-lm 1752/udp # Leap of Faith Research License Manager +predatar-comms 1753/tcp # Predatar Comms Service +oracle-em2 1754/tcp # oracle-em2 +oracle-em2 1754/udp # oracle-em2 +ms-streaming 1755/tcp # ms-streaming +ms-streaming 1755/udp # ms-streaming +capfast-lmd 1756/tcp # capfast-lmd +capfast-lmd 1756/udp # capfast-lmd +cnhrp 1757/tcp # cnhrp +cnhrp 1757/udp # cnhrp +spss-lm 1759/tcp # SPSS License Manager +www-ldap-gw 1760/tcp # www-ldap-gw +www-ldap-gw 1760/udp # www-ldap-gw +cft-0 1761/tcp # cft-0 +cft-0 1761/udp # cft-0 +cft-1 1762/tcp # cft-1 +cft-1 1762/udp # cft-1 +cft-2 1763/tcp # cft-2 +cft-2 1763/udp # cft-2 +cft-3 1764/tcp # cft-3 +cft-3 1764/udp # cft-3 +cft-4 1765/tcp # cft-4 +cft-4 1765/udp # cft-4 +cft-5 1766/tcp # cft-5 +cft-5 1766/udp # cft-5 +cft-6 1767/tcp # cft-6 +cft-6 1767/udp # cft-6 +cft-7 1768/tcp # cft-7 +cft-7 1768/udp # cft-7 +bmc-net-adm 1769/tcp # bmc-net-adm +bmc-net-adm 1769/udp # bmc-net-adm +bmc-net-svc 1770/tcp # bmc-net-svc +bmc-net-svc 1770/udp # bmc-net-svc +vaultbase 1771/tcp # vaultbase +vaultbase 1771/udp # vaultbase +essweb-gw 1772/tcp # EssWeb Gateway +essweb-gw 1772/udp # EssWeb Gateway +kmscontrol 1773/tcp # KMSControl +kmscontrol 1773/udp # KMSControl +global-dtserv 1774/tcp # global-dtserv +global-dtserv 1774/udp # global-dtserv +femis 1776/tcp # Federal Emergency Management Information System +femis 1776/udp # Federal Emergency Management Information System +powerguardian 1777/tcp # powerguardian +powerguardian 1777/udp # powerguardian +prodigy-intrnet 1778/tcp # prodigy-internet +prodigy-intrnet 1778/udp # prodigy-internet +pharmasoft 1779/tcp # pharmasoft +pharmasoft 1779/udp # pharmasoft +dpkeyserv 1780/tcp # dpkeyserv +dpkeyserv 1780/udp # dpkeyserv +answersoft-lm 1781/tcp # answersoft-lm +answersoft-lm 1781/udp # answersoft-lm +hp-hcip 1782/tcp # hp-hcip +hp-hcip 1782/udp # hp-hcip +finle-lm 1784/tcp # Finle License Manager +finle-lm 1784/udp # Finle License Manager +windlm 1785/tcp # Wind River Systems License Manager +windlm 1785/udp # Wind River Systems License Manager +funk-logger 1786/tcp # funk-logger +funk-logger 1786/udp # funk-logger +funk-license 1787/tcp # funk-license +funk-license 1787/udp # funk-license +psmond 1788/tcp # psmond +psmond 1788/udp # psmond +ea1 1791/tcp # EA1 +ea1 1791/udp # EA1 +ibm-dt-2 1792/tcp # ibm-dt-2 +ibm-dt-2 1792/udp # ibm-dt-2 +rsc-robot 1793/tcp # rsc-robot +rsc-robot 1793/udp # rsc-robot +cera-bcm 1794/tcp # cera-bcm +cera-bcm 1794/udp # cera-bcm +dpi-proxy 1795/tcp # dpi-proxy +dpi-proxy 1795/udp # dpi-proxy +vocaltec-admin 1796/tcp # Vocaltec Server Administration +vocaltec-admin 1796/udp # Vocaltec Server Administration +etp 1798/tcp # Event Transfer Protocol +etp 1798/udp # Event Transfer Protocol +netrisk 1799/tcp # NETRISK +netrisk 1799/udp # NETRISK +ansys-lm 1800/tcp # ANSYS-License manager +ansys-lm 1800/udp # ANSYS-License manager +msmq 1801/tcp # Microsoft Message Que +msmq 1801/udp # Microsoft Message Que +concomp1 1802/tcp # ConComp1 +concomp1 1802/udp # ConComp1 +hp-hcip-gwy 1803/tcp # HP-HCIP-GWY +hp-hcip-gwy 1803/udp # HP-HCIP-GWY +enl 1804/tcp # ENL +enl 1804/udp # ENL +enl-name 1805/tcp # ENL-Name +enl-name 1805/udp # ENL-Name +musiconline 1806/tcp # Musiconline +musiconline 1806/udp # Musiconline +fhsp 1807/tcp # Fujitsu Hot Standby Protocol +fhsp 1807/udp # Fujitsu Hot Standby Protocol +oracle-vp2 1808/tcp # Oracle-VP2 +oracle-vp2 1808/udp # Oracle-VP2 +oracle-vp1 1809/tcp # Oracle-VP1 +oracle-vp1 1809/udp # Oracle-VP1 +jerand-lm 1810/tcp # Jerand License Manager +jerand-lm 1810/udp # Jerand License Manager +scientia-sdb 1811/tcp # Scientia-SDB +scientia-sdb 1811/udp # Scientia-SDB +tdp-suite 1814/tcp # TDP Suite +tdp-suite 1814/udp # TDP Suite +mmpft 1815/tcp # MMPFT +mmpft 1815/udp # MMPFT +harp 1816/tcp # HARP +harp 1816/udp # HARP +rkb-oscs 1817/tcp # RKB-OSCS +rkb-oscs 1817/udp # RKB-OSCS +etftp 1818/tcp # Enhanced Trivial File Transfer Protocol +etftp 1818/udp # Enhanced Trivial File Transfer Protocol +plato-lm 1819/tcp # Plato License Manager +plato-lm 1819/udp # Plato License Manager +mcagent 1820/tcp # mcagent +mcagent 1820/udp # mcagent +donnyworld 1821/tcp # donnyworld +donnyworld 1821/udp # donnyworld +es-elmd 1822/tcp # es-elmd +es-elmd 1822/udp # es-elmd +unisys-lm 1823/tcp # Unisys Natural Language License Manager +unisys-lm 1823/udp # Unisys Natural Language License Manager +metrics-pas 1824/tcp # metrics-pas +metrics-pas 1824/udp # metrics-pas +direcpc-video 1825/tcp # DirecPC Video +direcpc-video 1825/udp # DirecPC Video +ardt 1826/tcp # ARDT +ardt 1826/udp # ARDT +asi 1827/tcp # ASI +asi 1827/udp # ASI +itm-mcell-u 1828/tcp # itm-mcell-u +itm-mcell-u 1828/udp # itm-mcell-u +optika-emedia 1829/tcp # Optika eMedia +optika-emedia 1829/udp # Optika eMedia +net8-cman 1830/tcp # Oracle Net8 CMan Admin +net8-cman 1830/udp # Oracle Net8 CMan Admin +myrtle 1831/tcp # Myrtle +myrtle 1831/udp # Myrtle +tht-treasure 1832/tcp # ThoughtTreasure +tht-treasure 1832/udp # ThoughtTreasure +udpradio 1833/tcp # udpradio +udpradio 1833/udp # udpradio +ardusuni 1834/tcp # ARDUS Unicast +ardusuni 1834/udp # ARDUS Unicast +ardusmul 1835/tcp # ARDUS Multicast +ardusmul 1835/udp # ARDUS Multicast +ste-smsc 1836/tcp # ste-smsc +ste-smsc 1836/udp # ste-smsc +csoft1 1837/tcp # csoft1 +csoft1 1837/udp # csoft1 +talnet 1838/tcp # TALNET +talnet 1838/udp # TALNET +netopia-vo1 1839/tcp # netopia-vo1 +netopia-vo1 1839/udp # netopia-vo1 +netopia-vo2 1840/tcp # netopia-vo2 +netopia-vo2 1840/udp # netopia-vo2 +netopia-vo3 1841/tcp # netopia-vo3 +netopia-vo3 1841/udp # netopia-vo3 +netopia-vo4 1842/tcp # netopia-vo4 +netopia-vo4 1842/udp # netopia-vo4 +netopia-vo5 1843/tcp # netopia-vo5 +netopia-vo5 1843/udp # netopia-vo5 +direcpc-dll 1844/tcp # DirecPC-DLL +direcpc-dll 1844/udp # DirecPC-DLL +altalink 1845/tcp # altalink +altalink 1845/udp # altalink +tunstall-pnc 1846/tcp # Tunstall PNC +tunstall-pnc 1846/udp # Tunstall PNC +slp-notify 1847/tcp # SLP Notification +slp-notify 1847/udp # SLP Notification +fjdocdist 1848/tcp # fjdocdist +fjdocdist 1848/udp # fjdocdist +alpha-sms 1849/tcp # ALPHA-SMS +alpha-sms 1849/udp # ALPHA-SMS +gsi 1850/tcp # GSI +gsi 1850/udp # GSI +ctcd 1851/tcp # ctcd +ctcd 1851/udp # ctcd +virtual-time 1852/tcp # Virtual Time +virtual-time 1852/udp # Virtual Time +vids-avtp 1853/tcp # VIDS-AVTP +vids-avtp 1853/udp # VIDS-AVTP +buddy-draw 1854/tcp # Buddy Draw +buddy-draw 1854/udp # Buddy Draw +fiorano-rtrsvc 1855/tcp # Fiorano RtrSvc +fiorano-rtrsvc 1855/udp # Fiorano RtrSvc +fiorano-msgsvc 1856/tcp # Fiorano MsgSvc +fiorano-msgsvc 1856/udp # Fiorano MsgSvc +datacaptor 1857/tcp # DataCaptor +datacaptor 1857/udp # DataCaptor +privateark 1858/tcp # PrivateArk +privateark 1858/udp # PrivateArk +gammafetchsvr 1859/tcp # Gamma Fetcher Server +gammafetchsvr 1859/udp # Gamma Fetcher Server +sunscalar-svc 1860/tcp # SunSCALAR Services +sunscalar-svc 1860/udp # SunSCALAR Services +lecroy-vicp 1861/tcp # LeCroy VICP +lecroy-vicp 1861/udp # LeCroy VICP +mysql-cm-agent 1862/tcp # MySQL Cluster Manager Agent +mysql-cm-agent 1862/udp # MySQL Cluster Manager Agent +msnp 1863/tcp # MSNP +msnp 1863/udp # MSNP +paradym-31port 1864/tcp # Paradym 31 Port +paradym-31port 1864/udp # Paradym 31 Port +entp 1865/tcp # ENTP +entp 1865/udp # ENTP +swrmi 1866/tcp # swrmi +swrmi 1866/udp # swrmi +udrive 1867/tcp # UDRIVE +udrive 1867/udp # UDRIVE +viziblebrowser 1868/tcp # VizibleBrowser +viziblebrowser 1868/udp # VizibleBrowser +transact 1869/tcp # TransAct +transact 1869/udp # TransAct +sunscalar-dns 1870/tcp # SunSCALAR DNS Service +sunscalar-dns 1870/udp # SunSCALAR DNS Service +canocentral0 1871/tcp # Cano Central 0 +canocentral0 1871/udp # Cano Central 0 +canocentral1 1872/tcp # Cano Central 1 +canocentral1 1872/udp # Cano Central 1 +fjmpjps 1873/tcp # Fjmpjps +fjmpjps 1873/udp # Fjmpjps +fjswapsnp 1874/tcp # Fjswapsnp +fjswapsnp 1874/udp # Fjswapsnp +westell-stats 1875/tcp # westell stats +westell-stats 1875/udp # westell stats +ewcappsrv 1876/tcp # ewcappsrv +ewcappsrv 1876/udp # ewcappsrv +hp-webqosdb 1877/tcp # hp-webqosdb +hp-webqosdb 1877/udp # hp-webqosdb +drmsmc 1878/tcp # drmsmc +drmsmc 1878/udp # drmsmc +nettgain-nms 1879/tcp # NettGain NMS +nettgain-nms 1879/udp # NettGain NMS +vsat-control 1880/tcp # Gilat VSAT Control +vsat-control 1880/udp # Gilat VSAT Control +ibm-mqseries2 1881/tcp # IBM WebSphere MQ Everyplace +ibm-mqseries2 1881/udp # IBM WebSphere MQ Everyplace +ecsqdmn 1882/tcp # CA eTrust Common Services +ecsqdmn 1882/udp # CA eTrust Common Services +mqtt 1883/tcp # Message Queuing Telemetry +mqtt 1883/udp # Message Queuing Telemetry +idmaps 1884/tcp # Internet Distance Map Svc +idmaps 1884/udp # Internet Distance Map Svc +vrtstrapserver 1885/tcp # Veritas Trap Server +vrtstrapserver 1885/udp # Veritas Trap Server +leoip 1886/tcp # Leonardo over IP +leoip 1886/udp # Leonardo over IP +filex-lport 1887/tcp # FileX Listening Port +filex-lport 1887/udp # FileX Listening Port +ncconfig 1888/tcp # NC Config Port +ncconfig 1888/udp # NC Config Port +unify-adapter 1889/tcp # Unify Web Adapter Service +unify-adapter 1889/udp # Unify Web Adapter Service +wilkenlistener 1890/tcp # wilkenListener +wilkenlistener 1890/udp # wilkenListener +childkey-notif 1891/tcp # ChildKey Notification +childkey-notif 1891/udp # ChildKey Notification +childkey-ctrl 1892/tcp # ChildKey Control +childkey-ctrl 1892/udp # ChildKey Control +elad 1893/tcp # ELAD Protocol +elad 1893/udp # ELAD Protocol +o2server-port 1894/tcp # O2Server Port +o2server-port 1894/udp # O2Server Port +b-novative-ls 1896/tcp # b-novative license server +b-novative-ls 1896/udp # b-novative license server +metaagent 1897/tcp # MetaAgent +metaagent 1897/udp # MetaAgent +cymtec-port 1898/tcp # Cymtec secure management +cymtec-port 1898/udp # Cymtec secure management +mc2studios 1899/tcp # MC2Studios +mc2studios 1899/udp # MC2Studios +ssdp 1900/tcp # SSDP +ssdp 1900/udp # SSDP +fjicl-tep-a 1901/tcp # Fujitsu ICL Terminal Emulator Program A +fjicl-tep-a 1901/udp # Fujitsu ICL Terminal Emulator Program A +fjicl-tep-b 1902/tcp # Fujitsu ICL Terminal Emulator Program B +fjicl-tep-b 1902/udp # Fujitsu ICL Terminal Emulator Program B +linkname 1903/tcp # Local Link Name Resolution +linkname 1903/udp # Local Link Name Resolution +fjicl-tep-c 1904/tcp # Fujitsu ICL Terminal Emulator Program C +fjicl-tep-c 1904/udp # Fujitsu ICL Terminal Emulator Program C +sugp 1905/tcp # Secure UP.Link Gateway Protocol +sugp 1905/udp # Secure UP.Link Gateway Protocol +tpmd 1906/tcp # TPortMapperReq +tpmd 1906/udp # TPortMapperReq +intrastar 1907/tcp # IntraSTAR +intrastar 1907/udp # IntraSTAR +dawn 1908/tcp # Dawn +dawn 1908/udp # Dawn +global-wlink 1909/tcp # Global World Link +global-wlink 1909/udp # Global World Link +ultrabac 1910/tcp # UltraBac Software communications port +ultrabac 1910/udp # UltraBac Software communications port +rhp-iibp 1912/tcp # rhp-iibp +rhp-iibp 1912/udp # rhp-iibp +armadp 1913/tcp # armadp +armadp 1913/udp # armadp +elm-momentum 1914/tcp # Elm-Momentum +elm-momentum 1914/udp # Elm-Momentum +facelink 1915/tcp # FACELINK +facelink 1915/udp # FACELINK +persona 1916/tcp # Persoft Persona +persona 1916/udp # Persoft Persona +noagent 1917/tcp # nOAgent +noagent 1917/udp # nOAgent +can-nds 1918/tcp # IBM Tivole Directory Service - NDS +can-nds 1918/udp # IBM Tivole Directory Service - NDS +can-dch 1919/tcp # IBM Tivoli Directory Service - DCH +can-dch 1919/udp # IBM Tivoli Directory Service - DCH +can-ferret 1920/tcp # IBM Tivoli Directory Service - FERRET +can-ferret 1920/udp # IBM Tivoli Directory Service - FERRET +noadmin 1921/tcp # NoAdmin +noadmin 1921/udp # NoAdmin +tapestry 1922/tcp # Tapestry +tapestry 1922/udp # Tapestry +spice 1923/tcp # SPICE +spice 1923/udp # SPICE +xiip 1924/tcp # XIIP +xiip 1924/udp # XIIP +discovery-port 1925/tcp # Surrogate Discovery Port +discovery-port 1925/udp # Surrogate Discovery Port +egs 1926/tcp # Evolution Game Server +egs 1926/udp # Evolution Game Server +videte-cipc 1927/tcp # Videte CIPC Port +videte-cipc 1927/udp # Videte CIPC Port +emsd-port 1928/tcp # Expnd Maui Srvr Dscovr +emsd-port 1928/udp # Expnd Maui Srvr Dscovr +bandwiz-system 1929/tcp # Bandwiz System - Server +bandwiz-system 1929/udp # Bandwiz System - Server +driveappserver 1930/tcp # Drive AppServer +driveappserver 1930/udp # Drive AppServer +amdsched 1931/tcp # AMD SCHED +amdsched 1931/udp # AMD SCHED +ctt-broker 1932/tcp # CTT Broker +ctt-broker 1932/udp # CTT Broker +xmapi 1933/tcp # IBM LM MT Agent +xmapi 1933/udp # IBM LM MT Agent +xaapi 1934/tcp # IBM LM Appl Agent +xaapi 1934/udp # IBM LM Appl Agent +macromedia-fcs 1935/tcp # Macromedia Flash Communications Server MX +macromedia-fcs 1935/udp # Macromedia Flash Communications server MX +jetcmeserver 1936/tcp # JetCmeServer Server Port +jetcmeserver 1936/udp # JetCmeServer Server Port +jwserver 1937/tcp # JetVWay Server Port +jwserver 1937/udp # JetVWay Server Port +jwclient 1938/tcp # JetVWay Client Port +jwclient 1938/udp # JetVWay Client Port +jvserver 1939/tcp # JetVision Server Port +jvserver 1939/udp # JetVision Server Port +jvclient 1940/tcp # JetVision Client Port +jvclient 1940/udp # JetVision Client Port +dic-aida 1941/tcp # DIC-Aida +dic-aida 1941/udp # DIC-Aida +res 1942/tcp # Real Enterprise Service +res 1942/udp # Real Enterprise Service +beeyond-media 1943/tcp # Beeyond Media +beeyond-media 1943/udp # Beeyond Media +close-combat 1944/tcp # close-combat +close-combat 1944/udp # close-combat +dialogic-elmd 1945/tcp # dialogic-elmd +dialogic-elmd 1945/udp # dialogic-elmd +tekpls 1946/tcp # tekpls +tekpls 1946/udp # tekpls +sentinelsrm 1947/tcp # SentinelSRM +sentinelsrm 1947/udp # SentinelSRM +eye2eye 1948/tcp # eye2eye +eye2eye 1948/udp # eye2eye +ismaeasdaqlive 1949/tcp # ISMA Easdaq Live +ismaeasdaqlive 1949/udp # ISMA Easdaq Live +ismaeasdaqtest 1950/tcp # ISMA Easdaq Test +ismaeasdaqtest 1950/udp # ISMA Easdaq Test +bcs-lmserver 1951/tcp # bcs-lmserver +bcs-lmserver 1951/udp # bcs-lmserver +mpnjsc 1952/tcp # mpnjsc +mpnjsc 1952/udp # mpnjsc +rapidbase 1953/tcp # Rapid Base +rapidbase 1953/udp # Rapid Base +abr-api 1954/tcp # ABR-API (diskbridge) +abr-api 1954/udp # ABR-API (diskbridge) +abr-secure 1955/tcp # ABR-Secure Data (diskbridge) +abr-secure 1955/udp # ABR-Secure Data (diskbridge) +vrtl-vmf-ds 1956/tcp # Vertel VMF DS +vrtl-vmf-ds 1956/udp # Vertel VMF DS +unix-status 1957/tcp # unix-status +unix-status 1957/udp # unix-status +dxadmind 1958/tcp # CA Administration Daemon +dxadmind 1958/udp # CA Administration Daemon +simp-all 1959/tcp # SIMP Channel +simp-all 1959/udp # SIMP Channel +nasmanager 1960/tcp # Merit DAC NASmanager +nasmanager 1960/udp # Merit DAC NASmanager +bts-appserver 1961/tcp # BTS APPSERVER +bts-appserver 1961/udp # BTS APPSERVER +biap-mp 1962/tcp # BIAP-MP +biap-mp 1962/udp # BIAP-MP +webmachine 1963/tcp # WebMachine +webmachine 1963/udp # WebMachine +solid-e-engine 1964/tcp # SOLID E ENGINE +solid-e-engine 1964/udp # SOLID E ENGINE +tivoli-npm 1965/tcp # Tivoli NPM +tivoli-npm 1965/udp # Tivoli NPM +slush 1966/tcp # Slush +slush 1966/udp # Slush +sns-quote 1967/tcp # SNS Quote +sns-quote 1967/udp # SNS Quote +lipsinc 1968/tcp # LIPSinc +lipsinc 1968/udp # LIPSinc +lipsinc1 1969/tcp # LIPSinc 1 +lipsinc1 1969/udp # LIPSinc 1 +netop-rc 1970/tcp # NetOp Remote Control +netop-rc 1970/udp # NetOp Remote Control +netop-school 1971/tcp # NetOp School +netop-school 1971/udp # NetOp School +intersys-cache 1972/tcp # Cache +intersys-cache 1972/udp # Cache +dlsrap 1973/tcp # Data Link Switching Remote Access Protocol +dlsrap 1973/udp # Data Link Switching Remote Access Protocol +drp 1974/tcp # DRP +drp 1974/udp # DRP +tcoflashagent 1975/tcp # TCO Flash Agent +tcoflashagent 1975/udp # TCO Flash Agent +tcoregagent 1976/tcp # TCO Reg Agent +tcoregagent 1976/udp # TCO Reg Agent +tcoaddressbook 1977/tcp # TCO Address Book +tcoaddressbook 1977/udp # TCO Address Book +unisql 1978/tcp # UniSQL +unisql 1978/udp # UniSQL +unisql-java 1979/tcp # UniSQL Java +unisql-java 1979/udp # UniSQL Java +pearldoc-xact 1980/tcp # PearlDoc XACT +pearldoc-xact 1980/udp # PearlDoc XACT +p2pq 1981/tcp # p2pQ +p2pq 1981/udp # p2pQ +estamp 1982/tcp # Evidentiary Timestamp +estamp 1982/udp # Evidentiary Timestamp +lhtp 1983/tcp # Loophole Test Protocol +lhtp 1983/udp # Loophole Test Protocol +bb 1984/tcp # BB +bb 1984/udp # BB +tr-rsrb-p1 1987/tcp # cisco RSRB Priority 1 port +tr-rsrb-p1 1987/udp # cisco RSRB Priority 1 port +tr-rsrb-p2 1988/tcp # cisco RSRB Priority 2 port +tr-rsrb-p2 1988/udp # cisco RSRB Priority 2 port +tr-rsrb-p3 1989/tcp # cisco RSRB Priority 3 port +tr-rsrb-p3 1989/udp # cisco RSRB Priority 3 port +#mshnet 1989/tcp # MHSnet system +#mshnet 1989/udp # MHSnet system +stun-p1 1990/tcp # cisco STUN Priority 1 port +stun-p1 1990/udp # cisco STUN Priority 1 port +stun-p2 1991/tcp # cisco STUN Priority 2 port +stun-p2 1991/udp # cisco STUN Priority 2 port +stun-p3 1992/tcp # cisco STUN Priority 3 port +stun-p3 1992/udp # cisco STUN Priority 3 port +#ipsendmsg 1992/tcp # IPsendmsg +#ipsendmsg 1992/udp # IPsendmsg +snmp-tcp-port 1993/tcp # cisco SNMP TCP port +snmp-tcp-port 1993/udp # cisco SNMP TCP port +stun-port 1994/tcp # cisco serial tunnel port +stun-port 1994/udp # cisco serial tunnel port +perf-port 1995/tcp # cisco perf port +perf-port 1995/udp # cisco perf port +tr-rsrb-port 1996/tcp # cisco Remote SRB port +tr-rsrb-port 1996/udp # cisco Remote SRB port +x25-svc-port 1998/tcp # cisco X.25 service (XOT) +x25-svc-port 1998/udp # cisco X.25 service (XOT) +tcp-id-port 1999/tcp # cisco identification port +tcp-id-port 1999/udp # cisco identification port +dc 2001/tcp # +wizard 2001/udp # curry +globe 2002/tcp # +globe 2002/udp # +brutus 2003/udp # Brutus Server +mailbox 2004/tcp # +emce 2004/udp # CCWS mm conf +berknet 2005/tcp csync # csync for cyrus-imapd +oracle 2005/udp csync # csync for cyrus-imapd +invokator 2006/tcp # +dectalk 2007/tcp # +raid-am 2007/udp # +conf 2008/tcp # +terminaldb 2008/udp # +news 2009/tcp # +whosockami 2009/udp # +search 2010/tcp # +pipe_server 2010/udp pipe-server # +raid-cc 2011/tcp # raid +servserv 2011/udp # +ttyinfo 2012/tcp # +raid-ac 2012/udp # +raid-am 2013/tcp # +troff 2014/tcp # +raid-sf 2014/udp # +cypress 2015/tcp # +raid-cs 2015/udp # +bootserver 2016/tcp # +bootserver 2016/udp # +cypress-stat 2017/tcp # +bootclient 2017/udp # +terminaldb 2018/tcp # +rellpack 2018/udp # +whosockami 2019/tcp # +about 2019/udp # +xinupageserver 2020/tcp # +xinupageserver 2020/udp # +servexec 2021/tcp # +xinuexpansion1 2021/udp # +down 2022/tcp # +xinuexpansion2 2022/udp # +xinuexpansion3 2023/tcp # +xinuexpansion3 2023/udp # +xinuexpansion4 2024/tcp # +xinuexpansion4 2024/udp # +ellpack 2025/tcp # +xribs 2025/udp # +scrabble 2026/tcp # +scrabble 2026/udp # +shadowserver 2027/tcp # +shadowserver 2027/udp # +submitserver 2028/tcp # +submitserver 2028/udp # +hsrpv6 2029/tcp # Hot Standby Router Protocol IPv6 +hsrpv6 2029/udp # Hot Standby Router Protocol IPv6 +device2 2030/tcp # +device2 2030/udp # +mobrien-chat 2031/tcp # mobrien-chat +mobrien-chat 2031/udp # mobrien-chat +blackboard 2032/tcp # +blackboard 2032/udp # +glogger 2033/tcp # +glogger 2033/udp # +scoremgr 2034/tcp # +scoremgr 2034/udp # +imsldoc 2035/tcp # +imsldoc 2035/udp # +e-dpnet 2036/tcp # Ethernet WS DP network +e-dpnet 2036/udp # Ethernet WS DP network +applus 2037/tcp # APplus Application Server +applus 2037/udp # APplus Application Server +objectmanager 2038/tcp # +objectmanager 2038/udp # +prizma 2039/tcp # Prizma Monitoring Service +prizma 2039/udp # Prizma Monitoring Service +lam 2040/tcp # +lam 2040/udp # +interbase 2041/tcp # +interbase 2041/udp # +isis 2042/tcp # isis +isis 2042/udp # isis +isis-bcast 2043/tcp # isis-bcast +isis-bcast 2043/udp # isis-bcast +rimsl 2044/tcp # +rimsl 2044/udp # +cdfunc 2045/tcp # +cdfunc 2045/udp # +sdfunc 2046/tcp # +sdfunc 2046/udp # +dls-monitor 2048/tcp # +dls-monitor 2048/udp # +av-emb-config 2050/tcp # Avaya EMB Config Port +av-emb-config 2050/udp # Avaya EMB Config Port +epnsdp 2051/tcp # EPNSDP +epnsdp 2051/udp # EPNSDP +clearvisn 2052/tcp # clearVisn Services Port +clearvisn 2052/udp # clearVisn Services Port +lot105-ds-upd 2053/udp # Lot105 DSuper Updates +weblogin 2054/tcp # Weblogin Port +weblogin 2054/udp # Weblogin Port +iop 2055/tcp # Iliad-Odyssey Protocol +iop 2055/udp # Iliad-Odyssey Protocol +omnisky 2056/tcp # OmniSky Port +omnisky 2056/udp # OmniSky Port +rich-cp 2057/tcp # Rich Content Protocol +rich-cp 2057/udp # Rich Content Protocol +newwavesearch 2058/tcp # NewWaveSearchables RMI +newwavesearch 2058/udp # NewWaveSearchables RMI +bmc-messaging 2059/tcp # BMC Messaging Service +bmc-messaging 2059/udp # BMC Messaging Service +teleniumdaemon 2060/tcp # Telenium Daemon IF +teleniumdaemon 2060/udp # Telenium Daemon IF +netmount 2061/tcp # NetMount +netmount 2061/udp # NetMount +icg-swp 2062/tcp # ICG SWP Port +icg-swp 2062/udp # ICG SWP Port +icg-bridge 2063/tcp # ICG Bridge Port +icg-bridge 2063/udp # ICG Bridge Port +icg-iprelay 2064/tcp # ICG IP Relay Port +icg-iprelay 2064/udp # ICG IP Relay Port +dlsrpn 2065/tcp # Data Link Switch Read Port Number +dlsrpn 2065/udp # Data Link Switch Read Port Number +aura 2066/tcp # AVM USB Remote Architecture +aura 2066/udp # AVM USB Remote Architecture +dlswpn 2067/tcp # Data Link Switch Write Port Number +dlswpn 2067/udp # Data Link Switch Write Port Number +avauthsrvprtcl 2068/tcp # Avocent AuthSrv Protocol +avauthsrvprtcl 2068/udp # Avocent AuthSrv Protocol +event-port 2069/tcp # HTTP Event Port +event-port 2069/udp # HTTP Event Port +ah-esp-encap 2070/tcp # AH and ESP Encapsulated in UDP packet +ah-esp-encap 2070/udp # AH and ESP Encapsulated in UDP packet +acp-port 2071/tcp # Axon Control Protocol +acp-port 2071/udp # Axon Control Protocol +msync 2072/tcp # GlobeCast mSync +msync 2072/udp # GlobeCast mSync +gxs-data-port 2073/tcp # DataReel Database Socket +gxs-data-port 2073/udp # DataReel Database Socket +vrtl-vmf-sa 2074/tcp # Vertel VMF SA +vrtl-vmf-sa 2074/udp # Vertel VMF SA +newlixengine 2075/tcp # Newlix ServerWare Engine +newlixengine 2075/udp # Newlix ServerWare Engine +newlixconfig 2076/tcp # Newlix JSPConfig +newlixconfig 2076/udp # Newlix JSPConfig +tsrmagt 2077/tcp # Old Tivoli Storage Manager +tsrmagt 2077/udp # Old Tivoli Storage Manager +tpcsrvr 2078/tcp # IBM Total Productivity Center Server +tpcsrvr 2078/udp # IBM Total Productivity Center Server +idware-router 2079/tcp # IDWARE Router Port +idware-router 2079/udp # IDWARE Router Port +autodesk-nlm 2080/tcp # Autodesk NLM (FLEXlm) +autodesk-nlm 2080/udp # Autodesk NLM (FLEXlm) +kme-trap-port 2081/tcp # KME PRINTER TRAP PORT +kme-trap-port 2081/udp # KME PRINTER TRAP PORT +infowave 2082/tcp # Infowave Mobility Server +infowave 2082/udp # Infowave Mobility Server +radsec 2083/tcp # Secure Radius Service +radsec 2083/udp # Secure Radius Service +sunclustergeo 2084/tcp # SunCluster Geographic +sunclustergeo 2084/udp # SunCluster Geographic +ada-cip 2085/tcp # ADA Control +ada-cip 2085/udp # ADA Control +gnunet 2086/tcp # GNUnet +gnunet 2086/udp # GNUnet +eli 2087/tcp # ELI - Event Logging Integration +eli 2087/udp # ELI - Event Logging Integration +ip-blf 2088/tcp # IP Busy Lamp Field +ip-blf 2088/udp # IP Busy Lamp Field +sep 2089/tcp # Security Encapsulation Protocol - SEP +sep 2089/udp # Security Encapsulation Protocol - SEP +lrp 2090/tcp # Load Report Protocol +lrp 2090/udp # Load Report Protocol +prp 2091/tcp # PRP +prp 2091/udp # PRP +descent3 2092/tcp # Descent 3 +descent3 2092/udp # Descent 3 +nbx-cc 2093/tcp # NBX CC +nbx-cc 2093/udp # NBX CC +nbx-au 2094/tcp # NBX AU +nbx-au 2094/udp # NBX AU +nbx-ser 2095/tcp # NBX SER +nbx-ser 2095/udp # NBX SER +nbx-dir 2096/tcp # NBX DIR +nbx-dir 2096/udp # NBX DIR +jetformpreview 2097/tcp # Jet Form Preview +jetformpreview 2097/udp # Jet Form Preview +dialog-port 2098/tcp # Dialog Port +dialog-port 2098/udp # Dialog Port +h2250-annex-g 2099/tcp # H.225.0 Annex G +h2250-annex-g 2099/udp # H.225.0 Annex G +amiganetfs 2100/tcp # Amiga Network Filesystem +amiganetfs 2100/udp # Amiga Network Filesystem +rtcm-sc104 2101/tcp # rtcm-sc104 +rtcm-sc104 2101/udp # rtcm-sc104 +minipay 2105/udp # MiniPay +mzap 2106/tcp # MZAP +mzap 2106/udp # MZAP +bintec-admin 2107/tcp # BinTec Admin +bintec-admin 2107/udp # BinTec Admin +comcam 2108/tcp # Comcam +comcam 2108/udp # Comcam +ergolight 2109/tcp # Ergolight +ergolight 2109/udp # Ergolight +umsp 2110/tcp # UMSP +umsp 2110/udp # UMSP +dsatp 2111/tcp # DSATP +dsatp 2111/udp # DSATP +idonix-metanet 2112/tcp # Idonix MetaNet +idonix-metanet 2112/udp # Idonix MetaNet +hsl-storm 2113/tcp # HSL StoRM +hsl-storm 2113/udp # HSL StoRM +newheights 2114/tcp # NEWHEIGHTS +newheights 2114/udp # NEWHEIGHTS +kdm 2115/tcp # Key Distribution Manager +kdm 2115/udp # Key Distribution Manager +ccowcmr 2116/tcp # CCOWCMR +ccowcmr 2116/udp # CCOWCMR +mentaclient 2117/tcp # MENTACLIENT +mentaclient 2117/udp # MENTACLIENT +mentaserver 2118/tcp # MENTASERVER +mentaserver 2118/udp # MENTASERVER +gsigatekeeper 2119/tcp # GSIGATEKEEPER +gsigatekeeper 2119/udp # GSIGATEKEEPER +qencp 2120/tcp # Quick Eagle Networks CP +qencp 2120/udp # Quick Eagle Networks CP +scientia-ssdb 2121/tcp # SCIENTIA-SSDB +scientia-ssdb 2121/udp # SCIENTIA-SSDB +caupc-remote 2122/tcp # CauPC Remote Control +caupc-remote 2122/udp # CauPC Remote Control +gtp-control 2123/tcp # GTP-Control Plane (3GPP) +gtp-control 2123/udp # GTP-Control Plane (3GPP) +elatelink 2124/tcp # ELATELINK +elatelink 2124/udp # ELATELINK +lockstep 2125/tcp # LOCKSTEP +lockstep 2125/udp # LOCKSTEP +pktcable-cops 2126/tcp # PktCable-COPS +pktcable-cops 2126/udp # PktCable-COPS +index-pc-wb 2127/tcp # INDEX-PC-WB +index-pc-wb 2127/udp # INDEX-PC-WB +net-steward 2128/tcp # Net Steward Control +net-steward 2128/udp # Net Steward Control +cs-live 2129/tcp # cs-live.com +cs-live 2129/udp # cs-live.com +xds 2130/tcp # XDS +xds 2130/udp # XDS +avantageb2b 2131/tcp # Avantageb2b +avantageb2b 2131/udp # Avantageb2b +solera-epmap 2132/tcp # SoleraTec End Point Map +solera-epmap 2132/udp # SoleraTec End Point Map +zymed-zpp 2133/tcp # ZYMED-ZPP +zymed-zpp 2133/udp # ZYMED-ZPP +avenue 2134/tcp # AVENUE +avenue 2134/udp # AVENUE +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp # Grid Resource Information Server +appworxsrv 2136/tcp # APPWORXSRV +appworxsrv 2136/udp # APPWORXSRV +connect 2137/tcp # CONNECT +connect 2137/udp # CONNECT +unbind-cluster 2138/tcp # UNBIND-CLUSTER +unbind-cluster 2138/udp # UNBIND-CLUSTER +ias-auth 2139/tcp # IAS-AUTH +ias-auth 2139/udp # IAS-AUTH +ias-reg 2140/tcp # IAS-REG +ias-reg 2140/udp # IAS-REG +ias-admind 2141/tcp # IAS-ADMIND +ias-admind 2141/udp # IAS-ADMIND +tdmoip 2142/tcp # TDM OVER IP +tdmoip 2142/udp # TDM OVER IP +lv-jc 2143/tcp # Live Vault Job Control +lv-jc 2143/udp # Live Vault Job Control +lv-ffx 2144/tcp # Live Vault Fast Object Transfer +lv-ffx 2144/udp # Live Vault Fast Object Transfer +lv-pici 2145/tcp # Live Vault Remote Diagnostic Console Support +lv-pici 2145/udp # Live Vault Remote Diagnostic Console Support +lv-not 2146/tcp # Live Vault Admin Event Notification +lv-not 2146/udp # Live Vault Admin Event Notification +lv-auth 2147/tcp # Live Vault Authentication +lv-auth 2147/udp # Live Vault Authentication +veritas-ucl 2148/tcp # VERITAS UNIVERSAL COMMUNICATION LAYER +veritas-ucl 2148/udp # VERITAS UNIVERSAL COMMUNICATION LAYER +acptsys 2149/tcp # ACPTSYS +acptsys 2149/udp # ACPTSYS +docent 2151/tcp # DOCENT +docent 2151/udp # DOCENT +gtp-user 2152/tcp # GTP-User Plane (3GPP) +gtp-user 2152/udp # GTP-User Plane (3GPP) +ctlptc 2153/tcp # Control Protocol +ctlptc 2153/udp # Control Protocol +stdptc 2154/tcp # Standard Protocol +stdptc 2154/udp # Standard Protocol +brdptc 2155/tcp # Bridge Protocol +brdptc 2155/udp # Bridge Protocol +trp 2156/tcp # Talari Reliable Protocol +trp 2156/udp # Talari Reliable Protocol +xnds 2157/tcp # Xerox Network Document Scan Protocol +xnds 2157/udp # Xerox Network Document Scan Protocol +touchnetplus 2158/tcp # TouchNetPlus Service +touchnetplus 2158/udp # TouchNetPlus Service +gdbremote 2159/tcp # GDB Remote Debug Port +gdbremote 2159/udp # GDB Remote Debug Port +apc-2160 2160/tcp # APC 2160 +apc-2160 2160/udp # APC 2160 +apc-2161 2161/tcp # APC 2161 +apc-2161 2161/udp # APC 2161 +navisphere 2162/tcp # Navisphere +navisphere 2162/udp # Navisphere +navisphere-sec 2163/tcp # Navisphere Secure +navisphere-sec 2163/udp # Navisphere Secure +ddns-v3 2164/tcp # Dynamic DNS Version 3 +ddns-v3 2164/udp # Dynamic DNS Version 3 +x-bone-api 2165/tcp # X-Bone API +x-bone-api 2165/udp # X-Bone API +iwserver 2166/tcp # iwserver +iwserver 2166/udp # iwserver +raw-serial 2167/tcp # Raw Async Serial Link +raw-serial 2167/udp # Raw Async Serial Link +easy-soft-mux 2168/tcp # easy-soft Multiplexer +easy-soft-mux 2168/udp # easy-soft Multiplexer +brain 2169/tcp # Backbone for Academic Information Notification (BRAIN) +brain 2169/udp # Backbone for Academic Information Notification (BRAIN) +eyetv 2170/tcp # EyeTV Server Port +eyetv 2170/udp # EyeTV Server Port +msfw-storage 2171/tcp # MS Firewall Storage +msfw-storage 2171/udp # MS Firewall Storage +msfw-s-storage 2172/tcp # MS Firewall SecureStorage +msfw-s-storage 2172/udp # MS Firewall SecureStorage +msfw-replica 2173/tcp # MS Firewall Replication +msfw-replica 2173/udp # MS Firewall Replication +msfw-array 2174/tcp # MS Firewall Intra Array +msfw-array 2174/udp # MS Firewall Intra Array +airsync 2175/tcp # Microsoft Desktop AirSync Protocol +airsync 2175/udp # Microsoft Desktop AirSync Protocol +rapi 2176/tcp # Microsoft ActiveSync Remote API +rapi 2176/udp # Microsoft ActiveSync Remote API +qwave 2177/tcp # qWAVE Bandwidth Estimate +qwave 2177/udp # qWAVE Bandwidth Estimate +bitspeer 2178/tcp # Peer Services for BITS +bitspeer 2178/udp # Peer Services for BITS +vmrdp 2179/tcp # Microsoft RDP for virtual machines +vmrdp 2179/udp # Microsoft RDP for virtual machines +mc-gt-srv 2180/tcp # Millicent Vendor Gateway Server +mc-gt-srv 2180/udp # Millicent Vendor Gateway Server +eforward 2181/tcp # eforward +eforward 2181/udp # eforward +cgn-stat 2182/tcp # CGN status +cgn-stat 2182/udp # CGN status +cgn-config 2183/tcp # Code Green configuration +cgn-config 2183/udp # Code Green configuration +onbase-dds 2185/tcp # OnBase Distributed Disk Services +onbase-dds 2185/udp # OnBase Distributed Disk Services +gtaua 2186/tcp # Guy-Tek Automated Update Applications +gtaua 2186/udp # Guy-Tek Automated Update Applications +ssmc 2187/tcp # Sepehr System Management Control +ssmd 2187/udp # Sepehr System Management Data +radware-rpm 2188/tcp # Radware Resource Pool Manager +radware-rpm-s 2189/tcp # Secure Radware Resource Pool Manager +tivoconnect 2190/tcp # TiVoConnect Beacon +tivoconnect 2190/udp # TiVoConnect Beacon +tvbus 2191/tcp # TvBus Messaging +tvbus 2191/udp # TvBus Messaging +asdis 2192/tcp # ASDIS software management +asdis 2192/udp # ASDIS software management +drwcs 2193/tcp # Dr.Web Enterprise Management Service +drwcs 2193/udp # Dr.Web Enterprise Management Service +mnp-exchange 2197/tcp # MNP data exchange +mnp-exchange 2197/udp # MNP data exchange +onehome-remote 2198/tcp # OneHome Remote Access +onehome-remote 2198/udp # OneHome Remote Access +onehome-help 2199/tcp # OneHome Service Port +onehome-help 2199/udp # OneHome Service Port +ici 2200/tcp # ICI +ici 2200/udp # ICI +ats 2201/tcp # Advanced Training System Program +ats 2201/udp # Advanced Training System Program +imtc-map 2202/tcp # Int. Multimedia Teleconferencing Cosortium +imtc-map 2202/udp # Int. Multimedia Teleconferencing Cosortium +b2-runtime 2203/tcp # b2 Runtime Protocol +b2-runtime 2203/udp # b2 Runtime Protocol +b2-license 2204/tcp # b2 License Server +b2-license 2204/udp # b2 License Server +jps 2205/tcp # Java Presentation Server +jps 2205/udp # Java Presentation Server +hpocbus 2206/tcp # HP OpenCall bus +hpocbus 2206/udp # HP OpenCall bus +hpssd 2207/tcp # HP Status and Services +hpssd 2207/udp # HP Status and Services +hpiod 2208/tcp # HP I/O Backend +hpiod 2208/udp # HP I/O Backend +rimf-ps 2209/tcp # HP RIM for Files Portal Service +rimf-ps 2209/udp # HP RIM for Files Portal Service +noaaport 2210/tcp # NOAAPORT Broadcast Network +noaaport 2210/udp # NOAAPORT Broadcast Network +emwin 2211/tcp # EMWIN +emwin 2211/udp # EMWIN +leecoposserver 2212/tcp # LeeCO POS Server Service +leecoposserver 2212/udp # LeeCO POS Server Service +kali 2213/tcp # Kali +kali 2213/udp # Kali +rpi 2214/tcp # RDQ Protocol Interface +rpi 2214/udp # RDQ Protocol Interface +ipcore 2215/tcp # IPCore.co.za GPRS +ipcore 2215/udp # IPCore.co.za GPRS +vtu-comms 2216/tcp # VTU data service +vtu-comms 2216/udp # VTU data service +gotodevice 2217/tcp # GoToDevice Device Management +gotodevice 2217/udp # GoToDevice Device Management +bounzza 2218/tcp # Bounzza IRC Proxy +bounzza 2218/udp # Bounzza IRC Proxy +netiq-ncap 2219/tcp # NetIQ NCAP Protocol +netiq-ncap 2219/udp # NetIQ NCAP Protocol +netiq 2220/tcp # NetIQ End2End +netiq 2220/udp # NetIQ End2End +ethernet-ip-s 2221/tcp # EtherNet/IP over TLS +ethernet-ip-s 2221/udp # EtherNet/IP over DTLS +EtherNet/IP-1 2222/tcp EtherNet-IP-1 # EtherNet/IP I/O +EtherNet/IP-1 2222/udp EtherNet-IP-1 # EtherNet/IP I/O +rockwell-csp2 2223/tcp # Rockwell CSP2 +rockwell-csp2 2223/udp # Rockwell CSP2 +efi-mg 2224/tcp # Easy Flexible Internet/Multiplayer Games +efi-mg 2224/udp # Easy Flexible Internet/Multiplayer Games +rcip-itu 2225/tcp # Resource Connection Initiation Protocol +rcip-itu 2225/sctp # Resource Connection Initiation Protocol +di-drm 2226/tcp # Digital Instinct DRM +di-drm 2226/udp # Digital Instinct DRM +di-msg 2227/tcp # DI Messaging Service +di-msg 2227/udp # DI Messaging Service +ehome-ms 2228/tcp # eHome Message Server +ehome-ms 2228/udp # eHome Message Server +datalens 2229/tcp # DataLens Service +datalens 2229/udp # DataLens Service +queueadm 2230/tcp # MetaSoft Job Queue Administration Service +queueadm 2230/udp # MetaSoft Job Queue Administration Service +wimaxasncp 2231/tcp # WiMAX ASN Control Plane Protocol +wimaxasncp 2231/udp # WiMAX ASN Control Plane Protocol +ivs-video 2232/tcp # IVS Video default +ivs-video 2232/udp # IVS Video default +infocrypt 2233/tcp # INFOCRYPT +infocrypt 2233/udp # INFOCRYPT +directplay 2234/tcp # DirectPlay +directplay 2234/udp # DirectPlay +sercomm-wlink 2235/tcp # Sercomm-WLink +sercomm-wlink 2235/udp # Sercomm-WLink +nani 2236/tcp # Nani +nani 2236/udp # Nani +optech-port1-lm 2237/tcp # Optech Port1 License Manager +optech-port1-lm 2237/udp # Optech Port1 License Manager +aviva-sna 2238/tcp # AVIVA SNA SERVER +aviva-sna 2238/udp # AVIVA SNA SERVER +imagequery 2239/tcp # Image Query +imagequery 2239/udp # Image Query +recipe 2240/tcp # RECIPe +recipe 2240/udp # RECIPe +ivsd 2241/tcp # IVS Daemon +ivsd 2241/udp # IVS Daemon +foliocorp 2242/tcp # Folio Remote Server +foliocorp 2242/udp # Folio Remote Server +magicom 2243/tcp # Magicom Protocol +magicom 2243/udp # Magicom Protocol +nmsserver 2244/tcp # NMS Server +nmsserver 2244/udp # NMS Server +hao 2245/tcp # HaO +hao 2245/udp # HaO +pc-mta-addrmap 2246/tcp # PacketCable MTA Addr Map +pc-mta-addrmap 2246/udp # PacketCable MTA Addr Map +antidotemgrsvr 2247/tcp # Antidote Deployment Manager Service +antidotemgrsvr 2247/udp # Antidote Deployment Manager Service +ums 2248/tcp # User Management Service +ums 2248/udp # User Management Service +rfmp 2249/tcp # RISO File Manager Protocol +rfmp 2249/udp # RISO File Manager Protocol +remote-collab 2250/tcp # remote-collab +remote-collab 2250/udp # remote-collab +dif-port 2251/tcp # Distributed Framework Port +dif-port 2251/udp # Distributed Framework Port +njenet-ssl 2252/tcp # NJENET using SSL +njenet-ssl 2252/udp # NJENET using SSL +dtv-chan-req 2253/tcp # DTV Channel Request +dtv-chan-req 2253/udp # DTV Channel Request +seispoc 2254/tcp # Seismic P.O.C. Port +seispoc 2254/udp # Seismic P.O.C. Port +vrtp 2255/tcp # VRTP - ViRtue Transfer Protocol +vrtp 2255/udp # VRTP - ViRtue Transfer Protocol +pcc-mfp 2256/tcp # PCC MFP +pcc-mfp 2256/udp # PCC MFP +simple-tx-rx 2257/tcp # simple text/file transfer +simple-tx-rx 2257/udp # simple text/file transfer +rcts 2258/tcp # Rotorcraft Communications Test System +rcts 2258/udp # Rotorcraft Communications Test System +apc-2260 2260/tcp # APC 2260 +apc-2260 2260/udp # APC 2260 +comotionmaster 2261/tcp # CoMotion Master Server +comotionmaster 2261/udp # CoMotion Master Server +comotionback 2262/tcp # CoMotion Backup Server +comotionback 2262/udp # CoMotion Backup Server +ecwcfg 2263/tcp # ECweb Configuration Service +ecwcfg 2263/udp # ECweb Configuration Service +apx500api-1 2264/tcp # Audio Precision Apx500 API Port 1 +apx500api-1 2264/udp # Audio Precision Apx500 API Port 1 +apx500api-2 2265/tcp # Audio Precision Apx500 API Port 2 +apx500api-2 2265/udp # Audio Precision Apx500 API Port 2 +mfserver 2266/tcp # M-Files Server +mfserver 2266/udp # M-files Server +ontobroker 2267/tcp # OntoBroker +ontobroker 2267/udp # OntoBroker +amt 2268/tcp # AMT +amt 2268/udp # AMT +mikey 2269/tcp # MIKEY +mikey 2269/udp # MIKEY +starschool 2270/tcp # starSchool +starschool 2270/udp # starSchool +mmcals 2271/tcp # Secure Meeting Maker Scheduling +mmcals 2271/udp # Secure Meeting Maker Scheduling +mmcal 2272/tcp # Meeting Maker Scheduling +mmcal 2272/udp # Meeting Maker Scheduling +mysql-im 2273/tcp # MySQL Instance Manager +mysql-im 2273/udp # MySQL Instance Manager +pcttunnell 2274/tcp # PCTTunneller +pcttunnell 2274/udp # PCTTunneller +ibridge-data 2275/tcp # iBridge Conferencing +ibridge-data 2275/udp # iBridge Conferencing +ibridge-mgmt 2276/tcp # iBridge Management +ibridge-mgmt 2276/udp # iBridge Management +bluectrlproxy 2277/tcp # Bt device control proxy +bluectrlproxy 2277/udp # Bt device control proxy +s3db 2278/tcp # Simple Stacked Sequences Database +s3db 2278/udp # Simple Stacked Sequences Database +xmquery 2279/tcp # xmquery +xmquery 2279/udp # xmquery +lnvpoller 2280/tcp # LNVPOLLER +lnvpoller 2280/udp # LNVPOLLER +lnvconsole 2281/tcp # LNVCONSOLE +lnvconsole 2281/udp # LNVCONSOLE +lnvalarm 2282/tcp # LNVALARM +lnvalarm 2282/udp # LNVALARM +lnvstatus 2283/tcp # LNVSTATUS +lnvstatus 2283/udp # LNVSTATUS +lnvmaps 2284/tcp # LNVMAPS +lnvmaps 2284/udp # LNVMAPS +lnvmailmon 2285/tcp # LNVMAILMON +lnvmailmon 2285/udp # LNVMAILMON +nas-metering 2286/tcp # NAS-Metering +nas-metering 2286/udp # NAS-Metering +dna 2287/tcp # DNA +dna 2287/udp # DNA +netml 2288/tcp # NETML +netml 2288/udp # NETML +dict-lookup 2289/tcp # Lookup dict server +dict-lookup 2289/udp # Lookup dict server +sonus-logging 2290/tcp # Sonus Logging Services +sonus-logging 2290/udp # Sonus Logging Services +eapsp 2291/tcp # EPSON Advanced Printer Share Protocol +eapsp 2291/udp # EPSON Advanced Printer Share Protocol +mib-streaming 2292/tcp # Sonus Element Management Services +mib-streaming 2292/udp # Sonus Element Management Services +npdbgmngr 2293/tcp # Network Platform Debug Manager +npdbgmngr 2293/udp # Network Platform Debug Manager +konshus-lm 2294/tcp # Konshus License Manager (FLEX) +konshus-lm 2294/udp # Konshus License Manager (FLEX) +advant-lm 2295/tcp # Advant License Manager +advant-lm 2295/udp # Advant License Manager +theta-lm 2296/tcp # Theta License Manager (Rainbow) +theta-lm 2296/udp # Theta License Manager (Rainbow) +d2k-datamover1 2297/tcp # D2K DataMover 1 +d2k-datamover1 2297/udp # D2K DataMover 1 +d2k-datamover2 2298/tcp # D2K DataMover 2 +d2k-datamover2 2298/udp # D2K DataMover 2 +pc-telecommute 2299/tcp # PC Telecommute +pc-telecommute 2299/udp # PC Telecommute +cvmmon 2300/tcp # CVMMON +cvmmon 2300/udp # CVMMON +cpq-wbem 2301/tcp # Compaq HTTP +cpq-wbem 2301/udp # Compaq HTTP +binderysupport 2302/tcp # Bindery Support +binderysupport 2302/udp # Bindery Support +proxy-gateway 2303/tcp # Proxy Gateway +proxy-gateway 2303/udp # Proxy Gateway +attachmate-uts 2304/tcp # Attachmate UTS +attachmate-uts 2304/udp # Attachmate UTS +mt-scaleserver 2305/tcp # MT ScaleServer +mt-scaleserver 2305/udp # MT ScaleServer +tappi-boxnet 2306/tcp # TAPPI BoxNet +tappi-boxnet 2306/udp # TAPPI BoxNet +pehelp 2307/tcp # pehelp +pehelp 2307/udp # pehelp +sdhelp 2308/tcp # sdhelp +sdhelp 2308/udp # sdhelp +sdserver 2309/tcp # SD Server +sdserver 2309/udp # SD Server +sdclient 2310/tcp # SD Client +sdclient 2310/udp # SD Client +messageservice 2311/tcp # Message Service +messageservice 2311/udp # Message Service +wanscaler 2312/tcp # WANScaler Communication Service +wanscaler 2312/udp # WANScaler Communication Service +iapp 2313/tcp # IAPP (Inter Access Point Protocol) +iapp 2313/udp # IAPP (Inter Access Point Protocol) +cr-websystems 2314/tcp # CR WebSystems +cr-websystems 2314/udp # CR WebSystems +precise-sft 2315/tcp # Precise Sft. +precise-sft 2315/udp # Precise Sft. +sent-lm 2316/tcp # SENT License Manager +sent-lm 2316/udp # SENT License Manager +attachmate-g32 2317/tcp # Attachmate G32 +attachmate-g32 2317/udp # Attachmate G32 +cadencecontrol 2318/tcp # Cadence Control +cadencecontrol 2318/udp # Cadence Control +infolibria 2319/tcp # InfoLibria +infolibria 2319/udp # InfoLibria +siebel-ns 2320/tcp # Siebel NS +siebel-ns 2320/udp # Siebel NS +rdlap 2321/tcp # RDLAP +rdlap 2321/udp # RDLAP +ofsd 2322/tcp # ofsd +ofsd 2322/udp # ofsd +3d-nfsd 2323/tcp # 3d-nfsd +3d-nfsd 2323/udp # 3d-nfsd +cosmocall 2324/tcp # Cosmocall +cosmocall 2324/udp # Cosmocall +ansysli 2325/tcp # ANSYS Licensing Interconnect +ansysli 2325/udp # ANSYS Licensing Interconnect +idcp 2326/tcp # IDCP +idcp 2326/udp # IDCP +xingcsm 2327/tcp # xingcsm +xingcsm 2327/udp # xingcsm +netrix-sftm 2328/tcp # Netrix SFTM +netrix-sftm 2328/udp # Netrix SFTM +tscchat 2330/tcp # TSCCHAT +tscchat 2330/udp # TSCCHAT +agentview 2331/tcp # AGENTVIEW +agentview 2331/udp # AGENTVIEW +rcc-host 2332/tcp # RCC Host +rcc-host 2332/udp # RCC Host +snapp 2333/tcp # SNAPP +snapp 2333/udp # SNAPP +ace-client 2334/tcp # ACE Client Auth +ace-client 2334/udp # ACE Client Auth +ace-proxy 2335/tcp # ACE Proxy +ace-proxy 2335/udp # ACE Proxy +appleugcontrol 2336/tcp # Apple UG Control +appleugcontrol 2336/udp # Apple UG Control +ideesrv 2337/tcp # ideesrv +ideesrv 2337/udp # ideesrv +norton-lambert 2338/tcp # Norton Lambert +norton-lambert 2338/udp # Norton Lambert +3com-webview 2339/tcp # 3Com WebView +3com-webview 2339/udp # 3Com WebView +wrs_registry 2340/tcp wrs-registry # WRS Registry +wrs_registry 2340/udp wrs-registry # WRS Registry +xiostatus 2341/tcp # XIO Status +xiostatus 2341/udp # XIO Status +manage-exec 2342/tcp # Seagate Manage Exec +manage-exec 2342/udp # Seagate Manage Exec +nati-logos 2343/tcp # nati logos +nati-logos 2343/udp # nati logos +fcmsys 2344/tcp # fcmsys +fcmsys 2344/udp # fcmsys +dbm 2345/tcp # dbm +dbm 2345/udp # dbm +redstorm_join 2346/tcp redstorm-join # Game Connection Port +redstorm_join 2346/udp redstorm-join # Game Connection Port +redstorm_find 2347/tcp redstorm-find # Game Announcement and Location +redstorm_find 2347/udp redstorm-find # Game Announcement and Location +redstorm_info 2348/tcp redstorm-info # Information to query for game status +redstorm_info 2348/udp redstorm-info # Information to query for game status +redstorm_diag 2349/tcp redstorm-diag # Diagnostics Port +redstorm_diag 2349/udp redstorm-diag # Diagnostics Port +psbserver 2350/tcp # Pharos Booking Server +psbserver 2350/udp # Pharos Booking Server +psrserver 2351/tcp # psrserver +psrserver 2351/udp # psrserver +pslserver 2352/tcp # pslserver +pslserver 2352/udp # pslserver +pspserver 2353/tcp # pspserver +pspserver 2353/udp # pspserver +psprserver 2354/tcp # psprserver +psprserver 2354/udp # psprserver +psdbserver 2355/tcp # psdbserver +psdbserver 2355/udp # psdbserver +gxtelmd 2356/tcp # GXT License Managemant +gxtelmd 2356/udp # GXT License Managemant +unihub-server 2357/tcp # UniHub Server +unihub-server 2357/udp # UniHub Server +futrix 2358/tcp # Futrix +futrix 2358/udp # Futrix +flukeserver 2359/tcp # FlukeServer +flukeserver 2359/udp # FlukeServer +nexstorindltd 2360/tcp # NexstorIndLtd +nexstorindltd 2360/udp # NexstorIndLtd +tl1 2361/tcp # TL1 +tl1 2361/udp # TL1 +digiman 2362/tcp # digiman +digiman 2362/udp # digiman +mediacntrlnfsd 2363/tcp # Media Central NFSD +mediacntrlnfsd 2363/udp # Media Central NFSD +oi-2000 2364/tcp # OI-2000 +oi-2000 2364/udp # OI-2000 +dbref 2365/tcp # dbref +dbref 2365/udp # dbref +qip-login 2366/tcp # qip-login +qip-login 2366/udp # qip-login +service-ctrl 2367/tcp # Service Control +service-ctrl 2367/udp # Service Control +opentable 2368/tcp # OpenTable +opentable 2368/udp # OpenTable +l3-hbmon 2370/tcp # L3-HBMon +l3-hbmon 2370/udp # L3-HBMon +hp-rda 2371/tcp # HP Remote Device Access +lanmessenger 2372/tcp # LanMessenger +lanmessenger 2372/udp # LanMessenger +remographlm 2373/tcp # Remograph License Manager +docker 2375/tcp # Docker REST API (plain text) +docker-s 2376/tcp # Docker REST API (ssl) +etcd-client 2379/tcp # etcd client communication +etcd-server 2380/tcp # etcd server to server communication +hydra 2374/tcp # Hydra RPC +compaq-https 2381/tcp # Compaq HTTPS +compaq-https 2381/udp # Compaq HTTPS +ms-olap3 2382/tcp # Microsoft OLAP +ms-olap3 2382/udp # Microsoft OLAP +ms-olap4 2383/tcp # Microsoft OLAP +ms-olap4 2383/udp # Microsoft OLAP +sd-request 2384/tcp # SD-REQUEST +sd-capacity 2384/udp # SD-CAPACITY +sd-data 2385/tcp # SD-DATA +sd-data 2385/udp # SD-DATA +virtualtape 2386/tcp # Virtual Tape +virtualtape 2386/udp # Virtual Tape +vsamredirector 2387/tcp # VSAM Redirector +vsamredirector 2387/udp # VSAM Redirector +mynahautostart 2388/tcp # MYNAH AutoStart +mynahautostart 2388/udp # MYNAH AutoStart +ovsessionmgr 2389/tcp # OpenView Session Mgr +ovsessionmgr 2389/udp # OpenView Session Mgr +rsmtp 2390/tcp # RSMTP +rsmtp 2390/udp # RSMTP +3com-net-mgmt 2391/tcp # 3COM Net Management +3com-net-mgmt 2391/udp # 3COM Net Management +tacticalauth 2392/tcp # Tactical Auth +tacticalauth 2392/udp # Tactical Auth +ms-olap1 2393/tcp # MS OLAP 1 +ms-olap1 2393/udp # MS OLAP 1 +ms-olap2 2394/tcp # MS OLAP 2 +ms-olap2 2394/udp # MS OLAP 2 +lan900_remote 2395/tcp lan900-remote # LAN900 Remote +lan900_remote 2395/udp lan900-remote # LAN900 Remote +wusage 2396/tcp # Wusage +wusage 2396/udp # Wusage +ncl 2397/tcp # NCL +ncl 2397/udp # NCL +orbiter 2398/tcp # Orbiter +orbiter 2398/udp # Orbiter +fmpro-fdal 2399/tcp # FileMaker, Inc. - Data Access Layer +fmpro-fdal 2399/udp # FileMaker, Inc. - Data Access Layer +opequus-server 2400/tcp # OpEquus Server +opequus-server 2400/udp # OpEquus Server +taskmaster2000 2402/tcp # TaskMaster 2000 Server +taskmaster2000 2402/udp # TaskMaster 2000 Server +#taskmaster2000 2403/tcp # TaskMaster 2000 Web +#taskmaster2000 2403/udp # TaskMaster 2000 Web +iec-104 2404/tcp # IEC 60870-5-104 process control over IP +iec-104 2404/udp # IEC 60870-5-104 process control over IP +trc-netpoll 2405/tcp # TRC Netpoll +trc-netpoll 2405/udp # TRC Netpoll +jediserver 2406/tcp # JediServer +jediserver 2406/udp # JediServer +orion 2407/tcp # Orion +orion 2407/udp # Orion +railgun-webaccl 2408/tcp # CloudFlare Railgun Web +sns-protocol 2409/tcp # SNS Protocol +sns-protocol 2409/udp # SNS Protocol +vrts-registry 2410/tcp # VRTS Registry +vrts-registry 2410/udp # VRTS Registry +netwave-ap-mgmt 2411/tcp # Netwave AP Management +netwave-ap-mgmt 2411/udp # Netwave AP Management +cdn 2412/tcp # CDN +cdn 2412/udp # CDN +orion-rmi-reg 2413/tcp # orion-rmi-reg +orion-rmi-reg 2413/udp # orion-rmi-reg +beeyond 2414/tcp # Beeyond +beeyond 2414/udp # Beeyond +codima-rtp 2415/tcp # Codima Remote Transaction Protocol +codima-rtp 2415/udp # Codima Remote Transaction Protocol +rmtserver 2416/tcp # RMT Server +rmtserver 2416/udp # RMT Server +composit-server 2417/tcp # Composit Server +composit-server 2417/udp # Composit Server +cas 2418/tcp # cas +cas 2418/udp # cas +attachmate-s2s 2419/tcp # Attachmate S2S +attachmate-s2s 2419/udp # Attachmate S2S +dslremote-mgmt 2420/tcp # DSL Remote Management +dslremote-mgmt 2420/udp # DSL Remote Management +g-talk 2421/tcp # G-Talk +g-talk 2421/udp # G-Talk +crmsbits 2422/tcp # CRMSBITS +crmsbits 2422/udp # CRMSBITS +rnrp 2423/tcp # RNRP +rnrp 2423/udp # RNRP +kofax-svr 2424/tcp # KOFAX-SVR +kofax-svr 2424/udp # KOFAX-SVR +fjitsuappmgr 2425/tcp # Fujitsu App Manager +fjitsuappmgr 2425/udp # Fujitsu App Manager +vcmp 2426/tcp # VeloCloud MultiPath Protocol +vcmp 2426/udp # VeloCloud MultiPath Protocol +mgcp-gateway 2427/tcp # Media Gateway Control Protocol Gateway +mgcp-gateway 2427/udp # Media Gateway Control Protocol Gateway +ott 2428/tcp # One Way Trip Time +ott 2428/udp # One Way Trip Time +ft-role 2429/tcp # FT-ROLE +ft-role 2429/udp # FT-ROLE +pxc-epmap 2434/tcp # pxc-epmap +pxc-epmap 2434/udp # pxc-epmap +optilogic 2435/tcp # OptiLogic +optilogic 2435/udp # OptiLogic +topx 2436/tcp # TOP/X +topx 2436/udp # TOP/X +sybasedbsynch 2439/tcp # SybaseDBSynch +sybasedbsynch 2439/udp # SybaseDBSynch +spearway 2440/tcp # Spearway Lockers +spearway 2440/udp # Spearway Lockers +pvsw-inet 2441/tcp # Pervasive I*net Data Server +pvsw-inet 2441/udp # Pervasive I*net Data Server +netangel 2442/tcp # Netangel +netangel 2442/udp # Netangel +powerclientcsf 2443/tcp # PowerClient Central Storage Facility +powerclientcsf 2443/udp # PowerClient Central Storage Facility +btpp2sectrans 2444/tcp # BT PP2 Sectrans +btpp2sectrans 2444/udp # BT PP2 Sectrans +dtn1 2445/tcp # DTN1 +dtn1 2445/udp # DTN1 +bues_service 2446/tcp bues-service # bues_service +bues_service 2446/udp bues-service # bues_service +ovwdb 2447/tcp # OpenView NNM daemon +ovwdb 2447/udp # OpenView NNM daemon +hpppssvr 2448/tcp # hpppsvr +hpppssvr 2448/udp # hpppsvr +ratl 2449/tcp # RATL +ratl 2449/udp # RATL +netadmin 2450/tcp # netadmin +netadmin 2450/udp # netadmin +netchat 2451/tcp # netchat +netchat 2451/udp # netchat +snifferclient 2452/tcp # SnifferClient +snifferclient 2452/udp # SnifferClient +madge-ltd 2453/tcp # madge ltd +madge-ltd 2453/udp # madge ltd +indx-dds 2454/tcp # IndX-DDS +indx-dds 2454/udp # IndX-DDS +wago-io-system 2455/tcp # WAGO-IO-SYSTEM +wago-io-system 2455/udp # WAGO-IO-SYSTEM +altav-remmgt 2456/tcp # altav-remmgt +altav-remmgt 2456/udp # altav-remmgt +rapido-ip 2457/tcp # Rapido_IP +rapido-ip 2457/udp # Rapido_IP +griffin 2458/tcp # griffin +griffin 2458/udp # griffin +community 2459/tcp # Community +community 2459/udp # Community +ms-theater 2460/tcp # ms-theater +ms-theater 2460/udp # ms-theater +qadmifoper 2461/tcp # qadmifoper +qadmifoper 2461/udp # qadmifoper +qadmifevent 2462/tcp # qadmifevent +qadmifevent 2462/udp # qadmifevent +lsi-raid-mgmt 2463/tcp # LSI RAID Management +lsi-raid-mgmt 2463/udp # LSI RAID Management +direcpc-si 2464/tcp # DirecPC SI +direcpc-si 2464/udp # DirecPC SI +lbm 2465/tcp # Load Balance Management +lbm 2465/udp # Load Balance Management +lbf 2466/tcp # Load Balance Forwarding +lbf 2466/udp # Load Balance Forwarding +high-criteria 2467/tcp # High Criteria +high-criteria 2467/udp # High Criteria +qip-msgd 2468/tcp # qip_msgd +qip-msgd 2468/udp # qip_msgd +mti-tcs-comm 2469/tcp # MTI-TCS-COMM +mti-tcs-comm 2469/udp # MTI-TCS-COMM +taskman-port 2470/tcp # taskman port +taskman-port 2470/udp # taskman port +seaodbc 2471/tcp # SeaODBC +seaodbc 2471/udp # SeaODBC +c3 2472/tcp # C3 +c3 2472/udp # C3 +aker-cdp 2473/tcp # Aker-cdp +aker-cdp 2473/udp # Aker-cdp +vitalanalysis 2474/tcp # Vital Analysis +vitalanalysis 2474/udp # Vital Analysis +ace-server 2475/tcp # ACE Server +ace-server 2475/udp # ACE Server +ace-svr-prop 2476/tcp # ACE Server Propagation +ace-svr-prop 2476/udp # ACE Server Propagation +ssm-cvs 2477/tcp # SecurSight Certificate Valifation Service +ssm-cvs 2477/udp # SecurSight Certificate Valifation Service +ssm-cssps 2478/tcp # SecurSight Authentication Server (SSL) +ssm-cssps 2478/udp # SecurSight Authentication Server (SSL) +ssm-els 2479/tcp # SecurSight Event Logging Server (SSL) +ssm-els 2479/udp # SecurSight Event Logging Server (SSL) +powerexchange 2480/tcp # Informatica PowerExchange Listener +powerexchange 2480/udp # Informatica PowerExchange Listener +giop 2481/tcp # Oracle GIOP +giop 2481/udp # Oracle GIOP +giop-ssl 2482/tcp # Oracle GIOP SSL +giop-ssl 2482/udp # Oracle GIOP SSL +ttc 2483/tcp # Oracle TTC +ttc 2483/udp # Oracle TTC +ttc-ssl 2484/tcp # Oracle TTC SSL +ttc-ssl 2484/udp # Oracle TTC SSL +netobjects1 2485/tcp # Net Objects1 +netobjects1 2485/udp # Net Objects1 +netobjects2 2486/tcp # Net Objects2 +netobjects2 2486/udp # Net Objects2 +pns 2487/tcp # Policy Notice Service +pns 2487/udp # Policy Notice Service +moy-corp 2488/tcp # Moy Corporation +moy-corp 2488/udp # Moy Corporation +tsilb 2489/tcp # TSILB +tsilb 2489/udp # TSILB +qip-qdhcp 2490/tcp # qip_qdhcp +qip-qdhcp 2490/udp # qip_qdhcp +conclave-cpp 2491/tcp # Conclave CPP +conclave-cpp 2491/udp # Conclave CPP +groove 2492/tcp # GROOVE +groove 2492/udp # GROOVE +talarian-mqs 2493/tcp # Talarian MQS +talarian-mqs 2493/udp # Talarian MQS +bmc-ar 2494/tcp # BMC AR +bmc-ar 2494/udp # BMC AR +fast-rem-serv 2495/tcp # Fast Remote Services +fast-rem-serv 2495/udp # Fast Remote Services +dirgis 2496/tcp # DIRGIS +dirgis 2496/udp # DIRGIS +quaddb 2497/tcp # Quad DB +quaddb 2497/udp # Quad DB +odn-castraq 2498/tcp # ODN-CasTraq +odn-castraq 2498/udp # ODN-CasTraq +rtsserv 2500/tcp # Resource Tracking system server +rtsserv 2500/udp # Resource Tracking system server +rtsclient 2501/tcp # Resource Tracking system client +rtsclient 2501/udp # Resource Tracking system client +kentrox-prot 2502/tcp # Kentrox Protocol +kentrox-prot 2502/udp # Kentrox Protocol +nms-dpnss 2503/tcp # NMS-DPNSS +nms-dpnss 2503/udp # NMS-DPNSS +wlbs 2504/tcp # WLBS +wlbs 2504/udp # WLBS +ppcontrol 2505/tcp # PowerPlay Control +ppcontrol 2505/udp # PowerPlay Control +jbroker 2506/tcp # jbroker +jbroker 2506/udp # jbroker +spock 2507/tcp # spock +spock 2507/udp # spock +jdatastore 2508/tcp # JDataStore +jdatastore 2508/udp # JDataStore +fjmpss 2509/tcp # fjmpss +fjmpss 2509/udp # fjmpss +fjappmgrbulk 2510/tcp # fjappmgrbulk +fjappmgrbulk 2510/udp # fjappmgrbulk +metastorm 2511/tcp # Metastorm +metastorm 2511/udp # Metastorm +citrixima 2512/tcp # Citrix IMA +citrixima 2512/udp # Citrix IMA +citrixadmin 2513/tcp # Citrix ADMIN +citrixadmin 2513/udp # Citrix ADMIN +facsys-ntp 2514/tcp # Facsys NTP +facsys-ntp 2514/udp # Facsys NTP +facsys-router 2515/tcp # Facsys Router +facsys-router 2515/udp # Facsys Router +maincontrol 2516/tcp # Main Control +maincontrol 2516/udp # Main Control +call-sig-trans 2517/tcp # H.323 Annex E call signaling transport +call-sig-trans 2517/udp # H.323 Annex E call signaling transport +willy 2518/tcp # Willy +willy 2518/udp # Willy +globmsgsvc 2519/tcp # globmsgsvc +globmsgsvc 2519/udp # globmsgsvc +pvsw 2520/tcp # Pervasive Listener +pvsw 2520/udp # Pervasive Listener +adaptecmgr 2521/tcp # Adaptec Manager +adaptecmgr 2521/udp # Adaptec Manager +windb 2522/tcp # WinDb +windb 2522/udp # WinDb +qke-llc-v3 2523/tcp # Qke LLC V.3 +qke-llc-v3 2523/udp # Qke LLC V.3 +optiwave-lm 2524/tcp # Optiwave License Management +optiwave-lm 2524/udp # Optiwave License Management +ms-v-worlds 2525/tcp # MS V-Worlds +ms-v-worlds 2525/udp # MS V-Worlds +ema-sent-lm 2526/tcp # EMA License Manager +ema-sent-lm 2526/udp # EMA License Manager +iqserver 2527/tcp # IQ Server +iqserver 2527/udp # IQ Server +ncr_ccl 2528/tcp ncr-ccl # NCR CCL +ncr_ccl 2528/udp ncr-ccl # NCR CCL +utsftp 2529/tcp # UTS FTP +utsftp 2529/udp # UTS FTP +vrcommerce 2530/tcp # VR Commerce +vrcommerce 2530/udp # VR Commerce +ito-e-gui 2531/tcp # ITO-E GUI +ito-e-gui 2531/udp # ITO-E GUI +ovtopmd 2532/tcp # OVTOPMD +ovtopmd 2532/udp # OVTOPMD +snifferserver 2533/tcp # SnifferServer +snifferserver 2533/udp # SnifferServer +combox-web-acc 2534/tcp # Combox Web Access +combox-web-acc 2534/udp # Combox Web Access +madcap 2535/tcp # MADCAP +madcap 2535/udp # MADCAP +btpp2audctr1 2536/tcp # btpp2audctr1 +btpp2audctr1 2536/udp # btpp2audctr1 +upgrade 2537/tcp # Upgrade Protocol +upgrade 2537/udp # Upgrade Protocol +vnwk-prapi 2538/tcp # vnwk-prapi +vnwk-prapi 2538/udp # vnwk-prapi +vsiadmin 2539/tcp # VSI Admin +vsiadmin 2539/udp # VSI Admin +lonworks 2540/tcp # LonWorks +lonworks 2540/udp # LonWorks +lonworks2 2541/tcp # LonWorks2 +lonworks2 2541/udp # LonWorks2 +udrawgraph 2542/tcp # uDraw(Graph) +udrawgraph 2542/udp # uDraw(Graph) +reftek 2543/tcp # REFTEK +reftek 2543/udp # REFTEK +novell-zen 2544/tcp # Management Daemon Refresh +novell-zen 2544/udp # Management Daemon Refresh +sis-emt 2545/tcp # sis-emt +sis-emt 2545/udp # sis-emt +vytalvaultbrtp 2546/tcp # vytalvaultbrtp +vytalvaultbrtp 2546/udp # vytalvaultbrtp +vytalvaultvsmp 2547/tcp # vytalvaultvsmp +vytalvaultvsmp 2547/udp # vytalvaultvsmp +vytalvaultpipe 2548/tcp # vytalvaultpipe +vytalvaultpipe 2548/udp # vytalvaultpipe +ipass 2549/tcp # IPASS +ipass 2549/udp # IPASS +ads 2550/tcp # ADS +ads 2550/udp # ADS +isg-uda-server 2551/tcp # ISG UDA Server +isg-uda-server 2551/udp # ISG UDA Server +call-logging 2552/tcp # Call Logging +call-logging 2552/udp # Call Logging +efidiningport 2553/tcp # efidiningport +efidiningport 2553/udp # efidiningport +vcnet-link-v10 2554/tcp # VCnet-Link v10 +vcnet-link-v10 2554/udp # VCnet-Link v10 +compaq-wcp 2555/tcp # Compaq WCP +compaq-wcp 2555/udp # Compaq WCP +nicetec-nmsvc 2556/tcp # nicetec-nmsvc +nicetec-nmsvc 2556/udp # nicetec-nmsvc +nicetec-mgmt 2557/tcp # nicetec-mgmt +nicetec-mgmt 2557/udp # nicetec-mgmt +pclemultimedia 2558/tcp # PCLE Multi Media +pclemultimedia 2558/udp # PCLE Multi Media +lstp 2559/tcp # LSTP +lstp 2559/udp # LSTP +labrat 2560/tcp # labrat +labrat 2560/udp # labrat +mosaixcc 2561/tcp # MosaixCC +mosaixcc 2561/udp # MosaixCC +delibo 2562/tcp # Delibo +delibo 2562/udp # Delibo +cti-redwood 2563/tcp # CTI Redwood +cti-redwood 2563/udp # CTI Redwood +hp-3000-telnet 2564/tcp # HP 3000 NS/VT block mode telnet +hp-3000-telnet 2564/udp # HP 3000 NS/VT block mode telnet +coord-svr 2565/tcp # Coordinator Server +coord-svr 2565/udp # Coordinator Server +pcs-pcw 2566/tcp # pcs-pcw +pcs-pcw 2566/udp # pcs-pcw +clp 2567/tcp # Cisco Line Protocol +clp 2567/udp # Cisco Line Protocol +spamtrap 2568/tcp # SPAM TRAP +spamtrap 2568/udp # SPAM TRAP +sonuscallsig 2569/tcp # Sonus Call Signal +sonuscallsig 2569/udp # Sonus Call Signal +hs-port 2570/tcp # HS Port +hs-port 2570/udp # HS Port +cecsvc 2571/tcp # CECSVC +cecsvc 2571/udp # CECSVC +ibp 2572/tcp # IBP +ibp 2572/udp # IBP +trustestablish 2573/tcp # Trust Establish +trustestablish 2573/udp # Trust Establish +blockade-bpsp 2574/tcp # Blockade BPSP +blockade-bpsp 2574/udp # Blockade BPSP +hl7 2575/tcp # HL7 +hl7 2575/udp # HL7 +tclprodebugger 2576/tcp # TCL Pro Debugger +tclprodebugger 2576/udp # TCL Pro Debugger +scipticslsrvr 2577/tcp # Scriptics Lsrvr +scipticslsrvr 2577/udp # Scriptics Lsrvr +rvs-isdn-dcp 2578/tcp # RVS ISDN DCP +rvs-isdn-dcp 2578/udp # RVS ISDN DCP +mpfoncl 2579/tcp # mpfoncl +mpfoncl 2579/udp # mpfoncl +tributary 2580/tcp # Tributary +tributary 2580/udp # Tributary +argis-te 2581/tcp # ARGIS TE +argis-te 2581/udp # ARGIS TE +argis-ds 2582/tcp # ARGIS DS +argis-ds 2582/udp # ARGIS DS +mon 2583/tcp # MON +mon 2583/udp # MON +cyaserv 2584/tcp # cyaserv +cyaserv 2584/udp # cyaserv +netx-server 2585/tcp # NETX Server +netx-server 2585/udp # NETX Server +netx-agent 2586/tcp # NETX Agent +netx-agent 2586/udp # NETX Agent +masc 2587/tcp # MASC +masc 2587/udp # MASC +privilege 2588/tcp # Privilege +privilege 2588/udp # Privilege +quartus-tcl 2589/tcp # quartus tcl +quartus-tcl 2589/udp # quartus tcl +idotdist 2590/tcp # idotdist +idotdist 2590/udp # idotdist +maytagshuffle 2591/tcp # Maytag Shuffle +maytagshuffle 2591/udp # Maytag Shuffle +netrek 2592/tcp # netrek +netrek 2592/udp # netrek +mns-mail 2593/tcp # MNS Mail Notice Service +mns-mail 2593/udp # MNS Mail Notice Service +dts 2594/tcp # Data Base Server +dts 2594/udp # Data Base Server +worldfusion1 2595/tcp # World Fusion 1 +worldfusion1 2595/udp # World Fusion 1 +worldfusion2 2596/tcp # World Fusion 2 +worldfusion2 2596/udp # World Fusion 2 +homesteadglory 2597/tcp # Homestead Glory +homesteadglory 2597/udp # Homestead Glory +citriximaclient 2598/tcp # Citrix MA Client +citriximaclient 2598/udp # Citrix MA Client +snapd 2599/tcp # Snap Discovery +snapd 2599/udp # Snap Discovery +connection 2607/tcp # Dell Connection +connection 2607/udp # Dell Connection +wag-service 2608/tcp # Wag Service +wag-service 2608/udp # Wag Service +system-monitor 2609/tcp # System Monitor +system-monitor 2609/udp # System Monitor +versa-tek 2610/tcp # VersaTek +versa-tek 2610/udp # VersaTek +lionhead 2611/tcp # LIONHEAD +lionhead 2611/udp # LIONHEAD +qpasa-agent 2612/tcp # Qpasa Agent +qpasa-agent 2612/udp # Qpasa Agent +smntubootstrap 2613/tcp # SMNTUBootstrap +smntubootstrap 2613/udp # SMNTUBootstrap +neveroffline 2614/tcp # Never Offline +neveroffline 2614/udp # Never Offline +firepower 2615/tcp # firepower +firepower 2615/udp # firepower +appswitch-emp 2616/tcp # appswitch-emp +appswitch-emp 2616/udp # appswitch-emp +cmadmin 2617/tcp # Clinical Context Managers +cmadmin 2617/udp # Clinical Context Managers +priority-e-com 2618/tcp # Priority E-Com +priority-e-com 2618/udp # Priority E-Com +bruce 2619/tcp # bruce +bruce 2619/udp # bruce +lpsrecommender 2620/tcp # LPSRecommender +lpsrecommender 2620/udp # LPSRecommender +miles-apart 2621/tcp # Miles Apart Jukebox Server +miles-apart 2621/udp # Miles Apart Jukebox Server +metricadbc 2622/tcp # MetricaDBC +metricadbc 2622/udp # MetricaDBC +lmdp 2623/tcp # LMDP +lmdp 2623/udp # LMDP +aria 2624/tcp # Aria +aria 2624/udp # Aria +blwnkl-port 2625/tcp # Blwnkl Port +blwnkl-port 2625/udp # Blwnkl Port +gbjd816 2626/tcp # gbjd816 +gbjd816 2626/udp # gbjd816 +moshebeeri 2627/tcp # Moshe Beeri +moshebeeri 2627/udp # Moshe Beeri +sitaraserver 2629/tcp # Sitara Server +sitaraserver 2629/udp # Sitara Server +sitaramgmt 2630/tcp # Sitara Management +sitaramgmt 2630/udp # Sitara Management +sitaradir 2631/tcp # Sitara Dir +sitaradir 2631/udp # Sitara Dir +irdg-post 2632/tcp # IRdg Post +irdg-post 2632/udp # IRdg Post +interintelli 2633/tcp # InterIntelli +interintelli 2633/udp # InterIntelli +pk-electronics 2634/tcp # PK Electronics +pk-electronics 2634/udp # PK Electronics +backburner 2635/tcp # Back Burner +backburner 2635/udp # Back Burner +solve 2636/tcp # Solve +solve 2636/udp # Solve +imdocsvc 2637/tcp # Import Document Service +imdocsvc 2637/udp # Import Document Service +sybaseanywhere 2638/tcp # Sybase Anywhere +sybaseanywhere 2638/udp # Sybase Anywhere +aminet 2639/tcp # AMInet +aminet 2639/udp # AMInet +ami-control 2640/tcp # Alcorn McBride Inc protocol +ami-control 2640/udp # Alcorn McBride Inc protocol +hdl-srv 2641/tcp # HDL Server +hdl-srv 2641/udp # HDL Server +tragic 2642/tcp # Tragic +tragic 2642/udp # Tragic +gte-samp 2643/tcp # GTE-SAMP +gte-samp 2643/udp # GTE-SAMP +travsoft-ipx-t 2644/tcp # Travsoft IPX Tunnel +travsoft-ipx-t 2644/udp # Travsoft IPX Tunnel +novell-ipx-cmd 2645/tcp # Novell IPX CMD +novell-ipx-cmd 2645/udp # Novell IPX CMD +and-lm 2646/tcp # AND License Manager +and-lm 2646/udp # AND License Manager +syncserver 2647/tcp # SyncServer +syncserver 2647/udp # SyncServer +upsnotifyprot 2648/tcp # Upsnotifyprot +upsnotifyprot 2648/udp # Upsnotifyprot +vpsipport 2649/tcp # VPSIPPORT +vpsipport 2649/udp # VPSIPPORT +eristwoguns 2650/tcp # eristwoguns +eristwoguns 2650/udp # eristwoguns +ebinsite 2651/tcp # EBInSite +ebinsite 2651/udp # EBInSite +interpathpanel 2652/tcp # InterPathPanel +interpathpanel 2652/udp # InterPathPanel +sonus 2653/tcp # Sonus +sonus 2653/udp # Sonus +corel_vncadmin 2654/tcp corel-vncadmin # Corel VNC Admin +corel_vncadmin 2654/udp corel-vncadmin # Corel VNC Admin +unglue 2655/tcp # UNIX Nt Glue +unglue 2655/udp # UNIX Nt Glue +kana 2656/tcp # Kana +kana 2656/udp # Kana +sns-dispatcher 2657/tcp # SNS Dispatcher +sns-dispatcher 2657/udp # SNS Dispatcher +sns-admin 2658/tcp # SNS Admin +sns-admin 2658/udp # SNS Admin +sns-query 2659/tcp # SNS Query +sns-query 2659/udp # SNS Query +gcmonitor 2660/tcp # GC Monitor +gcmonitor 2660/udp # GC Monitor +olhost 2661/tcp # OLHOST +olhost 2661/udp # OLHOST +bintec-capi 2662/tcp # BinTec-CAPI +bintec-capi 2662/udp # BinTec-CAPI +bintec-tapi 2663/tcp # BinTec-TAPI +bintec-tapi 2663/udp # BinTec-TAPI +patrol-mq-gm 2664/tcp # Patrol for MQ GM +patrol-mq-gm 2664/udp # Patrol for MQ GM +patrol-mq-nm 2665/tcp # Patrol for MQ NM +patrol-mq-nm 2665/udp # Patrol for MQ NM +extensis 2666/tcp # extensis +extensis 2666/udp # extensis +alarm-clock-s 2667/tcp # Alarm Clock Server +alarm-clock-s 2667/udp # Alarm Clock Server +alarm-clock-c 2668/tcp # Alarm Clock Client +alarm-clock-c 2668/udp # Alarm Clock Client +toad 2669/tcp # TOAD +toad 2669/udp # TOAD +tve-announce 2670/tcp # TVE Announce +tve-announce 2670/udp # TVE Announce +newlixreg 2671/tcp # newlixreg +newlixreg 2671/udp # newlixreg +nhserver 2672/tcp # nhserver +nhserver 2672/udp # nhserver +firstcall42 2673/tcp # First Call 42 +firstcall42 2673/udp # First Call 42 +ewnn 2674/tcp # ewnn +ewnn 2674/udp # ewnn +ttc-etap 2675/tcp # TTC ETAP +ttc-etap 2675/udp # TTC ETAP +simslink 2676/tcp # SIMSLink +simslink 2676/udp # SIMSLink +gadgetgate1way 2677/tcp # Gadget Gate 1 Way +gadgetgate1way 2677/udp # Gadget Gate 1 Way +gadgetgate2way 2678/tcp # Gadget Gate 2 Way +gadgetgate2way 2678/udp # Gadget Gate 2 Way +syncserverssl 2679/tcp # Sync Server SSL +syncserverssl 2679/udp # Sync Server SSL +pxc-sapxom 2680/tcp # pxc-sapxom +pxc-sapxom 2680/udp # pxc-sapxom +mpnjsomb 2681/tcp # mpnjsomb +mpnjsomb 2681/udp # mpnjsomb +ncdloadbalance 2683/tcp # NCDLoadBalance +ncdloadbalance 2683/udp # NCDLoadBalance +mpnjsosv 2684/tcp # mpnjsosv +mpnjsosv 2684/udp # mpnjsosv +mpnjsocl 2685/tcp # mpnjsocl +mpnjsocl 2685/udp # mpnjsocl +mpnjsomg 2686/tcp # mpnjsomg +mpnjsomg 2686/udp # mpnjsomg +pq-lic-mgmt 2687/tcp # pq-lic-mgmt +pq-lic-mgmt 2687/udp # pq-lic-mgmt +md-cg-http 2688/tcp # md-cf-http +md-cg-http 2688/udp # md-cf-http +fastlynx 2689/tcp # FastLynx +fastlynx 2689/udp # FastLynx +hp-nnm-data 2690/tcp # HP NNM Embedded Database +hp-nnm-data 2690/udp # HP NNM Embedded Database +itinternet 2691/tcp # ITInternet ISM Server +itinternet 2691/udp # ITInternet ISM Server +admins-lms 2692/tcp # Admins LMS +admins-lms 2692/udp # Admins LMS +pwrsevent 2694/tcp # pwrsevent +pwrsevent 2694/udp # pwrsevent +vspread 2695/tcp # VSPREAD +vspread 2695/udp # VSPREAD +unifyadmin 2696/tcp # Unify Admin +unifyadmin 2696/udp # Unify Admin +oce-snmp-trap 2697/tcp # Oce SNMP Trap Port +oce-snmp-trap 2697/udp # Oce SNMP Trap Port +mck-ivpip 2698/tcp # MCK-IVPIP +mck-ivpip 2698/udp # MCK-IVPIP +csoft-plusclnt 2699/tcp # Csoft Plus Client +csoft-plusclnt 2699/udp # Csoft Plus Client +tqdata 2700/tcp # tqdata +tqdata 2700/udp # tqdata +sms-rcinfo 2701/tcp # SMS RCINFO +sms-rcinfo 2701/udp # SMS RCINFO +sms-xfer 2702/tcp # SMS XFER +sms-xfer 2702/udp # SMS XFER +sms-chat 2703/tcp # SMS CHAT +sms-chat 2703/udp # SMS CHAT +sms-remctrl 2704/tcp # SMS REMCTRL +sms-remctrl 2704/udp # SMS REMCTRL +sds-admin 2705/tcp # SDS Admin +sds-admin 2705/udp # SDS Admin +ncdmirroring 2706/tcp # NCD Mirroring +ncdmirroring 2706/udp # NCD Mirroring +emcsymapiport 2707/tcp # EMCSYMAPIPORT +emcsymapiport 2707/udp # EMCSYMAPIPORT +banyan-net 2708/tcp # Banyan-Net +banyan-net 2708/udp # Banyan-Net +supermon 2709/tcp # Supermon +supermon 2709/udp # Supermon +sso-service 2710/tcp # SSO Service +sso-service 2710/udp # SSO Service +sso-control 2711/tcp # SSO Control +sso-control 2711/udp # SSO Control +aocp 2712/tcp # Axapta Object Communication Protocol +aocp 2712/udp # Axapta Object Communication Protocol +raventbs 2713/tcp # Raven Trinity Broker Service +raventbs 2713/udp # Raven Trinity Broker Service +raventdm 2714/tcp # Raven Trinity Data Mover +raventdm 2714/udp # Raven Trinity Data Mover +hpstgmgr2 2715/tcp # HPSTGMGR2 +hpstgmgr2 2715/udp # HPSTGMGR2 +inova-ip-disco 2716/tcp # Inova IP Disco +inova-ip-disco 2716/udp # Inova IP Disco +pn-requester 2717/tcp # PN REQUESTER +pn-requester 2717/udp # PN REQUESTER +pn-requester2 2718/tcp # PN REQUESTER 2 +pn-requester2 2718/udp # PN REQUESTER 2 +scan-change 2719/tcp # Scan & Change +scan-change 2719/udp # Scan & Change +wkars 2720/tcp # wkars +wkars 2720/udp # wkars +smart-diagnose 2721/tcp # Smart Diagnose +smart-diagnose 2721/udp # Smart Diagnose +proactivesrvr 2722/tcp # Proactive Server +proactivesrvr 2722/udp # Proactive Server +watchdog-nt 2723/tcp # WatchDog NT Protocol +watchdog-nt 2723/udp # WatchDog NT Protocol +qotps 2724/tcp # qotps +qotps 2724/udp # qotps +msolap-ptp2 2725/tcp # MSOLAP PTP2 +msolap-ptp2 2725/udp # MSOLAP PTP2 +tams 2726/tcp # TAMS +tams 2726/udp # TAMS +mgcp-callagent 2727/tcp # Media Gateway Control Protocol Call Agent +mgcp-callagent 2727/udp # Media Gateway Control Protocol Call Agent +sqdr 2728/tcp # SQDR +sqdr 2728/udp # SQDR +tcim-control 2729/tcp # TCIM Control +tcim-control 2729/udp # TCIM Control +nec-raidplus 2730/tcp # NEC RaidPlus +nec-raidplus 2730/udp # NEC RaidPlus +fyre-messanger 2731/tcp # Fyre Messanger +fyre-messanger 2731/udp # Fyre Messagner +g5m 2732/tcp # G5M +g5m 2732/udp # G5M +signet-ctf 2733/tcp # Signet CTF +signet-ctf 2733/udp # Signet CTF +ccs-software 2734/tcp # CCS Software +ccs-software 2734/udp # CCS Software +netiq-mc 2735/tcp # NetIQ Monitor Console +netiq-mc 2735/udp # NetIQ Monitor Console +radwiz-nms-srv 2736/tcp # RADWIZ NMS SRV +radwiz-nms-srv 2736/udp # RADWIZ NMS SRV +srp-feedback 2737/tcp # SRP Feedback +srp-feedback 2737/udp # SRP Feedback +ndl-tcp-ois-gw 2738/tcp # NDL TCP-OSI Gateway +ndl-tcp-ois-gw 2738/udp # NDL TCP-OSI Gateway +tn-timing 2739/tcp # TN Timing +tn-timing 2739/udp # TN Timing +alarm 2740/tcp # Alarm +alarm 2740/udp # Alarm +tsb 2741/tcp # TSB +tsb 2741/udp # TSB +tsb2 2742/tcp # TSB2 +tsb2 2742/udp # TSB2 +murx 2743/tcp # murx +murx 2743/udp # murx +honyaku 2744/tcp # honyaku +honyaku 2744/udp # honyaku +urbisnet 2745/tcp # URBISNET +urbisnet 2745/udp # URBISNET +cpudpencap 2746/tcp # CPUDPENCAP +cpudpencap 2746/udp # CPUDPENCAP +fjippol-swrly 2747/tcp # +fjippol-swrly 2747/udp # +fjippol-polsvr 2748/tcp # +fjippol-polsvr 2748/udp # +fjippol-cnsl 2749/tcp # +fjippol-cnsl 2749/udp # +fjippol-port1 2750/tcp # +fjippol-port1 2750/udp # +fjippol-port2 2751/tcp # +fjippol-port2 2751/udp # +rsisysaccess 2752/tcp # RSISYS ACCESS +rsisysaccess 2752/udp # RSISYS ACCESS +de-spot 2753/tcp # de-spot +de-spot 2753/udp # de-spot +apollo-cc 2754/tcp # APOLLO CC +apollo-cc 2754/udp # APOLLO CC +expresspay 2755/tcp # Express Pay +expresspay 2755/udp # Express Pay +simplement-tie 2756/tcp # simplement-tie +simplement-tie 2756/udp # simplement-tie +cnrp 2757/tcp # CNRP +cnrp 2757/udp # CNRP +apollo-status 2758/tcp # APOLLO Status +apollo-status 2758/udp # APOLLO Status +apollo-gms 2759/tcp # APOLLO GMS +apollo-gms 2759/udp # APOLLO GMS +sabams 2760/tcp # Saba MS +sabams 2760/udp # Saba MS +dicom-iscl 2761/tcp # DICOM ISCL +dicom-iscl 2761/udp # DICOM ISCL +dicom-tls 2762/tcp # DICOM TLS +dicom-tls 2762/udp # DICOM TLS +desktop-dna 2763/tcp # Desktop DNA +desktop-dna 2763/udp # Desktop DNA +data-insurance 2764/tcp # Data Insurance +data-insurance 2764/udp # Data Insurance +qip-audup 2765/tcp # qip-audup +qip-audup 2765/udp # qip-audup +compaq-scp 2766/tcp # Compaq SCP +compaq-scp 2766/udp # Compaq SCP +uadtc 2767/tcp # UADTC +uadtc 2767/udp # UADTC +uacs 2768/tcp # UACS +uacs 2768/udp # UACS +exce 2769/tcp # eXcE +exce 2769/udp # eXcE +veronica 2770/tcp # Veronica +veronica 2770/udp # Veronica +vergencecm 2771/tcp # Vergence CM +vergencecm 2771/udp # Vergence CM +auris 2772/tcp # auris +auris 2772/udp # auris +rbakcup1 2773/tcp # RBackup Remote Backup +rbakcup1 2773/udp # RBackup Remote Backup +rbakcup2 2774/tcp # RBackup Remote Backup +rbakcup2 2774/udp # RBackup Remote Backup +smpp 2775/tcp # SMPP +smpp 2775/udp # SMPP +ridgeway1 2776/tcp # Ridgeway Systems & Software +ridgeway1 2776/udp # Ridgeway Systems & Software +ridgeway2 2777/tcp # Ridgeway Systems & Software +ridgeway2 2777/udp # Ridgeway Systems & Software +gwen-sonya 2778/tcp # Gwen-Sonya +gwen-sonya 2778/udp # Gwen-Sonya +lbc-sync 2779/tcp # LBC Sync +lbc-sync 2779/udp # LBC Sync +lbc-control 2780/tcp # LBC Control +lbc-control 2780/udp # LBC Control +whosells 2781/tcp # whosells +whosells 2781/udp # whosells +everydayrc 2782/tcp # everydayrc +everydayrc 2782/udp # everydayrc +aises 2783/tcp # AISES +aises 2783/udp # AISES +www-dev 2784/tcp # world wide web - development +www-dev 2784/udp # world wide web - development +aic-np 2785/tcp # aic-np +aic-np 2785/udp # aic-np +aic-oncrpc 2786/tcp # aic-oncrpc - Destiny MCD database +aic-oncrpc 2786/udp # aic-oncrpc - Destiny MCD database +piccolo 2787/tcp # piccolo - Cornerstone Software +piccolo 2787/udp # piccolo - Cornerstone Software +fryeserv 2788/tcp # NetWare Loadable Module - Seagate Software +fryeserv 2788/udp # NetWare Loadable Module - Seagate Software +media-agent 2789/tcp # Media Agent +media-agent 2789/udp # Media Agent +plgproxy 2790/tcp # PLG Proxy +plgproxy 2790/udp # PLG Proxy +mtport-regist 2791/tcp # MT Port Registrator +mtport-regist 2791/udp # MT Port Registrator +f5-globalsite 2792/tcp # f5-globalsite +f5-globalsite 2792/udp # f5-globalsite +initlsmsad 2793/tcp # initlsmsad +initlsmsad 2793/udp # initlsmsad +livestats 2795/tcp # LiveStats +livestats 2795/udp # LiveStats +ac-tech 2796/tcp # ac-tech +ac-tech 2796/udp # ac-tech +esp-encap 2797/tcp # esp-encap +esp-encap 2797/udp # esp-encap +tmesis-upshot 2798/tcp # TMESIS-UPShot +tmesis-upshot 2798/udp # TMESIS-UPShot +icon-discover 2799/tcp # ICON Discover +icon-discover 2799/udp # ICON Discover +acc-raid 2800/tcp # ACC RAID +acc-raid 2800/udp # ACC RAID +igcp 2801/tcp # IGCP +igcp 2801/udp # IGCP +veritas-tcp1 2802/tcp # Veritas TCP1 +veritas-udp1 2802/udp # Veritas UDP1 +btprjctrl 2803/tcp # btprjctrl +btprjctrl 2803/udp # btprjctrl +dvr-esm 2804/tcp # March Networks Digital Video Recorders and Enterprise Service Manager products +dvr-esm 2804/udp # March Networks Digital Video Recorders and Enterprise Service Manager products +wta-wsp-s 2805/tcp # WTA WSP-S +wta-wsp-s 2805/udp # WTA WSP-S +cspuni 2806/tcp # cspuni +cspuni 2806/udp # cspuni +cspmulti 2807/tcp # cspmulti +cspmulti 2807/udp # cspmulti +j-lan-p 2808/tcp # J-LAN-P +j-lan-p 2808/udp # J-LAN-P +corbaloc 2809/udp # CORBA LOC +netsteward 2810/tcp # Active Net Steward +netsteward 2810/udp # Active Net Steward +gsiftp 2811/tcp # GSI FTP +gsiftp 2811/udp # GSI FTP +atmtcp 2812/tcp # atmtcp +atmtcp 2812/udp # atmtcp +llm-pass 2813/tcp # llm-pass +llm-pass 2813/udp # llm-pass +llm-csv 2814/tcp # llm-csv +llm-csv 2814/udp # llm-csv +lbc-measure 2815/tcp # LBC Measurement +lbc-measure 2815/udp # LBC Measurement +lbc-watchdog 2816/tcp # LBC Watchdog +lbc-watchdog 2816/udp # LBC Watchdog +rmlnk 2818/tcp # rmlnk +rmlnk 2818/udp # rmlnk +fc-faultnotify 2819/tcp # FC Fault Notification +fc-faultnotify 2819/udp # FC Fault Notification +univision 2820/tcp # UniVision +univision 2820/udp # UniVision +vrts-at-port 2821/tcp # VERITAS Authentication Service +vrts-at-port 2821/udp # VERITAS Authentication Service +ka0wuc 2822/tcp # ka0wuc +ka0wuc 2822/udp # ka0wuc +cqg-netlan 2823/tcp # CQG Net/LAN +cqg-netlan 2823/udp # CQG Net/LAN +cqg-netlan-1 2824/tcp # CQG Net/LAN 1 +cqg-netlan-1 2824/udp # CQG Net/Lan 1 +slc-systemlog 2826/tcp # slc systemlog +slc-systemlog 2826/udp # slc systemlog +slc-ctrlrloops 2827/tcp # slc ctrlrloops +slc-ctrlrloops 2827/udp # slc ctrlrloops +itm-lm 2828/tcp # ITM License Manager +itm-lm 2828/udp # ITM License Manager +silkp1 2829/tcp # silkp1 +silkp1 2829/udp # silkp1 +silkp2 2830/tcp # silkp2 +silkp2 2830/udp # silkp2 +silkp3 2831/tcp # silkp3 +silkp3 2831/udp # silkp3 +silkp4 2832/tcp # silkp4 +silkp4 2832/udp # silkp4 +glishd 2833/tcp # glishd +glishd 2833/udp # glishd +evtp 2834/tcp # EVTP +evtp 2834/udp # EVTP +evtp-data 2835/tcp # EVTP-DATA +evtp-data 2835/udp # EVTP-DATA +catalyst 2836/tcp # catalyst +catalyst 2836/udp # catalyst +repliweb 2837/tcp # Repliweb +repliweb 2837/udp # Repliweb +starbot 2838/tcp # Starbot +starbot 2838/udp # Starbot +l3-exprt 2840/tcp # l3-exprt +l3-exprt 2840/udp # l3-exprt +l3-ranger 2841/tcp # l3-ranger +l3-ranger 2841/udp # l3-ranger +l3-hawk 2842/tcp # l3-hawk +l3-hawk 2842/udp # l3-hawk +pdnet 2843/tcp # PDnet +pdnet 2843/udp # PDnet +bpcp-poll 2844/tcp # BPCP POLL +bpcp-poll 2844/udp # BPCP POLL +bpcp-trap 2845/tcp # BPCP TRAP +bpcp-trap 2845/udp # BPCP TRAP +aimpp-hello 2846/tcp # AIMPP Hello +aimpp-hello 2846/udp # AIMPP Hello +aimpp-port-req 2847/tcp # AIMPP Port Req +aimpp-port-req 2847/udp # AIMPP Port Req +amt-blc-port 2848/tcp # AMT-BLC-PORT +amt-blc-port 2848/udp # AMT-BLC-PORT +metaconsole 2850/tcp # MetaConsole +metaconsole 2850/udp # MetaConsole +webemshttp 2851/tcp # webemshttp +webemshttp 2851/udp # webemshttp +bears-01 2852/tcp # bears-01 +bears-01 2852/udp # bears-01 +ispipes 2853/tcp # ISPipes +ispipes 2853/udp # ISPipes +infomover 2854/tcp # InfoMover +infomover 2854/udp # InfoMover +msrp 2855/tcp # MSRP over TCP +cesdinv 2856/tcp # cesdinv +cesdinv 2856/udp # cesdinv +simctlp 2857/tcp # SimCtIP +simctlp 2857/udp # SimCtIP +ecnp 2858/tcp # ECNP +ecnp 2858/udp # ECNP +activememory 2859/tcp # Active Memory +activememory 2859/udp # Active Memory +dialpad-voice1 2860/tcp # Dialpad Voice 1 +dialpad-voice1 2860/udp # Dialpad Voice 1 +dialpad-voice2 2861/tcp # Dialpad Voice 2 +dialpad-voice2 2861/udp # Dialpad Voice 2 +ttg-protocol 2862/tcp # TTG Protocol +ttg-protocol 2862/udp # TTG Protocol +sonardata 2863/tcp # Sonar Data +sonardata 2863/udp # Sonar Data +astromed-main 2864/tcp # main 5001 cmd +astromed-main 2864/udp # main 5001 cmd +pit-vpn 2865/tcp # pit-vpn +pit-vpn 2865/udp # pit-vpn +iwlistener 2866/tcp # iwlistener +iwlistener 2866/udp # iwlistener +esps-portal 2867/tcp # esps-portal +esps-portal 2867/udp # esps-portal +npep-messaging 2868/tcp # NPEP Messaging +npep-messaging 2868/udp # NPEP Messaging +icslap 2869/tcp # ICSLAP +icslap 2869/udp # ICSLAP +daishi 2870/tcp # daishi +daishi 2870/udp # daishi +msi-selectplay 2871/tcp # MSI Select Play +msi-selectplay 2871/udp # MSI Select Play +radix 2872/tcp # RADIX +radix 2872/udp # RADIX +dxmessagebase1 2874/tcp # DX Message Base Transport Protocol +dxmessagebase1 2874/udp # DX Message Base Transport Protocol +dxmessagebase2 2875/tcp # DX Message Base Transport Protocol +dxmessagebase2 2875/udp # DX Message Base Transport Protocol +sps-tunnel 2876/tcp # SPS Tunnel +sps-tunnel 2876/udp # SPS Tunnel +bluelance 2877/tcp # BLUELANCE +bluelance 2877/udp # BLUELANCE +aap 2878/tcp # AAP +aap 2878/udp # AAP +ucentric-ds 2879/tcp # ucentric-ds +ucentric-ds 2879/udp # ucentric-ds +synapse 2880/tcp # Synapse Transport +synapse 2880/udp # Synapse Transport +ndsp 2881/tcp # NDSP +ndsp 2881/udp # NDSP +ndtp 2882/tcp # NDTP +ndtp 2882/udp # NDTP +ndnp 2883/tcp # NDNP +ndnp 2883/udp # NDNP +flashmsg 2884/tcp # Flash Msg +flashmsg 2884/udp # Flash Msg +topflow 2885/tcp # TopFlow +topflow 2885/udp # TopFlow +responselogic 2886/tcp # RESPONSELOGIC +responselogic 2886/udp # RESPONSELOGIC +aironetddp 2887/tcp # aironet +aironetddp 2887/udp # aironet +spcsdlobby 2888/tcp # SPCSDLOBBY +spcsdlobby 2888/udp # SPCSDLOBBY +rsom 2889/tcp # RSOM +rsom 2889/udp # RSOM +cspclmulti 2890/tcp # CSPCLMULTI +cspclmulti 2890/udp # CSPCLMULTI +cinegrfx-elmd 2891/tcp # CINEGRFX-ELMD License Manager +cinegrfx-elmd 2891/udp # CINEGRFX-ELMD License Manager +snifferdata 2892/tcp # SNIFFERDATA +snifferdata 2892/udp # SNIFFERDATA +vseconnector 2893/tcp # VSECONNECTOR +vseconnector 2893/udp # VSECONNECTOR +abacus-remote 2894/tcp # ABACUS-REMOTE +abacus-remote 2894/udp # ABACUS-REMOTE +natuslink 2895/tcp # NATUS LINK +natuslink 2895/udp # NATUS LINK +ecovisiong6-1 2896/tcp # ECOVISIONG6-1 +ecovisiong6-1 2896/udp # ECOVISIONG6-1 +citrix-rtmp 2897/tcp # Citrix RTMP +citrix-rtmp 2897/udp # Citrix RTMP +appliance-cfg 2898/tcp # APPLIANCE-CFG +appliance-cfg 2898/udp # APPLIANCE-CFG +powergemplus 2899/tcp # POWERGEMPLUS +powergemplus 2899/udp # POWERGEMPLUS +quicksuite 2900/tcp # QUICKSUITE +quicksuite 2900/udp # QUICKSUITE +allstorcns 2901/tcp # ALLSTORCNS +allstorcns 2901/udp # ALLSTORCNS +netaspi 2902/tcp # NET ASPI +netaspi 2902/udp # NET ASPI +suitcase 2903/tcp # SUITCASE +suitcase 2903/udp # SUITCASE +m2ua 2904/tcp # M2UA +m2ua 2904/udp # M2UA +m2ua 2904/sctp # M2UA +m3ua 2905/tcp # M3UA +m3ua 2905/sctp # M3UA +caller9 2906/tcp # CALLER9 +caller9 2906/udp # CALLER9 +webmethods-b2b 2907/tcp # WEBMETHODS B2B +webmethods-b2b 2907/udp # WEBMETHODS B2B +mao 2908/tcp # mao +mao 2908/udp # mao +funk-dialout 2909/tcp # Funk Dialout +funk-dialout 2909/udp # Funk Dialout +tdaccess 2910/tcp # TDAccess +tdaccess 2910/udp # TDAccess +blockade 2911/tcp # Blockade +blockade 2911/udp # Blockade +epicon 2912/tcp # Epicon +epicon 2912/udp # Epicon +boosterware 2913/tcp # Booster Ware +boosterware 2913/udp # Booster Ware +gamelobby 2914/tcp # Game Lobby +gamelobby 2914/udp # Game Lobby +tksocket 2915/tcp # TK Socket +tksocket 2915/udp # TK Socket +elvin_server 2916/tcp elvin-server # Elvin Server +elvin_server 2916/udp elvin-server # Elvin Server +elvin_client 2917/tcp elvin-client # Elvin Client +elvin_client 2917/udp elvin-client # Elvin Client +kastenchasepad 2918/tcp # Kasten Chase Pad +kastenchasepad 2918/udp # Kasten Chase Pad +roboer 2919/tcp # roboER +roboer 2919/udp # roboER +roboeda 2920/tcp # roboEDA +roboeda 2920/udp # roboEDA +cesdcdman 2921/tcp # CESD Contents Delivery Management +cesdcdman 2921/udp # CESD Contents Delivery Management +cesdcdtrn 2922/tcp # CESD Contents Delivery Data Transfer +cesdcdtrn 2922/udp # CESD Contents Delivery Data Transfer +wta-wsp-wtp-s 2923/tcp # WTA-WSP-WTP-S +wta-wsp-wtp-s 2923/udp # WTA-WSP-WTP-S +precise-vip 2924/tcp # PRECISE-VIP +precise-vip 2924/udp # PRECISE-VIP +mobile-file-dl 2926/tcp # MOBILE-FILE-DL +mobile-file-dl 2926/udp # MOBILE-FILE-DL +unimobilectrl 2927/tcp # UNIMOBILECTRL +unimobilectrl 2927/udp # UNIMOBILECTRL +redstone-cpss 2928/tcp # REDSTONE-CPSS +redstone-cpss 2928/udp # REDSTONE-CPSS +amx-webadmin 2929/tcp # AMX-WEBADMIN +amx-webadmin 2929/udp # AMX-WEBADMIN +amx-weblinx 2930/tcp # AMX-WEBLINX +amx-weblinx 2930/udp # AMX-WEBLINX +circle-x 2931/tcp # Circle-X +circle-x 2931/udp # Circle-X +incp 2932/tcp # INCP +incp 2932/udp # INCP +4-tieropmgw 2933/tcp # 4-TIER OPM GW +4-tieropmgw 2933/udp # 4-TIER OPM GW +4-tieropmcli 2934/tcp # 4-TIER OPM CLI +4-tieropmcli 2934/udp # 4-TIER OPM CLI +qtp 2935/tcp # QTP +qtp 2935/udp # QTP +otpatch 2936/tcp # OTPatch +otpatch 2936/udp # OTPatch +pnaconsult-lm 2937/tcp # PNACONSULT-LM +pnaconsult-lm 2937/udp # PNACONSULT-LM +sm-pas-1 2938/tcp # SM-PAS-1 +sm-pas-1 2938/udp # SM-PAS-1 +sm-pas-2 2939/tcp # SM-PAS-2 +sm-pas-2 2939/udp # SM-PAS-2 +sm-pas-3 2940/tcp # SM-PAS-3 +sm-pas-3 2940/udp # SM-PAS-3 +sm-pas-4 2941/tcp # SM-PAS-4 +sm-pas-4 2941/udp # SM-PAS-4 +sm-pas-5 2942/tcp # SM-PAS-5 +sm-pas-5 2942/udp # SM-PAS-5 +ttnrepository 2943/tcp # TTNRepository +ttnrepository 2943/udp # TTNRepository +megaco-h248 2944/tcp # Megaco H-248 +megaco-h248 2944/udp # Megaco H-248 +megaco-h248 2944/sctp # Megaco-H.248 text +h248-binary 2945/tcp # H248 Binary +h248-binary 2945/udp # H248 Binary +h248-binary 2945/sctp # Megaco/H.248 binary +fjsvmpor 2946/tcp # FJSVmpor +fjsvmpor 2946/udp # FJSVmpor +gpsd 2947/tcp # GPSD +gpsd 2947/udp # GPSD +wap-push 2948/tcp # WAP PUSH +wap-push 2948/udp # WAP PUSH +wap-pushsecure 2949/tcp # WAP PUSH SECURE +wap-pushsecure 2949/udp # WAP PUSH SECURE +esip 2950/tcp # ESIP +esip 2950/udp # ESIP +ottp 2951/tcp # OTTP +ottp 2951/udp # OTTP +mpfwsas 2952/tcp # MPFWSAS +mpfwsas 2952/udp # MPFWSAS +ovalarmsrv 2953/tcp # OVALARMSRV +ovalarmsrv 2953/udp # OVALARMSRV +ovalarmsrv-cmd 2954/tcp # OVALARMSRV-CMD +ovalarmsrv-cmd 2954/udp # OVALARMSRV-CMD +csnotify 2955/tcp # CSNOTIFY +csnotify 2955/udp # CSNOTIFY +ovrimosdbman 2956/tcp # OVRIMOSDBMAN +ovrimosdbman 2956/udp # OVRIMOSDBMAN +jmact5 2957/tcp # JAMCT5 +jmact5 2957/udp # JAMCT5 +jmact6 2958/tcp # JAMCT6 +jmact6 2958/udp # JAMCT6 +rmopagt 2959/tcp # RMOPAGT +rmopagt 2959/udp # RMOPAGT +dfoxserver 2960/tcp # DFOXSERVER +dfoxserver 2960/udp # DFOXSERVER +boldsoft-lm 2961/tcp # BOLDSOFT-LM +boldsoft-lm 2961/udp # BOLDSOFT-LM +iph-policy-cli 2962/tcp # IPH-POLICY-CLI +iph-policy-cli 2962/udp # IPH-POLICY-CLI +iph-policy-adm 2963/tcp # IPH-POLICY-ADM +iph-policy-adm 2963/udp # IPH-POLICY-ADM +bullant-srap 2964/tcp # BULLANT SRAP +bullant-srap 2964/udp # BULLANT SRAP +bullant-rap 2965/tcp # BULLANT RAP +bullant-rap 2965/udp # BULLANT RAP +idp-infotrieve 2966/tcp # IDP-INFOTRIEVE +idp-infotrieve 2966/udp # IDP-INFOTRIEVE +ssc-agent 2967/tcp # SSC-AGENT +ssc-agent 2967/udp # SSC-AGENT +enpp 2968/tcp # ENPP +enpp 2968/udp # ENPP +essp 2969/tcp # ESSP +essp 2969/udp # ESSP +index-net 2970/tcp # INDEX-NET +index-net 2970/udp # INDEX-NET +netclip 2971/tcp # NetClip clipboard daemon +netclip 2971/udp # NetClip clipboard daemon +pmsm-webrctl 2972/tcp # PMSM Webrctl +pmsm-webrctl 2972/udp # PMSM Webrctl +svnetworks 2973/tcp # SV Networks +svnetworks 2973/udp # SV Networks +signal 2974/tcp # Signal +signal 2974/udp # Signal +fjmpcm 2975/tcp # Fujitsu Configuration Management Service +fjmpcm 2975/udp # Fujitsu Configuration Management Service +cns-srv-port 2976/tcp # CNS Server Port +cns-srv-port 2976/udp # CNS Server Port +ttc-etap-ns 2977/tcp # TTCs Enterprise Test Access Protocol - NS +ttc-etap-ns 2977/udp # TTCs Enterprise Test Access Protocol - NS +ttc-etap-ds 2978/tcp # TTCs Enterprise Test Access Protocol - DS +ttc-etap-ds 2978/udp # TTCs Enterprise Test Access Protocol - DS +h263-video 2979/tcp # H.263 Video Streaming +h263-video 2979/udp # H.263 Video Streaming +wimd 2980/tcp # Instant Messaging Service +wimd 2980/udp # Instant Messaging Service +mylxamport 2981/tcp # MYLXAMPORT +mylxamport 2981/udp # MYLXAMPORT +iwb-whiteboard 2982/tcp # IWB-WHITEBOARD +iwb-whiteboard 2982/udp # IWB-WHITEBOARD +netplan 2983/tcp # NETPLAN +netplan 2983/udp # NETPLAN +hpidsadmin 2984/tcp # HPIDSADMIN +hpidsadmin 2984/udp # HPIDSADMIN +hpidsagent 2985/tcp # HPIDSAGENT +hpidsagent 2985/udp # HPIDSAGENT +stonefalls 2986/tcp # STONEFALLS +stonefalls 2986/udp # STONEFALLS +identify 2987/tcp # identify +identify 2987/udp # identify +zarkov 2989/tcp # ZARKOV Intelligent Agent Communication +zarkov 2989/udp # ZARKOV Intelligent Agent Communication +boscap 2990/tcp # BOSCAP +boscap 2990/udp # BOSCAP +wkstn-mon 2991/tcp # WKSTN-MON +wkstn-mon 2991/udp # WKSTN-MON +avenyo 2992/tcp # Avenyo Server +avenyo 2992/udp # Avenyo Server +veritas-vis1 2993/tcp # VERITAS VIS1 +veritas-vis1 2993/udp # VERITAS VIS1 +veritas-vis2 2994/tcp # VERITAS VIS2 +veritas-vis2 2994/udp # VERITAS VIS2 +idrs 2995/tcp # IDRS +idrs 2995/udp # IDRS +vsixml 2996/tcp # vsixml +vsixml 2996/udp # vsixml +rebol 2997/tcp # REBOL +rebol 2997/udp # REBOL +realsecure 2998/tcp # Real Secure +realsecure 2998/udp # Real Secure +remoteware-un 2999/tcp # RemoteWare Unassigned +remoteware-un 2999/udp # RemoteWare Unassigned +hbci 3000/tcp ceph # HBCI or CEPH monitor +hbci 3000/udp # HBCI +#remoteware-cl 3000/tcp # RemoteWare Client +#remoteware-cl 3000/udp # RemoteWare Client +origo-native 3001/tcp # OrigoDB Server Native +exlm-agent 3002/tcp # EXLM Agent +exlm-agent 3002/udp # EXLM Agent +#remoteware-srv 3002/tcp # RemoteWare Server +#remoteware-srv 3002/udp # RemoteWare Server +cgms 3003/tcp # CGMS +cgms 3003/udp # CGMS +csoftragent 3004/tcp # Csoft Agent +csoftragent 3004/udp # Csoft Agent +geniuslm 3005/tcp # Genius License Manager +geniuslm 3005/udp # Genius License Manager +ii-admin 3006/tcp # Instant Internet Admin +ii-admin 3006/udp # Instant Internet Admin +lotusmtap 3007/tcp # Lotus Mail Tracking Agent Protocol +lotusmtap 3007/udp # Lotus Mail Tracking Agent Protocol +midnight-tech 3008/tcp # Midnight Technologies +midnight-tech 3008/udp # Midnight Technologies +pxc-ntfy 3009/tcp # PXC-NTFY +pxc-ntfy 3009/udp # PXC-NTFY +gw 3010/tcp # Telerate Workstation +ping-pong 3010/udp # Telerate Workstation +trusted-web 3011/tcp # Trusted Web +trusted-web 3011/udp # Trusted Web +twsdss 3012/tcp # Trusted Web Client +twsdss 3012/udp # Trusted Web Client +gilatskysurfer 3013/tcp # Gilat Sky Surfer +gilatskysurfer 3013/udp # Gilat Sky Surfer +broker_service 3014/tcp broker-service # Broker Service +broker_service 3014/udp broker-service # Broker Service +nati-dstp 3015/tcp # NATI DSTP +nati-dstp 3015/udp # NATI DSTP +notify_srvr 3016/tcp notify-srvr # Notify Server +notify_srvr 3016/udp notify-srvr # Notify Server +event_listener 3017/tcp event-listener # Event Listener +event_listener 3017/udp event-listener # Event Listener +srvc_registry 3018/tcp srvc-registry # Service Registry +srvc_registry 3018/udp srvc-registry # Service Registry +resource_mgr 3019/tcp resource-mgr # Resource Manager +resource_mgr 3019/udp resource-mgr # Resource Manager +cifs 3020/tcp # CIFS +cifs 3020/udp # CIFS +agriserver 3021/tcp # AGRI Server +agriserver 3021/udp # AGRI Server +csregagent 3022/tcp # CSREGAGENT +csregagent 3022/udp # CSREGAGENT +magicnotes 3023/tcp # magicnotes +magicnotes 3023/udp # magicnotes +nds_sso 3024/tcp nds-sso # NDS_SSO +nds_sso 3024/udp nds-sso # NDS_SSO +arepa-raft 3025/tcp # Arepa Raft +arepa-raft 3025/udp # Arepa Raft +agri-gateway 3026/tcp # AGRI Gateway +agri-gateway 3026/udp # AGRI Gateway +LiebDevMgmt_C 3027/tcp LiebDevMgmt-C # LiebDevMgmt_C +LiebDevMgmt_C 3027/udp LiebDevMgmt-C # LiebDevMgmt_C +LiebDevMgmt_DM 3028/tcp LiebDevMgmt-DM # LiebDevMgmt_DM +LiebDevMgmt_DM 3028/udp LiebDevMgmt-DM # LiebDevMgmt_DM +LiebDevMgmt_A 3029/tcp LiebDevMgmt-A # LiebDevMgmt_A +LiebDevMgmt_A 3029/udp LiebDevMgmt-A # LiebDevMgmt_A +arepa-cas 3030/tcp # Arepa Cas +arepa-cas 3030/udp # Arepa Cas +eppc 3031/tcp # Remote AppleEvents/PPC Toolbox +eppc 3031/udp # Remote AppleEvents/PPC Toolbox +redwood-chat 3032/tcp # Redwood Chat +redwood-chat 3032/udp # Redwood Chat +pdb 3033/tcp # PDB +pdb 3033/udp # PDB +osmosis-aeea 3034/tcp # Osmosis / Helix (R) AEEA Port +osmosis-aeea 3034/udp # Osmosis / Helix (R) AEEA Port +fjsv-gssagt 3035/tcp # FJSV gssagt +fjsv-gssagt 3035/udp # FJSV gssagt +hagel-dump 3036/tcp # Hagel DUMP +hagel-dump 3036/udp # Hagel DUMP +hp-san-mgmt 3037/tcp # HP SAN Mgmt +hp-san-mgmt 3037/udp # HP SAN Mgmt +santak-ups 3038/tcp # Santak UPS +santak-ups 3038/udp # Santak UPS +cogitate 3039/tcp # Cogitate, Inc. +cogitate 3039/udp # Cogitate, Inc. +tomato-springs 3040/tcp # Tomato Springs +tomato-springs 3040/udp # Tomato Springs +di-traceware 3041/tcp # di-traceware +di-traceware 3041/udp # di-traceware +journee 3042/tcp # journee +journee 3042/udp # journee +brp 3043/tcp # Broadcast Routing Protocol +brp 3043/udp # Broadcast Routing Protocol +responsenet 3045/tcp # ResponseNet +responsenet 3045/udp # ResponseNet +di-ase 3046/tcp # di-ase +di-ase 3046/udp # di-ase +hlserver 3047/tcp # Fast Security HL Server +hlserver 3047/udp # Fast Security HL Server +pctrader 3048/tcp # Sierra Net PC Trader +pctrader 3048/udp # Sierra Net PC Trader +nsws 3049/tcp # NSWS +nsws 3049/udp # NSWS +gds_db 3050/tcp gds-db # gds_db +gds_db 3050/udp gds-db # gds_db +galaxy-server 3051/tcp # Galaxy Server +galaxy-server 3051/udp # Galaxy Server +apc-3052 3052/tcp # APC 3052 +apc-3052 3052/udp # APC 3052 +dsom-server 3053/tcp # dsom-server +dsom-server 3053/udp # dsom-server +amt-cnf-prot 3054/tcp # AMT CNF PROT +amt-cnf-prot 3054/udp # AMT CNF PROT +policyserver 3055/tcp # Policy Server +policyserver 3055/udp # Policy Server +cdl-server 3056/tcp # CDL Server +cdl-server 3056/udp # CDL Server +goahead-fldup 3057/tcp # GoAhead FldUp +goahead-fldup 3057/udp # GoAhead FldUp +videobeans 3058/tcp # videobeans +videobeans 3058/udp # videobeans +qsoft 3059/tcp # qsoft +qsoft 3059/udp # qsoft +interserver 3060/tcp # interserver +interserver 3060/udp # interserver +cautcpd 3061/tcp # cautcpd +cautcpd 3061/udp # cautcpd +ncacn-ip-tcp 3062/tcp # ncacn-ip-tcp +ncacn-ip-tcp 3062/udp # ncacn-ip-tcp +ncadg-ip-udp 3063/tcp # ncadg-ip-udp +ncadg-ip-udp 3063/udp # ncadg-ip-udp +rprt 3064/tcp # Remote Port Redirector +rprt 3064/udp # Remote Port Redirector +slinterbase 3065/tcp # slinterbase +slinterbase 3065/udp # slinterbase +netattachsdmp 3066/tcp # NETATTACHSDMP +netattachsdmp 3066/udp # NETATTACHSDMP +fjhpjp 3067/tcp # FJHPJP +fjhpjp 3067/udp # FJHPJP +ls3bcast 3068/tcp # ls3 Broadcast +ls3bcast 3068/udp # ls3 Broadcast +ls3 3069/tcp # ls3 +ls3 3069/udp # ls3 +mgxswitch 3070/tcp # MGXSWITCH +mgxswitch 3070/udp # MGXSWITCH +csd-mgmt-port 3071/tcp # ContinuStor Manager Port +csd-mgmt-port 3071/udp # ContinuStor Manager Port +csd-monitor 3072/tcp # ContinuStor Monitor Port +csd-monitor 3072/udp # ContinuStor Monitor Port +vcrp 3073/tcp # Very simple chatroom prot +vcrp 3073/udp # Very simple chatroom prot +xbox 3074/tcp # Xbox game port +xbox 3074/udp # Xbox game port +orbix-locator 3075/tcp # Orbix 2000 Locator +orbix-locator 3075/udp # Orbix 2000 Locator +orbix-config 3076/tcp # Orbix 2000 Config +orbix-config 3076/udp # Orbix 2000 Config +orbix-loc-ssl 3077/tcp # Orbix 2000 Locator SSL +orbix-loc-ssl 3077/udp # Orbix 2000 Locator SSL +orbix-cfg-ssl 3078/tcp # Orbix 2000 Locator SSL +orbix-cfg-ssl 3078/udp # Orbix 2000 Locator SSL +lv-frontpanel 3079/tcp # LV Front Panel +lv-frontpanel 3079/udp # LV Front Panel +stm_pproc 3080/tcp stm-pproc # stm_pproc +stm_pproc 3080/udp stm-pproc # stm_pproc +tl1-lv 3081/tcp # TL1-LV +tl1-lv 3081/udp # TL1-LV +tl1-raw 3082/tcp # TL1-RAW +tl1-raw 3082/udp # TL1-RAW +tl1-telnet 3083/tcp # TL1-TELNET +tl1-telnet 3083/udp # TL1-TELNET +itm-mccs 3084/tcp # ITM-MCCS +itm-mccs 3084/udp # ITM-MCCS +pcihreq 3085/tcp # PCIHReq +pcihreq 3085/udp # PCIHReq +jdl-dbkitchen 3086/tcp # JDL-DBKitchen +jdl-dbkitchen 3086/udp # JDL-DBKitchen +asoki-sma 3087/tcp # Asoki SMA +asoki-sma 3087/udp # Asoki SMA +xdtp 3088/tcp # eXtensible Data Transfer Protocol +xdtp 3088/udp # eXtensible Data Transfer Protocol +ptk-alink 3089/tcp # ParaTek Agent Linking +ptk-alink 3089/udp # ParaTek Agent Linking +stss 3090/tcp # Senforce Session Services +stss 3090/udp # Senforce Session Services +1ci-smcs 3091/tcp # 1Ci Server Management +1ci-smcs 3091/udp # 1Ci Server Management +rapidmq-center 3093/tcp # Jiiva RapidMQ Center +rapidmq-center 3093/udp # Jiiva RapidMQ Center +rapidmq-reg 3094/tcp # Jiiva RapidMQ Registry +rapidmq-reg 3094/udp # Jiiva RapidMQ Registry +panasas 3095/tcp # Panasas rendevous port +panasas 3095/udp # Panasas rendevous port +ndl-aps 3096/tcp # Active Print Server Port +ndl-aps 3096/udp # Active Print Server Port +itu-bicc-stc 3097/sctp # ITU-T Q.1902.1/Q.2150.3 +umm-port 3098/tcp # Universal Message Manager +umm-port 3098/udp # Universal Message Manager +chmd 3099/tcp # CHIPSY Machine Daemon +chmd 3099/udp # CHIPSY Machine Daemon +opcon-xps 3100/tcp # OpCon/xps +opcon-xps 3100/udp # OpCon/xps +hp-pxpib 3101/tcp # HP PolicyXpert PIB Server +hp-pxpib 3101/udp # HP PolicyXpert PIB Server +slslavemon 3102/tcp # SoftlinK Slave Mon Port +slslavemon 3102/udp # SoftlinK Slave Mon Port +autocuesmi 3103/tcp # Autocue SMI Protocol +autocuesmi 3103/udp # Autocue SMI Protocol +autocuelog 3104/tcp # Autocue Logger Protocol +autocuetime 3104/udp # Autocue Time Service +cardbox 3105/tcp # Cardbox +cardbox 3105/udp # Cardbox +cardbox-http 3106/tcp # Cardbox HTTP +cardbox-http 3106/udp # Cardbox HTTP +business 3107/tcp # Business protocol +business 3107/udp # Business protocol +geolocate 3108/tcp # Geolocate protocol +geolocate 3108/udp # Geolocate protocol +personnel 3109/tcp # Personnel protocol +personnel 3109/udp # Personnel protocol +sim-control 3110/tcp # simulator control port +sim-control 3110/udp # simulator control port +wsynch 3111/tcp # Web Synchronous Services +wsynch 3111/udp # Web Synchronous Services +ksysguard 3112/tcp # KDE System Guard +ksysguard 3112/udp # KDE System Guard +cs-auth-svr 3113/tcp # CS-Authenticate Svr Port +cs-auth-svr 3113/udp # CS-Authenticate Svr Port +ccmad 3114/tcp # CCM AutoDiscover +ccmad 3114/udp # CCM AutoDiscover +mctet-master 3115/tcp # MCTET Master +mctet-master 3115/udp # MCTET Master +mctet-gateway 3116/tcp # MCTET Gateway +mctet-gateway 3116/udp # MCTET Gateway +mctet-jserv 3117/tcp # MCTET Jserv +mctet-jserv 3117/udp # MCTET Jserv +pkagent 3118/tcp # PKAgent +pkagent 3118/udp # PKAgent +d2000kernel 3119/tcp # D2000 Kernel Port +d2000kernel 3119/udp # D2000 Kernel Port +d2000webserver 3120/tcp # D2000 Webserver Port +d2000webserver 3120/udp # D2000 Webserver Port +pcmk-remote 3121/tcp # pacemaker remote service +vtr-emulator 3122/tcp # MTI VTR Emulator port +vtr-emulator 3122/udp # MTI VTR Emulator port +edix 3123/tcp # EDI Translation Protocol +edix 3123/udp # EDI Translation Protocol +beacon-port 3124/tcp # Beacon Port +beacon-port 3124/udp # Beacon Port +a13-an 3125/tcp # A13-AN Interface +a13-an 3125/udp # A13-AN Interface +ctx-bridge 3127/tcp # CTX Bridge Port +ctx-bridge 3127/udp # CTX Bridge Port +ndl-aas 3128/udp # Active API Server Port +netport-id 3129/tcp # NetPort Discovery Port +netport-id 3129/udp # NetPort Discovery Port +netbookmark 3131/tcp # Net Book Mark +netbookmark 3131/udp # Net Book Mark +ms-rule-engine 3132/tcp # Microsoft Business Rule Engine Update Service +ms-rule-engine 3132/udp # Microsoft Business Rule Engine Update Service +prism-deploy 3133/tcp # Prism Deploy User Port +prism-deploy 3133/udp # Prism Deploy User Port +ecp 3134/tcp # Extensible Code Protocol +ecp 3134/udp # Extensible Code Protocol +peerbook-port 3135/tcp # PeerBook Port +peerbook-port 3135/udp # PeerBook Port +grubd 3136/tcp # Grub Server Port +grubd 3136/udp # Grub Server Port +rtnt-1 3137/tcp # rtnt-1 data packets +rtnt-1 3137/udp # rtnt-1 data packets +rtnt-2 3138/tcp # rtnt-2 data packets +rtnt-2 3138/udp # rtnt-2 data packets +incognitorv 3139/tcp # Incognito Rendez-Vous +incognitorv 3139/udp # Incognito Rendez-Vous +ariliamulti 3140/tcp # Arilia Multiplexor +ariliamulti 3140/udp # Arilia Multiplexor +vmodem 3141/tcp # VMODEM +vmodem 3141/udp # VMODEM +rdc-wh-eos 3142/tcp # RDC WH EOS +rdc-wh-eos 3142/udp # RDC WH EOS +seaview 3143/tcp # Sea View +seaview 3143/udp # Sea View +tarantella 3144/tcp # Tarantella +tarantella 3144/udp # Tarantella +csi-lfap 3145/tcp # CSI-LFAP +csi-lfap 3145/udp # CSI-LFAP +bears-02 3146/tcp # bears-02 +bears-02 3146/udp # bears-02 +rfio 3147/tcp # RFIO +rfio 3147/udp # RFIO +nm-game-admin 3148/tcp # NetMike Game Administrator +nm-game-admin 3148/udp # NetMike Game Administrator +nm-game-server 3149/tcp # NetMike Game Server +nm-game-server 3149/udp # NetMike Game Server +nm-asses-admin 3150/tcp # NetMike Assessor Administrator +nm-asses-admin 3150/udp # NetMike Assessor Administrator +nm-assessor 3151/tcp # NetMike Assessor +nm-assessor 3151/udp # NetMike Assessor +feitianrockey 3152/tcp # FeiTian Port +feitianrockey 3152/udp # FeiTian Port +s8-client-port 3153/tcp # S8Cargo Client Port +s8-client-port 3153/udp # S8Cargo Client Port +ccmrmi 3154/tcp # ON RMI Registry +ccmrmi 3154/udp # ON RMI Registry +jpegmpeg 3155/tcp # JpegMpeg Port +jpegmpeg 3155/udp # JpegMpeg Port +indura 3156/tcp # Indura Collector +indura 3156/udp # Indura Collector +e3consultants 3157/tcp # CCC Listener Port +e3consultants 3157/udp # CCC Listener Port +stvp 3158/tcp # SmashTV Protocol +stvp 3158/udp # SmashTV Protocol +navegaweb-port 3159/tcp # NavegaWeb Tarification +navegaweb-port 3159/udp # NavegaWeb Tarification +tip-app-server 3160/tcp # TIP Application Server +tip-app-server 3160/udp # TIP Application Server +doc1lm 3161/tcp # DOC1 License Manager +doc1lm 3161/udp # DOC1 License Manager +sflm 3162/tcp # SFLM +sflm 3162/udp # SFLM +res-sap 3163/tcp # RES-SAP +res-sap 3163/udp # RES-SAP +imprs 3164/tcp # IMPRS +imprs 3164/udp # IMPRS +newgenpay 3165/tcp # Newgenpay Engine Service +newgenpay 3165/udp # Newgenpay Engine Service +sossecollector 3166/tcp # Quest Spotlight Out-Of-Process Collector +sossecollector 3166/udp # Quest Spotlight Out-Of-Process Collector +nowcontact 3167/tcp # Now Contact Public Server +nowcontact 3167/udp # Now Contact Public Server +poweronnud 3168/tcp # Now Up-to-Date Public Server +poweronnud 3168/udp # Now Up-to-Date Public Server +serverview-as 3169/tcp # SERVERVIEW-AS +serverview-as 3169/udp # SERVERVIEW-AS +serverview-asn 3170/tcp # SERVERVIEW-ASN +serverview-asn 3170/udp # SERVERVIEW-ASN +serverview-gf 3171/tcp # SERVERVIEW-GF +serverview-gf 3171/udp # SERVERVIEW-GF +serverview-rm 3172/tcp # SERVERVIEW-RM +serverview-rm 3172/udp # SERVERVIEW-RM +serverview-icc 3173/tcp # SERVERVIEW-ICC +serverview-icc 3173/udp # SERVERVIEW-ICC +armi-server 3174/tcp # ARMI Server +armi-server 3174/udp # ARMI Server +t1-e1-over-ip 3175/tcp # T1_E1_Over_IP +t1-e1-over-ip 3175/udp # T1_E1_Over_IP +ars-master 3176/tcp # ARS Master +ars-master 3176/udp # ARS Master +phonex-port 3177/tcp # Phonex Protocol +phonex-port 3177/udp # Phonex Protocol +radclientport 3178/tcp # Radiance UltraEdge Port +radclientport 3178/udp # Radiance UltraEdge Port +h2gf-w-2m 3179/tcp # H2GF W.2m Handover prot. +h2gf-w-2m 3179/udp # H2GF W.2m Handover prot. +mc-brk-srv 3180/tcp # Millicent Broker Server +mc-brk-srv 3180/udp # Millicent Broker Server +bmcpatrolagent 3181/tcp # BMC Patrol Agent +bmcpatrolagent 3181/udp # BMC Patrol Agent +bmcpatrolrnvu 3182/tcp # BMC Patrol Rendezvous +bmcpatrolrnvu 3182/udp # BMC Patrol Rendezvous +cops-tls 3183/tcp # COPS/TLS +cops-tls 3183/udp # COPS/TLS +apogeex-port 3184/tcp # ApogeeX Port +apogeex-port 3184/udp # ApogeeX Port +smpppd 3185/tcp # SuSE Meta PPPD +smpppd 3185/udp # SuSE Meta PPPD +iiw-port 3186/tcp # IIW Monitor User Port +iiw-port 3186/udp # IIW Monitor User Port +odi-port 3187/tcp # Open Design Listen Port +odi-port 3187/udp # Open Design Listen Port +brcm-comm-port 3188/tcp # Broadcom Port +brcm-comm-port 3188/udp # Broadcom Port +pcle-infex 3189/tcp # Pinnacle Sys InfEx Port +pcle-infex 3189/udp # Pinnacle Sys InfEx Port +csvr-proxy 3190/tcp # ConServR Proxy +csvr-proxy 3190/udp # ConServR Proxy +csvr-sslproxy 3191/tcp # ConServR SSL Proxy +csvr-sslproxy 3191/udp # ConServR SSL Proxy +firemonrcc 3192/tcp # FireMon Revision Control +firemonrcc 3192/udp # FireMon Revision Control +spandataport 3193/tcp # SpanDataPort +spandataport 3193/udp # SpanDataPort +magbind 3194/tcp # Rockstorm MAG protocol +magbind 3194/udp # Rockstorm MAG protocol +ncu-1 3195/tcp # Network Control Unit +ncu-1 3195/udp # Network Control Unit +ncu-2 3196/tcp # Network Control Unit +ncu-2 3196/udp # Network Control Unit +embrace-dp-s 3197/tcp # Embrace Device Protocol Server +embrace-dp-s 3197/udp # Embrace Device Protocol Server +embrace-dp-c 3198/tcp # Embrace Device Protocol Client +embrace-dp-c 3198/udp # Embrace Device Protocol Client +dmod-workspace 3199/tcp # DMOD WorkSpace +dmod-workspace 3199/udp # DMOD WorkSpace +tick-port 3200/tcp # Press-sense Tick Port +tick-port 3200/udp # Press-sense Tick Port +cpq-tasksmart 3201/tcp # CPQ-TaskSmart +cpq-tasksmart 3201/udp # CPQ-TaskSmart +intraintra 3202/tcp # IntraIntra +intraintra 3202/udp # IntraIntra +netwatcher-mon 3203/tcp # Network Watcher Monitor +netwatcher-mon 3203/udp # Network Watcher Monitor +netwatcher-db 3204/tcp # Network Watcher DB Access +netwatcher-db 3204/udp # Network Watcher DB Access +isns 3205/tcp # iSNS Server Port +isns 3205/udp # iSNS Server Port +ironmail 3206/tcp # IronMail POP Proxy +ironmail 3206/udp # IronMail POP Proxy +vx-auth-port 3207/tcp # Veritas Authentication Port +vx-auth-port 3207/udp # Veritas Authentication Port +pfu-prcallback 3208/tcp # PFU PR Callback +pfu-prcallback 3208/udp # PFU PR Callback +netwkpathengine 3209/tcp # HP OpenView Network Path Engine Server +netwkpathengine 3209/udp # HP OpenView Network Path Engine Server +flamenco-proxy 3210/tcp # Flamenco Networks Proxy +flamenco-proxy 3210/udp # Flamenco Networks Proxy +avsecuremgmt 3211/tcp # Avocent Secure Management +avsecuremgmt 3211/udp # Avocent Secure Management +surveyinst 3212/tcp # Survey Instrument +surveyinst 3212/udp # Survey Instrument +neon24x7 3213/tcp # NEON 24X7 Mission Control +neon24x7 3213/udp # NEON 24X7 Mission Control +jmq-daemon-1 3214/tcp # JMQ Daemon Port 1 +jmq-daemon-1 3214/udp # JMQ Daemon Port 1 +jmq-daemon-2 3215/tcp # JMQ Daemon Port 2 +jmq-daemon-2 3215/udp # JMQ Daemon Port 2 +ferrari-foam 3216/tcp # Ferrari electronic FOAM +ferrari-foam 3216/udp # Ferrari electronic FOAM +unite 3217/tcp # Unified IP & Telecomm Environment +unite 3217/udp # Unified IP & Telecomm Environment +smartpackets 3218/tcp # EMC SmartPackets +smartpackets 3218/udp # EMC SmartPackets +wms-messenger 3219/tcp # WMS Messenger +wms-messenger 3219/udp # WMS Messenger +xnm-ssl 3220/tcp # XML NM over SSL +xnm-ssl 3220/udp # XML NM over SSL +xnm-clear-text 3221/tcp # XML NM over TCP +xnm-clear-text 3221/udp # XML NM over TCP +glbp 3222/tcp # Gateway Load Balancing Pr +glbp 3222/udp # Gateway Load Balancing Pr +digivote 3223/tcp # DIGIVOTE (R) Vote-Server +digivote 3223/udp # DIGIVOTE (R) Vote-Server +aes-discovery 3224/tcp # AES Discovery Port +aes-discovery 3224/udp # AES Discovery Port +fcip-port 3225/tcp # FCIP +fcip-port 3225/udp # FCIP +isi-irp 3226/tcp # ISI Industry Software IRP +isi-irp 3226/udp # ISI Industry Software IRP +dwnmshttp 3227/tcp # DiamondWave NMS Server +dwnmshttp 3227/udp # DiamondWave NMS Server +dwmsgserver 3228/tcp # DiamondWave MSG Server +dwmsgserver 3228/udp # DiamondWave MSG Server +global-cd-port 3229/tcp # Global CD Port +global-cd-port 3229/udp # Global CD Port +sftdst-port 3230/tcp # Software Distributor Port +sftdst-port 3230/udp # Software Distributor Port +vidigo 3231/tcp # VidiGo communication +vidigo 3231/udp # VidiGo communication +mdtp 3232/tcp # MDT port +mdtp 3232/udp # MDT port +whisker 3233/tcp # WhiskerControl main port +whisker 3233/udp # WhiskerControl main port +alchemy 3234/tcp # Alchemy Server +alchemy 3234/udp # Alchemy Server +mdap-port 3235/tcp # MDAP port +mdap-port 3235/udp # MDAP Port +apparenet-ts 3236/tcp # appareNet Test Server +apparenet-ts 3236/udp # appareNet Test Server +apparenet-tps 3237/tcp # appareNet Test Packet Sequencer +apparenet-tps 3237/udp # appareNet Test Packet Sequencer +apparenet-as 3238/tcp # appareNet Analysis Server +apparenet-as 3238/udp # appareNet Analysis Server +apparenet-ui 3239/tcp # appareNet User Interface +apparenet-ui 3239/udp # appareNet User Interface +triomotion 3240/tcp # Trio Motion Control Port +triomotion 3240/udp # Trio Motion Control Port +sysorb 3241/tcp # SysOrb Monitoring Server +sysorb 3241/udp # SysOrb Monitoring Server +sdp-id-port 3242/tcp # Session Description ID +sdp-id-port 3242/udp # Session Description ID +timelot 3243/tcp # Timelot Port +timelot 3243/udp # Timelot Port +onesaf 3244/tcp # OneSAF +onesaf 3244/udp # OneSAF +vieo-fe 3245/tcp # VIEO Fabric Executive +vieo-fe 3245/udp # VIEO Fabric Executive +dvt-system 3246/tcp # DVT SYSTEM PORT +dvt-system 3246/udp # DVT SYSTEM PORT +dvt-data 3247/tcp # DVT DATA LINK +dvt-data 3247/udp # DVT DATA LINK +procos-lm 3248/tcp # PROCOS LM +procos-lm 3248/udp # PROCOS LM +ssp 3249/tcp # State Sync Protocol +ssp 3249/udp # State Sync Protocol +hicp 3250/tcp # HMS hicp port +hicp 3250/udp # HMS hicp port +sysscanner 3251/tcp # Sys Scanner +sysscanner 3251/udp # Sys Scanner +dhe 3252/tcp # DHE port +dhe 3252/udp # DHE port +pda-data 3253/tcp # PDA Data +pda-data 3253/udp # PDA Data +pda-sys 3254/tcp # PDA System +pda-sys 3254/udp # PDA System +semaphore 3255/tcp # Semaphore Connection Port +semaphore 3255/udp # Semaphore Connection Port +cpqrpm-agent 3256/tcp # Compaq RPM Agent Port +cpqrpm-agent 3256/udp # Compaq RPM Agent Port +cpqrpm-server 3257/tcp # Compaq RPM Server Port +cpqrpm-server 3257/udp # Compaq RPM Server Port +ivecon-port 3258/tcp # Ivecon Server Port +ivecon-port 3258/udp # Ivecon Server Port +epncdp2 3259/tcp # Epson Network Common Devi +epncdp2 3259/udp # Epson Network Common Devi +iscsi-target 3260/tcp # iSCSI port +iscsi-target 3260/udp # iSCSI port +winshadow 3261/tcp # winShadow +winshadow 3261/udp # winShadow +necp 3262/tcp # NECP +necp 3262/udp # NECP +ecolor-imager 3263/tcp # E-Color Enterprise Imager +ecolor-imager 3263/udp # E-Color Enterprise Imager +ccmail 3264/tcp # cc:mail/lotus +ccmail 3264/udp # cc:mail/lotus +altav-tunnel 3265/tcp # Altav Tunnel +altav-tunnel 3265/udp # Altav Tunnel +ns-cfg-server 3266/tcp # NS CFG Server +ns-cfg-server 3266/udp # NS CFG Server +ibm-dial-out 3267/tcp # IBM Dial Out +ibm-dial-out 3267/udp # IBM Dial Out +msft-gc 3268/tcp # Microsoft Global Catalog +msft-gc 3268/udp # Microsoft Global Catalog +msft-gc-ssl 3269/tcp # Microsoft Global Catalog with LDAP/SSL +msft-gc-ssl 3269/udp # Microsoft Global Catalog with LDAP/SSL +verismart 3270/tcp # Verismart +verismart 3270/udp # Verismart +csoft-prev 3271/tcp # CSoft Prev Port +csoft-prev 3271/udp # CSoft Prev Port +user-manager 3272/tcp # Fujitsu User Manager +user-manager 3272/udp # Fujitsu User Manager +sxmp 3273/tcp # Simple Extensible Multiplexed Protocol +sxmp 3273/udp # Simple Extensible Multiplexed Protocol +ordinox-server 3274/tcp # Ordinox Server +ordinox-server 3274/udp # Ordinox Server +samd 3275/tcp # SAMD +samd 3275/udp # SAMD +maxim-asics 3276/tcp # Maxim ASICs +maxim-asics 3276/udp # Maxim ASICs +awg-proxy 3277/tcp # AWG Proxy +awg-proxy 3277/udp # AWG Proxy +lkcmserver 3278/tcp # LKCM Server +lkcmserver 3278/udp # LKCM Server +admind 3279/tcp # admind +admind 3279/udp # admind +vs-server 3280/tcp # VS Server +vs-server 3280/udp # VS Server +sysopt 3281/tcp # SYSOPT +sysopt 3281/udp # SYSOPT +datusorb 3282/tcp # Datusorb +datusorb 3282/udp # Datusorb +net-assistant 3283/tcp # Apple Remote Desktop - Net Assistant +net-assistant 3283/udp # Apple Remote Desktop - Net Assistant +4talk 3284/tcp # 4Talk +4talk 3284/udp # 4Talk +plato 3285/tcp # Plato +plato 3285/udp # Plato +e-net 3286/tcp # E-Net +e-net 3286/udp # E-Net +directvdata 3287/tcp # DIRECTVDATA +directvdata 3287/udp # DIRECTVDATA +cops 3288/tcp # COPS +cops 3288/udp # COPS +enpc 3289/tcp # ENPC +enpc 3289/udp # ENPC +caps-lm 3290/tcp # CAPS LOGISTICS TOOLKIT - LM +caps-lm 3290/udp # CAPS LOGISTICS TOOLKIT - LM +sah-lm 3291/tcp # S A Holditch & Associates - LM +sah-lm 3291/udp # S A Holditch & Associates - LM +cart-o-rama 3292/tcp # Cart O Rama +cart-o-rama 3292/udp # Cart O Rama +fg-fps 3293/tcp # fg-fps +fg-fps 3293/udp # fg-fps +fg-gip 3294/tcp # fg-gip +fg-gip 3294/udp # fg-gip +dyniplookup 3295/tcp # Dynamic IP Lookup +dyniplookup 3295/udp # Dynamic IP Lookup +rib-slm 3296/tcp # Rib License Manager +rib-slm 3296/udp # Rib License Manager +cytel-lm 3297/tcp # Cytel License Manager +cytel-lm 3297/udp # Cytel License Manager +deskview 3298/tcp # DeskView +deskview 3298/udp # DeskView +pdrncs 3299/tcp # pdrncs +pdrncs 3299/udp # pdrncs +mcs-fastmail 3302/tcp # MCS Fastmail +mcs-fastmail 3302/udp # MCS Fastmail +opsession-clnt 3303/tcp # OP Session Client +opsession-clnt 3303/udp # OP Session Client +opsession-srvr 3304/tcp # OP Session Server +opsession-srvr 3304/udp # OP Session Server +odette-ftp 3305/tcp # ODETTE-FTP +odette-ftp 3305/udp # ODETTE-FTP +opsession-prxy 3307/tcp # OP Session Proxy +opsession-prxy 3307/udp # OP Session Proxy +tns-server 3308/tcp # TNS Server +tns-server 3308/udp # TNS Server +tns-adv 3309/tcp # TNS ADV +tns-adv 3309/udp # TNS ADV +dyna-access 3310/tcp # Dyna Access +dyna-access 3310/udp # Dyna Access +mcns-tel-ret 3311/tcp # MCNS Tel Ret +mcns-tel-ret 3311/udp # MCNS Tel Ret +appman-server 3312/tcp # Application Management Server +appman-server 3312/udp # Application Management Server +uorb 3313/tcp # Unify Object Broker +uorb 3313/udp # Unify Object Broker +uohost 3314/tcp # Unify Object Host +uohost 3314/udp # Unify Object Host +cdid 3315/tcp # CDID +cdid 3315/udp # CDID +aicc-cmi 3316/tcp # AICC/CMI +aicc-cmi 3316/udp # AICC/CMI +vsaiport 3317/tcp # VSAI PORT +vsaiport 3317/udp # VSAI PORT +ssrip 3318/tcp # Swith to Swith Routing Information Protocol +ssrip 3318/udp # Swith to Swith Routing Information Protocol +sdt-lmd 3319/tcp # SDT License Manager +sdt-lmd 3319/udp # SDT License Manager +officelink2000 3320/tcp # Office Link 2000 +officelink2000 3320/udp # Office Link 2000 +vnsstr 3321/tcp # VNSSTR +vnsstr 3321/udp # VNSSTR +sftu 3326/tcp # SFTU +sftu 3326/udp # SFTU +bbars 3327/tcp # BBARS +bbars 3327/udp # BBARS +egptlm 3328/tcp # Eaglepoint License Manager +egptlm 3328/udp # Eaglepoint License Manager +hp-device-disc 3329/tcp # HP Device Disc +hp-device-disc 3329/udp # HP Device Disc +mcs-calypsoicf 3330/tcp # MCS Calypso ICF +mcs-calypsoicf 3330/udp # MCS Calypso ICF +mcs-messaging 3331/tcp # MCS Messaging +mcs-messaging 3331/udp # MCS Messaging +mcs-mailsvr 3332/tcp # MCS Mail Server +mcs-mailsvr 3332/udp # MCS Mail Server +dec-notes 3333/tcp # DEC Notes +dec-notes 3333/udp # DEC Notes +directv-web 3334/tcp # Direct TV Webcasting +directv-web 3334/udp # Direct TV Webcasting +directv-soft 3335/tcp # Direct TV Software Updates +directv-soft 3335/udp # Direct TV Software Updates +directv-tick 3336/tcp # Direct TV Tickers +directv-tick 3336/udp # Direct TV Tickers +directv-catlg 3337/tcp # Direct TV Data Catalog +directv-catlg 3337/udp # Direct TV Data Catalog +anet-b 3338/tcp # OMF data b +anet-b 3338/udp # OMF data b +anet-l 3339/tcp # OMF data l +anet-l 3339/udp # OMF data l +anet-m 3340/tcp # OMF data m +anet-m 3340/udp # OMF data m +anet-h 3341/tcp # OMF data h +anet-h 3341/udp # OMF data h +webtie 3342/tcp # WebTIE +webtie 3342/udp # WebTIE +ms-cluster-net 3343/tcp # MS Cluster Net +ms-cluster-net 3343/udp # MS Cluster Net +bnt-manager 3344/tcp # BNT Manager +bnt-manager 3344/udp # BNT Manager +influence 3345/tcp # Influence +influence 3345/udp # Influence +phoenix-rpc 3347/tcp # Phoenix RPC +phoenix-rpc 3347/udp # Phoenix RPC +pangolin-laser 3348/tcp # Pangolin Laser +pangolin-laser 3348/udp # Pangolin Laser +chevinservices 3349/tcp # Chevin Services +chevinservices 3349/udp # Chevin Services +findviatv 3350/tcp # FINDVIATV +findviatv 3350/udp # FINDVIATV +btrieve 3351/tcp # Btrieve port +btrieve 3351/udp # Btrieve port +ssql 3352/tcp # Scalable SQL +ssql 3352/udp # Scalable SQL +fatpipe 3353/tcp # FATPIPE +fatpipe 3353/udp # FATPIPE +suitjd 3354/tcp # SUITJD +suitjd 3354/udp # SUITJD +ordinox-dbase 3355/tcp # Ordinox Dbase +ordinox-dbase 3355/udp # Ordinox Dbase +upnotifyps 3356/tcp # UPNOTIFYPS +upnotifyps 3356/udp # UPNOTIFYPS +adtech-test 3357/tcp # Adtech Test IP +adtech-test 3357/udp # Adtech Test IP +mpsysrmsvr 3358/tcp # Mp Sys Rmsvr +mpsysrmsvr 3358/udp # Mp Sys Rmsvr +wg-netforce 3359/tcp # WG NetForce +wg-netforce 3359/udp # WG NetForce +kv-server 3360/tcp # KV Server +kv-server 3360/udp # KV Server +kv-agent 3361/tcp # KV Agent +kv-agent 3361/udp # KV Agent +dj-ilm 3362/tcp # DJ ILM +dj-ilm 3362/udp # DJ ILM +nati-vi-server 3363/tcp # NATI Vi Server +nati-vi-server 3363/udp # NATI Vi Server +tip2 3372/tcp # TIP 2 +tip2 3372/udp # TIP 2 +lavenir-lm 3373/tcp # Lavenir License Manager +lavenir-lm 3373/udp # Lavenir License Manager +cluster-disc 3374/tcp # Cluster Disc +cluster-disc 3374/udp # Cluster Disc +vsnm-agent 3375/tcp # VSNM Agent +vsnm-agent 3375/udp # VSNM Agent +cdbroker 3376/tcp # CD Broker +cdbroker 3376/udp # CD Broker +cogsys-lm 3377/tcp # Cogsys Network License Manager +cogsys-lm 3377/udp # Cogsys Network License Manager +wsicopy 3378/tcp # WSICOPY +wsicopy 3378/udp # WSICOPY +socorfs 3379/tcp # SOCORFS +socorfs 3379/udp # SOCORFS +sns-channels 3380/tcp # SNS Channels +sns-channels 3380/udp # SNS Channels +geneous 3381/tcp # Geneous +geneous 3381/udp # Geneous +fujitsu-neat 3382/tcp # Fujitsu Network Enhanced Antitheft function +fujitsu-neat 3382/udp # Fujitsu Network Enhanced Antitheft function +esp-lm 3383/tcp # Enterprise Software Products License Manager +esp-lm 3383/udp # Enterprise Software Products License Manager +hp-clic 3384/tcp # Cluster Management Services +hp-clic 3384/udp # Hardware Management +qnxnetman 3385/tcp # qnxnetman +qnxnetman 3385/udp # qnxnetman +gprs-data 3386/tcp # GPRS Data +gprs-sig 3386/udp # GPRS SIG +backroomnet 3387/tcp # Back Room Net +backroomnet 3387/udp # Back Room Net +cbserver 3388/tcp # CB Server +cbserver 3388/udp # CB Server +ms-wbt-server 3389/tcp # MS WBT Server +ms-wbt-server 3389/udp # MS WBT Server +dsc 3390/tcp # Distributed Service Coordinator +dsc 3390/udp # Distributed Service Coordinator +savant 3391/tcp # SAVANT +savant 3391/udp # SAVANT +efi-lm 3392/tcp # EFI License Management +efi-lm 3392/udp # EFI License Management +d2k-tapestry1 3393/tcp # D2K Tapestry Client to Server +d2k-tapestry1 3393/udp # D2K Tapestry Client to Server +d2k-tapestry2 3394/tcp # D2K Tapestry Server to Server +d2k-tapestry2 3394/udp # D2K Tapestry Server to Server +dyna-lm 3395/tcp # Dyna License Manager (Elam) +dyna-lm 3395/udp # Dyna License Manager (Elam) +printer_agent 3396/tcp printer-agent # Printer Agent +printer_agent 3396/udp printer-agent # Printer Agent +cloanto-lm 3397/tcp # Cloanto License Manager +cloanto-lm 3397/udp # Cloanto License Manager +mercantile 3398/tcp # Mercantile +mercantile 3398/udp # Mercantile +csms 3399/tcp # CSMS +csms 3399/udp # CSMS +csms2 3400/tcp # CSMS2 +csms2 3400/udp # CSMS2 +filecast 3401/tcp # filecast +filecast 3401/udp # filecast +fxaengine-net 3402/tcp # FXa Engine Network Port +fxaengine-net 3402/udp # FXa Engine Network Port +nokia-ann-ch1 3405/tcp # Nokia Announcement ch 1 +nokia-ann-ch1 3405/udp # Nokia Announcement ch 1 +nokia-ann-ch2 3406/tcp # Nokia Announcement ch 2 +nokia-ann-ch2 3406/udp # Nokia Announcement ch 2 +ldap-admin 3407/tcp # LDAP admin server port +ldap-admin 3407/udp # LDAP admin server port +BESApi 3408/tcp # BES Api Port +BESApi 3408/udp # BES Api Port +networklens 3409/tcp # NetworkLens Event Port +networklens 3409/udp # NetworkLens Event Port +networklenss 3410/tcp # NetworkLens SSL Event +networklenss 3410/udp # NetworkLens SSL Event +biolink-auth 3411/tcp # BioLink Authenteon server +biolink-auth 3411/udp # BioLink Authenteon server +xmlblaster 3412/tcp # xmlBlaster +xmlblaster 3412/udp # xmlBlaster +svnet 3413/tcp # SpecView Networking +svnet 3413/udp # SpecView Networking +wip-port 3414/tcp # BroadCloud WIP Port +wip-port 3414/udp # BroadCloud WIP Port +bcinameservice 3415/tcp # BCI Name Service +bcinameservice 3415/udp # BCI Name Service +commandport 3416/tcp # AirMobile IS Command Port +commandport 3416/udp # AirMobile IS Command Port +csvr 3417/tcp # ConServR file translation +csvr 3417/udp # ConServR file translation +rnmap 3418/tcp # Remote nmap +rnmap 3418/udp # Remote nmap +softaudit 3419/tcp # Isogon SoftAudit +softaudit 3419/udp # ISogon SoftAudit +ifcp-port 3420/tcp # iFCP User Port +ifcp-port 3420/udp # iFCP User Port +bmap 3421/tcp # Bull Apprise portmapper +bmap 3421/udp # Bull Apprise portmapper +rusb-sys-port 3422/tcp # Remote USB System Port +rusb-sys-port 3422/udp # Remote USB System Port +xtrm 3423/tcp # xTrade Reliable Messaging +xtrm 3423/udp # xTrade Reliable Messaging +xtrms 3424/tcp # xTrade over TLS/SSL +xtrms 3424/udp # xTrade over TLS/SSL +agps-port 3425/tcp # AGPS Access Port +agps-port 3425/udp # AGPS Access Port +arkivio 3426/tcp # Arkivio Storage Protocol +arkivio 3426/udp # Arkivio Storage Protocol +websphere-snmp 3427/tcp # WebSphere SNMP +websphere-snmp 3427/udp # WebSphere SNMP +twcss 3428/tcp # 2Wire CSS +twcss 3428/udp # 2Wire CSS +gcsp 3429/tcp # GCSP user port +gcsp 3429/udp # GCSP user port +ssdispatch 3430/tcp # Scott Studios Dispatch +ssdispatch 3430/udp # Scott Studios Dispatch +ndl-als 3431/tcp # Active License Server Port +ndl-als 3431/udp # Active License Server Port +osdcp 3432/tcp # Secure Device Protocol +osdcp 3432/udp # Secure Device Protocol +opnet-smp 3433/tcp # OPNET Service Management Platform +opnet-smp 3433/udp # OPNET Service Management Platform +opencm 3434/tcp # OpenCM Server +opencm 3434/udp # OpenCM Server +pacom 3435/tcp # Pacom Security User Port +pacom 3435/udp # Pacom Security User Port +gc-config 3436/tcp # GuardControl Exchange Protocol +gc-config 3436/udp # GuardControl Exchange Protocol +autocueds 3437/tcp # Autocue Directory Service +autocueds 3437/udp # Autocue Directory Service +spiral-admin 3438/tcp # Spiralcraft Admin +spiral-admin 3438/udp # Spiralcraft Admin +hri-port 3439/tcp # HRI Interface Port +hri-port 3439/udp # HRI Interface Port +ans-console 3440/tcp # Net Steward Mgmt Console +ans-console 3440/udp # Net Steward Mgmt Console +connect-client 3441/tcp # OC Connect Client +connect-client 3441/udp # OC Connect Client +connect-server 3442/tcp # OC Connect Server +connect-server 3442/udp # OC Connect Server +ov-nnm-websrv 3443/tcp # OpenView Network Node Manager WEB Server +ov-nnm-websrv 3443/udp # OpenView Network Node Manager WEB Server +denali-server 3444/tcp # Denali Server +denali-server 3444/udp # Denali Server +monp 3445/tcp # Media Object Network +monp 3445/udp # Media Object Network +3comfaxrpc 3446/tcp # 3Com FAX RPC port +3comfaxrpc 3446/udp # 3Com FAX RPC port +directnet 3447/tcp # DirectNet IM System +directnet 3447/udp # DirectNet IM System +dnc-port 3448/tcp # Discovery and Net Config +dnc-port 3448/udp # Discovery and Net Config +hotu-chat 3449/tcp # HotU Chat +hotu-chat 3449/udp # HotU Chat +castorproxy 3450/tcp # CAStorProxy +castorproxy 3450/udp # CAStorProxy +asam 3451/tcp # ASAM Services +asam 3451/udp # ASAM Services +sabp-signal 3452/tcp # SABP-Signalling Protocol +sabp-signal 3452/udp # SABP-Signalling Protocol +pscupd 3453/tcp # PSC Update Port +pscupd 3453/udp # PSC Update Port +mira 3454/tcp # Apple Remote Access Protocol +mira 3454/udp # Apple Remote Access Protocol +vat 3456/tcp # VAT default data +vat 3456/udp # VAT default data +vat-control 3457/tcp # VAT default control +vat-control 3457/udp # VAT default control +d3winosfi 3458/tcp # D3WinOSFI +d3winosfi 3458/udp # D3WinOSFI +integral 3459/tcp # TIP Integral +integral 3459/udp # TIP Integral +edm-manager 3460/tcp # EDM Manger +edm-manager 3460/udp # EDM Manger +edm-stager 3461/tcp # EDM Stager +edm-stager 3461/udp # EDM Stager +edm-std-notify 3462/tcp # EDM STD Notify +edm-std-notify 3462/udp # EDM STD Notify +edm-adm-notify 3463/tcp # EDM ADM Notify +edm-adm-notify 3463/udp # EDM ADM Notify +edm-mgr-sync 3464/tcp # EDM MGR Sync +edm-mgr-sync 3464/udp # EDM MGR Sync +edm-mgr-cntrl 3465/tcp # EDM MGR Cntrl +edm-mgr-cntrl 3465/udp # EDM MGR Cntrl +workflow 3466/tcp # WORKFLOW +workflow 3466/udp # WORKFLOW +rcst 3467/tcp # RCST +rcst 3467/udp # RCST +ttcmremotectrl 3468/tcp # TTCM Remote Controll +ttcmremotectrl 3468/udp # TTCM Remote Controll +pluribus 3469/tcp # Pluribus +pluribus 3469/udp # Pluribus +jt400 3470/tcp # jt400 +jt400 3470/udp # jt400 +jt400-ssl 3471/tcp # jt400-ssl +jt400-ssl 3471/udp # jt400-ssl +jaugsremotec-1 3472/tcp # JAUGS N-G Remotec 1 +jaugsremotec-1 3472/udp # JAUGS N-G Remotec 1 +jaugsremotec-2 3473/tcp # JAUGS N-G Remotec 2 +jaugsremotec-2 3473/udp # JAUGS N-G Remotec 2 +ttntspauto 3474/tcp # TSP Automation +ttntspauto 3474/udp # TSP Automation +genisar-port 3475/tcp # Genisar Comm Port +genisar-port 3475/udp # Genisar Comm Port +nppmp 3476/tcp # NVIDIA Mgmt Protocol +nppmp 3476/udp # NVIDIA Mgmt Protocol +ecomm 3477/tcp # eComm link port +ecomm 3477/udp # eComm link port +stun 3478/tcp stun-behavior turn # Session Traversal Utilities for NAT (STUN) port, TURN over TCP +stun 3478/udp stun-behavior turn # Session Traversal Utilities for NAT (STUN) port, TURN over UDP +twrpc 3479/tcp # 2Wire RPC +twrpc 3479/udp # 2Wire RPC +plethora 3480/tcp # Secure Virtual Workspace +plethora 3480/udp # Secure Virtual Workspace +cleanerliverc 3481/tcp # CleanerLive remote ctrl +cleanerliverc 3481/udp # CleanerLive remote ctrl +vulture 3482/tcp # Vulture Monitoring System +vulture 3482/udp # Vulture Monitoring System +slim-devices 3483/tcp # Slim Devices Protocol +slim-devices 3483/udp # Slim Devices Protocol +gbs-stp 3484/tcp # GBS SnapTalk Protocol +gbs-stp 3484/udp # GBS SnapTalk Protocol +celatalk 3485/tcp # CelaTalk +celatalk 3485/udp # CelaTalk +ifsf-hb-port 3486/tcp # IFSF Heartbeat Port +ifsf-hb-port 3486/udp # IFSF Heartbeat Port +ltctcp 3487/tcp # LISA TCP Transfer Channel +ltcudp 3487/udp # LISA UDP Transfer Channel +fs-rh-srv 3488/tcp # FS Remote Host Server +fs-rh-srv 3488/udp # FS Remote Host Server +dtp-dia 3489/tcp # DTP/DIA +dtp-dia 3489/udp # DTP/DIA +colubris 3490/tcp # Colubris Management Port +colubris 3490/udp # Colubris Management Port +swr-port 3491/tcp # SWR Port +swr-port 3491/udp # SWR Port +tvdumtray-port 3492/tcp # TVDUM Tray Port +tvdumtray-port 3492/udp # TVDUM Tray Port +nut 3493/tcp # Network UPS Tools +nut 3493/udp # Network UPS Tools +ibm3494 3494/tcp # IBM 3494 +ibm3494 3494/udp # IBM 3494 +seclayer-tcp 3495/tcp # securitylayer over tcp +seclayer-tcp 3495/udp # securitylayer over tcp +seclayer-tls 3496/tcp # securitylayer over tls +seclayer-tls 3496/udp # securitylayer over tls +ipether232port 3497/tcp # ipEther232Port +ipether232port 3497/udp # ipEther232Port +dashpas-port 3498/tcp # DASHPAS user port +dashpas-port 3498/udp # DASHPAS user port +sccip-media 3499/tcp # SccIP Media +sccip-media 3499/udp # SccIP Media +rtmp-port 3500/tcp # RTMP Port +rtmp-port 3500/udp # RTMP Port +isoft-p2p 3501/tcp # iSoft-P2P +isoft-p2p 3501/udp # iSoft-P2P +avinstalldisc 3502/tcp # Avocent Install Discovery +avinstalldisc 3502/udp # Avocent Install Discovery +lsp-ping 3503/tcp # MPLS LSP-echo Port +lsp-ping 3503/udp # MPLS LSP-echo Port +ironstorm 3504/tcp # IronStorm game server +ironstorm 3504/udp # IronStorm game server +ccmcomm 3505/tcp # CCM communications port +ccmcomm 3505/udp # CCM communications port +apc-3506 3506/tcp # APC 3506 +apc-3506 3506/udp # APC 3506 +nesh-broker 3507/tcp # Nesh Broker Port +nesh-broker 3507/udp # Nesh Broker Port +interactionweb 3508/tcp # Interaction Web +interactionweb 3508/udp # Interaction Web +vt-ssl 3509/tcp # Virtual Token SSL Port +vt-ssl 3509/udp # Virtual Token SSL Port +xss-port 3510/tcp # XSS Port +xss-port 3510/udp # XSS Port +webmail-2 3511/tcp # WebMail/2 +webmail-2 3511/udp # WebMail/2 +aztec 3512/tcp # Aztec Distribution Port +aztec 3512/udp # Aztec Distribution Port +arcpd 3513/tcp # Adaptec Remote Protocol +arcpd 3513/udp # Adaptec Remote Protocol +must-p2p 3514/tcp # MUST Peer to Peer +must-p2p 3514/udp # MUST Peer to Peer +must-backplane 3515/tcp # MUST Backplane +must-backplane 3515/udp # MUST Backplane +smartcard-port 3516/tcp # Smartcard Port +smartcard-port 3516/udp # Smartcard Port +802-11-iapp 3517/tcp # IEEE 802.11 WLANs WG IAPP +802-11-iapp 3517/udp # IEEE 802.11 WLANs WG IAPP +artifact-msg 3518/tcp # Artifact Message Server +artifact-msg 3518/udp # Artifact Message Server +nvmsgd 3519/tcp # Netvion Messenger Port +galileo 3519/udp # Netvion Galileo Port +galileolog 3520/tcp # Netvion Galileo Log Port +galileolog 3520/udp # Netvion Galileo Log Port +mc3ss 3521/tcp # Telequip Labs MC3SS +mc3ss 3521/udp # Telequip Labs MC3SS +nssocketport 3522/tcp # DO over NSSocketPort +nssocketport 3522/udp # DO over NSSocketPort +odeumservlink 3523/tcp # Odeum Serverlink +odeumservlink 3523/udp # Odeum Serverlink +ecmport 3524/tcp # ECM Server port +ecmport 3524/udp # ECM Server port +eisport 3525/tcp # EIS Server port +eisport 3525/udp # EIS Server port +starquiz-port 3526/tcp # starQuiz Port +starquiz-port 3526/udp # starQuiz Port +beserver-msg-q 3527/tcp # VERITAS Backup Exec Server +beserver-msg-q 3527/udp # VERITAS Backup Exec Server +jboss-iiop 3528/tcp # JBoss IIOP +jboss-iiop 3528/udp # JBoss IIOP +jboss-iiop-ssl 3529/tcp # JBoss IIOP/SSL +jboss-iiop-ssl 3529/udp # JBoss IIOP/SSL +gf 3530/tcp # Grid Friendly +gf 3530/udp # Grid Friendly +joltid 3531/tcp # Joltid +joltid 3531/udp # Joltid +raven-rmp 3532/tcp # Raven Remote Management Control +raven-rmp 3532/udp # Raven Remote Management Control +raven-rdp 3533/tcp # Raven Remote Management Data +raven-rdp 3533/udp # Raven Remote Management Data +urld-port 3534/tcp # URL Daemon Port +urld-port 3534/udp # URL Daemon Port +ms-la 3535/tcp # MS-LA +ms-la 3535/udp # MS-LA +snac 3536/tcp # SNAC +snac 3536/udp # SNAC +ni-visa-remote 3537/tcp # Remote NI-VISA port +ni-visa-remote 3537/udp # Remote NI-VISA port +ibm-diradm 3538/tcp # IBM Directory Server +ibm-diradm 3538/udp # IBM Directory Server +ibm-diradm-ssl 3539/tcp # IBM Directory Server SSL +ibm-diradm-ssl 3539/udp # IBM Directory Server SSL +pnrp-port 3540/tcp # PNRP User Port +pnrp-port 3540/udp # PNRP User Port +voispeed-port 3541/tcp # VoiSpeed Port +voispeed-port 3541/udp # VoiSpeed Port +hacl-monitor 3542/tcp # HA cluster monitor +hacl-monitor 3542/udp # HA cluster monitor +qftest-lookup 3543/tcp # qftest Lookup Port +qftest-lookup 3543/udp # qftest Lookup Port +teredo 3544/tcp # Teredo Port +teredo 3544/udp # Teredo Port +camac 3545/tcp # CAMAC equipment +camac 3545/udp # CAMAC equipment +symantec-sim 3547/tcp # Symantec SIM +symantec-sim 3547/udp # Symantec SIM +interworld 3548/tcp # Interworld +interworld 3548/udp # Interworld +tellumat-nms 3549/tcp # Tellumat MDR NMS +tellumat-nms 3549/udp # Tellumat MDR NMS +ssmpp 3550/tcp # Secure SMPP +ssmpp 3550/udp # Secure SMPP +apcupsd 3551/tcp # Apcupsd Information Port +apcupsd 3551/udp # Apcupsd Information Port +taserver 3552/tcp # TeamAgenda Server Port +taserver 3552/udp # TeamAgenda Server Port +rbr-discovery 3553/tcp # Red Box Recorder ADP +rbr-discovery 3553/udp # Red Box Recorder ADP +questnotify 3554/tcp # Quest Notification Server +questnotify 3554/udp # Quest Notification Server +razor 3555/tcp # Vipul's Razor +razor 3555/udp # Vipul's Razor +sky-transport 3556/tcp # Sky Transport Protocol +sky-transport 3556/udp # Sky Transport Protocol +personalos-001 3557/tcp # PersonalOS Comm Port +personalos-001 3557/udp # PersonalOS Comm Port +mcp-port 3558/tcp # MCP user port +mcp-port 3558/udp # MCP user port +cctv-port 3559/tcp # CCTV control port +cctv-port 3559/udp # CCTV control port +iniserve-port 3560/tcp # INIServe port +iniserve-port 3560/udp # INIServe port +bmc-onekey 3561/tcp # BMC-OneKey +bmc-onekey 3561/udp # BMC-OneKey +sdbproxy 3562/tcp # SDBProxy +sdbproxy 3562/udp # SDBProxy +watcomdebug 3563/tcp # Watcom Debug +watcomdebug 3563/udp # Watcom Debug +esimport 3564/tcp # Electromed SIM port +esimport 3564/udp # Electromed SIM port +m2pa 3565/tcp # M2PA +m2pa 3565/sctp # M2PA +quest-data-hub 3566/tcp # Quest Data Hub +dof-eps 3567/tcp # DOF protocol stack +dof-eps 3567/udp # DOF protocol stack +dof-tunnel-sec 3568/tcp # DOF secure tunnel +dof-tunnel-sec 3568/udp # DOF secure tunnel +mbg-ctrl 3569/tcp # Meinberg Control Service +mbg-ctrl 3569/udp # Meinberg Control Service +mccwebsvr-port 3570/tcp # MCC Web Server Port +mccwebsvr-port 3570/udp # MCC Web Server Port +megardsvr-port 3571/tcp # MegaRAID Server Port +megardsvr-port 3571/udp # MegaRAID Server Port +megaregsvrport 3572/tcp # Registration Server Port +megaregsvrport 3572/udp # Registration Server Port +tag-ups-1 3573/tcp # Advantage Group UPS Suite +tag-ups-1 3573/udp # Advantage Group UPS Suite +dmaf-server 3574/tcp # DMAF Server +dmaf-caster 3574/udp # DMAF Caster +ccm-port 3575/tcp # Coalsere CCM Port +ccm-port 3575/udp # Coalsere CCM Port +cmc-port 3576/tcp # Coalsere CMC Port +cmc-port 3576/udp # Coalsere CMC Port +config-port 3577/tcp # Configuration Port +config-port 3577/udp # Configuration Port +data-port 3578/tcp # Data Port +data-port 3578/udp # Data Port +ttat3lb 3579/tcp # Tarantella Load Balancing +ttat3lb 3579/udp # Tarantella Load Balancing +nati-svrloc 3580/tcp # NATI-ServiceLocator +nati-svrloc 3580/udp # NATI-ServiceLocator +kfxaclicensing 3581/tcp # Ascent Capture Licensing +kfxaclicensing 3581/udp # Ascent Capture Licensing +press 3582/tcp # PEG PRESS Server +press 3582/udp # PEG PRESS Server +canex-watch 3583/tcp # CANEX Watch System +canex-watch 3583/udp # CANEX Watch System +u-dbap 3584/tcp # U-DBase Access Protocol +u-dbap 3584/udp # U-DBase Access Protocol +emprise-lls 3585/tcp # Emprise License Server +emprise-lls 3585/udp # Emprise License Server +emprise-lsc 3586/tcp # License Server Console +emprise-lsc 3586/udp # License Server Console +p2pgroup 3587/tcp # Peer to Peer Grouping +p2pgroup 3587/udp # Peer to Peer Grouping +sentinel 3588/tcp # Sentinel Server +sentinel 3588/udp # Sentinel Server +isomair 3589/tcp # isomair +isomair 3589/udp # isomair +wv-csp-sms 3590/tcp # WV CSP SMS Binding +wv-csp-sms 3590/udp # WV CSP SMS Binding +gtrack-server 3591/tcp # LOCANIS G-TRACK Server +gtrack-server 3591/udp # LOCANIS G-TRACK Server +gtrack-ne 3592/tcp # LOCANIS G-TRACK NE Port +gtrack-ne 3592/udp # LOCANIS G-TRACK NE Port +bpmd 3593/tcp # BP Model Debugger +bpmd 3593/udp # BP Model Debugger +mediaspace 3594/tcp # MediaSpace +mediaspace 3594/udp # MediaSpace +shareapp 3595/tcp # ShareApp +shareapp 3595/udp # ShareApp +iw-mmogame 3596/tcp # Illusion Wireless MMOG +iw-mmogame 3596/udp # Illusion Wireless MMOG +a14 3597/tcp # A14 (AN-to-SC/MM) +a14 3597/udp # A14 (AN-to-SC/MM) +a15 3598/tcp # A15 (AN-to-AN) +a15 3598/udp # A15 (AN-to-AN) +quasar-server 3599/tcp # Quasar Accounting Server +quasar-server 3599/udp # Quasar Accounting Server +trap-daemon 3600/tcp # text relay-answer +trap-daemon 3600/udp # text relay-answer +visinet-gui 3601/tcp # Visinet Gui +visinet-gui 3601/udp # Visinet Gui +infiniswitchcl 3602/tcp # InfiniSwitch Mgr Client +infiniswitchcl 3602/udp # InfiniSwitch Mgr Client +int-rcv-cntrl 3603/tcp # Integrated Rcvr Control +int-rcv-cntrl 3603/udp # Integrated Rcvr Control +bmc-jmx-port 3604/tcp # BMC JMX Port +bmc-jmx-port 3604/udp # BMC JMX Port +comcam-io 3605/tcp # ComCam IO Port +comcam-io 3605/udp # ComCam IO Port +splitlock 3606/tcp # Splitlock Server +splitlock 3606/udp # Splitlock Server +precise-i3 3607/tcp # Precise I3 +precise-i3 3607/udp # Precise I3 +trendchip-dcp 3608/tcp # Trendchip control protocol +trendchip-dcp 3608/udp # Trendchip control protocol +cpdi-pidas-cm 3609/tcp # CPDI PIDAS Connection Mon +cpdi-pidas-cm 3609/udp # CPDI PIDAS Connection Mon +echonet 3610/tcp # ECHONET +echonet 3610/udp # ECHONET +six-degrees 3611/tcp # Six Degrees Port +six-degrees 3611/udp # Six Degrees Port +hp-dataprotect 3612/tcp # HP Data Protector +hp-dataprotect 3612/udp # HP Data Protector +alaris-disc 3613/tcp # Alaris Device Discovery +alaris-disc 3613/udp # Alaris Device Discovery +sigma-port 3614/tcp # Satchwell Sigma +sigma-port 3614/udp # Satchwell Sigma +start-network 3615/tcp # Start Messaging Network +start-network 3615/udp # Start Messaging Network +cd3o-protocol 3616/tcp # cd3o Control Protocol +cd3o-protocol 3616/udp # cd3o Control Protocol +sharp-server 3617/tcp # ATI SHARP Logic Engine +sharp-server 3617/udp # ATI SHARP Logic Engine +aairnet-1 3618/tcp # AAIR-Network 1 +aairnet-1 3618/udp # AAIR-Network 1 +aairnet-2 3619/tcp # AAIR-Network 2 +aairnet-2 3619/udp # AAIR-Network 2 +ep-pcp 3620/tcp # EPSON Projector Control Port +ep-pcp 3620/udp # EPSON Projector Control Port +ep-nsp 3621/tcp # EPSON Network Screen Port +ep-nsp 3621/udp # EPSON Network Screen Port +ff-lr-port 3622/tcp # FF LAN Redundancy Port +ff-lr-port 3622/udp # FF LAN Redundancy Port +haipe-discover 3623/tcp # HAIPIS Dynamic Discovery +haipe-discover 3623/udp # HAIPIS Dynamic Discovery +dist-upgrade 3624/tcp # Distributed Upgrade Port +dist-upgrade 3624/udp # Distributed Upgrade Port +volley 3625/tcp # Volley +volley 3625/udp # Volley +bvcdaemon-port 3626/tcp # bvControl Daemon +bvcdaemon-port 3626/udp # bvControl Daemon +jamserverport 3627/tcp # Jam Server Port +jamserverport 3627/udp # Jam Server Port +ept-machine 3628/tcp # EPT Machine Interface +ept-machine 3628/udp # EPT Machine Interface +escvpnet 3629/tcp # ESC/VP.net +escvpnet 3629/udp # ESC/VP.net +cs-remote-db 3630/tcp # C&S Remote Database Port +cs-remote-db 3630/udp # C&S Remote Database Port +cs-services 3631/tcp # C&S Web Services Port +cs-services 3631/udp # C&S Web Services Port +distcc 3632/udp # distributed compiler +wacp 3633/tcp # Wyrnix AIS port +wacp 3633/udp # Wyrnix AIS port +hlibmgr 3634/tcp # hNTSP Library Manager +hlibmgr 3634/udp # hNTSP Library Manager +sdo 3635/tcp # Simple Distributed Objects +sdo 3635/udp # Simple Distributed Objects +servistaitsm 3636/tcp # SerVistaITSM +servistaitsm 3636/udp # SerVistaITSM +scservp 3637/tcp # Customer Service Port +scservp 3637/udp # Customer Service Port +ehp-backup 3638/tcp # EHP Backup Protocol +ehp-backup 3638/udp # EHP Backup Protocol +xap-ha 3639/tcp # Extensible Automation +xap-ha 3639/udp # Extensible Automation +netplay-port1 3640/tcp # Netplay Port 1 +netplay-port1 3640/udp # Netplay Port 1 +netplay-port2 3641/tcp # Netplay Port 2 +netplay-port2 3641/udp # Netplay Port 2 +juxml-port 3642/tcp # Juxml Replication port +juxml-port 3642/udp # Juxml Replication port +audiojuggler 3643/tcp # AudioJuggler +audiojuggler 3643/udp # AudioJuggler +ssowatch 3644/tcp # ssowatch +ssowatch 3644/udp # ssowatch +cyc 3645/tcp # Cyc +cyc 3645/udp # Cyc +xss-srv-port 3646/tcp # XSS Server Port +xss-srv-port 3646/udp # XSS Server Port +splitlock-gw 3647/tcp # Splitlock Gateway +splitlock-gw 3647/udp # Splitlock Gateway +fjcp 3648/tcp # Fujitsu Cooperation Port +fjcp 3648/udp # Fujitsu Cooperation Port +nmmp 3649/tcp # Nishioka Miyuki Msg Protocol +nmmp 3649/udp # Nishioka Miyuki Msg Protocol +prismiq-plugin 3650/tcp # PRISMIQ VOD plug-in +prismiq-plugin 3650/udp # PRISMIQ VOD plug-in +xrpc-registry 3651/tcp # XRPC Registry +xrpc-registry 3651/udp # XRPC Registry +vxcrnbuport 3652/tcp # VxCR NBU Default Port +vxcrnbuport 3652/udp # VxCR NBU Default Port +tsp 3653/tcp # Tunnel Setup Protocol +tsp 3653/udp # Tunnel Setup Protocol +vaprtm 3654/tcp # VAP RealTime Messenger +vaprtm 3654/udp # VAP RealTime Messenger +abatemgr 3655/tcp # ActiveBatch Exec Agent +abatemgr 3655/udp # ActiveBatch Exec Agent +abatjss 3656/tcp # ActiveBatch Job Scheduler +abatjss 3656/udp # ActiveBatch Job Scheduler +immedianet-bcn 3657/tcp # ImmediaNet Beacon +immedianet-bcn 3657/udp # ImmediaNet Beacon +ps-ams 3658/tcp # PlayStation AMS (Secure) +ps-ams 3658/udp # PlayStation AMS (Secure) +apple-sasl 3659/tcp # Apple SASL +apple-sasl 3659/udp # Apple SASL +can-nds-ssl 3660/tcp # IBM Tivoli Directory Service using SSL +can-nds-ssl 3660/udp # IBM Tivoli Directory Service using SSL +can-ferret-ssl 3661/tcp # IBM Tivoli Directory Service using SSL +can-ferret-ssl 3661/udp # IBM Tivoli Directory Service using SSL +pserver 3662/tcp # pserver +pserver 3662/udp # pserver +dtp 3663/tcp # DIRECWAY Tunnel Protocol +dtp 3663/udp # DIRECWAY Tunnel Protocol +ups-engine 3664/tcp # UPS Engine Port +ups-engine 3664/udp # UPS Engine Port +ent-engine 3665/tcp # Enterprise Engine Port +ent-engine 3665/udp # Enterprise Engine Port +eserver-pap 3666/tcp # IBM eServer PAP +eserver-pap 3666/udp # IBM EServer PAP +infoexch 3667/tcp # IBM Information Exchange +infoexch 3667/udp # IBM Information Exchange +dell-rm-port 3668/tcp # Dell Remote Management +dell-rm-port 3668/udp # Dell Remote Management +casanswmgmt 3669/tcp # CA SAN Switch Management +casanswmgmt 3669/udp # CA SAN Switch Management +smile 3670/tcp # SMILE TCP/UDP Interface +smile 3670/udp # SMILE TCP/UDP Interface +efcp 3671/tcp # e Field Control (EIBnet) +efcp 3671/udp # e Field Control (EIBnet) +lispworks-orb 3672/tcp # LispWorks ORB +lispworks-orb 3672/udp # LispWorks ORB +mediavault-gui 3673/tcp # Openview Media Vault GUI +mediavault-gui 3673/udp # Openview Media Vault GUI +wininstall-ipc 3674/tcp # WinINSTALL IPC Port +wininstall-ipc 3674/udp # WinINSTALL IPC Port +calltrax 3675/tcp # CallTrax Data Port +calltrax 3675/udp # CallTrax Data Port +va-pacbase 3676/tcp # VisualAge Pacbase server +va-pacbase 3676/udp # VisualAge Pacbase server +roverlog 3677/tcp # RoverLog IPC +roverlog 3677/udp # RoverLog IPC +ipr-dglt 3678/tcp # DataGuardianLT +ipr-dglt 3678/udp # DataGuardianLT +newton-dock 3679/tcp # Newton Dock (Escale) +newton-dock 3679/udp # Newton Dock (Escale) +npds-tracker 3680/tcp # NPDS Tracker +npds-tracker 3680/udp # NPDS Tracker +bts-x73 3681/tcp # BTS X73 Port +bts-x73 3681/udp # BTS X73 Port +cas-mapi 3682/tcp # EMC SmartPackets-MAPI +cas-mapi 3682/udp # EMC SmartPackets-MAPI +bmc-ea 3683/tcp # BMC EDV/EA +bmc-ea 3683/udp # BMC EDV/EA +faxstfx-port 3684/tcp # FAXstfX +faxstfx-port 3684/udp # FAXstfX +dsx-agent 3685/tcp # DS Expert Agent +dsx-agent 3685/udp # DS Expert Agent +tnmpv2 3686/tcp # Trivial Network Management +tnmpv2 3686/udp # Trivial Network Management +simple-push 3687/tcp # simple-push +simple-push 3687/udp # simple-push +simple-push-s 3688/tcp # simple-push Secure +simple-push-s 3688/udp # simple-push Secure +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp # Digital Audio Access Protocol +magaya-network 3691/tcp # Magaya Network Port +magaya-network 3691/udp # Magaya Network Port +intelsync 3692/tcp # Brimstone IntelSync +intelsync 3692/udp # Brimstone IntelSync +easl 3693/tcp # Emergency Automatic +bmc-data-coll 3695/tcp # BMC Data Collection +bmc-data-coll 3695/udp # BMC Data Collection +telnetcpcd 3696/tcp # Telnet Com Port Control +telnetcpcd 3696/udp # Telnet Com Port Control +nw-license 3697/tcp # NavisWorks License System +nw-license 3697/udp # NavisWorks Licnese System +sagectlpanel 3698/tcp # SAGECTLPANEL +sagectlpanel 3698/udp # SAGECTLPANEL +kpn-icw 3699/tcp # Internet Call Waiting +kpn-icw 3699/udp # Internet Call Waiting +lrs-paging 3700/tcp # LRS NetPage +lrs-paging 3700/udp # LRS NetPage +netcelera 3701/tcp # NetCelera +netcelera 3701/udp # NetCelera +ws-discovery 3702/tcp # Web Service Discovery +ws-discovery 3702/udp # Web Service Discovery +adobeserver-3 3703/tcp # Adobe Server 3 +adobeserver-3 3703/udp # Adobe Server 3 +adobeserver-4 3704/tcp # Adobe Server 4 +adobeserver-4 3704/udp # Adobe Server 4 +adobeserver-5 3705/tcp # Adobe Server 5 +adobeserver-5 3705/udp # Adobe Server 5 +rt-event 3706/tcp # Real-Time Event Port +rt-event 3706/udp # Real-Time Event Port +rt-event-s 3707/tcp # Real-Time Event Secure Port +rt-event-s 3707/udp # Real-Time Event Secure Port +sun-as-iiops 3708/tcp # Sun App Svr - Naming +sun-as-iiops 3708/udp # Sun App Svr - Naming +ca-idms 3709/tcp # CA-IDMS Server +ca-idms 3709/udp # CA-IDMS Server +portgate-auth 3710/tcp # PortGate Authentication +portgate-auth 3710/udp # PortGate Authentication +edb-server2 3711/tcp # EBD Server 2 +edb-server2 3711/udp # EBD Server 2 +sentinel-ent 3712/tcp # Sentinel Enterprise +sentinel-ent 3712/udp # Sentinel Enterprise +tftps 3713/tcp # TFTP over TLS +tftps 3713/udp # TFTP over TLS +delos-dms 3714/tcp # DELOS Direct Messaging +delos-dms 3714/udp # DELOS Direct Messaging +anoto-rendezv 3715/tcp # Anoto Rendezvous Port +anoto-rendezv 3715/udp # Anoto Rendezvous Port +wv-csp-sms-cir 3716/tcp # WV CSP SMS CIR Channel +wv-csp-sms-cir 3716/udp # WV CSP SMS CIR Channel +wv-csp-udp-cir 3717/tcp # WV CSP UDP/IP CIR Channel +wv-csp-udp-cir 3717/udp # WV CSP UDP/IP CIR Channel +opus-services 3718/tcp # OPUS Server Port +opus-services 3718/udp # OPUS Server Port +itelserverport 3719/tcp # iTel Server Port +itelserverport 3719/udp # iTel Server Port +ufastro-instr 3720/tcp # UF Astro. Instr. Services +ufastro-instr 3720/udp # UF Astro. Instr. Services +xsync 3721/tcp # Xsync +xsync 3721/udp # Xsync +xserveraid 3722/tcp # Xserve RAID +xserveraid 3722/udp # Xserve RAID +sychrond 3723/tcp # Sychron Service Daemon +sychrond 3723/udp # Sychron Service Daemon +blizwow 3724/tcp # World of Warcraft +blizwow 3724/udp # World of Warcraft +na-er-tip 3725/tcp # Netia NA-ER Port +na-er-tip 3725/udp # Netia NA-ER Port +array-manager 3726/tcp # Xyratex Array Manager +array-manager 3726/udp # Xyartex Array Manager +e-mdu 3727/tcp # Ericsson Mobile Data Unit +e-mdu 3727/udp # Ericsson Mobile Data Unit +e-woa 3728/tcp # Ericsson Web on Air +e-woa 3728/udp # Ericsson Web on Air +fksp-audit 3729/tcp # Fireking Audit Port +fksp-audit 3729/udp # Fireking Audit Port +client-ctrl 3730/tcp # Client Control +client-ctrl 3730/udp # Client Control +smap 3731/tcp # Service Manager +smap 3731/udp # Service Manager +m-wnn 3732/tcp # Mobile Wnn +m-wnn 3732/udp # Mobile Wnn +multip-msg 3733/tcp # Multipuesto Msg Port +multip-msg 3733/udp # Multipuesto Msg Port +synel-data 3734/tcp # Synel Data Collection Port +synel-data 3734/udp # Synel Data Collection Port +pwdis 3735/tcp # Password Distribution +pwdis 3735/udp # Password Distribution +rs-rmi 3736/tcp # RealSpace RMI +rs-rmi 3736/udp # RealSpace RMI +xpanel 3737/tcp # Xpanel Daemon +versatalk 3738/tcp # versaTalk Server Port +versatalk 3738/udp # versaTalk Server Port +launchbird-lm 3739/tcp # Launchbird LicenseManager +launchbird-lm 3739/udp # Launchbird LicenseManager +heartbeat 3740/tcp # Heartbeat Protocol +heartbeat 3740/udp # Heartbeat Protocol +wysdma 3741/tcp # WysDM Agent +wysdma 3741/udp # WysDM Agent +cst-port 3742/tcp # CST - Configuration & Service Tracker +cst-port 3742/udp # CST - Configuration & Service Tracker +ipcs-command 3743/tcp # IP Control Systems Ltd. +ipcs-command 3743/udp # IP Control Systems Ltd. +sasg 3744/tcp # SASG +sasg 3744/udp # SASG +gw-call-port 3745/tcp # GWRTC Call Port +gw-call-port 3745/udp # GWRTC Call Port +linktest 3746/tcp # LXPRO.COM LinkTest +linktest 3746/udp # LXPRO.COM LinkTest +linktest-s 3747/tcp # LXPRO.COM LinkTest SSL +linktest-s 3747/udp # LXPRO.COM LinkTest SSL +webdata 3748/tcp # webData +webdata 3748/udp # webData +cimtrak 3749/tcp # CimTrak +cimtrak 3749/udp # CimTrak +cbos-ip-port 3750/tcp # CBOS/IP ncapsalation port +cbos-ip-port 3750/udp # CBOS/IP ncapsalatoin port +gprs-cube 3751/tcp # CommLinx GPRS Cube +gprs-cube 3751/udp # CommLinx GPRS Cube +vipremoteagent 3752/tcp # Vigil-IP RemoteAgent +vipremoteagent 3752/udp # Vigil-IP RemoteAgent +nattyserver 3753/tcp # NattyServer Port +nattyserver 3753/udp # NattyServer Port +timestenbroker 3754/tcp # TimesTen Broker Port +timestenbroker 3754/udp # TimesTen Broker Port +sas-remote-hlp 3755/tcp # SAS Remote Help Server +sas-remote-hlp 3755/udp # SAS Remote Help Server +canon-capt 3756/tcp # Canon CAPT Port +canon-capt 3756/udp # Canon CAPT Port +grf-port 3757/tcp # GRF Server Port +grf-port 3757/udp # GRF Server Port +apw-registry 3758/tcp # apw RMI registry +apw-registry 3758/udp # apw RMI registry +exapt-lmgr 3759/tcp # Exapt License Manager +exapt-lmgr 3759/udp # Exapt License Manager +adtempusclient 3760/tcp # adTempus Client +adtempusclient 3760/udp # adTEmpus Client +gsakmp 3761/tcp # gsakmp port +gsakmp 3761/udp # gsakmp port +gbs-smp 3762/tcp # GBS SnapMail Protocol +gbs-smp 3762/udp # GBS SnapMail Protocol +xo-wave 3763/tcp # XO Wave Control Port +xo-wave 3763/udp # XO Wave Control Port +mni-prot-rout 3764/tcp # MNI Protected Routing +mni-prot-rout 3764/udp # MNI Protected Routing +rtraceroute 3765/tcp # Remote Traceroute +rtraceroute 3765/udp # Remote Traceroute +sitewatch-s 3766/tcp # SSL e-watch sitewatch server +listmgr-port 3767/tcp # ListMGR Port +listmgr-port 3767/udp # ListMGR Port +rblcheckd 3768/tcp # rblcheckd server daemon +rblcheckd 3768/udp # rblcheckd server daemon +haipe-otnk 3769/tcp # HAIPE Network Keying +haipe-otnk 3769/udp # HAIPE Network Keying +cindycollab 3770/tcp # Cinderella Collaboration +cindycollab 3770/udp # Cinderella Collaboration +paging-port 3771/tcp # RTP Paging Port +paging-port 3771/udp # RTP Paging Port +ctp 3772/tcp # Chantry Tunnel Protocol +ctp 3772/udp # Chantry Tunnel Protocol +ctdhercules 3773/tcp # ctdhercules +ctdhercules 3773/udp # ctdhercules +zicom 3774/tcp # ZICOM +zicom 3774/udp # ZICOM +ispmmgr 3775/tcp # ISPM Manager Port +ispmmgr 3775/udp # ISPM Manager Port +dvcprov-port 3776/tcp # Device Provisioning Port +dvcprov-port 3776/udp # Device Provisioning Port +jibe-eb 3777/tcp # Jibe EdgeBurst +jibe-eb 3777/udp # Jibe EdgeBurst +c-h-it-port 3778/tcp # Cutler-Hammer IT Port +c-h-it-port 3778/udp # Cutler-Hammer IT Port +cognima 3779/tcp # Cognima Replication +cognima 3779/udp # Cognima Replication +nnp 3780/tcp # Nuzzler Network Protocol +nnp 3780/udp # Nuzzler Network Protocol +abcvoice-port 3781/tcp # ABCvoice server port +abcvoice-port 3781/udp # ABCvoice server port +iso-tp0s 3782/tcp # Secure ISO TP0 port +iso-tp0s 3782/udp # Secure ISO TP0 port +bim-pem 3783/tcp # Impact Mgr./PEM Gateway +bim-pem 3783/udp # Impact Mgr./PEM Gateway +bfd-control 3784/tcp # BFD Control Protocol +bfd-control 3784/udp # BFD Control Protocol +bfd-echo 3785/tcp # BFD Echo Protocol +bfd-echo 3785/udp # BFD Echo Protocol +upstriggervsw 3786/tcp # VSW Upstrigger port +upstriggervsw 3786/udp # VSW Upstrigger port +fintrx 3787/tcp # Fintrx +fintrx 3787/udp # Fintrx +isrp-port 3788/tcp # SPACEWAY Routing port +isrp-port 3788/udp # SPACEWAY Routing port +remotedeploy 3789/tcp # RemoteDeploy Administration Port +remotedeploy 3789/udp # RemoteDeploy Administration Port +quickbooksrds 3790/tcp # QuickBooks RDS +quickbooksrds 3790/udp # QuickBooks RDS +tvnetworkvideo 3791/tcp # TV NetworkVideo Data port +tvnetworkvideo 3791/udp # TV NetworkVideo Data port +sitewatch 3792/tcp # e-Watch Corporation SiteWatch +sitewatch 3792/udp # e-Watch Corporation SiteWatch +dcsoftware 3793/tcp # DataCore Software +dcsoftware 3793/udp # DataCore Software +jaus 3794/tcp # JAUS Robots +jaus 3794/udp # JAUS Robots +myblast 3795/tcp # myBLAST Mekentosj port +myblast 3795/udp # myBLAST Mekentosj port +spw-dialer 3796/tcp # Spaceway Dialer +spw-dialer 3796/udp # Spaceway Dialer +idps 3797/tcp # idps +idps 3797/udp # idps +minilock 3798/tcp # Minilock +minilock 3798/udp # Minilock +radius-dynauth 3799/tcp # RADIUS Dynamic Authorization +radius-dynauth 3799/udp # RADIUS Dynamic Authorization +pwgpsi 3800/tcp # Print Services Interface +pwgpsi 3800/udp # Print Services Interface +ibm-mgr 3801/tcp # ibm manager service +ibm-mgr 3801/udp # ibm manager service +vhd 3802/tcp # VHD +vhd 3802/udp # VHD +soniqsync 3803/tcp # SoniqSync +soniqsync 3803/udp # SoniqSync +iqnet-port 3804/tcp # Harman IQNet Port +iqnet-port 3804/udp # Harman IQNet Port +tcpdataserver 3805/tcp # ThorGuard Server Port +tcpdataserver 3805/udp # ThorGuard Server Port +wsmlb 3806/tcp # Remote System Manager +wsmlb 3806/udp # Remote System Manager +spugna 3807/tcp # SpuGNA Communication Port +spugna 3807/udp # SpuGNA Communication Port +sun-as-iiops-ca 3808/tcp # Sun App Svr-IIOPClntAuth +sun-as-iiops-ca 3808/udp # Sun App Svr-IIOPClntAuth +apocd 3809/tcp # Java Desktop System Configuration Agent +apocd 3809/udp # Java Desktop System Configuration Agent +wlanauth 3810/tcp # WLAN AS server +wlanauth 3810/udp # WLAN AS server +amp 3811/tcp # AMP +amp 3811/udp # AMP +neto-wol-server 3812/tcp # netO WOL Server +neto-wol-server 3812/udp # netO WOL Server +rap-ip 3813/tcp # Rhapsody Interface Protocol +rap-ip 3813/udp # Rhapsody Interface Protocol +neto-dcs 3814/tcp # netO DCS +neto-dcs 3814/udp # netO DCS +lansurveyorxml 3815/tcp # LANsurveyor XML +lansurveyorxml 3815/udp # LANsurveyor XML +sunlps-http 3816/tcp # Sun Local Patch Server +sunlps-http 3816/udp # Sun Local Patch Server +tapeware 3817/tcp # Yosemite Tech Tapeware +tapeware 3817/udp # Yosemite Tech Tapeware +crinis-hb 3818/tcp # Crinis Heartbeat +crinis-hb 3818/udp # Crinis Heartbeat +epl-slp 3819/tcp # EPL Sequ Layer Protocol +epl-slp 3819/udp # EPL Sequ Layer Protocol +scp 3820/tcp # Siemens AuD SCP +scp 3820/udp # Siemens AuD SCP +pmcp 3821/tcp # ATSC PMCP Standard +pmcp 3821/udp # ATSC PMCP Standard +acp-discovery 3822/tcp # Compute Pool Discovery +acp-discovery 3822/udp # Compute Pool Discovery +acp-conduit 3823/tcp # Compute Pool Conduit +acp-conduit 3823/udp # Compute Pool Conduit +acp-policy 3824/tcp # Compute Pool Policy +acp-policy 3824/udp # Compute Pool Policy +ffserver 3825/tcp # Antera FlowFusion Process Simulation +ffserver 3825/udp # Antera FlowFusion Process Simulation +warmux 3826/tcp # WarMUX game server +warmux 3826/udp # WarMUX game server +netmpi 3827/tcp # Netadmin Systems MPI service +netmpi 3827/udp # Netadmin Systems MPI service +neteh 3828/tcp # Netadmin Systems Event Handler +neteh 3828/udp # Netadmin Systems Event Handler +neteh-ext 3829/tcp # Netadmin Systems Event Handler External +neteh-ext 3829/udp # Netadmin Systems Event Handler External +cernsysmgmtagt 3830/tcp # Cerner System Management Agent +cernsysmgmtagt 3830/udp # Cerner System Management Agent +dvapps 3831/tcp # Docsvault Application Service +dvapps 3831/udp # Docsvault Application Service +xxnetserver 3832/tcp # xxNETserver +xxnetserver 3832/udp # xxNETserver +aipn-auth 3833/tcp # AIPN LS Authentication +aipn-auth 3833/udp # AIPN LS Authentication +spectardata 3834/tcp # Spectar Data Stream Service +spectardata 3834/udp # Spectar Data Stream Service +spectardb 3835/tcp # Spectar Database Rights Service +spectardb 3835/udp # Spectar Database Rights Service +markem-dcp 3836/tcp # MARKEM NEXTGEN DCP +markem-dcp 3836/udp # MARKEM NEXTGEN DCP +mkm-discovery 3837/tcp # MARKEM Auto-Discovery +mkm-discovery 3837/udp # MARKEM Auto-Discovery +sos 3838/tcp # Scito Object Server +sos 3838/udp # Scito Object Server +amx-rms 3839/tcp # AMX Resource Management Suite +amx-rms 3839/udp # AMX Resource Management Suite +flirtmitmir 3840/tcp # www.FlirtMitMir.de +flirtmitmir 3840/udp # www.FlirtMitMir.de +shiprush-db-svr 3841/tcp # ShipRush Database Server +nhci 3842/tcp # NHCI status port +nhci 3842/udp # NHCI status port +quest-agent 3843/tcp # Quest Common Agent +quest-agent 3843/udp # Quest Common Agent +rnm 3844/tcp # RNM +rnm 3844/udp # RNM +v-one-spp 3845/tcp # V-ONE Single Port Proxy +v-one-spp 3845/udp # V-ONE Single Port Proxy +an-pcp 3846/tcp # Astare Network PCP +an-pcp 3846/udp # Astare Network PCP +msfw-control 3847/tcp # MS Firewall Control +msfw-control 3847/udp # MS Firewall Control +item 3848/tcp # IT Environmental Monitor +item 3848/udp # IT Environmental Monitor +spw-dnspreload 3849/tcp # SPACEWAY DNS Preload +spw-dnspreload 3849/udp # SPACEWAY DNS Prelaod +qtms-bootstrap 3850/tcp # QTMS Bootstrap Protocol +qtms-bootstrap 3850/udp # QTMS Bootstrap Protocol +spectraport 3851/tcp # SpectraTalk Port +spectraport 3851/udp # SpectraTalk Port +sse-app-config 3852/tcp # SSE App Configuration +sse-app-config 3852/udp # SSE App Configuration +sscan 3853/tcp # SONY scanning protocol +sscan 3853/udp # SONY scanning protocol +stryker-com 3854/tcp # Stryker Comm Port +stryker-com 3854/udp # Stryker Comm Port +opentrac 3855/tcp # OpenTRAC +opentrac 3855/udp # OpenTRAC +informer 3856/tcp # INFORMER +informer 3856/udp # INFORMER +trap-port 3857/tcp # Trap Port +trap-port 3857/udp # Trap Port +trap-port-mom 3858/tcp # Trap Port MOM +trap-port-mom 3858/udp # Trap Port MOM +nav-port 3859/tcp # Navini Port +nav-port 3859/udp # Navini Port +sasp 3860/tcp # Server/Application State Protocol (SASP) +sasp 3860/udp # Server/Application State Protocol (SASP) +winshadow-hd 3861/tcp # winShadow Host Discovery +winshadow-hd 3861/udp # winShadow Host Discovery +giga-pocket 3862/tcp # GIGA-POCKET +giga-pocket 3862/udp # GIGA-POCKET +asap-tcp 3863/tcp # asap tcp port +asap-udp 3863/udp # asap udp port +asap-sctp 3863/sctp # asap sctp +asap-tcp-tls 3864/tcp # asap/tls tcp port +asap-sctp-tls 3864/sctp # asap-sctp/tls +xpl 3865/tcp # xpl automation protocol +xpl 3865/udp # xpl automation protocol +dzdaemon 3866/tcp # Sun SDViz DZDAEMON Port +dzdaemon 3866/udp # Sun SDViz DZDAEMON Port +dzoglserver 3867/tcp # Sun SDViz DZOGLSERVER Port +dzoglserver 3867/udp # Sun SDViz DZOGLSERVER Port +diameter 3868/tcp # DIAMETER +diameter 3868/sctp # DIAMETER +ovsam-mgmt 3869/tcp # hp OVSAM MgmtServer Disco +ovsam-mgmt 3869/udp # hp OVSAM MgmtServer Disco +ovsam-d-agent 3870/tcp # hp OVSAM HostAgent Disco +ovsam-d-agent 3870/udp # hp OVSAM HostAgent Disco +avocent-adsap 3871/tcp # Avocent DS Authorization +avocent-adsap 3871/udp # Avocent DS Authorization +oem-agent 3872/tcp # OEM Agent +oem-agent 3872/udp # OEM Agent +fagordnc 3873/tcp # fagordnc +fagordnc 3873/udp # fagordnc +sixxsconfig 3874/tcp # SixXS Configuration +sixxsconfig 3874/udp # SixXS Configuration +pnbscada 3875/tcp # PNBSCADA +pnbscada 3875/udp # PNBSCADA +dl_agent 3876/tcp dl-agent # DirectoryLockdown Agent +dl_agent 3876/udp dl-agent # DirectoryLockdown Agent +xmpcr-interface 3877/tcp # XMPCR Interface Port +xmpcr-interface 3877/udp # XMPCR Interface Port +fotogcad 3878/tcp # FotoG CAD interface +fotogcad 3878/udp # FotoG CAD interface +appss-lm 3879/tcp # appss license manager +appss-lm 3879/udp # appss license manager +igrs 3880/tcp # IGRS +igrs 3880/udp # IGRS +idac 3881/tcp # Data Acquisition and Control +idac 3881/udp # Data Acquisition and Control +msdts1 3882/tcp # DTS Service Port +msdts1 3882/udp # DTS Service Port +vrpn 3883/tcp # VR Peripheral Network +vrpn 3883/udp # VR Peripheral Network +softrack-meter 3884/tcp # SofTrack Metering +softrack-meter 3884/udp # SofTrack Metering +topflow-ssl 3885/tcp # TopFlow SSL +topflow-ssl 3885/udp # TopFlow SSL +nei-management 3886/tcp # NEI management port +nei-management 3886/udp # NEI management port +ciphire-data 3887/tcp # Ciphire Data Transport +ciphire-data 3887/udp # Ciphire Data Transport +ciphire-serv 3888/tcp # Ciphire Services +ciphire-serv 3888/udp # Ciphire Services +dandv-tester 3889/tcp # D and V Tester Control Port +dandv-tester 3889/udp # D and V Tester Control Port +ndsconnect 3890/tcp # Niche Data Server Connect +ndsconnect 3890/udp # Niche Data Server Connect +rtc-pm-port 3891/tcp # Oracle RTC-PM port +rtc-pm-port 3891/udp # Oracle RTC-PM port +pcc-image-port 3892/tcp # PCC-image-port +pcc-image-port 3892/udp # PCC-image-port +cgi-starapi 3893/tcp # CGI StarAPI Server +cgi-starapi 3893/udp # CGI StarAPI Server +syam-agent 3894/tcp # SyAM Agent Port +syam-agent 3894/udp # SyAM Agent Port +syam-smc 3895/tcp # SyAm SMC Service Port +syam-smc 3895/udp # SyAm SMC Service Port +sdo-tls 3896/tcp # Simple Distributed Objects over TLS +sdo-tls 3896/udp # Simple Distributed Objects over TLS +sdo-ssh 3897/tcp # Simple Distributed Objects over SSH +sdo-ssh 3897/udp # Simple Distributed Objects over SSH +senip 3898/tcp # IAS, Inc. SmartEye NET Internet Protocol +senip 3898/udp # IAS, Inc. SmartEye NET Internet Protocol +itv-control 3899/tcp # ITV Port +itv-control 3899/udp # ITV Port +### 3900 tcp/udp reserved udt-os/udt_os +nimsh 3901/tcp # NIM Service Handler +nimsh 3901/udp # NIM Service Handler +nimaux 3902/tcp # NIMsh Auxiliary Port +nimaux 3902/udp # NIMsh Auxiliary Port +charsetmgr 3903/tcp # CharsetMGR +charsetmgr 3903/udp # CharsetMGR +omnilink-port 3904/tcp # Arnet Omnilink Port +omnilink-port 3904/udp # Arnet Omnilink Port +mupdate 3905/tcp # Mailbox Update (MUPDATE) protocol +mupdate 3905/udp # Mailbox Update (MUPDATE) protocol +topovista-data 3906/tcp # TopoVista elevation data +topovista-data 3906/udp # TopoVista elevation data +imoguia-port 3907/tcp # Imoguia Port +imoguia-port 3907/udp # Imoguia Port +hppronetman 3908/tcp # HP Procurve NetManagement +hppronetman 3908/udp # HP Procurve NetManagement +surfcontrolcpa 3909/tcp # SurfControl CPA +surfcontrolcpa 3909/udp # SurfControl CPA +prnrequest 3910/tcp # Printer Request Port +prnrequest 3910/udp # Printer Request Port +prnstatus 3911/tcp # Printer Status Port +prnstatus 3911/udp # Printer Status Port +gbmt-stars 3912/tcp # Global Maintech Stars +gbmt-stars 3912/udp # Global Maintech Stars +listcrt-port 3913/tcp # ListCREATOR Port +listcrt-port 3913/udp # ListCREATOR Port +listcrt-port-2 3914/tcp # ListCREATOR Port 2 +listcrt-port-2 3914/udp # ListCREATOR Port 2 +agcat 3915/tcp # Auto-Graphics Cataloging +agcat 3915/udp # Auto-Graphics Cataloging +wysdmc 3916/tcp # WysDM Controller +wysdmc 3916/udp # WysDM Controller +aftmux 3917/tcp # AFT multiplex port +aftmux 3917/udp # AFT multiples port +pktcablemmcops 3918/tcp # PacketCableMultimediaCOPS +pktcablemmcops 3918/udp # PacketCableMultimediaCOPS +hyperip 3919/tcp # HyperIP +hyperip 3919/udp # HyperIP +exasoftport1 3920/tcp # Exasoft IP Port +exasoftport1 3920/udp # Exasoft IP Port +herodotus-net 3921/tcp # Herodotus Net +herodotus-net 3921/udp # Herodotus Net +sor-update 3922/tcp # Soronti Update Port +sor-update 3922/udp # Soronti Update Port +symb-sb-port 3923/tcp # Symbian Service Broker +symb-sb-port 3923/udp # Symbian Service Broker +mpl-gprs-port 3924/tcp # MPL_GPRS_PORT +mpl-gprs-port 3924/udp # MPL_GPRS_Port +zmp 3925/tcp # Zoran Media Port +zmp 3925/udp # Zoran Media Port +winport 3926/tcp # WINPort +winport 3926/udp # WINPort +natdataservice 3927/tcp # ScsTsr +natdataservice 3927/udp # ScsTsr +netboot-pxe 3928/tcp # PXE NetBoot Manager +netboot-pxe 3928/udp # PXE NetBoot Manager +smauth-port 3929/tcp # AMS Port +smauth-port 3929/udp # AMS Port +syam-webserver 3930/tcp # Syam Web Server Port +syam-webserver 3930/udp # Syam Web Server Port +msr-plugin-port 3931/tcp # MSR Plugin Port +msr-plugin-port 3931/udp # MSR Plugin Port +dyn-site 3932/tcp # Dynamic Site System +dyn-site 3932/udp # Dynamic Site System +plbserve-port 3933/tcp # PL/B App Server User Port +plbserve-port 3933/udp # PL/B App Server User Port +sunfm-port 3934/tcp # PL/B File Manager Port +sunfm-port 3934/udp # PL/B File Manager Port +sdp-portmapper 3935/tcp # SDP Port Mapper Protocol +sdp-portmapper 3935/udp # SDP Port Mapper Protocol +mailprox 3936/tcp # Mailprox +mailprox 3936/udp # Mailprox +dvbservdsc 3937/tcp # DVB Service Discovery +dvbservdsc 3937/udp # DVB Service Discovery +dbcontrol_agent 3938/tcp dbcontrol-agent # Oracle dbControl Agent po +dbcontrol_agent 3938/udp dbcontrol-agent # Oracle dbControl Agent po +aamp 3939/tcp # Anti-virus Application Management Port +aamp 3939/udp # Anti-virus Application Management Port +xecp-node 3940/tcp # XeCP Node Service +xecp-node 3940/udp # XeCP Node Service +homeportal-web 3941/tcp # Home Portal Web Server +homeportal-web 3941/udp # Home Portal Web Server +srdp 3942/tcp # satellite distribution +srdp 3942/udp # satellite distribution +tig 3943/tcp # TetraNode Ip Gateway +tig 3943/udp # TetraNode Ip Gateway +sops 3944/tcp # S-Ops Management +sops 3944/udp # S-Ops Management +emcads 3945/tcp # EMCADS Server Port +emcads 3945/udp # EMCADS Server Port +backupedge 3946/tcp # BackupEDGE Server +backupedge 3946/udp # BackupEDGE Server +ccp 3947/tcp # Connect and Control Protocol for Consumer, Commercial, and Industrial Electronic Devices +ccp 3947/udp # Connect and Control Protocol for Consumer, Commercial, and Industrial Electronic Devices +apdap 3948/tcp # Anton Paar Device Administration Protocol +apdap 3948/udp # Anton Paar Device Administration Protocol +drip 3949/tcp # Dynamic Routing Information Protocol +drip 3949/udp # Dynamic Routing Information Protocol +namemunge 3950/tcp # Name Munging +namemunge 3950/udp # Name Munging +pwgippfax 3951/tcp # PWG IPP Facsimile +pwgippfax 3951/udp # PWG IPP Facsimile +i3-sessionmgr 3952/tcp # I3 Session Manager +i3-sessionmgr 3952/udp # I3 Session Manager +xmlink-connect 3953/tcp # Eydeas XMLink Connect +xmlink-connect 3953/udp # Eydeas XMLink Connect +adrep 3954/tcp # AD Replication RPC +adrep 3954/udp # AD Replication RPC +p2pcommunity 3955/tcp # p2pCommunity +p2pcommunity 3955/udp # p2pCommunity +gvcp 3956/tcp # GigE Vision Control +gvcp 3956/udp # GigE Vision Control +mqe-broker 3957/tcp # MQEnterprise Broker +mqe-broker 3957/udp # MQEnterprise Broker +mqe-agent 3958/tcp # MQEnterprise Agent +mqe-agent 3958/udp # MQEnterprise Agent +treehopper 3959/tcp # Tree Hopper Networking +treehopper 3959/udp # Tree Hopper Networking +bess 3960/tcp # Bess Peer Assessment +bess 3960/udp # Bess Peer Assessment +proaxess 3961/tcp # ProAxess Server +proaxess 3961/udp # ProAxess Server +sbi-agent 3962/tcp # SBI Agent Protocol +sbi-agent 3962/udp # SBI Agent Protocol +thrp 3963/tcp # Teran Hybrid Routing Protocol +thrp 3963/udp # Teran Hybrid Routing Protocol +sasggprs 3964/tcp # SASG GPRS +sasggprs 3964/udp # SASG GPRS +ati-ip-to-ncpe 3965/tcp # Avanti IP to NCPE API +ati-ip-to-ncpe 3965/udp # Avanti IP to NCPE API +bflckmgr 3966/tcp # BuildForge Lock Manager +bflckmgr 3966/udp # BuildForge Lock Manager +ppsms 3967/tcp # PPS Message Service +ppsms 3967/udp # PPS Message Service +ianywhere-dbns 3968/tcp # iAnywhere DBNS +ianywhere-dbns 3968/udp # iAnywhere DBNS +landmarks 3969/tcp # Landmark Messages +landmarks 3969/udp # Landmark Messages +lanrevagent 3970/tcp # LANrev Agent +lanrevagent 3970/udp # LANrev Agent +lanrevserver 3971/tcp # LANrev Server +lanrevserver 3971/udp # LANrev Server +iconp 3972/tcp # ict-control Protocol +iconp 3972/udp # ict-control Protocol +progistics 3973/tcp # ConnectShip Progistics +progistics 3973/udp # ConnectShip Progistics +citysearch 3974/tcp # Remote Applicant Tracking Service +citysearch 3974/udp # Remote Applicant Tracking Service +airshot 3975/tcp # Air Shot +airshot 3975/udp # Air Shot +opswagent 3976/tcp # Server Automation Agent +opswagent 3976/udp # Server Automation Agent +opswmanager 3977/tcp # Opsware Manager +opswmanager 3977/udp # Opsware Manager +secure-cfg-svr 3978/tcp # Secured Configuration Server +secure-cfg-svr 3978/udp # Secured Configuration Server +smwan 3979/tcp # Smith Micro Wide Area Network Service +smwan 3979/udp # Smith Micro Wide Area Network Service +acms 3980/tcp # Aircraft Cabin Management System +acms 3980/udp # Aircraft Cabin Management System +starfish 3981/tcp # Starfish System Admin +starfish 3981/udp # Starfish System Admin +eis 3982/tcp # ESRI Image Server +eis 3982/udp # ESRI Image Server +eisp 3983/tcp # ESRI Image Service +eisp 3983/udp # ESRI Image Service +mapper-nodemgr 3984/tcp # MAPPER network node manager +mapper-nodemgr 3984/udp # MAPPER network node manager +mapper-mapethd 3985/tcp # MAPPER TCP/IP server +mapper-mapethd 3985/udp # MAPPER TCP/IP server +mapper-ws_ethd 3986/tcp mapper-ws-ethd # MAPPER workstation server +mapper-ws_ethd 3986/udp mapper-ws-ethd # MAPPER workstation server +centerline 3987/tcp # Centerline +centerline 3987/udp # Centerline +dcs-config 3988/tcp # DCS Configuration Port +dcs-config 3988/udp # DCS Configuration Port +bv-queryengine 3989/tcp # BindView-Query Engine +bv-queryengine 3989/udp # BindView-Query Engine +bv-is 3990/tcp # BindView-IS +bv-is 3990/udp # BindView-IS +bv-smcsrv 3991/tcp # BindView-SMCServer +bv-smcsrv 3991/udp # BindView-SMCServer +bv-ds 3992/tcp # BindView-DirectoryServer +bv-ds 3992/udp # BindView-DirectoryServer +bv-agent 3993/tcp # BindView-Agent +bv-agent 3993/udp # BindView-Agent +iss-mgmt-ssl 3995/tcp # ISS Management Svcs SSL +iss-mgmt-ssl 3995/udp # ISS Management Svcs SSL +abcsoftware 3996/tcp # abcsoftware-01 +abcsoftware 3996/udp # abcsoftware-01 +agentsease-db 3997/tcp # aes_db +agentsease-db 3997/udp # aes_db +dnx 3998/tcp # Distributed Nagios Executor Service +dnx 3998/udp # Distributed Nagios Executor Service +nvcnet 3999/tcp # Norman distributes scanning service +nvcnet 3999/udp # Norman distributes scanning service +terabase 4000/tcp # Terabase +terabase 4000/udp # Terabase +newoak 4001/tcp # NewOak +newoak 4001/udp # NewOak +pxc-spvr-ft 4002/tcp # pxc-spvr-ft +pxc-spvr-ft 4002/udp # pxc-spvr-ft +pxc-splr-ft 4003/tcp # pxc-splr-ft +pxc-splr-ft 4003/udp # pxc-splr-ft +pxc-roid 4004/tcp # pxc-roid +pxc-roid 4004/udp # pxc-roid +pxc-pin 4005/tcp # pxc-pin +pxc-pin 4005/udp # pxc-pin +pxc-spvr 4006/tcp # pxc-spvr +pxc-spvr 4006/udp # pxc-spvr +pxc-splr 4007/tcp # pxc-splr +pxc-splr 4007/udp # pxc-splr +netcheque 4008/tcp # NetCheque accounting +netcheque 4008/udp # NetCheque accounting +chimera-hwm 4009/tcp # Chimera HWM +chimera-hwm 4009/udp # Chimera HWM +samsung-unidex 4010/tcp # Samsung Unidex +samsung-unidex 4010/udp # Samsung Unidex +altserviceboot 4011/tcp # Alternate Service Boot +pda-gate 4012/tcp # PDA Gate +pda-gate 4012/udp # PDA Gate +acl-manager 4013/tcp # ACL Manager +acl-manager 4013/udp # ACL Manager +taiclock 4014/tcp # TAICLOCK +taiclock 4014/udp # TAICLOCK +talarian-mcast1 4015/tcp # Talarian Mcast +talarian-mcast1 4015/udp # Talarian Mcast +talarian-mcast2 4016/tcp # Talarian Mcast +talarian-mcast2 4016/udp # Talarian Mcast +talarian-mcast3 4017/tcp # Talarian Mcast +talarian-mcast3 4017/udp # Talarian Mcast +talarian-mcast4 4018/tcp # Talarian Mcast +talarian-mcast4 4018/udp # Talarian Mcast +talarian-mcast5 4019/tcp # Talarian Mcast +talarian-mcast5 4019/udp # Talarian Mcast +trap 4020/tcp # TRAP Port +trap 4020/udp # TRAP Port +nexus-portal 4021/tcp # Nexus Portal +nexus-portal 4021/udp # Nexus Portal +dnox 4022/tcp # DNOX +dnox 4022/udp # DNOX +esnm-zoning 4023/tcp # ESNM Zoning Port +esnm-zoning 4023/udp # ESNM Zoning Port +tnp1-port 4024/tcp # TNP1 User Port +tnp1-port 4024/udp # TNP1 User Port +partimage 4025/tcp # Partition Image Port +partimage 4025/udp # Partition Image Port +as-debug 4026/tcp # Graphical Debug Server +as-debug 4026/udp # Graphical Debug Server +bxp 4027/tcp # bitxpress +bxp 4027/udp # bitxpress +dtserver-port 4028/tcp # DTServer Port +dtserver-port 4028/udp # DTServer Port +ip-qsig 4029/tcp # IP Q signaling protocol +ip-qsig 4029/udp # IP Q signaling protocol +jdmn-port 4030/tcp # Accell/JSP Daemon Port +jdmn-port 4030/udp # Accell/JSP Daemon Port +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp # UUCP over SSL +vrts-auth-port 4032/tcp # VERITAS Authorization Service +vrts-auth-port 4032/udp # VERITAS Authorization Service +sanavigator 4033/tcp # SANavigator Peer Port +sanavigator 4033/udp # SANavigator Peer Port +ubxd 4034/tcp # Ubiquinox Daemon +ubxd 4034/udp # Ubiquinox Daemon +wap-push-http 4035/tcp # WAP Push OTA-HTTP port +wap-push-http 4035/udp # WAP Push OTA-HTTP port +wap-push-https 4036/tcp # WAP Push OTA-HTTP secure +wap-push-https 4036/udp # WAP Push OTA-HTTP secure +ravehd 4037/tcp # RaveHD network control +ravehd 4037/udp # RaveHD network control +fazzt-ptp 4038/tcp # Fazzt Point-To-Point +fazzt-ptp 4038/udp # Fazzt Point-To-Point +fazzt-admin 4039/tcp # Fazzt Administration +fazzt-admin 4039/udp # Fazzt Administration +yo-main 4040/tcp # Yo.net main service +yo-main 4040/udp # Yo.net main service +houston 4041/tcp # Rocketeer-Houston +houston 4041/udp # Rocketeer-Houston +ldxp 4042/tcp # LDXP +ldxp 4042/udp # LDXP +nirp 4043/tcp # Neighbour Identity Resolution +nirp 4043/udp # Neighbour Identity Resolution +ltp 4044/tcp # Location Tracking Protocol +ltp 4044/udp # Location Tracking Protocol +acp-proto 4046/tcp # Accounting Protocol +acp-proto 4046/udp # Accounting Protocol +ctp-state 4047/tcp # Context Transfer Protocol +ctp-state 4047/udp # Context Transfer Protocol +wafs 4049/tcp # Wide Area File Services +wafs 4049/udp # Wide Area File Services +cisco-wafs 4050/tcp # Wide Area File Services +cisco-wafs 4050/udp # Wide Area File Services +cppdp 4051/tcp # Cisco Peer to Peer Distribution Protocol +cppdp 4051/udp # Cisco Peer to Peer Distribution Protocol +interact 4052/tcp # VoiceConnect Interact +interact 4052/udp # VoiceConnect Interact +ccu-comm-1 4053/tcp # CosmoCall Universe Communications Port 1 +ccu-comm-1 4053/udp # CosmoCall Universe Communications Port 1 +ccu-comm-2 4054/tcp # CosmoCall Universe Communications Port 2 +ccu-comm-2 4054/udp # CosmoCall Universe Communications Port 2 +ccu-comm-3 4055/tcp # CosmoCall Universe Communications Port 3 +ccu-comm-3 4055/udp # CosmoCall Universe Communications Port 3 +lms 4056/tcp # Location Message Service +lms 4056/udp # Location Message Service +wfm 4057/tcp # Servigistics WFM server +wfm 4057/udp # Servigistics WFM server +kingfisher 4058/tcp # Kingfisher protocol +kingfisher 4058/udp # Kingfisher protocol +dlms-cosem 4059/tcp # DLMS/COSEM +dlms-cosem 4059/udp # DLMS/COSEM +dsmeter_iatc 4060/tcp dsmeter-iatc # DSMETER Inter-Agent Transfer Channel +dsmeter_iatc 4060/udp dsmeter-iatc # DSMETER Inter-Agent Transfer Channel +ice-location 4061/tcp # Ice Location Service (TCP) +ice-location 4061/udp # Ice Location Service (TCP) +ice-slocation 4062/tcp # Ice Location Service (SSL) +ice-slocation 4062/udp # Ice Location Service (SSL) +ice-router 4063/tcp # Ice Firewall Traversal Service (TCP) +ice-router 4063/udp # Ice Firewall Traversal Service (TCP) +ice-srouter 4064/tcp # Ice Firewall Traversal Service (SSL) +ice-srouter 4064/udp # Ice Firewall Traversal Service (SSL) +avanti_cdp 4065/tcp avanti-cdp # Avanti Common Data +avanti_cdp 4065/udp avanti-cdp # Avanti Common Data +pmas 4066/tcp # Performance Measurement and Analysis +pmas 4066/udp # Performance Measurement and Analysis +idp 4067/tcp # Information Distribution Protocol +idp 4067/udp # Information Distribution Protocol +ipfltbcst 4068/tcp # IP Fleet Broadcast +ipfltbcst 4068/udp # IP Fleet Broadcast +minger 4069/tcp # Minger Email Address Validation Service +minger 4069/udp # Minger Email Address Validation Service +tripe 4070/tcp # Trivial IP Encryption (TrIPE) +tripe 4070/udp # Trivial IP Encryption (TrIPE) +aibkup 4071/tcp # Automatically Incremental Backup +aibkup 4071/udp # Automatically Incremental Backup +zieto-sock 4072/tcp # Zieto Socket Communications +zieto-sock 4072/udp # Zieto Socket Communications +iRAPP 4073/tcp # iRAPP Server Protocol +iRAPP 4073/udp # iRAPP Server Protocol +cequint-cityid 4074/tcp # Cequint City ID UI trigger +cequint-cityid 4074/udp # Cequint City ID UI trigger +perimlan 4075/tcp # ISC Alarm Message Service +perimlan 4075/udp # ISC Alarm Message Service +seraph 4076/tcp # Seraph DCS +seraph 4076/udp # Seraph DCS +ascomalarm 4077/udp # Ascom IP Alarming +cssp 4078/tcp # Coordinated Security Service Protocol +santools 4079/tcp # SANtools Diagnostic Server +santools 4079/udp # SANtools Diagnostic Server +lorica-in 4080/tcp # Lorica inside facing +lorica-in 4080/udp # Lorica inside facing +lorica-in-sec 4081/tcp # Lorica inside facing (SSL) +lorica-in-sec 4081/udp # Lorica inside facing (SSL) +lorica-out 4082/tcp # Lorica outside facing +lorica-out 4082/udp # Lorica outside facing +lorica-out-sec 4083/tcp # Lorica outside facing (SSL) +lorica-out-sec 4083/udp # Lorica outside facing (SSL) +fortisphere-vm 4084/udp # Fortisphere VM Service +ezmessagesrv 4085/tcp # EZNews Newsroom Message Service +ftsync 4086/udp # Firewall/NAT state table synchronization +applusservice 4087/tcp # APplus Service +npsp 4088/tcp # Noah Printing Service Protocol +opencore 4089/tcp # OpenCORE Remote Control Service +opencore 4089/udp # OpenCORE Remote Control Service +omasgport 4090/tcp # OMA BCAST Service Guide +omasgport 4090/udp # OMA BCAST Service Guide +ewinstaller 4091/tcp # EminentWare Installer +ewinstaller 4091/udp # EminentWare Installer +ewdgs 4092/tcp # EminentWare DGS +ewdgs 4092/udp # EminentWare DGS +pvxpluscs 4093/tcp # Pvx Plus CS Host +pvxpluscs 4093/udp # Pvx Plus CS Host +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp # sysrq daemon +xtgui 4095/tcp # xtgui information service +xtgui 4095/udp # xtgui information service +bre 4096/tcp # BRE (Bridge Relay Element) +bre 4096/udp # BRE (Bridge Relay Element) +patrolview 4097/tcp # Patrol View +patrolview 4097/udp # Patrol View +drmsfsd 4098/tcp # drmsfsd +drmsfsd 4098/udp # drmsfsd +dpcp 4099/tcp # DPCP +dpcp 4099/udp # DPCP +igo-incognito 4100/tcp # IGo Incognito Data Port +igo-incognito 4100/udp # IGo Incognito Data Port +brlp-0 4101/tcp # Braille protocol +brlp-0 4101/udp # Braille protocol +brlp-1 4102/tcp # Braille protocol +brlp-1 4102/udp # Braille protocol +brlp-2 4103/tcp # Braille protocol +brlp-2 4103/udp # Braille protocol +brlp-3 4104/tcp # Braille protocol +brlp-3 4104/udp # Braille protocol +shofar 4105/tcp # Shofar +shofar 4105/udp # Shofar +synchronite 4106/tcp # Synchronite +synchronite 4106/udp # Synchronite +j-ac 4107/tcp # JDL Accounting LAN Service +j-ac 4107/udp # JDL Accounting LAN Service +accel 4108/tcp # ACCEL +accel 4108/udp # ACCEL +izm 4109/tcp # Instantiated Zero-control Messaging +izm 4109/udp # Instantiated Zero-control Messaging +g2tag 4110/tcp # G2 RFID Tag Telemetry Data +g2tag 4110/udp # G2 RFID Tag Telemetry Data +xgrid 4111/tcp # Xgrid +xgrid 4111/udp # Xgrid +apple-vpns-rp 4112/tcp # Apple VPN Server Reporting Protocol +apple-vpns-rp 4112/udp # Apple VPN Server Reporting Protocol +aipn-reg 4113/tcp # AIPN LS Registration +aipn-reg 4113/udp # AIPN LS Registration +jomamqmonitor 4114/tcp # JomaMQMonitor +jomamqmonitor 4114/udp # JomaMQMonitor +cds 4115/tcp # CDS Transfer Agent +cds 4115/udp # CDS Transfer Agent +smartcard-tls 4116/tcp # smartcard-TLS +smartcard-tls 4116/udp # smartcard-TLS +hillrserv 4117/tcp # Hillr Connection Manager +hillrserv 4117/udp # Hillr Connection Manager +netscript 4118/tcp # Netadmin Systems NETscript service +netscript 4118/udp # Netadmin Systems NETscript service +assuria-slm 4119/tcp # Assuria Log Manager +assuria-slm 4119/udp # Assuria Log Manager +e-builder 4121/tcp # e-Builder Application Communication +e-builder 4121/udp # e-Builder Application Communication +fprams 4122/tcp # Fiber Patrol Alarm Service +fprams 4122/udp # Fiber Patrol Alarm Service +z-wave 4123/tcp # Zensys Z-Wave Control Protocol +z-wave 4123/udp # Zensys Z-Wave Control Protocol +tigv2 4124/tcp # Rohill TetraNode Ip Gateway v2 +tigv2 4124/udp # Rohill TetraNode Ip Gateway v2 +opsview-envoy 4125/tcp # Opsview Envoy +opsview-envoy 4125/udp # Opsview Envoy +ddrepl 4126/tcp # Data Domain Replication Service +ddrepl 4126/udp # Data Domain Replication Service +unikeypro 4127/tcp # NetUniKeyServer +unikeypro 4127/udp # NetUniKeyServer +nufw 4128/tcp # NuFW decision delegation protocol +nufw 4128/udp # NuFW decision delegation protocol +nuauth 4129/tcp # NuFW authentication protocol +nuauth 4129/udp # NuFW authentication protocol +fronet 4130/tcp # FRONET message protocol +fronet 4130/udp # FRONET message protocol +stars 4131/tcp # Global Maintech Stars +stars 4131/udp # Global Maintech Stars +nuts_dem 4132/tcp nuts-dem # NUTS Daemon +nuts_dem 4132/udp nuts-dem # NUTS Daemon +nuts_bootp 4133/tcp nuts-bootp # NUTS Bootp Server +nuts_bootp 4133/udp nuts-bootp # NUTS Bootp Server +nifty-hmi 4134/tcp # NIFTY-Serve HMI protocol +nifty-hmi 4134/udp # NIFTY-Serve HMI protocol +cl-db-attach 4135/tcp # Classic Line Database Server Attach +cl-db-attach 4135/udp # Classic Line Database Server Attach +cl-db-request 4136/tcp # Classic Line Database Server Request +cl-db-request 4136/udp # Classic Line Database Server Request +cl-db-remote 4137/tcp # Classic Line Database Server Remote +cl-db-remote 4137/udp # Classic Line Database Server Remote +nettest 4138/tcp # nettest +nettest 4138/udp # nettest +thrtx 4139/tcp # Imperfect Networks Server +thrtx 4139/udp # Imperfect Networks Server +cedros_fds 4140/tcp cedros-fds # Cedros Fraud Detection System +cedros_fds 4140/udp cedros-fds # Cedros Fraud Detection System +oirtgsvc 4141/tcp # Workflow Server +oirtgsvc 4141/udp # Workflow Server +oidocsvc 4142/tcp # Document Server +oidocsvc 4142/udp # Document Server +oidsr 4143/tcp # Document Replication +oidsr 4143/udp # Document Replication +vvr-control 4145/tcp # VVR Control +vvr-control 4145/udp # VVR Control +tgcconnect 4146/tcp # TGCConnect Beacon +tgcconnect 4146/udp # TGCConnect Beacon +vrxpservman 4147/tcp # Multum Service Manager +vrxpservman 4147/udp # Multum Service Manager +hhb-handheld 4148/tcp # HHB Handheld Client +hhb-handheld 4148/udp # HHB Handheld Client +agslb 4149/tcp # A10 GSLB Service +agslb 4149/udp # A10 GSLB Service +PowerAlert-nsa 4150/tcp # PowerAlert Network Shutdown Agent +PowerAlert-nsa 4150/udp # PowerAlert Network Shutdown Agent +menandmice_noh 4151/tcp menandmice-noh # Men & Mice Remote Control +menandmice_noh 4151/udp menandmice-noh # Men & Mice Remote Control +idig_mux 4152/tcp idig-mux # iDigTech Multiplex +idig_mux 4152/udp idig-mux # iDigTech Multiplex +mbl-battd 4153/tcp # MBL Remote Battery Monitoring +mbl-battd 4153/udp # MBL Remote Battery Monitoring +atlinks 4154/tcp # atlinks device discovery +atlinks 4154/udp # atlinks device discovery +bzr 4155/tcp # Bazaar version control system +bzr 4155/udp # Bazaar version control system +stat-results 4156/tcp # STAT Results +stat-results 4156/udp # STAT Results +stat-scanner 4157/tcp # STAT Scanner Control +stat-scanner 4157/udp # STAT Scanner Control +stat-cc 4158/tcp # STAT Command Center +stat-cc 4158/udp # STAT Command Center +nss 4159/tcp # Network Security Service +nss 4159/udp # Network Security Service +jini-discovery 4160/tcp # Jini Discovery +jini-discovery 4160/udp # Jini Discovery +omscontact 4161/tcp # OMS Contact +omscontact 4161/udp # OMS Contact +omstopology 4162/tcp # OMS Topology +omstopology 4162/udp # OMS Topology +silverpeakpeer 4163/tcp # Silver Peak Peer Protocol +silverpeakpeer 4163/udp # Silver Peak Peer Protocol +silverpeakcomm 4164/tcp # Silver Peak Communication Protocol +silverpeakcomm 4164/udp # Silver Peak Communication Protocol +altcp 4165/tcp # ArcLink over Ethernet +altcp 4165/udp # ArcLink over Ethernet +joost 4166/tcp # Joost Peer to Peer Protocol +joost 4166/udp # Joost Peer to Peer Protocol +ddgn 4167/tcp # DeskDirect Global Network +ddgn 4167/udp # DeskDirect Global Network +pslicser 4168/tcp # PrintSoft License Server +pslicser 4168/udp # PrintSoft License Server +iadt 4169/tcp # Automation Drive Interface Transport +iadt-disc 4169/udp # Internet ADT Discovery Protocol +d-cinema-csp 4170/tcp # SMPTE Content Synchonization Protocol +ml-svnet 4171/tcp # Maxlogic Supervisor Communication +pcoip 4172/tcp # PC over IP +pcoip 4172/udp # PC over IP +mma-discovery 4173/udp # MMA Device Discovery +smcluster 4174/tcp # StorMagic Cluster Services +sm-disc 4174/udp # StorMagic Discovery +bccp 4175/tcp # Brocade Cluster Communication Protocol +tl-ipcproxy 4176/tcp # Translattice Cluster IPC Proxy +wello 4177/tcp # Wello P2P pubsub service +wello 4177/udp # Wello P2P pubsub service +storman 4178/tcp # StorMan +storman 4178/udp # StorMan +MaxumSP 4179/tcp # Maxum Services +MaxumSP 4179/udp # Maxum Services +httpx 4180/tcp # HTTPX +httpx 4180/udp # HTTPX +macbak 4181/tcp # MacBak +macbak 4181/udp # MacBak +pcptcpservice 4182/tcp # Production Company Pro TCP Service +pcptcpservice 4182/udp # Production Company Pro TCP Service +cyborgnet 4183/tcp # CyborgNet communications +cyborgnet 4183/udp # CyborgNet communications +universe_suite 4184/tcp universe-suite # UNIVERSE SUITE MESSAGE SERVICE +universe_suite 4184/udp universe-suite # UNIVERSE SUITE MESSAGE SERVICE +wcpp 4185/tcp # Woven Control Plane Protocol +wcpp 4185/udp # Woven Control Plane Protocol +boxbackupstore 4186/tcp # Box Backup Store Service +csc_proxy 4187/tcp csc-proxy # Cascade Proxy +vatata 4188/tcp # Vatata Peer to Peer Protocol +vatata 4188/udp # Vatata Peer to Peer Protocol +pcep 4189/tcp # Path Computation Element Communication Protocol +sieve 4190/tcp # ManageSieve Protocol +dsmipv6 4191/udp # Dual Stack MIPv6 NAT Traversal +azeti 4192/tcp # Azeti Agent Service +azeti-bd 4192/udp # azeti blinddate +pvxplusio 4193/tcp # PxPlus remote file srvr +eims-admin 4199/tcp # EIMS ADMIN +eims-admin 4199/udp # EIMS ADMIN +corelccam 4300/tcp # Corel CCam +corelccam 4300/udp # Corel CCam +d-data 4301/tcp # Diagnostic Data +d-data 4301/udp # Diagnostic Data +d-data-control 4302/tcp # Diagnostic Data Control +d-data-control 4302/udp # Diagnostic Data Control +srcp 4303/tcp # Simple Railroad Command Protocol +srcp 4303/udp # Simple Railroad Command Protocol +owserver 4304/tcp # One-Wire Filesystem Server +owserver 4304/udp # One-Wire Filesystem Server +batman 4305/tcp # better approach to mobile ad-hoc networking +batman 4305/udp # better approach to mobile ad-hoc networking +pinghgl 4306/tcp # Hellgate London +pinghgl 4306/udp # Hellgate London +visicron-vs 4307/tcp # Visicron Videoconference Service +visicron-vs 4307/udp # Visicron Videoconference Service +compx-lockview 4308/tcp # CompX-LockView +compx-lockview 4308/udp # CompX-LockView +dserver 4309/tcp # Exsequi Appliance Discovery +dserver 4309/udp # Exsequi Appliance Discovery +mirrtex 4310/tcp # Mir-RT exchange service +mirrtex 4310/udp # Mir-RT exchange service +p6ssmc 4311/tcp # P6R Secure Server Management Console +pscl-mgt 4312/tcp # Parascale Membership Manager +perrla 4313/tcp # PERRLA User Services +choiceview-agt 4314/tcp # ChoiceView Agent +choiceview-clt 4316/tcp # ChoiceView Client +fdt-rcatp 4320/tcp # FDT Remote Categorization Protocol +fdt-rcatp 4320/udp # FDT Remote Categorization Protocol +trim-event 4322/tcp # TRIM Event Service +trim-event 4322/udp # TRIM Event Service +trim-ice 4323/tcp # TRIM ICE Service +trim-ice 4323/udp # TRIM ICE Service +geognosisman 4325/tcp # Cadcorp GeognoSIS Manager Service +geognosisman 4325/udp # Cadcorp GeognoSIS Manager Service +geognosis 4326/tcp # Cadcorp GeognoSIS Service +geognosis 4326/udp # Cadcorp GeognoSIS Service +jaxer-web 4327/tcp # Jaxer Web Protocol +jaxer-web 4327/udp # Jaxer Web Protocol +jaxer-manager 4328/tcp # Jaxer Manager Command Protocol +jaxer-manager 4328/udp # Jaxer Manager Command Protocol +publiqare-sync 4329/tcp # PubliQare Distributed Environment Synchronisation Engine +dey-sapi 4330/tcp # DEY Storage Administration +ktickets-rest 4331/tcp # ktickets REST API for event management and ticketing systems +ahsp 4333/tcp # ArrowHead Service Protocol +ahsp 4333/udp # ArrowHead Service Protocol +ahsp 4333/sctp # ArrowHead Service Protocol +netconf-ch-ssh 4334/tcp # NETCONF Call Home (SSH) +netconf-ch-tls 4335/tcp # NETCONF Call Home (TLS) +restconf-ch-tls 4336/tcp # RESTCONF Call Home (TLS) +gaia 4340/tcp # Gaia Connector Protocol +gaia 4340/udp # Gaia Connector Protocol +lisp-data 4341/tcp # LISP Data Packets +lisp-data 4341/udp # LISP Data Packets +lisp-cons 4342/tcp # LISP-CONS Control +lisp-control 4342/udp # LISP Control Packets +unicall 4343/tcp # UNICALL +unicall 4343/udp # UNICALL +vinainstall 4344/tcp # VinaInstall +vinainstall 4344/udp # VinaInstall +m4-network-as 4345/tcp # Macro 4 Network AS +m4-network-as 4345/udp # Macro 4 Network AS +elanlm 4346/tcp # ELAN LM +elanlm 4346/udp # ELAN LM +lansurveyor 4347/tcp # LAN Surveyor +lansurveyor 4347/udp # LAN Surveyor +itose 4348/tcp # ITOSE +itose 4348/udp # ITOSE +fsportmap 4349/tcp # File System Port Map +fsportmap 4349/udp # File System Port Map +net-device 4350/tcp # Net Device +net-device 4350/udp # Net Device +plcy-net-svcs 4351/tcp # PLCY Net Services +plcy-net-svcs 4351/udp # PLCY Net Services +pjlink 4352/tcp # Projector Link +pjlink 4352/udp # Projector Link +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp # F5 iQuery +qsnet-trans 4354/tcp # QSNet Transmitter +qsnet-trans 4354/udp # QSNet Transmitter +qsnet-workst 4355/tcp # QSNet Workstation +qsnet-workst 4355/udp # QSNet Workstation +qsnet-assist 4356/tcp # QSNet Assistant +qsnet-assist 4356/udp # QSNet Assistant +qsnet-cond 4357/tcp # QSNet Conductor +qsnet-cond 4357/udp # QSNet Conductor +qsnet-nucl 4358/tcp # QSNet Nucleus +qsnet-nucl 4358/udp # QSNet Nucleus +omabcastltkm 4359/tcp # OMA BCAST Long-Term Key Messages +omabcastltkm 4359/udp # OMA BCAST Long-Term Key Messages +matrix_vnet 4360/tcp matrix-vnet # Matrix VNet Communication Protocol +nacnl 4361/udp # Navcom Discovery and Control Port +afore-vdp-disc 4362/udp # AFORE vNode Discovery protocol +shadowstream 4366/udp # ShadowStream System +wxbrief 4368/tcp # WeatherBrief Direct +wxbrief 4368/udp # WeatherBrief Direct +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp # Erlang Port Mapper Daemon +elpro_tunnel 4370/tcp elpro-tunnel # ELPRO V2 Protocol Tunnel +elpro_tunnel 4370/udp elpro-tunnel # ELPRO V2 Protocol Tunnel + +l2c-control 4371/tcp # LAN2CAN Control +l2c-disc 4371/udp # LAN2CAN Discovery +l2c-data 4372/tcp # LAN2CAN Data +l2c-data 4372/udp # LAN2CAN Data +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp # Remote Authenticated Command Service +psi-ptt 4374/tcp # PSI Push-to-Talk Protocol +tolteces 4375/tcp # Toltec EasyShare +tolteces 4375/udp # Toltec EasyShare +bip 4376/tcp # BioAPI Interworking +bip 4376/udp # BioAPI Interworking +cp-spxsvr 4377/tcp # Cambridge Pixel SPx Server +cp-spxsvr 4377/udp # Cambridge Pixel SPx Server +cp-spxdpy 4378/tcp # Cambridge Pixel SPx Display +cp-spxdpy 4378/udp # Cambridge Pixel SPx Display +ctdb 4379/tcp # CTDB +ctdb 4379/udp # CTDB +xandros-cms 4389/tcp # Xandros Community Management Service +xandros-cms 4389/udp # Xandros Community Management Service +wiegand 4390/tcp # Physical Access Control +wiegand 4390/udp # Physical Access Control +apwi-imserver 4391/tcp # American Printware IMServer Protocol +apwi-rxserver 4392/tcp # American Printware RXServer Protocol +apwi-rxspooler 4393/tcp # American Printware RXSpooler Protocol +apwi-disc 4394/udp # American Printware Discovery +omnivisionesx 4395/tcp # OmniVision communication for Virtual environments +omnivisionesx 4395/udp # OmniVision communication for Virtual environments +fly 4396/tcp # Fly Object Space +ds-srv 4400/tcp # ASIGRA Services +ds-srv 4400/udp # ASIGRA Services +ds-srvr 4401/tcp # ASIGRA Televaulting DS-System Service +ds-srvr 4401/udp # ASIGRA Televaulting DS-System Service +ds-clnt 4402/tcp # ASIGRA Televaulting DS-Client Service +ds-clnt 4402/udp # ASIGRA Televaulting DS-Client Service +ds-user 4403/tcp # ASIGRA Televaulting DS-Client Monitoring/Management +ds-user 4403/udp # ASIGRA Televaulting DS-Client Monitoring/Management +ds-admin 4404/tcp # ASIGRA Televaulting DS-System Monitoring/Management +ds-admin 4404/udp # ASIGRA Televaulting DS-System Monitoring/Management +ds-mail 4405/tcp # ASIGRA Televaulting Message Level Restore service +ds-mail 4405/udp # ASIGRA Televaulting Message Level Restore service +ds-slp 4406/tcp # ASIGRA Televaulting DS-Sleeper Service +ds-slp 4406/udp # ASIGRA Televaulting DS-Sleeper Service +nacagent 4407/tcp # Network Access Control Agent +slscc 4408/tcp # SLS Technology Control Centre +netcabinet-com 4409/tcp # Net-Cabinet comunication +itwo-server 4410/tcp # RIB iTWO Application Server +found 4411/tcp # Found Messaging Protocol +smallchat 4412/udp # SmallChat +avi-nms 4413/tcp # AVI Systems NMS +avi-nms-disc 4413/udp # AVI Systems NMS +updog 4414/tcp # Updog Monitoring and Status +brcd-vr-req 4415/tcp # Brocade Virtual Router +pjj-player 4416/tcp # PJJ Media Player +pjj-player-disc 4416/udp # PJJ Media Player discovery +workflowdir 4417/tcp # Workflow Director +axysbridge 4418/udp # AXYS communication protocol +cbp 4419/tcp # Colnod Binary Protocol +nvm-express 4420/tcp # NVM Express over Fabrics +nvm-express 4420/udp # NVM Express over Fabrics +scaleft 4421/tcp # Management for Cloud +tsepisp 4422/tcp # TSEP Installation Service +thingkit 4423/tcp # thingkit secure mesh +netrockey6 4425/tcp # NetROCKEY6 SMART Plus Service +netrockey6 4425/udp # NetROCKEY6 SMART Plus Service +beacon-port-2 4426/tcp # SMARTS Beacon Port +beacon-port-2 4426/udp # SMARTS Beacon Port +drizzle 4427/tcp # Drizzle database server +omviserver 4428/tcp # OMV-Investigation Server-Client +omviagent 4429/tcp # OMV Investigation Agent-Server +sqlserver 4430/tcp # REAL SQL Server +rsqlserver 4430/udp # REAL SQL Server +wspipe 4431/tcp # adWISE Pipe +l-acoustics 4432/tcp # L-ACOUSTICS management +l-acoustics 4432/udp # L-ACOUSTICS management +vop 4433/tcp # Versile Object Protocol +netblox 4441/udp # Netblox Protocol +saris 4442/tcp # Saris +saris 4442/udp # Saris +pharos 4443/tcp # Pharos +pharos 4443/udp # Pharos +upnotifyp 4445/tcp # UPNOTIFYP +upnotifyp 4445/udp # UPNOTIFYP +n1-fwp 4446/tcp # N1-FWP +n1-fwp 4446/udp # N1-FWP +n1-rmgmt 4447/tcp # N1-RMGMT +n1-rmgmt 4447/udp # N1-RMGMT +asc-slmd 4448/tcp # ASC Licence Manager +asc-slmd 4448/udp # ASC Licence Manager +privatewire 4449/tcp # PrivateWire +privatewire 4449/udp # PrivateWire +camp 4450/tcp # Camp +camp 4450/udp # Camp +ctisystemmsg 4451/tcp # CTI System Msg +ctisystemmsg 4451/udp # CTI System Msg +ctiprogramload 4452/tcp # CTI Program Load +ctiprogramload 4452/udp # CTI Program Load +nssalertmgr 4453/tcp # NSS Alert Manager +nssalertmgr 4453/udp # NSS Alert Manager +nssagentmgr 4454/tcp # NSS Agent Manager +nssagentmgr 4454/udp # NSS Agent Manager +prchat-user 4455/tcp # PR Chat User +prchat-user 4455/udp # PR Chat User +prchat-server 4456/tcp # PR Chat Server +prchat-server 4456/udp # PR Chat Server +prRegister 4457/tcp # PR Register +prRegister 4457/udp # PR Register +mcp 4458/tcp # Matrix Configuration Protocol +mcp 4458/udp # Matrix Configuration Protocol +hpssmgmt 4484/tcp # hpssmgmt service +hpssmgmt 4484/udp # hpssmgmt service +assyst-dr 4485/tcp # Assyst Data Repository Service +icms 4486/tcp # Integrated Client Message Service +icms 4486/udp # Integrated Client Message Service +prex-tcp 4487/tcp # Protocol for Remote Execution over TCP +awacs-ice 4488/tcp # Apple Wide Area Connectivity Service ICE Bootstrap +awacs-ice 4488/udp # Apple Wide Area Connectivity Service ICE Bootstrap +ipsec-nat-t 4500/tcp # IPsec NAT-Traversal +ipsec-nat-t 4500/udp # IPsec NAT-Traversal +a25-fap-fgw 4502/sctp # A25 (FAP-FGW) +armagetronad 4534/udp # Armagetron Advanced Game +ehs 4535/tcp # Event Heap Server +ehs 4535/udp # Event Heap Server +ehs-ssl 4536/tcp # Event Heap Server SSL +ehs-ssl 4536/udp # Event Heap Server SSL +wssauthsvc 4537/tcp # WSS Security Service +wssauthsvc 4537/udp # WSS Security Service +swx-gate 4538/tcp # Software Data Exchange Gateway +swx-gate 4538/udp # Software Data Exchange Gateway +worldscores 4545/tcp # WorldScores +worldscores 4545/udp # WorldScores +sf-lm 4546/tcp # SF License Manager (Sentinel) +sf-lm 4546/udp # SF License Manager (Sentinel) +lanner-lm 4547/tcp # Lanner License Manager +lanner-lm 4547/udp # Lanner License Manager +synchromesh 4548/tcp # Synchromesh +synchromesh 4548/udp # Synchromesh +aegate 4549/tcp # Aegate PMR Service +aegate 4549/udp # Aegate PMR Service +gds-adppiw-db 4550/tcp # Perman I Interbase Server +gds-adppiw-db 4550/udp # Perman I Interbase Server +ieee-mih 4551/tcp # MIH Services +ieee-mih 4551/udp # MIH Services +menandmice-mon 4552/tcp # Men and Mice Monitoring +menandmice-mon 4552/udp # Men and Mice Monitoring +icshostsvc 4553/tcp # ICS host services +msfrs 4554/tcp # MS FRS Replication +msfrs 4554/udp # MS FRS Replication +rsip 4555/tcp # RSIP Port +rsip 4555/udp # RSIP Port +dtn-bundle 4556/tcp # DTN Bundle TCP CL Protocol +dtn-bundle 4556/udp # DTN Bundle UDP CL Protocol +dtn-bundle 4556/dccp # DTN Bundle DCCP CL Protocol +mtcevrunqss 4557/udp # Marathon everRun Quorum Service Server +mtcevrunqman 4558/udp # Marathon everRun Quorum Service Manager +hylafax 4559/udp # HylaFAX +amahi-anywhere 4563/tcp # Amahi Anywhere +kwtc 4566/tcp # Kids Watch Time Control Service +kwtc 4566/udp # Kids Watch Time Control Service +tram 4567/tcp # TRAM +tram 4567/udp # TRAM +bmc-reporting 4568/tcp # BMC Reporting +bmc-reporting 4568/udp # BMC Reporting +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp # Inter-Asterisk eXchange +deploymentmap 4570/tcp # site deployment information for Oracle Communications Suite +cardifftec-back 4573/tcp # CardiffTec server/client communication +rid 4590/tcp # RID over HTTP/TLS +l3t-at-an 4591/tcp # HRPD L3T (AT-AN) +l3t-at-an 4591/udp # HRPD L3T (AT-AN) +hrpd-ith-at-an 4592/udp # HRPD-ITH (AT-AN) +ipt-anri-anri 4593/tcp # IPT (ANRI-ANRI) +ipt-anri-anri 4593/udp # IPT (ANRI-ANRI) +ias-session 4594/tcp # IAS-Session (ANRI-ANRI) +ias-session 4594/udp # IAS-Session (ANRI-ANRI) +ias-paging 4595/tcp # IAS-Paging (ANRI-ANRI) +ias-paging 4595/udp # IAS-Paging (ANRI-ANRI) +ias-neighbor 4596/tcp # IAS-Neighbor (ANRI-ANRI) +ias-neighbor 4596/udp # IAS-Neighbor (ANRI-ANRI) +a21-an-1xbs 4597/tcp # A21 (AN-1xBS) +a21-an-1xbs 4597/udp # A21 (AN-1xBS) +a16-an-an 4598/tcp # A16 (AN-AN) +a16-an-an 4598/udp # A16 (AN-AN) +a17-an-an 4599/tcp # A17 (AN-AN) +a17-an-an 4599/udp # A17 (AN-AN) +piranha1 4600/tcp # Piranha1 +piranha1 4600/udp # Piranha1 +piranha2 4601/tcp # Piranha2 +piranha2 4601/udp # Piranha2 +mtsserver 4602/tcp # EAX MTS Server +menandmice-upg 4603/tcp # Men & Mice Upgrade Agent +irp 4604/tcp # Identity Registration Protocol +sixchat 4605/tcp # Direct End to End Secure +ventoso 4621/udp # remote radio VOIP +playsta2-app 4658/tcp # PlayStation2 App Port +playsta2-app 4658/udp # PlayStation2 App Port +playsta2-lob 4659/tcp # PlayStation2 Lobby Port +playsta2-lob 4659/udp # PlayStation2 Lobby Port +smaclmgr 4660/tcp # smaclmgr +smaclmgr 4660/udp # smaclmgr +kar2ouche 4661/tcp # Kar2ouche Peer location service +kar2ouche 4661/udp # Kar2ouche Peer location service +oms 4662/tcp # OrbitNet Message Service +oms 4662/udp # OrbitNet Message Service +noteit 4663/tcp # Note It! Message Service +noteit 4663/udp # Note It! Message Service +ems 4664/tcp # Rimage Messaging Server +ems 4664/udp # Rimage Messaging Server +contclientms 4665/tcp # Container Client Message Service +contclientms 4665/udp # Container Client Message Service +eportcomm 4666/tcp # E-Port Message Service +eportcomm 4666/udp # E-Port Message Service +mmacomm 4667/tcp # MMA Comm Services +mmacomm 4667/udp # MMA Comm Services +mmaeds 4668/tcp # MMA EDS Service +mmaeds 4668/udp # MMA EDS Service +eportcommdata 4669/tcp # E-Port Data Service +eportcommdata 4669/udp # E-Port Data Service +light 4670/tcp # Light packets transfer protocol +light 4670/udp # Light packets transfer protocol +acter 4671/tcp # Bull RSF action server +acter 4671/udp # Bull RSF action server +rfa 4672/tcp # remote file access server +rfa 4672/udp # remote file access server +cxws 4673/tcp # CXWS Operations +cxws 4673/udp # CXWS Operations +appiq-mgmt 4674/tcp # AppIQ Agent Management +appiq-mgmt 4674/udp # AppIQ Agent Management +dhct-status 4675/tcp # BIAP Device Status +dhct-status 4675/udp # BIAP Device Status +dhct-alerts 4676/tcp # BIAP Generic Alert +dhct-alerts 4676/udp # BIAP Generic Alert +bcs 4677/tcp # Business Continuity Servi +bcs 4677/udp # Business Continuity Servi +traversal 4678/tcp # boundary traversal +traversal 4678/udp # boundary traversal +mgesupervision 4679/tcp # MGE UPS Supervision +mgesupervision 4679/udp # MGE UPS Supervision +mgemanagement 4680/tcp # MGE UPS Management +mgemanagement 4680/udp # MGE UPS Management +parliant 4681/tcp # Parliant Telephony System +parliant 4681/udp # Parliant Telephony System +finisar 4682/tcp # finisar +finisar 4682/udp # finisar +spike 4683/tcp # Spike Clipboard Service +spike 4683/udp # Spike Clipboard Service +rfid-rp1 4684/tcp # RFID Reader Protocol 1.0 +rfid-rp1 4684/udp # RFID Reader Protocol 1.0 +autopac 4685/tcp # Autopac Protocol +autopac 4685/udp # Autopac Protocol +msp-os 4686/tcp # Manina Service Protocol +msp-os 4686/udp # Manina Service Protocol +nst 4687/tcp # Network Scanner Tool FTP +nst 4687/udp # Network Scanner Tool FTP +mobile-p2p 4688/tcp # Mobile P2P Service +mobile-p2p 4688/udp # Mobile P2P Service +altovacentral 4689/tcp # Altova DatabaseCentral +altovacentral 4689/udp # Altova DatabaseCentral +prelude 4690/tcp # Prelude IDS message proto +prelude 4690/udp # Prelude IDS message proto +mtn 4691/tcp # Monotone Netsync Protocol +mtn 4691/udp # Monotone Netsync Protocol +conspiracy 4692/tcp # Conspiracy messaging +conspiracy 4692/udp # Conspiracy messaging +netxms-agent 4700/tcp # NetXMS Agent +netxms-agent 4700/udp # NetXMS Agent +netxms-mgmt 4701/tcp # NetXMS Management +netxms-mgmt 4701/udp # NetXMS Management +netxms-sync 4702/tcp # NetXMS Server Synchronization +netxms-sync 4702/udp # NetXMS Server Synchronization +npqes-test 4703/tcp # Network Performance Quality Evaluation System Test Service +assuria-ins 4704/tcp # Assuria Insider +#pulseaudio is not registered in IANA +pulseaudio 4713/tcp # Pulseaudio +truckstar 4725/tcp # TruckStar Service +truckstar 4725/udp # TruckStar Service +a26-fap-fgw 4726/udp # A26 (FAP-FGW) +fcis 4727/tcp # F-Link Client Information Service +fcis-disc 4727/udp # F-Link Client Information Service Discovery +capmux 4728/tcp # CA Port Multiplexer +capmux 4728/udp # CA Port Multiplexer +gsmtap 4729/udp # GSM Interface Tap +gearman 4730/tcp # Gearman Job Queue System +gearman 4730/udp # Gearman Job Queue System +remcap 4731/tcp # Remote Capture Protocol +ohmtrigger 4732/udp # OHM server trigger +resorcs 4733/tcp # RES Orchestration Catalog Services +ipdr-sp 4737/tcp # IPDR/SP +ipdr-sp 4737/udp # IPDR/SP +solera-lpn 4738/tcp # SoleraTec Locator +solera-lpn 4738/udp # SoleraTec Locator +ipfix 4739/tcp # IP Flow Info Export +ipfix 4739/udp # IP Flow Info Export +ipfix 4739/sctp # IP Flow Info Export +ipfixs 4740/tcp # ipfix protocol over TLS +ipfixs 4740/sctp # ipfix protocol over DTLS +ipfixs 4740/udp # ipfix protocol over DTLS +lumimgrd 4741/tcp # Luminizer Manager +lumimgrd 4741/udp # Luminizer Manager +sicct 4742/tcp # SICCT +sicct-sdp 4742/udp # SICCT Service Discovery Protocol +openhpid 4743/tcp # openhpi HPI service +openhpid 4743/udp # openhpi HPI service +ifsp 4744/tcp # Internet File Synchronization Protocol +ifsp 4744/udp # Internet File Synchronization Protocol +fmp 4745/tcp # Funambol Mobile Push +fmp 4745/udp # Funambol Mobile Push +buschtrommel 4747/udp # peer-to-peer file exchange +profilemac 4749/tcp # Profile for Mac +profilemac 4749/udp # Profile for Mac +ssad 4750/tcp # Simple Service Auto Discovery +ssad 4750/udp # Simple Service Auto Discovery +spocp 4751/tcp # Simple Policy Control Protocol +spocp 4751/udp # Simple Policy Control Protocol +snap 4752/tcp # Simple Network Audio Protocol +snap 4752/udp # Simple Network Audio Protocol +simon 4753/tcp # Simple Invocation of Methods +simon-disc 4753/udp # Over Network (SIMON) +bfd-multi-ctl 4784/tcp # BFD Multihop Control +bfd-multi-ctl 4784/udp # BFD Multihop Control +cncp 4785/udp # Cisco Nexus Control Protocol +smart-install 4786/tcp # Smart Install Service +sia-ctrl-plane 4787/tcp # Service Insertion Architecture (SIA) Control-Plane +xmcp 4788/tcp # eXtensible Messaging Client Protocol +vxlan 4789/udp # Virtual eXtensible Local area network +vxlan-gpe 4790/udp # Generic Protocol Extension for vxlan +roce 4791/udp # IP Routable RocE +iims 4800/tcp # Icona Instant Messenging System +iims 4800/udp # Icona Instant Messenging System +iwec 4801/tcp # Icona Web Embedded Chat +iwec 4801/udp # Icona Web Embedded Chat +ilss 4802/tcp # Icona License System Server +ilss 4802/udp # Icona License System Server +notateit 4803/tcp # Notateit Messaging +notateit-disc 4803/udp # Notateit Messaging Discovery +aja-ntv4-disc 4804/udp # AJA ntv4 Video System Discovery +htcp 4827/tcp # HTCP +htcp 4827/udp # HTCP +varadero-0 4837/tcp # Varadero-0 +varadero-0 4837/udp # Varadero-0 +varadero-1 4838/tcp # Varadero-1 +varadero-1 4838/udp # Varadero-1 +varadero-2 4839/tcp # Varadero-2 +varadero-2 4839/udp # Varadero-2 +opcua-tcp 4840/tcp # OPC UA TCP Protocol +opcua-udp 4840/udp # OPC UA TCP Protocol +quosa 4841/tcp # QUOSA Virtual Library Service +quosa 4841/udp # QUOSA Virtual Library Service +gw-asv 4842/tcp # nCode ICE-flow Library AppServer +gw-asv 4842/udp # nCode ICE-flow Library AppServer +opcua-tls 4843/tcp # OPC UA TCP Protocol over TLS/SSL +opcua-tls 4843/udp # OPC UA TCP Protocol over TLS/SSL +gw-log 4844/tcp # nCode ICE-flow Library LogServer +gw-log 4844/udp # nCode ICE-flow Library LogServer +wcr-remlib 4845/tcp # WordCruncher Remote Library Service +wcr-remlib 4845/udp # WordCruncher Remote Library Service +contamac_icm 4846/tcp contamac-icm # Contamac ICM Service +contamac_icm 4846/udp contamac-icm # Contamac ICM Service +wfc 4847/tcp # Web Fresh Communication +wfc 4847/udp # Web Fresh Communication +appserv-http 4848/tcp # App Server - Admin HTTP +appserv-http 4848/udp # App Server - Admin HTTP +appserv-https 4849/tcp # App Server - Admin HTTPS +appserv-https 4849/udp # App Server - Admin HTTPS +sun-as-nodeagt 4850/tcp # Sun App Server - NA +sun-as-nodeagt 4850/udp # Sun App Server - NA +derby-repli 4851/tcp # Apache Derby Replication +derby-repli 4851/udp # Apache Derby Replication +unify-debug 4867/tcp # Unify Debugger +unify-debug 4867/udp # Unify Debugger +phrelay 4868/tcp # Photon Relay +phrelay 4868/udp # Photon Relay +phrelaydbg 4869/tcp # Photon Relay Debug +phrelaydbg 4869/udp # Photon Relay Debug +cc-tracking 4870/tcp # Citcom Tracking Service +cc-tracking 4870/udp # Citcom Tracking Service +wired 4871/tcp # Wired +wired 4871/udp # Wired +tritium-can 4876/tcp # Tritium CAN Bus Bridge Service +tritium-can 4876/udp # Tritium CAN Bus Bridge Service +lmcs 4877/tcp # Lighting Management Control System +lmcs 4877/udp # Lighting Management Control System +inst-discovery 4878/udp # Agilent Instrument Discovery +wsdl-event 4879/tcp # WSDL Event Receiver +hislip 4880/tcp # IVI High-Speed LAN Instrument Protocol +socp-t 4881/udp # SOCP Time Synchronization Protocol +socp-c 4882/udp # SOCP Control Protocol +wmlserver 4883/tcp # Meier-Phelps License Server +hivestor 4884/tcp # HiveStor Distributed File System +hivestor 4884/udp # HiveStor Distributed File System +abbs 4885/tcp # ABBS +abbs 4885/udp # ABBS +lyskom 4894/tcp # LysKOM Protocol A +lyskom 4894/udp # LysKOM Protocol A +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp # RAdmin Port +hfcs 4900/tcp # HyperFileSQL Client/Server Database Engine +hfcs 4900/udp # HyperFileSQL Client/Server Database Engine +flr_agent 4901/tcp flr-agent # FileLocator Remote Search Agent +magiccontrol 4902/tcp # magicCONROL RF and Data Interface +lutap 4912/tcp # Technicolor LUT Access Protocol +lutcp 4913/tcp # LUTher Control Protocol +bones 4914/tcp # Bones Remote Control +bones 4914/udp # Bones Remote Control +frcs 4915/tcp # Fibics Remote Control Service +an-signaling 4936/udp # Signal protocol port for autonomic networking +atsc-mh-ssc 4937/udp # ATSC-M/H Service Signaling Channel +eq-office-4940 4940/tcp # Equitrac Office +eq-office-4940 4940/udp # Equitrac Office +eq-office-4941 4941/tcp # Equitrac Office +eq-office-4941 4941/udp # Equitrac Office +eq-office-4942 4942/tcp # Equitrac Office +eq-office-4942 4942/udp # Equitrac Office +munin 4949/tcp # Munin Graphing Framework +munin 4949/udp # Munin Graphing Framework +sybasesrvmon 4950/tcp # Sybase Server Monitor +sybasesrvmon 4950/udp # Sybase Server Monitor +pwgwims 4951/tcp # PWG WIMS +pwgwims 4951/udp # PWG WIMS +sagxtsds 4952/tcp # SAG Directory Server +sagxtsds 4952/udp # SAG Directory Server +dbsyncarbiter 4953/tcp # Synchronization Arbiter +###UNAUTHORIZED USE: port 4967 by Rockwell FTA####### +ccss-qmm 4969/tcp # CCSS QMessageMonitor +ccss-qmm 4969/udp # CCSS QMessageMonitor +ccss-qsm 4970/tcp # CCSS QSystemMonitor +ccss-qsm 4970/udp # CCSS QSystemMonitor +ctxs-vpp 4980/udp # Citrix Virtual Path +webyast 4984/tcp # WebYast +gerhcs 4985/tcp # GER HC Standard +mrip 4986/tcp # Model Railway Interface Program +mrip 4986/udp # Model Railway Interface Program +smar-se-port1 4987/tcp # SMAR Ethernet Port 1 +smar-se-port1 4987/udp # SMAR Ethernet Port 1 +smar-se-port2 4988/tcp # SMAR Ethernet Port 2 +smar-se-port2 4988/udp # SMAR Ethernet Port 2 +parallel 4989/tcp # Parallel for GAUSS (tm) +parallel 4989/udp # Parallel for GAUSS (tm) +busycal 4990/tcp # BusySync Calendar Synch. Protocol +busycal 4990/udp # BusySync Calendar Synch. Protocol +vrt 4991/tcp # VITA Radio Transport +vrt 4991/udp # VITA Radio Transport +hfcs-manager 4999/tcp # Hyper File Client/Server Database Engine Manager +hfcs-manager 4999/udp # Hyper File Client/Server Database Engine Manager +commplex-main 5000/tcp # +commplex-main 5000/udp # +commplex-link 5001/tcp # +commplex-link 5001/udp # +fmpro-internal 5003/tcp # FileMaker, Inc. - Proprietary transport +fmpro-internal 5003/udp # FileMaker, Inc. - Proprietary name binding +avt-profile-1 5004/tcp # RTP media data [RFC 3551, RFC 4571] +avt-profile-1 5004/udp # RTP media data [RFC 3551] +avt-profile-1 5004/dccp # RTP media data [RFC 3551, RFC-ietf-dccp-rtp-07.txt] +avt-profile-2 5005/tcp # RTP control protocol [RFC 3551, RFC 4571] +avt-profile-2 5005/udp # RTP control protocol [RFC 3551] +avt-profile-2 5005/dccp # RTP control protocol [RFC 3551, RFC-ietf-dccp-rtp-07.txt] +wsm-server 5006/tcp # wsm server +wsm-server 5006/udp # wsm server +wsm-server-ssl 5007/tcp # wsm server ssl +wsm-server-ssl 5007/udp # wsm server ssl +synapsis-edge 5008/tcp # Synapsis EDGE +synapsis-edge 5008/udp # Synapsis EDGE +winfs 5009/tcp # Microsoft Windows Filesystem +winfs 5009/udp # Microsoft Windows Filesystem +telelpathstart 5010/tcp # TelepathStart +telelpathstart 5010/udp # TelepathStart +telelpathattack 5011/tcp # TelepathAttack +telelpathattack 5011/udp # TelepathAttack +nsp 5012/tcp # NetOnTap Service +nsp 5012/udp # NetOnTap Service +fmpro-v6 5013/tcp # FileMaker, Inc. - Proprietary transport +fmpro-v6 5013/udp # FileMaker, Inc. - Proprietary transport +onpsocket 5014/udp # Overlay Network Protocol +fmwp 5015/tcp # FileMaker, Inc. - Web publishing +zenginkyo-1 5020/tcp # zenginkyo-1 +zenginkyo-1 5020/udp # zenginkyo-1 +zenginkyo-2 5021/tcp # zenginkyo-2 +zenginkyo-2 5021/udp # zenginkyo-2 +mice 5022/tcp # mice server +mice 5022/udp # mice server +htuilsrv 5023/tcp # Htuil Server for PLD2 +htuilsrv 5023/udp # Htuil Server for PLD2 +scpi-telnet 5024/tcp # SCPI-TELNET +scpi-telnet 5024/udp # SCPI-TELNET +scpi-raw 5025/tcp # SCPI-RAW +scpi-raw 5025/udp # SCPI-RAW +strexec-d 5026/tcp # Storix I/O daemon (data) +strexec-d 5026/udp # Storix I/O daemon (data) +strexec-s 5027/tcp # Storix I/O daemon (stat) +strexec-s 5027/udp # Storix I/O daemon (stat) +qvr 5028/tcp # Quiqum Virtual Relais +infobright 5029/tcp # Infobright Database Server +infobright 5029/udp # Infobright Database Server +surfpass 5030/tcp # SurfPass +surfpass 5030/udp # SurfPass +dmp 5031/udp # Direct Message Protocol +signacert-agent 5032/tcp # SignaCert Enterprise Trust Server Agent +jtnetd-server 5033/tcp # Janstor Secure Data +jtnetd-status 5034/tcp # Janstor Status +asnaacceler8db 5042/tcp # asnaacceler8db +asnaacceler8db 5042/udp # asnaacceler8db +swxadmin 5043/tcp # ShopWorX Administration +swxadmin 5043/udp # ShopWorX Administration +lxi-evntsvc 5044/tcp # LXI Event Service +lxi-evntsvc 5044/udp # LXI Event Service +osp 5045/tcp # Open Settlement Protocol +vpm-udp 5046/udp # Vishay PM UDP Service +iscape 5047/udp # iSCAPE Data Broadcasting +texai 5048/tcp # Texai Message Service +ivocalize 5049/tcp # iVocalize Web Conference +ivocalize 5049/udp # iVocalize Web Conference +mmcc 5050/tcp # multimedia conference control tool +mmcc 5050/udp # multimedia conference control tool +ita-agent 5051/tcp # ITA Agent +ita-agent 5051/udp # ITA Agent +ita-manager 5052/tcp # ITA Manager +ita-manager 5052/udp # ITA Manager +rlm 5053/tcp # RLM License Server +rlm-disc 5053/udp # RLM Discovery Server +rlm-admin 5054/tcp # RLM administrative interface +unot 5055/tcp # UNOT +unot 5055/udp # UNOT +intecom-ps1 5056/tcp # Intecom Pointspan 1 +intecom-ps1 5056/udp # Intecom Pointspan 1 +intecom-ps2 5057/tcp # Intecom Pointspan 2 +intecom-ps2 5057/udp # Intecom Pointspan 2 +locus-disc 5058/udp # Locus Discovery +sds 5059/tcp # SIP Directory Services +sds 5059/udp # SIP Directory Services +sip 5060/tcp # SIP +sip 5060/udp # SIP +sip 5060/sctp # SIP +sips 5061/tcp # SIP-TLS +sips 5061/udp # SIP-TLS +sips 5061/sctp # SIP-TLS +na-localise 5062/tcp # Localisation access +na-localise 5062/udp # Localisation access +csrpc 5063/tcp # centrify secure RPC +ca-1 5064/tcp # Channel Access 1 +ca-1 5064/udp # Channel Access 1 +ca-2 5065/tcp # Channel Access 2 +ca-2 5065/udp # Channel Access 2 +stanag-5066 5066/tcp # STANAG-5066-SUBNET-INTF +stanag-5066 5066/udp # STANAG-5066-SUBNET-INTF +authentx 5067/tcp # Authentx Service +authentx 5067/udp # Authentx Service +bitforestsrv 5068/tcp # Bitforest Data Service +i-net-2000-npr 5069/tcp # I/Net 2000-NPR +i-net-2000-npr 5069/udp # I/Net 2000-NPR +vtsas 5070/tcp # VersaTrans Server Agent Service +vtsas 5070/udp # VersaTrans Server Agent Service +powerschool 5071/tcp # PowerSchool +powerschool 5071/udp # PowerSchool +ayiya 5072/tcp # Anything In Anything +ayiya 5072/udp # Anything In Anything +tag-pm 5073/tcp # Advantage Group Port Mgr +tag-pm 5073/udp # Advantage Group Port Mgr +alesquery 5074/tcp # ALES Query +alesquery 5074/udp # ALES Query +pvaccess 5075/tcp # Experimental Physics and Industrial Control System +pixelpusher 5078/udp # PixelPusher pixel data +cp-spxrpts 5079/udp # Cambridge Pixel SPx Reports +onscreen 5080/tcp # OnScreen Data Collection Service +onscreen 5080/udp # OnScreen Data Collection Service +sdl-ets 5081/tcp # SDL - Ent Trans Server +sdl-ets 5081/udp # SDL - Ent Trans Server +qcp 5082/tcp # Qpur Communication Protocol +qcp 5082/udp # Qpur Communication Protocol +qfp 5083/tcp # Qpur File Protocol +qfp 5083/udp # Qpur File Protocol +llrp 5084/tcp # EPCglobal Low-Level Reader Protocol +llrp 5084/udp # EPCglobal Low-Level Reader Protocol +encrypted-llrp 5085/tcp # EPCglobal Encrypted LLRP +encrypted-llrp 5085/udp # EPCglobal Encrypted LLRP +aprigo-cs 5086/tcp # Aprigo Collection Service +biotic 5087/tcp # Binary Internet of Things Interoperable Communication +car 5090/sctp # Candidate AR +cxtp 5091/sctp # Context Transfer Protocol +magpie 5092/udp # Magpie Binary +sentinel-lm 5093/tcp # Sentinel LM +sentinel-lm 5093/udp # Sentinel LM +hart-ip 5094/tcp # HART-IP +hart-ip 5094/udp # HART-IP +sentlm-srv2srv 5099/tcp # SentLM Srv2Srv +sentlm-srv2srv 5099/udp # SentLM Srv2Srv +socalia 5100/tcp # Socalia service mux +socalia 5100/udp # Socalia service mux +talarian-tcp 5101/tcp # Talarian_TCP +talarian-udp 5101/udp # Talarian_UDP +oms-nonsecure 5102/tcp # Oracle OMS non-secure +oms-nonsecure 5102/udp # Oracle OMS non-secure +actifio-c2c 5103/tcp # Actifio C2C +tinymessage 5104/udp # TinyMessage +hughes-ap 5105/udp # Hughes Association Protocol +actifioudsagent 5106/tcp # Actifio UDS Agent +actifioreplic 5107/tcp # Disk to Disk replication +taep-as-svc 5111/tcp # TAEP AS service +taep-as-svc 5111/udp # TAEP AS service +pm-cmdsvr 5112/tcp # PeerMe Msg Cmd Service +pm-cmdsvr 5112/udp # PeerMe Msg Cmd Service +ev-services 5114/tcp # Enterprise Vault Services +autobuild 5115/tcp # Symantec Autobuild Service +emb-proj-cmd 5116/udp # EPSON Projecter Image Transfer +gradecam 5117/tcp # GradeCam Image Processing +barracuda-bbs 5120/tcp # Barracuda Backup Protocol +barracuda-bbs 5120/udp # Barracuda Backup Protocol +nbt-pc 5133/tcp # Policy Commander +nbt-pc 5133/udp # Policy Commander +ppactivation 5134/tcp # PP ActivationServer +erp-scale 5135/tcp # ERP-Scale +minotaur-sa 5136/udp # Minotaur SA +ctsd 5137/tcp # MyCTS server port +ctsd 5137/udp # MyCTS server port +rmonitor_secure 5145/tcp rmonitor-secure # RMONITOR SECURE +rmonitor_secure 5145/udp rmonitor-secure # RMONITOR SECURE +social-alarm 5146/tcp # Social Alarm Service +atmp 5150/tcp # Ascend Tunnel Management Protocol +atmp 5150/udp # Ascend Tunnel Management Protocol +esri_sde 5151/tcp esri-sde # ESRI SDE Instance +esri_sde 5151/udp esri-sde # ESRI SDE Remote Start +sde-discovery 5152/tcp # ESRI SDE Instance Discovery +sde-discovery 5152/udp # ESRI SDE Instance Discovery +toruxserver 5153/tcp # ToruX Game Server +bzflag 5154/tcp # BZFlag game server +bzflag 5154/udp # BZFlag game server +asctrl-agent 5155/tcp # Oracle asControl Agent +asctrl-agent 5155/udp # Oracle asControl Agent +rugameonline 5156/tcp # Russian Online Game +mediat 5157/tcp # Mediat Remote Object Exchange +snmpssh 5161/tcp # SNMP over SSH Transport Model +snmpssh-trap 5162/tcp # SNMP Notification over SSH Transport Model +sbackup 5163/tcp # Shadow Backup +vpa 5164/tcp # Virtual Protocol Adapter +vpa-disc 5164/udp # Virtual Protocol Adapter Discovery +ife_icorp 5165/tcp ife-icorp # ife_1corp +ife_icorp 5165/udp ife-icorp # ife_1corp +winpcs 5166/tcp # WinPCS Service Connection +winpcs 5166/udp # WinPCS Service Connection +scte104 5167/tcp # SCTE104 Connection +scte104 5167/udp # SCTE104 Connection +scte30 5168/tcp # SCTE30 Connection +scte30 5168/udp # SCTE30 Connection +pcoip-mgmt 5172/tcp # PC over IP Endpoint Management +aol 5190/tcp # America-Online +aol 5190/udp # America-Online +aol-1 5191/tcp # AmericaOnline1 +aol-1 5191/udp # AmericaOnline1 +aol-2 5192/tcp # AmericaOnline2 +aol-2 5192/udp # AmericaOnline2 +aol-3 5193/tcp # AmericaOnline3 +aol-3 5193/udp # AmericaOnline3 +cpscomm 5194/tcp # CipherPoint Config Service +ampl-lic 5195/tcp # AMPL_Optimization - program licenses +ampl-tableproxy 5196/tcp # AMPL_Optimization - table data +tunstall-lwp 5197/tcp # Tunstall Lone worker device +targus-getdata 5200/tcp # TARGUS GetData +targus-getdata 5200/udp # TARGUS GetData +targus-getdata1 5201/tcp # TARGUS GetData 1 +targus-getdata1 5201/udp # TARGUS GetData 1 +targus-getdata2 5202/tcp # TARGUS GetData 2 +targus-getdata2 5202/udp # TARGUS GetData 2 +targus-getdata3 5203/tcp # TARGUS GetData 3 +targus-getdata3 5203/udp # TARGUS GetData 3 +nomad 5209/tcp # Nomad Device Video Transfer +noteza 5215/tcp # NOTEZA Data Safety Service +noteza 5215/sctp # NOTEZA Data Safety Service +3exmp 5221/tcp # 3eTI Extensible Management Protocol for OAMP +xmpp-client 5222/tcp # XMPP Client Connection +hpvirtgrp 5223/tcp # HP Virtual Machine Group Management +hpvirtgrp 5223/udp # HP Virtual Machine Group Management +hpvirtctrl 5224/tcp # HP Virtual Machine Console Operations +hpvirtctrl 5224/udp # HP Virtual Machine Console Operations +hp-server 5225/tcp # HP Server +hp-server 5225/udp # HP Server +hp-status 5226/tcp # HP Status +hp-status 5226/udp # HP Status +perfd 5227/tcp # HP System Performance Metric Service +perfd 5227/udp # HP System Performance Metric Service +hpvroom 5228/tcp # HP Virtual Room Service +jaxflow 5229/tcp # Collector and Forwarder Management +jaxflow-data 5230/tcp # JaxMP RealFlow application and protocol data +crusecontrol 5231/tcp # Remote Control of Scan Software for Cruse Scanners +enfs 5233/tcp # Etinnae Network File Service +eenet 5234/tcp # EEnet communications +eenet 5234/udp # EEnet communications +galaxy-network 5235/tcp # Galaxy Network Service +galaxy-network 5235/udp # Galaxy Network Service +padl2sim 5236/tcp # +padl2sim 5236/udp # +mnet-discovery 5237/tcp # m-net discovery +mnet-discovery 5237/udp # m-net discovery +downtools 5245/tcp # DownTools Control Protocol +downtools-disc 5245/udp # DownTools Discovery Protocol +capwap-control 5246/udp # CAPWAP Control Protocol +capwap-data 5247/udp # CAPWAP Data Protocol +caacws 5248/tcp # CA Access Control Web Service +caacws 5248/udp # CA Access Control Web Service +caaclang2 5249/tcp # CA AC Lang Service +caaclang2 5249/udp # CA AC Lang Service +soagateway 5250/tcp # soaGateway +soagateway 5250/udp # soaGateway +caevms 5251/tcp # CA eTrust VM Service +caevms 5251/udp # CA eTrust VM Service +movaz-ssc 5252/tcp # Movaz SSC +movaz-ssc 5252/udp # Movaz SSC +kpdp 5253/tcp # Kohler Power Device Protocol +logcabin 5254/tcp # LogCabin storage service +3com-njack-1 5264/tcp # 3Com Network Jack Port 1 +3com-njack-1 5264/udp # 3Com Network Jack Port 1 +3com-njack-2 5265/tcp # 3Com Network Jack Port 2 +3com-njack-2 5265/udp # 3Com Network Jack Port 2 +xmpp-server 5269/tcp # XMPP Server Connection +cartographerxmp 5270/tcp # Cartographer XMP +cartographerxmp 5270/udp # Cartographer XMP +cuelink 5271/tcp # StageSoft CueLink messaging +cuelink-disc 5271/udp # StageSoft CueLink discovery +pk 5272/tcp # PK +pk 5272/udp # PK +xmpp-bosh 5280/tcp # Bidirectional-streams Over Synchronous HTTP (BOSH) +undo-lm 5281/tcp # Undo License Manager +transmit-port 5282/tcp # Marimba Transmitter Port +transmit-port 5282/udp # Marimba Transmitter Port +presence 5298/tcp # XMPP Link-Local Messaging +presence 5298/udp # XMPP Link-Local Messaging +nlg-data 5299/tcp # NLG Data Service +nlg-data 5299/udp # NLG Data Service +hacl-hb 5300/tcp # HA cluster heartbeat +hacl-hb 5300/udp # HA cluster heartbeat +hacl-gs 5301/tcp # HA cluster general services +hacl-gs 5301/udp # HA cluster general services +hacl-cfg 5302/tcp # HA cluster configuration +hacl-cfg 5302/udp # HA cluster configuration +hacl-probe 5303/tcp # HA cluster probing +hacl-probe 5303/udp # HA cluster probing +hacl-local 5304/tcp # HA Cluster Commands +hacl-local 5304/udp # HA Cluster Commands +hacl-test 5305/tcp # HA Cluster Test +hacl-test 5305/udp # HA Cluster Test +sun-mc-grp 5306/tcp # Sun MC Group +sun-mc-grp 5306/udp # Sun MC Group +sco-aip 5307/tcp # SCO AIP +sco-aip 5307/udp # SCO AIP +jprinter 5309/tcp # J Printer +jprinter 5309/udp # J Printer +outlaws 5310/tcp # Outlaws +outlaws 5310/udp # Outlaws +permabit-cs 5312/tcp # Permabit Client-Server +permabit-cs 5312/udp # Permabit Client-Server +rrdp 5313/tcp # Real-time & Reliable Data +rrdp 5313/udp # Real-time & Reliable Data +opalis-rbt-ipc 5314/tcp # opalis-rbt-ipc +opalis-rbt-ipc 5314/udp # opalis-rbt-ipc +hacl-poll 5315/tcp # HA Cluster UDP Polling +hacl-poll 5315/udp # HA Cluster UDP Polling +hpbladems 5316/tcp # HPBladeSystem Monitor Service +hpdevms 5317/tcp # HP Device Monitor Service +pkix-cmc 5318/tcp # PKIX Certificate +bsfserver-zn 5320/tcp # Webservices-based Zn interface of BSF +bsfsvr-zn-ssl 5321/tcp # Webservices-based Zn interface of BSF over SSL +kfserver 5343/tcp # Sculptor Database Server +kfserver 5343/udp # Sculptor Database Server +xkotodrcp 5344/tcp # xkoto DRCP +xkotodrcp 5344/udp # xkoto DRCP +stuns 5349/tcp stun-behaviors turns # STUN over TLS, TURN over TLS +stuns 5349/udp stun-behaviors turns # Reserved for a future enhancement of STUN, Reserved for a future enhancement of TURN +pcp-multicast 5350/tcp # Port Control Protocol +pcp 5350/udp # Port Control Protocol +#pcp 5351/udp # Port Control Protocol +dns-llq 5352/tcp # DNS Long-Lived Queries +dns-llq 5352/udp # DNS Long-Lived Queries +mdns 5353/tcp # Multicast DNS +mdns 5353/udp # Multicast DNS +mdnsresponder 5354/tcp noclog # Multicast DNS Responder IPC +mdnsresponder 5354/udp noclog # Multicast DNS Responder IPC +ms-smlbiz 5356/tcp # Microsoft Small Business +ms-smlbiz 5356/udp # Microsoft Small Business +wsdapi 5357/tcp # Web Services for Devices +wsdapi 5357/udp # Web Services for Devices +wsdapi-s 5358/tcp # WS for Devices Secured +wsdapi-s 5358/udp # WS for Devices Secured +ms-alerter 5359/tcp # Microsoft Alerter +ms-alerter 5359/udp # Microsoft Alerter +ms-sideshow 5360/tcp # Protocol for Windows SideShow +ms-sideshow 5360/udp # Protocol for Windows SideShow +ms-s-sideshow 5361/tcp # Secure Protocol for Windows SideShow +ms-s-sideshow 5361/udp # Secure Protocol for Windows SideShow +serverwsd2 5362/tcp # Microsoft Windows Server WSD2 Service +serverwsd2 5362/udp # Microsoft Windows Server WSD2 Service +net-projection 5363/tcp # Windows Network Projection +net-projection 5363/udp # Windows Network Projection +kdnet 5364/udp # Microsoft Kernel Debugger +stresstester 5397/tcp # StressTester(tm) Injector +stresstester 5397/udp # StressTester(tm) Injector +elektron-admin 5398/tcp # Elektron Administration +elektron-admin 5398/udp # Elektron Administration +securitychase 5399/tcp # SecurityChase +securitychase 5399/udp # SecurityChase +excerpt 5400/tcp # Excerpt Search +excerpt 5400/udp # Excerpt Search +excerpts 5401/tcp # Excerpt Search Secure +excerpts 5401/udp # Excerpt Search Secure +hpoms-ci-lstn 5403/tcp # HPOMS-CI-LSTN +hpoms-ci-lstn 5403/udp # HPOMS-CI-LSTN +hpoms-dps-lstn 5404/tcp # HPOMS-DPS-LSTN +hpoms-dps-lstn 5404/udp # HPOMS-DPS-LSTN +netsupport 5405/tcp # NetSupport +netsupport 5405/udp # NetSupport +systemics-sox 5406/tcp # Systemics Sox +systemics-sox 5406/udp # Systemics Sox +foresyte-clear 5407/tcp # Foresyte-Clear +foresyte-clear 5407/udp # Foresyte-Clear +foresyte-sec 5408/tcp # Foresyte-Sec +foresyte-sec 5408/udp # Foresyte-Sec +salient-dtasrv 5409/tcp # Salient Data Server +salient-dtasrv 5409/udp # Salient Data Server +salient-usrmgr 5410/tcp # Salient User Manager +salient-usrmgr 5410/udp # Salient User Manager +actnet 5411/tcp # ActNet +actnet 5411/udp # ActNet +continuus 5412/tcp # Continuus +continuus 5412/udp # Continuus +wwiotalk 5413/tcp # WWIOTALK +wwiotalk 5413/udp # WWIOTALK +statusd 5414/tcp # StatusD +statusd 5414/udp # StatusD +ns-server 5415/tcp # NS Server +ns-server 5415/udp # NS Server +sns-gateway 5416/tcp # SNS Gateway +sns-gateway 5416/udp # SNS Gateway +sns-agent 5417/tcp # SNS Agent +sns-agent 5417/udp # SNS Agent +mcntp 5418/tcp # MCNTP +mcntp 5418/udp # MCNTP +dj-ice 5419/tcp # DJ-ICE +dj-ice 5419/udp # DJ-ICE +cylink-c 5420/tcp # Cylink-C +cylink-c 5420/udp # Cylink-C +netsupport2 5421/tcp # Net Support 2 +netsupport2 5421/udp # Net Support 2 +salient-mux 5422/tcp # Salient MUX +salient-mux 5422/udp # Salient MUX +virtualuser 5423/tcp # VIRTUALUSER +virtualuser 5423/udp # VIRTUALUSER +beyond-remote 5424/tcp # Beyond Remote +beyond-remote 5424/udp # Beyond Remote +br-channel 5425/tcp # Beyond Remote Command Channel +br-channel 5425/udp # Beyond Remote Command Channel +devbasic 5426/tcp # DEVBASIC +devbasic 5426/udp # DEVBASIC +sco-peer-tta 5427/tcp # SCO-PEER-TTA +sco-peer-tta 5427/udp # SCO-PEER-TTA +telaconsole 5428/tcp # TELACONSOLE +telaconsole 5428/udp # TELACONSOLE +base 5429/tcp # Billing and Accounting System Exchange +base 5429/udp # Billing and Accounting System Exchange +radec-corp 5430/tcp # RADEC CORP +radec-corp 5430/udp # RADEC CORP +park-agent 5431/tcp # PARK AGENT +park-agent 5431/udp # PARK AGENT +pyrrho 5433/tcp # Pyrrho DBMS +pyrrho 5433/udp # Pyrrho DBMS +sgi-arrayd 5434/tcp # SGI Array Services Daemon +sgi-arrayd 5434/udp # SGI Array Services Daemon +sceanics 5435/tcp # SCEANICS situation and action notification +sceanics 5435/udp # SCEANICS situation and action notification +pmip6-cntl 5436/udp # pmip6-cntl +pmip6-data 5437/udp # pmip6-data +spss 5443/tcp # Pearson HTTPS +spss 5443/udp # Pearson HTTPS +smbdirect 5445/tcp # Server Message Block over Remote Direct Memory Access +smbdirect 5445/sctp # Server Message Block over Remote Direct Memory Access +tiepie 5450/tcp # TiePie engineering data +tiepie-disc 5450/udp # TiePie engineering data (discovery) +surebox 5453/tcp # SureBox +surebox 5453/udp # SureBox +apc-5454 5454/tcp # APC 5454 +apc-5454 5454/udp # APC 5454 +apc-5455 5455/tcp # APC 5455 +apc-5455 5455/udp # APC 5455 +apc-5456 5456/tcp # APC 5456 +apc-5456 5456/udp # APC 5456 +silkmeter 5461/tcp # SILKMETER +silkmeter 5461/udp # SILKMETER +ttl-publisher 5462/tcp # TTL Publisher +ttl-publisher 5462/udp # TTL Publisher +ttlpriceproxy 5463/tcp # TTL Price Proxy +ttlpriceproxy 5463/udp # TTL Price Proxy +quailnet 5464/tcp # Quail Networks Object Broker +quailnet 5464/udp # Quail Networks Object Broker +netops-broker 5465/tcp # NETOPS-BROKER +netops-broker 5465/udp # NETOPS-BROKER +absolab-col 5470/tcp # The Apsolab company's data collection protocol +absolab-cols 5471/tcp # The Apsolab company's secure data collection protocol +absolab-tag 5472/tcp # The Apsolab company's dynamic tag protocol +absolab-tags 5473/tcp # The Apsolab company's secure dynamic tag protocol +absolab-rpc 5474/udp # The Apsolab company's status query protocol +absolab-data 5475/tcp # The Apsolab company's data retrieval protocol +fcp-addr-srvr1 5500/tcp # fcp-addr-srvr1 +fcp-addr-srvr1 5500/udp # fcp-addr-srvr1 +fcp-addr-srvr2 5501/tcp # fcp-addr-srvr2 +fcp-addr-srvr2 5501/udp # fcp-addr-srvr2 +fcp-srvr-inst1 5502/tcp # fcp-srvr-inst1 +fcp-srvr-inst1 5502/udp # fcp-srvr-inst1 +fcp-srvr-inst2 5503/tcp # fcp-srvr-inst2 +fcp-srvr-inst2 5503/udp # fcp-srvr-inst2 +fcp-cics-gw1 5504/tcp # fcp-cics-gw1 +fcp-cics-gw1 5504/udp # fcp-cics-gw1 +checkoutdb 5505/tcp # Checkout Database +checkoutdb 5505/udp # Checkout Database +amc 5506/tcp # Amcom Mobile Connect +amc 5506/udp # Amcom Mobile Connect +psl-management 5507/tcp # PowerSysLab Electrical +sgi-eventmond 5553/tcp # SGI Eventmond Port +sgi-eventmond 5553/udp # SGI Eventmond Port +sgi-esphttp 5554/tcp # SGI ESP HTTP +sgi-esphttp 5554/udp # SGI ESP HTTP +personal-agent 5555/tcp # Personal Agent +personal-agent 5555/udp # Personal Agent +freeciv 5556/tcp # Freeciv gameplay +freeciv 5556/udp # Freeciv gameplay +farenet 5557/tcp # Sandlab FARENET +hpe-dp-bura 5565/tcp # HPE Advanced BURA +westec-connect 5566/tcp # Westec Connect +dof-dps-mc-sec 5567/tcp # DOF protocol stack +dof-dps-mc-sec 5567/udp # DOF protocol stack +sdt 5568/tcp # Session Data Transport Multicast +sdt 5568/udp # Session Data Transport Multicast +rdmnet-ctrl 5569/tcp # Management (RDM) controller status notifications +rdmnet-device 5569/udp # PLASA E1.33, Remote Device Management (RDM) messages +sdmmp 5573/tcp # SAS Domain Management Messaging Protocol +sdmmp 5573/udp # SAS Domain Management Messaging Protocol +lsi-bobcat 5574/tcp # SAS IO Forwarding +ora-oap 5575/tcp # Oracle Access Protocol +fdtracks 5579/tcp # FleetDisplay Tracking Service +tmosms0 5580/tcp # T-Mobile SMS Protocol Message 0 +tmosms0 5580/udp # T-Mobile SMS Protocol Message 0 +tmosms1 5581/tcp # T-Mobile SMS Protocol Message 1 +tmosms1 5581/udp # T-Mobile SMS Protocol Message 1 +fac-restore 5582/tcp # T-Mobile SMS Protocol Message 3 +fac-restore 5582/udp # T-Mobile SMS Protocol Message 3 +tmo-icon-sync 5583/tcp # T-Mobile SMS Protocol Message 2 +tmo-icon-sync 5583/udp # T-Mobile SMS Protocol Message 2 +bis-web 5584/tcp # BeInSync-Web +bis-web 5584/udp # BeInSync-Web +bis-sync 5585/tcp # BeInSync-sync +bis-sync 5585/udp # BeInSync-sync +att-mt-sms 5586/tcp # mobile terminated SMS, not visible to client(ATT) +ininmessaging 5597/tcp # inin secure messaging +ininmessaging 5597/udp # inin secure messaging +mctfeed 5598/tcp # MCT Market Data Feed +mctfeed 5598/udp # MCT Market Data Feed +esinstall 5599/tcp # Enterprise Security Remote Install +esinstall 5599/udp # Enterprise Security Remote Install +esmmanager 5600/tcp # Enterprise Security Manager +esmmanager 5600/udp # Enterprise Security Manager +esmagent 5601/tcp # Enterprise Security Agent +esmagent 5601/udp # Enterprise Security Agent +a1-msc 5602/tcp # A1-MSC +a1-msc 5602/udp # A1-MSC +a1-bs 5603/tcp # A1-BS +a1-bs 5603/udp # A1-BS +a3-sdunode 5604/tcp # A3-SDUNode +a3-sdunode 5604/udp # A3-SDUNode +a4-sdunode 5605/tcp # A4-SDUNode +a4-sdunode 5605/udp # A4-SDUNode +efr 5618/tcp # Fiscal Registering Protocol +ninaf 5627/tcp # Node Initiated Network Association Forma +ninaf 5627/udp # Node Initiated Network Association Forma +htrust 5628/tcp # HTrust API +htrust 5628/udp # HTrust API +symantec-sfdb 5629/tcp # Symantec Storage Foundation for Database +symantec-sfdb 5629/udp # Symantec Storage Foundation for Database +precise-comm 5630/tcp # PreciseCommunication +precise-comm 5630/udp # PreciseCommunication +pcanywheredata 5631/tcp # pcANYWHEREdata +pcanywheredata 5631/udp # pcANYWHEREdata +pcanywherestat 5632/tcp # pcANYWHEREstat +pcanywherestat 5632/udp # pcANYWHEREstat +beorl 5633/tcp # BE Operations Request Listener +beorl 5633/udp # BE Operations Request Listener +xprtld 5634/tcp # SF Message Service +xprtld 5634/udp # SF Message Service +sfmsso 5635/tcp # SFM Authentication Subsystem +sfm-db-server 5636/tcp # SFMdb - SFM DB server +cssc 5637/tcp # Symantec CSSC +flcrs 5638/tcp # Symantec Fingerprint Lookup and Container Reference +ics 5639/tcp # Symantec Integrity Checking +vfmobile 5646/tcp # Ventureforth Mobile +nrpe 5666/tcp # Nagios Remote Plugin Executor +filemq 5670/tcp # ZeroMQ file +zre-disc 5670/udp # Local area discovery and msging over ZeroMQ +amqps 5671/tcp # amqp protocol over TLS/SSL +amqps 5671/udp # amqp protocol over TLS/SSL +amqp 5672/tcp # AMQP +amqp 5672/udp # AMQP +amqp 5672/sctp # AMQP +jms 5673/tcp # JACL Message Server +jms 5673/udp # JACL Message Server +hyperscsi-port 5674/tcp # HyperSCSI Port +hyperscsi-port 5674/udp # HyperSCSI Port +v5ua 5675/tcp # V5UA application port +v5ua 5675/udp # V5UA application port +v5ua 5675/sctp # V5UA application port +raadmin 5676/tcp # RA Administration +raadmin 5676/udp # RA Administration +questdb2-lnchr 5677/tcp # Quest Central DB2 Launchr +questdb2-lnchr 5677/udp # Quest Central DB2 Launchr +rrac 5678/tcp # Remote Replication Agent Connection +rrac 5678/udp # Remote Replication Agent Connection +dccm 5679/tcp # Direct Cable Connect Manager +dccm 5679/udp # Direct Cable Connect Manager +auriga-router 5680/udp # Auriga Router Service +ncxcp 5681/tcp # Net-coneX Control Protocol +ncxcp 5681/udp # Net-coneX Control Protocol +brightcore 5682/udp # BrightCore control & data transfer exchange +coap 5683/udp # Constrained Application Protocol +coaps 5684/udp # DTLS-secured CoAP +gog-multiplayer 5687/udp # GOG multiplayer game protocol +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp # GGZ Gaming Zone +qmvideo 5689/tcp # QM video network management protocol +qmvideo 5689/udp # QM video network management protocol +rbsystem 5693/tcp # Robert Bosch Data Transfer +kmip 5696/tcp # Key Management Interoperability Protocol +supportassist 5700/tcp # Dell SupportAssist data +proshareaudio 5713/tcp # proshare conf audio +proshareaudio 5713/udp # proshare conf audio +prosharevideo 5714/tcp # proshare conf video +prosharevideo 5714/udp # proshare conf video +prosharedata 5715/tcp # proshare conf data +prosharedata 5715/udp # proshare conf data +prosharerequest 5716/tcp # proshare conf request +prosharerequest 5716/udp # proshare conf request +prosharenotify 5717/tcp # proshare conf notify +prosharenotify 5717/udp # proshare conf notify +dpm 5718/tcp # DPM Communication Server +dpm 5718/udp # DPM Communication Server +dpm-agent 5719/tcp # DPM Agent Coordinator +dpm-agent 5719/udp # DPM Agent Coordinator +ms-licensing 5720/tcp # MS-Licensing +ms-licensing 5720/udp # MS-Licensing +dtpt 5721/tcp # Desktop Passthru Service +dtpt 5721/udp # Desktop Passthru Service +msdfsr 5722/tcp # Microsoft DFS Replication Service +msdfsr 5722/udp # Microsoft DFS Replication Service +omhs 5723/tcp # Operations Manager - Health Service +omhs 5723/udp # Operations Manager - Health Service +omsdk 5724/tcp # Operations Manager - SDK Service +omsdk 5724/udp # Operations Manager - SDK Service +ms-ilm 5725/tcp # Microsoft Identity Lifecycle Manager +ms-ilm-sts 5726/tcp # Microsoft Lifecycle Manager Secure Token Service +asgenf 5727/tcp # ASG Event Notification Framework +io-dist-data 5728/tcp # Dist. I/O Comm. Service Data and Control +io-dist-group 5728/udp # Dist. I/O Comm. Service Group Membership +openmail 5729/tcp # Openmail User Agent Layer +openmail 5729/udp # Openmail User Agent Layer +unieng 5730/tcp # Steltor's calendar access +unieng 5730/udp # Steltor's calendar access +ida-discover1 5741/tcp # IDA Discover Port 1 +ida-discover1 5741/udp # IDA Discover Port 1 +ida-discover2 5742/tcp # IDA Discover Port 2 +ida-discover2 5742/udp # IDA Discover Port 2 +watchdoc-pod 5743/tcp # Watchdoc NetPOD Protocol +watchdoc-pod 5743/udp # Watchdoc NetPOD Protocol +watchdoc 5744/tcp # Watchdoc Server +watchdoc 5744/udp # Watchdoc Server +fcopy-server 5745/tcp # fcopy-server +fcopy-server 5745/udp # fcopy-server +fcopys-server 5746/tcp # fcopys-server +fcopys-server 5746/udp # fcopys-server +tunatic 5747/tcp # Wildbits Tunatic +tunatic 5747/udp # Wildbits Tunatic +tunalyzer 5748/tcp # Wildbits Tunalyzer +tunalyzer 5748/udp # Wildbits Tunalyzer +rscd 5750/tcp # Bladelogic Agent Service +rscd 5750/udp # Bladelogic Agent Service +openmailg 5755/tcp # OpenMail Desk Gateway server +openmailg 5755/udp # OpenMail Desk Gateway server +x500ms 5757/tcp # OpenMail X.500 Directory Server +x500ms 5757/udp # OpenMail X.500 Directory Server +openmailns 5766/tcp # OpenMail NewMail Server +openmailns 5766/udp # OpenMail NewMail Server +s-openmail 5767/tcp # OpenMail Suer Agent Layer (Secure) +s-openmail 5767/udp # OpenMail Suer Agent Layer (Secure) +openmailpxy 5768/tcp # OpenMail CMTS Server +openmailpxy 5768/udp # OpenMail CMTS Server +spramsca 5769/tcp # x509solutions Internal CA +spramsca 5769/udp # x509solutions Internal CA +spramsd 5770/tcp # x509solutions Secure Data +spramsd 5770/udp # x509solutions Secure Data +netagent 5771/tcp # NetAgent +netagent 5771/udp # NetAgent +dali-port 5777/tcp # DALI Port +dali-port 5777/udp # DALI Port +vts-rpc 5780/tcp # Visual Tag System RPC +3par-evts 5781/tcp # 3PAR Event Reporting Service +3par-evts 5781/udp # 3PAR Event Reporting Service +3par-mgmt 5782/tcp # 3PAR Management Service +3par-mgmt 5782/udp # 3PAR Management Service +3par-mgmt-ssl 5783/tcp # 3PAR Management Service with SSL +3par-mgmt-ssl 5783/udp # 3PAR Management Service with SSL +ibar 5784/udp # Cisco Interbox Application Redundancy +3par-rcopy 5785/tcp # 3PAR Inform Remote Copy +3par-rcopy 5785/udp # 3PAR Inform Remote Copy +cisco-redu 5786/udp # redundancy notification +waascluster 5787/udp # Cisco WAAS Cluster Protocol +xtreamx 5793/tcp # XtreamX Supervised Peer message +xtreamx 5793/udp # XtreamX Supervised Peer message +spdp 5794/udp # Simple Peered Discovery Protocol +icmpd 5813/tcp # ICMPD +icmpd 5813/udp # ICMPD +spt-automation 5814/tcp # Support Automation +spt-automation 5814/udp # Support Automation +shiprush-d-ch 5841/tcp # Z-firm ShipRush interface for web access and bidirectional data +reversion 5842/tcp # Reversion Backup/Restore +wherehoo 5859/tcp # WHEREHOO +wherehoo 5859/udp # WHEREHOO +ppsuitemsg 5863/tcp # PlanetPress Suite Messeng +ppsuitemsg 5863/udp # PlanetPress Suite Messeng +diameters 5868/tcp # Diameter over TLS/TCP +diameters 5868/sctp # Diameter over DTLS/SCTP +jute 5883/tcp # Javascript Unit Test Environment +rfb 5900/tcp # Remote Framebuffer +rfb 5900/udp # Remote Framebuffer +cm 5910/tcp # Context Management +cm 5910/udp # Context Management +cm 5910/sctp # Context Management +cpdlc 5911/tcp # Controller Pilot Data Link Communication +cpdlc 5911/udp # Controller Pilot Data Link Communication +cpdlc 5911/sctp # Controller Pilot Data Link Communication +fis 5912/tcp # Flight Information Services +fis 5912/udp # Flight Information Services +fis 5912/sctp # Flight Information Services +ads-c 5913/tcp # Automatic Dependent Surveillance +ads-c 5913/udp # Automatic Dependent Surveillance +ads-c 5913/sctp # Automatic Dependent Surveillance +indy 5963/tcp # Indy Application Server +indy 5963/udp # Indy Application Server +mppolicy-v5 5968/tcp # mppolicy-v5 +mppolicy-v5 5968/udp # mppolicy-v5 +mppolicy-mgr 5969/tcp # mppolicy-mgr +mppolicy-mgr 5969/udp # mppolicy-mgr +couchdb 5984/tcp # CouchDB +couchdb 5984/udp # CouchDB +wsman 5985/tcp # WBEM WS-Management HTTP +wsman 5985/udp # WBEM WS-Management HTTP +wsmans 5986/tcp # WBEM WS-Management HTTP over TLS/SSL +wsmans 5986/udp # WBEM WS-Management HTTP over TLS/SSL +wbem-rmi 5987/tcp # WBEM RMI +wbem-rmi 5987/udp # WBEM RMI +wbem-http 5988/tcp # WBEM CIM-XML (HTTP) +wbem-http 5988/udp # WBEM CIM-XML (HTTP) +wbem-https 5989/tcp # WBEM CIM-XML (HTTPS) +wbem-https 5989/udp # WBEM CIM-XML (HTTPS) +wbem-exp-https 5990/tcp # WBEM Export HTTPS +wbem-exp-https 5990/udp # WBEM Export HTTPS +nuxsl 5991/tcp # NUXSL +nuxsl 5991/udp # NUXSL +consul-insight 5992/tcp # Consul InSight Security +consul-insight 5992/udp # Consul InSight Security +cim-rs 5993/tcp # DMTF WBEM CIM REST +ndl-ahp-svc 6064/tcp # NDL-AHP-SVC +ndl-ahp-svc 6064/udp # NDL-AHP-SVC +winpharaoh 6065/tcp # WinPharaoh +winpharaoh 6065/udp # WinPharaoh +ewctsp 6066/tcp # EWCTSP +ewctsp 6066/udp # EWCTSP +gsmp-ancp 6068/tcp # GSMP/ANCP +trip 6069/tcp # TRIP +trip 6069/udp # TRIP +messageasap 6070/tcp # Messageasap +messageasap 6070/udp # Messageasap +ssdtp 6071/tcp # SSDTP +ssdtp 6071/udp # SSDTP +diagnose-proc 6072/tcp # DIAGNOSE-PROC +diagnose-proc 6072/udp # DIAGNOSE-PROC +directplay8 6073/tcp # DirectPlay8 +directplay8 6073/udp # DirectPlay8 +max 6074/tcp # Microsoft Max +max 6074/udp # Microsoft Max +dpm-acm 6075/tcp # Microsoft DPM Access Control Manager +msft-dpm-cert 6076/tcp # Microsoft DPM WCF Certificates +iconstructsrv 6077/tcp # iConstruct Server +gue 6080/udp # Generic UDP Encapsulation +geneve 6081/udp # Generic Network Virtualization Encapsulation +p25cai 6082/udp # APCO Project 25 Common Air Interface +miami-bcast 6083/udp # telecomsoftware miami broadcast +reload-config 6084/tcp # Peer to Peer Infrastructure Protocol +konspire2b 6085/tcp # konspire2b p2p network +konspire2b 6085/udp # konspire2b p2p network +pdtp 6086/tcp # PDTP P2P +pdtp 6086/udp # PDTP P2P +ldss 6087/tcp # Local Download Sharing Service +ldss 6087/udp # Local Download Sharing Service +doglms 6088/tcp # SuperDog License Manager +doglms-notify 6088/udp # SuperDog License Manager +raxa-mgmt 6099/tcp # RAXA Management +synchronet-db 6100/tcp # SynchroNet-db +synchronet-db 6100/udp # SynchroNet-db +synchronet-rtc 6101/tcp # SynchroNet-rtc +synchronet-rtc 6101/udp # SynchroNet-rtc +synchronet-upd 6102/tcp # SynchroNet-upd +synchronet-upd 6102/udp # SynchroNet-upd +rets 6103/tcp # RETS +rets 6103/udp # RETS +dbdb 6104/tcp # DBDB +dbdb 6104/udp # DBDB +primaserver 6105/tcp # Prima Server +primaserver 6105/udp # Prima Server +mpsserver 6106/tcp # MPS Server +mpsserver 6106/udp # MPS Server +etc-control 6107/tcp # ETC Control +etc-control 6107/udp # ETC Control +sercomm-scadmin 6108/tcp # Sercomm-SCAdmin +sercomm-scadmin 6108/udp # Sercomm-SCAdmin +globecast-id 6109/tcp # GLOBECAST-ID +globecast-id 6109/udp # GLOBECAST-ID +softcm 6110/tcp # HP SoftBench CM +softcm 6110/udp # HP SoftBench CM +spc 6111/tcp # HP SoftBench Sub-Process Control +spc 6111/udp # HP SoftBench Sub-Process Control +dtspcd 6112/tcp # Desk-Top Sub-Process Control Daemon +dtspcd 6112/udp # Desk-Top Sub-Process Control Daemon +dayliteserver 6113/tcp # Daylite Server +wrspice 6114/tcp # WRspice IPC Service +xic 6115/tcp # Xic IPC Service +xtlserv 6116/tcp # XicTools License Manager Service +daylitetouch 6117/tcp # Daylite Touch Sync +tipc 6118/udp # Transparent Inter Process Communication +spdy 6121/tcp # SPDY for a faster web +bex-webadmin 6122/tcp # Backup Express Web Server +bex-webadmin 6122/udp # Backup Express Web Server +backup-express 6123/tcp # Backup Express +backup-express 6123/udp # Backup Express +pnbs 6124/tcp # Phlexible Network Backup Service +pnbs 6124/udp # Phlexible Network Backup Service +damewaremobgtwy 6130/tcp # The DameWare Mobile Gateway Service +nbt-wol 6133/tcp # New Boundary Tech WOL +nbt-wol 6133/udp # New Boundary Tech WOL +pulsonixnls 6140/tcp # Pulsonix Network License Service +pulsonixnls 6140/udp # Pulsonix Network License Service +meta-corp 6141/tcp # Meta Corporation License Manager +meta-corp 6141/udp # Meta Corporation License Manager +aspentec-lm 6142/tcp # Aspen Technology License Manager +aspentec-lm 6142/udp # Aspen Technology License Manager +watershed-lm 6143/tcp # Watershed License Manager +watershed-lm 6143/udp # Watershed License Manager +statsci1-lm 6144/tcp # StatSci License Manager - 1 +statsci1-lm 6144/udp # StatSci License Manager - 1 +statsci2-lm 6145/tcp # StatSci License Manager - 2 +statsci2-lm 6145/udp # StatSci License Manager - 2 +lonewolf-lm 6146/tcp # Lone Wolf Systems License Manager +lonewolf-lm 6146/udp # Lone Wolf Systems License Manager +montage-lm 6147/tcp # Montage License Manager +montage-lm 6147/udp # Montage License Manager +tal-pod 6149/tcp # tal-pod +tal-pod 6149/udp # tal-pod +efb-aci 6159/tcp # EFB Application Control Interface +ecmp 6160/tcp # Emerson Extensible Control and Management Protocol +ecmp-data 6160/udp # Emerson Extensible Control and Management Protocol Data +patrol-ism 6161/tcp # PATROL Internet Srv Mgr +patrol-ism 6161/udp # PATROL Internet Srv Mgr +patrol-coll 6162/tcp # PATROL Collector +patrol-coll 6162/udp # PATROL Collector +pscribe 6163/tcp # Precision Scribe Cnx Port +pscribe 6163/udp # Precision Scribe Cnx Port +lm-x 6200/tcp # LM-X License Manager by X-Formation +lm-x 6200/udp # LM-X License Manager by X-Formation +thermo-calc 6201/udp # Thermo-Calc_Software +qmtps 6209/tcp # QMTP over TLS +qmtps 6209/udp # QMTP over TLS +radmind 6222/tcp # Radmind Access Protocol +radmind 6222/udp # Radmind Access Protocol +jeol-nsdtp-1 6241/tcp # JEOL Network Services Data Transport Protocol 1 +jeol-nsddp-1 6241/udp # JEOL Network Services Dynamic Discovery Protocol 1 +jeol-nsdtp-2 6242/tcp # JEOL Network Services Data Transport Protocol 2 +jeol-nsddp-2 6242/udp # JEOL Network Services Dynamic Discovery Protocol 2 +jeol-nsdtp-3 6243/tcp # JEOL Network Services Data Transport Protocol 3 +jeol-nsddp-3 6243/udp # JEOL Network Services Dynamic Discovery Protocol 3 +jeol-nsdtp-4 6244/tcp # JEOL Network Services Data Transport Protocol 4 +jeol-nsddp-4 6244/udp # JEOL Network Services Dynamic Discovery Protocol 4 +tl1-raw-ssl 6251/tcp # TL1 Raw Over SSL/TLS +tl1-raw-ssl 6251/udp # TL1 Raw Over SSL/TLS +tl1-ssh 6252/tcp # TL1 over SSH +tl1-ssh 6252/udp # TL1 over SSH +crip 6253/tcp # CRIP +crip 6253/udp # CRIP +gld 6267/tcp # GridLAB-D User Interface +grid 6268/tcp # Grid Authentication +grid 6268/udp # Grid Authentication +grid-alt 6269/tcp # Grid Authentication Alt +grid-alt 6269/udp # Grid Authentication Alt +bmc-grx 6300/tcp # BMC GRX +bmc-grx 6300/udp # BMC GRX +bmc_ctd_ldap 6301/tcp bmc-ctd-ldap # BMC CONTROL-D LDAP SERVER +bmc_ctd_ldap 6301/udp bmc-ctd-ldap # BMC CONTROL-D LDAP SERVER +ufmp 6306/tcp # Unified Fabric Management Protocol +ufmp 6306/udp # Unified Fabric Management Protocol +scup 6315/tcp # Sensor Control Unit Protocol +scup-disc 6315/udp # Sensor Control Unit Protocol Discovery Protocol +abb-escp 6316/tcp # Ethernet Sensor Communications Protocol +abb-escp 6316/udp # Ethernet Sensor Communications Protocol +nav-data-cmd 6317/tcp # Navtech Radar Sensor Data command +nav-data 6317/udp # Navtech Radar Sensor Data +repsvc 6320/tcp # Double-Take Replication Service +repsvc 6320/udp # Double-Take Replication Service +emp-server1 6321/tcp # Empress Software Connectivity Server 1 +emp-server1 6321/udp # Empress Software Connectivity Server 1 +emp-server2 6322/tcp # Empress Software Connectivity Server 2 +emp-server2 6322/udp # Empress Software Connectivity Server 2 +hrd-ncs 6324/tcp # HR Device Network +hrd-ns-disc 6324/udp # HR Device Network service +dt-mgmtsvc 6325/tcp # Double-Take Management Service +dt-vra 6326/tcp # Double-Take Virtual Recovery +sflow 6343/tcp # sFlow traffic monitoring +sflow 6343/udp # sFlow traffic monitoring +streletz 6344/tcp # Argus-Spectr security and fire-prevention systems service +gnutella-svc 6346/tcp # gnutella-svc +gnutella-svc 6346/udp # gnutella-svc +gnutella-rtr 6347/tcp # gnutella-rtr +gnutella-rtr 6347/udp # gnutella-rtr +adap 6350/tcp # App Discovery and Access Protocol +adap 6350/udp # App Discovery and Access Protocol +pmcs 6355/tcp # PMCS applications +pmcs 6355/udp # PMCS applications +metaedit-mu 6360/tcp # MetaEdit+ Multi-User +metaedit-mu 6360/udp # MetaEdit+ Multi-User +ndn 6363/udp # Named Data Networking +metaedit-se 6370/tcp # MetaEdit+ Server Administration +metaedit-se 6370/udp # MetaEdit+ Server Administration +redis 6379/tcp # An advanced key-value cache and store +metatude-mds 6382/tcp # Metatude Dialogue Server +metatude-mds 6382/udp # Metatude Dialogue Server +clariion-evr01 6389/tcp # clariion-evr01 +clariion-evr01 6389/udp # clariion-evr01 +metaedit-ws 6390/tcp # MetaEdit+ WebService API +metaedit-ws 6390/udp # MetaEdit+ WebService API +boe-cms 6400/tcp # Business Objects CMS contact port +boe-cms 6400/udp # Business Objects CMS contact port +boe-was 6401/tcp # boe-was +boe-was 6401/udp # boe-was +boe-eventsrv 6402/tcp # boe-eventsrv +boe-eventsrv 6402/udp # boe-eventsrv +boe-cachesvr 6403/tcp # boe-cachesvr +boe-cachesvr 6403/udp # boe-cachesvr +boe-filesvr 6404/tcp # Business Objects Enterprise internal server +boe-filesvr 6404/udp # Business Objects Enterprise internal server +boe-pagesvr 6405/tcp # Business Objects Enterprise internal server +boe-pagesvr 6405/udp # Business Objects Enterprise internal server +boe-processsvr 6406/tcp # Business Objects Enterprise internal server +boe-processsvr 6406/udp # Business Objects Enterprise internal server +boe-resssvr1 6407/tcp # Business Objects Enterprise internal server +boe-resssvr1 6407/udp # Business Objects Enterprise internal server +boe-resssvr2 6408/tcp # Business Objects Enterprise internal server +boe-resssvr2 6408/udp # Business Objects Enterprise internal server +boe-resssvr3 6409/tcp # Business Objects Enterprise internal server +boe-resssvr3 6409/udp # Business Objects Enterprise internal server +boe-resssvr4 6410/tcp # Business Objects Enterprise internal server +boe-resssvr4 6410/udp # Business Objects Enterprise internal server +faxcomservice 6417/tcp # Faxcom Message Service +faxcomservice 6417/udp # Faxcom Message Service +syserverremote 6418/tcp # SYserver remote commands +svdrp 6419/tcp # Simple VDR Protocol +svdrp-disc 6419/udp # Simple VDR Protocol Discovery +nim-vdrshell 6420/tcp # NIM_VDRShell +nim-vdrshell 6420/udp # NIM_VDRShell +nim-wan 6421/tcp # NIM_WAN +nim-wan 6421/udp # NIM_WAN +pgbouncer 6432/tcp # PgBouncer +tarp 6442/tcp # Transitory Application Request Protocol +sun-sr-https 6443/tcp # Service Registry Default HTTPS Domain +sun-sr-https 6443/udp # Service Registry Default HTTPS Domain +sge_qmaster 6444/tcp sge-qmaster # Grid Engine Qmaster Service +sge_qmaster 6444/udp sge-qmaster # Grid Engine Qmaster Service +sge_execd 6445/tcp sge-execd # Grid Engine Execution Service +sge_execd 6445/udp sge-execd # Grid Engine Execution Service +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp # MySQL Proxy +skip-cert-recv 6455/tcp # SKIP Certificate Receive +skip-cert-recv 6455/udp # SKIP Certificate Receive +skip-cert-send 6456/tcp # SKIP Certificate Send +skip-cert-send 6456/udp # SKIP Certificate Send +lvision-lm 6471/tcp # LVision License Manager +lvision-lm 6471/udp # LVision License Manager +sun-sr-http 6480/tcp # Service Registry Default HTTP Domain +sun-sr-http 6480/udp # Service Registry Default HTTP Domain +servicetags 6481/tcp # Service Tags +servicetags 6481/udp # Service Tags +ldoms-mgmt 6482/tcp # Logical Domains Management Interface +ldoms-mgmt 6482/udp # Logical Domains Management Interface +SunVTS-RMI 6483/tcp # SunVTS RMI +SunVTS-RMI 6483/udp # SunVTS RMI +sun-sr-jms 6484/tcp # Service Registry Default JMS Domain +sun-sr-jms 6484/udp # Service Registry Default JMS Domain +sun-sr-iiop 6485/tcp # Service Registry Default IIOP Domain +sun-sr-iiop 6485/udp # Service Registry Default IIOP Domain +sun-sr-iiops 6486/tcp # Service Registry Default IIOPS Domain +sun-sr-iiops 6486/udp # Service Registry Default IIOPS Domain +sun-sr-iiop-aut 6487/tcp # Service Registry Default IIOPAuth Domain +sun-sr-iiop-aut 6487/udp # Service Registry Default IIOPAuth Domain +sun-sr-jmx 6488/tcp # Service Registry Default JMX Domain +sun-sr-jmx 6488/udp # Service Registry Default JMX Domain +sun-sr-admin 6489/tcp # Service Registry Default Admin Domain +sun-sr-admin 6489/udp # Service Registry Default Admin Domain +boks 6500/tcp # BoKS Master +boks 6500/udp # BoKS Master +boks_servc 6501/tcp boks-servc # BoKS Servc +boks_servc 6501/udp boks-servc # BoKS Servc +boks_servm 6502/tcp boks-servm # BoKS Servm +boks_servm 6502/udp boks-servm # BoKS Servm +boks_clntd 6503/tcp boks-clntd # BoKS Clntd +boks_clntd 6503/udp boks-clntd # BoKS Clntd +badm_priv 6505/tcp badm-priv # BoKS Admin Private Port +badm_priv 6505/udp badm-priv # BoKS Admin Private Port +badm_pub 6506/tcp badm-pub # BoKS Admin Public Port +badm_pub 6506/udp badm-pub # BoKS Admin Public Port +bdir_priv 6507/tcp bdir-priv # BoKS Dir Server, Private Port +bdir_priv 6507/udp bdir-priv # BoKS Dir Server, Private Port +bdir_pub 6508/tcp bdir-pub # BoKS Dir Server, Public Port +bdir_pub 6508/udp bdir-pub # BoKS Dir Server, Public Port +mgcs-mfp-port 6509/tcp # MGCS-MFP Port +mgcs-mfp-port 6509/udp # MGCS-MFP Port +mcer-port 6510/tcp # MCER Port +mcer-port 6510/udp # MCER Port +dccp-udp 6511/udp # Protocol Encapsulation for NAT Traversal +netconf-tls 6513/tcp # NETCONF over TLS +syslog-tls 6514/tcp # Syslog over TLS +syslog-tls 6514/udp # Syslog over TLS +syslog-tls 6514/dccp # Syslog over TLS +elipse-rec 6515/tcp # Elipse RPC Protocol +elipse-rec 6515/udp # Elipse RPC Protocol +lds-distrib 6543/tcp # lds_distrib +lds-distrib 6543/udp # lds_distrib +lds-dump 6544/tcp # LDS Dump Service +lds-dump 6544/udp # LDS Dump Service +apc-6547 6547/tcp # APC 6547 +apc-6547 6547/udp # APC 6547 +apc-6548 6548/tcp # APC 6548 +apc-6548 6548/udp # APC 6548 +apc-6549 6549/tcp # APC 6549 +apc-6549 6549/udp # APC 6549 +fg-sysupdate 6550/tcp # fg-sysupdate +fg-sysupdate 6550/udp # fg-sysupdate +sum 6551/tcp # Software Update Manager +sum 6551/udp # Software Update Manager +xdsxdm 6558/tcp # +xdsxdm 6558/udp # +sane-port 6566/tcp # SANE Control Port +sane-port 6566/udp # SANE Control Port +canit_store 6568/tcp canit-store # CanIt Storage Manager +rp-reputation 6568/udp # Roaring Penguin IP Address Reputation Collection +affiliate 6579/tcp # Affiliate +affiliate 6579/udp # Affiliate +parsec-master 6580/tcp # Parsec Masterserver +parsec-master 6580/udp # Parsec Masterserver +parsec-peer 6581/tcp # Parsec Peer-to-Peer +parsec-peer 6581/udp # Parsec Peer-to-Peer +parsec-game 6582/tcp # Parsec Gameserver +parsec-game 6582/udp # Parsec Gameserver +joaJewelSuite 6583/tcp # JOA Jewel Suite +joaJewelSuite 6583/udp # JOA Jewel Suite +mshvlm 6600/tcp # Microsoft Hyper-V Live Migration +mstmg-sstp 6601/tcp # Microsoft Threat Management Gateway SSTP +wsscomfrmwk 6602/tcp # Windows WSS Communication Framework +odette-ftps 6619/tcp # ODETTE-FTP over TLS/SSL +odette-ftps 6619/udp # ODETTE-FTP over TLS/SSL +kftp-data 6620/tcp # Kerberos V5 FTP Data +kftp-data 6620/udp # Kerberos V5 FTP Data +kftp 6621/tcp # Kerberos V5 FTP Control +kftp 6621/udp # Kerberos V5 FTP Control +mcftp 6622/tcp # Multicast FTP +mcftp 6622/udp # Multicast FTP +ktelnet 6623/tcp # Kerberos V5 Telnet +ktelnet 6623/udp # Kerberos V5 Telnet +datascaler-db 6624/tcp # DataScaler database +datascaler-ctl 6625/tcp # DataScaler control +wago-service 6626/tcp # WAGO Service and Update +wago-service 6626/udp # WAGO Service and Update +nexgen 6627/tcp # Allied Electronics NeXGen +nexgen 6627/udp # Allied Electronics NeXGen +afesc-mc 6628/tcp # AFE Stock Channel M/C +afesc-mc 6628/udp # AFE Stock Channel M/C +mxodbc-connect 6632/tcp # eGenix mxODBC Connect +cisco-vpath-tun 6633/udp # Cisco vPath Services Overlay +mpls-pm 6634/udp # MPLS Performance Measurement out-of-band response +mpls-udp 6635/udp # Encapsulate MPLS packets in UDP tunnels +mpls-udp-dtls 6636/udp # Encapsulate MPLS packets in UDP tunnels with DTLS +ovsdb 6640/tcp # Open vSwitch Database +openflow 6653/tcp # OpenFlow +openflow 6653/udp # OpenFlow +pcs-sf-ui-man 6655/tcp # PC SOFT - Software factory UI/manager +emgmsg 6656/tcp # Emergency Message Control Service +palcom-disc 6657/udp # PalCom Discovery +ircu 6665/tcp # IRCU +ircu 6665/udp # IRCU +ircu-2 6666/tcp ircu2 # IRCU +ircu-2 6666/udp ircu2 # IRCU +ircu-3 6667/tcp ircd ircu3 # IRCU +ircu-3 6667/udp ircd ircu3 # IRCU +ircu-4 6668/tcp ircu4 # IRCU +ircu-4 6668/udp ircu4 # IRCU +ircu-5 6669/tcp ircu5 # IRCU +ircu-5 6669/udp ircu5 # IRCU +vocaltec-gold 6670/tcp # Vocaltec Global Online Directory +vocaltec-gold 6670/udp # Vocaltec Global Online Directory +p4p-portal 6671/tcp # P4P Portal Service +p4p-portal 6671/udp # P4P Portal Service +vision_server 6672/tcp vision-server # vision_server +vision_server 6672/udp vision-server # vision_server +vision_elmd 6673/tcp vision-elmd # vision_elmd +vision_elmd 6673/udp vision-elmd # vision_elmd +vfbp 6678/tcp # Viscount Freedom Bridge Protocol +vfbp-disc 6678/udp # Viscount Freedom Bridge Discovery +osaut 6679/tcp # Osorno Automation +osaut 6679/udp # Osorno Automation +clever-ctrace 6687/tcp # CleverView for cTrace Message Service +clever-tcpip 6688/tcp # CleverView for TCP/IP Message Service +tsa 6689/tcp # Tofino Security Appliance +tsa 6689/udp # Tofino Security Appliance +cleverdetect 6690/tcp # CLEVERDetect Message Service +babel 6696/udp # Babel Routing Protocol +ircs-u 6697/tcp # Internet Relay Chat via TLS/SSL +kti-icad-srvr 6701/tcp # KTI/ICAD Nameserver +kti-icad-srvr 6701/udp # KTI/ICAD Nameserver +e-design-net 6702/tcp # e-Design network +e-design-net 6702/udp # e-Design network +e-design-web 6703/tcp # e-Design web +e-design-web 6703/udp # e-Design web +frc-hp 6704/sctp # ForCES HP (High Priority) channel +frc-mp 6705/sctp # ForCES MP (Medium Priority) channel +frc-lp 6706/sctp # ForCES LP (Low priority) channel +ibprotocol 6714/tcp # Internet Backplane Protocol +ibprotocol 6714/udp # Internet Backplane Protocol +fibotrader-com 6715/tcp # Fibotrader Communications +fibotrader-com 6715/udp # Fibotrader Communications +princity-agent 6716/tcp # Princity Agent +bmc-perf-agent 6767/tcp # BMC PERFORM AGENT +bmc-perf-agent 6767/udp # BMC PERFORM AGENT +bmc-perf-mgrd 6768/tcp # BMC PERFORM MGRD +bmc-perf-mgrd 6768/udp # BMC PERFORM MGRD +adi-gxp-srvprt 6769/tcp # ADInstruments GxP Server +adi-gxp-srvprt 6769/udp # ADInstruments GxP Server +plysrv-http 6770/tcp # PolyServe http +plysrv-http 6770/udp # PolyServe http +plysrv-https 6771/tcp # PolyServe https +plysrv-https 6771/udp # PolyServe https +ntz-tracker 6777/tcp # netTsunami Tracker +ntz-p2p-storage 6778/tcp # netTsunami p2p storage +bfd-lag 6784/udp # Bidirectional Forwarding Detection on LAG +dgpf-exchg 6785/tcp # DGPF Individual Exchange +dgpf-exchg 6785/udp # DGPF Individual Exchange +smc-jmx 6786/tcp # Sun Java Web Console JMX +smc-jmx 6786/udp # Sun Java Web Console JMX +smc-admin 6787/tcp # Sun Web Console Admin +smc-admin 6787/udp # Sun Web Console Admin +smc-http 6788/tcp # SMC-HTTP +smc-http 6788/udp # SMC-HTTP +smc-https 6789/tcp # SMC-HTTPS +smc-https 6789/udp # SMC-HTTPS +hnmp 6790/tcp # HNMP +hnmp 6790/udp # HNMP +hnm 6791/tcp # Halcyon Network Manager +hnm 6791/udp # Halcyon Network Manager +acnet 6801/tcp # ACNET Control System Protocol +acnet 6801/udp # ACNET Control System Protocol +pentbox-sim 6817/tcp # PenTBox Secure IM Protocol +ambit-lm 6831/tcp # ambit-lm +ambit-lm 6831/udp # ambit-lm +netmo-default 6841/tcp # Netmo Default +netmo-default 6841/udp # Netmo Default +netmo-http 6842/tcp # Netmo HTTP +netmo-http 6842/udp # Netmo HTTP +iccrushmore 6850/tcp # ICCRUSHMORE +iccrushmore 6850/udp # ICCRUSHMORE +acctopus-cc 6868/tcp # Acctopus Command Channel +acctopus-st 6868/udp # Acctopus Status +muse 6888/tcp # MUSE +muse 6888/udp # MUSE +jetstream 6901/tcp # Novell Jetstream messaging protocol +ethoscan 6935/tcp # EthoScan Service +ethoscan 6935/udp # EthoScan Service +xsmsvc 6936/tcp # XenSource Management Service +xsmsvc 6936/udp # XenSource Management Service +bioserver 6946/tcp # Biometrics Server +bioserver 6946/udp # Biometrics Server +otlp 6951/tcp # OTLP +otlp 6951/udp # OTLP +jmact3 6961/tcp # JMACT3 +jmact3 6961/udp # JMACT3 +jmevt2 6962/tcp # jmevt2 +jmevt2 6962/udp # jmevt2 +swismgr1 6963/tcp # swismgr1 +swismgr1 6963/udp # swismgr1 +swismgr2 6964/tcp # swismgr2 +swismgr2 6964/udp # swismgr2 +swistrap 6965/tcp # swistrap +swistrap 6965/udp # swistrap +swispol 6966/tcp # swispol +swispol 6966/udp # swispol +acmsoda 6969/tcp # acmsoda +acmsoda 6969/udp # acmsoda +conductor 6970/tcp # Conductor test coordination +conductor-mpx 6970/sctp # conductor for multiplex +MobilitySrv 6997/tcp # Mobility XE Protocol +MobilitySrv 6997/udp # Mobility XE Protocol +iatp-highpri 6998/tcp # IATP-highPri +iatp-highpri 6998/udp # IATP-highPri +iatp-normalpri 6999/tcp # IATP-normalPri +iatp-normalpri 6999/udp # IATP-normalPri +ups-onlinet 7010/tcp # onlinet uninterruptable power supplies +ups-onlinet 7010/udp # onlinet uninterruptable power supplies +talon-disc 7011/tcp # Talon Discovery Port +talon-disc 7011/udp # Talon Discovery Port +talon-engine 7012/tcp # Talon Engine +talon-engine 7012/udp # Talon Engine +microtalon-dis 7013/tcp # Microtalon Discovery +microtalon-dis 7013/udp # Microtalon Discovery +microtalon-com 7014/tcp # Microtalon Communications +microtalon-com 7014/udp # Microtalon Communications +talon-webserver 7015/tcp # Talon Webserver +talon-webserver 7015/udp # Talon Webserver +fisa-svc 7018/tcp # FISA Service +doceri-ctl 7019/tcp # doceri drawing service control +doceri-view 7019/udp # doceri drawing service screen view +dpserve 7020/tcp # DP Serve +dpserve 7020/udp # DP Serve +dpserveadmin 7021/tcp # DP Serve Admin +dpserveadmin 7021/udp # DP Serve Admin +ctdp 7022/tcp # CT Discovery Protocol +ctdp 7022/udp # CT Discovery Protocol +ct2nmcs 7023/tcp # Comtech T2 NMCS +ct2nmcs 7023/udp # Comtech T2 NMCS +vmsvc 7024/tcp # Vormetric service +vmsvc 7024/udp # Vormetric service +vmsvc-2 7025/tcp # Vormetric Service II +vmsvc-2 7025/udp # Vormetric Service II +op-probe 7030/tcp # ObjectPlanet probe +op-probe 7030/udp # ObjectPlanet probe +iposplanet 7031/tcp # IPOSPLANET retailing multi devices protocol +quest-disc 7040/udp # Quest application level network service discovery +arcp 7070/tcp # ARCP +arcp 7070/udp # ARCP +iwg1 7071/tcp # IWGADTS Aircraft Housekeeping Message +iwg1 7071/udp # IWGADTS Aircraft Housekeeping Message +martalk 7073/tcp # MarTalk protocol +empowerid 7080/tcp # EmpowerID Communication +empowerid 7080/udp # EmpowerID Communication +zixi-transport 7088/udp # Zixi live video transport +jdp-disc 7095/udp # Java Discovery Protocol +lazy-ptop 7099/tcp # lazy-ptop +lazy-ptop 7099/udp # lazy-ptop +font-service 7100/udp # X Font Service +elcn 7101/tcp # Embedded Light Control Network +elcn 7101/udp # Embedded Light Control Network +aes-x170 7107/udp # AES-X170 +rothaga 7117/tcp # Encrypted chat and file transfer service +virprot-lm 7121/tcp # Virtual Prototypes License Manager +virprot-lm 7121/udp # Virtual Prototypes License Manager +scenidm 7128/tcp # intelligent data manager +scenidm 7128/udp # intelligent data manager +scenccs 7129/tcp # Catalog Content Search +scenccs 7129/udp # Catalog Content Search +cabsm-comm 7161/tcp # CA BSM Comm +cabsm-comm 7161/udp # CA BSM Comm +caistoragemgr 7162/tcp # CA Storage Manager +caistoragemgr 7162/udp # CA Storage Manager +cacsambroker 7163/tcp # CA Connection Broker +cacsambroker 7163/udp # CA Connection Broker +fsr 7164/tcp # File System Repository Agent +fsr 7164/udp # File System Repository Agent +doc-server 7165/tcp # Document WCF Server +doc-server 7165/udp # Document WCF Server +aruba-server 7166/tcp # Aruba eDiscovery Server +aruba-server 7166/udp # Aruba eDiscovery Server +casrmagent 7167/tcp # CA SRM Agent +cnckadserver 7168/tcp # cncKadServer DB & Inventory Services +ccag-pib 7169/tcp # Consequor Consulting Process Integration Bridge +ccag-pib 7169/udp # Consequor Consulting Process Integration Bridge +nsrp 7170/tcp # Adaptive Name/Service Resolution +nsrp 7170/udp # Adaptive Name/Service Resolution +drm-production 7171/tcp # Discovery and Retention Mgt Production +drm-production 7171/udp # Discovery and Retention Mgt Production +metalbend 7172/tcp # MetalBend programmable interface +zsecure 7173/tcp # zSecure Server +clutild 7174/tcp # Clutild +clutild 7174/udp # Clutild +janus-disc 7181/udp # Janus Guidewire Enterprise Discovery Service Bus +fodms 7200/tcp # FODMS FLIP +fodms 7200/udp # FODMS FLIP +dlip 7201/tcp # DLIP +dlip 7201/udp # DLIP +PS-Server 7215/tcp # PaperStream Server services +PS-Capture-Pro 7216/tcp # PaperStream Capture Professional +ramp 7227/tcp # Registry A & M Protocol +ramp 7227/udp # Registry A $ M Protocol +citrixupp 7228/tcp # Citrix Universal Printing Port +citrixuppg 7229/tcp # Citrix UPP Gateway +aspcoordination 7235/udp # ASP Coordination Protocol +display 7236/tcp # Wi-Fi Alliance Wi-Fi Display Protocol +pads 7237/tcp # PADS (Public Area Display System) Server +frc-hicp 7244/tcp # FrontRow Calypso Human Interface Control Protocol +frc-hicp-disc 7244/udp # FrontRow Calypso Human Interface Control Protocol +cnap 7262/tcp # Calypso Network Access Protocol +cnap 7262/udp # Calypso Network Access Protocol +watchme-7272 7272/tcp # WatchMe Monitoring 7272 +watchme-7272 7272/udp # WatchMe Monitoring 7272 +oma-rlp 7273/tcp # OMA Roaming Location +oma-rlp 7273/udp # OMA Roaming Location +oma-rlp-s 7274/tcp # OMA Roaming Location SEC +oma-rlp-s 7274/udp # OMA Roaming Location SEC +oma-ulp 7275/tcp # OMA UserPlane Location +oma-ulp 7275/udp # OMA UserPlane Location +oma-ilp 7276/tcp # OMA Internal Location Protocol +oma-ilp 7276/udp # OMA Internal Location Protocol +oma-ilp-s 7277/tcp # OMA Internal Location Secure Protocol +oma-ilp-s 7277/udp # OMA Internal Location Secure Protocol +oma-dcdocbs 7278/tcp # OMA Dynamic Content Delivery over CBS +oma-dcdocbs 7278/udp # OMA Dynamic Content Delivery over CBS +ctxlic 7279/tcp # Citrix Licensing +ctxlic 7279/udp # Citrix Licensing +itactionserver1 7280/tcp # ITACTIONSERVER 1 +itactionserver1 7280/udp # ITACTIONSERVER 1 +itactionserver2 7281/tcp # ITACTIONSERVER 2 +itactionserver2 7281/udp # ITACTIONSERVER 2 +mzca-action 7282/tcp # eventACTION/ussACTION (MZCA) server +mzca-alert 7282/udp # eventACTION/ussACTION (MZCA) alert +genstat 7283/tcp # General Statistics Rendezvous Protocol +lcm-server 7365/tcp # LifeKeeper Communications +lcm-server 7365/udp # LifeKeeper Communications +mindfilesys 7391/tcp # mind-file system server +mindfilesys 7391/udp # mind-file system server +mrssrendezvous 7392/tcp # mrss-rendezvous server +mrssrendezvous 7392/udp # mrss-rendezvous server +nfoldman 7393/tcp # nFoldMan Remote Publish +nfoldman 7393/udp # nFoldMan Remote Publish +fse 7394/tcp # File system export of backup images +fse 7394/udp # File system export of backup images +winqedit 7395/tcp # winqedit +winqedit 7395/udp # winqedit +hexarc 7397/tcp # Hexarc Command Language +hexarc 7397/udp # Hexarc Command Language +rtps-discovery 7400/tcp # RTPS Discovery +rtps-discovery 7400/udp # RTPS Discovery +rtps-dd-ut 7401/tcp # RTPS Data-Distribution User-Traffic +rtps-dd-ut 7401/udp # RTPS Data-Distribution User-Traffic +rtps-dd-mt 7402/tcp # RTPS Data-Distribution Meta-Traffic +rtps-dd-mt 7402/udp # RTPS Data-Distribution Meta-Traffic +ionixnetmon 7410/tcp # Ionix Network Monitor +ionixnetmon 7410/udp # Ionix Network Monitor +daqstream 7411/tcp # Streaming of measurement +daqstream 7411/udp # Streaming of measurement +mtportmon 7421/tcp # Matisse Port Monitor +mtportmon 7421/udp # Matisse Port Monitor +pmdmgr 7426/tcp # OpenView DM Postmaster Manager +pmdmgr 7426/udp # OpenView DM Postmaster Manager +oveadmgr 7427/tcp # OpenView DM Event Agent Manager +oveadmgr 7427/udp # OpenView DM Event Agent Manager +ovladmgr 7428/tcp # OpenView DM Log Agent Manager +ovladmgr 7428/udp # OpenView DM Log Agent Manager +opi-sock 7429/tcp # OpenView DM rqt communication +opi-sock 7429/udp # OpenView DM rqt communication +xmpv7 7430/tcp # OpenView DM xmpv7 api pipe +xmpv7 7430/udp # OpenView DM xmpv7 api pipe +pmd 7431/tcp # OpenView DM ovc/xmpv3 api pipe +pmd 7431/udp # OpenView DM ovc/xmpv3 api pipe +faximum 7437/tcp # Faximum +faximum 7437/udp # Faximum +oracleas-https 7443/tcp # Oracle Application Server HTTPS +oracleas-https 7443/udp # Oracle Application Server HTTPS +sttunnel 7471/tcp # Stateless Transport Tunneling Protocol +rise 7473/tcp # Rise: The Vieneo Province +rise 7473/udp # Rise: The Vieneo Province +neo4j 7474/tcp # Neo4j Graph Database +telops-lmd 7491/tcp # telops-lmd +telops-lmd 7491/udp # telops-lmd +silhouette 7500/tcp # Silhouette User +silhouette 7500/udp # Silhouette User +ovbus 7501/tcp # HP OpenView Bus Daemon +ovbus 7501/udp # HP OpenView Bus Daemon +adcp 7508/tcp # Automation Device Configuration Protocol +acplt 7509/tcp # ACPLT - process automation service +ovhpas 7510/tcp # HP OpenView Application Server +ovhpas 7510/udp # HP OpenView Application Server +pafec-lm 7511/tcp # pafec-lm +pafec-lm 7511/udp # pafec-lm +saratoga 7542/tcp # Saratoga Transfer Protocol +saratoga 7542/udp # Saratoga Transfer Protocol +atul 7543/tcp # atul server +atul 7543/udp # atul server +nta-ds 7544/tcp # FlowAnalyzer DisplayServer +nta-ds 7544/udp # FlowAnalyzer DisplayServer +nta-us 7545/tcp # FlowAnalyzer UtilityServer +nta-us 7545/udp # FlowAnalyzer UtilityServer +cfs 7546/tcp # Cisco Fabric service +cfs 7546/udp # Cisco Fabric service +cwmp 7547/tcp # DSL Forum CWMP +cwmp 7547/udp # DSL Forum CWMP +tidp 7548/tcp # Threat Information Distribution Protocol +tidp 7548/udp # Threat Information Distribution Protocol +nls-tl 7549/tcp # Network Layer Signaling Transport Layer +nls-tl 7549/udp # Network Layer Signaling Transport Layer +cloudsignaling 7550/udp # Cloud Signaling Service +controlone-con 7551/tcp # ControlONE Console signaling +sncp 7560/tcp # Sniffer Command Protocol +sncp 7560/udp # Sniffer Command Protocol +cfw 7563/tcp # Control Framework +vsi-omega 7566/tcp # VSI Omega +vsi-omega 7566/udp # VSI Omega +dell-eql-asm 7569/tcp # Dell EqualLogic Host Group Management +aries-kfinder 7570/tcp # Aries Kfinder +aries-kfinder 7570/udp # Aries Kfinder +coherence 7574/tcp # Oracle Coherence Cluster Service +sun-lm 7588/tcp # Sun License Manager +sun-lm 7588/udp # Sun License Manager +mipi-debug 7606/tcp # MIPI Alliance Debug +mipi-debug 7606/udp # MIPI Alliance Debug +indi 7624/tcp # Instrument Neutral Distributed Interface +indi 7624/udp # Instrument Neutral Distributed Interface +simco 7626/tcp # SImple Middlebox COnfiguration (SIMCO) Server +simco 7626/sctp # SImple Middlebox COnfiguration (SIMCO) +soap-http 7627/tcp # SOAP Service Port +soap-http 7627/udp # SOAP Service Port +zen-pawn 7628/tcp # Primary Agent Work Notification +zen-pawn 7628/udp # Primary Agent Work Notification +xdas 7629/tcp # OpenXDAS Wire Protocol +xdas 7629/udp # OpenXDAS Wire Protocol +hawk 7630/tcp # HA Web Konsole +tesla-sys-msg 7631/tcp # TESLA System Messaging +pmdfmgt 7633/tcp # PMDF Management +pmdfmgt 7633/udp # PMDF Management +cuseeme 7648/tcp # bonjour-cuseeme +cuseeme 7648/udp # bonjour-cuseeme +imqstomp 7672/tcp # iMQ STOMP Server +imqstomps 7673/tcp # iMQ STOMP Server over SSL +imqtunnels 7674/tcp # iMQ SSL tunnel +imqtunnels 7674/udp # iMQ SSL tunnel +imqtunnel 7675/tcp # iMQ Tunnel +imqtunnel 7675/udp # iMQ Tunnel +imqbrokerd 7676/tcp # iMQ Broker Rendezvous +imqbrokerd 7676/udp # iMQ Broker Rendezvous +sun-user-https 7677/tcp # Sun App Server - HTTPS +sun-user-https 7677/udp # Sun App Server - HTTPS +pando-pub 7680/tcp # Pando Media Public Distribution +pando-pub 7680/udp # Pando Media Public Distribution +dmt 7683/tcp # Cleondris DMT +collaber 7689/tcp # Collaber Network Service +collaber 7689/udp # Collaber Network Service +klio 7697/tcp # KLIO communications +klio 7697/udp # KLIO communications +em7-secom 7700/tcp # EM7 Secure Communications +sync-em7 7707/tcp # EM7 Dynamic Updates +sync-em7 7707/udp # EM7 Dynamic Updates +scinet 7708/tcp # scientia.net +scinet 7708/udp # scientia.net +medimageportal 7720/tcp # MedImage Portal +medimageportal 7720/udp # MedImage Portal +nsdeepfreezectl 7724/tcp # Novell Snap-in Deep Freeze Control +nsdeepfreezectl 7724/udp # Novell Snap-in Deep Freeze Control +nitrogen 7725/tcp # Nitrogen Service +nitrogen 7725/udp # Nitrogen Service +freezexservice 7726/tcp # FreezeX Console Service +freezexservice 7726/udp # FreezeX Console Service +trident-data 7727/tcp # Trident Systems Data +trident-data 7727/udp # Trident Systems Data +osvr 7728/tcp # Open-Source Virtual Reality +osvr 7728/udp # Open-Source Virtual Reality +osvr 7728/sctp # Open-Source Virtual Reality +smip 7734/tcp # Smith Protocol over IP +smip 7734/udp # Smith Protocol over IP +aiagent 7738/tcp # HP Enterprise Discovery Agent +aiagent 7738/udp # HP Enterprise Discovery Agent +scriptview 7741/tcp # ScriptView Network +scriptview 7741/udp # ScriptView Network +msss 7742/tcp # Mugginsoft Script Server Service +sstp-1 7743/tcp # Sakura Script Transfer Protocol +sstp-1 7743/udp # Sakura Script Transfer Protocol +raqmon-pdu 7744/tcp # RAQMON PDU +raqmon-pdu 7744/udp # RAQMON PDU +prgp 7747/tcp # Put/Run/Get Protocol +prgp 7747/udp # Put/Run/Get Protocol +inetfs 7775/tcp # File System using TLS over WAN +cbt 7777/tcp # cbt +cbt 7777/udp # cbt +interwise 7778/tcp # Interwise +interwise 7778/udp # Interwise +vstat 7779/tcp # VSTAT +vstat 7779/udp # VSTAT +accu-lmgr 7781/tcp # accu-lmgr +accu-lmgr 7781/udp # accu-lmgr +s-bfd 7784/udp # Seamless Bidirectional Forwarding Detection +minivend 7786/tcp # MINIVEND +minivend 7786/udp # MINIVEND +popup-reminders 7787/tcp # Popup Reminders Receive +popup-reminders 7787/udp # Popup Reminders Receive +office-tools 7789/tcp # Office Tools Pro Receive +office-tools 7789/udp # Office Tools Pro Receive +q3ade 7794/tcp # Q3ADE Cluster Service +q3ade 7794/udp # Q3ADE Cluster Service +pnet-conn 7797/tcp # Propel Connector port +pnet-conn 7797/udp # Propel Connector port +pnet-enc 7798/tcp # Propel Encoder port +pnet-enc 7798/udp # Propel Encoder port +altbsdp 7799/tcp # Alternate BSDP Service +altbsdp 7799/udp # Alternate BSDP Service +asr 7800/tcp # Apple Software Restore +asr 7800/udp # Apple Software Restore +ssp-client 7801/tcp # Secure Server Protocol - client +ssp-client 7801/udp # Secure Server Protocol - client +vns-tp 7802/udp # Virtualized Network Services tunnel protocol +rbt-wanopt 7810/tcp # Riverbed WAN Optimization Protocol +rbt-wanopt 7810/udp # Riverbed WAN Optimization Protocol +apc-7845 7845/tcp # APC 7845 +apc-7845 7845/udp # APC 7845 +apc-7846 7846/tcp # APC 7846 +apc-7846 7846/udp # APC 7846 +csoauth 7847/tcp # A product key authentication by CSO +mobileanalyzer 7869/tcp # MobileAnalyzer& MobileMonitor +rbt-smc 7870/tcp # Riverbed Steelhead Mobile Service +mdm 7871/tcp # Mobile Device Management +mipv6tls 7872/udp # TLS-based Mobile IPv6 Security +owms 7878/tcp # Opswise Message Service +pss 7880/tcp # Pearson +pss 7880/udp # Pearson +ubroker 7887/tcp # Universal Broker +ubroker 7887/udp # Universal Broker +mevent 7900/tcp # Multicast Event +mevent 7900/udp # Multicast Event +tnos-sp 7901/tcp # TNOS Service Protocol +tnos-sp 7901/udp # TNOS Service Protocol +tnos-dp 7902/tcp # TNOS shell Protocol +tnos-dp 7902/udp # TNOS shell Protocol +tnos-dps 7903/tcp # TNOS Secure DiaguardProtocol +tnos-dps 7903/udp # TNOS Secure DiaguardProtocol +qo-secure 7913/tcp # QuickObjects secure port +qo-secure 7913/udp # QuickObjects secure port +t2-drm 7932/tcp # Tier 2 Data Resource Manager +t2-drm 7932/udp # Tier 2 Data Resource Manager +t2-brm 7933/tcp # Tier 2 Business Rules Manager +t2-brm 7933/udp # Tier 2 Business Rules Manager +generalsync 7962/tcp # general-purpose synchronization protocol +generalsync 7962/udp # general-purpose synchronization protocol +supercell 7967/tcp # Supercell +supercell 7967/udp # Supercell +micromuse-ncps 7979/tcp # Micromuse-ncps +micromuse-ncps 7979/udp # Micromuse-ncps +quest-vista 7980/tcp # Quest Vista +quest-vista 7980/udp # Quest Vista +sossd-collect 7981/tcp # Spotlight on SQL Server Desktop Collect +sossd-agent 7982/tcp # Spotlight on SQL Server Desktop Agent +sossd-disc 7982/udp # Spotlight on SQL Server Desktop Agent Discovery +pushns 7997/tcp # PUSH Notification Service +usicontentpush 7998/udp # USI Content Push Service +irdmi2 7999/tcp # iRDMI2 +irdmi2 7999/udp # iRDMI2 +irdmi 8000/tcp # iRDMI +irdmi 8000/udp # iRDMI +vcom-tunnel 8001/tcp # VCOM Tunnel +vcom-tunnel 8001/udp # VCOM Tunnel +teradataordbms 8002/tcp # Teradata ORDBMS +teradataordbms 8002/udp # Teradata ORDBMS +mcreport 8003/tcp # Mulberry Connect Reporting Service +mcreport 8003/udp # Mulberry Connect Reporting Service +mxi 8005/tcp # MXI Generation II for z/OS +mxi 8005/udp # MXI Generation II for z/OS +qbdb 8019/tcp # QB DB Dynamic Port +qbdb 8019/udp # QB DB Dynamic Port +intu-ec-svcdisc 8020/tcp # Intuit Entitlement Service and Discovery +intu-ec-svcdisc 8020/udp # Intuit Entitlement Service and Discovery +intu-ec-client 8021/tcp # Intuit Entitlement Client +intu-ec-client 8021/udp # Intuit Entitlement Client +oa-system 8022/tcp # oa-system +oa-system 8022/udp # oa-system +ca-audit-da 8025/tcp # CA Audit Distribution Agent +ca-audit-da 8025/udp # CA Audit Distribution Agent +ca-audit-ds 8026/tcp # CA Audit Distribution Server +ca-audit-ds 8026/udp # CA Audit Distribution Server +pro-ed 8032/tcp # ProEd +pro-ed 8032/udp # ProEd +mindprint 8033/tcp # MindPrint +mindprint 8033/udp # MindPrint +vantronix-mgmt 8034/tcp # .vantronix Management +vantronix-mgmt 8034/udp # .vantronix Management +ampify 8040/tcp # Ampify Messaging Protocol +ampify 8040/udp # Ampify Messaging Protocol +fs-agent 8042/tcp # FireScope Agent +fs-server 8043/tcp # FireScope Server +fs-mgmt 8044/tcp # FireScope Management Interface +rocrail 8051/tcp # Rocrail Client Service +senomix01 8052/tcp # Senomix Timesheets Server +senomix01 8052/udp # Senomix Timesheets Server +senomix02 8053/tcp # Senomix Timesheets Client [1 year assignment] +senomix02 8053/udp # Senomix Timesheets Client [1 year assignment] +senomix03 8054/tcp # Senomix Timesheets Server [1 year assignment] +senomix03 8054/udp # Senomix Timesheets Server [1 year assignment] +senomix04 8055/tcp # Senomix Timesheets Server [1 year assignment] +senomix04 8055/udp # Senomix Timesheets Server [1 year assignment] +senomix05 8056/tcp # Senomix Timesheets Server [1 year assignment] +senomix05 8056/udp # Senomix Timesheets Server [1 year assignment] +senomix06 8057/tcp # Senomix Timesheets Client [1 year assignment] +senomix06 8057/udp # Senomix Timesheets Client [1 year assignment] +senomix07 8058/tcp # Senomix Timesheets Client [1 year assignment] +senomix07 8058/udp # Senomix Timesheets Client [1 year assignment] +senomix08 8059/tcp # Senomix Timesheets Client [1 year assignment] +senomix08 8059/udp # Senomix Timesheets Client [1 year assignment] +aero 8060/udp # Asymmetric Extended Route Optimization (AERO) +toad-bi-appsrvr 8066/tcp # Toad BI Application Server +infi-async 8067/tcp # Infinidat async replication +gadugadu 8074/tcp # Gadu-Gadu +gadugadu 8074/udp # Gadu-Gadu +us-cli 8082/tcp # Utilistor (Client) +us-cli 8082/udp # Utilistor (Client) +us-srv 8083/tcp # Utilistor (Server) +us-srv 8083/udp # Utilistor (Server) +d-s-n 8086/tcp # Distributed SCADA Networking Rendezvous Port +d-s-n 8086/udp # Distributed SCADA Networking Rendezvous Port +simplifymedia 8087/tcp # Simplify Media SPP Protocol +simplifymedia 8087/udp # Simplify Media SPP Protocol +radan-http 8088/tcp # Radan HTTP +radan-http 8088/udp # Radan HTTP +jamlink 8091/tcp # Jam Link Framework +sac 8097/tcp # SAC Port Id +sac 8097/udp # SAC Port Id +xprint-server 8100/tcp # Xprint Server +xprint-server 8100/udp # Xprint Server +ldoms-migr 8101/tcp # Logical Domains Migration +kz-migr 8102/tcp # Oracle Kernel zones migration server +mtl8000-matrix 8115/tcp # MTL8000 Matrix +mtl8000-matrix 8115/udp # MTL8000 Matrix +cp-cluster 8116/tcp # Check Point Clustering +cp-cluster 8116/udp # Check Point Clustering +purityrpc 8117/tcp # Purity replication clustering and remote management +privoxy 8118/tcp # Privoxy HTTP proxy +privoxy 8118/udp # Privoxy HTTP proxy +apollo-data 8121/tcp # Apollo Data Port +apollo-data 8121/udp # Apollo Data Port +apollo-admin 8122/tcp # Apollo Admin Port +apollo-admin 8122/udp # Apollo Admin Port +paycash-online 8128/tcp # PayCash Online Protocol +paycash-online 8128/udp # PayCash Online Protocol +paycash-wbp 8129/tcp # PayCash Wallet-Browser +paycash-wbp 8129/udp # PayCash Wallet-Browser +indigo-vrmi 8130/tcp # INDIGO-VRMI +indigo-vrmi 8130/udp # INDIGO-VRMI +indigo-vbcp 8131/tcp # INDIGO-VBCP +indigo-vbcp 8131/udp # INDIGO-VBCP +dbabble 8132/tcp # dbabble +dbabble 8132/udp # dbabble +puppet 8140/tcp # The Puppet master service +isdd 8148/tcp # i-SDD file transfer +isdd 8148/udp # i-SDD file transfer +eor-game 8149/udp # Edge of Reality game data +quantastor 8153/tcp # QuantaStor Management interface +patrol 8160/tcp # Patrol +patrol 8160/udp # Patrol +patrol-snmp 8161/tcp # Patrol SNMP +patrol-snmp 8161/udp # Patrol SNMP +lpar2rrd 8162/tcp # LPAR2RRD client server communication +intermapper 8181/tcp # Intermapper network management system +vmware-fdm 8182/tcp # VMware Fault Domain Manager +vmware-fdm 8182/udp # VMware Fault Domain Manager +proremote 8183/tcp # ProRemote +itach 8184/tcp # Remote iTach Connection +itach 8184/udp # Remote iTach Connection +gcp-rphy 8190/tcp # Generic control plane for RPHY +limnerpressure 8191/tcp # Limner Pressure +spytechphone 8192/tcp # SpyTech Phone Service +spytechphone 8192/udp # SpyTech Phone Service +blp1 8194/tcp # Bloomberg data API +blp1 8194/udp # Bloomberg data API +blp2 8195/tcp # Bloomberg feed +blp2 8195/udp # Bloomberg feed +vvr-data 8199/tcp # VVR DATA +vvr-data 8199/udp # VVR DATA +trivnet1 8200/tcp # TRIVNET +trivnet1 8200/udp # TRIVNET +trivnet2 8201/tcp # TRIVNET +trivnet2 8201/udp # TRIVNET +aesop 8202/udp # Audio+Ethernet Standard Open Protocol +lm-perfworks 8204/tcp # LM Perfworks +lm-perfworks 8204/udp # LM Perfworks +lm-instmgr 8205/tcp # LM Instmgr +lm-instmgr 8205/udp # LM Instmgr +lm-dta 8206/tcp # LM Dta +lm-dta 8206/udp # LM Dta +lm-sserver 8207/tcp # LM SServer +lm-sserver 8207/udp # LM SServer +lm-webwatcher 8208/tcp # LM Webwatcher +lm-webwatcher 8208/udp # LM Webwatcher +rexecj 8230/tcp # RexecJ Server +rexecj 8230/udp # RexecJ Server +hncp-udp-port 8231/udp # HNCP +hncp-dtls-port 8232/udp # HNCP over DTLS +synapse-nhttps 8243/tcp # Synapse Non Blocking HTTPS +synapse-nhttps 8243/udp # Synapse Non Blocking HTTPS +pando-sec 8276/tcp # Pando Media Controlled Distribution +pando-sec 8276/udp # Pando Media Controlled Distribution +synapse-nhttp 8280/tcp # Synapse Non Blocking HTTP +synapse-nhttp 8280/udp # Synapse Non Blocking HTTP +libelle 8282/tcp # Libelle EnterpriseBus +libelle-disc 8282/udp # Libelle EnterpriseBus Discovery +blp3 8292/tcp # Bloomberg professional +blp3 8292/udp # Bloomberg professional +blp4 8294/tcp # Bloomberg intelligent client +blp4 8294/udp # Bloomberg intelligent client +hiperscan-id 8293/tcp # Hiperscan Identification Service +tmi 8300/tcp # Transport Management Interface +tmi 8300/udp # Transport Management Interface +amberon 8301/tcp # Amberon PPC/PPS +amberon 8301/udp # Amberon PPC/PPS +hub-open-net 8313/tcp # Hub Open Network +tnp-discover 8320/tcp # Thin(ium) Network Protocol +tnp-discover 8320/udp # Thin(ium) Network Protocol +tnp 8321/tcp # Thin(ium) Network Protocol +tnp 8321/udp # Thin(ium) Network Protocol +garmin-marine 8322/tcp # Garmin Marine +garmin-marine 8322/udp # Garmin Marine +server-find 8351/tcp # Server Find +server-find 8351/udp # Server Find +cruise-enum 8376/tcp # Cruise ENUM +cruise-enum 8376/udp # Cruise ENUM +cruise-swroute 8377/tcp # Cruise SWROUTE +cruise-swroute 8377/udp # Cruise SWROUTE +cruise-config 8378/tcp # Cruise CONFIG +cruise-config 8378/udp # Cruise CONFIG +cruise-diags 8379/tcp # Cruise DIAGS +cruise-diags 8379/udp # Cruise DIAGS +cruise-update 8380/tcp # Cruise UPDATE +cruise-update 8380/udp # Cruise UPDATE +m2mservices 8383/tcp # M2m Services +m2mservices 8383/udp # M2m Services +marathontp 8384/udp # Marathon Transport Protocol +cvd 8400/tcp # cvd +cvd 8400/udp # cvd +sabarsd 8401/tcp # sabarsd +sabarsd 8401/udp # sabarsd +abarsd 8402/tcp # abarsd +abarsd 8402/udp # abarsd +admind2 8403/tcp # admind +admind2 8403/udp # admind +svcloud 8404/tcp # SuperVault Cloud +svbackup 8405/tcp # SuperVault Backup +dlpx-sp 8415/tcp # Delphix Session Protocol +espeech 8416/tcp # eSpeech Session Protocol +espeech 8416/udp # eSpeech Session Protocol +espeech-rtp 8417/tcp # eSpeech RTP Protocol +espeech-rtp 8417/udp # eSpeech RTP Protocol +cybro-a-bus 8442/tcp # CyBro A-bus Protocol +cybro-a-bus 8442/udp # CyBro A-bus Protocol +pcsync-https 8443/tcp # PCsync HTTPS +pcsync-https 8443/udp # PCsync HTTPS +pcsync-http 8444/tcp # PCsync HTTP +pcsync-http 8444/udp # PCsync HTTP +copy 8445/tcp # Port for copy per sync feature +copy-disc 8445/udp # Port for copy discovery +npmp 8450/tcp # npmp +npmp 8450/udp # npmp +nexentamv 8457/tcp # Nexenta Management GUI +cisco-avp 8470/tcp # Cisco Address Validation Protocol +pim-port 8471/tcp # PIM over Reliable Transport +pim-port 8471/sctp # PIM over Reliable Transport +otv 8472/tcp # Overlay Transport Virtualization (OTV) +otv 8472/udp # Overlay Transport Virtualization (OTV) +vp2p 8473/tcp # Virtual Point to Point +vp2p 8473/udp # Virtual Point to Point +noteshare 8474/tcp # AquaMinds NoteShare +noteshare 8474/udp # AquaMinds NoteShare +fmtp 8500/tcp # Flight Message Transfer Protocol +fmtp 8500/udp # Flight Message Transfer Protocol +cmtp-mgt 8501/tcp # CYTEL Message Transfer Management +cmtp-av 8501/udp # CYTEL Message Transfer Audio and Video +ftnmtp 8502/tcp # FTN Message Transfer +lsp-self-ping 8503/udp # MPLS LSP Self-Ping +rtsp-alt 8554/tcp # RTSP Alternate (see port 554) +rtsp-alt 8554/udp # RTSP Alternate (see port 554) +d-fence 8555/tcp # SYMAX D-FENCE +d-fence 8555/udp # SYMAX D-FENCE +dof-tunnel 8567/tcp # DOF tunneling protocol +dof-tunnel 8567/udp # DOF tunneling protocol +asterix 8600/tcp # Surveillance Data +asterix 8600/udp # Surveillance Data +canon-cpp-disc 8609/udp # Canon Compact Printer Protocol Discovery +canon-mfnp 8610/tcp # Canon MFNP Service +canon-mfnp 8610/udp # Canon MFNP Service +canon-bjnp1 8611/tcp # Canon BJNP Port 1 +canon-bjnp1 8611/udp # Canon BJNP Port 1 +canon-bjnp2 8612/tcp # Canon BJNP Port 2 +canon-bjnp2 8612/udp # Canon BJNP Port 2 +canon-bjnp3 8613/tcp # Canon BJNP Port 3 +canon-bjnp3 8613/udp # Canon BJNP Port 3 +canon-bjnp4 8614/tcp # Canon BJNP Port 4 +canon-bjnp4 8614/udp # Canon BJNP Port 4 +imink 8615/tcp # Imink Service Control +monetra 8665/tcp # Monetra +monetra-admin 8666/tcp # Monetra Administrative +msi-cps-rm 8675/tcp # Programming Software for Radio Management Motorola Solutions Customer +msi-cps-rm-disc 8675/udp # Programming Software for Radio Management Discovery +sun-as-jmxrmi 8686/tcp # Sun App Server - JMX/RMI +sun-as-jmxrmi 8686/udp # Sun App Server - JMX/RMI +openremote-ctrl 8688/tcp # OpenRemote Controller +vnyx 8699/tcp # VNYX Primary Port +vnyx 8699/udp # VNYX Primary Port +nvc 8711/tcp # Nuance Voice Control +dtp-net 8732/udp # DASGIP Net Services +ibus 8733/tcp # iBus +ibus 8733/udp # iBus +dey-keyneg 8750/tcp # DEY Storage Key Negotiation +mc-appserver 8763/tcp # MC-APPSERVER +mc-appserver 8763/udp # MC-APPSERVER +openqueue 8764/tcp # OPENQUEUE +openqueue 8764/udp # OPENQUEUE +ultraseek-http 8765/tcp # Ultraseek HTTP +ultraseek-http 8765/udp # Ultraseek HTTP +amcs 8766/tcp # Agilent Connectivity Service +amcs 8766/udp # Agilent Connectivity Service +dpap 8770/tcp # Digital Photo Access Protocol +dpap 8770/udp # Digital Photo Access Protocol +uec 8778/tcp # Stonebranch Universal Enterprise Controller +msgclnt 8786/tcp # Message Client +msgclnt 8786/udp # Message Client +msgsrvr 8787/tcp # Message Server +msgsrvr 8787/udp # Message Server +acd-pm 8793/tcp # Accedian Performance Measurement +acd-pm 8793/udp # Accedian Performance Measurement +sunwebadmin 8800/tcp # Sun Web Server Admin Service +sunwebadmin 8800/udp # Sun Web Server Admin Service +truecm 8804/tcp # truecm +truecm 8804/udp # truecm +dxspider 8873/tcp # dxspider linking protocol +dxspider 8873/udp # dxspider linking protocol +cddbp-alt 8880/tcp # CDDBP +cddbp-alt 8880/udp # CDDBP +galaxy4d 8881/tcp # Galaxy4D Online Game Engine +secure-mqtt 8883/tcp # Secure MQTT +secure-mqtt 8883/udp # Secure MQTT +ddi-tcp-1 8888/tcp # NewsEDGE server TCP (TCP 1) +ddi-udp-1 8888/udp # NewsEDGE server UDP (UDP 1) +ddi-tcp-2 8889/tcp # Desktop Data TCP 1 +ddi-udp-2 8889/udp # NewsEDGE server broadcast +ddi-tcp-3 8890/tcp # Desktop Data TCP 2 +ddi-udp-3 8890/udp # NewsEDGE client broadcast +ddi-tcp-4 8891/tcp # Desktop Data TCP 3: NESS application +ddi-udp-4 8891/udp # Desktop Data UDP 3: NESS application +ddi-tcp-5 8892/tcp # Desktop Data TCP 4: FARM product +ddi-udp-5 8892/udp # Desktop Data UDP 4: FARM product +ddi-tcp-6 8893/tcp # Desktop Data TCP 5: NewsEDGE/Web application +ddi-udp-6 8893/udp # Desktop Data UDP 5: NewsEDGE/Web application +ddi-tcp-7 8894/tcp # Desktop Data TCP 6: COAL application +ddi-udp-7 8894/udp # Desktop Data UDP 6: COAL application +canto-roboflow 8898/tcp # Canto RoboFlow Control +#canto-roboflow 8998/tcp # Canto RoboFlow Control +ospf-lite 8899/tcp # ospf-lite +ospf-lite 8899/udp # ospf-lite +jmb-cds1 8900/tcp # JMB-CDS 1 +jmb-cds1 8900/udp # JMB-CDS 1 +jmb-cds2 8901/tcp # JMB-CDS 2 +jmb-cds2 8901/udp # JMB-CDS 2 +manyone-http 8910/tcp # manyone-http +manyone-http 8910/udp # manyone-http +manyone-xml 8911/tcp # manyone-xml +manyone-xml 8911/udp # manyone-xml +wcbackup 8912/tcp # Windows Client Backup +wcbackup 8912/udp # Windows Client Backup +dragonfly 8913/tcp # Dragonfly System Service +dragonfly 8913/udp # Dragonfly System Service +twds 8937/tcp # Transaction Warehouse Data Service +ub-dns-control 8953/tcp # unbound dns nameserver control +cumulus-admin 8954/tcp # Cumulus Admin Port +cumulus-admin 8954/udp # Cumulus Admin Port +nod-provider 8980/tcp # Network of Devices Provider +nod-provider 8980/udp # Network of Devices Provider +nod-client 8981/udp # Network of Devices Client +sunwebadmins 8989/tcp # Sun Web Server SSL Admin Service +sunwebadmins 8989/udp # Sun Web Server SSL Admin Service +http-wmap 8990/tcp # webmail HTTP service +http-wmap 8990/udp # webmail HTTP service +https-wmap 8991/tcp # webmail HTTPS service +https-wmap 8991/udp # webmail HTTPS service +oracle-ms-ens 8997/tcp # Oracle Messaging Server Event Notification Service +bctp 8999/tcp # Brodos Crypto Trade Protocol +bctp 8999/udp # Brodos Crypto Trade Protocol +cslistener 9000/tcp # CSlistener +cslistener 9000/udp # CSlistener +etlservicemgr 9001/tcp # ETL Service Manager +etlservicemgr 9001/udp # ETL Service Manager +dynamid 9002/tcp # DynamID authentication +dynamid 9002/udp # DynamID authentication +golem 9005/tcp # Golem Inter-System RPC +ogs-client 9007/udp # Open Grid Services Client +ogs-server 9008/tcp # Open Grid Services Server +pichat 9009/tcp # Pichat Server +pichat 9009/udp # Pichat Server +sdr 9010/tcp # Secure Data Replicator Protocol +tambora 9020/tcp # TAMBORA +tambora 9020/udp # TAMBORA +panagolin-ident 9021/tcp # Pangolin Identification +panagolin-ident 9021/udp # Pangolin Identification +paragent 9022/tcp # PrivateArk Remote Agent +paragent 9022/udp # PrivateArk Remote Agent +swa-1 9023/tcp # Secure Web Access - 1 +swa-1 9023/udp # Secure Web Access - 1 +swa-2 9024/tcp # Secure Web Access - 2 +swa-2 9024/udp # Secure Web Access - 2 +swa-3 9025/tcp # Secure Web Access - 3 +swa-3 9025/udp # Secure Web Access - 3 +swa-4 9026/tcp # Secure Web Access - 4 +swa-4 9026/udp # Secure Web Access - 4 +versiera 9050/tcp # Versiera Agent Listener +fio-cmgmt 9051/tcp # Fusion-io Central Manager Service +glrpc 9080/tcp # Groove GLRPC +glrpc 9080/udp # Groove GLRPC +lcs-ap 9082/sctp # LCS Application Protocol +emc-pp-mgmtsvc 9083/tcp # EMC PowerPath Mgmt Service +aurora 9084/tcp # IBM AURORA Performance Visualizer +aurora 9084/udp # IBM AURORA Performance Visualizer +aurora 9084/sctp # IBM AURORA Performance Visualizer +ibm-rsyscon 9085/tcp # IBM Remote System Console +ibm-rsyscon 9085/udp # IBM Remote System Console +net2display 9086/tcp # Vesa Net2Display +net2display 9086/udp # Vesa Net2Display +classic 9087/tcp # Classic Data Server +classic 9087/udp # Classic Data Server +sqlexec 9088/tcp # IBM Informix SQL Interface +sqlexec 9088/udp # IBM Informix SQL Interface +sqlexec-ssl 9089/tcp # IBM Informix SQL Interface - Encrypted +sqlexec-ssl 9089/udp # IBM Informix SQL Interface - Encrypted +websm 9090/tcp # WebSM +websm 9090/udp # WebSM +xmltec-xmlmail 9091/tcp # xmltec-xmlmail +xmltec-xmlmail 9091/udp # xmltec-xmlmail +XmlIpcRegSvc 9092/tcp # Xml-Ipc Server Reg +XmlIpcRegSvc 9092/udp # Xml-Ipc Server Reg +copycat 9093/tcp # Copycat database replication service +hp-pdl-datastr 9100/udp pdl-datastream # PDL Data Streaming Port +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp # Bacula Director +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp # Bacula File Daemon +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp # Bacula Storage Daemon +peerwire 9104/tcp # PeerWire +peerwire 9104/udp # PeerWire +xadmin 9105/tcp # Xadmin Control Service +xadmin 9105/udp # Xadmin Control Service +astergate 9106/tcp # Astergate Control Service +astergate-disc 9106/udp # Astergate Discovery Service +astergatefax 9107/tcp # AstergateFax Control Service +mxit 9119/tcp # MXit Instant Messaging +mxit 9119/udp # MXit Instant Messaging +grcmp 9122/tcp # Global Relay compliant mobile IM protocol +grcp 9123/tcp # Global Relay compliant IM protocol +dddp 9131/tcp # Dynamic Device Discovery +dddp 9131/udp # Dynamic Device Discovery +apani1 9160/tcp # apani1 +apani1 9160/udp # apani1 +apani2 9161/tcp # apani2 +apani2 9161/udp # apani2 +apani3 9162/tcp # apani3 +apani3 9162/udp # apani3 +apani4 9163/tcp # apani4 +apani4 9163/udp # apani4 +apani5 9164/tcp # apani5 +apani5 9164/udp # apani5 +sun-as-jpda 9191/tcp # Sun AppSvr JPDA +sun-as-jpda 9191/udp # Sun AppSvr JPDA +wap-wsp 9200/tcp # WAP connectionless session service +wap-wsp 9200/udp # WAP connectionless session service +wap-wsp-wtp 9201/tcp # WAP session service +wap-wsp-wtp 9201/udp # WAP session service +wap-wsp-s 9202/tcp # WAP secure connectionless session service +wap-wsp-s 9202/udp # WAP secure connectionless session service +wap-wsp-wtp-s 9203/tcp # WAP secure session service +wap-wsp-wtp-s 9203/udp # WAP secure session service +wap-vcard 9204/tcp # WAP vCard +wap-vcard 9204/udp # WAP vCard +wap-vcal 9205/tcp # WAP vCal +wap-vcal 9205/udp # WAP vCal +wap-vcard-s 9206/tcp # WAP vCard Secure +wap-vcard-s 9206/udp # WAP vCard Secure +wap-vcal-s 9207/tcp # WAP vCal Secure +wap-vcal-s 9207/udp # WAP vCal Secure +rjcdb-vcards 9208/tcp # rjcdb vCard +rjcdb-vcards 9208/udp # rjcdb vCard +almobile-system 9209/tcp # ALMobile System Service +almobile-system 9209/udp # ALMobile System Service +oma-mlp 9210/tcp # OMA Mobile Location Protocol +oma-mlp 9210/udp # OMA Mobile Location Protocol +oma-mlp-s 9211/tcp # OMA Mobile Location Protocol Secure +oma-mlp-s 9211/udp # OMA Mobile Location Protocol Secure +serverviewdbms 9212/tcp # Server View dbms access +serverviewdbms 9212/udp # Server View dbms access +serverstart 9213/tcp # ServerStart RemoteControl +serverstart 9213/udp # ServerStart RemoteControl +ipdcesgbs 9214/tcp # IPDC ESG BootstrapService +ipdcesgbs 9214/udp # IPDC ESG BootstrapService +insis 9215/tcp # Integrated Setup and Install Service +insis 9215/udp # Integrated Setup and Install Service +acme 9216/tcp # Aionex Communication Management Engine +acme 9216/udp # Aionex Communication Management Engine +fsc-port 9217/tcp # FSC Communication Port +fsc-port 9217/udp # FSC Communication Port +teamcoherence 9222/tcp # QSC Team Coherence +teamcoherence 9222/udp # QSC Team Coherence +Mon 9255/tcp # Manager On Network +Mon 9255/udp # Manager On Network +traingpsdata 9277/udp # GPS Data transmition from train to ground network +pegasus 9278/tcp # Pegasus GPS Platform +pegasus 9278/udp # Pegasus GPS Platform +pegasus-ctl 9279/tcp # Pegaus GPS System Control Interface +pegasus-ctl 9279/udp # Pegaus GPS System Control Interface +pgps 9280/tcp # Predicted GPS +pgps 9280/udp # Predicted GPS +swtp-port1 9281/tcp # SofaWare transport port 1 +swtp-port1 9281/udp # SofaWare transport port 1 +swtp-port2 9282/tcp # SofaWare transport port 2 +swtp-port2 9282/udp # SofaWare transport port 2 +callwaveiam 9283/tcp # CallWaveIAM +callwaveiam 9283/udp # CallWaveIAM +visd 9284/tcp # VERITAS Information Serve +visd 9284/udp # VERITAS Information Serve +n2h2server 9285/tcp # N2H2 Filter Service Port +n2h2server 9285/udp # N2H2 Filter Service Port +n2receive 9286/udp # n2 monitoring receiver +cumulus 9287/tcp # Cumulus +cumulus 9287/udp # Cumulus +armtechdaemon 9292/tcp # ArmTech Daemon +armtechdaemon 9292/udp # ArmTech Daemon +storview 9293/tcp # StorView Client +storview 9293/udp # StorView Client +armcenterhttp 9294/tcp # ARMCenter http Service +armcenterhttp 9294/udp # ARMCenter http Service +armcenterhttps 9295/tcp # ARMCenter https Service +armcenterhttps 9295/udp # ARMCenter https Service +vrace 9300/tcp # Virtual Racing Service +vrace 9300/udp # Virtual Racing Service +sphinxql 9306/tcp # Sphinx search server (MySQL listener) +sphinxapi 9312/tcp # Sphinx search server +secure-ts 9318/tcp # PKIX TimeStamp over TLS +secure-ts 9318/udp # PKIX TimeStamp over TLS +guibase 9321/tcp # guibase +guibase 9321/udp # guibase +mpidcmgr 9343/tcp # MpIdcMgr +mpidcmgr 9343/udp # MpIdcMgr +mphlpdmc 9344/tcp # Mphlpdmc +mphlpdmc 9344/udp # Mphlpdmc +rancher 9345/tcp # Rancher Agent +ctechlicensing 9346/tcp # C Tech Licensing +ctechlicensing 9346/udp # C Tech Licensing +fjdmimgr 9374/tcp # fjdmimgr +fjdmimgr 9374/udp # fjdmimgr +boxp 9380/tcp # Brivs! Open Extensible Protocol +boxp 9380/udp # Brivs! Open Extensible Protocol +d2dconfig 9387/tcp # D2D Configuration Service +d2ddatatrans 9388/tcp # D2D Data Transfer Service +adws 9389/tcp # Active Directory Web Services +otp 9390/tcp # OpenVAS Transfer Protocol +fjinvmgr 9396/tcp # fjinvmgr +fjinvmgr 9396/udp # fjinvmgr +mpidcagt 9397/tcp # MpIdcAgt +mpidcagt 9397/udp # MpIdcAgt +sec-t4net-srv 9400/tcp # Samsung Twain for Network Server +sec-t4net-srv 9400/udp # Samsung Twain for Network Server +sec-t4net-clt 9401/tcp # Samsung Twain for Network Client +sec-t4net-clt 9401/udp # Samsung Twain for Network Client +sec-pc2fax-srv 9402/tcp # Samsung PC2FAX for Network Server +sec-pc2fax-srv 9402/udp # Samsung PC2FAX for Network Server +git 9418/tcp # git pack transfer service +git 9418/udp # git pack transfer service +tungsten-https 9443/tcp # WSO2 Tungsten HTTPS +tungsten-https 9443/udp # WSO2 Tungsten HTTPS +wso2esb-console 9444/tcp # WSO2 ESB Administration Console HTTPS +wso2esb-console 9444/udp # WSO2 ESB Administration Console HTTPS +mindarray-ca 9445/tcp # MindArray Systems Console Agent +sntlkeyssrvr 9450/tcp # Sentinel Keys Server +sntlkeyssrvr 9450/udp # Sentinel Keys Server +ismserver 9500/tcp # ismserver +ismserver 9500/udp # ismserver +sma-spw 9522/udp # SMA Speedwire +mngsuite 9535/tcp # Management Suite Remote Control +mngsuite 9535/udp # Management Suite Remote Control +laes-bf 9536/tcp # Surveillance buffering function +laes-bf 9536/udp # Surveillance buffering function +trispen-sra 9555/tcp # Trispen Secure Remote Access +trispen-sra 9555/udp # Trispen Secure Remote Access +ldgateway 9592/tcp # LANDesk Gateway +ldgateway 9592/udp # LANDesk Gateway +cba8 9593/tcp # LANDesk Management Agent (cba8) +cba8 9593/udp # LANDesk Management Agent (cba8) +msgsys 9594/tcp # Message System +msgsys 9594/udp # Message System +pds 9595/tcp # Ping Discovery Service +pds 9595/udp # Ping Discovery Service +mercury-disc 9596/tcp # Mercury Discovery +mercury-disc 9596/udp # Mercury Discovery +pd-admin 9597/tcp # PD Administration +pd-admin 9597/udp # PD Administration +vscp 9598/tcp # Very Simple Ctrl Protocol +vscp 9598/udp # Very Simple Ctrl Protocol +robix 9599/tcp # Robix +robix 9599/udp # Robix +micromuse-ncpw 9600/tcp # MICROMUSE-NCPW +micromuse-ncpw 9600/udp # MICROMUSE-NCPW +streamcomm-ds 9612/tcp # StreamComm User Directory +streamcomm-ds 9612/udp # StreamComm User Directory +iadt-tls 9614/tcp # iADT Protocol over TLS +erunbook_agent 9616/tcp erunbook-agent # eRunbook Agent +erunbook_server 9617/tcp erunbook-server # eRunbook Server +condor 9618/tcp # Condor Collector Service +condor 9618/udp # Condor Collector Service +odbcpathway 9628/tcp # ODBC Pathway Service +odbcpathway 9628/udp # ODBC Pathway Service +uniport 9629/tcp # UniPort SSO Controller +uniport 9629/udp # UniPort SSO Controller +peoctlr 9630/tcp # Peovica Controller +peocoll 9631/tcp # Peovica Collector +mc-comm 9632/udp # Mobile-C Communications +pqsflows 9640/tcp # ProQueSys Flows Service +zoomcp 9666/tcp # Zoom Control Panel Game Server Management +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp # Cross-platform Music Multiplexing System +tec5-sdctp 9668/tcp # tec5 Spectral Device Control Protocol +tec5-sdctp 9668/udp # tec5 Spectral Device Control Protocol +client-wakeup 9694/tcp # T-Mobile Client Wakeup Message +client-wakeup 9694/udp # T-Mobile Client Wakeup Message +ccnx 9695/tcp # Content Centric Networking +ccnx 9695/udp # Content Centric Networking +board-roar 9700/tcp # Board M.I.T. Service +board-roar 9700/udp # Board M.I.T. Service +l5nas-parchan 9747/tcp # L5NAS Parallel Channel +l5nas-parchan 9747/udp # L5NAS Parallel Channel +board-voip 9750/tcp # Board M.I.T. Synchronous Collaboration +board-voip 9750/udp # Board M.I.T. Synchronous Collaboration +rasadv 9753/tcp # rasadv +rasadv 9753/udp # rasadv +tungsten-http 9762/tcp # WSO2 Tungsten HTTP +tungsten-http 9762/udp # WSO2 Tungsten HTTP +davsrc 9800/tcp # WebDav Source Port +davsrc 9800/udp # WebDav Source Port +sstp-2 9801/tcp # Sakura Script Transfer Protocol-2 +sstp-2 9801/udp # Sakura Script Transfer Protocol-2 +davsrcs 9802/tcp # WebDAV Source TLS/SSL +davsrcs 9802/udp # WebDAV Source TLS/SSL +sapv1 9875/tcp # Session Announcement v1 +sapv1 9875/udp # Session Announcement v1 +sd 9876/tcp # Session Director +kca-service 9878/udp # Certificate Issuance +cyborg-systems 9888/tcp # CYBORG Systems +cyborg-systems 9888/udp # CYBORG Systems +gt-proxy 9889/tcp # Port for Cable network related data proxy or repeater +gt-proxy 9889/udp # Port for Cable network related data proxy or repeater +monkeycom 9898/tcp # MonkeyCom +monkeycom 9898/udp # MonkeyCom +sctp-tunneling 9899/udp # SCTP TUNNELING +iua 9900/tcp # IUA +iua 9900/udp # IUA +iua 9900/sctp # IUA +enrp 9901/udp # enrp server channel +enrp-sctp 9901/sctp # enrp server channel +enrp-sctp-tls 9902/sctp # enrp/tls server channel +multicast-ping 9903/tcp # Multicast Ping Protocol +multicast-ping 9903/udp # Multicast Ping Protocol +domaintime 9909/tcp # domaintime +domaintime 9909/udp # domaintime +sype-transport 9911/tcp # SYPECom Transport Protocol +sype-transport 9911/udp # SYPECom Transport Protocol +xybrid-cloud 9925/tcp # XYBRID Cloud +apc-9950 9950/tcp # APC 9950 +apc-9950 9950/udp # APC 9950 +apc-9951 9951/tcp # APC 9951 +apc-9951 9951/udp # APC 9951 +apc-9952 9952/tcp # APC 9952 +apc-9952 9952/udp # APC 9952 +acis 9953/tcp # 9953 +acis 9953/udp # 9953 +hinp 9954/tcp # HaloteC Instrument Network +alljoyn-stm 9955/tcp # Contact Port for AllJoyn +alljoyn-mcm 9955/udp # multiplexed constrained messaging +alljoyn 9956/udp # Alljoyn Name Service +odnsp 9966/tcp # OKI Data Network Setting Protocol +odnsp 9966/udp # OKI Data Network Setting Protocol +xybrid-rt 9978/tcp # XYBRID RT Server +dsm-scm-target 9987/tcp # DSM/SCM Target Interface +dsm-scm-target 9987/udp # DSM/SCM Target Interface +nsesrvr 9988/tcp # Software Essentials Secure HTTP server +osm-appsrvr 9990/tcp # OSM Applet Server +osm-appsrvr 9990/udp # OSM Applet Server +osm-oev 9991/tcp # OSM Event Server +osm-oev 9991/udp # OSM Event Server +palace-1 9992/tcp # OnLive-1 +palace-1 9992/udp # OnLive-1 +palace-2 9993/tcp # OnLive-2 +palace-2 9993/udp # OnLive-2 +palace-3 9994/tcp # OnLive-3 +palace-3 9994/udp # OnLive-3 +palace-4 9995/tcp # Palace-4 +palace-4 9995/udp # Palace-4 +palace-5 9996/tcp # Palace-5 +palace-5 9996/udp # Palace-5 +palace-6 9997/tcp # Palace-6 +palace-6 9997/udp # Palace-6 +distinct32 9998/tcp # Distinct32 +distinct32 9998/udp # Distinct32 +distinct 9999/tcp # distinct +distinct 9999/udp # distinct +ndmp 10000/tcp # Network Data Management Protocol +ndmp 10000/udp # Network Data Management Protocol +scp-config 10001/tcp # SCP Configuration +scp-config 10001/udp # SCP Configuration +documentum 10002/tcp # EMC-Documentum Content Server Product +documentum 10002/udp # EMC-Documentum Content Server Product +documentum_s 10003/tcp documentum-s # EMC-Documentum Content Server Product +documentum_s 10003/udp documentum-s # EMC-Documentum Content Server Product +emcrmirccd 10004/tcp # EMC Replication Manager Client +emcrmird 10005/tcp # EMC Replication Manager Server +netapp-sync 10006/tcp # Sync replication protocol among different NetApp platforms +mvs-capacity 10007/tcp # MVS Capacity +mvs-capacity 10007/udp # MVS Capacity +octopus 10008/tcp # Octopus Multiplexer +octopus 10008/udp # Octopus Multiplexer +swdtp-sv 10009/tcp # Systemwalker Desktop Patrol +swdtp-sv 10009/udp # Systemwalker Desktop Patrol +rxapi 10010/tcp # ooRexx rxapi services +cefdvmp 10023/udp # Comtech EF-Data's Vipersat Management Protocol (likely typo in IANA reservation) +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp # Zabbix Agent +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp # Zabbix Trapper +qptlmd 10055/tcp # Quantapoint FLEXlm Licensing Service +itap-ddtp 10100/tcp # VERITAS ITAP DDTP +itap-ddtp 10100/udp # VERITAS ITAP DDTP +ezmeeting-2 10101/tcp # eZmeeting +ezmeeting-2 10101/udp # eZmeeting +ezproxy-2 10102/tcp # eZproxy +ezproxy-2 10102/udp # eZproxy +ezrelay 10103/tcp # eZrelay +ezrelay 10103/udp # eZrelay +swdtp 10104/tcp # Systemwalker Desktop Patrol +swdtp 10104/udp # Systemwalker Desktop Patrol +bctp-server 10107/tcp # VERITAS BCTP, server +bctp-server 10107/udp # VERITAS BCTP, server +nmea-0183 10110/tcp # NMEA-0183 Navigational Data +nmea-0183 10110/udp # NMEA-0183 Navigational Data +nmea-onenet 10111/udp # NMEA OneNet multicast messaging +netiq-endpoint 10113/tcp # NetIQ Endpoint +netiq-endpoint 10113/udp # NetIQ Endpoint +netiq-qcheck 10114/tcp # NetIQ Qcheck +netiq-qcheck 10114/udp # NetIQ Qcheck +netiq-endpt 10115/tcp # NetIQ Endpoint +netiq-endpt 10115/udp # NetIQ Endpoint +netiq-voipa 10116/tcp # NetIQ VoIP Assessor +netiq-voipa 10116/udp # NetIQ VoIP Assessor +iqrm 10117/tcp # NetIQ IQCResource Managament Svc +iqrm 10117/udp # NetIQ IQCResource Managament Svc +cimple 10125/udp # HotLink CIMple REST API +bmc-perf-sd 10128/tcp # BMC-PERFORM-SERVICE DAEMON +bmc-perf-sd 10128/udp # BMC-PERFORM-SERVICE DAEMON +bmc-gms 10129/tcp # BMC General Manager Server +qb-db-server 10160/tcp # QB Database Server +qb-db-server 10160/udp # QB Database Server +snmptls 10161/tcp # SNMP-TLS +snmpdtls 10161/udp # SNMP-DTLS +snmptls-trap 10162/tcp # SNMP-Trap-TLS +snmpdtls-trap 10162/udp # SNMP-Trap-DTLS +trisoap 10200/tcp # Trigence AE Soap Service +trisoap 10200/udp # Trigence AE Soap Service +rsms 10201/tcp # Remote Server Management Service +rscs 10201/udp # Remote Server Control and Test Service +apollo-relay 10252/tcp # Apollo Relay Port +apollo-relay 10252/udp # Apollo Relay Port +eapol-relay 10253/udp # Relay of EAPOL frames +axis-wimp-port 10260/tcp # Axis WIMP Port +axis-wimp-port 10260/udp # Axis WIMP Port +blocks 10288/tcp # Blocks +blocks 10288/udp # Blocks +cosir 10321/tcp # Computer Op System Information Report +bngsync 10439/udp # BalanceNG session table synchronization protocol +hip-nat-t 10500/udp # HIP NAT-traversal +MOS-lower 10540/tcp # MOS Media Object Metadata Port +MOS-lower 10540/udp # MOS Media Object Metadata Port +MOS-upper 10541/tcp # MOS Running Order Port +MOS-upper 10541/udp # MOS Running Order Port +MOS-aux 10542/tcp # MOS Low Priority Port +MOS-aux 10542/udp # MOS Low Priority Port +MOS-soap 10543/tcp # MOS SOAP Default Port +MOS-soap 10543/udp # MOS SOAP Default Port +MOS-soap-opt 10544/tcp # MOS SOAP Optional Port +MOS-soap-opt 10544/udp # MOS SOAP Optional Port +serverdocs 10548/tcp # Apple Document Sharing +printopia 10631/tcp # administration and control of "Printopia" +gap 10800/tcp # Gestor de Acaparamiento para Pocket PCs +gap 10800/udp # Gestor de Acaparamiento para Pocket PCs +lpdg 10805/tcp # LUCIA Pareja Data Group +lpdg 10805/udp # LUCIA Pareja Data Group +nbd 10809/tcp # Linux Network Block Device +nmc-disc 10810/udp # Nuance Mobile Care Discovery +helix 10860/tcp # Helix Client/Server +helix 10860/udp # Helix Client/Server +bveapi 10880/tcp # BVEssentials HTTP API +bveapi 10880/udp # BVEssentials HTTP API +octopustentacle 10933/tcp # Octopus Deploy Tentacle +rmiaux 10990/tcp # Auxiliary RMI Port +rmiaux 10990/udp # Auxiliary RMI Port +irisa 11000/tcp # IRISA +irisa 11000/udp # IRISA +metasys 11001/tcp # Metasys +metasys 11001/udp # Metasys +cefd-vmp 11023/udp # Comtech EF-Data's Vipersat Management Protocol (is listed as 10023 in IANA) +weave 11095/tcp # Nest device-to-device and device-to-service application protocol +weave 11095/udp # Nest device-to-device and device-to-service application protocol +origo-sync 11103/tcp # OrigoDB Server Sync +netapp-icmgmt 11104/tcp # NetApp Intercluster Management +netapp-icdata 11105/tcp # NetApp Intercluster Data +sgi-lk 11106/tcp # SGI LK Licensing service +sgi-lk 11106/udp # SGI LK Licensing service +myq-termlink 11108/udp # Hardware Terminals Discovery protocol +sgi-dmfmgr 11109/tcp # Data migration facility manager +sgi-soap 11110/tcp # Data migration facility SOAP +vce 11111/tcp # Viral Computing Environment (VCE) +vce 11111/udp # Viral Computing Environment (VCE) +dicom 11112/tcp # DICOM +dicom 11112/udp # DICOM +suncacao-snmp 11161/tcp # sun cacao snmp access point +suncacao-snmp 11161/udp # sun cacao snmp access point +suncacao-jmxmp 11162/tcp # sun cacao JMX-remoting access point +suncacao-jmxmp 11162/udp # sun cacao JMX-remoting access point +suncacao-rmi 11163/tcp # sun cacao rmi registry access point +suncacao-rmi 11163/udp # sun cacao rmi registry access point +suncacao-csa 11164/tcp # sun cacao command-streaming access point +suncacao-csa 11164/udp # sun cacao command-streaming access point +suncacao-websvc 11165/tcp # sun cacao web service access point +suncacao-websvc 11165/udp # sun cacao web service access point +snss 11171/udp # Surgical Notes Security Service Discovery (SNSS) +oemcacao-jmxmp 11172/tcp # OEM cacao JMX-remoting access point +t5-straton 11173/tcp # Straton Runtime Programing +oemcacao-rmi 11174/tcp # OEM cacao rmi registry access point +oemcacao-websvc 11175/tcp # OEM cacao web service access point +smsqp 11201/tcp # smsqp +smsqp 11201/udp # smsqp +dcsl-backup 11202/tcp # DCSL Network Backup Services +wifree 11208/tcp # WiFree Service +wifree 11208/udp # WiFree Service +memcache 11211/tcp # Memory cache service +memcache 11211/udp # Memory cache service +imip 11319/tcp # IMIP +imip 11319/udp # IMIP +imip-channels 11320/tcp # IMIP Channels Port +imip-channels 11320/udp # IMIP Channels Port +arena-server 11321/tcp # Arena Server Listen +arena-server 11321/udp # Arena Server Listen +atm-uhas 11367/tcp # ATM UHAS +atm-uhas 11367/udp # ATM UHAS +lsdp 11430/udp # Lenbrook Service Discovery Protocol +tempest-port 11600/tcp # Tempest Protocol Port +tempest-port 11600/udp # Tempest Protocol Port +emc-xsw-dconfig 11623/tcp # EMC XtremSW distributed config +emc-xsw-dcache 11723/tcp # EMC XtremSW distributed cache +emc-xsw-dcache 11723/udp # EMC XtremSW distributed cache +intrepid-ssl 11751/tcp # Intrepid SSL +intrepid-ssl 11751/udp # Intrepid SSL +lanschool 11796/tcp # LanSchool +lanschool-mpt 11796/udp # Lanschool Multipoint +xoraya 11876/tcp # X2E Xoraya Multichannel protocol +xoraya 11876/udp # X2E Xoraya Multichannel protocol +x2e-disc 11877/udp # X2E service discovery protocol +sysinfo-sp 11967/tcp # SysInfo Service Protocol +sysinfo-sp 11967/udp # SysInfo Sercice Protocol +wmereceiving 11997/sctp # WorldMailExpress +wmedistribution 11998/sctp # WorldMailExpress +wmereporting 11999/sctp # WorldMailExpress +entextxid 12000/tcp # IBM Enterprise Extender SNA XID Exchange +entextxid 12000/udp # IBM Enterprise Extender SNA XID Exchange +entextnetwk 12001/tcp # IBM Enterprise Extender SNA COS Network Priority +entextnetwk 12001/udp # IBM Enterprise Extender SNA COS Network Priority +entexthigh 12002/tcp # IBM Enterprise Extender SNA COS High Priority +entexthigh 12002/udp # IBM Enterprise Extender SNA COS High Priority +entextmed 12003/tcp # IBM Enterprise Extender SNA COS Medium Priority +entextmed 12003/udp # IBM Enterprise Extender SNA COS Medium Priority +entextlow 12004/tcp # IBM Enterprise Extender SNA COS Low Priority +entextlow 12004/udp # IBM Enterprise Extender SNA COS Low Priority +dbisamserver1 12005/tcp # DBISAM Database Server - Regular +dbisamserver1 12005/udp # DBISAM Database Server - Regular +dbisamserver2 12006/tcp # DBISAM Database Server - Admin +dbisamserver2 12006/udp # DBISAM Database Server - Admin +accuracer 12007/tcp # Accuracer Database System √± Server +accuracer 12007/udp # Accuracer Database System √± Server +accuracer-dbms 12008/tcp # Accuracer Database System √± Admin +accuracer-dbms 12008/udp # Accuracer Database System √± Admin +ghvpn 12009/udp # Green Hills VPN +edbsrvr 12010/tcp # ElevateDB Server +vipera 12012/tcp # Vipera Messaging Service +vipera 12012/udp # Vipera Messaging Service +vipera-ssl 12013/tcp # Vipera Messaging Service over SSL Communication +vipera-ssl 12013/udp # Vipera Messaging Service over SSL Communication +rets-ssl 12109/tcp # RETS over SSL +rets-ssl 12109/udp # RETS over SSL +nupaper-ss 12121/tcp # NuPaper Session Service +nupaper-ss 12121/udp # NuPaper Session Service +cawas 12168/tcp # CA Web Access Service +cawas 12168/udp # CA Web Access Service +hivep 12172/tcp # HiveP +hivep 12172/udp # HiveP +linogridengine 12300/tcp # LinoGrid Engine +linogridengine 12300/udp # LinoGrid Engine +rads 12302/tcp # Remote Administration Daemon +warehouse-sss 12321/tcp # Warehouse Monitoring Syst SSS +warehouse-sss 12321/udp # Warehouse Monitoring Syst SSS +warehouse 12322/tcp # Warehouse Monitoring Syst +warehouse 12322/udp # Warehouse Monitoring Syst +italk 12345/tcp # Italk Chat System +italk 12345/udp # Italk Chat System +tsaf 12753/tcp # tsaf port +tsaf 12753/udp # tsaf port +netperf 12865/tcp # control port for netperf benchmark +i-zipqd 13160/tcp # I-ZIPQD +i-zipqd 13160/udp # I-ZIPQD +bcslogc 13216/tcp # Black Crow Software application logging +bcslogc 13216/udp # Black Crow Software application logging +rs-pias 13217/tcp # R&S Proxy Installation Assistant Service +rs-pias 13217/udp # R&S Proxy Installation Assistant Service +emc-vcas-tcp 13218/tcp # EMC Virtual CAS Service +emc-vcas-udp 13218/udp # EMV Virtual CAS Service Discovery +powwow-client 13223/tcp # PowWow Client +powwow-client 13223/udp # PowWow Client +powwow-server 13224/tcp # PowWow Server +powwow-server 13224/udp # PowWow Server +doip-data 13400/tcp # DoIP Data +doip-disc 13400/udp # DoIP Discovery +nbdb 13785/tcp # NetBackup Database +nbdb 13785/udp # NetBackup Database +nomdb 13786/tcp # Veritas-nomdb +nomdb 13786/udp # Veritas-nomdb +dsmcc-config 13818/tcp # DSMCC Config +dsmcc-config 13818/udp # DSMCC Config +dsmcc-session 13819/tcp # DSMCC Session Messages +dsmcc-session 13819/udp # DSMCC Session Messages +dsmcc-passthru 13820/tcp # DSMCC Pass-Thru Messages +dsmcc-passthru 13820/udp # DSMCC Pass-Thru Messages +dsmcc-download 13821/tcp # DSMCC Download Protocol +dsmcc-download 13821/udp # DSMCC Download Protocol +dsmcc-ccp 13822/tcp # DSMCC Channel Change Protocol +dsmcc-ccp 13822/udp # DSMCC Channel Change Protocol +bmdss 13823/tcp # Blackmagic Design Streaming Server +ucontrol 13894/tcp # Ultimate Control communication protocol +ucontrol 13894/udp # Ultimate Control communication protocol +dta-systems 13929/tcp # D-TA SYSTEMS +dta-systems 13929/udp # D-TA SYSTEMS +medevolve 13930/tcp # MedEvolve Port Requester +scotty-ft 14000/tcp # SCOTTY High-Speed Filetransfer +scotty-ft 14000/udp # SCOTTY High-Speed Filetransfer +sua 14001/tcp # SUA +sua 14001/udp # De-Registered (2001 June 06) +sua 14001/sctp # SUA +scotty-disc 14002/udp # Discovery of a SCOTTY hardware codec board +sage-best-com1 14033/tcp # sage Best! Config Server 1 +sage-best-com1 14033/udp # sage Best! Config Server 1 +sage-best-com2 14034/tcp # sage Best! Config Server 2 +sage-best-com2 14034/udp # sage Best! Config Server 2 +vcs-app 14141/tcp # VCS Application +vcs-app 14141/udp # VCS Application +icpp 14142/tcp # IceWall Cert Protocol +icpp 14142/udp # IceWall Cert Protocol +icpps 14143/tcp # IceWall Cert Protocol over TLS +gcm-app 14145/tcp # GCM Application +gcm-app 14145/udp # GCM Application +vrts-tdd 14149/tcp # Veritas Traffic Director +vrts-tdd 14149/udp # Veritas Traffic Director +vcscmd 14150/tcp # Veritas Cluster Server Command Server +vad 14154/tcp # Veritas Application Director +vad 14154/udp # Veritas Application Director +cps 14250/tcp # Fencing Server +cps 14250/udp # Fencing Server +ca-web-update 14414/tcp # CA eTrust Web Update Service +ca-web-update 14414/udp # CA eTrust Web Update Service +hde-lcesrvr-1 14936/tcp # hde-lcesrvr-1 +hde-lcesrvr-1 14936/udp # hde-lcesrvr-1 +hde-lcesrvr-2 14937/tcp # hde-lcesrvr-2 +hde-lcesrvr-2 14937/udp # hde-lcesrvr-2 +hydap 15000/tcp # Hypack Data Aquisition +hydap 15000/udp # Hypack Data Aquisition +onep-tls 15001/tcp # Open Network Environment TLS +# onep-tls 15002/tcp # Open Network Environment TLS +v2g-secc 15118/udp # v2g Supply Equipment Communication Controller Discovery Protocol +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp # XPilot Contact Port +3link 15363/tcp # 3Link Negotiation +3link 15363/udp # 3Link Negotiation +cisco-snat 15555/tcp # Cisco Stateful NAT +cisco-snat 15555/udp # Cisco Stateful NAT +bex-xr 15660/tcp # Backup Express Restore Server +bex-xr 15660/udp # Backup Express Restore Server +ptp 15740/tcp # Picture Transfer Protocol +ptp 15740/udp # Picture Transfer Protocol +2ping 15998/udp # 2ping Bi-Directional Ping Service +programmar 15999/tcp # ProGrammar Enterprise +fmsas 16000/tcp # Administration Server Access +fmsascon 16001/tcp # Administration Server Connector +gsms 16002/tcp # GoodSync Mediation Service +alfin 16003/udp # Automation and Control by REGULACE.ORG +jwpc 16020/tcp # Filemaker Java Web Publishing Core +jwpc-bin 16021/tcp # Filemaker Java Web Publishing Core Binary +sun-sea-port 16161/tcp # Solaris SEA Port +sun-sea-port 16161/udp # Solaris SEA Port +solaris-audit 16162/tcp # Solaris Audit - secure remote audit log +etb4j 16309/tcp # etb4j +etb4j 16309/udp # etb4j +pduncs 16310/tcp # Policy Distribute, Update Notification +pduncs 16310/udp # Policy Distribute, Update Notification +pdefmns 16311/tcp # Policy definition and update management +pdefmns 16311/udp # Policy definition and update management +netserialext1 16360/tcp # Network Serial Extension Ports One +netserialext1 16360/udp # Network Serial Extension Ports One +netserialext2 16361/tcp # Network Serial Extension Ports Two +netserialext2 16361/udp # Network Serial Extension Ports Two +netserialext3 16367/tcp # Network Serial Extension Ports Three +netserialext3 16367/udp # Network Serial Extension Ports Three +netserialext4 16368/tcp # Network Serial Extension Ports Four +netserialext4 16368/udp # Network Serial Extension Ports Four +connected 16384/tcp # Connected Corp +connected 16384/udp # Connected Corp +rdgs 16385/tcp # Reliable Datagram Sockets +xoms 16619/tcp # X509 Objects Management Service +axon-tunnel 16665/tcp # Reliable multipath data transport for high latencies +vtp 16666/udp # Vidder Tunnel Protocol +cadsisvr 16789/tcp # mainframe External Security Managers +newbay-snc-mc 16900/tcp # Newbay Mobile Client Update Service +newbay-snc-mc 16900/udp # Newbay Mobile Client Update Service +sgcip 16950/tcp # Simple Generic Client Interface Protocol +sgcip 16950/udp # Simple Generic Client Interface Protocol +intel-rci-mp 16991/tcp # INTEL-RCI-MP +intel-rci-mp 16991/udp # INTEL-RCI-MP +amt-soap-http 16992/tcp # Intel(R) AMT SOAP/HTTP +amt-soap-http 16992/udp # Intel(R) AMT SOAP/HTTP +amt-soap-https 16993/tcp # Intel(R) AMT SOAP/HTTPS +amt-soap-https 16993/udp # Intel(R) AMT SOAP/HTTPS +amt-redir-tcp 16994/tcp # Intel(R) AMT Redirection/TCP +amt-redir-tcp 16994/udp # Intel(R) AMT Redirection/TCP +amt-redir-tls 16995/tcp # Intel(R) AMT Redirection/TLS +amt-redir-tls 16995/udp # Intel(R) AMT Redirection/TLS +isode-dua 17007/tcp # +isode-dua 17007/udp # +vestasdlp 17184/tcp # Vestas Data Layer Protocol +soundsvirtual 17185/tcp # Sounds Virtual +soundsvirtual 17185/udp # Sounds Virtual +chipper 17219/tcp # Chipper +chipper 17219/udp # Chipper +avtp 17220/tcp # IEEE 1722 Transport Protocol for Time Sensitive Applications +avtp 17220/udp # IEEE 1722 Transport Protocol for Time Sensitive Applications +avdecc 17221/tcp # IEEE 1722.1 AVB Discovery, Enumeration, Connection management, and Control +avdecc 17221/udp # IEEE 1722.1 AVB Discovery, Enumeration, Connection management, and Control +cpsp 17222/udp # Control Plane Synchronization Protocol +isa100-gci 17223/tcp # ISA100 Wireless gateway to client +trdp-pd 17224/udp # Train Realtime Data Protocol +trdp-md 17225/tcp # Train Realtime Data Protocol +trdp-md 17225/udp # Train Realtime Data Protocol +integrius-stp 17234/tcp # Integrius Secure Tunnel Protocol +integrius-stp 17234/udp # Integrius Secure Tunnel Protocol +ssh-mgmt 17235/tcp # SSH Tectia Manager +ssh-mgmt 17235/udp # SSH Tectia Manager +db-lsp 17500/tcp # Dropbox LanSync Protocol +db-lsp-disc 17500/udp # Dropbox LanSync Discovery +ailith 17555/tcp # Ailith management of routers +ea 17729/tcp # Eclipse Aviation +ea 17729/udp # Eclipse Aviation +zep 17754/tcp # Encap. ZigBee Packets +zep 17754/udp # Encap. ZigBee Packets +zigbee-ip 17755/tcp # ZigBee IP Transport Service +zigbee-ip 17755/udp # ZigBee IP Transport Service +zigbee-ips 17756/tcp # ZigBee IP Transport Secure Service +zigbee-ips 17756/udp # ZigBee IP Transport Secure Service +sw-orion 17777/tcp # SolarWinds Orion +biimenu 18000/tcp # Beckman Instruments, Inc. +biimenu 18000/udp # Beckman Instruments, Inc. +radpdf 18104/tcp # RAD PDF Service +racf 18136/tcp # z/OS Resource Access Control Facility +opsec-cvp 18181/tcp # OPSEC CVP +opsec-cvp 18181/udp # OPSEC CVP +opsec-ufp 18182/tcp # OPSEC UFP +opsec-ufp 18182/udp # OPSEC UFP +opsec-sam 18183/tcp # OPSEC SAM +opsec-sam 18183/udp # OPSEC SAM +opsec-lea 18184/tcp # OPSEC LEA +opsec-lea 18184/udp # OPSEC LEA +opsec-omi 18185/tcp # OPSEC OMI +opsec-omi 18185/udp # OPSEC OMI +ohsc 18186/tcp # Occupational Health SC +ohsc 18186/udp # Occupational Health Sc +opsec-ela 18187/tcp # OPSEC ELA +opsec-ela 18187/udp # OPSEC ELA +checkpoint-rtm 18241/tcp # Check Point RTM +checkpoint-rtm 18241/udp # Check Point RTM +iclid 18242/tcp # Checkpoint router monitoring +clusterxl 18243/tcp # Checkpoint router state backup +gv-pf 18262/tcp # GV NetConfig Service +gv-pf 18262/udp # GV NetConfig Service +ac-cluster 18463/tcp # AC Cluster +ac-cluster 18463/udp # AC Cluster +rds-ib 18634/tcp # Reliable Datagram Service +rds-ib 18634/udp # Reliable Datagram Service +rds-ip 18635/tcp # Reliable Datagram Service over IP +rds-ip 18635/udp # Reliable Datagram Service over IP +ique 18769/tcp # IQue Protocol +ique 18769/udp # IQue Protocol +infotos 18881/tcp # Infotos +infotos 18881/udp # Infotos +apc-necmp 18888/tcp # APCNECMP +apc-necmp 18888/udp # APCNECMP +igrid 19000/tcp # iGrid Server +igrid 19000/udp # iGrid Server +scintilla 19007/tcp # Scintilla protocol for device services +scintilla 19007/udp # Scintilla protocol for device services +j-link 19020/tcp # J-Link TCP/IP Protocol +opsec-uaa 19191/tcp # OPSEC UAA +opsec-uaa 19191/udp # OPSEC UAA +ua-secureagent 19194/tcp # UserAuthority SecureAgent +ua-secureagent 19194/udp # UserAuthority SecureAgent +keysrvr 19283/tcp # Key Server for SASSAFRAS +keysrvr 19283/udp # Key Server for SASSAFRAS +keyshadow 19315/tcp # Key Shadow for SASSAFRAS +keyshadow 19315/udp # Key Shadow for SASSAFRAS +mtrgtrans 19398/tcp # mtrgtrans +mtrgtrans 19398/udp # mtrgtrans +hp-sco 19410/tcp # hp-sco +hp-sco 19410/udp # hp-sco +hp-sca 19411/tcp # hp-sca +hp-sca 19411/udp # hp-sca +hp-sessmon 19412/tcp # HP-SESSMON +hp-sessmon 19412/udp # HP-SESSMON +fxuptp 19539/tcp # FXUPTP +fxuptp 19539/udp # FXUPTP +sxuptp 19540/tcp # SXUPTP +sxuptp 19540/udp # SXUPTP +jcp 19541/tcp # JCP Client +jcp 19541/udp # JCP Client +mle 19788/udp # Mesh Link Establishment +iec-104-sec 19998/tcp # IEC 60870-5-104 process control - secure +dnp-sec 19999/tcp # Distributed Network Protocol - Secure +dnp-sec 19999/udp # Distributed Network Protocol - Secure +dnp 20000/tcp # DNP +dnp 20000/udp # DNP +microsan 20001/tcp # MicroSAN +microsan 20001/udp # MicroSAN +commtact-http 20002/tcp # Commtact HTTP +commtact-http 20002/udp # Commtact HTTP +commtact-https 20003/tcp # Commtact HTTPS +commtact-https 20003/udp # Commtact HTTPS +openwebnet 20005/tcp # OpenWebNet protocol for electric network +openwebnet 20005/udp # OpenWebNet protocol for electric network +ss-idi-disc 20012/udp # Samsung Interdevice Interaction discovery +ss-idi 20013/tcp # Samsung Interdevice Interaction +opendeploy 20014/tcp # OpenDeploy Listener +opendeploy 20014/udp # OpenDeploy Listener +nburn_id 20034/tcp nburn-id # NetBurner ID Port +nburn_id 20034/udp nburn-id # NetBurner ID Port +tmophl7mts 20046/tcp # TMOP HL7 Message Transfer Service +tmophl7mts 20046/udp # TMOP HL7 Message Transfer Service +mountd 20048/tcp # NFS mount protocol +mountd 20048/udp # NFS mount protocol +nfsrdma 20049/tcp # Network File System (NFS) over RDMA +nfsrdma 20049/udp # Network File System (NFS) over RDMA +nfsrdma 20049/sctp # Network File System (NFS) over RDMA +avesterra 20057/tcp # AvesTerra Hypergraph Transfer Protocol (HGTP) +tolfab 20167/tcp # TOLfab Data Change +tolfab 20167/udp # TOLfab Data Change +ipdtp-port 20202/tcp # IPD Tunneling Port +ipdtp-port 20202/udp # IPD Tunneling Port +ipulse-ics 20222/tcp # iPulse-ICS +ipulse-ics 20222/udp # iPulse-ICS +emwavemsg 20480/tcp # emWave Message Service +emwavemsg 20480/udp # emWave Message Service +track 20670/tcp # Track +track 20670/udp # Track +athand-mmp 20999/tcp # At Hand MMP +athand-mmp 20999/udp # AT Hand MMP +irtrans 21000/tcp # IRTrans Control +irtrans 21000/udp # IRTrans Control +notezilla-lan 21010/tcp # Notezilla.Lan Server +rdm-tfs 21553/tcp # Raima RDM TFS +dfserver 21554/tcp # MineScape Design File Server +dfserver 21554/udp # MineScape Design File Server +vofr-gateway 21590/tcp # VoFR Gateway +vofr-gateway 21590/udp # VoFR Gateway +tvpm 21800/tcp # TVNC Pro Multiplexing +tvpm 21800/udp # TVNC Pro Multiplexing +webphone 21845/tcp # webphone +webphone 21845/udp # webphone +netspeak-is 21846/tcp # NetSpeak Corp. Directory Services +netspeak-is 21846/udp # NetSpeak Corp. Directory Services +netspeak-cs 21847/tcp # NetSpeak Corp. Connection Services +netspeak-cs 21847/udp # NetSpeak Corp. Connection Services +netspeak-acd 21848/tcp # NetSpeak Corp. Automatic Call Distribution +netspeak-acd 21848/udp # NetSpeak Corp. Automatic Call Distribution +netspeak-cps 21849/tcp # NetSpeak Corp. Credit Processing System +netspeak-cps 21849/udp # NetSpeak Corp. Credit Processing System +snapenetio 22000/tcp # SNAPenetIO +snapenetio 22000/udp # SNAPenetIO +optocontrol 22001/tcp # OptoControl +optocontrol 22001/udp # OptoControl +optohost002 22002/tcp # Opto Host Port 2 +optohost002 22002/udp # Opto Host Port 2 +optohost003 22003/tcp # Opto Host Port 3 +optohost003 22003/udp # Opto Host Port 3 +optohost004 22004/tcp # Opto Host Port 4 +optohost004 22004/udp # Opto Host Port 4 +optohost005 22005/tcp # Opto Host Port 5 +optohost005 22005/udp # Opto Host Port 5 +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +easyengine 22222/tcp # EasyEngine is CLI tool to manage WordPress Sites on Nginx server +cis 22305/udp # CompactIS Tunnel +shrewd-control 22335/tcp # Initium Labs Security and Automation Control +shrewd-stream 22335/udp # Initium Labs Security and Automation Streaming +cis-secure 22343/tcp # CompactIS Secure Tunnel +cis-secure 22343/udp # CompactIS Secure Tunnel +WibuKey 22347/tcp # WibuKey Standard WkLan +WibuKey 22347/udp # WibuKey Standard WkLan +CodeMeter 22350/tcp # CodeMeter Standard +CodeMeter 22350/udp # CodeMeter Standard +codemeter-cmwan 22351/tcp # requests of copy protection software +caldsoft-backup 22537/tcp # CaldSoft Backup server file transfer +vocaltec-wconf 22555/tcp # Vocaltec Web Conference +vocaltec-phone 22555/udp # Vocaltec Internet Phone +talikaserver 22763/tcp # Talika Main Server +talikaserver 22763/udp # Talika Main Server +aws-brf 22800/tcp # Telerate Information Platform LAN +aws-brf 22800/udp # Telerate Information Platform LAN +brf-gw 22951/tcp # Telerate Information Platform WAN +brf-gw 22951/udp # Telerate Information Platform WAN +inovaport1 23000/tcp # Inova LightLink Server Type 1 +inovaport1 23000/udp # Inova LightLink Server Type 1 +inovaport2 23001/tcp # Inova LightLink Server Type 2 +inovaport2 23001/udp # Inova LightLink Server Type 2 +inovaport3 23002/tcp # Inova LightLink Server Type 3 +inovaport3 23002/udp # Inova LightLink Server Type 3 +inovaport4 23003/tcp # Inova LightLink Server Type 4 +inovaport4 23003/udp # Inova LightLink Server Type 4 +inovaport5 23004/tcp # Inova LightLink Server Type 5 +inovaport5 23004/udp # Inova LightLink Server Type 5 +inovaport6 23005/tcp # Inova LightLink Server Type 6 +inovaport6 23005/udp # Inova LightLink Server Type 6 +gntp 23053/tcp # Generic Notification Transport Protocol +s102 23272/udp # S102 application +5afe-dir 23294/tcp # 5AFE SDN Directory +5afe-disc 23294/udp # 5AFE SDN Directory discovery +elxmgmt 23333/tcp # Emulex HBAnyware Remote Management +elxmgmt 23333/udp # Emulex HBAnyware Remote Management +novar-dbase 23400/tcp # Novar Data +novar-dbase 23400/udp # Novar Data +novar-alarm 23401/tcp # Novar Alarm +novar-alarm 23401/udp # Novar Alarm +novar-global 23402/tcp # Novar Global +novar-global 23402/udp # Novar Global +aequus 23456/tcp # Aequus Service +aequus-alt 23457/tcp # Aequus Service Mgmt +areaguard-neo 23546/tcp # AreaGuard Neo - WebServer +med-ltp 24000/tcp # med-ltp +med-ltp 24000/udp # med-ltp +med-fsp-rx 24001/tcp # med-fsp-rx +med-fsp-rx 24001/udp # med-fsp-rx +med-fsp-tx 24002/tcp # med-fsp-tx +med-fsp-tx 24002/udp # med-fsp-tx +med-supp 24003/tcp # med-supp +med-supp 24003/udp # med-supp +med-ovw 24004/tcp # med-ovw +med-ovw 24004/udp # med-ovw +med-ci 24005/tcp # med-ci +med-ci 24005/udp # med-ci +med-net-svc 24006/tcp # med-net-svc +med-net-svc 24006/udp # med-net-svc +filesphere 24242/tcp # fileSphere +filesphere 24242/udp # fileSphere +vista-4gl 24249/tcp # Vista 4GL +vista-4gl 24249/udp # Vista 4GL +ild 24321/tcp # Isolv Local Directory +ild 24321/udp # Isolv Local Directory +hid 24322/udp # Human Interface Device data streams transport +intel_rci 24386/tcp intel-rci # Intel RCI +intel_rci 24386/udp intel-rci # Intel RCI +tonidods 24465/tcp # Tonido Domain Server +tonidods 24465/udp # Tonido Domain Server +bilobit 24577/tcp # bilobit Service +bilobit-update 24577/udp # bilobit Service Update +flashfiler 24677/tcp # FlashFiler +flashfiler 24677/udp # FlashFiler +proactivate 24678/tcp # Turbopower Proactivate +proactivate 24678/udp # Turbopower Proactivate +tcc-http 24680/tcp # TCC User HTTP Service +tcc-http 24680/udp # TCC User HTTP Service +cslg 24754/tcp # Citrix StorageLink Gateway +assoc-disc 24850/udp # Device Association Discovery +find 24922/tcp # Find Identification of Network Devices +find 24922/udp # Find Identification of Network Devices +icl-twobase1 25000/tcp # icl-twobase1 +icl-twobase1 25000/udp # icl-twobase1 +icl-twobase2 25001/tcp # icl-twobase2 +icl-twobase2 25001/udp # icl-twobase2 +icl-twobase3 25002/tcp # icl-twobase3 +icl-twobase3 25002/udp # icl-twobase3 +icl-twobase4 25003/tcp # icl-twobase4 +icl-twobase4 25003/udp # icl-twobase4 +icl-twobase5 25004/tcp # icl-twobase5 +icl-twobase5 25004/udp # icl-twobase5 +icl-twobase6 25005/tcp # icl-twobase6 +icl-twobase6 25005/udp # icl-twobase6 +icl-twobase7 25006/tcp # icl-twobase7 +icl-twobase7 25006/udp # icl-twobase7 +icl-twobase8 25007/tcp # icl-twobase8 +icl-twobase8 25007/udp # icl-twobase8 +icl-twobase9 25008/tcp # icl-twobase9 +icl-twobase9 25008/udp # icl-twobase9 +icl-twobase10 25009/tcp # icl-twobase10 +icl-twobase10 25009/udp # icl-twobase10 +rna 25471/sctp # RNSAP User Adaptation for Iurh +sauterdongle 25576/tcp # Sauter Dongle +idtp 25604/tcp # Identifier Tracing Protocol +vocaltec-hos 25793/tcp # Vocaltec Address Server +vocaltec-hos 25793/udp # Vocaltec Address Server +tasp-net 25900/tcp # TASP Network Comm +tasp-net 25900/udp # TASP Network Comm +niobserver 25901/tcp # NIObserver +niobserver 25901/udp # NIObserver +nilinkanalyst 25902/tcp # NILinkAnalyst +nilinkanalyst 25902/udp # NILinkAnalyst +niprobe 25903/tcp # NIProbe +niprobe 25903/udp # NIProbe +bf-game 25954/udp # Bitfighter game server +bf-master 25955/udp # Bitfighter master server +scscp 26133/tcp # Symbolic Computation Software Composability Protocol +scscp 26133/udp # Symbolic Computation Software Composability Protocol +cockroach 26257/tcp # CockroachDB +ezproxy 26260/tcp # eZproxy +ezproxy 26260/udp # eZproxy +ezmeeting 26261/tcp # eZmeeting +ezmeeting 26261/udp # eZmeeting +k3software-svr 26262/tcp # K3 Software-Server +k3software-svr 26262/udp # K3 Software-Server +k3software-cli 26263/tcp # K3 Software-Client +k3software-cli 26263/udp # K3 Software-Client +exoline-tcp 26486/tcp # EXOline-TCP +exoline-udp 26486/udp # EXOline-UDP +exoconfig 26487/tcp # EXOconfig +exoconfig 26487/udp # EXOconfig +exonet 26489/tcp # EXOnet +exonet 26489/udp # EXOnet +imagepump 27345/tcp # ImagePump +imagepump 27345/udp # ImagePump +jesmsjc 27442/tcp # Job controller service +jesmsjc 27442/udp # Job controller service +kopek-httphead 27504/tcp # Kopek HTTP Head Port +kopek-httphead 27504/udp # Kopek HTTP Head Port +ars-vista 27782/tcp # ARS VISTA Application +ars-vista 27782/udp # ARS VISTA Application +astrolink 27876/tcp # Astrolink Protocol +tw-auth-key 27999/tcp # TW Authentication/Key Distribution and +tw-auth-key 27999/udp # Attribute Certificate Services +nxlmd 28000/tcp # NX License Manager +nxlmd 28000/udp # NX License Manager +pqsp 28001/tcp # PQ Service +a27-ran-ran 28119/udp # A27 cdma2000 RAN Management +voxelstorm 28200/tcp # VoxelStorm game server +voxelstorm 28200/udp # VoxelStorm game server +siemensgsm 28240/tcp # Siemens GSM +siemensgsm 28240/udp # Siemens GSM +bosswave 28589/tcp # Building operating system services wide area verified exchange +sgsap 29118/sctp # SGsAP in 3GPP +otmp 29167/tcp # ObTools Message Protocol +otmp 29167/udp # ObTools Message Protocol +sbcap 29168/sctp # SBcAP in 3GPP +iuhsctpassoc 29169/sctp # HNBAP and RUA Common Association +bingbang 29999/tcp # data exchange protocol for IEC61850 inn wind power plants +ndmps 30000/tcp # Secure Network Data Management Protocol +pago-services1 30001/tcp # Pago Services 1 +pago-services1 30001/udp # Pago Services 1 +pago-services2 30002/tcp # Pago Services 2 +pago-services2 30002/udp # Pago Services 2 +amicon-fpsu-ra 30003/tcp # Amicon FPSU-IP Remote Administration +amicon-fpsu-ra 30003/udp # Amicon FPSU-IP Remote Administration +amicon-fpsu-s 30004/udp # Amicon FPSU-IP VPN +rwp 30100/tcp # Remote Window Protocol +rwp 30100/sctp # Remote Window Protocol +kingdomsonline 30260/tcp # Kingdoms Online (CraigAvenue) +kingdomsonline 30260/udp # Kingdoms Online (CraigAvenue) +samsung-disc 30832/udp # Samsung Convergence Discovery Protocol +ovobs 30999/tcp # OpenView Service Desk Client +ovobs 30999/udp # OpenView Service Desk Client +autotrac-acp 31020/tcp # Autotrac ACP 245 +yawn 31029/udp # YaWN - Yet Another Windows Notifie +pace-licensed 31400/tcp # PACE license server +xqosd 31416/tcp # XQoS network monitor +xqosd 31416/udp # XQoS network monitor +tetrinet 31457/tcp # TetriNET Protocol +tetrinet 31457/udp # TetriNET Protocol +lm-mon 31620/tcp # lm mon +lm-mon 31620/udp # lm mon +dsx_monitor 31685/tcp dsx-monitor # DS Expert Monitor +gamesmith-port 31765/tcp # GameSmith Port +gamesmith-port 31765/udp # GameSmith Port +iceedcp_tx 31948/tcp iceedcp-tx # Embedded Device Configuration Protocol TX +iceedcp_tx 31948/udp iceedcp-tx # Embedded Device Configuration Protocol TX +iceedcp_rx 31949/tcp iceedcp-rx # Embedded Device Configuration Protocol RX +iceedcp_rx 31949/udp iceedcp-rx # Embedded Device Configuration Protocol RX +iracinghelper 32034/tcp # iRacing helper service +iracinghelper 32034/udp # iRacing helper service +t1distproc60 32249/tcp # T1 Distributed Processor +t1distproc60 32249/udp # T1 Distributed Processor +plex 32400/tcp # Plex multimedia +apm-link 32483/tcp # Access Point Manager Link +apm-link 32483/udp # Access Point Manager Link +sec-ntb-clnt 32635/tcp # SecureNotebook-CLNT +sec-ntb-clnt 32635/udp # SecureNotebook-CLNT +DMExpress 32636/tcp # DMExpress +DMExpress 32636/udp # DMExpress +filenet-powsrm 32767/tcp # FileNet BPM WS-ReliableMessaging Client +filenet-powsrm 32767/udp # FileNet BPM WS-ReliableMessaging Client +filenet-tms 32768/tcp # Filenet TMS +filenet-tms 32768/udp # Filenet TMS +filenet-rpc 32769/tcp # Filenet RPC +filenet-rpc 32769/udp # Filenet RPC +filenet-nch 32770/tcp # Filenet NCH +filenet-nch 32770/udp # Filenet NCH +filenet-rmi 32771/tcp # FileNET RMI +filenet-rmi 32771/udp # FileNet RMI +filenet-pa 32772/tcp # FileNET Process Analyzer +filenet-pa 32772/udp # FileNET Process Analyzer +filenet-cm 32773/tcp # FileNET Component Manager +filenet-cm 32773/udp # FileNET Component Manager +filenet-re 32774/tcp # FileNET Rules Engine +filenet-re 32774/udp # FileNET Rules Engine +filenet-pch 32775/tcp # Performance Clearinghouse +filenet-pch 32775/udp # Performance Clearinghouse +filenet-peior 32776/tcp # FileNET BPM IOR +filenet-peior 32776/udp # FileNET BPM IOR +filenet-obrok 32777/tcp # FileNet BPM CORBA +filenet-obrok 32777/udp # FileNet BPM CORBA +mlsn 32801/tcp # Multiple Listing Service Network +mlsn 32801/udp # Multiple Listing Service Network +retp 32811/tcp # Real Estate Transport Protocol +idmgratm 32896/tcp # Attachmate ID Manager +idmgratm 32896/udp # Attachmate ID Manager +mysqlx 33060/tcp # MySQL Database Extended Interface +aurora-balaena 33123/tcp # Aurora (Balaena Ltd) +aurora-balaena 33123/udp # Aurora (Balaena Ltd) +diamondport 33331/tcp # DiamondCentral Interface +diamondport 33331/udp # DiamondCentral Interface +dgi-serv 33333/tcp # Digital Gaslight Service +speedtrace 33334/tcp # SpeedTrace TraceAgent +speedtrace-disc 33334/udp # SpeedTrace TraceAgent Discovery +snip-slave 33656/tcp # SNIP Slave +snip-slave 33656/udp # SNIP Slave +turbonote-2 34249/tcp # TurboNote Relay Server Default Port +turbonote-2 34249/udp # TurboNote Relay Server Default Port +p-net-local 34378/tcp # P-Net on IP local +p-net-local 34378/udp # P-Net on IP local +p-net-remote 34379/tcp # P-Net on IP remote +p-net-remote 34379/udp # P-Net on IP remote +dhanalakshmi 34567/tcp # dhanalakshmi.org EDI Service +profinet-rt 34962/tcp # PROFInet RT Unicast +profinet-rt 34962/udp # PROFInet RT Unicast +profinet-rtm 34963/tcp # PROFInet RT Multicast +profinet-rtm 34963/udp # PROFInet RT Multicast +profinet-cm 34964/tcp # PROFInet Context Manager +profinet-cm 34964/udp # PROFInet Context Manager +ethercat 34980/tcp # EtherCAT Port +ethercat 34980/udp # EhterCAT Port +heathview 35000/tcp # HeathView +rt-viewer 35001/tcp # ReadyTech Viewer +rt-viewer 35001/udp # ReadyTech Viewer +rt-sound 35002/tcp # ReadyTech Sound Server +rt-devicemapper 35003/tcp # ReadyTech DeviceMapper +rt-classmanager 35004/tcp # ReadyTech ClassManager +rt-classmanager 35004/udp # ReadyTech ClassManager +rt-labtracker 35005/tcp # ReadyTech LabTracker +rt-helper 35006/tcp # ReadyTech Helper Service +kitim 35354/tcp # KIT Messenger +altova-lm 35355/tcp # Altova License Management +altova-lm-disc 35355/udp # Altova License Management Discovery +guttersnex 35356/tcp # Gutters Note Exchange +openstack-id 35357/tcp # OpenStack ID Service +allpeers 36001/tcp # AllPeers Network +allpeers 36001/udp # AllPeers Network +wlcp 36411/udp # Wireless LAN Control plane Protocol (WLCP) +s1-control 36412/sctp # S1-Control Plane (3GPP) +x2-control 36422/sctp # X2-Control Plane (3GPP) +slmap 36423/sctp # SLm Interface Application protocol +nq-ap 36424/sctp # Nq and Nq' Application protocol +m2ap 36443/sctp # M2 Application Part +m3ap 36444/sctp # M3 Application Part +xw-control 36462/sctp # Xw-Control Plane (3GPP) +febooti-aw 36524/tcp # Febooti Automation Workshop +observium-agent 36602/tcp # Observium statistics collection agent +kastenxpipe 36865/tcp # KastenX Pipe +kastenxpipe 36865/udp # KastenX Pipe +mapx 36700/tcp # MapX communication +neckar 37475/tcp # science + computing's Venus Administration Port +neckar 37475/udp # science + computing's Venus Administration Port +eftp 37601/tcp # Epipole File Transfer +unisys-eportal 37654/tcp # Unisys ClearPath ePortal +unisys-eportal 37654/udp # Unisys ClearPath ePortal +gdrive-sync 37483/tcp # Google Drive Sync +ivs-database 38000/tcp # InfoVista Server Database +ivs-insertion 38001/tcp # InfoVista Server Insertion +cresco-control 38002/tcp # Cresco Controller +crescoctrl-disc 38002/udp # Cresco Controller Discovery +galaxy7-data 38201/tcp # Galaxy7 Data Tunnel +galaxy7-data 38201/udp # Galaxy7 Data Tunnel +fairview 38202/tcp # Fairview Message Service +fairview 38202/udp # Fairview Message Service +agpolicy 38203/tcp # AppGate Policy Server +agpolicy 38203/udp # AppGate Policy Server +sruth 38800/tcp # Sruth - University_Corporation_for_Atmospheric_Research +secrmmsafecopya 38865/tcp # for use of the secRMM SafeCopy program +turbonote-1 39681/tcp # TurboNote Default Port +turbonote-1 39681/udp # TurboNote Default Port +safetynetp 40000/tcp # SafetyNET p +safetynetp 40000/udp # SafetyNET p +k-patentssensor 40023/udp # K-PatentsSensorInformation +z-wave-s 41230/tcp # Z-Wave Protocol over SSL/TLS +z-wave-s 41230/udp # Z-Wave Protocol over DTLS +sptx 40404/tcp # Simplify Printing TX +cscp 40841/tcp # CSCP +cscp 40841/udp # CSCP +csccredir 40842/tcp # CSCCREDIR +csccredir 40842/udp # CSCCREDIR +csccfirewall 40843/tcp # CSCCFIREWALL +csccfirewall 40843/udp # CSCCFIREWALL +ortec-disc 40853/udp # ORTEC Service Discovery +fs-qos 41111/tcp # Foursticks QoS Protocol +fs-qos 41111/udp # Foursticks QoS Protocol +tentacle 41121/tcp # Tentacle Server +crestron-cip 41794/tcp # Crestron Control Port +crestron-cip 41794/udp # Crestron Control Port +crestron-ctp 41795/tcp # Crestron Terminal Port +crestron-ctp 41795/udp # Crestron Terminal Port +crestron-cips 41796/tcp # Crestron Secure Control Port +crestron-ctps 41797/tcp # Crestron Secure Terminal Port +candp 42508/tcp # Computer Associates network discovery protocol +candp 42508/udp # Computer Associates network discovery protocol +candrp 42509/tcp # CA discovery response +candrp 42509/udp # CA discovery response +caerpc 42510/tcp # CA eTrust RPC +caerpc 42510/udp # CA eTrust RPC +recvr-rc 43000/tcp # Receiver Remote Control +recvr-rc-disc 43000/udp # Receiver Remote Control Discovery +reachout 43188/tcp # REACHOUT +reachout 43188/udp # REACHOUT +ndm-agent-port 43189/tcp # NDM-AGENT-PORT +ndm-agent-port 43189/udp # NDM-AGENT-PORT +ip-provision 43190/tcp # IP-PROVISION +ip-provision 43190/udp # IP-PROVISION +noit-transport 43191/tcp # Reconnoiter Agent Data Transport +shaperai 43210/tcp # Shaper Automation Server +shaperai-disc 43210/udp # Shaper Automation Server Management Discovery +eq3-update 43439/tcp # EQ3 firmware update +eq3-config 43439/udp # EQ3 discovery and configuration +ew-mgmt 43440/tcp # Cisco EnergyWise Management +ew-disc-cmd 43440/udp # Cisco EnergyWise Discovery and Command Flooding +ciscocsdb 43441/tcp # Cisco NetMgmt DB Ports +ciscocsdb 43441/udp # Cisco NetMgmt DB Ports +z-wave-tunnel 44123/tcp # Z-Wave Secure Tunnel +pmcd 44321/tcp # PCP server (pmcd) +pmcd 44321/udp # PCP server (pmcd) +pmcdproxy 44322/tcp # PCP server (pmcd) proxy +pmcdproxy 44322/udp # PCP server (pmcd) proxy +cognex-dataman 44444/tcp # Cognex DataMan Management +### UNAUTHORIZED USE: Ports 44515 & 44516 used by NI Device Protocol############ +domiq 44544/udp # DOMIQ Building Automation +rbr-debug 44553/tcp # REALbasic Remote Debug +rbr-debug 44553/udp # REALbasic Remote Debug +asihpi 44600/udp # AudioScience HPI +EtherNet/IP-2 44818/tcp EtherNet-IP-2 # EtherNet/IP messaging +EtherNet/IP-2 44818/udp EtherNet-IP-2 # EtherNet/IP messaging +m3da 44900/tcp # M3DA (efficient machine-to-machine communication) +m3da-disc 44900/udp # M3DA Discovery (efficient machine-to-machine communication) +asmp 45000/tcp # NSi AutoStore Status Monitoring Protocol data transfer +asmp-mon 45000/udp # NSi AutoStore Status Monitoring Protocol device monitoring +asmps 45001/tcp # NSi AutoStore Status Monitoring Protocol secure data transfer +rs-status 45002/tcp # Redspeed Status Monitor +synctest 45045/tcp # Remote application control +invision-ag 45054/tcp # InVision AG +invision-ag 45054/udp # InVision AG +eba 45678/tcp # EBA PRISE +eba 45678/udp # EBA PRISE +dai-shell 45824/tcp # Server for the DAI family of client-server products +qdb2service 45825/tcp # Qpuncture Data Access Service +qdb2service 45825/udp # Qpuncture Data Access Service +ssr-servermgr 45966/tcp # SSRServerMgr +ssr-servermgr 45966/udp # SSRServerMgr +inedo 46336/tcp # Listen port used for Inedo agent +mediabox 46999/tcp # MediaBox Server +mediabox 46999/udp # MediaBox Server +mbus 47000/tcp # Message Bus +mbus 47000/udp # Message Bus +winrm 47001/tcp # Windows Remote Management Service +jvl-mactalk 47100/udp # Configuration of motors conneced to industrial ethernet +dbbrowse 47557/tcp # Databeam Corporation +dbbrowse 47557/udp # Databeam Corporation +directplaysrvr 47624/tcp # Direct Play Server +directplaysrvr 47624/udp # Direct Play Server +ap 47806/tcp # ALC Protocol +ap 47806/udp # ALC Protocol +bacnet 47808/tcp # Building Automation and Control Networks +bacnet 47808/udp # Building Automation and Control Networks +presonus-ucnet 47809/udp # PreSonus Universal Control Network protocol +nimcontroller 48000/tcp # Nimbus Controller +nimcontroller 48000/udp # Nimbus Controller +nimspooler 48001/tcp # Nimbus Spooler +nimspooler 48001/udp # Nimbus Spooler +nimhub 48002/tcp # Nimbus Hub +nimhub 48002/udp # Nimbus Hub +nimgtw 48003/tcp # Nimbus Gateway +nimgtw 48003/udp # Nimbus Gateway +nimbusdb 48004/tcp # NimbusDB Connector +nimbusdbctrl 48005/tcp # NimbusDB Control +3gpp-cbsp 48049/tcp # 3GPP Cell Broadcast Service Protocol +weandsf 48050/tcp # WeFi Access Network Discovery and Selection +isnetserv 48128/tcp # Image Systems Network Services +isnetserv 48128/udp # Image Systems Network Services +blp5 48129/tcp # Bloomberg locator +blp5 48129/udp # Bloomberg locator +com-bardac-dw 48556/tcp # com-bardac-dw +com-bardac-dw 48556/udp # com-bardac-dw +iqobject 48619/tcp # iqobject +iqobject 48619/udp # iqobject +robotraconteur 48653/tcp # Robot Raconteur transport +robotraconteur 48653/udp # Robot Raconteur transport +matahari 49000/tcp # Matahari Broker +nusrp 49001/tcp # Nuance Unity Service Request Protocol +nusdp-disc 49001/udp # Nuance Unity Service Discovery Protocol +# Updated additional list from IANA with all missing services 05/05/2017 done by Karl Vogel +mit-ml-dev 85/tcp # MIT ML Device +mit-ml-dev 85/udp # MIT ML Device +rap 256/tcp # Route Access Protocol +rap 256/udp # Route Access Protocol +pt-tls 271/tcp # IETF Network Endpoint Assessment (PT-TLS) +meter 571/tcp # udemon +meter 571/udp # udemon +dlep 854/tcp # Dynamic Link Exchange Protocol (DLEP) +dlep 854/udp # Dynamic Link Exchange Protocol (DLEP) +accessbuilder 888/udp # AccessBuilder +webpush 1001/tcp # HTTP Web Push +pip 1321/tcp # PIP +pip 1321/udp # PIP +csdmbase 1471/tcp # csdmbase +csdmbase 1471/udp # csdmbase +csdm 1472/tcp # csdm +csdm 1472/udp # csdm +ngr-t 1528/udp # NGR transport for mobile ad-hoc networks +nmsp 1790/tcp # Narrative Media Streaming Protocol +nmsp 1790/udp # Narrative Media Streaming Protocol +uma 1797/tcp # Universal Management Architecture +uma 1797/udp # Universal Management Architecture +raid-cd 2013/udp # raid +dls 2047/tcp # +dls 2047/udp # +nvd 2329/tcp # NVD User +nvd 2329/udp # NVD User +swarm 2377/tcp # RPC interface for Docker Swarm +msp 2438/tcp # Message send protocol? +msp 2438/udp # Message send protocol? +unicontrol 2499/tcp # UniControl +unicontrol 2499/udp # UniControl +nmsigport 2839/tcp # NMSigPort +nmsigport 2839/udp # NMSigPort +fxp 2849/tcp # FXP Communication +fxp 2849/udp # FXP Communication +epp 3044/tcp # EndPoint Protocol +epp 3044/udp # EndPoint Protocol +creativeserver 3364/tcp # Creative Server +creativeserver 3364/udp # Creative Server +contentserver 3365/tcp # Content Server +contentserver 3365/udp # Content Server +creativepartnr 3366/tcp # Creative Partner +creativepartnr 3366/udp # Creative Partner +udt-os 3900/tcp # Unidata UDT OS +udt-os 3900/udp # Unidata UDT OS +npp 4045/tcp # Network Paging Protocol +npp 4045/udp # Network Paging Protocol +hctl 4197/tcp # Harman HControl Protocol +hctl 4197/udp # Harman HControl Protocol +trinity-dist 4711/sctp # Trinity Trust Network Node Communication +trinity-dist 4711/tcp # Trinity Trust Network Node Communication +trinity-dist 4711/udp # Trinity Trust Network Node Communication +intelliadm-disc 4746/udp # IntelliAdmin Discovery +gre-in-udp 4754/udp # GRE-in-UDP Encapsulation +gre-udp-dtls 4755/udp # GRE-in-UDP Encapsulation with DTLS +RDCenter 4756/tcp # Reticle Decision Center +converge 4774/tcp # Converge RPC +mftp 5402/tcp # OmniCast MFTP +mftp 5402/udp # OmniCast MFTP +cbus 5550/tcp # Model Railway control using CBUS protocol +storageos 5705/tcp # StorageOS REST API +ricardo-lm 6148/tcp # Ricardo North America License Manager +ricardo-lm 6148/udp # Ricardo North America License Manager +ieee11073-20701 6464/tcp # Medical device communication +ieee11073-20701 6464/udp # Medical device communication +nexgen-aux 6629/tcp # +nexgen-aux 6629/udp # +rtimeviewer 6900/tcp # R*TIME Viewer Data Interface +spg 7016/tcp # SPG Controls Carrier +spg 7016/udp # SPG Controls Carrier +grasp 7017/tcp # GeneRic Autonomic Signaling Protocol +grasp 7017/udp # GeneRic Autonomic Signaling Protocol +pon-ictp 7202/tcp # Inter-Channel Termination Protocol (ICTP) +openit 7478/tcp # IT Asset Management +coherence-disc 7574/udp # Oracle Coherence Cluster discovery service +bolt 7687/tcp # Bolt database connection +nfapi 7701/sctp # SCF nFAPI defining MAC/PHY split +wpl-analytics 8006/tcp # World Programming analytics +wpl-disc 8006/udp # World Programming analytics discovery +ucs-isc 8070/tcp # Oracle Communication Indexed Search Converter +mles 8077/tcp # Client-server data distribution +opsmessaging 8090/tcp # Vehicle to station messaging +robot-remote 8270/tcp # Robot Framework Remote Library Interface +aritts 8423/tcp # Aristech text-to-speech server +ssports-bcast 8808/udp # STATSports Broadcast Service +CardWeb-IO 9060/tcp # CardWeb request-response I/O exchange +CardWeb-RT 9060/udp # CardWeb realtime device data +pumpkindb 9981/tcp # Event sourcing database engine/language +abb-hw 10020/tcp # Hardware configuration and maintenance +tile-ml 10261/tcp # Tile remote machine learning +xpra 14500/tcp # xpra network protocol +vdmmesh-disc 18668/udp # Manufacturing Execution Systems Mesh Comm +vdmmesh 18668/tcp # Manufacturing Execution Systems Mesh Comm +cora-disc 19220/udp # Discovery for Client Connection ... Service +cora 19220/tcp # Client Connection Mgmt/Data Exchange Service +aigairserver 21221/tcp # Services for Air Server +ka-kdp 31016/udp # Kollective Agent Kollective Delivery +ka-sddp 31016/tcp # Kollective Agent Secure Distributed Delivery +edi_service 34567/udp # dhanalakshmi.org EDI Service +axio-disc 35100/tcp # Axiomatic discovery protocol +axio-disc 35100/udp # Axiomatic discovery protocol +pmwebapi 44323/tcp # Performance Co-Pilot client HTTP API +cloudcheck-ping 45514/udp # ASSIA CloudCheck WiFi Management keepalive +cloudcheck 45514/tcp # ASSIA CloudCheck WiFi Management System +spremotetablet 46998/tcp # Capture handwritten signatures diff --git a/SPECS/setup/serviceslint b/SPECS/setup/serviceslint new file mode 100755 index 00000000..526fe3b3 --- /dev/null +++ b/SPECS/setup/serviceslint @@ -0,0 +1,119 @@ +#!/usr/bin/perl +# +# Perform sanity checks on the services file, supplied as argument. +# Based on an earlier shell script of the same name, but much faster, +# and it also detects actual errors in the current services file :) +# +# This program includes a manual, run "perldoc serviceslint" to see it. +# + +use strict; +use warnings; + +die "Usage: $0 /etc/services\n" unless $#ARGV == 0; + +# Build a hash of known protocols +my %protocol; +open FH, "protocols" or die "cannot open protocols: $!\n"; +while () { + chomp; + s/#.*$//; + my ($name, $port) = m/([\S]+)\s+(\d+)/ or next; + $protocol{$name} = $port; +} +close FH; + +# Parse the supplied services file +my $retval = 0; +my $line = 0; +my %service; +open FH, $ARGV[0] or die "cannot open $ARGV[0]: $!\n"; +while () { + $line++; # Keep a line count + chomp; # Remove CR/LF chars + if (m/^\s+/) { + print "Malformed line $line\n"; # No leading whitespace + $retval = 1; + next; + } + s/\s*#.*$//; # Strip out comments + next if m/^$/; # Skip empty lines + my ($name, $port, $proto, $aliases) = # Primary pattern match + m/^([\S]+)\s+(\d+)\/(\w+)\s*(.*)/ + or die "Malformed line: $line\n"; + if (not exists $protocol{$proto}) { + print "Bad protocol at line $line: $proto\n"; + $retval = 1; + } + if (exists $service{$proto}{$port}) { + print "Duplicate port at line $line: $port/$proto\n"; + $retval = 1; + } + $service{$proto}{$port} = $name; + foreach ($name, split /\s+/, $aliases) { + if (exists $service{$proto}{$_}) { + print "Duplicate name at line $line: $_/$proto\n"; + $retval = 1; + } + $service{$proto}{$_} = $port; + }; + +} +close FH; +exit $retval; + +__END__ + +=head1 NAME + +serviceslint - perform verification on the /etc/services file + +=head1 SYNOPSIS + +B I + +=head1 DESCRIPTION + +The B command performs syntax and content checks on the +given filename, normally a copy of the I file. + +Syntax checking consists of a regular expression applied to +non-empty, non-comment lines. If the syntax check fails, then +the program prints a message and aborts with non-zero status code. + +Content checking detects various kinds of duplicate entries. +Currently, warnings are printed for duplicate entries, but execution +continues, and the program I (eg. success). + +=over + +=item B I + +The specified line has invalid syntax. Note that leading whitespace +is not permitted. Non-empty lines must begin with a comment, or with +a service name followed by a port number / protocol pair. + +=item B I + +Occurs when a port number / protocol pair is found more than once +in the services file. The warning is flagged on the second (and any +subsequent) occurrences. These entries will not be found via the +B function. + +=item B I + +Occurs when a service name, or alias, occurs more than once in the +services file. The warning is flagged on the second (and subsequent) +occurrence. These entries will not be returned by the B +function. + +=back + +=head1 SEE ALSO + +The services(5) man page describes the file format. + +=head1 AUTHOR + +Ralph Siemsen & Phil Knirsch + diff --git a/SPECS/setup/setup.spec b/SPECS/setup/setup.spec new file mode 100644 index 00000000..934a5527 --- /dev/null +++ b/SPECS/setup/setup.spec @@ -0,0 +1,187 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: setup +Version: 2.15 +Release: %autorelease +Summary: A set of system configuration and setup files +License: LicenseRef-openruyi-Public-Domain +URL: https://src.fedoraproject.org/rpms/setup + +Source0: aliases +Source1: bashrc +Source2: csh.cshrc +Source3: csh.login +Source4: ethertypes +Source5: filesystems +Source6: host.conf +Source7: hosts +Source8: inputrc +Source9: networks +Source10: printcap +Source11: profile +Source12: protocols +Source13: services +Source14: shells + +Source21: lang.csh +Source22: lang.sh + +Source31: COPYING +Source32: uidgid +Source33: setup.sysusers.conf +Source34: uidgidlint +Source35: serviceslint + +BuildArch: noarch +BuildRequires: bash +BuildRequires: tcsh +BuildRequires: perl-devel +BuildRequires: systemd-sysusers +#systemd-rpm-macros: required to use _sysusersdir and _tmpfilesdir macro +BuildRequires: systemd-rpm-macros +#require system release for saner dependency order +# Requires: system-release + +%description +The setup package contains a set of important system configuration and +setup files, such as passwd, group, and profile. + +%prep +mkdir -p etc/profile.d +cp %{lua: for i=1,15 do print(sources[i]..' ') end} etc/ +cp %SOURCE21 %SOURCE22 etc/profile.d/ +touch etc/{exports,motd,subgid,subuid,environment,fstab} + +mkdir -p docs +cp %SOURCE31 %SOURCE32 docs/ + +%build +# This produces ./etc/{passwd,group,shadow,gshadow} +systemd-sysusers --root=./ %SOURCE33 +# Allow the user to copy the file +chmod 0400 ./etc/{shadow,gshadow} + +%check +# Sanity checking selected files.... +bash -n etc/bashrc +bash -n etc/profile +tcsh -f etc/csh.cshrc +tcsh -f etc/csh.login +bash %SOURCE34 docs/uidgid +(cd etc && perl %SOURCE35 ./services) + +%install +mkdir -p %{buildroot}/etc +cp -ar etc/* %{buildroot}/etc/ + +install -D -m0644 %SOURCE33 %{buildroot}%{_sysusersdir}/setup.conf + +mkdir -p %{buildroot}/var/log +touch %{buildroot}/etc/environment +touch %{buildroot}/etc/fstab +echo "#Add any required envvar overrides to this file, it is sourced from /etc/profile" >%{buildroot}/etc/profile.d/sh.local +echo "#Add any required envvar overrides to this file, it is sourced from /etc/csh.login" >%{buildroot}/etc/profile.d/csh.local +mkdir -p %{buildroot}/etc/motd.d +mkdir -p %{buildroot}/run/motd.d +#tmpfiles needed for files in /run +mkdir -p %{buildroot}%{_tmpfilesdir} +echo "f /run/motd 0644 root root -" >%{buildroot}%{_tmpfilesdir}/%{name}.conf +echo "d /run/motd.d 0755 root root -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf +chmod 0644 %{buildroot}%{_tmpfilesdir}/%{name}.conf + +# Install yum protection config. Old location in /etc. +mkdir -p %{buildroot}/etc/dnf/protected.d/ +echo "setup" >%{buildroot}/etc/dnf/protected.d/setup.conf +# Install dnf5 protection config. New location under /usr. +mkdir -p %{buildroot}/usr/share/dnf5/libdnf.conf.d/ +cat >%{buildroot}/usr/share/dnf5/libdnf.conf.d/protect-setup.conf < +-- Throw away useless and dangerous update stuff until rpm will be able to +-- handle it. See: http://rpm.org/ticket/6 +for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do + os.remove("/etc/"..name..".rpmnew") +end +-- Use rpm.spawn() if available (in >= 4.20) but fallback to forking if not. +-- +-- Initialize or update /etc/alias.db from /etc/aliases for sendmail, etc. +if posix.access("/usr/bin/newaliases", "x") then + if rpm.spawn ~= nil then + rpm.spawn({'/usr/bin/newaliases'}, {stdout='/dev/null'}) + else + local pid = posix.fork() + if pid == 0 then + posix.redirect2null(1) + posix.exec("/usr/bin/newaliases") + elseif pid > 0 then + posix.wait(pid) + end + end +end +-- Ensure pre-allocated tmpfiles are created immediately on upgrades. +if posix.access("/usr/bin/systemd-tmpfiles", "x") then + if rpm.spawn ~= nil then + rpm.spawn({"/usr/bin/systemd-tmpfiles", "--create"}, {stderr='/dev/null'}) + else + local pid = posix.fork() + if pid == 0 then + posix.redirect2null(2) + posix.exec("/usr/bin/systemd-tmpfiles", "--create") + elseif pid > 0 then + posix.wait(pid) + end + end +end + +%files +%license docs/COPYING +%doc docs/uidgid +%verify(not md5 size mtime) %config(noreplace) /etc/passwd +%verify(not md5 size mtime) %config(noreplace) /etc/group +%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /etc/shadow +%verify(not md5 size mtime) %attr(0000,root,root) %config(noreplace,missingok) /etc/gshadow +%verify(not md5 size mtime) %config(noreplace) /etc/subuid +%verify(not md5 size mtime) %config(noreplace) /etc/subgid +%config(noreplace) /etc/services +%verify(not md5 size mtime) %config(noreplace) /etc/exports +%config(noreplace) /etc/aliases +%config(noreplace) /etc/environment +%config(noreplace) /etc/filesystems +%config(noreplace) /etc/host.conf +%verify(not md5 size mtime) %config(noreplace) /etc/hosts +%verify(not md5 size mtime) %config(noreplace) /etc/motd +%dir /etc/motd.d +%ghost %verify(not md5 size mtime) %attr(0644,root,root) /run/motd +%dir /run/motd.d +%config(noreplace) /etc/printcap +%verify(not md5 size mtime) %config(noreplace) /etc/inputrc +%config(noreplace) /etc/bashrc +%config(noreplace) /etc/profile +%config(noreplace) /etc/protocols +%config(noreplace) /etc/ethertypes +%config(noreplace) /etc/csh.login +%config(noreplace) /etc/csh.cshrc +%config(noreplace) /etc/networks +%dir /etc/profile.d +%config(noreplace) /etc/profile.d/sh.local +%config(noreplace) /etc/profile.d/csh.local +/etc/profile.d/lang.{sh,csh} +%config(noreplace) %verify(not md5 size mtime) /etc/shells +%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab +%{_tmpfilesdir}/%{name}.conf +%{_sysusersdir}/setup.conf +/etc/dnf/protected.d/%{name}.conf +%dir /usr/share/dnf5 +%dir /usr/share/dnf5/libdnf.conf.d +/usr/share/dnf5/libdnf.conf.d/protect-setup.conf + +%changelog +%{?autochangelog} diff --git a/SPECS/setup/setup.sysusers.conf b/SPECS/setup/setup.sysusers.conf new file mode 100644 index 00000000..82be2857 --- /dev/null +++ b/SPECS/setup/setup.sysusers.conf @@ -0,0 +1,41 @@ +u root 0:0 "Super User" /root /bin/bash +u bin 1 "bin" /bin - +u daemon 2 "daemon" /sbin - +u adm 3:4 "adm" /var/adm - +u lp 4:7 "lp" /var/spool/lpd - +u sync 5:0 "sync" /sbin /bin/sync +u shutdown 6:0 "shutdown" /sbin /sbin/shutdown +u halt 7:0 "halt" /sbin /sbin/halt +u mail 8:12 "mail" /var/spool/mail - +u operator 11:0 "operator" /root - +u games 12:100 "games" /usr/games - +u ftp 14:50 "FTP User" /var/ftp - +u nobody 65534:65534 "Kernel Overflow User" - - +g root 0 +g sys 3 +g adm 4 +g tty 5 +g disk 6 +g lp 7 +g mem 8 +g kmem 9 +g wheel 10 +g cdrom 11 +g mail 12 +g man 15 +g dialout 18 +g floppy 19 +g games 20 +g utmp 22 +g tape 33 +g kvm 36 +g video 39 +g ftp 50 +g lock 54 +g audio 63 +g users 100 +g clock 103 +g input 104 +g render 105 +g sgx 106 +g nobody 65534 diff --git a/SPECS/setup/shells b/SPECS/setup/shells new file mode 100644 index 00000000..b5277429 --- /dev/null +++ b/SPECS/setup/shells @@ -0,0 +1,4 @@ +/bin/sh +/bin/bash +/usr/bin/sh +/usr/bin/bash diff --git a/SPECS/setup/sources b/SPECS/setup/sources new file mode 100644 index 00000000..e69de29b diff --git a/SPECS/setup/uidgid b/SPECS/setup/uidgid new file mode 100644 index 00000000..bf1f7b2e --- /dev/null +++ b/SPECS/setup/uidgid @@ -0,0 +1,144 @@ +#NAME UID GID HOME SHELL PACKAGES +root 0 0 /root /bin/bash setup +bin 1 1 /bin /usr/sbin/nologin setup +daemon 2 2 /sbin /usr/sbin/nologin setup +sys - 3 - - setup +adm 3 4 /var/adm /bin/bash setup +tty - 5 - - setup +disk - 6 - - setup +lp 4 7 /var/spool/lpd /usr/sbin/nologin setup +mem - 8 - - setup +kmem - 9 - - setup +wheel - 10 - - setup +cdrom - 11 - - setup +sync 5 (0) /sbin /bin/sync setup +shutdown 6 (0) /sbin /sbin/shutdown setup +halt 7 (0) /sbin /sbin/halt setup +mail 8 12 /var/spool/mail /usr/sbin/nologin setup +news 9 13 /var/spool/news /usr/sbin/nologin inn +uucp 10 14 /var/spool/uucp /usr/sbin/nologin uucp +operator 11 (0) /root /usr/sbin/nologin setup +games 12 (100) /usr/games /usr/sbin/nologin setup +ftp 14 50 /var/ftp /usr/sbin/nologin setup +man - 15 - - setup +dialout - 18 - - setup +floppy - 19 - - setup +games - 20 - - setup +utmp - 22 - - initscripts,libutempter +squid 23 23 /var/spool/squid /dev/null squid +named 25 25 /var/named /bin/false bind +postgres 26 26 /var/lib/pgsql /bin/bash postgresql-server +nscd 28 28 / /bin/false nscd +rpcuser 29 29 /var/lib/nfs /bin/false nfs-utils +rpc 32 32 /var/lib/rpcbind /usr/sbin/nologin portmap +amandabackup 33 (6) /var/lib/amanda /bin/false amanda +tape - 33 - - setup +utempter - 35 - - libutempter +kvm - 36 - - kvm, vdsm, libvirt +vdsm 36 (36) / /bin/bash kvm, vdsm +rpm 37 37 /var/lib/rpm /bin/bash rpm +ntp 38 38 /etc/ntp /usr/sbin/nologin ntp +video - 39 - - setup +dip - 40 - - ppp +mailman 41 41 /usr/lib/mailman /usr/sbin/nologin mailman +gdm 42 42 /var/lib/gdm /usr/sbin/nologin gdm +pppusers - 44 - - linuxconf +popusers - 45 - - linuxconf +slipusers - 46 - - linuxconf +mailnull 47 47 /var/spool/mqueue /dev/null sendmail +apache 48 48 /usr/share/httpd /bin/false httpd +smmsp 51 51 /var/spool/mqueue /dev/null sendmail +puppet 52 52 /var/lib/puppet /usr/sbin/nologin puppet +tomcat 53 53 /var/lib/tomcat /usr/sbin/nologin tomcat +lock - 54 - - setup +ldap 55 55 /var/lib/ldap /bin/false openldap-servers +nut 57 57 /var/lib/ups /bin/false nut +tss 59 59 - /usr/sbin/nologin trousers +audio - 63 - - setup +condor 64 64 /var/lib/condor /usr/sbin/nologin condord +nslcd 65 (55) / /usr/sbin/nologin nslcd +wine - 66 - - wine +pegasus 66 65 /var/lib/Pegasus /usr/sbin/nologin tog-pegasus +webalizer 67 67 /var/www/usage /usr/sbin/nologin webalizer +avahi 70 70 /var/run/avahi-daemon /usr/sbin/nologin avahi +tcpdump 72 72 / /usr/sbin/nologin tcpdump +privoxy 73 73 /etc/privoxy /bin/bash privoxy +sshd 74 74 /var/empty/sshd /usr/sbin/nologin openssh-server +radvd 75 75 / /bin/false radvd +cyrus 76 (12) /var/imap /bin/bash cyrus-imapd +saslauth - 76 - - cyrus-sasl, cyrus-imap +fax 78 78 /var/spool/fax /usr/sbin/nologin mgetty +desktop 80 80 - /usr/sbin/nologin desktop-file-utils +dbus 81 81 / /usr/sbin/nologin dbus +clamav 83 83 /tmp /usr/sbin/nologin clamav +screen - 84 - - screen +polkituser 87 87 / /usr/sbin/nologin PolicyKit +wbpriv - 88 - - samba-common +postfix 89 89 /var/spool/postfix /bin/true postfix +postdrop - 90 - - postfix +exim 93 93 /var/spool/exim /usr/sbin/nologin exim +distcache 94 94 / /usr/sbin/nologin distcache +radiusd 95 95 / /bin/false freeradius +dovecot 97 97 /usr/libexec/dovecot /usr/sbin/nologin dovecot +ident 98 98 / /usr/sbin/nologin ident +users - 100 - - setup +ssh_keys - 101 - - openssh +clock - 103 - - systemd +input - 104 - - systemd +render - 105 - - systemd +sgx - 106 - - systemd +qemu 107 107 / /usr/sbin/nologin libvirt +ovirt 108 108 / /usr/sbin/nologin libvirt +jetty 110 110 /usr/share/jetty /usr/sbin/nologin jetty +saned 111 111 / /usr/sbin/nologin sane-backends +vhostmd 112 112 /usr/share/vhostmd /usr/sbin/nologin vhostmd +usbmuxd 113 113 / /usr/sbin/nologin usbmuxd +polkitd 114 114 / /usr/sbin/nologin polkit +bacula 133 133 /var/spool/bacula /usr/sbin/nologin bacula +cimsrvr 134 134 / /usr/sbin/nologin tog-pegasus-libs +mock - 135 / - mock +activemq 142 142 /usr/share/activemq /usr/sbin/nologin activemq +stap-server 155 155 /var/lib/stap-server /usr/sbin/nologin systemtap +stapusr - 156 / - systemtap-runtime +stapsys - 157 / - systemtap-runtime +stapdev - 158 / - systemtap-runtime +swift 160 160 /var/lib/swift /usr/sbin/nologin openstack-swift +glance 161 161 /var/lib/glance /usr/sbin/nologin openstack-glance +nova 162 162 /var/lib/nova /usr/sbin/nologin openstack-nova +keystone 163 163 /var/lib/keystone /usr/sbin/nologin openstack-keystone +quantum 164 164 /var/lib/quantum /usr/sbin/nologin openstack-quantum +cinder 165 165 /var/lib/cinder /usr/sbin/nologin openstack-cinder +ceilometer 166 166 /var/lib/ceilometer /usr/sbin/nologin openstack-ceilometer +ceph 167 167 /var/lib/ceph /usr/sbin/nologin ceph-common +avahi-autoipd 170 170 /var/lib/avahi-autoipd /usr/sbin/nologin avahi +pulse 171 171 /var/run/pulse /usr/sbin/nologin pulseaudio +# Dynamic on new systems, removed Mar2025, can be reused if necessary later +# rtkit 172 172 /proc /usr/sbin/nologin rtkit +abrt 173 173 /etc/abrt /usr/sbin/nologin abrt +retrace 174 174 /usr/share/retrace-server /usr/sbin/nologin retrace-server +ovirtagent 175 175 / /usr/sbin/nologin ovirt-guest-agent +ats 176 176 / /usr/sbin/nologin trafficserver +dhcpd 177 177 / /usr/sbin/nologin dhcp +myproxy 178 178 /var/lib/myproxy /usr/sbin/nologin myproxy-server +sanlock 179 179 /var/run/sanlock /usr/sbin/nologin sanlock +# Not used anymore, removed Jun2021, can be reused if necessary later +#katello 182 182 /usr/share/katello /usr/sbin/nologin katello-common +elasticsearch 183 183 /usr/share/java/elasticsearch /usr/sbin/nologin elasticsearch +mongodb 184 184 /var/lib/mongodb /usr/sbin/nologin mongodb +# Previously provided by the 'jboss-as' package. +wildfly 185 185 /usr/share/wildfly /usr/sbin/nologin wildfly +jbosson - 186 - - jboss-on-agent +jbosson-agent 186 (186) / /usr/sbin/nologin jboss-on-agent +heat 187 187 /var/lib/heat /usr/sbin/nologin heat +haproxy 188 188 /var/lib/haproxy /usr/sbin/nologin haproxy +haclient - 189 - - pacemaker +hacluster 189 (189) / /usr/sbin/nologin pacemaker +systemd-journal - 190 - - systemd +# Dynamic on new systems, removed Dec2014, can be reused if necessary later +#systemd-journal-gateway 191 191 / /usr/sbin/nologin systemd +systemd-network 192 192 / /usr/sbin/nologin systemd +systemd-resolve 193 193 / /usr/sbin/nologin systemd +xrootd 194 194 /var/spool/xrootd - xrootd-server +#gnats ? ? ? ? gnats, gnats-db +#listar ? ? ? ? listar +nobody 65534 65534 / /usr/sbin/nologin setup diff --git a/SPECS/setup/uidgidlint b/SPECS/setup/uidgidlint new file mode 100755 index 00000000..997cc438 --- /dev/null +++ b/SPECS/setup/uidgidlint @@ -0,0 +1,28 @@ +#!/bin/bash +set -eu +set -o pipefail + +# We need a file to look at. +if [ -z "$*" ] ; then + echo "Usage: $0 uidgid" + exit 1 +fi +error=0 +# The format of the file is (currently) +for infile in "$@" ; do + uidlist=$(grep -v '^#' "$infile" | awk '{print $2}' | grep -v -e - | sort -nu) + gidlist=$(grep -v '^#' "$infile" | awk '{print $3}' | grep -v -e - | sort -nu) + for uid in $uidlist; do + if test "$(grep -v '^#' "$infile" | awk '{print $2}' | grep -c '^'"$uid"'$')" -ne 1 ; then + echo "Duplicate UID: $uid" + error=1 + fi + done + for gid in $gidlist; do + if test "$(grep -v '^#' "$infile" | awk '{print $3}' | grep -c '^'"$gid"'$')" -ne 1 ; then + echo "Duplicate GID: $gid" + error=1 + fi + done +done +exit $error diff --git a/SPECS/sg3_utils/sg3_utils.spec b/SPECS/sg3_utils/sg3_utils.spec new file mode 100644 index 00000000..1a41578f --- /dev/null +++ b/SPECS/sg3_utils/sg3_utils.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sg3_utils +Version: 1.48 +Release: %autorelease +Summary: Utilities for devices that use SCSI command sets +License: GPL-2.0-or-later AND BSD-2-Clause +URL: https://sg.danny.cz/sg/sg3_utils.html +VCS: git:https://github.com/doug-gilbert/sg3_utils +#!RemoteAsset +Source0: https://sg.danny.cz/sg/p/sg3_utils-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: make +BuildRequires: systemd + +# For compatibility +Provides: %{name}-libs = %{version}-%{release} + +%description +Collection of Linux utilities for devices that use the SCSI command set. +Includes utilities to copy data based on "dd" syntax and semantics (called +sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check +mode and log pages (sginfo, sg_modes and sg_logs); spin up and down +disks (sg_start); do self tests (sg_senddiag); and various other functions. +See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4 +series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0) +must be used. In the 2.6 series other device names may be used as +well (e.g. /dev/sda). + +Warning: Some of these tools access the internals of your system +and the incorrect usage of them may render your system inoperable. + +%package devel +Summary: Development library and header files for the sg3_utils library +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the %{name} library and its header files for +developing applications. + +%install -a +install -m 644 doc/rescan-scsi-bus.sh.8 %{buildroot}/%{_mandir}/man8 +mkdir -p %{buildroot}/%{_udevrulesdir} +install -m 644 scripts/00-scsi-sg3_config.rules %{buildroot}/%{_udevrulesdir} +install -m 644 scripts/40-usb-blacklist.rules %{buildroot}/%{_udevrulesdir} +install -m 644 scripts/54-before-scsi-sg3_id.rules %{buildroot}/%{_udevrulesdir} +install -m 644 scripts/55-scsi-sg3_id.rules %{buildroot}/%{_udevrulesdir} +install -m 644 scripts/58-scsi-sg3_symlink.rules %{buildroot}/%{_udevrulesdir} +install -m 644 scripts/59-fc-wwpn-id.rules %{buildroot}/%{_udevrulesdir} +install -p -m 755 scripts/fc_wwpn_id %{buildroot}%{_udevrulesdir}/.. + +rm -rf %{buildroot}%{_libdir}/*.la + +%files +%license BSD_LICENSE COPYING +%doc AUTHORS COVERAGE CREDITS ChangeLog README README.sg_start +%{_bindir}/scsi_* +%{_bindir}/sg_* +%{_bindir}/rescan-scsi-bus.sh +%{_bindir}/sginfo +%{_bindir}/sgm_dd +%{_bindir}/sgp_dd +%{_mandir}/man8/scsi_*.8* +%{_mandir}/man8/sg_*.8* +%{_mandir}/man8/rescan-scsi-bus.sh.8* +%{_mandir}/man8/sginfo.8* +%{_mandir}/man8/sgm_dd.8* +%{_mandir}/man8/sgp_dd.8* +%{_mandir}/man8/sg3_utils.8* +%{_mandir}/man8/sg3_utils_json.8* +%{_udevrulesdir}/00-scsi-sg3_config.rules +%{_udevrulesdir}/40-usb-blacklist.rules +%{_udevrulesdir}/54-before-scsi-sg3_id.rules +%{_udevrulesdir}/55-scsi-sg3_id.rules +%{_udevrulesdir}/58-scsi-sg3_symlink.rules +%{_udevrulesdir}/59-fc-wwpn-id.rules +%{_udevrulesdir}/../fc_wwpn_id +%{_libdir}/libsgutils2-%{version}.so.* + +%files devel +%{_includedir}/scsi/*.h +%{_libdir}/libsgutils2.so + +%changelog +%{?autochangelog} diff --git a/SPECS/sgml-common/0001-sgml-common-umask.patch b/SPECS/sgml-common/0001-sgml-common-umask.patch new file mode 100644 index 00000000..90bda3bf --- /dev/null +++ b/SPECS/sgml-common/0001-sgml-common-umask.patch @@ -0,0 +1,12 @@ +--- sgml-common-0.6.3/bin/install-catalog.in.umask Mon May 21 11:48:37 2001 ++++ sgml-common-0.6.3/bin/install-catalog.in Mon May 21 12:00:34 2001 +@@ -13,6 +13,9 @@ + \040 -h, --help: \t\t\t\t Print this help message and exit\n\ + \040 -v, --version: \t\t\t Print the version number and exit\n" + ++# We need the files we create to be world readable ++umask 022 ++ + # Set version message + SGML_VERSION_MESSAGE="sgml-common version @VERSION@ (install-catalog version 1.0)" + diff --git a/SPECS/sgml-common/0002-sgml-common-xmldir.patch b/SPECS/sgml-common/0002-sgml-common-xmldir.patch new file mode 100644 index 00000000..d7c2b2ba --- /dev/null +++ b/SPECS/sgml-common/0002-sgml-common-xmldir.patch @@ -0,0 +1,19 @@ +--- sgml-common-0.6.3/xml-iso-entities/Makefile.am.xmldir Fri Oct 5 16:37:43 2001 ++++ sgml-common-0.6.3/xml-iso-entities/Makefile.am Fri Oct 5 16:37:57 2001 +@@ -1,4 +1,4 @@ +-isoentdir = $(prefix)/share/sgml/xml-iso-entities-8879.1986 ++isoentdir = $(prefix)/share/xml/xml-iso-entities-8879.1986 + isoent_DATA = ISOamsa.ent ISOamsb.ent ISOamsc.ent ISOamsn.ent ISOamso.ent ISOamsr.ent \ + ISObox.ent ISOcyr1.ent ISOcyr2.ent ISOdia.ent ISOgrk1.ent ISOgrk2.ent \ + ISOgrk3.ent ISOgrk4.ent ISOlat1.ent ISOlat2.ent ISOnum.ent ISOpub.ent \ +--- sgml-common-0.6.3/xml-iso-entities/Makefile.in.xmldir 2007-05-15 17:21:31.000000000 +0100 ++++ sgml-common-0.6.3/xml-iso-entities/Makefile.in 2007-05-15 17:21:43.000000000 +0100 +@@ -62,7 +62,7 @@ + VERSION = @VERSION@ + docdir = @docdir@ + +-isoentdir = $(prefix)/share/sgml/xml-iso-entities-8879.1986 ++isoentdir = $(prefix)/share/xml/xml-iso-entities-8879.1986 + isoent_DATA = ISOamsa.ent ISOamsb.ent ISOamsc.ent ISOamsn.ent ISOamso.ent ISOamsr.ent ISObox.ent ISOcyr1.ent ISOcyr2.ent ISOdia.ent ISOgrk1.ent ISOgrk2.ent ISOgrk3.ent ISOgrk4.ent ISOlat1.ent ISOlat2.ent ISOnum.ent ISOpub.ent ISOtech.ent catalog + + diff --git a/SPECS/sgml-common/0003-sgml-common-quotes.patch b/SPECS/sgml-common/0003-sgml-common-quotes.patch new file mode 100644 index 00000000..c901b9e3 --- /dev/null +++ b/SPECS/sgml-common/0003-sgml-common-quotes.patch @@ -0,0 +1,94 @@ +--- sgml-common-0.6.3/bin/install-catalog.in.quotes Mon Nov 5 11:19:23 2001 ++++ sgml-common-0.6.3/bin/install-catalog.in Mon Nov 5 11:20:12 2001 +@@ -39,8 +39,8 @@ + # Process actions + case $1 in + -a|--add) SGML_ACTION="addition" +- SGML_CENTRALIZED=$2 +- SGML_ORDINARY=$3 ++ SGML_CENTRALIZED="$2" ++ SGML_ORDINARY="$3" + ;; + -r|--remove) if [ -z "$3" -o "$3" = "--version" ] + then +@@ -48,8 +48,8 @@ + exit 0 + fi + SGML_ACTION="removal" +- SGML_CENTRALIZED=$2 +- SGML_ORDINARY=$3 ++ SGML_CENTRALIZED="$2" ++ SGML_ORDINARY="$3" + ;; + -h|--help) echo -e $SGML_HELP_MESSAGE + exit 0 +@@ -96,14 +96,14 @@ + fi + case $SGML_ACTION in + addition) +- if [ -e $SGML_CENTRALIZED -a ! -w $SGML_CENTRALIZED ] ++ if [ -e "$SGML_CENTRALIZED" -a ! -w "$SGML_CENTRALIZED" ] + then + echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2 + exit 2 + fi + ;; + removal) +- if [ ! -w $SGML_CENTRALIZED ] ++ if [ ! -w "$SGML_CENTRALIZED" ] + then + echo "`basename $0`: can not modify \"$SGML_CENTRALIZED\"." >&2 + exit 2 +@@ -119,7 +119,7 @@ + fi + case $SGML_ACTION in + addition) +- if [ ! -s $SGML_ORDINARY ] ++ if [ ! -s "$SGML_ORDINARY" ] + then + echo "`basename $0`: \"$SGML_ORDINARY\" does not exist or is empty." >&2 + exit 2 +@@ -131,33 +131,33 @@ + case $SGML_ACTION in + addition) + echo "`basename $0`: addition of $SGML_ORDINARY in $SGML_CENTRALIZED" +- if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null ++ if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null + then + echo "Warning: $SGML_ORDINARY is already installed in the centralized catalog $SGML_CENTRALIZED" >&2 + else +- echo "$SGML_POINTER $SGML_ORDINARY" >> $SGML_CENTRALIZED ++ echo "$SGML_POINTER \"$SGML_ORDINARY\"" >> "$SGML_CENTRALIZED" + fi +- grep -q $SGML_CENTRALIZED /etc/sgml/catalog 2>/dev/null ++ grep -q "$SGML_CENTRALIZED" /etc/sgml/catalog 2>/dev/null + if [ $? -ne 0 ] + then + echo "`basename $0`: addition of $SGML_CENTRALIZED in /etc/sgml/catalog" +- echo "$SGML_POINTER $SGML_CENTRALIZED" >> /etc/sgml/catalog ++ echo "$SGML_POINTER \"$SGML_CENTRALIZED\"" >> /etc/sgml/catalog + fi + ;; + removal) + echo "`basename $0`: removal of $SGML_ORDINARY from $SGML_CENTRALIZED" +- if grep -q $SGML_ORDINARY $SGML_CENTRALIZED 2>/dev/null ++ if grep -q "$SGML_ORDINARY" "$SGML_CENTRALIZED" 2>/dev/null + then +- sed -e "\:$SGML_POINTER $SGML_ORDINARY:d" < $SGML_CENTRALIZED > ${SGML_CENTRALIZED}.new +- mv ${SGML_CENTRALIZED}.new $SGML_CENTRALIZED ++ sed -e "\:$SGML_POINTER \"\\?$SGML_ORDINARY\"\\?:d" < "$SGML_CENTRALIZED" > "${SGML_CENTRALIZED}.new" ++ mv "${SGML_CENTRALIZED}.new" "$SGML_CENTRALIZED" + else + echo "Warning: $SGML_ORDINARY was not found in the centralized catalog $SGML_CENTRALIZED" >&2 + fi +- if [ ! -s $SGML_CENTRALIZED ] ++ if [ ! -s "$SGML_CENTRALIZED" ] + then +- rm $SGML_CENTRALIZED ++ rm "$SGML_CENTRALIZED" + echo "`basename $0`: removal of $SGML_CENTRALIZED from /etc/sgml/catalog" +- sed -e "\:$SGML_POINTER $SGML_CENTRALIZED:d" < /etc/sgml/catalog > /etc/sgml/catalog.new ++ sed -e "\:$SGML_POINTER \"\\?$SGML_CENTRALIZED\"\\?:d" < /etc/sgml/catalog > /etc/sgml/catalog.new + mv /etc/sgml/catalog.new /etc/sgml/catalog + fi + ;; diff --git a/SPECS/sgml-common/html.dcl b/SPECS/sgml-common/html.dcl new file mode 100644 index 00000000..710e9e27 --- /dev/null +++ b/SPECS/sgml-common/html.dcl @@ -0,0 +1,88 @@ + + diff --git a/SPECS/sgml-common/html.soc b/SPECS/sgml-common/html.soc new file mode 100644 index 00000000..c0b19498 --- /dev/null +++ b/SPECS/sgml-common/html.soc @@ -0,0 +1,31 @@ + -- catalog: SGML Open style entity catalog for HTML -- + -- $Id: html.soc,v 1.1 2004/09/09 12:19:26 cvsdist Exp $ -- + -- Hacked by jjc -- + + -- Ways to refer to Level 2: most general to most specific -- +PUBLIC "-//IETF//DTD HTML//EN" html.dtd +PUBLIC "-//IETF//DTD HTML 2.0//EN" html.dtd +PUBLIC "-//IETF//DTD HTML Level 2//EN" html.dtd +PUBLIC "-//IETF//DTD HTML 2.0 Level 2//EN" html.dtd + + -- Ways to refer to Level 1: most general to most specific -- +PUBLIC "-//IETF//DTD HTML Level 1//EN" html-1.dtd +PUBLIC "-//IETF//DTD HTML 2.0 Level 1//EN" html-1.dtd + + -- Ways to refer to + Strict Level 2: most general to most specific -- +PUBLIC "-//IETF//DTD HTML Strict//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML 2.0 Strict//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML Strict Level 2//EN" html-s.dtd +PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//EN" html-s.dtd + + -- Ways to refer to + Strict Level 1: most general to most specific -- +PUBLIC "-//IETF//DTD HTML Strict Level 1//EN" html-1s.dtd +PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 1//EN" html-1s.dtd + + -- ISO latin 1 entity set for HTML -- +PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" ISOlat1.sgm + +SGMLDECL html.dcl +DOCTYPE html html.dtd diff --git a/SPECS/sgml-common/sgml-common.spec b/SPECS/sgml-common/sgml-common.spec new file mode 100644 index 00000000..a1445cbd --- /dev/null +++ b/SPECS/sgml-common/sgml-common.spec @@ -0,0 +1,196 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global xmlxsdver 2009/01 + +Name: sgml-common +Version: 0.6.3 +Release: %autorelease +Summary: Common SGML catalog and DTD files +License: GPL-3.0-or-later +URL: https://www.docbook.org/xml/ +#!RemoteAsset +Source0: https://www.sourceware.org/pub/docbook-tools/new-trials/SOURCES/%{name}-%{version}.tgz +Source1: xml.dcl +Source2: xml.soc +Source3: html.dcl +Source4: html.soc +#!RemoteAsset +Source5: http://www.w3.org/%{xmlxsdver}/xml.xsd +#!RemoteAsset +Source6: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd +#!RemoteAsset +Source7: http://www.w3.org/2001/XMLSchema.dtd +#!RemoteAsset +Source8: http://www.w3.org/2001/datatypes.dtd +Source9: sgmlwhich.1 +Source10: sgml.conf.5 +BuildSystem: autotools + +# Fix file modes +Patch0: 0001-sgml-common-umask.patch +# Fix xmldir +Patch1: 0002-sgml-common-xmldir.patch +# Fix quotes in SGML catalog +Patch2: 0003-sgml-common-quotes.patch + +BuildOption(install): htmldir='%{_datadir}/doc' + +BuildRequires: make +BuildRequires: libxml2 +BuildRequires: automake +Requires: %{_bindir}/basename + +%description +The sgml-common package contains a collection of entities and DTDs +that are useful for processing SGML, but that don't need to be +included in multiple packages. Sgml-common also includes an +up-to-date Open Catalog file. + +%package -n xml-common +Summary: Common XML catalog and DTD files +License: GPL-1.0-or-later +Requires(pre): %{_bindir}/xmlcatalog + +%description -n xml-common +The xml-common is a subpackage of sgml-common which contains +a collection XML catalogs that are useful for processing XML, +but that don't need to be included in main package. + +%prep -a +# replace bogus links with files +automakedir=`ls -1d /usr/share/automake* | head -n +1` +for file in COPYING INSTALL install-sh missing mkinstalldirs; do + rm $file + cp -p $automakedir/$file . +done + +%conf +# configure: error: --docdir=/usr/share/doc/sgml-common: invalid option +# So we need to use this +%configure + +%install -a +mkdir $RPM_BUILD_ROOT%{_sysconfdir}/xml +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook +mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgml/docbook +# Touch SGML catalog +touch $RPM_BUILD_ROOT%{_sysconfdir}/sgml/catalog +# Create an empty XML catalog. +XMLCATALOG=$RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog +%{_bindir}/xmlcatalog --noout --create $XMLCATALOG +# ...and add xml.xsd in it +for type in system uri ; do + for path in 2001 %{xmlxsdver} ; do + %{_bindir}/xmlcatalog --noout --add $type \ + "http://www.w3.org/$path/xml.xsd" \ + "file://%{_datadir}/xml/xml.xsd" $XMLCATALOG + done + # Add xmldsig-core-schema.xsd to catalog + %{_bindir}/xmlcatalog --noout --add $type \ + "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \ + "file://%{_datadir}/xml/xmldsig-core-schema.xsd" $XMLCATALOG +done +# Now put the common DocBook entries in it +%{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//ENTITIES DocBook XML" \ + "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//DTD DocBook XML" \ + "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegatePublic" \ + "ISO 8879:1986" \ + "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG +%{_bindir}/xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "file://%{_sysconfdir}/sgml/docbook/xmlcatalog" $XMLCATALOG +for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//EN" ; do + %{_bindir}/xmlcatalog --noout --add "public" \ + "$public" \ + "file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG +done +%{_bindir}/xmlcatalog --noout --add "system" \ + "http://www.w3.org/2001/XMLSchema.dtd" \ + "file://%{_datadir}/xml/XMLSchema.dtd" $XMLCATALOG + +# Also create the common DocBook catalog +%{_bindir}/xmlcatalog --noout --create \ + $RPM_BUILD_ROOT%{_sysconfdir}/sgml/docbook/xmlcatalog +ln -sf %{_sysconfdir}/sgml/docbook/xmlcatalog\ + $RPM_BUILD_ROOT%{_datadir}/sgml/docbook/xmlcatalog + +rm -f $RPM_BUILD_ROOT%{_datadir}/sgml/xml.dcl +install -p -m0644 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ + $RPM_BUILD_ROOT%{_datadir}/sgml +rm -rf $RPM_BUILD_ROOT%{_datadir}/xml/* +install -p -m0644 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} \ + $RPM_BUILD_ROOT%{_datadir}/xml +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5 +install -p -m0644 %{SOURCE9} $RPM_BUILD_ROOT%{_mandir}/man1 +install -p -m0644 %{SOURCE10} $RPM_BUILD_ROOT%{_mandir}/man5 + +# remove installed doc file and prepare installation with %%doc +rm $RPM_BUILD_ROOT%{_datadir}/doc/*.html +rm -rf __dist_doc/html/ +mkdir -p __dist_doc/html/ +cp -p doc/HTML/*.html __dist_doc/html/ + +%pre -n xml-common +if [ $1 -gt 1 ] && [ -e %{_sysconfdir}/xml/catalog ]; then + for type in system uri ; do + for path in 2001 %{xmlxsdver} ; do + %{_bindir}/xmlcatalog --noout --add $type \ + "http://www.w3.org/$path/xml.xsd" \ + "file://%{_datadir}/xml/xml.xsd" \ + %{_sysconfdir}/xml/catalog + done + %{_bindir}/xmlcatalog --noout --add $type \ + "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" \ + "file://%{_datadir}/xml/xmldsig-core-schema.xsd" %{_sysconfdir}/xml/catalog + done + for public in "-//W3C//DTD XMLSchema 200102//EN" "-//W3C//DTD XMLSCHEMA 200102//EN" ; do + %{_bindir}/xmlcatalog --noout --add "public" \ + "$public" \ + "file://%{_datadir}/xml/XMLSchema.dtd" %{_sysconfdir}/xml/catalog + done +fi + +%files +%doc __dist_doc/html/ AUTHORS NEWS ChangeLog COPYING README +%dir %{_sysconfdir}/sgml +%config(noreplace) %{_sysconfdir}/sgml/sgml.conf +%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/sgml/catalog +%dir %{_datadir}/sgml/sgml-iso-entities-8879.1986 +%{_datadir}/sgml/sgml-iso-entities-8879.1986/* +%{_datadir}/sgml/xml.dcl +%{_datadir}/sgml/xml.soc +%{_datadir}/sgml/html.dcl +%{_datadir}/sgml/html.soc +%{_bindir}/sgmlwhich +%{_bindir}/install-catalog +%{_mandir}/man8/install-catalog.8* +%{_mandir}/man1/sgmlwhich.1* +%{_mandir}/man5/sgml.conf.5* + +%files -n xml-common +%doc AUTHORS NEWS ChangeLog COPYING README +%dir %{_sysconfdir}/xml +%dir %{_sysconfdir}/sgml/docbook +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/xml/catalog +%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sgml/docbook/xmlcatalog +%{_datadir}/sgml/docbook/xmlcatalog +%{_datadir}/xml/xml.xsd +%{_datadir}/xml/xmldsig-core-schema.xsd +%{_datadir}/xml/XMLSchema.dtd +%{_datadir}/xml/datatypes.dtd + +%changelog +%{?autochangelog} diff --git a/SPECS/sgml-common/sgml.conf.5 b/SPECS/sgml-common/sgml.conf.5 new file mode 100644 index 00000000..7d97166f --- /dev/null +++ b/SPECS/sgml-common/sgml.conf.5 @@ -0,0 +1,40 @@ +.TH SGML.CONF 5 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +sgml.conf \- basic configuration file for SGML environment variables + +.SH "DESCRIPTION" +This file contains basic variables for SGML environment. +.HP +Format of this file is straightforward: + +- Lines are either empty lines, comment lines (starting with hash mark) or variable assignments. + +- Assigments take form of "variable=value" where whitespace is not allowed. This makes the format Bourne-shell includable. + +.SH "VARIABLES" +.TP +.B SGML_BASE_DIR +This variable contains root of the location of sgml components. Suggested value for this variable is /usr/share/sgml. +.TP +.B SGML_CATALOGS_DIRS +This variable contains location of sgml catalog files. Suggested value is /etc/sgml. +.TP +.B SGML_EXTRA_BASE_DIRS +This variable contains the directory name(s) of the root of the location(s) of optional sgml components that the system administrator doesn't want to install to primary SGML_BASE_DIR directory. If multiple directory names are mentioned, they are separated by colons. +.TP +.B SGML_BIN_DIR +This variable contains the directory where executables should be placed. By default /usr/bin. +.TP +.B SGML_EXTRA_BIN_DIRS +This variable contains the directory name(s) where optional executables can be placed. Suggested and default value is /usr/local/bin. If multiple directory names are mentioned, they are separated by colons. +.TP +.B SGML_TMP_DIR +A hint to components where to put temporary files. The suggested and default value is /tmp. +.TP +.B SGML_POSTINSTALL_CMD +A command that is to be executed when new components have been installed. This mechanism is not used by default, sgml components are usually registered by %post scriptlets. +.SH "SEE ALSO" +.\" Always quote multiple words for .SH +.BR xsltproc (1) diff --git a/SPECS/sgml-common/sgmlwhich.1 b/SPECS/sgml-common/sgmlwhich.1 new file mode 100644 index 00000000..b00e7fdd --- /dev/null +++ b/SPECS/sgml-common/sgmlwhich.1 @@ -0,0 +1,21 @@ +.TH SGMLWHICH 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +sgmlwhich \- prints location of main sgml configuration file +.SH SYNOPSIS +.B sgmlwhich + +.SH "DESCRIPTION" +Simple script which prints location of main sgml configuration file. +It is provided for consistency with non-LSB platforms. + +.SH OPTIONS +Script doesn't accept any options. + +.SH "SEE ALSO" +.\" Always quote multiple words for .SH +.BR sgml.conf (5) + +.SH AUTHOR +Eric Bischoff diff --git a/SPECS/sgml-common/xml.dcl b/SPECS/sgml-common/xml.dcl new file mode 100644 index 00000000..fed21030 --- /dev/null +++ b/SPECS/sgml-common/xml.dcl @@ -0,0 +1,179 @@ +" + PIC "?>" + SHORTREF NONE + + NAMES + SGMLREF + + QUANTITY NONE + + ENTITIES + "amp" 38 + "lt" 60 + "gt" 62 + "quot" 34 + "apos" 39 + + FEATURES + MINIMIZE + DATATAG NO + OMITTAG NO + RANK NO + SHORTTAG + STARTTAG + EMPTY NO + UNCLOSED NO + NETENABL IMMEDNET + ENDTAG + EMPTY NO + UNCLOSED NO + ATTRIB + DEFAULT YES + OMITNAME NO + VALUE NO + EMPTYNRM YES + IMPLYDEF + ATTLIST NO + DOCTYPE NO + ELEMENT NO + ENTITY NO + NOTATION NO + LINK + SIMPLE NO + IMPLICIT NO + EXPLICIT NO + OTHER + CONCUR NO + SUBDOC NO + FORMAL NO + URN NO + KEEPRSRE YES + VALIDITY TYPE + ENTITIES + REF ANY + INTEGRAL YES + APPINFO NONE + SEEALSO "ISO 8879:1986//NOTATION + Extensible Markup Language (XML) 1.0//EN" +> diff --git a/SPECS/sgml-common/xml.soc b/SPECS/sgml-common/xml.soc new file mode 100644 index 00000000..278c6f37 --- /dev/null +++ b/SPECS/sgml-common/xml.soc @@ -0,0 +1 @@ +SGMLDECL "xml.dcl" diff --git a/SPECS/shadow/0001-openruyi-disable-conflicting-tools.patch b/SPECS/shadow/0001-openruyi-disable-conflicting-tools.patch new file mode 100644 index 00000000..9a1fd4a3 --- /dev/null +++ b/SPECS/shadow/0001-openruyi-disable-conflicting-tools.patch @@ -0,0 +1,677 @@ +diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am +index a723e38..310ba03 100644 +--- a/etc/pam.d/Makefile.am ++++ b/etc/pam.d/Makefile.am +@@ -3,10 +3,7 @@ + + pamd_files = \ + chpasswd \ +- chfn \ +- chsh \ + groupmems \ +- login \ + newusers \ + passwd + +diff --git a/man/Makefile.am b/man/Makefile.am +index f34ed7a..d4099ce 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -8,10 +8,8 @@ endif + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -25,12 +23,9 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ ++ man8/lastlog.8 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -41,9 +36,7 @@ man_MANS = \ + man5/shadow.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +@@ -76,10 +69,8 @@ endif + + man_XMANS = \ + chage.1.xml \ +- chfn.1.xml \ + chgpasswd.8.xml \ + chpasswd.8.xml \ +- chsh.1.xml \ + expiry.1.xml \ + faillog.5.xml \ + faillog.8.xml \ +@@ -92,12 +83,9 @@ man_XMANS = \ + grpck.8.xml \ + gshadow.5.xml \ + limits.5.xml \ +- login.1.xml \ + login.access.5.xml \ + login.defs.5.xml \ +- logoutd.8.xml \ + newgidmap.1.xml \ +- newgrp.1.xml \ + newuidmap.1.xml \ + newusers.8.xml \ + nologin.8.xml \ +@@ -109,14 +97,12 @@ man_XMANS = \ + shadow.3.xml \ + shadow.5.xml \ + sg.1.xml \ +- su.1.xml \ + suauth.5.xml \ + subgid.5.xml \ + subuid.5.xml \ + useradd.8.xml \ + userdel.8.xml \ +- usermod.8.xml \ +- vipw.8.xml ++ usermod.8.xml + + if ENABLE_LASTLOG + man_XMANS += lastlog.8.xml +diff --git a/man/cs/Makefile.am b/man/cs/Makefile.am +index 45aec38..88cd649 100644 +--- a/man/cs/Makefile.am ++++ b/man/cs/Makefile.am +@@ -11,17 +11,14 @@ man_MANS = \ + man8/groupmod.8 \ + man8/grpck.8 \ + man5/gshadow.5 \ +- man8/nologin.8 \ + man5/passwd.5 \ +- man5/shadow.5 \ +- man1/su.1 \ +- man8/vipw.8 ++ man5/shadow.5 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 + endif + + EXTRA_DIST = $(man_MANS) \ +- man8/groupmems.8 \ +- man8/logoutd.8 ++ man1/id.1 \ ++ man8/groupmems.8 + +diff --git a/man/da/Makefile.am b/man/da/Makefile.am +index c61b787..b398ed7 100644 +--- a/man/da/Makefile.am ++++ b/man/da/Makefile.am +@@ -3,17 +3,11 @@ mandir = @mandir@/da + + # 2012.01.28 - activate manpages with more than 50% translated messages + man_MANS = \ +- man1/chfn.1 \ + man8/groupdel.8 \ + man5/gshadow.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ +- man8/nologin.8 \ +- man1/sg.1 \ +- man8/vigr.8 \ +- man8/vipw.8 +- +-man_nopam = ++ man1/sg.1 ++ ++man_nopam = + + if !USE_PAM + man_MANS += $(man_nopam) +diff --git a/man/de/Makefile.am b/man/de/Makefile.am +index d3a6d6c..a44d439 100644 +--- a/man/de/Makefile.am ++++ b/man/de/Makefile.am +@@ -3,10 +3,8 @@ mandir = @mandir@/de + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -20,12 +18,8 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -34,13 +28,10 @@ man_MANS = \ + man1/sg.1 \ + man3/shadow.3 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/fi/Makefile.am b/man/fi/Makefile.am +index 26a1a84..f02b92f 100644 +--- a/man/fi/Makefile.am ++++ b/man/fi/Makefile.am +@@ -1,10 +1,7 @@ + + mandir = @mandir@/fi + +-man_MANS = \ +- man1/chfn.1 \ +- man1/chsh.1 \ +- man1/su.1 ++man_MANS = + + # Outdated manpages + # passwd.1 (https://bugs.launchpad.net/ubuntu/+bug/384024) +diff --git a/man/fr/Makefile.am b/man/fr/Makefile.am +index 2365e23..51d255e 100644 +--- a/man/fr/Makefile.am ++++ b/man/fr/Makefile.am +@@ -3,10 +3,8 @@ mandir = @mandir@/fr + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -20,12 +18,8 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -34,13 +28,10 @@ man_MANS = \ + man1/sg.1 \ + man3/shadow.3 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/hu/Makefile.am b/man/hu/Makefile.am +index 6bf68e8..e6c9e78 100644 +--- a/man/hu/Makefile.am ++++ b/man/hu/Makefile.am +@@ -2,14 +2,10 @@ + mandir = @mandir@/hu + + man_MANS = \ +- man1/chsh.1 \ + man1/gpasswd.1 \ +- man1/login.1 \ +- man1/newgrp.1 \ + man1/passwd.1 \ + man5/passwd.5 \ +- man1/sg.1 \ +- man1/su.1 ++ man1/sg.1 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/id/Makefile.am b/man/id/Makefile.am +index 21f3dbe..6d10b93 100644 +--- a/man/id/Makefile.am ++++ b/man/id/Makefile.am +@@ -2,8 +2,6 @@ + mandir = @mandir@/id + + man_MANS = \ +- man1/chsh.1 \ +- man1/login.1 \ + man8/useradd.8 + + EXTRA_DIST = $(man_MANS) +diff --git a/man/it/Makefile.am b/man/it/Makefile.am +index 736576c..1f87a37 100644 +--- a/man/it/Makefile.am ++++ b/man/it/Makefile.am +@@ -3,10 +3,8 @@ mandir = @mandir@/it + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -20,12 +18,8 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -34,13 +28,10 @@ man_MANS = \ + man1/sg.1 \ + man3/shadow.3 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/ja/Makefile.am b/man/ja/Makefile.am +index b759726..d241e48 100644 +--- a/man/ja/Makefile.am ++++ b/man/ja/Makefile.am +@@ -3,9 +3,7 @@ mandir = @mandir@/ja + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -16,10 +14,7 @@ man_MANS = \ + man8/grpck.8 \ + man8/grpconv.8 \ + man8/grpunconv.8 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ + man1/passwd.1 \ + man5/passwd.5 \ +@@ -28,13 +23,10 @@ man_MANS = \ + man8/pwunconv.8 \ + man1/sg.1 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/ko/Makefile.am b/man/ko/Makefile.am +index 4f73651..1efeae5 100644 +--- a/man/ko/Makefile.am ++++ b/man/ko/Makefile.am +@@ -2,9 +2,6 @@ + mandir = @mandir@/ko + + man_MANS = \ +- man1/chfn.1 \ +- man1/chsh.1 \ +- man1/login.1 \ + man5/passwd.5 \ + man1/su.1 \ + man8/vigr.8 \ +diff --git a/man/pl/Makefile.am b/man/pl/Makefile.am +index 2a015f3..3cc46f7 100644 +--- a/man/pl/Makefile.am ++++ b/man/pl/Makefile.am +@@ -4,7 +4,6 @@ mandir = @mandir@/pl + # 2012.01.28 - activate manpages with more than 50% translated messages + man_MANS = \ + man1/chage.1 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -14,14 +13,10 @@ man_MANS = \ + man8/groupmems.8 \ + man8/groupmod.8 \ + man8/grpck.8 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man1/sg.1 \ + man3/shadow.3 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/ru/Makefile.am b/man/ru/Makefile.am +index 845a603..850306a 100644 +--- a/man/ru/Makefile.am ++++ b/man/ru/Makefile.am +@@ -3,10 +3,8 @@ mandir = @mandir@/ru + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -20,12 +18,8 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -34,13 +28,10 @@ man_MANS = \ + man1/sg.1 \ + man3/shadow.3 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/sv/Makefile.am b/man/sv/Makefile.am +index 1918af7..9bb48df 100644 +--- a/man/sv/Makefile.am ++++ b/man/sv/Makefile.am +@@ -3,7 +3,6 @@ mandir = @mandir@/sv + # 2012.01.28 - activate manpages with more than 50% translated messages + man_MANS = \ + man1/chage.1 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -14,18 +13,13 @@ man_MANS = \ + man8/groupmod.8 \ + man8/grpck.8 \ + man5/gshadow.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ + man1/sg.1 \ + man3/shadow.3 \ + man5/suauth.5 \ +- man8/userdel.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/userdel.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/tr/Makefile.am b/man/tr/Makefile.am +index 8d8b916..4fe3632 100644 +--- a/man/tr/Makefile.am ++++ b/man/tr/Makefile.am +@@ -2,15 +2,12 @@ mandir = @mandir@/tr + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/groupadd.8 \ + man8/groupdel.8 \ + man8/groupmod.8 \ +- man1/login.1 \ + man1/passwd.1 \ + man5/passwd.5 \ + man5/shadow.5 \ +- man1/su.1 \ + man8/useradd.8 \ + man8/userdel.8 \ + man8/usermod.8 +diff --git a/man/uk/Makefile.am b/man/uk/Makefile.am +index a0f106d..cc20aad 100644 +--- a/man/uk/Makefile.am ++++ b/man/uk/Makefile.am +@@ -3,10 +3,8 @@ mandir = @mandir@/uk + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -20,12 +18,8 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -34,13 +28,10 @@ man_MANS = \ + man1/sg.1 \ + man3/shadow.3 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/zh_CN/Makefile.am b/man/zh_CN/Makefile.am +index 59d1072..caa29e6 100644 +--- a/man/zh_CN/Makefile.am ++++ b/man/zh_CN/Makefile.am +@@ -3,10 +3,8 @@ mandir = @mandir@/zh_CN + + man_MANS = \ + man1/chage.1 \ +- man1/chfn.1 \ + man8/chgpasswd.8 \ + man8/chpasswd.8 \ +- man1/chsh.1 \ + man1/expiry.1 \ + man5/faillog.5 \ + man8/faillog.8 \ +@@ -20,12 +18,8 @@ man_MANS = \ + man8/grpconv.8 \ + man8/grpunconv.8 \ + man5/gshadow.5 \ +- man1/login.1 \ + man5/login.defs.5 \ +- man8/logoutd.8 \ +- man1/newgrp.1 \ + man8/newusers.8 \ +- man8/nologin.8 \ + man1/passwd.1 \ + man5/passwd.5 \ + man8/pwck.8 \ +@@ -34,13 +28,10 @@ man_MANS = \ + man1/sg.1 \ + man3/shadow.3 \ + man5/shadow.5 \ +- man1/su.1 \ + man5/suauth.5 \ + man8/useradd.8 \ + man8/userdel.8 \ +- man8/usermod.8 \ +- man8/vigr.8 \ +- man8/vipw.8 ++ man8/usermod.8 + + if ENABLE_LASTLOG + man_MANS += man8/lastlog.8 +diff --git a/man/zh_TW/Makefile.am b/man/zh_TW/Makefile.am +index c36ed2c..26696b6 100644 +--- a/man/zh_TW/Makefile.am ++++ b/man/zh_TW/Makefile.am +@@ -2,15 +2,11 @@ + mandir = @mandir@/zh_TW + + man_MANS = \ +- man1/chfn.1 \ +- man1/chsh.1 \ + man8/chpasswd.8 \ +- man1/newgrp.1 \ + man8/groupadd.8 \ + man8/groupdel.8 \ + man8/groupmod.8 \ + man5/passwd.5 \ +- man1/su.1 \ + man8/useradd.8 \ + man8/userdel.8 \ + man8/usermod.8 +diff --git a/src/Makefile.am b/src/Makefile.am +index 6981815..ce75459 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -3,7 +3,7 @@ EXTRA_DIST = \ + .indent.pro + + ubindir = ${prefix}/bin +-usbindir = ${prefix}/sbin ++usbindir = ${prefix}/bin + suidperms = 4755 + sgidperms = 2755 + +@@ -26,9 +26,9 @@ AM_CFLAGS = $(LIBBSD_CFLAGS) + # and installation would be much simpler (just two directories, + # $prefix/bin and $prefix/sbin, no install-data hacks...) + +-bin_PROGRAMS = login +-sbin_PROGRAMS = nologin +-ubin_PROGRAMS = faillog chage chfn chsh expiry gpasswd newgrp passwd ++bin_PROGRAMS = ++sbin_PROGRAMS = ++ubin_PROGRAMS = faillog lastlog chage expiry gpasswd newgrp passwd + if ENABLE_SUBIDS + ubin_PROGRAMS += newgidmap newuidmap + endif +@@ -48,22 +48,20 @@ usbin_PROGRAMS = \ + grpck \ + grpconv \ + grpunconv \ +- logoutd \ + newusers \ + pwck \ + pwconv \ + pwunconv \ + useradd \ + userdel \ +- usermod \ +- vipw ++ usermod + + # sulogin from sysvinit + noinst_PROGRAMS = sulogin + + suidusbins = + suidbins = +-suidubins = chage chfn chsh expiry gpasswd newgrp ++suidubins = chage expiry gpasswd newgrp + if WITH_SU + suidbins += su + endif +@@ -135,18 +133,16 @@ sulogin_LDADD = $(LDADD) $(LIBCRYPT) $(LIBECONF) + useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) -ldl + userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBECONF) -ldl + usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBECONF) -ldl +-vipw_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) + + install-am: all-am + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +- ln -sf newgrp $(DESTDIR)$(ubindir)/sg +- ln -sf vipw $(DESTDIR)$(usbindir)/vigr + set -e; for i in $(suidbins); do \ + chmod $(suidperms) $(DESTDIR)$(bindir)/$$i; \ + done + set -e; for i in $(suidubins); do \ + chmod $(suidperms) $(DESTDIR)$(ubindir)/$$i; \ + done ++ mv -v $(DESTDIR)$(ubindir)/newgrp $(DESTDIR)$(ubindir)/sg + set -e; for i in $(suidusbins); do \ + chmod $(suidperms) $(DESTDIR)$(usbindir)/$$i; \ + done diff --git a/SPECS/shadow/0002-openruyi-adapt-configs.patch b/SPECS/shadow/0002-openruyi-adapt-configs.patch new file mode 100644 index 00000000..e9969af8 --- /dev/null +++ b/SPECS/shadow/0002-openruyi-adapt-configs.patch @@ -0,0 +1,631 @@ +diff --git a/etc/login.defs b/etc/login.defs +index 33622c2..797ca6b 100644 +--- a/etc/login.defs ++++ b/etc/login.defs +@@ -3,6 +3,8 @@ + # + # $Id$ + # ++# NOTE: This file is adapted for the use on Arch Linux! ++# Unsupported options due to the use of util-linux or PAM are removed. + + # + # Delay in seconds before being allowed another attempt after a login failure +@@ -11,26 +13,11 @@ + # + FAIL_DELAY 3 + +-# +-# Enable logging and display of /var/log/faillog login(1) failure info. +-# +-FAILLOG_ENAB yes +- + # + # Enable display of unknown usernames when login(1) failures are recorded. + # + LOG_UNKFAIL_ENAB no + +-# +-# Enable logging of successful logins +-# +-LOG_OK_LOGINS no +- +-# +-# Enable logging and display of /var/log/lastlog login(1) time info. +-# +-LASTLOG_ENAB yes +- + # + # Limit the highest user ID number for which the lastlog entries should + # be updated. +@@ -40,88 +27,13 @@ LASTLOG_ENAB yes + # + #LASTLOG_UID_MAX + +-# +-# Enable checking and display of mailbox status upon login. +-# +-# Disable if the shell startup files already check for mail +-# ("mailx -e" or equivalent). +-# +-MAIL_CHECK_ENAB yes +- +-# +-# Enable additional checks upon password changes. +-# +-OBSCURE_CHECKS_ENAB yes +- +-# +-# Enable checking of time restrictions specified in /etc/porttime. +-# +-PORTTIME_CHECKS_ENAB yes +- +-# +-# Enable setting of ulimit, umask, and niceness from passwd(5) gecos field. +-# +-QUOTAS_ENAB yes +- +-# +-# Enable "syslog" logging of su(1) activity - in addition to sulog file logging. +-# SYSLOG_SG_ENAB does the same for newgrp(1) and sg(1). +-# +-SYSLOG_SU_ENAB yes +-SYSLOG_SG_ENAB yes +- +-# +-# If defined, either full pathname of a file containing device names or +-# a ":" delimited list of device names. Root logins will be allowed only +-# from these devices. +-# +-CONSOLE /etc/securetty +-#CONSOLE console:tty01:tty02:tty03:tty04 +- +-# +-# If defined, all su(1) activity is logged to this file. +-# +-#SULOG_FILE /var/log/sulog +- + # + # If defined, ":" delimited list of "message of the day" files to + # be displayed upon login. + # +-MOTD_FILE /etc/motd ++MOTD_FILE + #MOTD_FILE /etc/motd:/usr/lib/news/news-motd + +-# +-# If defined, this file will be output before each login(1) prompt. +-# +-#ISSUE_FILE /etc/issue +- +-# +-# If defined, file which maps tty line to TERM environment parameter. +-# Each line of the file is in a format similar to "vt100 tty01". +-# +-#TTYTYPE_FILE /etc/ttytype +- +-# +-# If defined, login(1) failures will be logged here in a utmp format. +-# last(1), when invoked as lastb(1), will read /var/log/btmp, so... +-# +-FTMP_FILE /var/log/btmp +- +-# +-# If defined, name of file whose presence will inhibit non-root +-# logins. The content of this file should be a message indicating +-# why logins are inhibited. +-# +-NOLOGINS_FILE /etc/nologin +- +-# +-# If defined, the command name to display when running "su -". For +-# example, if this is defined as "su" then ps(1) will display the +-# command as "-su". If not defined, then ps(1) will display the +-# name of the shell actually being run, e.g. something like "-sh". +-# +-SU_NAME su +- + # + # *REQUIRED* + # Directory where mailboxes reside, _or_ name of file, relative to the +@@ -139,21 +51,6 @@ MAIL_DIR /var/spool/mail + HUSHLOGIN_FILE .hushlogin + #HUSHLOGIN_FILE /etc/hushlogins + +-# +-# If defined, either a TZ environment parameter spec or the +-# fully-rooted pathname of a file containing such a spec. +-# +-#ENV_TZ TZ=CST6CDT +-#ENV_TZ /etc/tzname +- +-# +-# If defined, an HZ environment parameter spec. +-# +-# for Linux/x86 +-ENV_HZ HZ=100 +-# For Linux/Alpha... +-#ENV_HZ HZ=1024 +- + # + # *REQUIRED* The default PATH settings, for superuser and normal users. + # +@@ -175,23 +72,6 @@ ENV_PATH PATH=/bin:/usr/bin + TTYGROUP tty + TTYPERM 0600 + +-# +-# Login configuration initializations: +-# +-# ERASECHAR Terminal ERASE character ('\010' = backspace). +-# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +-# ULIMIT Default "ulimit" value. +-# +-# The ERASECHAR and KILLCHAR are used only on System V machines. +-# The ULIMIT is used only if the system supports it. +-# (now it works with setrlimit too; ulimit is in 512-byte units) +-# +-# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +-# +-ERASECHAR 0177 +-KILLCHAR 025 +-#ULIMIT 2097152 +- + # Default initial "umask" value used by login(1) on non-PAM enabled systems. + # Default "umask" value for pam_umask(8) on PAM enabled systems. + # UMASK is also used by useradd(8) and newusers(8) to set the mode for new +@@ -211,22 +91,12 @@ UMASK 022 + # + # PASS_MAX_DAYS Maximum number of days a password may be used. + # PASS_MIN_DAYS Minimum number of days allowed between password changes. +-# PASS_MIN_LEN Minimum acceptable password length. + # PASS_WARN_AGE Number of days warning given before a password expires. + # + PASS_MAX_DAYS 99999 + PASS_MIN_DAYS 0 +-PASS_MIN_LEN 5 + PASS_WARN_AGE 7 + +-# +-# If "yes", the user must be listed as a member of the first gid 0 group +-# in /etc/group (called "root" on most Linux systems) to be able to "su" +-# to uid 0 accounts. If the group doesn't exist or is empty, no one +-# will be able to "su" to uid 0. +-# +-SU_WHEEL_ONLY no +- + # + # Min/max values for automatic uid selection in useradd(8) + # +@@ -263,28 +133,6 @@ LOGIN_RETRIES 5 + # + LOGIN_TIMEOUT 60 + +-# +-# Maximum number of attempts to change password if rejected (too easy) +-# +-PASS_CHANGE_TRIES 5 +- +-# +-# Warn about weak passwords (but still allow them) if you are root. +-# +-PASS_ALWAYS_WARN yes +- +-# +-# Number of significant characters in the password for crypt(). +-# Default is 8, don't change unless your crypt() is better. +-# Ignored if MD5_CRYPT_ENAB set to "yes". +-# +-#PASS_MAX_LEN 8 +- +-# +-# Require password before chfn(1)/chsh(1) can make any changes. +-# +-CHFN_AUTH yes +- + # + # Which fields may be changed by regular users using chfn(1) - use + # any combination of letters "frwh" (full name, room number, work +@@ -293,38 +141,13 @@ CHFN_AUTH yes + # + CHFN_RESTRICT rwh + +-# +-# Password prompt (%s will be replaced by user name). +-# +-# XXX - it doesn't work correctly yet, for now leave it commented out +-# to use the default which is just "Password: ". +-#LOGIN_STRING "%s's Password: " +- +-# +-# Only works if compiled with MD5_CRYPT defined: +-# If set to "yes", new passwords will be encrypted using the MD5-based +-# algorithm compatible with the one used by recent releases of FreeBSD. +-# It supports passwords of unlimited length and longer salt strings. +-# Set to "no" if you need to copy encrypted passwords to other systems +-# which don't understand the new algorithm. Default is "no". +-# +-# Note: If you use PAM, it is recommended to use a value consistent with +-# the PAM modules configuration. +-# +-# This variable is deprecated. You should use ENCRYPT_METHOD instead. +-# +-#MD5_CRYPT_ENAB no +- + # + # Only works if compiled with ENCRYPTMETHOD_SELECT defined: +-# If set to MD5, MD5-based algorithm will be used for encrypting password + # If set to SHA256, SHA256-based algorithm will be used for encrypting password + # If set to SHA512, SHA512-based algorithm will be used for encrypting password +-# If set to BCRYPT, BCRYPT-based algorithm will be used for encrypting password + # If set to YESCRYPT, YESCRYPT-based algorithm will be used for encrypting password + # If set to DES, DES-based algorithm will be used for encrypting password (default) + # MD5 and DES should not be used for new hashes, see crypt(5) for recommendations. +-# Overrides the MD5_CRYPT_ENAB option + # + # Note: If you use PAM, it is recommended to use a value consistent with + # the PAM modules configuration. +@@ -348,21 +171,6 @@ CHFN_RESTRICT rwh + #SHA_CRYPT_MIN_ROUNDS 5000 + #SHA_CRYPT_MAX_ROUNDS 5000 + +-# +-# Only works if ENCRYPT_METHOD is set to BCRYPT. +-# +-# Define the number of BCRYPT rounds. +-# With a lot of rounds, it is more difficult to brute-force the password. +-# However, more CPU resources will be needed to authenticate users if +-# this value is increased. +-# +-# If not specified, 13 rounds will be attempted. +-# If only one of the MIN or MAX values is set, then this value will be used. +-# If MIN > MAX, the highest value will be used. +-# +-#BCRYPT_MIN_ROUNDS 13 +-#BCRYPT_MAX_ROUNDS 13 +- + # + # Only works if ENCRYPT_METHOD is set to YESCRYPT. + # +@@ -376,17 +184,6 @@ CHFN_RESTRICT rwh + # + #YESCRYPT_COST_FACTOR 5 + +-# +-# List of groups to add to the user's supplementary group set +-# when logging in from the console (as determined by the CONSOLE +-# setting). Default is none. +-# +-# Use with caution - it is possible for users to gain permanent +-# access to these groups, even when not logged in from the console. +-# How to do it is left as an exercise for the reader... +-# +-#CONSOLE_GROUPS floppy:audio:cdrom +- + # + # Should login be allowed if we can't cd to the home directory? + # Default is no. +@@ -401,12 +198,6 @@ DEFAULT_HOME yes + # + NONEXISTENT /nonexistent + +-# +-# If this file exists and is readable, login environment will be +-# read from it. Every line should be in the form name=value. +-# +-ENVIRON_FILE /etc/environment +- + # + # If defined, this command is run when removing a user. + # It should remove any at/cron/print jobs etc. owned by +@@ -454,14 +245,6 @@ USERGROUPS_ENAB yes + # + #GRANT_AUX_GROUP_SUBIDS yes + +-# +-# Prevents an empty password field to be interpreted as "no authentication +-# required". +-# Set to "yes" to prevent for all accounts +-# Set to "superuser" to prevent for UID 0 / root (default) +-# Set to "no" to not prevent for any account (dangerous, historical default) +-PREVENT_NO_AUTH superuser +- + # + # Select the HMAC cryptography algorithm. + # Used in pam_timestamp module to calculate the keyed-hash message +diff --git a/man/login.defs.5.xml b/man/login.defs.5.xml +index 7263395..3bd382a 100644 +--- a/man/login.defs.5.xml ++++ b/man/login.defs.5.xml +@@ -5,72 +5,40 @@ + SPDX-FileCopyrightText: 2007 - 2009, Nicolas François + SPDX-License-Identifier: BSD-3-Clause + --> +- +- + +- +- +- + + + +- + + +- +- +- + +- +- +- + + + + +- +- +- + +- + + +- + +- + + +- + +- + +- +- +- +- + + + +- +- + +- +- +- + + + + +- + + + + +- + +- + + + +@@ -147,76 +115,44 @@ + The following configuration items are provided: + + +- &BCRYPT_MIN_ROUNDS; +- &CHFN_AUTH; + &CHFN_RESTRICT; +- &CHSH_AUTH; +- &CONSOLE; +- &CONSOLE_GROUPS; + &CREATE_HOME; + &DEFAULT_HOME; + &ENCRYPT_METHOD; +- &ENV_HZ; + &ENV_PATH; + &ENV_SUPATH; +- &ENV_TZ; +- &ENVIRON_FILE; +- &ERASECHAR; + &FAIL_DELAY; +- &FAILLOG_ENAB; +- &FAKE_SHELL; +- &FTMP_FILE; + &GID_MAX; + &HMAC_CRYPTO_ALGO; + &HOME_MODE; + &HUSHLOGIN_FILE; +- &ISSUE_FILE; +- &KILLCHAR; +- &LASTLOG_ENAB; + &LASTLOG_UID_MAX; +- &LOG_OK_LOGINS; + &LOG_UNKFAIL_ENAB; + &LOGIN_RETRIES; +- &LOGIN_STRING; + &LOGIN_TIMEOUT; +- &MAIL_CHECK_ENAB; + &MAIL_DIR; + &MAX_MEMBERS_PER_GROUP; +- &MD5_CRYPT_ENAB; + &MOTD_FILE; +- &NOLOGINS_FILE; + &NONEXISTENT; +- &OBSCURE_CHECKS_ENAB; +- &PASS_ALWAYS_WARN; +- &PASS_CHANGE_TRIES; + &PASS_MAX_DAYS; + &PASS_MIN_DAYS; + &PASS_WARN_AGE; +- ++ + , and + are only used at the + time of account creation. Any changes to these settings won't affect + existing accounts. + +- &PASS_MAX_LEN; +- &PORTTIME_CHECKS_ENAB; +- "AS_ENAB; + &SHA_CRYPT_MIN_ROUNDS; +- &SULOG_FILE; +- &SU_NAME; +- &SU_WHEEL_ONLY; + &SUB_GID_COUNT; + &SUB_UID_COUNT; + &SYS_GID_MAX; + &SYS_UID_MAX; + &SYSLOG_SG_ENAB; +- &SYSLOG_SU_ENAB; + &TCB_AUTH_GROUP; + &TCB_SYMLINKS; + &TTYGROUP; +- &TTYTYPE_FILE; + &UID_MAX; +- &ULIMIT; + &UMASK; + &USERDEL_CMD; + &USERGROUPS_ENAB; +@@ -255,7 +191,7 @@ + + BCRYPT_MAX_ROUNDS + BCRYPT_MIN_ROUNDS +- ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB ++ ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP + SHA_CRYPT_MAX_ROUNDS + SHA_CRYPT_MIN_ROUNDS + YESCRYPT_COST_FACTOR +@@ -280,7 +216,7 @@ + chsh + + +- CHSH_AUTH LOGIN_STRING ++ CHSH_AUTH + + + +@@ -292,7 +228,7 @@ + + BCRYPT_MAX_ROUNDS + BCRYPT_MIN_ROUNDS +- ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB ++ ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP + SHA_CRYPT_MAX_ROUNDS + SHA_CRYPT_MIN_ROUNDS + YESCRYPT_COST_FACTOR +@@ -351,35 +287,6 @@ + LASTLOG_UID_MAX + + +- +- login +- +- +- CONSOLE +- CONSOLE_GROUPS DEFAULT_HOME +- ENV_HZ ENV_PATH ENV_SUPATH +- ENV_TZ ENVIRON_FILE +- ERASECHAR FAIL_DELAY +- FAILLOG_ENAB +- FAKE_SHELL +- FTMP_FILE +- HUSHLOGIN_FILE +- ISSUE_FILE +- KILLCHAR +- LASTLOG_ENAB LASTLOG_UID_MAX +- LOGIN_RETRIES +- LOGIN_STRING +- LOGIN_TIMEOUT LOG_OK_LOGINS LOG_UNKFAIL_ENAB +- MAIL_CHECK_ENAB MAIL_DIR MAIL_FILE +- MOTD_FILE NOLOGINS_FILE PORTTIME_CHECKS_ENAB +- QUOTAS_ENAB +- TTYGROUP TTYPERM TTYTYPE_FILE +- ULIMIT UMASK +- USERGROUPS_ENAB +- +- +- +- + + newgrp / sg + +@@ -396,7 +303,7 @@ + BCRYPT_MIN_ROUNDS + ENCRYPT_METHOD + GID_MAX GID_MIN +- MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB ++ MAX_MEMBERS_PER_GROUP + HOME_MODE + PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE + SHA_CRYPT_MAX_ROUNDS +@@ -416,8 +323,7 @@ + + BCRYPT_MAX_ROUNDS + BCRYPT_MIN_ROUNDS +- ENCRYPT_METHOD MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB +- PASS_ALWAYS_WARN PASS_CHANGE_TRIES PASS_MAX_LEN PASS_MIN_LEN ++ ENCRYPT_METHOD + SHA_CRYPT_MAX_ROUNDS + SHA_CRYPT_MIN_ROUNDS + YESCRYPT_COST_FACTOR +@@ -450,32 +356,6 @@ + + + +- +- su +- +- +- CONSOLE +- CONSOLE_GROUPS DEFAULT_HOME +- ENV_HZ ENVIRON_FILE +- ENV_PATH ENV_SUPATH +- ENV_TZ LOGIN_STRING MAIL_CHECK_ENAB +- MAIL_DIR MAIL_FILE QUOTAS_ENAB +- SULOG_FILE SU_NAME +- SU_WHEEL_ONLY +- SYSLOG_SU_ENAB +- USERGROUPS_ENAB +- +- +- +- +- sulogin +- +- +- ENV_HZ +- ENV_TZ +- +- +- + + useradd + +@@ -504,24 +384,6 @@ + + + +- +- usermod +- +- +- LASTLOG_UID_MAX +- MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP +- TCB_SYMLINKS USE_TCB +- +- +- +- +- vipw +- +- +- USE_TCB +- +- +- + +
+ diff --git a/SPECS/shadow/login.defs b/SPECS/shadow/login.defs new file mode 100644 index 00000000..c4c9252b --- /dev/null +++ b/SPECS/shadow/login.defs @@ -0,0 +1,37 @@ +# /etc/login.defs +# Configuration defaults for the shadow password suite. +# openRuyi's default configuration. + +# Standard mailbox location. +MAIL_DIR /var/spool/mail + +# Non-intrusive password aging defaults for a general-purpose distro. +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 +# Set a modern, secure minimum password length. +PASS_MIN_LEN 8 + +# Standard UID/GID boundaries for system vs. user accounts. +UID_MIN 1000 +GID_MIN 1000 +SYS_UID_MIN 100 +SYS_UID_MAX 999 +SYS_GID_MIN 100 +SYS_GID_MAX 999 + +# Always create home directories for new users. +CREATE_HOME yes + +# Enable User Private Groups (UPG) for better security. +USERGROUPS_ENAB yes + +# A secure default umask for new users. (files=644, dirs=755) +UMASK 022 + +# A secure default mode for new home directories (private by default). +HOME_MODE 0700 + +# Use 'yescrypt' as the default password hashing algorithm. +# It is a modern, strong, and memory-hard algorithm. +ENCRYPT_METHOD yescrypt diff --git a/SPECS/shadow/passwd.service b/SPECS/shadow/passwd.service new file mode 100644 index 00000000..fd03d039 --- /dev/null +++ b/SPECS/shadow/passwd.service @@ -0,0 +1,5 @@ +#%PAM-1.0 +# This tool only uses the password stack. +password substack system-auth +-password optional pam_gnome_keyring.so use_authtok +password substack postlogin diff --git a/SPECS/shadow/shadow.service b/SPECS/shadow/shadow.service new file mode 100644 index 00000000..edc275fd --- /dev/null +++ b/SPECS/shadow/shadow.service @@ -0,0 +1,24 @@ +# /usr/lib/systemd/system/shadow.service +# +# SPDX-License-Identifier: BSD-3-Clause +# +# shadow.service - Verify integrity of password and group files. +# + +[Unit] +Description=Verify integrity of password and group files + +[Service] +Type=oneshot +# Run both checks, and fail the service if either of the commands fails. +ExecStart=/bin/sh -c '/usr/sbin/pwck -r || r=1; /usr/sbin/grpck -r && exit $r' + +# Harden the service for security. +Nice=19 +IOSchedulingClass=best-effort +IOSchedulingPriority=7 +PrivateTmp=true +PrivateDevices=true +ProtectSystem=strict +ProtectHome=read-only +NoNewPrivileges=yes diff --git a/SPECS/shadow/shadow.spec b/SPECS/shadow/shadow.spec new file mode 100644 index 00000000..b56cea73 --- /dev/null +++ b/SPECS/shadow/shadow.spec @@ -0,0 +1,207 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global includesubiddir %{_includedir}/shadow + +Name: shadow +Version: 4.18.0 +Release: %autorelease +Summary: User and group account management utilities +License: BSD-3-Clause AND GPL-2.0-or-later +URL: https://github.com/shadow-maint/shadow +#!RemoteAsset +Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/%{name}-%{version}.tar.xz + +Source1: useradd.defaults +Source2: login.defs +Source3: shadow.timer +Source4: shadow.service +Source5: passwd.service + +Patch0: 0001-openruyi-disable-conflicting-tools.patch +Patch1: 0002-openruyi-adapt-configs.patch + +BuildSystem: autotools + +# Configure options for a modern, systemd-centric distro. +BuildOption(conf): --enable-shadowgrp +BuildOption(conf): --with-audit +BuildOption(conf): --with-libpam +BuildOption(conf): --with-acl +BuildOption(conf): --with-attr +BuildOption(conf): --with-selinux +# Enable modern password hashing algorithms. +BuildOption(conf): --with-sha-crypt +BuildOption(conf): --with-yescrypt +BuildOption(conf): --without-libbsd +BuildOption(conf): --without-libcrack +BuildOption(conf): --without-nscd +BuildOption(conf): --without-sssd +# --- CRITICAL: Disable tools provided by util-linux/systemd --- +BuildOption(conf): --without-su +BuildOption(conf): --disable-account-tools-setuid +BuildOption(conf): --with-group-name-max-length=32 +BuildOption(conf): --sbindir=%{_bindir} + +BuildOption(install): gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale +BuildOption(install): MKINSTALLDIRS=`pwd`/mkinstalldirs + +BuildRequires: make, gcc, autoconf, automake, libtool +BuildRequires: audit-devel, acl-devel, libattr-devel, pam-devel +BuildRequires: libselinux-devel, libsemanage-devel, libxcrypt-devel + +Requires: audit, acl, libattr, pam, libxcrypt +# Requires the subid library, which is part of this source package. +Requires: subid%{?_isa} = %{version}-%{release} + +Requires: setup + +Provides: shadow = %{version}-%{release} +Provides: passwd = 0.80-18 +Obsoletes: passwd <= 0.80-19 + +%description +This package includes the necessary programs for managing user and group +accounts, and their passwords and groups in shadow format. + +# --- Library Subpackage for Subordinate IDs --- +%package -n subid +Summary: A library to manage subordinate UID and GID ranges + +%description -n subid +The subid library provides a way to manage subordinate ID ranges, +primarily used for unprivileged containers. + +# --- Development Package --- +%package devel +Summary: Development files for shadow and subid +Requires: subid%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files and development libraries for +shadow and subid. + +%conf -p +autoreconf -fiv + +%install -a +%make_install -C man install-man + +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/default +install -p -c -m 0600 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/default/useradd +install -p -c -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/login.defs +install -d -m 755 $RPM_BUILD_ROOT%{_pam_confdir} +install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_pam_confdir}/passwd + +# --- CRITICAL: Ensure conflicting tools are removed --- +rm -f %{buildroot}%{_bindir}/{su,login,chfn,chsh,expiry,faillog} +rm -f %{buildroot}%{_sbindir}/{nologin,logoutd} + +# Also remove corresponding man pages and PAM configs to be safe +rm -f %{buildroot}%{_mandir}/man1/{su,login,chfn,chsh,expiry,faillog}.1* +rm -f %{buildroot}%{_mandir}/man8/{nologin,logoutd}.8* +rm -f %{buildroot}%{_sysconfdir}/pam.d/{su,login,chfn,chsh} + +find $RPM_BUILD_ROOT%{_mandir} -depth -type d -empty -delete + +%find_lang %{name} --generate-subpackages --with-man --all-name + +echo $(ls) +mkdir -p $RPM_BUILD_ROOT/%{includesubiddir} +install -m 644 libsubid/subid.h $RPM_BUILD_ROOT/%{includesubiddir}/ + +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/*.a + +install -Dm644 %{SOURCE3} %{buildroot}%{_unitdir}/shadow.timer +install -Dm644 %{SOURCE4} %{buildroot}%{_unitdir}/shadow.service + +# touch %{buildroot}%{_sysconfdir}/subuid +# touch %{buildroot}%{_sysconfdir}/subgid + + +%post +%service_add_post shadow.service shadow.timer + +%preun +%service_del_preun shadow.service shadow.timer + +%postun +%service_del_postun shadow.service shadow.timer + +%ldconfig_scriptlets -n subid + +%files +%doc NEWS doc/HOWTO README +# %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/subgid +# %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/subuid +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/login.defs +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/useradd + +%config(noreplace) %{_pam_confdir}/passwd +%config(noreplace) %{_pam_confdir}/chpasswd +%config(noreplace) %{_pam_confdir}/groupmems +%config(noreplace) %{_pam_confdir}/newusers + +%{_unitdir}/shadow.service +%{_unitdir}/shadow.timer + +%{_bindir}/sg +%attr(4755,root,root) %{_bindir}/chage +%attr(4755,root,root) %{_bindir}/gpasswd +%attr(0755,root,root) %caps(cap_setgid=ep) %{_bindir}/newgidmap +%attr(0755,root,root) %caps(cap_setuid=ep) %{_bindir}/newuidmap +%attr(4755,root,root) %{_bindir}/passwd +%{_bindir}/chgpasswd +%{_bindir}/chpasswd +%{_bindir}/group* +%{_bindir}/grp* +%{_bindir}/lastlog +%{_bindir}/newusers +%{_bindir}/pwck +%{_bindir}/pwconv +%{_bindir}/pwunconv +%{_bindir}/user* + +%{_mandir}/man1/chage.1* +%{_mandir}/man1/gpasswd.1* +%{_mandir}/man1/sg.1* +%{_mandir}/man1/newgidmap.1* +%{_mandir}/man1/newuidmap.1* +%{_mandir}/man1/passwd.1* +%{_mandir}/man3/getspnam.3* +%{_mandir}/man3/shadow.3* +%{_mandir}/man5/faillog.5* +%{_mandir}/man5/gshadow.5* +%{_mandir}/man5/login.defs.5* +%{_mandir}/man5/passwd.5* +%{_mandir}/man5/shadow.5* +%{_mandir}/man5/subgid.5* +%{_mandir}/man5/subuid.5* +%{_mandir}/man8/*conv.8* +%{_mandir}/man8/chgpasswd.8* +%{_mandir}/man8/chpasswd.8* +%{_mandir}/man8/faillog.8* +%{_mandir}/man8/group*.8* +%{_mandir}/man8/grpck.8* +%{_mandir}/man8/lastlog.8* +%{_mandir}/man8/newusers.8* +%{_mandir}/man8/pwck.8* +%{_mandir}/man8/user*.8* + +%files -n subid +%{_libdir}/libsubid.so.* +%{_bindir}/getsubids +%{_mandir}/man1/getsubids.1* + +%files devel +%{includesubiddir}/subid.h +%{_libdir}/libsubid.so + +%changelog +%{?autochangelog} diff --git a/SPECS/shadow/shadow.timer b/SPECS/shadow/shadow.timer new file mode 100644 index 00000000..ec895790 --- /dev/null +++ b/SPECS/shadow/shadow.timer @@ -0,0 +1,20 @@ +# /usr/lib/systemd/system/shadow.timer +# +# SPDX-License-Identifier: BSD-3-Clause +# +# shadow.timer - Daily verification of password and group files. +# + +[Unit] +Description=Daily verification of password and group files + +[Timer] +# Run once a day. +OnCalendar=daily +# Spread the load; timer can be delayed by up to 12 hours. +AccuracySec=12h +# Run the job if the system was powered off during the last scheduled time. +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/SPECS/shadow/useradd.defaults b/SPECS/shadow/useradd.defaults new file mode 100644 index 00000000..6c85a62b --- /dev/null +++ b/SPECS/shadow/useradd.defaults @@ -0,0 +1,16 @@ +# /etc/default/useradd +# Default values for useradd(8) command. +# openRuyi's default configuration. + +# Default home directory. +HOME=/home + +# The default shell for new users. Bash is a sane and widely used default. +SHELL=/bin/bash + +# The skeleton directory for new user's home. +SKEL=/etc/skel + +# Do not create a mail spool file for new users by default. +# This is a legacy feature. +CREATE_MAIL_SPOOL=no diff --git a/SPECS/sharutils/0001-backport-Fix-building-with-GCC-10.patch b/SPECS/sharutils/0001-backport-Fix-building-with-GCC-10.patch new file mode 100644 index 00000000..ab0aaa58 --- /dev/null +++ b/SPECS/sharutils/0001-backport-Fix-building-with-GCC-10.patch @@ -0,0 +1,98 @@ +From ec4ceb632abc0d54061269bc779459e13172f264 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 23 Jan 2020 15:42:41 +0100 +Subject: [PATCH 1/2] Fix building with GCC 10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 10 defaults to -fno-common that results into errors on multiple +global variable definitions: + +/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: +shar-opts.o:(.data.rel.ro.local+0x0): multiple definition of +`program_name'; shar.o:(.rodata+0x10): first defined here + +This patch fixes it by changing the definitions in header files into extern +declarations. + + + +Signed-off-by: Petr Písař +--- + src/shar-opts.h | 2 +- + src/shar-std.def | 2 +- + src/unshar-opts.h | 2 +- + src/uudecode-opts.h | 2 +- + src/uuencode-opts.h | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/shar-opts.h b/src/shar-opts.h +index 75dcae2..5055d1c 100644 +--- a/src/shar-opts.h ++++ b/src/shar-opts.h +@@ -352,7 +352,7 @@ extern "C" { + * global exported definitions + */ + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + extern bool initialization_done; + extern int optidx; +diff --git a/src/shar-std.def b/src/shar-std.def +index ed06b77..a28f61c 100644 +--- a/src/shar-std.def ++++ b/src/shar-std.def +@@ -41,7 +41,7 @@ no-misuse-usage; + usage-message; + die-code; + +-export = '#include "local.h"'"\nchar const * const program_name;"; ++export = '#include "local.h"'"\nextern char const * const program_name;"; + + #shell + echo "include = 'char const * const program_name = \"${progname}\";';" +diff --git a/src/unshar-opts.h b/src/unshar-opts.h +index 2c3febe..9ebe2fc 100644 +--- a/src/unshar-opts.h ++++ b/src/unshar-opts.h +@@ -192,7 +192,7 @@ extern "C" { + extern size_t separator_str_len; + + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + + /* * * * * * +diff --git a/src/uudecode-opts.h b/src/uudecode-opts.h +index 29b3b5c..5494289 100644 +--- a/src/uudecode-opts.h ++++ b/src/uudecode-opts.h +@@ -170,7 +170,7 @@ extern "C" { + * global exported definitions + */ + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + + /* * * * * * +diff --git a/src/uuencode-opts.h b/src/uuencode-opts.h +index e71c9b8..d6ec03e 100644 +--- a/src/uuencode-opts.h ++++ b/src/uuencode-opts.h +@@ -166,7 +166,7 @@ extern "C" { + * global exported definitions + */ + #include "local.h" +-char const * const program_name; ++extern char const * const program_name; + + + /* * * * * * +-- +2.21.1 + + diff --git a/SPECS/sharutils/sharutils.spec b/SPECS/sharutils/sharutils.spec new file mode 100644 index 00000000..b5ae69a1 --- /dev/null +++ b/SPECS/sharutils/sharutils.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sharutils +Version: 4.15.2 +Release: %autorelease +Summary: The GNU shar utilities for creating shell archives +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/sharutils/ +#!RemoteAsset +Source0: https://ftp.gnu.org/gnu/sharutils/sharutils-%{version}.tar.xz +BuildSystem: autotools +Patch: 0001-backport-Fix-building-with-GCC-10.patch + +BuildRequires: autoconf automake libtool +BuildRequires: gcc make +BuildRequires: gettext-devel +BuildRequires: texinfo + +%description +This is the set of GNU shar utilities. shar makes shell archives out of many +files, preparing them for transmission by electronic mail services. Use unshar +to unpack shell archives after reception. uuencode and uudecode are also included. + +%conf -p +# note: 'false' is a keyword with '-std=c23' onwards +export CFLAGS="%{optflags} -std=gnu99" +autoreconf -fiv + +%install -a +rm -f %{buildroot}%{_infodir}/dir + +%find_lang %{name} --generate-subpackages + +%files +%license COPYING AUTHORS +%doc README ChangeLog NEWS THANKS TODO +%{_bindir}/* +%{_infodir}/*info* +%{_mandir}/man?/* + +%changelog +%{?autochangelog} diff --git a/SPECS/simdutf/simdutf.spec b/SPECS/simdutf/simdutf.spec new file mode 100644 index 00000000..0a74e9b7 --- /dev/null +++ b/SPECS/simdutf/simdutf.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: simdutf +Version: 7.4.0 +Release: %autorelease +Summary: High-speed Unicode validation and transcoding library +License: Apache-2.0 AND BSD-3-Clause +URL: https://github.com/simdutf/simdutf +#!RemoteAsset +Source0: https://github.com/simdutf/simdutf/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DSIMDUTF_BENCHMARKS:BOOL=OFF +BuildOption(conf): -DSIMDUTF_TOOLS:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc-c++ + +%description +A C++ library for validating and transcoding Unicode (UTF-8, UTF-16, UTF-32) +at high speeds using SIMD instructions. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config, and CMake files needed +to develop applications that use the simdutf library. + + +%ldconfig_scriptlets + +%files +%license LICENSE-APACHE +%doc AUTHORS README.md +%{_libdir}/libsimdutf.so.* + +%files devel +%{_includedir}/simdutf.h +%{_includedir}/simdutf +%dir %{_libdir}/cmake +%{_libdir}/cmake/simdutf +%{_libdir}/libsimdutf.so +%{_libdir}/pkgconfig/simdutf.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/slang/slang.spec b/SPECS/slang/slang.spec new file mode 100644 index 00000000..48b92e6e --- /dev/null +++ b/SPECS/slang/slang.spec @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: slang +Version: 2.3.3 +Release: %autorelease +Summary: An interpreted language and programming library +License: GPL-2.0-or-later +URL: https://www.jedsoft.org/slang/ +#!RemoteAsset +Source0: https://www.jedsoft.org/releases/slang/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildRequires: gcc libpng-devel zlib-devel +BuildRequires: libpng-devel +BuildRequires: zlib-devel + +BuildOption(conf): --with-pnglib=%{_libdir} +BuildOption(conf): --with-pnginc=%{_includedir} +BuildOption(conf): --with-zlib=%{_libdir} +BuildOption(conf): --with-zinc=%{_includedir} +BuildOption(conf): --without-pcre + +%description +S-Lang is a multi-platform programmer's library designed to allow +a developer to create robust multi-platform software. It provides +facilities required by interactive applications such as display/ +screen management, keyboard input, keymaps, and so on. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +Files for %{name} development. + +%package help +Summary: Help files for %{name} +BuildArch: noarch + +%description help +Help files for %{name}. + +%prep +%autosetup -p1 +sed -i '/^INSTALL_MODULE=/s/_DATA//' configure + +%install +%make_install install-all INSTALL="install -p" + +mkdir -p %{buildroot}%{_includedir}/slang +ln -s ../slang.h %{buildroot}%{_includedir}/slang/slang.h +ln -s ../slcurses.h %{buildroot}%{_includedir}/slang/slcurses.h + +%ldconfig_scriptlets + +%files +%config(noreplace) %{_sysconfdir}/slsh.rc +%license COPYING +%doc NEWS +%{_libdir}/libslang.so.2 +%{_libdir}/libslang.so.2.* +%{_libdir}/%{name} +%{_bindir}/slsh +%{_datadir}/slsh + +%files devel +%doc doc/text/*.txt doc/README doc/*.txt +%{_libdir}/libslang.so +%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/libslang.a +%{_includedir}/slang.h +%{_includedir}/slcurses.h +%{_includedir}/%{name} + +%files help +%{_mandir}/man1/slsh.1* +/usr/share/doc/slang/v2 +/usr/share/doc/slsh + +%changelog +%{?autochangelog} diff --git a/SPECS/slibtool/slibtool.spec b/SPECS/slibtool/slibtool.spec new file mode 100644 index 00000000..7caa8576 --- /dev/null +++ b/SPECS/slibtool/slibtool.spec @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: slibtool +Version: 0.7.3 +Release: %autorelease +Summary: A skinny libtool implementation, written in C +License: MIT +URL: http://git.midipix.org/cgit.cgi/slibtool +#!RemoteAsset +Source0: http://midipix.org/dl/slibtool/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildRequires: gcc make +BuildRequires: m4 + +%description +'slibtool' is an independent reimplementation of the widely used libtool, +written in C. It is designed to be a clean, fast, easy-to-use +libtool drop-in replacement. Being a compiled binary, building a package +with 'slibtool' is often faster than with its script-based counterpart. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package provides files necessary for developing applications +that use functionality provided by slibtool. + +%conf +# --disable-silent-rules: unsupported config argument. +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --includedir=%{_includedir} \ + --datadir=%{_datadir} \ + --mandir=%{_mandir} \ + --enable-shared \ + --all-shared \ + --disable-static + +# No tests. +%check +: + +%ldconfig_scriptlets + +%files +%license COPYING.SLIBTOOL +%doc README NEWS THANKS CONTRIB +%{_bindir}/* +%{_libdir}/lib*.so* + +%files devel +%{_libdir}/lib*.so +%{_includedir}/slibtool/ +%{_libdir}/pkgconfig/slibtool.pc +%{_datadir}/slibtool/ + +%changelog +%{?autochangelog} diff --git a/SPECS/snappy/snappy.spec b/SPECS/snappy/snappy.spec new file mode 100644 index 00000000..00bb05db --- /dev/null +++ b/SPECS/snappy/snappy.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: snappy +Version: 1.2.2 +Release: %autorelease +Summary: A fast compressor/decompressor +License: BSD-3-Clause +URL: https://github.com/google/snappy +#!RemoteAsset +Source0: https://github.com/google/snappy/archive/%{version}/snappy-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DBUILD_SHARED_LIBS:BOOL=ON +BuildOption(conf): -DSNAPPY_ENABLE_RTTI:BOOL=ON +BuildOption(conf): -DCMAKE_CXX_STANDARD:STRING=17 +BuildOption(conf): -DSNAPPY_BUILD_TESTS:BOOL=OFF +BuildOption(conf): -DSNAPPY_BUILD_BENCHMARKS:BOOL=OFF +BuildRequires: gcc-c++ make cmake + +%description +Snappy is a compression/decomp-ression library. It does not aim for maximum +compression, or compatibility with any other compression library; instead, +it aims for very high speeds and reasonable compression. + +%package devel +Summary: Development files for snappy +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and documentation for +developing applications that use the Snappy library. + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS +%{_libdir}/libsnappy.so.* + +%files devel +%doc NEWS README.md +%doc format_*.txt framing_*.txt +%{_includedir}/snappy*.h +%{_libdir}/libsnappy.so +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/Snappy +%{_libdir}/cmake/Snappy/* + +%changelog +%{?autochangelog} diff --git a/SPECS/socket_wrapper/0001-swrap-fix-tests.patch b/SPECS/socket_wrapper/0001-swrap-fix-tests.patch new file mode 100644 index 00000000..b5b357b4 --- /dev/null +++ b/SPECS/socket_wrapper/0001-swrap-fix-tests.patch @@ -0,0 +1,37 @@ +From 86247c5d48a1f9a33e4f8e914a55b196a3bbe20a Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 17 Jul 2025 15:18:13 +0200 +Subject: [PATCH] tests: Add missing stdint.h + +This is required by cmocka. + +Signed-off-by: Andreas Schneider +--- + tests/test_ioctl.c | 1 + + tests/test_sendmsg_recvmsg_fd.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tests/test_ioctl.c b/tests/test_ioctl.c +index 25bec38..addcb36 100644 +--- a/tests/test_ioctl.c ++++ b/tests/test_ioctl.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include + #include + +diff --git a/tests/test_sendmsg_recvmsg_fd.c b/tests/test_sendmsg_recvmsg_fd.c +index 30c9861..1f8154d 100644 +--- a/tests/test_sendmsg_recvmsg_fd.c ++++ b/tests/test_sendmsg_recvmsg_fd.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + #include + #include + +-- +GitLab diff --git a/SPECS/socket_wrapper/socket_wrappers.spec b/SPECS/socket_wrapper/socket_wrappers.spec new file mode 100644 index 00000000..91758f80 --- /dev/null +++ b/SPECS/socket_wrapper/socket_wrappers.spec @@ -0,0 +1,84 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: socket_wrapper +Version: 1.5.0 +Release: %autorelease +Summary: A library passing all socket communications through Unix sockets +License: BSD-3-Clause +URL: http://cwrap.org/ +#!RemoteAsset +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc +BuildSystem: cmake + +# Fix tests +Patch0: 0001-swrap-fix-tests.patch + +BuildOption(conf): -DUNIT_TESTING=ON + +BuildRequires: cmake +BuildRequires: cmocka-cmake + +Recommends: cmake +Recommends: pkgconfig + +%description +socket_wrapper aims to help client/server software development teams willing to +gain full functional test coverage. It makes it possible to run several +instances of the full software stack on the same machine and perform locally +functional testing of complex network configurations. + +To use it set the following environment variables: + +LD_PRELOAD=libsocket_wrapper.so +SOCKET_WRAPPER_DIR=/path/to/swrap_dir + +This package doesn't have a devel package because this project is for +development/testing. + +%package -n libsocket_wrapper_noop +Summary: A library providing dummies for socket_wrapper + +%description -n libsocket_wrapper_noop +Applications with the need to call socket_wrapper_enabled() should link against +-lsocket_wrapper_noop in order to resolve the symbol at link time. + +%package -n libsocket_wrapper_noop-devel +Summary: Development headers for libsocket_wrapper_noop +Requires: libsocket_wrapper_noop = %{version}-%{release} + +%description -n libsocket_wrapper_noop-devel +Development headers for applications with the need to call +socket_wrapper_enabled(). + +%ldconfig_scriptlets + +%ldconfig_scriptlets -n libsocket_wrapper_noop + +%files +%doc AUTHORS README.md CHANGELOG +%license LICENSE +%{_libdir}/libsocket_wrapper.so* +%dir %{_libdir}/cmake/socket_wrapper +%{_libdir}/cmake/socket_wrapper/socket_wrapper-config-version.cmake +%{_libdir}/cmake/socket_wrapper/socket_wrapper-config.cmake +%{_libdir}/pkgconfig/socket_wrapper.pc +%{_mandir}/man1/socket_wrapper.1* + +%files -n libsocket_wrapper_noop +%{_libdir}/libsocket_wrapper_noop.so.* + +%files -n libsocket_wrapper_noop-devel +%{_includedir}/socket_wrapper.h +%{_libdir}/libsocket_wrapper_noop.so +%{_libdir}/cmake/socket_wrapper/socket_wrapper_noop-config*.cmake +%{_libdir}/pkgconfig/socket_wrapper_noop.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/source-highlight/source-highlight.spec b/SPECS/source-highlight/source-highlight.spec new file mode 100644 index 00000000..a7b52e72 --- /dev/null +++ b/SPECS/source-highlight/source-highlight.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: source-highlight +Version: 3.1.9 +Release: %autorelease +Summary: Source Code Highlighter with Support for Many Languages +License: GPL-3.0-or-later +URL: http://www.gnu.org/software/src-highlite +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/src-highlite/source-highlight-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --with-boost-regex=boost_regex +BuildOption(conf): --disable-rpath --disable-static +BuildOption(build): CXXFLAGS="%{optflags} -std=c++14" + +BuildRequires: bison boost-devel chrpath flex gcc gcc-c++ help2man +BuildRequires: bash-completion + +%description +This program, given a source file, produces a document with syntax highlighting. +Source-highlight reads source language specifications dynamically, so it can be +easily extended for handling new languages and output formats. + +%package devel +Summary: Header files and development libraries for source-highlight +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config files, and development libraries +for the source-highlight library. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + +echo -e "\ncxx = cpp.lang" >> %{buildroot}%{_datadir}/source-highlight/lang.map + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS NEWS +%{_bindir}/check-regexp +%{_bindir}/*html +%{_bindir}/source-highlight* +%{_bindir}/src-hilite-lesspipe.sh +%{_libdir}/libsource-*.so* +%{_datadir}/source-highlight/* +%{_mandir}/man1/*.gz +%{_datadir}/info/*.info.gz +%dir %{_sysconfdir}/bash_completion.d +%{_sysconfdir}/bash_completion.d/source-highlight + +%files devel +%{_includedir}/srchilite/* +%{_libdir}/pkgconfig/* +%{_docdir}/%{name}/ + +%changelog +%{?autochangelog} diff --git a/SPECS/spdlog/spdlog.spec b/SPECS/spdlog/spdlog.spec new file mode 100644 index 00000000..daa62b7f --- /dev/null +++ b/SPECS/spdlog/spdlog.spec @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: spdlog +Version: 1.15.3 +Release: %autorelease +Summary: Super fast C++ logging library +License: MIT +URL: https://github.com/gabime/spdlog +#!RemoteAsset +Source: https://github.com/gabime/spdlog/archive/refs/tags/v%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DSPDLOG_BUILD_SHARED:BOOL=ON +BuildOption(conf): -DSPDLOG_BUILD_EXAMPLE:BOOL=OFF +BuildOption(conf): -DSPDLOG_INSTALL:BOOL=ON +BuildOption(conf): -DSPDLOG_FMT_EXTERNAL:BOOL=ON +BuildOption(conf): -DSPDLOG_BUILD_BENCH:BOOL=OFF +BuildOption(conf): -DSPDLOG_BUILD_TESTS:BOOL=OFF + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: ninja +BuildRequires: fmt-devel >= 10.0.0 + +%description +A header-only and compiled C++ logging library, designed to be as fast as possible. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +Requires: libstdc++-devel +Requires: fmt-devel + +%description devel +This package contains C++ header files and development libraries for spdlog. + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md +%{_libdir}/libspdlog.so* + +%files devel +%doc example +%{_includedir}/spdlog +%{_libdir}/libspdlog.so +%{_libdir}/cmake/spdlog +%{_libdir}/pkgconfig/spdlog.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/sqlite/0001-sqlite-lemon-system-template.patch b/SPECS/sqlite/0001-sqlite-lemon-system-template.patch new file mode 100644 index 00000000..712df564 --- /dev/null +++ b/SPECS/sqlite/0001-sqlite-lemon-system-template.patch @@ -0,0 +1,21 @@ +diff --git a/tool/lemon.c b/tool/lemon.c +index 324dda0c5f..0842a07332 100644 +--- a/tool/lemon.c ++++ b/tool/lemon.c +@@ -3763,6 +3763,7 @@ PRIVATE void tplt_skip_header(FILE *in, int *lineno) + PRIVATE FILE *tplt_open(struct lemon *lemp) + { + static char templatename[] = "lempar.c"; ++ static char system_templatename[] = "/usr/share/lemon/lempar.c"; + char buf[1000]; + FILE *in; + char *tpltname; +@@ -3797,6 +3798,8 @@ PRIVATE FILE *tplt_open(struct lemon *lemp) + tpltname = buf; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access(system_templatename,004)==0 ){ ++ tpltname = system_templatename; + }else{ + toFree = tpltname = pathsearch(lemp->argv[0],templatename,0); + } diff --git a/SPECS/sqlite/0002-add-missing-quote.patch b/SPECS/sqlite/0002-add-missing-quote.patch new file mode 100644 index 00000000..80f3fad8 --- /dev/null +++ b/SPECS/sqlite/0002-add-missing-quote.patch @@ -0,0 +1,11 @@ +--- a/autosetup/sqlite-config.tcl 2025-07-30 19:45:35.000000000 +0000 ++++ a/autosetup/sqlite-config.tcl 2025-09-17 04:19:13.849975768 +0000 +@@ -1955,7 +1955,7 @@ + } + } + if {![file-isexec $with_tclsh]} { +- proj-warn "Cannot find a usable tclsh (tried: $tryThese) ++ proj-warn "Cannot find a usable tclsh (tried: $tryThese)" + } + } + define TCLSH_CMD $with_tclsh diff --git a/SPECS/sqlite/sqlite.spec b/SPECS/sqlite/sqlite.spec new file mode 100644 index 00000000..2ef28964 --- /dev/null +++ b/SPECS/sqlite/sqlite.spec @@ -0,0 +1,206 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# These are for SQLite sources +%define year 2025 +%define download_version 3500400 +# Doc version might be different +%define doc_version 3500400 + +Name: sqlite +Version: 3.50.4 +Release: %autorelease +Summary: Library that implements an embeddable SQL database engine +License: GPL-3.0-or-later +URL: https://www.sqlite.org/ +#!RemoteAsset +Source0: http://www.sqlite.org/%{year}/%{name}-src-%{download_version}.zip +#!RemoteAsset +Source1: http://www.sqlite.org/%{year}/%{name}-doc-%{doc_version}.zip +BuildSystem: autotools + +# Support system-wide template (located at /usr/share/lemon/lempar.c) in lemon. +Patch0: 0001-sqlite-lemon-system-template.patch +Patch1: 0002-add-missing-quote.patch + +BuildOption(prep): -a 1 + +BuildRequires: gcc-c++ +BuildRequires: autoconf +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: glibc-devel +BuildRequires: tcl-devel +BuildRequires: pkgconfig(zlib) +BuildRequires: unzip + +Requires: %{name}-devel = %{version}-%{release} +Provides: %{name}3 = %{version}-%{release} + +%description +SQLite is a C library that implements an SQL database engine. A large +subset of SQL92 is supported. A complete database is stored in a +single disk file. The API is designed for convenience and ease of use. +Applications that link against SQLite can enjoy the power and +flexibility of an SQL database without the administrative hassles of +supporting a separate database server. Version 2 and version 3 binaries +are named to permit each to be installed on a single host + +SQLite is built with some non-default settings: +- Additional APIs for table's and query's metadata are enabled + (SQLITE_ENABLE_COLUMN_METADATA) +- Directory syncs are disabled (SQLITE_DISABLE_DIRSYNC) +- `secure_delete` defaults to 'on', so deleted content is overwritten + with zeros (SQLITE_SECURE_DELETE) +- `sqlite3_unlock_notify()` is enabled - this feature allows to register a + callback that's invoked when lock is removed (SQLITE_ENABLE_UNLOCK_NOTIFY) +- `dbstat` virtual table with disk space usage is enabled +- `dbpage` virtual table providing direct access to underlying database file + is enabled (SQLITE_ENABLE_DBPAGE_VTAB) +- Threadsafe mode is set to 1 - Serialized, so it is safe to use in a + multithreaded environment (SQLITE_THREADSAFE=1) +- FTS3, FTS4 and FTS5 are enabled so versions 3 to 5 of the full-text search + engine are available (SQLITE_ENABLE_FTS3, SQLITE_ENABLE_FTS4, + SQLITE_ENABLE_FTS5) +- Pattern parser in FTS3 extension supports nested parenthesis and operators + `AND`, `OR` (SQLITE_ENABLE_FTS3_PARENTHESIS) +- R*Tree index extension is enabled (SQLITE_ENABLE_RTREE) +- Extension loading is enabled +- Sessions (sqlite-session feature) is enabled +- Preupdate hook is enabled + +It is also important to note that shell has some extensions as its dependencies, +so some extensions are enabled by default in SQLite shell, but not in the system +libraries. Only the aforementioned extensions are available in the libraries: +FTS3, FTS4, FTS5, R*Tree + +%package devel +Summary: Development tools for the sqlite3 embeddable SQL database engine +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +This package contains the header files and development documentation +for %{name}. If you like to develop programs using %{name}, you will need +to install %{name}-devel. + +%package doc +Summary: Documentation for sqlite +BuildArch: noarch + +%description doc +This package contains most of the static HTML files that comprise the +www.sqlite.org website, including all of the SQL Syntax and the +C/C++ interface specs and other miscellaneous documentation. + +%package -n lemon +Summary: A parser generator + +%description -n lemon +Lemon is an LALR(1) parser generator for C or C++. It does the same +job as bison and yacc. But lemon is not another bison or yacc +clone. It uses a different grammar syntax which is designed to reduce +the number of coding errors. Lemon also uses a more sophisticated +parsing engine that is faster than yacc and bison and which is both +reentrant and thread-safe. Furthermore, Lemon implements features +that can be used to eliminate resource leaks, making is suitable for +use in long-running programs such as graphical user interfaces or +embedded controllers. + +%package tcl +Summary: Tcl module for the sqlite3 embeddable SQL database engine +Requires: %{name} = %{version}-%{release} + +%description tcl +This package contains the tcl modules for %{name}. + +%package analyzer +Summary: An analysis program for sqlite3 database files +Requires: %{name} = %{version}-%{release} + +%description analyzer +This package contains the analysis program for %{name}. + +%prep -a +# Remove backup-file +rm -f %{name}-doc-%{docver}/sqlite.css~ || : + +%conf +# These are needed otherwise configure will fail +export CC=gcc +export CC_FOR_BUILD=gcc +export TCLLIBDIR=%{tcl_archdir}/sqlite%{version} +export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS \ + -DSQLITE_ENABLE_COLUMN_METADATA=1 \ + -DSQLITE_ENABLE_UNLOCK_NOTIFY \ + -DSQLITE_ENABLE_DBSTAT_VTAB=1 \ + -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \ + -DSQLITE_ENABLE_FTS3_PARENTHESIS \ + -DSQLITE_SECURE_DELETE \ + -DSQLITE_ENABLE_STMTVTAB \ + -DSQLITE_ENABLE_STAT4 \ + -DSQLITE_MAX_VARIABLE_NUMBER=250000 \ + -DSQLITE_MAX_EXPR_DEPTH=10000 \ + -DSQLITE_ENABLE_MATH_FUNCTIONS" +# By default, we use disable-rpath, which will +# cause failure here, so we overwrite the conf here +%configure \ + --disable-silent-rules \ + --disable-static \ + --enable-fts3 \ + --enable-fts4 \ + --enable-fts5 \ + --enable-rtree \ + --soname=legacy + +%build -a +# We also need to build tcl & sqldiff +%make_build sqlite3_analyzer +%make_build sqldiff + +%install -a +# Install lemon +install -D -m0644 sqlite3.1 $RPM_BUILD_ROOT/%{_mandir}/man1/sqlite3.1 +install -D -m0755 lemon $RPM_BUILD_ROOT/%{_bindir}/lemon +install -D -m0644 tool/lempar.c $RPM_BUILD_ROOT/%{_datadir}/lemon/lempar.c +# Install tcl +# Fix up permissions to enable dep extraction +install -d $RPM_BUILD_ROOT/%{tcl_archdir} +chmod 0755 $RPM_BUILD_ROOT/%{tcl_archdir}/sqlite%{version}/*.so +# Install sqlite3_analyzer +install -D -m0755 sqlite3_analyzer $RPM_BUILD_ROOT/%{_bindir}/sqlite3_analyzer +# Install sqldiff +install -D -m0755 sqldiff $RPM_BUILD_ROOT/%{_bindir}/sqldiff + +%files +%{_bindir}/sqlite3 +%{_bindir}/sqldiff +%{_mandir}/man?/* + +%files devel +%doc README.md +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/*.so.0 +%{_libdir}/*.so.%{version} +%{_libdir}/pkgconfig/*.pc + +%files doc +%doc %{name}-doc-%{doc_version}/* + +%files -n lemon +%{_bindir}/lemon +%{_datadir}/lemon + +%files tcl +%{tcl_archdir}/* + +%files analyzer +%{_bindir}/sqlite3_analyzer + +%changelog +%{?autochangelog} diff --git a/SPECS/squashfs-tools/squashfs-tools.spec b/SPECS/squashfs-tools/squashfs-tools.spec new file mode 100644 index 00000000..a4c6c620 --- /dev/null +++ b/SPECS/squashfs-tools/squashfs-tools.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: squashfs-tools +Version: 4.7.2 +Release: %autorelease +Summary: Utilities for the SquashFS read-only filesystem +License: GPL-2.0-or-later +URL: https://github.com/plougher/squashfs-tools +#!RemoteAsset +Source0: https://github.com/plougher/squashfs-tools/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): -C squashfs-tools LZMA_XZ_SUPPORT=1 XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1 ZSTD_SUPPORT=1 +BuildOption(install): -C squashfs-tools INSTALL_DIR=%{buildroot}%{_bindir} INSTALL_MANPAGES_DIR=%{buildroot}%{_mandir} + +BuildRequires: lz4-devel +BuildRequires: lzma-devel +BuildRequires: lzo-devel +BuildRequires: libzstd-devel +BuildRequires: zlib-devel + +Provides: squashfs +Supplements: filesystem(squashfs) + +%description +This package contains the userland utilities (mksquashfs, unsquashfs) +to create and read SquashFS images. SquashFS is a highly compressed +read-only filesystem for Linux. + +# No configure +%conf + +%build -p +sed -i -e "s|-O2|%{optflags}|" squashfs-tools/Makefile + +# no check target +%check + +%files +%license COPYING +%{_bindir}/mksquashfs +%{_bindir}/unsquashfs +%{_bindir}/sqfstar +%{_bindir}/sqfscat +%{_mandir}/*.1.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/squashfuse/squashfuse.spec b/SPECS/squashfuse/squashfuse.spec new file mode 100644 index 00000000..b7855574 --- /dev/null +++ b/SPECS/squashfuse/squashfuse.spec @@ -0,0 +1,61 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: squashfuse +Version: 0.6.1 +Release: %autorelease +Summary: FUSE filesystem to mount squashfs archives +License: BSD-2-Clause +URL: https://github.com/vasi/squashfuse +#!RemoteAsset +Source: https://github.com/vasi/squashfuse/archive/refs/tags/%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-demo + +BuildRequires: make autoconf automake libtool gcc +BuildRequires: fuse-devel libattr-devel libzstd-devel lz4-devel xz-devel zlib-devel + +%description +Squashfuse lets you mount SquashFS archives in user-space. It supports almost +all features of the SquashFS format, yet is still fast and memory-efficient. +This package contains the user-space tools and runtime libraries. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} + +%description devel +This package contains the header files and development libraries for +developing applications that use squashfuse. + +%conf -p +./autogen.sh + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README CONFIGURATION NEWS TODO +%{_bindir}/squashfuse +%{_bindir}/squashfuse_ll +%{_mandir}/man1/squashfuse.1* +%{_mandir}/man1/squashfuse_ll.1* +# Libraries (merged from -libs) +%{_libdir}/libsquashfuse.so.0* +%{_libdir}/libsquashfuse_ll.so.0* + +%files devel +%{_includedir}/squashfuse/ +%{_libdir}/pkgconfig/squashfuse.pc +%{_libdir}/pkgconfig/squashfuse_ll.pc +%{_libdir}/libsquashfuse.so +%{_libdir}/libsquashfuse_ll.so + +%changelog +%{?autochangelog} diff --git a/SPECS/sshpass/sshpass.spec b/SPECS/sshpass/sshpass.spec new file mode 100644 index 00000000..d32d80a7 --- /dev/null +++ b/SPECS/sshpass/sshpass.spec @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sshpass +Version: 1.10 +Release: %autorelease +Summary: Non-interactive SSH authentication utility +License: GPL-2.0-or-later +URL: http://sshpass.sourceforge.net/ +#!RemoteAsset +Source0: https://downloads.sourceforge.net/project/sshpass/sshpass/1.10/sshpass-1.10.tar.gz + +BuildSystem: autotools +BuildRequires: gcc + +%description +sshpass is a tool for non-interactively performing password authentication +with SSH's "interactive keyboard password authentication". Most users should +use the more secure public key authentication method instead. + +%files +%doc AUTHORS COPYING ChangeLog NEWS +%{_bindir}/sshpass +%{_mandir}/man1/sshpass.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/strace/strace.spec b/SPECS/strace/strace.spec new file mode 100644 index 00000000..ef65c141 --- /dev/null +++ b/SPECS/strace/strace.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: strace +Version: 6.16 +Release: %autorelease +Summary: Tracks and displays system calls associated with a running process +License: LGPL-2.1-or-later +URL: http://strace.io/ +#!RemoteAsset +Source0: https://strace.io/files/%{version}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://strace.io/files/%{version}/%{name}-%{version}.tar.xz.asc +BuildSystem: autotools + +BuildRequires: xz +BuildRequires: gzip +BuildRequires: make +BuildRequires: libelf-devel +BuildRequires: binutils-devel +BuildRequires: pkgconfig(libselinux) + +%description +The strace program intercepts and records the system calls called and +received by a running process. Strace can print a record of each +system call, its arguments and its return value. Strace is useful for +diagnosing problems and debugging, as well as for instructional +purposes. + +Install strace if you need a tool to track the system calls made and +received by a process. + +%files +%defattr(-,root,root) +%doc CREDITS README doc/README-linux-ptrace NEWS +%{_bindir}/strace +%{_bindir}/strace-log-merge +%{_mandir}/man1/strace.1%{ext_man} +%{_mandir}/man1/strace-log-merge.1%{ext_man} + +%changelog +%{?autochangelog} diff --git a/SPECS/sudo/0001-CVE-2025-32462.patch b/SPECS/sudo/0001-CVE-2025-32462.patch new file mode 100644 index 00000000..224164e5 --- /dev/null +++ b/SPECS/sudo/0001-CVE-2025-32462.patch @@ -0,0 +1,38 @@ +From f8ff956e17c36d44b9465688995821c8d890b451 Mon Sep 17 00:00:00 2001 +From: "Todd C. Miller" +Date: Tue, 1 Apr 2025 09:24:51 -0600 +Subject: [PATCH] Only allow a remote host to be specified when listing + privileges. + +This fixes a bug where a user with sudoers privileges on a different +host could execute a command on the local host, even if the sudoers +file would not otherwise allow this. CVE-2025-32462 + +Reported by Rich Mirch @ Stratascale Cyber Research Unit (CRU). +--- + plugins/sudoers/sudoers.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c +index 70a0c1a528..ad2fa2f61c 100644 +--- a/plugins/sudoers/sudoers.c ++++ b/plugins/sudoers/sudoers.c +@@ -350,6 +350,18 @@ sudoers_check_common(struct sudoers_context *ctx, int pwflag) + time_t now; + debug_decl(sudoers_check_common, SUDOERS_DEBUG_PLUGIN); + ++ /* The user may only specify a host for "sudo -l". */ ++ if (!ISSET(ctx->mode, MODE_LIST|MODE_CHECK)) { ++ if (strcmp(ctx->runas.host, ctx->user.host) != 0) { ++ log_warningx(ctx, SLOG_NO_STDERR|SLOG_AUDIT, ++ N_("user not allowed to set remote host for command")); ++ sudo_warnx("%s", ++ U_("a remote host may only be specified when listing privileges.")); ++ ret = false; ++ goto done; ++ } ++ } ++ + /* If given the -P option, set the "preserve_groups" flag. */ + if (ISSET(ctx->mode, MODE_PRESERVE_GROUPS)) + def_preserve_groups = true; diff --git a/SPECS/sudo/0002-CVE-2025-32463.patch b/SPECS/sudo/0002-CVE-2025-32463.patch new file mode 100644 index 00000000..db5fa57b --- /dev/null +++ b/SPECS/sudo/0002-CVE-2025-32463.patch @@ -0,0 +1,3630 @@ +From ab539db89a71ffdb97690875b0d5dd4826437aa8 Mon Sep 17 00:00:00 2001 +From: "Todd C. Miller" +Date: Sun, 6 Apr 2025 08:28:46 -0600 +Subject: [PATCH] Revert pivot_root and go back to prepending the new root + directory. + +We cannot perform passwd/group lookups _after_ changing the root +directory. This does mean that symbolic links in a path are not +currently handled properly when matching chroot()ed commands. + +Fixes a local privilege escalation vulnerability where a user could +craft their own nsswitch.conf file to load a shared library of their +choosing and run arbitrary code. CVE-2025-32463 + +Reported by Rich Mirch @ Stratascale Cyber Research Unit (CRU). + +Signed-off-by: xuce +--- + MANIFEST | 2 - + plugins/sudoers/Makefile.in | 998 ++++++++---------- + plugins/sudoers/editor.c | 2 +- + plugins/sudoers/find_path.c | 20 +- + plugins/sudoers/goodpath.c | 17 +- + plugins/sudoers/match_command.c | 212 ++-- + plugins/sudoers/match_digest.c | 14 +- + plugins/sudoers/parse.h | 2 +- + plugins/sudoers/pivot.c | 87 -- + plugins/sudoers/pivot.h | 32 - + plugins/sudoers/regress/editor/check_editor.c | 3 +- + plugins/sudoers/regress/fuzz/fuzz_policy.c | 7 +- + plugins/sudoers/regress/fuzz/fuzz_stubs.c | 12 - + plugins/sudoers/resolve_cmnd.c | 6 +- + plugins/sudoers/stubs.c | 14 - + plugins/sudoers/sudoers.c | 15 +- + plugins/sudoers/sudoers.h | 8 +- + plugins/sudoers/testsudoers.c | 12 - + 18 files changed, 641 insertions(+), 822 deletions(-) + delete mode 100644 plugins/sudoers/pivot.c + delete mode 100644 plugins/sudoers/pivot.h + +diff --git a/MANIFEST b/MANIFEST +index 19a2181..9ada4ef 100644 +--- a/MANIFEST ++++ b/MANIFEST +@@ -686,8 +686,6 @@ plugins/sudoers/mkdefaults + plugins/sudoers/parse.h + plugins/sudoers/parse_ldif.c + plugins/sudoers/parser_warnx.c +-plugins/sudoers/pivot.c +-plugins/sudoers/pivot.h + plugins/sudoers/po/README + plugins/sudoers/po/ast.mo + plugins/sudoers/po/ast.po +diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in +index 5c5f3d1..050bf45 100644 +--- a/plugins/sudoers/Makefile.in ++++ b/plugins/sudoers/Makefile.in +@@ -189,11 +189,11 @@ SUDOERS_OBJS = $(AUTH_OBJS) audit.lo boottime.lo check.lo check_util.lo \ + display.lo editor.lo env.lo sudoers_hooks.lo env_pattern.lo \ + file.lo find_path.lo fmtsudoers.lo gc.lo goodpath.lo \ + group_plugin.lo interfaces.lo iolog.lo iolog_path_escapes.lo \ +- locale.lo log_client.lo logging.lo lookup.lo pivot.lo \ +- policy.lo prompt.lo serialize_list.lo set_perms.lo \ +- sethost.lo starttime.lo strlcpy_unesc.lo strvec_join.lo \ +- sudo_nss.lo sudoers.lo sudoers_cb.lo sudoers_ctx_free.lo \ +- timestamp.lo unesc_str.lo @SUDOERS_OBJS@ ++ locale.lo log_client.lo logging.lo lookup.lo policy.lo \ ++ prompt.lo serialize_list.lo set_perms.lo sethost.lo \ ++ starttime.lo strlcpy_unesc.lo strvec_join.lo sudo_nss.lo \ ++ sudoers.lo sudoers_cb.lo sudoers_ctx_free.lo timestamp.lo \ ++ unesc_str.lo @SUDOERS_OBJS@ + + SUDOERS_IOBJS = $(SUDOERS_OBJS:.lo=.i) + +@@ -727,9 +727,9 @@ afs.lo: $(authdir)/afs.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/timestamp.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/afs.c + afs.i: $(authdir)/afs.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -737,9 +737,9 @@ afs.i: $(authdir)/afs.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/timestamp.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/afs.c > $@ + afs.plog: afs.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/afs.c --i-file afs.i --output-file $@ +@@ -749,10 +749,9 @@ aix_auth.lo: $(authdir)/aix_auth.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/aix_auth.c + aix_auth.i: $(authdir)/aix_auth.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -760,10 +759,9 @@ aix_auth.i: $(authdir)/aix_auth.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/aix_auth.c > $@ + aix_auth.plog: aix_auth.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/aix_auth.c --i-file aix_auth.i --output-file $@ +@@ -773,10 +771,9 @@ alias.lo: $(srcdir)/alias.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/alias.c + alias.i: $(srcdir)/alias.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -784,10 +781,9 @@ alias.i: $(srcdir)/alias.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/alias.c > $@ + alias.plog: alias.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/alias.c --i-file alias.i --output-file $@ +@@ -799,8 +795,8 @@ audit.lo: $(srcdir)/audit.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_ssl_compat.h \ + $(incdir)/sudo_util.h $(srcdir)/bsm_audit.h $(srcdir)/defaults.h \ + $(srcdir)/linux_audit.h $(srcdir)/log_client.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/solaris_audit.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/parse.h $(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/audit.c + audit.i: $(srcdir)/audit.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -811,8 +807,8 @@ audit.i: $(srcdir)/audit.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_ssl_compat.h \ + $(incdir)/sudo_util.h $(srcdir)/bsm_audit.h $(srcdir)/defaults.h \ + $(srcdir)/linux_audit.h $(srcdir)/log_client.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/solaris_audit.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/parse.h $(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/audit.c > $@ + audit.plog: audit.i +@@ -824,7 +820,7 @@ b64_decode.lo: $(srcdir)/b64_decode.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/b64_decode.c +@@ -835,7 +831,7 @@ b64_decode.i: $(srcdir)/b64_decode.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/b64_decode.c > $@ +@@ -848,7 +844,7 @@ b64_encode.o: $(srcdir)/b64_encode.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/b64_encode.c +@@ -859,7 +855,7 @@ b64_encode.i: $(srcdir)/b64_encode.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/b64_encode.c > $@ +@@ -871,10 +867,9 @@ boottime.lo: $(srcdir)/boottime.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/boottime.c + boottime.i: $(srcdir)/boottime.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -882,10 +877,9 @@ boottime.i: $(srcdir)/boottime.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/boottime.c > $@ + boottime.plog: boottime.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/boottime.c --i-file boottime.i --output-file $@ +@@ -895,8 +889,8 @@ bsdauth.lo: $(authdir)/bsdauth.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/bsdauth.c + bsdauth.i: $(authdir)/bsdauth.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ +@@ -905,8 +899,8 @@ bsdauth.i: $(authdir)/bsdauth.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/bsdauth.c > $@ + bsdauth.plog: bsdauth.i +@@ -918,9 +912,9 @@ bsm_audit.lo: $(srcdir)/bsm_audit.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/bsm_audit.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/bsm_audit.c + bsm_audit.i: $(srcdir)/bsm_audit.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -929,9 +923,9 @@ bsm_audit.i: $(srcdir)/bsm_audit.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/bsm_audit.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/bsm_audit.c > $@ + bsm_audit.plog: bsm_audit.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/bsm_audit.c --i-file bsm_audit.i --output-file $@ +@@ -942,9 +936,9 @@ canon_path.lo: $(srcdir)/canon_path.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/canon_path.c + canon_path.i: $(srcdir)/canon_path.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -953,9 +947,9 @@ canon_path.i: $(srcdir)/canon_path.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/canon_path.c > $@ + canon_path.plog: canon_path.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/canon_path.c --i-file canon_path.i --output-file $@ +@@ -964,20 +958,18 @@ check.lo: $(srcdir)/check.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/check.c + check.i: $(srcdir)/check.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/check.c > $@ + check.plog: check.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/check.c --i-file check.i --output-file $@ +@@ -988,9 +980,9 @@ check_addr.o: $(srcdir)/regress/parser/check_addr.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/parser/check_addr.c + check_addr.i: $(srcdir)/regress/parser/check_addr.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -999,9 +991,9 @@ check_addr.i: $(srcdir)/regress/parser/check_addr.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/parser/check_addr.c > $@ + check_addr.plog: check_addr.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/regress/parser/check_addr.c --i-file check_addr.i --output-file $@ +@@ -1012,10 +1004,9 @@ check_aliases.o: $(srcdir)/check_aliases.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/check_aliases.c + check_aliases.i: $(srcdir)/check_aliases.c $(devdir)/def_data.h \ + $(devdir)/gram.h $(incdir)/compat/stdbool.h \ +@@ -1024,10 +1015,9 @@ check_aliases.i: $(srcdir)/check_aliases.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/check_aliases.c > $@ + check_aliases.plog: check_aliases.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/check_aliases.c --i-file check_aliases.i --output-file $@ +@@ -1062,9 +1052,9 @@ check_editor.o: $(srcdir)/regress/editor/check_editor.c $(devdir)/def_data.c \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/editor/check_editor.c + check_editor.i: $(srcdir)/regress/editor/check_editor.c $(devdir)/def_data.c \ + $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -1073,9 +1063,9 @@ check_editor.i: $(srcdir)/regress/editor/check_editor.c $(devdir)/def_data.c \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/editor/check_editor.c > $@ + check_editor.plog: check_editor.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/regress/editor/check_editor.c --i-file check_editor.i --output-file $@ +@@ -1086,7 +1076,7 @@ check_env_pattern.o: $(srcdir)/regress/env_match/check_env_pattern.c \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1098,7 +1088,7 @@ check_env_pattern.i: $(srcdir)/regress/env_match/check_env_pattern.c \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1113,7 +1103,7 @@ check_exptilde.o: $(srcdir)/regress/exptilde/check_exptilde.c \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/exptilde/check_exptilde.c +@@ -1125,7 +1115,7 @@ check_exptilde.i: $(srcdir)/regress/exptilde/check_exptilde.c \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/exptilde/check_exptilde.c > $@ +@@ -1167,7 +1157,7 @@ check_iolog_plugin.o: $(srcdir)/regress/iolog_plugin/check_iolog_plugin.c \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1180,7 +1170,7 @@ check_iolog_plugin.i: $(srcdir)/regress/iolog_plugin/check_iolog_plugin.c \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1196,9 +1186,9 @@ check_serialize_list.lo: \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/serialize_list/check_serialize_list.c + check_serialize_list.i: \ + $(srcdir)/regress/serialize_list/check_serialize_list.c \ +@@ -1209,9 +1199,9 @@ check_serialize_list.i: \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/serialize_list/check_serialize_list.c > $@ + check_serialize_list.plog: check_serialize_list.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/regress/serialize_list/check_serialize_list.c --i-file check_serialize_list.i --output-file $@ +@@ -1250,7 +1240,7 @@ check_unesc.o: $(srcdir)/regress/unescape/check_unesc.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/unescape/check_unesc.c +@@ -1261,7 +1251,7 @@ check_unesc.i: $(srcdir)/regress/unescape/check_unesc.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/unescape/check_unesc.c > $@ +@@ -1274,7 +1264,7 @@ check_util.lo: $(srcdir)/check_util.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/check_util.c +@@ -1285,7 +1275,7 @@ check_util.i: $(srcdir)/check_util.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/check_util.c > $@ +@@ -1299,8 +1289,8 @@ cvtsudoers.o: $(srcdir)/cvtsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/redblack.h \ +- $(srcdir)/strlist.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/parse.h $(srcdir)/redblack.h $(srcdir)/strlist.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/sudoers_version.h \ + $(srcdir)/testsudoers_pwutil.h $(srcdir)/tsgetgrpw.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h +@@ -1313,8 +1303,8 @@ cvtsudoers.i: $(srcdir)/cvtsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/redblack.h \ +- $(srcdir)/strlist.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/parse.h $(srcdir)/redblack.h $(srcdir)/strlist.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/sudoers_version.h \ + $(srcdir)/testsudoers_pwutil.h $(srcdir)/tsgetgrpw.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h +@@ -1329,9 +1319,9 @@ cvtsudoers_csv.o: $(srcdir)/cvtsudoers_csv.c $(devdir)/def_data.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/cvtsudoers.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/strlist.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/cvtsudoers_csv.c + cvtsudoers_csv.i: $(srcdir)/cvtsudoers_csv.c $(devdir)/def_data.h \ + $(devdir)/gram.h $(incdir)/compat/stdbool.h \ +@@ -1341,9 +1331,9 @@ cvtsudoers_csv.i: $(srcdir)/cvtsudoers_csv.c $(devdir)/def_data.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/cvtsudoers.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/strlist.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/cvtsudoers_csv.c > $@ + cvtsudoers_csv.plog: cvtsudoers_csv.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/cvtsudoers_csv.c --i-file cvtsudoers_csv.i --output-file $@ +@@ -1355,7 +1345,7 @@ cvtsudoers_json.o: $(srcdir)/cvtsudoers_json.c $(devdir)/def_data.h \ + $(incdir)/sudo_json.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h +@@ -1368,7 +1358,7 @@ cvtsudoers_json.i: $(srcdir)/cvtsudoers_json.c $(devdir)/def_data.h \ + $(incdir)/sudo_json.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h +@@ -1383,11 +1373,11 @@ cvtsudoers_ldif.o: $(srcdir)/cvtsudoers_ldif.c $(devdir)/def_data.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/redblack.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ ++ $(srcdir)/strlist.h $(srcdir)/sudo_ldap.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/cvtsudoers_ldif.c + cvtsudoers_ldif.i: $(srcdir)/cvtsudoers_ldif.c $(devdir)/def_data.h \ + $(devdir)/gram.h $(incdir)/compat/stdbool.h \ +@@ -1397,11 +1387,11 @@ cvtsudoers_ldif.i: $(srcdir)/cvtsudoers_ldif.c $(devdir)/def_data.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/redblack.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ ++ $(srcdir)/strlist.h $(srcdir)/sudo_ldap.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/cvtsudoers_ldif.c > $@ + cvtsudoers_ldif.plog: cvtsudoers_ldif.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/cvtsudoers_ldif.c --i-file cvtsudoers_ldif.i --output-file $@ +@@ -1413,7 +1403,7 @@ cvtsudoers_merge.o: $(srcdir)/cvtsudoers_merge.c $(devdir)/def_data.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/cvtsudoers.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/strlist.h \ ++ $(srcdir)/redblack.h $(srcdir)/strlist.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1426,7 +1416,7 @@ cvtsudoers_merge.i: $(srcdir)/cvtsudoers_merge.c $(devdir)/def_data.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/cvtsudoers.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/strlist.h \ ++ $(srcdir)/redblack.h $(srcdir)/strlist.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1440,11 +1430,10 @@ cvtsudoers_pwutil.o: $(srcdir)/cvtsudoers_pwutil.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/pwutil.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pwutil.h \ ++ $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/cvtsudoers_pwutil.c + cvtsudoers_pwutil.i: $(srcdir)/cvtsudoers_pwutil.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1453,11 +1442,10 @@ cvtsudoers_pwutil.i: $(srcdir)/cvtsudoers_pwutil.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/cvtsudoers.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/pwutil.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pwutil.h \ ++ $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/cvtsudoers_pwutil.c > $@ + cvtsudoers_pwutil.plog: cvtsudoers_pwutil.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/cvtsudoers_pwutil.c --i-file cvtsudoers_pwutil.i --output-file $@ +@@ -1467,9 +1455,9 @@ dce.lo: $(authdir)/dce.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/timestamp.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/dce.c + dce.i: $(authdir)/dce.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1477,9 +1465,9 @@ dce.i: $(authdir)/dce.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/timestamp.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/dce.c > $@ + dce.plog: dce.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/dce.c --i-file dce.i --output-file $@ +@@ -1490,10 +1478,9 @@ defaults.lo: $(srcdir)/defaults.c $(devdir)/def_data.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/defaults.c + defaults.i: $(srcdir)/defaults.c $(devdir)/def_data.c $(devdir)/def_data.h \ + $(devdir)/gram.h $(incdir)/compat/stdbool.h \ +@@ -1502,10 +1489,9 @@ defaults.i: $(srcdir)/defaults.c $(devdir)/def_data.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/defaults.c > $@ + defaults.plog: defaults.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/defaults.c --i-file defaults.i --output-file $@ +@@ -1530,9 +1516,9 @@ display.lo: $(srcdir)/display.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/display.c + display.i: $(srcdir)/display.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1541,9 +1527,9 @@ display.i: $(srcdir)/display.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/display.c > $@ + display.plog: display.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/display.c --i-file display.i --output-file $@ +@@ -1553,9 +1539,9 @@ editor.lo: $(srcdir)/editor.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/editor.c + editor.i: $(srcdir)/editor.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ +@@ -1563,9 +1549,9 @@ editor.i: $(srcdir)/editor.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/editor.c > $@ + editor.plog: editor.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/editor.c --i-file editor.i --output-file $@ +@@ -1574,18 +1560,18 @@ env.lo: $(srcdir)/env.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/env.c + env.i: $(srcdir)/env.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/env.c > $@ + env.plog: env.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/env.c --i-file env.i --output-file $@ +@@ -1596,7 +1582,7 @@ env_pattern.lo: $(srcdir)/env_pattern.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/env_pattern.c +@@ -1607,7 +1593,7 @@ env_pattern.i: $(srcdir)/env_pattern.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/env_pattern.c > $@ +@@ -1619,8 +1605,8 @@ exptilde.lo: $(srcdir)/exptilde.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/pwutil.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pwutil.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/exptilde.c +@@ -1630,8 +1616,8 @@ exptilde.i: $(srcdir)/exptilde.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/pwutil.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pwutil.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/exptilde.c > $@ +@@ -1644,9 +1630,8 @@ file.lo: $(srcdir)/file.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/file.c + file.i: $(srcdir)/file.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1655,9 +1640,8 @@ file.i: $(srcdir)/file.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/file.c > $@ + file.plog: file.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/file.c --i-file file.i --output-file $@ +@@ -1668,9 +1652,9 @@ filedigest.lo: $(srcdir)/filedigest.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/filedigest.c + filedigest.i: $(srcdir)/filedigest.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1679,9 +1663,9 @@ filedigest.i: $(srcdir)/filedigest.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/filedigest.c > $@ + filedigest.plog: filedigest.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/filedigest.c --i-file filedigest.i --output-file $@ +@@ -1692,7 +1676,7 @@ find_path.lo: $(srcdir)/find_path.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/find_path.c +@@ -1703,7 +1687,7 @@ find_path.i: $(srcdir)/find_path.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/find_path.c > $@ +@@ -1716,9 +1700,9 @@ fmtsudoers.lo: $(srcdir)/fmtsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/fmtsudoers.c + fmtsudoers.i: $(srcdir)/fmtsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1727,9 +1711,9 @@ fmtsudoers.i: $(srcdir)/fmtsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/fmtsudoers.c > $@ + fmtsudoers.plog: fmtsudoers.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/fmtsudoers.c --i-file fmtsudoers.i --output-file $@ +@@ -1741,7 +1725,7 @@ fmtsudoers_cvt.lo: $(srcdir)/fmtsudoers_cvt.c $(devdir)/def_data.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/fmtsudoers_cvt.c +@@ -1753,7 +1737,7 @@ fmtsudoers_cvt.i: $(srcdir)/fmtsudoers_cvt.c $(devdir)/def_data.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/fmtsudoers_cvt.c > $@ +@@ -1768,7 +1752,7 @@ fuzz_policy.o: $(srcdir)/regress/fuzz/fuzz_policy.c $(devdir)/def_data.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/auth/sudo_auth.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/fuzz/fuzz_policy.c +@@ -1781,7 +1765,7 @@ fuzz_policy.i: $(srcdir)/regress/fuzz/fuzz_policy.c $(devdir)/def_data.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/auth/sudo_auth.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/fuzz/fuzz_policy.c > $@ +@@ -1794,10 +1778,9 @@ fuzz_stubs.o: $(srcdir)/regress/fuzz/fuzz_stubs.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/fuzz/fuzz_stubs.c + fuzz_stubs.i: $(srcdir)/regress/fuzz/fuzz_stubs.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1806,10 +1789,9 @@ fuzz_stubs.i: $(srcdir)/regress/fuzz/fuzz_stubs.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/fuzz/fuzz_stubs.c > $@ + fuzz_stubs.plog: fuzz_stubs.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/regress/fuzz/fuzz_stubs.c --i-file fuzz_stubs.i --output-file $@ +@@ -1820,10 +1802,9 @@ fuzz_sudoers.o: $(srcdir)/regress/fuzz/fuzz_sudoers.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/regress/fuzz/fuzz_sudoers.c + fuzz_sudoers.i: $(srcdir)/regress/fuzz/fuzz_sudoers.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1832,10 +1813,9 @@ fuzz_sudoers.i: $(srcdir)/regress/fuzz/fuzz_sudoers.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/regress/fuzz/fuzz_sudoers.c > $@ + fuzz_sudoers.plog: fuzz_sudoers.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/regress/fuzz/fuzz_sudoers.c --i-file fuzz_sudoers.i --output-file $@ +@@ -1846,7 +1826,7 @@ fuzz_sudoers_ldif.o: $(srcdir)/regress/fuzz/fuzz_sudoers_ldif.c \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1858,7 +1838,7 @@ fuzz_sudoers_ldif.i: $(srcdir)/regress/fuzz/fuzz_sudoers_ldif.c \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -1871,8 +1851,8 @@ fwtk.lo: $(authdir)/fwtk.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/fwtk.c + fwtk.i: $(authdir)/fwtk.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ +@@ -1881,8 +1861,8 @@ fwtk.i: $(authdir)/fwtk.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/fwtk.c > $@ + fwtk.plog: fwtk.i +@@ -1892,8 +1872,8 @@ gc.lo: $(srcdir)/gc.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/gc.c + gc.i: $(srcdir)/gc.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -1901,8 +1881,8 @@ gc.i: $(srcdir)/gc.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/gc.c > $@ + gc.plog: gc.i +@@ -1932,7 +1912,7 @@ getspwuid.lo: $(srcdir)/getspwuid.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/getspwuid.c +@@ -1943,7 +1923,7 @@ getspwuid.i: $(srcdir)/getspwuid.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/getspwuid.c > $@ +@@ -1955,10 +1935,9 @@ goodpath.lo: $(srcdir)/goodpath.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/goodpath.c + goodpath.i: $(srcdir)/goodpath.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -1966,10 +1945,9 @@ goodpath.i: $(srcdir)/goodpath.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/goodpath.c > $@ + goodpath.plog: goodpath.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/goodpath.c --i-file goodpath.i --output-file $@ +@@ -1979,9 +1957,8 @@ gram.lo: $(devdir)/gram.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/toke.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/toke.h $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(devdir)/gram.c + gram.i: $(devdir)/gram.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ +@@ -1989,9 +1966,8 @@ gram.i: $(devdir)/gram.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/toke.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/toke.h $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(devdir)/gram.c > $@ + gram.plog: gram.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(devdir)/gram.c --i-file gram.i --output-file $@ +@@ -2002,10 +1978,9 @@ group_plugin.lo: $(srcdir)/group_plugin.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/group_plugin.c + group_plugin.i: $(srcdir)/group_plugin.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2014,10 +1989,9 @@ group_plugin.i: $(srcdir)/group_plugin.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/group_plugin.c > $@ + group_plugin.plog: group_plugin.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/group_plugin.c --i-file group_plugin.i --output-file $@ +@@ -2028,9 +2002,9 @@ interfaces.lo: $(srcdir)/interfaces.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/interfaces.c + interfaces.i: $(srcdir)/interfaces.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2039,9 +2013,9 @@ interfaces.i: $(srcdir)/interfaces.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/interfaces.c > $@ + interfaces.plog: interfaces.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/interfaces.c --i-file interfaces.i --output-file $@ +@@ -2053,8 +2027,8 @@ iolog.lo: $(srcdir)/iolog.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_ssl_compat.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/log_client.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/parse.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/iolog.c + iolog.i: $(srcdir)/iolog.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -2065,8 +2039,8 @@ iolog.i: $(srcdir)/iolog.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_ssl_compat.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/log_client.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/parse.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/iolog.c > $@ + iolog.plog: iolog.i +@@ -2078,7 +2052,7 @@ iolog_path_escapes.lo: $(srcdir)/iolog_path_escapes.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -2090,7 +2064,7 @@ iolog_path_escapes.i: $(srcdir)/iolog_path_escapes.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_iolog.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h \ + $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -2103,8 +2077,8 @@ kerb5.lo: $(authdir)/kerb5.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/kerb5.c + kerb5.i: $(authdir)/kerb5.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ +@@ -2113,8 +2087,8 @@ kerb5.i: $(authdir)/kerb5.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/kerb5.c > $@ + kerb5.plog: kerb5.i +@@ -2125,8 +2099,8 @@ ldap.lo: $(srcdir)/ldap.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h $(srcdir)/sudo_ldap_conf.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/sudo_ldap.h $(srcdir)/sudo_ldap_conf.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/ldap.c + ldap.i: $(srcdir)/ldap.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -2135,8 +2109,8 @@ ldap.i: $(srcdir)/ldap.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h $(srcdir)/sudo_ldap_conf.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/sudo_ldap.h $(srcdir)/sudo_ldap_conf.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/ldap.c > $@ + ldap.plog: ldap.i +@@ -2148,7 +2122,7 @@ ldap_conf.lo: $(srcdir)/ldap_conf.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h \ ++ $(srcdir)/parse.h $(srcdir)/sudo_ldap.h \ + $(srcdir)/sudo_ldap_conf.h $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h +@@ -2160,7 +2134,7 @@ ldap_conf.i: $(srcdir)/ldap_conf.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h \ ++ $(srcdir)/parse.h $(srcdir)/sudo_ldap.h \ + $(srcdir)/sudo_ldap_conf.h $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h +@@ -2174,10 +2148,10 @@ ldap_innetgr.lo: $(srcdir)/ldap_innetgr.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h \ +- $(srcdir)/sudo_ldap_conf.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_ldap.h $(srcdir)/sudo_ldap_conf.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/ldap_innetgr.c + ldap_innetgr.i: $(srcdir)/ldap_innetgr.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2186,10 +2160,10 @@ ldap_innetgr.i: $(srcdir)/ldap_innetgr.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h \ +- $(srcdir)/sudo_ldap_conf.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_ldap.h $(srcdir)/sudo_ldap_conf.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/ldap_innetgr.c > $@ + ldap_innetgr.plog: ldap_innetgr.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/ldap_innetgr.c --i-file ldap_innetgr.i --output-file $@ +@@ -2201,10 +2175,9 @@ ldap_util.lo: $(srcdir)/ldap_util.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/ldap_util.c + ldap_util.i: $(srcdir)/ldap_util.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2214,10 +2187,9 @@ ldap_util.i: $(srcdir)/ldap_util.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_lbuf.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/ldap_util.c > $@ + ldap_util.plog: ldap_util.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/ldap_util.c --i-file ldap_util.i --output-file $@ +@@ -2228,10 +2200,9 @@ linux_audit.lo: $(srcdir)/linux_audit.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/linux_audit.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/linux_audit.c + linux_audit.i: $(srcdir)/linux_audit.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2240,10 +2211,9 @@ linux_audit.i: $(srcdir)/linux_audit.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/linux_audit.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/linux_audit.c > $@ + linux_audit.plog: linux_audit.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/linux_audit.c --i-file linux_audit.i --output-file $@ +@@ -2274,9 +2244,9 @@ log_client.lo: $(srcdir)/log_client.c $(devdir)/def_data.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_ssl_compat.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/log_client.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/strlist.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/log_client.c + log_client.i: $(srcdir)/log_client.c $(devdir)/def_data.h \ + $(incdir)/compat/getaddrinfo.h $(incdir)/compat/stdbool.h \ +@@ -2289,9 +2259,9 @@ log_client.i: $(srcdir)/log_client.c $(devdir)/def_data.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_ssl_compat.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/log_client.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/strlist.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/log_client.c > $@ + log_client.plog: log_client.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/log_client.c --i-file log_client.i --output-file $@ +@@ -2304,8 +2274,8 @@ logging.lo: $(srcdir)/logging.c $(devdir)/def_data.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_ssl_compat.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/log_client.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/parse.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/logging.c + logging.i: $(srcdir)/logging.c $(devdir)/def_data.h \ +@@ -2317,8 +2287,8 @@ logging.i: $(srcdir)/logging.c $(devdir)/def_data.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_ssl_compat.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/log_client.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/parse.h $(srcdir)/strlist.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/logging.c > $@ + logging.plog: logging.i +@@ -2329,8 +2299,8 @@ lookup.lo: $(srcdir)/lookup.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/lookup.c + lookup.i: $(srcdir)/lookup.c $(devdir)/def_data.h $(devdir)/gram.h \ +@@ -2339,8 +2309,8 @@ lookup.i: $(srcdir)/lookup.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/lookup.c > $@ + lookup.plog: lookup.i +@@ -2351,8 +2321,8 @@ match.lo: $(srcdir)/match.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/match.c + match.i: $(srcdir)/match.c $(devdir)/def_data.h $(devdir)/gram.h \ +@@ -2361,8 +2331,8 @@ match.i: $(srcdir)/match.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/match.c > $@ + match.plog: match.i +@@ -2374,9 +2344,9 @@ match_addr.lo: $(srcdir)/match_addr.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/match_addr.c + match_addr.i: $(srcdir)/match_addr.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2385,9 +2355,9 @@ match_addr.i: $(srcdir)/match_addr.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/match_addr.c > $@ + match_addr.plog: match_addr.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/match_addr.c --i-file match_addr.i --output-file $@ +@@ -2399,10 +2369,9 @@ match_command.lo: $(srcdir)/match_command.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/match_command.c + match_command.i: $(srcdir)/match_command.c $(devdir)/def_data.h \ + $(devdir)/gram.h $(incdir)/compat/fnmatch.h \ +@@ -2412,10 +2381,9 @@ match_command.i: $(srcdir)/match_command.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/match_command.c > $@ + match_command.plog: match_command.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/match_command.c --i-file match_command.i --output-file $@ +@@ -2427,7 +2395,7 @@ match_digest.lo: $(srcdir)/match_digest.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/match_digest.c +@@ -2439,7 +2407,7 @@ match_digest.i: $(srcdir)/match_digest.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/match_digest.c > $@ +@@ -2469,9 +2437,8 @@ pam.lo: $(authdir)/pam.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/pam.c + pam.i: $(authdir)/pam.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2479,9 +2446,8 @@ pam.i: $(authdir)/pam.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/pam.c > $@ + pam.plog: pam.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/pam.c --i-file pam.i --output-file $@ +@@ -2492,8 +2458,8 @@ parse_ldif.o: $(srcdir)/parse_ldif.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/redblack.h $(srcdir)/strlist.h $(srcdir)/sudo_ldap.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/parse_ldif.c +@@ -2504,8 +2470,8 @@ parse_ldif.i: $(srcdir)/parse_ldif.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/strlist.h \ +- $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/redblack.h $(srcdir)/strlist.h $(srcdir)/sudo_ldap.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/parse_ldif.c > $@ +@@ -2518,7 +2484,7 @@ parser_warnx.lo: $(srcdir)/parser_warnx.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/parser_warnx.c +@@ -2529,7 +2495,7 @@ parser_warnx.i: $(srcdir)/parser_warnx.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/parser_warnx.c > $@ +@@ -2541,8 +2507,8 @@ passwd.lo: $(authdir)/passwd.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/passwd.c + passwd.i: $(authdir)/passwd.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ +@@ -2551,32 +2517,12 @@ passwd.i: $(authdir)/passwd.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/passwd.c > $@ + passwd.plog: passwd.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/passwd.c --i-file passwd.i --output-file $@ +-pivot.lo: $(srcdir)/pivot.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +- $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ +- $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ +- $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ +- $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h +- $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/pivot.c +-pivot.i: $(srcdir)/pivot.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +- $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ +- $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ +- $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ +- $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h +- $(CPP) $(CPPFLAGS) $(srcdir)/pivot.c > $@ +-pivot.plog: pivot.i +- rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/pivot.c --i-file pivot.i --output-file $@ + policy.lo: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ + $(incdir)/sudo_debug.h $(incdir)/sudo_eventlog.h \ +@@ -2584,10 +2530,10 @@ policy.lo: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/auth/sudo_auth.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/sudoers_version.h $(srcdir)/timestamp.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/sudoers_version.h \ ++ $(srcdir)/timestamp.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/policy.c + policy.i: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ +@@ -2596,10 +2542,10 @@ policy.i: $(srcdir)/policy.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/auth/sudo_auth.h \ + $(srcdir)/defaults.h $(srcdir)/interfaces.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/sudoers_version.h $(srcdir)/timestamp.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/sudoers_version.h \ ++ $(srcdir)/timestamp.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/policy.c > $@ + policy.plog: policy.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/policy.c --i-file policy.i --output-file $@ +@@ -2609,9 +2555,9 @@ prompt.lo: $(srcdir)/prompt.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/prompt.c + prompt.i: $(srcdir)/prompt.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ +@@ -2619,9 +2565,9 @@ prompt.i: $(srcdir)/prompt.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/prompt.c > $@ + prompt.plog: prompt.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/prompt.c --i-file prompt.i --output-file $@ +@@ -2631,10 +2577,9 @@ pwutil.lo: $(srcdir)/pwutil.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/pwutil.h \ +- $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/pwutil.h $(srcdir)/redblack.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/pwutil.c + pwutil.i: $(srcdir)/pwutil.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h \ +@@ -2642,10 +2587,9 @@ pwutil.i: $(srcdir)/pwutil.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/pwutil.h \ +- $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/pwutil.h $(srcdir)/redblack.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/pwutil.c > $@ + pwutil.plog: pwutil.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/pwutil.c --i-file pwutil.i --output-file $@ +@@ -2656,9 +2600,9 @@ pwutil_impl.lo: $(srcdir)/pwutil_impl.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/pwutil.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/pwutil.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/pwutil_impl.c + pwutil_impl.i: $(srcdir)/pwutil_impl.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2667,9 +2611,9 @@ pwutil_impl.i: $(srcdir)/pwutil_impl.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/pwutil.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/pwutil.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/pwutil_impl.c > $@ + pwutil_impl.plog: pwutil_impl.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/pwutil_impl.c --i-file pwutil_impl.i --output-file $@ +@@ -2679,8 +2623,8 @@ redblack.lo: $(srcdir)/redblack.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/redblack.c +@@ -2690,8 +2634,8 @@ redblack.i: $(srcdir)/redblack.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/redblack.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/redblack.c > $@ +@@ -2704,7 +2648,7 @@ resolve_cmnd.lo: $(srcdir)/resolve_cmnd.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/resolve_cmnd.c +@@ -2715,7 +2659,7 @@ resolve_cmnd.i: $(srcdir)/resolve_cmnd.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/resolve_cmnd.c > $@ +@@ -2727,8 +2671,8 @@ rfc1938.lo: $(authdir)/rfc1938.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/rfc1938.c + rfc1938.i: $(authdir)/rfc1938.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ +@@ -2737,8 +2681,8 @@ rfc1938.i: $(authdir)/rfc1938.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/rfc1938.c > $@ + rfc1938.plog: rfc1938.i +@@ -2750,9 +2694,9 @@ secureware.lo: $(authdir)/secureware.c $(authdir)/sudo_auth.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/secureware.c + secureware.i: $(authdir)/secureware.c $(authdir)/sudo_auth.h \ + $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -2761,9 +2705,9 @@ secureware.i: $(authdir)/secureware.c $(authdir)/sudo_auth.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/secureware.c > $@ + secureware.plog: secureware.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/secureware.c --i-file secureware.i --output-file $@ +@@ -2773,10 +2717,9 @@ securid5.lo: $(authdir)/securid5.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/securid5.c + securid5.i: $(authdir)/securid5.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2784,10 +2727,9 @@ securid5.i: $(authdir)/securid5.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/securid5.c > $@ + securid5.plog: securid5.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/securid5.c --i-file securid5.i --output-file $@ +@@ -2798,7 +2740,7 @@ serialize_list.lo: $(srcdir)/serialize_list.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/serialize_list.c +@@ -2809,7 +2751,7 @@ serialize_list.i: $(srcdir)/serialize_list.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/serialize_list.c > $@ +@@ -2822,7 +2764,7 @@ set_perms.lo: $(srcdir)/set_perms.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/set_perms.c +@@ -2833,7 +2775,7 @@ set_perms.i: $(srcdir)/set_perms.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/set_perms.c > $@ +@@ -2845,8 +2787,8 @@ sethost.lo: $(srcdir)/sethost.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sethost.c + sethost.i: $(srcdir)/sethost.c $(devdir)/def_data.h \ +@@ -2855,8 +2797,8 @@ sethost.i: $(srcdir)/sethost.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sethost.c > $@ + sethost.plog: sethost.i +@@ -2867,9 +2809,8 @@ sia.lo: $(authdir)/sia.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/sia.c + sia.i: $(authdir)/sia.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2877,9 +2818,8 @@ sia.i: $(authdir)/sia.c $(authdir)/sudo_auth.h $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/sia.c > $@ + sia.plog: sia.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/sia.c --i-file sia.i --output-file $@ +@@ -2890,10 +2830,9 @@ solaris_audit.lo: $(srcdir)/solaris_audit.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/solaris_audit.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/solaris_audit.c + solaris_audit.i: $(srcdir)/solaris_audit.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -2902,10 +2841,9 @@ solaris_audit.i: $(srcdir)/solaris_audit.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/solaris_audit.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/solaris_audit.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/solaris_audit.c > $@ + solaris_audit.plog: solaris_audit.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/solaris_audit.c --i-file solaris_audit.i --output-file $@ +@@ -2915,9 +2853,9 @@ sssd.lo: $(srcdir)/sssd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sssd.c + sssd.i: $(srcdir)/sssd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ +@@ -2925,9 +2863,9 @@ sssd.i: $(srcdir)/sssd.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_ldap.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sssd.c > $@ + sssd.plog: sssd.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/sssd.c --i-file sssd.i --output-file $@ +@@ -2938,7 +2876,7 @@ starttime.lo: $(srcdir)/starttime.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/starttime.c +@@ -2949,7 +2887,7 @@ starttime.i: $(srcdir)/starttime.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/starttime.c > $@ +@@ -2962,7 +2900,7 @@ strlcpy_unesc.lo: $(srcdir)/strlcpy_unesc.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/strlcpy_unesc.c +@@ -2973,7 +2911,7 @@ strlcpy_unesc.i: $(srcdir)/strlcpy_unesc.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/strlcpy_unesc.c > $@ +@@ -2998,7 +2936,7 @@ strvec_join.lo: $(srcdir)/strvec_join.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/strvec_join.c +@@ -3009,7 +2947,7 @@ strvec_join.i: $(srcdir)/strvec_join.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/strvec_join.c > $@ +@@ -3021,9 +2959,8 @@ stubs.o: $(srcdir)/stubs.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/stubs.c + stubs.i: $(srcdir)/stubs.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ +@@ -3031,9 +2968,8 @@ stubs.i: $(srcdir)/stubs.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/stubs.c > $@ + stubs.plog: stubs.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/stubs.c --i-file stubs.i --output-file $@ +@@ -3047,10 +2983,9 @@ sudo_auth.lo: $(authdir)/sudo_auth.c $(authdir)/sudo_auth.h \ + $(srcdir)/ins_2001.h $(srcdir)/ins_classic.h \ + $(srcdir)/ins_csops.h $(srcdir)/ins_goons.h \ + $(srcdir)/ins_python.h $(srcdir)/insults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(authdir)/sudo_auth.c + sudo_auth.i: $(authdir)/sudo_auth.c $(authdir)/sudo_auth.h \ + $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ +@@ -3062,10 +2997,9 @@ sudo_auth.i: $(authdir)/sudo_auth.c $(authdir)/sudo_auth.h \ + $(srcdir)/ins_2001.h $(srcdir)/ins_classic.h \ + $(srcdir)/ins_csops.h $(srcdir)/ins_goons.h \ + $(srcdir)/ins_python.h $(srcdir)/insults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(authdir)/sudo_auth.c > $@ + sudo_auth.plog: sudo_auth.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(authdir)/sudo_auth.c --i-file sudo_auth.i --output-file $@ +@@ -3075,10 +3009,9 @@ sudo_nss.lo: $(srcdir)/sudo_nss.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sudo_nss.c + sudo_nss.i: $(srcdir)/sudo_nss.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -3086,10 +3019,9 @@ sudo_nss.i: $(srcdir)/sudo_nss.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sudo_nss.c > $@ + sudo_nss.plog: sudo_nss.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/sudo_nss.c --i-file sudo_nss.i --output-file $@ +@@ -3114,8 +3046,8 @@ sudoers.lo: $(srcdir)/sudoers.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(srcdir)/timestamp.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sudoers.c +@@ -3126,8 +3058,8 @@ sudoers.i: $(srcdir)/sudoers.c $(devdir)/def_data.h \ + $(incdir)/sudo_fatal.h $(incdir)/sudo_gettext.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(srcdir)/timestamp.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sudoers.c > $@ +@@ -3141,7 +3073,7 @@ sudoers_cb.lo: $(srcdir)/sudoers_cb.c $(devdir)/def_data.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sudoers_cb.c +@@ -3153,7 +3085,7 @@ sudoers_cb.i: $(srcdir)/sudoers_cb.c $(devdir)/def_data.h \ + $(incdir)/sudo_iolog.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sudoers_cb.c > $@ +@@ -3166,7 +3098,7 @@ sudoers_ctx_free.lo: $(srcdir)/sudoers_ctx_free.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sudoers_ctx_free.c +@@ -3177,7 +3109,7 @@ sudoers_ctx_free.i: $(srcdir)/sudoers_ctx_free.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sudoers_ctx_free.c > $@ +@@ -3190,7 +3122,7 @@ sudoers_debug.lo: $(srcdir)/sudoers_debug.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sudoers_debug.c +@@ -3201,7 +3133,7 @@ sudoers_debug.i: $(srcdir)/sudoers_debug.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sudoers_debug.c > $@ +@@ -3214,7 +3146,7 @@ sudoers_hooks.lo: $(srcdir)/sudoers_hooks.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/sudoers_hooks.c +@@ -3225,7 +3157,7 @@ sudoers_hooks.i: $(srcdir)/sudoers_hooks.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/sudoers_hooks.c > $@ +@@ -3261,7 +3193,7 @@ testsudoers.o: $(srcdir)/testsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/testsudoers_pwutil.h \ + $(srcdir)/toke.h $(srcdir)/tsgetgrpw.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -3274,7 +3206,7 @@ testsudoers.i: $(srcdir)/testsudoers.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h \ + $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/testsudoers_pwutil.h \ + $(srcdir)/toke.h $(srcdir)/tsgetgrpw.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h +@@ -3288,7 +3220,7 @@ testsudoers_pwutil.o: $(srcdir)/testsudoers_pwutil.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/pwutil.h \ ++ $(srcdir)/parse.h $(srcdir)/pwutil.h \ + $(srcdir)/pwutil_impl.c $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(srcdir)/testsudoers_pwutil.h $(srcdir)/tsgetgrpw.h \ +@@ -3301,7 +3233,7 @@ testsudoers_pwutil.i: $(srcdir)/testsudoers_pwutil.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h \ +- $(srcdir)/parse.h $(srcdir)/pivot.h $(srcdir)/pwutil.h \ ++ $(srcdir)/parse.h $(srcdir)/pwutil.h \ + $(srcdir)/pwutil_impl.c $(srcdir)/sudo_nss.h \ + $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(srcdir)/testsudoers_pwutil.h $(srcdir)/tsgetgrpw.h \ +@@ -3328,7 +3260,7 @@ timestamp.lo: $(srcdir)/timestamp.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/timestamp.c +@@ -3339,7 +3271,7 @@ timestamp.i: $(srcdir)/timestamp.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/timestamp.c > $@ +@@ -3351,8 +3283,8 @@ timestr.lo: $(srcdir)/timestr.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/timestr.c + timestr.i: $(srcdir)/timestr.c $(devdir)/def_data.h \ +@@ -3361,8 +3293,8 @@ timestr.i: $(srcdir)/timestr.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/timestr.c > $@ + timestr.plog: timestr.i +@@ -3374,9 +3306,8 @@ toke.lo: $(devdir)/toke.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/toke.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/toke.h $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(devdir)/toke.c + toke.i: $(devdir)/toke.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -3385,9 +3316,8 @@ toke.i: $(devdir)/toke.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_lbuf.h \ + $(incdir)/sudo_plugin.h $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/toke.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/toke.h $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(devdir)/toke.c > $@ + toke.plog: toke.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(devdir)/toke.c --i-file toke.i --output-file $@ +@@ -3398,7 +3328,7 @@ toke_util.lo: $(srcdir)/toke_util.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/toke.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/toke_util.c +@@ -3409,7 +3339,7 @@ toke_util.i: $(srcdir)/toke_util.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(srcdir)/toke.h \ + $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/toke_util.c > $@ +@@ -3420,20 +3350,18 @@ tsdump.o: $(srcdir)/tsdump.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/tsdump.c + tsdump.i: $(srcdir)/tsdump.c $(devdir)/def_data.h $(incdir)/compat/stdbool.h \ + $(incdir)/sudo_compat.h $(incdir)/sudo_conf.h $(incdir)/sudo_debug.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/timestamp.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h $(srcdir)/timestamp.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/tsdump.c > $@ + tsdump.plog: tsdump.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/tsdump.c --i-file tsdump.i --output-file $@ +@@ -3443,10 +3371,10 @@ tsgetgrpw.o: $(srcdir)/tsgetgrpw.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/tsgetgrpw.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/tsgetgrpw.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/tsgetgrpw.c + tsgetgrpw.i: $(srcdir)/tsgetgrpw.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -3454,10 +3382,10 @@ tsgetgrpw.i: $(srcdir)/tsgetgrpw.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(srcdir)/tsgetgrpw.h \ +- $(top_builddir)/config.h $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(srcdir)/tsgetgrpw.h $(top_builddir)/config.h \ ++ $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/tsgetgrpw.c > $@ + tsgetgrpw.plog: tsgetgrpw.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/tsgetgrpw.c --i-file tsgetgrpw.i --output-file $@ +@@ -3480,7 +3408,7 @@ unesc_str.lo: $(srcdir)/unesc_str.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/unesc_str.c +@@ -3491,7 +3419,7 @@ unesc_str.i: $(srcdir)/unesc_str.c $(devdir)/def_data.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h \ + $(srcdir)/defaults.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ + $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ + $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/unesc_str.c > $@ +@@ -3504,10 +3432,9 @@ visudo.o: $(srcdir)/visudo.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/sudoers_version.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/sudoers_version.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/visudo.c + visudo.i: $(srcdir)/visudo.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/compat/getopt.h $(incdir)/compat/stdbool.h \ +@@ -3516,10 +3443,9 @@ visudo.i: $(srcdir)/visudo.c $(devdir)/def_data.h $(devdir)/gram.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ + $(srcdir)/interfaces.h $(srcdir)/logging.h $(srcdir)/parse.h \ +- $(srcdir)/pivot.h $(srcdir)/redblack.h $(srcdir)/sudo_nss.h \ +- $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ +- $(srcdir)/sudoers_version.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/redblack.h $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ ++ $(srcdir)/sudoers_debug.h $(srcdir)/sudoers_version.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/visudo.c > $@ + visudo.plog: visudo.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/visudo.c --i-file visudo.i --output-file $@ +@@ -3529,10 +3455,9 @@ visudo_cb.o: $(srcdir)/visudo_cb.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(ASAN_CFLAGS) $(PIE_CFLAGS) $(HARDENING_CFLAGS) $(srcdir)/visudo_cb.c + visudo_cb.i: $(srcdir)/visudo_cb.c $(devdir)/def_data.h \ + $(incdir)/compat/stdbool.h $(incdir)/sudo_compat.h \ +@@ -3540,10 +3465,9 @@ visudo_cb.i: $(srcdir)/visudo_cb.c $(devdir)/def_data.h \ + $(incdir)/sudo_eventlog.h $(incdir)/sudo_fatal.h \ + $(incdir)/sudo_gettext.h $(incdir)/sudo_plugin.h \ + $(incdir)/sudo_queue.h $(incdir)/sudo_util.h $(srcdir)/defaults.h \ +- $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/pivot.h \ +- $(srcdir)/sudo_nss.h $(srcdir)/sudoers.h \ +- $(srcdir)/sudoers_debug.h $(top_builddir)/config.h \ +- $(top_builddir)/pathnames.h ++ $(srcdir)/logging.h $(srcdir)/parse.h $(srcdir)/sudo_nss.h \ ++ $(srcdir)/sudoers.h $(srcdir)/sudoers_debug.h \ ++ $(top_builddir)/config.h $(top_builddir)/pathnames.h + $(CPP) $(CPPFLAGS) $(srcdir)/visudo_cb.c > $@ + visudo_cb.plog: visudo_cb.i + rm -f $@; pvs-studio --cfg $(PVS_CFG) --sourcetree-root $(top_srcdir) --skip-cl-exe yes --source-file $(srcdir)/visudo_cb.c --i-file visudo_cb.i --output-file $@ +diff --git a/plugins/sudoers/editor.c b/plugins/sudoers/editor.c +index db1e3e0..0c4221b 100644 +--- a/plugins/sudoers/editor.c ++++ b/plugins/sudoers/editor.c +@@ -147,7 +147,7 @@ resolve_editor(const char *ed, size_t edlen, int nfiles, char * const *files, + goto oom; + + /* If we can't find the editor in the user's PATH, give up. */ +- if (find_path(editor, &editor_path, &user_editor_sb, getenv("PATH"), ++ if (find_path(editor, &editor_path, &user_editor_sb, getenv("PATH"), NULL, + false, allowlist) != FOUND) { + errno = ENOENT; + goto bad; +diff --git a/plugins/sudoers/find_path.c b/plugins/sudoers/find_path.c +index 9b96615..0cc931f 100644 +--- a/plugins/sudoers/find_path.c ++++ b/plugins/sudoers/find_path.c +@@ -43,14 +43,14 @@ + * On failure, returns false. + */ + static bool +-cmnd_allowed(char *cmnd, size_t cmnd_size, struct stat *cmnd_sbp, +- char * const *allowlist) ++cmnd_allowed(char *cmnd, size_t cmnd_size, const char *runchroot, ++ struct stat *cmnd_sbp, char * const *allowlist) + { + const char *cmnd_base; + char * const *al; + debug_decl(cmnd_allowed, SUDOERS_DEBUG_UTIL); + +- if (!sudo_goodpath(cmnd, cmnd_sbp)) ++ if (!sudo_goodpath(cmnd, runchroot, cmnd_sbp)) + debug_return_bool(false); + + if (allowlist == NULL) +@@ -67,7 +67,7 @@ cmnd_allowed(char *cmnd, size_t cmnd_size, struct stat *cmnd_sbp, + if (strcmp(cmnd_base, base) != 0) + continue; + +- if (sudo_goodpath(path, &sb) && ++ if (sudo_goodpath(path, runchroot, &sb) && + sb.st_dev == cmnd_sbp->st_dev && sb.st_ino == cmnd_sbp->st_ino) { + /* Overwrite cmnd with safe version from allowlist. */ + if (strlcpy(cmnd, path, cmnd_size) < cmnd_size) +@@ -87,7 +87,8 @@ cmnd_allowed(char *cmnd, size_t cmnd_size, struct stat *cmnd_sbp, + */ + int + find_path(const char *infile, char **outfile, struct stat *sbp, +- const char *path, bool ignore_dot, char * const *allowlist) ++ const char *path, const char *runchroot, bool ignore_dot, ++ char * const *allowlist) + { + char command[PATH_MAX]; + const char *cp, *ep, *pathend; +@@ -108,7 +109,8 @@ find_path(const char *infile, char **outfile, struct stat *sbp, + errno = ENAMETOOLONG; + debug_return_int(NOT_FOUND_ERROR); + } +- found = cmnd_allowed(command, sizeof(command), sbp, allowlist); ++ found = cmnd_allowed(command, sizeof(command), runchroot, sbp, ++ allowlist); + goto done; + } + +@@ -137,7 +139,8 @@ find_path(const char *infile, char **outfile, struct stat *sbp, + errno = ENAMETOOLONG; + debug_return_int(NOT_FOUND_ERROR); + } +- found = cmnd_allowed(command, sizeof(command), sbp, allowlist); ++ found = cmnd_allowed(command, sizeof(command), runchroot, ++ sbp, allowlist); + if (found) + break; + } +@@ -151,7 +154,8 @@ find_path(const char *infile, char **outfile, struct stat *sbp, + errno = ENAMETOOLONG; + debug_return_int(NOT_FOUND_ERROR); + } +- found = cmnd_allowed(command, sizeof(command), sbp, allowlist); ++ found = cmnd_allowed(command, sizeof(command), runchroot, ++ sbp, allowlist); + if (found && ignore_dot) + debug_return_int(NOT_FOUND_DOT); + } +diff --git a/plugins/sudoers/goodpath.c b/plugins/sudoers/goodpath.c +index b2d412d..1515e1c 100644 +--- a/plugins/sudoers/goodpath.c ++++ b/plugins/sudoers/goodpath.c +@@ -39,13 +39,25 @@ + * Verify that path is a normal file and executable by root. + */ + bool +-sudo_goodpath(const char *path, struct stat *sbp) ++sudo_goodpath(const char *path, const char *runchroot, struct stat *sbp) + { + bool ret = false; +- struct stat sb; + debug_decl(sudo_goodpath, SUDOERS_DEBUG_UTIL); + + if (path != NULL) { ++ char pathbuf[PATH_MAX]; ++ struct stat sb; ++ ++ if (runchroot != NULL) { ++ /* XXX - handle symlinks and '..' in path outside chroot */ ++ const int len = ++ snprintf(pathbuf, sizeof(pathbuf), "%s%s", runchroot, path); ++ if (len >= ssizeof(pathbuf)) { ++ errno = ENAMETOOLONG; ++ goto done; ++ } ++ path = pathbuf; // -V507 ++ } + if (sbp == NULL) + sbp = &sb; + +@@ -57,5 +69,6 @@ sudo_goodpath(const char *path, struct stat *sbp) + errno = EACCES; + } + } ++done: + debug_return_bool(ret); + } +diff --git a/plugins/sudoers/match_command.c b/plugins/sudoers/match_command.c +index bd36603..a479cee 100644 +--- a/plugins/sudoers/match_command.c ++++ b/plugins/sudoers/match_command.c +@@ -122,14 +122,26 @@ command_args_match(struct sudoers_context *ctx, const char *sudoers_cmnd, + * Returns true on success, else false. + */ + static bool +-do_stat(int fd, const char *path, struct stat *sb) ++do_stat(int fd, const char *path, const char *runchroot, struct stat *sb) + { ++ char pathbuf[PATH_MAX]; + bool ret; + debug_decl(do_stat, SUDOERS_DEBUG_MATCH); + + if (fd != -1) { + ret = fstat(fd, sb) == 0; + } else { ++ /* Make path relative to the new root, if any. */ ++ if (runchroot != NULL) { ++ /* XXX - handle symlinks and '..' in path outside chroot */ ++ const int len = ++ snprintf(pathbuf, sizeof(pathbuf), "%s%s", runchroot, path); ++ if (len >= ssizeof(pathbuf)) { ++ errno = ENAMETOOLONG; ++ debug_return_bool(false); ++ } ++ path = pathbuf; ++ } + ret = stat(path, sb) == 0; + } + debug_return_bool(ret); +@@ -158,15 +170,29 @@ is_script(int fd) + * Returns false on error, else true. + */ + static bool +-open_cmnd(const char *path, const struct command_digest_list *digests, int *fdp) ++open_cmnd(const char *path, const char *runchroot, ++ const struct command_digest_list *digests, int *fdp) + { + int fd; ++ char pathbuf[PATH_MAX]; + debug_decl(open_cmnd, SUDOERS_DEBUG_MATCH); + + /* Only open the file for fdexec or for digest matching. */ + if (def_fdexec != always && TAILQ_EMPTY(digests)) + debug_return_bool(true); + ++ /* Make path relative to the new root, if any. */ ++ if (runchroot != NULL) { ++ /* XXX - handle symlinks and '..' in path outside chroot */ ++ const int len = ++ snprintf(pathbuf, sizeof(pathbuf), "%s%s", runchroot, path); ++ if (len >= ssizeof(pathbuf)) { ++ errno = ENAMETOOLONG; ++ debug_return_bool(false); ++ } ++ path = pathbuf; ++ } ++ + fd = open(path, O_RDONLY|O_NONBLOCK); + # ifdef O_EXEC + if (fd == -1 && errno == EACCES && TAILQ_EMPTY(digests)) { +@@ -185,7 +211,7 @@ open_cmnd(const char *path, const struct command_digest_list *digests, int *fdp) + } + + static void +-set_cmnd_fd(struct sudoers_context *ctx, int fd, int real_root) ++set_cmnd_fd(struct sudoers_context *ctx, int fd) + { + debug_decl(set_cmnd_fd, SUDOERS_DEBUG_MATCH); + +@@ -200,19 +226,11 @@ set_cmnd_fd(struct sudoers_context *ctx, int fd, int real_root) + } else if (is_script(fd)) { + char fdpath[PATH_MAX]; + struct stat sb; +- int error, flags; ++ int flags; + + /* We can only use fexecve() on a script if /dev/fd/N exists. */ +- if (real_root != -1) { +- /* Path relative to old root directory. */ +- (void)snprintf(fdpath, sizeof(fdpath), "dev/fd/%d", fd); +- error = fstatat(real_root, fdpath, &sb, 0); +- } else { +- /* Absolute path. */ +- (void)snprintf(fdpath, sizeof(fdpath), "/dev/fd/%d", fd); +- error = stat(fdpath, &sb); +- } +- if (error != 0) { ++ (void)snprintf(fdpath, sizeof(fdpath), "/dev/fd/%d", fd); ++ if (stat(fdpath, &sb) != 0) { + /* Missing /dev/fd file, can't use fexecve(). */ + close(fd); + fd = -1; +@@ -238,14 +256,28 @@ set_cmnd_fd(struct sudoers_context *ctx, int fd, int real_root) + */ + static int + command_matches_dir(struct sudoers_context *ctx, const char *sudoers_dir, +- size_t dlen, int real_root, const struct command_digest_list *digests) ++ size_t dlen, const char *runchroot, ++ const struct command_digest_list *digests) + { + struct stat sudoers_stat; +- char path[PATH_MAX]; ++ char path[PATH_MAX], sdbuf[PATH_MAX]; ++ size_t chrootlen = 0; + int len, fd = -1; + int ret = DENY; + debug_decl(command_matches_dir, SUDOERS_DEBUG_MATCH); + ++ /* Make sudoers_dir relative to the new root, if any. */ ++ if (runchroot != NULL) { ++ /* XXX - handle symlinks and '..' in path outside chroot */ ++ len = snprintf(sdbuf, sizeof(sdbuf), "%s%s", runchroot, sudoers_dir); ++ if (len >= ssizeof(sdbuf)) { ++ errno = ENAMETOOLONG; ++ debug_return_bool(false); ++ } ++ sudoers_dir = sdbuf; ++ chrootlen = strlen(runchroot); ++ } ++ + /* Compare the canonicalized directories, if possible. */ + if (ctx->user.cmnd_dir != NULL) { + char *resolved = canon_path(sudoers_dir); +@@ -264,18 +296,19 @@ command_matches_dir(struct sudoers_context *ctx, const char *sudoers_dir, + goto done; + + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(path, digests, &fd)) ++ if (!open_cmnd(path, NULL, digests, &fd)) + goto done; +- if (!do_stat(fd, path, &sudoers_stat)) ++ if (!do_stat(fd, path, NULL, &sudoers_stat)) + goto done; + + if (ctx->user.cmnd_stat == NULL || + (ctx->user.cmnd_stat->st_dev == sudoers_stat.st_dev && + ctx->user.cmnd_stat->st_ino == sudoers_stat.st_ino)) { +- if (digest_matches(fd, path, digests) != ALLOW) ++ /* path is already relative to runchroot */ ++ if (digest_matches(fd, path, NULL, digests) != ALLOW) + goto done; + free(ctx->runas.cmnd); +- if ((ctx->runas.cmnd = strdup(path)) == NULL) { ++ if ((ctx->runas.cmnd = strdup(path + chrootlen)) == NULL) { + sudo_warnx(U_("%s: %s"), __func__, + U_("unable to allocate memory")); + } +@@ -295,7 +328,8 @@ done: + */ + static int + command_matches_dir(struct sudoers_context *ctx, const char *sudoers_dir, +- size_t dlen, int real_root, const struct command_digest_list *digests) ++ size_t dlen, const char *runchroot, ++ const struct command_digest_list *digests) + { + int fd = -1; + debug_decl(command_matches_dir, SUDOERS_DEBUG_MATCH); +@@ -309,11 +343,11 @@ command_matches_dir(struct sudoers_context *ctx, const char *sudoers_dir, + goto bad; + + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(ctx->user.cmnd, digests, &fd)) ++ if (!open_cmnd(ctx->user.cmnd, runchroot, digests, &fd)) + goto bad; +- if (digest_matches(fd, ctx->user.cmnd, digests) != ALLOW) ++ if (digest_matches(fd, ctx->user.cmnd, runchroot, digests) != ALLOW) + goto bad; +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + + debug_return_int(ALLOW); + bad: +@@ -324,7 +358,7 @@ bad: + #endif /* SUDOERS_NAME_MATCH */ + + static int +-command_matches_all(struct sudoers_context *ctx, int real_root, ++command_matches_all(struct sudoers_context *ctx, const char *runchroot, + const struct command_digest_list *digests) + { + #ifndef SUDOERS_NAME_MATCH +@@ -336,10 +370,10 @@ command_matches_all(struct sudoers_context *ctx, int real_root, + if (strchr(ctx->user.cmnd, '/') != NULL) { + #ifndef SUDOERS_NAME_MATCH + /* Open the file for fdexec or for digest matching. */ +- bool open_error = !open_cmnd(ctx->user.cmnd, digests, &fd); ++ bool open_error = !open_cmnd(ctx->user.cmnd, runchroot, digests, &fd); + + /* A non-existent file is not an error for "sudo ALL". */ +- if (do_stat(fd, ctx->user.cmnd, &sb)) { ++ if (do_stat(fd, ctx->user.cmnd, runchroot, &sb)) { + if (open_error) { + /* File exists but we couldn't open it above? */ + goto bad; +@@ -347,14 +381,14 @@ command_matches_all(struct sudoers_context *ctx, int real_root, + } + #else + /* Open the file for fdexec or for digest matching. */ +- (void)open_cmnd(ctx->user.cmnd, digests, &fd); ++ (void)open_cmnd(ctx->user.cmnd, runchroot, digests, &fd); + #endif + } + + /* Check digest of ctx->user.cmnd since we have no sudoers_cmnd for ALL. */ +- if (digest_matches(fd, ctx->user.cmnd, digests) != ALLOW) ++ if (digest_matches(fd, ctx->user.cmnd, runchroot, digests) != ALLOW) + goto bad; +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + + /* No need to set ctx->runas.cmnd for ALL. */ + debug_return_int(ALLOW); +@@ -366,7 +400,7 @@ bad: + + static int + command_matches_fnmatch(struct sudoers_context *ctx, const char *sudoers_cmnd, +- const char *sudoers_args, int real_root, ++ const char *sudoers_args, const char *runchroot, + const struct command_digest_list *digests) + { + const char *cmnd = ctx->user.cmnd; +@@ -384,6 +418,7 @@ command_matches_fnmatch(struct sudoers_context *ctx, const char *sudoers_cmnd, + * c) there are args in sudoers and on command line and they match + * else return DENY. + * ++ * Neither sudoers_cmnd nor user_cmnd are relative to runchroot. + * We do not attempt to match a relative path unless there is a + * canonicalized version. + */ +@@ -402,16 +437,16 @@ command_matches_fnmatch(struct sudoers_context *ctx, const char *sudoers_cmnd, + + if (command_args_match(ctx, sudoers_cmnd, sudoers_args) == ALLOW) { + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(cmnd, digests, &fd)) ++ if (!open_cmnd(cmnd, runchroot, digests, &fd)) + goto bad; + #ifndef SUDOERS_NAME_MATCH +- if (!do_stat(fd, cmnd, &sb)) ++ if (!do_stat(fd, cmnd, runchroot, &sb)) + goto bad; + #endif + /* Check digest of cmnd since sudoers_cmnd is a pattern. */ +- if (digest_matches(fd, cmnd, digests) != ALLOW) ++ if (digest_matches(fd, cmnd, runchroot, digests) != ALLOW) + goto bad; +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + + /* No need to set ctx->runas.cmnd since cmnd matches sudoers_cmnd */ + debug_return_int(ALLOW); +@@ -424,7 +459,7 @@ bad: + + static int + command_matches_regex(struct sudoers_context *ctx, const char *sudoers_cmnd, +- const char *sudoers_args, int real_root, ++ const char *sudoers_args, const char *runchroot, + const struct command_digest_list *digests) + { + const char *cmnd = ctx->user.cmnd; +@@ -441,6 +476,8 @@ command_matches_regex(struct sudoers_context *ctx, const char *sudoers_cmnd, + * b) there are no args on command line and none required by sudoers OR + * c) there are args in sudoers and on command line and they match + * else return DENY. ++ * ++ * Neither sudoers_cmnd nor user_cmnd are relative to runchroot. + */ + if (cmnd[0] != '/' || regex_matches(sudoers_cmnd, cmnd) != ALLOW) { + /* No match, retry using the canonicalized path (if possible). */ +@@ -457,16 +494,16 @@ command_matches_regex(struct sudoers_context *ctx, const char *sudoers_cmnd, + + if (command_args_match(ctx, sudoers_cmnd, sudoers_args) == ALLOW) { + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(cmnd, digests, &fd)) ++ if (!open_cmnd(cmnd, runchroot, digests, &fd)) + goto bad; + #ifndef SUDOERS_NAME_MATCH +- if (!do_stat(fd, cmnd, &sb)) ++ if (!do_stat(fd, cmnd, runchroot, &sb)) + goto bad; + #endif + /* Check digest of cmnd since sudoers_cmnd is a pattern. */ +- if (digest_matches(fd, cmnd, digests) != ALLOW) ++ if (digest_matches(fd, cmnd, runchroot, digests) != ALLOW) + goto bad; +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + + /* No need to set ctx->runas.cmnd since cmnd matches sudoers_cmnd */ + debug_return_int(ALLOW); +@@ -480,17 +517,31 @@ bad: + #ifndef SUDOERS_NAME_MATCH + static int + command_matches_glob(struct sudoers_context *ctx, const char *sudoers_cmnd, +- const char *sudoers_args, int real_root, ++ const char *sudoers_args, const char *runchroot, + const struct command_digest_list *digests) + { + struct stat sudoers_stat; + bool bad_digest = false; + char **ap, *base, *cp; ++ char pathbuf[PATH_MAX]; + int fd = -1; +- size_t dlen; ++ size_t dlen, chrootlen = 0; + glob_t gl; + debug_decl(command_matches_glob, SUDOERS_DEBUG_MATCH); + ++ /* Make sudoers_cmnd relative to the new root, if any. */ ++ if (runchroot != NULL) { ++ /* XXX - handle symlinks and '..' in path outside chroot */ ++ const int len = ++ snprintf(pathbuf, sizeof(pathbuf), "%s%s", runchroot, sudoers_cmnd); ++ if (len >= ssizeof(pathbuf)) { ++ errno = ENAMETOOLONG; ++ debug_return_bool(false); ++ } ++ sudoers_cmnd = pathbuf; ++ chrootlen = strlen(runchroot); ++ } ++ + /* + * First check to see if we can avoid the call to glob(3). + * Short circuit if there are no meta chars in the command itself +@@ -522,19 +573,21 @@ command_matches_glob(struct sudoers_context *ctx, const char *sudoers_cmnd, + close(fd); + fd = -1; + } ++ /* Remove the runchroot, if any. */ ++ cp += chrootlen; + + if (strcmp(cp, ctx->user.cmnd) != 0) + continue; + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(cp, digests, &fd)) ++ if (!open_cmnd(cp, runchroot, digests, &fd)) + continue; +- if (!do_stat(fd, cp, &sudoers_stat)) ++ if (!do_stat(fd, cp, runchroot, &sudoers_stat)) + continue; + if (ctx->user.cmnd_stat == NULL || + (ctx->user.cmnd_stat->st_dev == sudoers_stat.st_dev && + ctx->user.cmnd_stat->st_ino == sudoers_stat.st_ino)) { + /* There could be multiple matches, check digest early. */ +- if (digest_matches(fd, cp, digests) != ALLOW) { ++ if (digest_matches(fd, cp, runchroot, digests) != ALLOW) { + bad_digest = true; + continue; + } +@@ -558,11 +611,13 @@ command_matches_glob(struct sudoers_context *ctx, const char *sudoers_cmnd, + close(fd); + fd = -1; + } ++ /* Remove the runchroot, if any. */ ++ cp += chrootlen; + + /* If it ends in '/' it is a directory spec. */ + dlen = strlen(cp); + if (cp[dlen - 1] == '/') { +- if (command_matches_dir(ctx, cp, dlen, real_root, digests) == ALLOW) { ++ if (command_matches_dir(ctx, cp, dlen, runchroot, digests) == ALLOW) { + globfree(&gl); + debug_return_int(ALLOW); + } +@@ -593,14 +648,14 @@ command_matches_glob(struct sudoers_context *ctx, const char *sudoers_cmnd, + } + + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(cp, digests, &fd)) ++ if (!open_cmnd(cp, runchroot, digests, &fd)) + continue; +- if (!do_stat(fd, cp, &sudoers_stat)) ++ if (!do_stat(fd, cp, runchroot, &sudoers_stat)) + continue; + if (ctx->user.cmnd_stat == NULL || + (ctx->user.cmnd_stat->st_dev == sudoers_stat.st_dev && + ctx->user.cmnd_stat->st_ino == sudoers_stat.st_ino)) { +- if (digest_matches(fd, cp, digests) != ALLOW) ++ if (digest_matches(fd, cp, runchroot, digests) != ALLOW) + continue; + free(ctx->runas.cmnd); + if ((ctx->runas.cmnd = strdup(cp)) == NULL) { +@@ -617,7 +672,7 @@ done: + if (cp != NULL) { + if (command_args_match(ctx, sudoers_cmnd, sudoers_args) == ALLOW) { + /* ctx->runas.cmnd was set above. */ +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + debug_return_int(ALLOW); + } + } +@@ -628,7 +683,7 @@ done: + + static int + command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, +- const char *sudoers_args, int real_root, ++ const char *sudoers_args, const char *runchroot, + const struct command_digest_list *digests) + { + struct stat sudoers_stat; +@@ -641,7 +696,7 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + dlen = strlen(sudoers_cmnd); + if (sudoers_cmnd[dlen - 1] == '/') { + debug_return_int(command_matches_dir(ctx, sudoers_cmnd, dlen, +- real_root, digests)); ++ runchroot, digests)); + } + + /* Only proceed if ctx->user.cmnd_base and basename(sudoers_cmnd) match */ +@@ -672,7 +727,7 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + } + + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(sudoers_cmnd, digests, &fd)) ++ if (!open_cmnd(sudoers_cmnd, runchroot, digests, &fd)) + goto bad; + + /* +@@ -682,7 +737,7 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + * c) there are args in sudoers and on command line and they match + * d) there is a digest and it matches + */ +- if (ctx->user.cmnd_stat != NULL && do_stat(fd, sudoers_cmnd, &sudoers_stat)) { ++ if (ctx->user.cmnd_stat != NULL && do_stat(fd, sudoers_cmnd, runchroot, &sudoers_stat)) { + if (ctx->user.cmnd_stat->st_dev != sudoers_stat.st_dev || + ctx->user.cmnd_stat->st_ino != sudoers_stat.st_ino) + goto bad; +@@ -693,7 +748,7 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + } + if (command_args_match(ctx, sudoers_cmnd, sudoers_args) != ALLOW) + goto bad; +- if (digest_matches(fd, sudoers_cmnd, digests) != ALLOW) { ++ if (digest_matches(fd, sudoers_cmnd, runchroot, digests) != ALLOW) { + /* XXX - log functions not available but we should log very loudly */ + goto bad; + } +@@ -702,7 +757,7 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); + goto bad; + } +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + debug_return_int(ALLOW); + bad: + if (fd != -1) +@@ -712,16 +767,16 @@ bad: + #else /* SUDOERS_NAME_MATCH */ + static int + command_matches_glob(struct sudoers_context *ctx, const char *sudoers_cmnd, +- const char *sudoers_args, int real_root, ++ const char *sudoers_args, const char *runchroot, + const struct command_digest_list *digests) + { +- return command_matches_fnmatch(ctx, sudoers_cmnd, sudoers_args, real_root, ++ return command_matches_fnmatch(ctx, sudoers_cmnd, sudoers_args, runchroot, + digests); + } + + static int + command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, +- const char *sudoers_args, int real_root, ++ const char *sudoers_args, const char *runchroot, + const struct command_digest_list *digests) + { + size_t dlen; +@@ -731,16 +786,16 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + /* If it ends in '/' it is a directory spec. */ + dlen = strlen(sudoers_cmnd); + if (sudoers_cmnd[dlen - 1] == '/') { +- debug_return_int(command_matches_dir(ctx, sudoers_cmnd, dlen, real_root, ++ debug_return_int(command_matches_dir(ctx, sudoers_cmnd, dlen, runchroot, + digests)); + } + + if (strcmp(ctx->user.cmnd, sudoers_cmnd) == 0) { + if (command_args_match(ctx, sudoers_cmnd, sudoers_args) == ALLOW) { + /* Open the file for fdexec or for digest matching. */ +- if (!open_cmnd(ctx->user.cmnd, digests, &fd)) ++ if (!open_cmnd(ctx->user.cmnd, runchroot, digests, &fd)) + goto bad; +- if (digest_matches(fd, ctx->user.cmnd, digests) != ALLOW) ++ if (digest_matches(fd, ctx->user.cmnd, runchroot, digests) != ALLOW) + goto bad; + + /* Successful match. */ +@@ -750,7 +805,7 @@ command_matches_normal(struct sudoers_context *ctx, const char *sudoers_cmnd, + U_("unable to allocate memory")); + goto bad; + } +- set_cmnd_fd(ctx, fd, real_root); ++ set_cmnd_fd(ctx, fd); + debug_return_int(ALLOW); + } + } +@@ -771,11 +826,8 @@ command_matches(struct sudoers_context *ctx, const char *sudoers_cmnd, + const char *sudoers_args, const char *runchroot, struct cmnd_info *info, + const struct command_digest_list *digests) + { +- struct sudoers_pivot pivot_state = SUDOERS_PIVOT_INITIALIZER; + char *saved_user_cmnd = NULL; + struct stat saved_user_stat; +- bool reset_cmnd = false; +- int real_root = -1; + int ret = DENY; + debug_decl(command_matches, SUDOERS_DEBUG_MATCH); + +@@ -793,18 +845,6 @@ command_matches(struct sudoers_context *ctx, const char *sudoers_cmnd, + runchroot = def_runchroot; + } else { + /* Rule-specific runchroot, must reset cmnd and cmnd_stat. */ +- reset_cmnd = true; +- } +- +- /* Pivot root. */ +- if (runchroot != NULL) { +- if (!pivot_root(runchroot, &pivot_state)) +- goto done; +- real_root = pivot_state.saved_root; +- } +- +- if (reset_cmnd) { +- /* Rule-specific runchroot, set cmnd and cmnd_stat after pivot. */ + int status; + + /* Save old ctx->user.cmnd first, set_cmnd_path() will free it. */ +@@ -812,7 +852,7 @@ command_matches(struct sudoers_context *ctx, const char *sudoers_cmnd, + ctx->user.cmnd = NULL; + if (ctx->user.cmnd_stat != NULL) + saved_user_stat = *ctx->user.cmnd_stat; +- status = set_cmnd_path(ctx, NULL); ++ status = set_cmnd_path(ctx, runchroot); + if (status != FOUND) { + ctx->user.cmnd = saved_user_cmnd; + saved_user_cmnd = NULL; +@@ -823,13 +863,13 @@ command_matches(struct sudoers_context *ctx, const char *sudoers_cmnd, + + if (sudoers_cmnd == NULL) { + sudoers_cmnd = "ALL"; +- ret = command_matches_all(ctx, real_root, digests); ++ ret = command_matches_all(ctx, runchroot, digests); + goto done; + } + + /* Check for regular expressions first. */ + if (sudoers_cmnd[0] == '^') { +- ret = command_matches_regex(ctx, sudoers_cmnd, sudoers_args, real_root, ++ ret = command_matches_regex(ctx, sudoers_cmnd, sudoers_args, runchroot, + digests); + goto done; + } +@@ -860,20 +900,16 @@ command_matches(struct sudoers_context *ctx, const char *sudoers_cmnd, + */ + if (def_fast_glob) { + ret = command_matches_fnmatch(ctx, sudoers_cmnd, sudoers_args, +- real_root, digests); ++ runchroot, digests); + } else { + ret = command_matches_glob(ctx, sudoers_cmnd, sudoers_args, +- real_root, digests); ++ runchroot, digests); + } + } else { + ret = command_matches_normal(ctx, sudoers_cmnd, sudoers_args, +- real_root, digests); ++ runchroot, digests); + } + done: +- /* Restore root. */ +- if (runchroot != NULL) +- (void)unpivot_root(&pivot_state); +- + /* Restore ctx->user.cmnd and ctx->user.cmnd_stat. */ + if (saved_user_cmnd != NULL) { + if (info != NULL) { +diff --git a/plugins/sudoers/match_digest.c b/plugins/sudoers/match_digest.c +index 09ea435..2f6f82c 100644 +--- a/plugins/sudoers/match_digest.c ++++ b/plugins/sudoers/match_digest.c +@@ -40,13 +40,14 @@ + #include + + int +-digest_matches(int fd, const char *path, ++digest_matches(int fd, const char *path, const char *runchroot, + const struct command_digest_list *digests) + { + unsigned int digest_type = SUDO_DIGEST_INVALID; + unsigned char *file_digest = NULL; + unsigned char *sudoers_digest = NULL; + struct command_digest *digest; ++ char pathbuf[PATH_MAX]; + size_t digest_len = (size_t)-1; + int matched = DENY; + int fd2 = -1; +@@ -66,6 +67,17 @@ digest_matches(int fd, const char *path, + fd = fd2; + } + ++ if (runchroot != NULL) { ++ /* XXX - handle symlinks and '..' in path outside chroot */ ++ const int len = ++ snprintf(pathbuf, sizeof(pathbuf), "%s%s", runchroot, path); ++ if (len >= ssizeof(pathbuf)) { ++ errno = ENAMETOOLONG; ++ debug_return_bool(false); ++ } ++ path = pathbuf; ++ } ++ + TAILQ_FOREACH(digest, digests, entries) { + /* Compute file digest if needed. */ + if (digest->digest_type != digest_type) { +diff --git a/plugins/sudoers/parse.h b/plugins/sudoers/parse.h +index 0e89fa1..33654c0 100644 +--- a/plugins/sudoers/parse.h ++++ b/plugins/sudoers/parse.h +@@ -418,7 +418,7 @@ int addr_matches(char *n); + int command_matches(struct sudoers_context *ctx, const char *sudoers_cmnd, const char *sudoers_args, const char *runchroot, struct cmnd_info *info, const struct command_digest_list *digests); + + /* match_digest.c */ +-int digest_matches(int fd, const char *path, const struct command_digest_list *digests); ++int digest_matches(int fd, const char *path, const char *runchroot, const struct command_digest_list *digests); + + /* match.c */ + struct group; +diff --git a/plugins/sudoers/pivot.c b/plugins/sudoers/pivot.c +deleted file mode 100644 +index 59423f9..0000000 +--- a/plugins/sudoers/pivot.c ++++ /dev/null +@@ -1,87 +0,0 @@ +-/* +- * SPDX-License-Identifier: ISC +- * +- * Copyright (c) 2023 Todd C. Miller +- * +- * Permission to use, copy, modify, and distribute this software for any +- * purpose with or without fee is hereby granted, provided that the above +- * copyright notice and this permission notice appear in all copies. +- * +- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +- */ +- +-/* +- * This is an open source non-commercial project. Dear PVS-Studio, please check it. +- * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com +- */ +- +-#include +- +-#include +-#include +-#include +- +-#include +- +-/* +- * Pivot to a new root directory, storing the old root and old cwd +- * in state. Changes current working directory to the new root. +- * Returns true on success, else false. +- */ +-bool +-pivot_root(const char *new_root, struct sudoers_pivot *state) +-{ +- debug_decl(pivot_root, SUDOERS_DEBUG_UTIL); +- +- state->saved_root = open("/", O_RDONLY); +- state->saved_cwd = open(".", O_RDONLY); +- if (state->saved_root == -1 || state->saved_cwd == -1 || chroot(new_root) == -1) { +- if (state->saved_root != -1) { +- close(state->saved_root); +- state->saved_root = -1; +- } +- if (state->saved_cwd != -1) { +- close(state->saved_cwd); +- state->saved_cwd = -1; +- } +- debug_return_bool(false); +- } +- debug_return_bool(chdir("/") == 0); +-} +- +-/* +- * Pivot back to the stored root directory and restore the old cwd. +- * Returns true on success, else false. +- */ +-bool +-unpivot_root(struct sudoers_pivot *state) +-{ +- bool ret = true; +- debug_decl(unpivot_root, SUDOERS_DEBUG_UTIL); +- +- /* Order is important: restore old root, *then* change cwd. */ +- if (state->saved_root != -1) { +- if (fchdir(state->saved_root) == -1 || chroot(".") == -1) { +- sudo_warn("%s", U_("unable to restore root directory")); +- ret = false; +- } +- close(state->saved_root); +- state->saved_root = -1; +- } +- if (state->saved_cwd != -1) { +- if (fchdir(state->saved_cwd) == -1) { +- sudo_warn("%s", U_("unable to restore current working directory")); +- ret = false; +- } +- close(state->saved_cwd); +- state->saved_cwd = -1; +- } +- +- debug_return_bool(ret); +-} +diff --git a/plugins/sudoers/pivot.h b/plugins/sudoers/pivot.h +deleted file mode 100644 +index b03993e..0000000 +--- a/plugins/sudoers/pivot.h ++++ /dev/null +@@ -1,32 +0,0 @@ +-/* +- * SPDX-License-Identifier: ISC +- * +- * Copyright (c) 2023 Todd C. Miller +- * +- * Permission to use, copy, modify, and distribute this software for any +- * purpose with or without fee is hereby granted, provided that the above +- * copyright notice and this permission notice appear in all copies. +- * +- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +- */ +- +-#ifndef SUDOERS_PIVOT_H +-#define SUDOERS_PIVOT_H +- +-#define SUDOERS_PIVOT_INITIALIZER { -1, -1 } +- +-struct sudoers_pivot { +- int saved_root; +- int saved_cwd; +-}; +- +-bool pivot_root(const char *new_root, struct sudoers_pivot *state); +-bool unpivot_root(struct sudoers_pivot *state); +- +-#endif /* SUDOERS_PIVOT_H */ +diff --git a/plugins/sudoers/regress/editor/check_editor.c b/plugins/sudoers/regress/editor/check_editor.c +index 65e00c0..d28bb11 100644 +--- a/plugins/sudoers/regress/editor/check_editor.c ++++ b/plugins/sudoers/regress/editor/check_editor.c +@@ -80,7 +80,8 @@ sudo_dso_public int main(int argc, char *argv[]); + /* STUB */ + int + find_path(const char *infile, char **outfile, struct stat *sbp, +- const char *path, bool ignore_dot, char * const *allowlist) ++ const char *path, const char *runchroot, bool ignore_dot, ++ char * const *allowlist) + { + if (infile[0] == '/') { + *outfile = strdup(infile); +diff --git a/plugins/sudoers/regress/fuzz/fuzz_policy.c b/plugins/sudoers/regress/fuzz/fuzz_policy.c +index 0b01e4e..1321c42 100644 +--- a/plugins/sudoers/regress/fuzz/fuzz_policy.c ++++ b/plugins/sudoers/regress/fuzz/fuzz_policy.c +@@ -832,7 +832,8 @@ display_privs(struct sudoers_context *ctx, const struct sudo_nss_list *snl, + /* STUB */ + int + find_path(const char *infile, char **outfile, struct stat *sbp, +- const char *path, bool ignore_dot, char * const *allowlist) ++ const char *path, const char *runchroot, bool ignore_dot, ++ char * const *allowlist) + { + switch (pass) { + case PASS_CHECK_NOT_FOUND: +@@ -855,9 +856,9 @@ find_path(const char *infile, char **outfile, struct stat *sbp, + /* STUB */ + int + resolve_cmnd(struct sudoers_context *ctx, const char *infile, char **outfile, +- const char *path) ++ const char *path, const char *runchroot) + { +- return find_path(infile, outfile, NULL, path, false, NULL); ++ return find_path(infile, outfile, NULL, path, NULL, false, NULL); + } + + /* STUB */ +diff --git a/plugins/sudoers/regress/fuzz/fuzz_stubs.c b/plugins/sudoers/regress/fuzz/fuzz_stubs.c +index ce47bf5..c86ca33 100644 +--- a/plugins/sudoers/regress/fuzz/fuzz_stubs.c ++++ b/plugins/sudoers/regress/fuzz/fuzz_stubs.c +@@ -57,18 +57,6 @@ init_eventlog_config(void) + return; + } + +-bool +-pivot_root(const char *new_root, struct sudoers_pivot *state) +-{ +- return true; +-} +- +-bool +-unpivot_root(struct sudoers_pivot *state) +-{ +- return true; +-} +- + int + group_plugin_query(const char *user, const char *group, const struct passwd *pw) + { +diff --git a/plugins/sudoers/resolve_cmnd.c b/plugins/sudoers/resolve_cmnd.c +index 24e34de..3a84ff8 100644 +--- a/plugins/sudoers/resolve_cmnd.c ++++ b/plugins/sudoers/resolve_cmnd.c +@@ -34,7 +34,7 @@ + */ + int + resolve_cmnd(struct sudoers_context *ctx, const char *infile, +- char **outfile, const char *path) ++ char **outfile, const char *path, const char *runchroot) + { + int ret = NOT_FOUND_ERROR; + debug_decl(resolve_cmnd, SUDOERS_DEBUG_UTIL); +@@ -42,7 +42,7 @@ resolve_cmnd(struct sudoers_context *ctx, const char *infile, + if (!set_perms(ctx, PERM_RUNAS)) + goto done; + ret = find_path(infile, outfile, ctx->user.cmnd_stat, path, +- def_ignore_dot, NULL); ++ runchroot, def_ignore_dot, NULL); + if (!restore_perms()) + goto done; + if (ret == NOT_FOUND) { +@@ -50,7 +50,7 @@ resolve_cmnd(struct sudoers_context *ctx, const char *infile, + if (!set_perms(ctx, PERM_USER)) + goto done; + ret = find_path(infile, outfile, ctx->user.cmnd_stat, path, +- def_ignore_dot, NULL); ++ runchroot, def_ignore_dot, NULL); + if (!restore_perms()) + goto done; + } +diff --git a/plugins/sudoers/stubs.c b/plugins/sudoers/stubs.c +index b8bc104..e7a1c29 100644 +--- a/plugins/sudoers/stubs.c ++++ b/plugins/sudoers/stubs.c +@@ -94,17 +94,3 @@ init_eventlog_config(void) + { + return; + } +- +-/* STUB */ +-bool +-pivot_root(const char *new_root, struct sudoers_pivot *state) +-{ +- return true; +-} +- +-/* STUB */ +-bool +-unpivot_root(struct sudoers_pivot *state) +-{ +- return true; +-} +diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c +index ad2fa2f..1a80317 100644 +--- a/plugins/sudoers/sudoers.c ++++ b/plugins/sudoers/sudoers.c +@@ -1092,7 +1092,6 @@ init_vars(struct sudoers_context *ctx, char * const envp[]) + int + set_cmnd_path(struct sudoers_context *ctx, const char *runchroot) + { +- struct sudoers_pivot pivot_state = SUDOERS_PIVOT_INITIALIZER; + const char *cmnd_in; + char *cmnd_out = NULL; + char *path = ctx->user.path; +@@ -1111,13 +1110,7 @@ set_cmnd_path(struct sudoers_context *ctx, const char *runchroot) + if (def_secure_path && !user_is_exempt(ctx)) + path = def_secure_path; + +- /* Pivot root. */ +- if (runchroot != NULL) { +- if (!pivot_root(runchroot, &pivot_state)) +- goto error; +- } +- +- ret = resolve_cmnd(ctx, cmnd_in, &cmnd_out, path); ++ ret = resolve_cmnd(ctx, cmnd_in, &cmnd_out, path, runchroot); + if (ret == FOUND) { + char *slash = strrchr(cmnd_out, '/'); + if (slash != NULL) { +@@ -1134,14 +1127,8 @@ set_cmnd_path(struct sudoers_context *ctx, const char *runchroot) + else + ctx->user.cmnd = cmnd_out; + +- /* Restore root. */ +- if (runchroot != NULL) +- (void)unpivot_root(&pivot_state); +- + debug_return_int(ret); + error: +- if (runchroot != NULL) +- (void)unpivot_root(&pivot_state); + free(cmnd_out); + debug_return_int(NOT_FOUND_ERROR); + } +diff --git a/plugins/sudoers/sudoers.h b/plugins/sudoers/sudoers.h +index 106a1e8..414293e 100644 +--- a/plugins/sudoers/sudoers.h ++++ b/plugins/sudoers/sudoers.h +@@ -49,7 +49,6 @@ + #include + #include + #include +-#include + + /* + * Info passed in from the sudo front-end. +@@ -314,15 +313,16 @@ struct stat; + * Function prototypes + */ + /* goodpath.c */ +-bool sudo_goodpath(const char *path, struct stat *sbp); ++bool sudo_goodpath(const char *path, const char *runchroot, struct stat *sbp); + + /* findpath.c */ + int find_path(const char *infile, char **outfile, struct stat *sbp, +- const char *path, bool ignore_dot, char * const *allowlist); ++ const char *path, const char *runchroot, bool ignore_dot, ++ char * const *allowlist); + + /* resolve_cmnd.c */ + int resolve_cmnd(struct sudoers_context *ctx, const char *infile, +- char **outfile, const char *path); ++ char **outfile, const char *path, const char *runchroot); + + /* check.c */ + int check_user(struct sudoers_context *ctx, unsigned int validated, unsigned int mode); +diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c +index f79a0bf..006ab36 100644 +--- a/plugins/sudoers/testsudoers.c ++++ b/plugins/sudoers/testsudoers.c +@@ -604,18 +604,6 @@ init_eventlog_config(void) + return; + } + +-bool +-pivot_root(const char *new_root, struct sudoers_pivot *state) +-{ +- return true; +-} +- +-bool +-unpivot_root(struct sudoers_pivot *state) +-{ +- return true; +-} +- + int + set_cmnd_path(struct sudoers_context *ctx, const char *runchroot) + { +-- +2.33.0 + diff --git a/SPECS/sudo/sudo b/SPECS/sudo/sudo new file mode 100644 index 00000000..284b0507 --- /dev/null +++ b/SPECS/sudo/sudo @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth +password include system-auth +session optional pam_keyinit.so revoke +session required pam_limits.so +session include system-auth diff --git a/SPECS/sudo/sudo-i b/SPECS/sudo/sudo-i new file mode 100644 index 00000000..3c63733a --- /dev/null +++ b/SPECS/sudo/sudo-i @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth include sudo +account include sudo +password include sudo +session optional pam_keyinit.so force revoke +session include sudo diff --git a/SPECS/sudo/sudo.spec b/SPECS/sudo/sudo.spec new file mode 100644 index 00000000..7207c792 --- /dev/null +++ b/SPECS/sudo/sudo.spec @@ -0,0 +1,144 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sudo +Version: 1.9.17p2 +Release: %autorelease +Summary: Allows restricted root access for specified users +License: ISC +URL: https://www.sudo.ws +#!RemoteAsset +Source0: https://www.sudo.ws/dist/%{name}-%{version}.tar.gz +Source1: sudoers +Source2: sudo +Source3: sudo-i + +# NOTE: Temporarily disable applying CVE patches below. +# These patches (CVE-2025-32462 / CVE-2025-32463) have not yet been checked +# against the latest upstream version. +# Until verification is done, do not apply them to avoid conflicts. +# TODO: Re-enable if upstream has not fixed the issues. +# Patch0: 0001-CVE-2025-32462.patch +# Patch1: 0002-CVE-2025-32463.patch + +BuildSystem: autotools +BuildRequires: pam-devel groff flex bison automake autoconf libtool +BuildRequires: libcap-devel libselinux-devel gettext zlib-devel +Requires: pam +Recommends: vim-minimal +Requires(post): coreutils + +BuildOption(conf): --disable-root-mailer +BuildOption(conf): --disable-intercept +BuildOption(conf): --disable-log-server +BuildOption(conf): --disable-log-client +BuildOption(conf): --with-logging=syslog +BuildOption(conf): --with-logfac=authpriv +BuildOption(conf): --with-pam +BuildOption(conf): --with-pam-login +BuildOption(conf): --with-editor=/bin/vi +BuildOption(conf): --with-env-editor +BuildOption(conf): --with-ignore-dot +BuildOption(conf): --with-tty-tickets +BuildOption(conf): --without-ldap +BuildOption(conf): --with-selinux +BuildOption(conf): --with-passprompt="[sudo] password for %p: " +BuildOption(conf): --without-linux-audit +BuildOption(conf): --with-sssd + +BuildOption(install): install_uid=`id -u` install_gid=`id -g` sudoers_uid=`id -u` sudoers_gid=`id -g` + +%description +Sudo is a program designed to allow a sysadmin to give limited root privileges +to users and log root activity. The basic philosophy is to give as few +privileges as possible but still allow people to get their work done. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains header files for developing sudo plugins. + +%conf -p +autoreconf -I m4 -fv --install +export CFLAGS="%{build_cflags} -fpie" LDFLAGS="%{build_ldflags} -pie" + +%install -a +# Set correct permissions +chmod 755 %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/* +# Create required directories +install -p -d -m 700 %{buildroot}/var/db/sudo/lectured +install -p -d -m 750 %{buildroot}%{_sysconfdir}/sudoers.d +install -p -d -m 755 %{buildroot}%{_sysconfdir}/dnf/protected.d/ +# Install sudoers config +install -p -c -m 0440 %{S:1} %{buildroot}/etc/sudoers +# Install dnf protection config +echo sudo > sudo.conf +install -p -c -m 0644 sudo.conf %{buildroot}/etc/dnf/protected.d/ +rm -f sudo.conf +# Fix permissions on plugins +chmod +x %{buildroot}%{_libexecdir}/sudo/*.so +# Clean up unwanted files +rm -f %{buildroot}%{_datadir}/examples/sudo +# Replace the broken %delete_la macro with its correct implementation +find %{buildroot} -type f -name "*.la" -delete -print +rm -f %{buildroot}%{_sysconfdir}/sudoers.dist +# Add ld.so.conf.d entry for plugins +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "/usr/libexec/sudo" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf +# Install PAM files +mkdir -p %{buildroot}/etc/pam.d +install -p -c -m 0644 %{S:2} %{buildroot}/etc/pam.d/sudo +install -p -c -m 0644 %{S:3} %{buildroot}/etc/pam.d/sudo-i + +%find_lang sudo --all-name --generate-subpackages +# Remove rpath +# chrpath --delete %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/* %{buildroot}%{_libexecdir}/sudo/* + +%post +/bin/chmod 0440 /etc/sudoers || : +/sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%license LICENSE.md +%doc README.md ChangeLog NEWS +%doc plugins/sample/sample_plugin.c +/usr/share/doc/sudo/ +%attr(0440,root,root) %config(noreplace) /etc/sudoers +%attr(0750,root,root) %dir /etc/sudoers.d/ +%config(noreplace) /etc/dnf/protected.d/sudo.conf +%config(noreplace) /etc/sudo.conf +%attr(4111,root,root) %{_bindir}/sudo +%attr(0111,root,root) %{_bindir}/sudoreplay +%{_bindir}/sudoedit +%{_bindir}/cvtsudoers +%{_sbindir}/visudo +%{_libexecdir}/sudo/sesh +%{_libexecdir}/sudo/sudo_noexec.so +%{_libexecdir}/sudo/sudoers.so +%{_libexecdir}/sudo/group_file.so +%{_libexecdir}/sudo/system_group.so +%{_libexecdir}/sudo/audit_json.so +%{_libexecdir}/sudo/libsudo_util.so* +%dir /var/db/sudo +%dir /var/db/sudo/lectured +%dir %{_libexecdir}/sudo +%config(noreplace) /etc/pam.d/sudo +%config(noreplace) /etc/pam.d/sudo-i +%config(noreplace) /etc/ld.so.conf.d/* +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man8/* + +%files devel +%{_includedir}/sudo_plugin.h + +%changelog +%{?autochangelog} diff --git a/SPECS/sudo/sudoers b/SPECS/sudo/sudoers new file mode 100644 index 00000000..e68d56cc --- /dev/null +++ b/SPECS/sudo/sudoers @@ -0,0 +1,120 @@ +## Sudoers allows particular users to run various commands as +## the root user, without needing the root password. +## +## Examples are provided at the bottom of the file for collections +## of related commands, which can then be delegated out to particular +## users or groups. +## +## This file must be edited with the 'visudo' command. + +## Host Aliases +## Groups of machines. You may prefer to use hostnames (perhaps using +## wildcards for entire domains) or IP addresses instead. +# Host_Alias FILESERVERS = fs1, fs2 +# Host_Alias MAILSERVERS = smtp, smtp2 + +## User Aliases +## These aren't often necessary, as you can use regular groups +## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname +## rather than USERALIAS +# User_Alias ADMINS = jsmith, mikem + + +## Command Aliases +## These are groups of related commands... + +## Networking +# Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool + +## Installation and management of software +# Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum + +## Services +# Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig, /usr/bin/systemctl start, /usr/bin/systemctl stop, /usr/bin/systemctl reload, /usr/bin/systemctl restart, /usr/bin/systemctl status, /usr/bin/systemctl enable, /usr/bin/systemctl disable + +## Updating the locate database +# Cmnd_Alias LOCATE = /usr/bin/updatedb + +## Storage +# Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount + +## Delegating permissions +# Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp + +## Processes +# Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall + +## Drivers +# Cmnd_Alias DRIVERS = /sbin/modprobe + +# Defaults specification + +# +# Refuse to run if unable to disable echo on the tty. +# +Defaults !visiblepw + +# +# Preserving HOME has security implications since many programs +# use it when searching for configuration files. Note that HOME +# is already set when the the env_reset option is enabled, so +# this option is only effective for configurations where either +# env_reset is disabled or HOME is present in the env_keep list. +# +Defaults always_set_home +Defaults match_group_by_gid + +# Prior to version 1.8.15, groups listed in sudoers that were not +# found in the system group database were passed to the group +# plugin, if any. Starting with 1.8.15, only groups of the form +# %:group are resolved via the group plugin by default. +# We enable always_query_group_plugin to restore old behavior. +# Disable this option for new behavior. +Defaults always_query_group_plugin + +Defaults env_reset +Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS" +Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE" +Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES" +Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE" +Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY" + +# +# Adding HOME to env_keep may enable a user to run unrestricted +# commands via sudo. +# +# Defaults env_keep += "HOME" + +Defaults secure_path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +## Next comes the main part: which users can run what software on +## which machines (the sudoers file can be shared between multiple +## systems). +## Syntax: +## +## user MACHINE=COMMANDS +## +## The COMMANDS section may have other options added to it. +## +## Allow root to run any commands anywhere +root ALL=(ALL) ALL + +## Allows members of the 'sys' group to run networking, software, +## service management apps and more. +# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS + +## Allows people in group wheel to run all commands +%wheel ALL=(ALL) ALL + +## Same thing without a password +# %wheel ALL=(ALL) NOPASSWD: ALL + +## Allows members of the users group to mount and unmount the +## cdrom as root +# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom + +## Allows members of the users group to shutdown this system +# %users localhost=/sbin/shutdown -h now + +## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment) +#includedir /etc/sudoers.d diff --git a/SPECS/swig/0001-swig-python-Python-3.14-support.patch b/SPECS/swig/0001-swig-python-Python-3.14-support.patch new file mode 100644 index 00000000..964c2474 --- /dev/null +++ b/SPECS/swig/0001-swig-python-Python-3.14-support.patch @@ -0,0 +1,154 @@ +From 50e1cc8bc0d090164762ec166439f8b0f3855308 Mon Sep 17 00:00:00 2001 +From: Julien Schueller +Date: Thu, 10 Apr 2025 17:22:15 +0200 +Subject: [PATCH 1/3] Python: Handle __package__ removal + +Closes #2967 +--- + Doc/Manual/Python.html | 6 +++--- + Source/Modules/python.cxx | 8 +++++--- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html +index 23587e5dbcc..01fc449a68a 100644 +--- a/Doc/Manual/Python.html ++++ b/Doc/Manual/Python.html +@@ -6552,7 +6552,7 @@

33.11.6.1 Both modules + +

+ In this configuration, the pure Python module, foo.py, tries to load the C/C++ module, _foo, from the same package foo.py is +-located in. The package name is determined from the __package__ ++located in. The package name is determined from the __spec__.parent (or __package__ before Python 3.4) + attribute if available, see PEP 366. Otherwise it is derived from the __name__ + attribute given to foo.py by the Python loader that imported foo.py. + The interface file for this configuration would contain: +@@ -6675,7 +6675,7 @@

33.11.6.4 More on customizing the modu + +
+
+-if __package__ or '.' in __name__:
++if getattr(__spec__, "parent", None) or '.' in __name__:
+     from . import _foo
+ else:
+     import _foo
+@@ -6760,7 +6760,7 @@ 

33.11.6.4 More on customizing the modu + +
+
+-if __package__ or '.' in __name__:
++if getattr(__spec__, "parent", None) or '.' in __name__:
+     from ._foo import *
+ else:
+     from _foo import *
+diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
+index 86daf131c8b..a71fc3cdb25 100644
+--- a/Source/Modules/python.cxx
++++ b/Source/Modules/python.cxx
+@@ -703,20 +703,22 @@ class PYTHON:public Language {
+ 	 * onwards (implicit relative imports raised a DeprecationWarning in 2.6,
+ 	 * and fail in 2.7 onwards).
+ 	 *
+-	 * First check for __package__ which is available from 2.6 onwards, see PEP366.
++	 * First check for __spec__.parent which is available from 3.4 onwards,
++	 * see https://docs.python.org/3/reference/import.html#spec. If not,
++	 * check for __package__, which was set before 3.14.
+ 	 * Next try determine the shadow wrapper's package based on the __name__ it
+ 	 * was given by the importer that loaded it.
+ 	 * If the module is in a package, load the low-level C/C++ module from the
+ 	 * same package, otherwise load it as a global module.
+ 	 */
+         Printv(default_import_code, "# Import the low-level C/C++ module\n", NULL);
+-        Printv(default_import_code, "if __package__ or \".\" in __name__:\n", NULL);
++        Printv(default_import_code, "if getattr(globals().get(\"__spec__\"), \"parent\", None) or globals().get(\"__package__\") or \".\" in __name__:\n", NULL);
+         Printv(default_import_code, tab4, "from . import ", module, "\n", NULL);
+         Printv(default_import_code, "else:\n", NULL);
+         Printv(default_import_code, tab4, "import ", module, "\n", NULL);
+       } else {
+         Printv(default_import_code, "# Pull in all the attributes from the low-level C/C++ module\n", NULL);
+-        Printv(default_import_code, "if __package__ or \".\" in __name__:\n", NULL);
++        Printv(default_import_code, "if getattr(globals().get(\"__spec__\"), \"parent\", None) or globals().get(\"__package__\") or \".\" in __name__:\n", NULL);
+         Printv(default_import_code, tab4, "from .", module, " import *\n", NULL);
+         Printv(default_import_code, "else:\n", NULL);
+         Printv(default_import_code, tab4, "from ", module, " import *\n", NULL);
+
+From 3bfdf13c602f877860a9949ba751a5b5a9ba70aa Mon Sep 17 00:00:00 2001
+From: Julien Schueller 
+Date: Thu, 10 Apr 2025 18:35:25 +0200
+Subject: [PATCH 2/3] Python: Add ht_token
+
+---
+ Source/Modules/python.cxx | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
+index a71fc3cdb25..3070a94face 100644
+--- a/Source/Modules/python.cxx
++++ b/Source/Modules/python.cxx
+@@ -4374,6 +4374,11 @@ class PYTHON:public Language {
+     Printv(f, "#if PY_VERSION_HEX >= 0x030b0000\n", NIL);
+     printSlot(f, getSlot(n, "feature:python:_ht_tpname"), "_ht_tpname", "char *");
+ 
++    // void *ht_token;
++    Printv(f, "#if PY_VERSION_HEX >= 0x030e0000\n", NIL);
++    printSlot(f, getSlot(n, "feature:python:ht_token"), "ht_token", "void *");
++    Printv(f, "#endif\n", NIL);
++
+     // struct _specialization_cache _spec_cache;
+     Printf(f, "  {\n");
+     printSlot(f, getSlot(n, "feature:python:getitem"), "getitem", "PyObject *");
+
+From 55237efa7219f65a04e0ffc69a81c574b5f5e162 Mon Sep 17 00:00:00 2001
+From: Julien Schueller 
+Date: Thu, 10 Apr 2025 17:47:59 +0200
+Subject: [PATCH 3/3] Python: Amend annotations test
+
+---
+ .../python_annotations_variable_c_runme.py    | 24 +++++++++++++------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+diff --git a/Examples/test-suite/python/python_annotations_variable_c_runme.py b/Examples/test-suite/python/python_annotations_variable_c_runme.py
+index 153852d05e6..d1f359bbbd0 100644
+--- a/Examples/test-suite/python/python_annotations_variable_c_runme.py
++++ b/Examples/test-suite/python/python_annotations_variable_c_runme.py
+@@ -1,4 +1,17 @@
+ import sys
++import inspect
++
++
++def get_annotations(cls):
++    # Python >=3.14 removed the __annotations__ attribute
++    # retrieve it via inspect (see also annotationlib)
++    if hasattr(inspect, "get_annotations"):
++        # Python >=3.10
++        return inspect.get_annotations(cls)
++    else:
++        # Python <3.10
++        return getattr(cls, "__annotations__", {})
++
+ 
+ # Variable annotations for properties is only supported in python-3.6 and later (PEP 526)
+ if sys.version_info[0:2] >= (3, 6):
+@@ -8,17 +21,14 @@
+     annotations_supported = not(is_python_builtin() or is_python_fastproxy())
+ 
+     if annotations_supported:
+-        ts = TemplateShort()
+-        anno = ts.__annotations__
++        anno = get_annotations(TemplateShort)
+         if anno != {'member_variable': 'int'}:
+             raise RuntimeError("annotations mismatch: {}".format(anno))
+ 
+-        ts = StructWithVar()
+-        anno = ts.__annotations__
++        anno = get_annotations(StructWithVar)
+         if anno != {'member_variable': 'int'}:
+             raise RuntimeError("annotations mismatch: {}".format(anno))
+ 
+-        ts = StructWithVarNotAnnotated()
+-        if getattr(ts, "__annotations__", None) != None:
+-            anno = ts.__annotations__
++        anno = get_annotations(StructWithVarNotAnnotated)
++        if anno != {}:
+             raise RuntimeError("annotations mismatch: {}".format(anno))
+
+
diff --git a/SPECS/swig/0002-swig-4.4.0-Python-DeprecationWarning-fixes.patch b/SPECS/swig/0002-swig-4.4.0-Python-DeprecationWarning-fixes.patch
new file mode 100644
index 00000000..e7c79bd6
--- /dev/null
+++ b/SPECS/swig/0002-swig-4.4.0-Python-DeprecationWarning-fixes.patch
@@ -0,0 +1,807 @@
+From 49a7d2b0c6aed00bd07a9a28569020d560c2658c Mon Sep 17 00:00:00 2001
+From: William S Fulton 
+Date: Sat, 10 May 2025 13:47:35 +0100
+Subject: [PATCH 1/5] Python DeprecationWarning fixes
+
+DeprecationWarning fixes when using 'python -Walways' or if using one of the types being warned about:
+
+  DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
+  DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
+  DeprecationWarning: builtin type swigvarlink has no __module__ attribute
+
+The warning was present if code was generated without using -builtin in 4.3.x.
+The warning was only present if using the Python limited API in 4.2.1 and earlier.
+
+These 3 types were not in any module at all. Now they are in the swig runtime module.
+Docs to follow.
+
+Issue #2881
+Issue #3061
+Issue #3160
+---
+ CHANGES.current       | 11 +++++++++++
+ Lib/python/pyhead.swg |  4 +++-
+ Lib/python/pyrun.swg  | 22 +++++++++++-----------
+ 3 files changed, 25 insertions(+), 12 deletions(-)
+
+#diff --git a/CHANGES.current b/CHANGES.current
+#index 99c8a1d8f..0bce7937f 100644
+#--- a/CHANGES.current
+#+++ b/CHANGES.current
+#@@ -7,6 +7,17 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
+# Version 4.4.0 (in progress)
+# ===========================
+# 
+#+2025-05-10: jschueller, wsfulton
+#+            [Python] #2881 #3061 #3160 DeprecationWarning fixes when using 'python -Walways'
+#+            or if using one of the types being warned about:
+#+
+#+              DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
+#+              DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
+#+              DeprecationWarning: builtin type swigvarlink has no __module__ attribute
+#+
+#+            The warning was present if code was generated without using -builtin in 4.3.x.
+#+            The warning was only present if using the Python limited API in 4.2.1 and earlier.
+#+
+# 2025-04-30: wsfulton
+#             [Python] #3134 Fix maximum size of strings being marshalled from C/C++
+#             into Python. This has been changed from INT_MAX to PY_SSIZE_T_MAX in line
+diff --git a/Lib/python/pyhead.swg b/Lib/python/pyhead.swg
+index 50dca5bc0..4f238b9f6 100644
+--- a/Lib/python/pyhead.swg
++++ b/Lib/python/pyhead.swg
+@@ -60,6 +60,8 @@ SWIG_Python_str_FromChar(const char *c)
+ #endif
+ }
+ 
++#define SWIG_RUNTIME_MODULE "swig_runtime_data" SWIG_RUNTIME_VERSION
++
+ /* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */
+ # define SWIGPY_USE_CAPSULE
+ #ifdef SWIGPYTHON_BUILTIN
+@@ -67,7 +69,7 @@ SWIG_Python_str_FromChar(const char *c)
+ #else
+ # define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule" SWIG_TYPE_TABLE_NAME
+ #endif
+-# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION "." SWIGPY_CAPSULE_ATTR_NAME)
++#define SWIGPY_CAPSULE_NAME SWIG_RUNTIME_MODULE "." SWIGPY_CAPSULE_ATTR_NAME
+ 
+ #if PY_VERSION_HEX < 0x03020000
+ #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
+diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
+index 77d7fccfa..b9e3e7241 100644
+--- a/Lib/python/pyrun.swg
++++ b/Lib/python/pyrun.swg
+@@ -353,7 +353,7 @@ swig_varlink_type(void) {
+       PyObject_HEAD_INIT(NULL)
+       0,                                  /* ob_size */
+ #endif
+-      "swigvarlink",                      /* tp_name */
++      SWIG_RUNTIME_MODULE ".swigvarlink", /* tp_name */
+       sizeof(swig_varlinkobject),         /* tp_basicsize */
+       0,                                  /* tp_itemsize */
+       (destructor) swig_varlink_dealloc,  /* tp_dealloc */
+@@ -424,7 +424,7 @@ swig_varlink_type(void) {
+     { 0, NULL }
+   };
+   PyType_Spec spec = {
+-    "swigvarlink",
++    SWIG_RUNTIME_MODULE ".swigvarlink",
+     sizeof(swig_varlinkobject),
+     0,
+     Py_TPFLAGS_DEFAULT,
+@@ -750,7 +750,7 @@ SwigPyObject_Check(PyObject *op) {
+ #ifdef SWIGPYTHON_BUILTIN
+   if (PyType_IsSubtype(op_type, target_tp))
+     return 1;
+-  return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
++  return (strcmp(op_type->tp_name, SWIG_RUNTIME_MODULE ".SwigPyObject") == 0);
+ #else
+ # ifdef Py_LIMITED_API
+   int cmp;
+@@ -766,7 +766,7 @@ SwigPyObject_Check(PyObject *op) {
+   SWIG_Py_DECREF(tp_name);
+   return cmp == 0;
+ # else
+-  return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
++  return (strcmp(op_type->tp_name, SWIG_RUNTIME_MODULE ".SwigPyObject") == 0);
+ # endif
+ #endif
+ }
+@@ -966,7 +966,7 @@ SwigPyObject_TypeOnce(void) {
+       PyObject_HEAD_INIT(NULL)
+       0,                                    /* ob_size */
+ #endif
+-      "SwigPyObject",                       /* tp_name */
++      SWIG_RUNTIME_MODULE ".SwigPyObject",  /* tp_name */
+       sizeof(SwigPyObject),                 /* tp_basicsize */
+       0,                                    /* tp_itemsize */
+       (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
+@@ -1061,7 +1061,7 @@ SwigPyObject_TypeOnce(void) {
+     { 0, NULL }
+   };
+   PyType_Spec spec = {
+-    "SwigPyObject",
++    SWIG_RUNTIME_MODULE ".SwigPyObject",
+     sizeof(SwigPyObject),
+     0,
+     Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
+@@ -1160,7 +1160,7 @@ SwigPyPacked_Check(PyObject *op) {
+   SWIG_Py_DECREF(tp_name);
+   return cmp == 0;
+ #else
+-  return (strcmp(op_type->tp_name, "SwigPyPacked") == 0);
++  return (strcmp(op_type->tp_name, SWIG_RUNTIME_MODULE ".SwigPyPacked") == 0);
+ #endif
+ }
+ 
+@@ -1188,7 +1188,7 @@ SwigPyPacked_TypeOnce(void) {
+       PyObject_HEAD_INIT(NULL)
+       0,                                    /* ob_size */
+ #endif
+-      "SwigPyPacked",                       /* tp_name */
++      SWIG_RUNTIME_MODULE ".SwigPyPacked",  /* tp_name */
+       sizeof(SwigPyPacked),                 /* tp_basicsize */
+       0,                                    /* tp_itemsize */
+       (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
+@@ -1281,7 +1281,7 @@ SwigPyPacked_TypeOnce(void) {
+     { 0, NULL }
+   };
+   PyType_Spec spec = {
+-    "SwigPyPacked",
++    SWIG_RUNTIME_MODULE ".SwigPyPacked",
+     sizeof(SwigPyPacked),
+     0,
+     Py_TPFLAGS_DEFAULT,
+@@ -1846,10 +1846,10 @@ SWIGRUNTIME void
+ SWIG_Python_SetModule(swig_module_info *swig_module) {
+ #if PY_VERSION_HEX >= 0x03000000
+  /* Add a dummy module object into sys.modules */
+-  PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
++  PyObject *module = PyImport_AddModule(SWIG_RUNTIME_MODULE);
+ #else
+   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+-  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
++  PyObject *module = Py_InitModule(SWIG_RUNTIME_MODULE, swig_empty_runtime_method_table);
+ #endif
+   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
+   if (pointer && module) {
+-- 
+2.50.1
+
+
+From 7ecbb7103dec48bb316baa9ccd71ba7888de7c54 Mon Sep 17 00:00:00 2001
+From: William S Fulton 
+Date: Sun, 11 May 2025 16:02:43 +0100
+Subject: [PATCH 2/5] Add SwigPyObject, SwigPyPacked, swigvarlink to the swig
+ runtime module
+
+Also add SWIG_REFCNT_DEBUG for debugging reference counts when the main
+module is destroyed - there's some work to be done here on reference
+counts!
+---
+ Lib/python/pyinit.swg |  1 +
+ Lib/python/pyrun.swg  | 91 +++++++++++++++++++++++++++++++++----------
+ 2 files changed, 71 insertions(+), 21 deletions(-)
+
+diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg
+index 5bf7097f5..4e25323f6 100644
+--- a/Lib/python/pyinit.swg
++++ b/Lib/python/pyinit.swg
+@@ -261,6 +261,7 @@ SWIG_init(void) {
+   (void)globals;
+ 
+   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
++  SWIG_runtime_data_module();
+   SWIG_This();
+   SWIG_Python_TypeCache();
+   SwigPyPacked_type();
+diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
+index b9e3e7241..2ef79f348 100644
+--- a/Lib/python/pyrun.swg
++++ b/Lib/python/pyrun.swg
+@@ -114,8 +114,25 @@ SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
+ 
+ #endif
+ 
+-/* Append a value to the result obj */
++/* SWIG runtime data Python module */
++static PyObject *Swig_runtime_data_module_global = NULL;
++
++/* Create/obtain the single swig_runtime_data module which is used across different SWIG generated modules */
++SWIGINTERN PyObject *
++SWIG_runtime_data_module() {
++  if (!Swig_runtime_data_module_global) {
++#if PY_VERSION_HEX >= 0x03000000
++    Swig_runtime_data_module_global = PyImport_AddModule(SWIG_RUNTIME_MODULE);
++#else
++    static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
++    Swig_runtime_data_module_global = Py_InitModule(SWIG_RUNTIME_MODULE, swig_empty_runtime_method_table);
++#endif
++    SWIG_Py_XINCREF(Swig_runtime_data_module_global);
++  }
++  return Swig_runtime_data_module_global;
++}
+ 
++/* Append a value to the result obj */
+ SWIGINTERN PyObject*
+ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) {
+   if (!result) {
+@@ -341,7 +358,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) {
+ 
+ SWIGINTERN PyTypeObject*
+ swig_varlink_type(void) {
+-  static char varlink__doc__[] = "Swig var link object";
++  static char varlink__doc__[] = "Swig variable link object";
+ #ifndef SWIG_HEAPTYPES
+   static PyTypeObject varlink_type;
+   static int type_init = 0;
+@@ -407,10 +424,13 @@ swig_varlink_type(void) {
+       0                                   /* tp_next */
+ #endif
+     };
++    PyObject *runtime_data_module = SWIG_runtime_data_module();
+     varlink_type = tmp;
+     type_init = 1;
+     if (PyType_Ready(&varlink_type) < 0)
+       return NULL;
++    if (PyModule_AddObject(runtime_data_module, "swigvarlink", (PyObject *)&varlink_type) == 0)
++      SWIG_Py_INCREF((PyObject *)&varlink_type);
+   }
+   return &varlink_type;
+ #else
+@@ -430,7 +450,11 @@ swig_varlink_type(void) {
+     Py_TPFLAGS_DEFAULT,
+     slots
+   };
+-  return (PyTypeObject *)PyType_FromSpec(&spec);
++  PyObject *pytype = PyType_FromSpec(&spec);
++  PyObject *runtime_data_module = SWIG_runtime_data_module();
++  if (pytype && PyModule_AddObject(runtime_data_module, "swigvarlink", pytype) == 0)
++    SWIG_Py_INCREF(pytype);
++  return (PyTypeObject *)pytype;
+ #endif
+ }
+ 
+@@ -910,7 +934,7 @@ swigobject_methods[] = {
+ 
+ SWIGRUNTIME PyTypeObject*
+ SwigPyObject_TypeOnce(void) {
+-  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
++  static char swigobject_doc[] = "Swig object holding a C/C++ pointer";
+ #ifndef SWIG_HEAPTYPES
+   static PyNumberMethods SwigPyObject_as_number = {
+     (binaryfunc)0, /*nb_add*/
+@@ -1043,10 +1067,13 @@ SwigPyObject_TypeOnce(void) {
+       0                                     /* tp_next */
+ #endif
+     };
++    PyObject *runtime_data_module = SWIG_runtime_data_module();
+     swigpyobject_type = tmp;
+     type_init = 1;
+     if (PyType_Ready(&swigpyobject_type) != 0)
+       return NULL;
++    if (PyModule_AddObject(runtime_data_module, "SwigPyObject", (PyObject *)&swigpyobject_type) == 0)
++      SWIG_Py_INCREF((PyObject *)&swigpyobject_type);
+   }
+   return &swigpyobject_type;
+ #else
+@@ -1067,7 +1094,11 @@ SwigPyObject_TypeOnce(void) {
+     Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
+     slots
+   };
+-  return (PyTypeObject *)PyType_FromSpec(&spec);
++  PyObject *pytype = PyType_FromSpec(&spec);
++  PyObject *runtime_data_module = SWIG_runtime_data_module();
++  if (pytype && PyModule_AddObject(runtime_data_module, "SwigPyObject", pytype) == 0)
++    SWIG_Py_INCREF(pytype);
++  return (PyTypeObject *)pytype;
+ #endif
+ }
+ 
+@@ -1150,7 +1181,7 @@ SwigPyPacked_Check(PyObject *op) {
+   PyObject *tp_name;
+ #endif
+   PyTypeObject* op_type = Py_TYPE(op);
+-  if (op_type == SwigPyPacked_TypeOnce())
++  if (op_type == SwigPyPacked_type())
+     return 1;
+ #ifdef Py_LIMITED_API
+   tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
+@@ -1176,7 +1207,7 @@ SwigPyPacked_dealloc(PyObject *v)
+ 
+ SWIGRUNTIME PyTypeObject*
+ SwigPyPacked_TypeOnce(void) {
+-  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
++  static char swigpacked_doc[] = "Swig object holding a C/C++ function pointer";
+ #ifndef SWIG_HEAPTYPES
+   static PyTypeObject swigpypacked_type;
+   static int type_init = 0;
+@@ -1265,10 +1296,13 @@ SwigPyPacked_TypeOnce(void) {
+       0                                     /* tp_next */
+ #endif
+     };
++    PyObject *runtime_data_module = SWIG_runtime_data_module();
+     swigpypacked_type = tmp;
+     type_init = 1;
+     if (PyType_Ready(&swigpypacked_type) != 0)
+       return NULL;
++    if (PyModule_AddObject(runtime_data_module, "SwigPyPacked", (PyObject *)&swigpypacked_type) == 0)
++      SWIG_Py_INCREF((PyObject *)&swigpypacked_type);
+   }
+   return &swigpypacked_type;
+ #else
+@@ -1287,7 +1321,11 @@ SwigPyPacked_TypeOnce(void) {
+     Py_TPFLAGS_DEFAULT,
+     slots
+   };
+-  return (PyTypeObject *)PyType_FromSpec(&spec);
++  PyObject *pytype = PyType_FromSpec(&spec);
++  PyObject *runtime_data_module = SWIG_runtime_data_module();
++  if (pytype && PyModule_AddObject(runtime_data_module, "SwigPyPacked", pytype) == 0)
++    SWIG_Py_INCREF(pytype);
++  return (PyTypeObject *)pytype;
+ #endif
+ }
+ 
+@@ -1815,6 +1853,12 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
+ }
+ 
+ 
++#if defined(SWIG_REFCNT_DEBUG)
++#define SWIG_PYOBJ_REFCNT(OBJ) fprintf(stdout, "" #OBJ " count %ld\n", (OBJ ? Py_REFCNT(OBJ) : 0))
++#else
++#define SWIG_PYOBJ_REFCNT(OBJ)
++#endif
++
+ static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */
+ 
+ SWIGRUNTIME void
+@@ -1825,7 +1869,7 @@ SWIG_Python_DestroyModule(PyObject *obj)
+   size_t i;
+   if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */
+     return;
+-  for (i =0; i < swig_module->size; ++i) {
++  for (i = 0; i < swig_module->size; ++i) {
+     swig_type_info *ty = types[i];
+     if (ty->owndata) {
+       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
+@@ -1833,27 +1877,32 @@ SWIG_Python_DestroyModule(PyObject *obj)
+       if (data) SwigPyClientData_Del(data);
+     }
+   }
+-  SWIG_Py_DECREF(SWIG_This());
++  SWIG_Py_XDECREF(Swig_This_global);
++  SWIG_PYOBJ_REFCNT(Swig_This_global);
+   Swig_This_global = NULL;
+-  SWIG_Py_DECREF(SWIG_globals());
++
++  SWIG_Py_XDECREF(Swig_Globals_global);
++  SWIG_PYOBJ_REFCNT(Swig_Globals_global);
+   Swig_Globals_global = NULL;
+-  SWIG_Py_DECREF(SWIG_Python_TypeCache());
++
++  SWIG_Py_XDECREF(Swig_TypeCache_global);
++  SWIG_PYOBJ_REFCNT(Swig_TypeCache_global);
+   Swig_TypeCache_global = NULL;
++
++  SWIG_PYOBJ_REFCNT(Swig_Capsule_global);
+   Swig_Capsule_global = NULL;
++
++  SWIG_Py_XDECREF(Swig_runtime_data_module_global);
++  SWIG_PYOBJ_REFCNT(Swig_runtime_data_module_global);
++  Swig_runtime_data_module_global = NULL;
+ }
+ 
+ SWIGRUNTIME void
+ SWIG_Python_SetModule(swig_module_info *swig_module) {
+-#if PY_VERSION_HEX >= 0x03000000
+- /* Add a dummy module object into sys.modules */
+-  PyObject *module = PyImport_AddModule(SWIG_RUNTIME_MODULE);
+-#else
+-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
+-  PyObject *module = Py_InitModule(SWIG_RUNTIME_MODULE, swig_empty_runtime_method_table);
+-#endif
++  PyObject *runtime_data_module = SWIG_runtime_data_module();
+   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
+-  if (pointer && module) {
+-    if (PyModule_AddObject(module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) {
++  if (pointer && runtime_data_module) {
++    if (PyModule_AddObject(runtime_data_module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) {
+       ++interpreter_counter;
+       Swig_Capsule_global = pointer;
+     } else {
+-- 
+2.50.1
+
+
+From 53453d51ec3ca111c5c97530d8ee4c6b5184c85e Mon Sep 17 00:00:00 2001
+From: William S Fulton 
+Date: Mon, 12 May 2025 07:25:35 +0100
+Subject: [PATCH 3/5] Rename Python swigvarlink type to SwigVarLink
+
+With this type having just moved into a module, let's also
+make a change to use correct Python naming conventions for the
+name of the type.
+---
+ CHANGES.current      |  8 ++++++
+ Lib/python/pyrun.swg | 64 ++++++++++++++++++++++----------------------
+ 2 files changed, 40 insertions(+), 32 deletions(-)
+
+#diff --git a/CHANGES.current b/CHANGES.current
+#index 0bce7937f..9a2c0f5e2 100644
+#--- a/CHANGES.current
+#+++ b/CHANGES.current
+#@@ -7,6 +7,14 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
+# Version 4.4.0 (in progress)
+# ===========================
+# 
+#+2025-05-11: wsfulton
+#+            [Python] Move the SwigPyObject, SwigPyPacked, SwigVarLink (renamed from
+#+            swigvarlink) support Python types to the SWIG runtime module (currently called
+#+            swig_runtime_data5).
+#+
+#+            Note that these affect the Python runtime implementation, so the recently bumped
+#+            SWIG_RUNTIME_VERSION to 5 for all scripting languages will now include this change.
+#+
+# 2025-05-10: jschueller, wsfulton
+#             [Python] #2881 #3061 #3160 DeprecationWarning fixes when using 'python -Walways'
+#             or if using one of the types being warned about:
+diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg
+index 2ef79f348..e7164725d 100644
+--- a/Lib/python/pyrun.swg
++++ b/Lib/python/pyrun.swg
+@@ -257,7 +257,7 @@ typedef struct swig_varlinkobject {
+ } swig_varlinkobject;
+ 
+ SWIGINTERN PyObject *
+-swig_varlink_repr(PyObject *SWIGUNUSEDPARM(v)) {
++SwigVarLink_repr(PyObject *SWIGUNUSEDPARM(v)) {
+ #if PY_VERSION_HEX >= 0x03000000
+   return PyUnicode_InternFromString("");
+ #else
+@@ -266,7 +266,7 @@ swig_varlink_repr(PyObject *SWIGUNUSEDPARM(v)) {
+ }
+ 
+ SWIGINTERN PyObject *
+-swig_varlink_str(PyObject *o) {
++SwigVarLink_str(PyObject *o) {
+   swig_varlinkobject *v = (swig_varlinkobject *) o;
+ #if PY_VERSION_HEX >= 0x03000000
+   PyObject *str = PyUnicode_InternFromString("(");
+@@ -305,7 +305,7 @@ swig_varlink_str(PyObject *o) {
+ }
+ 
+ SWIGINTERN void
+-swig_varlink_dealloc(PyObject *o) {
++SwigVarLink_dealloc(PyObject *o) {
+   swig_varlinkobject *v = (swig_varlinkobject *) o;
+   swig_globalvar *var = v->vars;
+   while (var) {
+@@ -317,7 +317,7 @@ swig_varlink_dealloc(PyObject *o) {
+ }
+ 
+ SWIGINTERN PyObject *
+-swig_varlink_getattr(PyObject *o, char *n) {
++SwigVarLink_getattr(PyObject *o, char *n) {
+   swig_varlinkobject *v = (swig_varlinkobject *) o;
+   PyObject *res = NULL;
+   swig_globalvar *var = v->vars;
+@@ -335,7 +335,7 @@ swig_varlink_getattr(PyObject *o, char *n) {
+ }
+ 
+ SWIGINTERN int
+-swig_varlink_setattr(PyObject *o, char *n, PyObject *p) {
++SwigVarLink_setattr(PyObject *o, char *n, PyObject *p) {
+   swig_varlinkobject *v = (swig_varlinkobject *) o;
+   int res = 1;
+   swig_globalvar *var = v->vars;
+@@ -358,7 +358,7 @@ swig_varlink_setattr(PyObject *o, char *n, PyObject *p) {
+ 
+ SWIGINTERN PyTypeObject*
+ swig_varlink_type(void) {
+-  static char varlink__doc__[] = "Swig variable link object";
++  static char SwigVarLink_doc[] = "Swig variable link object";
+ #ifndef SWIG_HEAPTYPES
+   static PyTypeObject varlink_type;
+   static int type_init = 0;
+@@ -370,30 +370,30 @@ swig_varlink_type(void) {
+       PyObject_HEAD_INIT(NULL)
+       0,                                  /* ob_size */
+ #endif
+-      SWIG_RUNTIME_MODULE ".swigvarlink", /* tp_name */
++      SWIG_RUNTIME_MODULE ".SwigVarLink", /* tp_name */
+       sizeof(swig_varlinkobject),         /* tp_basicsize */
+       0,                                  /* tp_itemsize */
+-      (destructor) swig_varlink_dealloc,  /* tp_dealloc */
++      (destructor) SwigVarLink_dealloc,   /* tp_dealloc */
+ #if PY_VERSION_HEX < 0x030800b4
+       (printfunc)0,                       /* tp_print */
+ #else
+       (Py_ssize_t)0,                      /* tp_vectorcall_offset */
+ #endif
+-      (getattrfunc) swig_varlink_getattr, /* tp_getattr */
+-      (setattrfunc) swig_varlink_setattr, /* tp_setattr */
++      (getattrfunc) SwigVarLink_getattr,  /* tp_getattr */
++      (setattrfunc) SwigVarLink_setattr,  /* tp_setattr */
+       0,                                  /* tp_compare */
+-      (reprfunc) swig_varlink_repr,       /* tp_repr */
++      (reprfunc) SwigVarLink_repr,        /* tp_repr */
+       0,                                  /* tp_as_number */
+       0,                                  /* tp_as_sequence */
+       0,                                  /* tp_as_mapping */
+       0,                                  /* tp_hash */
+       0,                                  /* tp_call */
+-      (reprfunc) swig_varlink_str,        /* tp_str */
++      (reprfunc) SwigVarLink_str,         /* tp_str */
+       0,                                  /* tp_getattro */
+       0,                                  /* tp_setattro */
+       0,                                  /* tp_as_buffer */
+       0,                                  /* tp_flags */
+-      varlink__doc__,                     /* tp_doc */
++      SwigVarLink_doc,                    /* tp_doc */
+       0,                                  /* tp_traverse */
+       0,                                  /* tp_clear */
+       0,                                  /* tp_richcompare */
+@@ -429,22 +429,22 @@ swig_varlink_type(void) {
+     type_init = 1;
+     if (PyType_Ready(&varlink_type) < 0)
+       return NULL;
+-    if (PyModule_AddObject(runtime_data_module, "swigvarlink", (PyObject *)&varlink_type) == 0)
++    if (PyModule_AddObject(runtime_data_module, "SwigVarLink", (PyObject *)&varlink_type) == 0)
+       SWIG_Py_INCREF((PyObject *)&varlink_type);
+   }
+   return &varlink_type;
+ #else
+   PyType_Slot slots[] = {
+-    { Py_tp_dealloc, (void *)swig_varlink_dealloc },
+-    { Py_tp_repr, (void *)swig_varlink_repr },
+-    { Py_tp_getattr, (void *)swig_varlink_getattr },
+-    { Py_tp_setattr, (void *)swig_varlink_setattr },
+-    { Py_tp_str, (void *)swig_varlink_str },
+-    { Py_tp_doc, (void *)varlink__doc__ },
++    { Py_tp_dealloc, (void *)SwigVarLink_dealloc },
++    { Py_tp_repr, (void *)SwigVarLink_repr },
++    { Py_tp_getattr, (void *)SwigVarLink_getattr },
++    { Py_tp_setattr, (void *)SwigVarLink_setattr },
++    { Py_tp_str, (void *)SwigVarLink_str },
++    { Py_tp_doc, (void *)SwigVarLink_doc },
+     { 0, NULL }
+   };
+   PyType_Spec spec = {
+-    SWIG_RUNTIME_MODULE ".swigvarlink",
++    SWIG_RUNTIME_MODULE ".SwigVarLink",
+     sizeof(swig_varlinkobject),
+     0,
+     Py_TPFLAGS_DEFAULT,
+@@ -452,7 +452,7 @@ swig_varlink_type(void) {
+   };
+   PyObject *pytype = PyType_FromSpec(&spec);
+   PyObject *runtime_data_module = SWIG_runtime_data_module();
+-  if (pytype && PyModule_AddObject(runtime_data_module, "swigvarlink", pytype) == 0)
++  if (pytype && PyModule_AddObject(runtime_data_module, "SwigVarLink", pytype) == 0)
+     SWIG_Py_INCREF(pytype);
+   return (PyTypeObject *)pytype;
+ #endif
+@@ -715,7 +715,7 @@ SwigPyObject_repr(SwigPyObject *v)
+ }
+ 
+ /* We need a version taking two PyObject* parameters so it's a valid
+- * PyCFunction to use in swigobject_methods[]. */
++ * PyCFunction to use in SwigPyObject_methods[]. */
+ SWIGRUNTIME PyObject *
+ SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
+ {
+@@ -922,7 +922,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
+ }
+ 
+ static PyMethodDef
+-swigobject_methods[] = {
++SwigPyObject_methods[] = {
+   {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
+   {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
+   {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
+@@ -934,7 +934,7 @@ swigobject_methods[] = {
+ 
+ SWIGRUNTIME PyTypeObject*
+ SwigPyObject_TypeOnce(void) {
+-  static char swigobject_doc[] = "Swig object holding a C/C++ pointer";
++  static char SwigPyObject_doc[] = "Swig object holding a C/C++ pointer";
+ #ifndef SWIG_HEAPTYPES
+   static PyNumberMethods SwigPyObject_as_number = {
+     (binaryfunc)0, /*nb_add*/
+@@ -1017,14 +1017,14 @@ SwigPyObject_TypeOnce(void) {
+       0,                                    /* tp_setattro */
+       0,                                    /* tp_as_buffer */
+       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+-      swigobject_doc,                       /* tp_doc */
++      SwigPyObject_doc,                     /* tp_doc */
+       0,                                    /* tp_traverse */
+       0,                                    /* tp_clear */
+       (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
+       0,                                    /* tp_weaklistoffset */
+       0,                                    /* tp_iter */
+       0,                                    /* tp_iternext */
+-      swigobject_methods,                   /* tp_methods */
++      SwigPyObject_methods,                 /* tp_methods */
+       0,                                    /* tp_members */
+       0,                                    /* tp_getset */
+       0,                                    /* tp_base */
+@@ -1081,9 +1081,9 @@ SwigPyObject_TypeOnce(void) {
+     { Py_tp_dealloc, (void *)SwigPyObject_dealloc },
+     { Py_tp_repr, (void *)SwigPyObject_repr },
+     { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
+-    { Py_tp_doc, (void *)swigobject_doc },
++    { Py_tp_doc, (void *)SwigPyObject_doc },
+     { Py_tp_richcompare, (void *)SwigPyObject_richcompare },
+-    { Py_tp_methods, (void *)swigobject_methods },
++    { Py_tp_methods, (void *)SwigPyObject_methods },
+     { Py_nb_int, (void *)SwigPyObject_long },
+     { 0, NULL }
+   };
+@@ -1207,7 +1207,7 @@ SwigPyPacked_dealloc(PyObject *v)
+ 
+ SWIGRUNTIME PyTypeObject*
+ SwigPyPacked_TypeOnce(void) {
+-  static char swigpacked_doc[] = "Swig object holding a C/C++ function pointer";
++  static char SwigPyPacked_doc[] = "Swig object holding a C/C++ function pointer";
+ #ifndef SWIG_HEAPTYPES
+   static PyTypeObject swigpypacked_type;
+   static int type_init = 0;
+@@ -1246,7 +1246,7 @@ SwigPyPacked_TypeOnce(void) {
+       0,                                    /* tp_setattro */
+       0,                                    /* tp_as_buffer */
+       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
+-      swigpacked_doc,                       /* tp_doc */
++      SwigPyPacked_doc,                     /* tp_doc */
+       0,                                    /* tp_traverse */
+       0,                                    /* tp_clear */
+       0,                                    /* tp_richcompare */
+@@ -1311,7 +1311,7 @@ SwigPyPacked_TypeOnce(void) {
+     { Py_tp_repr, (void *)SwigPyPacked_repr },
+     { Py_tp_str, (void *)SwigPyPacked_str },
+     { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
+-    { Py_tp_doc, (void *)swigpacked_doc },
++    { Py_tp_doc, (void *)SwigPyPacked_doc },
+     { 0, NULL }
+   };
+   PyType_Spec spec = {
+-- 
+2.50.1
+
+
+From 831fc6069115b8a31bed5d0bcae221825cd43c18 Mon Sep 17 00:00:00 2001
+From: William S Fulton 
+Date: Tue, 13 May 2025 08:40:45 +0100
+Subject: [PATCH 4/5] Add docs on the python runtime module
+
+---
+ Doc/Manual/Python.html | 50 ++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
+
+diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
+index 7427ca4cf..cc82e9762 100644
+--- a/Doc/Manual/Python.html
++++ b/Doc/Manual/Python.html
+@@ -1000,6 +1000,10 @@ module name, make sure you don't use the same name as a built-in
+ Python command or standard module name.
+ 

+ ++

++There is also a further 'behind the scenes' Python runtime module, but this implementation detail is covered later. ++

++ +

33.3.2 Functions

+ + +@@ -2704,6 +2708,52 @@ in the file python/pyopers.swg in the SWIG library. +

+ + ++

33.4.3 Python runtime module

++ ++

++In addition to the two Python modules that are generated by SWIG, there is also a third 'behind the scenes' Python runtime module. ++The runtime module is very much an implementation level detail, but is mentioned here for completeness and for the inquisitive! ++

++ ++

++SWIG implements a run-time type checker for checking a Python type/class as it passes between the Python and C/C++ layers. ++It is also used when multiple SWIG modules need to share type information with each other (when using the %import directive). ++More details can be found in the SWIG runtime code and run-time type checker sections. ++The runtime module contains the following: ++

++ ++
    ++
  1. A Python Capsule containing a pointer to the underlying C module data structure used by the runtime type checker. For multiple modules to access the common runtime implementation. The Capsule is named type_pointer_capsule except when using -builtin when it is instead called type_pointer_capsule_builtin.
  2. ++
  3. The builtin type SwigPyObject - Swig object holding a C/C++ pointer. For 'normal' pointers, that is, not for function pointers nor member function pointers.
  4. ++
  5. The builtin type SwigPyPacked - Swig object holding a C/C++ function pointer. For C pointers to a function or C++ member function pointers.
  6. ++
  7. The builtin type SwigVarLink - Swig variable link object. The type used by the 'cvar' field for accessing C/C++ global variables.
  8. ++
++ ++

++If multiple SWIG modules are being used, the C/C++ wrapped proxy classes/types can be shared or used across the different modules via the SWIG runtime. ++The runtime is accessed and shared via the Capsule in the runtime module. ++The Python runtime module is implemented as a Python builtin module. While users are unlikely to use or import the runtime module directly, it can be inspected simply enough. ++The name of the module is swig_runtime_data appended with the runtime version as defined by SWIG_RUNTIME_VERSION. ++First import your SWIG generated module. Next find the exact runtime module name so you know what to import before inspecting it with say dir. ++The interpreter session below demonstrates this with a SWIG generated module called example: ++

++ ++
++
++>>> import example
++>>> import sys
++>>> list(m for m in sys.modules if m.startswith("swig_runtime_data"))
++['swig_runtime_data5']
++>>> import swig_runtime_data5
++>>> dir(swig_runtime_data5)
++['SwigPyObject', 'SwigPyPacked', 'SwigVarLink', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'type_pointer_capsule']
++
++
++ ++

++Compatibility Note: Only the Capsule was stored in the Python runtime module prior to SWIG-4.4.0. ++

++ +

33.4.3 Memory management

+ + +-- +2.50.1 + + +From d966fd3ba18370b5bf34b67ff376d88fb6d3e65b Mon Sep 17 00:00:00 2001 +From: William S Fulton +Date: Tue, 13 May 2025 21:42:56 +0100 +Subject: [PATCH 5/5] Test swig runtime module contains expected names + +--- + .../python/python_moduleimport_runme.py | 17 +++++++++++++++++ + Examples/test-suite/python_moduleimport.i | 2 ++ + 2 files changed, 19 insertions(+) + +diff --git a/Examples/test-suite/python/python_moduleimport_runme.py b/Examples/test-suite/python/python_moduleimport_runme.py +index cdb860730..8e0aa6121 100644 +--- a/Examples/test-suite/python/python_moduleimport_runme.py ++++ b/Examples/test-suite/python/python_moduleimport_runme.py +@@ -1,7 +1,24 @@ + import python_moduleimport + ++# Test custom moduleimport in %module + if python_moduleimport.simple_function(99) != 99: + raise RuntimeError("simple_function") + + if python_moduleimport.extra_import_variable != "custom import of _python_moduleimport": + raise RuntimeError("custom import") ++ ++ ++# Test the swig runtime module contains the expected names/types ++import importlib ++swig_runtime_version = python_moduleimport.runtime_version() ++swig_runtime_data = importlib.import_module("swig_runtime_data" + swig_runtime_version) # Equivalent to (for version 5): import swig_runtime_data5 as swig_runtime_data ++ ++names = dir(swig_runtime_data) ++expected_names = ("SwigPyObject", "SwigPyPacked", "SwigVarLink") ++for name in expected_names: ++ if name not in names: ++ raise RuntimeError("{} not in {}".format(name, names)) ++ ++cvar_type = type(python_moduleimport.cvar) ++if cvar_type.__name__ != "SwigVarLink": ++ raise RuntimeError("cvar type name is incorrect: {}".format(cvar_type.__name__)) +diff --git a/Examples/test-suite/python_moduleimport.i b/Examples/test-suite/python_moduleimport.i +index f62547dcd..f0d203433 100644 +--- a/Examples/test-suite/python_moduleimport.i ++++ b/Examples/test-suite/python_moduleimport.i +@@ -23,4 +23,6 @@ from $module import * + + %inline %{ + int simple_function(int i) { return i; } ++int globalvar = 99; ++const char * runtime_version() { return SWIG_RUNTIME_VERSION; } + %} +-- +2.50.1 + + diff --git a/SPECS/swig/ccache-swig.csh b/SPECS/swig/ccache-swig.csh new file mode 100644 index 00000000..ac33df8a --- /dev/null +++ b/SPECS/swig/ccache-swig.csh @@ -0,0 +1,4 @@ +# Use ccache-swig by default. Users who don't want that can setenv the +# CCACHE_DISABLE environment variable in their personal profile. + +alias swig 'ccache-swig swig' diff --git a/SPECS/swig/ccache-swig.sh b/SPECS/swig/ccache-swig.sh new file mode 100644 index 00000000..f8867e93 --- /dev/null +++ b/SPECS/swig/ccache-swig.sh @@ -0,0 +1,4 @@ +# Use ccache-swig by default. Users who don't want that can set the +# CCACHE_DISABLE environment variable in their personal profile. + +alias swig='ccache-swig swig' diff --git a/SPECS/swig/swig.spec b/SPECS/swig/swig.spec new file mode 100644 index 00000000..98e58f0e --- /dev/null +++ b/SPECS/swig/swig.spec @@ -0,0 +1,133 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Mahno +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: swig +Version: 4.3.1 +Release: %autorelease +Summary: Connects C/C++/Objective C to some high-level programming languages +License: GPL-3.0-or-later AND BSD-3-Clause +#!RemoteAsset +Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz +Source1: ccache-swig.sh +Source2: ccache-swig.csh +# patch for adding support for python 3.14 +# should be removed once updated to 4.4.0 +# the original patch from github, however, cannot be directly applied to +# stable version v4.3.1 +Patch0: 0001-swig-python-Python-3.14-support.patch +# Python DeprecationWarning fixes - in upstream after 4.4.0 +Patch1: 0002-swig-4.4.0-Python-DeprecationWarning-fixes.patch +BuildSystem: autotools +# disable OCaml,php,tcl,java,octave +BuildOption(conf): --without-ocaml +BuildOption(conf): --with-python3=python3 +BuildOption(conf): --without-php +BuildOption(conf): --with-perl5 +BuildOption(conf): --without-tcl +BuildOption(conf): --without-java +BuildOption(conf): --without-guile + +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl pcre2-devel +BuildRequires: python3-devel +BuildRequires: autoconf automake gawk dos2unix +BuildRequires: gcc-c++ +BuildRequires: help2man +BuildRequires: sed +BuildRequires: perl-devel +BuildRequires: perl(base) +BuildRequires: perl(Config) +BuildRequires: perl(Devel::Peek) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(fields) +BuildRequires: perl(Math::BigInt) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) +BuildRequires: boost-devel +# Need when Source/CParse/parser.y is patched +BuildRequires: bison +BuildRequires: guile-devel +BuildRequires: lua-devel + +%description +Simplified Wrapper and Interface Generator (SWIG) is a software +development tool for connecting C, C++ and Objective C programs with a +variety of high-level programming languages. SWIG is used with different +types of target languages including common scripting languages such as +Javascript, Perl, PHP, Python, Tcl and Ruby. The list of supported +languages also includes non-scripting languages such as C#, D, Go language, +Java including Android, Lua, OCaml, Octave, Scilab and R. Also several +interpreted and compiled Scheme implementations (Guile, MzScheme/Racket) +are supported. SWIG is most commonly used to create high-level interpreted +or compiled programming environments, user interfaces, and as a tool for +testing and prototyping C/C++ software. + +%package -n ccache-swig +Summary: Fast compiler cache +License: GPL-2.0-or-later +Requires: swig + +%description -n ccache-swig +ccache-swig is a compiler cache. It speeds up re-compilation of C/C++/SWIG +code by caching previous compiles and detecting when the same compile is +being done again. ccache-swig is ccache plus support for SWIG. + +%prep -a +for all in CHANGES README; do + iconv -f ISO88591 -t UTF8 < $all > $all.new + touch -r $all $all.new + mv -f $all.new $all +done + +%conf -p +./autogen.sh + +%install -p +make clean-examples + +pushd Examples/ +# We don't want to ship files below. +find -type f -name '*.dsp' -delete -print +find -type f -name '*.dsw' -delete -print + +# Convert files to UNIX format +for all in `find . -type f -not -path "./test-suite/*"`; do + dos2unix -k $all + chmod -x $all +done +rm -rf test-suite +popd + +# we don't manually generate man doc like what fedora did +# it's too complex + +# Enable ccache-swig by default +mkdir -p %{buildroot}%{_sysconfdir}/profile.d/ +install -dm 755 %{buildroot}%{_sysconfdir}/profile.d +install -pm 644 %{SOURCE1} %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d + +# Add swig.gdb +mkdir -p %{buildroot}%{_datadir}/%{name}/gdb +install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb + +%files +%{_bindir}/swig +%{_datadir}/swig +%license LICENSE LICENSE-GPL LICENSE-UNIVERSITIES +%doc ANNOUNCE CHANGES CHANGES.current +%doc COPYRIGHT README TODO + +%files -n ccache-swig +%{_bindir}/ccache-swig +%config %{_sysconfdir}/profile.d/ccache-swig.*sh + +%changelog +%{?autochangelog} diff --git a/SPECS/symlinks/0001-fix-makefile.patch b/SPECS/symlinks/0001-fix-makefile.patch new file mode 100644 index 00000000..ff3b3dc7 --- /dev/null +++ b/SPECS/symlinks/0001-fix-makefile.patch @@ -0,0 +1,41 @@ +diff --git a/Makefile b/Makefile +index f305449..f98be38 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,14 +2,32 @@ + + CC = gcc + ++CFLAGS ?= -O2 -Wall -Wstrict-prototypes ++LDFLAGS ?= ++ ++# Standard GNU installation paths, can be overridden. ++DESTDIR ?= ++PREFIX ?= /usr/local ++BINDIR ?= $(PREFIX)/bin ++MANDIR ?= $(PREFIX)/man ++ ++# The install command ++INSTALL ?= install ++INSTALL_PROGRAM ?= $(INSTALL) ++INSTALL_DATA ?= $(INSTALL) -m 644 ++ + all: symlinks + + symlinks: symlinks.c +- $(CC) -Wall -Wstrict-prototypes -O2 ${CFLAGS} -o symlinks symlinks.c +- ++ $(CC) $(CFLAGS) -o symlinks symlinks.c $(LDFLAGS) ++ + install: all symlinks.8 +- install -m 755 -o root -g root symlinks /usr/local/bin +- install -m 644 -o root -g root symlinks.8 /usr/local/man/man8 ++ $(INSTALL) -d -m 755 "$(DESTDIR)$(BINDIR)" ++ $(INSTALL) -d -m 755 "$(DESTDIR)$(MANDIR)/man8" ++ $(INSTALL_PROGRAM) -m 755 symlinks "$(DESTDIR)$(BINDIR)/" ++ $(INSTALL_DATA) symlinks.8 "$(DESTDIR)$(MANDIR)/man8/" + + clean: + rm -f symlinks *.o core ++ ++.PHONY: all install clean diff --git a/SPECS/symlinks/symlinks.spec b/SPECS/symlinks/symlinks.spec new file mode 100644 index 00000000..adcb2996 --- /dev/null +++ b/SPECS/symlinks/symlinks.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: symlinks +Version: 1.4 +Release: %autorelease +Summary: Scan or change symbolic links +License: Copyright-Only +URL: http://ibiblio.org/pub/Linux/utils/file/ +#!RemoteAsset +Source0: http://ibiblio.org/pub/Linux/utils/file/%{name}-%{version}.tar.gz +BuildSystem: autotools +Patch0: 0001-fix-makefile.patch + +BuildOption(build): CFLAGS="%{optflags} %{build_ldflags}" +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): BINDIR=%{_bindir} +BuildOption(install): MANDIR=%{_mandir} + +BuildRequires: gcc + +%description +Scans directories for symbolic links, and identifies dangling, +relative, absolute, messy, and other_fs links. Can optionally +change absolute links to relative within a given filesystem. + +# No configure +%conf + +%files +%{_bindir}/symlinks +%{_mandir}/man8/symlinks.8* + +%changelog +%{?autochangelog} diff --git a/SPECS/sysfsutils/sysfsutils.spec b/SPECS/sysfsutils/sysfsutils.spec new file mode 100644 index 00000000..636c0243 --- /dev/null +++ b/SPECS/sysfsutils/sysfsutils.spec @@ -0,0 +1,74 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sysfsutils +Version: 2.1.1 +Release: %autorelease +Summary: Utilities for interfacing with sysfs +License: GPL-2.0-only +URL: https://github.com/linux-ras/sysfsutils +#!RemoteAsset +Source: %{url}/archive/v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: make +BuildRequires: gcc + +Requires: libsysfs = %{version}-%{release} + +%description +This package's purpose is to provide a set of utilities for interfacing +with sysfs. + +%package -n libsysfs +Summary: Shared library for interfacing with sysfs +License: LGPL-2.1-or-later + +%description -n libsysfs +Library used in handling linux kernel sysfs mounts and their various files. + +%package -n libsysfs-devel +Summary: Static library and headers for libsysfs +License: LGPL-2.1-or-later +Requires: libsysfs = %{version}-%{release} + +%description -n libsysfs-devel +libsysfs-devel provides the header files and static libraries required +to build programs using the libsysfs API. + +%conf -p +autoreconf -fiv + +%install -a +find %{buildroot} -type f -name "*.la" -delete + +%ldconfig_scriptlets -n libsysfs + +%files +%license COPYING cmd/GPL +%doc AUTHORS README CREDITS docs/libsysfs.txt +%{_bindir}/systool +%{_mandir}/man1/systool.1.gz + +%files -n libsysfs +%license COPYING lib/LGPL +%{_libdir}/libsysfs.so.* + +%files -n libsysfs-devel +%dir %{_includedir}/sysfs +%{_includedir}/sysfs/libsysfs.h +%{_includedir}/sysfs/dlist.h +%{_libdir}/libsysfs.so +%{_libdir}/pkgconfig/libsysfs.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/system-user-root/system-user-root.conf b/SPECS/system-user-root/system-user-root.conf new file mode 100644 index 00000000..c5a9c052 --- /dev/null +++ b/SPECS/system-user-root/system-user-root.conf @@ -0,0 +1,14 @@ +# Type Name ID GECOS HOME SHELL + +# The superuser +g root 0 - +u root 0 root /root /bin/bash + +# Group owner of /etc/shadow +g shadow 15 - + +# Group trusted to avoid cycles with permissions package +g trusted 42 - + +# Default group for normal users +g users 100 - diff --git a/SPECS/system-user-root/system-user-root.spec b/SPECS/system-user-root/system-user-root.spec new file mode 100644 index 00000000..2ae4f348 --- /dev/null +++ b/SPECS/system-user-root/system-user-root.spec @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: system-user-root +Version: 20190513 +Release: %autorelease +Summary: System user and group root +License: MIT +Group: System/Fhs +Source1: system-user-root.conf +Provides: group(root) +Provides: group(shadow) +Provides: group(trusted) +Provides: group(users) +Provides: user(root) +#!BuildIgnore: group(root) +#!BuildIgnore: group(trusted) +#!BuildIgnore: user(root) + +%description +This package provides the root account including the groups root, +shadow and users. + +%prep +%setup -q -c -T + +%build + +%install +mkdir -p %{buildroot}%{_libdir}/sysusers.d +install -m 644 %{SOURCE1} %{buildroot}%{_libdir}/sysusers.d/system-user-root.conf + +%pre -p +if not posix.access("/etc", "f") then + posix.mkdir("/etc") +end +if not posix.access("/etc/passwd", "f") then + file = io.open("/etc/passwd", "a+") + file:write("root:x:0:0:root:/root:/bin/bash\n") + file:close() + posix.chmod("/etc/passwd", 0644) +end +if not posix.access("/etc/group", "f") then + file = io.open("/etc/group", "a+") + file:write("root:x:0:\nshadow:x:15:\ntrusted:x:42:\nusers:x:100:\n") + file:close() + posix.chmod("/etc/group", 0644) +end +if not posix.access("/etc/shadow", "f") then + file = io.open("/etc/shadow", "a+") + local date = os.time() + date = math.floor(date / 86400) + file:write("root:*:", date, "::::::\n") + file:close() + posix.chown("/etc/shadow", 0, 15) + posix.chmod("/etc/shadow", 0640) +end + +%files +%defattr(-,root,root) +%{_libdir}/sysusers.d/system-user-root.conf + +%changelog +%{?autochangelog} diff --git a/SPECS/systemd/systemd-user b/SPECS/systemd/systemd-user new file mode 100644 index 00000000..d7f8a54b --- /dev/null +++ b/SPECS/systemd/systemd-user @@ -0,0 +1,11 @@ +# Used by systemd --user instances. + +-account sufficient pam_systemd_home.so +account sufficient pam_unix.so no_pass_expiry +account include system-auth + +session required pam_selinux.so close +session required pam_selinux.so nottys open +session required pam_loginuid.so +session optional pam_keyinit.so force revoke +session include system-auth diff --git a/SPECS/systemd/systemd.spec b/SPECS/systemd/systemd.spec new file mode 100644 index 00000000..d4425194 --- /dev/null +++ b/SPECS/systemd/systemd.spec @@ -0,0 +1,1290 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# We ship a .pc file but don't want to have a dep on pkg-config. We +# strip the automatically generated dep here and instead co-own the +# directory. +%global __requires_exclude pkg-config + +%global pkgdir %{_prefix}/lib/systemd +%global system_unit_dir %{pkgdir}/system +%global user_unit_dir %{pkgdir}/user + +# If we want to enable bootstrap, change this to 1 +# When bootstrap, libcryptsetup is disabled +# but auto-features causes many options to be turned on +# that depend on libcryptsetup (e.g. libcryptsetup-plugins, homed) +%bcond bootstrap 1 +%if %{with bootstrap} +%global __meson_auto_features disabled +%endif +# TODO: We disable lots of stuff so if we want to enable them +#. Please first check the spec file. Thanks. - 251 +# If we want systemd-journal-remote, change this to 1 +%bcond journal_remote 0 +# If we have X then we can build systemd with X support +%bcond x 0 +# If we want network support, change this to 1 +%bcond network 1 +# If we want FIDO2 key support, change this to 1 +%bcond fido2 0 +# I don't think we ever want to enable TPM2 support +%bcond tpm2 0 +# Sorry, no docs yet +%bcond docs 0 +# If we want to Unified Kernel Image then change this +%bcond ukify 0 +# We don't want to run valgrind tests in CI +# Or we just don't want tests at all +%bcond valgrind 0 +# We don't want eBPF support yet +%bcond bpf 0 + +%global base_version 257 + +Name: systemd +Version: %{base_version}.9 +Release: %autorelease +Summary: System and service manager +License: LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later +URL: https://systemd.io +#!RemoteAsset +Source0: https://github.com/systemd/systemd/archive/v%{version}/%{name}-%{version}.tar.gz +# These are essential files +Source1: systemd-user +BuildSystem: meson + +BuildOption(conf): -Dmode=release +BuildOption(conf): -Dsbat-distro-url='%{_vendor_url}' +BuildOption(conf): -Drc-local=/etc/rc.d/rc.local +BuildOption(conf): -Ddns-servers='' +BuildOption(conf): -Dkmod=enabled +BuildOption(conf): -Dxkbcommon=%{?with_x:enabled}%{!?with_x:disabled} +BuildOption(conf): -Dselinux=disabled +BuildOption(conf): -Dbpf-framework=%{?with_bpf:enabled}%{!?with_bpf:disabled} +BuildOption(conf): -Dvmlinux-h=disabled +#BuildOption(conf): -Dvmlinux-h-path="$VMLINUX_H_PATH" +BuildOption(conf): -Dapparmor=disabled +BuildOption(conf): -Dxz=enabled +BuildOption(conf): -Dzlib=enabled +BuildOption(conf): -Dbzip2=enabled +BuildOption(conf): -Dlz4=enabled +BuildOption(conf): -Dzstd=enabled +BuildOption(conf): -Dpam=enabled +BuildOption(conf): -Dacl=enabled +BuildOption(conf): -Dsmack=false +BuildOption(conf): -Dblkid=enabled +BuildOption(conf): -Dopenssl=enabled +BuildOption(conf): -Dp11kit=%{?with_bootstrap:disabled}%{!?with_bootstrap:enabled} +BuildOption(conf): -Dgcrypt=disabled +BuildOption(conf): -Delfutils=enabled +BuildOption(conf): -Dlibcryptsetup=%{?with_bootstrap:disabled}%{!?with_bootstrap:enabled} +BuildOption(conf): -Drepart=enabled +BuildOption(conf): -Dpwquality=enabled +BuildOption(conf): -Dqrencode=disabled +BuildOption(conf): -Dgnutls=enabled +BuildOption(conf): -Dmicrohttpd=%{?with_journal_remote:enabled}%{!?with_journal_remote:disabled} +BuildOption(conf): -Dvmspawn=%{?with_bootstrap:disabled}%{!?with_bootstrap:enabled} +BuildOption(conf): -Dlibidn2=enabled +BuildOption(conf): -Dlibiptc=%{?with_network:enabled}%{!?with_network:disabled} +BuildOption(conf): -Dnetworkd=%{?with_network:true}%{!?with_network:false} +BuildOption(conf): -Dresolve=%{?with_network:true}%{!?with_network:false} +BuildOption(conf): -Dnss-resolve=%{?with_network:enabled}%{!?with_network:disabled} +BuildOption(conf): -Dlibcurl=enabled +BuildOption(conf): -Dlibfido2=%{?with_fido2:enabled}%{!?with_fido2:disabled} +BuildOption(conf): -Defi=true +BuildOption(conf): -Dbootloader=enabled +BuildOption(conf): -Dtpm2=%{?with_tpm2:enabled}%{!?with_tpm2:disabled} +BuildOption(conf): -Dhwdb=true +BuildOption(conf): -Dsysusers=true +# Enable only if we really want it +BuildOption(conf): -Dstandalone-binaries=false +BuildOption(conf): -Ddefault-kill-user-processes=false +BuildOption(conf): -Dfirst-boot-full-preset=true +# No Tests +BuildOption(conf): -Dtests=false +BuildOption(conf): -Dinstall-tests=false +BuildOption(conf): -Dnobody-user=nobody +BuildOption(conf): -Dnobody-group=nobody +BuildOption(conf): -Dman=%{?with_docs:enabled}%{!?with_docs:disabled} +BuildOption(conf): -Dfallback-hostname="localhost" +BuildOption(conf): -Ddefault-dnssec=no +BuildOption(conf): -Ddefault-dns-over-tls=no +BuildOption(conf): -Ddefault-mdns=no +BuildOption(conf): -Ddefault-timeout-sec=45 +BuildOption(conf): -Ddefault-user-timeout-sec=45 +BuildOption(conf): -Dconfigfiledir=/usr/lib +BuildOption(conf): -Doomd=true +BuildOption(conf): -Dtty-gid=5 +# If we have this then we can have BuildRequires: gettext. +BuildOption(conf): -Dtranslations=false +BuildOption(conf): -Dfdisk=enabled +BuildOption(conf): -Dsysupdate=enabled + +#BuildRequires: clang +BuildRequires: coreutils +BuildRequires: libcap-devel +BuildRequires: util-linux-devel +BuildRequires: libpwquality-devel +BuildRequires: libxcrypt-devel +BuildRequires: pam-devel +BuildRequires: libselinux-devel +BuildRequires: audit-devel +%if %{without bootstrap} +BuildRequires: cryptsetup-devel +%endif +BuildRequires: dbus-devel +BuildRequires: acl-devel +BuildRequires: libblkid +BuildRequires: xz +BuildRequires: xz-devel +BuildRequires: lz4-devel +BuildRequires: lz4 +BuildRequires: bzip2-devel +BuildRequires: zstd-devel +BuildRequires: libidn2-devel +BuildRequires: libcurl-devel +BuildRequires: kmod-devel +BuildRequires: openssl-devel +BuildRequires: gnutls-devel +BuildRequires: p11-kit-devel +BuildRequires: libdw-devel +%if %{with journal_remote} +BuildRequires: libmicrohttpd-devel +%endif +%if %{with x} +# Used by systemd-localed & systemd-firstboot +BuildRequires: libxkbcommon-devel +%endif +%if %{with network} +BuildRequires: iptables-legacy-devel +%endif +BuildRequires: pkgconfig(bash-completion) +BuildRequires: pkgconfig(libarchive) +%if %{with fido2} +BuildRequires: libfido2-devel +%endif +%if %{with tpm2} +BuildRequires: pkgconfig(tss2-esys) +BuildRequires: pkgconfig(tss2-rc) +BuildRequires: pkgconfig(tss2-mu) +%endif +BuildRequires: python3 +BuildRequires: python3dist(jinja2) +BuildRequires: python3dist(lxml) +%if %{with docs} +BuildRequires: libxslt +BuildRequires: docbook-style-xsl +%endif +BuildRequires: pkgconfig +BuildRequires: gperf +BuildRequires: gawk +%if %{with ukify} +BuildRequires: python3dist(pefile) +BuildRequires: python3dist(pillow) +%endif +BuildRequires: python3dist(pyelftools) +BuildRequires: libseccomp-devel +BuildRequires: meson +%if %{with valgrind} +BuildRequires: valgrind-devel +%endif +%if %{with bpf} +BuildRequires: bpftool +BuildRequires: pkgconfig(libbpf) +%endif + +BuildRequires: distribution-release + +Requires: dbus +Requires(post): coreutils +Requires(post): grep +# systemd-machine-id-setup requires libssl +Requires(post): openssl +Requires: %{name}-pam = %{version}-%{release} +Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build) +Requires: %{name}-libs = %{version}-%{release} + +Provides: systemd = %{version}-%{release} +Provides: %{_bindir}/systemctl +Provides: %{_bindir}/shutdown +Provides: syslog +Provides: systemd-units = %{version}-%{release} + +%description +systemd is a system and service manager that runs as PID 1 and starts the rest +of the system. It provides aggressive parallelization capabilities, uses socket +and D-Bus activation for starting services, offers on-demand starting of +daemons, keeps track of processes using Linux control groups, maintains mount +and automount points, and implements an elaborate transactional dependency-based +service control logic. systemd supports SysV and LSB init scripts and works as a +replacement for sysvinit. Other parts of this package are a logging daemon, +utilities to control basic system configuration like the hostname, date, locale, +maintain a list of logged-in users, system accounts, runtime directories and +settings, and a logging daemons. + +%package libs +Summary: systemd libraries +License: LGPL-2.1-or-later AND MIT +Provides: nss-myhostname = 0.4 + +%description libs +Libraries for systemd and udev. + +%package shared +Summary: Internal systemd shared library +License: LGPL-2.1-or-later AND MIT + +%description shared +Internal libraries used by various systemd binaries. + +%package pam +Summary: systemd PAM module + +%description pam +Systemd PAM module registers the session with systemd-logind. + +%package rpm-macros +Summary: Macros that define paths and scriptlets related to systemd +BuildArch: noarch + +%description rpm-macros +Just the definitions of rpm macros. + +%package sysusers +Summary: systemd-sysusers program +Requires: %{name}-shared = %{version}-%{release} + +%description sysusers +This package contains the systemd-sysusers program. + +%package devel +Summary: Development headers for systemd +License: LGPL-2.1-or-later AND MIT +Requires: %{name}-libs = %{version}-%{release} +Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build) +Provides: libudev-devel = %{version} + +%description devel +Development headers and auxiliary files for developing applications linking +to libudev or libsystemd. + +%package udev +Summary: Rule-based device node and kernel event manager +License: LGPL-2.1-or-later +Requires: systemd = %{version}-%{release} +Requires(post): systemd = %{version}-%{release} +Requires(preun): systemd = %{version}-%{release} +Requires(postun): systemd = %{version}-%{release} +Requires(post): grep +Requires: kmod-devel +Provides: udev = %{version} +Provides: systemd-timesyncd = %{version}-%{release} +Requires: kbd + +%description udev +This package contains systemd-udev and the rules and hardware database needed to +manage device nodes. This package is necessary on physical machines and in +virtual machines, but not in containers. + +This package also provides systemd-timesyncd, a network time protocol daemon. + +It also contains tools to manage encrypted home areas and secrets bound to the +machine, and to create or grow partitions and make file systems automatically. + +%if %{with ukify} +%package ukify +Summary: Tool to build Unified Kernel Images +BuildRequires: binutils +Requires: %{name} = %{version}-%{release} +Requires: systemd-boot +Requires: python3dist(pefile) +Requires: python3dist(zstandard) +Requires: python3dist(cryptography) +Recommends: python3dist(pillow) +BuildArch: noarch + +%description ukify +This package provides ukify, a script that combines a kernel image, an initrd, +with a command line, and possibly PCR measurements and other metadata, into a +Unified Kernel Image (UKI). +%endif + +%package boot +Summary: UEFI boot manager +Provides: systemd-boot = %{version}-%{release} + +%description boot +systemd-boot (short: sd-boot) is a simple UEFI boot manager. It provides a +graphical menu to select the entry to boot and an editor for the kernel command +line. systemd-boot supports systems with UEFI firmware only + +%package container +Summary: Tools for containers and VMs +Requires: %{name} = %{version}-%{release} +Requires(post): systemd = %{version}-%{release} +Requires(preun): systemd = %{version}-%{release} +Requires(postun): systemd = %{version}-%{release} +License: LGPL-2.1-or-later + +%description container +Systemd tools to spawn and manage containers and virtual machines. + +This package contains systemd-nspawn, systemd-vmspawn, machinectl, +systemd-machined, and systemd-importd. + +%if %{with journal_remote} +%package journal-remote +Summary: Tools to send journal events over the network +Requires: %{name} = %{version}-%{release} +License: LGPL-2.1-or-later +Provides: %{name}-journal-gateway = %{version}-%{release} +Provides: %{name}-journal-gateway = %{version}-%{release} + +%description journal-remote +Programs to forward journal entries over the network, using encrypted HTTP, and +to write journal files from serialized journal contents. + +This package contains systemd-journal-gatewayd, systemd-journal-remote, and +systemd-journal-upload. +%endif + +%if %{with network} +%package networkd +Summary: System daemon that manages network configurations +Requires: %{name} = %{version}-%{release} +Recommends: %{name}-udev = %{version}-%{release} +License: LGPL-2.1-or-later + +%description networkd +systemd-networkd is a system service that manages networks. It detects and +configures network devices as they appear, as well as creating virtual network +devices. + +%package networkd-defaults +Summary: Configure network interfaces with networkd by default +Requires: %{name}-networkd = %{version}-%{release} +License: MIT-0 +BuildArch: noarch + +%description networkd-defaults +This package contains a set of config files for systemd-networkd that cause it +to configure network interfaces by default. Note that systemd-networkd needs to +enabled for this to have any effect. + +%package resolved +Summary: Network Name Resolution manager +Requires: %{name} = %{version}-%{release} +Requires: libidn2-devel +Requires(posttrans): grep + +%description resolved +systemd-resolved is a system service that provides network name resolution to +local applications. It implements a caching and validating DNS/DNSSEC stub +resolver, as well as an LLMNR and MulticastDNS resolver and responder. +%endif + +%package oomd-defaults +Summary: Configuration files for systemd-oomd +Requires: %{name}-udev = %{version}-%{release} +License: LGPL-2.1-or-later +BuildArch: noarch + +%description oomd-defaults +A set of drop-in files for systemd units to enable action from systemd-oomd, +a userspace out-of-memory (OOM) killer. + +%package repart +Summary: systemd-repart + +%description repart +This package provide systemd-repart. + +%package dissect +Summary: systemd-dissect + +%description dissect +This package provide mount.ddi and systemd-dissect. + +%package -n kernel-install +Summary: This package provides kernel-install tool + +%description -n kernel-install +This package provides kernel-install tool + +%prep -a +%if %{with bpf} +%global find_vmlinux_h %{expand: +import functools, glob, subprocess +def cmp(a, b): + c = subprocess.call(["rpmdev-vercmp", a, b], stdout=subprocess.DEVNULL) + return {0:0, 11:+1, 12:-1}[c] +choices = list(glob.glob("/usr/src/kernels/*/vmlinux.h")) +assert choices +print(max(choices, key=functools.cmp_to_key(cmp))) +} + +VMLINUX_H_PATH=$(%python3 -c '%find_vmlinux_h') +%endif + +%build -a +# Dynamic spec generation is available for us +cp %{_vpath_builddir}/src/rpm/triggers.systemd.sh %{specpartsdir}/triggers.specpart + +%install -a +# Compatiblity and documentation files +touch %{buildroot}/etc/crypttab +chmod 600 %{buildroot}/etc/crypttab + +# Config files that were moved under /usr. +# We need to %ghost them so that they are not removed on upgrades. +touch %{buildroot}/etc/systemd/coredump.conf \ + %{buildroot}/etc/systemd/homed.conf \ + %{buildroot}/etc/systemd/journald.conf \ + %{buildroot}/etc/systemd/journal-remote.conf \ + %{buildroot}/etc/systemd/journal-upload.conf \ + %{buildroot}/etc/systemd/logind.conf \ + %{buildroot}/etc/systemd/networkd.conf \ + %{buildroot}/etc/systemd/oomd.conf \ + %{buildroot}/etc/systemd/pstore.conf \ + %{buildroot}/etc/systemd/resolved.conf \ + %{buildroot}/etc/systemd/sleep.conf \ + %{buildroot}/etc/systemd/system.conf \ + %{buildroot}/etc/systemd/timesyncd.conf \ + %{buildroot}/etc/systemd/user.conf \ + %{buildroot}/etc/udev/udev.conf \ + %{buildroot}/etc/udev/iocost.conf + +# Since v207 /etc/sysctl.conf is no longer parsed (commit 04bf3c1a60d82791), +# however backward compatibility is provided by the following symlink. +ln -s ../sysctl.conf %{buildroot}/etc/sysctl.d/99-sysctl.conf +touch %{buildroot}%{_sysconfdir}/sysctl.conf + +# Make sure these directories are properly owned +mkdir -p %{buildroot}%{system_unit_dir}/basic.target.wants +mkdir -p %{buildroot}%{system_unit_dir}/default.target.wants +mkdir -p %{buildroot}%{system_unit_dir}/dbus.target.wants +mkdir -p %{buildroot}%{system_unit_dir}/syslog.target.wants +mkdir -p %{buildroot}/run +mkdir -p %{buildroot}%{_localstatedir}/log +touch %{buildroot}%{_localstatedir}/log/lastlog +chmod 0664 %{buildroot}%{_localstatedir}/log/lastlog +touch %{buildroot}/run/utmp +touch %{buildroot}%{_localstatedir}/log/{w,b}tmp + +# Make sure the user generators dir exists too +mkdir -p %{buildroot}%{pkgdir}/system-generators +mkdir -p %{buildroot}%{pkgdir}/user-generators + +# Create new-style configuration files so that we can ghost-own them +touch %{buildroot}%{_sysconfdir}/hostname +touch %{buildroot}%{_sysconfdir}/vconsole.conf +touch %{buildroot}%{_sysconfdir}/locale.conf +touch %{buildroot}%{_sysconfdir}/machine-id +touch %{buildroot}%{_sysconfdir}/machine-info +touch %{buildroot}%{_sysconfdir}/localtime +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d +touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf + +# Make sure the shutdown/sleep drop-in dirs exist +mkdir -p %{buildroot}%{pkgdir}/system-shutdown/ +mkdir -p %{buildroot}%{pkgdir}/system-sleep/ + +# Make sure directories in /var exist +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/rfkill +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/linger +mkdir -p %{buildroot}%{_localstatedir}/lib/private +mkdir -p %{buildroot}%{_localstatedir}/log/private +mkdir -p %{buildroot}%{_localstatedir}/cache/private +mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/timesync +ln -s ../private/systemd/journal-upload %{buildroot}%{_localstatedir}/lib/systemd/journal-upload +mkdir -p %{buildroot}%{_localstatedir}/log/journal +touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database +touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin +touch %{buildroot}%{_localstatedir}/lib/systemd/random-seed +touch %{buildroot}%{_localstatedir}/lib/systemd/timesync/clock +%if %{with journal_remote} +touch %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload/state +%endif + +install -m 0644 -t %{buildroot}%{_prefix}/lib/pam.d/ %{SOURCE1} + +# Remove unwanted README +rm -f %{buildroot}%{_sysconfdir}/init.d/README +# Disable sshd_config.d/20-systemd-userdb.conf +# See https://github.com/systemd/systemd/issues/33648 +rm %{buildroot}/etc/ssh/sshd_config.d/20-systemd-userdb.conf +mv %{buildroot}/usr/lib/tmpfiles.d/20-systemd-userdb.conf{,.example} + +%post +systemd-machine-id-setup &>/dev/null || : + +[ $1 -eq 1 ] || exit 0 + +# create /var/log/journal only on initial installation, +# and only if it's writable (it won't be in rpm-ostree). +[ -w %{_localstatedir} ] && mkdir -p %{_localstatedir}/log/journal + +[ -w %{_localstatedir} ] && journalctl --update-catalog || : +systemd-sysusers || : +systemd-tmpfiles --create &>/dev/null || : + +# We reset the enablement of all services upon initial installation +# This will fix up enablement of any preset services that got installed +# before systemd due to rpm ordering problems: +# We also do this for user units. +systemctl preset-all &>/dev/null || : +systemctl --global preset-all &>/dev/null || : + +%posttrans +if [ $1 -ge 2 ]; then + [ -w %{_localstatedir} ] && journalctl --update-catalog || : + + systemctl daemon-reexec || : + + systemd-tmpfiles --create &>/dev/null || : +fi + +%systemd_posttrans_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service + +# FIXME: systemd-logind.service is excluded (https://github.com/systemd/systemd/pull/17558) + +# This is the expanded form of %%systemd_user_daemon_reexec. We +# can't use the macro because we define it ourselves. +if [ $1 -ge 2 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then + # Package upgrade, not uninstall + /usr/lib/systemd/systemd-update-helper user-reexec || : +fi + +%global udev_services %{shrink: + cryptsetup-pre.target + cryptsetup.target + hibernate.target + hybrid-sleep.target + initrd-cleanup.service + initrd-fs.target + initrd-parse-etc.service + initrd-root-device.target + initrd-root-fs.target + initrd-switch-root.service + initrd-switch-root.target + initrd-udevadm-cleanup-db.service + initrd-usr-fs.target + initrd.target + integritysetup-pre.target + integritysetup.target + kmod-static-nodes.service + proc-sys-fs-binfmt_misc.automount + proc-sys-fs-binfmt_misc.mount + quotaon-root.service + quotaon@.service + remote-cryptsetup.target + remote-veritysetup.target + sleep.target + suspend-then-hibernate.target + suspend.target + system-systemd\x2dcryptsetup.slice + system-systemd\x2dveritysetup.slice + systemd-backlight@.service + systemd-binfmt.service + systemd-bless-boot.service + systemd-bsod.service + systemd-coredump.socket + systemd-coredump@.service + systemd-fsck-root.service + systemd-fsck@.service + systemd-growfs-root.service + systemd-growfs@.service + systemd-hibernate-clear.service + systemd-hibernate-resume.service + systemd-hibernate.service + systemd-homed-activate.service + systemd-homed-firstboot.service + systemd-homed.service + systemd-hwdb-update.service + systemd-hybrid-sleep.service + systemd-modules-load.service + systemd-network-generator.service + systemd-oomd.service + systemd-oomd.socket + systemd-pcrextend.socket + systemd-pcrextend@.service + systemd-pcrfs-root.service + systemd-pcrfs@.service + systemd-pcrlock-file-system.service + systemd-pcrlock-firmware-code.service + systemd-pcrlock-firmware-config.service + systemd-pcrlock-machine-id.service + systemd-pcrlock-make-policy.service + systemd-pcrlock-secureboot-authority.service + systemd-pcrlock-secureboot-policy.service + systemd-pcrlock.socket + systemd-pcrlock@.service + systemd-pcrmachine.service + systemd-pcrphase-initrd.service + systemd-pcrphase-sysinit.service + systemd-pcrphase.service + systemd-portabled.service + systemd-pstore.service + systemd-quotacheck-root.service + systemd-quotacheck@.service + systemd-random-seed.service + systemd-remount-fs.service + systemd-rfkill.service + systemd-rfkill.socket + systemd-suspend-then-hibernate.service + systemd-suspend.service + systemd-sysctl.service + systemd-timesyncd.service + systemd-tmpfiles-setup-dev-early.service + systemd-tmpfiles-setup-dev.service + systemd-udev-load-credentials.service + systemd-udev-settle.service + systemd-udev-trigger.service + systemd-udevd-control.socket + systemd-udevd-kernel.socket + systemd-udevd.service + systemd-vconsole-setup.service + systemd-volatile-root.service + veritysetup-pre.target + veritysetup.target + } + +%post udev +# Move old stuff around in /var/lib +mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/random-seed &>/dev/null +mv %{_localstatedir}/lib/backlight %{_localstatedir}/lib/systemd/backlight &>/dev/null +if [ -L %{_localstatedir}/lib/systemd/timesync ]; then + rm %{_localstatedir}/lib/systemd/timesync + mv %{_localstatedir}/lib/private/systemd/timesync %{_localstatedir}/lib/systemd/timesync +fi +if [ -f %{_localstatedir}/lib/systemd/clock ]; then + mkdir -p %{_localstatedir}/lib/systemd/timesync + mv %{_localstatedir}/lib/systemd/clock %{_localstatedir}/lib/systemd/timesync/. +fi + +systemd-hwdb update &>/dev/null + +%systemd_post %udev_services +# Try to save the random seed, but don't complain if /dev/urandom is unavailable +/usr/lib/systemd/systemd-random-seed save 2>&1 | \ + grep -v 'Failed to open /dev/urandom' || : + +# Replace obsolete keymaps +grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null && + sed -i.rpm.bak -r 's/^KEYMAP="?fi-latin[19]"?/KEYMAP="fi"/' /etc/vconsole.conf || : + +%preun udev +%systemd_preun %udev_services +%posttrans udev +# Restart some services. +# Others are either oneshot services, or sockets, and restarting them causes issues (#1378974) +%systemd_posttrans_with_restart systemd-udevd.service systemd-timesyncd.service systemd-homed.service systemd-oomd.service systemd-portabled.service + +%if %{with journal_remote} +%global journal_remote_units_restart systemd-journal-gatewayd.service systemd-journal-remote.service systemd-journal-upload.service +%global journal_remote_units_norestart systemd-journal-gatewayd.socket systemd-journal-remote.socket +%post journal-remote +%systemd_post %journal_remote_units_restart %journal_remote_units_norestart +%firewalld_reload +%preun journal-remote +%systemd_preun %journal_remote_units_restart %journal_remote_units_norestart +if [ $1 -eq 1 ] ; then + if [ -f %{_localstatedir}/lib/systemd/journal-upload/state -a ! -L %{_localstatedir}/lib/systemd/journal-upload ] ; then + mkdir -p %{_localstatedir}/lib/private/systemd/journal-upload + mv %{_localstatedir}/lib/systemd/journal-upload/state %{_localstatedir}/lib/private/systemd/journal-upload/. + rmdir %{_localstatedir}/lib/systemd/journal-upload || : + fi +fi + +%posttrans journal-remote +%systemd_posttrans_with_restart %journal_remote_units_restart +%firewalld_reload +%endif + +%if %{with network} +%global networkd_services %{shrink: + systemd-networkd.service + systemd-networkd.socket + systemd-networkd-wait-online.service + systemd-network-generator.service + systemd-networkd-persistent-storage.service + } + +%post networkd +# systemd-networkd was split out in systemd-246.6-2. +# Ideally, we would have a trigger scriptlet to record enablement +# state when upgrading from systemd <= systemd-246.6-1. But, AFAICS, +# rpm doesn't allow us to trigger on another package, short of +# querying the rpm database ourselves, which seems risky. For rpm, +# systemd and systemd-networkd are completely unrelated. So let's use +# a hack to detect if an old systemd version is currently present in +# the file system. +if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-6].so &>/dev/null; then + echo "Skipping presets for systemd-networkd.service, seems we are upgrading from old systemd." +else + %systemd_post %networkd_services +fi + +%preun networkd +%systemd_preun %networkd_services +%posttrans networkd +%systemd_posttrans_with_restart systemd-networkd.service + +%post resolved +[ $1 -eq 1 ] || exit 0 +# Initial installation + +touch %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation + +if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then + echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd." + exit 0 +fi + +%systemd_post systemd-resolved.service + +%preun resolved +%systemd_preun systemd-resolved.service +if [ $1 -eq 0 ] ; then + if [ -L /etc/resolv.conf ] && \ + realpath /etc/resolv.conf | grep ^/run/systemd/resolve/; then + rm -f /etc/resolv.conf # no longer useful + # if network manager is enabled, move to it instead + [ -f /run/NetworkManager/resolv.conf ] && \ + systemctl -q is-enabled NetworkManager.service &>/dev/null && \ + ln -fsv ../run/NetworkManager/resolv.conf /etc/resolv.conf + fi +fi + +%posttrans resolved +%systemd_posttrans_with_restart systemd-resolved.service +[ -e %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation ] || exit 0 +rm %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation +# Initial installation + +# Create /etc/resolv.conf symlink. +# +# We would also create it using tmpfiles, but let's do this here too +# before NetworkManager gets a chance. (systemd-tmpfiles invocation +# above does not do this, because the line is marked with ! and +# tmpfiles is invoked without --boot in the scriptlet.) +# +# *Create* the symlink if nothing is present yet. +# +# *Override* the symlink if systemd is running. Don't do it if systemd +# is not running, because that will immediately break DNS resolution, +# since systemd-resolved is also not running +# +# Also don't create the symlink to the stub when the stub is disabled (#1891847 again). +if systemctl -q is-enabled systemd-resolved.service &>/dev/null && + ! systemd-analyze cat-config systemd/resolved.conf 2>/dev/null | + grep -iqE '^DNSStubListener\s*=\s*(no?|false|0|off)\s*$'; then + + if ! test -e /etc/resolv.conf && ! test -L /etc/resolv.conf; then + ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || : + elif test -d /run/systemd/system/ && + ! mountpoint /etc/resolv.conf &>/dev/null; then + ln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || : + fi +fi +%endif + +%files +%license LICENSE.GPL2 LICENSES/*.txt +%doc README README.md NEWS +%exclude %{_docdir}/systemd/LICENSE* +%doc %{_prefix}/lib/modprobe.d/README +%doc %{_prefix}/lib/sysctl.d/README +%doc %{_prefix}/lib/tmpfiles.d/README +%doc %{_docdir}/systemd/CODING_STYLE.md +%doc %{_docdir}/systemd/DISTRO_PORTING.md +%doc %{_docdir}/systemd/ENVIRONMENT.md +%doc %{_docdir}/systemd/HACKING.md +%doc %{_docdir}/systemd/NEWS +%doc %{_docdir}/systemd/README +%doc %{_docdir}/systemd/README.logs +%doc %{_docdir}/systemd/TRANSIENT-SETTINGS.md +%doc %{_docdir}/systemd/TRANSLATORS.md +%doc %{_docdir}/systemd/UIDS-GIDS.md +%ghost %dir %attr(0755,-,-) /etc/systemd/system/basic.target.wants +%ghost %dir %attr(0755,-,-) /etc/systemd/system/default.target.wants +%ghost %dir %attr(0755,-,-) /etc/systemd/system/multi-user.target.wants +%ghost %dir %attr(0755,-,-) /etc/systemd/system/sockets.target.wants +%ghost %dir %attr(0755,-,-) /etc/systemd/system/sysinit.target.wants +%{_sysconfdir}/systemd/journald.conf +%{_sysconfdir}/systemd/logind.conf +%{_sysconfdir}/systemd/system.conf +%{_sysconfdir}/systemd/user.conf +%{_prefix}/lib/tmpfiles.d/20-* +%{_prefix}/lib/tmpfiles.d/credstore.conf +%{_prefix}/lib/tmpfiles.d/etc.conf +%{_prefix}/lib/tmpfiles.d/home.conf +%{_prefix}/lib/tmpfiles.d/journal-nocow.conf +%{_prefix}/lib/tmpfiles.d/legacy.conf +%{_prefix}/lib/tmpfiles.d/portables.conf +%{_prefix}/lib/tmpfiles.d/provision.conf +%{_prefix}/lib/tmpfiles.d/static-nodes-permissions.conf +%{_prefix}/lib/tmpfiles.d/systemd-nologin.conf +%{_prefix}/lib/tmpfiles.d/systemd-tmp.conf +%{_prefix}/lib/tmpfiles.d/systemd.conf +%{_prefix}/lib/tmpfiles.d/tmp.conf +%{_prefix}/lib/tmpfiles.d/var.conf +%{_prefix}/lib/tmpfiles.d/x11.conf +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/busctl +%{_datadir}/bash-completion/completions/coredumpctl +%{_datadir}/bash-completion/completions/hostnamectl +%{_datadir}/bash-completion/completions/journalctl +%{_datadir}/bash-completion/completions/localectl +%{_datadir}/bash-completion/completions/loginctl +%{_datadir}/bash-completion/completions/oomctl +%{_datadir}/bash-completion/completions/portablectl +%{_datadir}/bash-completion/completions/run0 +%{_datadir}/bash-completion/completions/systemctl +%{_datadir}/bash-completion/completions/systemd-analyze +%{_datadir}/bash-completion/completions/systemd-cat +%{_datadir}/bash-completion/completions/systemd-cgls +%{_datadir}/bash-completion/completions/systemd-cgtop +%{_datadir}/bash-completion/completions/systemd-confext +%{_datadir}/bash-completion/completions/systemd-creds +%{_datadir}/bash-completion/completions/systemd-delta +%{_datadir}/bash-completion/completions/systemd-detect-virt +%{_datadir}/bash-completion/completions/systemd-id128 +%{_datadir}/bash-completion/completions/systemd-path +%{_datadir}/bash-completion/completions/systemd-run +%{_datadir}/bash-completion/completions/systemd-sysext +%{_datadir}/factory/etc/issue +%{_datadir}/factory/etc/locale.conf +%{_datadir}/factory/etc/nsswitch.conf +%{_datadir}/factory/etc/pam.d/* +%{_datadir}/mime/packages/io.systemd.xml +%{_bindir}/busctl +%{_bindir}/coredumpctl +%{_bindir}/hostnamectl +%{_bindir}/journalctl +%{_bindir}/localectl +%{_bindir}/loginctl +%{_bindir}/oomctl +%{_bindir}/run0 +%{_bindir}/systemctl +%{_bindir}/systemd-ac-power +%{_bindir}/systemd-analyze +%{_bindir}/systemd-ask-password +%{_bindir}/systemd-cat +%{_bindir}/systemd-cgls +%{_bindir}/systemd-cgtop +%{_bindir}/systemd-confext +%{_bindir}/systemd-creds +%{_bindir}/systemd-delta +%{_bindir}/systemd-detect-virt +%{_bindir}/systemd-escape +%{_bindir}/systemd-firstboot +%{_bindir}/systemd-id128 +%{_bindir}/systemd-inhibit +%{_bindir}/systemd-machine-id-setup +%{_bindir}/systemd-mount +%{_bindir}/systemd-notify +%{_bindir}/systemd-path +%{_bindir}/systemd-run +%{_bindir}/systemd-socket-activate +%{_bindir}/systemd-stdio-bridge +%{_bindir}/systemd-sysext +%{_bindir}/systemd-tmpfiles +%{_bindir}/systemd-tty-ask-password-agent +%{_bindir}/systemd-umount +%{_bindir}/systemd-vpick +%{_bindir}/timedatectl +%{_bindir}/userdbctl +%{_bindir}/varlinkctl +%{_bindir}/halt +%{_bindir}/init +%{_bindir}/poweroff +%{_bindir}/reboot +%{_bindir}/shutdown +%{_bindir}/runlevel +%{_bindir}/telinit +%if %{with bpf} +%{_bindir}/systemd-bpf +%endif +%{_prefix}/lib/pam.d/systemd-* +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.oom1.service +%dir %{_datadir}/dbus-1/system.d +%{_datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf +%{_datadir}/dbus-1/system.d/org.freedesktop.locale1.conf +%{_datadir}/dbus-1/system.d/org.freedesktop.login1.conf +%{_datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf +%{_datadir}/dbus-1/system.d/org.freedesktop.oom1.conf +%{_datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf +%dir %{_datadir}/polkit-1/actions +%{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.login1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy +%{_datadir}/polkit-1/actions/io.systemd.credentials.policy +%{_datadir}/polkit-1/actions/io.systemd.mount-file-system.policy +%dir %{_datadir}/dbus-1/services +%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service +%dir %{_datadir}/systemd +%{_datadir}/systemd/kbd-model-map +%{_datadir}/systemd/language-fallback-map +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_busctl +%{_datadir}/zsh/site-functions/_coredumpctl +%{_datadir}/zsh/site-functions/_hostnamectl +%{_datadir}/zsh/site-functions/_journalctl +%{_datadir}/zsh/site-functions/_localectl +%{_datadir}/zsh/site-functions/_loginctl +%{_datadir}/zsh/site-functions/_run0 +%{_datadir}/zsh/site-functions/_sd_hosts_or_user_at_host +%{_datadir}/zsh/site-functions/_sd_outputmodes +%{_datadir}/zsh/site-functions/_sd_unit_files +%{_datadir}/zsh/site-functions/_systemctl +%{_datadir}/zsh/site-functions/_systemd +%{_datadir}/zsh/site-functions/_systemd-analyze +%{_datadir}/zsh/site-functions/_systemd-delta +%{_datadir}/zsh/site-functions/_systemd-inhibit +%{_datadir}/zsh/site-functions/_systemd-path +%{_datadir}/zsh/site-functions/_systemd-run +%{_datadir}/zsh/site-functions/_systemd-tmpfiles +%{_datadir}/zsh/site-functions/_timedatectl +%{_datadir}/zsh/site-functions/_oomctl +%{_datadir}/zsh/site-functions/_sd_machines +%{_datadir}/zsh/site-functions/_varlinkctl +%if %{with bpf} +%{_datadir}/zsh/site-functions/_systemd-bpf +%endif +%exclude %{_sysconfdir}/sysctl.conf +%{_sysconfdir}/sysctl.d/99-sysctl.conf +%{pkgdir}/ +%{_rundir}/utmp +%{_prefix}/lib/environment.d/99-environment.conf +%{_sysconfdir}/ssh/ssh_config.d/20-systemd-ssh-proxy.conf +%{_sysconfdir}/profile.d/70-systemd-shell-extra.sh +%{_sysconfdir}/X11/xinit/xinitrc.d/50-systemd-user.sh +%{_localstatedir}/lib/systemd/catalog/database +%{_localstatedir}/log/btmp +%{_localstatedir}/log/lastlog +%{_localstatedir}/log/wtmp +%{_sysconfdir}/xdg/systemd/user +%ghost /etc/hostname +%ghost /etc/locale.conf +%ghost /etc/localtime +%ghost /etc/machine-id +%ghost /etc/machine-info +%ghost /etc/vconsole.conf +%ghost /etc/X11/xorg.conf.d/00-keyboard.conf +%ghost /etc/crypttab +# We still got some files installed even if certain features are disabled +%if %{without network} +%exclude %{_sysconfdir}/systemd/networkd.conf +%exclude %{_sysconfdir}/systemd/resolved.conf +%endif +%if %{without journal_remote} +%exclude %{_sysconfdir}/systemd/journal-remote.conf +%exclude %{_sysconfdir}/systemd/journal-upload.conf +%exclude %{_localstatedir}/lib/systemd/journal-upload +%endif +%exclude %{_datadir}/bash-completion/completions/bootctl +%exclude %{_datadir}/zsh/site-functions/_bootctl + +%files -n kernel-install +%{_bindir}/kernel-install +%{_prefix}/lib/kernel/install.conf +%{_prefix}/lib/kernel/install.d/50-depmod.install +%{_prefix}/lib/kernel/install.d/90-loaderentry.install +%{_prefix}/lib/kernel/install.d/90-uki-copy.install +%{_datadir}/zsh/site-functions/_kernel-install +%{_datadir}/bash-completion/completions/kernel-install + +%files libs +%license LICENSE.LGPL2.1 +%{_libdir}/lib*.so.* + +%files shared +%license LICENSE.LGPL2.1 +%license LICENSES/MIT.txt +%{_libdir}/systemd/* + +%files pam +%{_libdir}/security/*.so + +%files rpm-macros +%{_rpmmacrodir}/macros.systemd + +%files repart +%{_bindir}/systemd-repart + +%files dissect +%{_bindir}/mount.ddi +%{_bindir}/systemd-dissect +%{_datadir}/bash-completion/completions/systemd-dissect + +%files sysusers +%{_bindir}/systemd-sysusers +%if %{with docs} +%{_mandir}/man1/systemd-sysusers.1.gz +%{_mandir}/man5/sysusers.d.5.gz +%{_mandir}/man8/systemd-sysusers.service.8.gz +%endif +%{_prefix}/lib/sysusers.d +%{_prefix}/lib/systemd/system/systemd-sysusers.service + +%if %{with network} +%files resolved +%{_bindir}/systemd-resolve +%{_bindir}/resolvectl +%{_bindir}/resolvconf +%{_sysconfdir}/systemd/resolved.conf +%{_prefix}/lib/tmpfiles.d/systemd-resolve.conf +%{_datadir}/bash-completion/completions/resolvectl +%{_datadir}/bash-completion/completions/systemd-resolve +%if %{with docs} +%{_mandir}/man1/resolvectl.1.gz +%{_mandir}/man5/resolved.conf.5.gz +%{_mandir}/man5/resolved.conf.d.5.gz +%{_mandir}/man8/libnss_resolve.so.2.8.gz +%{_mandir}/man8/nss-resolve.8.gz +%{_mandir}/man8/systemd-resolved.8.gz +%{_mandir}/man8/systemd-resolved.service.8.gz +%endif +%dir %{_datadir}/dbus-1/interfaces +%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Manager.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.resolve1.Link.xml +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service +%dir %{_datadir}/dbus-1/system.d +%{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf +%dir %{_datadir}/polkit-1/actions +%{_datadir}/polkit-1/actions/org.freedesktop.resolve1.policy +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/resolvectl +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_resolvectl +%{_libdir}/libnss_resolve.so.2 +%{_prefix}/lib/systemd/system/systemd-resolved.service +%ghost /etc/resolv.conf +%endif + +%files devel +%{_includedir}/systemd/ +%{_includedir}/libudev.h +%{_libdir}/libsystemd.so +%{_libdir}/libudev.so +%{_libdir}/pkgconfig/libsystemd.pc +%{_libdir}/pkgconfig/libudev.pc +%{_datadir}/dbus-1/interfaces/*.xml +%{_datadir}/pkgconfig/systemd.pc +%{_datadir}/pkgconfig/udev.pc +%{_datadir}/bash-completion/completions/systemd-vpick +%{_datadir}/bash-completion/completions/timedatectl +%if %{with bpf} +%{_datadir}/bash-completion/completions/systemd-bpf +%endif + +%files udev +%{_bindir}/systemd-hwdb +%{_bindir}/udevadm +%{_sysconfdir}/systemd/coredump.conf +%{_sysconfdir}/systemd/homed.conf +%{_sysconfdir}/systemd/oomd.conf +%{_sysconfdir}/systemd/pstore.conf +%{_sysconfdir}/systemd/sleep.conf +%{_sysconfdir}/systemd/timesyncd.conf +%{_prefix}/lib/sysctl.d/50-* +%{_prefix}/lib/tmpfiles.d/systemd-pstore.conf +%{_datadir}/bash-completion/completions/bootctl +%{_localstatedir}/lib/systemd/random-seed +%{_localstatedir}/lib/systemd/timesync/clock +%if %{with docs} +%{_mandir}/man8/udevadm.8.gz +%{_mandir}/man7/udev.7.gz +%{_mandir}/man5/udev.conf.5.gz +%{_mandir}/man5/hwdb.7.gz +%{_mandir}/man5/systemd.dnssd.5.gz +%{_mandir}/man5/systemd.link.5.gz +%{_mandir}/man5/systemd.netdev.5.gz +%{_mandir}/man5/systemd.network.5.gz +%{_mandir}/man8/systemd-hwdb.8.gz +%endif +%{_sysconfdir}/udev +%{_prefix}/lib/udev/ata_id +%{_prefix}/lib/udev/cdrom_id +%{_prefix}/lib/udev/dmi_memory_id +%if %{with fido2} +%{_prefix}/lib/udev/fido_id +%else +%exclude %{_prefix}/lib/udev/fido_id +%endif +%{_prefix}/lib/udev/iocost +%{_prefix}/lib/udev/iocost.conf +%{_prefix}/lib/udev/mtd_probe +%{_prefix}/lib/udev/scsi_id +%{_prefix}/lib/udev/udev.conf +%{_prefix}/lib/udev/v4l_id +%{_prefix}/lib/udev/hwdb.d/* +%{_prefix}/lib/udev/rules.d/* +%{_datadir}/bash-completion/completions/udevadm +%{_datadir}/zsh/site-functions/_udevadm +%{_prefix}/lib/modprobe.d/systemd.conf +%{_datadir}/dbus-1/system-services/org.freedesktop.timesync1.service +%{_datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf +%{_datadir}/polkit-1/actions/org.freedesktop.timesync1.policy +%{_datadir}/factory/etc/vconsole.conf + +%if %{with ukify} +%files ukify +%{_bindir}/ukify +%{_prefix}/lib/systemd/ukify +%if %{with docs} +%{_mandir}/man1/ukify.1.gz +%endif +%endif + +%files boot +%{_prefix}/lib/systemd/boot/efi/systemd-boot*.efi +# %%{_prefix}/lib/systemd/boot/efi/systemd-stub*.efi +%if %{with docs} +%{_mandir}/man8/bootctl.8.gz +%{_mandir}/man7/systemd-boot.7.gz +%{_mandir}/man5/loader.conf.5.gz +%endif +%{_bindir}/bootctl +%{_datadir}/bash-completion/completions/bootctl +%{_datadir}/zsh/site-functions/_bootctl + +%files container +%ghost %dir %attr(0700,-,-) /var/lib/machines +%{_bindir}/machinectl +%{_bindir}/portablectl +%{_bindir}/systemd-nspawn +%{_prefix}/lib/tmpfiles.d/systemd-nspawn.conf +%{_datadir}/bash-completion/completions/systemd-nspawn +%if %{with docs} +%{_mandir}/man1/machinectl.1.gz +%{_mandir}/man1/portablectl.1.gz +%{_mandir}/man1/systemd-nspawn.1.gz +%{_mandir}/man5/nspawn.5.gz +%{_mandir}/man5/portabled.conf.5.gz +%{_mandir}/man5/portabled.conf.d.5.gz +%{_mandir}/man8/systemd-machined.service.8.gz +%{_mandir}/man8/systemd-portabled.service.8.gz +%endif +%dir %{_datadir}/dbus-1/interfaces +%{_datadir}/dbus-1/interfaces/org.freedesktop.machine1.Manager.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.portable1.Manager.xml +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.portable1.service +%dir %{_datadir}/dbus-1/system.d +%{_datadir}/dbus-1/system.d/org.freedesktop.machine1.conf +%{_datadir}/dbus-1/system.d/org.freedesktop.portable1.conf +%dir %{_datadir}/polkit-1/actions +%{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy +%{_datadir}/polkit-1/actions/org.freedesktop.portable1.policy +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/machinectl +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_machinectl +%{_datadir}/zsh/site-functions/_systemd-nspawn +%{_prefix}/lib/systemd/system/machines.target +%{_prefix}/lib/systemd/system/systemd-machined.service +%{_prefix}/lib/systemd/system/systemd-portabled.service +%{_prefix}/lib/systemd/system/systemd-nspawn@.service + +%if %{with journal_remote} +%files journal-remote +%{_bindir}/systemd-journal-gatewayd +%{_bindir}/systemd-journal-remote +%{_bindir}/systemd-journal-upload +%{_sysconfdir}/systemd/journal-remote.conf +%{_sysconfdir}/systemd/journal-upload.conf +%if %{with docs} +%{_mandir}/man8/systemd-journal-gatewayd.8.gz +%{_mandir}/man8/systemd-journal-gatewayd.service.8.gz +%{_mandir}/man8/systemd-journal-gatewayd.socket.8.gz +%{_mandir}/man8/systemd-journal-remote.8.gz +%{_mandir}/man8/systemd-journal-remote.service.8.gz +%{_mandir}/man8/systemd-journal-remote.socket.8.gz +%{_mandir}/man8/systemd-journal-upload.8.gz +%{_mandir}/man8/systemd-journal-upload.service.8.gz +%{_mandir}/man5/journal-remote.conf.5.gz +%{_mandir}/man5/journal-remote.conf.d.5.gz +%{_mandir}/man5/journal-upload.conf.5.gz +%{_mandir}/man5/journal-upload.conf.d.5.gz +%endif +%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.service +%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.socket +%{_prefix}/lib/systemd/system/systemd-journal-remote.service +%{_prefix}/lib/systemd/system/systemd-journal-remote.socket +%{_prefix}/lib/systemd/system/systemd-journal-upload.service +%{_prefix}/lib/systemd/system/sockets.target.wants/systemd-journal-gatewayd.socket +%{_prefix}/lib/systemd/system/sockets.target.wants/systemd-journal-remote.socket +%dir %{_localstatedir}/lib/systemd/journal-upload +%ghost %{_localstatedir}/lib/systemd/journal-upload/state +%dir %{_localstatedir}/cache/systemd/journal-remote +%{_localstatedir}/lib/private/systemd/journal-upload/state +%endif + +%if %{with network} +%files networkd +%{_bindir}/networkctl +%{_sysconfdir}/systemd/networkd.conf +%{_prefix}/lib/tmpfiles.d/systemd-network.conf +%{_datadir}/bash-completion/completions/networkctl +%if %{with docs} +%{_mandir}/man1/networkctl.1.gz +%{_mandir}/man5/networkd.conf.5.gz +%{_mandir}/man5/networkd.conf.d.5.gz +%{_mandir}/man8/systemd-networkd.8.gz +%{_mandir}/man8/systemd-networkd.service.8.gz +%{_mandir}/man8/systemd-networkd-wait-online.8.gz +%{_mandir}/man8/systemd-networkd-wait-online.service.8.gz +%endif +%dir %{_datadir}/dbus-1/interfaces +%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Manager.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Link.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Network.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPServer.xml +%{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPv6Client.xml +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/system-services/org.freedesktop.network1.service +%dir %{_datadir}/dbus-1/system.d +%{_datadir}/dbus-1/system.d/org.freedesktop.network1.conf +%dir %{_datadir}/polkit-1/actions +%{_datadir}/polkit-1/actions/org.freedesktop.network1.policy +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/networkctl +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_networkctl +%dir %{_prefix}/lib/systemd +%{_prefix}/lib/systemd/network +%{_prefix}/lib/systemd/system/systemd-networkd.service +%{_prefix}/lib/systemd/system/systemd-networkd.socket +%{_prefix}/lib/systemd/system/systemd-networkd-wait-online.service + +%files networkd-defaults +%dir %{_prefix}/lib/systemd/network +%{_prefix}/lib/systemd/network/99-default.link +%endif + +%files oomd-defaults + +%changelog +%{?autochangelog} diff --git a/SPECS/systemtap/systemtap.spec b/SPECS/systemtap/systemtap.spec new file mode 100644 index 00000000..694cd941 --- /dev/null +++ b/SPECS/systemtap/systemtap.spec @@ -0,0 +1,330 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Change these to 1 once we have the dependencies +%bcond avahi 0 +%bcond dyninst 0 + +Name: systemtap +Version: 5.3 +Release: %autorelease +Summary: Programmable system-wide instrumentation system +License: GPL-2.0-or-later +URL: https://sourceware.org/systemtap/ +VCS: git:https://sourceware.org/git/systemtap.git +#!RemoteAsset +Source0: https://sourceware.org/%{name}/ftp/releases/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://sourceware.org/%{name}/ftp/releases/%{name}-%{version}.tar.gz.asc +BuildSystem: autotools + +BuildOption(conf): --disable-docs +BuildOption(conf): --with-python3 + +BuildRequires: config +BuildRequires: make +BuildRequires: boost-devel +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(libdw) +%if %{with avahi} +BuildRequires: pkgconfig(avahi-client) +%endif +BuildRequires: pkgconfig(json-c) +%if %{with dyninst} +BuildRequires: dyninst-devel +BuildRequires: pkgconfig(libselinux) +%endif +BuildRequires: sqlite-devel +BuildRequires: pkgconfig(systemd) +BuildRequires: python3 +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +Requires: %{name}-client = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} + +%description +SystemTap is an instrumentation system for systems running Linux. +Developers can write instrumentation scripts to collect data on +the operation of the system. The base systemtap package contains/requires +the components needed to locally develop and execute systemtap scripts + +%package runtime +Summary: Programmable system-wide instrumentation system - runtime +Requires(pre): shadow + +%description runtime +SystemTap runtime contains the components needed to execute +a systemtap script that was already compiled into a module +using a local or remote systemtap-devel installation. + +%package client +Summary: Programmable system-wide instrumentation system - client +License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause +Requires: %{name}-runtime = %{version}-%{release} +# What are these??? - 251 +Requires: coreutils +Requires: grep +Requires: sed +Requires: unzip +Requires: zip +Requires: openssh-clients +Requires: mokutil + +%description client +This package contains/requires only the components needed to +use systemtap scripts by compiling them using a local or a remote +systemtap-server service, then run them using a local or +remote systemtap-runtime. It includes script samples and +documentation, and a copy of the tapset library for reference. +It does NOT include all the components for running a systemtap +script in a self-contained fashion; for that, use the -devel +subpackage instead. + +%package server +Summary: Instrumentation System Server +BuildRequires: pkgconfig(nss) +%if %{with avahi} +BuildRequires: avahi-devel +%endif +Requires: %{name}-devel = %{version}-%{release} +Requires: openssl +Requires: systemd + +%description server +This is the remote script compilation server component of systemtap. +It announces itself to nearby clients with avahi (if available), and +compiles systemtap scripts to kernel objects on their demand. + +%package devel +Summary: Programmable system-wide instrumentation system - development headers, tools +License: GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND BSD-2-Clause +Requires: elfutils-devel +Requires: make + +%description devel +This package contains the components needed to compile a systemtap +script from source form into executable (.ko) forms. It may be +installed on a self-contained developer workstation (along with the +systemtap-client and systemtap-runtime packages), or on a dedicated +remote server (alongside the systemtap-server package). It includes +a copy of the standard tapset library and the runtime library C files. + +%package exporter +Summary: Systemtap-prometheus interoperation mechanism +License: GPL-2.0-or-later +Requires: %{name}-runtime = %{version}-%{release} + +%description exporter +This package includes files for a systemd service that manages +systemtap sessions and relays prometheus metrics from the sessions +to remote requesters on demand. + +%package runtime-python +Summary: Systemtap Python Runtime Support +License: GPL-2.0-or-later +Provides: %{name}-runtime-python3 = %{version}-%{release} +Requires: systemtap-runtime = %{version}-%{release} + +%description runtime-python +This package includes support files needed to run systemtap scripts +that probe python processes. + +%package sdt-devel +Summary: Static probe support header files +License: GPL-2.0-or-later AND CC0-1.0 + +%description sdt-devel +This package includes the header file used for static +instrumentation compiled into userspace programs. + +%package sdt-dtrace +Summary: Static probe support dtrace tool +License: GPL-2.0-or-later AND CC0-1.0 +Provides: dtrace = %{version}-%{release} +Requires: python3-pyparsing + +%description sdt-dtrace +This package includes the dtrace-compatibility preprocessor +to process related .d files into tracing-macro-laden .h headers. + +%conf -p +cp -p %{_bindir}/config.guess . +cp -p %{_bindir}/config.sub . + +%install -a +%find_lang %{name} --generate-subpackages --with-man --all-name + +mkdir -p %{buildroot}%{_sysconfdir}/stap-server +mkdir -p %{buildroot}%{_localstatedir}/lib/stap-server +mkdir -p %{buildroot}%{_localstatedir}/lib/stap-server/.systemtap +mkdir -p %{buildroot}%{_localstatedir}/log/stap-server +touch %{buildroot}%{_localstatedir}/log/stap-server/log +mkdir -p %{buildroot}%{_localstatedir}/cache/systemtap +mkdir -p %{buildroot}%{_localstatedir}/run/systemtap +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d +install -m 644 initscript/logrotate.stap-server %{buildroot}%{_sysconfdir}/logrotate.d/stap-server + + +mkdir -p %{buildroot}%{_initddir} +install -m 755 initscript/systemtap %{buildroot}%{_initddir} +mkdir -p %{buildroot}%{_sbindir} +ln -sf %{_initddir}/systemtap %{buildroot}%{_sbindir}/systemtap-service + +mkdir -p %{buildroot}%{_sysconfdir}/systemtap +mkdir -p %{buildroot}%{_sysconfdir}/systemtap/conf.d +mkdir -p %{buildroot}%{_sysconfdir}/systemtap/script.d +install -m 644 initscript/config.systemtap %{buildroot}%{_sysconfdir}/systemtap/config + +install -m 755 initscript/stap-server %{buildroot}%{_initddir} +mkdir -p %{buildroot}%{_sysconfdir}/stap-server/conf.d +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +install -m 644 initscript/config.stap-server %{buildroot}%{_sysconfdir}/sysconfig/stap-server + +install -D -m 644 macros.systemtap %{buildroot}%{_rpmmacrodir}/macros.systemtap + +%preun exporter +%systemd_preun %{name}-exporter.service + +%postun exporter +%systemd_postun_with_restart %{name}-exporter.service + +%files +%{_bindir}/stap-jupyter-container +%{_bindir}/stap-jupyter-install +%{_mandir}/man1/stap-jupyter.1* +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/interactive-notebook +# packaged by systemtap-initscript in upstream +%dir %{_localstatedir}/cache/systemtap +%{_initddir}/systemtap +%{_sbindir}/systemtap-service +%config(noreplace) %{_sysconfdir}/systemtap/config + +%files runtime +%license COPYING +%doc README README.security AUTHORS NEWS +%{_bindir}/staprun +%{_bindir}/stapsh +%{_bindir}/stap-merge +%{_bindir}/stap-report +%if %{with dyninst} +%{_bindir}/stapdyn +%endif +%{_bindir}/stapbpf +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/stapio +%{_libexecdir}/systemtap/stap-authorize-cert +%{_mandir}/man1/stap-report.1* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%{_mandir}/man8/stapsh.8* +%{_mandir}/man8/staprun.8* +%if %{with dyninst} +%{_mandir}/man8/stapdyn.8* +%endif +%{_mandir}/man8/stapbpf.8* +%{_mandir}/man8/systemtap-service.8* +# Well this is for english +%{_datadir}/locale/en/LC_MESSAGES/systemtap.mo + +%files client +%doc README README.unprivileged AUTHORS NEWS +%license COPYING +%{_datadir}/systemtap/examples +%{_bindir}/stap +%{_bindir}/stap-prep +%{_bindir}/stap-report +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-prep.1* +%{_mandir}/man1/stap-merge.1* +%{_mandir}/man1/stap-report.1* +%{_mandir}/man1/stapref.1* +%{_mandir}/man3/* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/tapset + +%files server +%doc README README.unprivileged AUTHORS NEWS +%license COPYING +%{_bindir}/stap-server +%dir %{_libexecdir}/systemtap +%{_libexecdir}/systemtap/stap-serverd +%{_libexecdir}/systemtap/stap-start-server +%{_libexecdir}/systemtap/stap-stop-server +%{_libexecdir}/systemtap/stap-gen-cert +%{_libexecdir}/systemtap/stap-sign-module +%{_libexecdir}/systemtap/stap-env +%{_mandir}/man8/stap-server.8* +%ghost %config(noreplace) %attr(0644,root,root) %{_localstatedir}/log/stap-server/log +%{_initddir}/stap-server +%dir %{_sysconfdir}/stap-server/conf.d +%config(noreplace) %{_sysconfdir}/sysconfig/stap-server +%config(noreplace) %{_sysconfdir}/logrotate.d/stap-server +%dir %{_sysconfdir}/stap-server +%dir %attr(0750,root,root) %{_localstatedir}/lib/stap-server +%dir %attr(0700,root,root) %{_localstatedir}/lib/stap-server/.systemtap +%dir %attr(0755,root,root) %{_localstatedir}/log/stap-server +%ghost %attr(0755,root,root) %{_localstatedir}/run/stap-server +# TODO: Why these are here? I don't think they are provided by avahi - 251 +%if %{with avahi} +%{_libexecdir}/systemtap/stap-authorize-cert +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%endif + +%files devel +%doc README README.unprivileged AUTHORS NEWS +%license COPYING +%{_bindir}/stap +%{_bindir}/stap-prep +%{_bindir}/stap-profile-annotate +%{_bindir}/stap-report +%dir %{_datadir}/systemtap +%{_datadir}/systemtap/runtime +%{_datadir}/systemtap/tapset +%{_mandir}/man1/stap.1* +%{_mandir}/man1/stap-prep.1* +%{_mandir}/man1/stap-report.1* +%{_mandir}/man7/error* +%{_mandir}/man7/stappaths.7* +%{_mandir}/man7/warning* +%{_libexecdir}/systemtap/python/stap-resolve-module-function.py + +%files exporter +%{_sysconfdir}/stap-exporter +%{_sysconfdir}/sysconfig/stap-exporter +%{_unitdir}/stap-exporter.service +%{_mandir}/man8/stap-exporter.8* +%{_sbindir}/stap-exporter + +%files runtime-python +%{python3_sitearch}/HelperSDT +%{python3_sitearch}/HelperSDT-*.egg-info + +%files sdt-devel +%doc README AUTHORS NEWS +%license COPYING +%{_includedir}/sys/sdt.h +%{_includedir}/sys/sdt-config.h +%{_rpmmacrodir}/macros.systemtap + +%files sdt-dtrace +%doc README AUTHORS NEWS +%license COPYING +%{_bindir}/dtrace +%{_mandir}/man1/dtrace.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/sysuser-tools/macros.sysusers b/SPECS/sysuser-tools/macros.sysusers new file mode 100644 index 00000000..78a095f3 --- /dev/null +++ b/SPECS/sysuser-tools/macros.sysusers @@ -0,0 +1,24 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- */ +# RPM macros for packages creating system accounts +# +### +# +# When a package creates a system account, it should use the following macros: +# +# add %?sysusers_requires in the package section +# +# add "%sysusers_generate_pre []" to build section +# +## is the source file as defined in the spec file header +## is just a random name, the output file will be ".pre" +## is the name of the configuration file as stored in +## /usr/lib/sysusers.d/ +# +# add "%pre -f .pre" to spec file +# +### + +%sysusers_requires Requires(pre): sysuser-shadow systemd-sysusers + +%sysusers_generate_pre() \ +%{_prefix}/lib/rpm/sysusers-generate-pre "%1" "%3" >> "%2".pre diff --git a/SPECS/sysuser-tools/sysuser-tools.spec b/SPECS/sysuser-tools/sysuser-tools.spec new file mode 100644 index 00000000..a7f3725c --- /dev/null +++ b/SPECS/sysuser-tools/sysuser-tools.spec @@ -0,0 +1,93 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: sysuser-tools +Version: 3.3 +Release: %autorelease +Summary: Auto provides for system users +License: MIT +Group: System/Packages +Source: sysusers.prov +# Source1: sysusers.attr +Source2: sysusers-generate-pre +Source3: macros.sysusers +Source4: sysusers2shadow.sh +BuildArch: noarch +Requires: sysuser-shadow +#!BuildIgnore: sysuser-shadow +#!BuildIgnore: sysuser-tools +BuildRequires: diffutils + +%description +Generate auto provides for system users. + +%package -n sysuser-shadow +Summary: Tool to execute sysusers.d with shadow utilities +Group: System/Packages +Requires(pre): (/usr/bin/useradd or busybox) +# prefer original shadow over busybox by default +Suggests: shadow +# sysusers2shdow uses sysusers2shadow uses systemd-sysusers if available. And we might pass --replace to it +# --replace only appeared in systemd 238,so we want to ensure: if we have systemd, it must be recent enough +# the Requires(pre) statement is to ensure we get it at any moment recent enough, not only at the end of +# transactions, otherwise upgrades might randomly fail +Requires(pre): systemd-sysusers +Requires: systemd-sysusers + +%description -n sysuser-shadow +This package contians a tool, which expects as input a sysusers.d +configuration file and uses the shadow suite to create the users +and groups from it like systemd-sysusers would do. + +%prep +%setup -qcT + +%build + +%install +install -D -m 755 %{SOURCE0} %{buildroot}%{_prefix}/lib/rpm/sysusers.prov +# install -D -m 644 %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/fileattrs/sysusers.attr +install -D -m 755 %{SOURCE2} %{buildroot}%{_prefix}/lib/rpm/sysusers-generate-pre +install -D -m 644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.sysusers +install -D -m 755 %{SOURCE4} %{buildroot}%{_bindir}/sysusers2shadow + +%check +mkdir -p subdir +cat < subdir/me.conf +# Type Name ID GECOS [HOME] Shell + u me - "myself" /dev/null +m me nogroup +# foobar + g asdf + z welp invalid +EOF + +cat < expected-account-pre +/usr/bin/sysusers2shadow me.conf <<"EOF" +u me - "myself" /dev/null +m me nogroup +g asdf +EOF +EOFF + +# copy pasta from macros.sysusers because the script sysusers-generate-pre is not in /usr/lib/rpm yet +bash %{SOURCE2} $(pwd)/subdir/me.conf me.conf > account.pre + +diff account.pre expected-account-pre + +%files +%defattr(-,root,root) +%{_rpmmacrodir}/macros.sysusers +%{_prefix}/lib/rpm/sysusers.prov +# %%{_prefix}/lib/rpm/fileattrs/sysusers.attr +%{_prefix}/lib/rpm/sysusers-generate-pre + +%files -n sysuser-shadow +%defattr(-,root,root) +%{_bindir}/sysusers2shadow + +%changelog +%{?autochangelog} diff --git a/SPECS/sysuser-tools/sysusers-generate-pre b/SPECS/sysuser-tools/sysusers-generate-pre new file mode 100644 index 00000000..86769c72 --- /dev/null +++ b/SPECS/sysuser-tools/sysusers-generate-pre @@ -0,0 +1,6 @@ +#!/bin/bash +# pass systemd sysusers config paths as argument to this script. + +echo "/usr/bin/sysusers2shadow $2 <<\"EOF\"" +(while read -r line; do if [[ $line =~ ^\s*[ugmr] ]]; then echo "$line"; fi; done) < "$1" +echo 'EOF' diff --git a/SPECS/sysuser-tools/sysusers.prov b/SPECS/sysuser-tools/sysusers.prov new file mode 100644 index 00000000..4b8b6707 --- /dev/null +++ b/SPECS/sysuser-tools/sysusers.prov @@ -0,0 +1,21 @@ +#!/bin/bash + +parse() +{ + while read line; do + [ "${line:0:1}" != '#' ] || continue + line="${line## *}" + [ -n "$line" ] || continue + set -- $line + if [ "$1" = 'g' ]; then + echo "group($2)" + elif [ "$1" = 'u' ]; then + echo "user($2)" + echo "group($2)" + fi + done +} + +while read fn; do + parse < "$fn" +done diff --git a/SPECS/sysuser-tools/sysusers2shadow.sh b/SPECS/sysuser-tools/sysusers2shadow.sh new file mode 100644 index 00000000..3aad8a3f --- /dev/null +++ b/SPECS/sysuser-tools/sysusers2shadow.sh @@ -0,0 +1,123 @@ +#!/bin/sh +set -e + +# Print the command and run it +run() { + echo "$@" + "$@" +} + +if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then + + if [ -n "$1" ] && [ "$1" != "%3" ]; then + REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1" + fi + # Use systemd-sysusers and let it read the input directly from stdin + run /usr/bin/systemd-sysusers $REPLACE_ARG - +else + # Absolute path to busybox, if found + busybox= + for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done + + while read LINE + do + # "eval set" to do proper splitting while respecting quotes + eval set -- $LINE + case "${1-}" in + \#*|"") + ;; + g) + shift + ARGUMENTS="$1" + if [ -n "${2-}" ] && [ "$2" != "-" ]; then + ARGUMENTS="-g $2 $ARGUMENTS" + fi + + if ! /usr/bin/getent group "$1" >> /dev/null; then + if [ -x "/usr/bin/groupadd" ]; then + run /usr/bin/groupadd -r $ARGUMENTS + elif [ -x "$busybox" ]; then + run $busybox addgroup -S $ARGUMENTS + else + echo "ERROR: neither groupadd nor busybox found!" + exit 1 + fi + fi + ;; + u) + shift + ARGUMENTS="$1" + + if /usr/bin/getent passwd "$1" >> /dev/null; then + continue + fi + + # Split user and Group id. Must work with busybox sh. + case $2 in + (*:*) USER_ID=${2%:*} GROUP_ID=${2##*:};; + (*) USER_ID=$2 GROUP_ID="";; + esac + + if [ -n "$USER_ID" ] && [ "$USER_ID" != "-" ]; then + ARGUMENTS="-u $USER_ID $ARGUMENTS" + fi + + homedir="/" # If null, empty or '-' + if [ "${4:--}" != "-" ]; then + homedir="$4" + fi + + # Set shell only if not null, empty nor '-' + if [ "${5:--}" != "-" ]; then + ARGUMENTS="$ARGUMENTS -s $5" + else + ARGUMENTS="$ARGUMENTS -s /usr/bin/nologin" + fi + + if [ -x /usr/bin/useradd ]; then + if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then + ARGUMENTS="-g $GROUP_ID $ARGUMENTS" + else + # this is useradd/shadow specific + if /usr/bin/getent group "$1" >> /dev/null; then + ARGUMENTS="-g $1 $ARGUMENTS" + else + ARGUMENTS="-U $ARGUMENTS" + fi + fi + + run /usr/bin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS + elif [ -x "$busybox" ]; then + if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then + run $busybox adduser -S -H -g "$3" -G "GROUP_ID" -h "${homedir}" $ARGUMENTS + else + /usr/bin/getent group "$1" >> /dev/null || $busybox addgroup -S "$1" + + run $busybox adduser -S -H -g "$3" -G "$1" -h "${homedir}" $ARGUMENTS + fi + else + echo "ERROR: neither useradd nor busybox found!" + exit 1 + fi + ;; + m) + shift + if [ -x /usr/bin/usermod ] ; then + run /usr/bin/usermod -a -G "$2" "$1" + elif [ -x "$busybox" ]; then + run $busybox addgroup "$1" "$2" + else + echo "ERROR: neither usermod nor busybox found!" + exit 1 + fi + ;; + r) + echo "range option ignored: \"$LINE\"" + ;; + *) + echo "Syntax Error: \"$LINE\"" + exit 1 + ;; + esac + done +fi diff --git a/SPECS/tar/0001-tar-1.35-revert-fix-savannah-bug-633567.patch b/SPECS/tar/0001-tar-1.35-revert-fix-savannah-bug-633567.patch new file mode 100644 index 00000000..a00cf484 --- /dev/null +++ b/SPECS/tar/0001-tar-1.35-revert-fix-savannah-bug-633567.patch @@ -0,0 +1,72 @@ +From d437ecf75de2d6fdeb2aed6f45c4b3b16373389b Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Fri, 11 Aug 2023 21:35:30 +0300 +Subject: [PATCH] Revert "Fix savannah bug #63567" + +Commit e89c7a45eb broke deletion from archives. The reported number +of bytes read is rounded to the nearest record anyway, revert the +commit and document the fact. + +Reported by Ed Santiago. See +https://bugzilla.redhat.com/show_bug.cgi?id=2230127 + +* doc/tar.texi: Document the fact that --totals rounds up the +number of bytes reads to the nearest record. +* src/buffer.c: Revert changes. +* tests/delete06.at: Fix expected status code and stderr. +--- + doc/tar.texi | 5 +++++ + src/buffer.c | 3 +-- + tests/delete06.at | 7 +++++-- + 3 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/doc/tar.texi b/doc/tar.texi +index d43b39e4..ee631137 100644 +--- a/doc/tar.texi ++++ b/doc/tar.texi +@@ -4215,6 +4215,11 @@ Total bytes read: 7924664320 (7.4GiB, 95MiB/s) + @end group + @end smallexample + ++Notice, that since @command{tar} operates on @dfn{records}, the number ++of bytes reported can be rounded up to the nearest full record. This ++can happen, in particular, when the last record in the archive is ++partial. @xref{Blocking}. ++ + Finally, when deleting from an archive, the @option{--totals} option + displays both numbers plus number of bytes removed from the archive: + +diff --git a/src/buffer.c b/src/buffer.c +index 12a0579f..8a575f9a 100644 +--- a/src/buffer.c ++++ b/src/buffer.c +@@ -987,8 +987,7 @@ short_read (size_t status) + } + + record_end = record_start + (record_size - left) / BLOCKSIZE; +- if (left == 0) +- records_read++; ++ records_read++; + } + + /* Flush the current buffer to/from the archive. */ +diff --git a/tests/delete06.at b/tests/delete06.at +index 9668a28c..c84ba20e 100644 +--- a/tests/delete06.at ++++ b/tests/delete06.at +@@ -36,7 +36,10 @@ esac + dd if=archive.tar of=trunc.tar bs=$size count=1 2>/dev/null + tar --delete 'b/' -f trunc.tar + ], +-[0], +-[],[],[],[],[gnu, pax]) ++[2], ++[], ++[tar: lseek: trunc.tar: Value too large for defined data type ++tar: Exiting with failure status due to previous errors ++],[],[],[gnu, pax]) + + AT_CLEANUP +-- +2.41.0 + diff --git a/SPECS/tar/tar.spec b/SPECS/tar/tar.spec new file mode 100644 index 00000000..c4b9007a --- /dev/null +++ b/SPECS/tar/tar.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tar +Version: 1.35 +Release: %autorelease +Summary: GNU file archiving program +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/tar/tar.html +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig +BuildSystem: autotools + +# Next release will fix this - 251 +Patch0: 0001-tar-1.35-revert-fix-savannah-bug-633567.patch + +BuildRequires: gettext +BuildRequires: acl-devel +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: make +BuildRequires: texinfo + + +%install -a +%find_lang %{name} --generate-subpackages + +%description +The GNU tar program saves many files together in one archive and can +restore individual files (or all of the files) from that archive. Tar +can also be used to add supplemental files to an archive and to update +or list files in the archive. Tar includes multivolume support, +automatic archive compression/decompression, the ability to perform +remote archives, and the ability to perform incremental and full +backups. + +If you want to use tar for remote backups, you also need to install +the rmt package on the remote box. + +%files +%license COPYING +%doc AUTHORS README THANKS NEWS ChangeLog +%{_bindir}/tar +%{_libexecdir}/rmt +%{_mandir}/man1/tar.1* +%{_mandir}/man8/rmt.8* +%{_infodir}/tar.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/tcl/macros.tcl b/SPECS/tcl/macros.tcl new file mode 100644 index 00000000..ac787fdd --- /dev/null +++ b/SPECS/tcl/macros.tcl @@ -0,0 +1,14 @@ +# RPM macros for Tcl + +# The minor version of Tcl +%tcl_version %(echo 'puts [info tclversion]'|tclsh) + +# compiled packges should go here +%tcl_archdir %(echo 'puts [lindex $tcl_pkgPath 0]'|tclsh) + +# script-only packages should go here +%tcl_noarchdir %(echo 'puts [lindex $tcl_pkgPath 1]'|tclsh) + +# tclscriptdir is deprecated, please use tcl_archdir or +# tcl_noarchdir instead, depending on the type of your package +%tclscriptdir %tcl_noarchdir diff --git a/SPECS/tcl/tcl.spec b/SPECS/tcl/tcl.spec new file mode 100644 index 00000000..08d3c7ca --- /dev/null +++ b/SPECS/tcl/tcl.spec @@ -0,0 +1,175 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tcl +URL: http://www.tcl.tk +Version: 8.6.16 +Release: %autorelease +%define rrc %{nil} +%define TCL_MINOR %(echo %version | cut -c1-3) +%define itclver 4.3.2 +Summary: The Tcl Programming Language +License: TCL +Provides: itcl = %itclver +Provides: tclsh +Provides: tclsh%{TCL_MINOR} +Obsoletes: itcl < %itclver +# Require the extension from the SQLite package instead of shipping +# the embedded copy, which might be outdated. +Requires: (sqlite-tcl if sqlite) +PreReq: /bin/rm +#!RemoteAsset +Source0: http://prdownloads.sourceforge.net/tcl/%{name}%{version}%{rrc}-src.tar.gz +Source3: macros.tcl +BuildRequires: autoconf +BuildRequires: pkg-config +BuildRequires: zlib-devel +# Required for test suite: +BuildRequires: tzdata + + +BuildSystem: autotools +BuildOption(conf): --enable-man-symlinks +BuildOption(conf): --enable-man-compression=gzip +BuildOption(conf): --without-tzdata +BuildOption(build): -C unix + +%define scriptdir %_libdir/tcl +BuildOption(build): PACKAGE_DIR="%scriptdir" + +%description +Tcl (Tool Command Language) is a very powerful but easy to learn +dynamic programming language, suitable for a very wide range of uses, +including web and desktop applications, networking, administration, +testing and many more. Open source and business-friendly, Tcl is a +mature yet evolving language that is truly cross platform, easily +deployed and highly extensible. + +For more information on Tcl see http://www.tcl.tk and +http://wiki.tcl.tk . + +%package devel +Summary: Header Files and C API Documentation for Tcl +Group: Development/Libraries/Tcl +Requires: tcl = %version + +%description devel +This package contains header files and documentation needed for writing +Tcl extensions in compiled languages like C, C++, etc., or for +embedding the Tcl interpreter in programs written in such languages. + +This package is not needed for writing extensions or applications in +the Tcl language itself. + +%prep +%setup -q -n %{name}%{version} +if ! test -d pkgs/itcl%itclver; then + : New itcl version: pkgs/itcl* . Please update the %%itclver macro acordingly. + exit 1 +fi + +# The SQLite extension is provided by the sqlite3 package, +# so don't build it here. +rm -r pkgs/sqlite3.* + +%conf -p +export TCL_PACKAGE_PATH="%scriptdir:%_datadir/tcl" +export TCL_LIBRARY="%scriptdir/tcl%TCL_MINOR" +cd unix +autoconf -fiv + +%check +cd unix +# Some of the regressioin tests write to $HOME, so better redirect them +mkdir home +export HOME=$PWD/home +# Run the testsuite to gather some data for the profile-based +# optimisation and let rpmbuild fail on unexpected test failures. +cat > known-failures <&1 | tee testresults +grep FAILED testresults | grep -Fvwf known-failures && exit 1 +exit 0 + +%install +make -C unix install install-private-headers \ + INSTALL_ROOT=%buildroot +rm -f %buildroot%scriptdir/tcl%TCL_MINOR/ldAix +ln -sf tclsh%TCL_MINOR %buildroot%_prefix/bin/tclsh +ln -sf tclsh.1.gz %buildroot%_mandir/man1/tclsh%TCL_MINOR.1.gz +mkdir -p %buildroot%_datadir/tcl +install -D %{S:3} -m 644 %buildroot%_rpmmacrodir/macros.tcl + +# The information in TCL_LIBS is not needed for shared libraries +# and we don't support static linking. +sed -i "/^TCL_LIBS=/s/'.*'$//" %buildroot%_libdir/tclConfig.sh +sed -i "/^Libs.private: /s/ .*$//" %buildroot%_libdir/pkgconfig/tcl.pc +rm %buildroot%_mandir/man3/Thread.3.gz + +%if "%_lib" == "lib64" +%post +test -L /usr/lib/tcl%TCL_MINOR && /bin/rm -f /usr/lib/tcl%TCL_MINOR +exit 0 +%endif + +%files +%defattr(-,root,root,755) +%doc README.md changes license.terms ChangeLog* +%docdir %_mandir/mann +%doc %_mandir/man1/* +%doc %_mandir/mann/* +%_prefix/bin/* +%_libdir/lib*.so +%_datadir/tcl +%scriptdir +%exclude %scriptdir/*/*.a +%exclude %scriptdir/*/*Config.sh +%_rpmmacrodir/macros.tcl + +%files devel +%defattr(-,root,root) +%doc %_mandir/man3/* +%_includedir/* +%attr(0644,root,root) %_libdir/*.a +%attr(0644,root,root) %scriptdir/*/*.a +%scriptdir/*/*Config.sh +%_libdir/*Config.sh +%_libdir/pkgconfig/tcl.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/tclap/tclap.spec b/SPECS/tclap/tclap.spec new file mode 100644 index 00000000..d41c49a0 --- /dev/null +++ b/SPECS/tclap/tclap.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tclap +Version: 1.2.5 +Release: %autorelease +Summary: Templatized C++ Command Line Parser +License: MIT +URL: http://tclap.sourceforge.net +#!RemoteAsset +Source: https://downloads.sourceforge.net/tclap/tclap-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libstdc++-devel +BuildRequires: pkgconfig + +%description +TCLAP is a header-only, flexible C++ library for parsing command line arguments. +This is a metapackage that requires the development files. + +%install -a +install -d "%{buildroot}%{_docdir}/%{name}" + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README +%{_includedir}/tclap +%{_libdir}/pkgconfig/tclap.pc +%doc %{_docdir}/tclap/ + +%changelog +%{?autochangelog} diff --git a/SPECS/tcpdump/tcpdump-sysusers.conf b/SPECS/tcpdump/tcpdump-sysusers.conf new file mode 100644 index 00000000..0298236f --- /dev/null +++ b/SPECS/tcpdump/tcpdump-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u tcpdump 72 "tcpdump" - - \ No newline at end of file diff --git a/SPECS/tcpdump/tcpdump.spec b/SPECS/tcpdump/tcpdump.spec new file mode 100644 index 00000000..0692040c --- /dev/null +++ b/SPECS/tcpdump/tcpdump.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tcpdump +Version: 4.99.5 +Release: %autorelease +Summary: A network traffic monitoring tool +License: BSD-3-Clause AND ISC +URL: https://www.tcpdump.org +#!RemoteAsset +Source0: https://www.tcpdump.org/release/tcpdump-%{version}.tar.xz +Source1: tcpdump-sysusers.conf +BuildSystem: autotools + +BuildOption(conf): --with-crypto +BuildOption(conf): --with-user=tcpdump +BuildOption(conf): --without-smi +BuildOption(build): CFLAGS="%{optflags} -fno-strict-aliasing -DGUESS_TSO" + +BuildRequires: make automake autoconf openssl-devel libpcap-devel gcc systemd-rpm-macros + +%description +Tcpdump is a command-line tool for monitoring network traffic. This package +also includes the tcpslice utility for manipulating tcpdump savefiles. + +%install -a +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/tcpdump.conf + +%files +%license LICENSE +%doc README.md CHANGES CREDITS +%{_bindir}/tcpdump* +%{_sysusersdir}/tcpdump.conf +%{_mandir}/man1/ + +%changelog +%{?autochangelog} diff --git a/SPECS/tcsh/0001-fix-nice-case-fail-if-noroot.patch b/SPECS/tcsh/0001-fix-nice-case-fail-if-noroot.patch new file mode 100644 index 00000000..619d76c6 --- /dev/null +++ b/SPECS/tcsh/0001-fix-nice-case-fail-if-noroot.patch @@ -0,0 +1,13 @@ +--- a/tests/commands.at ++++ b/tests/commands.at +@@ -1039,6 +1039,7 @@ dnl nice + dnl + + AT_SETUP([nice]) ++AT_SKIP_IF([test 'whoami' != 'root']) + AT_KEYWORDS([commands]) + + dnl Nothing really tested +-- +1.8.3.1 + diff --git a/SPECS/tcsh/tcsh.spec b/SPECS/tcsh/tcsh.spec new file mode 100644 index 00000000..50d33345 --- /dev/null +++ b/SPECS/tcsh/tcsh.spec @@ -0,0 +1,86 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tcsh +Version: 6.24.15 +Release: %autorelease +Summary: C shell with file name completion and command line editing +License: BSD +URL: http://www.tcsh.org/ +#!RemoteAsset +Source0: https://astron.com/pub/%{name}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): all + +BuildRequires: gettext-devel +BuildRequires: ncurses-devel +BuildRequires: autoconf +BuildRequires: gcc +Requires(post): coreutils +Requires(post): grep +Requires(postun): sed +Provides: /bin/csh /bin/tcsh +Provides: csh = %{version} + +Patch0: 0001-fix-nice-case-fail-if-noroot.patch + +%description +Tcsh is an enhanced but completely compatible version of the Berkeley +C-Shell, with the addition of a command line editor, command and file +name completion, listing, etc., and a bunch of small additions to the +shell itself. + +%install -a +gzip $RPM_BUILD_ROOT%{_mandir}/man1/tcsh.1 +rm -f $RPM_BUILD_ROOT%{_bindir}/tcsh.old +ln -sf tcsh $RPM_BUILD_ROOT%{_bindir}/csh +ln -sf tcsh.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/csh.1.gz + +localedir="$RPM_BUILD_ROOT%{_datadir}/locale"; +for lang in $(ls $localedir); do + if [ -d $localedir/$lang ]; then + dir="$localedir/$lang/LC_MESSAGES" + if [[ -f "$dir/tcsh.cat" ]]; then + mv $dir/tcsh.cat $dir/tcsh + echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/tcsh" + fi + fi +done > %{name}.lang + +%post +if [[ "$1" -eq 1 ]]; then + if [[ ! -f %{_sysconfdir}/shells ]]; then + echo "/bin/csh" >> %{_sysconfdir}/shells + echo "/bin/tcsh" >> %{_sysconfdir}/shells + echo "%{_bindir}/csh" >> %{_sysconfdir}/shells + echo "%{_bindir}/tcsh" >> %{_sysconfdir}/shells + else + grep -q "^/bin/csh$" %{_sysconfdir}/shells || echo "/bin/csh" >> %{_sysconfdir}/shells + grep -q "^/bin/tcsh$" %{_sysconfdir}/shells || echo "/bin/tcsh" >> %{_sysconfdir}/shells + grep -q "^%{_bindir}/csh$" %{_sysconfdir}/shells || echo "%{_bindir}/csh" >> %{_sysconfdir}/shells + grep -q "^%{_bindir}/tcsh$" %{_sysconfdir}/shells || echo "%{_bindir}/tcsh" >> %{_sysconfdir}/shells + fi +fi + +%postun +if [[ "$1" -eq 0 && -f %{_sysconfdir}/shells ]]; then + sed -i -e '\!^/bin/csh$!d' %{_sysconfdir}/shells + sed -i -e '\!^/bin/tcsh$!d' %{_sysconfdir}/shells + sed -i -e '\!^%{_bindir}/csh$!d' %{_sysconfdir}/shells + sed -i -e '\!^%{_bindir}/tcsh$!d' %{_sysconfdir}/shells +fi + +%files -f %{name}.lang +%defattr(-,root,root) +%doc Copyright FAQ Fixes README.md complete.tcsh +%{_bindir}/tcsh +%{_bindir}/csh +%{_mandir}/man1/*.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/tdb/tdb.spec b/SPECS/tdb/tdb.spec new file mode 100644 index 00000000..645b90ab --- /dev/null +++ b/SPECS/tdb/tdb.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tdb +Version: 1.4.14 +Release: %autorelease +Summary: A Trivial Database library +License: LGPL-3.0-or-later +URL: https://tdb.samba.org/ +#!RemoteAsset +Source: https://samba.org/ftp/tdb/tdb-%{version}.tar.gz + +BuildSystem: autotools + +BuildOption(conf): --disable-rpath --bundled-libraries=NONE --builtin-libraries=replace +BuildOption(conf): --disable-python --without-gettext + +BuildRequires: python3 + +%description +The Tdb library implements a trivial database that is used by Samba and +other projects. It is extremely fast and designed for concurrent access. + +%package tools +Summary: Command-line tools for managing Tdb databases +Requires: %{name} = %{version} + +%description tools +This package contains tools to create, view, and manage Tdb database files, +such as tdbdump and tdbtool. + +%package devel +Summary: Development files for the Tdb library +Requires: %{name} = %{version} +Requires: tdb-tools = %{version} + +%description devel +This package contains the header files, pkg-config file, and development +documentation needed to build applications that use the Tdb library. + + +%files +%license LICENSE +%{_libdir}/libtdb.so.* + +%files tools +%{_bindir}/tdbbackup +%{_bindir}/tdbdump +%{_bindir}/tdbtool +%{_bindir}/tdbrestore +# Man pages disabled due to docbook dependency issues + +%files devel +%{_includedir}/tdb.h +%{_libdir}/libtdb.so +%{_libdir}/pkgconfig/tdb.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/tevent/tevent.spec b/SPECS/tevent/tevent.spec new file mode 100644 index 00000000..72abf298 --- /dev/null +++ b/SPECS/tevent/tevent.spec @@ -0,0 +1,79 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tevent +Version: 0.17.1 +Release: %autorelease +Summary: The tevent library +License: LGPL-3.0-or-later +URL: https://tevent.samba.org/ +# TODO: We can't get a VCS link for tevent... +VCS: git:https://git.samba.org/samba.git +#!RemoteAsset +Source0: https://download.samba.org/pub/tevent/tevent-%{version}.tar.gz +#!RemoteAsset +Source1: https://download.samba.org/pub/tevent/tevent-%{version}.tar.asc +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --bundled-libraries=NONE +BuildOption(conf): --builtin-libraries=replace + +BuildRequires: make +BuildRequires: libxslt +BuildRequires: pkgconfig(cmocka) +BuildRequires: pkgconfig(talloc) +BuildRequires: python3-devel +BuildRequires: python3-talloc-devel + +%description +Tevent is an event system based on the talloc memory management library. +Tevent has support for many event types, including timers, signals, and +the classic file descriptor events. +Tevent also provide helpers to deal with asynchronous code providing the +tevent_req (Tevent Request) functions. + +%package devel +Summary: Developer tools for the Tevent library +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig(talloc) + +%description devel +Header files needed to develop programs that link against the Tevent library. + +%package -n python-tevent +Summary: Python bindings for the Tevent library +Provides: python3-tevent +Requires: %{name} = %{version}-%{release} +%python_provide python3-tevent + +%description -n python-tevent +Python bindings for tevent + +%conf -p +# workaround https://gitlab.com/ita1024/waf/-/issues/2472 +export PYTHONARCHDIR=%{python3_sitearch} + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_libdir}/libtevent.so.* + +%files devel +%{_includedir}/tevent.h +%{_libdir}/libtevent.so +%{_libdir}/pkgconfig/tevent.pc + +%files -n python-tevent +%{python3_sitearch}/tevent.py +# TODO: figure out why we don't have this - 251 +#{python3_sitearch}/__pycache__/tevent.* +%{python3_sitearch}/_tevent.cpython*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/texinfo/texinfo.spec b/SPECS/texinfo/texinfo.spec new file mode 100644 index 00000000..f32f0750 --- /dev/null +++ b/SPECS/texinfo/texinfo.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# perl modules are not installed in global path +%global __provides_exclude ^(libtool|perl)\\( + +Name: texinfo +Version: 7.2 +Release: %autorelease +Summary: Tools needed to create Texinfo format documentation files +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/texinfo/texinfo.html +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig +BuildSystem: autotools + +BuildRequires: perl +Requires: perl +BuildRequires: ncurses-devel +BuildRequires: help2man + +%description +Texinfo is a documentation system that can produce both online +information and printed output from a single source file. The GNU +Project uses the Texinfo file format for most of its documentation. + +Install texinfo if you want a documentation system for producing both +online and print documentation from the same source file and/or if you +are going to write documentation for the GNU Project. + +%package devel +Summary: Development files for Texinfo +Requires: %{name} = %{version}-%{release} + +%description devel +Development files for Texinfo + +%files +%doc AUTHORS ChangeLog NEWS README TODO +%doc doc/texinfo.tex doc/txi-*.tex doc/refcard/*.pdf +%license COPYING +%{_bindir}/makeinfo +%{_bindir}/texi2any +%{_bindir}/pod2texi +%{_bindir}/info +%{_bindir}/texindex +%{_bindir}/texi2dvi +%{_bindir}/texi2pdf +%{_bindir}/pdftexi2dvi +%{_bindir}/install-info +%{_datadir}/texinfo +%{_datadir}/texi2any +%{_infodir}/texinfo* +%{_infodir}/texi2any_api.info* +%{_infodir}/texi2any_internals.info* +%{_infodir}/info-stnd.info* +%{_datadir}/locale/* +%{_mandir}/man1/makeinfo.1* +%{_mandir}/man1/texi2any.1* +%{_mandir}/man1/pod2texi.1* +%{_mandir}/man1/info.1* +%{_mandir}/man1/install-info.1* +%{_mandir}/man1/texindex.1* +%{_mandir}/man1/texi2dvi.1* +%{_mandir}/man1/texi2pdf.1* +%{_mandir}/man1/pdftexi2dvi.1* +%{_mandir}/man5/texinfo.5* +%{_mandir}/man5/info.5* + +%files devel +%{_libdir}/texi2any/* + +%changelog +%{?autochangelog} diff --git a/SPECS/time/time.spec b/SPECS/time/time.spec new file mode 100644 index 00000000..5291460b --- /dev/null +++ b/SPECS/time/time.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: time +Version: 1.9 +Release: %autorelease +Summary: Run Programs And Summarize System Resource Usage +License: GPL-3.0-or-later +URL: https://www.gnu.org/software/time/ +#!RemoteAsset +Source: https://ftpmirror.gnu.org/gnu/time/%{name}-%{version}.tar.gz +#!RemoteAsset +Source2: https://ftpmirror.gnu.org/gnu/time/%{name}-%{version}.tar.gz.sig +BuildSystem: autotools +BuildOption(conf): CFLAGS="%{build_cflags} -Wno-error=incompatible-pointer-types" + +%description +The "time" command runs another program, then displays information +about the resources used by that program, collected by the system +while the program was running. + +%install -a +install -d %{buildroot}%{_mandir}/man1 + +%files +%license COPYING +%doc AUTHORS NEWS README +%{_bindir}/time +%{_infodir}/time.info* + +%changelog +%{?autochangelog} diff --git a/SPECS/tinyxml2/tinyxml2.spec b/SPECS/tinyxml2/tinyxml2.spec new file mode 100644 index 00000000..8b1b6034 --- /dev/null +++ b/SPECS/tinyxml2/tinyxml2.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tinyxml2 +Version: 11.0.0 +Release: %autorelease +Summary: Small XML parser for C++ +License: ZLIB +URL: https://leethomason.github.io/tinyxml2/ +#!RemoteAsset +Source0: https://github.com/leethomason/tinyxml2/archive/refs/tags/%{version}.tar.gz + +BuildRequires: gcc-c++ +BuildRequires: meson +BuildSystem: meson + +%description +TinyXML2 is a small and simple XML parsing library for the +C++ programming language. + +%package devel +Summary: Development files for the tinyxml2 library +Requires: %{name} = %{version} + +%description devel +This package contains the C++ header files, libraries, and build system files +needed to develop applications that use the tinyxml2 library. + +%ldconfig_scriptlets + +%files +%license LICENSE.txt +%doc readme.md +%{_libdir}/libtinyxml2.so.* + +%files devel +%{_includedir}/tinyxml2.h +%{_libdir}/libtinyxml2.so +%{_libdir}/pkgconfig/tinyxml2.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/tmux/tmux.spec b/SPECS/tmux/tmux.spec new file mode 100644 index 00000000..9014248e --- /dev/null +++ b/SPECS/tmux/tmux.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tmux +Version: 3.5a +Release: %autorelease +Summary: A terminal multiplexer +# SOURCE0 licensed under ISC AND BSD, SOURCE1 licensed under GPL-2.0-only +License: ISC AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only +URL: https://tmux.github.io/ +#!RemoteAsset +Source0: https://github.com/tmux/tmux/releases/download/%{version}/tmux-%{version}.tar.gz +#!RemoteAsset +Source1: https://github.com/imomaliev/tmux-bash-completion/raw/refs/heads/master/completions/tmux +BuildSystem: autotools + +BuildOption(conf): --enable-sixel +BuildOption(conf): --enable-systemd +BuildOption(conf): --enable-utempter +BuildOption(conf): --enable-utf8proc + +BuildRequires: gcc +BuildRequires: pkgconfig(libevent) >= 2 +BuildRequires: (pkgconfig(tinfo) or pkgconfig(ncurses) or pkgconfig(ncursesw)) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libutf8proc) +BuildRequires: libutempter-devel +BuildRequires: bison + +%description +tmux is a "terminal multiplexer." It enables a number of terminals (or +windows) to be accessed and controlled from a single terminal. tmux is +intended to be a simple, modern, BSD-licensed alternative to programs such +as GNU Screen. + +%install -a + +install -Dpm 644 %{S:1} %{buildroot}%{_datadir}/bash-completion/completions/tmux + +%files +%license COPYING +%{_mandir}/man1/tmux.1* +%{_bindir}/tmux +%{_datadir}/bash-completion/completions/tmux + +%changelog +%{?autochangelog} diff --git a/SPECS/toml11/toml11.spec b/SPECS/toml11/toml11.spec new file mode 100644 index 00000000..b514af43 --- /dev/null +++ b/SPECS/toml11/toml11.spec @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: toml11 +Version: 4.4.0 +Release: %autorelease +Summary: TOML for modern C++ +License: MIT +URL: https://github.com/ToruNiina/toml11 +#!RemoteAsset +Source0: https://github.com/ToruNiina/toml11/archive/refs/tags/v%{version}.tar.gz + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildSystem: cmake + +%description +@code{toml11} is a C++11 (or later) header-only toml parser/encoder +depending only on C++ standard library. + +@itemize +@item It is compatible to the latest version of TOML v1.0.0. +@item It is one of the most TOML standard compliant libraries, tested with +a language agnostic test suite for TOML parsers. +@item It shows highly informative error messages. +@item It has configurable container. You can use any random-access containers +and key-value maps as backend containers. +@item It optionally preserves comments without any overhead. +@item It has configurable serializer that supports comments, inline tables, +literal strings and multiline strings. +@item It supports user-defined type conversion from/into toml values. +@item It correctly handles UTF-8 sequences, with or without BOM. +@end itemize + +%files +%license LICENSE +%doc README.md +%{_includedir}/toml.hpp +%{_includedir}/toml11/*.hpp +%{_includedir}/toml11/*/*.hpp +%{_libdir}/cmake/toml11/*.cmake + +%changelog +%{?autochangelog} diff --git a/SPECS/tpm2-tss/tpm2-tss.spec b/SPECS/tpm2-tss/tpm2-tss.spec new file mode 100644 index 00000000..e42bcb4d --- /dev/null +++ b/SPECS/tpm2-tss/tpm2-tss.spec @@ -0,0 +1,118 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tpm2-tss +Version: 4.1.3 +Release: %autorelease +Summary: TPM2.0 Software Stack +License: BSD-2-Clause +URL: https://github.com/tpm2-software/tpm2-tss +#!RemoteAsset +Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --with-udevrulesdir=%{_udevrulesdir} +BuildOption(conf): --with-udevrulesprefix=%{udevrules_prefix} +BuildOption(conf): --with-runstatedir=%{_rundir} +BuildOption(conf): --with-tmpfilesdir=%{_tmpfilesdir} +BuildOption(conf): --with-sysusersdir=%{_sysusersdir} + +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libgcrypt) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(openssl) + +%description +tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system +APIs. It sits between TPM driver and applications, providing TPM2.0 specified +APIs for applications to access TPM module through kernel TPM drivers. + +%package devel +Summary: Headers and libraries for building apps that use tpm2-tss +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains headers and libraries required to build applications that +use tpm2-tss. + +%install -a +find %{buildroot}%{_libdir} -type f -name \*.la -delete + +%ldconfig_scriptlets + +%files +%doc README.md CHANGELOG.md +%license LICENSE +%{_sysconfdir}/tpm2-tss/ +%{_libdir}/libtss2-mu.so.0* +%{_libdir}/libtss2-sys.so.1* +%{_libdir}/libtss2-esys.so.0* +%{_libdir}/libtss2-policy.so.0* +%{_libdir}/libtss2-rc.so.0* +%{_libdir}/libtss2-tctildr.so.0* +%{_libdir}/libtss2-tcti-cmd.so.0* +%{_libdir}/libtss2-tcti-device.so.0* +%{_libdir}/libtss2-tcti-mssim.so.0* +%{_libdir}/libtss2-tcti-pcap.so.0* +%{_libdir}/libtss2-tcti-i2c-helper.so.0* +%{_libdir}/libtss2-tcti-spidev.so.0* +%{_libdir}/libtss2-tcti-spi-helper.so.0* +%{_libdir}/libtss2-tcti-spi-ltt2go.so.0* +%{_libdir}/libtss2-tcti-swtpm.so.0* +%{_sysusersdir}/tpm2-tss.conf +%{_udevrulesdir}/%{udevrules_prefix}tpm-udev.rules +%{_libdir}/libtss2-fapi.so.1* +%{_tmpfilesdir}/tpm2-tss-fapi.conf + +%files devel +%{_includedir}/tss2/ +%{_libdir}/libtss2-mu.so +%{_libdir}/libtss2-sys.so +%{_libdir}/libtss2-esys.so +%{_libdir}/libtss2-fapi.so +%{_libdir}/libtss2-policy.so +%{_libdir}/libtss2-rc.so +%{_libdir}/libtss2-tctildr.so +%{_libdir}/libtss2-tcti-cmd.so +%{_libdir}/libtss2-tcti-device.so +%{_libdir}/libtss2-tcti-mssim.so +%{_libdir}/libtss2-tcti-pcap.so +%{_libdir}/libtss2-tcti-i2c-helper.so +%{_libdir}/libtss2-tcti-spidev.so +%{_libdir}/libtss2-tcti-spi-helper.so +%{_libdir}/libtss2-tcti-spi-ltt2go.so +%{_libdir}/libtss2-tcti-swtpm.so +%{_libdir}/pkgconfig/tss2-mu.pc +%{_libdir}/pkgconfig/tss2-sys.pc +%{_libdir}/pkgconfig/tss2-esys.pc +%{_libdir}/pkgconfig/tss2-fapi.pc +%{_libdir}/pkgconfig/tss2-policy.pc +%{_libdir}/pkgconfig/tss2-rc.pc +%{_libdir}/pkgconfig/tss2-tctildr.pc +%{_libdir}/pkgconfig/tss2-tcti-cmd.pc +%{_libdir}/pkgconfig/tss2-tcti-device.pc +%{_libdir}/pkgconfig/tss2-tcti-mssim.pc +%{_libdir}/pkgconfig/tss2-tcti-pcap.pc +%{_libdir}/pkgconfig/tss2-tcti-i2c-helper.pc +%{_libdir}/pkgconfig/tss2-tcti-spidev.pc +%{_libdir}/pkgconfig/tss2-tcti-spi-helper.pc +%{_libdir}/pkgconfig/tss2-tcti-spi-ltt2go.pc +%{_libdir}/pkgconfig/tss2-tcti-swtpm.pc +%{_mandir}/man3/*.3.gz +%{_mandir}/man5/*.5.gz +%{_mandir}/man7/tss2*.7.gz + +%changelog +%{?autochangelog} diff --git a/SPECS/tre/tre.spec b/SPECS/tre/tre.spec new file mode 100644 index 00000000..fd2ae25f --- /dev/null +++ b/SPECS/tre/tre.spec @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tre +Version: 0.9.0 +Release: %autorelease +Summary: POSIX-compatible regexp library with approximate matching +License: BSD-3-Clause +URL: https://laurikari.net/tre/ +#!RemoteAsset +Source: https://github.com/laurikari/tre/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --enable-shared + +%description +TRE is a POSIX-compatible regexp matching library with approximate +(fuzzy) matching. This package contains the runtime library and the +agrep utility. + +%package devel +Summary: Development files for the TRE regex library +Requires: %{name} = %{version} + +%description devel +This package contains the header files, pkg-config files, and documentation +needed to develop applications that use the TRE library. + +%install -a +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets + +%files +%license LICENSE +%{_bindir}/agrep +%{_mandir}/man1/agrep.1* +%{_libdir}/libtre.so.5 +%{_libdir}/libtre.so.5.* + +%files devel +%doc doc/default.css doc/tre-api.html doc/tre-syntax.html +%{_includedir}/* +%{_libdir}/libtre.so +%{_libdir}/pkgconfig/* + +%changelog +%{?autochangelog} diff --git a/SPECS/tzdata/tzdata.spec b/SPECS/tzdata/tzdata.spec new file mode 100644 index 00000000..d3ec0a0f --- /dev/null +++ b/SPECS/tzdata/tzdata.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: tzdata +Version: 2025b +Release: %autorelease +Summary: Timezone data +# I'm not sure about this... but I checked from below - 251 +# https://data.iana.org/time-zones/tzdb-2025b/LICENSE +License: CC0-1.0 AND BSD-3-Clause +URL: https://www.iana.org/time-zones +#!RemoteAsset +Source0: https://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz +#!RemoteAsset +Source1: https://www.iana.org/time-zones/repository/releases/tzdata%{version}.tar.gz.asc +#!RemoteAsset +Source2: https://www.iana.org/time-zones/repository/releases/tzcode%{version}.tar.gz +#!RemoteAsset +Source3: https://www.iana.org/time-zones/repository/releases/tzcode%{version}.tar.gz.asc +BuildSystem: autotools + +# Also extract %%{SOURCE2} +BuildOption(prep): -a 2 +BuildOption(build): VERSION=%{version} ZFLAGS="-b fat" DATAFORM=vanguard tzdata.zi + +BuildRequires: make +BuildRequires: perl +BuildRequires: glibc-locale + +%description +This package contains data files with rules for various timezones around +the world. + +%conf +# No configure + +%build -p +# We need zic before compiling tzdata +%make_build TZDIR=%{_datadir}/zoneinfo CC=%__cc CFLAGS="%{optflags} -DHAVE_GETTEXT=1 -DTZDEFAULT='\"%{_sysconfdir}/localtime\"' -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -Dlint" AWK=%__awk KSHELL=%_buildshell + +%build -a +FILES="africa antarctica asia australasia europe northamerica southamerica + etcetera backward factory" +mkdir zoneinfo/{,posix,right} +./zic -b fat -y ./yearistype -d zoneinfo -L /dev/null $FILES +./zic -b fat -y ./yearistype -d zoneinfo/posix -L /dev/null $FILES +./zic -b fat -y ./yearistype -d zoneinfo/right -L leapseconds $FILES + +%install +# We control the full install +rm -fr $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_datadir} +cp -prd zoneinfo $RPM_BUILD_ROOT%{_datadir} +install -p -m 644 zone.tab zone1970.tab iso3166.tab leap-seconds.list leapseconds tzdata.zi $RPM_BUILD_ROOT%{_datadir}/zoneinfo + +install -D -m 755 tzselect %{buildroot}%{_bindir}/tzselect +install -D -m 755 zdump %{buildroot}%{_bindir}/zdump +install -D -m 755 zic %{buildroot}%{_bindir}/zic + +%files +%license LICENSE +%doc README +%doc theory.html +%doc tz-link.html +%doc tz-art.html +%{_datadir}/zoneinfo +%{_bindir}/zdump +%{_bindir}/zic +%{_bindir}/tzselect + +%changelog +%{?autochangelog} diff --git a/SPECS/uid_wrapper/uid_wrapper.spec b/SPECS/uid_wrapper/uid_wrapper.spec new file mode 100644 index 00000000..493f7599 --- /dev/null +++ b/SPECS/uid_wrapper/uid_wrapper.spec @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: uid_wrapper +Version: 1.3.2 +Release: %autorelease +Summary: A wrapper for privilege separation +License: GPL-3.0-or-later +URL: http://cwrap.org/ +#!RemoteAsset +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc +BuildSystem: cmake + +BuildOption(conf): -DUNIT_TESTING=ON + +BuildRequires: cmake +BuildRequires: cmocka-cmake + +Recommends: cmake +Recommends: pkgconfig + +%description +Some projects like a file server need privilege separation to be able to switch +to the connection user and do file operations. uid_wrapper convincingly lies +to the application letting it believe it is operating as root and even +switching between UIDs and GIDs as needed. + +To use it set the following environment variables: + +LD_PRELOAD=libuid_wrapper.so +UID_WRAPPER=1 + +This package doesn't have a devel package cause this project is for +development/testing. + +%ldconfig_scriptlets + +%files +%doc AUTHORS README.md CHANGELOG +%license LICENSE +%{_libdir}/libuid_wrapper.so* +%dir %{_libdir}/cmake +%dir %{_libdir}/cmake/uid_wrapper +%{_libdir}/cmake/uid_wrapper/uid_wrapper-config-version.cmake +%{_libdir}/cmake/uid_wrapper/uid_wrapper-config.cmake +%{_libdir}/pkgconfig/uid_wrapper.pc +%{_mandir}/man1/uid_wrapper.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/unbound/block-example.com.conf b/SPECS/unbound/block-example.com.conf new file mode 100644 index 00000000..48074488 --- /dev/null +++ b/SPECS/unbound/block-example.com.conf @@ -0,0 +1,10 @@ +# entries in this file override toe global DNS +# +# Example blocking email going out to example.com +# +# local-data: "example.com. 3600 IN MX 5 127.0.0.1" +# local-data: "example.com. 3600 IN A 127.0.0.1" + +# This can also be done dynamically using: unbound-control local-data [...] + +# For more complicated redirection, use conf.d/ with stub-add: or forward-add: diff --git a/SPECS/unbound/example.com.conf b/SPECS/unbound/example.com.conf new file mode 100644 index 00000000..30f7f03b --- /dev/null +++ b/SPECS/unbound/example.com.conf @@ -0,0 +1,17 @@ +# Example of an override of the "public DNS tree" with an "internal view" +# override, for example to add an internal-only corporate DNS zone. +# +# The stub-zone/stub-addr must point to AUTHORITATIVE servers. If you want to +# point to an internal RECURSIVE server, use forward-zone/forward-addr instead. + +#stub-zone: +# name: example.com +# stub-prime: no +# # if you could trust a lookup, use: +# stub-host: a.iana-servers.net. +# stub-host: b.iana-servers.net. +# # else specify the IP's using: +# stub-addr: 199.43.132.53 +# stub-addr: 2001:500:8c::53 +# stub-addr: 199.43.133.53 +# stub-addr: 2001:500:8d::53 diff --git a/SPECS/unbound/example.com.key b/SPECS/unbound/example.com.key new file mode 100644 index 00000000..a70c13fd --- /dev/null +++ b/SPECS/unbound/example.com.key @@ -0,0 +1,7 @@ +; // format is BIND trusted-keys format +; // Ensure to only put KSKs (usually 257) here, not ZSKs (usually 256) + +; // trusted-keys { +; // "example.com." 257 3 8 "AwEAAawt7HplI5M8GGAsxuyCyjF0l+QlcgVN11CRZ4vP66qbDCX0BnShZ11BGb//4zSG/8mmBHirL2FLg+mVuIIxig+iroZYjh4iTKVOhv2hZftRwyrQHK++qXvCCWN3ki51RG/e8R4kOEV71rZ8OgQvPWx6F91qroqOPpcf7PPxippeHOn+PxnP0hpyLyo1mx1rPs/cMpL3jOMufGP+LJYh+fBU7lt0sP5i09HaJPruzyZML9BPtpv8ZAdQhwtXVG0+MnET2qT/1+TljpxZn6yeegFRCFRHBjMo6iiRJnUWra/klkrgEn2Q+BXGTOMTTKQdYz4OxYEa1z7apu3a09dYNBM="; // key id = 51605 +; // "example.com." 257 3 8 "AwEAAeikvxboZpn9VCxm3YDLHo40SvA9EmRwJHHQyJ0OCzrQSRBSipojrW7yESXWiDDyzflS8rgzDs7M3fIdSduOdyNi55DmXPdkS8HYORTMNyzFsSOg+xx6tUySK2p4WAhlbsJNLz4IkQCek59NoDBOLyQ15npsr7Tgfb/HHU7zmCMvnxh0SqO2lyhnQfk29Thc3nC4KNJNb3drjWKOuCw5mg+2GrEZYc/VqdeGvrOCQ2el8jWZpSU5cxb7EdEy4B9nEeZiBpHXaZ5XJ+ewi4vmcUK5/445mGJqV4rDeicy5/ShC/BJ81v3bIRPWebvDRJmDbjr2d9MnLXUE7yyETrQd18="; // key id = 31589 +; // }; diff --git a/SPECS/unbound/root.anchor b/SPECS/unbound/root.anchor new file mode 100644 index 00000000..15595426 --- /dev/null +++ b/SPECS/unbound/root.anchor @@ -0,0 +1,2 @@ +. 172800 IN DNSKEY 257 3 8 AwEAAa96jeuknZlaeSrvyAJj6ZHv28hhOKkx3rLGXVaC6rXTsDc449/cidltpkyGwCJNnOAlFNKF2jBosZBU5eeHspaQWOmOElZsjICMQMC3aeHbGiShvZsx4wMYSjH8e7Vrhbu6irwCzVBApESjbUdpWWmEnhathWu1jo+siFUiRAAxm9qyJNg/wOZqqzL/dL/q8PkcRU5oUKEpUge71M3ej2/7CPqpdVwuMoTvoB+ZOT4YeGyxMvHmbrxlFzGOHOijtzN+u1TQNatX2XBuzZNQ1K+s2CXkPIZo7s6JgZyvaBevYtxPvYLw4z9mR7K2vaF18UYH9Z9GNUUeayffKC73PYc= ;{id = 38696 (ksk), size = 2048b} +. 172800 IN DNSKEY 257 3 8 AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3+/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kvArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+eoZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfdRUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwNR1AkUTV74bU= ;{id = 20326 (ksk), size = 2048b} diff --git a/SPECS/unbound/root.key b/SPECS/unbound/root.key new file mode 100644 index 00000000..848887dd --- /dev/null +++ b/SPECS/unbound/root.key @@ -0,0 +1,8 @@ +# The root key in obsoleted bind format. This can be read by some tools, including +# named, unbound, delv etc. For libunbound, use ub_ctx_trustedkeys() to load this +# Prefer DNS format in /var/lib/unbound/root.key or /etc/unbound/dnssec-root.key, +# ub_ctx_add_ta_file or trust-anchor-file: format +trusted-keys { +"." 257 3 8 "AwEAAa96jeuknZlaeSrvyAJj6ZHv28hhOKkx3rLGXVaC6rXTsDc449/cidltpkyGwCJNnOAlFNKF2jBosZBU5eeHspaQWOmOElZsjICMQMC3aeHbGiShvZsx4wMYSjH8e7Vrhbu6irwCzVBApESjbUdpWWmEnhathWu1jo+siFUiRAAxm9qyJNg/wOZqqzL/dL/q8PkcRU5oUKEpUge71M3ej2/7CPqpdVwuMoTvoB+ZOT4YeGyxMvHmbrxlFzGOHOijtzN+u1TQNatX2XBuzZNQ1K+s2CXkPIZo7s6JgZyvaBevYtxPvYLw4z9mR7K2vaF18UYH9Z9GNUUeayffKC73PYc="; // key id = 38696 +"." 257 3 8 "AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3+/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kvArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+eoZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfdRUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwNR1AkUTV74bU="; // key id = 20326 +}; diff --git a/SPECS/unbound/tmpfiles-unbound.conf b/SPECS/unbound/tmpfiles-unbound.conf new file mode 100644 index 00000000..c09cc755 --- /dev/null +++ b/SPECS/unbound/tmpfiles-unbound.conf @@ -0,0 +1 @@ +D /run/unbound 0775 unbound root - diff --git a/SPECS/unbound/unbound-anchor.service b/SPECS/unbound/unbound-anchor.service new file mode 100644 index 00000000..11162434 --- /dev/null +++ b/SPECS/unbound/unbound-anchor.service @@ -0,0 +1,10 @@ +[Unit] +Description=update of the root trust anchor for DNSSEC validation in unbound +Documentation=man:unbound-anchor(8) + +[Service] +Type=oneshot +User=unbound +EnvironmentFile=-/etc/sysconfig/unbound +ExecStart=/bin/bash -c 'if [ "$DISABLE_UNBOUND_ANCHOR" = "yes" ] || [ -f /run/unbound/anchor-disable ]; then echo "Updates of root keys with unbound-anchor is disabled"; else /usr/sbin/unbound-anchor $UNBOUND_ANCHOR_OPTIONS; fi' +SuccessExitStatus=1 diff --git a/SPECS/unbound/unbound-anchor.timer b/SPECS/unbound/unbound-anchor.timer new file mode 100644 index 00000000..a87bf5c8 --- /dev/null +++ b/SPECS/unbound/unbound-anchor.timer @@ -0,0 +1,14 @@ +[Unit] +Description=daily update of the root trust anchor for DNSSEC +Documentation=man:unbound-anchor(8) + +[Timer] +# Current DNSKEY TTL in root zone is 172800 seconds, i.e. 172800/60/60/24 = 2 days. +# It means that unboud-anchor should be run at least once a day. +OnCalendar=daily +Persistent=true +AccuracySec=24h + +[Install] +WantedBy=timers.target + diff --git a/SPECS/unbound/unbound-keygen.service b/SPECS/unbound/unbound-keygen.service new file mode 100644 index 00000000..b1690022 --- /dev/null +++ b/SPECS/unbound/unbound-keygen.service @@ -0,0 +1,18 @@ +[Unit] +Description=Unbound Control Key And Certificate Generator +After=syslog.target +Before=unbound.service +ConditionPathExists=|!/etc/unbound/unbound_control.pem +ConditionPathExists=|!/etc/unbound/unbound_control.key +ConditionPathExists=|!/etc/unbound/unbound_server.pem +ConditionPathExists=|!/etc/unbound/unbound_server.key +PartOf=unbound.service + +[Service] +Type=oneshot +Group=unbound +ExecStart=/usr/sbin/unbound-control-setup -d /etc/unbound/ +ExecStart=/sbin/restorecon /etc/unbound/* + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/unbound/unbound-munin.README b/SPECS/unbound/unbound-munin.README new file mode 100644 index 00000000..8fa43295 --- /dev/null +++ b/SPECS/unbound/unbound-munin.README @@ -0,0 +1,5 @@ + +To activate the munin plugins, run (as root): + +cd /etc/munin/plugins +for i in /usr/share/munin/plugins/unbound_*; do ln -s $i; done diff --git a/SPECS/unbound/unbound.munin b/SPECS/unbound/unbound.munin new file mode 100644 index 00000000..90565754 --- /dev/null +++ b/SPECS/unbound/unbound.munin @@ -0,0 +1,11 @@ +# +# For this plugin to work, unbound.conf needs to have: +# remote-control: control-enable: yes +# +[unbound*] +user root +env.statefile /var/lib/munin/plugin-state/unbound-state +env.unbound_conf /etc/unbound/unbound.conf +env.unbound_control /usr/sbin/unbound-control +env.spoof_warn 1000 +env.spoof_crit 100000 diff --git a/SPECS/unbound/unbound.service b/SPECS/unbound/unbound.service new file mode 100644 index 00000000..f6537117 --- /dev/null +++ b/SPECS/unbound/unbound.service @@ -0,0 +1,20 @@ +[Unit] +Description=Unbound recursive Domain Name Server +After=network.target +After=unbound-keygen.service +Wants=unbound-keygen.service +After=unbound-anchor.service +Wants=unbound-anchor.service +Before=nss-lookup.target +Wants=nss-lookup.target + +[Service] +Type=notify +EnvironmentFile=-/etc/sysconfig/unbound +ExecStartPre=/usr/sbin/unbound-checkconf +ExecStart=/usr/sbin/unbound -d $UNBOUND_OPTIONS +ExecReload=/usr/sbin/unbound-control reload +Restart=on-abnormal + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/unbound/unbound.spec b/SPECS/unbound/unbound.spec new file mode 100644 index 00000000..254d1fd5 --- /dev/null +++ b/SPECS/unbound/unbound.spec @@ -0,0 +1,308 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# Change to 1 to enable these +%bcond dnstap 0 +%bcond redis 0 +%bcond ngtcp2 0 +%bcond munin 0 +%bcond dracut 0 + +Name: unbound +Version: 1.24.1 +Release: %autorelease +Summary: Validating, recursive, and caching DNS(SEC) resolver +License: BSD-3-Clause +URL: https://nlnetlabs.nl/projects/unbound +VCS: git:https://github.com/NLnetLabs/unbound +#!RemoteAsset +Source0: https://nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz +#!RemoteAsset +Source1: https://nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz.asc +Source2: unbound.service +Source3: unbound.munin +Source4: unbound_munin_ +Source5: root.key +Source6: unbound-keygen.service +Source7: tmpfiles-unbound.conf +Source8: example.com.key +Source9: example.com.conf +Source10: block-example.com.conf +#!RemoteAsset +Source11: https://data.iana.org/root-anchors/icannbundle.pem +Source12: root.anchor +Source13: unbound.sysconfig +Source14: unbound-anchor.timer +Source15: unbound-munin.README +Source16: unbound-anchor.service +Source17: unbound.sysusers +BuildSystem: autotools + +BuildOption(conf): --disable-rpath +BuildOption(conf): --disable-static +BuildOption(conf): --with-libevent +BuildOption(conf): --with-pthreads +BuildOption(conf): --with-ssl +BuildOption(conf): --enable-relro-now +BuildOption(conf): --enable-pie +BuildOption(conf): --enable-subnet +BuildOption(conf): --enable-ipsecmod +BuildOption(conf): --with-conf-file=%{_sysconfdir}/%{name}/unbound.conf +BuildOption(conf): --with-pidfile=%{_rundir}/%{name}/%{name}.pid +BuildOption(conf): --with-share-dir=%{_datadir}/%{name} +BuildOption(conf): --enable-sha2 +BuildOption(conf): --disable-gost +BuildOption(conf): --enable-ecdsa +BuildOption(conf): --with-rootkey-file=%{_sharedstatedir}/%{name}/root.key +BuildOption(conf): --with-pythonmodule +BuildOption(conf): --with-pyunbound PYTHON=%{__python3} +BuildOption(conf): --enable-systemd +BuildOption(conf): --with-libnghttp2 +%if %{with dnstap} +BuildOption(conf): --enable-dnstap +%endif +%if %{with redis} +BuildOption(conf): --with-libhiredis +BuildOption(conf): --enable-cachedb +%endif +%if %{with ngtcp2} +BuildOption(conf): --with-libngtcp2 +%endif +BuildOption(build): all streamtcp + +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: systemd-rpm-macros +BuildRequires: swig +BuildRequires: flex +%if %{with dnstap} +BuildRequires: fstrm-devel +BuildRequires: protobuf-c-devel +%endif +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(libnghttp2) +BuildRequires: pkgconfig(libevent) +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(libsodium) +%if %{with redis} +BuildRequires: hiredis-devel +%endif +%if %{with ngtcp2} +BuildRequires: ngtcp2-crypto-ossl-devel +%endif + +Requires: openssl + +%description +Unbound is a validating, recursive, and caching DNS(SEC) resolver. + +The C implementation of Unbound is developed and maintained by NLnet +Labs. It is based on ideas and algorithms taken from a java prototype +developed by Verisign labs, Nominet, Kirei and ep.net. + +Unbound is designed as a set of modular components, so that also +DNSSEC (secure DNS) validation and stub-resolvers (that do not run +as a server, but are linked into an application) are easily possible. + +%if %{with munin} +%package munin +Summary: Plugin for the munin / munin-node monitoring package +Requires: munin-node +Requires: %{name} = %{version}-%{release} +Requires: bc +BuildArch: noarch + +%description munin +Plugin for the munin / munin-node monitoring package +%endif + +%package devel +Summary: Development package that includes the unbound header files +Requires: %{name}-libs = %{version}-%{release} +Requires: openssl-devel +Requires: pkgconfig + +%description devel +The devel package contains the unbound library and the include files + +%package libs +Summary: Libraries used by the unbound server and client applications +Provides: group(unbound) +Provides: user(unbound) +Recommends: %{name}-anchor + +%description libs +Contains libraries used by the unbound server and client applications. + +%package anchor +Requires: %{name}-libs = %{version}-%{release} +Summary: DNSSEC trust anchor maintaining tool + +%description anchor +Contains tool maintaining trust anchor using RFC 5011 key rollover algorithm. + +%package utils +Requires: %{name}-libs = %{version}-%{release} +Summary: Unbound DNS lookup utilities + +%description utils +Contains tools for making DNS queries. Can make queries to DNS servers +also over TLS connection or validate DNSSEC signatures. Similar to +bind-utils. + +%package -n python3-unbound +Summary: Python 3 modules and extensions for unbound +Requires: %{name}-libs = %{version}-%{release} + +%description -n python3-unbound +Python 3 modules and extensions for unbound + +%conf -p +# always regenerate configure +autoreconf -fiv + +%install -a +install -d -m 0755 %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig +install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/unbound.service +# Install root key +install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/unbound/ +install -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/unbound-keygen.service +# Install tmpfiles.d config +install -d -m 0755 %{buildroot}%{_tmpfilesdir}/ %{buildroot}%{_sharedstatedir}/unbound +install -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/unbound.conf +# Install directories for easier config file drop in +mkdir -p %{buildroot}%{_sysconfdir}/unbound/{keys.d,conf.d,local.d} +install -m 0640 -p %{SOURCE8} %{buildroot}%{_sysconfdir}/unbound/keys.d/ +install -m 0640 -p %{SOURCE9} %{buildroot}%{_sysconfdir}/unbound/conf.d/ +install -m 0640 -p %{SOURCE10} %{buildroot}%{_sysconfdir}/unbound/local.d/ +install -p -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/unbound +# We keep a copy of the root key in old location +# In case user has changed the configuration and we wouldn't update it there +install -m 0644 %{SOURCE12} %{buildroot}%{_sharedstatedir}/unbound/root.key +install -D -p -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/sysconfig/unbound + +install -p -m 0644 %{SOURCE14} %{buildroot}%{_unitdir}/unbound-anchor.timer +install -p -m 0644 %{SOURCE15} . +install -p -m 0644 %{SOURCE16} %{buildroot}%{_unitdir}/unbound-anchor.service +# sysusers.d +install -Dm0644 %{SOURCE17} %{buildroot}%{_sysusersdir}/unbound.conf + +%if %{with munin} +# Install munin plugin and its softlinks +install -d 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d +install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/munin/plugin-conf.d/unbound +install -d 0755 %{buildroot}%{_datadir}/munin/plugins/ +install -p -m 0755 %{SOURCE4} %{buildroot}%{_datadir}/munin/plugins/unbound +for plugin in unbound_munin_hits unbound_munin_queue unbound_munin_memory unbound_munin_by_type unbound_munin_by_class unbound_munin_by_opcode unbound_munin_by_rcode unbound_munin_by_flags unbound_munin_histogram; do + ln -s unbound %{buildroot}%{_datadir}/munin/plugins/$plugin +done +%endif + +# install streamtcp used for monitoring / debugging unbound's port 80/443 modes +install -m 0755 streamtcp %{buildroot}%{_sbindir}/unbound-streamtcp +# install streamtcp man page +install -m 0644 testcode/streamtcp.1 %{buildroot}/%{_mandir}/man1/unbound-streamtcp.1 +install -D -m 0644 contrib/libunbound.pc %{buildroot}/%{_libdir}/pkgconfig/libunbound.pc + +mkdir -p %{buildroot}%{_rundir}/unbound + +# Link unbound-control-setup.8 manpage to unbound-control.8 +echo ".so man8/unbound-control.8" > %{buildroot}/%{_mandir}/man8/unbound-control-setup.8 + +# remove static library from install +rm %{buildroot}%{_libdir}/*.la +rm %{buildroot}%{python3_sitearch}/*.la + +%preun +%systemd_preun unbound.service +%systemd_preun unbound-keygen.service + +%preun anchor +%systemd_preun unbound-anchor.service unbound-anchor.timer + +%postun +%systemd_postun_with_restart unbound.service +%systemd_postun unbound-keygen.service + +%postun anchor +%systemd_postun_with_restart unbound-anchor.service unbound-anchor.timer + +%files +%doc doc/CREDITS doc/FEATURES +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}-keygen.service +%attr(0775,unbound,root) %dir %{_rundir}/%{name} +%attr(0644,root,root) %{_tmpfilesdir}/unbound.conf +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf +%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/keys.d +%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/keys.d/*.key +%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/conf.d +%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/conf.d/*.conf +%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/local.d +%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/local.d/*.conf +%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_control.pem +%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_control.key +%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_server.pem +%ghost %attr(0600,root,unbound) %{_sysconfdir}/%{name}/unbound_server.key +%{_sbindir}/unbound +%{_sbindir}/unbound-checkconf +%{_sbindir}/unbound-control +%{_sbindir}/unbound-control-setup +%{_mandir}/man5/* +%exclude %{_mandir}/man8/unbound-anchor* +%{_mandir}/man8/* + +%files -n python3-unbound +%license pythonmod/LICENSE +%{python3_sitearch}/* +%doc libunbound/python/examples/* +%doc pythonmod/examples/* + +%if %{with munin} +%files munin +%doc unbound-munin.README +%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/unbound +%{_datadir}/munin/plugins/unbound* +%endif + +%files devel +%{_libdir}/libunbound.so +%{_includedir}/unbound.h +%{_mandir}/man3/* +%{_libdir}/pkgconfig/*.pc + +%files libs +%doc doc/README +%license doc/LICENSE +%attr(0755,root,root) %dir %{_sysconfdir}/%{name} +%{_sysusersdir}/%{name}.conf +%{_libdir}/libunbound.so.8* +%dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name} +%config %verify(not link owner group size mtime mode md5) %{_sharedstatedir}/%{name}/root.key +# just left for backwards compat with user changed unbound.conf files - format is different! +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/root.key + +%files anchor +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%{_sbindir}/unbound-anchor +%{_mandir}/man8/unbound-anchor* +# icannbundle and root.key(s) should be replaced from package +# intentionally not using noreplace +%config %{_sysconfdir}/%{name}/icannbundle.pem +%{_unitdir}/unbound-anchor.timer +%{_unitdir}/unbound-anchor.service + +%files utils +%{_sbindir}/unbound-host +%{_sbindir}/unbound-streamtcp +%{_mandir}/man1/unbound-* + +%changelog +%{?autochangelog} diff --git a/SPECS/unbound/unbound.sysconfig b/SPECS/unbound/unbound.sysconfig new file mode 100644 index 00000000..9e80f14e --- /dev/null +++ b/SPECS/unbound/unbound.sysconfig @@ -0,0 +1,10 @@ +# uncomment following line to skip anchor refresh before unbound start +#DISABLE_UNBOUND_ANCHOR=yes +# Better way is systemctl mask unbound-anchor.service +UNBOUND_ANCHOR_OPTIONS="-f /etc/resolv.conf -R" + +# for extra debug, add "-v -v" or change verbosity: in unbound.conf +UNBOUND_OPTIONS="" + +# Uncoment to validate SHA1 in any crypto policy +# OPENSSL_CONF=/etc/unbound/openssl-sha1.conf diff --git a/SPECS/unbound/unbound.sysusers b/SPECS/unbound/unbound.sysusers new file mode 100644 index 00000000..66146820 --- /dev/null +++ b/SPECS/unbound/unbound.sysusers @@ -0,0 +1 @@ +u unbound - "Unbound DNS resolver" /var/lib/unbound /sbin/nologin diff --git a/SPECS/unbound/unbound_munin_ b/SPECS/unbound/unbound_munin_ new file mode 100644 index 00000000..779532dc --- /dev/null +++ b/SPECS/unbound/unbound_munin_ @@ -0,0 +1,553 @@ +#!/bin/sh +# +# plugin for munin to monitor usage of unbound servers. +# +# (C) 2008 W.C.A. Wijngaards. BSD Licensed. +# +# To install; enable statistics and unbound-control in unbound.conf +# server: extended-statistics: yes +# statistics-cumulative: no +# statistics-interval: 0 +# remote-control: control-enable: yes +# Run the command unbound-control-setup to generate the key files. +# +# Environment variables for this script +# statefile - where to put temporary statefile. +# unbound_conf - where the unbound.conf file is located. +# unbound_control - where to find unbound-control executable. +# spoof_warn - what level to warn about spoofing +# spoof_crit - what level to crit about spoofing +# +# You can set them in your munin/plugin-conf.d/plugins.conf file +# with: +# [unbound*] +# user root +# env.statefile /usr/local/var/munin/plugin-state/unbound-state +# env.unbound_conf /usr/local/etc/unbound/unbound.conf +# env.unbound_control /usr/local/sbin/unbound-control +# env.spoof_warn 1000 +# env.spoof_crit 100000 +# +# This plugin can create different graphs depending on what name +# you link it as (with ln -s) into the plugins directory +# You can link it multiple times. +# If you are only a casual user, the _hits and _by_type are most interesting, +# possibly followed by _by_rcode. +# +# unbound_munin_hits - base volume, cache hits, unwanted traffic +# unbound_munin_queue - to monitor the internal requestlist +# unbound_munin_memory - memory usage +# unbound_munin_by_type - incoming queries by type +# unbound_munin_by_class - incoming queries by class +# unbound_munin_by_opcode - incoming queries by opcode +# unbound_munin_by_rcode - answers by rcode, validation status +# unbound_munin_by_flags - incoming queries by flags +# unbound_munin_histogram - histogram of query resolving times +# +# Magic markers - optional - used by installation scripts and +# munin-config: +# +#%# family=contrib +#%# capabilities=autoconf suggest + +# POD documentation +: <<=cut +=head1 NAME + +unbound_munin_ - Munin plugin to monitor the Unbound DNS resolver. + +=head1 APPLICABLE SYSTEMS + +System with unbound daemon. + +=head1 CONFIGURATION + + [unbound*] + user root + env.statefile /var/lib/munin/plugin-state/unbound-state + env.unbound_conf /etc/unbound/unbound.conf + env.unbound_control /usr/sbin/unbound-control + env.spoof_warn 1000 + env.spoof_crit 100000 + +Use the .env settings to override the defaults. + +=head1 USAGE + +Can be used to present different graphs. Use ln -s for that name in +the plugins directory to enable the graph. +unbound_munin_hits - base volume, cache hits, unwanted traffic +unbound_munin_queue - to monitor the internal requestlist +unbound_munin_memory - memory usage +unbound_munin_by_type - incoming queries by type +unbound_munin_by_class - incoming queries by class +unbound_munin_by_opcode - incoming queries by opcode +unbound_munin_by_rcode - answers by rcode, validation status +unbound_munin_by_flags - incoming queries by flags +unbound_munin_histogram - histogram of query resolving times + +=head1 AUTHOR + +Copyright 2008 W.C.A. Wijngaards + +=head1 LICENSE + +BSD + +=cut + +state=${statefile:-/var/lib/munin/plugin-state/unbound-state} +conf=${unbound_conf:-/etc/unbound/unbound.conf} +ctrl=${unbound_control:-/usr/sbin/unbound-control} +warn=${spoof_warn:-1000} +crit=${spoof_crit:-100000} +lock=$state.lock + +# number of seconds between polling attempts. +# makes the statefile hang around for at least this many seconds, +# so that multiple links of this script can share the results. +lee=55 + +# to keep things within 19 characters +ABBREV="-e s/total/t/ -e s/thread/t/ -e s/num/n/ -e s/query/q/ -e s/answer/a/ -e s/unwanted/u/ -e s/requestlist/ql/ -e s/type/t/ -e s/class/c/ -e s/opcode/o/ -e s/rcode/r/ -e s/edns/e/ -e s/mem/m/ -e s/cache/c/ -e s/mod/m/" + +# get value from $1 into return variable $value +get_value ( ) { + value="`grep '^'$1'=' $state | sed -e 's/^.*=//'`" + if test "$value"x = ""x; then + value="0" + fi +} + +# download the state from the unbound server. +get_state ( ) { + # obtain lock for fetching the state + # because there is a race condition in fetching and writing to file + + # see if the lock is stale, if so, take it + if test -f $lock ; then + pid="`cat $lock 2>&1`" + kill -0 "$pid" >/dev/null 2>&1 + if test $? -ne 0 -a "$pid" != $$ ; then + echo $$ >$lock + fi + fi + + i=0 + while test ! -f $lock || test "`cat $lock 2>&1`" != $$; do + while test -f $lock; do + # wait + i=`expr $i + 1` + if test $i -gt 1000; then + sleep 1; + fi + if test $i -gt 1500; then + echo "error locking $lock" "=" `cat $lock` + rm -f $lock + exit 1 + fi + done + # try to get it + echo $$ >$lock + done + # do not refetch if the file exists and only LEE seconds old + if test -f $state; then + now=`date +%s` + get_value "time.now" + value="`echo $value | sed -e 's/\..*$//'`" + if test $now -lt `expr $value + $lee`; then + rm -f $lock + return + fi + fi + $ctrl -c $conf stats > $state + if test $? -ne 0; then + echo "error retrieving data from unbound server" + rm -f $lock + exit 1 + fi + rm -f $lock +} + +if test "$1" = "autoconf" ; then + if test ! -f $conf; then + echo no "($conf does not exist)" + exit 1 + fi + if test ! -d `dirname $state`; then + echo no "($state directory does not exist)" + exit 1 + fi + echo yes + exit 0 +fi + +if test "$1" = "suggest" ; then + echo "hits" + echo "queue" + echo "memory" + echo "by_type" + echo "by_class" + echo "by_opcode" + echo "by_rcode" + echo "by_flags" + echo "histogram" + exit 0 +fi + +# determine my type, by name +id=`echo $0 | sed -e 's/^.*unbound_munin_//'` +if test "$id"x = ""x; then + # some default to keep people sane. + id="hits" +fi + +# if $1 exists in statefile, config is echoed with label $2 +exist_config ( ) { + mn=`echo $1 | sed $ABBREV | tr . _` + if grep '^'$1'=' $state >/dev/null 2>&1; then + echo "$mn.label $2" + echo "$mn.min 0" + fi +} + +# print label and min 0 for a name $1 in unbound format +p_config ( ) { + mn=`echo $1 | sed $ABBREV | tr . _` + echo $mn.label "$2" + echo $mn.min 0 +} + +if test "$1" = "config" ; then + if test ! -f $state; then + get_state + fi + case $id in + hits) + echo "graph_title Unbound DNS traffic and cache hits" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel queries / second" + echo "graph_category DNS" + for x in thread0.num.queries thread1.num.queries \ + thread2.num.queries thread3.num.queries thread4.num.queries \ + thread5.num.queries thread6.num.queries thread7.num.queries; do + exist_config $x "queries handled by `basename $x .num.queries`" + done + p_config "total.num.queries" "total queries from clients" + p_config "total.num.cachehits" "cache hits" + p_config "total.num.prefetch" "cache prefetch" + p_config "num.query.tcp" "TCP queries" + p_config "num.query.ipv6" "IPv6 queries" + p_config "unwanted.queries" "queries that failed acl" + p_config "unwanted.replies" "unwanted or unsolicited replies" + echo "u_replies.warning $warn" + echo "u_replies.critical $crit" + echo "graph_info DNS queries to the recursive resolver. The unwanted replies could be innocent duplicate packets, late replies, or spoof threats." + ;; + queue) + echo "graph_title Unbound requestlist size" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel number of queries" + echo "graph_category DNS" + p_config "total.requestlist.avg" "Average size of queue on insert" + p_config "total.requestlist.max" "Max size of queue (in 5 min)" + p_config "total.requestlist.overwritten" "Number of queries replaced by new ones" + p_config "total.requestlist.exceeded" "Number of queries dropped due to lack of space" + echo "graph_info The queries that did not hit the cache and need recursion service take up space in the requestlist. If there are too many queries, first queries get overwritten, and at last resort dropped." + ;; + memory) + echo "graph_title Unbound memory usage" + echo "graph_args --base 1024 -l 0" + echo "graph_vlabel memory used in bytes" + echo "graph_category DNS" + p_config "mem.total.sbrk" "Total memory" + p_config "mem.cache.rrset" "RRset cache memory" + p_config "mem.cache.message" "Message cache memory" + p_config "mem.mod.iterator" "Iterator module memory" + p_config "mem.mod.validator" "Validator module and key cache memory" + echo "graph_info The memory used by unbound." + ;; + by_type) + echo "graph_title Unbound DNS queries by type" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel queries / second" + echo "graph_category DNS" + for x in `grep "^num.query.type" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + tp=`echo $nm | sed -e s/num.query.type.//` + p_config "$nm" "$tp" + done + echo "graph_info queries by DNS RR type queried for" + ;; + by_class) + echo "graph_title Unbound DNS queries by class" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel queries / second" + echo "graph_category DNS" + for x in `grep "^num.query.class" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + tp=`echo $nm | sed -e s/num.query.class.//` + p_config "$nm" "$tp" + done + echo "graph_info queries by DNS RR class queried for." + ;; + by_opcode) + echo "graph_title Unbound DNS queries by opcode" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel queries / second" + echo "graph_category DNS" + for x in `grep "^num.query.opcode" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + tp=`echo $nm | sed -e s/num.query.opcode.//` + p_config "$nm" "$tp" + done + echo "graph_info queries by opcode in the query packet." + ;; + by_rcode) + echo "graph_title Unbound DNS answers by return code" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel answer packets / second" + echo "graph_category DNS" + for x in `grep "^num.answer.rcode" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + tp=`echo $nm | sed -e s/num.answer.rcode.//` + p_config "$nm" "$tp" + done + p_config "num.answer.secure" "answer secure" + p_config "num.answer.bogus" "answer bogus" + p_config "num.rrset.bogus" "num rrsets marked bogus" + echo "graph_info answers sorted by return value. rrsets bogus is the number of rrsets marked bogus per second by the validator" + ;; + by_flags) + echo "graph_title Unbound DNS incoming queries by flags" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel queries / second" + echo "graph_category DNS" + p_config "num.query.flags.QR" "QR (query reply) flag" + p_config "num.query.flags.AA" "AA (auth answer) flag" + p_config "num.query.flags.TC" "TC (truncated) flag" + p_config "num.query.flags.RD" "RD (recursion desired) flag" + p_config "num.query.flags.RA" "RA (rec avail) flag" + p_config "num.query.flags.Z" "Z (zero) flag" + p_config "num.query.flags.AD" "AD (auth data) flag" + p_config "num.query.flags.CD" "CD (check disabled) flag" + p_config "num.query.edns.present" "EDNS OPT present" + p_config "num.query.edns.DO" "DO (DNSSEC OK) flag" + echo "graph_info This graphs plots the flags inside incoming queries. For example, if QR, AA, TC, RA, Z flags are set, the query can be rejected. RD, AD, CD and DO are legitimately set by some software." + ;; + histogram) + echo "graph_title Unbound DNS histogram of reply time" + echo "graph_args --base 1000 -l 0" + echo "graph_vlabel queries / second" + echo "graph_category DNS" + echo hcache.label "cache hits" + echo hcache.min 0 + echo hcache.draw AREA + echo hcache.colour 999999 + echo h64ms.label "0 msec - 66 msec" + echo h64ms.min 0 + echo h64ms.draw STACK + echo h64ms.colour 0000FF + echo h128ms.label "66 msec - 131 msec" + echo h128ms.min 0 + echo h128ms.colour 1F00DF + echo h128ms.draw STACK + echo h256ms.label "131 msec - 262 msec" + echo h256ms.min 0 + echo h256ms.draw STACK + echo h256ms.colour 3F00BF + echo h512ms.label "262 msec - 524 msec" + echo h512ms.min 0 + echo h512ms.draw STACK + echo h512ms.colour 5F009F + echo h1s.label "524 msec - 1 sec" + echo h1s.min 0 + echo h1s.draw STACK + echo h1s.colour 7F007F + echo h2s.label "1 sec - 2 sec" + echo h2s.min 0 + echo h2s.draw STACK + echo h2s.colour 9F005F + echo h4s.label "2 sec - 4 sec" + echo h4s.min 0 + echo h4s.draw STACK + echo h4s.colour BF003F + echo h8s.label "4 sec - 8 sec" + echo h8s.min 0 + echo h8s.draw STACK + echo h8s.colour DF001F + echo h16s.label "8 sec - ..." + echo h16s.min 0 + echo h16s.draw STACK + echo h16s.colour FF0000 + echo "graph_info Histogram of the reply times for queries." + ;; + esac + + exit 0 +fi + +# do the stats itself +get_state + +# get the time elapsed +get_value "time.elapsed" +if test $value = 0 || test $value = "0.000000"; then + echo "error: time elapsed 0 or could not retrieve data" + exit 1 +fi +elapsed="$value" + +# print value for $1 / elapsed +print_qps ( ) { + mn=`echo $1 | sed $ABBREV | tr . _` + get_value $1 + echo "$mn.value" `echo scale=6';' $value / $elapsed | bc ` +} + +# print qps if line already found in $2 +print_qps_line ( ) { + mn=`echo $1 | sed $ABBREV | tr . _` + value="`echo $2 | sed -e 's/^.*=//'`" + echo "$mn.value" `echo scale=6';' $value / $elapsed | bc ` +} + +# print value for $1 +print_value ( ) { + mn=`echo $1 | sed $ABBREV | tr . _` + get_value $1 + echo "$mn.value" $value +} + +case $id in +hits) + for x in thread0.num.queries thread1.num.queries thread2.num.queries \ + thread3.num.queries thread4.num.queries thread5.num.queries \ + thread6.num.queries thread7.num.queries total.num.queries \ + total.num.cachehits total.num.prefetch num.query.tcp \ + num.query.ipv6 unwanted.queries unwanted.replies; do + if grep "^"$x"=" $state >/dev/null 2>&1; then + print_qps $x + fi + done + ;; +queue) + for x in total.requestlist.avg total.requestlist.max \ + total.requestlist.overwritten total.requestlist.exceeded; do + print_value $x + done + ;; +memory) + mn=`echo mem.total.sbrk | sed $ABBREV | tr . _` + get_value 'mem.total.sbrk' + if test $value -eq 0; then + chk=`echo $ctrl | sed -e 's/-control$/-checkconf/'` + pidf=`$chk -o pidfile $conf 2>&1` + pid=`cat $pidf 2>&1` + value=`ps -p "$pid" -o rss= 2>&1` + if test "`expr $value + 1 - 1 2>&1`" -eq "$value" 2>&1; then + value=`expr $value \* 1024` + else + value=0 + fi + fi + echo "$mn.value" $value + for x in mem.cache.rrset mem.cache.message \ + mem.mod.iterator mem.mod.validator; do + print_value $x + done + ;; +by_type) + for x in `grep "^num.query.type" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + print_qps_line $nm $x + done + ;; +by_class) + for x in `grep "^num.query.class" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + print_qps_line $nm $x + done + ;; +by_opcode) + for x in `grep "^num.query.opcode" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + print_qps_line $nm $x + done + ;; +by_rcode) + for x in `grep "^num.answer.rcode" $state`; do + nm=`echo $x | sed -e 's/=.*$//'` + print_qps_line $nm $x + done + print_qps "num.answer.secure" + print_qps "num.answer.bogus" + print_qps "num.rrset.bogus" + ;; +by_flags) + for x in num.query.flags.QR num.query.flags.AA num.query.flags.TC num.query.flags.RD num.query.flags.RA num.query.flags.Z num.query.flags.AD num.query.flags.CD num.query.edns.present num.query.edns.DO; do + print_qps $x + done + ;; +histogram) + get_value total.num.cachehits + echo hcache.value `echo scale=6';' $value / $elapsed | bc ` + r=0 + for x in histogram.000000.000000.to.000000.000001 \ + histogram.000000.000001.to.000000.000002 \ + histogram.000000.000002.to.000000.000004 \ + histogram.000000.000004.to.000000.000008 \ + histogram.000000.000008.to.000000.000016 \ + histogram.000000.000016.to.000000.000032 \ + histogram.000000.000032.to.000000.000064 \ + histogram.000000.000064.to.000000.000128 \ + histogram.000000.000128.to.000000.000256 \ + histogram.000000.000256.to.000000.000512 \ + histogram.000000.000512.to.000000.001024 \ + histogram.000000.001024.to.000000.002048 \ + histogram.000000.002048.to.000000.004096 \ + histogram.000000.004096.to.000000.008192 \ + histogram.000000.008192.to.000000.016384 \ + histogram.000000.016384.to.000000.032768 \ + histogram.000000.032768.to.000000.065536; do + get_value $x + r=`expr $r + $value` + done + echo h64ms.value `echo scale=6';' $r / $elapsed | bc ` + get_value histogram.000000.065536.to.000000.131072 + echo h128ms.value `echo scale=6';' $value / $elapsed | bc ` + get_value histogram.000000.131072.to.000000.262144 + echo h256ms.value `echo scale=6';' $value / $elapsed | bc ` + get_value histogram.000000.262144.to.000000.524288 + echo h512ms.value `echo scale=6';' $value / $elapsed | bc ` + get_value histogram.000000.524288.to.000001.000000 + echo h1s.value `echo scale=6';' $value / $elapsed | bc ` + get_value histogram.000001.000000.to.000002.000000 + echo h2s.value `echo scale=6';' $value / $elapsed | bc ` + get_value histogram.000002.000000.to.000004.000000 + echo h4s.value `echo scale=6';' $value / $elapsed | bc ` + get_value histogram.000004.000000.to.000008.000000 + echo h8s.value `echo scale=6';' $value / $elapsed | bc ` + r=0 + for x in histogram.000008.000000.to.000016.000000 \ + histogram.000016.000000.to.000032.000000 \ + histogram.000032.000000.to.000064.000000 \ + histogram.000064.000000.to.000128.000000 \ + histogram.000128.000000.to.000256.000000 \ + histogram.000256.000000.to.000512.000000 \ + histogram.000512.000000.to.001024.000000 \ + histogram.001024.000000.to.002048.000000 \ + histogram.002048.000000.to.004096.000000 \ + histogram.004096.000000.to.008192.000000 \ + histogram.008192.000000.to.016384.000000 \ + histogram.016384.000000.to.032768.000000 \ + histogram.032768.000000.to.065536.000000 \ + histogram.065536.000000.to.131072.000000 \ + histogram.131072.000000.to.262144.000000 \ + histogram.262144.000000.to.524288.000000; do + get_value $x + r=`expr $r + $value` + done + echo h16s.value `echo scale=6';' $r / $elapsed | bc ` + ;; +esac diff --git a/SPECS/unicode-ucd/unicode-ucd.spec b/SPECS/unicode-ucd/unicode-ucd.spec new file mode 100644 index 00000000..07c2dd52 --- /dev/null +++ b/SPECS/unicode-ucd/unicode-ucd.spec @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: unicode-ucd +Version: 17.0.0 +Release: %autorelease +Summary: Unicode Character Database +License: Unicode-3.0 +URL: https://www.unicode.org/ucd/ +# TODO: How to use VCS for unicode-ucd? +#!RemoteAsset +Source0: https://www.unicode.org/Public/%{version}/ucd/UCD.zip +#!RemoteAsset +Source1: https://www.unicode.org/Public/%{version}/ucd/Unihan.zip +#!RemoteAsset +Source2: https://www.unicode.org/license.txt +BuildArch: noarch + +BuildRequires: unzip + +%description +The Unicode Character Database (UCD) consists of a number of data files listing +Unicode character properties and related data. It also includes data files +containing test data for conformance to several important Unicode algorithms. + +%prep +%autosetup -c + +%conf +# No configure + +%build +# No build + +%install +mkdir -p %{buildroot}%{_datadir}/unicode +cp -ar . %{buildroot}%{_datadir}/unicode +cp %{SOURCE2} . + +%files +%license license.txt +%dir %{_datadir}/unicode +%{_datadir}/unicode/* + +%changelog +%{?autochangelog} diff --git a/SPECS/universal-ctags/universal-ctags.spec b/SPECS/universal-ctags/universal-ctags.spec new file mode 100644 index 00000000..40e43576 --- /dev/null +++ b/SPECS/universal-ctags/universal-ctags.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: universal-ctags +Version: 6.2.0 +Release: %autorelease +Summary: A program to generate language tag files +License: GPL-2.0-only +URL: https://github.com/universal-ctags/ctags +#!RemoteAsset +Source: https://github.com/universal-ctags/ctags/archive/refs/tags/v%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: gzip +BuildRequires: make +BuildRequires: pcre2-devel +BuildRequires: pkgconfig +BuildRequires: pkgconfig(jansson) +BuildRequires: pkgconfig(libseccomp) +BuildRequires: pkgconfig(yaml-0.1) +Requires(post): update-alternatives +Requires(preun):update-alternatives + +%description +Universal ctags, a maintained fork from Darren Hieberts project, generates tag +files from source code for various languages to be used with Editors like +Emacs, Vim and several others. + +%prep -a +echo '#define CTAGS_REPOINFO "%{version}"' > main/repoinfo.h + +%conf -p +autoreconf -fiv + +%install -a +install -D -m 755 ctags %{buildroot}%{_bindir}/universal-ctags + +%post +test -L %{_bindir}/ctags || rm -f %{_bindir}/ctags +update-alternatives --install %{_bindir}/ctags ctags %{_bindir}/universal-ctags 25 \ + --slave %{_mandir}/man1/ctags.1.gz ctags.1 %{_mandir}/man1/universal-ctags.1.gz + +%postun +if [ ! -f %{_bindir}/ctags ] ; then + update-alternatives --remove ctags %{_bindir}/universal-ctags +fi + +%files +%license COPYING +%{_bindir}/universal-ctags +%{_bindir}/ctags +%{_bindir}/optscript +%{_bindir}/readtags +%ghost %{_sysconfdir}/alternatives/ctags + +%changelog +%{?autochangelog} diff --git a/SPECS/unixODBC/odbcinst.ini b/SPECS/unixODBC/odbcinst.ini new file mode 100644 index 00000000..32ab9360 --- /dev/null +++ b/SPECS/unixODBC/odbcinst.ini @@ -0,0 +1,59 @@ +# Example driver definitions + +# Driver from the postgresql-odbc package +# Setup from the unixODBC package +[PostgreSQL] +Description = ODBC for PostgreSQL +Driver = /usr/lib/psqlodbcw.so +Setup = /usr/lib/libodbcpsqlS.so +Driver64 = /usr/lib64/psqlodbcw.so +Setup64 = /usr/lib64/libodbcpsqlS.so +FileUsage = 1 + + +# Driver from the mysql-connector-odbc package in Fedora >=29 +# Setup from the unixODBC package +[MySQL] +Description = ODBC for MySQL 8 +# mysql-connector-odbc package provides shared libraries with "w" or "a" suffix. +# 'w' stands for 'wide' or 'unicode' character set, 'a' stands for 'ANSI' +# Symlinks used in the configuration below lead to the 'w' variant by default +# Note: +# The path to the plugin changed from "/usr/lib64" to "/usr/lib64/unixODBC/" beginning with Fedora 33 +Driver = /usr/lib/unixODBC/libmyodbc8.so +Driver64 = /usr/lib64/unixODBC/libmyodbc8.so +FileUsage = 1 + + +# Driver from the mysql-connector-odbc package in Fedora <=28 +# Setup from the unixODBC package +[MySQL-5] +Description = ODBC for MySQL 5 +# mysql-connector-odbc package provides shared libraries with "w" or "a" suffix. +# 'w' stands for 'wide' or 'unicode' character set, 'a' stands for 'ANSI' +# Symlinks used in the configuration below lead to the 'w' variant by default +Driver = /usr/lib/libmyodbc5.so +Driver64 = /usr/lib64/libmyodbc5.so +Setup = /usr/lib/libodbcmyS.so +Setup64 = /usr/lib64/libodbcmyS.so +FileUsage = 1 + + +# Driver from the freetds-libs package +# Setup from the unixODBC package +[FreeTDS] +Description = Free Sybase & MS SQL Driver +Driver = /usr/lib/libtdsodbc.so +Setup = /usr/lib/libtdsS.so +Driver64 = /usr/lib64/libtdsodbc.so +Setup64 = /usr/lib64/libtdsS.so +Port = 1433 + + +# Driver from the mariadb-connector-odbc package +# Setup from the unixODBC package +[MariaDB] +Description = ODBC for MariaDB +Driver = /usr/lib/libmaodbc.so +Driver64 = /usr/lib64/libmaodbc.so +FileUsage = 1 \ No newline at end of file diff --git a/SPECS/unixODBC/unixODBC.spec b/SPECS/unixODBC/unixODBC.spec new file mode 100644 index 00000000..481b6b02 --- /dev/null +++ b/SPECS/unixODBC/unixODBC.spec @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond gui_related_parts 1 + +Name: unixODBC +Version: 2.3.14 +Release: %autorelease +Summary: A complete ODBC driver manager for Linux +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: http://www.unixODBC.org/ +#!RemoteAsset +Source0: http://www.unixODBC.org/unixODBC-%{version}.tar.gz +Source1: odbcinst.ini +BuildSystem: autotools + +BuildOption(conf): --with-gnu-ld=yes +BuildOption(conf): --enable-threads=yes +BuildOption(conf): --enable-drivers=no +%if %{with gui_related_parts} +BuildOption(conf): --enable-driver-config=yes +%else +BuildOption(conf): --enable-driver-config=no +%endif + +BuildRequires: make automake autoconf libtool libtool-ltdl-devel bison flex +BuildRequires: readline-devel + +%description +Install unixODBC if you want to access databases through ODBC. +You will also need the mariadb-connector-odbc package for MySQL/MariaDB, +and/or the postgresql-odbc package for PostgreSQL. + +%package devel +Summary: Development files for programs which will use the unixODBC library +Requires: %{name} = %{version} + +%description devel +This package contains the libraries and header files needed to develop +applications that use the unixODBC driver manager. + +%conf -p +autoreconf -fiv + +%install -a +install -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ +mkdir -p %{buildroot}%{_libdir}/%{name} +find %{buildroot} -type f -name "*.a" -delete +find %{buildroot} -type f -name "*.la" -delete +rm -f %{buildroot}%{_libdir}/libltdl.* +rm -rf %{buildroot}%{_datadir}/libtool + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README AUTHORS ChangeLog +%if %{with gui_related_parts} +%doc doc +%endif +%config(noreplace) %{_sysconfdir}/odbc* +%{_bindir}/odbcinst +%{_bindir}/isql +%{_bindir}/dltest +%{_bindir}/iusql +%{_bindir}/odbc_config +%{_bindir}/slencheck +%{_mandir}/man*/* +%{_libdir}/*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/pkgconfig/*.pc +%{_libdir}/*.so + +%changelog +%{?autochangelog} diff --git a/SPECS/unrar-free/unrar-free.spec b/SPECS/unrar-free/unrar-free.spec new file mode 100644 index 00000000..32bc1448 --- /dev/null +++ b/SPECS/unrar-free/unrar-free.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: unrar-free +Version: 0.3.3 +Release: %autorelease +Summary: Free software version of the non-free unrar utility +License: GPL-2.0-or-later +URL: https://gitlab.com/bgermann/unrar-free +#!RemoteAsset +Source: https://gitlab.com/bgermann/unrar-free/-/archive/%{version}/unrar-free-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: make +BuildRequires: libarchive-devel +BuildRequires: libtool + +%description +unrar-free is a free software version of the non-free unrar utility. This +program is a simple command-line front-end to libarchive, and can list and +extract RAR archives and other formats supported by libarchive. + +%package -n unrar +Summary: Wrapper package for unrar-free +Requires: %{name} = %{version} + +%description -n unrar +This package provides a compatibility symlink to use unrar-free as /usr/bin/unrar. + +%conf -p +autoreconf -i + +%install -a +ln -s unrar-free %{buildroot}%{_bindir}/unrar +ln -s unrar-free.1 %{buildroot}%{_mandir}/man1/unrar.1 + +%files +%license COPYING +%doc AUTHORS ChangeLog README TODO misc/tarar.pike +%{_bindir}/unrar-free +%{_mandir}/man1/unrar-free.1* + +%files -n unrar +%{_bindir}/unrar +%{_mandir}/man1/unrar.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/unzip/0001-unzip-6.0-exec-shield.patch b/SPECS/unzip/0001-unzip-6.0-exec-shield.patch new file mode 100644 index 00000000..74500aa5 --- /dev/null +++ b/SPECS/unzip/0001-unzip-6.0-exec-shield.patch @@ -0,0 +1,10 @@ +diff -up unzip60/crc_i386.S.exec-shield unzip60/crc_i386.S +--- unzip60/crc_i386.S.exec-shield 2007-01-07 06:02:58.000000000 +0100 ++++ unzip60/crc_i386.S 2009-11-18 11:16:39.630389312 +0100 +@@ -302,3 +302,6 @@ _crc32: /* ulg c + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++.section .note.GNU-stack, "", @progbits ++.previous diff --git a/SPECS/unzip/0002-unzip-6.0-close.patch b/SPECS/unzip/0002-unzip-6.0-close.patch new file mode 100644 index 00000000..9a238a90 --- /dev/null +++ b/SPECS/unzip/0002-unzip-6.0-close.patch @@ -0,0 +1,176 @@ +diff -up unzip60/extract.c.close unzip60/extract.c +--- unzip60/extract.c.close 2009-03-14 02:32:52.000000000 +0100 ++++ unzip60/extract.c 2009-11-19 08:17:23.481263496 +0100 +@@ -1924,24 +1924,21 @@ static int extract_or_test_member(__G) + + #ifdef VMS /* VMS: required even for stdout! (final flush) */ + if (!uO.tflag) /* don't close NULL file */ +- close_outfile(__G); ++ error = close_outfile(__G); + #else + #ifdef DLL + if (!uO.tflag && (!uO.cflag || G.redirect_data)) { + if (G.redirect_data) + FINISH_REDIRECT(); + else +- close_outfile(__G); ++ error = close_outfile(__G); + } + #else + if (!uO.tflag && !uO.cflag) /* don't close NULL file or stdout */ +- close_outfile(__G); ++ error = close_outfile(__G); + #endif + #endif /* VMS */ + +- /* GRR: CONVERT close_outfile() TO NON-VOID: CHECK FOR ERRORS! */ +- +- + if (G.disk_full) { /* set by flush() */ + if (G.disk_full > 1) { + #if (defined(DELETE_IF_FULL) && defined(HAVE_UNLINK)) +diff -up unzip60/unix/unix.c.close unzip60/unix/unix.c +--- unzip60/unix/unix.c.close 2009-01-24 00:31:26.000000000 +0100 ++++ unzip60/unix/unix.c 2009-11-19 08:33:25.568389171 +0100 +@@ -1096,10 +1096,41 @@ static int get_extattribs(__G__ pzt, z_u + #ifndef MTS + + /****************************/ ++/* Function CloseError() */ ++/***************************/ ++ ++int CloseError(__G) ++ __GDEF ++{ ++ int errval = PK_OK; ++ ++ if (fclose(G.outfile) < 0) { ++ switch (errno) { ++ case ENOSPC: ++ /* Do we need this on fileio.c? */ ++ Info(slide, 0x4a1, ((char *)slide, "%s: write error (disk full?). Continue? (y/n/^C) ", ++ FnFilter1(G.filename))); ++ fgets(G.answerbuf, 9, stdin); ++ if (*G.answerbuf == 'y') /* stop writing to this file */ ++ G.disk_full = 1; /* pass to next */ ++ else ++ G.disk_full = 2; /* no: exit program */ ++ ++ errval = PK_DISK; ++ break; ++ ++ default: ++ errval = PK_WARN; ++ } ++ } ++ return errval; ++} /* End of CloseError() */ ++ ++/****************************/ + /* Function close_outfile() */ + /****************************/ + +-void close_outfile(__G) /* GRR: change to return PK-style warning level */ ++int close_outfile(__G) + __GDEF + { + union { +@@ -1108,6 +1139,7 @@ void close_outfile(__G) /* GRR: chang + } zt; + ulg z_uidgid[2]; + int have_uidgid_flg; ++ int errval = PK_OK; + + have_uidgid_flg = get_extattribs(__G__ &(zt.t3), z_uidgid); + +@@ -1141,16 +1173,16 @@ void close_outfile(__G) /* GRR: chang + Info(slide, 0x201, ((char *)slide, + "warning: symbolic link (%s) failed: mem alloc overflow\n", + FnFilter1(G.filename))); +- fclose(G.outfile); +- return; ++ errval = CloseError(G.outfile, G.filename); ++ return errval ? errval : PK_WARN; + } + + if ((slnk_entry = (slinkentry *)malloc(slnk_entrysize)) == NULL) { + Info(slide, 0x201, ((char *)slide, + "warning: symbolic link (%s) failed: no mem\n", + FnFilter1(G.filename))); +- fclose(G.outfile); +- return; ++ errval = CloseError(G.outfile, G.filename); ++ return errval ? errval : PK_WARN; + } + slnk_entry->next = NULL; + slnk_entry->targetlen = ucsize; +@@ -1174,10 +1206,10 @@ void close_outfile(__G) /* GRR: chang + "warning: symbolic link (%s) failed\n", + FnFilter1(G.filename))); + free(slnk_entry); +- fclose(G.outfile); +- return; ++ errval = CloseError(G.outfile, G.filename); ++ return errval ? errval : PK_WARN; + } +- fclose(G.outfile); /* close "link" file for good... */ ++ errval = CloseError(G.outfile, G.filename); /* close "link" file for good... */ + slnk_entry->target[ucsize] = '\0'; + if (QCOND2) + Info(slide, 0, ((char *)slide, "-> %s ", +@@ -1188,7 +1220,7 @@ void close_outfile(__G) /* GRR: chang + else + G.slink_head = slnk_entry; + G.slink_last = slnk_entry; +- return; ++ return errval; + } + #endif /* SYMLINKS */ + +@@ -1201,7 +1233,7 @@ void close_outfile(__G) /* GRR: chang + #endif + + #if (defined(NO_FCHOWN)) +- fclose(G.outfile); ++ errval = CloseError(G.outfile, G.filename); + #endif + + /* if -X option was specified and we have UID/GID info, restore it */ +@@ -1227,7 +1259,7 @@ void close_outfile(__G) /* GRR: chang + } + + #if (!defined(NO_FCHOWN) && defined(NO_FCHMOD)) +- fclose(G.outfile); ++ errval = CloseError(G.outfile, G.filename); + #endif + + #if (!defined(NO_FCHOWN) && !defined(NO_FCHMOD)) +@@ -1239,7 +1271,7 @@ void close_outfile(__G) /* GRR: chang + if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr))) + perror("fchmod (file attributes) error"); + +- fclose(G.outfile); ++ errval = CloseError(G.outfile, G.filename); + #endif /* !NO_FCHOWN && !NO_FCHMOD */ + + /* skip restoring time stamps on user's request */ +@@ -1267,6 +1299,7 @@ void close_outfile(__G) /* GRR: chang + #endif + #endif /* NO_FCHOWN || NO_FCHMOD */ + ++ return errval; + } /* end function close_outfile() */ + + #endif /* !MTS */ +diff -up unzip60/unzpriv.h.close unzip60/unzpriv.h +--- unzip60/unzpriv.h.close 2009-04-20 01:59:26.000000000 +0200 ++++ unzip60/unzpriv.h 2009-11-19 08:19:08.610388618 +0100 +@@ -2604,7 +2604,7 @@ char *GetLoadPath OF((__GPRO)); + int SetFileSize OF((FILE *file, zusz_t filesize)); /* local */ + #endif + #ifndef MTS /* macro in MTS */ +- void close_outfile OF((__GPRO)); /* local */ ++ int close_outfile OF((__GPRO)); /* local */ + #endif + #ifdef SET_SYMLINK_ATTRIBS + int set_symlnk_attribs OF((__GPRO__ slinkentry *slnk_entry)); /* local */ diff --git a/SPECS/unzip/0003-unzip-6.0-attribs-overflow.patch b/SPECS/unzip/0003-unzip-6.0-attribs-overflow.patch new file mode 100644 index 00000000..31223255 --- /dev/null +++ b/SPECS/unzip/0003-unzip-6.0-attribs-overflow.patch @@ -0,0 +1,12 @@ +diff -up unzip60/zipinfo.c.attribs-overflow unzip60/zipinfo.c +--- unzip60/zipinfo.c.attribs-overflow 2009-11-30 09:55:39.000000000 +0100 ++++ unzip60/zipinfo.c 2009-11-30 09:56:42.844263244 +0100 +@@ -1881,7 +1881,7 @@ static int zi_short(__G) /* return PK- + #endif + int k, error, error_in_archive=PK_COOL; + unsigned hostnum, hostver, methid, methnum, xattr; +- char *p, workspace[12], attribs[16]; ++ char *p, workspace[12], attribs[17]; + char methbuf[5]; + static ZCONST char dtype[5]="NXFS"; /* normal, maximum, fast, superfast */ + static ZCONST char Far os[NUM_HOSTS+1][4] = { diff --git a/SPECS/unzip/0004-unzip-6.0-symlink.patch b/SPECS/unzip/0004-unzip-6.0-symlink.patch new file mode 100644 index 00000000..d7eaf160 --- /dev/null +++ b/SPECS/unzip/0004-unzip-6.0-symlink.patch @@ -0,0 +1,17 @@ +diff --git a/process.c b/process.c +index 1e9a1e1..905732b 100644 +--- a/process.c ++++ b/process.c +@@ -1751,6 +1751,12 @@ int process_cdir_file_hdr(__G) /* return PK-type error code */ + = (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11); + #endif + ++#ifdef SYMLINKS ++ /* Initialize the symlink flag, may be set by the platform-specific ++ mapattr function. */ ++ G.pInfo->symlink = 0; ++#endif ++ + return PK_COOL; + + } /* end function process_cdir_file_hdr() */ diff --git a/SPECS/unzip/0005-unzip-6.0-format-secure.patch b/SPECS/unzip/0005-unzip-6.0-format-secure.patch new file mode 100644 index 00000000..81cf8605 --- /dev/null +++ b/SPECS/unzip/0005-unzip-6.0-format-secure.patch @@ -0,0 +1,90 @@ +diff --git a/extract.c b/extract.c +index eeb2f57..a0a4929 100644 +--- a/extract.c ++++ b/extract.c +@@ -472,8 +472,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1)); +- Info(slide, 0x401, ((char *)slide, +- LoadFarString(ReportMsg))); ++ Info(slide, 0x401, ++ ((char *)slide,"%s", LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + } + reached_end = TRUE; /* ...so no more left to do */ +@@ -752,8 +752,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + + #ifndef SFX + if (no_endsig_found) { /* just to make sure */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); +- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); ++ Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(ReportMsg))); + if (!error_in_archive) /* don't overwrite stronger error */ + error_in_archive = PK_WARN; + } +diff --git a/list.c b/list.c +index 15e0011..f7359c3 100644 +--- a/list.c ++++ b/list.c +@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide,"%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -507,7 +507,8 @@ int list_files(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ++ ((char *)slide,"%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + +@@ -591,7 +592,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide,"%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -674,7 +675,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + ---------------------------------------------------------------------------*/ + + if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide,"%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; + } + if (*nmember == 0L && error_in_archive <= PK_WARN) +diff --git a/zipinfo.c b/zipinfo.c +index 6e22cc8..ac5c61b 100644 +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -771,7 +771,7 @@ int zipinfo(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide,"%s", LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; /* sig not found */ + break; + } +@@ -960,7 +960,8 @@ int zipinfo(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ++ ((char *)slide,"%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + diff --git a/SPECS/unzip/0006-unzip-6.0-valgrind.patch b/SPECS/unzip/0006-unzip-6.0-valgrind.patch new file mode 100644 index 00000000..41a75202 --- /dev/null +++ b/SPECS/unzip/0006-unzip-6.0-valgrind.patch @@ -0,0 +1,26 @@ +diff --git a/fileio.c b/fileio.c +index ba0a1d0..03fc4be 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -2006,6 +2006,7 @@ int do_string(__G__ length, option) /* return PK-type error code */ + unsigned comment_bytes_left; + unsigned int block_len; + int error=PK_OK; ++ unsigned int length2; + #ifdef AMIGA + char tmp_fnote[2 * AMIGA_FILENOTELEN]; /* extra room for squozen chars */ + #endif +@@ -2292,8 +2293,12 @@ int do_string(__G__ length, option) /* return PK-type error code */ + seek_zipf(__G__ G.cur_zipfile_bufstart - G.extra_bytes + + (G.inptr-G.inbuf) + length); + } else { +- if (readbuf(__G__ (char *)G.extra_field, length) == 0) ++ if ((length2 = readbuf(__G__ (char *)G.extra_field, length)) == 0) + return PK_EOF; ++ if(length2 < length) { ++ memset (__G__ (char *)G.extra_field+length2, 0 , length-length2); ++ length = length2; ++ } + /* Looks like here is where extra fields are read */ + getZip64Data(__G__ G.extra_field, length); + #ifdef UNICODE_SUPPORT diff --git a/SPECS/unzip/0007-unzip-6.0-x-option.patch b/SPECS/unzip/0007-unzip-6.0-x-option.patch new file mode 100644 index 00000000..72c77aeb --- /dev/null +++ b/SPECS/unzip/0007-unzip-6.0-x-option.patch @@ -0,0 +1,28 @@ +--- ./process.c.orig 2009-03-06 02:25:10.000000000 +0100 ++++ ./process.c 2013-09-12 10:51:16.000000000 +0200 +@@ -2901,9 +2901,9 @@ + */ + + #ifdef IZ_HAVE_UXUIDGID +- if (eb_len >= EB_UX3_MINLEN +- && z_uidgid != NULL +- && (*((EB_HEADSIZE + 0) + ef_buf) == 1) ++ if ((eb_len >= EB_UX3_MINLEN) ++ && (z_uidgid != NULL) ++ && ((*((EB_HEADSIZE + 0) + ef_buf) == 1))) + /* only know about version 1 */ + { + uch uid_size; +@@ -2915,10 +2915,10 @@ + flags &= ~0x0ff; /* ignore any previous UNIX field */ + + if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf, +- uid_size, z_uidgid[0]) ++ uid_size, &z_uidgid[0]) + && + read_ux3_value((EB_HEADSIZE + uid_size + 3) + ef_buf, +- gid_size, z_uidgid[1]) ) ++ gid_size, &z_uidgid[1]) ) + { + flags |= EB_UX2_VALID; /* signal success */ + } diff --git a/SPECS/unzip/0008-unzip-6.0-overflow.patch b/SPECS/unzip/0008-unzip-6.0-overflow.patch new file mode 100644 index 00000000..228c2837 --- /dev/null +++ b/SPECS/unzip/0008-unzip-6.0-overflow.patch @@ -0,0 +1,25 @@ +diff --git a/extract.c b/extract.c +index a0a4929..9ef80b3 100644 +--- a/extract.c ++++ b/extract.c +@@ -2214,6 +2214,7 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + ulg eb_ucsize; + uch *eb_ucptr; + int r; ++ ush method; + + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ +@@ -2223,6 +2224,12 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + eb_size <= (compr_offset + EB_CMPRHEADLEN))) + return IZ_EF_TRUNC; /* no compressed data! */ + ++ method = makeword(eb + (EB_HEADSIZE + compr_offset)); ++ if ((method == STORED) && (eb_size != compr_offset + EB_CMPRHEADLEN + eb_ucsize)) ++ return PK_ERR; /* compressed & uncompressed ++ * should match in STORED ++ * method */ ++ + if ( + #ifdef INT_16BIT + (((ulg)(extent)eb_ucsize) != eb_ucsize) || diff --git a/SPECS/unzip/0009-unzip-6.0-cve-2014-8139.patch b/SPECS/unzip/0009-unzip-6.0-cve-2014-8139.patch new file mode 100644 index 00000000..226b35ac --- /dev/null +++ b/SPECS/unzip/0009-unzip-6.0-cve-2014-8139.patch @@ -0,0 +1,79 @@ +diff --git a/extract.c b/extract.c +index 9ef80b3..c741b5f 100644 +--- a/extract.c ++++ b/extract.c +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 1990-2009 Info-ZIP. All rights reserved. ++ Copyright (c) 1990-2014 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2009-Jan-02 or later + (the contents of which are also included in unzip.h) for terms of use. +@@ -298,6 +298,8 @@ char ZCONST Far TruncNTSD[] = + #ifndef SFX + static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ + EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; ++ static ZCONST char Far TooSmallEBlength[] = "bad extra-field entry:\n \ ++ EF block length (%u bytes) invalid (< %d)\n"; + static ZCONST char Far InvalidComprDataEAs[] = + " invalid compressed data for EAs\n"; + # if (defined(WIN32) && defined(NTSD_EAS)) +@@ -2020,7 +2022,8 @@ static int TestExtraField(__G__ ef, ef_len) + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + +- if (ebLen > (ef_len - EB_HEADSIZE)) { ++ if (ebLen > (ef_len - EB_HEADSIZE)) ++ { + /* Discovered some extra field inconsistency! */ + if (uO.qflag) + Info(slide, 1, ((char *)slide, "%-22s ", +@@ -2155,11 +2158,29 @@ static int TestExtraField(__G__ ef, ef_len) + } + break; + case EF_PKVMS: +- if (makelong(ef+EB_HEADSIZE) != +- crc32(CRCVAL_INITIAL, ef+(EB_HEADSIZE+4), +- (extent)(ebLen-4))) +- Info(slide, 1, ((char *)slide, +- LoadFarString(BadCRC_EAs))); ++ /* 2015-01-30 SMS. Added sufficient-bytes test/message ++ * here. (Removed defective ebLen test above.) ++ * ++ * If sufficient bytes (EB_PKVMS_MINLEN) are available, ++ * then compare the stored CRC value with the calculated ++ * CRC for the remainder of the data (and complain about ++ * a mismatch). ++ */ ++ if (ebLen < EB_PKVMS_MINLEN) ++ { ++ /* Insufficient bytes available. */ ++ Info( slide, 1, ++ ((char *)slide, LoadFarString( TooSmallEBlength), ++ ebLen, EB_PKVMS_MINLEN)); ++ } ++ else if (makelong(ef+ EB_HEADSIZE) != ++ crc32(CRCVAL_INITIAL, ++ (ef+ EB_HEADSIZE+ EB_PKVMS_MINLEN), ++ (extent)(ebLen- EB_PKVMS_MINLEN))) ++ { ++ Info(slide, 1, ((char *)slide, ++ LoadFarString(BadCRC_EAs))); ++ } + break; + case EF_PKW32: + case EF_PKUNIX: +diff --git a/unzpriv.h b/unzpriv.h +index 005cee0..5c83a6e 100644 +--- a/unzpriv.h ++++ b/unzpriv.h +@@ -1806,6 +1806,8 @@ + #define EB_NTSD_VERSION 4 /* offset of NTSD version byte */ + #define EB_NTSD_MAX_VER (0) /* maximum version # we know how to handle */ + ++#define EB_PKVMS_MINLEN 4 /* minimum data length of PKVMS extra block */ ++ + #define EB_ASI_CRC32 0 /* offset of ASI Unix field's crc32 checksum */ + #define EB_ASI_MODE 4 /* offset of ASI Unix permission mode field */ + + diff --git a/SPECS/unzip/0010-unzip-6.0-cve-2014-8140.patch b/SPECS/unzip/0010-unzip-6.0-cve-2014-8140.patch new file mode 100644 index 00000000..b9eba92b --- /dev/null +++ b/SPECS/unzip/0010-unzip-6.0-cve-2014-8140.patch @@ -0,0 +1,25 @@ +diff --git a/extract.c b/extract.c +index c741b5f..e4a4c7b 100644 +--- a/extract.c ++++ b/extract.c +@@ -2240,10 +2240,17 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ + ++ /* Return no/bad-data error status if any problem is found: ++ * 1. eb_size is too small to hold the uncompressed size ++ * (eb_ucsize). (Else extract eb_ucsize.) ++ * 2. eb_ucsize is zero (invalid). 2014-12-04 SMS. ++ * 3. eb_ucsize is positive, but eb_size is too small to hold ++ * the compressed data header. ++ */ + if ((eb_size < (EB_UCSIZE_P + 4)) || +- ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && +- eb_size <= (compr_offset + EB_CMPRHEADLEN))) +- return IZ_EF_TRUNC; /* no compressed data! */ ++ ((eb_ucsize = makelong( eb+ (EB_HEADSIZE+ EB_UCSIZE_P))) == 0L) || ++ ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN)))) ++ return IZ_EF_TRUNC; /* no/bad compressed data! */ + + method = makeword(eb + (EB_HEADSIZE + compr_offset)); + if ((method == STORED) && (eb_size != compr_offset + EB_CMPRHEADLEN + eb_ucsize)) diff --git a/SPECS/unzip/0011-unzip-6.0-cve-2014-8141.patch b/SPECS/unzip/0011-unzip-6.0-cve-2014-8141.patch new file mode 100644 index 00000000..584c576f --- /dev/null +++ b/SPECS/unzip/0011-unzip-6.0-cve-2014-8141.patch @@ -0,0 +1,138 @@ +diff --git a/fileio.c b/fileio.c +index 03fc4be..2a61a30 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -176,6 +176,8 @@ static ZCONST char Far FilenameTooLongTrunc[] = + #endif + static ZCONST char Far ExtraFieldTooLong[] = + "warning: extra field too long (%d). Ignoring...\n"; ++static ZCONST char Far ExtraFieldCorrupt[] = ++ "warning: extra field (type: 0x%04x) corrupt. Continuing...\n"; + + #ifdef WINDLL + static ZCONST char Far DiskFullQuery[] = +@@ -2300,7 +2302,13 @@ int do_string(__G__ length, option) /* return PK-type error code */ + length = length2; + } + /* Looks like here is where extra fields are read */ +- getZip64Data(__G__ G.extra_field, length); ++ if (getZip64Data(__G__ G.extra_field, length) != PK_COOL) ++ { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString( ExtraFieldCorrupt), EF_PKSZ64)); ++ error = PK_WARN; ++ } ++ + #ifdef UNICODE_SUPPORT + G.unipath_filename = NULL; + if (G.UzO.U_flag < 2) { +diff --git a/process.c b/process.c +index be6e006..0d57ab4 100644 +--- a/process.c ++++ b/process.c +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 1990-2009 Info-ZIP. All rights reserved. ++ Copyright (c) 1990-2014 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2009-Jan-02 or later + (the contents of which are also included in unzip.h) for terms of use. +@@ -1894,48 +1894,83 @@ int getZip64Data(__G__ ef_buf, ef_len) + and a 4-byte version of disk start number. + Sets both local header and central header fields. Not terribly clever, + but it means that this procedure is only called in one place. ++ ++ 2014-12-05 SMS. ++ Added checks to ensure that enough data are available before calling ++ makeint64() or makelong(). Replaced various sizeof() values with ++ simple ("4" or "8") constants. (The Zip64 structures do not depend ++ on our variable sizes.) Error handling is crude, but we should now ++ stay within the buffer. + ---------------------------------------------------------------------------*/ + ++#define Z64FLGS 0xffff ++#define Z64FLGL 0xffffffff ++ + if (ef_len == 0 || ef_buf == NULL) + return PK_COOL; + + Trace((stderr,"\ngetZip64Data: scanning extra field of length %u\n", + ef_len)); + +- while (ef_len >= EB_HEADSIZE) { ++ while (ef_len >= EB_HEADSIZE) ++ { + eb_id = makeword(EB_ID + ef_buf); + eb_len = makeword(EB_LEN + ef_buf); + +- if (eb_len > (ef_len - EB_HEADSIZE)) { +- /* discovered some extra field inconsistency! */ ++ if (eb_len > (ef_len - EB_HEADSIZE)) ++ { ++ /* Extra block length exceeds remaining extra field length. */ + Trace((stderr, + "getZip64Data: block length %u > rest ef_size %u\n", eb_len, + ef_len - EB_HEADSIZE)); + break; + } +- if (eb_id == EF_PKSZ64) { + ++ if (eb_id == EF_PKSZ64) ++ { + int offset = EB_HEADSIZE; + +- if (G.crec.ucsize == 0xffffffff || G.lrec.ucsize == 0xffffffff){ +- G.lrec.ucsize = G.crec.ucsize = makeint64(offset + ef_buf); +- offset += sizeof(G.crec.ucsize); ++ if ((G.crec.ucsize == Z64FLGL) || (G.lrec.ucsize == Z64FLGL)) ++ { ++ if (offset+ 8 > ef_len) ++ return PK_ERR; ++ ++ G.crec.ucsize = G.lrec.ucsize = makeint64(offset + ef_buf); ++ offset += 8; + } +- if (G.crec.csize == 0xffffffff || G.lrec.csize == 0xffffffff){ +- G.csize = G.lrec.csize = G.crec.csize = makeint64(offset + ef_buf); +- offset += sizeof(G.crec.csize); ++ ++ if ((G.crec.csize == Z64FLGL) || (G.lrec.csize == Z64FLGL)) ++ { ++ if (offset+ 8 > ef_len) ++ return PK_ERR; ++ ++ G.csize = G.crec.csize = G.lrec.csize = makeint64(offset + ef_buf); ++ offset += 8; + } +- if (G.crec.relative_offset_local_header == 0xffffffff){ ++ ++ if (G.crec.relative_offset_local_header == Z64FLGL) ++ { ++ if (offset+ 8 > ef_len) ++ return PK_ERR; ++ + G.crec.relative_offset_local_header = makeint64(offset + ef_buf); +- offset += sizeof(G.crec.relative_offset_local_header); ++ offset += 8; + } +- if (G.crec.disk_number_start == 0xffff){ ++ ++ if (G.crec.disk_number_start == Z64FLGS) ++ { ++ if (offset+ 4 > ef_len) ++ return PK_ERR; ++ + G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf); +- offset += sizeof(G.crec.disk_number_start); ++ offset += 4; + } ++#if 0 ++ break; /* Expect only one EF_PKSZ64 block. */ ++#endif /* 0 */ + } + +- /* Skip this extra field block */ ++ /* Skip this extra field block. */ + ef_buf += (eb_len + EB_HEADSIZE); + ef_len -= (eb_len + EB_HEADSIZE); + } diff --git a/SPECS/unzip/0012-unzip-6.0-overflow-long-fsize.patch b/SPECS/unzip/0012-unzip-6.0-overflow-long-fsize.patch new file mode 100644 index 00000000..80cd708f --- /dev/null +++ b/SPECS/unzip/0012-unzip-6.0-overflow-long-fsize.patch @@ -0,0 +1,34 @@ +diff --git a/list.c b/list.c +index f7359c3..4c3d703 100644 +--- a/list.c ++++ b/list.c +@@ -97,7 +97,7 @@ int list_files(__G) /* return PK-type error code */ + { + int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL; + #ifndef WINDLL +- char sgn, cfactorstr[10]; ++ char sgn, cfactorstr[13]; + int longhdr=(uO.vflag>1); + #endif + int date_format; +@@ -339,7 +339,19 @@ int list_files(__G) /* return PK-type error code */ + G.crec.compression_method == ENHDEFLATED) { + methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; + } else if (methnum >= NUM_METHODS) { +- sprintf(&methbuf[4], "%03u", G.crec.compression_method); ++ /* 2013-02-26 SMS. ++ * http://sourceforge.net/tracker/?func=detail ++ * &aid=2861648&group_id=118012&atid=679786 ++ * Unexpectedly large compression methods overflow ++ * &methbuf[]. Use the old, three-digit decimal format ++ * for values which fit. Otherwise, sacrifice the ++ * colon, and use four-digit hexadecimal. ++ */ ++ if (G.crec.compression_method <= 999) { ++ sprintf( &methbuf[ 4], "%03u", G.crec.compression_method); ++ } else { ++ sprintf( &methbuf[ 3], "%04X", G.crec.compression_method); ++ } + } + + #if 0 /* GRR/Euro: add this? */ diff --git a/SPECS/unzip/0013-unzip-6.0-heap-overflow-infloop.patch b/SPECS/unzip/0013-unzip-6.0-heap-overflow-infloop.patch new file mode 100644 index 00000000..b517c403 --- /dev/null +++ b/SPECS/unzip/0013-unzip-6.0-heap-overflow-infloop.patch @@ -0,0 +1,104 @@ +From bdd4a0cecd745cb4825e4508b5bdf2579731086a Mon Sep 17 00:00:00 2001 +From: Petr Stodulka +Date: Mon, 14 Sep 2015 18:23:17 +0200 +Subject: [PATCH 1/3] upstream fix for heap overflow + +https://bugzilla.redhat.com/attachment.cgi?id=1073002 +--- + crypt.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/crypt.c b/crypt.c +index 784e411..a8975f2 100644 +--- a/crypt.c ++++ b/crypt.c +@@ -465,7 +465,17 @@ int decrypt(__G__ passwrd) + GLOBAL(pInfo->encrypted) = FALSE; + defer_leftover_input(__G); + for (n = 0; n < RAND_HEAD_LEN; n++) { +- b = NEXTBYTE; ++ /* 2012-11-23 SMS. (OUSPG report.) ++ * Quit early if compressed size < HEAD_LEN. The resulting ++ * error message ("unable to get password") could be improved, ++ * but it's better than trying to read nonexistent data, and ++ * then continuing with a negative G.csize. (See ++ * fileio.c:readbyte()). ++ */ ++ if ((b = NEXTBYTE) == (ush)EOF) ++ { ++ return PK_ERR; ++ } + h[n] = (uch)b; + Trace((stdout, " (%02x)", h[n])); + } +-- +2.4.6 + + +From 4b48844661ff9569f2ecf582a387d46a5775b5d8 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Mon, 14 Sep 2015 18:24:56 +0200 +Subject: [PATCH 2/3] fix infinite loop when extracting empty bzip2 data + +Bug: https://sourceforge.net/p/infozip/patches/23/ +--- + extract.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/extract.c b/extract.c +index 7134bfe..29db027 100644 +--- a/extract.c ++++ b/extract.c +@@ -2733,6 +2733,12 @@ __GDEF + int repeated_buf_err; + bz_stream bstrm; + ++ if (G.incnt <= 0 && G.csize <= 0L) { ++ /* avoid an infinite loop */ ++ Trace((stderr, "UZbunzip2() got empty input\n")); ++ return 2; ++ } ++ + #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) + if (G.redirect_slide) + wsize = G.redirect_size, redirSlide = G.redirect_buffer; +-- +2.4.6 + + +From bd150334fb4084f5555a6be26b015a0671cb5b74 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 22 Sep 2015 18:52:23 +0200 +Subject: [PATCH 3/3] extract: prevent unsigned overflow on invalid input + +Suggested-by: Stefan Cornelius +--- + extract.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/extract.c b/extract.c +index 29db027..b9ae667 100644 +--- a/extract.c ++++ b/extract.c +@@ -1257,8 +1257,17 @@ static int extract_or_test_entrylist(__G__ numchunk, + if (G.lrec.compression_method == STORED) { + zusz_t csiz_decrypted = G.lrec.csize; + +- if (G.pInfo->encrypted) ++ if (G.pInfo->encrypted) { ++ if (csiz_decrypted < 12) { ++ /* handle the error now to prevent unsigned overflow */ ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarStringSmall(ErrUnzipNoFile), ++ LoadFarString(InvalidComprData), ++ LoadFarStringSmall2(Inflate))); ++ return PK_ERR; ++ } + csiz_decrypted -= 12; ++ } + if (G.lrec.ucsize != csiz_decrypted) { + Info(slide, 0x401, ((char *)slide, + LoadFarStringSmall2(WrnStorUCSizCSizDiff), +-- +2.5.2 + diff --git a/SPECS/unzip/0014-unzip-6.0-alt-iconv-utf8.patch b/SPECS/unzip/0014-unzip-6.0-alt-iconv-utf8.patch new file mode 100644 index 00000000..1db3164c --- /dev/null +++ b/SPECS/unzip/0014-unzip-6.0-alt-iconv-utf8.patch @@ -0,0 +1,398 @@ +From: Giovanni Scafora +Subject: unzip files encoded with non-latin, non-unicode file names +Last-Update: 2015-02-11 + +Updated 2015-02-11 by Marc Deslauriers +to fix buffer overflow in charset_to_intern() + +Index: unzip-6.0/unix/unix.c +=================================================================== +--- unzip-6.0.orig/unix/unix.c 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unix/unix.c 2015-02-11 09:18:04.902081319 -0500 +@@ -30,6 +30,9 @@ + #define UNZIP_INTERNAL + #include "unzip.h" + ++#include ++#include ++ + #ifdef SCO_XENIX + # define SYSNDIR + #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +@@ -1874,3 +1877,102 @@ + } + } + #endif /* QLZIP */ ++ ++ ++typedef struct { ++ char *local_charset; ++ char *archive_charset; ++} CHARSET_MAP; ++ ++/* A mapping of local <-> archive charsets used by default to convert filenames ++ * of DOS/Windows Zip archives. Currently very basic. */ ++static CHARSET_MAP dos_charset_map[] = { ++ { "ANSI_X3.4-1968", "CP850" }, ++ { "ISO-8859-1", "CP850" }, ++ { "CP1252", "CP850" }, ++ { "UTF-8", "CP866" }, ++ { "KOI8-R", "CP866" }, ++ { "KOI8-U", "CP866" }, ++ { "ISO-8859-5", "CP866" } ++}; ++ ++char OEM_CP[MAX_CP_NAME] = ""; ++char ISO_CP[MAX_CP_NAME] = ""; ++ ++/* Try to guess the default value of OEM_CP based on the current locale. ++ * ISO_CP is left alone for now. */ ++void init_conversion_charsets() ++{ ++ const char *local_charset; ++ int i; ++ ++ /* Make a guess only if OEM_CP not already set. */ ++ if(*OEM_CP == '\0') { ++ local_charset = nl_langinfo(CODESET); ++ for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++) ++ if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) { ++ strncpy(OEM_CP, dos_charset_map[i].archive_charset, ++ sizeof(OEM_CP)); ++ break; ++ } ++ } ++} ++ ++/* Convert a string from one encoding to the current locale using iconv(). ++ * Be as non-intrusive as possible. If error is encountered during covertion ++ * just leave the string intact. */ ++static void charset_to_intern(char *string, char *from_charset) ++{ ++ iconv_t cd; ++ char *s,*d, *buf; ++ size_t slen, dlen, buflen; ++ const char *local_charset; ++ ++ if(*from_charset == '\0') ++ return; ++ ++ buf = NULL; ++ local_charset = nl_langinfo(CODESET); ++ ++ if((cd = iconv_open(local_charset, from_charset)) == (iconv_t)-1) ++ return; ++ ++ slen = strlen(string); ++ s = string; ++ ++ /* Make sure OUTBUFSIZ + 1 never ends up smaller than FILNAMSIZ ++ * as this function also gets called with G.outbuf in fileio.c ++ */ ++ buflen = FILNAMSIZ; ++ if (OUTBUFSIZ + 1 < FILNAMSIZ) ++ { ++ buflen = OUTBUFSIZ + 1; ++ } ++ ++ d = buf = malloc(buflen); ++ if(!d) ++ goto cleanup; ++ ++ bzero(buf,buflen); ++ dlen = buflen - 1; ++ ++ if(iconv(cd, &s, &slen, &d, &dlen) == (size_t)-1) ++ goto cleanup; ++ strncpy(string, buf, buflen); ++ ++ cleanup: ++ free(buf); ++ iconv_close(cd); ++} ++ ++/* Convert a string from OEM_CP to the current locale charset. */ ++inline void oem_intern(char *string) ++{ ++ charset_to_intern(string, OEM_CP); ++} ++ ++/* Convert a string from ISO_CP to the current locale charset. */ ++inline void iso_intern(char *string) ++{ ++ charset_to_intern(string, ISO_CP); ++} +Index: unzip-6.0/unix/unxcfg.h +=================================================================== +--- unzip-6.0.orig/unix/unxcfg.h 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unix/unxcfg.h 2015-02-11 08:46:43.671324260 -0500 +@@ -228,4 +228,30 @@ + /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ + /* and notfirstcall are used by do_wild(). */ + ++ ++#define MAX_CP_NAME 25 ++ ++#ifdef SETLOCALE ++# undef SETLOCALE ++#endif ++#define SETLOCALE(category, locale) setlocale(category, locale) ++#include ++ ++#ifdef _ISO_INTERN ++# undef _ISO_INTERN ++#endif ++#define _ISO_INTERN(str1) iso_intern(str1) ++ ++#ifdef _OEM_INTERN ++# undef _OEM_INTERN ++#endif ++#ifndef IZ_OEM2ISO_ARRAY ++# define IZ_OEM2ISO_ARRAY ++#endif ++#define _OEM_INTERN(str1) oem_intern(str1) ++ ++void iso_intern(char *); ++void oem_intern(char *); ++void init_conversion_charsets(void); ++ + #endif /* !__unxcfg_h */ +Index: unzip-6.0/unzip.c +=================================================================== +--- unzip-6.0.orig/unzip.c 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unzip.c 2015-02-11 08:46:43.675324290 -0500 +@@ -327,11 +327,21 @@ + -2 just filenames but allow -h/-t/-z -l long Unix \"ls -l\" format\n\ + -v verbose, multi-page format\n"; + ++#ifndef UNIX + static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment -T print file times in sortable decimal format\ + \n -C be case-insensitive %s\ + -x exclude filenames that follow from listing\n"; ++#else /* UNIX */ ++static ZCONST char Far ZipInfoUsageLine3[] = "miscellaneous options:\n\ ++ -h print header line -t print totals for listed files or for all\n\ ++ -z print zipfile comment -T print file times in sortable decimal format\ ++\n -C be case-insensitive %s\ ++ -x exclude filenames that follow from listing\n\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; ++#endif /* !UNIX */ + #ifdef MORE + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +@@ -664,6 +674,17 @@ + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ + -C match filenames case-insensitively -L make (some) names \ + lowercase\n %-42s -V retain VMS version numbers\n%s"; ++#elif (defined UNIX) ++static ZCONST char Far UnzipUsageLine4[] = "\ ++modifiers:\n\ ++ -n never overwrite existing files -q quiet mode (-qq => quieter)\n\ ++ -o overwrite files WITHOUT prompting -a auto-convert any text files\n\ ++ -j junk paths (do not make directories) -aa treat ALL files as text\n\ ++ -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ ++ -C match filenames case-insensitively -L make (some) names \ ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n\n"; + #else /* !VMS */ + static ZCONST char Far UnzipUsageLine4[] = "\ + modifiers:\n\ +@@ -802,6 +823,10 @@ + #endif /* UNICODE_SUPPORT */ + + ++#ifdef UNIX ++ init_conversion_charsets(); ++#endif ++ + #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + +@@ -1335,6 +1360,11 @@ + argc = *pargc; + argv = *pargv; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif ++ + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +@@ -1516,6 +1546,35 @@ + } + break; + #endif /* MACOS */ ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; +@@ -1591,6 +1650,35 @@ + } else + ++uO.overwrite_all; + break; ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; +Index: unzip-6.0/unzpriv.h +=================================================================== +--- unzip-6.0.orig/unzpriv.h 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/unzpriv.h 2015-02-11 08:46:43.675324290 -0500 +@@ -3008,7 +3008,7 @@ + !(((islochdr) || (isuxatt)) && \ + ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ + (hostnum) == FS_HPFS_ || \ +- ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ ++ ((hostnum) == FS_NTFS_ /* && (hostver) == 50 */ )) { \ + _OEM_INTERN((string)); \ + } else { \ + _ISO_INTERN((string)); \ +Index: unzip-6.0/zipinfo.c +=================================================================== +--- unzip-6.0.orig/zipinfo.c 2015-02-11 08:46:43.675324290 -0500 ++++ unzip-6.0/zipinfo.c 2015-02-11 08:46:43.675324290 -0500 +@@ -457,6 +457,10 @@ + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif + + #ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +@@ -501,6 +505,35 @@ + uO.lflag = 0; + } + break; ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; +@@ -521,6 +554,35 @@ + G.M_flag = TRUE; + break; + #endif ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; diff --git a/SPECS/unzip/0015-unzip-6.0-alt-iconv-utf8-print.patch b/SPECS/unzip/0015-unzip-6.0-alt-iconv-utf8-print.patch new file mode 100644 index 00000000..0b0153ba --- /dev/null +++ b/SPECS/unzip/0015-unzip-6.0-alt-iconv-utf8-print.patch @@ -0,0 +1,381 @@ +From ca0212ba19b64488b9e8459a762c11ecd6e7d0bd Mon Sep 17 00:00:00 2001 +From: Petr Stodulka +Date: Tue, 24 Nov 2015 17:56:11 +0100 +Subject: [PATCH] print correctly non-ascii filenames + +--- + extract.c | 289 ++++++++++++++++++++++++++++++++++++++++++++++++-------------- + unzpriv.h | 7 ++ + 2 files changed, 233 insertions(+), 63 deletions(-) + +diff --git a/extract.c b/extract.c +index 0ee4e93..741b7e0 100644 +--- a/extract.c ++++ b/extract.c +@@ -2648,8 +2648,21 @@ static void set_deferred_symlink(__G__ slnk_entry) + } /* end function set_deferred_symlink() */ + #endif /* SYMLINKS */ + ++/* ++ * If Unicode is supported, assume we have what we need to do this ++ * check using wide characters, avoiding MBCS issues. ++ */ + +- ++#ifndef UZ_FNFILTER_REPLACECHAR ++ /* A convenient choice for the replacement of unprintable char codes is ++ * the "single char wildcard", as this character is quite unlikely to ++ * appear in filenames by itself. The following default definition ++ * sets the replacement char to a question mark as the most common ++ * "single char wildcard"; this setting should be overridden in the ++ * appropiate system-specific configuration header when needed. ++ */ ++# define UZ_FNFILTER_REPLACECHAR '?' ++#endif + + /*************************/ + /* Function fnfilter() */ /* here instead of in list.c for SFX */ +@@ -2661,48 +2674,168 @@ char *fnfilter(raw, space, size) /* convert name to safely printable form */ + extent size; + { + #ifndef NATIVE /* ASCII: filter ANSI escape codes, etc. */ +- ZCONST uch *r=(ZCONST uch *)raw; ++ ZCONST uch *r; // =(ZCONST uch *)raw; + uch *s=space; + uch *slim=NULL; + uch *se=NULL; + int have_overflow = FALSE; + +- if (size > 0) { +- slim = space + size +-#ifdef _MBCS +- - (MB_CUR_MAX - 1) +-#endif +- - 4; ++# if defined( UNICODE_SUPPORT) && defined( _MBCS) ++/* If Unicode support is enabled, and we have multi-byte characters, ++ * then do the isprint() checks by first converting to wide characters ++ * and checking those. This avoids our having to parse multi-byte ++ * characters for ourselves. After the wide-char replacements have been ++ * made, the wide string is converted back to the local character set. ++ */ ++ wchar_t *wstring; /* wchar_t version of raw */ ++ size_t wslen; /* length of wstring */ ++ wchar_t *wostring; /* wchar_t version of output string */ ++ size_t woslen; /* length of wostring */ ++ char *newraw; /* new raw */ ++ ++ /* 2012-11-06 SMS. ++ * Changed to check the value returned by mbstowcs(), and bypass the ++ * Unicode processing if it fails. This seems to fix a problem ++ * reported in the SourceForge forum, but it's not clear that we ++ * should be doing any Unicode processing without some evidence that ++ * the name actually is Unicode. (Check bit 11 in the flags before ++ * coming here?) ++ * http://sourceforge.net/p/infozip/bugs/40/ ++ */ ++ ++ if (MB_CUR_MAX <= 1) ++ { ++ /* There's no point to converting multi-byte chars if there are ++ * no multi-byte chars. ++ */ ++ wslen = (size_t)-1; + } +- while (*r) { +- if (size > 0 && s >= slim && se == NULL) { +- se = s; ++ else ++ { ++ /* Get Unicode wide character count (for storage allocation). */ ++ wslen = mbstowcs( NULL, raw, 0); ++ } ++ ++ if (wslen != (size_t)-1) ++ { ++ /* Apparently valid Unicode. Allocate wide-char storage. */ ++ wstring = (wchar_t *)malloc((wslen + 1) * sizeof(wchar_t)); ++ if (wstring == NULL) { ++ strcpy( (char *)space, raw); ++ return (char *)space; + } +-#ifdef QDOS +- if (qlflag & 2) { +- if (*r == '/' || *r == '.') { ++ wostring = (wchar_t *)malloc(2 * (wslen + 1) * sizeof(wchar_t)); ++ if (wostring == NULL) { ++ free(wstring); ++ strcpy( (char *)space, raw); ++ return (char *)space; ++ } ++ ++ /* Convert the multi-byte Unicode to wide chars. */ ++ wslen = mbstowcs(wstring, raw, wslen + 1); ++ ++ /* Filter the wide-character string. */ ++ fnfilterw( wstring, wostring, (2 * (wslen + 1) * sizeof(wchar_t))); ++ ++ /* Convert filtered wide chars back to multi-byte. */ ++ woslen = wcstombs( NULL, wostring, 0); ++ if ((newraw = malloc(woslen + 1)) == NULL) { ++ free(wstring); ++ free(wostring); ++ strcpy( (char *)space, raw); ++ return (char *)space; ++ } ++ woslen = wcstombs( newraw, wostring, (woslen * MB_CUR_MAX) + 1); ++ ++ if (size > 0) { ++ slim = space + size - 4; ++ } ++ r = (ZCONST uch *)newraw; ++ while (*r) { ++ if (size > 0 && s >= slim && se == NULL) { ++ se = s; ++ } ++# ifdef QDOS ++ if (qlflag & 2) { ++ if (*r == '/' || *r == '.') { ++ if (se != NULL && (s > (space + (size-3)))) { ++ have_overflow = TRUE; ++ break; ++ } ++ ++r; ++ *s++ = '_'; ++ continue; ++ } ++ } else ++# endif ++ { + if (se != NULL && (s > (space + (size-3)))) { + have_overflow = TRUE; + break; + } +- ++r; +- *s++ = '_'; +- continue; ++ *s++ = *r++; + } +- } else ++ } ++ if (have_overflow) { ++ strcpy((char *)se, "..."); ++ } else { ++ *s = '\0'; ++ } ++ ++ free(wstring); ++ free(wostring); ++ free(newraw); ++ } ++ else ++# endif /* defined( UNICODE_SUPPORT) && defined( _MBCS) */ ++ { ++ /* No Unicode support, or apparently invalid Unicode. */ ++ r = (ZCONST uch *)raw; ++ ++ if (size > 0) { ++ slim = space + size ++#ifdef _MBCS ++ - (MB_CUR_MAX - 1) ++#endif ++ - 4; ++ } ++ while (*r) { ++ if (size > 0 && s >= slim && se == NULL) { ++ se = s; ++ } ++#ifdef QDOS ++ if (qlflag & 2) { ++ if (*r == '/' || *r == '.') { ++ if (se != NULL && (s > (space + (size-3)))) { ++ have_overflow = TRUE; ++ break; ++ } ++ ++r; ++ *s++ = '_'; ++ continue; ++ } ++ } else + #endif + #ifdef HAVE_WORKING_ISPRINT +-# ifndef UZ_FNFILTER_REPLACECHAR +- /* A convenient choice for the replacement of unprintable char codes is +- * the "single char wildcard", as this character is quite unlikely to +- * appear in filenames by itself. The following default definition +- * sets the replacement char to a question mark as the most common +- * "single char wildcard"; this setting should be overridden in the +- * appropiate system-specific configuration header when needed. +- */ +-# define UZ_FNFILTER_REPLACECHAR '?' +-# endif +- if (!isprint(*r)) { ++ if (!isprint(*r)) { ++ if (*r < 32) { ++ /* ASCII control codes are escaped as "^{letter}". */ ++ if (se != NULL && (s > (space + (size-4)))) { ++ have_overflow = TRUE; ++ break; ++ } ++ *s++ = '^', *s++ = (uch)(64 + *r++); ++ } else { ++ /* Other unprintable codes are replaced by the ++ * placeholder character. */ ++ if (se != NULL && (s > (space + (size-3)))) { ++ have_overflow = TRUE; ++ break; ++ } ++ *s++ = UZ_FNFILTER_REPLACECHAR; ++ INCSTR(r); ++ } ++#else /* !HAVE_WORKING_ISPRINT */ + if (*r < 32) { + /* ASCII control codes are escaped as "^{letter}". */ + if (se != NULL && (s > (space + (size-4)))) { +@@ -2710,47 +2843,30 @@ char *fnfilter(raw, space, size) /* convert name to safely printable form */ + break; + } + *s++ = '^', *s++ = (uch)(64 + *r++); ++#endif /* ?HAVE_WORKING_ISPRINT */ + } else { +- /* Other unprintable codes are replaced by the +- * placeholder character. */ ++#ifdef _MBCS ++ unsigned i = CLEN(r); ++ if (se != NULL && (s > (space + (size-i-2)))) { ++ have_overflow = TRUE; ++ break; ++ } ++ for (; i > 0; i--) ++ *s++ = *r++; ++#else + if (se != NULL && (s > (space + (size-3)))) { + have_overflow = TRUE; + break; + } +- *s++ = UZ_FNFILTER_REPLACECHAR; +- INCSTR(r); +- } +-#else /* !HAVE_WORKING_ISPRINT */ +- if (*r < 32) { +- /* ASCII control codes are escaped as "^{letter}". */ +- if (se != NULL && (s > (space + (size-4)))) { +- have_overflow = TRUE; +- break; +- } +- *s++ = '^', *s++ = (uch)(64 + *r++); +-#endif /* ?HAVE_WORKING_ISPRINT */ +- } else { +-#ifdef _MBCS +- unsigned i = CLEN(r); +- if (se != NULL && (s > (space + (size-i-2)))) { +- have_overflow = TRUE; +- break; +- } +- for (; i > 0; i--) + *s++ = *r++; +-#else +- if (se != NULL && (s > (space + (size-3)))) { +- have_overflow = TRUE; +- break; +- } +- *s++ = *r++; + #endif +- } +- } +- if (have_overflow) { +- strcpy((char *)se, "..."); +- } else { +- *s = '\0'; ++ } ++ } ++ if (have_overflow) { ++ strcpy((char *)se, "..."); ++ } else { ++ *s = '\0'; ++ } + } + + #ifdef WINDLL +@@ -2772,6 +2888,53 @@ char *fnfilter(raw, space, size) /* convert name to safely printable form */ + } /* end function fnfilter() */ + + ++#if defined( UNICODE_SUPPORT) && defined( _MBCS) ++ ++/****************************/ ++/* Function fnfilter[w]() */ /* (Here instead of in list.c for SFX.) */ ++/****************************/ ++ ++/* fnfilterw() - Convert wide name to safely printable form. */ ++ ++/* fnfilterw() - Convert wide-character name to safely printable form. */ ++ ++wchar_t *fnfilterw( src, dst, siz) ++ ZCONST wchar_t *src; /* Pointer to source char (string). */ ++ wchar_t *dst; /* Pointer to destination char (string). */ ++ extent siz; /* Not used (!). */ ++{ ++ wchar_t *dsx = dst; ++ ++ /* Filter the wide chars. */ ++ while (*src) ++ { ++ if (iswprint( *src)) ++ { ++ /* Printable code. Copy it. */ ++ *dst++ = *src; ++ } ++ else ++ { ++ /* Unprintable code. Substitute something printable for it. */ ++ if (*src < 32) ++ { ++ /* Replace ASCII control code with "^{letter}". */ ++ *dst++ = (wchar_t)'^'; ++ *dst++ = (wchar_t)(64 + *src); ++ } ++ else ++ { ++ /* Replace other unprintable code with the placeholder. */ ++ *dst++ = (wchar_t)UZ_FNFILTER_REPLACECHAR; ++ } ++ } ++ src++; ++ } ++ *dst = (wchar_t)0; /* NUL-terminate the destination string. */ ++ return dsx; ++} /* fnfilterw(). */ ++ ++#endif /* defined( UNICODE_SUPPORT) && defined( _MBCS) */ + + + #ifdef SET_DIR_ATTRIB +diff --git a/unzpriv.h b/unzpriv.h +index 22d3923..e48a652 100644 +--- a/unzpriv.h ++++ b/unzpriv.h +@@ -1212,6 +1212,7 @@ + # ifdef UNICODE_WCHAR + # if !(defined(_WIN32_WCE) || defined(POCKET_UNZIP)) + # include ++# include + # endif + # endif + # ifndef _MBCS /* no need to include twice, see below */ +@@ -2410,6 +2411,12 @@ int memflush OF((__GPRO__ ZCONST uch *rawbuf, ulg size)); + char *fnfilter OF((ZCONST char *raw, uch *space, + extent size)); + ++# if defined( UNICODE_SUPPORT) && defined( _MBCS) ++wchar_t *fnfilterw OF((ZCONST wchar_t *src, wchar_t *dst, ++ extent siz)); ++#endif ++ ++ + /*--------------------------------------------------------------------------- + Decompression functions: + ---------------------------------------------------------------------------*/ +-- +2.4.3 + diff --git a/SPECS/unzip/0016-Fix-CVE-2016-9844-rhbz-1404283.patch b/SPECS/unzip/0016-Fix-CVE-2016-9844-rhbz-1404283.patch new file mode 100644 index 00000000..0e4a1733 --- /dev/null +++ b/SPECS/unzip/0016-Fix-CVE-2016-9844-rhbz-1404283.patch @@ -0,0 +1,39 @@ +From 754137e70cf58a64ad524b704a86b651ba0cde07 Mon Sep 17 00:00:00 2001 +From: Petr Stodulka +Date: Wed, 14 Dec 2016 16:30:36 +0100 +Subject: [PATCH] Fix CVE-2016-9844 (rhbz#1404283) + +Fixes buffer overflow in zipinfo in similar way like fix for +CVE-2014-9913 provided by upstream. +--- + zipinfo.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/zipinfo.c b/zipinfo.c +index c03620e..accca2a 100644 +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -1984,7 +1984,19 @@ static int zi_short(__G) /* return PK-type error code */ + ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); + methbuf[3] = dtype[dnum]; + } else if (methnum >= NUM_METHODS) { /* unknown */ +- sprintf(&methbuf[1], "%03u", G.crec.compression_method); ++ /* 2016-12-05 SMS. ++ * https://launchpad.net/bugs/1643750 ++ * Unexpectedly large compression methods overflow ++ * &methbuf[]. Use the old, three-digit decimal format ++ * for values which fit. Otherwise, sacrifice the "u", ++ * and use four-digit hexadecimal. ++ */ ++ if (G.crec.compression_method <= 999) { ++ sprintf( &methbuf[ 1], "%03u", G.crec.compression_method); ++ } else { ++ sprintf( &methbuf[ 0], "%04X", G.crec.compression_method); ++ } ++ + } + + for (k = 0; k < 15; ++k) +-- +2.5.5 + diff --git a/SPECS/unzip/0017-unzip-6.0-timestamp.patch b/SPECS/unzip/0017-unzip-6.0-timestamp.patch new file mode 100644 index 00000000..2aa9424e --- /dev/null +++ b/SPECS/unzip/0017-unzip-6.0-timestamp.patch @@ -0,0 +1,41 @@ +From: "Steven M. Schweda" +Subject: Do not ignore extra fields containing Unix Timestamps +Bug-Debian: https://bugs.debian.org/842993 +X-Debian-version: 6.0-21 + +--- a/process.c ++++ b/process.c +@@ -2914,10 +2914,13 @@ + break; + + case EF_IZUNIX2: +- if (have_new_type_eb == 0) { +- flags &= ~0x0ff; /* ignore any previous IZUNIX field */ ++ if (have_new_type_eb == 0) { /* (< 1) */ + have_new_type_eb = 1; + } ++ if (have_new_type_eb <= 1) { ++ /* Ignore any prior (EF_IZUNIX/EF_PKUNIX) UID/GID. */ ++ flags &= 0x0ff; ++ } + #ifdef IZ_HAVE_UXUIDGID + if (have_new_type_eb > 1) + break; /* IZUNIX3 overrides IZUNIX2 e.f. block ! */ +@@ -2933,6 +2936,8 @@ + /* new 3rd generation Unix ef */ + have_new_type_eb = 2; + ++ /* Ignore any prior EF_IZUNIX/EF_PKUNIX/EF_IZUNIX2 UID/GID. */ ++ flags &= 0x0ff; + /* + Version 1 byte version of this extra field, currently 1 + UIDSize 1 byte Size of UID field +@@ -2953,8 +2958,6 @@ + uid_size = *((EB_HEADSIZE + 1) + ef_buf); + gid_size = *((EB_HEADSIZE + uid_size + 2) + ef_buf); + +- flags &= ~0x0ff; /* ignore any previous UNIX field */ +- + if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf, + uid_size, &z_uidgid[0]) + && diff --git a/SPECS/unzip/0018-unzip-6.0-cve-2018-1000035-heap-based-overflow.patch b/SPECS/unzip/0018-unzip-6.0-cve-2018-1000035-heap-based-overflow.patch new file mode 100644 index 00000000..8ca71386 --- /dev/null +++ b/SPECS/unzip/0018-unzip-6.0-cve-2018-1000035-heap-based-overflow.patch @@ -0,0 +1,34 @@ +--- a/fileio.c 2014-12-05 05:06:05 -0600 ++++ b/fileio.c 2017-11-14 01:06:28 -0600 +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 1990-2009 Info-ZIP. All rights reserved. ++ Copyright (c) 1990-2017 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2009-Jan-02 or later + (the contents of which are also included in unzip.h) for terms of use. +@@ -1582,6 +1582,8 @@ + int r = IZ_PW_ENTERED; + char *m; + char *prompt; ++ char *ep; ++ char *zp; + + #ifndef REENTRANT + /* tell picky compilers to shut up about "unused variable" warnings */ +@@ -1590,9 +1592,12 @@ + + if (*rcnt == 0) { /* First call for current entry */ + *rcnt = 2; +- if ((prompt = (char *)malloc(2*FILNAMSIZ + 15)) != (char *)NULL) { +- sprintf(prompt, LoadFarString(PasswPrompt), +- FnFilter1(zfn), FnFilter2(efn)); ++ zp = FnFilter1( zfn); ++ ep = FnFilter2( efn); ++ prompt = (char *)malloc( /* Slightly too long (2* "%s"). */ ++ sizeof( PasswPrompt)+ strlen( zp)+ strlen( ep)); ++ if (prompt != (char *)NULL) { ++ sprintf(prompt, LoadFarString(PasswPrompt), zp, ep); + m = prompt; + } else + m = (char *)LoadFarString(PasswPrompt2); diff --git a/SPECS/unzip/0019-unzip-6.0-cve-2018-18384.patch b/SPECS/unzip/0019-unzip-6.0-cve-2018-18384.patch new file mode 100644 index 00000000..54d4b8cb --- /dev/null +++ b/SPECS/unzip/0019-unzip-6.0-cve-2018-18384.patch @@ -0,0 +1,35 @@ +--- unzip60/list.c ++++ unzip60/list.c +@@ -97,7 +97,7 @@ int list_files(__G) /* return PK-type + { + int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL; + #ifndef WINDLL +- char sgn, cfactorstr[13]; ++ char sgn, cfactorstr[1+10+1+1]; /* %NUL */ + int longhdr=(uO.vflag>1); + #endif + int date_format; +@@ -389,9 +389,9 @@ int list_files(__G) /* return PK-type + } + #else /* !WINDLL */ + if (cfactor == 100) +- sprintf(cfactorstr, LoadFarString(CompFactor100)); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100)); + else +- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) + Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats), + FmZofft(G.crec.ucsize, "8", "u"), methbuf, +@@ -471,9 +471,9 @@ int list_files(__G) /* return PK-type + + #else /* !WINDLL */ + if (cfactor == 100) +- sprintf(cfactorstr, LoadFarString(CompFactor100)); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100)); + else +- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor); ++ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor); + if (longhdr) { + Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer), + FmZofft(tot_ucsize, "8", "u"), FmZofft(tot_csize, "8", "u"), diff --git a/SPECS/unzip/0020-unzip-6.0-COVSCAN-fix-unterminated-string.patch b/SPECS/unzip/0020-unzip-6.0-COVSCAN-fix-unterminated-string.patch new file mode 100644 index 00000000..71737711 --- /dev/null +++ b/SPECS/unzip/0020-unzip-6.0-COVSCAN-fix-unterminated-string.patch @@ -0,0 +1,131 @@ +From 06d1b08aef94984256cad3c5a54cedb10295681f Mon Sep 17 00:00:00 2001 +From: Jakub Martisko +Date: Thu, 8 Nov 2018 09:31:18 +0100 +Subject: [PATCH] Possible unterminated string fix + +--- + unix/unix.c | 4 +++- + unix/unxcfg.h | 2 +- + unzip.c | 12 ++++++++---- + zipinfo.c | 12 ++++++++---- + 4 files changed, 20 insertions(+), 10 deletions(-) + +diff --git a/unix/unix.c b/unix/unix.c +index 59b622d..cd57f80 100644 +--- a/unix/unix.c ++++ b/unix/unix.c +@@ -1945,7 +1945,9 @@ void init_conversion_charsets() + for(i = 0; i < sizeof(dos_charset_map)/sizeof(CHARSET_MAP); i++) + if(!strcasecmp(local_charset, dos_charset_map[i].local_charset)) { + strncpy(OEM_CP, dos_charset_map[i].archive_charset, +- sizeof(OEM_CP)); ++ MAX_CP_NAME - 1); ++ ++ OEM_CP[MAX_CP_NAME - 1] = '\0'; + break; + } + } +diff --git a/unix/unxcfg.h b/unix/unxcfg.h +index 8729de2..9ee8cfe 100644 +--- a/unix/unxcfg.h ++++ b/unix/unxcfg.h +@@ -228,7 +228,7 @@ typedef struct stat z_stat; + /* and notfirstcall are used by do_wild(). */ + + +-#define MAX_CP_NAME 25 ++#define MAX_CP_NAME 25 + 1 + + #ifdef SETLOCALE + # undef SETLOCALE +diff --git a/unzip.c b/unzip.c +index 2d94a38..a485f2b 100644 +--- a/unzip.c ++++ b/unzip.c +@@ -1561,7 +1561,8 @@ int uz_opts(__G__ pargc, pargv) + "error: a valid character encoding should follow the -I argument")); + return(PK_PARAM); + } +- strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ strncpy(ISO_CP, s, MAX_CP_NAME - 1); ++ ISO_CP[MAX_CP_NAME - 1] = '\0'; + } else { /* -I charset */ + ++argv; + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { +@@ -1570,7 +1571,8 @@ int uz_opts(__G__ pargc, pargv) + return(PK_PARAM); + } + s = *argv; +- strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ strncpy(ISO_CP, s, MAX_CP_NAME - 1); ++ ISO_CP[MAX_CP_NAME - 1] = '\0'; + } + while(*(++s)); /* No params straight after charset name */ + } +@@ -1665,7 +1667,8 @@ int uz_opts(__G__ pargc, pargv) + "error: a valid character encoding should follow the -I argument")); + return(PK_PARAM); + } +- strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ strncpy(OEM_CP, s, MAX_CP_NAME - 1); ++ OEM_CP[MAX_CP_NAME - 1] = '\0'; + } else { /* -O charset */ + ++argv; + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { +@@ -1674,7 +1677,8 @@ int uz_opts(__G__ pargc, pargv) + return(PK_PARAM); + } + s = *argv; +- strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ strncpy(OEM_CP, s, MAX_CP_NAME - 1); ++ OEM_CP[MAX_CP_NAME - 1] = '\0'; + } + while(*(++s)); /* No params straight after charset name */ + } +diff --git a/zipinfo.c b/zipinfo.c +index accca2a..cb7e08d 100644 +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -519,7 +519,8 @@ int zi_opts(__G__ pargc, pargv) + "error: a valid character encoding should follow the -I argument")); + return(PK_PARAM); + } +- strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ strncpy(ISO_CP, s, MAX_CP_NAME - 1); ++ ISO_CP[MAX_CP_NAME - 1] = '\0'; + } else { /* -I charset */ + ++argv; + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { +@@ -528,7 +529,8 @@ int zi_opts(__G__ pargc, pargv) + return(PK_PARAM); + } + s = *argv; +- strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ strncpy(ISO_CP, s, MAX_CP_NAME - 1); ++ ISO_CP[MAX_CP_NAME - 1] = '\0'; + } + while(*(++s)); /* No params straight after charset name */ + } +@@ -568,7 +570,8 @@ int zi_opts(__G__ pargc, pargv) + "error: a valid character encoding should follow the -I argument")); + return(PK_PARAM); + } +- strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ strncpy(OEM_CP, s, MAX_CP_NAME - 1); ++ OEM_CP[MAX_CP_NAME - 1] = '\0'; + } else { /* -O charset */ + ++argv; + if(!(--argc > 0 && *argv != NULL && **argv != '-')) { +@@ -577,7 +580,8 @@ int zi_opts(__G__ pargc, pargv) + return(PK_PARAM); + } + s = *argv; +- strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ strncpy(OEM_CP, s, MAX_CP_NAME - 1); ++ OEM_CP[MAX_CP_NAME - 1] = '\0'; + } + while(*(++s)); /* No params straight after charset name */ + } +-- +2.14.5 + diff --git a/SPECS/unzip/0021-unzip-zipbomb-part1.patch b/SPECS/unzip/0021-unzip-zipbomb-part1.patch new file mode 100644 index 00000000..35cf8565 --- /dev/null +++ b/SPECS/unzip/0021-unzip-zipbomb-part1.patch @@ -0,0 +1,25 @@ +From 41beb477c5744bc396fa1162ee0c14218ec12213 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Mon, 27 May 2019 08:20:32 -0700 +Subject: [PATCH] Fix bug in undefer_input() that misplaced the input state. + +--- + fileio.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/fileio.c b/fileio.c +index c042987..bc00d74 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -530,8 +530,10 @@ void undefer_input(__G) + * This condition was checked when G.incnt_leftover was set > 0 in + * defer_leftover_input(), and it is NOT allowed to touch G.csize + * before calling undefer_input() when (G.incnt_leftover > 0) +- * (single exception: see read_byte()'s "G.csize <= 0" handling) !! ++ * (single exception: see readbyte()'s "G.csize <= 0" handling) !! + */ ++ if (G.csize < 0L) ++ G.csize = 0L; + G.incnt = G.incnt_leftover + (int)G.csize; + G.inptr = G.inptr_leftover - (int)G.csize; + G.incnt_leftover = 0; diff --git a/SPECS/unzip/0022-unzip-zipbomb-part2.patch b/SPECS/unzip/0022-unzip-zipbomb-part2.patch new file mode 100644 index 00000000..903c8457 --- /dev/null +++ b/SPECS/unzip/0022-unzip-zipbomb-part2.patch @@ -0,0 +1,349 @@ +From 47b3ceae397d21bf822bc2ac73052a4b1daf8e1c Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Tue, 11 Jun 2019 22:01:18 -0700 +Subject: [PATCH] Detect and reject a zip bomb using overlapped entries. + +This detects an invalid zip file that has at least one entry that +overlaps with another entry or with the central directory to the +end of the file. A Fifield zip bomb uses overlapped local entries +to vastly increase the potential inflation ratio. Such an invalid +zip file is rejected. + +See https://www.bamsoftware.com/hacks/zipbomb/ for David Fifield's +analysis, construction, and examples of such zip bombs. + +The detection maintains a list of covered spans of the zip files +so far, where the central directory to the end of the file and any +bytes preceding the first entry at zip file offset zero are +considered covered initially. Then as each entry is decompressed +or tested, it is considered covered. When a new entry is about to +be processed, its initial offset is checked to see if it is +contained by a covered span. If so, the zip file is rejected as +invalid. + +This commit depends on a preceding commit: "Fix bug in +undefer_input() that misplaced the input state." +--- + extract.c | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++- + globals.c | 1 + + globals.h | 3 + + process.c | 11 ++++ + unzip.h | 1 + + 5 files changed, 205 insertions(+), 1 deletion(-) + +diff --git a/extract.c b/extract.c +index 1acd769..0973a33 100644 +--- a/extract.c ++++ b/extract.c +@@ -319,6 +319,125 @@ static ZCONST char Far UnsupportedExtraField[] = + "\nerror: unsupported extra-field compression type (%u)--skipping\n"; + static ZCONST char Far BadExtraFieldCRC[] = + "error [%s]: bad extra-field CRC %08lx (should be %08lx)\n"; ++static ZCONST char Far NotEnoughMemCover[] = ++ "error: not enough memory for bomb detection\n"; ++static ZCONST char Far OverlappedComponents[] = ++ "error: invalid zip file with overlapped components (possible zip bomb)\n"; ++ ++ ++ ++ ++ ++/* A growable list of spans. */ ++typedef zoff_t bound_t; ++typedef struct { ++ bound_t beg; /* start of the span */ ++ bound_t end; /* one past the end of the span */ ++} span_t; ++typedef struct { ++ span_t *span; /* allocated, distinct, and sorted list of spans */ ++ size_t num; /* number of spans in the list */ ++ size_t max; /* allocated number of spans (num <= max) */ ++} cover_t; ++ ++/* ++ * Return the index of the first span in cover whose beg is greater than val. ++ * If there is no such span, then cover->num is returned. ++ */ ++static size_t cover_find(cover, val) ++ cover_t *cover; ++ bound_t val; ++{ ++ size_t lo = 0, hi = cover->num; ++ while (lo < hi) { ++ size_t mid = (lo + hi) >> 1; ++ if (val < cover->span[mid].beg) ++ hi = mid; ++ else ++ lo = mid + 1; ++ } ++ return hi; ++} ++ ++/* Return true if val lies within any one of the spans in cover. */ ++static int cover_within(cover, val) ++ cover_t *cover; ++ bound_t val; ++{ ++ size_t pos = cover_find(cover, val); ++ return pos > 0 && val < cover->span[pos - 1].end; ++} ++ ++/* ++ * Add a new span to the list, but only if the new span does not overlap any ++ * spans already in the list. The new span covers the values beg..end-1. beg ++ * must be less than end. ++ * ++ * Keep the list sorted and merge adjacent spans. Grow the allocated space for ++ * the list as needed. On success, 0 is returned. If the new span overlaps any ++ * existing spans, then 1 is returned and the new span is not added to the ++ * list. If the new span is invalid because beg is greater than or equal to ++ * end, then -1 is returned. If the list needs to be grown but the memory ++ * allocation fails, then -2 is returned. ++ */ ++static int cover_add(cover, beg, end) ++ cover_t *cover; ++ bound_t beg; ++ bound_t end; ++{ ++ size_t pos; ++ int prec, foll; ++ ++ if (beg >= end) ++ /* The new span is invalid. */ ++ return -1; ++ ++ /* Find where the new span should go, and make sure that it does not ++ overlap with any existing spans. */ ++ pos = cover_find(cover, beg); ++ if ((pos > 0 && beg < cover->span[pos - 1].end) || ++ (pos < cover->num && end > cover->span[pos].beg)) ++ return 1; ++ ++ /* Check for adjacencies. */ ++ prec = pos > 0 && beg == cover->span[pos - 1].end; ++ foll = pos < cover->num && end == cover->span[pos].beg; ++ if (prec && foll) { ++ /* The new span connects the preceding and following spans. Merge the ++ following span into the preceding span, and delete the following ++ span. */ ++ cover->span[pos - 1].end = cover->span[pos].end; ++ cover->num--; ++ memmove(cover->span + pos, cover->span + pos + 1, ++ (cover->num - pos) * sizeof(span_t)); ++ } ++ else if (prec) ++ /* The new span is adjacent only to the preceding span. Extend the end ++ of the preceding span. */ ++ cover->span[pos - 1].end = end; ++ else if (foll) ++ /* The new span is adjacent only to the following span. Extend the ++ beginning of the following span. */ ++ cover->span[pos].beg = beg; ++ else { ++ /* The new span has gaps between both the preceding and the following ++ spans. Assure that there is room and insert the span. */ ++ if (cover->num == cover->max) { ++ size_t max = cover->max == 0 ? 16 : cover->max << 1; ++ span_t *span = realloc(cover->span, max * sizeof(span_t)); ++ if (span == NULL) ++ return -2; ++ cover->span = span; ++ cover->max = max; ++ } ++ memmove(cover->span + pos + 1, cover->span + pos, ++ (cover->num - pos) * sizeof(span_t)); ++ cover->num++; ++ cover->span[pos].beg = beg; ++ cover->span[pos].end = end; ++ } ++ return 0; ++} + + + +@@ -374,6 +493,29 @@ int extract_or_test_files(__G) /* return PK-type error code */ + } + #endif /* !SFX || SFX_EXDIR */ + ++ /* One more: initialize cover structure for bomb detection. Start with a ++ span that covers the central directory though the end of the file. */ ++ if (G.cover == NULL) { ++ G.cover = malloc(sizeof(cover_t)); ++ if (G.cover == NULL) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; ++ } ++ ((cover_t *)G.cover)->span = NULL; ++ ((cover_t *)G.cover)->max = 0; ++ } ++ ((cover_t *)G.cover)->num = 0; ++ if ((G.extra_bytes != 0 && ++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || ++ cover_add((cover_t *)G.cover, ++ G.extra_bytes + G.ecrec.offset_start_central_directory, ++ G.ziplen) != 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; ++ } ++ + /*--------------------------------------------------------------------------- + The basic idea of this function is as follows. Since the central di- + rectory lies at the end of the zipfile and the member files lie at the +@@ -591,7 +733,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + if (error > error_in_archive) + error_in_archive = error; + /* ...and keep going (unless disk full or user break) */ +- if (G.disk_full > 1 || error_in_archive == IZ_CTRLC) { ++ if (G.disk_full > 1 || error_in_archive == IZ_CTRLC || ++ error == PK_BOMB) { + /* clear reached_end to signal premature stop ... */ + reached_end = FALSE; + /* ... and cancel scanning the central directory */ +@@ -1060,6 +1203,11 @@ static int extract_or_test_entrylist(__G__ numchunk, + + /* seek_zipf(__G__ pInfo->offset); */ + request = G.pInfo->offset + G.extra_bytes; ++ if (cover_within((cover_t *)G.cover, request)) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(OverlappedComponents))); ++ return PK_BOMB; ++ } + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; + +@@ -1591,6 +1739,18 @@ static int extract_or_test_entrylist(__G__ numchunk, + return IZ_CTRLC; /* cancel operation by user request */ + } + #endif ++ error = cover_add((cover_t *)G.cover, request, ++ G.cur_zipfile_bufstart + (G.inptr - G.inbuf)); ++ if (error < 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; ++ } ++ if (error != 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(OverlappedComponents))); ++ return PK_BOMB; ++ } + #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); + #endif +@@ -1992,6 +2152,34 @@ static int extract_or_test_member(__G) /* return PK-type error code */ + } + + undefer_input(__G); ++ ++ if ((G.lrec.general_purpose_bit_flag & 8) != 0) { ++ /* skip over data descriptor (harder than it sounds, due to signature ++ * ambiguity) ++ */ ++# define SIG 0x08074b50 ++# define LOW 0xffffffff ++ uch buf[12]; ++ unsigned shy = 12 - readbuf((char *)buf, 12); ++ ulg crc = shy ? 0 : makelong(buf); ++ ulg clen = shy ? 0 : makelong(buf + 4); ++ ulg ulen = shy ? 0 : makelong(buf + 8); /* or high clen if ZIP64 */ ++ if (crc == SIG && /* if not SIG, no signature */ ++ (G.lrec.crc32 != SIG || /* if not SIG, have signature */ ++ (clen == SIG && /* if not SIG, no signature */ ++ ((G.lrec.csize & LOW) != SIG || /* if not SIG, have signature */ ++ (ulen == SIG && /* if not SIG, no signature */ ++ (G.zip64 ? G.lrec.csize >> 32 : G.lrec.ucsize) != SIG ++ /* if not SIG, have signature */ ++ ))))) ++ /* skip four more bytes to account for signature */ ++ shy += 4 - readbuf((char *)buf, 4); ++ if (G.zip64) ++ shy += 8 - readbuf((char *)buf, 8); /* skip eight more for ZIP64 */ ++ if (shy) ++ error = PK_ERR; ++ } ++ + return error; + + } /* end function extract_or_test_member() */ +diff --git a/globals.c b/globals.c +index fa8cca5..1e0f608 100644 +--- a/globals.c ++++ b/globals.c +@@ -181,6 +181,7 @@ Uz_Globs *globalsCtor() + # if (!defined(NO_TIMESTAMPS)) + uO.D_flag=1; /* default to '-D', no restoration of dir timestamps */ + # endif ++ G.cover = NULL; /* not allocated yet */ + #endif + + uO.lflag=(-1); +diff --git a/globals.h b/globals.h +index 11b7215..2bdcdeb 100644 +--- a/globals.h ++++ b/globals.h +@@ -260,12 +260,15 @@ typedef struct Globals { + ecdir_rec ecrec; /* used in unzip.c, extract.c */ + z_stat statbuf; /* used by main, mapname, check_for_newer */ + ++ int zip64; /* true if Zip64 info in extra field */ ++ + int mem_mode; + uch *outbufptr; /* extract.c static */ + ulg outsize; /* extract.c static */ + int reported_backslash; /* extract.c static */ + int disk_full; + int newfile; ++ void **cover; /* used in extract.c for bomb detection */ + + int didCRlast; /* fileio static */ + ulg numlines; /* fileio static: number of lines printed */ +diff --git a/process.c b/process.c +index 1e9a1e1..d2e4dc3 100644 +--- a/process.c ++++ b/process.c +@@ -637,6 +637,13 @@ void free_G_buffers(__G) /* releases all memory allocated in global vars */ + } + #endif + ++ /* Free the cover span list and the cover structure. */ ++ if (G.cover != NULL) { ++ free(*(G.cover)); ++ free(G.cover); ++ G.cover = NULL; ++ } ++ + } /* end function free_G_buffers() */ + + +@@ -1890,6 +1897,8 @@ int getZip64Data(__G__ ef_buf, ef_len) + #define Z64FLGS 0xffff + #define Z64FLGL 0xffffffff + ++ G.zip64 = FALSE; ++ + if (ef_len == 0 || ef_buf == NULL) + return PK_COOL; + +@@ -1927,6 +1936,8 @@ int getZip64Data(__G__ ef_buf, ef_len) + #if 0 + break; /* Expect only one EF_PKSZ64 block. */ + #endif /* 0 */ ++ ++ G.zip64 = TRUE; + } + + /* Skip this extra field block. */ +diff --git a/unzip.h b/unzip.h +index 5b2a326..ed24a5b 100644 +--- a/unzip.h ++++ b/unzip.h +@@ -645,6 +645,7 @@ typedef struct _Uzp_cdir_Rec { + #define PK_NOZIP 9 /* zipfile not found */ + #define PK_PARAM 10 /* bad or illegal parameters specified */ + #define PK_FIND 11 /* no files found */ ++#define PK_BOMB 12 /* likely zip bomb */ + #define PK_DISK 50 /* disk full */ + #define PK_EOF 51 /* unexpected EOF */ + diff --git a/SPECS/unzip/0023-unzip-zipbomb-part3.patch b/SPECS/unzip/0023-unzip-zipbomb-part3.patch new file mode 100644 index 00000000..3b8d67b7 --- /dev/null +++ b/SPECS/unzip/0023-unzip-zipbomb-part3.patch @@ -0,0 +1,112 @@ +From 6d351831be705cc26d897db44f878a978f4138fc Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Thu, 25 Jul 2019 20:43:17 -0700 +Subject: [PATCH] Do not raise a zip bomb alert for a misplaced central + directory. + +There is a zip-like file in the Firefox distribution, omni.ja, +which is a zip container with the central directory placed at the +start of the file instead of after the local entries as required +by the zip standard. This commit marks the actual location of the +central directory, as well as the end of central directory records, +as disallowed locations. This now permits such containers to not +raise a zip bomb alert, where in fact there are no overlaps. +--- + extract.c | 25 +++++++++++++++++++------ + process.c | 6 ++++++ + unzpriv.h | 10 ++++++++++ + 3 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/extract.c b/extract.c +index 0973a33..1b73cb0 100644 +--- a/extract.c ++++ b/extract.c +@@ -493,8 +493,11 @@ int extract_or_test_files(__G) /* return PK-type error code */ + } + #endif /* !SFX || SFX_EXDIR */ + +- /* One more: initialize cover structure for bomb detection. Start with a +- span that covers the central directory though the end of the file. */ ++ /* One more: initialize cover structure for bomb detection. Start with ++ spans that cover any extra bytes at the start, the central directory, ++ the end of central directory record (including the Zip64 end of central ++ directory locator, if present), and the Zip64 end of central directory ++ record, if present. */ + if (G.cover == NULL) { + G.cover = malloc(sizeof(cover_t)); + if (G.cover == NULL) { +@@ -506,15 +509,25 @@ int extract_or_test_files(__G) /* return PK-type error code */ + ((cover_t *)G.cover)->max = 0; + } + ((cover_t *)G.cover)->num = 0; +- if ((G.extra_bytes != 0 && +- cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || +- cover_add((cover_t *)G.cover, ++ if (cover_add((cover_t *)G.cover, + G.extra_bytes + G.ecrec.offset_start_central_directory, +- G.ziplen) != 0) { ++ G.extra_bytes + G.ecrec.offset_start_central_directory + ++ G.ecrec.size_central_directory) != 0) { + Info(slide, 0x401, ((char *)slide, + LoadFarString(NotEnoughMemCover))); + return PK_MEM; + } ++ if ((G.extra_bytes != 0 && ++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || ++ (G.ecrec.have_ecr64 && ++ cover_add((cover_t *)G.cover, G.ecrec.ec64_start, ++ G.ecrec.ec64_end) != 0) || ++ cover_add((cover_t *)G.cover, G.ecrec.ec_start, ++ G.ecrec.ec_end) != 0) { ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(OverlappedComponents))); ++ return PK_BOMB; ++ } + + /*--------------------------------------------------------------------------- + The basic idea of this function is as follows. Since the central di- +diff --git a/process.c b/process.c +index d2e4dc3..d75d405 100644 +--- a/process.c ++++ b/process.c +@@ -1408,6 +1408,10 @@ static int find_ecrec64(__G__ searchlen) /* return PK-class error */ + + /* Now, we are (almost) sure that we have a Zip64 archive. */ + G.ecrec.have_ecr64 = 1; ++ G.ecrec.ec_start -= ECLOC64_SIZE+4; ++ G.ecrec.ec64_start = ecrec64_start_offset; ++ G.ecrec.ec64_end = ecrec64_start_offset + ++ 12 + makeint64(&byterec[ECREC64_LENGTH]); + + /* Update the "end-of-central-dir offset" for later checks. */ + G.real_ecrec_offset = ecrec64_start_offset; +@@ -1542,6 +1546,8 @@ static int find_ecrec(__G__ searchlen) /* return PK-class error */ + makelong(&byterec[OFFSET_START_CENTRAL_DIRECTORY]); + G.ecrec.zipfile_comment_length = + makeword(&byterec[ZIPFILE_COMMENT_LENGTH]); ++ G.ecrec.ec_start = G.real_ecrec_offset; ++ G.ecrec.ec_end = G.ecrec.ec_start + 22 + G.ecrec.zipfile_comment_length; + + /* Now, we have to read the archive comment, BEFORE the file pointer + is moved away backwards to seek for a Zip64 ECLOC64 structure. +diff --git a/unzpriv.h b/unzpriv.h +index dc9eff5..297b3c7 100644 +--- a/unzpriv.h ++++ b/unzpriv.h +@@ -2185,6 +2185,16 @@ typedef struct VMStimbuf { + int have_ecr64; /* valid Zip64 ecdir-record exists */ + int is_zip64_archive; /* Zip64 ecdir-record is mandatory */ + ush zipfile_comment_length; ++ zusz_t ec_start, ec_end; /* offsets of start and end of the ++ end of central directory record, ++ including if present the Zip64 ++ end of central directory locator, ++ which immediately precedes the ++ end of central directory record */ ++ zusz_t ec64_start, ec64_end; /* if have_ecr64 is true, then these ++ are the offsets of the start and ++ end of the Zip64 end of central ++ directory record */ + } ecdir_rec; + + diff --git a/SPECS/unzip/0024-unzip-zipbomb-manpage.patch b/SPECS/unzip/0024-unzip-zipbomb-manpage.patch new file mode 100644 index 00000000..bcee827a --- /dev/null +++ b/SPECS/unzip/0024-unzip-zipbomb-manpage.patch @@ -0,0 +1,25 @@ +From 6fe72291a5563cdbcd2bdd87e36528537b7cdcfb Mon Sep 17 00:00:00 2001 +From: Jakub Martisko +Date: Mon, 18 Nov 2019 14:17:46 +0100 +Subject: [PATCH] update the man page + +--- + man/unzip.1 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/man/unzip.1 b/man/unzip.1 +index 21816d1..4d66073 100644 +--- a/man/unzip.1 ++++ b/man/unzip.1 +@@ -850,6 +850,8 @@ the specified zipfiles were not found. + invalid options were specified on the command line. + .IP 11 + no matching files were found. ++.IP 12 ++invalid zip file with overlapped components (possible zip-bomb). The zip-bomb checks can be disabled by using the UNZIP_DISABLE_ZIPBOMB_DETECTION=TRUE environment variable. + .IP 50 + the disk is (or was) full during extraction. + .IP 51 +-- +2.23.0 + diff --git a/SPECS/unzip/0025-unzip-zipbomb-part4.patch b/SPECS/unzip/0025-unzip-zipbomb-part4.patch new file mode 100644 index 00000000..beffa2c9 --- /dev/null +++ b/SPECS/unzip/0025-unzip-zipbomb-part4.patch @@ -0,0 +1,25 @@ +From 5e2efcd633a4a1fb95a129a75508e7d769e767be Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sun, 9 Feb 2020 20:36:28 -0800 +Subject: [PATCH] Fix bug in UZbunzip2() that incorrectly updated G.incnt. + +The update assumed a full buffer, which is not always full. This +could result in a false overlapped element detection when a small +bzip2-compressed file was unzipped. This commit remedies that. +--- + extract.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/extract.c b/extract.c +index d9866f9..0cb7bfc 100644 +--- a/extract.c ++++ b/extract.c +@@ -3010,7 +3010,7 @@ __GDEF + #endif + + G.inptr = (uch *)bstrm.next_in; +- G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ ++ G.incnt -= G.inptr - G.inbuf; /* reset for other routines */ + + uzbunzip_cleanup_exit: + err = BZ2_bzDecompressEnd(&bstrm); diff --git a/SPECS/unzip/0026-unzip-zipbomb-part5.patch b/SPECS/unzip/0026-unzip-zipbomb-part5.patch new file mode 100644 index 00000000..ca6a43a7 --- /dev/null +++ b/SPECS/unzip/0026-unzip-zipbomb-part5.patch @@ -0,0 +1,26 @@ +From 5c572555cf5d80309a07c30cf7a54b2501493720 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sun, 9 Feb 2020 21:39:09 -0800 +Subject: [PATCH] Fix bug in UZinflate() that incorrectly updated G.incnt. + +The update assumed a full buffer, which is not always full. This +could result in a false overlapped element detection when a small +deflate-compressed file was unzipped using an old zlib. This +commit remedies that. +--- + inflate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/inflate.c b/inflate.c +index 2f5a015..70e3cc0 100644 +--- a/inflate.c ++++ b/inflate.c +@@ -700,7 +700,7 @@ int UZinflate(__G__ is_defl64) + G.dstrm.total_out)); + + G.inptr = (uch *)G.dstrm.next_in; +- G.incnt = (G.inbuf + INBUFSIZ) - G.inptr; /* reset for other routines */ ++ G.incnt -= G.inptr - G.inbuf; /* reset for other routines */ + + uzinflate_cleanup_exit: + err = inflateReset(&G.dstrm); diff --git a/SPECS/unzip/0027-unzip-zipbomb-part6.patch b/SPECS/unzip/0027-unzip-zipbomb-part6.patch new file mode 100644 index 00000000..3dce6e34 --- /dev/null +++ b/SPECS/unzip/0027-unzip-zipbomb-part6.patch @@ -0,0 +1,95 @@ +From 122050bac16fae82a460ff739fb1ca0f106e9d85 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sat, 2 Jan 2021 13:09:34 -0800 +Subject: [PATCH] Determine Zip64 status entry-by-entry instead of for entire + file. + +Fixes a bug for zip files with mixed Zip64 and not Zip64 entries, +which resulted in an incorrect data descriptor length. The bug is +seen when a Zip64 entry precedes a non-Zip64 entry, in which case +the data descriptor would have been assumed to be larger than it +is, resulting in an incorrect bomb warning due to a perceived +overlap with the next entry. This commit determines and saves the +Zip64 status for each entry based on the central directory, and +then computes the length of each data descriptor accordingly. +--- + extract.c | 5 +++-- + globals.h | 2 -- + process.c | 4 +--- + unzpriv.h | 1 + + 4 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/extract.c b/extract.c +index 504afd6..878817d 100644 +--- a/extract.c ++++ b/extract.c +@@ -658,6 +658,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ + break; + } + } ++ G.pInfo->zip64 = FALSE; + if ((error = do_string(__G__ G.crec.extra_field_length, + EXTRA_FIELD)) != 0) + { +@@ -2187,12 +2188,12 @@ static int extract_or_test_member(__G) /* return PK-type error code */ + (clen == SIG && /* if not SIG, no signature */ + ((G.lrec.csize & LOW) != SIG || /* if not SIG, have signature */ + (ulen == SIG && /* if not SIG, no signature */ +- (G.zip64 ? G.lrec.csize >> 32 : G.lrec.ucsize) != SIG ++ (G.pInfo->zip64 ? G.lrec.csize >> 32 : G.lrec.ucsize) != SIG + /* if not SIG, have signature */ + ))))) + /* skip four more bytes to account for signature */ + shy += 4 - readbuf((char *)buf, 4); +- if (G.zip64) ++ if (G.pInfo->zip64) + shy += 8 - readbuf((char *)buf, 8); /* skip eight more for ZIP64 */ + if (shy) + error = PK_ERR; +diff --git a/globals.h b/globals.h +index f9c6daf..a883c90 100644 +--- a/globals.h ++++ b/globals.h +@@ -261,8 +261,6 @@ typedef struct Globals { + ecdir_rec ecrec; /* used in unzip.c, extract.c */ + z_stat statbuf; /* used by main, mapname, check_for_newer */ + +- int zip64; /* true if Zip64 info in extra field */ +- + int mem_mode; + uch *outbufptr; /* extract.c static */ + ulg outsize; /* extract.c static */ +diff --git a/process.c b/process.c +index d75d405..d643c6f 100644 +--- a/process.c ++++ b/process.c +@@ -1903,8 +1903,6 @@ int getZip64Data(__G__ ef_buf, ef_len) + #define Z64FLGS 0xffff + #define Z64FLGL 0xffffffff + +- G.zip64 = FALSE; +- + if (ef_len == 0 || ef_buf == NULL) + return PK_COOL; + +@@ -1943,7 +1941,7 @@ int getZip64Data(__G__ ef_buf, ef_len) + break; /* Expect only one EF_PKSZ64 block. */ + #endif /* 0 */ + +- G.zip64 = TRUE; ++ G.pInfo->zip64 = TRUE; + } + + /* Skip this extra field block. */ +diff --git a/unzpriv.h b/unzpriv.h +index 09f288e..75b3359 100644 +--- a/unzpriv.h ++++ b/unzpriv.h +@@ -2034,6 +2034,7 @@ typedef struct min_info { + #ifdef UNICODE_SUPPORT + unsigned GPFIsUTF8: 1; /* crec gen_purpose_flag UTF-8 bit 11 is set */ + #endif ++ unsigned zip64: 1; /* true if entry has Zip64 extra block */ + #ifndef SFX + char Far *cfilname; /* central header version of filename */ + #endif diff --git a/SPECS/unzip/0028-unzip-zipbomb-part7.patch b/SPECS/unzip/0028-unzip-zipbomb-part7.patch new file mode 100644 index 00000000..4edc1520 --- /dev/null +++ b/SPECS/unzip/0028-unzip-zipbomb-part7.patch @@ -0,0 +1,172 @@ +From af0d07f95809653b669d88aa0f424c6d5aa48ba0 Mon Sep 17 00:00:00 2001 +From: Mark Adler +Date: Sat, 2 Jul 2022 14:35:04 -0700 +Subject: [PATCH] Be more liberal in the acceptance of data descriptors. + +Previously the zip64 flag determined the size of the lengths in the +data descriptor. This is compliant with the zip format. However, a +bug in the Java zip library results in an incorrect setting of that +flag. This commit permits either 32-bit or 64-bit lengths, auto- +detecting which it is, which works around the Java bug. +--- + extract.c | 146 +++++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 123 insertions(+), 23 deletions(-) + +diff --git a/extract.c b/extract.c +index 878817d..b1c74df 100644 +--- a/extract.c ++++ b/extract.c +@@ -2173,30 +2173,130 @@ static int extract_or_test_member(__G) /* return PK-type error code */ + undefer_input(__G); + + if ((G.lrec.general_purpose_bit_flag & 8) != 0) { +- /* skip over data descriptor (harder than it sounds, due to signature +- * ambiguity) +- */ +-# define SIG 0x08074b50 +-# define LOW 0xffffffff +- uch buf[12]; +- unsigned shy = 12 - readbuf((char *)buf, 12); +- ulg crc = shy ? 0 : makelong(buf); +- ulg clen = shy ? 0 : makelong(buf + 4); +- ulg ulen = shy ? 0 : makelong(buf + 8); /* or high clen if ZIP64 */ +- if (crc == SIG && /* if not SIG, no signature */ +- (G.lrec.crc32 != SIG || /* if not SIG, have signature */ +- (clen == SIG && /* if not SIG, no signature */ +- ((G.lrec.csize & LOW) != SIG || /* if not SIG, have signature */ +- (ulen == SIG && /* if not SIG, no signature */ +- (G.pInfo->zip64 ? G.lrec.csize >> 32 : G.lrec.ucsize) != SIG +- /* if not SIG, have signature */ +- ))))) +- /* skip four more bytes to account for signature */ +- shy += 4 - readbuf((char *)buf, 4); +- if (G.pInfo->zip64) +- shy += 8 - readbuf((char *)buf, 8); /* skip eight more for ZIP64 */ +- if (shy) ++ // Skip over the data descriptor. We need to correctly position the ++ // read pointer after the data descriptor for the proper detection of ++ // overlapped zip file components. ++ // ++ // We need to resolve an ambiguity over four possible data descriptor ++ // formats. We check for all four, and pick the longest match. The data ++ // descriptor can have a signature or not, and it can use four or ++ // eight-byte lengths. The zip format requires resolving the ambiguity ++ // of a signature or not, but it uses the zip64 flag to determine ++ // whether the lengths are four or eight bytes. However there is a bug ++ // in the Java zip library that applies the wrong value of that flag. ++ // This works around that bug by always trying both length formats. ++ // ++ // So why the longest match? And does this resolve the ambiguity? No, ++ // it doesn't definitively resolve the ambiguity. However choosing the ++ // longest match at least resolves it for a normal zip file, where the ++ // bytes following the data descriptor must be another zip signature ++ // that is not a data descriptor signature. There are a few specific ++ // cases for which more than one of the formats will match the given ++ // CRC and lengths. The most plausible is between four and eight-byte ++ // lengths, either with or without a signature. That only occurs for an ++ // entry with an uncompressed size of zero. We consider the data ++ // descriptor to be a vector of four-byte values. Then the possible ++ // data descriptors are [(s) 0 c 0] and [(s) 0 c 0 0 0], where (s) is ++ // the optional signature, and c is the compressed length. c would be ++ // two for the Deflate compressed data format. These look the same, so ++ // if the file contains [(s) 0 c 0 0 0], then we cannot discriminate ++ // them. However if the data descriptor was intended to be [(s) 0 c 0], ++ // then it has been followed by eight zero bytes in the zip file for ++ // some reason. For a normal zip file this cannot be the case. The data ++ // descriptor would always be immediately followed by another zip file ++ // signature, which is four bytes that are not zeros. The other cases ++ // where more than one format matches are vanishingly unlikely, but the ++ // longest match strategy resolves those as well in a normal zip file. ++ // Those pairs are [s s s] vs. [s s s s], [s s s] vs. [s s s 0 s 0], ++ // and [s s s s s] vs. [s s s s s s]. For all, s is the signature for a ++ // data descriptor. For the first two we have an entry whose CRC, ++ // compressed length, and uncompressed length are all equal (!), and ++ // are all equal to the signature (!!). If this occurs, clearly someone ++ // is messing with us. However the strategy works nonetheless. We see ++ // that if the shorter descriptor, [s s s] were what was intended, then ++ // it has been followed by either four zero bytes or a data descriptor ++ // signature. Neither can occur for a normal zip file, where it must be ++ // followed by a signature that is not a data descriptor signature. So ++ // the longest match is the correct choice. The final case is outright ++ // insane, since the compressed and uncompressed lengths are the data ++ // descriptor signature repeated twice to make a 64-bit length, which ++ // is about 6e17. The largest drive available as I write this is 100TB, ++ // which is one six thousandth of that length. If I apply Moore's law ++ // to drive capacity, we might get to 6e17 about 25 years from now. If ++ // this code is still in use then (I've seen other code I've written in ++ // use for over 30 years), then we're still in luck. A data descriptor ++ // cannot be followed by a data descriptor signature in a normal zip ++ // file. The longest match strategy continues to work. ++ // ++ // So what is a not normal zip file, where these assumptions might fall ++ // apart? zip files have been used in a non-standard way as a poor ++ // substitute for a file system, with entries deleted and perhaps ++ // others replacing them partially, with fragmented zip files being the ++ // result. Then all bets are off as to what might or might not follow a ++ // data descriptor. Though if this sort of data descriptor ambiguity ++ // falls in one of those gaps, then there should be no adverse ++ // consequences for picking the unintended one. ++ int len = 0; ++# define SIG 0x08074b50 // optional data descriptor signature ++#ifdef LARGE_FILE_SUPPORT ++ uch buf[24]; ++ int got = readbuf((char *)buf, sizeof(buf)); ++ if (got >= 24 && makelong(buf) == SIG && ++ makelong(buf + 4) == G.lrec.crc32 && ++ makeint64(buf + 8) == G.lrec.csize && ++ makeint64(buf + 16) == G.lrec.ucsize) ++ // Have a data descriptor with a signature and 64-bit lengths. ++ len = 24; ++ else if (got >= 20 && makelong(buf) == G.lrec.crc32 && ++ makeint64(buf + 4) == G.lrec.csize && ++ makeint64(buf + 12) == G.lrec.ucsize) ++ // Have a data descriptor with no signature and 64-bit lengths. ++ len = 20; ++ else if ((G.lrec.csize >> 32) == 0 && (G.lrec.ucsize >> 32) == 0) ++ // Both lengths are short enough to fit in 32 bits. ++#else ++ uch buf[16]; ++ int got = readbuf((char *)buf, sizeof(buf)); ++#endif ++ { ++ if (got >= 16 && makelong(buf) == SIG && ++ makelong(buf + 4) == G.lrec.crc32 && ++ makelong(buf + 8) == G.lrec.csize && ++ makelong(buf + 12) == G.lrec.ucsize) ++ // Have a data descriptor with a signature and 32-bit lengths. ++ len = 16; ++ else if (got >= 12 && makelong(buf) == G.lrec.crc32 && ++ makelong(buf + 4) == G.lrec.csize && ++ makelong(buf + 8) == G.lrec.ucsize) ++ // Have a data descriptor with no signature and 32-bit lengths. ++ len = 12; ++ } ++ if (len == 0) ++ // There is no data descriptor that matches the entry CRC and ++ // length values. + error = PK_ERR; ++ ++ // Back up got-len bytes, to position the read pointer after the data ++ // descriptor. Or to where the data descriptor was supposed to be, in ++ // the event none was found. ++ int back = got - len; ++ if (G.incnt + back > INBUFSIZ) { ++ // Need to load the preceding buffer. We've been here before. ++ G.cur_zipfile_bufstart -= INBUFSIZ; ++#ifdef USE_STRM_INPUT ++ zfseeko(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET); ++#else /* !USE_STRM_INPUT */ ++ zlseek(G.zipfd, G.cur_zipfile_bufstart, SEEK_SET); ++#endif /* ?USE_STRM_INPUT */ ++ read(G.zipfd, (char *)G.inbuf, INBUFSIZ); ++ G.incnt -= INBUFSIZ - back; ++ G.inptr += INBUFSIZ - back; ++ } ++ else { ++ // Back up within current buffer. ++ G.incnt += back; ++ G.inptr -= back; ++ } + } + + return error; diff --git a/SPECS/unzip/0029-unzip-zipbomb-switch.patch b/SPECS/unzip/0029-unzip-zipbomb-switch.patch new file mode 100644 index 00000000..e355afdd --- /dev/null +++ b/SPECS/unzip/0029-unzip-zipbomb-switch.patch @@ -0,0 +1,202 @@ +From 5b44c818b96193b3e240f38f61985fa2bc780eb7 Mon Sep 17 00:00:00 2001 +From: Jakub Martisko +Date: Tue, 30 Nov 2021 15:42:17 +0100 +Subject: [PATCH] Add an option to disable the zipbomb detection + +This can be done by settting a newly introduced environment variable +UNZIP_DISABLE_ZIPBOMB_DETECTION to {TRUE,True,true}. If the variable is unset, or +set to any other value the zipbomb detection is left enabled. + +Example: + UNZIP_DISABLE_ZIPBOMB_DETECTION=True unzip ./zbsm.zip -d ./test +--- + extract.c | 85 ++++++++++++++++++++++++++++++------------------------- + unzip.c | 15 ++++++++-- + unzip.h | 1 + + 3 files changed, 60 insertions(+), 41 deletions(-) + +diff --git a/extract.c b/extract.c +index 878817d..3e58071 100644 +--- a/extract.c ++++ b/extract.c +@@ -322,7 +322,8 @@ static ZCONST char Far BadExtraFieldCRC[] = + static ZCONST char Far NotEnoughMemCover[] = + "error: not enough memory for bomb detection\n"; + static ZCONST char Far OverlappedComponents[] = +- "error: invalid zip file with overlapped components (possible zip bomb)\n"; ++ "error: invalid zip file with overlapped components (possible zip bomb)\n \ ++To unzip the file anyway, rerun the command with UNZIP_DISABLE_ZIPBOMB_DETECTION=TRUE environmnent variable\n"; + + + +@@ -502,35 +503,37 @@ int extract_or_test_files(__G) /* return PK-type error code */ + the end of central directory record (including the Zip64 end of central + directory locator, if present), and the Zip64 end of central directory + record, if present. */ +- if (G.cover == NULL) { ++ if (uO.zipbomb == TRUE) { ++ if (G.cover == NULL) { + G.cover = malloc(sizeof(cover_t)); + if (G.cover == NULL) { +- Info(slide, 0x401, ((char *)slide, +- LoadFarString(NotEnoughMemCover))); +- return PK_MEM; ++ Info(slide, 0x401, ((char *)slide, ++ LoadFarString(NotEnoughMemCover))); ++ return PK_MEM; + } + ((cover_t *)G.cover)->span = NULL; + ((cover_t *)G.cover)->max = 0; +- } +- ((cover_t *)G.cover)->num = 0; +- if (cover_add((cover_t *)G.cover, +- G.extra_bytes + G.ecrec.offset_start_central_directory, +- G.extra_bytes + G.ecrec.offset_start_central_directory + +- G.ecrec.size_central_directory) != 0) { ++ } ++ ((cover_t *)G.cover)->num = 0; ++ if (cover_add((cover_t *)G.cover, ++ G.extra_bytes + G.ecrec.offset_start_central_directory, ++ G.extra_bytes + G.ecrec.offset_start_central_directory + ++ G.ecrec.size_central_directory) != 0) { + Info(slide, 0x401, ((char *)slide, +- LoadFarString(NotEnoughMemCover))); ++ LoadFarString(NotEnoughMemCover))); + return PK_MEM; +- } +- if ((G.extra_bytes != 0 && +- cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || +- (G.ecrec.have_ecr64 && +- cover_add((cover_t *)G.cover, G.ecrec.ec64_start, +- G.ecrec.ec64_end) != 0) || +- cover_add((cover_t *)G.cover, G.ecrec.ec_start, +- G.ecrec.ec_end) != 0) { ++ } ++ if ((G.extra_bytes != 0 && ++ cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || ++ (G.ecrec.have_ecr64 && ++ cover_add((cover_t *)G.cover, G.ecrec.ec64_start, ++ G.ecrec.ec64_end) != 0) || ++ cover_add((cover_t *)G.cover, G.ecrec.ec_start, ++ G.ecrec.ec_end) != 0) { + Info(slide, 0x401, ((char *)slide, +- LoadFarString(OverlappedComponents))); ++ LoadFarString(OverlappedComponents))); + return PK_BOMB; ++ } + } + + /*--------------------------------------------------------------------------- +@@ -1222,10 +1225,12 @@ static int extract_or_test_entrylist(__G__ numchunk, + + /* seek_zipf(__G__ pInfo->offset); */ + request = G.pInfo->offset + G.extra_bytes; +- if (cover_within((cover_t *)G.cover, request)) { ++ if (uO.zipbomb == TRUE) { ++ if (cover_within((cover_t *)G.cover, request)) { + Info(slide, 0x401, ((char *)slide, +- LoadFarString(OverlappedComponents))); ++ LoadFarString(OverlappedComponents))); + return PK_BOMB; ++ } + } + inbuf_offset = request % INBUFSIZ; + bufstart = request - inbuf_offset; +@@ -1758,17 +1763,19 @@ reprompt: + return IZ_CTRLC; /* cancel operation by user request */ + } + #endif +- error = cover_add((cover_t *)G.cover, request, +- G.cur_zipfile_bufstart + (G.inptr - G.inbuf)); +- if (error < 0) { ++ if (uO.zipbomb == TRUE) { ++ error = cover_add((cover_t *)G.cover, request, ++ G.cur_zipfile_bufstart + (G.inptr - G.inbuf)); ++ if (error < 0) { + Info(slide, 0x401, ((char *)slide, +- LoadFarString(NotEnoughMemCover))); ++ LoadFarString(NotEnoughMemCover))); + return PK_MEM; +- } +- if (error != 0) { ++ } ++ if (error != 0) { + Info(slide, 0x401, ((char *)slide, +- LoadFarString(OverlappedComponents))); ++ LoadFarString(OverlappedComponents))); + return PK_BOMB; ++ } + } + #ifdef MACOS /* MacOS is no preemptive OS, thus call event-handling by hand */ + UserStop(); +@@ -2171,8 +2178,8 @@ static int extract_or_test_member(__G) /* return PK-type error code */ + } + + undefer_input(__G); +- +- if ((G.lrec.general_purpose_bit_flag & 8) != 0) { ++ if (uO.zipbomb == TRUE) { ++ if ((G.lrec.general_purpose_bit_flag & 8) != 0) { + // Skip over the data descriptor. We need to correctly position the + // read pointer after the data descriptor for the proper detection of + // overlapped zip file components. +@@ -2189,8 +2196,8 @@ static int extract_or_test_member(__G) /* return PK-type error code */ + G.incnt += back; + G.inptr -= back; + } ++ } + } +- + return error; + + } /* end function extract_or_test_member() */ +diff --git a/unzip.c b/unzip.c +index 8dbfc95..abb3644 100644 +--- a/unzip.c ++++ b/unzip.c +@@ -1329,10 +1329,9 @@ int uz_opts(__G__ pargc, pargv) + int *pargc; + char ***pargv; + { +- char **argv, *s; ++ char **argv, *s, *zipbomb_envar; + int argc, c, error=FALSE, negative=0, showhelp=0; + +- + argc = *pargc; + argv = *pargv; + +@@ -1923,6 +1922,18 @@ opts_done: /* yes, very ugly...but only used by UnZipSFX with -x xlist */ + else + G.extract_flag = TRUE; + ++ /* Disable the zipbomb detection, this is the only option set only via the shell variables but it should at least not clash with something in the future. */ ++ zipbomb_envar = getenv("UNZIP_DISABLE_ZIPBOMB_DETECTION"); ++ uO.zipbomb = TRUE; ++ if (zipbomb_envar != NULL) { ++ /* strcasecmp might be a better approach here but it is POSIX-only */ ++ if ((strcmp ("TRUE", zipbomb_envar) == 0) ++ || (strcmp ("True", zipbomb_envar) == 0) ++ || (strcmp ("true",zipbomb_envar) == 0)) { ++ uO.zipbomb = FALSE; ++ } ++ } ++ + *pargc = argc; + *pargv = argv; + return PK_OK; +diff --git a/unzip.h b/unzip.h +index ed24a5b..e7665e8 100644 +--- a/unzip.h ++++ b/unzip.h +@@ -559,6 +559,7 @@ typedef struct _UzpOpts { + #ifdef UNIX + int cflxflag; /* -^: allow control chars in extracted filenames */ + #endif ++ int zipbomb; + #endif /* !FUNZIP */ + } UzpOpts; + +-- +2.33.0 + diff --git a/SPECS/unzip/unzip.spec b/SPECS/unzip/unzip.spec new file mode 100644 index 00000000..aa7816c0 --- /dev/null +++ b/SPECS/unzip/unzip.spec @@ -0,0 +1,103 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: unzip +Version: 6.0 +Release: %autorelease +Summary: A utility for unpacking zip files +License: Info-ZIP +URL: https://infozip.sourceforge.net/UnZip.html +#!RemoteAsset +Source0: https://downloads.sourceforge.net/infozip/unzip60.tar.gz +BuildSystem: autotools + +BuildOption(build): -f unix/Makefile unzips CF_NOOPT="$RPM_OPT_FLAGS -std=gnu17" +BuildOption(install): -f unix/Makefile prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 +BuildOption(check): -f unix/Makefile CF_NOOPT="$RPM_OPT_FLAGS -std=gnu17" + +BuildRequires: make + +%patchlist +# Fix executable space protection patch, upstream plans to do this +0001-unzip-6.0-exec-shield.patch +# Fix close_outfile() no return value, upstream plans to do this +0002-unzip-6.0-close.patch +# http://www.info-zip.org/board/board.pl?m-1259575993/ +0003-unzip-6.0-attribs-overflow.patch +# Initialize G.pInfo->symlink to 0 +0004-unzip-6.0-symlink.patch +# downstream fix for "-Werror=format-security", upstream won't fix +0005-unzip-6.0-format-secure.patch +# Fix valgrind warning by zeroing extra_field if readbuf returns less than requested +0006-unzip-6.0-valgrind.patch +# Fix read_ux3_value call to pass pointers to z_uidgid elements instead of values +0007-unzip-6.0-x-option.patch +# Add check to prevent overflow when using STORED compression method +0008-unzip-6.0-overflow.patch +# Add length check for PKVMS extra field to prevent read overflow +0009-unzip-6.0-cve-2014-8139.patch +# Add check for eb_ucsize being zero to prevent a crash +0010-unzip-6.0-cve-2014-8140.patch +# Add bounds checks in getZip64Data to prevent buffer over-read +0011-unzip-6.0-cve-2014-8141.patch +# Increase cfactorstr buffer size to prevent overflow when formatting large compression method numbers +0012-unzip-6.0-overflow-long-fsize.patch +# Fix heap overflow and infinite loop when invalid input is given +0013-unzip-6.0-heap-overflow-infloop.patch +# support non-{latin,unicode} encoding +0014-unzip-6.0-alt-iconv-utf8.patch +0015-unzip-6.0-alt-iconv-utf8-print.patch +0016-Fix-CVE-2016-9844-rhbz-1404283.patch +# restore unix timestamp accurately +0017-unzip-6.0-timestamp.patch +# fix possible heap based stack overflow in passwd protected files +0018-unzip-6.0-cve-2018-1000035-heap-based-overflow.patch +# Use snprintf to prevent buffer overflow in list.c +0019-unzip-6.0-cve-2018-18384.patch +# covscan issues +0020-unzip-6.0-COVSCAN-fix-unterminated-string.patch +# Add zip bomb detection feature and related bug fixes +0021-unzip-zipbomb-part1.patch +0022-unzip-zipbomb-part2.patch +0023-unzip-zipbomb-part3.patch +0024-unzip-zipbomb-manpage.patch +0025-unzip-zipbomb-part4.patch +0026-unzip-zipbomb-part5.patch +0027-unzip-zipbomb-part6.patch +0028-unzip-zipbomb-part7.patch +0029-unzip-zipbomb-switch.patch + +%description +The unzip utility is used to list, test, or extract files from a zip +archive. Zip archives are commonly found on MS-DOS systems. The zip +utility, included in the zip package, creates zip archives. Zip and +unzip are both compatible with archives created by PKWARE(R)'s PKZIP +for MS-DOS, but the programs' options and default behaviors do differ +in some respects. + +Install the unzip package if you need to list, test or extract files from +a zip archive. + +# no configure +%conf + +%build -p +export RPM_OPT_FLAGS="%{optflags} \ +-D_GNU_SOURCE -DRCC_LAZY -DWILD_STOP_AT_DIR \ +-DLARGE_FILE_SUPPORT -DUNICODE_SUPPORT \ +-DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \ +-DNOMEMCPY -DDATE_FORMAT=DF_YMD \ +-I. -fstack-protector -fno-strict-aliasing -fPIE" + +%files +%license LICENSE COPYING.OLD +%doc README BUGS +%{_bindir}/* +%{_mandir}/*/* + +%changelog +%{?autochangelog} diff --git a/SPECS/usbutils/usbutils.spec b/SPECS/usbutils/usbutils.spec new file mode 100644 index 00000000..8187682d --- /dev/null +++ b/SPECS/usbutils/usbutils.spec @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Yafen Fang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: usbutils +Version: 018 +Release: %autorelease +Summary: Linux USB utilities +License: GPL-2.0-or-later +URL: http://www.linux-usb.org/ +#!RemoteAsset +Source0: https://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.xz +#!RemoteAsset +Source1: https://www.kernel.org/pub/linux/utils/usb/usbutils/%{name}-%{version}.tar.sign + +BuildSystem: meson + +BuildRequires: meson +BuildRequires: gcc +BuildRequires: libusb-devel +BuildRequires: libudev-devel +Requires: hwdata + +%description +This is a collection of USB tools running on a USB host. + +%install -a +rm -rf %{buildroot}/%{_libdir}/pkgconfig/usbutils.pc + +%files +%license LICENSES/GPL* +%doc NEWS +%{_bindir}/* +%{_mandir}/man?/* + +%changelog +%{?autochangelog} diff --git a/SPECS/userspace-rcu/userspace-rcu.spec b/SPECS/userspace-rcu/userspace-rcu.spec new file mode 100644 index 00000000..6541731a --- /dev/null +++ b/SPECS/userspace-rcu/userspace-rcu.spec @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: userspace-rcu +Version: 0.15.3 +Release: %autorelease +Summary: Userspace RCU (read-copy-update) library +License: LGPL-2.1-or-later +URL: https://liburcu.org/ +#!RemoteAsset +Source: https://lttng.org/files/urcu/%{name}-%{version}.tar.bz2 + +BuildSystem: autotools + +BuildRequires: pkgconfig gcc gcc-c++ autoconf automake make libtool + +%description +liburcu is a LGPLv2.1 userspace RCU (read-copy-update) library. This data +synchronization library provides read-side access which scales linearly with +the number of cores. + +%package devel +Summary: Development files for the userspace-rcu library +Requires: %{name} = %{version} + +%description devel +This package contains the header files, libraries, and documentation +needed to develop applications that use the userspace-rcu library. + +%conf -p +autoreconf -vif + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print + + +%ldconfig_scriptlets + +%files +%doc ChangeLog README.md +%{_libdir}/lib*.so.* + +%files devel +%doc %{_docdir}/%{name}/ +%{_includedir}/urcu* +%{_libdir}/lib*.so +%{_libdir}/lib*.a +%{_libdir}/pkgconfig/liburcu*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/utf8proc/utf8proc.spec b/SPECS/utf8proc/utf8proc.spec new file mode 100644 index 00000000..ee8044dd --- /dev/null +++ b/SPECS/utf8proc/utf8proc.spec @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: utf8proc +Version: 2.10.0 +Release: %autorelease +Summary: Library for processing UTF-8 encoded Unicode strings +License: MIT AND Unicode-DFS-2015 +URL: https://julialang.org/utf8proc/ +#!RemoteAsset +Source0: https://github.com/JuliaLang/utf8proc/archive/v%{version}.tar.gz#/%{name}-v%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): CFLAGS="%{optflags}" +BuildOption(install): includedir=%{_includedir} +BuildOption(install): libdir=%{_libdir} + +BuildRequires: make +BuildRequires: gcc +BuildRequires: perl + +%description +utf8proc is a library for processing UTF-8 encoded Unicode strings. +Some features are Unicode normalization, stripping of default ignorable +characters, case folding and detection of grapheme cluster boundaries. +A special character mapping is available, which converts for example +the characters “Hyphen” (U+2010), “Minus” (U+2212) and “Hyphen-Minus +(U+002D, ASCII Minus) all into the ASCII minus sign, to make them +equal for comparisons. + +This package only contains the C library. + +%package devel +Summary: Header files, libraries and development documentation for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel + +Contains header files for developing applications that use the %{name} +library. + +The documentation for the C library is found in the utf8proc.h header file. +"utf8proc_map" is most likely the function you will be using for mapping UTF-8 +strings, unless you want to allocate memory yourself. + +%prep -a +#solve the problem during the check +sed -i '/-C bench/d;/\ttest.* data/d' Makefile +touch data/NormalizationTest.txt data/GraphemeBreakTest.txt data/Lowercase.txt data/Uppercase.txt + +%conf + +%install -a +rm -f %{buildroot}%{_libdir}/*.a + +%files +%doc LICENSE.md NEWS.md README.md +%{_libdir}/libutf8proc.so.3* + +%files devel +%{_includedir}/utf8proc.h +%{_libdir}/libutf8proc.so +%{_libdir}/pkgconfig/libutf8proc.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/util-linux/0001-libmount-disable-EROFS-backing-file-support.patch b/SPECS/util-linux/0001-libmount-disable-EROFS-backing-file-support.patch new file mode 100644 index 00000000..4c7090eb --- /dev/null +++ b/SPECS/util-linux/0001-libmount-disable-EROFS-backing-file-support.patch @@ -0,0 +1,88 @@ +From 3b1b56c00b34e1d00349349a8a91d0add72ce97b Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Tue, 24 Jun 2025 10:56:58 +0200 +Subject: [PATCH] libmount: disable EROFS backing file support + +Let's temporarily use the old reliable loop devices rather than directly +mounting EROFS images. It seems some tools need to adapt to the change. +See https://github.com/dracut-ng/dracut-ng/issues/1384 + +Signed-off-by: Karel Zak +--- + libmount/src/context_mount.c | 35 ----------------------------------- + libmount/src/hook_loopdev.c | 7 ------- + 2 files changed, 42 deletions(-) + +diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c +index fbb200708..4d6d53194 100644 +--- a/libmount/src/context_mount.c ++++ b/libmount/src/context_mount.c +@@ -961,24 +961,6 @@ int mnt_context_finalize_mount(struct libmnt_context *cxt) + return rc; + } + +-static int is_erofs_regfile(struct libmnt_context *cxt) +-{ +- const char *type = mnt_fs_get_fstype(cxt->fs); +- const char *src = mnt_fs_get_srcpath(cxt->fs); +- unsigned long flags = 0; +- struct stat st; +- +- if (!type || strcmp(type, "erofs") != 0) +- return 0; +- if (mnt_context_get_user_mflags(cxt, &flags)) +- return 0; +- if (flags & (MNT_MS_LOOP | MNT_MS_OFFSET | MNT_MS_SIZELIMIT)) +- return 0; /* it's already loopdev */ +- if (!src || stat(src, &st) != 0 || !S_ISREG(st.st_mode)) +- return 0; +- return 1; +-} +- + /** + * mnt_context_mount: + * @cxt: mount context +@@ -1083,23 +1065,6 @@ again: + } + } + +- /* +- * Try mount EROFS image again with loop device. +- * See hook_loopdev.c:is_loopdev_required() for more details. +- */ +- if (rc && mnt_context_get_syscall_errno(cxt) == ENOTBLK +- && is_erofs_regfile(cxt)) { +- struct libmnt_optlist *ol = mnt_context_get_optlist(cxt); +- +- mnt_context_reset_status(cxt); +- DBG(CXT, ul_debugobj(cxt, "enabling loop= for EROFS")); +- mnt_optlist_append_flags(ol, MNT_MS_LOOP, cxt->map_userspace); +- +- rc = mnt_context_call_hooks(cxt, MNT_STAGE_PREP_SOURCE); +- if (!rc) +- goto again; +- } +- + if (rc == 0) + rc = mnt_context_call_hooks(cxt, MNT_STAGE_POST); + +diff --git a/libmount/src/hook_loopdev.c b/libmount/src/hook_loopdev.c +index 444d69d6f..29e181fe8 100644 +--- a/libmount/src/hook_loopdev.c ++++ b/libmount/src/hook_loopdev.c +@@ -468,13 +468,6 @@ static int is_loopdev_required(struct libmnt_context *cxt, struct libmnt_optlist + } + } + +- /* The EROFS kernel driver can be compiled with EROFS_FS_BACKED_BY_FILE, +- * allowing for the mounting of a regular file as a filesystem without +- * a loop device. +- */ +- if (type && strcmp(type, "erofs") == 0) +- return 0; +- + /* Note that there is no restriction (on kernel side) that would + * prevent a regular file as a mount(2) source argument. A filesystem + * that is able to mount regular files could be implemented. For this +-- +2.49.0 diff --git a/SPECS/util-linux/60-rfkill.rules b/SPECS/util-linux/60-rfkill.rules new file mode 100644 index 00000000..1df9b1b0 --- /dev/null +++ b/SPECS/util-linux/60-rfkill.rules @@ -0,0 +1,2 @@ +# Allow users in the "rfkill" group to manage rfkill devices +KERNEL=="rfkill", GROUP="rfkill", MODE="0664" diff --git a/SPECS/util-linux/chfn.pam b/SPECS/util-linux/chfn.pam new file mode 100644 index 00000000..2dbc0aaf --- /dev/null +++ b/SPECS/util-linux/chfn.pam @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth include system-auth +account include system-auth +password include system-auth +session include system-auth diff --git a/SPECS/util-linux/login-default-motd-file.patch b/SPECS/util-linux/login-default-motd-file.patch new file mode 100644 index 00000000..36708484 --- /dev/null +++ b/SPECS/util-linux/login-default-motd-file.patch @@ -0,0 +1,13 @@ +diff --git a/include/pathnames.h b/include/pathnames.h +index 3845d4c33..fac3a0783 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -41,7 +41,7 @@ + #ifndef _PATH_MAILDIR + # define _PATH_MAILDIR "/var/spool/mail" + #endif +-#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/etc/motd" ++#define _PATH_MOTDFILE "/usr/share/misc/motd:/run/motd:/run/motd.d:/etc/motd:/etc/motd.d" + #ifndef _PATH_NOLOGIN + # define _PATH_NOLOGIN "/etc/nologin" + #endif diff --git a/SPECS/util-linux/login-lastlog-create.patch b/SPECS/util-linux/login-lastlog-create.patch new file mode 100644 index 00000000..799f3304 --- /dev/null +++ b/SPECS/util-linux/login-lastlog-create.patch @@ -0,0 +1,12 @@ +diff -up util-linux-2.36/login-utils/login.c.kzak util-linux-2.36/login-utils/login.c +--- util-linux-2.36/login-utils/login.c.kzak 2020-07-23 14:13:26.777030764 +0200 ++++ util-linux-2.36/login-utils/login.c 2020-07-23 14:11:22.793686983 +0200 +@@ -585,7 +585,7 @@ static void log_lastlog(struct login_con + sa.sa_handler = SIG_IGN; + sigaction(SIGXFSZ, &sa, &oldsa_xfsz); + +- fd = open(_PATH_LASTLOG, O_RDWR, 0); ++ fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0); + if (fd < 0) + goto done; + offset = cxt->pwd->pw_uid * sizeof(ll); diff --git a/SPECS/util-linux/login.pam b/SPECS/util-linux/login.pam new file mode 100644 index 00000000..5a31a863 --- /dev/null +++ b/SPECS/util-linux/login.pam @@ -0,0 +1,11 @@ +#%PAM-1.0 +# This file is part of openRuyi. +# +# By default, openRuyi uses a central PAM configuration stack. +# This file simply includes the system-wide policy for local logins. +# To customize, edit the files included by 'system-auth'. +# +auth include system-auth +account include system-auth +password include system-auth +session include system-auth diff --git a/SPECS/util-linux/runuser-l.pam b/SPECS/util-linux/runuser-l.pam new file mode 100644 index 00000000..6e4cc934 --- /dev/null +++ b/SPECS/util-linux/runuser-l.pam @@ -0,0 +1,7 @@ +#%PAM-1.0 +# Note that runuser requires only "session" setting (and for example +# "auth sufficient pam_rootok.so" dummy line). +auth sufficient pam_rootok.so +session optional pam_keyinit.so force revoke +session include common-session +session optional pam_xauth.so diff --git a/SPECS/util-linux/runuser.pam b/SPECS/util-linux/runuser.pam new file mode 100644 index 00000000..6ad71b00 --- /dev/null +++ b/SPECS/util-linux/runuser.pam @@ -0,0 +1,5 @@ +#%PAM-1.0 + +auth sufficient pam_rootok.so +session include system-login + diff --git a/SPECS/util-linux/su-l.pam b/SPECS/util-linux/su-l.pam new file mode 100644 index 00000000..d88e6eb6 --- /dev/null +++ b/SPECS/util-linux/su-l.pam @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth include common-auth +account sufficient pam_rootok.so +account include common-account +password include common-password +session optional pam_keyinit.so force revoke +session include common-session +session optional pam_xauth.so diff --git a/SPECS/util-linux/util-linux.spec b/SPECS/util-linux/util-linux.spec new file mode 100644 index 00000000..8e7a5dcc --- /dev/null +++ b/SPECS/util-linux/util-linux.spec @@ -0,0 +1,323 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: util-linux +Version: 2.41.1 +Release: %autorelease +Summary: A collection of basic system utilities +License: GPL-2.0-or-later and others +URL: https://www.kernel.org/pub/linux/utils/util-linux/ +#!RemoteAsset +Source0: https://www.kernel.org/pub/linux/utils/util-linux/v2.41/%{name}-%{version}.tar.xz + +# These files define the default behavior for openRuyi. +Source10: login.pam +Source12: su-l.pam +Source13: runuser.pam +Source14: runuser-l.pam +Source15: chfn.pam +Source20: 60-rfkill.rules + +# --- Essential Patches --- +# Ensures /var/log/lastlog is created correctly. +Patch0: login-lastlog-create.patch +# Integrates with systemd's motd.d directory. +Patch1: login-default-motd-file.patch +# Fixes an issue with the EROFS filesystem. +Patch2: 0001-libmount-disable-EROFS-backing-file-support.patch + +BuildSystem: autotools + +# Configure options for a modern, feature-rich build. +BuildOption(conf): --with-systemdsystemunitdir=%{_unitdir} +BuildOption(conf): --disable-silent-rules +BuildOption(conf): --enable-chfn-chsh +BuildOption(conf): --enable-login +BuildOption(conf): --enable-su +BuildOption(conf): --with-python=3 +BuildOption(conf): --with-systemd +BuildOption(conf): --with-udev +BuildOption(conf): --with-selinux +BuildOption(conf): --without-slang +BuildOption(conf): --disable-makeinstall-chown +BuildOption(conf): --disable-kill +BuildOption(conf): --enable-nologin +BuildOption(conf): --disable-logger + +BuildRequires: make, gcc, autoconf, automake, libtool, python3-libs +BuildRequires: audit-devel, gettext-devel, libcap-ng-devel +BuildRequires: libselinux-devel, libxcrypt-devel, ncurses-devel +BuildRequires: pam-devel, popt-devel, readline-devel, python3-devel +BuildRequires: zlib-devel, sqlite-devel, libudev-devel +BuildRequires: file-devel, cryptsetup-devel, libeconf-devel +BuildRequires: pkgconfig(systemd) + +# This ensures a clean upgrade path and replaces older, separate packages. +Obsoletes: eject <= 2.1.5 +Provides: eject = 2.1.6 +Obsoletes: rfkill <= 0.5 +Provides: rfkill = 0.5 +Obsoletes: hardlink <= 1:1.3-9 +Provides: hardlink = 1:1.3-9 +Conflicts: sysvinit-tools < 2.88-14 +Conflicts: coreutils < 8.20 + +# The main tools package requires all the runtime libraries it was built with. +Requires: libuuid%{?_isa} = %{version}-%{release} +Requires: libblkid%{?_isa} = %{version}-%{release} +Requires: libmount%{?_isa} = %{version}-%{release} +Requires: libsmartcols%{?_isa} = %{version}-%{release} +Requires: libfdisk%{?_isa} = %{version}-%{release} +Requires: liblastlog2%{?_isa} = %{version}-%{release} +Requires: audit, ncurses, pam, readline, zlib + +%description +The util-linux package contains a large variety of low-level system +utilities that are necessary for a Linux system to function. It includes +tools like fdisk, mount, login, and more. + +%package -n libuuid +Summary: Universally unique ID library +%description -n libuuid +The libuuid library generates and parses 128-bit universally unique IDs (UUIDs). + +%package -n libblkid +Summary: Block device ID library +Requires: libuuid%{?_isa} = %{version}-%{release} +%description -n libblkid +The libblkid library is used for block device identification. + +%package -n libmount +Summary: Device mounting library +Requires: libblkid%{?_isa} = %{version}-%{release} +%description -n libmount +The libmount library is used for mounting and unmounting filesystems. + +%package -n libsmartcols +Summary: Column-based text formatting library +%description -n libsmartcols +The libsmartcols library is used for formatting text output in columns. + +%package -n libfdisk +Summary: Partitioning library for fdisk-like programs +%description -n libfdisk +The libfdisk library provides functions for manipulating disk partition tables. + +%package -n liblastlog2 +Summary: The lastlog2 database library and PAM module +%description -n liblastlog2 +This is the lastlog database library and PAM module, part of util-linux. + +%package -n uuidd +Summary: Helper daemon to guarantee uniqueness of time-based UUIDs +Requires: libuuid%{?_isa} = %{version}-%{release} +%{?systemd_requires} +Requires(pre): shadow + +%description -n uuidd +The uuidd daemon guarantees uniqueness of time-based UUID generation. + +%package -n python3-libmount +Summary: Python 3 bindings for libmount +Requires: libmount%{?_isa} = %{version}-%{release} +Requires: python3 + +%description -n python3-libmount +This package contains the Python 3 bindings for the libmount library, +which is used for mounting and unmounting filesystems. + +%package devel +Summary: Development files for util-linux libraries +Requires: libuuid%{?_isa} = %{version}-%{release} +Requires: libblkid%{?_isa} = %{version}-%{release} +Requires: libmount%{?_isa} = %{version}-%{release} +Requires: libsmartcols%{?_isa} = %{version}-%{release} +Requires: libfdisk%{?_isa} = %{version}-%{release} +Requires: liblastlog2%{?_isa} = %{version}-%{release} +Requires: pkgconfig(zlib) + +%description devel +This package contains all header files, static libraries, and development +symlinks for the libraries included in util-linux. + +%env -p +# Regenerate autotools files in case patches touched them. +autoreconf -fiv + +%install -a + +find %{buildroot} -type f -name "*.la" -delete + +install -Dm644 %{SOURCE10} %{buildroot}%{_sysconfdir}/pam.d/login +install -Dm644 %{SOURCE12} %{buildroot}%{_sysconfdir}/pam.d/su-l +install -Dm644 %{SOURCE13} %{buildroot}%{_sysconfdir}/pam.d/runuser +install -Dm644 %{SOURCE14} %{buildroot}%{_sysconfdir}/pam.d/runuser-l +install -Dm644 %{SOURCE15} %{buildroot}%{_sysconfdir}/pam.d/chfn + +install -Dm644 %{SOURCE20} %{buildroot}%{_udevrulesdir}/60-rfkill.rules +%find_lang %{name} --generate-subpackages + +%ldconfig_scriptlets -n libuuid +%ldconfig_scriptlets -n libblkid +%ldconfig_scriptlets -n libmount +%ldconfig_scriptlets -n libsmartcols +%ldconfig_scriptlets -n libfdisk + +%post -n liblastlog2 +%systemd_post lastlog2-import.service +%postun -n liblastlog2 +%systemd_postun lastlog2-import.service + +%post -n uuidd +%systemd_post uuidd.service uuidd.socket +%preun -n uuidd +%systemd_preun uuidd.service uuidd.socket +%postun -n uuidd +%systemd_postun_with_restart uuidd.service uuidd.socket + +%files +%license COPYING +%doc NEWS +%doc %{_docdir}/%{name}/* +# Core tools and their man pages + +%{_bindir}/bits +%{_bindir}/cal +%{_bindir}/chmem +%{_bindir}/choom +%{_bindir}/col +%{_bindir}/colcrt +%{_bindir}/colrm +%{_bindir}/column +%{_bindir}/coresched +%{_bindir}/eject +%{_bindir}/enosys +%{_bindir}/exch +%{_bindir}/fallocate +%{_bindir}/fincore +%{_bindir}/fadvise +%{_bindir}/getopt +%{_bindir}/hexdump +%{_bindir}/irqtop +%{_bindir}/isosize +%{_bindir}/last +%{_bindir}/lastb +%{_bindir}/lastlog2 +%{_bindir}/look +%{_bindir}/lsblk +%{_bindir}/lscpu +%{_bindir}/lsclocks +%{_bindir}/lsfd +%{_bindir}/lsipc +%{_bindir}/lsirq +%{_bindir}/lslocks +%{_bindir}/lslogins +%{_bindir}/lsmem +%{_bindir}/lsns +%{_bindir}/mcookie +%{_bindir}/mesg +%{_bindir}/namei +%{_bindir}/pipesz +%{_bindir}/prlimit +%{_bindir}/rename +%{_bindir}/rev +%{_bindir}/setarch +%{_bindir}/setpgid +%{_bindir}/setpriv +%{_bindir}/setterm +%{_bindir}/uclampset +%{_bindir}/ul +%{_bindir}/utmpdump +%{_bindir}/uuidgen +%{_bindir}/uuidparse +%{_bindir}/waitpid +%{_bindir}/wall +%{_bindir}/wdctl +%{_bindir}/whereis +%{_bindir}/chrt +%{_bindir}/dmesg +%{_bindir}/findmnt +%{_bindir}/flock +%{_bindir}/hardlink +%{_bindir}/ionice +%{_bindir}/ipcmk +%{_bindir}/ipcrm +%{_bindir}/ipcs +%{_bindir}/linux32 +%{_bindir}/linux64 +%{_bindir}/login +%{_bindir}/more +%{_bindir}/mountpoint +%{_bindir}/nsenter +%{_bindir}/renice +%{_bindir}/script +%{_bindir}/scriptlive +%{_bindir}/scriptreplay +%{_bindir}/setsid +%{_bindir}/taskset +%{_bindir}/uname26 +%{_bindir}/unshare +%attr(4755, root, root) %{_bindir}/su +%attr(4755, root, root) %{_bindir}/mount +%attr(4755, root, root) %{_bindir}/umount +%attr(4711, root, root) %{_bindir}/chfn +%attr(4711, root, root) %{_bindir}/chsh +%{_sbindir}/* +%ghost /etc/mtab +%config(noreplace) %{_sysconfdir}/pam.d/* +%{_unitdir}/fstrim.service +%{_unitdir}/fstrim.timer +%{_udevrulesdir}/60-rfkill.rules +%{_mandir}/man1/* +%{_mandir}/man5/* +%{_mandir}/man8/* +%{_datadir}/bash-completion/completions/* +%exclude %{_bindir}/uuidgen +%exclude %{_sbindir}/uuidd + +%files -n libuuid +%{_libdir}/libuuid.so.* +%{_bindir}/uuidgen + +%files -n libblkid +%{_libdir}/libblkid.so.* + +%files -n libmount +%{_libdir}/libmount.so.* + +%files -n libsmartcols +%{_libdir}/libsmartcols.so.* + +%files -n libfdisk +%{_libdir}/libfdisk.so.* + +%files -n liblastlog2 +%{_libdir}/liblastlog2.so.* +%{_libdir}/security/pam_lastlog2.so +%{_unitdir}/lastlog2-import.service +%{_tmpfilesdir}/lastlog2-tmpfiles.conf + +%files -n uuidd +%{_sbindir}/uuidd +%{_unitdir}/uuidd.service +%{_unitdir}/uuidd.socket +%{_tmpfilesdir}/uuidd-tmpfiles.conf +%{_sysusersdir}/uuidd-sysusers.conf + +%files -n python3-libmount +%{python3_sitearch}/libmount/ + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/*.a +%{_libdir}/pkgconfig/*.pc +%{_mandir}/man3/* + + +%changelog +%{?autochangelog} diff --git a/SPECS/util-macros/util-macros.spec b/SPECS/util-macros/util-macros.spec new file mode 100644 index 00000000..d996308a --- /dev/null +++ b/SPECS/util-macros/util-macros.spec @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: util-macros +Version: 1.20.2 +Release: %autorelease +Summary: Utility Macro Headers for X.Org development +License: MIT +Group: Development/Libraries/X11 +URL: https://xorg.freedesktop.org/ +#!RemoteAsset +Source: https://www.x.org/releases/individual/util/util-macros-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(build): CFLAGS="%{optflags} -fno-strict-aliasing" + +BuildRequires: pkgconfig +BuildRequires: autoconf automake libtool + +%description +This package provides a set of common Autoconf macros used throughout the +X.Org build system. + + +%install -a +rm -f %{buildroot}%{_datadir}/util-macros/INSTALL + +%files +%license COPYING +%dir %{_datadir}/aclocal +%{_datadir}/aclocal/*.m4 +%{_datadir}/pkgconfig/*.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/vala/vala.spec b/SPECS/vala/vala.spec new file mode 100644 index 00000000..aeac9a48 --- /dev/null +++ b/SPECS/vala/vala.spec @@ -0,0 +1,163 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# first two digits of version +%global release_version 0.56 + +# graphviz is needed only for valadoc +# Set to 1 if you want to build valadoc +%bcond graphbiz 0 + +Name: vala +Version: %{release_version}.18 +Release: %autorelease +Summary: A modern programming language for GNOME +License: LGPL-2.1-or-later AND BSD-2-Clause +URL: https://wiki.gnome.org/Projects/Vala +#!RemoteAsset +Source: https://download.gnome.org/sources/%{name}/%{release_version}/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --disable-static +%if %{without graphbiz} +BuildOption(conf): --disable-valadoc +%endif +BuildOption(conf): lt_cv_sys_lib_search_path_spec="/lib /usr/lib /lib64 /usr/lib64" +BuildOption(conf): lt_cv_sys_lib_dlsearch_path_spec="/lib /usr/lib /lib64 /usr/lib64" + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: bison +BuildRequires: flex +BuildRequires: gobject-introspection-devel +BuildRequires: libxslt +BuildRequires: make +BuildRequires: pkgconfig(gobject-2.0) +# for test +BuildRequires: dbus-tools +%if %{with graphbiz} +BuildRequires: graphviz-devel +%endif + +%description +Vala is a new programming language that aims to bring modern programming +language features to GNOME developers without imposing any additional +runtime requirements and without using a different ABI compared to +applications and libraries written in C. + +valac, the Vala compiler, is a self-hosting compiler that translates +Vala source code into C source and header files. It uses the GObject +type system to create classes and interfaces declared in the Vala source +code. It's also planned to generate GIDL files when gobject- +introspection is ready. + +The syntax of Vala is similar to C#, modified to better fit the GObject +type system. + +%package devel +Summary: Vala compiler library & Development files for libvala + +%description devel +Vala is a new programming language that aims to bring modern programming +language features to GNOME developers without imposing any additional +runtime requirements and without using a different ABI compared to +applications and libraries written in C. + +This package contains development files & shared libvala library +for libvala. This is not necessary for using the %{name} compiler. + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Vala is a new programming language that aims to bring modern programming +language features to GNOME developers without imposing any additional +runtime requirements and without using a different ABI compared to +applications and libraries written in C. + +This package contains documentation in a devhelp HTML book. + +%if %{with graphbiz} +%package -n valadoc +Summary: Vala documentation generator +Requires: %{name} = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} + +%description -n valadoc +Valadoc is a documentation generator for generating API documentation from Vala +source code. + +%package -n valadoc-devel +Summary: Development files for valadoc +Requires: valadoc = %{version}-%{release} + +%description -n valadoc-devel +Valadoc is a documentation generator for generating API documentation from Vala +source code. + +The valadoc-devel package contains libraries and header files for +developing applications that use valadoc. +%endif + +%conf -p +autoreconf -fiv + +%files +%license COPYING +%doc NEWS README.md +%{_bindir}/vala +%{_bindir}/vala-%{release_version} +%{_bindir}/valac +%{_bindir}/valac-%{release_version} +%{_bindir}/vala-gen-introspect +%{_bindir}/vala-gen-introspect-%{release_version}* +%{_bindir}/vapigen +%{_bindir}/vapigen-%{release_version} +%{_libdir}/pkgconfig/vapigen*.pc +%{_libdir}/vala-%{release_version}/ +%{_datadir}/aclocal/vala.m4 +%{_datadir}/aclocal/vapigen.m4 +%{_datadir}/vala/ +%{_datadir}/vala-%{release_version}/ +%{_mandir}/man1/valac.1* +%{_mandir}/man1/valac-%{release_version}.1* +%{_mandir}/man1/vala-gen-introspect.1* +%{_mandir}/man1/vala-gen-introspect-%{release_version}.1* +%{_mandir}/man1/vapigen.1* +%{_mandir}/man1/vapigen-%{release_version}.1* + +%files devel +%{_includedir}/vala-%{release_version} +%{_libdir}/libvala-%{release_version}.so +%{_libdir}/libvala-%{release_version}.so.* +%{_libdir}/pkgconfig/libvala-%{release_version}.pc + +%files doc +%doc %{_datadir}/devhelp/books/vala-%{release_version} + +%if %{with graphbiz} +# TODO: check this once we have valadoc built +%files -n valadoc +%{_bindir}/valadoc +%{_bindir}/valadoc-%{release_version} +%{_libdir}/libvaladoc-%{release_version}.so.0* +%{_libdir}/valadoc-%{release_version}/ +%{_datadir}/valadoc-%{release_version}/ +%{_mandir}/man1/valadoc-%{release_version}.1* +%{_mandir}/man1/valadoc.1* + +%files -n valadoc-devel +%{_includedir}/valadoc-%{release_version}/ +%{_libdir}/libvaladoc-%{release_version}.so +%{_libdir}/pkgconfig/valadoc-%{release_version}.pc +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/valkey/valkey-conf.patch b/SPECS/valkey/valkey-conf.patch new file mode 100644 index 00000000..55badf71 --- /dev/null +++ b/SPECS/valkey/valkey-conf.patch @@ -0,0 +1,61 @@ +diff -up ./sentinel.conf.rpm ./sentinel.conf +--- ./sentinel.conf.rpm 2025-07-24 10:05:46.477794769 +0200 ++++ ./sentinel.conf 2025-07-24 10:07:27.023483441 +0200 +@@ -17,7 +17,7 @@ daemonize no + # When running daemonized, Valkey Sentinel writes a pid file in + # /var/run/valkey-sentinel.pid by default. You can specify a custom pid file + # location here. +-pidfile /var/run/valkey-sentinel.pid ++pidfile /run/valkey/sentinel.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -31,7 +31,7 @@ loglevel notice + # Specify the log file name. Also the empty string can be used to force + # Sentinel to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile "" ++logfile /var/log/valkey/sentinel.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. +diff -up ./valkey.conf.rpm ./valkey.conf +--- ./valkey.conf.rpm 2025-07-24 10:05:46.475591081 +0200 ++++ ./valkey.conf 2025-07-24 10:07:23.219331838 +0200 +@@ -43,6 +43,9 @@ + # include /path/to/other.conf + # include /path/to/fragments/*.conf + # ++# Module configuration files ++include /etc/valkey/modules/*.conf ++ + + ################################## MODULES ##################################### + +@@ -153,7 +156,7 @@ tcp-backlog 511 + # incoming connections. There is no default, so the server will not listen + # on a unix socket when not specified. + # +-# unixsocket /run/valkey.sock ++unixsocket /run/valkey/valkey.sock + # unixsocketgroup wheel + # unixsocketperm 700 + +@@ -385,7 +388,7 @@ daemonize no + # + # Note that on modern Linux systems "/run/valkey.pid" is more conforming + # and should be used instead. +-pidfile /var/run/valkey_6379.pid ++pidfile /run/valkey/valkey.pid + + # Specify the server verbosity level. + # This can be one of: +@@ -416,7 +419,7 @@ loglevel notice + # Specify the log file name. Also the empty string can be used to force + # the server to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile "" ++logfile /var/log/valkey/valkey.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. diff --git a/SPECS/valkey/valkey-loadmod.patch b/SPECS/valkey/valkey-loadmod.patch new file mode 100644 index 00000000..3341863b --- /dev/null +++ b/SPECS/valkey/valkey-loadmod.patch @@ -0,0 +1,147 @@ +Adapted for 8.1.4 from +https://github.com/valkey-io/valkey/pull/2689 + +diff -up ./src/config.c.loadmod ./src/config.c +--- ./src/config.c.loadmod 2025-10-03 21:17:43.000000000 +0200 ++++ ./src/config.c 2025-10-06 03:06:41.774448336 +0200 +@@ -438,6 +438,8 @@ static int updateClientOutputBufferLimit + * within conf file parsing. This is only needed to support the deprecated + * abnormal aggregate `save T C` functionality. Remove in the future. */ + static int reading_config_file; ++/* support detecting include vs main config file */ ++static int reading_include_file = 0; + + void loadServerConfigFromString(char *config) { + deprecatedConfig deprecated_configs[] = { +@@ -529,7 +531,9 @@ void loadServerConfigFromString(char *co + + /* Execute config directives */ + if (!strcasecmp(argv[0], "include") && argc == 2) { ++ reading_include_file = 1; + loadServerConfig(argv[1], 0, NULL); ++ reading_include_file = 0; + } else if (!strcasecmp(argv[0], "rename-command") && argc == 3) { + struct serverCommand *cmd = lookupCommandBySds(argv[1]); + +@@ -562,7 +566,7 @@ void loadServerConfigFromString(char *co + goto loaderr; + } + } else if (!strcasecmp(argv[0], "loadmodule") && argc >= 2) { +- moduleEnqueueLoadModule(argv[1], &argv[2], argc - 2); ++ moduleEnqueueLoadModule(argv[1], &argv[2], argc - 2, reading_include_file); + } else if (strchr(argv[0], '.')) { + if (argc < 2) { + err = "Module config specified without value"; +@@ -1579,7 +1583,7 @@ void rewriteConfigLoadmoduleOption(struc + while ((de = dictNext(di)) != NULL) { + struct ValkeyModule *module = dictGetVal(de); + line = moduleLoadQueueEntryToLoadmoduleOptionStr(module, "loadmodule"); +- rewriteConfigRewriteLine(state, "loadmodule", line, 1); ++ if (line) rewriteConfigRewriteLine(state, "loadmodule", line, 1); + } + dictReleaseIterator(di); + /* Mark "loadmodule" as processed in case modules is empty. */ +diff -up ./src/module.c.loadmod ./src/module.c +--- ./src/module.c.loadmod 2025-10-03 21:17:43.000000000 +0200 ++++ ./src/module.c 2025-10-06 03:05:36.498290506 +0200 +@@ -83,6 +83,7 @@ + + struct moduleLoadQueueEntry { + sds path; ++ int from_include; + int argc; + robj **argv; + }; +@@ -669,7 +670,7 @@ void freeClientModuleData(client *c) { + c->module_data = NULL; + } + +-void moduleEnqueueLoadModule(sds path, sds *argv, int argc) { ++void moduleEnqueueLoadModule(sds path, sds *argv, int argc, int from_include) { + int i; + struct moduleLoadQueueEntry *loadmod; + +@@ -677,6 +678,7 @@ void moduleEnqueueLoadModule(sds path, s + loadmod->argv = argc ? zmalloc(sizeof(robj *) * argc) : NULL; + loadmod->path = sdsnew(path); + loadmod->argc = argc; ++ loadmod->from_include = from_include; + for (i = 0; i < argc; i++) { + loadmod->argv[i] = createRawStringObject(argv[i], sdslen(argv[i])); + } +@@ -687,6 +689,10 @@ sds moduleLoadQueueEntryToLoadmoduleOpti + const char *config_option_str) { + sds line; + ++ if (module->loadmod->from_include) { ++ /* no need to add as already from config */ ++ return NULL; ++ } + line = sdsnew(config_option_str); + line = sdscatlen(line, " ", 1); + line = sdscatsds(line, module->loadmod->path); +@@ -12188,7 +12194,7 @@ void moduleLoadFromQueue(void) { + listRewind(server.loadmodule_queue, &li); + while ((ln = listNext(&li))) { + struct moduleLoadQueueEntry *loadmod = ln->value; +- if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0) == C_ERR) { ++ if (moduleLoad(loadmod->path, (void **)loadmod->argv, loadmod->argc, 0, loadmod->from_include) == C_ERR) { + serverLog(LL_WARNING, "Can't load module from %s: server aborting", loadmod->path); + exit(1); + } +@@ -12369,7 +12375,7 @@ void moduleUnregisterCleanup(ValkeyModul + + /* Load a module and initialize it. On success C_OK is returned, otherwise + * C_ERR is returned. */ +-int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex) { ++int moduleLoad(const char *path, void **module_argv, int module_argc, int is_loadex, int from_include) { + int (*onload)(void *, void **, int); + void *handle; + +@@ -12444,6 +12450,7 @@ int moduleLoad(const char *path, void ** + ctx.module->loadmod->path = sdsnew(path); + ctx.module->loadmod->argv = module_argc ? zmalloc(sizeof(robj *) * module_argc) : NULL; + ctx.module->loadmod->argc = module_argc; ++ ctx.module->loadmod->from_include = from_include; + for (int i = 0; i < module_argc; i++) { + ctx.module->loadmod->argv[i] = module_argv[i]; + incrRefCount(ctx.module->loadmod->argv[i]); +@@ -13361,7 +13368,7 @@ void moduleCommand(client *c) { + argv = &c->argv[3]; + } + +- if (moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 0) == C_OK) ++ if (moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 0, 0) == C_OK) + addReply(c, shared.ok); + else + addReplyError(c, "Error loading the extension. Please check the server logs."); +@@ -13376,7 +13383,7 @@ void moduleCommand(client *c) { + /* If this is a loadex command we want to populate server.module_configs_queue with + * sds NAME VALUE pairs. We also want to increment argv to just after ARGS, if supplied. */ + if (parseLoadexArguments((ValkeyModuleString ***)&argv, &argc) == VALKEYMODULE_OK && +- moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 1) == C_OK) ++ moduleLoad(c->argv[2]->ptr, (void **)argv, argc, 1, 0) == C_OK) + addReply(c, shared.ok); + else { + dictEmpty(server.module_configs_queue, NULL); +diff -up ./src/module.h.loadmod ./src/module.h +--- ./src/module.h.loadmod 2025-10-03 21:17:43.000000000 +0200 ++++ ./src/module.h 2025-10-06 03:05:36.498698194 +0200 +@@ -169,7 +169,7 @@ static inline void moduleInitDigestConte + memset(mdvar->x, 0, sizeof(mdvar->x)); + } + +-void moduleEnqueueLoadModule(sds path, sds *argv, int argc); ++void moduleEnqueueLoadModule(sds path, sds *argv, int argc, int from_include); + sds moduleLoadQueueEntryToLoadmoduleOptionStr(ValkeyModule *module, + const char *config_option_str); + ValkeyModuleCtx *moduleAllocateContext(void); +@@ -180,7 +180,7 @@ void moduleFreeContext(ValkeyModuleCtx * + void moduleInitModulesSystem(void); + void moduleInitModulesSystemLast(void); + void modulesCron(void); +-int moduleLoad(const char *path, void **argv, int argc, int is_loadex); ++int moduleLoad(const char *path, void **argv, int argc, int is_loadex, int from_include); + int moduleUnload(sds name, const char **errmsg); + void moduleLoadFromQueue(void); + int moduleGetCommandKeysViaAPI(struct serverCommand *cmd, robj **argv, int argc, getKeysResult *result); diff --git a/SPECS/valkey/valkey-sentinel.service b/SPECS/valkey/valkey-sentinel.service new file mode 100644 index 00000000..36093e03 --- /dev/null +++ b/SPECS/valkey/valkey-sentinel.service @@ -0,0 +1,34 @@ +[Unit] +Description=Valkey Sentinel +After=network.target +After=network-online.target +Wants=network-online.target + +[Service] +# ensure var is set +Environment=OPTIONS= +EnvironmentFile=-/etc/sysconfig/valkey-sentinel +# we must keep $OPTIONS and the env file as some older installs will still be using /etc/sysconfig/valkey-sentinel +ExecStart=/usr/bin/valkey-sentinel /etc/valkey/sentinel.conf --daemonize no --supervised systemd $OPTIONS +Type=notify +User=valkey +Group=valkey +RuntimeDirectory=valkey +RuntimeDirectoryMode=0755 + +# If you need to change max open file limit +# for example, when you change maxclient in configuration +# you can change the LimitNOFILE value below. +# See "man systemd.exec" for more information. +LimitNOFILE=10240 + +# Slave nodes on large system may take lot of time to start. +# You may need to uncomment TimeoutStartSec and TimeoutStopSec +# directives below and raise their value. +# See "man systemd.service" for more information. +#TimeoutStartSec=90s +#TimeoutStopSec=90s + +[Install] +WantedBy=multi-user.target + diff --git a/SPECS/valkey/valkey.logrotate b/SPECS/valkey/valkey.logrotate new file mode 100644 index 00000000..e91fcd36 --- /dev/null +++ b/SPECS/valkey/valkey.logrotate @@ -0,0 +1,9 @@ +/var/log/valkey/*.log { + weekly + rotate 10 + copytruncate + delaycompress + compress + notifempty + missingok +} diff --git a/SPECS/valkey/valkey.service b/SPECS/valkey/valkey.service new file mode 100644 index 00000000..827f5f25 --- /dev/null +++ b/SPECS/valkey/valkey.service @@ -0,0 +1,35 @@ +[Unit] +Description=Valkey persistent key-value database +After=network.target +After=network-online.target +Wants=network-online.target + +[Service] +WorkingDirectory=/var/lib/valkey +# ensure var is set +Environment=OPTIONS= +EnvironmentFile=-/etc/sysconfig/valkey +# we must keep $OPTIONS and the env file as some older installs will still be using /etc/sysconfig/valkey +ExecStart=/usr/bin/valkey-server /etc/valkey/valkey.conf --daemonize no --supervised systemd $OPTIONS +Type=notify +User=valkey +Group=valkey +RuntimeDirectory=valkey +RuntimeDirectoryMode=0755 + +# If you need to change max open file limit +# for example, when you change maxclient in configuration +# you can change the LimitNOFILE value below. +# See "man systemd.exec" for more information. +LimitNOFILE=10240 + +# Slave nodes on large system may take lot of time to start. +# You may need to uncomment TimeoutStartSec and TimeoutStopSec +# directives below and raise their value. +# See "man systemd.service" for more information. +#TimeoutStartSec=90s +#TimeoutStopSec=90s + +[Install] +WantedBy=multi-user.target + diff --git a/SPECS/valkey/valkey.spec b/SPECS/valkey/valkey.spec new file mode 100644 index 00000000..f782e6f7 --- /dev/null +++ b/SPECS/valkey/valkey.spec @@ -0,0 +1,369 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: sunyuechi +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# See https://github.com/valkey-io/valkey-doc/tags +%global doc_version 8.1.1 +# Tests fail in mock, not in local build. +%bcond_with tests + +%bcond docs 0 +%bcond rdma 0 +%global make_flags DEBUG="" V="echo" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=module +Name: valkey +Version: 8.1.4 +Release: %autorelease +Summary: A persistent key-value database +# valkey: BSD-3-Clause +# hiredis: BSD-3-Clause +# hdrhistogram, jemalloc, lzf, linenoise: BSD-2-Clause +# lua: MIT +# fpconv: BSL-1.0 +License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 +URL: https://valkey.io +#!RemoteAsset +Source0: https://github.com/valkey-io/valkey/archive/%{version}/valkey-%{version}.tar.gz +Source1: valkey.logrotate +Source2: valkey-sentinel.service +Source3: valkey.service +Source4: valkey.sysusers +Source5: valkey.tmpfiles +#!RemoteAsset +Source50: https://github.com/valkey-io/valkey-doc/archive/%{doc_version}/valkey-doc-%{doc_version}.tar.gz + +# Fix default paths in configuration files for RPM layout +Patch0: valkey-conf.patch +# Workaround to https://github.com/valkey-io/valkey/issues/2678 +Patch1: valkey-loadmod.patch + +BuildSystem: autotools +BuildOption(build): %{make_flags} +BuildOption(install): %{make_flags} +BuildRequires: make +BuildRequires: gcc +%if %{with tests} +BuildRequires: procps-ng +BuildRequires: tcl +%endif +BuildRequires: pkgconfig(libsystemd) +BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros +BuildRequires: openssl-devel +%if %{with docs} +# for docs/man pages +BuildRequires: pandoc +BuildRequires: python3 +BuildRequires: python3-pyyaml +%endif + +Requires: logrotate +# from deps/hiredis/hiredis.h +Provides: bundled(hiredis) = 1.0.3 +# from deps/jemalloc/VERSION +Provides: bundled(jemalloc) = 5.3.0 +# from deps/lua/src/lua.h +Provides: bundled(lua-libs) = 5.1.5 +# from deps/linenoise/linenoise.h +Provides: bundled(linenoise) = 1.0 +Provides: bundled(lzf) +# from deps/hdr_histogram/README.md +Provides: bundled(hdr_histogram) = 0.11.0 +# no version +Provides: bundled(fpconv) + +%global valkey_modules_abi 1 +%global valkey_modules_dir %{_libdir}/%{name}/modules +%global valkey_modules_cfg %{_sysconfdir}/%{name}/modules +Provides: valkey(modules_abi)%{?_isa} = %{valkey_modules_abi} + +ExcludeArch: %{ix86} + +%description +Valkey is an advanced key-value store. It is often referred to as a data +structure server since keys can contain strings, hashes, lists, sets and +sorted sets. + +You can run atomic operations on these types, like appending to a string; +incrementing the value in a hash; pushing to a list; computing set +intersection, union and difference; or getting the member with highest +ranking in a sorted set. + +In order to achieve its outstanding performance, Valkey works with an +in-memory dataset. Depending on your use case, you can persist it either +by dumping the dataset to disk every once in a while, or by appending +each command to a log. + +Valkey also supports trivial-to-setup master-slave replication, with very +fast non-blocking first synchronization, auto-reconnection on net split +and so forth. + +Other features include Transactions, Pub/Sub, Lua scripting, Keys with a +limited time-to-live, and configuration settings to make Valkey behave like +a cache. + +You can use Valkey from most programming languages also. + +See https://valkey.io/topics/ + +%package devel +Summary: Development header for Valkey module development +Provides: %{name}-static = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Header file required for building loadable Valkey modules. + +%package tls +Summary: TLS module for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Supplements: %{name} + +%description tls +%summary. + +See https://valkey.io/topics/encryption/ + +%package compat-redis +Summary: Conversion script and compatibility symlinks for Redis +Requires: valkey = %{version}-%{release} +Conflicts: redis < 7.4 +BuildArch: noarch + + +%description compat-redis +%summary + + +%package compat-redis-devel +Summary: Compatibility development header for Redis API Valkey modules +Requires: valkey-devel = %{version}-%{release} +Conflicts: redis-devel < 7.4 +Conflicts: redis-static < 7.4 +BuildArch: noarch + + +%description compat-redis-devel +Header file required for building loadable Valkey modules with the legacy +Redis API. + + +%if %{with docs} +%package doc +Summary: Documentation and extra man pages for %{name} +BuildArch: noarch +License: CC-BY-SA-4.0 + + +%description doc +%summary +%endif + + +%prep +# no autosetup due to no support for multiple source extraction +%setup -n %{name}-%{version} -a50 +%patch -P0 -p1 -b .rpm +%patch -P1 -p1 -b .loadmod + +mv deps/lua/COPYRIGHT COPYRIGHT-lua +mv deps/jemalloc/COPYING COPYING-jemalloc +mv deps/hiredis/COPYING COPYING-hiredis-BSD-3-Clause +mv deps/hdr_histogram/LICENSE.txt LICENSE-hdrhistogram +mv deps/hdr_histogram/COPYING.txt COPYING-hdrhistogram +mv deps/fpconv/LICENSE.txt LICENSE-fpconv + +# See https://bugzilla.redhat.com/2240293 +# See https://src.fedoraproject.org/rpms/jemalloc/blob/rawhide/f/jemalloc.spec#_34 +%ifarch x86_64 +sed -e 's/--with-lg-quantum/--with-lg-page=12 --with-lg-quantum/' -i deps/Makefile +%endif + +%conf +# Module API version safety check +api=`sed -n -e 's/#define VALKEYMODULE_APIVER_[0-9][0-9]* //p' src/valkeymodule.h` +if test "$api" != "%{valkey_modules_abi}"; then + : Error: Upstream API version is now ${api}, expecting %%{valkey_modules_abi}. + : Update the valkey_modules_abi macro, and rebuild. + exit 1 +fi + +# Generates macro file +cat << 'EOF' | tee macros.%{name} +%%valkey_version %version +%%valkey_modules_abi %valkey_modules_abi +%%valkey_modules_dir %valkey_modules_dir +%%valkey_modules_cfg %valkey_modules_cfg +EOF + + +: TLS configuration file +cat << EOF | tee tls.conf +# TLS module +loadmodule %{valkey_modules_dir}/tls.so +EOF + + +%build -a + +%if %{with docs} +# docs +pushd %{name}-doc-%{doc_version} +# build man pages +%make_build VALKEY_ROOT=../ +# build html docs +%make_build html VALKEY_ROOT=../ +popd +%endif + + +%install -a +%if %{with docs} +# install docs +pushd %{name}-doc-%{doc_version} +# man pages +%make_install INSTALL_MAN_DIR=%{buildroot}%{_mandir} VALKEY_ROOT=../ +# install html docs +install -d %{buildroot}%{_docdir}/%{name}/ +cp -ra _build/html/* %{buildroot}%{_docdir}/%{name}/ +# install doc license +install -d %{buildroot}%{_defaultlicensedir}/valkey-doc/ +cp -a LICENSE %{buildroot}%{_defaultlicensedir}/valkey-doc/ +popd +%endif + +# remove sample confs +rm -rf %{buildroot}%{_datadir}/%{name} + +# System user +install -p -D -m 0644 %{S:4} %{buildroot}%{_sysusersdir}/%{name}.conf + +# Install tmpfiles.d file +install -p -D -m 0644 %{S:5} %{buildroot}%{_tmpfilesdir}/%{name}.conf + +# Filesystem. +install -d %{buildroot}%{_sharedstatedir}/%{name} +install -d %{buildroot}%{_localstatedir}/log/%{name} +install -d %{buildroot}%{_localstatedir}/run/%{name} +install -d %{buildroot}%{valkey_modules_dir} + +# Install logrotate file. +install -pDm644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} + +# Install configuration files. +install -pDm640 %{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +install -pDm640 sentinel.conf %{buildroot}%{_sysconfdir}/%{name}/sentinel.conf +install -dm750 %{buildroot}%{valkey_modules_cfg} + +# Install systemd unit files. +mkdir -p %{buildroot}%{_unitdir} +install -pm644 %{S:3} %{buildroot}%{_unitdir} +install -pm644 %{S:2} %{buildroot}%{_unitdir} + +# Fix non-standard-executable-perm error. +chmod 755 %{buildroot}%{_bindir}/valkey-* + +# Install valkey module header +install -pDm644 src/valkeymodule.h %{buildroot}%{_includedir}/valkeymodule.h + +# Install rpm macros for valkey modules +#mkdir -p %{buildroot}%{_rpmmacrodir} +install -pDm644 macros.%{name} %{buildroot}%{_rpmmacrodir}/macros.%{name} + +# compat header +install -pDm644 src/redismodule.h %{buildroot}%{_includedir}/redismodule.h + +# compat systemd symlinks +ln -sr %{buildroot}/usr/lib/systemd/system/valkey.service %{buildroot}/usr/lib/systemd/system/redis.service +ln -sr %{buildroot}/usr/lib/systemd/system/valkey-sentinel.service %{buildroot}/usr/lib/systemd/system/redis-sentinel.service + +# TLS module +install -pm755 src/valkey-tls.so %{buildroot}%{valkey_modules_dir}/tls.so +install -pm640 tls.conf %{buildroot}%{valkey_modules_cfg}/tls.conf + + +%check +%if %{with tests} +# https://github.com/redis/redis/issues/1417 (for "taskset -c 1") +taskset -c 1 ./runtest --clients 50 --skiptest "Active defrag - AOF loading" +%endif + + + +%post + +%systemd_post valkey.service +%systemd_post valkey-sentinel.service + + + +%preun +%systemd_preun valkey.service +%systemd_preun valkey-sentinel.service + + +%postun +%systemd_postun_with_restart valkey.service +%systemd_postun_with_restart valkey-sentinel.service + + +%files +%license COPYING +%license COPYRIGHT-lua +%license COPYING-jemalloc +%license LICENSE-hdrhistogram +%license COPYING-hdrhistogram +%license LICENSE-fpconv +%license COPYING-hiredis-BSD-3-Clause +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%attr(0750, valkey, root) %dir %{_sysconfdir}/%{name} +%attr(0750, valkey, root) %dir %{valkey_modules_cfg} +%attr(0640, valkey, root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%attr(0640, valkey, root) %config(noreplace) %{_sysconfdir}/%{name}/sentinel.conf +%dir %{_libdir}/%{name} +%dir %{valkey_modules_dir} +%dir %attr(0750, valkey, valkey) %{_sharedstatedir}/%{name} +%dir %attr(0750, valkey, valkey) %{_localstatedir}/log/%{name} +%{_bindir}/valkey-* +%{_unitdir}/valkey.service +%{_unitdir}/valkey-sentinel.service +%dir %attr(0755, valkey, valkey) %ghost %{_localstatedir}/run/%{name} +%{_sysusersdir}/%{name}.conf +%{_tmpfilesdir}/%{name}.conf +%if %{with docs} +%{_mandir}/man1/valkey*.gz +%{_mandir}/man5/valkey.conf.5.gz +%endif + + +%if %{with docs} +%files doc +%license LICENSE +%doc %{_docdir}/valkey/ +%{_mandir}/man{3,7}/*valkey*.gz +%endif + +%files tls +%attr(0640, valkey, root) %config(noreplace) %{valkey_modules_cfg}/tls.conf +%{valkey_modules_dir}/tls.so + +%files devel +# main package is not required +%license COPYING +%{_includedir}/valkeymodule.h +%{_rpmmacrodir}/macros.%{name} + + +%files compat-redis +%{_bindir}/redis-* +%{_unitdir}/redis.service +%{_unitdir}/redis-sentinel.service + +%files compat-redis-devel +%{_includedir}/redismodule.h + + +%changelog +%{?autochangelog} diff --git a/SPECS/valkey/valkey.sysusers b/SPECS/valkey/valkey.sysusers new file mode 100644 index 00000000..94242f35 --- /dev/null +++ b/SPECS/valkey/valkey.sysusers @@ -0,0 +1 @@ +u valkey - "Valkey Database Server" /dev/null /sbin/nologin diff --git a/SPECS/valkey/valkey.tmpfiles b/SPECS/valkey/valkey.tmpfiles new file mode 100644 index 00000000..2c99bad3 --- /dev/null +++ b/SPECS/valkey/valkey.tmpfiles @@ -0,0 +1,4 @@ +Z /etc/valkey ~0750 valkey root - +D /run/valkey 0755 valkey valkey - +d /var/lib/valkey 0750 valkey valkey - +d /var/log/valkey 0750 valkey valkey - diff --git a/SPECS/vim/vim.spec b/SPECS/vim/vim.spec new file mode 100644 index 00000000..cbe03b38 --- /dev/null +++ b/SPECS/vim/vim.spec @@ -0,0 +1,113 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%define package_version 9.1 +%define patchlevel 1629 + +%define vimdir vim91 + +Name: vim +Version: %{package_version}.%{patchlevel} +Release: %autorelease +Summary: Tools needed to create Texinfo format documentation files +License: Vim AND LGPL-2.1-or-later AND MIT AND GPL-1.0-only AND (GPL-2.0-only OR Vim) AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later AND GPL-3.0-or-later AND OPUBL-1.0 AND Apache-2.0 +URL: https://www.vim.org/ +#!RemoteAsset +Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gettext +BuildRequires: acl-devel +BuildRequires: libtool +BuildRequires: ncurses-devel + +%description +Texinfo is a documentation system that can produce both online +information and printed output from a single source file. The GNU +Project uses the Texinfo file format for most of its documentation. + +Install texinfo if you want a documentation system for producing both +online and print documentation from the same source file and/or if you +are going to write documentation for the GNU Project. + +%package -n xxd +Summary: A hex dump utility + +%description -n xxd +xxd creates a hex dump of a given file or standard input. It can also convert +a hex dump back to its original binary form. + +%install -a +# Remove unecessary duplicate manpages - 251 +rm -rf %{buildroot}%{_mandir}/fr.ISO8859-1/ +rm -rf %{buildroot}%{_mandir}/fr.UTF-8/ +rm -rf %{buildroot}%{_mandir}/pl.ISO8859-2/ +rm -rf %{buildroot}%{_mandir}/pl.UTF-8/ +rm -rf %{buildroot}%{_mandir}/ru.KOI8-R/ +rm -rf %{buildroot}%{_mandir}/it.ISO8859-1/ +rm -rf %{buildroot}%{_mandir}/it.UTF-8/ +rm -rf %{buildroot}%{_mandir}/da.UTF-8/ +rm -rf %{buildroot}%{_mandir}/de.UTF-8/ +rm -rf %{buildroot}%{_mandir}/da.ISO8859-1/ +rm -rf %{buildroot}%{_mandir}/de.ISO8859-1/ +rm -rf %{buildroot}%{_mandir}/tr.ISO8859-9/ +rm -rf %{buildroot}%{_mandir}/tr.UTF-8/ + +%find_lang %{name} --all-name --with-man --generate-subpackages + +%files +%license %{_datadir}/%{name}/%{vimdir}/LICENSE +%doc %{_datadir}/%{name}/%{vimdir}/README.txt +%{_bindir}/vim +%{_bindir}/rvim +%{_bindir}/vimdiff +%{_bindir}/vimtutor +%{_bindir}/ex +%{_bindir}/rview +%{_bindir}/view +%{_datadir}/%{name}/%{vimdir}/autoload +%{_datadir}/%{name}/%{vimdir}/colors +%{_datadir}/%{name}/%{vimdir}/compiler +%{_datadir}/%{name}/%{vimdir}/pack +%{_datadir}/%{name}/%{vimdir}/doc +%{_datadir}/%{name}/%{vimdir}/*.vim +%exclude %{_datadir}/%{name}/%{vimdir}/defaults.vim +%{_datadir}/%{name}/%{vimdir}/ftplugin +%{_datadir}/%{name}/%{vimdir}/import/dist/vimhelp.vim +%{_datadir}/%{name}/%{vimdir}/import/dist/vimhighlight.vim +%{_datadir}/%{name}/%{vimdir}/indent +%{_datadir}/%{name}/%{vimdir}/keymap +%{_datadir}/%{name}/%{vimdir}/lang/*.vim +%{_datadir}/%{name}/%{vimdir}/lang/*.txt +%{_datadir}/%{name}/%{vimdir}/macros +%{_datadir}/%{name}/%{vimdir}/plugin +%{_datadir}/%{name}/%{vimdir}/print +%{_datadir}/%{name}/%{vimdir}/syntax +%{_datadir}/%{name}/%{vimdir}/tutor +%{_datadir}/%{name}/%{vimdir}/spell +%{_datadir}/%{name}/%{vimdir}/tools +%{_mandir}/man1/vim.* +%{_mandir}/man1/ex.* +%{_mandir}/man1/rview.* +%{_mandir}/man1/view.* +%{_mandir}/man1/evim.* +%{_mandir}/man1/rvim.* +%{_mandir}/man1/vimdiff.* +%{_mandir}/man1/vimtutor.* +# If we need GUI then add these back +%exclude %{_datadir}/applications/vim.desktop +%exclude %{_datadir}/applications/gvim.desktop +%exclude %{_datadir}/icons/hicolor/*/apps/gvim.* +%exclude %{_datadir}/icons/locolor/*/apps/gvim.* + +%files -n xxd +%license LICENSE +%{_bindir}/xxd +%{_mandir}/man1/xxd.* + +%changelog +%{?autochangelog} diff --git a/SPECS/virt-what/virt-what.spec b/SPECS/virt-what/virt-what.spec new file mode 100644 index 00000000..7202b274 --- /dev/null +++ b/SPECS/virt-what/virt-what.spec @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: virt-what +Version: 1.27 +Release: %autorelease +Summary: Detect if running in a virtual machine +License: GPL-2.0-or-later +#!RemoteAsset +URL: https://people.redhat.com/~rjones/%{name}/ +#!RemoteAsset +Source: https://people.redhat.com/~rjones/%{name}/files/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: gcc util-linux +BuildRequires: perl +Requires: dmidecode util-linux which + +%description +virt-what is a shell script which can be used to detect if the program +is running in a virtual machine. + + +%ldconfig_scriptlets + +%files +%doc README +%license COPYING +%{_sbindir}/* +%{_libexecdir}/virt-what-cpuid-helper +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/which/which.spec b/SPECS/which/which.spec new file mode 100644 index 00000000..96ac1558 --- /dev/null +++ b/SPECS/which/which.spec @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: which +Version: 2.23 +Release: %autorelease +Summary: Displays where a particular program in your path is located +License: GPL-3.0-or-later +Group: System/Base +URL: https://savannah.gnu.org/projects/which/ +#!RemoteAsset +Source0: https://ftpmirror.gnu.org/gnu/which/which-%{version}.tar.gz +#!RemoteAsset +Source1: https://ftpmirror.gnu.org/gnu/which/which-%{version}.tar.gz.sig +#!RemoteAsset +Source2: https://savannah.gnu.org/people/viewgpg.php?user_id=3639#/which.keyring +Provides: util-linux:%{_bindir}/which +BuildSystem: autotools + +%description +The which command shows the full pathname of a specified program, if the +specified program is in your PATH. + +%files +%license COPYING +%doc EXAMPLES README README.alias AUTHORS NEWS +%{_bindir}/which +%{_infodir}/which.info* +%{_mandir}/man1/which.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/whois/whois.spec b/SPECS/whois/whois.spec new file mode 100644 index 00000000..f9d9e8c3 --- /dev/null +++ b/SPECS/whois/whois.spec @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: whois +Version: 5.6.4 +Release: %autorelease +Summary: Improved WHOIS client +License: GPL-2.0-or-later +URL: https://github.com/rfc1036/whois +#!RemoteAsset +Source0: https://ftp.debian.org/debian/pool/main/w/%{name}/%{name}_%{version}.tar.xz +#!RemoteAsset +Source1: https://ftp.debian.org/debian/pool/main/w/%{name}/%{name}_%{version}.dsc +BuildSystem: autotools + +BuildOption(conf): CONFIG_FILE="%{_sysconfdir}/%{name}.conf" +BuildOption(conf): HAVE_ICONV=1 +BuildOption(conf): CFLAGS="$RPM_OPT_FLAGS" + +BuildRequires: make +BuildRequires: coreutils +BuildRequires: gettext +BuildRequires: perl-macros +BuildRequires: perl-devel +BuildRequires: pkgconfig(libidn2) +BuildRequires: pkgconfig(libxcrypt) + +Requires: bash-completion +Provides: mkpasswd = %{version}-%{release} + +%description +Searches for an object in a RFC 3912 database. + +This version of the WHOIS client tries to guess the right server to ask for +the specified object. If no guess can be made it will connect to +whois.networksolutions.com for NIC handles or whois.arin.net for IPv4 +addresses and network names. + +%prep +%autosetup -p1 -n work + +%conf +# No conf + +%install -a +install -p -m644 -D %{name}.conf %{buildroot}%{_sysconfdir}/%{name}.conf +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +mv %{buildroot}%{_sysconfdir}/bash_completion.d/{mkpasswd,whois} %{buildroot}%{_datadir}/bash-completion/completions + +%find_lang %{name} --generate-subpackages + +# no tests +%check + + +%files +%license COPYING debian/copyright +%doc README debian/changelog +%config(noreplace) %{_sysconfdir}/%{name}.conf +%{_bindir}/%{name} +%{_bindir}/mkpasswd +%{_mandir}/man1/whois.* +%{_mandir}/man1/mkpasswd.* +%{_mandir}/man5/whois.conf.5.* +%{_datadir}/bash-completion/completions/whois +%{_datadir}/bash-completion/completions/mkpasswd + +%changelog +%{?autochangelog} diff --git a/SPECS/woff2/0001-woff2-fix-build-with-gcc15.patch b/SPECS/woff2/0001-woff2-fix-build-with-gcc15.patch new file mode 100644 index 00000000..7ba9eee1 --- /dev/null +++ b/SPECS/woff2/0001-woff2-fix-build-with-gcc15.patch @@ -0,0 +1,37 @@ +From 08ece7871775c0d7bf4fdff64b961cdc256adf6c Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Fri, 2 Aug 2024 22:12:03 +0100 +Subject: [PATCH] include/woff2/output.h: add missing include + +Without the change `woff2` build fails on upcoming `gcc-15` as: + + In file included from src/woff2_out.cc:9: + include/woff2/output.h:73:25: error: expected ')' before '*' token + 73 | WOFF2MemoryOut(uint8_t* buf, size_t buf_size); + | ~ ^ + | ) + include/woff2/output.h:79:3: error: 'uint8_t' does not name a type + 79 | uint8_t* buf_; + | ^~~~~~~ + include/woff2/output.h:16:1: note: 'uint8_t' is defined in header ''; + this is probably fixable by adding '#include ' + 15 | #include + +++ |+#include + 16 | +--- + include/woff2/output.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/woff2/output.h b/include/woff2/output.h +index dc78ccf..b12d538 100644 +--- a/include/woff2/output.h ++++ b/include/woff2/output.h +@@ -9,6 +9,8 @@ + #ifndef WOFF2_WOFF2_OUT_H_ + #define WOFF2_WOFF2_OUT_H_ + ++#include ++ + #include + #include + #include diff --git a/SPECS/woff2/0002-install-executables.patch b/SPECS/woff2/0002-install-executables.patch new file mode 100644 index 00000000..4f5638b4 --- /dev/null +++ b/SPECS/woff2/0002-install-executables.patch @@ -0,0 +1,20 @@ +diff -Nur woff2-1.0.2/CMakeLists.txt new/CMakeLists.txt +--- woff2-1.0.2/CMakeLists.txt 2017-11-13 19:31:28.000000000 +0100 ++++ new/CMakeLists.txt 2023-01-06 12:19:53.666418912 +0100 +@@ -260,12 +260,10 @@ + LIBRARIES woff2enc) + + # Installation +-if (NOT BUILD_SHARED_LIBS) +- install( +- TARGETS woff2_decompress woff2_compress woff2_info +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ) +-endif() ++install( ++ TARGETS woff2_decompress woff2_compress woff2_info ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++) + + install( + TARGETS woff2common woff2dec woff2enc diff --git a/SPECS/woff2/woff2.spec b/SPECS/woff2/woff2.spec new file mode 100644 index 00000000..beac0bab --- /dev/null +++ b/SPECS/woff2/woff2.spec @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: woff2 +Version: 1.0.2 +Release: %autorelease +Summary: Web Open Font Format 2.0 library +License: GPL-3.0-or-later +URL: https://github.com/google/woff2 +#!RemoteAsset +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DCMAKE_SKIP_RPATH=TRUE +BuildOption(conf): -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + +BuildRequires: cmake +BuildRequires: pkgconfig(libbrotlidec) + +# We provide tools! No need for a separate package. +Provides: %{name}-tools + +%patchlist +# https://github.com/google/woff2/pull/176 +0001-woff2-fix-build-with-gcc15.patch +# Install woff tools +0002-install-executables.patch + +%description +Web Open Font Format (WOFF) 2.0 is an update to the existing WOFF 1.0 with +improved compression that is achieved by using the Brotli algorithm. The primary +purpose of the WOFF2 format is to efficiently package fonts linked to Web +documents by means of CSS @font-face rules. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +Development files and utils for %{name} + +%files +%license LICENSE +%{_bindir}/woff2_compress +%{_bindir}/woff2_decompress +%{_bindir}/woff2_info +%{_libdir}/libwoff2common.so.* +%{_libdir}/libwoff2dec.so.* +%{_libdir}/libwoff2enc.so.* + +%files devel +%{_includedir}/woff2 +%{_libdir}/libwoff2common.so +%{_libdir}/libwoff2dec.so +%{_libdir}/libwoff2enc.so +%{_libdir}/pkgconfig/libwoff2common.pc +%{_libdir}/pkgconfig/libwoff2dec.pc +%{_libdir}/pkgconfig/libwoff2enc.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/wolfssl/wolfssl.spec b/SPECS/wolfssl/wolfssl.spec new file mode 100644 index 00000000..5d64d7f8 --- /dev/null +++ b/SPECS/wolfssl/wolfssl.spec @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Julian Zhu +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: wolfssl +Version: 5.8.2 +Release: %autorelease +Summary: wolfSSL Embedded SSL/TLS Library +License: GPLv3+ +URL: https://github.com/wolfSSL/wolfssl +#!RemoteAsset +Source0: https://github.com/wolfssl/wolfssl/archive/refs/tags/v%{version}-stable.tar.gz#/%{name}-%{version}.tar.gz +BuildSystem: autotools + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: glibc + +%description +The wolfSSL library is a small, fast, portable implementation of TLS/SSL +for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3! + +This package contains the shared library. + +%package devel +Summary: Development files for the wolfSSL encryption library + +%description devel +The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight +SSL/TLS library written in ANSI C and targeted for embedded, RTOS, +and resource-constrained environments - primarily because of its small +size, speed, and feature set. It is commonly used in standard operating +environments as well because of its royalty-free pricing and excellent +cross platform support. wolfSSL supports industry standards up to the +current TLS 1.3 and DTLS 1.3, is up to 20 times smaller than OpenSSL, +and offers progressive ciphers such as ChaCha20, Curve25519, Blake2b +and Post-Quantum TLS 1.3 groups. User benchmarking and feedback reports +dramatically better performance when using wolfSSL over OpenSSL. + +%prep -a +./autogen.sh + +%conf +# wolfssl don't support `--disable-rpath` option +%configure \ + --enable-jni \ + --enable-memcached \ + --enable-pkcs11 \ + --disable-asm \ + --disable-crl-monitor \ + --disable-examples \ + --disable-silent-rules + +%check +%make_build check +%make_build tests + +%ldconfig_scriptlets + +%files +%{_bindir}/wolfssl-config +%{_libdir}/libwolfssl.so.44* +%license LICENSING +%doc %{_docdir}/%{name} + +%files devel +%{_includedir}/wolfssl +%{_libdir}/libwolfssl.so +%{_libdir}/pkgconfig/wolfssl.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/wtmpdb/wtmpdb.spec b/SPECS/wtmpdb/wtmpdb.spec new file mode 100644 index 00000000..a8ba1e89 --- /dev/null +++ b/SPECS/wtmpdb/wtmpdb.spec @@ -0,0 +1,102 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: wtmpdb +Version: 0.74.0 +Release: %autorelease +Summary: Database for recording the last logged in users and system reboots +License: BSD-2-Clause +URL: https://github.com/thkukuk/wtmpdb +#!RemoteAsset +Source: https://github.com/thkukuk/wtmpdb/archive/v%{version}/%{name}-v%{version}.tar.gz + +BuildSystem: meson +BuildOption(conf): -Dman=enabled +BuildOption(conf): -Dcompat-symlink=true +BuildOption(conf): -Dwtmpdbd=enabled +BuildOption(check): --no-rebuild + +BuildRequires: docbook-xsl +BuildRequires: meson +BuildRequires: python3 +BuildRequires: pkgconfig +BuildRequires: pkgconfig(audit) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: /usr/bin/xsltproc + +Provides: util-linux:/usr/bin/last + +%description +pam_wtmpdb and wtmpdb are Y2038-safe versions of wtmp and the last +utility. pam_wtmpdb collects all data in a sqlite3 database and the +wtmpdb utility creates boot and shutdown entries or formats and +prints the contents of the wtmp database. + +%package devel +Summary: Development files for libwtmpdb +Requires: %{name} = %{version} + +%description devel +This package contains all necessary include files and libraries +needed to develop applications that needs to read, write or modify +the wtmpdb database. + +%install -a +mkdir -p %{buildroot}%{_mandir}/man1 +ln -sf ../man8/wtmpdb.8 %{buildroot}%{_mandir}/man1/last.1 + +%pre +%service_add_pre wtmpdb-update-boot.service wtmpdb-rotate.timer wtmpdbd.socket + +%preun +%service_del_preun wtmpdb-update-boot.service wtmpdb-rotate.timer wtmpdbd.socket + +%post +%tmpfiles_create wtmpdb.conf +%service_add_post wtmpdb-update-boot.service wtmpdb-rotate.timer wtmpdbd.socket +pam-config -a --wtmpdb --wtmpdb-skip_if=sshd +/sbin/ldconfig + +%postun +if [ "$1" -eq 0 ]; then + pam-config -d --wtmpdb +fi +%service_del_postun_without_restart wtmpdb-update-boot.service +%service_del_postun wtmpdb-rotate.timer wtmpdbd.socket +/sbin/ldconfig + +%files +%license LICENSE +%{_bindir}/last +%{_bindir}/wtmpdb +%{_libexecdir}/wtmpdbd +%{_unitdir}/wtmpdb-update-boot.service +%{_unitdir}/wtmpdb-rotate.service +%{_unitdir}/wtmpdb-rotate.timer +%{_unitdir}/wtmpdbd.service +%{_unitdir}/wtmpdbd.socket +%{_tmpfilesdir}/wtmpdb.conf +%{_pam_moduledir}/pam_wtmpdb.so +%{_libdir}/libwtmpdb.so.* +%ghost %{_localstatedir}/lib/wtmpdb +%{_mandir}/man1/last.1* +%{_mandir}/man8/wtmpdb.8* +%{_mandir}/man8/wtmpdbd.8* +%{_mandir}/man8/wtmpdbd.service.8* +%{_mandir}/man8/wtmpdbd.socket.8* +%{_mandir}/man8/pam_wtmpdb.8* + +%files devel +%{_libdir}/libwtmpdb.so +%{_includedir}/wtmpdb.h +%{_libdir}/pkgconfig/libwtmpdb.pc + +%changelog +%{?autochangelog} + diff --git a/SPECS/xapian/xapian.spec b/SPECS/xapian/xapian.spec new file mode 100644 index 00000000..56fd2f05 --- /dev/null +++ b/SPECS/xapian/xapian.spec @@ -0,0 +1,66 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xapian +Version: 1.4.29 +Release: %autorelease +Summary: An Open Source Probabilistic Information Retrieval Library +License: GPL-2.0-or-later +URL: https://www.xapian.org/ +#!RemoteAsset +Source0: https://oligarchy.co.uk/xapian/%{version}/xapian-core-%{version}.tar.xz + +BuildSystem: autotools + +BuildOption(conf): --disable-static +BuildOption(conf): --disable-rpath +%ifnarch x86_64 +BuildOption(conf): --disable-sse +%endif + +BuildRequires: gcc-c++ libuuid zlib-devel + +%description +Xapian is a highly adaptable toolkit which allows developers to easily add advanced +indexing and search facilities to their own applications. + +%package devel +Summary: Development files for the Xapian library +Requires: %{name} = %{version} +Requires: util-linux-devel +Requires: zlib-devel + +%description devel +This package provides the header files, libraries, and documentation for +developing applications that use the Xapian library. + + +%install -a +find %{buildroot} -type f -name "*.la" -delete -print +# Remove the dev docs, we pick them up below +rm -rf %{buildroot}%{_datadir}/doc/%{name} + +%ldconfig_scriptlets + +%files +%license COPYING +%doc AUTHORS NEWS README +%{_bindir}/* +%{_datadir}/xapian-core +%{_libdir}/libxapian.so.* + +%files devel +%doc HACKING PLATFORMS docs/*html docs/apidoc +%{_libdir}/libxapian.so +%{_libdir}/cmake/xapian +%{_libdir}/pkgconfig/xapian-core.pc +%{_datadir}/aclocal/xapian.m4 +%{_includedir}/xapian* +%{_mandir}/man1/* + +%changelog +%{?autochangelog} diff --git a/SPECS/xcb-proto/xcb-proto.spec b/SPECS/xcb-proto/xcb-proto.spec new file mode 100644 index 00000000..ecbf11ba --- /dev/null +++ b/SPECS/xcb-proto/xcb-proto.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xcb-proto +Version: 1.17.0 +Release: %autorelease +Summary: XCB protocol descriptions +License: X11-distribute-modifications-variant +URL: https://xcb.freedesktop.org/ +#!RemoteAsset +Source0: https://xorg.freedesktop.org/archive/individual/proto/%{name}-%{version}.tar.xz +BuildSystem: autotools +BuildArch: noarch + +# Bit of a hack to get the pc file in /usr/share, so we can be noarch. +BuildOption(conf): --libdir=%{_datadir} + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libxml2 +BuildRequires: make +BuildRequires: python3-devel + +%description +XCB is a project to enable efficient language bindings to the X11 protocol. +This package contains the protocol descriptions themselves. Language +bindings use these protocol descriptions to generate code for marshalling +the protocol. + +%files +%license COPYING +%doc NEWS README.md TODO doc/xml-xcb.txt +%{_datadir}/pkgconfig/xcb-proto.pc +%dir %{_datadir}/xcb/ +%{_datadir}/xcb/*.xsd +%{_datadir}/xcb/*.xml +%{python3_sitelib}/xcbgen + +%changelog +%{?autochangelog} diff --git a/SPECS/xfsprogs/xfsprogs.spec b/SPECS/xfsprogs/xfsprogs.spec new file mode 100644 index 00000000..945835ab --- /dev/null +++ b/SPECS/xfsprogs/xfsprogs.spec @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: laokz +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xfsprogs +Version: 6.16.0 +Release: %autorelease +Summary: Administration and debugging tools for the XFS file system +License: GPL-1.0-or-later AND LGPL-2.1-or-later +URL: https://xfs.wiki.kernel.org +#!RemoteAsset +Source: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz +BuildSystem: autotools + +BuildOption(conf): --enable-editline=yes +BuildOption(conf): --enable-blkid=yes +BuildOption(conf): --enable-lto=no + +BuildOption(install): DIST_ROOT=%{buildroot} +BuildOption(install): PKG_ROOT_SBIN_DIR=%{_sbindir} +BuildOption(install): PKG_ROOT_LIB_DIR=%{_libdir} +BuildOption(install): install-dev + +BuildRequires: libtool attr-devel gcc gettext-devel acl-devel inih-devel userspace-rcu-devel +BuildRequires: libedit-devel util-linux-devel +Requires: libedit +Requires: python3 + +%description +xfsprogs are the userspace utilities that manage XFS filesystems. +This package also includes the experimental xfs_scrub utility. + +%package devel +Summary: Development files for the XFS filesystem library +Requires: xfsprogs = %{version} +Requires: util-linux-devel + +%description devel +This package contains the header files for developing applications +that use the XFS filesystem libraries. + + +%install -a +# remove unused files +find %{buildroot} -type f \( -name "*.a" \) -delete -print +rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/ + +# no check target +%check + +%ldconfig_scriptlets + +%files +%doc doc/CHANGES README +%{_libdir}/lib*.so.* +%{_sbindir}/* +%{_datadir}/xfsprogs/ +%{_datadir}/locale/*/LC_MESSAGES/xfsprogs.mo + +%files devel +%dir %{_includedir}/xfs +%{_includedir}/xfs/*.h +%{_libdir}/lib*.so +%{_mandir}/man*/* + +%changelog +%{?autochangelog} diff --git a/SPECS/xmlto/xmlto.spec b/SPECS/xmlto/xmlto.spec new file mode 100644 index 00000000..b3f85872 --- /dev/null +++ b/SPECS/xmlto/xmlto.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xmlto +Version: 0.0.28 +Release: %autorelease +Summary: Tool for Converting XML Files to Various Formats +License: GPL-2.0-or-later +Group: Productivity/Publishing/XML +URL: https://pagure.io/xmlto/ +#!RemoteAsset +Source: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2 +BuildSystem: autotools + +BuildOption(conf): BASH=/bin/bash + +BuildRequires: autoconf automake +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: libxslt +Requires: libxml2 +Requires: libxslt + +%description +This is a package for converting XML files to various formats using XSL +stylesheets. As a processor it depends on xsltproc and as a formatter +for print output it makes use of passivetex. + +%conf -p +autoreconf -fi +export CFLAGS="%{build_cflags} -Wno-error=implicit-int" + +%install -a +install -d %{buildroot}%{_datadir}/xmlto/xsl +%fdupes %{buildroot}%{_datadir}/xmlto + +%files +%license COPYING +%doc AUTHORS README ChangeLog FAQ THANKS NEWS +%{_bindir}/xmlto +%{_bindir}/xmlif +%{_mandir}/man1/xmlto.1%{?ext_man} +%{_mandir}/man1/xmlif.1%{?ext_man} +%{_datadir}/xmlto + +%changelog +%{?autochangelog} diff --git a/SPECS/xmltoman/xmltoman.spec b/SPECS/xmltoman/xmltoman.spec new file mode 100644 index 00000000..e800ca04 --- /dev/null +++ b/SPECS/xmltoman/xmltoman.spec @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xmltoman +Version: 0.4 +Release: %autorelease +Summary: Scripts to convert XML to man pages or HTML +License: GPL-2.0-only +URL: https://github.com/Distrotech/xmltoman +#!RemoteAsset +Source: https://github.com/Distrotech/xmltoman/archive/refs/tags/%{version}.tar.gz +BuildSystem: autotools + +BuildOption(build): PREFIX="%{_prefix}" +BuildOption(install): PREFIX="%{_prefix}" + +BuildRequires: perl(XML::Parser) +Requires: perl(XML::Parser) +BuildRequires: make + +%description +xmltoman and xmlmantohtml are two very simple scripts for converting XML +to groff (man pages) or HTML. + +# No configure +%conf + +# No tests. +%check + +%files +%license COPYING +%doc ChangeLog README +%{_bindir}/xmlmantohtml +%{_bindir}/xmltoman +%dir %{_datadir}/xmltoman +%{_datadir}/xmltoman/xmltoman.css +%{_datadir}/xmltoman/xmltoman.dtd +%{_datadir}/xmltoman/xmltoman.xsl + +%changelog +%{?autochangelog} diff --git a/SPECS/xorgproto/xorgproto.spec b/SPECS/xorgproto/xorgproto.spec new file mode 100644 index 00000000..79f1f0e5 --- /dev/null +++ b/SPECS/xorgproto/xorgproto.spec @@ -0,0 +1,85 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xorgproto +Version: 2024.1 +Release: %autorelease +Summary: X.Org X11 Protocol headers +License: BSD-2-Clause AND HPND AND HPND-sell-variant AND ICU AND MIT AND MIT-open-group AND SGI-B-2.0 AND SMLNJ AND X11 AND X11-distribute-modifications-variant +URL: https://www.x.org +#!RemoteAsset +Source0: https://www.x.org/pub/individual/proto/xorgproto-%{version}.tar.xz +BuildSystem: meson +BuildArch: noarch + +BuildRequires: pkgconfig +BuildRequires: meson + +%description +X.Org X11 Protocol headers + +%install -a +# remove unused headers and pkgconfig files +for i in apple windows trap; do + rm -f %{buildroot}%{_includedir}/X11/extensions/*${i}* + rm -f %{buildroot}%{_datadir}/pkgconfig/*${i}* +done + +# remove html/svg docs if generated +rm -f %{buildroot}%{_docdir}/*/*.{html,svg} + +%files +%doc COPYING-* +%doc *.txt +%dir %{_includedir}/GL +%{_includedir}/GL/glxint.h +%{_includedir}/GL/glxmd.h +%{_includedir}/GL/glxproto.h +%{_includedir}/GL/glxtokens.h +%dir %{_includedir}/GL/internal +%{_includedir}/GL/internal/glcore.h +%dir %{_includedir}/X11 +%{_includedir}/X11/DECkeysym.h +%{_includedir}/X11/HPkeysym.h +%{_includedir}/X11/Sunkeysym.h +%{_includedir}/X11/X.h +%{_includedir}/X11/XF86keysym.h +%{_includedir}/X11/XWDFile.h +%{_includedir}/X11/Xalloca.h +%{_includedir}/X11/Xarch.h +%{_includedir}/X11/Xatom.h +%{_includedir}/X11/Xdefs.h +%{_includedir}/X11/Xfuncproto.h +%{_includedir}/X11/Xfuncs.h +%{_includedir}/X11/Xmd.h +%{_includedir}/X11/Xos.h +%{_includedir}/X11/Xos_r.h +%{_includedir}/X11/Xosdefs.h +%{_includedir}/X11/Xpoll.h +%{_includedir}/X11/Xproto.h +%{_includedir}/X11/Xprotostr.h +%{_includedir}/X11/Xthreads.h +%{_includedir}/X11/Xw32defs.h +%{_includedir}/X11/Xwindows.h +%{_includedir}/X11/Xwinsock.h +%{_includedir}/X11/ap_keysym.h +%dir %{_includedir}/X11/dri +%{_includedir}/X11/dri/xf86dri.h +%{_includedir}/X11/dri/xf86driproto.h +%{_includedir}/X11/dri/xf86dristr.h +%dir %{_includedir}/X11/extensions +%{_includedir}/X11/extensions/* +%dir %{_includedir}/X11/fonts +%{_includedir}/X11/fonts/* +%{_includedir}/X11/keysym.h +%{_includedir}/X11/keysymdef.h +%{_datadir}/pkgconfig/*.pc +%{_docdir}/xorgproto/* +%dir %{_docdir}/xorgproto/ + +%changelog +%{?autochangelog} diff --git a/SPECS/xtrans/xtrans-1.0.3-avoid-gethostname.patch b/SPECS/xtrans/xtrans-1.0.3-avoid-gethostname.patch new file mode 100644 index 00000000..7b330274 --- /dev/null +++ b/SPECS/xtrans/xtrans-1.0.3-avoid-gethostname.patch @@ -0,0 +1,11 @@ +diff -up xtrans-1.2.7/Xtransutil.c.jx xtrans-1.2.7/Xtransutil.c +--- xtrans-1.2.7/Xtransutil.c.jx 2012-03-22 23:04:35.000000000 -0400 ++++ xtrans-1.2.7/Xtransutil.c 2012-04-09 16:39:29.000000000 -0400 +@@ -255,6 +255,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ci + case AF_UNIX: + { + struct sockaddr_un *saddr = (struct sockaddr_un *) addr; ++ strcpy(hostnamebuf, "unix"); + networkId = malloc (3 + strlen (transName) + + strlen (hostnamebuf) + strlen (saddr->sun_path)); + if (networkId != NULL) diff --git a/SPECS/xtrans/xtrans.spec b/SPECS/xtrans/xtrans.spec new file mode 100644 index 00000000..550ff3c9 --- /dev/null +++ b/SPECS/xtrans/xtrans.spec @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Dingli Zhang +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: xtrans +Version: 1.6.0 +Release: %autorelease +Summary: X.Org X11 developmental X transport library +License: HPND AND HPND-sell-variant AND MIT AND MIT-open-group AND X11 +URL: http://www.x.org +#!RemoteAsset +Source0: https://www.x.org/releases/individual/lib/%{name}-%{version}.tar.xz +BuildSystem: autotools +BuildArch: noarch + +# yes, this looks horrible, but it's to get the .pc file in datadir +BuildOption(conf): --libdir=%{_datadir} +BuildOption(conf): --disable-docs + +Patch0: xtrans-1.0.3-avoid-gethostname.patch + +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: util-macros + +%description +X.Org X11 developmental X transport library + +%files +%license COPYING +%doc AUTHORS ChangeLog README.md doc/*.xml +%dir %{_includedir}/X11 +%{_includedir}/X11/Xtrans +%{_datadir}/aclocal/xtrans.m4 +%{_datadir}/pkgconfig/xtrans.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/xxhash/xxhash-fix-non-x86-dispatch.patch b/SPECS/xxhash/xxhash-fix-non-x86-dispatch.patch new file mode 100644 index 00000000..16f39251 --- /dev/null +++ b/SPECS/xxhash/xxhash-fix-non-x86-dispatch.patch @@ -0,0 +1,2921 @@ +diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml +index d806dff..46c7c1b 100644 +--- a/.github/workflows/ci.yml ++++ b/.github/workflows/ci.yml +@@ -37,15 +37,11 @@ + # elapsed time. + # + # Todos: +-# - [ ] Linux: Add native ARM runner. + # - [ ] Linux: Add native ARM64 runner. + # - [ ] Linux: Add native PPC64LE runner. + # - [ ] Linux: Add native S390X runner. +-# - [ ] Windows: Add VS2013. +-# - [ ] Windows: Add VS2015. + # - [ ] Windows: Add clang for msys2. +-# - [ ] Windows: Add native or emulated ARM runner. +-# - [ ] Windows: Add native or emulated ARM64 runner. ++# - [ ] Windows: Add native or emulated ARM64 runner (note: currently unreliable) + + + # Name of the workflow is also displayed as a SVG badge +@@ -79,26 +75,23 @@ jobs: + + # gcc + { pkgs: '', cc: gcc, cxx: g++, os: ubuntu-latest, }, +- # { pkgs: 'gcc-13 g++-13 lib32gcc-13-dev', cc: gcc-13, cxx: g++-13, os: ubuntu-22.04, }, # currently failing ++ { pkgs: 'gcc-14 g++-14 lib32gcc-14-dev', cc: gcc-14, cxx: g++-14, os: ubuntu-24.04, }, ++ { pkgs: 'gcc-13 g++-13 lib32gcc-13-dev', cc: gcc-13, cxx: g++-13, os: ubuntu-24.04, }, + { pkgs: 'gcc-12 g++-12 lib32gcc-12-dev', cc: gcc-12, cxx: g++-12, os: ubuntu-22.04, }, + { pkgs: 'gcc-11 g++-11 lib32gcc-11-dev', cc: gcc-11, cxx: g++-11, os: ubuntu-22.04, }, + { pkgs: 'gcc-10 g++-10 lib32gcc-10-dev', cc: gcc-10, cxx: g++-10, os: ubuntu-22.04, }, + { pkgs: 'gcc-9 g++-9 lib32gcc-9-dev', cc: gcc-9, cxx: g++-9, os: ubuntu-22.04, }, +- { pkgs: 'gcc-8 g++-8 lib32gcc-8-dev', cc: gcc-8, cxx: g++-8, os: ubuntu-20.04, }, +- { pkgs: 'gcc-7 g++-7 lib32gcc-7-dev', cc: gcc-7, cxx: g++-7, os: ubuntu-20.04, }, + + # clang + { pkgs: '', cc: clang, cxx: clang++, os: ubuntu-latest, }, ++ { pkgs: 'clang-18', cc: clang-18, cxx: clang++-18, os: ubuntu-24.04, }, ++ { pkgs: 'clang-17', cc: clang-17, cxx: clang++-17, os: ubuntu-24.04, }, ++ { pkgs: 'clang-16', cc: clang-16, cxx: clang++-16, os: ubuntu-24.04, }, + { pkgs: 'clang-15', cc: clang-15, cxx: clang++-15, os: ubuntu-22.04, }, + { pkgs: 'clang-14', cc: clang-14, cxx: clang++-14, os: ubuntu-22.04, }, + { pkgs: 'clang-13', cc: clang-13, cxx: clang++-13, os: ubuntu-22.04, }, + { pkgs: 'clang-12', cc: clang-12, cxx: clang++-12, os: ubuntu-22.04, }, + { pkgs: 'clang-11', cc: clang-11, cxx: clang++-11, os: ubuntu-22.04, }, +- { pkgs: 'clang-10', cc: clang-10, cxx: clang++-10, os: ubuntu-20.04, }, +- { pkgs: 'clang-9', cc: clang-9, cxx: clang++-9, os: ubuntu-20.04, }, +- { pkgs: 'clang-8', cc: clang-8, cxx: clang++-8, os: ubuntu-20.04, }, +- { pkgs: 'clang-7', cc: clang-7, cxx: clang++-7, os: ubuntu-20.04, }, +- { pkgs: 'clang-6.0', cc: clang-6.0, cxx: clang++-6.0, os: ubuntu-20.04, }, + ] + + runs-on: ${{ matrix.os }} +@@ -149,17 +142,17 @@ jobs: + run: | + CFLAGS="-Os -DXXH_SIZE_OPT=2 -Wall -Wextra -Werror" make clean xxhsum + +- - name: noxxh3test ++ - name: XXH_NO_XXH3 + if: always() + run: | + # check library can be compiled with XXH_NO_XXH3, resulting in no XXH3_* symbol + make clean noxxh3test + +- - name: nostreamtest ++ - name: XXH_NO_STREAM + if: always() + run: | + # check library can be compiled with XXH_NO_STREAM, resulting in no streaming symbols +- make clean noxxh3test ++ make clean nostreamtest + + - name: make avx512f + run: | +@@ -170,6 +163,11 @@ jobs: + run: | + make clean test-all + ++ - name: test-alias ++ run: | ++ make clean ++ make -C tests test_alias ++ + + ubuntu-consistency: + name: Linux x64 check results consistency +@@ -323,46 +321,77 @@ jobs: + echo && make -v + echo && cat /proc/cpuinfo || echo /proc/cpuinfo is not present + +- - name: cmake ++ - name: Configure, build & stage (CMake) + run: | +- cd cmake_unofficial +- cmake -Bbuild +- cd build +- CFLAGS=-Werror make +- mkdir -p test_install_dir +- DESTDIR=test_install_dir cmake --install . ++ BUILD_DIR="${{ github.workspace }}/cmakebuild" ++ ++ # 1) configure ++ cmake -S build/cmake -B "$BUILD_DIR" \ ++ -DCMAKE_C_FLAGS="-Werror" \ ++ -DCMAKE_INSTALL_PREFIX=/usr # real prefix inside DESTDIR ++ ++ # 2) build (uses default Makefile generator on Linux runners) ++ cmake --build "$BUILD_DIR" --parallel + +- - name: cmake pkgconfig generation ++ # 3) staged install ++ DESTDIR="$BUILD_DIR/stage" cmake --install "$BUILD_DIR" --prefix /usr ++ ++ - name: Generate & validate libxxhash.pc (CMake) + run: | +- cd cmake_unofficial +- pwd +- ls +- rm -rf build +- cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_INCLUDEDIR=/usr/include -DCMAKE_INSTALL_LIBDIR=/usr/lib +- echo "checking content of libxxhash.pc" +- cat build/libxxhash.pc | grep "libdir=/usr/lib" +- cat build/libxxhash.pc | grep "includedir=/usr/include" ++ SRC_DIR=build/cmake ++ BUILD_PKG_DIR="${{ github.workspace }}/cmakebuildpkg" ++ ++ # 1) configure an out‑of‑tree build that writes the .pc file ++ cmake -S "$SRC_DIR" -B "$BUILD_PKG_DIR" \ ++ -DCMAKE_INSTALL_PREFIX=/usr \ ++ -DCMAKE_INSTALL_INCLUDEDIR=/usr/include \ ++ -DCMAKE_INSTALL_LIBDIR=/usr/lib ++ ++ # 2) sanity‑check the resulting pkg‑config file ++ PC_FILE="$BUILD_PKG_DIR/libxxhash.pc" ++ test -f "$PC_FILE" # file exists ++ grep -q '^libdir=/usr/lib$' "$PC_FILE" ++ grep -q '^includedir=/usr/include$' "$PC_FILE" + + - name: cmake minimum version v3.10 test + run: | +- mkdir -p cmake_bins +- cd cmake_bins +- wget https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz +- tar xzf cmake-3.10.0-Linux-x86_64.tar.gz +- cd ../cmake_unofficial +- rm -rf build +- pwd +- ls +- mkdir -p build +- cd build +- ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --version +- ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake .. +- ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --build . +- mkdir -p test_install_dir +- DESTDIR=test_install_dir ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --install . +- rm -rf * +- ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Debug .. +- ../../cmake_bins/cmake-3.10.0-Linux-x86_64/bin/cmake --build . ++ CMAKE_VERSION="3.10.0" ++ CMAKE_MAJOR_MINOR="3.10" ++ BASE_DIR="$(pwd)" ++ DOWNLOAD_DIR="${BASE_DIR}/cmake_download" ++ CMAKE_BIN_DIR="${DOWNLOAD_DIR}/cmake-${CMAKE_VERSION}-Linux-x86_64" ++ CMAKE_BIN="${CMAKE_BIN_DIR}/bin/cmake" ++ BUILD_DIR="${BASE_DIR}/cmake_build" ++ INSTALL_TEST_DIR="${BASE_DIR}/cmake_install_test" ++ ++ # Create necessary directories ++ mkdir -p "${DOWNLOAD_DIR}" "${BUILD_DIR}" "${INSTALL_TEST_DIR}" ++ ++ # Download and extract CMake ++ echo "Downloading CMake ${CMAKE_VERSION}..." ++ wget "https://cmake.org/files/v${CMAKE_MAJOR_MINOR}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" -P "${DOWNLOAD_DIR}" ++ tar xzf "${DOWNLOAD_DIR}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" -C "${DOWNLOAD_DIR}" ++ ++ # Verify CMake version ++ echo "Using CMake version:" ++ "${CMAKE_BIN}" --version ++ ++ # Configure the build ++ echo "Configuring build..." ++ (cd "${BUILD_DIR}" && "${CMAKE_BIN}" "${BASE_DIR}/build/cmake") ++ ++ # Build the project ++ echo "Building project..." ++ "${CMAKE_BIN}" --build "${BUILD_DIR}" ++ ++ # Install to test directory ++ echo "Installing to test directory..." ++ DESTDIR="${INSTALL_TEST_DIR}" "${CMAKE_BIN}" --build "${BUILD_DIR}" --target install ++ ++ echo "Test completed successfully with cmake ${CMAKE_VERSION}" ++ ++ # cleaning ++ rm -rf "${DOWNLOAD_DIR}" "${BUILD_DIR}" "${INSTALL_TEST_DIR}" + + + +@@ -384,33 +413,8 @@ jobs: + { name: 'MIPS', xcc_pkg: gcc-mips-linux-gnu, xcc: mips-linux-gnu-gcc, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static, os: ubuntu-latest, }, + { name: 'M68K', xcc_pkg: gcc-m68k-linux-gnu, xcc: m68k-linux-gnu-gcc, xemu_pkg: qemu-system-m68k, xemu: qemu-m68k-static, os: ubuntu-latest, }, + { name: 'RISC-V', xcc_pkg: gcc-riscv64-linux-gnu, xcc: riscv64-linux-gnu-gcc, xemu_pkg: qemu-system-riscv64,xemu: qemu-riscv64-static, os: ubuntu-latest, }, +- # SPARC64 qemu emulation seems broken on Ubuntu-22 +- { name: 'SPARC', xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu_pkg: qemu-system-sparc, xemu: qemu-sparc64-static, os: ubuntu-20.04, }, +- { name: 'LoongArch', xcc_pkg: gcc-14-loongarch64-linux-gnu, xcc: loongarch64-linux-gnu-gcc-14, xemu_pkg: qemu-system-loongarch64, xemu: qemu-loongarch64-static, os: ubuntu-24.04, }, +- +- { name: 'ARM, gcc-10', xcc_pkg: gcc-10-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc-10, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static, os: ubuntu-20.04, }, +- { name: 'AARCH64, gcc-10', xcc_pkg: gcc-10-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc-10, xemu_pkg: qemu-system-arm, xemu: qemu-aarch64-static, os: ubuntu-20.04, }, +- { name: 'PPC64LE, gcc-10', xcc_pkg: gcc-10-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc-10, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static, os: ubuntu-20.04, }, +- { name: 'PPC64, gcc-10', xcc_pkg: gcc-10-powerpc64-linux-gnu, xcc: powerpc64-linux-gnu-gcc-10, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64-static, os: ubuntu-20.04, }, +- { name: 'S390X, gcc-10', xcc_pkg: gcc-10-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc-10, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static, os: ubuntu-20.04, }, +- { name: 'MIPS, gcc-10', xcc_pkg: gcc-10-mips-linux-gnu, xcc: mips-linux-gnu-gcc-10, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static, os: ubuntu-20.04, }, +- +- { name: 'ARM, gcc-9', xcc_pkg: gcc-9-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc-9, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static, os: ubuntu-20.04, }, +- # SVE tests require at least gcc-10.1 +- # { name: 'AARCH64, gcc-9', xcc_pkg: gcc-9-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc-9, xemu_pkg: qemu-system-arm, xemu: qemu-aarch64-static, os: ubuntu-20.04, }, +- { name: 'PPC64LE, gcc-9', xcc_pkg: gcc-9-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc-9, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static, os: ubuntu-20.04, }, +- { name: 'PPC64, gcc-9', xcc_pkg: gcc-9-powerpc64-linux-gnu, xcc: powerpc64-linux-gnu-gcc-9, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64-static, os: ubuntu-20.04, }, +- { name: 'S390X, gcc-9', xcc_pkg: gcc-9-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc-9, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static, os: ubuntu-20.04, }, +- { name: 'MIPS, gcc-9', xcc_pkg: gcc-9-mips-linux-gnu, xcc: mips-linux-gnu-gcc-9, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static, os: ubuntu-20.04, }, +- +- { name: 'ARM, gcc-8', xcc_pkg: gcc-8-arm-linux-gnueabi, xcc: arm-linux-gnueabi-gcc-8, xemu_pkg: qemu-system-arm, xemu: qemu-arm-static, os: ubuntu-20.04, }, +- # aarch64-linux-gnu-gcc-8 linker has an issue for LDFLAGS="-static" +- # { name: 'AARCH64, gcc-8', xcc_pkg: gcc-8-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc-8, xemu_pkg: qemu-system-arm, xemu: qemu-aarch64-static, os: ubuntu-20.04, }, +- { name: 'PPC64LE, gcc-8', xcc_pkg: gcc-8-powerpc64le-linux-gnu, xcc: powerpc64le-linux-gnu-gcc-8, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64le-static, os: ubuntu-20.04, }, +- { name: 'PPC64, gcc-8', xcc_pkg: gcc-8-powerpc64-linux-gnu, xcc: powerpc64-linux-gnu-gcc-8, xemu_pkg: qemu-system-ppc, xemu: qemu-ppc64-static, os: ubuntu-20.04, }, +- { name: 'S390X, gcc-8', xcc_pkg: gcc-8-s390x-linux-gnu, xcc: s390x-linux-gnu-gcc-8, xemu_pkg: qemu-system-s390x, xemu: qemu-s390x-static, os: ubuntu-20.04, }, +- # ubuntu-20.04 fails to retrieve gcc-8-mips-linux-gnu for some reason. +- # { name: 'MIPS, gcc-8', xcc_pkg: gcc-8-mips-linux-gnu, xcc: mips-linux-gnu-gcc-8, xemu_pkg: qemu-system-mips, xemu: qemu-mips-static, os: ubuntu-20.04, }, ++ { name: 'SPARC', xcc_pkg: gcc-sparc64-linux-gnu, xcc: sparc64-linux-gnu-gcc, xemu_pkg: qemu-system-sparc, xemu: qemu-sparc64-static, os: ubuntu-latest, }, ++ { name: 'LoongArch', xcc_pkg: gcc-14-loongarch64-linux-gnu, xcc: loongarch64-linux-gnu-gcc-14, xemu_pkg: qemu-system-loongarch64, xemu: qemu-loongarch64-static, os: ubuntu-24.04, }, + ] + env: # Set environment variables + XCC: ${{ matrix.xcc }} +@@ -470,11 +474,19 @@ jobs: + CPPFLAGS="-DXXH_VECTOR=XXH_SCALAR" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + CPPFLAGS=-DXXH_VECTOR=XXH_VSX CFLAGS="-O3 -march=arch11 -mzvector" LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make clean check + +- - name: MIPS-M68K-RISCV-SPARC (XXH_VECTOR=[ scalar ]) +- if: ${{ startsWith(matrix.name, 'MIPS') || startsWith(matrix.name, 'M68K') || startsWith(matrix.name, 'RISC-V') || startsWith(matrix.name, 'SPARC') }} ++ - name: MIPS-M68K-SPARC (XXH_VECTOR=[ scalar ]) ++ if: ${{ startsWith(matrix.name, 'MIPS') || startsWith(matrix.name, 'M68K') || startsWith(matrix.name, 'SPARC') }} + run: | + make clean; LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make check + ++ - name: RISCV (XXH_VECTOR=[scalar, rvv]) ++ if: ${{startsWith(matrix.name, 'RISC-V')}} ++ run: | ++ make clean; LDFLAGS="-static" CC=$XCC RUN_ENV=$XEMU make check ++ CPPFLAGS="-march=rv64gcv -O2 -DXXH_VECTOR=XXH_RVV" LDFLAGS="-static" CC=$XCC RUN_ENV="$XEMU -cpu rv64,v=true,vlen=128,rvv_ta_all_1s=on,rvv_ma_all_1s=on" make clean check ++ CPPFLAGS="-march=rv64gcv -O2 -DXXH_VECTOR=XXH_RVV" LDFLAGS="-static" CC=$XCC RUN_ENV="$XEMU -cpu rv64,v=true,vlen=256,rvv_ta_all_1s=on,rvv_ma_all_1s=on" make clean check ++ CPPFLAGS="-march=rv64gcv -O2 -DXXH_VECTOR=XXH_RVV" LDFLAGS="-static" CC=$XCC RUN_ENV="$XEMU -cpu rv64,v=true,vlen=512,rvv_ta_all_1s=on,rvv_ma_all_1s=on" make clean check ++ + - name: LoongArch (XXH_VECTOR=[ scalar, LSX ]) + if: ${{ startsWith(matrix.name, 'LoongArch') }} + run: | +@@ -527,65 +539,81 @@ jobs: + windows-visualc-general: + name: ${{ matrix.system.vc }}, ${{ matrix.arch }} + runs-on: ${{ matrix.system.os }} # Runs-on foreach value of strategy.matrix.system.os ++ env: ++ SRC_DIR: build/cmake + strategy: + fail-fast: false # 'false' means: Don't stop matrix workflows even if some matrix failed. + matrix: + system: [ + { os: windows-2022, vc: "VC++ 2022", clangcl: 'true', }, +- { os: windows-2019, vc: "VC++ 2019", clangcl: 'true', }, + ] + arch: [ x64, Win32, ARM64 ] ++ # make every PowerShell step start with `$ErrorActionPreference = 'Stop'` ++ defaults: ++ run: ++ shell: pwsh -NoLogo -NoProfile -Command "$ErrorActionPreference='Stop'; $PSNativeCommandUseErrorActionPreference=$true; & {0}" + + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Build ${{ matrix.system.os }}, ${{ matrix.arch }} + run: | +- cd cmake_unofficial +- mkdir build +- cd build +- cmake .. -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.arch }} -DCMAKE_C_FLAGS="/W4 /WX" +- cmake --build . --config Release ++ $BUILD_DIR = "$env:GITHUB_WORKSPACE\cmake_visual_${{ matrix.arch }}" ++ $INSTALL_DIR = "C:/install" ++ ++ cmake -S $env:SRC_DIR -B $BUILD_DIR ` ++ -A "${{ matrix.arch }}" ` ++ -DCMAKE_C_FLAGS="/W4 /WX" + +- - name: Test ++ cmake --build $BUILD_DIR --config Release --parallel ++ cmake --install $BUILD_DIR --config Release --prefix $INSTALL_DIR ++ ++ - name: Test produced binary + # Run benchmark for testing only if target arch is x64 or Win32. + if: ${{ matrix.arch == 'x64' || matrix.arch == 'Win32' }} + run: | +- .\cmake_unofficial\build\Release\xxhsum.exe -bi1 ++ C:\install\bin\xxhsum.exe -bi1 ++ + + - name: Build ${{ matrix.system.os }}, ${{ matrix.arch }}, with DISPATCH + # DISPATCH only if target arch is x64 or Win32. + if: ${{ ( matrix.arch == 'x64' || matrix.arch == 'Win32' ) }} + run: | +- cd cmake_unofficial +- mkdir build-visual-dispatch +- cd build-visual-dispatch +- cmake .. -DCMAKE_BUILD_TYPE=Release -DDISPATCH=ON -A x64 -DCMAKE_C_FLAGS="/W4 /WX" +- cmake --build . --config Release ++ $BUILD_DIR = "$env:GITHUB_WORKSPACE\cmake_visual_dispatch_${{ matrix.arch }}" ++ $INSTALL_DIR = "C:/install_dispatch" + +- - name: Runtime Test (DISPATCH) +- # Run benchmark for testing only if target arch is x64 or Win32. +- if: ${{ ( matrix.arch == 'x64' || matrix.arch == 'Win32' ) }} +- run: | +- .\cmake_unofficial\build-visual-dispatch\Release\xxhsum.exe -V | grep autoVec +- .\cmake_unofficial\build-visual-dispatch\Release\xxhsum.exe -bi1 ++ cmake -S $env:SRC_DIR -B $BUILD_DIR ` ++ -A "${{ matrix.arch }}" ` ++ -DDISPATCH=ON ` ++ -DCMAKE_C_FLAGS="/W4 /WX" ++ ++ cmake --build $BUILD_DIR --config Release --parallel ++ cmake --install $BUILD_DIR --config Release --prefix $INSTALL_DIR ++ ++ # Runtime test bundled, this they have same $arch conditions ++ $exe = "$INSTALL_DIR\bin\xxhsum.exe" ++ & "$exe" -V | Select-String autoVec # PowerShell’s ‘grep’ ++ & "$exe" -bi1 + + + - name: Build ${{ matrix.system.os }}, clang-cl, ${{ matrix.arch }} + if: ${{ matrix.system.clangcl == 'true' }} + run: | +- cd cmake_unofficial +- mkdir build-clang-cl +- cd build-clang-cl +- cmake .. -DCMAKE_BUILD_TYPE=Release -A x64 -DCMAKE_GENERATOR_TOOLSET=ClangCL +- cmake --build . --config Release ++ $BUILD_DIR = "$env:GITHUB_WORKSPACE\cmake_visual_cl_${{ matrix.arch }}" ++ ++ cmake -S $env:SRC_DIR -B $BUILD_DIR ` ++ -A "${{ matrix.arch }}" ` ++ -DCMAKE_GENERATOR_TOOLSET=ClangCL ` ++ -DCMAKE_C_FLAGS="/W4 /WX" ++ ++ cmake --build $BUILD_DIR --config Release --parallel ++ cmake --install $BUILD_DIR --config Release --prefix "C:/install_cl" + + - name: Test (clang-cl) + # Run benchmark for testing only if target arch is x64 or Win32. + if: ${{ matrix.system.clangcl == 'true' && ( matrix.arch == 'x64' || matrix.arch == 'Win32' ) }} + run: | +- .\cmake_unofficial\build-clang-cl\Release\xxhsum.exe -bi1 +- ++ C:\install_cl\bin\xxhsum.exe -bi1 + + + # Windows, { mingw64, mingw32 } +diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml +index c44e0b2..fd50bdd 100644 +--- a/.github/workflows/scorecard.yml ++++ b/.github/workflows/scorecard.yml +@@ -37,7 +37,7 @@ jobs: + persist-credentials: false + + - name: "Run analysis" +- uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 ++ uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2 + with: + results_file: results.sarif + results_format: sarif +@@ -59,7 +59,7 @@ jobs: + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" +- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 ++ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + with: + name: SARIF file + path: results.sarif +diff --git a/.gitignore b/.gitignore +index b88c1cc..d0661ef 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -21,6 +21,7 @@ dispatch + tests/generate_unicode_test + tests/sanity_test + tests/sanity_test_vectors_generator ++tests/test_alias + fuzzer + + # Mac OS-X artefacts +@@ -32,8 +33,10 @@ fuzzer + *.wasm + *.js + +-# CMake build directories +-build*/ ++# build artifacts ++cachedObjs/ ++cmakebuild/ ++ + + # project managers artifacts + .projectile +diff --git a/Doxyfile b/Doxyfile +index a2597db..d25dd1e 100644 +--- a/Doxyfile ++++ b/Doxyfile +@@ -2,7 +2,7 @@ + DOXYFILE_ENCODING = UTF-8 + + PROJECT_NAME = "xxHash" +-PROJECT_NUMBER = "0.8.2" ++PROJECT_NUMBER = "0.8.3" + PROJECT_BRIEF = "Extremely fast non-cryptographic hash function" + OUTPUT_DIRECTORY = doxygen + OUTPUT_LANGUAGE = English +diff --git a/Makefile b/Makefile +index 5b7b8ff..a9fa95a 100644 +--- a/Makefile ++++ b/Makefile +@@ -24,7 +24,6 @@ + # ################################################################ + # xxhsum: provides 32/64 bits hash of one or multiple files, or stdin + # ################################################################ +-Q = $(if $(filter 1,$(V) $(VERBOSE)),,@) + + # Version numbers + SED ?= sed +@@ -37,6 +36,7 @@ LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT)) + LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) + LIBVER := $(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH) + ++MAKEFLAGS += --no-print-directory + CFLAGS ?= -O3 + DEBUGFLAGS+=-Wall -Wextra -Wconversion -Wcast-qual -Wcast-align -Wshadow \ + -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \ +@@ -46,7 +46,6 @@ DEBUGFLAGS+=-Wall -Wextra -Wconversion -Wcast-qual -Wcast-align -Wshadow \ + CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) + FLAGS = $(CFLAGS) $(CPPFLAGS) + XXHSUM_VERSION = $(LIBVER) +-UNAME := $(shell uname) + + # Define *.exe as extension for Windows systems + ifneq (,$(filter Windows%,$(OS))) +@@ -60,6 +59,11 @@ detect_x86_arch = $(shell $(CC) -dumpmachine | grep -E 'i[3-6]86|x86_64') + ifneq ($(strip $(call detect_x86_arch)),) + #note: can be overridden at compile time, by setting DISPATCH=0 + DISPATCH ?= 1 ++else ++ ifeq ($(DISPATCH),1) ++ $(info "Note: DISPATCH=1 is only supported on x86/x64 targets") ++ endif ++ override DISPATCH := 0 + endif + + ifeq ($(NODE_JS),1) +@@ -71,6 +75,7 @@ endif + + # OS X linker doesn't support -soname, and use different extension + # see: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html ++UNAME ?= $(shell uname) + ifeq ($(UNAME), Darwin) + SHARED_EXT = dylib + SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT) +@@ -85,114 +90,102 @@ endif + + LIBXXH = libxxhash.$(SHARED_EXT_VER) + +-XXHSUM_SRC_DIR = cli +-XXHSUM_SPLIT_SRCS = $(XXHSUM_SRC_DIR)/xxhsum.c \ +- $(XXHSUM_SRC_DIR)/xsum_os_specific.c \ +- $(XXHSUM_SRC_DIR)/xsum_arch.c \ +- $(XXHSUM_SRC_DIR)/xsum_output.c \ +- $(XXHSUM_SRC_DIR)/xsum_sanity_check.c \ +- $(XXHSUM_SRC_DIR)/xsum_bench.c +-XXHSUM_SPLIT_OBJS = $(XXHSUM_SPLIT_SRCS:.c=.o) +-XXHSUM_HEADERS = $(XXHSUM_SRC_DIR)/xsum_config.h \ +- $(XXHSUM_SRC_DIR)/xsum_arch.h \ +- $(XXHSUM_SRC_DIR)/xsum_os_specific.h \ +- $(XXHSUM_SRC_DIR)/xsum_output.h \ +- $(XXHSUM_SRC_DIR)/xsum_sanity_check.h \ +- $(XXHSUM_SRC_DIR)/xsum_bench.h ++CLI_DIR = cli ++CLI_SRCS = $(wildcard $(CLI_DIR)/*.c) ++CLI_OBJS = $(CLI_SRCS:.c=.o) + ++## define default before including multiconf.make + ## generate CLI and libraries in release mode (default for `make`) + .PHONY: default + default: DEBUGFLAGS= + default: lib xxhsum_and_links + ++C_SRCDIRS = . $(CLI_DIR) fuzz ++include build/make/multiconf.make ++ + .PHONY: all + all: lib xxhsum xxhsum_inlinedXXH + + ## xxhsum is the command line interface (CLI) + ifeq ($(DISPATCH),1) + xxhsum: CPPFLAGS += -DXXHSUM_DISPATCH=1 +-xxhsum: xxh_x86dispatch.o ++XXHSUM_ADD_O = xxh_x86dispatch.o + endif +-xxhsum: xxhash.o $(XXHSUM_SPLIT_OBJS) +- $(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT) +- +-xxhsum32: CFLAGS += -m32 ## generate CLI in 32-bits mode +-xxhsum32: xxhash.c $(XXHSUM_SPLIT_SRCS) ## do not generate object (avoid mixing different ABI) +- $(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT) +- +-## dispatch only works for x86/x64 systems +-dispatch: CPPFLAGS += -DXXHSUM_DISPATCH=1 +-dispatch: xxhash.o xxh_x86dispatch.o $(XXHSUM_SPLIT_SRCS) +- $(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT) +- +-xxhash.o: xxhash.c xxhash.h +-xxhsum.o: $(XXHSUM_SRC_DIR)/xxhsum.c $(XXHSUM_HEADERS) \ +- xxhash.h xxh_x86dispatch.h +-xxh_x86dispatch.o: xxh_x86dispatch.c xxh_x86dispatch.h xxhash.h ++$(eval $(call c_program,xxhsum,xxhash.o $(CLI_OBJS) $(XXHSUM_ADD_O))) + + .PHONY: xxhsum_and_links + xxhsum_and_links: xxhsum xxh32sum xxh64sum xxh128sum xxh3sum + ++LN ?= ln ++ + xxh32sum xxh64sum xxh128sum xxh3sum: xxhsum +- ln -sf $<$(EXT) $@$(EXT) ++ $(LN) -sf $<$(EXT) $@$(EXT) ++ ++## generate CLI in 32-bits mode ++xxhsum32: CFLAGS += -m32 ++ifeq ($(DISPATCH),1) ++xxhsum32: CPPFLAGS += -DXXHSUM_DISPATCH=1 ++endif ++$(eval $(call c_program,xxhsum32,xxhash.o $(CLI_OBJS) $(XXHSUM_ADD_O))) ++ ++## Warning: dispatch only works for x86/x64 systems ++dispatch: CPPFLAGS += -DXXHSUM_DISPATCH=1 ++$(eval $(call c_program,dispatch,xxhash.o xxh_x86dispatch.o $(CLI_OBJS))) + + xxhsum_inlinedXXH: CPPFLAGS += -DXXH_INLINE_ALL +-xxhsum_inlinedXXH: $(XXHSUM_SPLIT_SRCS) +- $(CC) $(FLAGS) $< -o $@$(EXT) ++$(eval $(call c_program,xxhsum_inlinedXXH,$(CLI_OBJS))) + + ++# ================================================= + # library + +-libxxhash.a: ARFLAGS = rcs +-libxxhash.a: xxhash.o +- $(AR) $(ARFLAGS) $@ $^ ++libxxhash.a: ++$(eval $(call static_library,libxxhash.a,xxhash.o)) + +-$(LIBXXH): LDFLAGS += -shared ++$(LIBXXH): LDFLAGS += $(SONAME_FLAGS) + ifeq (,$(filter Windows%,$(OS))) + $(LIBXXH): CFLAGS += -fPIC + endif +-ifeq ($(LIBXXH_DISPATCH),1) +-$(LIBXXH): xxh_x86dispatch.c +-endif +-$(LIBXXH): xxhash.c +- $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ +- ln -sf $@ libxxhash.$(SHARED_EXT_MAJOR) +- ln -sf $@ libxxhash.$(SHARED_EXT) ++LIBXXHASH_OBJS := xxhash.o $(if $(filter 1,$(LIBXXH_DISPATCH)),xxh_x86dispatch.o) ++$(eval $(call c_dynamic_library,$(LIBXXH),$(LIBXXHASH_OBJS))) + +-.PHONY: libxxhash +-libxxhash: ## generate dynamic xxhash library +-libxxhash: $(LIBXXH) ++libxxhash.$(SHARED_EXT_MAJOR): $(LIBXXH) ++ $(LN) -sf $< $@ + +-.PHONY: lib +-lib: ## generate static and dynamic xxhash libraries ++libxxhash.$(SHARED_EXT): libxxhash.$(SHARED_EXT_MAJOR) ++ $(LN) -sf $< $@ ++ ++.PHONY: libxxhash ## generate dynamic xxhash library ++libxxhash: $(LIBXXH) libxxhash.$(SHARED_EXT_MAJOR) libxxhash.$(SHARED_EXT) ++ ++.PHONY: lib ## generate static and dynamic xxhash libraries + lib: libxxhash.a libxxhash + ++ + # helper targets + +-AWK = awk +-GREP = grep +-SORT = sort +-NM = nm ++AWK ?= awk ++GREP ?= grep ++SORT ?= sort ++NM ?= nm + + .PHONY: list + list: ## list all Makefile targets +- $(Q)$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | $(AWK) -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | $(SORT) | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs ++ $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | $(AWK) -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | $(SORT) | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs + + .PHONY: help + help: ## list documented targets +- $(Q)$(GREP) -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ ++ $(GREP) -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ + $(SORT) | \ + $(AWK) 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + + .PHONY: clean +-clean: ## remove all build artifacts +- $(Q)$(RM) -r *.dSYM # Mac OS-X specific +- $(Q)$(RM) core *.o *.obj *.$(SHARED_EXT) *.$(SHARED_EXT).* *.a libxxhash.pc +- $(Q)$(RM) xxhsum$(EXT) xxhsum32$(EXT) xxhsum_inlinedXXH$(EXT) dispatch$(EXT) +- $(Q)$(RM) xxhsum.wasm xxhsum.js xxhsum.html +- $(Q)$(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT) xxh3sum$(EXT) +- $(Q)$(RM) fuzzer +- $(Q)$(RM) $(XXHSUM_SRC_DIR)/*.o $(XXHSUM_SRC_DIR)/*.obj ++clean: ++ $(RM) -r *.dSYM # Mac OS-X specific ++ $(RM) core *.o *.obj *.$(SHARED_EXT) *.$(SHARED_EXT).* *.a libxxhash.pc ++ $(RM) xxhsum.wasm xxhsum.js xxhsum.html ++ $(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT) xxh3sum$(EXT) ++ $(RM) fuzzer + $(MAKE) -C tests clean + $(MAKE) -C tests/bench clean + $(MAKE) -C tests/collisions clean +@@ -329,11 +322,12 @@ test-xxhsum-c: xxhsum + cat .test.filenames | $(RUN_ENV) ./xxhsum$(EXT) --filelist + @$(RM) .test.* + +-LIB_FUZZING_ENGINE?="-fsanitize=fuzzer" +-CC_VERSION := $(shell $(CC) --version) ++CC_VERSION := $(shell $(CC) --version 2>/dev/null) + ifneq (,$(findstring clang,$(CC_VERSION))) +-fuzzer: libxxhash.a fuzz/fuzzer.c +- $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -I. -o fuzzer fuzz/fuzzer.c -L. -Wl,-Bstatic -lxxhash -Wl,-Bdynamic ++fuzzer: CFLAGS += -fsanitize=fuzzer ++$(eval $(call c_program,fuzzer, fuzz/fuzzer.o xxhash.o)) ++else ++fuzzer: this_target_requires_clang # intentional fail + endif + + .PHONY: test-filename-escape +@@ -349,22 +343,27 @@ test-cli-ignore-missing: + $(MAKE) -C tests test_cli_ignore_missing + + .PHONY: armtest +-armtest: clean ++armtest: + @echo ---- test ARM compilation ---- + CC=arm-linux-gnueabi-gcc MOREFLAGS="-Werror -static" $(MAKE) xxhsum + ++.PHONY: arm64test ++arm64test: ++ @echo ---- test ARM64 compilation ---- ++ CC=aarch64-linux-gnu-gcc MOREFLAGS="-Werror -static" $(MAKE) xxhsum ++ + .PHONY: clangtest +-clangtest: clean ++clangtest: + @echo ---- test clang compilation ---- + CC=clang MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion" $(MAKE) all + + .PHONY: gcc-og-test +-gcc-og-test: clean ++gcc-og-test: + @echo ---- test gcc -Og compilation ---- + CFLAGS="-Og -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC" CPPFLAGS="-DXXH_NO_INLINE_HINTS" MOREFLAGS="-Werror" $(MAKE) all + + .PHONY: cxxtest +-cxxtest: clean ++cxxtest: + @echo ---- test C++ compilation ---- + CC="$(CXX) -Wno-deprecated" $(MAKE) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC" + +@@ -420,7 +419,6 @@ usan: CC=clang + usan: CXX=clang++ + usan: ## check CLI runtime for undefined behavior, using clang's sanitizer + @echo ---- check undefined behavior - sanitize ---- +- $(MAKE) clean + $(MAKE) test CC=$(CC) CXX=$(CXX) MOREFLAGS="-g -fsanitize=undefined -fno-sanitize-recover=all" + + .PHONY: staticAnalyze +@@ -439,13 +437,13 @@ cppcheck: ## check C source files using $(CPPCHECK) static analyzer + namespaceTest: ## ensure XXH_NAMESPACE redefines all public symbols + $(CC) -c xxhash.c + $(CC) -DXXH_NAMESPACE=TEST_ -c xxhash.c -o xxhash2.o +- $(CC) xxhash.o xxhash2.o $(XXHSUM_SPLIT_SRCS) -o xxhsum2 # will fail if one namespace missing (symbol collision) ++ $(CC) xxhash.o xxhash2.o $(CLI_SRCS) -o xxhsum2 # will fail if one namespace missing (symbol collision) + $(RM) *.o xxhsum2 # clean + +-MAN = $(XXHSUM_SRC_DIR)/xxhsum.1 ++MAN = $(CLI_DIR)/xxhsum.1 + MD2ROFF ?= ronn + MD2ROFF_FLAGS ?= --roff --warnings --manual="User Commands" --organization="xxhsum $(XXHSUM_VERSION)" +-$(MAN): $(XXHSUM_SRC_DIR)/xxhsum.1.md xxhash.h ++$(MAN): $(CLI_DIR)/xxhsum.1.md xxhash.h + cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@ + + .PHONY: man +@@ -530,7 +528,7 @@ listL120: # extract lines >= 120 characters in *.{c,h}, by Takayuki Matsuoka (n + + .PHONY: trailingWhitespace + trailingWhitespace: +- ! $(GREP) -E "`printf '[ \\t]$$'`" cli/*.c cli/*.h cli/*.1 *.c *.h LICENSE Makefile cmake_unofficial/CMakeLists.txt ++ ! $(GREP) -E "`printf '[ \\t]$$'`" cli/*.c cli/*.h cli/*.1 *.c *.h LICENSE Makefile build/cmake/CMakeLists.txt + + .PHONY: lint-unicode + lint-unicode: +@@ -565,7 +563,7 @@ else + PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig + endif + +-ifneq (,$(filter $(UNAME),OpenBSD FreeBSD NetBSD DragonFly SunOS)) ++ifneq (,$(filter $(UNAME),OpenBSD NetBSD DragonFly SunOS)) + MANDIR ?= $(PREFIX)/man/man1 + else + MANDIR ?= $(man1dir) +@@ -608,7 +606,7 @@ endif + + libxxhash.pc: libxxhash.pc.in + @echo creating pkgconfig +- $(Q)$(SED) $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \ ++ $(SED) $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \ + -e 's|@EXECPREFIX@|$(PCEXECDIR)|' \ + -e 's|@LIBDIR@|$$\{exec_prefix\}/$(PCLIBDIR)|' \ + -e 's|@INCLUDEDIR@|$$\{prefix\}/$(PCINCDIR)|' \ +@@ -618,46 +616,46 @@ libxxhash.pc: libxxhash.pc.in + + install_libxxhash.a: libxxhash.a + @echo Installing libxxhash.a +- $(Q)$(MAKE_DIR) $(DESTDIR)$(LIBDIR) +- $(Q)$(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR) ++ $(MAKE_DIR) $(DESTDIR)$(LIBDIR) ++ $(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR) + + install_libxxhash: libxxhash + @echo Installing libxxhash +- $(Q)$(MAKE_DIR) $(DESTDIR)$(LIBDIR) +- $(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR) +- $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) +- $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) ++ $(MAKE_DIR) $(DESTDIR)$(LIBDIR) ++ $(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR) ++ ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) ++ ln -sf libxxhash.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) + + install_libxxhash.includes: +- $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR) # includes +- $(Q)$(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR) +- $(Q)$(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0 ++ $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR) # includes ++ $(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0 + ifeq ($(LIBXXH_DISPATCH),1) +- $(Q)$(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR) + endif + + install_libxxhash.pc: libxxhash.pc + @echo Installing pkgconfig +- $(Q)$(MAKE_DIR) $(DESTDIR)$(PKGCONFIGDIR)/ +- $(Q)$(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/ ++ $(MAKE_DIR) $(DESTDIR)$(PKGCONFIGDIR)/ ++ $(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/ + + install_xxhsum: xxhsum + @echo Installing xxhsum +- $(Q)$(MAKE_DIR) $(DESTDIR)$(BINDIR)/ +- $(Q)$(INSTALL_PROGRAM) xxhsum $(DESTDIR)$(BINDIR)/xxhsum +- $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh32sum +- $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh64sum +- $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh128sum +- $(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh3sum ++ $(MAKE_DIR) $(DESTDIR)$(BINDIR)/ ++ $(INSTALL_PROGRAM) xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxhsum$(EXT) ++ ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh32sum$(EXT) ++ ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh64sum$(EXT) ++ ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh128sum$(EXT) ++ ln -sf xxhsum$(EXT) $(DESTDIR)$(BINDIR)/xxh3sum$(EXT) + + install_man: + @echo Installing man pages +- $(Q)$(MAKE_DIR) $(DESTDIR)$(MANDIR)/ +- $(Q)$(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1 +- $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1 +- $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1 +- $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1 +- $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh3sum.1 ++ $(MAKE_DIR) $(DESTDIR)$(MANDIR)/ ++ $(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1 ++ ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh32sum.1 ++ ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh64sum.1 ++ ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1 ++ ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh3sum.1 + + .PHONY: install + ## install libraries, CLI, links and man pages +@@ -666,24 +664,24 @@ install: install_libxxhash.a install_libxxhash install_libxxhash.includes instal + + .PHONY: uninstall + uninstall: ## uninstall libraries, CLI, links and man page +- $(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.a +- $(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) +- $(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) +- $(Q)$(RM) $(DESTDIR)$(LIBDIR)/$(LIBXXH) +- $(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxhash.h +- $(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxh3.h +- $(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxh_x86dispatch.h +- $(Q)$(RM) $(DESTDIR)$(PKGCONFIGDIR)/libxxhash.pc +- $(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh32sum +- $(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh64sum +- $(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh128sum +- $(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh3sum +- $(Q)$(RM) $(DESTDIR)$(BINDIR)/xxhsum +- $(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh32sum.1 +- $(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh64sum.1 +- $(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh128sum.1 +- $(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh3sum.1 +- $(Q)$(RM) $(DESTDIR)$(MANDIR)/xxhsum.1 ++ $(RM) $(DESTDIR)$(LIBDIR)/libxxhash.a ++ $(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT) ++ $(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) ++ $(RM) $(DESTDIR)$(LIBDIR)/$(LIBXXH) ++ $(RM) $(DESTDIR)$(INCLUDEDIR)/xxhash.h ++ $(RM) $(DESTDIR)$(INCLUDEDIR)/xxh3.h ++ $(RM) $(DESTDIR)$(INCLUDEDIR)/xxh_x86dispatch.h ++ $(RM) $(DESTDIR)$(PKGCONFIGDIR)/libxxhash.pc ++ $(RM) $(DESTDIR)$(BINDIR)/xxh32sum ++ $(RM) $(DESTDIR)$(BINDIR)/xxh64sum ++ $(RM) $(DESTDIR)$(BINDIR)/xxh128sum ++ $(RM) $(DESTDIR)$(BINDIR)/xxh3sum ++ $(RM) $(DESTDIR)$(BINDIR)/xxhsum ++ $(RM) $(DESTDIR)$(MANDIR)/xxh32sum.1 ++ $(RM) $(DESTDIR)$(MANDIR)/xxh64sum.1 ++ $(RM) $(DESTDIR)$(MANDIR)/xxh128sum.1 ++ $(RM) $(DESTDIR)$(MANDIR)/xxh3sum.1 ++ $(RM) $(DESTDIR)$(MANDIR)/xxhsum.1 + @echo xxhsum successfully uninstalled + + endif +diff --git a/README.md b/README.md +index a634d1a..d376ba2 100644 +--- a/README.md ++++ b/README.md +@@ -141,6 +141,9 @@ The following macros can be set at compilation time to modify `libxxhash`'s beha + But one-shot hashing (like `XXH32()`) or streaming using statically allocated states + still work as expected. + This build flag is useful for embedded environments without dynamic allocation. ++- `XXH_memcpy`, `XXH_memset`, `XXH_memcmp` : redirect `memcpy()`, `memset()` and `memcmp()` to some user-selected symbol at compile time. ++ Redirecting all 3 removes the need to include `` standard library. ++- `XXH_NO_EXTERNC_GUARD`: When `xxhash.h` is compiled in C++ mode, removes the `extern "C" { .. }` block guard. + - `XXH_DEBUGLEVEL` : When set to any value >= 1, enables `assert()` statements. + This (slightly) slows down execution, but may help finding bugs during debugging sessions. + +@@ -167,11 +170,13 @@ The following macros can be set at compilation time to modify `libxxhash`'s beha + - `XXH_PREFETCH_DIST` : select prefetching distance. For close-to-metal adaptation to specific hardware platforms. XXH3 only. + - `XXH_NO_PREFETCH` : disable prefetching. Some platforms or situations may perform better without prefetching. XXH3 only. + ++#### Build modifiers for `xxhsum` CLI ++- `XXH_1ST_SPEED_TARGET` : select an initial speed target, expressed in MB/s, for the first speed test in benchmark mode. Benchmark will adjust the target at subsequent iterations, but the first test is made "blindly" by targeting this speed. Currently conservatively set to 10 MB/s, to support very slow (emulated) platforms. ++ + #### Makefile variables + When compiling the Command Line Interface `xxhsum` using `make`, the following environment variables can also be set : + - `DISPATCH=1` : use `xxh_x86dispatch.c`, select at runtime between `scalar`, `sse2`, `avx2` or `avx512` instruction set. This option is only valid for `x86`/`x64` systems. It is enabled by default when target `x86`/`x64` is detected. It can be forcefully turned off using `DISPATCH=0`. + - `LIBXXH_DISPATCH=1` : same idea, implemented a runtime vector extension detector, but within `libxxhash`. This parameter is disabled by default. When enabled (only valid for `x86`/`x64` systems), new symbols published in `xxh_x86dispatch.h` become accessible. At the time of this writing, it's required to include `xxh_x86dispatch.h` in order to access the symbols with runtime vector extension detection. +-- `XXH_1ST_SPEED_TARGET` : select an initial speed target, expressed in MB/s, for the first speed test in benchmark mode. Benchmark will adjust the target at subsequent iterations, but the first test is made "blindly" by targeting this speed. Currently conservatively set to 10 MB/s, to support very slow (emulated) platforms. + - `NODE_JS=1` : When compiling `xxhsum` for Node.js with Emscripten, this links the `NODERAWFS` library for unrestricted filesystem access and patches `isatty` to make the command line utility correctly detect the terminal. This does make the binary specific to Node.js. + + ### Building xxHash - Using vcpkg +diff --git a/appveyor.yml b/appveyor.yml +index 7aef900..3ea35a1 100644 +--- a/appveyor.yml ++++ b/appveyor.yml +@@ -1,115 +1,147 @@ +-#---------------------------------# +-# general configuration # +-#---------------------------------# ++# ============================================================================== ++# AppVeyor CI Configuration ++# ============================================================================== ++ + version: 1.0.{build} + max_jobs: 2 +- +-#---------------------------------# +-# environment configuration # +-#---------------------------------# + clone_depth: 2 ++ ++# ============================================================================== ++# Build Matrix ++# ============================================================================== ++ + environment: + matrix: +- - COMPILER: "visual" +- ARCH: "x64" +- TEST_XXHSUM: "true" +- - COMPILER: "visual" +- ARCH: "Win32" +- TEST_XXHSUM: "true" +- - COMPILER: "visual" +- ARCH: "Win32" +- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 +- TEST_XXHSUM: "true" +- - COMPILER: "visual" +- ARCH: "ARM" +-# Below tests are now disabled due to redundancy. +-# Their equivalent already runs correctly on Github Actions. +-# - COMPILER: "visual" +-# ARCH: "x64" +-# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 +-# TEST_XXHSUM: "true" +-# - COMPILER: "visual" +-# ARCH: "ARM64" +-# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 +-# # note: ARM64 is not available with Visual Studio 14 2015, which is default for Appveyor +- +-# The following tests were also flacky on Appveyor, for various reasons. +-# - COMPILER: "gcc" +-# PLATFORM: "mingw64" +-# - COMPILER: "gcc" +-# PLATFORM: "mingw32" +-# - COMPILER: "gcc" +-# PLATFORM: "clang" +- +-install: +- - ECHO Installing %COMPILER% %PLATFORM% %ARCH% +- - MKDIR bin +- - if [%COMPILER%]==[gcc] SET PATH_ORIGINAL=%PATH% +- - if [%COMPILER%]==[gcc] ( +- SET "PATH_MINGW32=c:\MinGW\bin;c:\MinGW\usr\bin" && +- SET "PATH_MINGW64=c:\msys64\mingw64\bin;c:\msys64\usr\bin" && +- COPY C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe && +- COPY C:\MinGW\bin\gcc.exe C:\MinGW\bin\cc.exe +- ) +- +-#---------------------------------# +-# build configuration # +-#---------------------------------# ++ # Visual Studio 2017 build (not supported by GitHub Actions) - both Win32 and x64 ++ - COMPILER: "visual" ++ ARCHS: "Win32,x64" ++ AVX2: "true" ++ APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017" ++ TEST_XXHSUM: "true" ++ ++ # Visual Studio 2019 build (no longer supported by GitHub Actions) - Win32 and x64 ++ - COMPILER: "visual" ++ ARCHS: "Win32,x64" ++ AVX2: "true" ++ APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2019" ++ TEST_XXHSUM: "true" ++ ++ # ARM build (no testing - cannot run on x86/x64 CI) ++ - COMPILER: "visual" ++ ARCHS: "ARM" ++ AVX2: "false" ++ TEST_XXHSUM: "false" ++ ++# ============================================================================== ++# Build Scripts ++# ============================================================================== ++ + build_script: +- - if [%PLATFORM%]==[mingw32] SET PATH=%PATH_MINGW32%;%PATH_ORIGINAL% +- - if [%PLATFORM%]==[mingw64] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL% +- - if [%PLATFORM%]==[clang] SET PATH=%PATH_MINGW64%;%PATH_ORIGINAL% +- - ECHO *** +- - ECHO Building %COMPILER% %PLATFORM% %ARCH% +- - ECHO *** +- +- - if [%COMPILER%]==[gcc] ( +- if [%PLATFORM%]==[clang] ( +- clang -v +- ) ELSE ( +- gcc -v +- ) +- ) +- - if [%COMPILER%]==[gcc] ( +- echo ----- && +- make -v && +- echo ----- && +- if not [%PLATFORM%]==[clang] ( +- if [%PLATFORM%]==[mingw32] ( SET CPPFLAGS=-DPOOL_MT=0 ) && +- make -B clean test MOREFLAGS=-Werror +- ) ELSE ( +- SET CXXFLAGS=--std=c++14 && +- make -B clean test CC=clang CXX=clang++ MOREFLAGS="--target=x86_64-w64-mingw32 -Werror -Wno-pass-failed" NO_C90_TEST=true +- ) && +- make -C tests/bench +- ) +- # note 1: strict c90 tests with clang fail, due to (erroneous) presence on `inline` keyword in some included system file +- # note 2: multi-threading code doesn't work with mingw32, disabled through POOL_MT=0 +- # note 3: clang requires C++14 to compile sort because its own code contains c++14-only code +- +- - if [%COMPILER%]==[visual] ( +- cd cmake_unofficial && +- cmake . -DCMAKE_BUILD_TYPE=Release -A %ARCH% -DXXHASH_C_FLAGS="/WX" && +- cmake --build . --config Release +- ) +- +-#---------------------------------# +-# tests configuration # +-#---------------------------------# ++ - echo "========================================" ++ - echo "Building Visual Studio configurations" ++ - echo "========================================" ++ ++ # Visual Studio build process ++ - ps: | ++ Set-Location "build/cmake" ++ ++ # Split architectures and build each one ++ $architectures = $env:ARCHS -split "," ++ ++ foreach ($arch in $architectures) { ++ $arch = $arch.Trim() ++ Write-Host "========================================" ++ Write-Host "Building for architecture: $arch" ++ Write-Host "========================================" ++ ++ # Create architecture-specific build directory ++ $buildDir = "build_$arch" ++ New-Item -Path $buildDir -ItemType Directory -Force | Out-Null ++ Set-Location $buildDir ++ ++ # Configure CMake for this architecture with fast Debug builds ++ cmake .. -A $arch -DXXHASH_C_FLAGS="/W4 /WX" -DCMAKE_C_FLAGS_DEBUG="/Od /Zi /MDd" ++ ++ # Build Debug configuration (fast compilation, no optimizations) ++ Write-Host "Building Debug configuration for $arch..." ++ cmake --build . --config Debug ++ ++ # Build Debug with SSE2 if Win32 (x64 has SSE2 by default, ARM doesn't support it) ++ if ($arch -eq "Win32") { ++ Write-Host "Building Debug configuration with SSE2 for $arch..." ++ cmake .. -A $arch -DXXHASH_C_FLAGS="/W4 /WX /arch:SSE2" -DCMAKE_C_FLAGS_DEBUG="/Od /Zi /MDd" ++ cmake --build . --config Debug ++ } ++ ++ # Build Debug with AVX2 if enabled and supported ++ if ($env:AVX2 -eq "true" -and $arch -ne "ARM") { ++ Write-Host "Building Debug configuration with AVX2 for $arch..." ++ cmake .. -A $arch -DXXHASH_C_FLAGS="/W4 /WX /arch:AVX2" -DCMAKE_C_FLAGS_DEBUG="/Od /Zi /MDd" ++ cmake --build . --config Debug ++ } ++ ++ # Build Release configuration ++ Write-Host "Building Release configuration for $arch..." ++ cmake --build . --config Release ++ ++ # Go back to cmake directory for next architecture ++ Set-Location .. ++ } ++ ++# ============================================================================== ++# Test Scripts ++# ============================================================================== ++ + test_script: +- # note: can only run x86 and x64 binaries on Appveyor +- # note: if %COMPILER%==gcc, xxhsum was already tested within `make test` +- - if [%TEST_XXHSUM%]==[true] ( +- ECHO *** && +- ECHO Testing %COMPILER% %PLATFORM% %ARCH% && +- ECHO *** && +- cd Release && +- xxhsum.exe -bi1 && +- ECHO ------- xxhsum tested ------- +- ) +- +- +-#---------------------------------# +-# artifacts configuration # +-#---------------------------------# +-# none yet ++ # Test xxhsum Release binaries (only for x86/x64 architectures that can run on CI) ++ - ps: | ++ if ($env:TEST_XXHSUM -eq "true") { ++ Set-Location "build/cmake" ++ ++ # Split architectures and test each one ++ $architectures = $env:ARCHS -split "," ++ ++ foreach ($arch in $architectures) { ++ $arch = $arch.Trim() ++ ++ # Only test architectures that can run on CI (x86/x64) ++ if ($arch -eq "ARM") { ++ Write-Host "Skipping testing for $arch (cannot run on x86/x64 CI)" ++ continue ++ } ++ ++ Write-Host "========================================" ++ Write-Host "Testing Visual Studio $arch" ++ Write-Host "========================================" ++ ++ Set-Location "build_$arch" ++ ++ # Test Release configuration only ++ Write-Host "Testing Release binary for $arch..." ++ Set-Location "Release" ++ cmd /c "xxhsum.exe -b99i0" ++ if ($LASTEXITCODE -ne 0) { ++ Write-Host "Release xxhsum.exe failed for $arch with exit code $LASTEXITCODE" ++ exit 1 ++ } ++ Write-Host "Release binary test completed successfully for $arch" ++ ++ # Go back to cmake directory for next architecture ++ Set-Location "../.." ++ } ++ ++ Write-Host "------- All xxhsum testing completed successfully -------" ++ } ++ ++# ============================================================================== ++# Artifacts ++# ============================================================================== ++# Currently no artifacts are collected ++# Future: Consider collecting built binaries for distribution ++ ++# ============================================================================== ++# Build Notes ++# ============================================================================== ++# 1. ARM/ARM64 builds cannot be tested on x86/x64 CI infrastructure ++# 2. AppVeyor focuses on legacy Visual Studio versions (2013, 2015, 2017) ++# 3. Modern Visual Studio versions (2019, 2022) are tested on GitHub Actions +diff --git a/cmake_unofficial/.gitignore b/build/cmake/.gitignore +similarity index 94% +rename from cmake_unofficial/.gitignore +rename to build/cmake/.gitignore +index 93d9fe4..7c0faa2 100644 +--- a/cmake_unofficial/.gitignore ++++ b/build/cmake/.gitignore +@@ -5,6 +5,8 @@ CMakeFiles + Makefile + cmake_install.cmake + ++build ++ + + # make compilation results + +diff --git a/cmake_unofficial/CMakeLists.txt b/build/cmake/CMakeLists.txt +similarity index 99% +rename from cmake_unofficial/CMakeLists.txt +rename to build/cmake/CMakeLists.txt +index 89242ec..9fdccb2 100644 +--- a/cmake_unofficial/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -7,7 +7,7 @@ + + cmake_minimum_required (VERSION 3.10 FATAL_ERROR) + +-set(XXHASH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") ++set(XXHASH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") + + file(STRINGS "${XXHASH_DIR}/xxhash.h" XXHASH_VERSION_MAJOR REGEX "^#define XXH_VERSION_MAJOR +([0-9]+) *$") + string(REGEX REPLACE "^#define XXH_VERSION_MAJOR +([0-9]+) *$" "\\1" XXHASH_VERSION_MAJOR "${XXHASH_VERSION_MAJOR}") +diff --git a/cmake_unofficial/JoinPaths.cmake b/build/cmake/JoinPaths.cmake +similarity index 100% +rename from cmake_unofficial/JoinPaths.cmake +rename to build/cmake/JoinPaths.cmake +diff --git a/build/cmake/README.md b/build/cmake/README.md +new file mode 100644 +index 0000000..871c894 +--- /dev/null ++++ b/build/cmake/README.md +@@ -0,0 +1,54 @@ ++ ++# xxHash CMake Integration ++ ++This document explains how to integrate xxHash into your CMake project. Choose the method that best fits your needs. ++ ++## Method 1: Install and Import (Recommended) ++ ++**Best for:** Projects that want to use xxHash as a system-wide library. ++ ++### Step 1: Build and Install xxHash ++ ++```bash ++cd /path/to/xxHash ++cmake -S build/cmake -B cmake_build ++cmake --build cmake_build --parallel ++cmake --install cmake_build ++``` ++ ++### Step 2: Use in Your Project ++ ++Add to your `CMakeLists.txt`: ++ ++```cmake ++find_package(xxHash 0.8 CONFIG REQUIRED) ++target_link_libraries(YourTarget PRIVATE xxHash::xxhash) ++``` ++ ++### Build Options ++ ++Configure the build with these options: ++ ++- `-DXXHASH_BUILD_XXHSUM=OFF` - Skip building the command line tool (default: ON) ++- `-DBUILD_SHARED_LIBS=OFF` - Build static library instead of shared (default: ON) ++- `-DCMAKE_INSTALL_PREFIX=/custom/path` - Install to custom location ++- `-DDISPATCH=OFF` - Disable CPU dispatch optimization (default: ON for x64) ++ ++## Method 2: Add as Subdirectory ++ ++**Best for:** Projects that want to bundle xxHash directly without system installation. ++ ++Add to your `CMakeLists.txt`: ++ ++```cmake ++# Optional: Configure xxHash before adding ++set(XXHASH_BUILD_XXHSUM OFF) # Don't build command line tool ++option(BUILD_SHARED_LIBS OFF) # Build static library ++ ++# Add xxHash to your project ++add_subdirectory(path/to/xxHash/build/cmake xxhash_build EXCLUDE_FROM_ALL) ++ ++# Link to your target ++target_link_libraries(YourTarget PRIVATE xxHash::xxhash) ++``` ++ +diff --git a/cmake_unofficial/xxHashConfig.cmake.in b/build/cmake/xxHashConfig.cmake.in +similarity index 100% +rename from cmake_unofficial/xxHashConfig.cmake.in +rename to build/cmake/xxHashConfig.cmake.in +diff --git a/build/make/README.md b/build/make/README.md +new file mode 100644 +index 0000000..fe4a177 +--- /dev/null ++++ b/build/make/README.md +@@ -0,0 +1,71 @@ ++# multiconf.make ++ ++**multiconf.make** is a self-contained Makefile include that lets you build the **same targets under many different flag sets**. For example debug vs release, ASan vs UBSan, GCC vs Clang. ++Each different set of flags generates object files into its own **dedicated cache directory**, so objects compiled with one configuration are never reused by another. ++Object files from previous configurations are preserved, so swapping back to a previous configuration only requires compiling objects which have actually changed. ++ ++--- ++ ++## Benefits at a glance ++ ++| Benefit | What `multiconf.make` does | ++| --- | --- | ++| **Isolated configs** | Stores objects into `cachedObjs//`, one directory per unique flag set. | ++| **Fast switching** | Reusing an old config is instant—link only, no recompilation. | ++| **Header deps** | Edits to headers trigger only needed rebuilds. | ++| **One-liner targets** | Macros (`c_program`, `cxx_program`, …) hide all rule boilerplate. | ++| **Parallel-ready** | Safe with `make -j`, no duplicate compiles of shared sources. | ++| **Controlled verbosity** | Default only lists objects, while `V=1` display full commands. | ++| **`clean` included** | `make clean` deletes all objects, binaries and links. | ++ ++--- ++ ++## Quick Start ++ ++### 1 · List your sources ++ ++```make ++C_SRCDIRS := src src/cdeps # all .c are in these directories ++CXX_SRCDIRS := src src/cxxdeps # all .cpp are in these directories ++``` ++ ++### 2 · Add and include ++ ++```make ++# root/Makefile ++include multiconf.make ++``` ++ ++### 3 · Declare targets ++ ++```make ++app: ++$(eval $(call c_program,app,app.o cdeps/obj.o)) ++ ++test: ++$(eval $(call cxx_program,test, test.o cxxdeps/objcxx.o)) ++ ++lib.a: ++$(eval $(call static_library,lib.a, lib.o cdeps/obj.o)) ++ ++lib.so: ++$(eval $(call c_dynamic_library,lib.so, lib.o cdeps/obj.o)) ++``` ++ ++### 4 · Build any config you like ++ ++```sh ++# Release with GCC ++make CFLAGS="-O3" ++ ++# Debug with Clang + AddressSanitizer (new cache dir) ++make CC=clang CFLAGS="-g -O0 -fsanitize=address" ++ ++# Switch back to GCC release (objects still valid, relink only) ++make CFLAGS="-O3" ++``` ++ ++Objects for each command live in different sub-folders; nothing overlaps. ++ ++--- ++ +diff --git a/build/make/multiconf.make b/build/make/multiconf.make +new file mode 100644 +index 0000000..3b7419c +--- /dev/null ++++ b/build/make/multiconf.make +@@ -0,0 +1,293 @@ ++# ########################################################################## ++# multiconf.make ++# Copyright (C) Yann Collet ++# ++# GPL v2 License ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# 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, write to the Free Software Foundation, Inc., ++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++# ++# ########################################################################## ++ ++ ++# Provides c_program(_shared_o) and cxx_program(_shared_o) target generation macros ++# Provides static_library and c_dynamic_library target generation macros ++# Support recompilation of only impacted units when an associated *.h is updated. ++# Provides V=1 / VERBOSE=1 support. V=2 is used for debugging purposes. ++# Complement target clean: delete objects and binaries created by this script ++ ++# Requires: ++# - C_SRCDIRS, CXX_SRCDIRS, ASM_SRCDIRS defined ++# OR ++# C_SRCS, CXX_SRCS and ASM_SRCS variables defined ++# *and* vpath set to find all source files ++# OR ++# C_OBJS, CXX_OBJS and ASM_OBJS variables defined ++# *and* vpath set to find all source files ++# - directory `cachedObjs/` available to cache object files. ++# alternatively: set CACHE_ROOT to some different value. ++# Optional: ++# - HASH can be set to a different custom hash program. ++ ++# *_program*: generates a recipe for a target that will be built in a cache directory. ++# The cache directory is automatically derived from CACHE_ROOT and list of flags and compilers. ++# *_shared_o* variants are optional optimization variants, that share the same objects across multiple targets. ++# However, as a consequence, all these objects must have exactly the same list of flags, ++# which in practice means that there must be no target-level modification (like: target: CFLAGS += someFlag). ++# If unsure, only use the standard variants, c_program and cxx_program. ++ ++# All *_program* macro functions take up to 4 argument: ++# - The name of the target ++# - The list of object files to build in the cache directory ++# - An optional list of dependencies for linking, that will not be built ++# - An optional complementary recipe code, that will run after compilation and link ++ ++ ++# Silent mode is default; use V = 1 or VERBOSE = 1 to see compilation lines ++VERBOSE ?= $(V) ++$(VERBOSE).SILENT: ++ ++# Directory where object files will be built ++CACHE_ROOT ?= cachedObjs ++ ++# -------------------------------------------------------------------------------------------- ++ ++# Dependency management ++DEPFLAGS = -MT $@ -MMD -MP -MF ++ ++# Include dependency files ++include $(wildcard $(CACHE_ROOT)/**/*.d) ++include $(wildcard $(CACHE_ROOT)/generic/*/*.d) ++ ++# -------------------------------------------------------------------------------------------- ++ ++# Automatic determination of build artifacts cache directory, keyed on build ++# flags, so that we can do incremental, parallel builds of different binaries ++# with different build flags without collisions. ++ ++UNAME ?= $(shell uname) ++ifeq ($(UNAME), Darwin) ++ HASH ?= md5 ++else ifeq ($(UNAME), FreeBSD) ++ HASH ?= gmd5sum ++else ifeq ($(UNAME), OpenBSD) ++ HASH ?= md5 ++endif ++HASH ?= md5sum ++ ++HAVE_HASH := $(shell echo 1 | $(HASH) > /dev/null && echo 1 || echo 0) ++ifeq ($(HAVE_HASH),0) ++ $(info warning : could not find HASH ($(HASH)), required to differentiate builds using different flags) ++ HASH_FUNC = generic/$(1) ++else ++ HASH_FUNC = $(firstword $(shell echo $(2) | $(HASH) )) ++endif ++ ++ ++MKDIR ?= mkdir ++LN ?= ln ++ ++# -------------------------------------------------------------------------------------------- ++# The following macros are used to create object files in the cache directory. ++# The object files are named after the source file, but with a different path. ++ ++# Create build directories on-demand. ++# ++# For some reason, make treats the directory as an intermediate file and tries ++# to delete it. So we work around that by marking it "precious". Solution found ++# here: ++# http://ismail.badawi.io/blog/2017/03/28/automatic-directory-creation-in-make/ ++.PRECIOUS: $(CACHE_ROOT)/%/. ++$(CACHE_ROOT)/%/. : ++ $(MKDIR) -p $@ ++ ++ ++define addTargetAsmObject # targetName, addlDeps ++$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2)))) ++ ++.PRECIOUS: $$(CACHE_ROOT)/%/$(1) ++$$(CACHE_ROOT)/%/$(1) : $(1:.o=.S) $(2) | $$(CACHE_ROOT)/%/. ++ @echo AS $$@ ++ $$(CC) $$(CPPFLAGS) $$(CXXFLAGS) $$(DEPFLAGS) $$(CACHE_ROOT)/$$*/$(1:.o=.d) -c $$< -o $$@ ++ ++endef # addTargetAsmObject ++ ++define addTargetCObject # targetName, addlDeps ++$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2)))) #debug print ++ ++.PRECIOUS: $$(CACHE_ROOT)/%/$(1) ++$$(CACHE_ROOT)/%/$(1) : $(1:.o=.c) $(2) | $$(CACHE_ROOT)/%/. ++ @echo CC $$@ ++ $$(CC) $$(CPPFLAGS) $$(CFLAGS) $$(DEPFLAGS) $$(CACHE_ROOT)/$$*/$(1:.o=.d) -c $$< -o $$@ ++ ++endef # addTargetCObject ++ ++define addTargetCxxObject # targetName, suffix, addlDeps ++$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3)))) ++ ++.PRECIOUS: $$(CACHE_ROOT)/%/$(1) ++$$(CACHE_ROOT)/%/$(1) : $(1:.o=.$(2)) $(3) | $$(CACHE_ROOT)/%/. ++ @echo CXX $$@ ++ $$(CXX) $$(CPPFLAGS) $$(CXXFLAGS) $$(DEPFLAGS) $$(CACHE_ROOT)/$$*/$(1:.o=.d) -c $$< -o $$@ ++ ++endef # addTargetCxxObject ++ ++# Create targets for individual object files ++C_SRCDIRS += . ++vpath %.c $(C_SRCDIRS) ++CXX_SRCDIRS += . ++vpath %.cpp $(CXX_SRCDIRS) ++vpath %.cc $(CXX_SRCDIRS) ++ASM_SRCDIRS += . ++vpath %.S $(ASM_SRCDIRS) ++ ++# If C_SRCDIRS, CXX_SRCDIRS and ASM_SRCDIRS are not defined, use C_SRCS, CXX_SRCS and ASM_SRCS ++C_SRCS ?= $(notdir $(foreach dir,$(C_SRCDIRS),$(wildcard $(dir)/*.c))) ++CPP_SRCS ?= $(notdir $(foreach dir,$(CXX_SRCDIRS),$(wildcard $(dir)/*.cpp))) ++CC_SRCS ?= $(notdir $(foreach dir,$(CXX_SRCDIRS),$(wildcard $(dir)/*.cc))) ++CXX_SRCS ?= $(CPP_SRCS) $(CC_SRCS) ++ASM_SRCS ?= $(notdir $(foreach dir,$(ASM_SRCDIRS),$(wildcard $(dir)/*.S))) ++ ++# If C_SRCS, CXX_SRCS and ASM_SRCS are not defined, use C_OBJS, CXX_OBJS and ASM_OBJS ++C_OBJS ?= $(patsubst %.c,%.o,$(C_SRCS)) ++CPP_OBJS ?= $(patsubst %.cpp,%.o,$(CPP_SRCS)) ++CC_OBJS ?= $(patsubst %.cc,%.o,$(CC_SRCS)) ++CXX_OBJS ?= $(CPP_OBJS) $(CC_OBJS) # Note: not used ++ASM_OBJS ?= $(patsubst %.S,%.o,$(ASM_SRCS)) ++ ++$(foreach OBJ,$(C_OBJS),$(eval $(call addTargetCObject,$(OBJ)))) ++$(foreach OBJ,$(CPP_OBJS),$(eval $(call addTargetCxxObject,$(OBJ),cpp))) ++$(foreach OBJ,$(CC_OBJS),$(eval $(call addTargetCxxObject,$(OBJ),cc))) ++$(foreach OBJ,$(ASM_OBJS),$(eval $(call addTargetAsmObject,$(OBJ)))) ++ ++# -------------------------------------------------------------------------------------------- ++# The following macros are used to create targets in the user Makefile. ++# Binaries are built in the cache directory, and then symlinked to the current directory. ++# The cache directory is automatically derived from CACHE_ROOT and list of flags and compilers. ++ ++ ++# static_library - Create build rules for a static library with caching ++# Parameters: ++# 1. libName - Library name (becomes output file and phony target) ++# 2. objectDeps - Object file dependencies (will be built in cache path) ++# The following parameters are all optional: ++# 3. extraDeps - Additional dependencies (no cache path prefix) ++# 4. postBuildCmds - Extra commands to run after AR ++# 5. extraHash - Additional key to compute the unique cache path ++# Example: ++# $(call static_library,libmath.a,vector.o matrix.o,$(CONFIG_H),strip $@,$(VERSION)) ++define static_library # libName, objectDeps, extraDeps, postBuildCmds, extraHash ++ ++$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3),$(4),$(5)))) ++MCM_ALL_BINS += $(1) ++ ++$$(CACHE_ROOT)/%/$(1) : $$(addprefix $$(CACHE_ROOT)/%/,$(2)) $(3) ++ @echo AR $$@ ++ $$(AR) $$(ARFLAGS) $$@ $$^ ++ $(4) ++ ++.PHONY: $(1) ++$(1) : ARFLAGS = rcs ++$(1) : $$(CACHE_ROOT)/$$(call HASH_FUNC,$(1),$(2) $$(CPPFLAGS) $$(CC) $$(CFLAGS) $$(CXX) $$(CXXFLAGS) $$(AR) $$(ARFLAGS) $(5))/$(1) ++ $$(LN) -sf $$< $$@ ++ ++endef # static_library ++ ++ ++# c_dynamic_library - Create build rules for a C dynamic/shared library with caching ++# Parameters: ++# 1. libName - Library name (becomes output file and phony target) ++# 2. objectDeps - Object file dependencies (will be built in cache path) ++# The following parameters are all optional: ++# 3. extraDeps - Additional dependencies (no cache path prefix) ++# 4. postLinkCmds - Extra commands to run after linking ++# 5. extraHash - Additional key to compute the unique cache path ++# Example: ++# $(call c_dynamic_library,libmath.so,vector.o matrix.o,$(CONFIG_H),strip $@,$(VERSION)) ++define c_dynamic_library # libName, objectDeps, extraDeps, postLinkCmds, extraHash ++ ++$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3),$(4),$(5)))) ++MCM_ALL_BINS += $(1) ++ ++$$(CACHE_ROOT)/%/$(1) : $$(addprefix $$(CACHE_ROOT)/%/,$(2)) $(3) ++ @echo LD $$@ ++ $$(CC) $$(CPPFLAGS) $$(CFLAGS) $$(LDFLAGS) -shared -o $$@ $$^ $$(LDLIBS) ++ $(4) ++ ++.PHONY: $(1) ++$(1) : CFLAGS += -fPIC ++$(1) : $$(CACHE_ROOT)/$$(call HASH_FUNC,$(1),$(2) $$(CPPFLAGS) $$(CC) $$(CFLAGS) $$(LDFLAGS) $$(LDLIBS) $(5))/$(1) ++ $$(LN) -sf $$< $$@ ++ ++endef # c_dynamic_library ++ ++ ++# program_base - Create build rules for an executable program with caching ++# Parameters: ++# 1. progName - Executable name (becomes output file and phony target) ++# 2. objectDeps - Object file dependencies (will be prefixed with cache path) ++# Parameters 3 to 5 are optional: ++# 3. extraDeps - Additional dependencies (without cache path prefix) ++# 4. postLinkCmds - Extra commands to run after linking ++# 5. extraHash - Additional data to include in cache path hash ++# Parameters 6 & 7 are compulsory: ++# 6. compiler - Variable name of compiler to use (CC or CXX) ++# 7. compilerFlags - Variable name of compiler flags to use (CFLAGS or CXXFLAGS) ++# Example: ++# $(call program_base,myapp,main.o utils.o,$(CONFIG_H),strip $@,$(VERSION),CC,CFLAGS) ++# $(call program_base,mycppapp,main.o utils.o,$(CONFIG_H),strip $@,$(VERSION),CXX,CXXFLAGS) ++define program_base # progName, objectDeps, extraDeps, postLinkCmds, extraHash, compiler, compilerFlags ++ ++$$(if $$(filter 2,$$(V)),$$(info $$(call $(0),$(1),$(2),$(3),$(4),$(5),$(6),$(7)))) ++MCM_ALL_BINS += $(1) ++ ++$$(CACHE_ROOT)/%/$(1) : $$(addprefix $$(CACHE_ROOT)/%/,$(2)) $(3) ++ @echo LD $$@ ++ $$($(6)) $$(CPPFLAGS) $$($(7)) $$^ -o $$@ $$(LDFLAGS) $$(LDLIBS) ++ $(4) ++ ++.PHONY: $(1) ++$(1) : $$(CACHE_ROOT)/$$(call HASH_FUNC,$(1),$$($(6)) $$(CPPFLAGS) $$($(7)) $$(LDFLAGS) $$(LDLIBS) $(5))/$(1) ++ $$(LN) -sf $$< $$@$(EXT) ++ ++endef # program_base ++# Note: $(EXT) must be set to .exe for Windows ++ ++define c_program # progName, objectDeps, extraDeps, postLinkCmds ++$$(eval $$(call program_base,$(1),$(2),$(3),$(4),$(1)$(2),CC,CFLAGS)) ++endef # c_program ++ ++define c_program_shared_o # progName, objectDeps, extraDeps, postLinkCmds ++$$(eval $$(call program_base,$(1),$(2),$(3),$(4),,CC,CFLAGS)) ++endef # c_program_shared_o ++ ++define cxx_program # progName, objectDeps, extraDeps, postLinkCmds ++$$(eval $$(call program_base,$(1),$(2),$(3),$(4),$(1)$(2),CXX,CXXFLAGS)) ++endef # cxx_program ++ ++define cxx_program_shared_o # progName, objectDeps, extraDeps, postLinkCmds ++$$(eval $$(call program_base,$(1),$(2),$(3),$(4),,CXX,CXXFLAGS)) ++endef # cxx_program_shared_o ++ ++# -------------------------------------------------------------------------------------------- ++ ++# Cleaning: delete all objects and binaries created by this script ++.PHONY: clean_cache ++clean_cache: ++ $(RM) -rf $(CACHE_ROOT) ++ $(RM) $(MCM_ALL_BINS) ++ ++# automatically attach to standard clean target ++.PHONY: clean ++clean: clean_cache +diff --git a/cli/xsum_arch.c b/cli/xsum_arch.c +index 3540af4..a6ad0c5 100644 +--- a/cli/xsum_arch.c ++++ b/cli/xsum_arch.c +@@ -25,7 +25,7 @@ + + int g_xsumarch_avoid_empty_unit = 0; + +-#if ((defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC)) || defined(__i386__) || defined(_M_IX86) || defined(_M_IX86_FP) ++#if ((defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC)) || defined(__i386__) || defined(_M_IX86) || defined(_M_IX86_FP) + #if defined(XXHSUM_DISPATCH) + + #include "../xxh_x86dispatch.h" +diff --git a/cli/xsum_arch.h b/cli/xsum_arch.h +index aae7eaa..a8e2bec 100644 +--- a/cli/xsum_arch.h ++++ b/cli/xsum_arch.h +@@ -79,7 +79,7 @@ + #endif + + /* makes the next part easier */ +-#if (defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC) ++#if (defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC) + # define XSUM_ARCH_X64 1 + # define XSUM_ARCH_X86 "x86_64" + #elif defined(__i386__) || defined(_M_IX86) || defined(_M_IX86_FP) +@@ -97,7 +97,7 @@ + # define XSUM_ARCH XSUM_ARCH_X86 " + AVX2" + # elif defined(__AVX__) + # define XSUM_ARCH XSUM_ARCH_X86 " + AVX" +-# elif defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) \ ++# elif defined(_M_X64) || defined(__x86_64__) \ + || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) + # define XSUM_ARCH XSUM_ARCH_X86 " + SSE2" + # else +@@ -162,8 +162,16 @@ + # else + # define XSUM_ARCH "wasm/asmjs" + # endif ++#elif defined(__riscv) ++# define XSUM_ARCH "riscv" + #elif defined(__loongarch_lp64) +-# define XSUM_ARCH "loongarch" ++# if defined(__loongarch_asx) ++# define XSUM_ARCH "loongarch64 + lasx" ++# elif defined(__loongarch_sx) ++# define XSUM_ARCH "loongarch64 + lsx" ++# else ++# define XSUM_ARCH "loongarch64" ++# endif + #else + # define XSUM_ARCH "unknown" + #endif +diff --git a/cli/xsum_config.h b/cli/xsum_config.h +index eec5528..10ca6a0 100644 +--- a/cli/xsum_config.h ++++ b/cli/xsum_config.h +@@ -50,6 +50,10 @@ + # endif + #endif + ++#if defined(_MSC_VER) ++# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ ++#endif ++ + /* Under Linux at least, pull in the *64 commands */ + #ifndef _LARGEFILE64_SOURCE + # define _LARGEFILE64_SOURCE +@@ -170,11 +174,7 @@ + #endif /* XSUM_WIN32_USE_WCHAR */ + + #ifndef XSUM_API +-# ifdef XXH_INLINE_ALL +-# define XSUM_API static +-# else +-# define XSUM_API +-# endif ++# define XSUM_API + #endif + + #ifndef XSUM_NO_TESTS +diff --git a/cli/xsum_sanity_check.c b/cli/xsum_sanity_check.c +index 98014d5..c83ec1f 100644 +--- a/cli/xsum_sanity_check.c ++++ b/cli/xsum_sanity_check.c +@@ -342,7 +342,7 @@ static XSUM_U32 XSUM_rand(void) + * Technically, XXH3_64bits_update is identical to XXH3_128bits_update as of + * v0.8.0, but we treat them as separate. + */ +-typedef XXH_errorcode (*XSUM_XXH3_update_t)(XXH3_state_t* state, const void* input, size_t length); ++typedef XXH_errorcode (*XSUM_XXH3_update_t)(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t length); + + /* + * Runs the passed XXH3_update variant on random lengths. This is to test the +@@ -412,7 +412,7 @@ static void XSUM_testXXH3(const void* data, const XSUM_testdata64_t* testData) + + /* random ingestion */ + (void)XXH3_64bits_reset_withSeed(state, seed); +- XSUM_XXH3_randomUpdate(state, data, len, &XXH3_64bits_update); ++ XSUM_XXH3_randomUpdate(state, data, len, XXH3_64bits_update); + XSUM_checkResult64(XXH3_64bits_digest(state), Nresult); + + /* byte by byte ingestion */ +@@ -483,7 +483,7 @@ static void XSUM_testXXH3_withSecret(const void* data, const void* secret, + + /* random ingestion */ + (void)XXH3_64bits_reset_withSecret(state, secret, secretSize); +- XSUM_XXH3_randomUpdate(state, data, len, &XXH3_64bits_update); ++ XSUM_XXH3_randomUpdate(state, data, len, XXH3_64bits_update); + XSUM_checkResult64(XXH3_64bits_digest(state), Nresult); + + /* byte by byte ingestion */ +@@ -565,7 +565,7 @@ static void XSUM_testXXH128(const void* data, const XSUM_testdata128_t* testData + + /* random ingestion */ + (void)XXH3_128bits_reset_withSeed(state, seed); +- XSUM_XXH3_randomUpdate(state, data, len, &XXH3_128bits_update); ++ XSUM_XXH3_randomUpdate(state, data, len, XXH3_128bits_update); + XSUM_checkResult128(XXH3_128bits_digest(state), Nresult); + + /* byte by byte ingestion */ +@@ -632,7 +632,7 @@ static void XSUM_testXXH128_withSecret(const void* data, const void* secret, siz + + /* random ingestion */ + (void)XXH3_128bits_reset_withSecret(state, secret, secretSize); +- XSUM_XXH3_randomUpdate(state, data, len, &XXH3_128bits_update); ++ XSUM_XXH3_randomUpdate(state, data, len, XXH3_128bits_update); + XSUM_checkResult128(XXH3_128bits_digest(state), Nresult); + + /* byte by byte ingestion */ +diff --git a/cli/xxhsum.1.md b/cli/xxhsum.1.md +index 7f5c76d..e4ac9ea 100644 +--- a/cli/xxhsum.1.md ++++ b/cli/xxhsum.1.md +@@ -64,7 +64,7 @@ OPTIONS + `stdin` is also a valid way to provide filenames (when no *FILE* or `-` provided). + Valid format is one filename per line, which can include embedded spaces, etc with no need for quotes, escapes, etc. + A line commencing with '\\' will enable the convention used in the encoding of filenames against output hashes, +- whereby subsequent \\\\, \n and \r seqeuences are converted to the single ++ whereby subsequent \\\\, \n and \r sequences are converted to the single + character 0x5C, 0x0A and 0x0D respectively. + + ### The following options are useful only for checksum verification: +diff --git a/cli/xxhsum.c b/cli/xxhsum.c +index 046070d..116a5c9 100644 +--- a/cli/xxhsum.c ++++ b/cli/xxhsum.c +@@ -35,12 +35,6 @@ + #include "xsum_output.h" /* XSUM_output */ + #include "xsum_sanity_check.h" /* XSUM_sanityCheck */ + #include "xsum_bench.h" /* NBLOOPS_DEFAULT */ +-#ifdef XXH_INLINE_ALL +-# include "xsum_os_specific.c" +-# include "xsum_output.c" +-# include "xsum_sanity_check.c" +-# include "xsum_bench.c" +-#endif + + /* ************************************ + * Includes +@@ -426,6 +420,7 @@ static LineStatus XSUM_hashFile(const char* fileName, + } + inFile = XSUM_fopen( fileName, "rb" ); + if (inFile==NULL) { ++ XSUM_log("Error: unable to open input\n"); + return LineStatus_failedToOpen; + } } + +@@ -1396,22 +1391,23 @@ static int XSUM_usage(const char* exename) + XSUM_log( "Usage: %s [options] [files] \n\n", exename); + XSUM_log( "When no filename provided or when '-' is provided, uses stdin as input. \n"); + XSUM_log( "\nOptions: \n"); +- XSUM_log( " -H# select an xxhash algorithm (default: %i) \n", (int)g_defaultAlgo); +- XSUM_log( " 0: XXH32 \n"); +- XSUM_log( " 1: XXH64 \n"); +- XSUM_log( " 2: XXH128 (also called XXH3_128bits) \n"); +- XSUM_log( " 3: XXH3 (also called XXH3_64bits) \n"); +- XSUM_log( " -c, --check read xxHash checksum from [files] and check them \n"); +- XSUM_log( " --filelist generate hashes for files listed in [files] \n"); +- XSUM_log( " -h, --help display a long help page about advanced options \n"); ++ XSUM_log( " -H# select an xxhash algorithm (default: %i) \n", (int)g_defaultAlgo); ++ XSUM_log( " 0: XXH32 \n"); ++ XSUM_log( " 1: XXH64 \n"); ++ XSUM_log( " 2: XXH128 (also called XXH3_128bits) \n"); ++ XSUM_log( " 3: XXH3 (also called XXH3_64bits) \n"); ++ XSUM_log( " -c, --check read xxHash checksum from [files] and check them \n"); ++ XSUM_log( " --files-from generate hashes for files listed in [files] \n"); ++ XSUM_log( " --filelist generate hashes for files listed in [files] \n"); ++ XSUM_log( " - forces stdin as input, even if it's the console \n"); ++ XSUM_log( " -h, --help display a long help page about advanced options \n"); + return 0; + } + +- + static int XSUM_usage_advanced(const char* exename) + { + XSUM_usage(exename); +- XSUM_log( "\nAdvanced :\n"); ++ XSUM_log( "\nAdvanced: \n"); + XSUM_log( " -V, --version Display version information \n"); + XSUM_log( " --tag Produce BSD-style checksum lines \n"); + XSUM_log( " --little-endian Checksum values use little endian convention (default: big endian) \n"); +@@ -1658,8 +1654,10 @@ XSUM_API int XSUM_main(int argc, const char* argv[]) + } + + /* Check if input is defined as console; trigger an error in this case */ +- if ( (filenamesStart==0) && XSUM_isConsole(stdin) && !explicitStdin) +- return XSUM_badusage(exename); ++ if ( (filenamesStart==0) && XSUM_isConsole(stdin) && !explicitStdin) { ++ XSUM_log("No input provided \n"); ++ return 1; ++ } + + if (filenamesStart==0) filenamesStart = argc; + +diff --git a/cmake_unofficial/README.md b/cmake_unofficial/README.md +deleted file mode 100644 +index 3733912..0000000 +--- a/cmake_unofficial/README.md ++++ /dev/null +@@ -1,37 +0,0 @@ +- +-## Usage +- +-### Way 1: import targets +-Build xxHash targets: +- +- cd +- mkdir build +- cd build +- cmake ../cmake_unofficial [options] +- cmake --build . +- cmake --build . --target install #optional +- +-Where possible options are: +-- `-DXXHASH_BUILD_ENABLE_INLINE_API=`: adds xxhash.c for the `-DXXH_INLINE_ALL` api. ON by default. +-- `-DXXHASH_BUILD_XXHSUM=`: build the command line binary. ON by default +-- `-DBUILD_SHARED_LIBS=`: build dynamic library. ON by default. +-- `-DCMAKE_INSTALL_PREFIX=`: use custom install prefix path. +-- `-DDISPATCH=`: enable dispatch mode. OFF by default. +- +-Add lines into downstream CMakeLists.txt: +- +- find_package(xxHash 0.7 CONFIG REQUIRED) +- ... +- target_link_libraries(MyTarget PRIVATE xxHash::xxhash) +- +-### Way 2: Add subdirectory +-Add lines into downstream CMakeLists.txt: +- +- option(BUILD_SHARED_LIBS "Build shared libs" OFF) #optional +- ... +- set(XXHASH_BUILD_ENABLE_INLINE_API OFF) #optional +- set(XXHASH_BUILD_XXHSUM OFF) #optional +- add_subdirectory( EXCLUDE_FROM_ALL) +- ... +- target_link_libraries(MyTarget PRIVATE xxHash::xxhash) +- +diff --git a/fuzz/fuzzer.c b/fuzz/fuzzer.c +index 731ba4d..906853a 100644 +--- a/fuzz/fuzzer.c ++++ b/fuzz/fuzzer.c +@@ -4,8 +4,8 @@ + + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + volatile XXH64_hash_t hash64 = XXH64(data, size, 0); +- (void)hash64; + volatile XXH32_hash_t hash32 = XXH32(data, size, 0); ++ (void)hash64; + (void)hash32; + return 0; + } +diff --git a/libxxhash.pc.in b/libxxhash.pc.in +index fc59344..4842f6f 100644 +--- a/libxxhash.pc.in ++++ b/libxxhash.pc.in +@@ -11,5 +11,6 @@ Name: xxhash + Description: extremely fast hash algorithm + URL: http://www.xxhash.com/ + Version: @VERSION@ ++License: BSD-2-clause + Libs: -L${libdir} -lxxhash + Cflags: -I${includedir} +diff --git a/tests/Makefile b/tests/Makefile +index b9e45b0..f1f60ae 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -23,13 +23,12 @@ + # - xxHash source repository: https://github.com/Cyan4973/xxHash + # ################################################################ + ++MAKEFLAGS += --no-print-directory + CFLAGS += -Wall -Wextra -Wundef -g + + CP = cp + NM = nm + GREP = grep +-XXHSUM_DIR = .. +-XXHSUM = $(XXHSUM_DIR)/xxhsum + + # Define *.exe as extension for Windows systems + ifneq (,$(filter Windows%,$(OS))) +@@ -47,42 +46,44 @@ endif + .PHONY: default + default: all + ++C_SRCDIRS = . .. ../cli ++include ../build/make/multiconf.make ++ + .PHONY: all +-all: test ++all: test test_alias + + .PHONY: test + test: test_multiInclude test_unicode test_sanity + + .PHONY: test_multiInclude + test_multiInclude: +- @$(MAKE) clean + # compile without xxhash.o, ensure symbols exist within target + # Note: built using only default rules + $(MAKE) multiInclude +- @$(MAKE) clean ++ $(RM) multiInclude + # compile with xxhash.o, to detect duplicated symbols + $(MAKE) multiInclude_withxxhash +- @$(MAKE) clean ++ $(RM) multiInclude_withxxhash + # compile with XXH_NAMESPACE before XXH_INLINE_ALL + CPPFLAGS=-DXXH_NAMESPACE=TESTN_ $(MAKE) multiInclude + # no symbol prefixed TESTN_ should exist + ! $(NM) multiInclude | $(GREP) TESTN_ +- $(MAKE) clean ++ $(RM) multiInclude + # compile xxhash.o with XXH_NAMESPACE + CPPFLAGS=-DXXH_NAMESPACE=TESTN_ $(MAKE) multiInclude_withxxhash + # symbols prefixed TESTN_ should exist in xxhash.o (though not be invoked) + $(NM) multiInclude_withxxhash | $(GREP) TESTN_ +- $(MAKE) clean ++ $(RM) multiInclude_withxxhash + + .PHONY: test_ppc_redefine +-test_ppc_redefine: ppc_define.c +- @$(MAKE) clean +- $(CC) $(CPPFLAGS) $(CFLAGS) -c $^ ++test_ppc_redefine: ppc_define.o ++ ++XXHSUM_OBJS = xxhash.o $(notdir $(patsubst %.c,%.o,$(wildcard ../cli/*.c))) ++xxhsum: ++$(eval $(call c_program,xxhsum,$(XXHSUM_OBJS))) + +-.PHONY: $(XXHSUM) +-$(XXHSUM): +- $(MAKE) -C $(XXHSUM_DIR) xxhsum +- $(CP) $(XXHSUM) . ++generate_unicode_test: ++$(eval $(call c_program,generate_unicode_test,generate_unicode_test.o)) + + # Make sure that Unicode filenames work. + # https://github.com/Cyan4973/xxHash/issues/293 +@@ -92,24 +93,23 @@ test_unicode: + @echo "Skipping Unicode test, your terminal doesn't appear to support UTF-8." + @echo "Try with ENABLE_UNICODE=1" + else +-test_unicode: $(XXHSUM) generate_unicode_test.c ++test_unicode: generate_unicode_test xxhsum + # Generate a Unicode filename test dynamically + # to keep UTF-8 out of the source tree. +- $(CC) $(CFLAGS) $(LDFLAGS) generate_unicode_test.c -o generate_unicode_test$(EXT) + ./generate_unicode_test$(EXT) + $(SHELL) ./unicode_test.sh + endif + + .PHONY: test_filename_escape +-test_filename_escape: $(XXHSUM) ++test_filename_escape: xxhsum + ./filename-escape.sh + + .PHONY: test_cli_comment_line +-test_cli_comment_line: $(XXHSUM) ++test_cli_comment_line: xxhsum + $(SHELL) ./cli-comment-line.sh + + .PHONY: test_cli_ignore_missing +-test_cli_ignore_missing: $(XXHSUM) ++test_cli_ignore_missing: xxhsum + $(SHELL) ./cli-ignore-missing.sh + + .PHONY: test_sanity +@@ -117,19 +117,23 @@ test_sanity: sanity_test.c + $(CC) $(CFLAGS) $(LDFLAGS) sanity_test.c -o sanity_test$(EXT) + $(RUN_ENV) ./sanity_test$(EXT) + ++sanity_test_vectors_generator: ++$(eval $(call c_program,sanity_test_vectors_generator,sanity_test_vectors_generator.o)) ++ + .PHONY: sanity_test_vectors.h +-sanity_test_vectors.h: sanity_test_vectors_generator.c +- $(CC) $(CFLAGS) $(LDFLAGS) sanity_test_vectors_generator.c -o sanity_test_vectors_generator$(EXT) ++sanity_test_vectors.h: sanity_test_vectors_generator + ./sanity_test_vectors_generator$(EXT) + +-xxhash.o: ../xxhash.c ../xxhash.h +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -o $@ $< ++multiInclude_withxxhash: ++$(eval $(call c_program,multiInclude_withxxhash,multiInclude.o xxhash.o)) + +-multiInclude_withxxhash: multiInclude.o xxhash.o +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ ++test_alias: CPPFLAGS += -I.. ++test_alias: CFLAGS += -O3 -Werror ++$(eval $(call c_program,test_alias,test_alias.o)) + ++.PHONY: clean + clean: + @$(RM) *.o +- @$(RM) multiInclude multiInclude_withxxhash +- @$(RM) *.unicode generate_unicode_test$(EXT) unicode_test.* xxhsum* ++ @$(RM) multiInclude ++ @$(RM) *.unicode unicode_test.* + @$(RM) sanity_test$(EXT) sanity_test_vectors_generator$(EXT) +diff --git a/tests/bench/Makefile b/tests/bench/Makefile +index a7edd48..ec5d56f 100644 +--- a/tests/bench/Makefile ++++ b/tests/bench/Makefile +@@ -52,11 +52,14 @@ benchHash_avx2: CXXFLAGS += -mavx2 + benchHash_avx512: CFLAGS += -mavx512f + benchHash_avx512: CXXFLAGS += -mavx512f + ++benchHash_rvv: CFLAGS += -march=rv64gcv -O2 ++benchHash_rvv: CXXFLAGS += -march=rv64gcv -O2 ++ + benchHash_hw: CPPFLAGS += -DHARDWARE_SUPPORT + benchHash_hw: CFLAGS += -mavx2 -maes + benchHash_hw: CXXFLAGS += -mavx2 -mpclmul -std=c++14 + +-benchHash benchHash32 benchHash_avx2 benchHash_avx512 benchHash_nosimd benchHash_hw: $(OBJ_LIST) ++benchHash benchHash32 benchHash_avx2 benchHash_avx512 benchHash_nosimd benchHash_hw benchHash_rvv: $(OBJ_LIST) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ $(LDFLAGS) -o $@ + + +@@ -68,4 +71,4 @@ benchHash.o: benchHash.h + + + clean: +- $(RM) *.o benchHash benchHash32 benchHash_avx2 benchHash_avx512 benchHash_hw ++ $(RM) *.o benchHash benchHash32 benchHash_avx2 benchHash_avx512 benchHash_hw benchHash_rvv +diff --git a/tests/bench/main.c b/tests/bench/main.c +index 8a6b816..a0f1c4b 100644 +--- a/tests/bench/main.c ++++ b/tests/bench/main.c +@@ -110,7 +110,7 @@ static int longCommandWArg(const char** stringPtr, const char* longCommand) + # define SMALL_SIZE_MIN_DEFAULT 1 + #endif + #ifndef SMALL_SIZE_MAX_DEFAULT +-# define SMALL_SIZE_MAX_DEFAULT 127 ++# define SMALL_SIZE_MAX_DEFAULT 30 + #endif + #ifndef LARGE_SIZELOG_MIN_DEFAULT + # define LARGE_SIZELOG_MIN_DEFAULT 9 +diff --git a/tests/collisions/Makefile b/tests/collisions/Makefile +index eee4b59..208090f 100644 +--- a/tests/collisions/Makefile ++++ b/tests/collisions/Makefile +@@ -23,9 +23,8 @@ + # - xxHash source repository: https://github.com/Cyan4973/xxHash + # + +-SRC_DIRS = ./ ../../ allcodecs/ +-VPATH = $(SRC_DIRS) +-CPPFLAGS += $(addprefix -I ,$(SRC_DIRS)) ++HEADER_DIRS = ./ ../../ allcodecs/ ++CPPFLAGS += $(addprefix -I ,$(HEADER_DIRS)) + CFLAGS += -Wall -Wextra -Wconversion \ + -std=c11 + CXXFLAGS += -Wall -Wextra -Wconversion \ +@@ -33,28 +32,27 @@ CXXFLAGS += -Wall -Wextra -Wconversion \ + LDFLAGS += -pthread + TESTHASHES = 3200000 + +-HASH_SRC := $(sort $(wildcard allcodecs/*.c allcodecs/*.cc)) +-HASH_OBJ := $(patsubst %.c,%.o,$(HASH_SRC)) +- ++HASH_SRC := $(wildcard allcodecs/*.c) $(wildcard allcodecs/*.cc) $(wildcard allcodecs/*.cpp) ++HASH_OBJ := $(addsuffix .o,$(basename $(HASH_SRC))) + + .PHONY: default +-default: release +- +-.PHONY: all +-all: release ++default: collisionsTest + +-collisionsTest: main.o pool.o threading.o sort.o $(HASH_OBJ) +- $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ $(LDFLAGS) -o $@ ++C_SRCDIRS = $(shell find allcodecs -type d) ++CXX_SRCDIRS = $(shell find allcodecs -type d) ++include ../../build/make/multiconf.make + +-main.o: hashes.h xxhash.h ++.PHONY: all ++all: collisionsTest + +-release: CXXFLAGS += -O3 +-release: CFLAGS += -O3 +-release: collisionsTest ++collisionsTest: CXXFLAGS := -O3 $(CXXFLAGS) ++collisionsTest: CFLAGS := -O3 $(CFLAGS) ++$(eval $(call cxx_program,collisionsTest,main.o pool.o threading.o sort.o $(HASH_OBJ))) + +-debug: CXXFLAGS += -g3 -O0 -DDEBUG +-debug: CFLAGS += -g3 -O0 -DDEBUG +-debug: collisionsTest ++.PHONY: debug ++debug: CPPFLAGS += -DDEBUG -DXXH_NO_INLINE_HINTS ++debug: ++ CFLAGS='$(CFLAGS) -g3 -Og' CXXFLAGS='$(CXXFLAGS) -g3 -Og' CPPFLAGS='$(CPPFLAGS)' $(MAKE) collisionsTest + + .PHONY: check + check: test +@@ -75,4 +73,3 @@ test: debug + .PHONY: clean + clean: + $(RM) *.o allcodecs/*.o +- $(RM) collisionsTest +diff --git a/tests/multiInclude.c b/tests/multiInclude.c +index 8912771..60668ec 100644 +--- a/tests/multiInclude.c ++++ b/tests/multiInclude.c +@@ -61,15 +61,16 @@ + + void hash_advanced(void) + { ++ const char input[] = "Hello World !"; + XXH3_state_t state; /* this type is part of experimental API */ + + XXH3_64bits_reset(&state); +- const char input[] = "Hello World !"; + + XXH3_64bits_update(&state, input, sizeof(input)); + +- XXH64_hash_t const h = XXH3_64bits_digest(&state); +- printf("hash '%s': %08x%08x \n", input, (unsigned)(h >> 32), (unsigned)h); ++ { XXH64_hash_t const h = XXH3_64bits_digest(&state); ++ printf("hash '%s': %08x%08x \n", input, (unsigned)(h >> 32), (unsigned)h); ++ } + } + + int main(void) +diff --git a/tests/sanity_test.c b/tests/sanity_test.c +index 3e3d4f1..e933cd4 100644 +--- a/tests/sanity_test.c ++++ b/tests/sanity_test.c +@@ -90,7 +90,7 @@ static XSUM_U8* createSanityBuffer(size_t bufferLenInBytes) + + /* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */ + /* +- * Delete (free) the buffer which has been genereated by createSanityBuffer() ++ * Delete (free) the buffer which has been generated by createSanityBuffer() + */ + static void releaseSanityBuffer(XSUM_U8* buffer) + { +@@ -286,7 +286,7 @@ static XSUM_U64 SANITY_TEST_computeRandSeed(size_t step) + * Technically, XXH3_64bits_update is identical to XXH3_128bits_update as of + * v0.8.0, but we treat them as separate. + */ +-typedef XXH_errorcode (*SANITY_TEST_XXH3_update_t)(XXH3_state_t* state, const void* input, size_t length); ++typedef XXH_errorcode (*SANITY_TEST_XXH3_update_t)(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t length); + + + /* TODO : Share this function with xsum_sanity_check.c */ +diff --git a/tests/sanity_test_vectors_generator.c b/tests/sanity_test_vectors_generator.c +index f910462..7c206b7 100644 +--- a/tests/sanity_test_vectors_generator.c ++++ b/tests/sanity_test_vectors_generator.c +@@ -189,7 +189,7 @@ static XSUM_U8* createSanityBuffer(size_t bufferLenInBytes) + + /* TODO : Share this function with sanity_check.c and xsum_sanity_check.c */ + /* +- * Delete (free) the buffer which has been genereated by createSanityBuffer() ++ * Delete (free) the buffer which has been generated by createSanityBuffer() + */ + static void releaseSanityBuffer(XSUM_U8* buffer) + { +diff --git a/tests/test_alias.c b/tests/test_alias.c +new file mode 100644 +index 0000000..af1065f +--- /dev/null ++++ b/tests/test_alias.c +@@ -0,0 +1,18 @@ ++#define XXH_INLINE_ALL ++ ++#include ++#include ++#include "xxhash.h" ++ ++int main() { ++ // it seems this has to be exactly 24 bytes. ++ union { ++ char x[24]; ++ // force 8-byte alignment without making ++ // aliasable with uint64_t. ++ void *y[3]; ++ } data = {.x = "garblegarblegarblegarble"}; ++ uint64_t hash = XXH64(&data, sizeof(data), 0); ++ printf("%016"PRIx64"\n", hash); ++ return 0; ++} +diff --git a/xxh_x86dispatch.c b/xxh_x86dispatch.c +index 03e7dc4..0c15820 100644 +--- a/xxh_x86dispatch.c ++++ b/xxh_x86dispatch.c +@@ -632,7 +632,7 @@ typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_default)(XXH_NOESCAPE const + + typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSeed)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, XXH64_hash_t); + +-typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSecret)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, const void* XXH_RESTRICT, size_t); ++typedef XXH128_hash_t (*XXH3_dispatchx86_hashLong128_withSecret)(XXH_NOESCAPE const void* XXH_RESTRICT, size_t, XXH_NOESCAPE const void* XXH_RESTRICT, size_t); + + typedef struct { + XXH3_dispatchx86_hashLong128_default hashLong128_default; +diff --git a/xxhash.h b/xxhash.h +index 78fc2e8..9c819f9 100644 +--- a/xxhash.h ++++ b/xxhash.h +@@ -241,7 +241,7 @@ + * xxHash prototypes and implementation + */ + +-#if defined (__cplusplus) ++#if defined(__cplusplus) && !defined(XXH_NO_EXTERNC_GUARD) + extern "C" { + #endif + +@@ -791,18 +791,9 @@ XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canoni + #endif + /*! @endcond */ + +-/*! @cond Doxygen ignores this part */ +-/* +- * C23 __STDC_VERSION__ number hasn't been specified yet. For now +- * leave as `201711L` (C17 + 1). +- * TODO: Update to correct value when its been specified. +- */ +-#define XXH_C23_VN 201711L +-/*! @endcond */ +- + /*! @cond Doxygen ignores this part */ + /* C-language Attributes are added in C23. */ +-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) && defined(__has_c_attribute) ++#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L) && defined(__has_c_attribute) + # define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) + #else + # define XXH_HAS_C_ATTRIBUTE(x) 0 +@@ -1125,7 +1116,8 @@ XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const + # define XXH_VSX 5 /*!< VSX and ZVector for POWER8/z13 (64-bit) */ + # define XXH_SVE 6 /*!< SVE for some ARMv8-A and ARMv9-A */ + # define XXH_LSX 7 /*!< LSX (128-bit SIMD) for LoongArch64 */ +- ++# define XXH_LASX 8 /*!< LASX (256-bit SIMD) for LoongArch64 */ ++# define XXH_RVV 9 /*!< RVV (RISC-V Vector) for RISC-V */ + + /*-********************************************************************** + * XXH3 64-bit variant +@@ -1362,7 +1354,7 @@ XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* stat + * + * @see @ref streaming_example "Streaming Example" + */ +-XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr); ++XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr); + #endif /* !XXH_NO_STREAM */ + + /* note : canonical representation of XXH3 is the same as XXH64 +@@ -1727,6 +1719,7 @@ struct XXH64_state_s { + #endif + + /*! ++ * @internal + * @brief The size of the internal XXH3 buffer. + * + * This is the optimal update size for incremental hashing. +@@ -1736,10 +1729,11 @@ struct XXH64_state_s { + #define XXH3_INTERNALBUFFER_SIZE 256 + + /*! +- * @internal +- * @brief Default size of the secret buffer (and @ref XXH3_kSecret). ++ * @def XXH3_SECRET_DEFAULT_SIZE ++ * @brief Default Secret's size + * +- * This is the size used in @ref XXH3_kSecret and the seeded functions. ++ * This is the size of internal XXH3_kSecret ++ * and is needed by XXH3_generateSecret_fromSeed(). + * + * Not to be confused with @ref XXH3_SECRET_SIZE_MIN. + */ +@@ -1769,7 +1763,7 @@ struct XXH64_state_s { + */ + struct XXH3_state_s { + XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]); +- /*!< The 8 accumulators. See @ref XXH32_state_s::v and @ref XXH64_state_s::v */ ++ /*!< The 8 accumulators. See @ref XXH32_state_s::acc and @ref XXH64_state_s::acc */ + XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]); + /*!< Used to store a custom secret generated from a seed. */ + XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]); +@@ -1986,7 +1980,7 @@ XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* data, size_t len, + /*! + * @brief Calculates 128-bit seeded variant of XXH3 hash of @p data. + * +- * @param data The memory segment to be hashed, at least @p len bytes in size. ++ * @param input The memory segment to be hashed, at least @p len bytes in size. + * @param length The length of @p data, in bytes. + * @param secret The secret used to alter hash result predictably. + * @param secretSize The length of @p secret, in bytes (must be >= XXH3_SECRET_SIZE_MIN) +@@ -2391,16 +2385,35 @@ static void XXH_free(void* p) { free(p); } + + #endif /* XXH_NO_STDLIB */ + +-#include ++#ifndef XXH_memcpy ++/*! ++ * @internal ++ * @brief XXH_memcpy() macro can be redirected at compile time ++ */ ++# include ++# define XXH_memcpy memcpy ++#endif + ++#ifndef XXH_memset + /*! + * @internal +- * @brief Modify this function to use a different routine than memcpy(). ++ * @brief XXH_memset() macro can be redirected at compile time + */ +-static void* XXH_memcpy(void* dest, const void* src, size_t size) +-{ +- return memcpy(dest,src,size); +-} ++# include ++# define XXH_memset memset ++#endif ++ ++#ifndef XXH_memcmp ++/*! ++ * @internal ++ * @brief XXH_memcmp() macro can be redirected at compile time ++ * Note: only needed by XXH128. ++ */ ++# include ++# define XXH_memcmp memcmp ++#endif ++ ++ + + #include /* ULLONG_MAX */ + +@@ -2639,7 +2652,7 @@ typedef union { xxh_u32 u32; } __attribute__((__packed__)) unalign; + #endif + static xxh_u32 XXH_read32(const void* ptr) + { +- typedef __attribute__((__aligned__(1))) xxh_u32 xxh_unalign32; ++ typedef __attribute__((__aligned__(1))) __attribute__((__may_alias__)) xxh_u32 xxh_unalign32; + return *((const xxh_unalign32*)ptr); + } + +@@ -2731,7 +2744,7 @@ static int XXH_isLittleEndian(void) + * additional case: + * + * ``` +- * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) ++ * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L) + * # include + * # ifdef unreachable + * # define XXH_UNREACHABLE() unreachable() +@@ -3221,7 +3234,7 @@ XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32_state_t + XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t seed) + { + XXH_ASSERT(statePtr != NULL); +- memset(statePtr, 0, sizeof(*statePtr)); ++ XXH_memset(statePtr, 0, sizeof(*statePtr)); + XXH32_initAccs(statePtr->acc, seed); + return XXH_OK; + } +@@ -3352,7 +3365,7 @@ typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((__packed__)) unalign6 + #endif + static xxh_u64 XXH_read64(const void* ptr) + { +- typedef __attribute__((__aligned__(1))) xxh_u64 xxh_unalign64; ++ typedef __attribute__((__aligned__(1))) __attribute__((__may_alias__)) xxh_u64 xxh_unalign64; + return *((const xxh_unalign64*)ptr); + } + +@@ -3718,7 +3731,7 @@ XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const + XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, XXH64_hash_t seed) + { + XXH_ASSERT(statePtr != NULL); +- memset(statePtr, 0, sizeof(*statePtr)); ++ XXH_memset(statePtr, 0, sizeof(*statePtr)); + XXH64_initAccs(statePtr->acc, seed); + return XXH_OK; + } +@@ -3855,8 +3868,13 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_can + # include + # elif defined(__SSE2__) + # include ++# elif defined(__loongarch_asx) ++# include ++# include + # elif defined(__loongarch_sx) + # include ++# elif defined(__riscv_vector) ++# include + # endif + #endif + +@@ -3946,8 +3964,8 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_can + * @ingroup tuning + * @brief Overrides the vectorization implementation chosen for XXH3. + * +- * Can be defined to 0 to disable SIMD or any of the values mentioned in +- * @ref XXH_VECTOR_TYPE. ++ * Can be defined to 0 to disable SIMD, ++ * or any other authorized value of @ref XXH_VECTOR. + * + * If this is not defined, it uses predefined macros to determine the best + * implementation. +@@ -3970,9 +3988,7 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_can + #endif + + #ifndef XXH_VECTOR /* can be defined on command line */ +-# if defined(__ARM_FEATURE_SVE) +-# define XXH_VECTOR XXH_SVE +-# elif ( \ ++# if ( \ + defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \ + || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) /* msvc */ \ + || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE()) /* wasm simd128 via SIMDe */ \ +@@ -3981,18 +3997,24 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_can + || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \ + ) + # define XXH_VECTOR XXH_NEON ++# elif defined(__ARM_FEATURE_SVE) ++# define XXH_VECTOR XXH_SVE + # elif defined(__AVX512F__) + # define XXH_VECTOR XXH_AVX512 + # elif defined(__AVX2__) + # define XXH_VECTOR XXH_AVX2 +-# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2)) ++# elif defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2)) + # define XXH_VECTOR XXH_SSE2 + # elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \ + || (defined(__s390x__) && defined(__VEC__)) \ + && defined(__GNUC__) /* TODO: IBM XL */ + # define XXH_VECTOR XXH_VSX ++# elif defined(__loongarch_asx) ++# define XXH_VECTOR XXH_LASX + # elif defined(__loongarch_sx) + # define XXH_VECTOR XXH_LSX ++# elif defined(__riscv_vector) ++# define XXH_VECTOR XXH_RVV + # else + # define XXH_VECTOR XXH_SCALAR + # endif +@@ -4030,8 +4052,12 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_can + # define XXH_ACC_ALIGN 64 + # elif XXH_VECTOR == XXH_SVE /* sve */ + # define XXH_ACC_ALIGN 64 ++# elif XXH_VECTOR == XXH_LASX /* lasx */ ++# define XXH_ACC_ALIGN 64 + # elif XXH_VECTOR == XXH_LSX /* lsx */ + # define XXH_ACC_ALIGN 64 ++# elif XXH_VECTOR == XXH_RVV /* rvv */ ++# define XXH_ACC_ALIGN 64 + # endif + #endif + +@@ -4040,6 +4066,8 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_can + # define XXH_SEC_ALIGN XXH_ACC_ALIGN + #elif XXH_VECTOR == XXH_SVE + # define XXH_SEC_ALIGN XXH_ACC_ALIGN ++#elif XXH_VECTOR == XXH_RVV ++# define XXH_SEC_ALIGN XXH_ACC_ALIGN + #else + # define XXH_SEC_ALIGN 8 + #endif +@@ -4361,7 +4389,10 @@ do { \ + # error "default keyset is not large enough" + #endif + +-/*! Pseudorandom secret taken directly from FARSH. */ ++/*! ++ * @internal ++ * @def XXH3_kSecret ++ * @brief Pseudorandom secret taken directly from FARSH. */ + XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = { + 0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c, + 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f, +@@ -5241,10 +5272,18 @@ XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTR + (void)(&XXH_writeLE64); + { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i); + +-# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900 +- /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 */ +- XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, (xxh_i64)(0U - seed64) }; +- __m128i const seed = _mm_load_si128((__m128i const*)seed64x2); ++# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER <= 1900 ++ /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 ++ * and some specific variants of 2015 may also lack it */ ++ /* Cast to unsigned 64-bit first to avoid signed arithmetic issues */ ++ xxh_u64 const seed64_unsigned = (xxh_u64)seed64; ++ xxh_u64 const neg_seed64 = (xxh_u64)(0ULL - seed64_unsigned); ++ __m128i const seed = _mm_set_epi32( ++ (int)(neg_seed64 >> 32), /* high 32 bits of negated seed */ ++ (int)(neg_seed64), /* low 32 bits of negated seed */ ++ (int)(seed64_unsigned >> 32), /* high 32 bits of original seed */ ++ (int)(seed64_unsigned) /* low 32 bits of original seed */ ++ ); + # else + __m128i const seed = _mm_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64); + # endif +@@ -5712,7 +5751,7 @@ XXH3_scrambleAcc_lsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) + { + __m128i* const xacc = (__m128i*) acc; + const __m128i* const xsecret = (const __m128i *) secret; +- const __m128i prime32 = __lsx_vreplgr2vr_w((int)XXH_PRIME32_1); ++ const __m128i prime32 = __lsx_vreplgr2vr_d(XXH_PRIME32_1); + + for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m128i); i++) { + /* xacc[i] ^= (xacc[i] >> 47) */ +@@ -5724,16 +5763,205 @@ XXH3_scrambleAcc_lsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) + __m128i const data_key = __lsx_vxor_v(data_vec, key_vec); + + /* xacc[i] *= XXH_PRIME32_1; */ +- __m128i const data_key_hi = __lsx_vsrli_d(data_key, 32); +- __m128i const prod_lo = __lsx_vmulwev_d_wu(data_key, prime32); +- __m128i const prod_hi = __lsx_vmulwev_d_wu(data_key_hi, prime32); +- xacc[i] = __lsx_vadd_d(prod_lo, __lsx_vslli_d(prod_hi, 32)); ++ xacc[i] = __lsx_vmul_d(data_key, prime32); ++ } ++ } ++} ++ ++#endif ++ ++#if (XXH_VECTOR == XXH_LASX) ++#define _LASX_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w)) ++ ++XXH_FORCE_INLINE void ++XXH3_accumulate_512_lasx( void* XXH_RESTRICT acc, ++ const void* XXH_RESTRICT input, ++ const void* XXH_RESTRICT secret) ++{ ++ XXH_ASSERT((((size_t)acc) & 31) == 0); ++ { ++ __m256i* const xacc = (__m256i *) acc; ++ const __m256i* const xinput = (const __m256i *) input; ++ const __m256i* const xsecret = (const __m256i *) secret; ++ ++ for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m256i); i++) { ++ /* data_vec = xinput[i]; */ ++ __m256i const data_vec = __lasx_xvld(xinput + i, 0); ++ /* key_vec = xsecret[i]; */ ++ __m256i const key_vec = __lasx_xvld(xsecret + i, 0); ++ /* data_key = data_vec ^ key_vec; */ ++ __m256i const data_key = __lasx_xvxor_v(data_vec, key_vec); ++ /* data_key_lo = data_key >> 32; */ ++ __m256i const data_key_lo = __lasx_xvsrli_d(data_key, 32); ++ // __m256i const data_key_lo = __lasx_xvsrli_d(data_key, 32); ++ /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ ++ __m256i const product = __lasx_xvmulwev_d_wu(data_key, data_key_lo); ++ /* xacc[i] += swap(data_vec); */ ++ __m256i const data_swap = __lasx_xvshuf4i_w(data_vec, _LASX_SHUFFLE(1, 0, 3, 2)); ++ __m256i const sum = __lasx_xvadd_d(xacc[i], data_swap); ++ /* xacc[i] += product; */ ++ xacc[i] = __lasx_xvadd_d(product, sum); ++ } ++ } ++} ++XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(lasx) ++ ++XXH_FORCE_INLINE void ++XXH3_scrambleAcc_lasx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) ++{ ++ XXH_ASSERT((((size_t)acc) & 31) == 0); ++ { ++ __m256i* const xacc = (__m256i*) acc; ++ const __m256i* const xsecret = (const __m256i *) secret; ++ const __m256i prime32 = __lasx_xvreplgr2vr_d(XXH_PRIME32_1); ++ ++ for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m256i); i++) { ++ /* xacc[i] ^= (xacc[i] >> 47) */ ++ __m256i const acc_vec = xacc[i]; ++ __m256i const shifted = __lasx_xvsrli_d(acc_vec, 47); ++ __m256i const data_vec = __lasx_xvxor_v(acc_vec, shifted); ++ /* xacc[i] ^= xsecret[i]; */ ++ __m256i const key_vec = __lasx_xvld(xsecret + i, 0); ++ __m256i const data_key = __lasx_xvxor_v(data_vec, key_vec); ++ ++ /* xacc[i] *= XXH_PRIME32_1; */ ++ xacc[i] = __lasx_xvmul_d(data_key, prime32); ++ } ++ } ++} ++ ++#endif ++ ++#if (XXH_VECTOR == XXH_RVV) ++#if ((defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 13) || \ ++ (defined(__clang__) && __clang_major__ < 16)) ++ #define RVV_OP(op) op ++#else ++ #define concat2(X, Y) X ## Y ++ #define concat(X, Y) concat2(X, Y) ++ #define RVV_OP(op) concat(__riscv_, op) ++#endif ++XXH_FORCE_INLINE void ++XXH3_accumulate_512_rvv( void* XXH_RESTRICT acc, ++ const void* XXH_RESTRICT input, ++ const void* XXH_RESTRICT secret) ++{ ++ XXH_ASSERT((((size_t)acc) & 63) == 0); ++ { ++ // Try to set vector lenght to 512 bits. ++ // If this length is unavailable, then maximum available will be used ++ size_t vl = RVV_OP(vsetvl_e64m2)(8); ++ ++ uint64_t* const xacc = (uint64_t*) acc; ++ const uint64_t* const xinput = (const uint64_t*) input; ++ const uint64_t* const xsecret = (const uint64_t*) secret; ++ uint64_t swap_mask[16] = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; ++ vuint64m2_t xswap_mask = RVV_OP(vle64_v_u64m2)(swap_mask, vl); ++ ++ // vuint64m1_t is sizeless. ++ // But we can assume that vl can be only 4(vlen=128) or 8(vlen=256,512) ++ for(size_t i = 0; i < XXH_STRIPE_LEN/(8 * vl); i++){ ++ /* data_vec = input[i]; */ ++ vuint64m2_t data_vec = RVV_OP(vreinterpret_v_u8m2_u64m2)(RVV_OP(vle8_v_u8m2)((const uint8_t*)(xinput + vl * i), vl * 8)); ++ /* key_vec = secret[i]; */ ++ vuint64m2_t key_vec = RVV_OP(vreinterpret_v_u8m2_u64m2)(RVV_OP(vle8_v_u8m2)((const uint8_t*)(xsecret + vl * i), vl * 8)); ++ /* data_key = data_vec ^ key_vec; */ ++ vuint64m2_t data_key = RVV_OP(vxor_vv_u64m2)(data_vec, key_vec, vl); ++ /* data_key_lo = data_key >> 32; */ ++ vuint64m2_t data_key_lo = RVV_OP(vsrl_vx_u64m2)(data_key, 32, vl); ++ /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */ ++ vuint64m2_t product = RVV_OP(vmul_vv_u64m2)(RVV_OP(vand_vx_u64m2)(data_key, 0xffffffff, vl), RVV_OP(vand_vx_u64m2)(data_key_lo, 0xffffffff, vl), vl); ++ /* acc_vec = xacc[i]; */ ++ vuint64m2_t acc_vec = RVV_OP(vle64_v_u64m2)(xacc + vl * i, vl); ++ acc_vec = RVV_OP(vadd_vv_u64m2)(acc_vec, product, vl); ++ { ++ /* swap high and low halves */ ++ vuint64m2_t data_swap = RVV_OP(vrgather_vv_u64m2)(data_vec, xswap_mask, vl); ++ acc_vec = RVV_OP(vadd_vv_u64m2)(acc_vec, data_swap, vl); ++ } ++ RVV_OP(vse64_v_u64m2)(xacc + vl * i, acc_vec, vl); ++ } ++ } ++} ++ ++XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(rvv) ++ ++XXH_FORCE_INLINE void ++XXH3_scrambleAcc_rvv(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret) ++{ ++ XXH_ASSERT((((size_t)acc) & 63) == 0); ++ { ++ // Try to set vector lenght to 512 bits. ++ // If this length is unavailable, then maximum available will be used ++ size_t vl = RVV_OP(vsetvl_e64m2)(8); ++ uint64_t* const xacc = (uint64_t*) acc; ++ const uint64_t* const xsecret = (const uint64_t*) secret; ++ ++ uint64_t prime[16] = {XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1,\ ++ XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1}; ++ vuint64m2_t vprime = RVV_OP(vle64_v_u64m2)(prime, vl); ++ ++ // vuint64m2_t is sizeless. ++ // But we can assume that vl can be only 4(vlen=128) or 8(vlen=256,512) ++ for(size_t i = 0; i < XXH_STRIPE_LEN/(8 * vl); i++){ ++ /* xacc[i] ^= (xacc[i] >> 47) */ ++ vuint64m2_t acc_vec = RVV_OP(vle64_v_u64m2)(xacc + vl * i, vl); ++ vuint64m2_t shifted = RVV_OP(vsrl_vx_u64m2)(acc_vec, 47, vl); ++ vuint64m2_t data_vec = RVV_OP(vxor_vv_u64m2)(acc_vec, shifted, vl); ++ /* xacc[i] ^= xsecret[i]; */ ++ vuint64m2_t key_vec = RVV_OP(vreinterpret_v_u8m2_u64m2)(RVV_OP(vle8_v_u8m2)((const uint8_t*)(xsecret + vl * i), vl * 8)); ++ vuint64m2_t data_key = RVV_OP(vxor_vv_u64m2)(data_vec, key_vec, vl); ++ ++ /* xacc[i] *= XXH_PRIME32_1; */ ++ vuint64m2_t prod_even = RVV_OP(vmul_vv_u64m2)(RVV_OP(vand_vx_u64m2)(data_key, 0xffffffff, vl), vprime, vl); ++ vuint64m2_t prod_odd = RVV_OP(vmul_vv_u64m2)(RVV_OP(vsrl_vx_u64m2)(data_key, 32, vl), vprime, vl); ++ vuint64m2_t prod = RVV_OP(vadd_vv_u64m2)(prod_even, RVV_OP(vsll_vx_u64m2)(prod_odd, 32, vl), vl); ++ RVV_OP(vse64_v_u64m2)(xacc + vl * i, prod, vl); + } + } + } + ++XXH_FORCE_INLINE void ++XXH3_initCustomSecret_rvv(void* XXH_RESTRICT customSecret, xxh_u64 seed64) ++{ ++ XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0); ++ XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64); ++ XXH_ASSERT(((size_t)customSecret & 63) == 0); ++ { ++ uint64_t* const xcustomSecret = (uint64_t*)customSecret; ++ ++ (void)(&XXH_writeLE64); ++ { ++ // Calculate the number of 64-bit elements in the `XXH3_kSecret` secret ++ size_t XXH3_kSecret_64b_len = XXH_SECRET_DEFAULT_SIZE / 8; ++ // Create an array of repeated seed values, alternating between seed64 and -seed64. ++ uint64_t seed_pos[16] = {seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64), \ ++ seed64, (uint64_t)(-(int64_t)seed64)}; ++ // Cast the default secret to a signed 64-bit pointer for vectorized access ++ const int64_t* const xXXH3_kSecret = (const int64_t*)((const void*)XXH3_kSecret); ++ size_t vl = 0; ++ for (size_t i=0; i < XXH3_kSecret_64b_len; i += vl) { ++ ++ vl = RVV_OP(vsetvl_e64m2)(XXH3_kSecret_64b_len - i); ++ { ++ vint64m2_t seed = RVV_OP(vle64_v_i64m2)((int64_t*)seed_pos, vl); ++ vint64m2_t src = RVV_OP(vle64_v_i64m2)((const int64_t*)&xXXH3_kSecret[i], vl); ++ vint64m2_t res = RVV_OP(vadd_vv_i64m2)(src, seed, vl); ++ RVV_OP(vse64_v_i64m2)((int64_t*)&xcustomSecret[i], res, vl); ++ } ++ } ++ } ++ } ++} + #endif + ++ + /* scalar variants - universal */ + + #if defined(__aarch64__) && (defined(__GNUC__) || defined(__clang__)) +@@ -5893,7 +6121,7 @@ XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64) + * SUB STR + * STR + * +- * See XXH3_NEON_LANES for details on the pipsline. ++ * See XXH3_NEON_LANES for details on the pipeline. + * + * XXH3_64bits_withSeed, len == 256, Snapdragon 835 + * without hack: 2654.4 MB/s +@@ -5964,12 +6192,24 @@ typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64); + #define XXH3_scrambleAcc XXH3_scrambleAcc_scalar + #define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + ++#elif (XXH_VECTOR == XXH_LASX) ++#define XXH3_accumulate_512 XXH3_accumulate_512_lasx ++#define XXH3_accumulate XXH3_accumulate_lasx ++#define XXH3_scrambleAcc XXH3_scrambleAcc_lasx ++#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar ++ + #elif (XXH_VECTOR == XXH_LSX) + #define XXH3_accumulate_512 XXH3_accumulate_512_lsx + #define XXH3_accumulate XXH3_accumulate_lsx + #define XXH3_scrambleAcc XXH3_scrambleAcc_lsx + #define XXH3_initCustomSecret XXH3_initCustomSecret_scalar + ++#elif (XXH_VECTOR == XXH_RVV) ++#define XXH3_accumulate_512 XXH3_accumulate_512_rvv ++#define XXH3_accumulate XXH3_accumulate_rvv ++#define XXH3_scrambleAcc XXH3_scrambleAcc_rvv ++#define XXH3_initCustomSecret XXH3_initCustomSecret_rvv ++ + #else /* scalar */ + + #define XXH3_accumulate_512 XXH3_accumulate_512_scalar +@@ -6331,7 +6571,7 @@ XXH3_reset_internal(XXH3_state_t* statePtr, + XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart); + XXH_ASSERT(statePtr != NULL); + /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */ +- memset((char*)statePtr + initStart, 0, initLength); ++ XXH_memset((char*)statePtr + initStart, 0, initLength); + statePtr->acc[0] = XXH_PRIME32_3; + statePtr->acc[1] = XXH_PRIME64_1; + statePtr->acc[2] = XXH_PRIME64_2; +@@ -6450,8 +6690,9 @@ XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc, + # define XXH3_STREAM_USE_STACK 1 + # endif + #endif +-/* +- * Both XXH3_64bits_update and XXH3_128bits_update use this routine. ++/* This function accepts f_acc and f_scramble as function pointers, ++ * making it possible to implement multiple variants with different acc & scramble stages. ++ * This is notably useful to implement multiple vector variants with different intrinsics. + */ + XXH_FORCE_INLINE XXH_errorcode + XXH3_update(XXH3_state_t* XXH_RESTRICT const state, +@@ -6465,6 +6706,16 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state, + } + + XXH_ASSERT(state != NULL); ++ state->totalLen += len; ++ ++ /* small input : just fill in tmp buffer */ ++ XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE); ++ if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) { ++ XXH_memcpy(state->buffer + state->bufferedSize, input, len); ++ state->bufferedSize += (XXH32_hash_t)len; ++ return XXH_OK; ++ } ++ + { const xxh_u8* const bEnd = input + len; + const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret; + #if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1 +@@ -6477,15 +6728,6 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state, + #else + xxh_u64* XXH_RESTRICT const acc = state->acc; + #endif +- state->totalLen += len; +- XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE); +- +- /* small input : just fill in tmp buffer */ +- if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) { +- XXH_memcpy(state->buffer + state->bufferedSize, input, len); +- state->bufferedSize += (XXH32_hash_t)len; +- return XXH_OK; +- } + + /* total input is now > XXH3_INTERNALBUFFER_SIZE */ + #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN) +@@ -6532,12 +6774,21 @@ XXH3_update(XXH3_state_t* XXH_RESTRICT const state, + return XXH_OK; + } + ++/* ++ * Both XXH3_64bits_update and XXH3_128bits_update use this routine. ++ */ ++XXH_NO_INLINE XXH_errorcode ++XXH3_update_regular(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) ++{ ++ return XXH3_update(state, (const xxh_u8*)input, len, ++ XXH3_accumulate, XXH3_scrambleAcc); ++} ++ + /*! @ingroup XXH3_family */ + XXH_PUBLIC_API XXH_errorcode + XXH3_64bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) + { +- return XXH3_update(state, (const xxh_u8*)input, len, +- XXH3_accumulate, XXH3_scrambleAcc); ++ return XXH3_update_regular(state, input, len); + } + + +@@ -7073,7 +7324,7 @@ XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NO + XXH_PUBLIC_API XXH_errorcode + XXH3_128bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len) + { +- return XXH3_64bits_update(state, input, len); ++ return XXH3_update_regular(state, input, len); + } + + /*! @ingroup XXH3_family */ +@@ -7095,14 +7346,12 @@ XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_ + #endif /* !XXH_NO_STREAM */ + /* 128-bit utility functions */ + +-#include /* memcmp, memcpy */ +- + /* return : 1 is equal, 0 if different */ + /*! @ingroup XXH3_family */ + XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2) + { + /* note : XXH128_hash_t is compact, it has no padding byte */ +- return !(memcmp(&h1, &h2, sizeof(h1))); ++ return !(XXH_memcmp(&h1, &h2, sizeof(h1))); + } + + /* This prototype is compatible with stdlib's qsort(). +@@ -7186,7 +7435,7 @@ XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOES + { size_t pos = 0; + while (pos < secretSize) { + size_t const toCopy = XXH_MIN((secretSize - pos), customSeedSize); +- memcpy((char*)secretBuffer + pos, customSeed, toCopy); ++ XXH_memcpy((char*)secretBuffer + pos, customSeed, toCopy); + pos += toCopy; + } } + +@@ -7211,7 +7460,7 @@ XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed) + XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE]; + XXH3_initCustomSecret(secret, seed); + XXH_ASSERT(secretBuffer != NULL); +- memcpy(secretBuffer, secret, XXH_SECRET_DEFAULT_SIZE); ++ XXH_memcpy(secretBuffer, secret, XXH_SECRET_DEFAULT_SIZE); + } + + +@@ -7233,6 +7482,6 @@ XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed) + #endif /* XXH_IMPLEMENTATION */ + + +-#if defined (__cplusplus) ++#if defined (__cplusplus) && !defined(XXH_NO_EXTERNC_GUARD) + } /* extern "C" */ + #endif diff --git a/SPECS/xxhash/xxhash-test-respect-cflags.patch b/SPECS/xxhash/xxhash-test-respect-cflags.patch new file mode 100644 index 00000000..e4d61e0b --- /dev/null +++ b/SPECS/xxhash/xxhash-test-respect-cflags.patch @@ -0,0 +1,22 @@ +From: Bruno Pitrus +Date: 2024-05-05 19:35:03+0000 + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: xxHash-0.8.3/Makefile +=================================================================== +--- xxHash-0.8.3.orig/Makefile ++++ xxHash-0.8.3/Makefile +@@ -483,8 +483,8 @@ test-all: test test32 test-unicode clang + + .PHONY: test-tools + test-tools: +- CFLAGS=-Werror $(MAKE) -C tests/bench +- CFLAGS=-Werror $(MAKE) -C tests/collisions check ++ $(MAKE) -C tests/bench ++ $(MAKE) -C tests/collisions check + + .PHONY: test-xxh-nnn-sums + test-xxh-nnn-sums: xxhsum_and_links diff --git a/SPECS/xxhash/xxhash.spec b/SPECS/xxhash/xxhash.spec new file mode 100644 index 00000000..e7747132 --- /dev/null +++ b/SPECS/xxhash/xxhash.spec @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Jingwiw +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global sover 0 + +Name: xxhash +Version: 0.8.3 +Release: %autorelease +Summary: Extremely fast non-cryptographic hash algorithm +License: BSD-2-Clause AND GPL-2.0-only +URL: https://cyan4973.github.io/xxHash/ +#!RemoteAsset +Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}/%{name}-v%{version}.tar.gz + +# Patch0: Fix build failures on non-x86 arches with DISPATCH=1 enabled +Patch0: xxhash-fix-non-x86-dispatch.patch +# Patch1: Ensure test suite respects distro CFLAGS for security hardening +Patch1: xxhash-test-respect-cflags.patch + +BuildSystem: autotools + +BuildOption(build): DISPATCH=1 +BuildOption(install): PREFIX=%{_prefix} +BuildOption(install): BINDIR=%{_bindir} +BuildOption(install): LIBDIR=%{_libdir} + +BuildRequires: gcc, make, autoconf, automake, libtool +BuildRequires: pkgconfig + +%description +xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM +speed limits. It is used in many high-performance applications and libraries. + +%package devel +Summary: Development files for the xxHash library +License: BSD-2-Clause +Requires: xxhash = %{version}-%{release} + +%description devel +This package contains the headers, pkg-config file, and symbolic links +necessary for developing applications that use the xxHash library. + +%conf + +%install -a + +rm -f %{buildroot}%{_libdir}/libxxhash.a + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc README.md +%{_bindir}/* +%{_mandir}/man1/* +%{_libdir}/libxxhash.so.%{sover} +%{_libdir}/libxxhash.so.%{sover}.* + +%files devel +%{_includedir}/*.h +%{_libdir}/libxxhash.so +%{_libdir}/pkgconfig/libxxhash.pc + +%changelog +%{?autochangelog} diff --git a/SPECS/xz/xz.spec b/SPECS/xz/xz.spec new file mode 100644 index 00000000..44d3ae67 --- /dev/null +++ b/SPECS/xz/xz.spec @@ -0,0 +1,160 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +# avoid bootstrapping problem +%bcond static 0 +Name: xz +Version: 5.8.1 +Release: %autorelease +Summary: A Program for Compressing Files with the Lempel–Ziv–Markov algorithm +License: 0BSD AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later +URL: https://tukaani.org/xz/ +#!RemoteAsset +Source0: https://github.com/tukaani-project/xz/releases/download/v%{version}/xz-%{version}.tar.xz +#!RemoteAsset +Source1: https://github.com/tukaani-project/xz/releases/download/v%{version}/xz-%{version}.tar.xz.sig +#!RemoteAsset +Source3: https://tukaani.org/misc/lasse_collin_pubkey.txt#/xz.keyring +Source4: xznew +Source5: xznew.1 +BuildRequires: pkgconfig +Provides: lzma = %{version} +Obsoletes: lzma < %{version} + +BuildSystem: autotools +BuildOption(conf): --with-pic +BuildOption(conf): --docdir=%{_docdir}/%{name} +%if %{with static} +BuildOption(conf): --disable-shared +%else +BuildOption(conf): --disable-static +%endif +%description +The xz command is a program for compressing files. +* Average compression ratio of LZMA is about 30%% better than that of + gzip, and 15%% better than that of bzip2. +* Decompression speed is only little slower than that of gzip, being + two to five times faster than bzip2. +* In fast mode, compresses faster than bzip2 with a comparable + compression ratio. +* Achieving the best compression ratios takes four to even twelve + times longer than with bzip2. However, this does not affect + decompressing speed. +* Very similar command line interface to what gzip and bzip2 have. + +%package devel +Summary: Development package for the LZMA library +License: 0BSD +Requires: %{name} = %{version} +Provides: lzma-devel = %{version} +Obsoletes: lzma-devel < %{version} +Provides: lzma-alpha-devel = %{version} +Obsoletes: lzma-alpha-devel < %{version} + +%description devel +This package contains the header files and libraries needed for +compiling programs using the LZMA library. + +%if %{with static} +%package static +Summary: Static version of LZMA library +License: Public-Domain +Group: Development/Libraries/C and C++ +Requires: xz-devel = %{version} + +%description static +Static library for the LZMA library +%endif + +%build +export CFLAGS="%{optflags} -D_REENTRANT -pipe -fPIE" +export LDFLAGS="-Wl,-z,relro,-z,now -pie" +%make_build + +%if %{with static} +cp ./src/liblzma/.libs/liblzma.a liblzma.a +%endif + +%install -a +install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew +install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1 +%if %{with static} +install -Dpm 0644 liblzma.a %{buildroot}%{_libdir}/ +%endif +rm -vf %{buildroot}%{_docdir}/%{name}/{COPYING,COPYING.GPLv2} +%find_lang %{name} --all-name --with-man --generate-subpackages + +%ldconfig_scriptlets + +%files +%license COPYING COPYING.GPLv2 +%{_docdir}/%{name} +%{_bindir}/lzcat +%{_bindir}/lzcmp +%{_bindir}/lzdiff +%{_bindir}/lzegrep +%{_bindir}/lzfgrep +%{_bindir}/lzgrep +%{_bindir}/lzless +%{_bindir}/lzma +%{_bindir}/lzmadec +%{_bindir}/lzmainfo +%{_bindir}/lzmore +%{_bindir}/unlzma +%{_bindir}/unxz +%{_bindir}/xz +%{_bindir}/xzcat +%{_bindir}/xzcmp +%{_bindir}/xzdec +%{_bindir}/xzdiff +%{_bindir}/xzegrep +%{_bindir}/xzfgrep +%{_bindir}/xzgrep +%{_bindir}/xzless +%{_bindir}/xzmore +%{_bindir}/xznew +%{_mandir}/man1/lzcat.1* +%{_mandir}/man1/lzcmp.1* +%{_mandir}/man1/lzdiff.1* +%{_mandir}/man1/lzegrep.1* +%{_mandir}/man1/lzfgrep.1* +%{_mandir}/man1/lzgrep.1* +%{_mandir}/man1/lzless.1* +%{_mandir}/man1/lzma.1* +%{_mandir}/man1/lzmadec.1* +%{_mandir}/man1/lzmainfo.1* +%{_mandir}/man1/lzmore.1* +%{_mandir}/man1/unlzma.1* +%{_mandir}/man1/unxz.1* +%{_mandir}/man1/xz.1* +%{_mandir}/man1/xzcat.1* +%{_mandir}/man1/xzcmp.1* +%{_mandir}/man1/xzdec.1* +%{_mandir}/man1/xzdiff.1* +%{_mandir}/man1/xzegrep.1* +%{_mandir}/man1/xzfgrep.1* +%{_mandir}/man1/xzgrep.1* +%{_mandir}/man1/xzless.1* +%{_mandir}/man1/xzmore.1* +%{_mandir}/man1/xznew.1* +%{_libdir}/liblzma.so.5* + +%files devel +%license COPYING COPYING.GPLv2 +%{_includedir}/lzma.h +%dir %{_includedir}/lzma/ +%{_includedir}/lzma/* +%{_libdir}/liblzma.so +%{_libdir}/pkgconfig/liblzma.pc + +%if %{with static} +%files static +%license COPYING COPYING.GPLv2 +%{_libdir}/liblzma.a +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/xz/xznew b/SPECS/xz/xznew new file mode 100644 index 00000000..1b80e5f1 --- /dev/null +++ b/SPECS/xz/xznew @@ -0,0 +1,177 @@ +#!/bin/sh + +# Copyright (C) 2015 Hans-Peter Jansen +# Copyright (C) 1998, 2002, 2004 Free Software Foundation +# Copyright (C) 1993 Jean-loup Gailly + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +PATH="/usr/bin:$PATH"; export PATH +check=0 +pipe=0 +opt= +files= +keep=0 +res=0 +old=0 +new=0 +block=1024 +# block is the disk block size (best guess, need not be exact) + +warn="(does not preserve modes and timestamp)" +tmp=`mktemp -d ${TMPDIR-/tmp}/zfoo.XXXXXX` || { + echo 'cannot create temporary directory' >&2 + exit 1 +} +trap "rm -rf $tmp/" 0 1 2 3 6 13 15 +set -C +echo hi > $tmp/1 +echo hi > $tmp/2 +if test -z "`(${CPMOD-cpmod} $tmp/1 $tmp/2) 2>&1`"; then + cpmod=${CPMOD-cpmod} + warn="" +fi + +if test -z "$cpmod" && ${TOUCH-touch} -r $tmp/1 $tmp/2 2>/dev/null; then + cpmod="${TOUCH-touch}" + cpmodarg="-r" + warn="(does not preserve file modes)" +fi + +# check about xz extension +xz $tmp/1 > /dev/null 2>&1 +ext=`echo $tmp/1* | sed "s|$tmp/1||"` +rm -rf $tmp/ +trap - 0 1 2 3 6 13 15 +if test -z "$ext"; then + echo xznew: error determining xz extension + exit 1 +fi +if test "$ext" = ".gz"; then + echo xznew: cannot use .gz as xz extension. + exit 1 +fi + +for arg +do + case "$arg" in + -*) opt="$opt $arg"; shift;; + *) break;; + esac +done + +if test $# -eq 0; then + echo "recompress .gz or .tgz files into $ext (xz) files" + echo usage: `echo $0 | sed 's,^.*/,,'` "[-tv9KP]" file.gz... + echo " -t tests the new files before deleting originals" + echo " -v be verbose" + echo " -9 use the slowest compression method (optimal compression)" + echo " -K keep a .gz file when it is smaller than the $ext file" + echo " -P use pipes for the conversion $warn" + exit 1 +fi + +opt=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'` +case "$opt" in + *t*) check=1; opt=`echo "$opt" | sed 's/t//g'` +esac +case "$opt" in + *K*) keep=1; opt=`echo "$opt" | sed 's/K//g'` +esac +case "$opt" in + *P*) pipe=1; opt=`echo "$opt" | sed 's/P//g'` +esac +if test -n "$opt"; then + opt="-$opt" +fi + +for i do + m=`echo $i | sed 's/\.tgz$//'` + if test -f "$m.tgz" ; then + echo "Renaming file *.tgz to *.tar.gz" + mv "$i" "$m.tar.gz" + n=`echo $i | sed 's/\.tgz$/\.tar/'` + else + n=`echo $i | sed 's/\.gz$//'` + fi + if test ! -f "$n.gz" ; then + echo $n.gz not found + res=1; continue + fi + test $keep -eq 1 && old=`wc -c < "$n.gz"` + if test $pipe -eq 1; then + if gzip -d < "$n.gz" | xz $opt > "$n$ext"; then + # Copy file attributes from old file to new one, if possible. + test -n "$cpmod" && $cpmod $cpmodarg "$n.gz" "$n$ext" 2> /dev/null + else + echo error while recompressing $n.gz + res=1; continue + fi + else + if test $check -eq 1; then + if cp -p "$n.gz" "$n.$$" 2> /dev/null || cp "$n.gz" "$n.$$"; then + : + else + echo cannot backup "$n.gz" + res=1; continue + fi + fi + if gzip -d "$n.gz"; then + : + else + test $check -eq 1 && mv "$n.$$" "$n.gz" + echo error while uncompressing $n.gz + res=1; continue + fi + if xz $opt "$n"; then + : + else + if test $check -eq 1; then + mv "$n.$$" "$n.gz" && rm -f "$n" + echo error while recompressing $n + else + # gzip $n (might be dangerous if disk full) + echo error while recompressing $n, left uncompressed + fi + res=1; continue + fi + fi + test $keep -eq 1 && new=`wc -c < "$n$ext"` + if test $keep -eq 1 && test `expr \( $old + $block - 1 \) / $block` -lt \ + `expr \( $new + $block - 1 \) / $block`; then + if test $pipe -eq 1; then + rm -f "$n$ext" + elif test $check -eq 1; then + mv "$n.$$" "$n.gz" && rm -f "$n$ext" + else + xz -d "$n$ext" && gzip "$n" && rm -f "$n$ext" + fi + echo "$n.gz smaller than $n$ext -- unchanged" + + elif test $check -eq 1; then + if xz -t "$n$ext" ; then + rm -f "$n.$$" "$n.gz" + else + test $pipe -eq 0 && mv "$n.$$" "$n.gz" + rm -f "$n$ext" + echo error while testing $n$ext, $n.gz unchanged + res=1; continue + fi + elif test $pipe -eq 1; then + rm -f "$n.gz" + fi +done +exit $res diff --git a/SPECS/xz/xznew.1 b/SPECS/xz/xznew.1 new file mode 100644 index 00000000..a341f55b --- /dev/null +++ b/SPECS/xz/xznew.1 @@ -0,0 +1,39 @@ +.TH XZNEW 1 +.SH NAME +xznew \- recompress .gz or .tgz files to .xz files +.SH SYNOPSIS +.B xznew +[ -ftv9PK] [ name.gz ... ] +.SH DESCRIPTION +.I xznew +recompresses files from .gz (gzip) format to .xz (xz) format. +If you want to recompress a file already in xz format, rename the file +to force a .xz extension then apply xznew. +.SH OPTIONS +.TP +.B \-f +Force recompression from .gz to .xz format even if a .xz file already exists. +.TP +.B \-t +Tests the new files before deleting originals. +.TP +.B \-v +Verbose. Display the name and percentage reduction for each file compressed. +.TP +.B \-9 +Use the slowest compression method (optimal compression). +.TP +.B \-P +Use pipes for the conversion to reduce disk space usage. +.TP +.B \-K +Keep a .gz file when it is smaller than the .xz file +.SH "SEE ALSO" +xz(1), gzip(1) +.SH BUGS +.I xznew +does not maintain the time stamp with the -P option if +.I cpmod(1) +is not available and +.I touch(1) +does not support the -r option. diff --git a/SPECS/zchunk/zchunk.spec b/SPECS/zchunk/zchunk.spec new file mode 100644 index 00000000..4bb34d31 --- /dev/null +++ b/SPECS/zchunk/zchunk.spec @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: zchunk +Version: 1.5.1 +Release: %autorelease +Summary: Compressed file format that allows easy deltas +License: BSD-2-Clause AND MIT +URL: https://github.com/zchunk/zchunk +#!RemoteAsset +Source0: %{url}/archive/%{version}/zchunk-%{version}.tar.gz +BuildRequires: gcc +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(openssl) +BuildRequires: meson +Provides: bundled(buzhash-urlblock) = 0.1 +BuildSystem: meson +BuildOption(conf): -Dwith-openssl=enabled -Dwith-zstd=enabled + +%description +zchunk is a compressed file format that splits the file into independent +chunks. This allows you to only download the differences when downloading a +new version of the file, and also makes zchunk files efficient over rsync. +zchunk files are protected with strong checksums to verify that the file you +downloaded is in fact the file you wanted. + +%package devel +Summary: Headers for building against zchunk +Requires: %{name}%{_isa} = %{version}-%{release} + +%description devel +This package contains the headers necessary for building against the zchunk +library, libzck. + +%prep -a +# Remove bundled sha libraries +rm -rf src/lib/hash/sha* + +%install -a +mkdir -p %{buildroot}%{_libexecdir} +install contrib/gen_xml_dictionary %{buildroot}%{_libexecdir}/zck_gen_xml_dictionary + +%ldconfig_scriptlets + +%files +%doc README.md contrib +%{_bindir}/zck* +%{_bindir}/unzck +%{_libexecdir}/zck_gen_xml_dictionary +%{_mandir}/man1/*.gz +%{_libdir}/libzck.so.* + +%files devel +%doc zchunk_format.txt +%{_libdir}/libzck.so +%{_libdir}/pkgconfig/zck.pc +%{_includedir}/zck.h + +%changelog +%{?autochangelog} diff --git a/SPECS/zip/0001-zip-3.0-exec-shield.patch b/SPECS/zip/0001-zip-3.0-exec-shield.patch new file mode 100644 index 00000000..bf232d1e --- /dev/null +++ b/SPECS/zip/0001-zip-3.0-exec-shield.patch @@ -0,0 +1,19 @@ +--- a/crc_i386.S ++++ b/crc_i386.S +@@ -302,3 +302,6 @@ _crc32: /* ulg c + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++.section .note.GNU-stack, "", @progbits ++.previous + +--- a/match.S ++++ b/match.S +@@ -405,3 +405,6 @@ L__return: + #endif /* i386 || _I386 || _i386 || __i386 */ + + #endif /* !USE_ZLIB */ ++ ++.section .note.GNU-stack, "", @progbits ++.previous diff --git a/SPECS/zip/0002-zip-3.0-currdir.patch b/SPECS/zip/0002-zip-3.0-currdir.patch new file mode 100644 index 00000000..bc6d8607 --- /dev/null +++ b/SPECS/zip/0002-zip-3.0-currdir.patch @@ -0,0 +1,10 @@ +--- a/util.c ++++ b/util.c +@@ -493,6 +493,8 @@ int cs; /* force case-se + /* Compare the sh pattern p with the string s and return true if they match, + false if they don't or if there is a syntax error in the pattern. */ + { ++ while (s[0] == '.' && s[1] == '/') ++ s += 2; /* strip redundant leading "./" sections */ + return recmatch(p, s, cs) == 1; + } diff --git a/SPECS/zip/0003-zip-3.0-time.patch b/SPECS/zip/0003-zip-3.0-time.patch new file mode 100644 index 00000000..2ef36190 --- /dev/null +++ b/SPECS/zip/0003-zip-3.0-time.patch @@ -0,0 +1,11 @@ +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -29,7 +29,7 @@ + E = + + # probably can change this to 'install' if you have it +-INSTALL_PROGRAM = cp ++INSTALL_PROGRAM = cp -p + # probably can change this to 'install -d' if you have it + # XXX NextStep 3.3 and Openstep 4.x don't know about -p ! + INSTALL_D = mkdir -p diff --git a/SPECS/zip/0004-man.patch b/SPECS/zip/0004-man.patch new file mode 100644 index 00000000..8c81f5bb --- /dev/null +++ b/SPECS/zip/0004-man.patch @@ -0,0 +1,41 @@ +--- a/man/zipsplit.1 ++++ b/man/zipsplit.1 +@@ -12,6 +12,7 @@ + .RB [ \-r\ room ] + .RB [ \-b\ path ] + .RB [ \-h ] ++.RB [ \-q ] + .RB [ \-v ] + .RB [ \-L ] + zipfile +@@ -47,6 +48,9 @@ + .BI \-h + Show a short help. + .TP ++.BI \-q ++Suppress some informational messages. ++.TP + .BI \-v + Show version information. + .TP + +--- a/man/zipnote.1 ++++ b/man/zipnote.1 +@@ -7,6 +7,7 @@ + .RB [ \-w ] + .RB [ \-b\ path ] + .RB [ \-h ] ++.RB [ \-q ] + .RB [ \-v ] + .RB [ \-L ] + zipfile +@@ -27,6 +28,9 @@ + .BI \-h + Show a short help. + .TP ++.BI \-q ++Suppress some informational messages. ++.TP + .BI \-v + Show version information. + .TP diff --git a/SPECS/zip/0005-zip-3.0-format-security.patch b/SPECS/zip/0005-zip-3.0-format-security.patch new file mode 100644 index 00000000..54ce2e66 --- /dev/null +++ b/SPECS/zip/0005-zip-3.0-format-security.patch @@ -0,0 +1,20 @@ +--- a/zip.c ++++ a/zip.c +@@ -1028,7 +1028,7 @@ local void help_extended() + + for (i = 0; i < sizeof(text)/sizeof(char *); i++) + { +- printf(text[i]); ++ printf("%s", text[i]); + putchar('\n'); + } + #ifdef DOS +@@ -1225,7 +1225,7 @@ local void version_info() + CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE); + for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++) + { +- printf(cryptnote[i]); ++ printf("%s", cryptnote[i]); + putchar('\n'); + } + ++i; /* crypt support means there IS at least one compilation option */ diff --git a/SPECS/zip/0006-zipnote.patch b/SPECS/zip/0006-zipnote.patch new file mode 100644 index 00000000..430f8ea7 --- /dev/null +++ b/SPECS/zip/0006-zipnote.patch @@ -0,0 +1,13 @@ +diff --git a/zipnote.c b/zipnote.c +index 5e02cb6..996f012 100644 +--- a/zipnote.c ++++ b/zipnote.c +@@ -661,7 +661,7 @@ + if ((r = zipcopy(z)) != ZE_OK) + ziperr(r, "was copying an entry"); + } +- fclose(x); ++ fclose(in_file); + + /* Write central directory and end of central directory with new comments */ + if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */ diff --git a/SPECS/zip/0007-zip-gnu89-build.patch b/SPECS/zip/0007-zip-gnu89-build.patch new file mode 100644 index 00000000..eef096a8 --- /dev/null +++ b/SPECS/zip/0007-zip-gnu89-build.patch @@ -0,0 +1,15 @@ +zip uses C89-only features, so it needs to be built in C89 mode. + +diff --git a/unix/Makefile b/unix/Makefile +index 86cf54bf0f56cea9..244390893eab5fc6 100644 +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -202,7 +202,7 @@ generic: flags + eval $(MAKE) $(MAKEF) zips `cat flags` + + generic_gcc: +- $(MAKE) $(MAKEF) generic CC=gcc CPP="gcc -E" ++ $(MAKE) $(MAKEF) generic CC="gcc -std=gnu89" CPP="gcc -E" + + # AT&T 6300 PLUS (don't know yet how to allocate 64K bytes): + att6300nodir: diff --git a/SPECS/zip/0008-buffer_overflow.patch b/SPECS/zip/0008-buffer_overflow.patch new file mode 100644 index 00000000..1b7e23fe --- /dev/null +++ b/SPECS/zip/0008-buffer_overflow.patch @@ -0,0 +1,11 @@ +--- a/fileio.c ++++ b/fileio.c +@@ -3502,7 +3502,7 @@ + if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) { + ZIPERR(ZE_MEM, "local_to_wide_string"); + } +- wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1); ++ wsize = mbstowcs(wc_string, local_string, wsize + 1); + wc_string[wsize] = (wchar_t) 0; + + /* in case wchar_t is not zwchar */ diff --git a/SPECS/zip/0009-zip-3.0-man-strip-extra.patch b/SPECS/zip/0009-zip-3.0-man-strip-extra.patch new file mode 100644 index 00000000..074e0fc2 --- /dev/null +++ b/SPECS/zip/0009-zip-3.0-man-strip-extra.patch @@ -0,0 +1,11 @@ +--- a/man/zip.1 ++++ b/man/zip.1 +@@ -2297,7 +2297,7 @@ + .B \-X + .TP + .PD +-.B \-\-no\-extra ++.B \-\-strip\-extra + Do not save extra file attributes (Extended Attributes on OS/2, uid/gid + and file times on Unix). The zip format uses extra fields to include + additional information for each entry. Some extra fields are specific diff --git a/SPECS/zip/zip.spec b/SPECS/zip/zip.spec new file mode 100644 index 00000000..427b48b3 --- /dev/null +++ b/SPECS/zip/zip.spec @@ -0,0 +1,80 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: ayostl +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: zip +Version: 3.0 +Release: %autorelease +Summary: A file compression and packaging utility compatible with PKZIP +License: Info-ZIP +URL: http://www.info-zip.org/Zip.html +#!RemoteAsset +Source0: http://downloads.sourceforge.net/infozip/zip30.tar.gz +BuildSystem: autotools + +# all patch get from fedora +# This patch will probably be merged to zip 3.1 +# http://www.info-zip.org/board/board.pl?m-1249408491/ +Patch0: 0001-zip-3.0-exec-shield.patch +# Not upstreamed. +Patch1: 0002-zip-3.0-currdir.patch +# Not upstreamed. +Patch2: 0003-zip-3.0-time.patch +Patch3: 0004-man.patch +Patch4: 0005-zip-3.0-format-security.patch +Patch5: 0006-zipnote.patch +Patch6: 0007-zip-gnu89-build.patch +Patch7: 0008-buffer_overflow.patch +Patch8: 0009-zip-3.0-man-strip-extra.patch + +BuildOption(build): -f unix/Makefile +BuildOption(build): prefix=%{_prefix} +BuildOption(build): "CFLAGS_NOOPT=-I. -DUNIX $RPM_OPT_FLAGS" +BuildOption(build): generic_gcc + +BuildOption(install): -f unix/Makefile +BuildOption(install): prefix=$RPM_BUILD_ROOT%{_prefix} +BuildOption(install): MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 + +BuildRequires: make +BuildRequires: bzip2-devel +BuildRequires: gcc + +Requires: unzip + +%description +The zip program is a compression and file packaging utility. Zip is +analogous to a combination of the UNIX tar and compress commands and +is compatible with PKZIP (a compression and file packaging utility for +MS-DOS systems). + +Install the zip package if you need to compress files using the zip +program. + +%conf + +%install -p +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BULD_ROOT%{_mandir}/man1 + +# no tests +%check + +%files +%license LICENSE +%doc README CHANGES TODO WHATSNEW WHERE README.CR +%doc proginfo/algorith.txt +%{_bindir}/zipnote +%{_bindir}/zipsplit +%{_bindir}/zip +%{_bindir}/zipcloak +%{_mandir}/man1/zip.1* +%{_mandir}/man1/zipcloak.1* +%{_mandir}/man1/zipnote.1* +%{_mandir}/man1/zipsplit.1* + +%changelog +%{?autochangelog} diff --git a/SPECS/zlib-ng/zlib-ng.spec b/SPECS/zlib-ng/zlib-ng.spec new file mode 100644 index 00000000..bb5ba4d6 --- /dev/null +++ b/SPECS/zlib-ng/zlib-ng.spec @@ -0,0 +1,98 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: yyjeqhc <1772413353@qq.com> +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond zlib_compat 1 +%bcond systemtap 0 + +Name: zlib-ng +Version: 2.2.5 +Release: %autorelease +Summary: Zlib replacement with SIMD optimizations +License: Zlib +URL: https://github.com/zlib-ng/zlib-ng +#!RemoteAsset +Source: https://github.com/zlib-ng/zlib-ng/archive/refs/tags/%{version}.tar.gz +BuildSystem: cmake + +BuildOption(conf): -DINSTALL_LIB_DIR=%{_libdir} +BuildOption(conf): -DWITH_RVV:BOOL=ON +BuildOption(conf): -DWITH_GTEST:BOOL=OFF +BuildOption(conf): -DWITH_NEW_STRATEGIES:BOOL=OFF +BuildOption(conf): -DWITH_ARMV6:BOOL=OFF +%if %{with zlib_compat} +BuildOption(conf): -DZLIB_COMPAT:BOOL=ON +%else +BuildOption(conf): -DZLIB_COMPAT:BOOL=OFF +%endif + +BuildRequires: cmake gcc gcc-c++ +%if %{with systemtap} +BuildRequires: systemtap-sdt-devel +%endif + +%description +zlib-ng is a zlib replacement with support for CPU intrinsics. +%if %{with zlib_compat} +This package provides a drop-in zlib-compatible library. +%endif + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version} +%if %{with zlib_compat} +Conflicts: zlib-devel +Provides: zlib-devel = %{version} +%endif + +%description devel +The %{name}-devel package contains header files and development libraries for zlib-ng. + + +%install -a +%if %{with zlib_compat} +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +mkdir -p %{buildroot}%{_libdir}/zlib-ng-compat +(cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/zlib-ng-compat-%{_arch}.conf) <<-EOF + %{_libdir}/zlib-ng-compat + EOF +cd %{buildroot}%{_libdir}/ + mv libz.so.* zlib-ng-compat/ + ln -sf zlib-ng-compat/libz.so.1 libz.so +%endif + +%ldconfig_scriptlets + +%files +%license LICENSE.md +%doc README.md +%if %{with zlib_compat} +%config %{_sysconfdir}/ld.so.conf.d/zlib-ng-compat-%{_arch}.conf +%{_libdir}/libz.so* +%{_libdir}/zlib-ng-compat/libz.so* +%else +%{_libdir}/libz-ng.so.2* +%endif + +%files devel +%if %{with zlib_compat} +%{_includedir}/zconf.h +%{_includedir}/zlib.h +%{_includedir}/zlib_name_mangling.h +%{_libdir}/libz.so +%{_libdir}/pkgconfig/zlib.pc +%{_libdir}/cmake/ZLIB/ +%else +%{_includedir}/zconf-ng.h +%{_includedir}/zlib-ng.h +%{_includedir}/zlib_name_mangling-ng.h +%{_libdir}/libz-ng.so +%{_libdir}/pkgconfig/zlib-ng.pc +%{_libdir}/cmake/zlib-ng/ +%endif + +%changelog +%{?autochangelog} diff --git a/SPECS/zlib/0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch b/SPECS/zlib/0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch new file mode 100644 index 00000000..8e00207f --- /dev/null +++ b/SPECS/zlib/0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch @@ -0,0 +1,28 @@ +From bb5eec59e3ec66f6dccb79b1900aa806a1cca12e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Fri, 8 Dec 2017 14:59:08 +0100 +Subject: [PATCH] Do not try to store negative values in unsigned int + +--- + deflate.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/deflate.c b/deflate.c +index 1ec7614..1bad1eb 100644 +--- a/deflate.c ++++ b/deflate.c +@@ -1536,7 +1536,10 @@ local void fill_window(s) + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead + s->insert >= MIN_MATCH) { +- uInt str = s->strstart - s->insert; ++ uInt str = 0; ++ /* storing negative values to uInt is not good idea */ ++ if (s->strstart - s->insert > 0) ++ str = s->strstart - s->insert; + s->ins_h = s->window[str]; + UPDATE_HASH(s, s->ins_h, s->window[str + 1]); + #if MIN_MATCH != 3 +-- +2.15.1 + diff --git a/SPECS/zlib/LICENSE b/SPECS/zlib/LICENSE new file mode 100644 index 00000000..68c2fab7 --- /dev/null +++ b/SPECS/zlib/LICENSE @@ -0,0 +1,354 @@ +The zlib library itself is released under specific zlib license see +zlib.h in tarball + +However files (relative to extracted source tarballs root) + contrib/asm586/match.S + contrib/masm686/match.asm + contrib/masmx86/gvmat32.asm + contrib/ada/zlib.ads + +which are not used to build zlib library, but are shipped in source +of zlib are release under the GNU General Public License, see the +text of the GNU GPL below. + +--------------------------------------------------------------- + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE 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. + + 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 +convey 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 2 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, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision 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, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This 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 Library General +Public License instead of this License. diff --git a/SPECS/zlib/zlib-format.patch b/SPECS/zlib/zlib-format.patch new file mode 100644 index 00000000..c8047871 --- /dev/null +++ b/SPECS/zlib/zlib-format.patch @@ -0,0 +1,20 @@ +From: meissner@suse.de +Subject: supply format arguments to gzprintf(). + +Index: zlib.h +=================================================================== +--- zlib.h.orig ++++ zlib.h +@@ -1465,7 +1465,11 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((vo + is returned, and the error state is set to Z_STREAM_ERROR. + */ + +-ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); ++ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) ++#ifdef __GNUC__ ++ __attribute__((__format__(__printf__,2,3))) ++#endif ++; + /* + Convert, format, compress, and write the arguments (...) to file under + control of the string format, as in fprintf. gzprintf returns the number of diff --git a/SPECS/zlib/zlib-no-version-check.patch b/SPECS/zlib/zlib-no-version-check.patch new file mode 100644 index 00000000..20b301ca --- /dev/null +++ b/SPECS/zlib/zlib-no-version-check.patch @@ -0,0 +1,45 @@ +Index: zlib-1.3/infback.c +=================================================================== +--- zlib-1.3.orig/infback.c ++++ zlib-1.3/infback.c +@@ -27,9 +27,6 @@ int ZEXPORT inflateBackInit_(z_streamp s + int stream_size) { + struct inflate_state FAR *state; + +- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || +- stream_size != (int)(sizeof(z_stream))) +- return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL || + windowBits < 8 || windowBits > 15) + return Z_STREAM_ERROR; +Index: zlib-1.3/inflate.c +=================================================================== +--- zlib-1.3.orig/inflate.c ++++ zlib-1.3/inflate.c +@@ -180,9 +180,6 @@ int ZEXPORT inflateInit2_(z_streamp strm + int ret; + struct inflate_state FAR *state; + +- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || +- stream_size != (int)(sizeof(z_stream))) +- return Z_VERSION_ERROR; + if (strm == Z_NULL) return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +Index: zlib-1.3/deflate.c +=================================================================== +--- zlib-1.3.orig/deflate.c ++++ zlib-1.3/deflate.c +@@ -384,12 +384,7 @@ int ZEXPORT deflateInit2_(z_streamp strm + const char *version, int stream_size) { + deflate_state *s; + int wrap = 1; +- static const char my_version[] = ZLIB_VERSION; + +- if (version == Z_NULL || version[0] != my_version[0] || +- stream_size != sizeof(z_stream)) { +- return Z_VERSION_ERROR; +- } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; diff --git a/SPECS/zlib/zlib.spec b/SPECS/zlib/zlib.spec new file mode 100644 index 00000000..36770ec8 --- /dev/null +++ b/SPECS/zlib/zlib.spec @@ -0,0 +1,189 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: zlib +Version: 1.3.1 +Release: %autorelease +Summary: Library implementing the DEFLATE compression algorithm +License: Zlib +URL: https://www.zlib.net/ +#!RemoteAsset +Source0: https://zlib.net/zlib-%{version}.tar.gz +#!RemoteAsset +Source1: https://zlib.net/zlib-%{version}.tar.gz.asc +Source4: LICENSE +Patch1: zlib-format.patch +Patch2: 0001-Do-not-try-to-store-negative-values-in-unsigned-int.patch +# we should simply rely on soname versioning to protect us +Patch3: zlib-no-version-check.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig + +%description +zlib is a general-purpose lossless data-compression library, +implementing an API for the DEFLATE algorithm, the latter of +which is being used by, for example, gzip and the ZIP archive +format. + +%package -n libz1 +Summary: Library implementing the DEFLATE compression algorithm +Provides: %{name} = %{version}-%{release} +Obsoletes: %{name} < %{version}-%{release} + +%description -n libz1 +zlib is a general-purpose lossless data-compression library, +implementing an API for the DEFLATE algorithm, the latter of +which is being used by, for example, gzip and the ZIP archive +format. + +%package devel +Summary: Development files for zlib, a data compression library +Requires: glibc-devel +Requires: libz1 = %{version} + +%description devel +zlib is a general-purpose lossless data-compression library, +implementing an API for the DEFLATE algorithm, the latter of +which is being used by, for example, gzip and the ZIP archive +format. + +This subpackage holds the development headers for the library. + +The zlib data format is itself portable across platforms. Unlike the +LZW compression method used in unix compress(1) and in the GIF image +format, the compression method currently used in zlib essentially +never expands the data. (LZW can double or triple the file size in +extreme cases.) zlib's memory footprint is also independent of the +input data and can be reduced, if necessary, at some cost in +compression. + +%package devel-static +Summary: Static library for zlib +Requires: %{name}-devel = %{version} +Provides: %{name}-devel:%{_libdir}/libz.a + +%description devel-static +zlib is a general-purpose lossless data-compression library, +implementing an API for the DEFLATE algorithm, the latter of +which is being used by, for example, gzip and the ZIP archive +format. + +This subpackage contains the static version of the library +used for development. + +%package -n libminizip1 +Summary: Library for manipulation with .zip archives + +%description -n libminizip1 +Minizip is a library for manipulation with files from .zip archives. + +%package -n minizip-devel +Summary: Development files for the minizip library +Requires: %{name}-devel = %{version} +Requires: libminizip1 = %{version} +Requires: pkgconfig + +%description -n minizip-devel +This package contains the libraries and header files needed for +developing applications which use minizip. + +%package testsuite +Summary: Provide the test examples to reproduce test suite +Requires: libz1 = %{version} + +%description testsuite +To run the testsuite, execute %{_libexecdir}/%{name}/testsuite + +It should exit 0 + +%prep +%autosetup +cp %{SOURCE4} . + +%conf +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +export LDFLAGS="-Wl,-z,relro,-z,now" +# For sure not autotools build +CC="cc" CFLAGS="%{optflags}" ./configure \ + --shared \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + %{nil} + +%build +%make_build + +# And build minizip +cd contrib/minizip +autoreconf -fvi +%configure \ + --disable-static \ + --disable-silent-rules +%make_build + +%check +%make_build check + +%install +mkdir -p %{buildroot}%{_libdir} +%make_install +# manpage +install -m 644 zlib.3 %{buildroot}%{_mandir}/man3 +install -m 644 zutil.h %{buildroot}%{_includedir} +# examples +mkdir -p %{buildroot}%{_docdir}/%{name} +cp -r examples/ %{buildroot}%{_docdir}/%{name}/ + +install -D examplesh %{buildroot}%{_libexecdir}/%{name}/testsuite + +# Install minizip +cd contrib/minizip +%make_install +find %{buildroot} -type f -name "*.la" -delete -print + +%post -n libz1 -p /sbin/ldconfig +%postun -n libz1 -p /sbin/ldconfig +%post -n libminizip1 -p /sbin/ldconfig +%postun -n libminizip1 -p /sbin/ldconfig + +%files -n libz1 +%license LICENSE +%{_libdir}/libz.so.1.3.1 +%{_libdir}/libz.so.1 + +%files devel +%doc README ChangeLog +%dir %{_docdir}/%{name}/ +%dir %{_docdir}/%{name}/examples +%{_docdir}/%{name}/examples/* +%{_mandir}/man3/zlib.3%{?ext_man} +%{_includedir}/zlib.h +%{_includedir}/zconf.h +%{_includedir}/zutil.h +%{_libdir}/libz.so +%{_libdir}/pkgconfig/zlib.pc + +%files -n libminizip1 +%doc contrib/minizip/MiniZip64_info.txt contrib/minizip/MiniZip64_Changes.txt +%{_libdir}/libminizip.so.* + +%files -n minizip-devel +%dir %{_includedir}/minizip +%{_includedir}/minizip/*.h +%{_libdir}/libminizip.so +%{_libdir}/pkgconfig/minizip.pc + +%files devel-static +%{_libdir}/libz.a + +%files testsuite +%dir %{_libexecdir}/%{name} +%{_libexecdir}/%{name}/testsuite + +%changelog +%{?autochangelog} diff --git a/SPECS/zsh/0001-zsh-Use-int-main-in-test-c-codes.patch b/SPECS/zsh/0001-zsh-Use-int-main-in-test-c-codes.patch new file mode 100644 index 00000000..3585cc41 --- /dev/null +++ b/SPECS/zsh/0001-zsh-Use-int-main-in-test-c-codes.patch @@ -0,0 +1,541 @@ +commit ab4d62eb975a4c4c51dd35822665050e2ddc6918 +Author: Nicholas Vinson +Date: Wed Sep 21 09:22:11 2022 +0900 + + 50641: use 'int main()' in test C-codes in configure + +diff --git a/aczsh.m4 b/aczsh.m4 +index 1209ac614..b31236020 100644 +--- a/aczsh.m4 ++++ b/aczsh.m4 +@@ -44,6 +44,7 @@ AC_DEFUN(zsh_64_BIT_TYPE, + #include + #endif + ++int + main() + { + $1 foo = 0; +@@ -118,7 +119,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -146,29 +146,30 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle1, *handle2; + void *(*zsh_getaddr1)(), *(*zsh_getaddr2)(); + void *sym1, *sym2; + handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle1) exit(1); ++ if(!handle1) return(1); + handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle2) exit(1); ++ if(!handle2) return(1); + zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1"); + zsh_getaddr2 = (void *(*)()) dlsym(handle2, "${us}zsh_getaddr2"); + sym1 = zsh_getaddr1(); + sym2 = zsh_getaddr2(); +- if(!sym1 || !sym2) exit(1); +- if(sym1 != sym2) exit(1); ++ if(!sym1 || !sym2) return(1); ++ if(sym1 != sym2) return(1); + dlclose(handle1); + handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle1) exit(1); ++ if(!handle1) return(1); + zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1"); + sym1 = zsh_getaddr1(); +- if(!sym1) exit(1); +- if(sym1 != sym2) exit(1); +- exit(0); ++ if(!sym1) return(1); ++ if(sym1 != sym2) return(1); ++ return(0); + } + ]])],[zsh_cv_shared_$1=yes], + [zsh_cv_shared_$1=no], +@@ -200,7 +201,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -228,19 +228,19 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + +- ++int + main() + { + void *handle1, *handle2; + int (*fred1)(), (*fred2)(); + handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle1) exit(1); ++ if(!handle1) return(1); + handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle2) exit(1); ++ if(!handle2) return(1); + fred1 = (int (*)()) dlsym(handle1, "${us}fred"); + fred2 = (int (*)()) dlsym(handle2, "${us}fred"); +- if(!fred1 || !fred2) exit(1); +- exit((*fred1)() != 42 || (*fred2)() != 69); ++ if(!fred1 || !fred2) return(1); ++ return((*fred1)() != 42 || (*fred2)() != 69); + } + ]])],[zsh_cv_sys_dynamic_clash_ok=yes], + [zsh_cv_sys_dynamic_clash_ok=no], +@@ -276,7 +276,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -304,17 +303,18 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*barneysym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + handle = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + barneysym = (int (*)()) dlsym(handle, "${us}barney"); +- if(!barneysym) exit(1); +- exit((*barneysym)() != 69); ++ if(!barneysym) return(1); ++ return((*barneysym)() != 69); + } + ]])],[zsh_cv_sys_dynamic_rtld_global=yes], + [zsh_cv_sys_dynamic_rtld_global=no], +@@ -346,7 +346,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + save_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -374,15 +373,16 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*barneysym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + barneysym = (int (*)()) dlsym(handle, "${us}barney"); +- if(!barneysym) exit(1); +- exit((*barneysym)() != 69); ++ if(!barneysym) return(1); ++ return((*barneysym)() != 69); + } + + int fred () { return 42; } +@@ -420,7 +420,6 @@ elif + save_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s" + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -448,15 +447,16 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*barneysym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + barneysym = (int (*)()) dlsym(handle, "${us}barney"); +- if(!barneysym) exit(1); +- exit((*barneysym)() != 69); ++ if(!barneysym) return(1); ++ return((*barneysym)() != 69); + } + + int fred () { return 42; } +@@ -488,7 +488,6 @@ echo 'int fred () { return 42; }' > conftest1.c + if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -516,15 +515,16 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*fredsym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + fredsym = (int (*)()) dlsym(handle, "${us}fred"); +- if(!fredsym) exit(1); +- exit((*fredsym)() != 42); ++ if(!fredsym) return(1); ++ return((*fredsym)() != 42); + } + ]])],[zsh_cv_sys_dynamic_strip_lib=yes], + [zsh_cv_sys_dynamic_strip_lib=no], +diff --git a/configure.ac b/configure.ac +index 890ef8dd2..074141d38 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -585,7 +585,7 @@ fi + dnl Checking if compiler correctly cast signed to unsigned. + AC_CACHE_CHECK(if signed to unsigned casting is broken, + zsh_cv_c_broken_signed_to_unsigned_casting, +-[AC_RUN_IFELSE([AC_LANG_SOURCE([[main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])]) ++[AC_RUN_IFELSE([AC_LANG_SOURCE([[int main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])]) + AH_TEMPLATE([BROKEN_SIGNED_TO_UNSIGNED_CASTING], + [Define to 1 if compiler incorrectly cast signed to unsigned.]) + if test x$zsh_cv_c_broken_signed_to_unsigned_casting = xyes; then +@@ -1046,7 +1046,7 @@ else + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + +-main() { return sizeof(off_t) < 8; } ++int main() { return sizeof(off_t) < 8; } + ]])],[zsh_cv_off_t_is_64_bit=yes],[zsh_cv_off_t_is_64_bit=no],[zsh_cv_off_t_is_64_bit=no])]) + if test x$zsh_cv_off_t_is_64_bit = xyes; then + AC_DEFINE(OFF_T_IS_64_BIT) +@@ -1056,7 +1056,7 @@ main() { return sizeof(off_t) < 8; } + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + +-main() { return sizeof(ino_t) < 8; } ++int main() { return sizeof(ino_t) < 8; } + ]])],[zsh_cv_ino_t_is_64_bit=yes],[zsh_cv_ino_t_is_64_bit=no],[zsh_cv_ino_t_is_64_bit=no])]) + if test x$zsh_cv_ino_t_is_64_bit = xyes; then + AC_DEFINE(INO_T_IS_64_BIT) +@@ -1369,7 +1369,7 @@ zsh_cv_func_realpath_accepts_null, + #include + #include + ],[ +-exit(!realpath("/", (char*)0)); ++return(!realpath("/", (char*)0)); + ])], + [zsh_cv_func_realpath_accepts_null=yes], + [zsh_cv_func_realpath_accepts_null=no], +@@ -1393,10 +1393,9 @@ AC_CACHE_CHECK(if tgetent accepts NULL, + zsh_cv_func_tgetent_accepts_null, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +-#include + int tgetent(char *, char *); + char *tgetstr(char *, char **); +-main() ++int main() + { + char buf[4096]; + int r1 = tgetent(buf, "vt100"); +@@ -1407,7 +1406,7 @@ main() + tgetstr("cl", &u); + creat("conftest.tgetent", 0640); + } +- exit((r1 != r2) || r2 == -1); ++ return((r1 != r2) || r2 == -1); + } + ]])],[if test -f conftest.tgetent; then + zsh_cv_func_tgetent_accepts_null=yes +@@ -1421,10 +1420,9 @@ AC_CACHE_CHECK(if tgetent returns 0 on success, + zsh_cv_func_tgetent_zero_success, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +-#include + int tgetent(char *, char*); + char *tgetstr(char *, char **); +-main() ++int main() + { + char buf[4096]; + int r1 = tgetent(buf, "!@#$%^&*"); +@@ -1435,7 +1433,7 @@ main() + tgetstr("cl", &u); + creat("conftest.tgetent0", 0640); + } +- exit(r1 == r2); ++ return(r1 == r2); + } + ]])],[if test -f conftest.tgetent0; then + zsh_cv_func_tgetent_zero_success=yes +@@ -1869,8 +1867,7 @@ zsh_cv_rlim_t_is_longer, + #include + #endif + #include +-#include +-main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])]) ++int main(){struct rlimit r;return(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])]) + if test x$zsh_cv_rlim_t_is_longer = xyes; then + AC_CACHE_CHECK(if rlim_t is a quad, + zsh_cv_rlim_t_is_quad_t, +@@ -1880,13 +1877,12 @@ if test x$zsh_cv_rlim_t_is_longer = xyes; then + #endif + #include + #include +-#include +-main() { ++int main() { + struct rlimit r; + char buf[20]; + r.rlim_cur = 0; + sprintf(buf, "%qd", r.rlim_cur); +- exit(strcmp(buf, "0")); ++ return(strcmp(buf, "0")); + }]])],[zsh_cv_rlim_t_is_quad_t=yes],[zsh_cv_rlim_t_is_quad_t=no],[zsh_cv_rlim_t_is_quad_t=no])]) + if test x$zsh_cv_rlim_t_is_quad_t = xyes; then + AC_DEFINE(RLIM_T_IS_QUAD_T) +@@ -1903,8 +1899,7 @@ else + #include + #endif + #include +-#include +- main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])]) ++ int main(){struct rlimit r;r.rlim_cur=-1;return(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])]) + if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then + AC_DEFINE(RLIM_T_IS_UNSIGNED) + DEFAULT_RLIM_T="unsigned $DEFAULT_RLIM_T" +@@ -2187,9 +2182,8 @@ zsh_cv_sys_fifo, + #include + #include + #include +-#include + #include +-main() ++int main() + { + char c; + int fd; +@@ -2200,18 +2194,18 @@ main() + #else + if(mknod("/tmp/fifo$$", 0010600, 0) < 0) + #endif +- exit(1); ++ return(1); + pid = fork(); + if(pid < 0) +- exit(1); ++ return(1); + if(pid) { + fd = open("/tmp/fifo$$", O_RDONLY); +- exit(fd < 0 || read(fd, &c, 1) != 1 || c != 'x'); ++ return(fd < 0 || read(fd, &c, 1) != 1 || c != 'x'); + } + fd = open("/tmp/fifo$$", O_WRONLY); + ret = (fd < 0 || write(fd, "x", 1) < 1); + unlink("/tmp/fifo$$"); +- exit(ret); ++ return(ret); + } + ]])],[zsh_cv_sys_fifo=yes],[zsh_cv_sys_fifo=no],[zsh_cv_sys_fifo=yes]) + ]) +@@ -2289,8 +2283,7 @@ zsh_cv_sys_link, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include +-#include +-main() ++int main() + { + int ret; + char *tmpfile, *newfile; +@@ -2299,11 +2292,11 @@ main() + unlink(tmpfile); + unlink(newfile); + if(creat(tmpfile, 0644) < 0) +- exit(1); ++ return(1); + ret = link(tmpfile, newfile); + unlink(tmpfile); + unlink(newfile); +- exit(ret<0); ++ return(ret<0); + } + ]])],[zsh_cv_sys_link=yes],[zsh_cv_sys_link=no],[zsh_cv_sys_link=yes])]) + AH_TEMPLATE([HAVE_LINK], +@@ -2322,12 +2315,11 @@ zsh_cv_sys_killesrch, + #include + #include + #include +-#include +-main() ++int main() + { + int pid = (getpid() + 10000) & 0xffffff; + while (pid && (kill(pid, 0) == 0 || errno != ESRCH)) pid >>= 1; +- exit(errno!=ESRCH); ++ return(errno!=ESRCH); + } + ]])],[zsh_cv_sys_killesrch=yes],[zsh_cv_sys_killesrch=no],[zsh_cv_sys_killesrch=yes])]) + AH_TEMPLATE([BROKEN_KILL_ESRCH], +@@ -2348,12 +2340,11 @@ if test x$signals_style = xPOSIX_SIGNALS; then + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include +-#include + int child=0; + void handler(sig) + int sig; + {if(sig==SIGCHLD) child=1;} +-main() { ++int main() { + struct sigaction act; + sigset_t set; + int pid, ret; +@@ -2368,7 +2359,7 @@ main() { + if(pid>0) { + sigemptyset(&set); + ret=sigsuspend(&set); +- exit(child==0); ++ return(child==0); + } + } + ]])],[zsh_cv_sys_sigsuspend=yes],[zsh_cv_sys_sigsuspend=no],[zsh_cv_sys_sigsuspend=yes])]) +@@ -2400,15 +2391,14 @@ case "x$zsh_working_tcsetpgrp" in + #include + #include + #include +-#include +-main() { ++int main() { + int fd; + int ret; + fd=open("/dev/tty", O_RDWR); +- if (fd < 0) exit(2); ++ if (fd < 0) return(2); + ret=tcsetpgrp(fd, tcgetpgrp(fd)); +- if (ret < 0) exit(1); +- exit(0); ++ if (ret < 0) return(1); ++ return(0); + } + ]])],[zsh_cv_sys_tcsetpgrp=yes],[ + case $? in +@@ -2448,7 +2438,7 @@ if test x$ac_cv_func_getpwnam = xyes; then + #include + #include + #include +-main() { ++int main() { + struct passwd *pw1, *pw2; + char buf[1024], name[1024]; + sprintf(buf, "%d:%d", getpid(), rand()); +@@ -2456,7 +2446,7 @@ main() { + if (pw1) strcpy(name, pw1->pw_name); + sprintf(buf, "%d:%d", rand(), getpid()); + pw2=getpwnam(buf); +- exit(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name)); ++ return(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name)); + } + ]])],[zsh_cv_sys_getpwnam_faked=no],[zsh_cv_sys_getpwnam_faked=yes],[zsh_cv_sys_getpwnam_faked=no])]) + if test x$zsh_cv_sys_getpwnam_faked = xyes; then +@@ -2775,20 +2765,17 @@ elif test "x$dynamic" = xyes; then + zsh_cv_sys_elf, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Test for whether ELF binaries are produced */ + #include +-#include + #include +-main(argc, argv) +-int argc; +-char *argv[]; ++int main(int argc, char *argv[]) + { + char b[4]; + int i = open(argv[0],O_RDONLY); + if(i == -1) +- exit(1); /* fail */ ++ return(1); /* fail */ + if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F') +- exit(0); /* succeed (yes, it's ELF) */ ++ return(0); /* succeed (yes, it's ELF) */ + else +- exit(1); /* fail */ ++ return(1); /* fail */ + }]])],[zsh_cv_sys_elf=yes],[zsh_cv_sys_elf=no],[zsh_cv_sys_elf=yes])]) + + # We use [0-9]* in case statements, so need to change quoting +@@ -2924,13 +2911,12 @@ LDFLAGS="$old_LDFLAGS") + AC_CACHE_CHECK(if your dlsym() needs a leading underscore, + zsh_cv_func_dlsym_needs_underscore, + [echo failed >conftestval && cat >conftest.c <&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AS_MESSAGE_LOG_FD) && + AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include +-#include + #ifdef HPUX10DYNAMIC + #include + #define RTLD_LAZY BIND_DEFERRED +@@ -2957,16 +2943,16 @@ char *zsh_gl_sym_addr ; + + extern int fred() ; + +-main() ++int main() + { + void * handle ; + void * symbol ; + FILE *f=fopen("conftestval", "w"); +- if (!f) exit(1); ++ if (!f) return(1); + handle = dlopen("./conftest.$DL_EXT", RTLD_LAZY) ; + if (handle == NULL) { + fprintf (f, "dlopen failed") ; +- exit(1); ++ return(1); + } + symbol = dlsym(handle, "fred") ; + if (symbol == NULL) { +@@ -2974,13 +2960,13 @@ main() + symbol = dlsym(handle, "_fred") ; + if (symbol == NULL) { + fprintf (f, "dlsym failed") ; +- exit(1); ++ return(1); + } + fprintf (f, "yes") ; + } + else + fprintf (f, "no") ; +- exit(0); ++ return(0); + }]])],[zsh_cv_func_dlsym_needs_underscore=`cat conftestval`],[zsh_cv_func_dlsym_needs_underscore=failed + dynamic=no],[zsh_cv_func_dlsym_needs_underscore=no])]) + if test "x$zsh_cv_func_dlsym_needs_underscore" = xyes; then diff --git a/SPECS/zsh/0002-zsh-fix-module-loading-problem-with-full-RELRO.patch b/SPECS/zsh/0002-zsh-fix-module-loading-problem-with-full-RELRO.patch new file mode 100644 index 00000000..2ca953b2 --- /dev/null +++ b/SPECS/zsh/0002-zsh-fix-module-loading-problem-with-full-RELRO.patch @@ -0,0 +1,69 @@ +From a84fdd7c8f77935ecce99ff2b0bdba738821ed79 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto +Date: Mon, 26 Jun 2023 17:13:04 +0900 +Subject: [PATCH] 51889: fix module loading problem with full RELRO + +If full RELRO (relocation read-only, one of the security enhancement +methods for ELF-based systems) is used when building zsh (as in binary +packages of most Linuxes), loading a module (e.g. zsh/zftp) fails unless +all the modules it depends on are already loaded. With this patch the +necessary modules are automatically loaded. + +Upstream-commit: a84fdd7c8f77935ecce99ff2b0bdba738821ed79 +Signed-off-by: Lukáš Zaoral +--- + Src/Modules/zftp.c | 2 +- + Src/mkbltnmlst.sh | 24 ++++++++++++++++++++++++ + 2 files changed, 25 insertions(+), 1 deletion(-) + +diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c +index 49b3ffa89..47a5e9de9 100644 +--- a/Src/Modules/zftp.c ++++ b/Src/Modules/zftp.c +@@ -3172,7 +3172,7 @@ static struct features module_features = { + int + setup_(UNUSED(Module m)) + { +- return (require_module("zsh/net/tcp", NULL, 0) == 1); ++ return 0; + } + + /**/ +diff --git a/Src/mkbltnmlst.sh b/Src/mkbltnmlst.sh +index c4611d8b3..067ecdaf9 100644 +--- a/Src/mkbltnmlst.sh ++++ b/Src/mkbltnmlst.sh +@@ -76,6 +76,30 @@ for x_mod in $x_mods; do + test "x$linked" = xno && echo "#endif" + done + ++# if dynamic module 'mod' with load=no has moddeps in its .mdd, ++# then output add_dep(mod, dep) for each 'dep' in moddeps. ++dyn_mods="`grep ' link=dynamic .* load=no ' $CFMOD | \ ++ sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`" ++ ++for mod in $dyn_mods; do ++ modfile="`grep '^name='$mod' ' $CFMOD | \ ++ sed -e 's/^.* modfile=//' -e 's/ .*//'`" ++ if test "x$modfile" = x; then ++ echo >&2 "WARNING: no name for \`$mod' in $CFMOD (ignored)" ++ continue ++ fi ++ unset moddeps ++ . $srcdir/../$modfile ++ if test -n "$moddeps"; then ++ echo '#ifdef DYNAMIC' ++ echo "/* non-linked-in known module \`$mod' */" ++ for dep in $moddeps; do ++ echo " add_dep(\"$mod\", \"$dep\");" ++ done ++ echo '#endif' ++ fi ++done ++ + echo + done_mods=" " + for bin_mod in $bin_mods; do +-- +2.41.0 + diff --git a/SPECS/zsh/0003-zsh-enable-PCRE-locale-switching.patch b/SPECS/zsh/0003-zsh-enable-PCRE-locale-switching.patch new file mode 100644 index 00000000..a6f03bf5 --- /dev/null +++ b/SPECS/zsh/0003-zsh-enable-PCRE-locale-switching.patch @@ -0,0 +1,64 @@ +From 1b421e4978440234fb73117c8505dad1ccc68d46 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto +Date: Mon, 26 Sep 2022 10:52:50 +0900 +Subject: [PATCH] 50658 + test: Enable to switch between C/UTF-8 locales in + PCRE + +--- + Src/Modules/pcre.c | 10 ++-------- + Test/V07pcre.ztst | 11 +++++++++++ + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c +index 6289e003e..46875a59b 100644 +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -47,8 +47,6 @@ zpcre_utf8_enabled(void) + #if defined(MULTIBYTE_SUPPORT) && defined(HAVE_NL_LANGINFO) && defined(CODESET) + static int have_utf8_pcre = -1; + +- /* value can toggle based on MULTIBYTE, so don't +- * be too eager with caching */ + if (have_utf8_pcre < -1) + return 0; + +@@ -56,15 +54,11 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (!strcmp(nl_langinfo(CODESET), "UTF-8"))) { +- +- if (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre)) ++ (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { + have_utf8_pcre = -2; /* erk, failed to ask */ + } + +- if (have_utf8_pcre < 0) +- return 0; +- return have_utf8_pcre; ++ return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); + + #else + return 0; +diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst +index ca13419e5..22a0b64c7 100644 +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -162,3 +162,14 @@ + echo $match[2] ) + 0:regression for segmentation fault, workers/38307 + >test ++ ++ LANG_SAVE=$LANG ++ [[ é =~ '^.\z' ]]; echo $? ++ LANG=C ++ [[ é =~ '^..\z' ]]; echo $? ++ LANG=$LANG_SAVE ++ [[ é =~ '^.\z' ]]; echo $? ++0:swich between C/UTF-8 locales ++>0 ++>0 ++>0 +-- +2.41.0 + diff --git a/SPECS/zsh/0004-zsh-port-to-pcre2.patch b/SPECS/zsh/0004-zsh-port-to-pcre2.patch new file mode 100644 index 00000000..fd8ea0e2 --- /dev/null +++ b/SPECS/zsh/0004-zsh-port-to-pcre2.patch @@ -0,0 +1,641 @@ +From b62e911341c8ec7446378b477c47da4256053dc0 Mon Sep 17 00:00:00 2001 +From: Oliver Kiddle +Date: Sat, 13 May 2023 00:53:32 +0200 +Subject: [PATCH] 51723: migrate pcre module to pcre2 + + Cherry-picked-by: Lukáš Zaoral +--- + Src/Modules/pcre.c | 223 ++++++++++++++++++--------------------------- + Test/V07pcre.ztst | 13 ++- + configure.ac | 20 ++-- + 3 files changed, 109 insertions(+), 149 deletions(-) + +diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c +index 46875a59b..079ecc2c5 100644 +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -34,11 +34,11 @@ + #define CPCRE_PLAIN 0 + + /**/ +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) +-#include ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + +-static pcre *pcre_pattern; +-static pcre_extra *pcre_hints; ++static pcre2_code *pcre_pattern; + + /**/ + static int +@@ -54,8 +54,8 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { +- have_utf8_pcre = -2; /* erk, failed to ask */ ++ (pcre2_config(PCRE2_CONFIG_UNICODE, &have_utf8_pcre))) { ++ have_utf8_pcre = -2; /* erk, failed to ask */ + } + + return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); +@@ -69,115 +69,87 @@ zpcre_utf8_enabled(void) + static int + bin_pcre_compile(char *nam, char **args, Options ops, UNUSED(int func)) + { +- int pcre_opts = 0, pcre_errptr, target_len; +- const char *pcre_error; ++ uint32_t pcre_opts = 0; ++ int target_len; ++ int pcre_error; ++ PCRE2_SIZE pcre_offset; + char *target; + +- if(OPT_ISSET(ops,'a')) pcre_opts |= PCRE_ANCHORED; +- if(OPT_ISSET(ops,'i')) pcre_opts |= PCRE_CASELESS; +- if(OPT_ISSET(ops,'m')) pcre_opts |= PCRE_MULTILINE; +- if(OPT_ISSET(ops,'x')) pcre_opts |= PCRE_EXTENDED; +- if(OPT_ISSET(ops,'s')) pcre_opts |= PCRE_DOTALL; ++ if (OPT_ISSET(ops, 'a')) pcre_opts |= PCRE2_ANCHORED; ++ if (OPT_ISSET(ops, 'i')) pcre_opts |= PCRE2_CASELESS; ++ if (OPT_ISSET(ops, 'm')) pcre_opts |= PCRE2_MULTILINE; ++ if (OPT_ISSET(ops, 'x')) pcre_opts |= PCRE2_EXTENDED; ++ if (OPT_ISSET(ops, 's')) pcre_opts |= PCRE2_DOTALL; + + if (zpcre_utf8_enabled()) +- pcre_opts |= PCRE_UTF8; +- +-#ifdef HAVE_PCRE_STUDY +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; +-#endif ++ pcre_opts |= PCRE2_UTF; + + if (pcre_pattern) +- pcre_free(pcre_pattern); ++ pcre2_code_free(pcre_pattern); + pcre_pattern = NULL; + + target = ztrdup(*args); + unmetafy(target, &target_len); + +- if ((int)strlen(target) != target_len) { +- zwarnnam(nam, "embedded NULs in PCRE pattern terminate pattern"); +- } +- +- pcre_pattern = pcre_compile(target, pcre_opts, &pcre_error, &pcre_errptr, NULL); ++ pcre_pattern = pcre2_compile((PCRE2_SPTR) target, (PCRE2_SIZE) target_len, ++ pcre_opts, &pcre_error, &pcre_offset, NULL); + + free(target); + + if (pcre_pattern == NULL) + { +- zwarnnam(nam, "error in regex: %s", pcre_error); ++ PCRE2_UCHAR buffer[256]; ++ pcre2_get_error_message(pcre_error, buffer, sizeof(buffer)); ++ zwarnnam(nam, "error in regex: %s", buffer); + return 1; + } + + return 0; + } + +-/**/ +-#ifdef HAVE_PCRE_STUDY +- + /**/ + static int + bin_pcre_study(char *nam, UNUSED(char **args), UNUSED(Options ops), UNUSED(int func)) + { +- const char *pcre_error; +- + if (pcre_pattern == NULL) + { + zwarnnam(nam, "no pattern has been compiled for study"); + return 1; + } +- +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; + +- pcre_hints = pcre_study(pcre_pattern, 0, &pcre_error); +- if (pcre_error != NULL) +- { +- zwarnnam(nam, "error while studying regex: %s", pcre_error); +- return 1; ++ int jit = 0; ++ if (!pcre2_config(PCRE2_CONFIG_JIT, &jit) && jit) { ++ if (pcre2_jit_compile(pcre_pattern, PCRE2_JIT_COMPLETE) < 0) { ++ zwarnnam(nam, "error while studying regex"); ++ return 1; ++ } + } + + return 0; + } + +-/**/ +-#else /* !HAVE_PCRE_STUDY */ +- +-# define bin_pcre_study bin_notavail +- +-/**/ +-#endif /* !HAVE_PCRE_STUDY */ +- +-/**/ + static int +-zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, +- char *substravar, int want_offset_pair, int matchedinarr, +- int want_begin_end) ++zpcre_get_substrings(char *arg, pcre2_match_data *mdata, int captured_count, ++ char *matchvar, char *substravar, int want_offset_pair, ++ int matchedinarr, int want_begin_end) + { +- char **captures, *match_all, **matches; ++ PCRE2_SIZE *ovec; ++ char *match_all, **matches; + char offset_all[50]; + int capture_start = 1; + + if (matchedinarr) { +- /* bash-style captures[0] entire-matched string in the array */ ++ /* bash-style ovec[0] entire-matched string in the array */ + capture_start = 0; + } + +- /* captures[0] will be entire matched string, [1] first substring */ +- if (!pcre_get_substring_list(arg, ovec, captured_count, (const char ***)&captures)) { +- int nelem = arrlen(captures)-1; ++ /* ovec[0] will be entire matched string, [1] first substring */ ++ ovec = pcre2_get_ovector_pointer(mdata); ++ if (ovec) { ++ int nelem = captured_count - 1; + /* Set to the offsets of the complete match */ + if (want_offset_pair) { +- sprintf(offset_all, "%d %d", ovec[0], ovec[1]); ++ sprintf(offset_all, "%ld %ld", ovec[0], ovec[1]); + setsparam("ZPCRE_OP", ztrdup(offset_all)); + } + /* +@@ -186,7 +158,7 @@ zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, + * ovec is length 2*(1+capture_list_length) + */ + if (matchvar) { +- match_all = metafy(captures[0], ovec[1] - ovec[0], META_DUP); ++ match_all = metafy(arg + ovec[0], ovec[1] - ovec[0], META_DUP); + setsparam(matchvar, match_all); + } + /* +@@ -201,16 +173,12 @@ zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, + */ + if (substravar && + (!want_begin_end || nelem)) { +- char **x, **y; ++ char **x; + int vec_off, i; +- y = &captures[capture_start]; + matches = x = (char **) zalloc(sizeof(char *) * (captured_count+1-capture_start)); +- for (i = capture_start; i < captured_count; i++, y++) { ++ for (i = capture_start; i < captured_count; i++) { + vec_off = 2*i; +- if (*y) +- *x++ = metafy(*y, ovec[vec_off+1]-ovec[vec_off], META_DUP); +- else +- *x++ = NULL; ++ *x++ = metafy(arg + ovec[vec_off], ovec[vec_off+1]-ovec[vec_off], META_DUP); + } + *x = NULL; + setaparam(substravar, matches); +@@ -247,7 +215,8 @@ zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, + setiparam("MEND", offs + !isset(KSHARRAYS) - 1); + if (nelem) { + char **mbegin, **mend, **bptr, **eptr; +- int i, *ipair; ++ int i; ++ size_t *ipair; + + bptr = mbegin = zalloc(sizeof(char*)*(nelem+1)); + eptr = mend = zalloc(sizeof(char*)*(nelem+1)); +@@ -287,8 +256,6 @@ zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, + setaparam("mend", mend); + } + } +- +- pcre_free_substring_list((const char **)captures); + } + + return 0; +@@ -314,7 +281,8 @@ getposint(char *instr, char *nam) + static int + bin_pcre_match(char *nam, char **args, Options ops, UNUSED(int func)) + { +- int ret, capcount, *ovec, ovecsize, c; ++ int ret, c; ++ pcre2_match_data *pcre_mdata = NULL; + char *matched_portion = NULL; + char *plaintext = NULL; + char *receptacle = NULL; +@@ -344,36 +312,30 @@ bin_pcre_match(char *nam, char **args, Options ops, UNUSED(int func)) + /* For the entire match, 'Return' the offset byte positions instead of the matched string */ + if(OPT_ISSET(ops,'b')) want_offset_pair = 1; + +- if ((ret = pcre_fullinfo(pcre_pattern, pcre_hints, PCRE_INFO_CAPTURECOUNT, &capcount))) +- { +- zwarnnam(nam, "error %d in fullinfo", ret); +- return 1; +- } +- +- ovecsize = (capcount+1)*3; +- ovec = zalloc(ovecsize*sizeof(int)); +- + plaintext = ztrdup(*args); + unmetafy(plaintext, &subject_len); + + if (offset_start > 0 && offset_start >= subject_len) +- ret = PCRE_ERROR_NOMATCH; +- else +- ret = pcre_exec(pcre_pattern, pcre_hints, plaintext, subject_len, offset_start, 0, ovec, ovecsize); ++ ret = PCRE2_ERROR_NOMATCH; ++ else { ++ pcre_mdata = pcre2_match_data_create_from_pattern(pcre_pattern, NULL); ++ ret = pcre2_match(pcre_pattern, (PCRE2_SPTR) plaintext, subject_len, ++ offset_start, 0, pcre_mdata, NULL); ++ } + + if (ret==0) return_value = 0; +- else if (ret==PCRE_ERROR_NOMATCH) /* no match */; ++ else if (ret == PCRE2_ERROR_NOMATCH) /* no match */; + else if (ret>0) { +- zpcre_get_substrings(plaintext, ovec, ret, matched_portion, receptacle, ++ zpcre_get_substrings(plaintext, pcre_mdata, ret, matched_portion, receptacle, + want_offset_pair, 0, 0); + return_value = 0; + } + else { +- zwarnnam(nam, "error in pcre_exec [%d]", ret); ++ zwarnnam(nam, "error in pcre2_match [%d]", ret); + } + +- if (ovec) +- zfree(ovec, ovecsize*sizeof(int)); ++ if (pcre_mdata) ++ pcre2_match_data_free(pcre_mdata); + zsfree(plaintext); + + return return_value; +@@ -383,17 +345,19 @@ bin_pcre_match(char *nam, char **args, Options ops, UNUSED(int func)) + static int + cond_pcre_match(char **a, int id) + { +- pcre *pcre_pat; +- const char *pcre_err; ++ pcre2_code *pcre_pat = NULL; ++ int pcre_err; ++ PCRE2_SIZE pcre_erroff; + char *lhstr, *rhre, *lhstr_plain, *rhre_plain, *avar, *svar; +- int r = 0, pcre_opts = 0, pcre_errptr, capcnt, *ov, ovsize; ++ int r = 0, pcre_opts = 0; ++ pcre2_match_data *pcre_mdata = NULL; + int lhstr_plain_len, rhre_plain_len; + int return_value = 0; + + if (zpcre_utf8_enabled()) +- pcre_opts |= PCRE_UTF8; ++ pcre_opts |= PCRE2_UTF; + if (isset(REMATCHPCRE) && !isset(CASEMATCH)) +- pcre_opts |= PCRE_CASELESS; ++ pcre_opts |= PCRE2_CASELESS; + + lhstr = cond_str(a,0,0); + rhre = cond_str(a,1,0); +@@ -401,9 +365,6 @@ cond_pcre_match(char **a, int id) + rhre_plain = ztrdup(rhre); + unmetafy(lhstr_plain, &lhstr_plain_len); + unmetafy(rhre_plain, &rhre_plain_len); +- pcre_pat = NULL; +- ov = NULL; +- ovsize = 0; + + if (isset(BASHREMATCH)) { + svar = NULL; +@@ -415,27 +376,27 @@ cond_pcre_match(char **a, int id) + + switch(id) { + case CPCRE_PLAIN: +- if ((int)strlen(rhre_plain) != rhre_plain_len) { +- zwarn("embedded NULs in PCRE pattern terminate pattern"); +- } +- pcre_pat = pcre_compile(rhre_plain, pcre_opts, &pcre_err, &pcre_errptr, NULL); +- if (pcre_pat == NULL) { +- zwarn("failed to compile regexp /%s/: %s", rhre, pcre_err); ++ if (!(pcre_pat = pcre2_compile((PCRE2_SPTR) rhre_plain, ++ (PCRE2_SIZE) rhre_plain_len, pcre_opts, ++ &pcre_err, &pcre_erroff, NULL))) ++ { ++ PCRE2_UCHAR buffer[256]; ++ pcre2_get_error_message(pcre_err, buffer, sizeof(buffer)); ++ zwarn("failed to compile regexp /%s/: %s", rhre, buffer); + break; + } +- pcre_fullinfo(pcre_pat, NULL, PCRE_INFO_CAPTURECOUNT, &capcnt); +- ovsize = (capcnt+1)*3; +- ov = zalloc(ovsize*sizeof(int)); +- r = pcre_exec(pcre_pat, NULL, lhstr_plain, lhstr_plain_len, 0, 0, ov, ovsize); +- /* r < 0 => error; r==0 match but not enough size in ov ++ pcre_mdata = pcre2_match_data_create_from_pattern(pcre_pat, NULL); ++ r = pcre2_match(pcre_pat, (PCRE2_SPTR8) lhstr_plain, lhstr_plain_len, ++ 0, 0, pcre_mdata, NULL); ++ /* r < 0 => error; r==0 match but not enough size in match data + * r > 0 => (r-1) substrings found; r==1 => no substrings + */ + if (r==0) { +- zwarn("reportable zsh problem: pcre_exec() returned 0"); ++ zwarn("reportable zsh problem: pcre2_match() returned 0"); + return_value = 1; + break; + } +- else if (r==PCRE_ERROR_NOMATCH) { ++ else if (r == PCRE2_ERROR_NOMATCH) { + return_value = 0; /* no match */ + break; + } +@@ -444,7 +405,7 @@ cond_pcre_match(char **a, int id) + break; + } + else if (r>0) { +- zpcre_get_substrings(lhstr_plain, ov, r, svar, avar, 0, ++ zpcre_get_substrings(lhstr_plain, pcre_mdata, r, svar, avar, 0, + isset(BASHREMATCH), + !isset(BASHREMATCH)); + return_value = 1; +@@ -457,10 +418,10 @@ cond_pcre_match(char **a, int id) + free(lhstr_plain); + if(rhre_plain) + free(rhre_plain); ++ if (pcre_mdata) ++ pcre2_match_data_free(pcre_mdata); + if (pcre_pat) +- pcre_free(pcre_pat); +- if (ov) +- zfree(ov, ovsize*sizeof(int)); ++ pcre2_code_free(pcre_pat); + + return return_value; + } +@@ -489,11 +450,11 @@ static struct builtin bintab[] = { + + static struct features module_features = { + bintab, sizeof(bintab)/sizeof(*bintab), +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) + cotab, sizeof(cotab)/sizeof(*cotab), +-#else /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ ++#else /* !(HAVE_PCRE2_COMPILE_8 && HAVE_PCRE2_H) */ + NULL, 0, +-#endif /* !(HAVE_PCRE_COMPILE && HAVE_PCRE_EXEC) */ ++#endif /* !(HAVE_PCRE2_COMPILE_8 && HAVE_PCRE2_H) */ + NULL, 0, + NULL, 0, + 0 +@@ -540,19 +501,9 @@ cleanup_(Module m) + int + finish_(UNUSED(Module m)) + { +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) +-#ifdef HAVE_PCRE_STUDY +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; +-#endif +- ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) + if (pcre_pattern) +- pcre_free(pcre_pattern); ++ pcre2_code_free(pcre_pattern); + pcre_pattern = NULL; + #endif + +diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst +index 22a0b64c7..6eb366964 100644 +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -117,12 +117,17 @@ + >78884; ZPCRE_OP: 25 30 + >90210; ZPCRE_OP: 31 36 + +-# Embedded NULs allowed in plaintext, but not in RE (although \0 as two-chars allowed) ++# Embedded NULs allowed in plaintext, in RE, pcre supports \0 as two-chars + [[ $'a\0bc\0d' =~ '^(a\0.)(.+)$' ]] + print "${#MATCH}; ${#match[1]}; ${#match[2]}" + 0:ensure ASCII NUL passes in and out of matched plaintext + >6; 3; 3 + ++# PCRE2 supports NULs also in the RE ++ [[ $'a\0b\0c' =~ $'^(.\0)+' ]] && print "${#MATCH}; ${#match[1]}" ++0:ensure ASCII NUL works also in the regex ++>4; 2 ++ + # Ensure the long-form infix operator works + [[ foo -pcre-match ^f..$ ]] + print $? +@@ -169,7 +174,11 @@ + [[ é =~ '^..\z' ]]; echo $? + LANG=$LANG_SAVE + [[ é =~ '^.\z' ]]; echo $? +-0:swich between C/UTF-8 locales ++0:switch between C/UTF-8 locales + >0 + >0 + >0 ++ ++ [[ abc =~ 'a(d*)bc' ]] && print "$#MATCH; $#match; ${#match[1]}" ++0:empty capture ++>3; 1; 0 +diff --git a/configure.ac b/configure.ac +index d8a17791a..4710d1659 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -438,7 +438,7 @@ fi], + + dnl Do you want to look for pcre support? + AC_ARG_ENABLE(pcre, +-AS_HELP_STRING([--enable-pcre],[enable the search for the pcre library (may create run-time library dependencies)])) ++AS_HELP_STRING([--enable-pcre],[enable the search for the pcre2 library (may create run-time library dependencies)])) + + dnl Do you want to look for capability support? + AC_ARG_ENABLE(cap, +@@ -652,13 +652,12 @@ AC_HEADER_SYS_WAIT + + oldcflags="$CFLAGS" + if test x$enable_pcre = xyes; then +-AC_CHECK_PROG([PCRECONF], pcre-config, pcre-config) +-dnl Typically (meaning on this single RedHat 9 box in front of me) +-dnl pcre-config --cflags produces a -I output which needs to go into ++AC_CHECK_PROG([PCRECONF], pcre2-config, pcre2-config) ++dnl pcre2-config --cflags may produce a -I output which needs to go into + dnl CPPFLAGS else configure's preprocessor tests don't pick it up, + dnl producing a warning. +-if test "x$ac_cv_prog_PCRECONF" = xpcre-config; then +- CPPFLAGS="$CPPFLAGS `pcre-config --cflags`" ++if test "x$ac_cv_prog_PCRECONF" = xpcre2-config; then ++ CPPFLAGS="$CPPFLAGS `pcre2-config --cflags`" + fi + fi + +@@ -668,9 +667,10 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ + locale.h errno.h stdio.h stdarg.h varargs.h stdlib.h \ + unistd.h sys/capability.h \ + utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \ +- netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \ ++ netinet/in_systm.h langinfo.h wchar.h stddef.h \ + sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ + ncurses/ncurses.h) ++AC_CHECK_HEADERS([pcre2.h],,,[#define PCRE2_CODE_UNIT_WIDTH 8]) + if test x$dynamic = xyes; then + AC_CHECK_HEADERS(dlfcn.h) + AC_CHECK_HEADERS(dl.h) +@@ -948,9 +948,7 @@ if test "x$ac_found_iconv" = "xyes"; then + fi + + if test x$enable_pcre = xyes; then +-dnl pcre-config should probably be employed here +-dnl AC_SEARCH_LIBS(pcre_compile, pcre) +- LIBS="`$ac_cv_prog_PCRECONF --libs` $LIBS" ++ LIBS="`$ac_cv_prog_PCRECONF --libs8` $LIBS" + fi + + dnl --------------------- +@@ -1313,7 +1311,7 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \ + pathconf sysconf \ + tgetent tigetflag tigetnum tigetstr setupterm initscr resize_term \ + getcchar setcchar waddwstr wget_wch win_wch use_default_colors \ +- pcre_compile pcre_study pcre_exec \ ++ pcre2_compile_8 \ + nl_langinfo \ + erand48 open_memstream \ + posix_openpt \ +-- +2.41.0 + +From 10bdbd8b5b0b43445aff23dcd412f25cf6aa328a Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto +Date: Tue, 20 Jun 2023 18:14:27 +0900 +Subject: [PATCH] 51877: do not build pcre module if pcre2-config is not found + + Cherry-picked-by: Lukáš Zaoral +--- + Src/Modules/pcre.mdd | 2 +- + configure.ac | 31 +++++++++++++++++++------------ + 2 files changed, 20 insertions(+), 13 deletions(-) + +diff --git a/Src/Modules/pcre.mdd b/Src/Modules/pcre.mdd +index 6eb3c691b..3e1579117 100644 +--- a/Src/Modules/pcre.mdd ++++ b/Src/Modules/pcre.mdd +@@ -1,5 +1,5 @@ + name=zsh/pcre +-link=`if test x$enable_pcre = xyes && (pcre-config --version >/dev/null 2>/dev/null); then echo dynamic; else echo no; fi` ++link=`if test x$enable_pcre = xyes; then echo dynamic; else echo no; fi` + load=no + + autofeatures="b:pcre_compile b:pcre_study b:pcre_match" +diff --git a/configure.ac b/configure.ac +index ba76f9a60..c5263035e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -440,6 +440,17 @@ dnl Do you want to look for pcre support? + AC_ARG_ENABLE(pcre, + AS_HELP_STRING([--enable-pcre],[enable the search for the pcre2 library (may create run-time library dependencies)])) + ++AC_ARG_VAR(PCRE_CONFIG, [pathname of pcre2-config if it is not in PATH]) ++if test "x$enable_pcre" = xyes; then ++ AC_CHECK_PROG([PCRE_CONFIG], pcre2-config, pcre2-config) ++ if test "x$PCRE_CONFIG" = x; then ++ enable_pcre=no ++ AC_MSG_WARN([pcre2-config not found: pcre module is disabled.]) ++ AC_MSG_NOTICE( ++ [Set PCRE_CONFIG to pathname of pcre2-config if it is not in PATH.]) ++ fi ++fi ++ + dnl Do you want to look for capability support? + AC_ARG_ENABLE(cap, + AS_HELP_STRING([--enable-cap],[enable the search for POSIX capabilities (may require additional headers to be added by hand)])) +@@ -655,15 +666,12 @@ AC_HEADER_DIRENT + AC_HEADER_STAT + AC_HEADER_SYS_WAIT + +-oldcflags="$CFLAGS" +-if test x$enable_pcre = xyes; then +-AC_CHECK_PROG([PCRECONF], pcre2-config, pcre2-config) + dnl pcre2-config --cflags may produce a -I output which needs to go into + dnl CPPFLAGS else configure's preprocessor tests don't pick it up, + dnl producing a warning. +-if test "x$ac_cv_prog_PCRECONF" = xpcre2-config; then +- CPPFLAGS="$CPPFLAGS `pcre2-config --cflags`" +-fi ++if test "x$enable_pcre" = xyes; then ++ CPPFLAGS="`$PCRE_CONFIG --cflags` $CPPFLAGS" ++ AC_CHECK_HEADERS([pcre2.h],,,[#define PCRE2_CODE_UNIT_WIDTH 8]) + fi + + AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ +@@ -675,7 +683,6 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \ + netinet/in_systm.h langinfo.h wchar.h stddef.h \ + sys/stropts.h iconv.h ncurses.h ncursesw/ncurses.h \ + ncurses/ncurses.h) +-AC_CHECK_HEADERS([pcre2.h],,,[#define PCRE2_CODE_UNIT_WIDTH 8]) + if test x$dynamic = xyes; then + AC_CHECK_HEADERS(dlfcn.h) + AC_CHECK_HEADERS(dl.h) +@@ -952,10 +959,6 @@ if test "x$ac_found_iconv" = "xyes"; then + [Define as const if the declaration of iconv() needs const.]) + fi + +-if test x$enable_pcre = xyes; then +- LIBS="`$ac_cv_prog_PCRECONF --libs8` $LIBS" +-fi +- + dnl --------------------- + dnl CHECK TERMCAP LIBRARY + dnl --------------------- +@@ -1316,7 +1319,6 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \ + pathconf sysconf \ + tgetent tigetflag tigetnum tigetstr setupterm initscr resize_term \ + getcchar setcchar waddwstr wget_wch win_wch use_default_colors \ +- pcre2_compile_8 \ + nl_langinfo \ + erand48 open_memstream \ + posix_openpt \ +@@ -1371,6 +1373,11 @@ if test x$zsh_cv_func_realpath_accepts_null = xyes; then + AC_DEFINE(REALPATH_ACCEPTS_NULL) + fi + ++if test x$enable_pcre = xyes; then ++ LIBS="`$PCRE_CONFIG --libs8` $LIBS" ++ AC_CHECK_FUNCS(pcre2_compile_8) ++fi ++ + if test x$enable_cap = xyes; then + AC_CHECK_FUNCS(cap_get_proc) + fi +-- +2.42.0 + diff --git a/SPECS/zsh/0005-zsh-support-texinfo-7.0.patch b/SPECS/zsh/0005-zsh-support-texinfo-7.0.patch new file mode 100644 index 00000000..c68bd261 --- /dev/null +++ b/SPECS/zsh/0005-zsh-support-texinfo-7.0.patch @@ -0,0 +1,53 @@ +From ecd3f9c9506c7720dc6c0833dc5d5eb00e4459c4 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto +Date: Mon, 19 Jun 2023 11:19:25 +0900 +Subject: [PATCH] 51862: support texinfo-7.0 + +Upstream-commit: ecd3f9c9506c7720dc6c0833dc5d5eb00e4459c4 +Cherry-picked-by: Lukáš Zaoral +--- + Doc/Makefile.in | 3 ++- + configure.ac | 5 +++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Doc/Makefile.in b/Doc/Makefile.in +index 136b080d6..dabe11fe3 100644 +--- a/Doc/Makefile.in ++++ b/Doc/Makefile.in +@@ -43,6 +43,7 @@ TEXI2DVI = @TEXI2DVI@ + DVIPS = dvips + TEXI2PDF = @TEXI2PDF@ + TEXI2HTML = @TEXI2HTML@ ++SET_TEXI2ANY_VAR = @SET_TEXI2ANY_VAR@ + PAPERSIZE = @PAPERSIZE@ + + .SUFFIXES: .yo .1 +@@ -266,7 +267,7 @@ texi2html.conf: $(sdir_top)/Config/version.mk + d=`echo $(VERSION_DATE)`; \ + v="Zsh version $(VERSION), released on $$d."; \ + case '$(TEXI2HTML)' in \ +- *texi2any*) echo "set_from_init_file('PRE_BODY_CLOSE','$$v');" ;; \ ++ *texi2any*) echo "$(SET_TEXI2ANY_VAR)('PRE_BODY_CLOSE','$$v');" ;; \ + *) echo "\$$PRE_BODY_CLOSE = '$$v';" ;; \ + esac > $@ + +diff --git a/configure.ac b/configure.ac +index 4710d1659..ba76f9a60 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -623,7 +623,12 @@ fi + + if test x"$TEXI2HTML" = xtexi2any; then + TEXI2HTML='texi2any -c TEXI2HTML=1' ++ case `texi2any --version 2>/dev/null | sed -e 's/^.*) *//' -e 1q` in ++ [[1-6]].*) SET_TEXI2ANY_VAR=set_from_init_file ;; ++ *) SET_TEXI2ANY_VAR=texinfo_set_from_init_file ;; ++ esac + fi ++AC_SUBST(SET_TEXI2ANY_VAR) + + case "$LC_PAPER" in + ??_US*) PAPERSIZE=us ;; +-- +2.42.0 + diff --git a/SPECS/zsh/0006-zsh-configure-c99.patch b/SPECS/zsh/0006-zsh-configure-c99.patch new file mode 100644 index 00000000..c4b36231 --- /dev/null +++ b/SPECS/zsh/0006-zsh-configure-c99.patch @@ -0,0 +1,44 @@ +Avoid incompatible pointer types in terminfo global variable checks. +Some compilers reject these incompatible pointer types, causing the +checks to always fail, when these variables are in fact available. + +Submitted upstream: + +diff --git a/configure.ac b/configure.ac +index a58242f453b4a8f3..5534f42df14eb28c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1769,27 +1769,27 @@ if test x$zsh_cv_path_term_header != xnone; then + fi + + AC_MSG_CHECKING(if boolcodes is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no]) + AC_MSG_RESULT($boolcodes) + + AC_MSG_CHECKING(if numcodes is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no]) + AC_MSG_RESULT($numcodes) + + AC_MSG_CHECKING(if strcodes is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no]) + AC_MSG_RESULT($strcodes) + + AC_MSG_CHECKING(if boolnames is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no]) + AC_MSG_RESULT($boolnames) + + AC_MSG_CHECKING(if numnames is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no]) + AC_MSG_RESULT($numnames) + + AC_MSG_CHECKING(if strnames is available) +- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no]) + AC_MSG_RESULT($strnames) + + dnl There are apparently defective terminal library headers on some diff --git a/SPECS/zsh/0007-zsh-deletefilelist-segfault.patch b/SPECS/zsh/0007-zsh-deletefilelist-segfault.patch new file mode 100644 index 00000000..8abaab1b --- /dev/null +++ b/SPECS/zsh/0007-zsh-deletefilelist-segfault.patch @@ -0,0 +1,42 @@ +From d3edf318306e37d2d96c4e4ea442d10207722e94 Mon Sep 17 00:00:00 2001 +From: Bart Schaefer +Date: Sun, 12 Feb 2023 09:52:39 -0800 +Subject: [PATCH] 51404: Nullify filelist after deleting (fix segfault) + +Cherry-picked-by: Lukáš Zaoral +Upstream-commit: d3edf318306e37d2d96c4e4ea442d10207722e94 +--- + Src/jobs.c | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/Src/jobs.c b/Src/jobs.c +index 4863962b9..59ddd952e 100644 +--- a/Src/jobs.c ++++ b/Src/jobs.c +@@ -1372,8 +1372,10 @@ cleanfilelists(void) + + DPUTS(shell_exiting >= 0, "BUG: cleanfilelists() before exit"); + +- for (i = 1; i <= maxjob; i++) ++ for (i = 1; i <= maxjob; i++) { + deletefilelist(jobtab[i].filelist, 0); ++ jobtab[i].filelist = 0; ++ } + } + + /**/ +@@ -1531,8 +1533,10 @@ havefiles(void) + int i; + + for (i = 1; i <= maxjob; i++) +- if (jobtab[i].stat && jobtab[i].filelist) ++ if (jobtab[i].stat && jobtab[i].filelist && ++ peekfirst(jobtab[i].filelist)) { + return 1; ++ } + return 0; + + } +-- +2.43.0 + diff --git a/SPECS/zsh/dotzprofile b/SPECS/zsh/dotzprofile new file mode 100644 index 00000000..9203f7e2 --- /dev/null +++ b/SPECS/zsh/dotzprofile @@ -0,0 +1,12 @@ +# this file is installed as ~/.zprofile for newly created users + +# prepend ~/.local/bin and ~/bin to $PATH unless it is already there +if ! [[ "$PATH" =~ "$HOME/bin" ]] +then + PATH="$HOME/bin:$PATH" +fi +if ! [[ "$PATH" =~ "$HOME/.local/bin:" ]] +then + PATH="$HOME/.local/bin:$PATH" +fi +export PATH diff --git a/SPECS/zsh/dotzshrc b/SPECS/zsh/dotzshrc new file mode 100644 index 00000000..9935bec4 --- /dev/null +++ b/SPECS/zsh/dotzshrc @@ -0,0 +1,34 @@ +# +# .zshrc is sourced in interactive shells. +# It should contain commands to set up aliases, +# functions, options, key bindings, etc. +# + +autoload -U compinit +compinit + +#allow tab completion in the middle of a word +setopt COMPLETE_IN_WORD + +## keep background processes at full speed +#setopt NOBGNICE +## restart running processes on exit +#setopt HUP + +## history +#setopt APPEND_HISTORY +## for sharing history between zsh processes +#setopt INC_APPEND_HISTORY +#setopt SHARE_HISTORY + +## never ever beep ever +#setopt NO_BEEP + +## automatically decide when to page a list of completions +#LISTMAX=0 + +## disable mail checking +#MAILCHECK=0 + +# autoload -U colors +#colors diff --git a/SPECS/zsh/zlogin.rhs b/SPECS/zsh/zlogin.rhs new file mode 100644 index 00000000..3d717820 --- /dev/null +++ b/SPECS/zsh/zlogin.rhs @@ -0,0 +1,7 @@ +# +# /etc/zlogin and .zlogin are sourced in login shells. It should +# contain commands that should be executed only in +# login shells. It should be used to set the terminal +# type and run a series of external commands (fortune, +# msgs, from, etc). +# diff --git a/SPECS/zsh/zlogout.rhs b/SPECS/zsh/zlogout.rhs new file mode 100644 index 00000000..600702c8 --- /dev/null +++ b/SPECS/zsh/zlogout.rhs @@ -0,0 +1,7 @@ +# +# +# /etc/zlogout and ~/.zlogout are run when an interactive session ends +# +# + +command -v clear &> /dev/null && clear diff --git a/SPECS/zsh/zprofile.rhs b/SPECS/zsh/zprofile.rhs new file mode 100644 index 00000000..5e214759 --- /dev/null +++ b/SPECS/zsh/zprofile.rhs @@ -0,0 +1,19 @@ +# +# /etc/zprofile and ~/.zprofile are run for login shells +# + +_src_etc_profile() +{ + # Make /etc/profile happier, and have possible ~/.zshenv options like + # NOMATCH ignored. + # + emulate -L ksh + + # source profile + if [ -f /etc/profile ]; then + source /etc/profile + fi +} +_src_etc_profile + +unset -f _src_etc_profile diff --git a/SPECS/zsh/zsh.spec b/SPECS/zsh/zsh.spec new file mode 100644 index 00000000..39bacd1e --- /dev/null +++ b/SPECS/zsh/zsh.spec @@ -0,0 +1,147 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# SPDX-FileContributor: misaka00251 +# +# SPDX-License-Identifier: MulanPSL-2.0 + +Name: zsh +Version: 5.9 +Release: %autorelease +Summary: Powerful interactive shell +License: MIT-Modern-Variant AND ISC AND GPL-2.0-only +URL: http://zsh.sourceforge.net/ +#!RemoteAsset +Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz +Source1: zlogin.rhs +Source2: zlogout.rhs +Source3: zprofile.rhs +Source4: zshrc.rhs +Source5: zshenv.rhs +Source6: dotzshrc +Source7: dotzprofile +BuildSystem: autotools + +BuildOption(conf): --with-term-lib="ncursesw" +BuildOption(conf): --enable-cflags="%{optflags} -fPIE %(ncursesw6-config --cflags)" +BuildOption(conf): --enable-ldflags="%(ncursesw6-config --libs) -pie -Wl,-z,relro" +BuildOption(conf): --enable-cap +BuildOption(conf): --enable-multibyte +BuildOption(conf): --enable-pcre +BuildOption(conf): --enable-zsh-secure-free +BuildOption(conf): --enable-gdbm +BuildOption(conf): --enable-maildir-support +BuildOption(conf): --enable-etcdir=%{_sysconfdir} +BuildOption(conf): --enable-fndir=%{_datadir}/%{name}/functions +BuildOption(conf): --enable-site-fndir=%{_datadir}/%{name}/site-functions +BuildOption(conf): --enable-scriptdir=%{_datadir}/%{name}/scripts +BuildOption(conf): --enable-function-subdirs +BuildOption(conf): --enable-multibyte +BuildOption(build): all info html +BuildOption(install): install.info +BuildOption(install): fndir=%{_datadir}/%{name}/functions +BuildOption(install): runhelpdir=%{_datadir}/%{name}/help + +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: coreutils +BuildRequires: gdbm-devel +BuildRequires: ncurses-devel +BuildRequires: pcre2-devel +BuildRequires: libcap-devel +BuildRequires: texinfo + +Provides: /bin/zsh + +%patchlist +# Upstream commit ab4d62eb975a4c4c51dd35822665050e2ddc6918 +# TODO: our tty is broken - 251 +#0001-zsh-Use-int-main-in-test-c-codes.patch +# upstream commit a84fdd7c8f77935ecce99ff2b0bdba738821ed79 +0002-zsh-fix-module-loading-problem-with-full-RELRO.patch +# upstream commit 1b421e4978440234fb73117c8505dad1ccc68d46 +0003-zsh-enable-PCRE-locale-switching.patch +# upstream commit b62e911341c8ec7446378b477c47da4256053dc0 and 10bdbd8b5b0b43445aff23dcd412f25cf6aa328a +0004-zsh-port-to-pcre2.patch +# upstream commit ecd3f9c9506c7720dc6c0833dc5d5eb00e4459c4 +0005-zsh-support-texinfo-7.0.patch +# upstream commit 4c89849c98172c951a9def3690e8647dae76308f +0006-zsh-configure-c99.patch +# upstream commit d3edf318306e37d2d96c4e4ea442d10207722e94 +0007-zsh-deletefilelist-segfault.patch + +%description +The zsh shell is a command interpreter usable as an interactive login +shell and as a shell script command processor. Zsh resembles the ksh +shell (the Korn shell), but includes many enhancements. Zsh supports +command line editing, built-in spelling correction, programmable +command completion, shell functions (with autoloading), a history +mechanism, and more. + +%package html +Summary: Zsh shell manual in html format +BuildArch: noarch + +%description html +The zsh shell is a command interpreter usable as an interactive login +shell and as a shell script command processor. Zsh resembles the ksh +shell (the Korn shell), but includes many enhancements. Zsh supports +command line editing, built-in spelling correction, programmable +command completion, shell functions (with autoloading), a history +mechanism, and more. + +This package contains the Zsh manual in html format. + +%conf -p +autoreconf -fiv + +%install -a +rm -rf %{buildroot}%{_bindir}/zsh-%{version} +rm -f %{buildroot}%{_infodir}/dir + +# Install system configuration files +mkdir -p %{buildroot}%{_sysconfdir} +for i in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5}; do + install -m 644 $i %{buildroot}%{_sysconfdir}/"$(basename $i .rhs)" +done + +# Install user configuration files +mkdir -p %{buildroot}%{_sysconfdir}/skel +install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/skel/.zshrc +install -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/skel/.zprofile + +%post +if [ "$1" = 1 ]; then + if [ ! -f %{_sysconfdir}/shells ] ; then + echo "%{_bindir}/%{name}" > %{_sysconfdir}/shells + echo "/bin/%{name}" >> %{_sysconfdir}/shells + else + grep -q "^%{_bindir}/%{name}$" %{_sysconfdir}/shells || echo "%{_bindir}/%{name}" >> %{_sysconfdir}/shells + grep -q "^/bin/%{name}$" %{_sysconfdir}/shells || echo "/bin/%{name}" >> %{_sysconfdir}/shells + fi +fi + +%postun +if [ "$1" = 0 ] && [ -f %{_sysconfdir}/shells ] ; then + sed -i '\!^%{_bindir}/%{name}$!d' %{_sysconfdir}/shells + sed -i '\!^/bin/%{name}$!d' %{_sysconfdir}/shells +fi + +%files +%doc README LICENCE Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ FEATURES MACHINES +%doc NEWS Etc/zsh-development-guide Etc/completion-style-guide +%attr(755,root,root) %{_bindir}/zsh +%{_mandir}/*/* +%{_infodir}/* +%{_datadir}/zsh +# We currently do not have this and I don't know why - 251 +#{_libdir}/zsh +%config(noreplace) %{_sysconfdir}/skel/.z* +%config(noreplace) %{_sysconfdir}/z* + +%files html +%doc Doc/*.html + +%changelog +%{?autochangelog} diff --git a/SPECS/zsh/zshenv.rhs b/SPECS/zsh/zshenv.rhs new file mode 100644 index 00000000..78e3c164 --- /dev/null +++ b/SPECS/zsh/zshenv.rhs @@ -0,0 +1,13 @@ +# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1). +# +# This file is sourced on all invocations of the shell. +# If the -f flag is present or if the NO_RCS option is +# set within this file, all other initialization files +# are skipped. +# +# This file should contain commands to set the command +# search path, plus other important environment variables. +# This file should not contain commands that produce +# output or assume the shell is attached to a tty. +# +# Global Order: zshenv, zprofile, zshrc, zlogin diff --git a/SPECS/zsh/zshrc.rhs b/SPECS/zsh/zshrc.rhs new file mode 100644 index 00000000..e818b36e --- /dev/null +++ b/SPECS/zsh/zshrc.rhs @@ -0,0 +1,49 @@ +# +# /etc/zshrc is sourced in interactive shells. It +# should contain commands to set up aliases, functions, +# options, key bindings, etc. +# + +## shell functions +#setenv() { export $1=$2 } # csh compatibility + +# Set prompts +[[ "$PROMPT" = "%m%# " ]] && PROMPT='[%n@%m]%~%# ' # default prompt +#RPROMPT=' %~' # prompt for right side of screen + +# bindkey -v # vi key bindings +# bindkey -e # emacs key bindings +bindkey ' ' magic-space # also do history expansion on space + +# Provide pathmunge for /etc/profile.d scripts +pathmunge() +{ + if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then + if [ "$2" = "after" ] ; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi + fi +} + +_src_etc_profile_d() +{ + # Make the *.sh things happier, and have possible ~/.zshenv options like + # NOMATCH ignored. + emulate -L ksh + + + # from bashrc, with zsh fixes + if [[ ! -o login ]]; then # We're not a login shell + for i in /etc/profile.d/*.sh; do + if [ -r "$i" ]; then + . $i + fi + done + unset i + fi +} +_src_etc_profile_d + +unset -f pathmunge _src_etc_profile_d diff --git a/SPECS/zstd/zstd.spec b/SPECS/zstd/zstd.spec new file mode 100644 index 00000000..ff2d7005 --- /dev/null +++ b/SPECS/zstd/zstd.spec @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors +# SPDX-FileContributor: Zheng Junjie +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond pzstd 0 + +Name: zstd +Version: 1.5.7 +Release: %autorelease +Summary: A fast lossless compression algorithm +License: BSD-3-Clause AND GPL-2.0-only +URL: https://github.com/facebook/zstd +#!RemoteAsset +Source: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz + +Buildsystem: autotools +BuildRequires: gzip +BuildRequires: gcc gcc-c++ +BuildRequires: pkgconfig(liblz4) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(zlib) +%if %{with pzstd} +BuildRequires: pkgconfig(gtest) +%endif + +Provides: libzstd = %{version}-%{release} +Obsoletes: libzstd < %{version}-%{release} + +%description +Zstd is a fast lossless compression algorithm. It's backed by a very fast entropy stage, +provided by Huff0 and FSE library. It's a real-time compression scenario for zlib levels +and has a better compression ratio. + +%package devel +Summary: Header files for zstd library +Requires: %{name} = %{version}-%{release} +Provides: libzstd-devel = %{version}-%{release} +Obsoletes: libzstd-devel < %{version}-%{release} +Provides: libzstd-static = %{version}-%{release} +Obsoletes: libzstd-static < %{version}-%{release} + +%description devel +This package contains the header files for zstd library. + +%conf +: + +%if %{with pzstd} +%build -a +%make_build -C contrib/pzstd CXXFLAGS="$RPM_OPT_FLAGS -std=c++11" +%endif + +%install +%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} +%if %{with pzstd} +install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd +install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1 +%endif + +%files +%doc CHANGELOG README.md +%license LICENSE COPYING +%{_bindir}/* +%{_libdir}/libzstd.so.* +%{_mandir}/man1/* + +%files devel +%{_includedir}/*.h +%{_libdir}/pkgconfig/libzstd.pc +%{_libdir}/libzstd.so +%{_libdir}/libzstd.a + +%changelog +%{?autochangelog} diff --git a/_manifest b/_manifest new file mode 100644 index 00000000..84e048ec --- /dev/null +++ b/_manifest @@ -0,0 +1,2 @@ +subdirectories: + - SPECS