Initial CBL-Mariner commit to GitHub

This commit is contained in:
Jon Slobodzian 2020-08-06 20:17:52 -07:00
Родитель 5d5d4eb734
Коммит b877013b27
1975 изменённых файлов: 302031 добавлений и 0 удалений

58
CONTRIBUTING.md Normal file
Просмотреть файл

@ -0,0 +1,58 @@
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
# Security Vulnerabilities
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.3 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->

Просмотреть файл

@ -0,0 +1,22 @@
Copyright (c) Microsoft Corporation.
MIT License
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.

Просмотреть файл

@ -0,0 +1,11 @@
| Folder | Governing License(s) | Description |
|---------|---------------------------|-------------------------------------|
|/ | MIT | Except where noted otherwise, all source contained within this repository is governed by the [MIT License](LICENSE.md) |
|/SPECS | Apache 2.0, MIT, et al | Refer to [LICENSE-MAP](/SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md) |

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"Cython-0.28.5.tar.gz": "bcd6a24ca0cba54ad8b1755852bb5cd567bb06abea6f776c82fbb10bb46bae37"
}
}

76
SPECS/Cython/Cython.spec Normal file
Просмотреть файл

@ -0,0 +1,76 @@
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Summary: C extensions for Python
Name: Cython
Version: 0.28.5
Release: 6%{?dist}
Group: Development/Libraries
License: ASL 2.0
URL: https://cython.org
#Source0: https://github.com/cython/cython/archive/%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
Patch0: fix_abc_tests.patch
Vendor: Microsoft Corporation
Distribution: Mariner
BuildRequires: python2-devel
BuildRequires: python2-libs
BuildRequires: python-xml
Requires: python2
%description
Cython is an optimising static compiler for both the Python programming language and the extended Cython programming language (based on Pyrex). It makes writing C extensions for Python as easy as Python itself.
%prep
%setup -q -n cython-%{version}
%patch0 -p1
%build
python2 setup.py build
%install
python2 setup.py install --skip-build --root %{buildroot}
%check
make %{?_smp_mflags} test
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%license LICENSE.txt
%{_bindir}/*
%{python2_sitelib}/Cython-%{version}-*.egg-info
%{python2_sitelib}/Cython/*
%{python2_sitelib}/cython.py*
%{python2_sitelib}/pyximport/*
%changelog
* Sat May 09 00:21:11 PST 2020 Nick Samson <nisamson@microsoft.com> - 0.28.5-6
- Added %%license line automatically
* Wed Apr 29 2020 Emre Girgin <mrgirgin@microsoft.com> 0.28.5-5
- Renaming cython to Cython
* Thu Apr 09 2020 Joe Schmitt <joschmit@microsoft.com> 0.28.5-4
- Update URL.
- Update Source0 with valid URL.
- Update license.
- Remove sha1 macro.
- Fix changelog styling.
- License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 0.28.5-3
- Initial CBL-Mariner import from Photon (license: Apache2).
* Thu Jan 10 2019 Michelle Wang <michellew@vmware.com> 0.28.5-2
- Add fix_abc_tests.patch to fix make check test.
* Mon Sep 10 2018 Ajay Kaher <akaher@vmware.com> 0.28.5-1
- Upgraded to version 0.28.5.
* Thu Jul 13 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.25.2-2
- Build using python2 explicity.
* Mon Apr 24 2017 Bo Gan <ganb@vmware.com> 0.25.2-1
- Update to 0.25.2.
* Wed Oct 05 2016 ChangLee <changlee@vmware.com> 0.23.4-3
- Modified %check.
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.23.4-2
- GA - Bump release of all rpms.
* Wed Oct 28 2015 Divya Thaluru <dthaluru@vmware.com> 0.23.4-1
- Initial build.

Просмотреть файл

@ -0,0 +1,39 @@
--- cython-0.28.5/tests/run/builtin_abs.pyx 2018-08-03 06:58:02.000000000 +0000
+++ cython-0.28.5/tests/run/builtin_abs.pyx 2019-01-10 22:47:02.208468689 +0000
@@ -50,10 +50,8 @@
True
>>> int_abs(-5.1) == 5
True
- >>> int_abs(-max_int-1) #doctest: +ELLIPSIS
- Traceback (most recent call last):
- ...
- OverflowError: ...
+ >>> int_abs(-max_int-1) #doctest: +ELLIPSIS
+ -2147483648
>>> int_abs(max_int) == abs(max_int) or (max_int, int_abs(max_int), abs(max_int))
True
"""
@@ -78,10 +76,8 @@
True
>>> long_abs(-5.1) == 5
True
- >>> long_abs(-max_long-1) #doctest: +ELLIPSIS
- Traceback (most recent call last):
- ...
- OverflowError: ...
+ >>> long_abs(-max_long-1) #doctest: +ELLIPSIS
+ -9223372036854775808
>>> long_abs(max_long) == abs(max_long) or (max_long, long_abs(max_long), abs(max_long))
True
"""
@@ -107,9 +103,7 @@
>>> long_long_abs(-(2**33)) == 2**33
True
>>> long_long_abs(-max_long_long-1) #doctest: +ELLIPSIS
- Traceback (most recent call last):
- ...
- OverflowError: ...
+ -9223372036854775808
>>> long_long_abs(max_long_long) == abs(max_long_long) or (max_long_long, long_long_abs(max_long_long), abs(max_long_long))
True
"""

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"GSL-2.0.0.tar.gz": "6cce6fb16b651e62711a4f58e484931013c33979b795d1b1f7646f640cfa9c8e"
}
}

61
SPECS/GSL/GSL.spec Normal file
Просмотреть файл

@ -0,0 +1,61 @@
Summary: GSL: Guidelines Support Library
Name: GSL
Version: 2.0.0
Release: 3%{?dist}
License: MIT
Group: Applications/File
URL: https://github.com/Microsoft/GSL
Vendor: Microsoft Corporation
Distribution: Mariner
#Source0: https://github.com/microsoft/%{name}/archive/v%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: build-essential
%description
The Guidelines Support Library (GSL) contains functions and types that are suggested
for use by the C++ Core Guidelines maintained by the Standard C++ Foundation.
This repo contains Microsoft's implementation of GSL.
The library includes types like span<T>, string_span, owner<> and others.
The entire implementation is provided inline in the headers under the gsl directory.
The implementation generally assumes a platform that implements C++14 support.
There are specific workarounds to support MSVC 2015.
%global debug_package %{nil}
%prep
%setup
%build
mkdir -p cmake
cd cmake
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DGSL_TEST=OFF ..
cmake --build .
%install
cd cmake
make DESTDIR=%{buildroot} install
rm -rf %{buildroot}/usr/cmake
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root, -)
%license LICENSE
%dir %{_includedir}/gsl
%{_includedir}/gsl/*
%changelog
* Sat May 09 00:21:38 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.0.0-3
- Added %%license line automatically
* Thu Apr 09 2020 Joe Schmitt <joschmit@microsoft.com> 2.0.0-2
- Update Source0 with valid URL.
- Remove sha1 macro.
- License verified.
* Thu Dec 5 2019 Emre Girgin <mrgirgin@microsoft.com> 2.0.0-1
- Original version for CBL-Mariner.

Просмотреть файл

@ -0,0 +1,58 @@
SPEC files that are derived from LFS sources, which are under the MIT license (www.linuxfromscratch.org/lfs/view/8.3/appendices/licenses.html):
ca-certificates
bash
filesystem
vim
tzdata
shadow-utils
ntp
unzip
docbook-dtd-xml
docbook-style-xsl
SPEC files that are derived from LFS-RPM sources:
ncurses
readline
SPEC files that are derived from package sources, which are under the package source license:
haveged
OpenIPMI
xinted
python-iniparse
SPEC files that are derived from Fedora SPEC files, which are under the MIT license unless specifically noted otherwise (https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#License_of_Fedora_SPEC_Files):
c-ares
chkconfig
initscripts
oniguruma
elfutils
zsh
perl-DBI
perl-DBIx-simple
perl-exporter-tiny
perl-json-xs
perl-libintl-perl
perl-list-moreutils
perl-module-build
perl-module-install
perl-module-scandeps
perl-object-accessor
perl-types-serializer
perl-www-curl
perl-yaml
perl-yaml-tiny
tcsh
tcl
python-pbr
pypam
pyyaml
mariadb
lvm2
systemtap
SPEC files that are derived from OpenSuse SPEC files, which are under the license of the package itself, or MIT license if it the package is not under an open source license (https://en.opensuse.org/openSUSE:Specfile_guidelines):
python-jinja2
acl
SPEC files that are derived from Centos SPEC files:
libaio

Просмотреть файл

@ -0,0 +1,162 @@
PhotonOS v3.0 (and greater versions) Copyright © VMware, Inc. 2014-2018
The files of PhotonOS version 3.0 (and greater versions) are licensed under the terms of the Apache License v2.0 or alternatively under the terms of the GNU General Public License (GPL) v2 UNLESS otherwise noted at the beginning of the file or in an EXCEPTIONS file present in a directory subtree declares a separate license.
The terms of the Apache License v2.0 and GPL v2 licenses are set forth below.
Apache License v2.0
## **Apache License, Version 2.0**
## January 2004
[http://www.apache.org/licenses/](http://www.apache.org/licenses/)LICENSE-2.0
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
**1. Definitions**.
&quot;License&quot; shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
&quot;Licensor&quot; shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
&quot;Legal Entity&quot; shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, &quot;control&quot; means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
&quot;You&quot; (or &quot;Your&quot;) shall mean an individual or Legal Entity exercising permissions granted by this License.
&quot;Source&quot; form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
&quot;Object&quot; form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
&quot;Work&quot; shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
&quot;Derivative Works&quot; shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
&quot;Contribution&quot; shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, &quot;submitted&quot; means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as &quot;Not a Contribution.&quot;
&quot;Contributor&quot; shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
**2. Grant of Copyright License**. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
**3. Grant of Patent License**. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
**4. Redistribution**. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
2. You must cause any modified files to carry prominent notices stating that You changed the files; and
3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
4. If the Work includes a &quot;NOTICE&quot; text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
**5. Submission of Contributions**. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
**6. Trademarks**. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
**7. Disclaimer of Warranty**. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
**8. Limitation of Liability**. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
**9. Accepting Warranty or Additional Liability**. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
# **APPENDIX: How to apply the Apache License to your work**
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets &quot;[]&quot; replaced with your own identifying information. (Don&#39;t include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same &quot;printed page&quot; as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
GPL v2
### **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.
### **TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION**
1. **1.** 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 &quot;Program&quot;, below, refers to any such program or work, and a &quot;work based on the Program&quot; 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 &quot;modification&quot;.) Each licensee is addressed as &quot;you&quot;.
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. **2.** You may copy and distribute verbatim copies of the Program&#39;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.
1. **3.** 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 chargeto 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.
1. **4.** 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:
1. **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,
1. **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,
1. **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.
1. **5.** 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.
1. **6.** 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.
1. **7.** 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&#39; exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
1. **8.** 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 &quot;any later version&quot;, 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 &quot;AS IS&quot; 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.

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,6 @@
Photon
Copyright 2015-2020 VMware, Inc. All Rights Reserved.
This product is licensed to you under the Apache 2.0 license (the "License"). You may not use this product except in compliance with the Apache 2.0 License.
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"ModemManager-1.10.4.tar.xz": "fa556bb4ba1f1478e709b71151b4de8f7d136d80e51c64e887fc1fd8926cdc70"
}
}

Просмотреть файл

@ -0,0 +1,80 @@
Summary: Mobile broadband modem manager
Name: ModemManager
Version: 1.10.4
Release: 2%{?dist}
URL: https://www.freedesktop.org/wiki/Software/ModemManager/
Source0: https://www.freedesktop.org/software/%{name}/%{name}-%{version}.tar.xz
License: GPLv2
Group: Applications/System
Vendor: Microsoft Corporation
Distribution: Mariner
BuildRequires: libqmi-devel
BuildRequires: gobject-introspection-devel
Requires: libqmi
Requires: gobject-introspection
%description
ModemManager provides a unified high level API for communicating
with mobile broadband modems, regardless of the protocol used to
communicate with the actual device.
%package devel
Summary: Header and development files for ModemManager
Requires: %{name} = %{version}
Requires: libqmi-devel
Requires: gobject-introspection-devel
%description devel
It contains the libraries and header files for ModemManager
%prep
%setup -q
%build
%configure --disable-static --enable-more-warnings=no
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
%check
make %{?_smp_mflags} check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license COPYING
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.ModemManager1.conf
%{_bindir}/mmcli
%{_sbindir}/ModemManager
%{_libdir}/libmm-glib.so*
%{_libdir}/girepository-1.0/ModemManager-1.0.typelib
%{_libdir}/ModemManager/*
%exclude %{_libdir}/debug
%{_mandir}/man1/mmcli.1.gz
%{_mandir}/man8/ModemManager.8.gz
%{_datadir}/dbus-1/*
%{_datadir}/locale/*
%{_datadir}/bash-completion/*
%{_datadir}/gir-1.0/ModemManager-1.0.gir
%exclude %{_datadir}/icons
%exclude %{_datadir}/ModemManager/mm-dell-dw5821e-carrier-mapping.conf
/lib/udev/rules.d/*
%files devel
%{_includedir}/ModemManager/*
%{_includedir}/libmm-glib/*
%{_libdir}/pkgconfig/ModemManager.pc
%{_libdir}/pkgconfig/mm-glib.pc
%{_libdir}/libmm-glib.la
%changelog
* Sat May 09 00:21:28 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.10.4-2
- Added %%license line automatically
* Tue Mar 17 2020 Henry Beberman <henry.beberman@microsoft.com> 1.10.4-1
- Update to 1.10.4. Fix URL. Fix Source0 URL. Licence verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.8.2-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Dec 10 2018 Alexey Makhalov <amakhalov@vmware.com> 1.8.2-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,7 @@
{
"Signatures": {
"ipmi.service": "7f55866340569bfbb4bcce32a6218667d0e8dbba99d9aac4ef8e192d3952fa71",
"openipmi-2.0.25.tar.gz": "f0f1a0ec732409930b7a31a6daa6cf39b585f52059b62a5f092b7ece21aa75a5",
"openipmi-helper": "e646bf49b3962dd0cd6261d5a7c44240261c856e0bc47d70bdc2720a2ea7d530"
}
}

Просмотреть файл

@ -0,0 +1,195 @@
Summary: A shared library implementation of IPMI and the basic tools
Name: OpenIPMI
Version: 2.0.25
Release: 5%{?dist}
URL: https://sourceforge.net/projects/openipmi/
License: LGPLv2+ and GPLv2+ or BSD
Group: System Environment/Base
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://sourceforge.net/projects/openipmi/files/latest/download/openipmi-%{version}.tar.gz
Source1: openipmi-helper
Source2: ipmi.service
BuildRequires: systemd
BuildRequires: perl
BuildRequires: popt-devel
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
BuildRequires: swig
BuildRequires: python2-devel
Requires: systemd
%description
This package contains a shared library implementation of IPMI and the
basic tools used with OpenIPMI.
%package devel
Summary: Development files for OpenIPMI
Group: Utilities
Requires: OpenIPMI = %{version}
Requires: ncurses-devel
%description devel
Contains additional files need for a developer to create applications
and/or middleware that depends on libOpenIPMI
%package perl
Summary: Perl interface for OpenIPMI
Group: Utilities
Requires: OpenIPMI = %{version}-%{release}, perl >= 5
%description perl
A Perl interface for OpenIPMI.
%package python
Summary: Python interface for OpenIPMI
Group: Utilities
Requires: OpenIPMI = %{version}-%{release}, python2
%description python
A Python interface for OpenIPMI.
%package ui
Summary: User Interface (ui)
Group: Utilities
Requires: OpenIPMI = %{version}-%{release}
%description ui
This package contains a user interface
%package lanserv
Summary: Emulates an IPMI network listener
Group: Utilities
Requires: OpenIPMI = %{version}-%{release}
%description lanserv
This package contains a network IPMI listener.
%prep
%setup -q
%build
# USERFIX: Things you might have to add to configure:
# --with-tclcflags='-I /usr/include/tclN.M' --with-tcllibs=-ltclN.M
# Obviously, replace N.M with the version of tcl on your system.
%configure \
--with-tcl=no \
--disable-static \
--with-tkinter=no \
--docdir=%{_docdir}/%{name}-%{version} \
--with-perl=yes \
--with-perlinstall=%{perl_vendorarch}
make
%install
make DESTDIR=%{buildroot} install
install -d %{buildroot}/etc/init.d
install -d %{buildroot}/etc/sysconfig
install ipmi.init %{buildroot}/etc/init.d/ipmi
install ipmi.sysconf %{buildroot}/etc/sysconfig/ipmi
find %{buildroot}/%{_libdir} -name '*.la' -delete
mkdir -p %{buildroot}/lib/systemd/system
mkdir -p %{buildroot}/%{_libexecdir}
cp %{SOURCE1} %{buildroot}/%{_libexecdir}/.
cp %{SOURCE2} %{buildroot}/lib/systemd/system/ipmi.service
chmod 755 %{buildroot}/%{_libexecdir}/openipmi-helper
install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
echo "disable ipmi.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-ipmi.preset
#The build VM does not support ipmi.
#%check
#make %{?_smp_mflags} check
%preun
%systemd_preun ipmi.service
%post
/sbin/ldconfig
%systemd_post ipmi.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart ipmi.service
%files
%defattr(-,root,root)
%license COPYING
%{_libdir}/libOpenIPMIcmdlang.so.*
%{_libdir}/libOpenIPMIposix.so.*
%{_libdir}/libOpenIPMIpthread.so.*
%{_libdir}/libOpenIPMI.so.*
%{_libdir}/libOpenIPMIutils.so.*
%doc COPYING COPYING.LIB FAQ INSTALL README README.Force
%doc README.MotorolaMXP CONFIGURING_FOR_LAN COPYING.BSD
%exclude /etc/init.d/ipmi
%config(noreplace) %{_sysconfdir}/sysconfig/ipmi
%{_libexecdir}/*
/lib/systemd/system/ipmi.service
%{_libdir}/systemd/system-preset/50-ipmi.preset
%files perl
%defattr(-,root,root)
%{perl_vendorarch}
%doc swig/OpenIPMI.i swig/perl/sample swig/perl/ipmi_powerctl
%files python
%defattr(-,root,root)
%{_libdir}/python*/site-packages/*OpenIPMI.*
%doc swig/OpenIPMI.i
%files devel
%defattr(-,root,root)
%{_includedir}/OpenIPMI
%{_libdir}/*.so
%{_libdir}/pkgconfig
%doc doc/IPMI.pdf
%files ui
%defattr(-,root,root)
%{_bindir}/ipmi_ui
%{_bindir}/ipmicmd
%{_bindir}/openipmicmd
%{_bindir}/openipmi_eventd
%{_bindir}/ipmish
%{_bindir}/openipmish
%{_bindir}/solterm
%{_bindir}/rmcp_ping
%{_libdir}/libOpenIPMIui.so.*
%{_mandir}/man1/ipmi_ui.1*
%{_mandir}/man1/openipmicmd.1*
%{_mandir}/man1/openipmish.1*
%{_mandir}/man1/openipmigui.1*
%{_mandir}/man1/solterm.1*
%{_mandir}/man1/openipmi_eventd.1.gz
%{_mandir}/man1/rmcp_ping.1*
%{_mandir}/man7/ipmi_cmdlang.7*
%{_mandir}/man7/openipmi_conparms.7*
%files lanserv
%defattr(-,root,root)
%{_bindir}/ipmilan
%{_bindir}/ipmi_sim
%{_bindir}/sdrcomp
%{_libdir}/libIPMIlanserv.so.*
%config(noreplace) %{_sysconfdir}/ipmi/ipmisim1.emu
%config(noreplace) %{_sysconfdir}/ipmi/lan.conf
%{_mandir}/man8/ipmilan.8*
%{_mandir}/man1/ipmi_sim.1.gz
%{_mandir}/man5/ipmi_lan.5.gz
%{_mandir}/man5/ipmi_sim_cmd.5.gz
%changelog
* Sat May 09 00:21:40 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.0.25-5
- Added %%license line automatically
* Fri Apr 17 2020 Nicolas Ontiveros <niontive@microsoft.com> 2.0.25-4
- Rename openipmi to OpenIPMI.
- Remove sha1 macro.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.0.25-3
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Jan 08 2019 Alexey Makhalov <amakhalov@vmware.com> 2.0.25-2
- Added BuildRequires python2-devel
* Mon Sep 10 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 2.0.25-1
- Upgrade to 2.0.25
* Fri Sep 15 2017 Xiaolin Li <xiaolinl@vmware.com> 2.0.24-2
- openipmi-devel requires ncurses-devel
* Mon Sep 11 2017 Xiaolin Li <xiaolinl@vmware.com> 2.0.24-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,12 @@
[Unit]
Description=IPMI Driver
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/libexec/openipmi-helper start
ExecStop=/usr/libexec/openipmi-helper stop
[Install]
WantedBy=multi-user.target

Просмотреть файл

@ -0,0 +1,512 @@
#!/bin/sh
#############################################################################
#
# ipmi: OpenIPMI Driver helper script
#
# Authors: Jan Safranek <jsafrane@redhat.com>
#
# Based on IPMI init script by:
# Matt Domsch <Matt_Domsch@dell.com>
# Chris Poblete <Chris_Poblete@dell.com>
#
# Status return code bits
# no bits set = no errors
# bit 0 set = minimum modules aren't loaded
# bit 1 set = requested feature module isn't loaded
# bit 2 set = /dev/ipmi0 (or /dev/imb if using that instead) doesn't exist
# bit 3 set = /dev/watchdog doesn't exist
# bit 4 set = lockfile doesn't exist
# bit 5 set = modules are loaded even when asked to be unloaded
CONFIGFILE=/etc/sysconfig/ipmi
# source config info
[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
#############################################################################
# GLOBALS
#############################################################################
MODULE_NAME="ipmi"
INTF_NUM=0
IPMI_SMB_MODULE_NAME="ipmi_smb"
IPMI_SI_MODULE_NAME="ipmi_si"
kernel=`uname -r | cut -d. -f1-2`
if [ "${kernel}" == "2.4" ]; then
IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
IPMI_SI_MODULE_NAME="ipmi_si_drv"
fi
MODULES_INTERFACES=""
[ "${DEV_IPMI}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_devintf"
[ "${IPMI_IMB}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_imb"
MODULES_FEATURES=""
[ "${IPMI_WATCHDOG}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_watchdog"
[ "${IPMI_POWEROFF}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_poweroff"
MODULES_HW=""
[ "${IPMI_SI}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SI_MODULE_NAME}"
[ "${IPMI_SMB}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SMB_MODULE_NAME}"
MODULES_BASE="ipmi_msghandler"
MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} ${MODULES_BASE}"
RETVAL=0
LOCKFILE=/var/lock/subsys/ipmi
DEV_IPMI_TIMEOUT=150
UDEV_EXISTS=0
if [ -e /sbin/udev -o -e /sbin/udevd ]; then
UDEV_EXISTS=1
fi
#############################################################################
# NOTES:
# * /dev/ipmi0 is unconditionally deleted here on ipmi_devintf unload,
# because SLES9 and RHEL4 kernels don't send a message for udev to delete
# it for us.
#
#############################################################################
modules_loaded_verbose()
{
OnePlusLoaded=0
OnePlusUnloaded=0
for m in $@; do
if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
echo "$m module loaded."
OnePlusLoaded=1
else
echo "$m module not loaded."
OnePlusUnloaded=1
fi
done
}
modules_loaded()
{
OnePlusLoaded=0
OnePlusUnloaded=0
for m in $@; do
if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
OnePlusLoaded=1
else
OnePlusUnloaded=1
fi
done
}
device_node_exists ()
{
if [ -e "$1" ]; then
echo "$1 exists."
return 1
fi
echo "$1 does not exist."
return 0
}
minimum_modules_loaded()
{
rc_base=1
rc_hw=1
modules_loaded_verbose "${MODULES_BASE}"
[ ${OnePlusLoaded} -eq 0 ] && rc_base=0
modules_loaded_verbose "${MODULES_HW}"
[ ${OnePlusLoaded} -eq 0 ] && rc_hw=0
return $((rc_base && rc_hw))
}
#############################################################################
load_si()
{
if [ "${IPMI_SI}" = "yes" ]; then
modprobe ${IPMI_SI_MODULE_NAME} > /dev/null 2>&1
modules_loaded ${IPMI_SI_MODULE_NAME}
[ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
fi
}
load_smb()
{
if [ "${IPMI_SMB}" = "yes" ]; then
modprobe ${IPMI_SMB_MODULE_NAME} > /dev/null 2>&1
modules_loaded ${IPMI_SMB_MODULE_NAME}
[ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
fi
}
load_hw_modules()
{
load_si
load_smb
}
start_watchdog_common()
{
load_hw_modules
modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} > /dev/null 2>&1
modules_loaded ipmi_watchdog
[ ${OnePlusUnloaded} -ne 0 ] &&
RETVAL=$((RETVAL | 2)) &&
echo "Watchdog startup failed: cannot load ipmi_watchdog module" &&
return
if [ ${UDEV_EXISTS} -eq 0 -a ! -e /dev/watchdog ]; then
mknod -m 0600 /dev/watchdog c 10 130
[ $? -ne 0 ] &&
RETVAL=$((RETVAL | 8)) &&
echo "Watchdog startup failed: cannot create /dev/watchdog" &&
return
fi
}
start_watchdog_quiet()
{
[ "${IPMI_WATCHDOG}" != "yes" ] &&
return
start_watchdog_common
}
start_watchdog()
{
[ "${IPMI_WATCHDOG}" != "yes" ] &&
RETVAL=$((RETVAL | 2)) &&
echo "Watchdog not configured" &&
return
start_watchdog_common
}
stop_watchdog()
{
modprobe -q -r ipmi_watchdog > /dev/null 2>&1
modules_loaded ipmi_watchdog
if [ ${OnePlusLoaded} -ne 0 ]; then
RETVAL=$((RETVAL | 32))
echo "Watchog shutdown failed: cannot unload ipmi_watchdog module"
else
if [ "${IPMI_WATCHDOG}" = "yes" ]; then
[ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
fi
fi
}
stop_watchdog_quiet()
{
modprobe -q -r ipmi_watchdog > /dev/null 2>&1
modules_loaded ipmi_watchdog
if [ ${OnePlusLoaded} -ne 0 ]; then
RETVAL=$((RETVAL | 32))
else
if [ "${IPMI_WATCHDOG}" = "yes" ]; then
[ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
fi
fi
}
start_powercontrol_common()
{
local poweroff_opts=""
load_hw_modules
if [ "${IPMI_POWERCYCLE}" == "yes" ]; then
modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
poweroff_opts="poweroff_control=2"
modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
poweroff_opts="poweroff_powercycle=1"
fi
modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1
modules_loaded ipmi_poweroff
[ ${OnePlusUnloaded} -ne 0 ] &&
RETVAL=$((RETVAL | 2)) &&
echo "Powercontroll startup failed: cannot load ipmi_poweroff module" &&
return
}
start_powercontrol_quiet()
{
[ "${IPMI_POWEROFF}" != "yes" ] &&
return
start_powercontrol_common
}
start_powercontrol()
{
[ "${IPMI_POWEROFF}" != "yes" ] &&
RETVAL=$((RETVAL | 2)) &&
echo "Powercontroll not configured" &&
return
start_powercontrol_common
}
stop_powercontrol()
{
modprobe -q -r ipmi_poweroff > /dev/null 2>&1
modules_loaded ipmi_poweroff
if [ ${OnePlusLoaded} -ne 0 ]; then
RETVAL=$((RETVAL | 32))
echo "Powercontroll shutdown failed: cannot unload ipmi_poweroff module"
fi
}
stop_powercontrol_quiet()
{
modprobe -q -r ipmi_poweroff > /dev/null 2>&1
modules_loaded ipmi_poweroff
[ ${OnePlusLoaded} -ne 0 ] && RETVAL=$((RETVAL | 32))
}
#############################################################################
unload_all_ipmi_modules()
{
stop_watchdog_quiet
stop_powercontrol_quiet
for m in ${MODULES}; do
modprobe -q -r ${m} > /dev/null 2>&1
done
# delete interface node ONLY if ipmi_devintf is unloaded
[ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
rm -f "/dev/ipmi${INTF_NUM}"
}
unload_ipmi_modules_leave_features()
{
for m in ${MODULES_INTERFACES}; do
modprobe -q -r ${m} > /dev/null 2>&1
done
# delete interface node ONLY if ipmi_devintf is unloaded
[ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
rm -f "/dev/ipmi${INTF_NUM}"
lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1
if [ "$?" -ne "0" ]; then
stop_watchdog_quiet
stop_powercontrol_quiet
for m in ${MODULES}; do
modprobe -q -r ${m} > /dev/null 2>&1
done
fi
}
#############################################################################
load_ipmi_modules ()
{
local locdelay
modprobe ipmi_msghandler > /dev/null 2>&1
modules_loaded ipmi_msghandler
[ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
load_hw_modules
[ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
if [ "${DEV_IPMI}" = "yes" ]; then
modprobe ipmi_devintf > /dev/null 2>&1
modules_loaded ipmi_devintf
RETVAL=$((RETVAL & ~2))
[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
if [ ${OnePlusLoaded} -eq 1 ]; then
if [ ${UDEV_EXISTS} -eq 0 ]; then
DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
rm -f /dev/ipmi${INTF_NUM}
mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
fi
# udev can take several seconds to create /dev/ipmi0,
# but it happens asynchronously, so delay here
locdelay=${DEV_IPMI_TIMEOUT}
while [ ! -e /dev/ipmi${INTF_NUM} -a ${locdelay} -gt 0 ]; do
locdelay=$((locdelay - 1))
sleep 0.1
done
fi
fi
if [ "${IPMI_IMB}" = "yes" ]; then
modprobe ipmi_imb > /dev/null 2>&1
modules_loaded ipmi_imb
RETVAL=$((RETVAL & ~2))
[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
if [ ${OnePlusLoaded} -eq 1 ]; then
DEVMAJOR=`cat /proc/devices | awk '/imb/{print $1}'`
rm -f /dev/imb
mknod -m 0600 /dev/imb c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
fi
fi
# Per Corey Minyard, essentially no one uses ipmi_radisys
# and we don't want to encourage its further use
# so it won't be handled here.
return
}
#############################################################################
start()
{
load_ipmi_modules
if [ ${RETVAL} -eq 0 ]; then
touch ${LOCKFILE}
else
if [ $((RETVAL & 1)) -eq 1 ]; then
echo "Startup failed."
else
touch ${LOCKFILE} && echo "Warning!?"
fi
fi
start_watchdog_quiet
start_powercontrol_quiet
}
#############################################################################
stop()
{
unload_ipmi_modules_leave_features
modules_loaded ${MODULES_INTERFACES}
if [ ${OnePlusLoaded} -ne 0 ]; then
RETVAL=$((RETVAL | 32))
echo "Shutdown failed, something may be in use"
else
rm -f ${LOCKFILE}
fi
}
stop_all()
{
unload_all_ipmi_modules
modules_loaded ${MODULES}
if [ ${OnePlusLoaded} -ne 0 ]; then
RETVAL=$((RETVAL | 32))
echo "Shutdown failed, something may be in use"
else
rm -f ${LOCKFILE}
fi
}
#############################################################################
restart()
{
stop_all
RETVAL=0
start
}
#############################################################################
reload()
{
stop_all
RETVAL=0
start
}
#############################################################################
status_all()
{
minimum_modules_loaded
[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
modules_loaded_verbose ${MODULES_FEATURES} ${MODULES_INTERFACES}
[ ${OnePlusUnloaded} -ne 0 ] && RETVAL=$((RETVAL | 2))
if [ "${DEV_IPMI}" = "yes" ]; then
device_node_exists /dev/ipmi${INTF_NUM}
[ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
fi
if [ "${IPMI_IMB}" = "yes" ]; then
device_node_exists /dev/imb
[ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
fi
if [ "${IPMI_WATCHDOG}" = "yes" ]; then
device_node_exists /dev/watchdog
[ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
fi
[ ! -e ${LOCKFILE} ] && RETVAL=$((RETVAL | 16))
}
status()
{
minimum_modules_loaded
[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
if [ "${DEV_IPMI}" = "yes" ]; then
modules_loaded_verbose ipmi_devintf
[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
device_node_exists /dev/ipmi${INTF_NUM}
[ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
fi
if [ "${IPMI_IMB}" = "yes" ]; then
device_node_exists /dev/imb
[ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
fi
}
status_watchdog()
{
minimum_modules_loaded
[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
modules_loaded_verbose ipmi_watchdog
[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
device_node_exists /dev/watchdog
[ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
}
status_powercontrol()
{
minimum_modules_loaded
[ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
modules_loaded_verbose ipmi_powercontrol
[ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
}
#############################################################################
usage ()
{
echo $"Usage: $0 {start|stop|status" 1>&2
echo $" restart|condrestart|try-restart|reload|force-reload" 1>&2
echo $" start-watchdog|stop-watchdog|status-watchdog" 1>&2
echo $" start-powercontrol|stop-powercontrol|status-powercontrol" 1>&2
echo $" stop-all|status-all}" 1>&2
RETVAL=2
}
condrestart ()
{
[ -e ${LOCKFILE} ] && restart
}
#############################################################################
# MAIN
#############################################################################
case "$1" in
start) start ;;
stop) stop ;;
restart) restart ;;
force-reload) reload ;;
reload) reload ;;
status) status ;;
status-all) status_all ;;
condrestart) condrestart ;;
try-restart) condrestart ;;
start-watchdog) start_watchdog ;;
stop-watchdog) stop_watchdog ;;
status-watchdog) status_watchdog ;;
start-powercontrol) start_powercontrol ;;
stop-powercontrol) stop_powercontrol ;;
status-powercontrol) status_powercontrol ;;
stop-all) stop_all ;;
*) usage ;;
esac
exit ${RETVAL}
#############################################################################
# end of file
#############################################################################

Просмотреть файл

@ -0,0 +1,17 @@
diff -up PyPAM-0.5.0/PAMmodule.c.dealloc PyPAM-0.5.0/PAMmodule.c
--- PyPAM-0.5.0/PAMmodule.c.dealloc 2011-01-17 22:48:22.000000000 +0100
+++ PyPAM-0.5.0/PAMmodule.c 2011-01-18 21:24:59.000000000 +0100
@@ -538,10 +538,11 @@ static void PyPAM_dealloc(PyPAMObject *s
free(self->service);
free(self->user);
free(self->conv);
- pam_end(self->pamh, PAM_SUCCESS);
+ if (self->pamh)
+ pam_end(self->pamh, PAM_SUCCESS);
dlclose(self->dlh2);
dlclose(self->dlh1);
- PyMem_DEL(self);
+ PyObject_Del(self);
}
static PyObject * PyPAM_getattr(PyPAMObject *self, char *name)

Просмотреть файл

@ -0,0 +1,128 @@
diff -up PyPAM-0.5.0/PAMmodule.c.memory PyPAM-0.5.0/PAMmodule.c
--- PyPAM-0.5.0/PAMmodule.c.memory 2012-05-07 17:22:54.503914026 +0200
+++ PyPAM-0.5.0/PAMmodule.c 2012-05-07 17:23:15.644381942 +0200
@@ -37,33 +37,48 @@ static void PyPAM_Err(PyPAMObject *self,
err_msg = pam_strerror(self->pamh, result);
error = Py_BuildValue("(si)", err_msg, result);
- Py_INCREF(PyPAM_Error);
PyErr_SetObject(PyPAM_Error, error);
+ Py_XDECREF(error);
}
static int PyPAM_conv(int num_msg, const struct pam_message **msg,
struct pam_response **resp, void *appdata_ptr)
{
- PyObject *args;
-
+ PyObject *args, *msgList, *respList, *item;
+ struct pam_response *response, *spr;
PyPAMObject* self = (PyPAMObject *) appdata_ptr;
+
if (self->callback == NULL)
return PAM_CONV_ERR;
Py_INCREF(self);
- PyObject* msgList = PyList_New(num_msg);
-
+ msgList = PyList_New(num_msg);
+ if (msgList == NULL) {
+ Py_DECREF(self);
+ return PAM_CONV_ERR;
+ }
+
for (int i = 0; i < num_msg; i++) {
- PyList_SetItem(msgList, i,
- Py_BuildValue("(si)", msg[i]->msg, msg[i]->msg_style));
+ item = Py_BuildValue("(si)", msg[i]->msg, msg[i]->msg_style);
+ if (item == NULL) {
+ Py_DECREF(msgList);
+ Py_DECREF(self);
+ return PAM_CONV_ERR;
+ }
+ PyList_SetItem(msgList, i, item);
}
-
+
args = Py_BuildValue("(OO)", self, msgList);
- PyObject* respList = PyEval_CallObject(self->callback, args);
+ if (args == NULL) {
+ Py_DECREF(self);
+ Py_DECREF(msgList);
+ return PAM_CONV_ERR;
+ }
+ respList = PyEval_CallObject(self->callback, args);
Py_DECREF(args);
Py_DECREF(self);
-
+
if (respList == NULL)
return PAM_CONV_ERR;
@@ -71,11 +86,15 @@ static int PyPAM_conv(int num_msg, const
Py_DECREF(respList);
return PAM_CONV_ERR;
}
-
- *resp = (struct pam_response *) malloc(
+
+ response = (struct pam_response *) malloc(
PyList_Size(respList) * sizeof(struct pam_response));
+ if (response == NULL) {
+ Py_DECREF(respList);
+ return PAM_CONV_ERR;
+ }
+ spr = response;
- struct pam_response* spr = *resp;
for (int i = 0; i < PyList_Size(respList); i++, spr++) {
PyObject* respTuple = PyList_GetItem(respList, i);
char* resp_text;
@@ -85,7 +104,7 @@ static int PyPAM_conv(int num_msg, const
free((--spr)->resp);
--i;
}
- free(*resp);
+ free(response);
Py_DECREF(respList);
return PAM_CONV_ERR;
}
@@ -95,7 +114,8 @@ static int PyPAM_conv(int num_msg, const
}
Py_DECREF(respList);
-
+ *resp = response;
+
return PAM_SUCCESS;
}
@@ -122,7 +142,11 @@ static PyObject * PyPAM_pam(PyObject *se
PyPAMObject_Type.ob_type = &PyType_Type;
p = (PyPAMObject *) PyObject_NEW(PyPAMObject, &PyPAMObject_Type);
+ if (p == NULL)
+ return NULL;
+
if ((spc = (struct pam_conv *) malloc(sizeof(struct pam_conv))) == NULL) {
+ Py_DECREF((PyObject *)p);
PyErr_SetString(PyExc_MemoryError, "out of memory");
return NULL;
}
@@ -455,9 +479,15 @@ static PyObject * PyPAM_getenvlist(PyObj
}
retval = PyList_New(0);
+ if (retval == NULL)
+ return NULL;
while ((cp = *(result++)) != NULL) {
entry = Py_BuildValue("s", cp);
+ if (entry == NULL) {
+ Py_DECREF(retval);
+ return NULL;
+ }
PyList_Append(retval, entry);
Py_DECREF(entry);
}

Просмотреть файл

@ -0,0 +1,60 @@
diff --git a/PAMmodule.c b/PAMmodule.c
index 03cb799..a7ff8a5 100644
--- a/PAMmodule.c
+++ b/PAMmodule.c
@@ -24,8 +24,6 @@ typedef struct {
char *service;
char *user;
PyObject *callback;
- struct pam_response *response_data;
- int response_len;
PyObject *user_data;
void *dlh1, *dlh2;
} PyPAMObject;
@@ -54,15 +52,6 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg,
Py_INCREF(self);
- if (NULL != self->response_data) {
- for (int i = 0; i < self->response_len; i++) {
- free(self->response_data[0].resp);
- }
- free(self->response_data);
- self->response_data = NULL;
- self->response_len = 0;
- }
-
PyObject* msgList = PyList_New(num_msg);
for (int i = 0; i < num_msg; i++) {
@@ -92,6 +81,10 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg,
char* resp_text;
int resp_retcode = 0;
if (!PyArg_ParseTuple(respTuple, "si", &resp_text, &resp_retcode)) {
+ while (i > 0) {
+ free((--spr)->resp);
+ --i;
+ }
free(*resp);
Py_DECREF(respList);
return PAM_CONV_ERR;
@@ -100,10 +93,6 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg,
spr->resp_retcode = resp_retcode;
Py_DECREF(respTuple);
}
-
- // Save this so we can free it later.
- self->response_data = *resp;
- self->response_len = PyList_Size(respList);
Py_DECREF(respList);
@@ -144,8 +133,6 @@ static PyObject * PyPAM_pam(PyObject *self, PyObject *args)
p->user = NULL;
Py_INCREF(Py_None);
p->callback = Py_None;
- p->response_data = NULL;
- p->response_len = 0;
Py_INCREF(Py_None);
p->user_data = Py_None;

Просмотреть файл

@ -0,0 +1,57 @@
diff -up PyPAM-0.5.0/PAMmodule.c.retval PyPAM-0.5.0/PAMmodule.c
--- PyPAM-0.5.0/PAMmodule.c.retval 2012-05-04 21:47:51.000000000 +0200
+++ PyPAM-0.5.0/PAMmodule.c 2012-05-07 09:42:27.690963206 +0200
@@ -248,7 +248,7 @@ static PyObject * PyPAM_setcred(PyObject
result = pam_setcred(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err(_self, result);
return NULL;
}
@@ -270,7 +270,7 @@ static PyObject * PyPAM_acct_mgmt(PyObje
result = pam_acct_mgmt(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err(_self, result);
return NULL;
}
@@ -292,7 +292,7 @@ static PyObject * PyPAM_chauthtok(PyObje
result = pam_chauthtok(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err(_self, result);
return NULL;
}
@@ -314,7 +314,7 @@ static PyObject * PyPAM_open_session(PyO
result = pam_open_session(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err(_self, result);
return NULL;
}
@@ -336,7 +336,7 @@ static PyObject * PyPAM_close_session(Py
result = pam_close_session(_self->pamh, flags);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err(_self, result);
return NULL;
}
@@ -433,7 +433,7 @@ static PyObject * PyPAM_putenv(PyObject
result = pam_putenv(_self->pamh, val);
if (result != PAM_SUCCESS) {
- PyErr_SetString(PyPAM_Error, "Not authenticated");
+ PyPAM_Err(_self, result);
return NULL;
}

Просмотреть файл

@ -0,0 +1,15 @@
diff --git a/PAMmodule.c.orig b/PAMmodule.c
index f6730f1..7276415 100644
--- a/PAMmodule.c.orig
+++ b/PAMmodule.c
@@ -149,8 +149,8 @@ static PyObject * PyPAM_pam(PyObject *self, PyObject *args)
Py_INCREF(Py_None);
p->user_data = Py_None;
- p->dlh1 = dlopen("libpam.so", RTLD_LAZY | RTLD_GLOBAL);
- p->dlh2 = dlopen("libpam_misc.so", RTLD_LAZY | RTLD_GLOBAL);
+ p->dlh1 = dlopen("libpam.so.0", RTLD_LAZY | RTLD_GLOBAL);
+ p->dlh2 = dlopen("libpam_misc.so.0", RTLD_LAZY | RTLD_GLOBAL);
return (PyObject *) p;
}

Просмотреть файл

@ -0,0 +1,198 @@
--- PAMmodule.c.python3 2014-06-24 11:29:10.958299393 +0200
+++ PAMmodule.c 2014-06-24 15:20:02.728118493 +0200
@@ -15,6 +15,14 @@
#include <stdio.h>
#include <dlfcn.h>
+#if PY_MAJOR_VERSION >= 3
+#define IS_PY3K
+#else
+// include bytesobject.h to map PyBytes_* to PyString_*
+#include <bytesobject.h>
+#endif
+
+
static PyObject *PyPAM_Error;
typedef struct {
@@ -28,7 +36,11 @@
void *dlh1, *dlh2;
} PyPAMObject;
+#ifdef IS_PY3K
+static PyTypeObject PyPAMObject_Type;
+#else
staticforward PyTypeObject PyPAMObject_Type;
+#endif
static void PyPAM_Err(PyPAMObject *self, int result)
{
@@ -139,7 +151,6 @@
return NULL;
}
- PyPAMObject_Type.ob_type = &PyType_Type;
p = (PyPAMObject *) PyObject_NEW(PyPAMObject, &PyPAMObject_Type);
if (p == NULL)
@@ -562,35 +573,44 @@
PyObject_Del(self);
}
-static PyObject * PyPAM_getattr(PyPAMObject *self, char *name)
-{
- return Py_FindMethod(PyPAMObject_Methods, (PyObject *) self, name);
-}
-
static PyObject * PyPAM_repr(PyPAMObject *self)
{
char buf[1024];
snprintf(buf, 1024, "<pam object, service=\"%s\", user=\"%s\", conv=%p, pamh=%p>",
self->service, self->user, self->conv, self->pamh);
- return PyString_FromString(buf);
+ return PyBytes_FromString(buf);
}
static PyTypeObject PyPAMObject_Type = {
- PyObject_HEAD_INIT(0) /* Must fill in type value later */
- 0,
- "pam",
- sizeof(PyPAMObject),
- 0,
- (destructor)PyPAM_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)PyPAM_getattr, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare*/
- (reprfunc)PyPAM_repr, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ PyVarObject_HEAD_INIT(NULL, 0) /* Must fill in type value later */
+ "pam", /* tp_name */
+ sizeof(PyPAMObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)PyPAM_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ (reprfunc)PyPAM_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ "PyPAM", /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ PyPAMObject_Methods, /* tp_methods */
};
static PyMethodDef PyPAM_Methods[] = {
@@ -607,7 +627,12 @@
*/
static void insint(PyObject *d, char *name, int value)
{
- PyObject* v = PyInt_FromLong((long) value);
+ PyObject* v;
+#ifdef IS_PY3K
+ v = PyLong_FromLong((long) value);
+#else
+ v = PyInt_FromLong((long) value);
+#endif
if (!v || PyDict_SetItemString(d, name, v))
PyErr_Clear();
@@ -615,19 +640,42 @@
Py_XDECREF(v);
}
+#ifdef IS_PY3K
+static struct PyModuleDef pamdef = {
+ PyModuleDef_HEAD_INIT,
+ "PAM",
+ NULL,
+ -1,
+ PyPAM_Methods,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
+#define INITERROR return NULL
+PyObject *PyInit_PAM(void)
+
+#else
+#define INITERROR return
void initPAM(void)
+#endif
{
PyObject *m, *d;
+#ifdef IS_PY3K
+ m = PyModule_Create(&pamdef);
+#else
m = Py_InitModule("PAM", PyPAM_Methods);
+#endif
d = PyModule_GetDict(m);
PyPAM_Error = PyErr_NewException("PAM.error", NULL, NULL);
if (PyPAM_Error == NULL)
- return;
+ INITERROR;
PyDict_SetItemString(d, "error", PyPAM_Error);
- PyPAMObject_Type.ob_type = &PyType_Type;
+ Py_TYPE(&PyPAMObject_Type) = &PyType_Type;
PyPAMObject_Type.tp_doc = PyPAMObject_doc;
Py_INCREF(&PyPAMObject_Type);
@@ -692,4 +740,7 @@
insint(d, "PAM_BINARY_PROMPT", PAM_BINARY_PROMPT);
#endif
+#ifdef IS_PY3K
+ return m;
+#endif
}
--- setup.py.python3 2014-06-24 15:58:07.792172439 +0200
+++ setup.py 2014-06-24 15:58:13.714909021 +0200
@@ -12,7 +12,7 @@
license='LGPL',
ext_modules=[
Extension(
- 'PAMmodule',
+ 'PAM',
['PAMmodule.c'],
libraries=['pam', 'pam_misc'],
extra_compile_args = ['-std=c99'],
--- tests/PamTest.py.python3 2014-06-24 16:54:28.902998249 +0200
+++ tests/PamTest.py 2014-06-24 17:07:11.392094775 +0200
@@ -41,13 +41,13 @@
def test_userdata_default(self):
"""The default value for userdata is None."""
- self.failUnless(self.pam.get_userdata() is None)
+ self.assertTrue(self.pam.get_userdata() is None)
def test_userdata(self):
"""The userdata getter and setter will store and return any data."""
self.pam.set_userdata(1)
- self.failUnless(self.pam.get_userdata() == 1)
+ self.assertTrue(self.pam.get_userdata() == 1)
def test_start(self):
"""pam.start() works as expected."""

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"PyPAM-0.5.0.tar.gz": "796ac019b9ee805696d0d277d8fb912fa2391b6ac070dc6f9f1a9a0fadbc3a5a"
}
}

105
SPECS/PyPAM/PyPAM.spec Normal file
Просмотреть файл

@ -0,0 +1,105 @@
# Got the intial spec and patches from Fedora and modified the spec.
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Summary: Python bindings for PAM (Pluggable Authentication Modules).
Name: PyPAM
Version: 0.5.0
Release: 8%{?dist}
License: LGPLv2
Group: Development/Languages/Python
Vendor: Microsoft Corporation
Distribution: Mariner
# Note that the upstream URL is dead. Project seems to have been abandoned by authors.
Url: http://www.pangalactic.org/PyPAM
Source0: https://src.fedoraproject.org/repo/pkgs/%{name}/%{name}-%{version}.tar.gz/f1e7c2c56421dda28a75ace59a3c8871/%{name}-%{version}.tar.gz
Patch0: PyPAM-dlopen.patch
Patch1: PyPAM-0.5.0-dealloc.patch
Patch2: PyPAM-0.5.0-nofree.patch
Patch3: PyPAM-0.5.0-memory-errors.patch
Patch4: PyPAM-0.5.0-return-value.patch
Patch5: PyPAM-python3-support.patch
BuildRequires: python2-devel
BuildRequires: python2-libs
BuildRequires: python-setuptools
BuildRequires: pam-devel
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-libs
Requires: python2
Requires: python2-libs
%description
Python bindings for PAM (Pluggable Authentication Modules).
%package -n python3-PyPAM
Summary: python-PyPAM
Requires: python3
Requires: python3-libs
%description -n python3-PyPAM
Python 3 version.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p0
rm -rf ../p3dir
cp -a . ../p3dir
%build
python2 setup.py build
pushd ../p3dir
python3 setup.py build
popd
%install
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
pushd ../p3dir
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
%check
PATH=%{buildroot}%{_bindir}:${PATH} \
PYTHONPATH=%{buildroot}%{python2_sitelib} \
python2 tests/PamTest.py
pushd ../p3dir
PATH=%{buildroot}%{_bindir}:${PATH} \
PYTHONPATH=%{buildroot}%{python3_sitelib} \
python3 tests/PamTest.py
popd
%files
%defattr(-,root,root,-)
%license COPYING
%{python2_sitelib}/*
%files -n python3-PyPAM
%defattr(-,root,root,-)
%{python3_sitelib}/*
%changelog
* Sat May 09 00:20:39 PST 2020 Nick Samson <nisamson@microsoft.com> - 0.5.0-8
- Added %%license line automatically
* Tue Apr 28 2020 Emre Girgin <mrgirgin@microsoft.com> 0.5.0-7
- Renaming Linux-PAM to pam
* Mon Apr 27 2020 Nick Samson <nisamson@microsoft.com> 0.5.0-6
- Updated Source0, License verified, %%define sha removed
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 0.5.0-5
- Initial CBL-Mariner import from Photon (license: Apache2).
* Thu Jan 10 2019 Alexey Makhalov <amakhalov@vmware.com> 0.5.0-4
- Added BuildRequires python2-devel.
- Moved all buildRequires to the main package.
* Thu Jun 22 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.5.0-3
- Fix the check section
* Wed May 31 2017 Dheeraj Shetty <dheerajs@vmware.com> 0.5.0-2
- Changing python_sitelib to python2
* Tue Apr 11 2017 Xiaolin Li <xiaolinl@vmware.com> 0.5.0-1
- Initial packaging for Photon.

Просмотреть файл

@ -0,0 +1,68 @@
From 00e9935c10ca32c9fcb4beafcd1f6ecd77a23916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= <ingy@ingy.net>
Date: Tue, 19 Mar 2019 10:34:39 -0700
Subject: [PATCH] Add custom constructors to multiple loaders
When someone writes a subclass of the YAMLObject class, the constructors
will now be added to all 3 (non-safe) loaders.
Furthermore, we support the class variable `yaml_loader` being a list,
offering more control of which loaders are affected.
To support safe_load in your custom class you could add this:
yaml_loader = yaml.SafeLoader
yaml_loader = yaml.YAMLObject.yaml_loader
yaml_loader.append(yaml.SafeLoader)
--- a/lib/yaml/__init__.py_org 2019-04-13 00:40:21.924330209 +0000
+++ b/lib/yaml/__init__.py 2019-04-13 00:43:18.976335205 +0000
@@ -371,7 +371,12 @@ class YAMLObjectMetaclass(type):
def __init__(cls, name, bases, kwds):
super(YAMLObjectMetaclass, cls).__init__(name, bases, kwds)
if 'yaml_tag' in kwds and kwds['yaml_tag'] is not None:
- cls.yaml_loader.add_constructor(cls.yaml_tag, cls.from_yaml)
+ if isinstance(cls.yaml_loader, list):
+ for loader in cls.yaml_loader:
+ loader.add_constructor(cls.yaml_tag, cls.from_yaml)
+ else:
+ cls.yaml_loader.add_constructor(cls.yaml_tag, cls.from_yaml)
+
cls.yaml_dumper.add_representer(cls, cls.to_yaml)
class YAMLObject(object):
@@ -383,7 +388,7 @@ class YAMLObject(object):
__metaclass__ = YAMLObjectMetaclass
__slots__ = () # no direct instantiation, so allow immutable subclasses
- yaml_loader = Loader
+ yaml_loader = [Loader, FullLoader, UnsafeLoader]
yaml_dumper = Dumper
yaml_tag = None
--- a/lib3/yaml/__init__.py_org 2019-04-13 00:43:29.432335500 +0000
+++ b/lib3/yaml/__init__.py 2019-04-13 00:44:38.876337459 +0000
@@ -278,7 +278,12 @@ class YAMLObjectMetaclass(type):
def __init__(cls, name, bases, kwds):
super(YAMLObjectMetaclass, cls).__init__(name, bases, kwds)
if 'yaml_tag' in kwds and kwds['yaml_tag'] is not None:
- cls.yaml_loader.add_constructor(cls.yaml_tag, cls.from_yaml)
+ if isinstance(cls.yaml_loader, list):
+ for loader in cls.yaml_loader:
+ loader.add_constructor(cls.yaml_tag, cls.from_yaml)
+ else:
+ cls.yaml_loader.add_constructor(cls.yaml_tag, cls.from_yaml)
+
cls.yaml_dumper.add_representer(cls, cls.to_yaml)
class YAMLObject(metaclass=YAMLObjectMetaclass):
@@ -289,7 +294,7 @@ class YAMLObject(metaclass=YAMLObjectMet
__slots__ = () # no direct instantiation, so allow immutable subclasses
- yaml_loader = Loader
+ yaml_loader = [Loader, FullLoader, UnsafeLoader]
yaml_dumper = Dumper
yaml_tag = None

Просмотреть файл

@ -0,0 +1,588 @@
rom 0cedb2a0697b2bc49e4f3841b8d4590b6b15657e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= <ingy@ingy.net>
Date: Sun, 17 Feb 2019 19:22:58 -0800
Subject: [PATCH] Deprecate/warn usage of yaml.load(input)
The `load` and `load_all` methods will issue a warning when they are
called without the 'Loader=' parameter. The warning will point to a URL
that is always up to date with the latest information on the usage of
`load`.
There are several ways to stop the warning:
* Use `full_load(input)` - sugar for `yaml.load(input, FullLoader)`
* FullLoader is the new safe but complete loader class
* Use `safe_load(input)` - sugar for `yaml.load(input, SafeLoader)`
* Make sure your input YAML consists of the 'safe' subset
* Use `unsafe_load(input)` - sugar for `yaml.load(input, UnsafeLoader)`
* Make sure your input YAML consists of the 'safe' subset
* Use `yaml.load(input, Loader=yaml.<loader>)`
* Or shorter `yaml.load(input, yaml.<loader>)`
* Where '<loader>' can be:
* FullLoader - safe, complete Python YAML loading
* SafeLoader - safe, partial Python YAML loading
* UnsafeLoader - more explicit name for the old, unsafe 'Loader' class
* yaml.warnings({'YAMLLoadWarning': False})
* Use this when you use third party modules that use `yaml.load(input)`
* Only do this if input is trusted
The above `load()` expressions all have `load_all()` counterparts.
You can get the original unsafe behavior with:
* `yaml.unsafe_load(input)`
* `yaml.load(input, Loader=yaml.UnsafeLoader)`
In a future release, `yaml.load(input)` will raise an exception.
The new loader called FullLoader is almost entirely complete as
Loader/UnsafeLoader but it does it avoids all known code execution
paths. It is the preferred YAML loader, and the current default for
`yaml.load(input)` when you get the warning.
Here are some of the exploits that can be triggered with UnsafeLoader
but not with FullLoader:
```
python -c 'import os, yaml; yaml.full_load("!!python/object/new:os.system [echo EXPLOIT!]")'`
python -c 'import yaml; print yaml.full_load("!!python/object/new:abs [-5]")'
python -c 'import yaml; yaml.full_load("!!python/object/new:eval [exit(5)]")' ; echo $?
python -c 'import yaml; yaml.full_load("!!python/object/new:exit [5]")' ; echo $?
---
lib/yaml/__init__.py | 101 ++++++++++++++++++++++++--
lib/yaml/constructor.py | 126 +++++++++++++++++++++------------
lib/yaml/cyaml.py | 20 +++++-
lib/yaml/loader.py | 25 ++++++-
tests/lib/test_errors.py | 6 +-
tests/lib/test_input_output.py | 10 +--
tests/lib/test_recursive.py | 2 +-
7 files changed, 227 insertions(+), 63 deletions(-)
diff --git a/lib/yaml/__init__.py b/lib/yaml/__init__.py
index 25d03d6..a363973 100644
--- a/lib/yaml/__init__.py
+++ b/lib/yaml/__init__.py
@@ -16,6 +16,45 @@ try:
except ImportError:
__with_libyaml__ = False
+#------------------------------------------------------------------------------
+# Warnings control
+#------------------------------------------------------------------------------
+
+# 'Global' warnings state:
+_warnings_enabled = {
+ 'YAMLLoadWarning': True,
+}
+
+# Get or set global warnings' state
+def warnings(settings=None):
+ if settings is None:
+ return _warnings_enabled
+
+ if type(settings) is dict:
+ for key in settings:
+ if key in _warnings_enabled:
+ _warnings_enabled[key] = settings[key]
+
+# Warn when load() is called without Loader=...
+class YAMLLoadWarning(RuntimeWarning):
+ pass
+
+def load_warning(method):
+ if _warnings_enabled['YAMLLoadWarning'] is False:
+ return
+
+ import warnings
+
+ message = (
+ "calling yaml.%s() without Loader=... is deprecated, as the "
+ "default Loader is unsafe. Please read "
+ "https://msg.pyyaml.org/load for full details."
+ ) % method
+
+ warnings.warn(message, YAMLLoadWarning, stacklevel=3)
+
+#------------------------------------------------------------------------------
+
def scan(stream, Loader=Loader):
"""
Scan a YAML stream and produce scanning tokens.
@@ -61,22 +100,30 @@ def compose_all(stream, Loader=Loader):
finally:
loader.dispose()
-def load(stream, Loader=Loader):
+def load(stream, Loader=None):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
"""
+ if Loader is None:
+ load_warning('load')
+ Loader = FullLoader
+
loader = Loader(stream)
try:
return loader.get_single_data()
finally:
loader.dispose()
-def load_all(stream, Loader=Loader):
+def load_all(stream, Loader=None):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
"""
+ if Loader is None:
+ load_warning('load_all')
+ Loader = FullLoader
+
loader = Loader(stream)
try:
while loader.check_data():
@@ -84,11 +131,33 @@ def load_all(stream, Loader=Loader):
finally:
loader.dispose()
+def full_load(stream):
+ """
+ Parse the first YAML document in a stream
+ and produce the corresponding Python object.
+
+ Resolve all tags except those known to be
+ unsafe on untrusted input.
+ """
+ return load(stream, FullLoader)
+
+def full_load_all(stream):
+ """
+ Parse all YAML documents in a stream
+ and produce corresponding Python objects.
+
+ Resolve all tags except those known to be
+ unsafe on untrusted input.
+ """
+ return load_all(stream, FullLoader)
+
def safe_load(stream):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
- Resolve only basic YAML tags.
+
+ Resolve only basic YAML tags. This is known
+ to be safe for untrusted input.
"""
return load(stream, SafeLoader)
@@ -96,10 +165,32 @@ def safe_load_all(stream):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
- Resolve only basic YAML tags.
+
+ Resolve only basic YAML tags. This is known
+ to be safe for untrusted input.
"""
return load_all(stream, SafeLoader)
+def unsafe_load(stream):
+ """
+ Parse the first YAML document in a stream
+ and produce the corresponding Python object.
+
+ Resolve all tags, even those known to be
+ unsafe on untrusted input.
+ """
+ return load(stream, UnsafeLoader)
+
+def unsafe_load_all(stream):
+ """
+ Parse all YAML documents in a stream
+ and produce corresponding Python objects.
+
+ Resolve all tags, even those known to be
+ unsafe on untrusted input.
+ """
+ return load_all(stream, UnsafeLoader)
+
def emit(events, stream=None, Dumper=Dumper,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None):
diff --git a/lib/yaml/constructor.py b/lib/yaml/constructor.py
index 635faac..516dad1 100644
--- a/lib/yaml/constructor.py
+++ b/lib/yaml/constructor.py
@@ -1,6 +1,12 @@
-__all__ = ['BaseConstructor', 'SafeConstructor', 'Constructor',
- 'ConstructorError']
+__all__ = [
+ 'BaseConstructor',
+ 'SafeConstructor',
+ 'FullConstructor',
+ 'UnsafeConstructor',
+ 'Constructor',
+ 'ConstructorError'
+]
from error import *
from nodes import *
@@ -464,7 +470,7 @@ SafeConstructor.add_constructor(
SafeConstructor.add_constructor(None,
SafeConstructor.construct_undefined)
-class Constructor(SafeConstructor):
+class FullConstructor(SafeConstructor):
def construct_python_str(self, node):
return self.construct_scalar(node).encode('utf-8')
@@ -481,18 +487,22 @@ class Constructor(SafeConstructor):
def construct_python_tuple(self, node):
return tuple(self.construct_sequence(node))
- def find_python_module(self, name, mark):
+ def find_python_module(self, name, mark, unsafe=False):
if not name:
raise ConstructorError("while constructing a Python module", mark,
"expected non-empty name appended to the tag", mark)
- try:
- __import__(name)
- except ImportError, exc:
+ if unsafe:
+ try:
+ __import__(name)
+ except ImportError, exc:
+ raise ConstructorError("while constructing a Python module", mark,
+ "cannot find module %r (%s)" % (name.encode('utf-8'), exc), mark)
+ if not name in sys.modules:
raise ConstructorError("while constructing a Python module", mark,
- "cannot find module %r (%s)" % (name.encode('utf-8'), exc), mark)
+ "module %r is not imported" % name.encode('utf-8'), mark)
return sys.modules[name]
- def find_python_name(self, name, mark):
+ def find_python_name(self, name, mark, unsafe=False):
if not name:
raise ConstructorError("while constructing a Python object", mark,
"expected non-empty name appended to the tag", mark)
@@ -501,11 +511,15 @@ class Constructor(SafeConstructor):
else:
module_name = '__builtin__'
object_name = name
- try:
- __import__(module_name)
- except ImportError, exc:
+ if unsafe:
+ try:
+ __import__(module_name)
+ except ImportError, exc:
+ raise ConstructorError("while constructing a Python object", mark,
+ "cannot find module %r (%s)" % (module_name.encode('utf-8'), exc), mark)
+ if not module_name in sys.modules:
raise ConstructorError("while constructing a Python object", mark,
- "cannot find module %r (%s)" % (module_name.encode('utf-8'), exc), mark)
+ "module %r is not imported" % module_name.encode('utf-8'), mark)
module = sys.modules[module_name]
if not hasattr(module, object_name):
raise ConstructorError("while constructing a Python object", mark,
@@ -532,12 +546,16 @@ class Constructor(SafeConstructor):
class classobj: pass
def make_python_instance(self, suffix, node,
- args=None, kwds=None, newobj=False):
+ args=None, kwds=None, newobj=False, unsafe=False):
if not args:
args = []
if not kwds:
kwds = {}
cls = self.find_python_name(suffix, node.start_mark)
+ if not (unsafe or isinstance(cls, type) or isinstance(cls, type(self.classobj))):
+ raise ConstructorError("while constructing a Python instance", node.start_mark,
+ "expected a class, but found %r" % type(cls),
+ node.start_mark)
if newobj and isinstance(cls, type(self.classobj)) \
and not args and not kwds:
instance = self.classobj()
@@ -609,67 +627,83 @@ class Constructor(SafeConstructor):
def construct_python_object_new(self, suffix, node):
return self.construct_python_object_apply(suffix, node, newobj=True)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/none',
- Constructor.construct_yaml_null)
+ FullConstructor.construct_yaml_null)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/bool',
- Constructor.construct_yaml_bool)
+ FullConstructor.construct_yaml_bool)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/str',
- Constructor.construct_python_str)
+ FullConstructor.construct_python_str)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/unicode',
- Constructor.construct_python_unicode)
+ FullConstructor.construct_python_unicode)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/int',
- Constructor.construct_yaml_int)
+ FullConstructor.construct_yaml_int)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/long',
- Constructor.construct_python_long)
+ FullConstructor.construct_python_long)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/float',
- Constructor.construct_yaml_float)
+ FullConstructor.construct_yaml_float)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/complex',
- Constructor.construct_python_complex)
+ FullConstructor.construct_python_complex)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/list',
- Constructor.construct_yaml_seq)
+ FullConstructor.construct_yaml_seq)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/tuple',
- Constructor.construct_python_tuple)
+ FullConstructor.construct_python_tuple)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
u'tag:yaml.org,2002:python/dict',
- Constructor.construct_yaml_map)
+ FullConstructor.construct_yaml_map)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
u'tag:yaml.org,2002:python/name:',
- Constructor.construct_python_name)
+ FullConstructor.construct_python_name)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
u'tag:yaml.org,2002:python/module:',
- Constructor.construct_python_module)
+ FullConstructor.construct_python_module)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
u'tag:yaml.org,2002:python/object:',
- Constructor.construct_python_object)
+ FullConstructor.construct_python_object)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
u'tag:yaml.org,2002:python/object/apply:',
- Constructor.construct_python_object_apply)
+ FullConstructor.construct_python_object_apply)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
u'tag:yaml.org,2002:python/object/new:',
- Constructor.construct_python_object_new)
+ FullConstructor.construct_python_object_new)
+class UnsafeConstructor(FullConstructor):
+
+ def find_python_module(self, name, mark):
+ return super(UnsafeConstructor, self).find_python_module(name, mark, unsafe=True)
+
+ def find_python_name(self, name, mark):
+ return super(UnsafeConstructor, self).find_python_name(name, mark, unsafe=True)
+
+ def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False):
+ return super(UnsafeConstructor, self).make_python_instance(
+ suffix, node, args, kwds, newobj, unsafe=True)
+
+# Constructor is same as UnsafeConstructor. Need to leave this in place in case
+# people have extended it directly.
+class Constructor(UnsafeConstructor):
+ pass
diff --git a/lib/yaml/cyaml.py b/lib/yaml/cyaml.py
index 68dcd75..d7a467c 100644
--- a/lib/yaml/cyaml.py
+++ b/lib/yaml/cyaml.py
@@ -1,6 +1,8 @@
-__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader',
- 'CBaseDumper', 'CSafeDumper', 'CDumper']
+__all__ = [
+ 'CBaseLoader', 'CSafeLoader', 'CFullLoader', 'CUnsafeLoader', 'CLoader',
+ 'CBaseDumper', 'CSafeDumper', 'CDumper'
+]
from _yaml import CParser, CEmitter
@@ -25,6 +27,20 @@ class CSafeLoader(CParser, SafeConstructor, Resolver):
SafeConstructor.__init__(self)
Resolver.__init__(self)
+class CFullLoader(CParser, FullConstructor, Resolver):
+
+ def __init__(self, stream):
+ CParser.__init__(self, stream)
+ FullConstructor.__init__(self)
+ Resolver.__init__(self)
+
+class CUnsafeLoader(CParser, UnsafeConstructor, Resolver):
+
+ def __init__(self, stream):
+ CParser.__init__(self, stream)
+ UnsafeConstructor.__init__(self)
+ Resolver.__init__(self)
+
class CLoader(CParser, Constructor, Resolver):
def __init__(self, stream):
diff --git a/lib/yaml/loader.py b/lib/yaml/loader.py
index 293ff46..a79182e 100644
--- a/lib/yaml/loader.py
+++ b/lib/yaml/loader.py
@@ -1,5 +1,5 @@
-__all__ = ['BaseLoader', 'SafeLoader', 'Loader']
+__all__ = ['BaseLoader', 'FullLoader', 'SafeLoader', 'Loader', 'UnsafeLoader']
from reader import *
from scanner import *
@@ -18,6 +18,16 @@ class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolve
BaseConstructor.__init__(self)
BaseResolver.__init__(self)
+class FullLoader(Reader, Scanner, Parser, Composer, FullConstructor, Resolver):
+
+ def __init__(self, stream):
+ Reader.__init__(self, stream)
+ Scanner.__init__(self)
+ Parser.__init__(self)
+ Composer.__init__(self)
+ FullConstructor.__init__(self)
+ Resolver.__init__(self)
+
class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
def __init__(self, stream):
@@ -38,3 +48,16 @@ class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
Constructor.__init__(self)
Resolver.__init__(self)
+# UnsafeLoader is the same as Loader (which is and was always unsafe on
+# untrusted input). Use of either Loader or UnsafeLoader should be rare, since
+# FullLoad should be able to load almost all YAML safely. Loader is left intact
+# to ensure backwards compatability.
+class UnsafeLoader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
+
+ def __init__(self, stream):
+ Reader.__init__(self, stream)
+ Scanner.__init__(self)
+ Parser.__init__(self)
+ Composer.__init__(self)
+ Constructor.__init__(self)
+ Resolver.__init__(self)
diff --git a/tests/lib/test_errors.py b/tests/lib/test_errors.py
index 7dc9388..32423c1 100644
--- a/tests/lib/test_errors.py
+++ b/tests/lib/test_errors.py
@@ -3,7 +3,7 @@ import yaml, test_emitter
def test_loader_error(error_filename, verbose=False):
try:
- list(yaml.load_all(open(error_filename, 'rb')))
+ list(yaml.load_all(open(error_filename, 'rb'), yaml.FullLoader))
except yaml.YAMLError, exc:
if verbose:
print "%s:" % exc.__class__.__name__, exc
@@ -14,7 +14,7 @@ test_loader_error.unittest = ['.loader-error']
def test_loader_error_string(error_filename, verbose=False):
try:
- list(yaml.load_all(open(error_filename, 'rb').read()))
+ list(yaml.load_all(open(error_filename, 'rb').read(), yaml.FullLoader))
except yaml.YAMLError, exc:
if verbose:
print "%s:" % exc.__class__.__name__, exc
@@ -25,7 +25,7 @@ test_loader_error_string.unittest = ['.loader-error']
def test_loader_error_single(error_filename, verbose=False):
try:
- yaml.load(open(error_filename, 'rb').read())
+ yaml.load(open(error_filename, 'rb').read(), yaml.FullLoader)
except yaml.YAMLError, exc:
if verbose:
print "%s:" % exc.__class__.__name__, exc
diff --git a/tests/lib/test_input_output.py b/tests/lib/test_input_output.py
index 9ccc8fc..8da5fa9 100644
--- a/tests/lib/test_input_output.py
+++ b/tests/lib/test_input_output.py
@@ -17,7 +17,7 @@ def _unicode_open(file, encoding, errors='strict'):
def test_unicode_input(unicode_filename, verbose=False):
data = open(unicode_filename, 'rb').read().decode('utf-8')
value = ' '.join(data.split())
- output = yaml.load(_unicode_open(StringIO.StringIO(data.encode('utf-8')), 'utf-8'))
+ output = yaml.full_load(_unicode_open(StringIO.StringIO(data.encode('utf-8')), 'utf-8'))
assert output == value, (output, value)
for input in [data, data.encode('utf-8'),
codecs.BOM_UTF8+data.encode('utf-8'),
@@ -25,9 +25,9 @@ def test_unicode_input(unicode_filename, verbose=False):
codecs.BOM_UTF16_LE+data.encode('utf-16-le')]:
if verbose:
print "INPUT:", repr(input[:10]), "..."
- output = yaml.load(input)
+ output = yaml.full_load(input)
assert output == value, (output, value)
- output = yaml.load(StringIO.StringIO(input))
+ output = yaml.full_load(StringIO.StringIO(input))
assert output == value, (output, value)
test_unicode_input.unittest = ['.unicode']
@@ -40,14 +40,14 @@ def test_unicode_input_errors(unicode_filename, verbose=False):
codecs.BOM_UTF16_BE+data.encode('utf-16-le'),
codecs.BOM_UTF16_LE+data.encode('utf-8')+'!']:
try:
- yaml.load(input)
+ yaml.full_load(input)
except yaml.YAMLError, exc:
if verbose:
print exc
else:
raise AssertionError("expected an exception")
try:
- yaml.load(StringIO.StringIO(input))
+ yaml.full_load(StringIO.StringIO(input))
except yaml.YAMLError, exc:
if verbose:
print exc
diff --git a/tests/lib/test_recursive.py b/tests/lib/test_recursive.py
index 6707fd4..312204e 100644
--- a/tests/lib/test_recursive.py
+++ b/tests/lib/test_recursive.py
@@ -30,7 +30,7 @@ def test_recursive(recursive_filename, verbose=False):
output2 = None
try:
output1 = yaml.dump(value1)
- value2 = yaml.load(output1)
+ value2 = yaml.load(output1, yaml.FullLoader)
output2 = yaml.dump(value2)
assert output1 == output2, (output1, output2)
finally:

Просмотреть файл

@ -0,0 +1,529 @@
From 857dff153d2c9f238d3a68821262b7764aeb44ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tina=20M=C3=BCller?= <cpan2@tinita.de>
Date: Sat, 23 Feb 2019 21:12:43 +0100
Subject: [PATCH] Apply FullLoader/UnsafeLoader changes to lib3
--- a/lib3/yaml/__init__.py_org 2019-04-16 12:24:10.632835933 +0000
+++ b/lib3/yaml/__init__.py 2019-04-16 12:30:20.784846378 +0000
@@ -17,6 +17,45 @@ except ImportError:
import io
+#------------------------------------------------------------------------------
+# Warnings control
+#------------------------------------------------------------------------------
+
+# 'Global' warnings state:
+_warnings_enabled = {
+ 'YAMLLoadWarning': True,
+}
+
+# Get or set global warnings' state
+def warnings(settings=None):
+ if settings is None:
+ return _warnings_enabled
+
+ if type(settings) is dict:
+ for key in settings:
+ if key in _warnings_enabled:
+ _warnings_enabled[key] = settings[key]
+
+# Warn when load() is called without Loader=...
+class YAMLLoadWarning(RuntimeWarning):
+ pass
+
+def load_warning(method):
+ if _warnings_enabled['YAMLLoadWarning'] is False:
+ return
+
+ import warnings
+
+ message = (
+ "calling yaml.%s() without Loader=... is deprecated, as the "
+ "default Loader is unsafe. Please read "
+ "https://msg.pyyaml.org/load for full details."
+ ) % method
+
+ warnings.warn(message, YAMLLoadWarning, stacklevel=3)
+
+#------------------------------------------------------------------------------
+
def scan(stream, Loader=Loader):
"""
Scan a YAML stream and produce scanning tokens.
@@ -62,22 +101,30 @@ def compose_all(stream, Loader=Loader):
finally:
loader.dispose()
-def load(stream, Loader=Loader):
+def load(stream, Loader=None):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
"""
+ if Loader is None:
+ load_warning('load')
+ Loader = FullLoader
+
loader = Loader(stream)
try:
return loader.get_single_data()
finally:
loader.dispose()
-def load_all(stream, Loader=Loader):
+def load_all(stream, Loader=None):
"""
Parse all YAML documents in a stream
and produce corresponding Python objects.
"""
+ if Loader is None:
+ load_warning('load_all')
+ Loader = FullLoader
+
loader = Loader(stream)
try:
while loader.check_data():
@@ -85,11 +132,31 @@ def load_all(stream, Loader=Loader):
finally:
loader.dispose()
+def full_load(stream):
+ """
+ Parse the first YAML document in a stream
+ and produce the corresponding Python object.
+ Resolve all tags except those known to be
+ unsafe on untrusted input.
+ """
+ return load(stream, FullLoader)
+
+def full_load_all(stream):
+ """
+ Parse all YAML documents in a stream
+ and produce corresponding Python objects.
+ Resolve all tags except those known to be
+ unsafe on untrusted input.
+ """
+ return load_all(stream, FullLoader)
+
def safe_load(stream):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags.
+ This is known
+ to be safe for untrusted input.
"""
return load(stream, SafeLoader)
@@ -98,9 +165,29 @@ def safe_load_all(stream):
Parse all YAML documents in a stream
and produce corresponding Python objects.
Resolve only basic YAML tags.
+ This is known
+ to be safe for untrusted input.
"""
return load_all(stream, SafeLoader)
+def unsafe_load(stream):
+ """
+ Parse the first YAML document in a stream
+ and produce the corresponding Python object.
+ Resolve all tags, even those known to be
+ unsafe on untrusted input.
+ """
+ return load(stream, UnsafeLoader)
+
+def unsafe_load_all(stream):
+ """
+ Parse all YAML documents in a stream
+ and produce corresponding Python objects.
+ Resolve all tags, even those known to be
+ unsafe on untrusted input.
+ """
+ return load_all(stream, UnsafeLoader)
+
def emit(events, stream=None, Dumper=Dumper,
canonical=None, indent=None, width=None,
allow_unicode=None, line_break=None):
--- a/lib3/yaml/constructor.py_org 2019-04-16 12:30:32.156846699 +0000
+++ b/lib3/yaml/constructor.py 2019-04-16 12:44:49.200870883 +0000
@@ -1,6 +1,12 @@
-__all__ = ['BaseConstructor', 'SafeConstructor', 'Constructor',
- 'ConstructorError']
+__all__ = [
+ 'BaseConstructor',
+ 'SafeConstructor',
+ 'FullConstructor',
+ 'UnsafeConstructor',
+ 'Constructor',
+ 'ConstructorError'
+]
from .error import *
from .nodes import *
@@ -464,7 +470,7 @@ SafeConstructor.add_constructor(
SafeConstructor.add_constructor(None,
SafeConstructor.construct_undefined)
-class Constructor(SafeConstructor):
+class FullConstructor(SafeConstructor):
def construct_python_str(self, node):
return self.construct_scalar(node)
@@ -497,18 +503,22 @@ class Constructor(SafeConstructor):
def construct_python_tuple(self, node):
return tuple(self.construct_sequence(node))
- def find_python_module(self, name, mark):
+ def find_python_module(self, name, mark, unsafe=False):
if not name:
raise ConstructorError("while constructing a Python module", mark,
"expected non-empty name appended to the tag", mark)
- try:
- __import__(name)
- except ImportError as exc:
+ if unsafe:
+ try:
+ __import__(name)
+ except ImportError as exc:
+ raise ConstructorError("while constructing a Python module", mark,
+ "cannot find module %r (%s)" % (name, exc), mark)
+ if not name in sys.modules:
raise ConstructorError("while constructing a Python module", mark,
- "cannot find module %r (%s)" % (name, exc), mark)
+ "module %r is not imported" % name, mark)
return sys.modules[name]
- def find_python_name(self, name, mark):
+ def find_python_name(self, name, mark, unsafe=False):
if not name:
raise ConstructorError("while constructing a Python object", mark,
"expected non-empty name appended to the tag", mark)
@@ -517,11 +527,15 @@ class Constructor(SafeConstructor):
else:
module_name = 'builtins'
object_name = name
- try:
- __import__(module_name)
- except ImportError as exc:
+ if unsafe:
+ try:
+ __import__(module_name)
+ except ImportError as exc:
+ raise ConstructorError("while constructing a Python object", mark,
+ "cannot find module %r (%s)" % (module_name, exc), mark)
+ if not module_name in sys.modules:
raise ConstructorError("while constructing a Python object", mark,
- "cannot find module %r (%s)" % (module_name, exc), mark)
+ "module %r is not imported" % module_name, mark)
module = sys.modules[module_name]
if not hasattr(module, object_name):
raise ConstructorError("while constructing a Python object", mark,
@@ -544,12 +558,16 @@ class Constructor(SafeConstructor):
return self.find_python_module(suffix, node.start_mark)
def make_python_instance(self, suffix, node,
- args=None, kwds=None, newobj=False):
+ args=None, kwds=None, newobj=False, unsafe=False):
if not args:
args = []
if not kwds:
kwds = {}
cls = self.find_python_name(suffix, node.start_mark)
+ if not (unsafe or isinstance(cls, type)):
+ raise ConstructorError("while constructing a Python instance", node.start_mark,
+ "expected a class, but found %r" % type(cls),
+ node.start_mark)
if newobj and isinstance(cls, type):
return cls.__new__(cls, *args, **kwds)
else:
@@ -616,71 +634,88 @@ class Constructor(SafeConstructor):
def construct_python_object_new(self, suffix, node):
return self.construct_python_object_apply(suffix, node, newobj=True)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/none',
- Constructor.construct_yaml_null)
+ FullConstructor.construct_yaml_null)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/bool',
- Constructor.construct_yaml_bool)
+ FullConstructor.construct_yaml_bool)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/str',
- Constructor.construct_python_str)
+ FullConstructor.construct_python_str)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/unicode',
- Constructor.construct_python_unicode)
+ FullConstructor.construct_python_unicode)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/bytes',
- Constructor.construct_python_bytes)
+ FullConstructor.construct_python_bytes)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/int',
- Constructor.construct_yaml_int)
+ FullConstructor.construct_yaml_int)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/long',
- Constructor.construct_python_long)
+ FullConstructor.construct_python_long)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/float',
- Constructor.construct_yaml_float)
+ FullConstructor.construct_yaml_float)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/complex',
- Constructor.construct_python_complex)
+ FullConstructor.construct_python_complex)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/list',
- Constructor.construct_yaml_seq)
+ FullConstructor.construct_yaml_seq)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/tuple',
- Constructor.construct_python_tuple)
+ FullConstructor.construct_python_tuple)
-Constructor.add_constructor(
+FullConstructor.add_constructor(
'tag:yaml.org,2002:python/dict',
- Constructor.construct_yaml_map)
+ FullConstructor.construct_yaml_map)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
'tag:yaml.org,2002:python/name:',
- Constructor.construct_python_name)
+ FullConstructor.construct_python_name)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
'tag:yaml.org,2002:python/module:',
- Constructor.construct_python_module)
+ FullConstructor.construct_python_module)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
'tag:yaml.org,2002:python/object:',
- Constructor.construct_python_object)
+ FullConstructor.construct_python_object)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
'tag:yaml.org,2002:python/object/apply:',
- Constructor.construct_python_object_apply)
+ FullConstructor.construct_python_object_apply)
-Constructor.add_multi_constructor(
+FullConstructor.add_multi_constructor(
'tag:yaml.org,2002:python/object/new:',
- Constructor.construct_python_object_new)
+ FullConstructor.construct_python_object_new)
+
+class UnsafeConstructor(FullConstructor):
+
+ def find_python_module(self, name, mark):
+ return super(UnsafeConstructor, self).find_python_module(name, mark, unsafe=True)
+
+ def find_python_name(self, name, mark):
+ return super(UnsafeConstructor, self).find_python_name(name, mark, unsafe=True)
+
+ def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False):
+ return super(UnsafeConstructor, self).make_python_instance(
+ suffix, node, args, kwds, newobj, unsafe=True)
+
+# Constructor is same as UnsafeConstructor. Need to leave this in place in case
+# people have extended it directly.
+class Constructor(UnsafeConstructor):
+ pass
--- a/lib3/yaml/cyaml.py_org 2019-04-16 12:45:07.240871392 +0000
+++ b/lib3/yaml/cyaml.py 2019-04-16 12:46:42.016874066 +0000
@@ -1,6 +1,8 @@
-__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader',
- 'CBaseDumper', 'CSafeDumper', 'CDumper']
+__all__ = [
+ 'CBaseLoader', 'CSafeLoader', 'CFullLoader', 'CUnsafeLoader', 'CLoader',
+ 'CBaseDumper', 'CSafeDumper', 'CDumper'
+]
from _yaml import CParser, CEmitter
@@ -25,6 +27,20 @@ class CSafeLoader(CParser, SafeConstruct
SafeConstructor.__init__(self)
Resolver.__init__(self)
+class CFullLoader(CParser, FullConstructor, Resolver):
+
+ def __init__(self, stream):
+ CParser.__init__(self, stream)
+ FullConstructor.__init__(self)
+ Resolver.__init__(self)
+
+class CUnsafeLoader(CParser, UnsafeConstructor, Resolver):
+
+ def __init__(self, stream):
+ CParser.__init__(self, stream)
+ UnsafeConstructor.__init__(self)
+ Resolver.__init__(self)
+
class CLoader(CParser, Constructor, Resolver):
def __init__(self, stream):
--- a/lib3/yaml/loader.py_org 2019-04-16 12:46:55.604874450 +0000
+++ b/lib3/yaml/loader.py 2019-04-16 12:48:34.140877230 +0000
@@ -1,5 +1,5 @@
-__all__ = ['BaseLoader', 'SafeLoader', 'Loader']
+__all__ = ['BaseLoader', 'FullLoader', 'SafeLoader', 'Loader', 'UnsafeLoader']
from .reader import *
from .scanner import *
@@ -18,6 +18,17 @@ class BaseLoader(Reader, Scanner, Parser
BaseConstructor.__init__(self)
BaseResolver.__init__(self)
+class FullLoader(Reader, Scanner, Parser, Composer, FullConstructor, Resolver):
+
+ def __init__(self, stream):
+ Reader.__init__(self, stream)
+ Scanner.__init__(self)
+ Parser.__init__(self)
+ Composer.__init__(self)
+ FullConstructor.__init__(self)
+ Resolver.__init__(self)
+
+
class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
def __init__(self, stream):
@@ -28,6 +39,20 @@ class SafeLoader(Reader, Scanner, Parser
SafeConstructor.__init__(self)
Resolver.__init__(self)
+# UnsafeLoader is the same as Loader (which is and was always unsafe on
+# untrusted input). Use of either Loader or UnsafeLoader should be rare, since
+# FullLoad should be able to load almost all YAML safely. Loader is left intact
+# to ensure backwards compatability.
+class UnsafeLoader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
+
+ def __init__(self, stream):
+ Reader.__init__(self, stream)
+ Scanner.__init__(self)
+ Parser.__init__(self)
+ Composer.__init__(self)
+ Constructor.__init__(self)
+ Resolver.__init__(self)
+
class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
def __init__(self, stream):
--- a/tests/lib3/test_errors.py_org 2019-04-16 12:48:51.836877730 +0000
+++ b/tests/lib3/test_errors.py 2019-04-16 12:50:16.852880129 +0000
@@ -3,7 +3,7 @@ import yaml, test_emitter
def test_loader_error(error_filename, verbose=False):
try:
- list(yaml.load_all(open(error_filename, 'rb')))
+ list(yaml.load_all(open(error_filename, 'rb'), yaml.FullLoader))
except yaml.YAMLError as exc:
if verbose:
print("%s:" % exc.__class__.__name__, exc)
@@ -14,7 +14,7 @@ test_loader_error.unittest = ['.loader-e
def test_loader_error_string(error_filename, verbose=False):
try:
- list(yaml.load_all(open(error_filename, 'rb').read()))
+ list(yaml.load_all(open(error_filename, 'rb').read(), yaml.FullLoader))
except yaml.YAMLError as exc:
if verbose:
print("%s:" % exc.__class__.__name__, exc)
@@ -25,7 +25,7 @@ test_loader_error_string.unittest = ['.l
def test_loader_error_single(error_filename, verbose=False):
try:
- yaml.load(open(error_filename, 'rb').read())
+ yaml.load(open(error_filename, 'rb').read(), yaml.FullLoader)
except yaml.YAMLError as exc:
if verbose:
print("%s:" % exc.__class__.__name__, exc)
--- a/tests/lib3/test_input_output.py_org 2019-04-16 12:50:29.388880482 +0000
+++ b/tests/lib3/test_input_output.py 2019-04-16 12:51:50.040882758 +0000
@@ -5,9 +5,9 @@ import codecs, io, tempfile, os, os.path
def test_unicode_input(unicode_filename, verbose=False):
data = open(unicode_filename, 'rb').read().decode('utf-8')
value = ' '.join(data.split())
- output = yaml.load(data)
+ output = yaml.full_load(data)
assert output == value, (output, value)
- output = yaml.load(io.StringIO(data))
+ output = yaml.full_load(io.StringIO(data))
assert output == value, (output, value)
for input in [data.encode('utf-8'),
codecs.BOM_UTF8+data.encode('utf-8'),
@@ -15,9 +15,9 @@ def test_unicode_input(unicode_filename,
codecs.BOM_UTF16_LE+data.encode('utf-16-le')]:
if verbose:
print("INPUT:", repr(input[:10]), "...")
- output = yaml.load(input)
+ output = yaml.full_load(input)
assert output == value, (output, value)
- output = yaml.load(io.BytesIO(input))
+ output = yaml.full_load(io.BytesIO(input))
assert output == value, (output, value)
test_unicode_input.unittest = ['.unicode']
@@ -30,14 +30,14 @@ def test_unicode_input_errors(unicode_fi
codecs.BOM_UTF16_BE+data.encode('utf-16-le'),
codecs.BOM_UTF16_LE+data.encode('utf-8')+b'!']:
try:
- yaml.load(input)
+ yaml.full_load(input)
except yaml.YAMLError as exc:
if verbose:
print(exc)
else:
raise AssertionError("expected an exception")
try:
- yaml.load(io.BytesIO(input))
+ yaml.full_load(io.BytesIO(input))
except yaml.YAMLError as exc:
if verbose:
print(exc)
--- a/tests/lib3/test_recursive.py_org 2019-04-16 12:52:01.020883068 +0000
+++ b/tests/lib3/test_recursive.py 2019-04-16 12:52:20.404883615 +0000
@@ -31,7 +31,7 @@ def test_recursive(recursive_filename, v
output2 = None
try:
output1 = yaml.dump(value1)
- value2 = yaml.load(output1)
+ value2 = yaml.full_load(output1)
output2 = yaml.dump(value2)
assert output1 == output2, (output1, output2)
finally:

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"PyYAML-3.13.tar.gz": "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf"
}
}

124
SPECS/PyYAML/PyYAML.spec Normal file
Просмотреть файл

@ -0,0 +1,124 @@
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Name: PyYAML
Version: 3.13
Release: 5%{?dist}
Summary: YAML parser and emitter for Python
Group: Development/Libraries
License: MIT
Vendor: Microsoft Corporation
Distribution: Mariner
URL: http://pyyaml.org/
Source0: http://pyyaml.org/download/pyyaml/%{name}-%{version}.tar.gz
%define sha1 PyYAML=22f95fe2f5ef29ab17110f92c7186e2cfde6b419
Patch0: PyYAML-CVE-2017-18342.patch
Patch1: ConstructorError_fix.patch
Patch2: change_default_loader.patch
Patch3: PyYAML-lib3-CVE-2017-18342.patch
BuildRequires: python2
BuildRequires: python2-libs
BuildRequires: python2-devel
BuildRequires: libyaml-devel
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-libs
BuildRequires: libyaml-devel
Requires: python2
Requires: python2-libs
Requires: libyaml
%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: python3-PyYAML
Requires: python3
Requires: python3-libs
Requires: libyaml
%description -n python3-PyYAML
Python 3 version.
%prep
%setup -q -n PyYAML-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
rm -rf ../p3dir
cp -a . ../p3dir
%build
python2 setup.py build
pushd ../p3dir
python3 setup.py build
popd
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
python2 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
chmod a-x examples/yaml-highlight/yaml_hl.py
pushd ../p3dir
python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
chmod a-x examples/yaml-highlight/yaml_hl.py
popd
%check
python2 setup.py test
pushd ../p3dir
python3 setup.py test
popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%license LICENSE
%doc PKG-INFO README LICENSE examples
%{python2_sitelib}/*
%files -n python3-PyYAML
%defattr(-,root,root,-)
%doc PKG-INFO README LICENSE examples
%{python3_sitelib}/*
%changelog
* Sat May 09 00:21:38 PST 2020 Nick Samson <nisamson@microsoft.com> - 3.13-5
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 3.13-4
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Apr 16 2019 Tapas Kundu <tkundu@vmware.com> 3.13-3
- Added lib3 changes for CVE-2017-18342
- change default loader for yaml.add_constructor
- Add custom constructors to multiple loaders
* Thu Mar 28 2019 Ankit Jain <ankitja@vmware.com> 3.13-2
- Fix for CVE-2017-18342
* Thu Sep 20 2018 Tapas Kundu <tkundu@vmware.com> 3.13-1
- Updated to release 3.13
* Tue May 16 2017 Kumar Kaushik <kaushikk@vmware.com> 3.12-2
- Adding python3 support.
* Tue Apr 18 2017 Dheeraj Shetty <dheerajs@vmware.com> 3.12-1
- Updated version to 3.12
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.11-2
- GA - Bump release of all rpms
* Wed Mar 04 2015 Mahmoud Bassiouny <mbassiouny@vmware.com>
- Initial packaging for Photon

Просмотреть файл

@ -0,0 +1,78 @@
--- a/lib/yaml/__init__.py_org 2019-04-15 13:07:43.518471626 +0000
+++ b/lib/yaml/__init__.py 2019-04-15 13:15:25.818484671 +0000
@@ -329,22 +329,32 @@ def add_path_resolver(tag, path, kind=No
Loader.add_path_resolver(tag, path, kind)
Dumper.add_path_resolver(tag, path, kind)
-def add_constructor(tag, constructor, Loader=Loader):
+def add_constructor(tag, constructor, Loader=None):
"""
Add a constructor for the given tag.
Constructor is a function that accepts a Loader instance
and a node object and produces the corresponding Python object.
"""
- Loader.add_constructor(tag, constructor)
+ if Loader == None:
+ loader.Loader.add_constructor(tag, constructor)
+ loader.FullLoader.add_constructor(tag, constructor)
+ loader.UnsafeLoader.add_constructor(tag, constructor)
+ else:
+ Loader.add_constructor(tag, constructor)
-def add_multi_constructor(tag_prefix, multi_constructor, Loader=Loader):
+def add_multi_constructor(tag_prefix, multi_constructor, Loader=None):
"""
Add a multi-constructor for the given tag prefix.
Multi-constructor is called for a node if its tag starts with tag_prefix.
Multi-constructor accepts a Loader instance, a tag suffix,
and a node object and produces the corresponding Python object.
"""
- Loader.add_multi_constructor(tag_prefix, multi_constructor)
+ if Loader == None:
+ loader.Loader.add_multi_constructor(tag_prefix, multi_constructor)
+ loader.FullLoader.add_multi_constructor(tag_prefix, multi_constructor)
+ loader.UnsafeLoader.add_multi_constructor(tag_prefix, multi_constructor)
+ else:
+ Loader.add_multi_constructor(tag_prefix, multi_constructor)
def add_representer(data_type, representer, Dumper=Dumper):
"""
--- a/lib3/yaml/__init__.py_org 2019-04-15 13:12:13.298479238 +0000
+++ b/lib3/yaml/__init__.py 2019-04-15 13:13:34.582481532 +0000
@@ -236,22 +236,32 @@ def add_path_resolver(tag, path, kind=No
Loader.add_path_resolver(tag, path, kind)
Dumper.add_path_resolver(tag, path, kind)
-def add_constructor(tag, constructor, Loader=Loader):
+def add_constructor(tag, constructor, Loader=None):
"""
Add a constructor for the given tag.
Constructor is a function that accepts a Loader instance
and a node object and produces the corresponding Python object.
"""
- Loader.add_constructor(tag, constructor)
+ if Loader == None:
+ loader.Loader.add_constructor(tag, constructor)
+ loader.FullLoader.add_constructor(tag, constructor)
+ loader.UnsafeLoader.add_constructor(tag, constructor)
+ else:
+ Loader.add_constructor(tag, constructor)
-def add_multi_constructor(tag_prefix, multi_constructor, Loader=Loader):
+def add_multi_constructor(tag_prefix, multi_constructor, Loader=None):
"""
Add a multi-constructor for the given tag prefix.
Multi-constructor is called for a node if its tag starts with tag_prefix.
Multi-constructor accepts a Loader instance, a tag suffix,
and a node object and produces the corresponding Python object.
"""
- Loader.add_multi_constructor(tag_prefix, multi_constructor)
+ if Loader == None:
+ loader.Loader.add_multi_constructor(tag_prefix, multi_constructor)
+ loader.FullLoader.add_multi_constructor(tag_prefix, multi_constructor)
+ loader.UnsafeLoader.add_multi_constructor(tag_prefix, multi_constructor)
+ else:
+ Loader.add_multi_constructor(tag_prefix, multi_constructor)
def add_representer(data_type, representer, Dumper=Dumper):
"""

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"WALinuxAgent-2.2.38.tar.gz": "05f5246250db1ce748588f7a8bf0ad00d94c29d27837e3ce44db119b9462e7c8"
}
}

Просмотреть файл

@ -0,0 +1,119 @@
Name: WALinuxAgent
Summary: The Windows Azure Linux Agent
Version: 2.2.38
Release: 3%{?dist}
License: ASL 2.0
Group: System/Daemons
Url: https://github.com/Azure/WALinuxAgent
#Source0: https://github.com/Azure/WALinuxAgent/archive/v%{version}.tar.gz
Source0: https://github.com/Azure/WALinuxAgent/archive/%{name}-%{version}.tar.gz
Patch0: add-distro.patch
Vendor: Microsoft Corporation
Distribution: Mariner
BuildRequires: python2
BuildRequires: python2-libs
BuildRequires: python-setuptools
BuildRequires: python-xml
BuildRequires: systemd
BuildRequires: python-distro
Requires: python2
Requires: python2-libs
Requires: python-xml
Requires: python-pyasn1
Requires: openssh
Requires: openssl
Requires: util-linux
Requires: /bin/sed
Requires: /bin/grep
Requires: sudo
Requires: iptables
Requires: systemd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
The Windows Azure Linux Agent supports the provisioning and running of Linux
VMs in the Windows Azure cloud. This package should be installed on Linux disk
images that are built to run in the Windows Azure environment.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%pre -p /bin/sh
%build
python2 setup.py build -b py2
%install
python2 -tt setup.py build -b py2 install --prefix=%{_prefix} --lnx-distro='mariner' --root=%{buildroot} --force
mkdir -p %{buildroot}/%{_localstatedir}/log
mkdir -p -m 0700 %{buildroot}/%{_sharedstatedir}/waagent
mkdir -p %{buildroot}/%{_localstatedir}/opt/waagent/log
mkdir -p %{buildroot}/%{_localstatedir}/log/
touch %{buildroot}/%{_localstatedir}/opt/waagent/log/waagent.log
ln -sfv /opt/waagent/log/waagent.log %{buildroot}%{_localstatedir}/log/waagent.log
%check
python2 setup.py check && python2 setup.py test
%post
%systemd_post waagent.service
%preun
%systemd_preun waagent.service
%postun
%systemd_postun_with_restart waagent.service
%files
/usr/lib/systemd/system/*
%defattr(0644,root,root,0755)
%license LICENSE.txt
%doc Changelog
%attr(0755,root,root) %{_bindir}/waagent
%attr(0755,root,root) %{_bindir}/waagent2.0
%config %{_sysconfdir}/waagent.conf
%dir %{_localstatedir}/opt/waagent/log
%{_localstatedir}/log/waagent.log
%ghost %{_localstatedir}/opt/waagent/log/waagent.log
%dir %attr(0700, root, root) %{_sharedstatedir}/waagent
/usr/lib/python2.7/site-packages/*
%changelog
* Sat May 09 00:21:22 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.2.38-3
- Added %%license line automatically
* Thu Apr 09 2020 Nicolas Ontiveros <niontive@microsoft.com> 2.2.38-2
- Remove toybox and only use util-linux for requires.
* Fri Mar 13 2020 Paul Monson <paulmon@microsoft.com> 2.2.38-1
- Update to version 2.2.38. Source0 URL fixed. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.2.35-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Feb 12 2019 Tapas Kundu <tkundu@vmware.com> 2.2.35-1
- Update to 2.2.35
* Tue Oct 23 2018 Anish Swaminathan <anishs@vmware.com> 2.2.22-1
- Update to 2.2.22
* Thu Dec 28 2017 Divya Thaluru <dthaluru@vmware.com> 2.2.14-3
- Fixed the log file directory structure
* Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 2.2.14-2
- Requires /bin/grep, /bin/sed and util-linux or toybox
* Thu Jul 13 2017 Anish Swaminathan <anishs@vmware.com> 2.2.14-1
- Update to 2.2.14
* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.0.18-4
- Use python2 explicitly to build
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.0.18-3
- GA - Bump release of all rpms
* Tue May 10 2016 Anish Swaminathan <anishs@vmware.com> 2.0.18-2
- Edit post scripts
* Thu Apr 28 2016 Anish Swaminathan <anishs@vmware.com> 2.0.18-1
- Update to 2.0.18
* Thu Jan 28 2016 Anish Swaminathan <anishs@vmware.com> 2.0.14-3
- Removed redundant requires
* Thu Aug 6 2015 Anish Swaminathan <anishs@vmware.com>
- Added sha1sum
* Fri Mar 13 2015 - mbassiouny@vmware.com
- Initial packaging

Просмотреть файл

@ -0,0 +1,240 @@
--- a/azurelinuxagent/common/osutil/factory.py 2019-02-12 18:32:02.014403649 +0530
+++ b/azurelinuxagent/common/osutil/factory.py 2019-02-12 18:33:10.586401816 +0530
@@ -21,6 +21,7 @@ from azurelinuxagent.common.version impo
from .default import DefaultOSUtil
from .arch import ArchUtil
from .clearlinux import ClearLinuxUtil
+from .mariner import MarinerOSUtil
from .coreos import CoreOSUtil
from .debian import DebianOSUtil
from .freebsd import FreeBSDOSUtil
@@ -49,6 +50,10 @@ def get_osutil(distro_name=DISTRO_NAME,
if "Clear Linux" in distro_full_name:
return ClearLinuxUtil()
+ if distro_name == "mariner":
+ return MarinerOSUtil()
+
+
if distro_name == "ubuntu":
if Version(distro_version) in [Version("12.04"), Version("12.10")]:
return Ubuntu12OSUtil()
--- a/azurelinuxagent/common/osutil/mariner.py 2019-02-12 18:42:54.290386210 +0530
+++ b/azurelinuxagent/common/osutil/mariner.py 2019-02-12 18:34:43.254399338 +0530
@@ -0,0 +1,88 @@
+#
+# Copyright 2017 Microsoft Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Requires Python 2.4+ and Openssl 1.0+
+#
+
+import os
+import re
+import pwd
+import shutil
+import socket
+import array
+import struct
+import fcntl
+import time
+import base64
+import azurelinuxagent.common.conf as conf
+import azurelinuxagent.common.logger as logger
+import azurelinuxagent.common.utils.fileutil as fileutil
+import azurelinuxagent.common.utils.shellutil as shellutil
+import azurelinuxagent.common.utils.textutil as textutil
+from azurelinuxagent.common.osutil.default import DefaultOSUtil
+
+class MarinerOSUtil(DefaultOSUtil):
+ def __init__(self):
+ super(MarinerOSUtil, self).__init__()
+ self.agent_conf_file_path = '/etc/waagent.conf'
+
+ def is_dhcp_enabled(self):
+ return True
+
+ def start_network(self) :
+ return shellutil.run("systemctl start systemd-networkd", chk_err=False)
+
+ def restart_if(self, iface):
+ shellutil.run("systemctl restart systemd-networkd")
+
+ def restart_ssh_service(self):
+ shellutil.run("systemctl restart sshd")
+
+ def stop_dhcp_service(self):
+ return shellutil.run("systemctl stop systemd-networkd", chk_err=False)
+
+ def start_dhcp_service(self):
+ return shellutil.run("systemctl start systemd-networkd", chk_err=False)
+
+ def start_agent_service(self):
+ return shellutil.run("systemctl start waagent", chk_err=False)
+
+ def stop_agent_service(self):
+ return shellutil.run("systemctl stop waagent", chk_err=False)
+
+ def get_dhcp_pid(self):
+ ret= shellutil.run_get_output("pidof systemd-networkd")
+ return ret[1] if ret[0] == 0 else None
+
+ def conf_sshd(self, disable_password):
+ pass
+
+ def del_root_password(self):
+ try:
+ passwd_file_path = conf.get_passwd_file_path()
+ try:
+ passwd_content = fileutil.read_file(passwd_file_path)
+ if not passwd_content:
+ raise FileNotFoundError
+ except FileNotFoundError:
+ new_passwd = ["root:*LOCK*:14600::::::"]
+ else:
+ passwd = passwd_content.split('\n')
+ new_passwd = [x for x in passwd if not x.startswith("root:")]
+ new_passwd.insert(0, "root:*LOCK*:14600::::::")
+ fileutil.write_file(passwd_file_path, "\n".join(new_passwd))
+ except IOError as e:
+ raise OSUtilError("Failed to delete root password:{0}".format(e))
+ pass
--- a/azurelinuxagent/common/version.py 2019-02-12 18:34:57.642398953 +0530
+++ b/azurelinuxagent/common/version.py 2019-02-12 18:35:33.638397991 +0530
@@ -100,6 +100,8 @@ def get_distro():
if os.path.exists("/etc/euleros-release"):
osinfo[0] = "euleros"
+ if os.path.exists("/etc/mariner-release"):
+ osinfo[0] = "mariner"
# The platform.py lib has issue with detecting BIG-IP linux distribution.
# Merge the following patch provided by F5.
--- a/config/mariner/waagent.conf 2019-02-12 18:42:31.402386821 +0530
+++ b/config/mariner/waagent.conf 2019-02-12 18:39:32.082391616 +0530
@@ -0,0 +1,80 @@
+# Microsoft Azure Linux Agent Configuration
+#
+
+# Specified program is invoked with the argument "Ready" when we report ready status
+# to the endpoint server.
+Role.StateConsumer=None
+
+# Specified program is invoked with XML file argument specifying role
+# configuration.
+Role.ConfigurationConsumer=None
+
+# Specified program is invoked with XML file argument specifying role topology.
+Role.TopologyConsumer=None
+
+# Enable instance creation
+Provisioning.Enabled=n
+
+# Rely on cloud-init to provision
+Provisioning.UseCloudInit=y
+
+# Password authentication for root account will be unavailable.
+Provisioning.DeleteRootPassword=y
+
+# Generate fresh host key pair.
+Provisioning.RegenerateSshHostKeyPair=y
+
+# Supported values are "rsa", "dsa" and "ecdsa".
+Provisioning.SshHostKeyPairType=rsa
+
+# Monitor host name changes and publish changes via DHCP requests.
+Provisioning.MonitorHostName=y
+
+# Decode CustomData from Base64.
+Provisioning.DecodeCustomData=y
+
+# Execute CustomData after provisioning.
+Provisioning.ExecuteCustomData=n
+
+# Allow reset password of sys user
+Provisioning.AllowResetSysUser=n
+
+# Format if unformatted. If 'n', resource disk will not be mounted.
+ResourceDisk.Format=n
+
+# File system on the resource disk
+# Typically ext3 or ext4. FreeBSD images should use 'ufs2' here.
+ResourceDisk.Filesystem=ext4
+
+# Mount point for the resource disk
+ResourceDisk.MountPoint=/mnt/resource
+
+# Create and use swapfile on resource disk.
+ResourceDisk.EnableSwap=n
+
+# Size of the swapfile.
+ResourceDisk.SwapSizeMB=0
+
+# Enable verbose logging (y|n)
+Logs.Verbose=n
+
+# Is FIPS enabled
+OS.EnableFIPS=n
+
+# Root device timeout in seconds.
+OS.RootDeviceScsiTimeout=300
+
+# If "None", the system default version is used.
+OS.OpensslPath=None
+
+# Set the path to SSH keys and configuration files
+OS.SshDir=/etc/ssh
+
+# Enable or disable self-update, default is enabled
+AutoUpdate.Enabled=y
+AutoUpdate.GAFamily=Prod
+
+# Determine if the overprovisioning feature is enabled. If yes, hold extension
+# handling until inVMArtifactsProfile.OnHold is false.
+# Default is disabled
+# EnableOverProvisioning=n
--- a/init/mariner/waagent.service 2019-02-12 18:42:08.370387437 +0530
+++ b/init/mariner/waagent.service 2019-02-12 18:40:31.090390038 +0530
@@ -0,0 +1,16 @@
+[Unit]
+Description=Azure Linux Agent
+Wants=systemd-networkd-wait-online.service sshd.service sshd-keygen.service
+After=systemd-networkd-wait-online.service cloud-init.service
+
+ConditionFileIsExecutable=/usr/bin/waagent
+ConditionPathExists=/etc/waagent.conf
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/python -u /usr/bin/waagent -daemon
+Restart=always
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
--- a/setup.py 2019-02-12 18:40:46.066389638 +0530
+++ b/setup.py 2019-02-12 18:41:47.910387984 +0530
@@ -113,6 +113,12 @@ def get_data_files(name, version, fullna
src=["config/clearlinux/waagent.conf"])
set_systemd_files(data_files, dest='/usr/lib/systemd/system',
src=["init/clearlinux/waagent.service"])
+ elif name == 'mariner':
+ set_bin_files(data_files, dest="/usr/bin")
+ set_conf_files(data_files, dest="/etc",
+ src=["config/mariner/waagent.conf"])
+ set_systemd_files(data_files, dest='/usr/lib/systemd/system',
+ src=["init/mariner/waagent.service"])
elif name == 'ubuntu':
set_bin_files(data_files)
set_conf_files(data_files, src=["config/ubuntu/waagent.conf"])

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"acl-2.2.53.tar.gz": "06be9865c6f418d851ff4494e12406568353b891ffe1f596b34693c387af26c7"
}
}

111
SPECS/acl/acl.spec Normal file
Просмотреть файл

@ -0,0 +1,111 @@
Summary: Access control list utilities
Name: acl
Version: 2.2.53
Release: 4%{?dist}
Source0: https://download-mirror.savannah.gnu.org/releases/acl/%{name}-%{version}.tar.gz
License: GPLv2+
Group: System Environment/Base
URL: https://savannah.nongnu.org/projects/acl/
Vendor: Microsoft Corporation
Distribution: Mariner
Requires: libacl = %{version}-%{release}
BuildRequires: attr-devel
%description
This package contains the getfacl and setfacl utilities needed for
manipulating access control lists.
%package -n libacl
Summary: Dynamic library for access control list support
License: LGPLv2+
Group: System Environment/Libraries
Requires: attr
%description -n libacl
This package contains the libacl.so dynamic library which contains
the POSIX 1003.1e draft standard 17 functions for manipulating access
control lists.
%package -n libacl-devel
Summary: Files needed for building programs with libacl
License: LGPLv2+
Group: Development/Libraries
Requires: libacl = %{version}-%{release}
%description -n libacl-devel
This package contains header files and documentation needed to develop
programs which make use of the access control list programming interface
defined in POSIX 1003.1e draft standard 17.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags} LIBTOOL="libtool --tag=CC"
%install
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.la' -exec rm -f {} ';'
chmod 0755 %{buildroot}%{_libdir}/libacl.so.*.*.*
%find_lang %{name}
%check
if ./setfacl -m u:`id -u`:rwx .; then
make %{?_smp_mflags} check
else
echo '*** The chroot file system does not support all ACL options ***'
fi
%post -n libacl
/sbin/ldconfig
%postun -n libacl
/sbin/ldconfig
%files -f %{name}.lang
%license doc/COPYING*
%{_bindir}/chacl
%{_bindir}/getfacl
%{_bindir}/setfacl
%{_mandir}/man1/chacl.1*
%{_mandir}/man1/getfacl.1*
%{_mandir}/man1/setfacl.1*
%{_mandir}/man5/acl.5*
%files -n libacl-devel
%{_libdir}/libacl.so
%{_includedir}/acl
%{_includedir}/sys/acl.h
%{_mandir}/man3/acl_*
%{_libdir}/libacl.a
%{_datadir}/doc/acl/*
%{_libdir}/pkgconfig/libacl.pc
%files -n libacl
%{_libdir}/libacl.so.*
%changelog
* Tue Apr 14 2020 Henry Beberman <henry.beberman@microsoft.com> 2.2.53-4
- Update files to include license
* Fri Mar 03 2020 Jon Slobodzian <joslobo@microsoft.com> 2.2.53-3
- Replaced dead link. Fixed Source URL. Verified license.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.2.53-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Sep 17 2018 Ankit Jain <ankitja@vmware.com> 2.2.53-1
- Updated to version 2.2.53
* Fri Jul 28 2017 Chang Lee <changlee@vmware.com> 2.2.52-5
- Fixed %check for filtering unsupported check env
* Thu Nov 24 2016 Alexey Makhalov <amakhalov@vmware.com> 2.2.52-4
- BuildRequired attr-devel.
* Wed Oct 05 2016 ChangLee <changlee@vmware.com> 2.2.52-3
- Modified %check
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.2.52-2
- GA - Bump release of all rpms
* Thu Feb 26 2015 Divya Thaluru <dthaluru@vmware.com> 2.2.52-1
- Initial version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"alsa-lib-1.2.2.tar.bz2": "d8e853d8805574777bbe40937812ad1419c9ea7210e176f0def3e6ed255ab3ec"
}
}

Просмотреть файл

@ -0,0 +1,57 @@
Summary: ALSA library
Name: alsa-lib
Version: 1.2.2
Release: 1%{?dist}
License: LGPLv2+
URL: https://alsa-project.org
Group: Applications/Internet
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://www.alsa-project.org/files/pub/lib/%{name}-%{version}.tar.bz2
BuildRequires: python2-devel
BuildRequires: python2-libs
Requires: python2
%description
The ALSA Library package contains the ALSA library used by programs
(including ALSA Utilities) requiring access to the ALSA sound interface.
%package devel
Summary: Header and development files
Requires: %{name} = %{version}
%description devel
It contains the libraries and header files to create applications
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_libdir}/*
%exclude %{_libdir}/debug/
%{_datadir}/*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%changelog
* Thu May 28 2020 Andrew Phelps <anphel@microsoft.com> 1.2.2-1
- Update to version 1.2.2 to fix CVE-2009-0035
* Sat May 09 2020 Nick Samson <nisamson@microsoft.com> 1.1.9-2
- Added %%license line automatically
* Mon Mar 16 2020 Andrew Phelps <anphel@microsoft.com> 1.1.9-1
- Update to version 1.1.9. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.1.7-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Dec 10 2018 Alexey Makhalov <amakhalov@vmware.com> 1.1.7-1
- initial version, moved from Vivace

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"alsa-utils-1.2.2.tar.bz2": "44807bd578c5f6df6e91a11b8d37e546424a5a1ea8d8e659ee359fe01730e4f3"
}
}

Просмотреть файл

@ -0,0 +1,59 @@
Summary: ALSA Utilities.
Name: alsa-utils
Version: 1.2.2
Release: 1%{?dist}
License: GPLv2+
URL: https://alsa-project.org
Group: Applications/Internet
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://www.alsa-project.org/files/pub/utils/%{name}-%{version}.tar.bz2
Patch0: ens1371.patch
BuildRequires: alsa-lib-devel >= %{version}
BuildRequires: ncurses-devel
Requires: kernel-drivers-sound ncurses
Requires: alsa-lib ncurses >= %{version}
%description
The ALSA Utilities package contains various utilities which are useful
for controlling your sound card.
%prep
%setup -q
%patch0 -p1
%build
%configure --disable-alsaconf --disable-xmlto
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
install -d -m 755 $RPM_BUILD_ROOT/var/lib/alsa
%post
alsactl init
alsactl -L store
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_libdir}/*
%exclude %{_libdir}/debug/
/lib/*
%{_sbindir}/*
%{_datadir}/*
%{_localstatedir}/*
%changelog
* Fri May 29 2020 Andrew Phelps <anphel@microsoft.com> 1.2.2-1
- Update to version 1.2.2 to fix CVE-2009-0035
* Sat May 09 2020 Nick Samson <nisamson@microsoft.com> 1.1.9-3
- Added %%license line automatically
* Tue Apr 28 2020 Emre Girgin <mrgirgin@microsoft.com> 1.1.9-2
- Renaming linux to kernel
* Thu Mar 19 2020 Emre Girgin <mrgirgin@microsoft.com> 1.1.9-1
- Update version to 1.1.9. Correct license info.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.1.7-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Dec 10 2018 Alexey Makhalov <amakhalov@vmware.com> 1.1.7-1
- initial version, moved from Vivace

Просмотреть файл

@ -0,0 +1,54 @@
diff -Naur alsa-utils-1.0.29/alsactl/init/00main alsa-utils-1.0.29_/alsactl/init/00main
--- alsa-utils-1.0.29/alsactl/init/00main 2015-02-26 06:49:40.000000000 -0800
+++ alsa-utils-1.0.29_/alsactl/init/00main 2015-06-02 09:57:23.342226526 -0700
@@ -32,6 +32,7 @@
# real ALSA configuration database
CARDINFO{driver}=="HDA-Intel", INCLUDE="hda", GOTO="init_end"
CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end"
+CARDINFO{driver}=="ENS1371", INCLUDE="ens1371", GOTO="init_end"
CARDINFO{driver}=="Test", INCLUDE="test", GOTO="init_end"
LABEL="init_end"
diff -Naur alsa-utils-1.0.29/alsactl/init/ens1371 alsa-utils-1.0.29_/alsactl/init/ens1371
--- alsa-utils-1.0.29/alsactl/init/ens1371 1969-12-31 16:00:00.000000000 -0800
+++ alsa-utils-1.0.29_/alsactl/init/ens1371 2014-01-16 20:20:09.000000000 -0800
@@ -0,0 +1,15 @@
+# Configuration for ensoniq based cards
+
+CARDINFO{mixername}=="Cirrus Logic CS4297A rev 3", \
+ ATTR{subsystem_vendor}=="0x1274", ATTR{subsystem_device}=="0x1371", \
+ GOTO="vmware-ac97"
+RESULT="false", EXIT="return"
+
+LABEL="vmware-ac97"
+# playback
+CTL{reset}="mixer"
+CTL{name}="Master Playback Volume", CTL{value}="0dB,0dB"
+CTL{name}="Master Playback Switch", CTL{value}="on"
+CTL{name}="PCM Playback Volume", CTL{value}="51dB,51dB"
+CTL{name}="PCM Playback Switch", CTL{value}="on"
+RESULT="true", EXIT="return"
diff -Naur alsa-utils-1.0.29/alsactl/init/Makefile.am alsa-utils-1.0.29_/alsactl/init/Makefile.am
--- alsa-utils-1.0.29/alsactl/init/Makefile.am 2015-02-26 06:49:40.000000000 -0800
+++ alsa-utils-1.0.29_/alsactl/init/Makefile.am 2015-06-02 10:50:52.732086372 -0700
@@ -1,7 +1,7 @@
init_files = \
00main default help info test \
- hda ca0106
+ hda ca0106 ens1371
EXTRA_DIST = $(init_files)
alsainitdir = $(datadir)/alsa/init
alsainit_DATA = $(init_files)
diff -Naur alsa-utils-1.0.29/alsactl/init/Makefile.in alsa-utils-1.0.29_/alsactl/init/Makefile.in
--- alsa-utils-1.0.29/alsactl/init/Makefile.in 2015-02-26 06:50:21.000000000 -0800
+++ alsa-utils-1.0.29_/alsactl/init/Makefile.in 2015-06-02 10:50:45.164213531 -0700
@@ -246,7 +246,7 @@
xmlto_available = @xmlto_available@
init_files = \
00main default help info test \
- hda ca0106
+ hda ca0106 ens1371
EXTRA_DIST = $(init_files)
alsainitdir = $(datadir)/alsa/init

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"ansible-2.9.9.tar.gz": "e83d84ae8bf131c0499d8a4c0e1144bf969454c43086e61cca3c224227df29d1"
}
}

Просмотреть файл

@ -0,0 +1,69 @@
%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Summary: Configuration-management, application deployment, cloud provisioning system
Name: ansible
Version: 2.9.9
Release: 1%{?dist}
License: GPLv3+
URL: https://www.ansible.com
Group: Development/Libraries
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2
BuildRequires: python2-libs
BuildRequires: python-setuptools
Requires: python2
Requires: python2-libs
# Required for %check
Requires: python2-devel
%description
Ansible is a radically simple IT automation system. It handles configuration-management, application deployment, cloud provisioning, ad-hoc task-execution, and multinode orchestration - including trivializing things like zero downtime rolling updates with load balancers.
%prep
%setup -q
%build
python2 setup.py build
%install
%{__rm} -rf %{buildroot}
python2 setup.py install -O1 --skip-build \
--root "%{buildroot}"
%check
python2 setup.py test
%files
%defattr(-, root, root)
%license licenses
%{_bindir}/*
%{python2_sitelib}/*
%changelog
* Tue Jun 02 2020 Nicolas Ontiveros <niontive@microsoft.com> 2.9.9-1
- Upgrade to version 2.9.9, which resolves CVE-2020-1733 and CVE-2020-1738.
* Sat May 09 00:21:43 PST 2020 Nick Samson <nisamson@microsoft.com> 2.9.5-2
- Added %%license line automatically
* Wed Mar 18 2020 Emre Girgin <mrgirgin@microsoft.com> 2.9.5-1
- Version update to 2.9.5. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.7.6-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Jan 22 2019 Anish Swaminathan <anishs@vmware.com> 2.7.6-1
- Version update to 2.7.6, fix CVE-2018-16876
* Mon Sep 17 2018 Ankit Jain <ankitja@vmware.com> 2.6.4-1
- Version update to 2.6.4
* Thu Oct 12 2017 Anish Swaminathan <anishs@vmware.com> 2.4.0.0-1
- Version update to 2.4.0.0
* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.2.2.0-2
- Use python2 explicitly
* Thu Apr 6 2017 Alexey Makhalov <amakhalov@vmware.com> 2.2.2.0-1
- Version update
* Wed Sep 21 2016 Xiaolin Li <xiaolinl@vmware.com> 2.1.1.0-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"ant-contrib-1.0b3-src.tar.gz": "e6d652070aaeac54afec9da5c94a9eaf4427a142dae7db05fa7df51576b9ba8c"
}
}

Просмотреть файл

@ -0,0 +1,89 @@
Summary: Ant contrib
Name: ant-contrib
Version: 1.0b3
Release: 18%{?dist}
License: ASL 1.1
URL: https://ant-contrib.sourceforge.net
Group: Applications/System
Vendor: Microsoft Corporation
Distribution: Mariner
BuildArch: noarch
Source0: https://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}-src.tar.gz
BuildRequires: openjre8
BuildRequires: openjdk8
BuildRequires: ant
Requires: openjre8
Requires: ant
%define _prefix /var/opt/ant-contrib
%description
The Ant Contrib project is a collection of tasks for Apache Ant.
%prep
%setup -n %{name}
find . -name '*.jar' -or -name '*.class' -exec rm -rf {} +
%clean
rm -rf %{buildroot}
%build
export JAVA_HOME=$(find /usr/lib/jvm -name "OpenJDK*")
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(find $JAVA_HOME/lib -name "jli")
ant -Ddist.dir="." -Dproject.version=%{version} dist
%install
mkdir -p -m 700 %{buildroot}/var/opt
cd %{buildroot}/var/opt && tar xvzf %{_builddir}/%{name}/%{name}-%{version}-bin.tar.gz --wildcards "*.jar"
%files
%defattr(-,root,root)
%license docs/LICENSE.txt
%dir %{_prefix}
%dir %{_prefix}/lib
%{_prefix}/*.jar
%{_prefix}/lib/*.jar
%changelog
* Sat May 09 00:20:49 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.0b3-18
- Added %%license line automatically
* Thu Apr 30 2020 Emre Girgin <mrgirgin@microsoft.com> 1.0b3-17
- Renaming apache-ant to ant
* Fri Apr 24 2020 Nicolas Guibourge <nicolasg@microsoft.com> 1.0b3-16
- Add path to libjli.so in LD_LIBRARY_PATH
* Thu Apr 09 2020 Joe Schmitt <joschmit@microsoft.com> 1.0b3-15
- Fix URL.
- Update License.
- Update Source0 with valid URL.
- Remove sha1 macro.
- License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.0b3-14
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Nov 05 2018 Alexey Makhalov <amakhalov@vmware.com> 1.0b3-13
- Removed dependency on JAVA8_VERSION macro
* Mon Jun 19 2017 Divya Thaluru <dthaluru@vmware.com> 1.0b3-12
- Removed dependency on ANT_HOME
* Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.0b3-11
- Renamed openjdk to openjdk8
* Fri Apr 07 2017 Divya Thaluru <dthaluru@vmware.com> 1.0b3-10
- Removed prebuilt binaries from source tar ball
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0b3-9
- Updated JAVA_HOME path to point to latest.
* Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0b3-8
- Updated JAVA_HOME path to point to latest.
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0b3-7
- GA - Bump release of all rpms
* Fri May 20 2016 Divya Thaluru<dthaluru@vmware.com> 1.0b3-6
- Updated JAVA_HOME path to point to latest.
* Wed Mar 02 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.0b3.0-5
- Updated apache-ant to version 1.9.6
* Fri Feb 26 2016 Kumar Kaushik <kaushikk@vmware.com> 1.0b3.0-4
- Updated JAVA_HOME path to point to latest.
* Mon Nov 16 2015 Sharath George <sharathg@vmware.com> 1.0b3.0-2
- Change path to /var/opt.
* Wed Sep 16 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.0b3.0-1
- Updated dependencies after repackaging openjdk.
* Tue Jun 9 2015 Sriram Nambakam <snambakam@vmware.com> 1.0b3.0-0
- Initial commit

Просмотреть файл

@ -0,0 +1,7 @@
{
"Signatures": {
"apache-ant-1.10.8-src.tar.gz": "53d06ed062297366569fe563b77e8187973be1383749181938b597177514d318",
"hamcrest-1.3.tgz": "c6428e40d069fff3f99780efaae96c35ebdbf7cbfd475504254ebffcc19620c2",
"maven-ant-tasks-2.1.3.tar.gz": "ae5b6548dbb3f0d71865e1be9bffd13ca7bb65a3cb5d89eaee97ea7e70e1f0ba"
}
}

174
SPECS/ant/ant.spec Normal file
Просмотреть файл

@ -0,0 +1,174 @@
Summary: Apache Ant
Name: ant
Version: 1.10.8
Release: 1%{?dist}
License: ASL 2.0 and BSD and W3C
URL: https://ant.apache.org
Group: Applications/System
Vendor: Microsoft Corporation
Distribution: Mariner
BuildArch: noarch
Source0: https://archive.apache.org/dist/ant/source/apache-%{name}-%{version}-src.tar.gz
Source1: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hamcrest/hamcrest-1.3.tgz
Source2: https://dl.bintray.com/vmware/photon_sources/1.0/maven-ant-tasks-2.1.3.tar.gz
Requires: openjre8
BuildRequires: openjre8
BuildRequires: openjdk8
%define _prefix /var/opt/apache-%{name}
%define _bindir %{_prefix}/bin
%define _libdir %{_prefix}/lib
%description
The Ant package contains binaries for a build system
%package -n ant-scripts
Summary: Additional scripts for ant
Requires: %{name} = %{version}
Requires: python2
%description -n ant-scripts
Apache Ant is a Java-based build tool.
This package contains additional perl and python scripts for Apache
Ant.
%prep
%setup -q -n apache-%{name}-%{version}
tar xf %{SOURCE1} --no-same-owner
tar xf %{SOURCE2} --no-same-owner
%clean
rm -rf %{buildroot}
%build
ANT_DIST_DIR=%{buildroot}%{_prefix}
cp -v ./hamcrest-1.3/hamcrest-core-1.3.jar ./lib/optional
export JAVA_HOME=$(find /usr/lib/jvm -name "OpenJDK*")
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(find $JAVA_HOME/lib -name "jli")
mkdir -p -m 700 $ANT_DIST_DIR
./bootstrap.sh && ./build.sh -Ddist.dir=$ANT_DIST_DIR
%install
cp %{_builddir}/apache-%{name}-%{version}/maven-ant-tasks-2.1.3/maven-ant-tasks-2.1.3.jar %{buildroot}/%{_libdir}/
mkdir -p %{buildroot}%{_datadir}/java/ant
for jar in %{buildroot}/%{_libdir}/*.jar
do
jarname=$(basename $jar .jar)
ln -sfv %{_libdir}/${jarname}.jar %{buildroot}%{_datadir}/java/ant/${jarname}.jar
done
rm -rf %{buildroot}%{_bindir}/*.bat
rm -rf %{buildroot}%{_bindir}/*.cmd
mkdir -p %{buildroot}/bin
for b in %{buildroot}%{_bindir}/*
do
binaryname=$(basename $b)
ln -sfv %{_bindir}/${binaryname} %{buildroot}/bin/${binaryname}
done
MAVEN_ANT_TASKS_DIR=%{buildroot}%{_prefix}/maven-ant-tasks
mkdir -p -m 700 $MAVEN_ANT_TASKS_DIR
cp %{_builddir}/apache-%{name}-%{version}/maven-ant-tasks-2.1.3/LICENSE $MAVEN_ANT_TASKS_DIR/
cp %{_builddir}/apache-%{name}-%{version}/maven-ant-tasks-2.1.3/NOTICE $MAVEN_ANT_TASKS_DIR/
cp %{_builddir}/apache-%{name}-%{version}/maven-ant-tasks-2.1.3/README.txt $MAVEN_ANT_TASKS_DIR/
chown -R root:root $MAVEN_ANT_TASKS_DIR
chmod 644 $MAVEN_ANT_TASKS_DIR/*
%check
# Disable following tests which are currently failing in chrooted environment -
# - org.apache.tools.ant.types.selectors.OwnedBySelectorTest
# - org.apache.tools.ant.types.selectors.PosixGroupSelectorTest
# - org.apache.tools.mail.MailMessageTest
if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then
rm -f src/tests/junit/org/apache/tools/ant/types/selectors/OwnedBySelectorTest.java \
src/tests/junit/org/apache/tools/ant/types/selectors/PosixGroupSelectorTest.java \
src/tests/junit/org/apache/tools/mail/MailMessageTest.java
fi
export JAVA_HOME=`echo /usr/lib/jvm/OpenJDK-*`
bootstrap/bin/ant -v run-tests
%files
%defattr(-,root,root)
%license LICENSE
%dir %{_bindir}
%dir %{_libdir}
%dir %{_datadir}/java/ant
%dir %{_prefix}/maven-ant-tasks
/bin/ant
/bin/antRun
%{_bindir}/ant
%{_bindir}/antRun
%{_libdir}/*
%{_datadir}/java/ant/*.jar
%{_prefix}/maven-ant-tasks/LICENSE
%{_prefix}/maven-ant-tasks/README.txt
%{_prefix}/maven-ant-tasks/NOTICE
%files -n ant-scripts
%defattr(-,root,root)
/bin/antRun.pl
/bin/complete-ant-cmd.pl
/bin/runant.py
/bin/runant.pl
%{_bindir}/antRun.pl
%{_bindir}/complete-ant-cmd.pl
%{_bindir}/runant.py
%{_bindir}/runant.pl
%changelog
* Thu May 21 2020 Ruying Chen <v-ruyche@microsoft.com> - 1.10.8-1
- Updated to version 1.10.8 to resolve CVE-2020-1945
* Sat May 09 00:21:39 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.10.5-8
- Added %%license line automatically
* Thu Apr 30 2020 Emre Girgin <mrgirgin@microsoft.com> 1.10.5-7
- Renaming apache-ant to ant
* Wed Apr 29 2020 Nicolas Guibourge <nicolasg@microsoft.com> 1.10.5-6
- Add path to libjli.so in LD_LIBRARY_PATH
* Thu Apr 09 2020 Pawel Winogrodzki <pawelwi@microsoft.com> 1.10.5-5
- Fixed "Source0"-"Source2" and "URL" tags.
- License verified and "License" tag updated.
- Removed "%%define sha1".
- Replaced tabs with spaces.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.10.5-4
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Dec 04 2018 Dweep Advani <dadvani@vmware.com> 1.10.5-3
- Adding MakeCheck tests
* Mon Nov 05 2018 Alexey Makhalov <amakhalov@vmware.com> 1.10.5-2
- Removed dependency on JAVA8_VERSION macro
* Mon Sep 17 2018 Ankit Jain <ankitja@vmware.com> 1.10.5-1
- Updated Apache Ant to 1.10.5
* Wed Jun 28 2017 Kumar Kaushik <kaushikk@vmware.com> 1.10.1-5
- Base package does not require python2.
* Mon Jun 19 2017 Divya Thaluru <dthaluru@vmware.com> 1.10.1-4
- Removed dependency on ANT_HOME
- Moved perl and python scripts to ant-scripts package
* Mon Jun 05 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.1-3
- Fixed the profile.d/apache-ant.sh script to include ant in $PATH
* Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.1-2
- Renamed openjdk to openjdk8
* Mon Apr 17 2017 Chang Lee <changlee@vmware.com> 1.10.1-1
- Updated Apache Ant to 1.10.1
* Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-6
- use java rpm macros to determine versions
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-5
- Updated JAVA_HOME path to point to latest JDK.
* Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-4
- Updated JAVA_HOME path to point to latest JDK.
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-3
- GA - Bump release of all rpms
* Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 1.9.6-2
- Updated JAVA_HOME path to point to latest JDK.
* Mon Feb 29 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.9.6-1
- Updated to version 1.9.6
* Fri Feb 26 2016 Kumar Kaushik <kaushikk@vmware.com> 1.9.4-4
- Updated JAVA_HOME path to point to latest JDK.
* Mon Nov 16 2015 Sharath George <sharathg@vmware.com> 1.9.4-3
- Changed path to /var/opt.
* Wed Sep 16 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.9.4-2
- Updated dependencies after repackaging openjdk.
* Wed Aug 12 2015 Sriram Nambakam <snambakam@vmware.com> 1.9.4
- Added maven ant tasks
* Fri May 22 2015 Sriram Nambakam <snambakam@vmware.com> 1.9.4
- Initial build. First version

Просмотреть файл

@ -0,0 +1,33 @@
--- a/utils/apparmor/sandbox.py 2018-04-15 19:18:53.000000000 +0530
+++ b/utils/apparmor/sandbox.py 2018-12-13 19:24:35.553420386 +0530
@@ -720,6 +720,7 @@
rc, report = aa_exec(command, opt, x.new_environ, required_rules)
except Exception as e:
x.cleanup()
+ error(e)
raise
x.cleanup()
--- a/utils/test/test-aa.py 2018-04-15 19:18:53.000000000 +0530
+++ b/utils/test/test-aa.py 2018-12-13 20:03:21.197303888 +0530
@@ -139,12 +139,6 @@
program = self.writeTmpfile('script', params)
profile = create_new_profile(program)
- if exp_interpreter_path:
- self.assertEqual(set(profile[program][program]['file'].get_clean()), {'%s ix,' % exp_interpreter_path, '%s r,' % program, '',
- '/AATest/lib64/libtinfo.so.* mr,', '/AATest/lib64/libc.so.* mr,', '/AATest/lib64/libdl.so.* mr,', '/AATest/lib64/libreadline.so.* mr,', '/AATest/lib64/ld-linux-x86-64.so.* mr,' })
- else:
- self.assertEqual(set(profile[program][program]['file'].get_clean()), {'%s mr,' % program, ''})
-
if exp_abstraction:
self.assertEqual(set(profile[program][program]['include'].keys()), {exp_abstraction, 'abstractions/base'})
else:
@@ -184,7 +178,6 @@
if not exp_interpreter_path.startswith('/'):
exp_interpreter_path = os.path.join(dirname, exp_interpreter_path)
- self.assertEqual(interpreter_path, exp_interpreter_path)
self.assertEqual(abstraction, exp_abstraction)
def test_special_file(self):

Просмотреть файл

@ -0,0 +1,12 @@
diff -Naur apparmor-2.13/parser/apparmor.service apparmor-2.13-mod/parser/apparmor.service
--- apparmor-2.13/parser/apparmor.service 2018-04-15 19:18:53.000000000 +0530
+++ apparmor-2.13-mod/parser/apparmor.service 2018-08-08 20:21:02.092378749 +0530
@@ -9,7 +9,7 @@
[Service]
Type=oneshot
-ExecStart=/lib/apparmor/apparmor.systemd reload
+ExecStart=/lib/apparmor/apparmor.systemd start
ExecReload=/lib/apparmor/apparmor.systemd reload
# systemd maps 'restart' to 'stop; start' which means removing AppArmor confinement

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"apparmor-2.13.tar.gz": "49f0b65a60c1eb5b7b4316023811bf1785875567e0e0c4c8a26cb1f1c3ac5858"
}
}

Просмотреть файл

@ -0,0 +1,378 @@
%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Name: apparmor
Version: 2.13
Release: 10%{?dist}
Summary: AppArmor is an effective and easy-to-use Linux application security system.
License: GNU LGPL v2.1
URL: https://launchpad.net/apparmor
Source0: https://launchpad.net/apparmor/2.13/2.13.0/+download/%{name}-%{version}.tar.gz
%define sha1 apparmor=54202cafce24911c45141d66e2d1e037e8aa5746
Patch0: apparmor-set-profiles-complain-mode.patch
Patch1: apparmor-service-start-fix.patch
Patch2: apparmor-fix-make-check.patch
Vendor: Microsoft Corporation
Distribution: Mariner
Group: Productivity/Security
BuildRequires: python3
BuildRequires: perl
BuildRequires: python3-devel
BuildRequires: python3-libs
BuildRequires: swig
BuildRequires: make
BuildRequires: gawk
BuildRequires: which
BuildRequires: libstdc++
BuildRequires: libstdc++-devel
BuildRequires: gcc
BuildRequires: libgcc
BuildRequires: libgcc-devel
BuildRequires: glibc
BuildRequires: glibc-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: httpd
BuildRequires: httpd-devel
BuildRequires: httpd-tools
BuildRequires: apr
BuildRequires: apr-util-devel
BuildRequires: pam
BuildRequires: pam-devel
BuildRequires: dejagnu
BuildRequires: openssl-devel
BuildRequires: curl-devel
BuildRequires: python3-setuptools, python3-xml
%description
AppArmor is a file and network mandatory access control
mechanism. AppArmor confines processes to the resources allowed by the
systems administrator and can constrain the scope of potential security
vulnerabilities.
%package -n libapparmor
Summary: Utility library for AppArmor
License: GNU LGPL v2.1
Group: Development/Libraries/C and C++
%description -n libapparmor
This package contains the AppArmor library.
%package -n libapparmor-devel
Summary: Development headers and libraries for libapparmor
License: GNU LGPL v2.1
Group: Development/Libraries/C and C++
Requires: libapparmor = %{version}-%{release}
%description -n libapparmor-devel
This package contains development files for libapparmor.
%package -n apache2-mod_apparmor
Summary: AppArmor module for apache2
License: GNU LGPL v2.1
Group: Productivity/Security
%description -n apache2-mod_apparmor
This provides the Apache module needed to declare various differing
confinement policies when running virtual hosts in the webserver
by using the changehat abilities exposed through libapparmor.
%package profiles
Summary: AppArmor profiles that are loaded into the apparmor kernel module
License: GNU LGPL v2.1
Group: Productivity/Security
Requires: apparmor-parser = %{version}-%{release}
Requires: apparmor-abstractions = %{version}-%{release}
%description profiles
This package contains the basic AppArmor profiles.
%package parser
Summary: AppArmor userlevel parser utility
License: GNU LGPL v2.1
Group: Productivity/Security
Requires: libapparmor = %{version}-%{release}
Requires: systemd
%description parser
The AppArmor Parser is a userlevel program that is used to load in
program profiles to the AppArmor Security kernel module.
This package is part of a suite of tools that used to be named
SubDomain.
%package abstractions
Summary: AppArmor abstractions and directory structure
License: GNU LGPL v2.1
Group: Productivity/Security
Requires: apparmor-parser = %{version}-%{release}
%description abstractions
AppArmor abstractions (common parts used in various profiles) and
the /etc/apparmor.d/ directory structure.
%package -n pam_apparmor
Summary: PAM module for AppArmor change_hat
License: GNU LGPL v2.1
Group: Productivity/Security
Requires: pam
Requires: pam-devel
%description -n pam_apparmor
The pam_apparmor module provides the means for any PAM applications
that call pam_open_session() to automatically perform an AppArmor
change_hat operation in order to switch to a user-specific security
policy.
%package utils
Summary: AppArmor User-Level Utilities Useful for Creating AppArmor Profiles
License: GNU LGPL v2.1
Group: Productivity/Security
Requires: libapparmor = %{version}-%{release}
Requires: audit
Requires: apparmor-abstractions = %{version}-%{release}
%description utils
This package contains programs to help create and manage AppArmor
profiles.
%package -n python3-apparmor
Summary: Python 3 interface for libapparmor functions
License: GNU LGPL v2.1
Group: Development/Libraries/Python
Requires: libapparmor = %{version}-%{release}
Requires: python3
%description -n python3-apparmor
This package provides the python3 interface to AppArmor. It is used for python
applications interfacing with AppArmor.
%package -n perl-apparmor
Summary: AppArmor module for perl.
License: GNU LGPL v2.1
Group: Development/Libraries/Perl
Requires: libapparmor = %{version}-%{release}
%description -n perl-apparmor
This package contains the AppArmor module for perl.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
export PYTHONPATH=/usr/lib/python3.7/site-packages
export PYTHON=/usr/bin/python3
export PYTHON_VERSION=3.7
export PYTHON_VERSIONS=python3
#Building libapparmor
cd ./libraries/libapparmor
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/"
/sbin/ldconfig
sh ./autogen.sh
%configure \
--with-perl \
--with-python
make %{?_smp_mflags}
#Building Binutils
cd ../../binutils/
make %{?_smp_mflags}
#Building parser
cd ../parser
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/"
export LIBRARY_PATH="$LIBRARY_PATH:/usr/lib"
echo $LD_LIBRARY_PATH
echo $LIBRARY_PATH
make %{?_smp_mflags}
#Building Utilities
cd ../utils
make %{?_smp_mflags}
#Building Apache mod_apparmor
cd ../changehat/mod_apparmor
make %{?_smp_mflags}
#Building PAM AppArmor
cd ../pam_apparmor
make %{?_smp_mflags}
#Building Profiles
cd ../../profiles
make %{?_smp_mflags}
%check
easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
$easy_install_3 pyflakes
export PYTHONPATH=/usr/lib/python3.7/site-packages
export PYTHON=/usr/bin/python3
export PYTHON_VERSION=3.7
export PYTHON_VERSIONS=python3
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/"
cd ./libraries/libapparmor
make check
cd ../../binutils/
make check
cd ../utils
make check
%install
export PYTHONPATH=/usr/lib/python3.7/site-packages
export PYTHON=/usr/bin/python3
export PYTHON_VERSION=3.7
export PYTHON_VERSIONS=python3
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/"
cd libraries/libapparmor
make DESTDIR=%{buildroot} install
cd ../../binutils/
make DESTDIR=%{buildroot} install
cd ../parser
make DESTDIR=%{buildroot} install
cd ../utils
make DESTDIR=%{buildroot} install
cd ../changehat/mod_apparmor
make DESTDIR=%{buildroot} install
cd ../pam_apparmor
make DESTDIR=%{buildroot} install
cd ../../profiles
make DESTDIR=%{buildroot} install
%files -n libapparmor
%defattr(-,root,root)
%license LICENSE
%{_libdir}/libapparmor.so.*
%post -n libapparmor
/sbin/ldconfig
%postun -n libapparmor
/sbin/ldconfig
%files -n libapparmor-devel
%defattr(-,root,root)
%{_libdir}/libapparmor.a
%{_libdir}/libapparmor.la
%{_libdir}/libapparmor.so
%{_libdir}/pkgconfig/libapparmor.pc
%dir %{_includedir}/aalogparse
%dir %{_includedir}/sys
%{_includedir}/aalogparse/*
%{_includedir}/sys/*
%doc %{_mandir}/man2/aa_change_hat.2.gz
%doc %{_mandir}/man2/aa_find_mountpoint.2.gz
%doc %{_mandir}/man2/aa_getcon.2.gz
%doc %{_mandir}/man2/aa_query_label.2.gz
%doc %{_mandir}/man3/aa_features.3.gz
%doc %{_mandir}/man3/aa_kernel_interface.3.gz
%doc %{_mandir}/man3/aa_policy_cache.3.gz
%doc %{_mandir}/man3/aa_splitcon.3.gz
%files -n apache2-mod_apparmor
%defattr(-,root,root)
%{_libdir}/httpd/modules/mod_apparmor.so
%doc %{_mandir}/man8/mod_apparmor.8.gz
%files profiles
%defattr(-,root,root,755)
%dir %{_sysconfdir}/apparmor.d/apache2.d
%config(noreplace) %{_sysconfdir}/apparmor.d/apache2.d/phpsysinfo
%config(noreplace) %{_sysconfdir}/apparmor.d/bin.*
%config(noreplace) %{_sysconfdir}/apparmor.d/sbin.*
%config(noreplace) %{_sysconfdir}/apparmor.d/usr.*
%config(noreplace) %{_sysconfdir}/apparmor.d/local/*
%dir %{_datadir}/apparmor
%{_datadir}/apparmor/extra-profiles/*
%files parser
%defattr(755,root,root,755)
/sbin/apparmor_parser
/sbin/rcapparmor
/lib/apparmor/rc.apparmor.functions
/lib/apparmor/apparmor.systemd
%{_bindir}/aa-exec
%{_bindir}/aa-enabled
%attr(644,root,root) %{_prefix}%{_unitdir}/apparmor.service
%dir %{_sysconfdir}/apparmor
%dir %{_sysconfdir}/apparmor.d
%config(noreplace) %{_sysconfdir}/apparmor/parser.conf
%config(noreplace) %{_sysconfdir}/apparmor/subdomain.conf
%{_localstatedir}/lib/apparmor
%doc %{_mandir}/man5/apparmor.d.5.gz
%doc %{_mandir}/man5/apparmor.vim.5.gz
%doc %{_mandir}/man5/subdomain.conf.5.gz
%doc %{_mandir}/man7/apparmor.7.gz
%doc %{_mandir}/man8/apparmor_parser.8.gz
%doc %{_mandir}/man1/aa-enabled.1.gz
%doc %{_mandir}/man1/aa-exec.1.gz
%doc %{_mandir}/man2/aa_stack_profile.2.gz
%preun parser
%systemd_preun apparmor.service
%post parser
%systemd_post apparmor.service
%postun parser
%systemd_postun_with_restart apparmor.service
%files abstractions
%defattr(644,root,root,755)
%dir %{_sysconfdir}/apparmor.d/abstractions
%config(noreplace) %{_sysconfdir}/apparmor.d/abstractions/*
%dir %{_sysconfdir}/apparmor.d/disable
%dir %{_sysconfdir}/apparmor.d/local
%dir %{_sysconfdir}/apparmor.d/tunables
%config(noreplace) %{_sysconfdir}/apparmor.d/tunables/*
%exclude %{_datadir}/locale
%files utils
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/apparmor/easyprof.conf
%config(noreplace) %{_sysconfdir}/apparmor/logprof.conf
%config(noreplace) %{_sysconfdir}/apparmor/notify.conf
%config(noreplace) %{_sysconfdir}/apparmor/severity.db
/sbin/aa-teardown
%{_sbindir}/aa-*
%{_sbindir}/apparmor_status
%{_bindir}/aa-easyprof
%{_datadir}/apparmor/easyprof/
%dir %{_datadir}/apparmor
%{_datadir}/apparmor/apparmor.vim
%doc %{_mandir}/man2/aa_change_profile.2.gz
%doc %{_mandir}/man5/logprof.conf.5.gz
%doc %{_mandir}/man8/aa-*.gz
%doc %{_mandir}/man8/apparmor_status.8.gz
%files -n pam_apparmor
%defattr(-,root,root,755)
/lib/security/pam_apparmor.so
%files -n python3-apparmor
%defattr(-,root,root)
%{python3_sitelib}/*
%files -n perl-apparmor
%defattr(-,root,root)
%{perl_vendorarch}/auto/LibAppArmor/
%{perl_vendorarch}/LibAppArmor.pm
%exclude %{perl_archlib}/perllocal.pod
%changelog
* Sat May 09 00:20:37 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.13-10
- Added %%license line automatically
* Tue Apr 28 2020 Emre Girgin <mrgirgin@microsoft.com> 2.13-9
- Renaming Linux-PAM to pam
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.13-8
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Mar 05 2019 Siju Maliakkal <smaliakkal@vmware.com> 2.13-7
- Excluded conflicting perllocal.pod
* Thu Dec 06 2018 Keerthana K <keerthanak@vmware.com> 2.13-6
- Fixed make check failures.
* Fri Oct 05 2018 Tapas Kundu <tkundu@vmware.com> 2.13-5
- Updated using python 3.7 libs
* Wed Oct 03 2018 Keerthana K <keerthanak@vmware.com> 2.13-4
- Depcrecated ruby apparmor package.
- Modified the perl and python path to generic.
* Wed Sep 26 2018 Ajay Kaher <akaher@vmware.com> 2.13-3
- Fix for aarch64
* Thu Sep 20 2018 Keerthana K <keerthanak@vmware.com> 2.13-2
- Updated the ruby packagefor latest version.
* Thu Aug 30 2018 Keerthana K <keerthanak@vmware.com> 2.13-1
- Initial Apparmor package for Photon.

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"apr-util-1.6.1.tar.gz": "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
}
}

Просмотреть файл

@ -0,0 +1,159 @@
Summary: The Apache Portable Runtime Utility Library
Name: apr-util
Version: 1.6.1
Release: 4%{?dist}
License: Apache License 2.0
URL: https://apr.apache.org/
Group: System Environment/Libraries
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://archive.apache.org/dist/apr/%{name}-%{version}.tar.gz
%define sha1 %{name}=5bae4ff8f1dad3d7091036d59c1c0b2e76903bf4
%define apuver 1
BuildRequires: apr-devel
BuildRequires: sqlite-devel
BuildRequires: openssl-devel
BuildRequires: nss-devel
BuildRequires: expat-devel
Requires: apr
Requires: openssl
Requires: expat
Requires: nss
%description
The Apache Portable Runtime Utility Library.
%package devel
Group: Development/Libraries
Summary: APR utility library development kit
Requires: apr-devel
Requires: expat-devel
Requires: %{name} = %{version}-%{release}
%description devel
This package provides the support files which can be used to
build applications using the APR utility library.
%package ldap
Group: Development/Libraries
Summary: APR utility library LDAP support
BuildRequires: openldap
Requires: apr-util
Requires: openldap
%description ldap
This package provides the LDAP support for the apr-util.
%package pgsql
Group: Development/Libraries
Summary: APR utility library PostgreSQL DBD driver
BuildRequires: postgresql-devel >= 10.5
Requires: apr-util
Requires: postgresql >= 10.5
%description pgsql
This package provides the PostgreSQL driver for the apr-util DBD (database abstraction) interface.
%package sqlite
Group: Development/Libraries
Summary: APR utility library SQLite DBD driver.
Requires: apr-util
%description sqlite
This package provides the SQLite driver for the apr-util DBD
(database abstraction) interface.
%prep
%setup -q
%build
%configure --with-apr=%{_prefix} \
--includedir=%{_includedir}/apr-%{apuver} \
--with-ldap --without-gdbm \
--with-sqlite3 --with-pgsql \
--without-sqlite2 \
--with-openssl=/usr \
--with-nss \
--with-crypto
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
%check
# Disable smp_flag because of race condition
make check
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license LICENSE
%{_libdir}/aprutil.exp
%{_libdir}/libaprutil-%{apuver}.so.*
%{_libdir}/apr-util-%{apuver}/apr_crypto_nss*
%{_libdir}/apr-util-%{apuver}/apr_crypto_openssl*
%exclude %{_libdir}/debug
%files devel
%defattr(-,root,root)
%{_libdir}/libaprutil-%{apuver}.*a
%{_libdir}/libaprutil-%{apuver}.so
%{_bindir}/*
%{_includedir}/*
%{_libdir}/pkgconfig/apr-util-%{apuver}.pc
%files ldap
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_ldap*
%files pgsql
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_pgsql*
%files sqlite
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite*
%changelog
* Sat May 09 00:21:10 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.6.1-4
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.6.1-3
- Initial CBL-Mariner import from Photon (license: Apache2).
* Fri Sep 21 2018 Dweep Advani <dadvani@vmware.com> 1.6.1-2
- Consuming postgresql 10.5
* Tue Sep 18 2018 Ankit Jain <ankitja@vmware.com> 1.6.1-1
- Updated to version 1.6.1
* Mon Sep 18 2017 Rui Gu <ruig@vmware.com> 1.5.4-12
- Disable smp_flag on make check because of race condition
* Thu Jul 6 2017 Divya Thaluru <dthaluru@vmware.com> 1.5.4-11
- Added build requires on postgresql-devel
* Wed May 10 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.5.4-10
- Add missing Requires.
* Tue Apr 18 2017 Alexey Makhalov <amakhalov@vmware.com> 1.5.4-9
- Add expat-devel build deps otherwise it builds expat from its source tree
* Fri Nov 18 2016 Alexey Makhalov <amakhalov@vmware.com> 1.5.4-8
- Add sqlite-devel build deps
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.4-7
- GA - Bump release of all rpms
* Wed Apr 13 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.4-6
- remove libexpat files
* Tue Sep 22 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.5.4-5
- Updated build-requires after creating devel package for apr.
* Wed Sep 16 2015 Xiaolin Li <xiaolinl@vmware.com> 1.5.4-4
- Seperate Separate apr-util to apr-util, apr-util-devel, aprutil-ldap, apr-util-pgsql, and apr-utilsqlite.
* Wed Jul 15 2015 Sarah Choi <sarahc@vmware.com> 1.5.4-4
- Use apuver(=1) instead of version for mesos
* Mon Jul 13 2015 Alexey Makhalov <amakhalov@vmware.com> 1.5.2-3
- Exclude /usr/lib/debug
* Wed Jul 01 2015 Touseef Liaqat <tliaqat@vmware.com> 1.5.2-2
- Fix tags and paths.
* Wed May 20 2015 Touseef Liaqat <tliaqat@vmware.com> 1.5.4-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"apr-1.6.5.tar.gz": "70dcf9102066a2ff2ffc47e93c289c8e54c95d8dda23b503f9e61bb0cbd2d105"
}
}

80
SPECS/apr/apr.spec Normal file
Просмотреть файл

@ -0,0 +1,80 @@
Summary: The Apache Portable Runtime
Name: apr
Version: 1.6.5
Release: 3%{?dist}
License: Apache License 2.0
URL: https://apr.apache.org/
Group: System Environment/Libraries
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://archive.apache.org/dist/%{name}/%{name}-%{version}.tar.gz
%define sha1 %{name}=ebf4f15fa5003b1490550e260f5a57dc8a2ff0ac
%define aprver 1
%description
The Apache Portable Runtime.
%package devel
Summary: Header and development files
Requires: %{name} = %{version}-%{release}
%description devel
It contains the libraries and header files to create applications
%prep
%setup -q
%build
./configure --prefix=/usr \
--includedir=%{_includedir}/apr-%{aprver} \
--with-installbuilddir=%{_libdir}/apr/build-%{aprver} \
--with-devrandom=/dev/urandom \
CC=gcc CXX=g++
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
%check
make %{?_smp_mflags} check
%post
%files
%defattr(-,root,root)
%license LICENSE
%{_libdir}/*
%exclude %{_libdir}/debug
%exclude %{_libdir}/*.la
%exclude %{_libdir}/*.a
%exclude %{_libdir}/*.so
%exclude %{_libdir}/pkgconfig
%{_bindir}/*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.la
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig
%changelog
* Sat May 09 00:20:50 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.6.5-3
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.6.5-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Sep 18 2018 Ankit Jain <ankitja@vmware.com> 1.6.5-1
- Updated to version 1.6.5
* Fri Dec 08 2017 Xiaolin Li <xiaolinl@vmware.com> 1.5.2-7
- Fix CVE-2017-12613
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.5.2-6
- GA - Bump release of all rpms
* Mon Sep 21 2015 Harish Udaiya Kumar<hudaiyakumar@vmware.com> 1.5.2-5
- Repacked to move the include files in devel package.
* Wed Jul 15 2015 Sarah Choi <sarahc@vmware.com> 1.5.2-4
- Use aprver(=1) instead of version for mesos
* Mon Jul 13 2015 Alexey Makhalov <amakhalov@vmware.com> 1.5.2-3
- Exclude /usr/lib/debug
* Wed Jul 01 2015 Touseef Liaqat <tliaqat@vmware.com> 1.5.2-2
- Fix tags and paths.
* Wed May 20 2015 Touseef Liaqat <tliaqat@vmware.com> 1.5.2-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"asciidoc-8.6.10.tar.gz": "88911e41d3caf64e1c0363b123612e2ac0ac58c0fb4b7141e9ab67eb3f95fc75"
}
}

Просмотреть файл

@ -0,0 +1,76 @@
Summary: AsciiDoc is a human readable text document format
Name: asciidoc
Version: 8.6.10
Release: 4%{?dist}
License: GPLv2
URL: http://asciidoc.org/
Group: System Environment/Development
Vendor: Microsoft Corporation
Distribution: Mariner
#Source0: https://github.com/%{name}/%{name}-py3/archive/%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3
BuildRequires: python-xml
BuildRequires: libxslt
BuildRequires: docbook-style-xsl
BuildRequires: docbook-dtd-xml
BuildRequires: python2
Requires: python3
Requires: python-xml
Requires: libxslt
Requires: docbook-style-xsl
Requires: docbook-dtd-xml
Requires: python2
%description
AsciiDoc is a human readable text document format that can be easily converted to other document formats.
%prep
%setup -q -n %{name}-py3-%{version}
%build
autoreconf -v
export CFLAGS="%{optflags}"
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir}
make %{?_smp_mflags}
%install
rm -rf %{buildroot}%{_infodir}
make DESTDIR=%{buildroot} install
%check
python tests/testasciidoc.py update
python tests/testasciidoc.py run
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_sysconfdir}/*
%{_mandir}/*
%changelog
* Sat May 09 00:21:18 PST 2020 Nick Samson <nisamson@microsoft.com> - 8.6.10-4
- Added %%license line automatically
* Tue May 05 2020 Emre Girgin <mrgirgin@microsoft.com> 8.6.10-3
- Renaming docbook-xsl to docbook-style-xsl
* Tue May 05 2020 Emre Girgin <mrgirgin@microsoft.com> 8.6.10-2
- Renaming docbook-xml to docbook-dtd-xml
* Wed Mar 25 2020 Emre Girgin <mrgirgin@microsoft.com> 8.6.10-1
- Update to verison 8.6.10 and python3 implementation. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 8.6.9-5
- Initial CBL-Mariner import from Photon (license: Apache2).
* Wed Sep 06 2017 Anish Swaminathan <anishs@vmware.com> 8.6.9-4
- Use system sysconfdir
* Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 8.6.9-3
- Fix arch
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 8.6.9-2
- GA - Bump release of all rpms
* Fri Jun 5 2015 Touseef Liaqat <tliaqat@vmware.com> 8.6.9-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"atftp-0.7.2.tar.gz": "1ad080674e9f974217b3a703e7356c6c8446dc5e7b2014d0d06e1bfaa11b5041"
}
}

157
SPECS/atftp/atftp.spec Normal file
Просмотреть файл

@ -0,0 +1,157 @@
Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP server
Name: atftp
Version: 0.7.2
Release: 3%{?dist}
URL: http://sourceforge.net/projects/atftp
License: GPLv2+ and GPLv3+ and LGPLv2+
Group: System Environment/Daemons
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://sourceforge.net/projects/atftp/files/latest/download/%{name}-%{version}.tar.gz
%define sha1 atftp=a05ff68dfcdbe5368b57a955647450b798a07adc
BuildRequires: systemd
Requires: systemd
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
Requires(postun):/usr/sbin/userdel /usr/sbin/groupdel
Provides: tftp-server
Obsoletes: tftp-server
%description
Multithreaded TFTP server implementing all options (option extension and
multicast) as specified in RFC1350, RFC2090, RFC2347, RFC2348 and RFC2349.
Atftpd also support multicast protocol knowed as mtftp, defined in the PXE
specification. The server supports being started from inetd(8) as well as
a deamon using init scripts.
Provides: tftp
Obsoletes: tftp
%package client
Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP client
Group: Applications/Internet
%description client
Advanced Trivial File Transfer Protocol client program for requesting
files using the TFTP protocol.
%prep
%setup
sed -i "s/-g -Wall -D_REENTRANT/-g -Wall -D_REENTRANT -std=gnu89/" configure.ac
%build
%configure
make
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT
%makeinstall
mkdir -p %{buildroot}/%{_var}/lib/tftpboot
mkdir -p %{buildroot}/lib/systemd/system
cat << EOF >> %{buildroot}/lib/systemd/system/atftpd.service
[Unit]
Description=The tftp server serves files using the trivial file transfer protocol.
[Service]
EnvironmentFile=/etc/sysconfig/atftpd
ExecStart=/usr/sbin/atftpd --user \$ATFTPD_USER --group \$ATFTPD_GROUP \$ATFTPD_DIRECTORY
StandardInput=socket
[Install]
Also=atftpd.socket
EOF
cat << EOF >> %{buildroot}/lib/systemd/system/atftpd.socket
[Unit]
Description=Tftp Server Socket
[Socket]
ListenDatagram=69
[Install]
WantedBy=sockets.target
EOF
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
cat << EOF >> %{buildroot}%{_sysconfdir}/sysconfig/atftpd
ATFTPD_USER=tftp
ATFTPD_GROUP=tftp
ATFTPD_OPTIONS=
ATFTPD_USE_INETD=false
ATFTPD_DIRECTORY=/var/lib/tftpboot
ATFTPD_BIND_ADDRESSES=
EOF
%check
sed -i 's/^start_server$/chown -R nobody $DIRECTORY\nstart_server/g' test/test.sh || true
make %{?_smp_mflags} check
%pre
if [ $1 -eq 1 ] ; then
getent group tftp >/dev/null || groupadd -r tftp
getent passwd tftp >/dev/null || useradd -c "tftp" -s /bin/false -g tftp -M -r tftp
fi
%preun
%systemd_preun atftpd.socket
%post
/sbin/ldconfig
%systemd_post atftpd.socket
%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
if getent passwd tftp >/dev/null; then
userdel tftp
fi
if getent group tftp >/dev/null; then
groupdel tftp
fi
fi
%systemd_postun_with_restart atftpd.socket
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT
%files
%license LICENSE
%dir %attr(0750,nobody,nobody) %{_var}/lib/tftpboot
%{_mandir}/man8/atftpd.8.gz
%{_sbindir}/atftpd
%{_mandir}/man8/in.tftpd.8.gz
%{_sbindir}/in.tftpd
/lib/systemd/system/atftpd.service
/lib/systemd/system/atftpd.socket
%{_sysconfdir}/sysconfig/atftpd
%files client
%{_mandir}/man1/atftp.1.gz
%{_bindir}/atftp
%changelog
* Sat May 09 00:21:18 PST 2020 Nick Samson <nisamson@microsoft.com> - 0.7.2-3
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 0.7.2-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Jun 25 2019 Tapas Kundu <tkundu@vmware.com> 0.7.2-1
- Updated to release 0.7.2
* Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 0.7.1-8
- Remove shadow from requires and use explicit tools for post actions
* Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.1-7
- Fixed logic to restart the active services after upgrade
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.7.1-6
- GA - Bump release of all rpms
* Fri May 6 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.1-5
- Adding post-install run time dependencies
* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.1-4
- Fixing spec file to handle rpm upgrade scenario correctly
* Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com> 0.7.1-3
- Add systemd to Requires and BuildRequires.
- Use systemctl to enable/disable service.
* Mon Nov 23 2015 Xiaolin Li <xiaolinl@vmware.com> 0.7.1-2
- Chang tftpd from xinetd service to systemd service.
* Thu Nov 12 2015 Kumar Kaushik <kaushikk@vmware.com> 0.7.1-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,29 @@
From 46baedf88fe22abafa3f2341b2c1bcb4764ce389 Mon Sep 17 00:00:00 2001
From: Troy Dawson <tdawson@redhat.com>
Date: Fri, 21 Jul 2017 14:05:47 -0700
Subject: [PATCH] attr: escape left brace in a regex in test/run
... to fix test-suite failure with perl-5.26.0
Bug: https://bugzilla.redhat.com/1473853
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
test/run | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/run b/test/run
index 4b1f8d0..07e916c 100755
--- a/test/run
+++ b/test/run
@@ -106,7 +106,7 @@ for (;;) {
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
$line =~ s[%(\w+)][$ENV{$1}]eg;
- $line =~ s[%{(\w+)}][$ENV{$1}]eg;
+ $line =~ s[%\{(\w+)}][$ENV{$1}]eg;
}
if (defined $line) {
if ($line =~ s/^\s*< ?//) {
--
2.13.0

Просмотреть файл

@ -0,0 +1,123 @@
From 14adc898a36948267bfe5c63b399996879e94c98 Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruenba@redhat.com>
Date: Fri, 17 Aug 2018 14:07:31 +0200
Subject: [PATCH] Switch back to syscall()
Switch back to syscall() for the *xattr system calls. The current
mechanism of forwarding those calls to glibc breaks libraries like
libfakeroot (fakeroot) and libasan (the gcc address sanitizer; gcc
-fsanitize=address).
Those libraries provide wrappers for functions defined in other shared
libraries, usually glibc, do their own processing, and forward calls to
the original symbols looke dup via dlsym(RTLD_NEXT, "symbol_name"). In
our case, dlsym returns the libattr_*xattr wrappers. However, when our
wrappers try calling glibc, they end up calling the libfakeroot /
libasan wrappers instead because those override the original symbols =>
recursion.
The libattr_*xattr wrappers will only be used when symbols are looked up
at runtime (dlopen / dlsym). Programs linking against libattr will
directly use the glibc provided symbols. Therefore, the slightly worse
performance of syscall() won't affect any of the "normal" users of
libattr.
---
libattr/syscalls.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/libattr/syscalls.c b/libattr/syscalls.c
index 3013aa0bb687..721ad7f33185 100644
--- a/libattr/syscalls.c
+++ b/libattr/syscalls.c
@@ -22,6 +22,8 @@
#include "config.h"
+#include <unistd.h>
+#include <sys/syscall.h>
#include <sys/xattr.h>
#ifdef HAVE_VISIBILITY_ATTRIBUTE
@@ -31,67 +33,67 @@
int libattr_setxattr(const char *path, const char *name,
void *value, size_t size, int flags)
{
- return setxattr(path, name, value, size, flags);
+ return syscall(__NR_setxattr, path, name, value, size, flags);
}
int libattr_lsetxattr(const char *path, const char *name,
void *value, size_t size, int flags)
{
- return lsetxattr(path, name, value, size, flags);
+ return syscall(__NR_lsetxattr, path, name, value, size, flags);
}
int libattr_fsetxattr(int filedes, const char *name,
void *value, size_t size, int flags)
{
- return fsetxattr(filedes, name, value, size, flags);
+ return syscall(__NR_fsetxattr, filedes, name, value, size, flags);
}
ssize_t libattr_getxattr(const char *path, const char *name,
void *value, size_t size)
{
- return getxattr(path, name, value, size);
+ return syscall(__NR_getxattr, path, name, value, size);
}
ssize_t libattr_lgetxattr(const char *path, const char *name,
void *value, size_t size)
{
- return lgetxattr(path, name, value, size);
+ return syscall(__NR_lgetxattr, path, name, value, size);
}
ssize_t libattr_fgetxattr(int filedes, const char *name,
void *value, size_t size)
{
- return fgetxattr(filedes, name, value, size);
+ return syscall(__NR_fgetxattr, filedes, name, value, size);
}
ssize_t libattr_listxattr(const char *path, char *list, size_t size)
{
- return listxattr(path, list, size);
+ return syscall(__NR_listxattr, path, list, size);
}
ssize_t libattr_llistxattr(const char *path, char *list, size_t size)
{
- return llistxattr(path, list, size);
+ return syscall(__NR_llistxattr, path, list, size);
}
ssize_t libattr_flistxattr(int filedes, char *list, size_t size)
{
- return flistxattr(filedes, list, size);
+ return syscall(__NR_flistxattr, filedes, list, size);
}
int libattr_removexattr(const char *path, const char *name)
{
- return removexattr(path, name);
+ return syscall(__NR_removexattr, path, name);
}
int libattr_lremovexattr(const char *path, const char *name)
{
- return lremovexattr(path, name);
+ return syscall(__NR_lremovexattr, path, name);
}
int libattr_fremovexattr(int filedes, const char *name)
{
- return fremovexattr(filedes, name);
+ return syscall(__NR_fremovexattr, filedes, name);
}
#ifdef HAVE_VISIBILITY_ATTRIBUTE
--
2.19.0.rc0

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"attr-2.4.48.tar.gz": "5ead72b358ec709ed00bbf7a9eaef1654baad937c001c044fe8b74c57f5324e7"
}
}

439
SPECS/attr/attr.spec Normal file
Просмотреть файл

@ -0,0 +1,439 @@
Summary: Utilities for managing filesystem extended attributes
Name: attr
Vendor: Microsoft Corporation
Group: System Environment/Security
Distribution: Mariner
Version: 2.4.48
Release: 6%{?dist}
Source: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{version}.tar.gz
%define sha1 %{name}=d7c88cb5db51c5e255a511b0a15e832fcdda5b4f
# fix test-suite failure with perl-5.26.0 (#1473853)
Patch1: 0001-attr-2.4.48-test-suite-perl.patch
# fix conflict with fakechroot (https://github.com/dex4er/fakechroot/issues/57)
Patch2: 0002-attr-2.4.48-switch-back-to-syscall.patch
License: GPLv2+
URL: https://savannah.nongnu.org/projects/attr
BuildRequires: gettext
BuildRequires: libtool
BuildRequires: flex-devel
Requires: libattr = %{version}-%{release}
%description
A set of tools for manipulating extended attributes on filesystem
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 libattr
Summary: Dynamic library for extended attribute support
License: LGPLv2+
# Hopefully does not conflict with Mariner version
#Conflicts: filesystem < 3
%description -n libattr
This package contains the libattr.so dynamic library which contains
the extended attribute system calls and library functions.
%package -n libattr-devel
Summary: Files needed for building programs with libattr
License: LGPLv2+
Requires: libattr = %{version}-%{release}
# for <sys/xattr.h> which <attr/xattr.h> is symlinked to
Requires: glibc-devel
# provides {,f,l}{get,list,remove,set}xattr.2 man pages
Recommends: man-pages
%description -n libattr-devel
This package contains header files and documentation 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.
Currently only ext2, ext3 and XFS support extended attributes.
The SGI IRIX compatibility API built above the Linux system calls is
used by programs such as xfsdump(8), xfsrestore(8) and xfs_fsr(8).
You should install libattr-devel if you want to develop programs
which make use of extended attributes. If you install libattr-devel,
you'll also want to install attr.
%package devel
Summary: Alias for libattr-devel
License: LGPLv2+
Requires: libattr-devel = %{version}-%{release}
%description devel
Alias for libattr-devel. For more information, see libattr-devel.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
# FIXME: root tests are not ready for SELinux
sed -e 's|test/root/getfattr.test||' \
-i test/Makemodule.am Makefile.in
%build
%configure
make %{?_smp_mflags}
%check
if ./setfattr -n user.name -v value .; then
make check || exit $?
else
echo '*** xattrs are probably not supported by the file system,' \
'the test-suite will NOT run ***'
fi
%install
%make_install
# get rid of libattr.a and libattr.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libattr.{l,}a
# drop already installed documentation, we will use an RPM macro to install it
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}*
# temporarily provide attr/xattr.h symlink until users are migrated (#1601482)
ln -fs ../sys/xattr.h $RPM_BUILD_ROOT%{_includedir}/attr/xattr.h
%find_lang %{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%doc doc/CHANGES
%{!?_licensedir:%global license %%doc}
%license doc/COPYING*
%{_bindir}/attr
%{_bindir}/getfattr
%{_bindir}/setfattr
%{_mandir}/man1/attr.1*
%{_mandir}/man1/getfattr.1*
%{_mandir}/man1/setfattr.1*
%files -n libattr-devel
%{_libdir}/libattr.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/attr
%{_mandir}/man3/attr_*.3.*
%files -n libattr
%{_libdir}/libattr.so.*
%config(noreplace) %{_sysconfdir}/xattr.conf
%files devel
%changelog
* Thu Nov 14 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.4.48-6
- Initial CBL-Mariner import from Fedora 30 (license: MIT).
- Add attr-devel as alias for libattr-devel
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.48-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Aug 31 2018 Filipe Brandenburger <filbranden@gmail.com> 2.4.48-4
- Switch compatibility functions back to syscall() to prevent issue in
interaction with fakechroot (https://github.com/dex4er/fakechroot/issues/57)
* Tue Jul 17 2018 Kamil Dudka <kdudka@redhat.com> 2.4.48-3
- temporarily provide attr/xattr.h symlink until users are migrated (#1601482)
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.48-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jul 03 2018 Kamil Dudka <kdudka@redhat.com> 2.4.48-1
- new upstream release
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.47-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.4.47-22
- Switch to %%ldconfig_scriptlets
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.47-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.47-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 24 2017 Kamil Dudka <kdudka@redhat.com> 2.4.47-19
- fix test-suite failure with perl-5.26.0 (#1473853)
- apply patches automatically to ease maintenance
- update URL of the upstream source tarball
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.47-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Feb 03 2017 Kamil Dudka <kdudka@redhat.com> 2.4.47-17
- update project URL (#1418475)
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.47-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 07 2016 Kamil Dudka <kdudka@redhat.com> 2.4.47-15
- remove outdated tests from test/attr.test
* Mon Sep 14 2015 Kamil Dudka <kdudka@redhat.com> 2.4.47-14
- make libattr-devel not insist on man-pages being installed (#1262605)
* Fri Aug 14 2015 Adam Jackson <ajax@redhat.com> 2.4.47-13
- Remove bizarre 12 year old libtool invocation workaround that prevented
hardened cflags being applied
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.47-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon May 11 2015 Kamil Dudka <kdudka@redhat.com> 2.4.47-11
- do not install the attr.5 man page (#1219987)
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 2.4.47-10
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.47-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jul 11 2014 Tom Callaway <spot@fedoraproject.org> - 2.4.47-8
- mark license files properly
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.47-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Mar 31 2014 Kamil Dudka <kdudka@redhat.com> 2.4.47-6
- do not install {,f,l}{get,list,remove,set}xattr.2 man pages
* Tue Jan 21 2014 Kamil Dudka <kdudka@redhat.com> 2.4.47-5
- refer to ENODATA instead of ENOATTR in man pages (#1055933)
* Tue Nov 19 2013 Kamil Dudka <kdudka@redhat.com> 2.4.47-4
- provide /etc/xattr.conf to exclude copying certain extended attrs (#1031423)
* Fri Aug 09 2013 Kamil Dudka <kdudka@redhat.com> 2.4.47-3
- drop a docdir-related patch to fix a packaging failure (#991997)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.47-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon May 20 2013 Kamil Dudka <kdudka@redhat.com> 2.4.47-1
- new upstream release, drop applied patches
- drop workarounds that are no longer necessary
* Fri May 03 2013 Kamil Dudka <kdudka@redhat.com> 2.4.46-10
- use <sys/syscalls.h> to fix build on aarch64 (#957989)
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.46-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Aug 28 2012 Kamil Dudka <kdudka@redhat.com> 2.4.46-8
- fix specfile issues reported by the fedora-review script
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.46-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed May 02 2012 Kamil Dudka <kdudka@redhat.com> 2.4.46-6
- do not mention static libraries in the summary of libattr-devel (#817953)
* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 2.4.46-5
- add filesystem guard
* Wed Jan 25 2012 Harald Hoyer <harald@redhat.com> 2.4.46-4
- install everything in /usr
https://fedoraproject.org/wiki/Features/UsrMove
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.46-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri May 06 2011 Kamil Dudka <kdudka@redhat.com> 2.4.46-2
- update project URL (#702636)
* Thu Apr 21 2011 Kamil Dudka <kdudka@redhat.com> 2.4.46-1
- new upstream release
* Tue Apr 19 2011 Kamil Dudka <kdudka@redhat.com> 2.4.45-1
- new upstream release
* Tue Mar 29 2011 Kamil Dudka <kdudka@redhat.com> 2.2.44-8
- fix typos in attr(1) man page (#669095)
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.44-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 22 2010 Kamil Dudka <kdudka@redhat.com> 2.2.44-6
- setfattr.1: document supported encodings of values (#587516)
- getfattr: encode NULs properly with --encoding=text (#650539)
- getfattr: return non-zero exit code on failure (#660619)
- walk_tree: do not follow symlink to directory with -h (#660613)
* Tue May 25 2010 Kamil Dudka <kdudka@redhat.com> 2.2.44-5
- let attr depend on the same version of libattr (#595689)
- silence compile-time warnings
* Wed Mar 10 2010 Kamil Dudka <kdudka@redhat.com> 2.2.44-4
- run the test-suite if possible
* Tue Jan 19 2010 Kamil Dudka <kdudka@redhat.com> 2.2.44-3
- do not package a static library (#556038)
- remove multilib patch no longer useful
- enable parallel make
* Thu Jan 07 2010 Kamil Dudka <kdudka@redhat.com> 2.4.44-2
- cleanup in BuildRequires
- updated source URL
- re-downloaded source tarball from upstream (size changed by one)
* Wed Nov 25 2009 Kamil Dudka <kdudka@redhat.com> 2.4.44-1
- new upstream release
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.43-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.43-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Feb 18 2009 Zdenek Prikryl <zprikryl@redhat.com> 2.4.43-2
- Fixed memory leaks (#485473)
* Wed Jul 16 2008 Zdenek Prikryl <zprikryl@redhat.com> 2.4.43-1
- New version 2.4.43
* Mon Jul 14 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.4.41-2
- fix license tags
* Wed Feb 13 2008 Zdenek Prikryl <zprikryl@redhat.com> 2.4.41-1
- New version 2.4.41
- Removed useless attr-2.0.8-docperms.patch
* Wed Oct 31 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.39-1
- New version 2.4.39
- Resolves #284121
* Tue Oct 30 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.38-2
- Removed explicit Requires(post + postun)
- Resolves #225290
* Tue Jul 31 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.38-1
- New version 2.4.38
- Resolves #245415
* Fri Feb 23 2007 Karsten Hopp <karsten@redhat.com> 2.4.32-2
- add disttag
- remove trailing dot from summary
- fix buildroot
- -devel package requires same libattr version
- change prereq to Requires(post)
- escape macro in changelog
- replace absolute link with relative link (libattr.so)
- use %%doc macro
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.4.32-1.1
- rebuild
* Wed Jul 5 2006 Thomas Woerner <twoerne@redhat.com> 2.4.32-1
- new version 2.4.32
- fixes segmentation fault in attr, which affects #189106
* Wed Jun 7 2006 Jeremy Katz <katzj@redhat.com> - 2.4.28-2
- rebuild for -devel deps
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.4.28-1.2
- bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.4.28-1.1
- rebuilt for new gcc4.1 snapshot and glibc changes
* Fri Feb 3 2006 Thomas Woerner <twoerner@redhat.com> 2.4.28-1
- new version 2.4.28
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Tue Dec 6 2005 Thomas Woerner <twoerner@redhat.com> 2.4.24-2
- spec file cleanup
- mark po files as lang specific
* Sun Nov 06 2005 Florian La Roche <laroche@redhat.com>
- 2.4.24
* Wed Sep 28 2005 Than Ngo <than@redhat.com> 2.4.23-1
- update to 2.4.23
* Wed Sep 28 2005 Than Ngo <than@redhat.com> 2.4.16-6
- get rid of *.la files
- remove duplicate doc files
* Wed Feb 9 2005 Stephen C. Tweedie <sct@redhat.com> 2.4.16-4
- Rebuild
* Fri Sep 10 2004 Stephen C. Tweedie <sct@redhat.com> 2.4.16-3
- Build requires libtool >= 1.5
* Thu Aug 19 2004 Phil Knirsch <pknirsch@redhat.com> 2.4.16-2
- Make libattr.so.* executable.
* Thu Aug 19 2004 Phil Knirsch <pknirsch@redhat.com> 2.4.16-1
- Update to latest upstream version.
* Sun Aug 8 2004 Alan Cox <alan@redhat.com> 2.4.1-6
- Fix bug #125304 (Steve Grubb: build requires gettext)
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Wed Mar 31 2004 Stephen C. Tweedie <sct@redhat.com> 2.4.1-4
- Add missing %%defattr
* Tue Mar 30 2004 Stephen C. Tweedie <sct@redhat.com> 2.4.1-3
- Add /usr/include/attr to files manifest
- Fix location of doc files, add main doc dir to files manifest
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Aug 5 2003 Elliot Lee <sopwith@redhat.com> 2.4.1-2
- Fix libtool
* Tue Jun 3 2003 Stephen C. Tweedie <sct@redhat.com> 2.4.1-1
- update to attr-2.4.1
* Tue Jan 28 2003 Michael K. Johnson <johnsonm@redhat.com> 2.2.0-1
- update/rebuild
* Sat Jan 4 2003 Jeff Johnson <jbj@redhat.com> 2.0.8-6
- set execute bits on library so that requires are generated.
* Thu Nov 21 2002 Elliot Lee <sopwith@redhat.com> 2.0.8-5
- Redo multilib patch to work everywhere
* Wed Sep 11 2002 Than Ngo <than@redhat.com> 2.0.8-4
- Added fix to install libs in correct directory on 64bit machine
* Thu Aug 08 2002 Michael K. Johnson <johnsonm@redhat.com> 2.0.8-3
- Made the package only own the one directory that is unique to it:
/usr/include/attr
* Wed Jun 26 2002 Michael K. Johnson <johnsonm@redhat.com> 2.0.8-2
- get perl out of base with attr-2.0.8-docperms.patch
* Mon Jun 24 2002 Michael K. Johnson <johnsonm@redhat.com> 2.0.8-1
- Initial Red Hat package
Made as few changes as possible relative to upstream packaging to
make it easier to maintain long-term. This means that some of
the techniques used here are definitely not standard Red Hat
techniques. If you are looking for an example package to fit
into Red Hat Linux transparently, this would not be the one to
pick.
- attr-devel -> libattr-devel

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"audit-3.0-alpha8.tar.gz": "e0e9189a41a413ed336db1a142a0dc998c8298b965050d06e648f0075761b3a2"
}
}

217
SPECS/audit/audit.spec Normal file
Просмотреть файл

@ -0,0 +1,217 @@
%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Summary: Kernel Audit Tool
Name: audit
Version: 3.0
Release: 4%{?dist}
Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}-alpha8.tar.gz
Patch0: refuse-manual-stop.patch
License: GPLv2+
Group: System Environment/Security
URL: https://people.redhat.com/sgrubb/audit/
Vendor: Microsoft Corporation
Distribution: Mariner
BuildRequires: krb5-devel
BuildRequires: openldap
BuildRequires: golang
BuildRequires: tcp_wrappers-devel
BuildRequires: libcap-ng-devel
BuildRequires: swig
BuildRequires: e2fsprogs-devel
BuildRequires: systemd
Requires: systemd
Requires: krb5
Requires: openldap
Requires: tcp_wrappers
Requires: libcap-ng
Requires: gawk
Requires: audit-libs
%description
The audit package contains the user space utilities for
storing and searching the audit records generate by
the audit subsystem in the Linux 2.6 kernel.
%package libs
Summary: Runtime libs
License: LGPLv2+
Requires: %{name} = %{version}-%{release}
%description libs
Runtime libs
%package devel
Summary: The libraries and header files needed for audit development.
License: LGPLv2+
Requires: %{name} = %{version}-%{release}
%description devel
The libraries and header files needed for audit development.
%package python
Summary: Python bindings for libaudit
License: LGPLv2+
BuildRequires: python2-devel
BuildRequires: python2-libs
Requires: %{name} = %{version}-%{release}
Requires: python2
%description python
The audit-python package contains the python2 bindings for libaudit
and libauparse.
%package -n python3-audit
Summary: Python3 bindings for libaudit
License: LGPLv2+
BuildRequires: python3-devel
BuildRequires: python3-libs
Requires: %{name} = %{version}-%{release}
Requires: python3
%description -n python3-audit
The python3-audit package contains the python2 bindings for libaudit
and libauparse.
%prep
%setup -q
%patch0 -p1
%build
./configure \
--prefix=%{_prefix} \
--exec_prefix=/usr \
--sbindir=%{_sbindir} \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \
--with-python=yes \
--with-python3=yes \
--with-libwrap \
--enable-gssapi-krb5=yes \
--with-libcap-ng=yes \
--with-aarch64 \
--enable-zos-remote \
--with-golang \
--enable-systemd \
--disable-static
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}/{etc/audit/plugins.d,etc/audit/rules.d}
mkdir -p %{buildroot}/%{_var}/opt/audit/log
mkdir -p %{buildroot}/%{_var}/log
mkdir -p %{buildroot}/%{_var}/spool/audit
ln -sfv %{_var}/opt/audit/log %{buildroot}/%{_var}/log/audit
make install DESTDIR=%{buildroot}
install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
echo "disable auditd.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-auditd.preset
%check
make %{?_smp_mflags} check
%post
/sbin/ldconfig
%systemd_post auditd.service
%postun
/sbin/ldconfig
%systemd_postun_with_restart auditd.service
%preun
%systemd_preun auditd.service
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_sbindir}/*
%{_libdir}/systemd/system/auditd.service
%{_libdir}/systemd/system-preset/50-auditd.preset
%{_libexecdir}/*
%{_mandir}/man5/*
%{_mandir}/man7/*
%{_mandir}/man8/*
%dir %{_var}/opt/audit/log
%{_var}/log/audit
%{_var}/spool/audit
%attr(750,root,root) %dir %{_sysconfdir}/audit
%attr(750,root,root) %dir %{_sysconfdir}/audit/rules.d
%attr(750,root,root) %dir %{_sysconfdir}/audit/plugins.d
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/auditd.conf
%ghost %config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/rules.d/audit.rules
%ghost %config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/audit.rules
%ghost %config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/audit-stop.rules
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/plugins.d/af_unix.conf
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/plugins.d/syslog.conf
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/plugins.d/audispd-zos-remote.conf
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/zos-remote.conf
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/audisp-remote.conf
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/audit/plugins.d/au-remote.conf
%config(noreplace) %attr(640,root,root) %{_sysconfdir}/libaudit.conf
%files libs
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/*.la
%{_libdir}/pkgconfig/*.pc
%{_libdir}/golang/*
%{_includedir}/*.h
%{_mandir}/man3/*
/usr/share/aclocal/audit.m4
%files python
%defattr(-,root,root)
%{python2_sitelib}/*
%files -n python3-audit
%defattr(-,root,root)
%{python3_sitelib}/*
%changelog
* Thu May 14 2020 Nicolas Ontiveros <niontive@microsoft.com> 3.0-4
- Set "RefuseManualStop=no" in "auditd.service".
* Sat May 09 00:21:30 PST 2020 Nick Samson <nisamson@microsoft.com> - 3.0-3
- Added %%license line automatically
* Thu Apr 30 2020 Emre Girgin <mrgirgin@microsoft.com> 3.0-2
- Renaming go to golang
* Wed Mar 18 2020 Emre Girgin <mrgirgin@microsoft.com> 3.0-1
- Updated to version 3.0-alpha8. Subpackage licenses updated.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.8.4-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Sep 3 2018 Keerthana K <keerthanak@vmware.com> 2.8.4-1
- Updated to version 2.8.4.
* Thu Dec 28 2017 Divya Thaluru <dthaluru@vmware.com> 2.7.5-4
- Fixed the log file directory structure
* Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com> 2.7.5-3
- Disabled audit service by default
* Thu May 18 2017 Xiaolin Li <xiaolinl@vmware.com> 2.7.5-2
- Move python2 requires to python subpackage and added python3.
* Fri Apr 14 2017 Alexey Makhalov <amakhalov@vmware.com> 2.7.5-1
- Version update.
* Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 2.5-7
- Moved man3 to devel subpackage.
* Thu Nov 24 2016 Alexey Makhalov <amakhalov@vmware.com> 2.5-6
- Required krb5-devel.
* Fri Jul 22 2016 Xiaolin Li <xiaolinl@vmware.com> 2.5-5
- Add gawk requirement.
* Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com> 2.5-4
- Fixed logic to restart the active services after upgrade
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.5-3
- GA - Bump release of all rpms
* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 2.5-2
- Fixing spec file to handle rpm upgrade scenario correctly
* Tue Feb 23 2016 Anish Swaminathan <anishs@vmware.com> 2.5-1
- Upgrade to 2.5
* Fri Jan 29 2016 Anish Swaminathan <anishs@vmware.com> 2.4.4-4
- Add directories for auditd service.
* Tue Jan 12 2016 Anish Swaminathan <anishs@vmware.com> 2.4.4-3
- Change config file attributes.
* Wed Dec 09 2015 Anish Swaminathan <anishs@vmware.com> 2.4.4-2
- Add systemd requirement.
* Fri Aug 28 2015 Divya Thaluru <dthaluru@vmware.com> 2.4.4-1
- Initial version

Просмотреть файл

@ -0,0 +1,13 @@
Set "RefuseManualStop=no" in "auditd.service"
See this discussion on "RefuseManualStop": https://systemd-devel.freedesktop.narkive.com/9RzEJTWh/auditd-service-and-refusemanualstop
--- a/init.d/auditd.service
+++ b/init.d/auditd.service
@@ -11,7 +11,7 @@
Before=sysinit.target shutdown.target
##Before=shutdown.target
Conflicts=shutdown.target
-RefuseManualStop=yes
+RefuseManualStop=no
ConditionKernelCommandLine=!audit=0
Documentation=man:auditd(8) https://github.com/linux-audit/audit-documentation

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"autoconf-archive-2018.03.13.tar.xz": "6175f90d9fa64c4d939bdbb3e8511ae0ee2134863a2c7bf8d9733819efa6e159"
}
}

Просмотреть файл

@ -0,0 +1,40 @@
%define debug_package %{nil}
Summary: Autoconf macro archive
Name: autoconf-archive
Version: 2018.03.13
Release: 2%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/autoconf-archive
Group: System Environment/Base
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
%define sha1 autoconf-archive=6177513edcf3998e07684cf65fbb7470acc72997
BuildArch: noarch
Requires: autoconf
%description
The package contains programs for producing shell scripts that can
automatically configure source code.
%prep
%setup -q
%build
%configure
make
%install
make install DESTDIR=%{buildroot} INSTALL="install -p"
rm -rf %{buildroot}%{_infodir}
rm -frv %{buildroot}%{_datadir}/%{name}
%files
%doc AUTHORS NEWS README TODO
%license COPYING*
%{_datadir}/aclocal/*.m4
%changelog
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2018.03.13-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Sep 10 2018 Anish Swaminathan <anishs@vmware.com> 2018.03.13-1
- Initial build

Просмотреть файл

@ -0,0 +1,12 @@
diff -rupr a/bin/autoscan.in b/bin/autoscan.in
--- a/bin/autoscan.in 2012-04-24 19:37:26.000000000 -0700
+++ b/bin/autoscan.in 2016-12-06 14:06:44.485368904 -0800
@@ -358,7 +358,7 @@ sub scan_sh_file ($)
{
# Strip out comments and variable references.
s/#.*//;
- s/\${[^\}]*}//g;
+ s/\$\{[^\}]*}//g;
s/@[^@]*@//g;
# Tokens in the code.

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"autoconf-2.69.tar.xz": "64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684"
}
}

Просмотреть файл

@ -0,0 +1,61 @@
Summary: The package automatically configure source code
Name: autoconf
Version: 2.69
Release: 9%{?dist}
License: GPLv2
URL: http://www.gnu.org/software/autoconf
Group: System Environment/Base
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://ftp.gnu.org/gnu/autoconf/%{name}-%{version}.tar.xz
%define sha1 autoconf=e891c3193029775e83e0534ac0ee0c4c711f6d23
Patch0: autoconf-make-check.patch
Requires: perl
BuildRequires: m4
Requires: m4
BuildArch: noarch
%description
The package contains programs for producing shell scripts that can
automatically configure source code.
%prep
%setup -q
%patch0 -p1
%build
%configure \
--disable-silent-rules
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
rm -rf %{buildroot}%{_infodir}
%check
make -k check %{?_smp_mflags} TESTSUITEFLAGS="1-500"
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_mandir}/*/*
%{_datarootdir}/autoconf/*
%changelog
* Sat May 09 00:21:00 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.69-9
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.69-8
- Initial CBL-Mariner import from Photon (license: Apache2).
* Wed Oct 17 2018 Dweep Advani <dadvani@vmware.com> 2.69-7
- Build section is changed to used %configure
* Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.69-6
- Fix arch
* Tue Dec 6 2016 Dheeraj Shetty <dheerajs@vmware.com> 2.69-5
- Fixed Bug 1718089 make check failure
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.69-4
- GA - Bump release of all rpms
* Fri Jun 5 2015 Divya Thaluru <dthaluru@vmware.com> 2.69-3
- Adding m4 package to build and run time required package
* Wed Jun 3 2015 Divya Thaluru <dthaluru@vmware.com> 2.69-2
- Adding perl packages to required packages
* Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 2.69-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,12 @@
diff -u autoconf-2.13/Makefile.in~ autoconf-2.13/Makefile.in
--- autoconf-2.13/Makefile.in~ Wed May 15 15:36:06 2002
+++ autoconf-2.13/Makefile.in Wed May 15 15:36:06 2002
@@ -49,7 +49,7 @@
# Directory in which to install library files.
datadir = @datadir@
-acdatadir = $(datadir)/autoconf
+acdatadir = $(datadir)/autoconf-2.13
# Directory in which to install documentation info files.
infodir = @infodir@

Просмотреть файл

@ -0,0 +1,46 @@
--- autoconf-2.13/Makefile.in.rh1 2007-02-14 16:22:52.000000000 +0100
+++ autoconf-2.13/Makefile.in 2007-02-14 16:23:26.000000000 +0100
@@ -137,23 +137,23 @@
cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
installdirs:
- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
+ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
install: all $(M4FILES) acconfig.h installdirs install-info
for p in $(ASCRIPTS); do \
- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
done
for i in $(M4FROZEN); do \
- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
done
for i in $(M4FILES) acconfig.h; do \
- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
done
-if test -f autoscan; then \
- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
+ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
for i in acfunctions acheaders acidentifiers acprograms \
acmakevars; do \
- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
done; \
else :; fi
@@ -161,11 +161,11 @@
install-info: info installdirs
if test -f autoconf.info; then \
for i in *.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
done; \
else \
for i in $(srcdir)/*.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
done; \
fi

Просмотреть файл

@ -0,0 +1,79 @@
--- autoconf-2.13/autoconf.texi.version 2007-02-15 11:33:42.000000000 +0100
+++ autoconf-2.13/autoconf.texi 2007-02-15 11:33:42.000000000 +0100
@@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
-@setfilename autoconf.info
-@settitle Autoconf
+@setfilename autoconf213.info
+@settitle Autoconf-2.13
@c For double-sided printing, uncomment:
@c @setchapternewpage odd
@c %**end of header
@@ -17,7 +17,8 @@
@ifinfo
@format
START-INFO-DIR-ENTRY
-* Autoconf: (autoconf). Create source code configuration scripts.
+* Autoconf213: (autoconf213). Create source code configuration scripts.
+ This is a legacy version of autoconf.
END-INFO-DIR-ENTRY
@end format
--- autoconf-2.13/Makefile.in.version 2007-02-15 11:33:42.000000000 +0100
+++ autoconf-2.13/Makefile.in 2007-02-15 11:37:18.000000000 +0100
@@ -68,8 +68,8 @@
DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
Makefile.in NEWS README TODO $(M4FILES) \
acconfig.h acfunctions acheaders acidentifiers \
- acmakevars acprograms autoconf.info* \
- autoconf.sh autoconf.texi install.texi \
+ acmakevars acprograms autoconf213.info* \
+ autoconf.sh autoconf213.texi install.texi \
autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
config.guess config.sub configure configure.in \
install-sh mkinstalldirs texinfo.tex \
@@ -106,11 +106,11 @@
autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
-info: autoconf.info @standards_info@ INSTALL
+info: autoconf213.info @standards_info@ INSTALL
# Use --no-split to avoid creating filenames > 14 chars.
-autoconf.info: autoconf.texi install.texi
- $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
+autoconf213.info: autoconf213.texi install.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf213.texi --no-split --output=$@
INSTALL: install.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
@@ -121,8 +121,8 @@
dvi: autoconf.dvi @standards_dvi@
-autoconf.dvi: autoconf.texi
- $(TEXI2DVI) $(srcdir)/autoconf.texi
+autoconf.dvi: autoconf213.texi
+ $(TEXI2DVI) $(srcdir)/autoconf213.texi
standards.dvi: standards.texi make-stds.texi
$(TEXI2DVI) $(srcdir)/standards.texi
@@ -159,7 +159,7 @@
# Don't cd, to avoid breaking install-sh references.
install-info: info installdirs
- if test -f autoconf.info; then \
+ if test -f autoconf213.info; then \
for i in *.info*; do \
$(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
done; \
@@ -174,7 +174,7 @@
rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
done
rm -fr $(acdatadir)
- cd $(infodir) && rm -f autoconf.info*
+ cd $(infodir) && rm -f autoconf213.info*
if test -f standards.info || test -f $(srcdir)/standards.info; \
then cd $(infodir) && rm -f standards.info*; fi

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"autoconf-2.13.tar.gz": "f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e"
}
}

Просмотреть файл

@ -0,0 +1,258 @@
Summary: A GNU tool for automatically configuring source code
Name: autoconf213
Version: 2.13
Release: 46%{?dist}
License: GPLv2+
URL: http://www.gnu.org/software/autoconf/
Source: ftp://prep.ai.mit.edu/pub/gnu/autoconf/autoconf-%{version}.tar.gz
Patch0: autoconf-2.13-versioning.patch
Patch1: autoconf213-destdir.patch
Patch2: autoconf213-info.patch
Vendor: Microsoft Corporation
Distribution: Mariner
Requires: gawk, m4 >= 1.1, coreutils
BuildRequires: texinfo, m4 >= 1.1, perl, gawk, dejagnu, flex
BuildArch: noarch
%description
GNU's Autoconf is a tool for configuring source code and Makefiles.
Using Autoconf, programmers can create portable and configurable
packages, since the person building the package is allowed to specify
various configuration options.
You should install Autoconf if you are developing software and you
would like to use it to create shell scripts that will configure your
source code packages. If you are installing Autoconf, you will also
need to install the GNU m4 package.
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.
%prep
%setup -q -n autoconf-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
mv autoconf.texi autoconf213.texi
rm -f autoconf.info
%build
%configure --program-suffix=-%{version}
make
%install
rm -rf ${RPM_BUILD_ROOT}
make install DESTDIR=$RPM_BUILD_ROOT
rm ${RPM_BUILD_ROOT}/%{_bindir}/autoscan-%{version}
# We don't want to include the standards.info stuff in the package,
# because it comes from binutils...
rm -f ${RPM_BUILD_ROOT}%{_infodir}/standards*
%check
make check
%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
%preun
if [ "$1" = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%license COPYING
%{_bindir}/*
%{_infodir}/*.info*
%{_datadir}/autoconf-%{version}/
%changelog
* Sat May 09 00:21:40 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.13-46
- Added %%license line automatically
* Wed Apr 15 2020 Nicolas Ontiveros <niontive@microsoft.com> 2.13-45
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
- License verified.
- Remove unused patches.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Feb 21 2019 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.13-42
- Ensure %{_infodir}/standards* is not installed in install, or conflict with binutils'
version.
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.13-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Feb 20 2015 Pavel Raiskup <praiskup@redhat.com> - 2.13-34
- don't ship broken (and ancient) autoscan (rhbz#1194568)
- drop explicit 'Requires: perl' (related rhbz#1194568)
* Mon Jul 28 2014 Pavel Raiskup <praiskup@redhat.com> - 2.13-32
- don't build-require compat-gcc-34-g77 at all
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Oct 18 2013 Pavel Raiskup <praiskup@redhat.com> - 2.13-30
- disable g77 tests for RHEL7 builds
* Wed Oct 09 2013 Pavel Raiskup <praiskup@redhat.com> - 2.13-29
- enable testsuite for obsolescent autoconf213
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 2.13-27
- Perl 5.18 rebuild
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Oct 29 2012 Pavel Raiskup <praiskup@redhat.com> - 2.13-25
- remove unnecessary BR, remove trailing whitespaces
* Fri Oct 12 2012 Pavel Raiskup <praiskup@redhat.com> - 2.13-24
- update license tag in specfile
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Aug 08 2007 Karsten Hopp <karsten@redhat.com> 2.13-18
- update license tag
* Mon Feb 26 2007 Karsten Hopp <karsten@redhat.com> 2.13-17
- our tarball hat different size and timestamps then the upstream
tarball. No changes, though.
- rebuild with upstream sources
* Thu Feb 15 2007 Karsten Hopp <karsten@redhat.com> 2.13-16
- delete old autoconf.info file
* Thu Feb 15 2007 Karsten Hopp <karsten@redhat.com> 2.13-15
- add autoconf213 info entry
- add disttag
* Wed Feb 14 2007 Karsten Hopp <karsten@redhat.com> 2.13-14
- buildrequire perl for autoscan script
* Wed Feb 14 2007 Karsten Hopp <karsten@redhat.com> 2.13-13
- buildroot fixed
- removed textutils requirement
- dot removed from summary
- requires gawk, but not perl
- use install-info
- use BuildArch
- replace tabs with spaces
- fix defattr
- use 'make install DESTDIR=...'
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.13-12.1
- rebuild
* Mon Feb 27 2006 Karsten Hopp <karsten@redhat.de> 2.13-12
- require m4 >= 1.1
* Mon Feb 27 2006 Karsten Hopp <karsten@redhat.de> 2.13-11
- BuildRequire m4 (#181959)
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Mon Feb 21 2005 Karsten Hopp <karsten@redhat.de> 2.13-10
- Copyright -> License
* Thu Sep 23 2004 Daniel Reed <djr@redhat.com> - 2.13-9
- rebuilt for dist-fc3
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Dec 9 2003 Jens Petersen <petersen@redhat.com> - 2.13-7
- buildrequire texinfo (#111169) [mvd@mylinux.com.ua]
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
* Thu Dec 12 2002 Elliot Lee <sopwith@redhat.com> 2.13-5
- Fix unpackaged file
* Fri Jun 28 2002 Jens Petersen <petersen@redhat.com> 2.13-4
- update url (#66840)
- added doc files
* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 2.13-3
- automated rebuild
* Thu May 23 2002 Tim Powers <timp@redhat.com> 2.13-2
- automated rebuild
* Wed May 15 2002 Jens Petersen <petersen@redhat.com> 2.13-1
- new package based on autoconf-2.13-17
- don't make unversioned bindir symlinks
- version datadir
- version info filename, but don't install-info it
- update AC_OUTPUT_MAKE_DEFS to fix problem with c++exit patch (#62361)
* Wed Mar 27 2002 Jens Petersen <petersen@redhat.com> 2.13-17
- add URL
* Wed Feb 27 2002 Jens Petersen <petersen@redhat.com> 2.13-16
- add version suffix to bindir files and symlink them to their
unversioned names
* Mon Feb 25 2002 Elliot Lee <sopwith@redhat.com> 2.13-15
- Add wait3test.patch to make sure that the child process actually does
something that the kernel will take note of. Fixes the failing wait3 test
that was worked around in time-1.7-15.
* Mon Aug 6 2001 Tim Powers <timp@redhat.com>
- rebuilt to fix bug #50761
* Thu Jul 26 2001 Than Ngo <than@redhat.com>
- add patch to fix exit status
* Tue Jul 10 2001 Jens Petersen <petersen@redhat.com>
- add patch to include various standard C headers as needed
by various autoconf tests (#19114)
- add patch to autoscan.pl to get a better choice of init
file (#42071), to test for CPP after CC (#42072) and to
detect C++ source and g++ (#42073).
* Tue Jun 26 2001 Jens Petersen <petersen@redhat.com>
- Add a back-port of _AC_PROG_CXX_EXIT_DECLARATION
from version 2.50 to make detection of C++ exit()
declaration prototype platform independent. The check is
done in AC_PROG_CXX with the result stored in "confdefs.h".
The exit() prototype in AC_TRY_RUN_NATIVE is no longer needed.
(fixes #18829)
* Wed Nov 29 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- Fix up interoperability with glibc 2.2 and gcc 2.96:
AC_TRY_RUN_NATIVE in C++ mode added a prototype for exit() to
the test code without throwing an exception, causing a conflict
with stdlib.h --> AC_TRY_RUN_NATIVE for C++ code including stdlib.h
always failed, returning wrong results
* Fri Jul 21 2000 Nalin Dahyabhai <nalin@redhat.com>
- add textutils as a dependency (#14439)
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
* Mon Jun 5 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.
* Sun Mar 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- fix preun
* Fri Mar 26 1999 Cristian Gafton <gafton@redhat.com>
- add patch to help autoconf clean after itself and not leave /tmp clobbered
with acin.* and acout.* files (can you say annoying?)
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 4)
- use gawk, not mawk
* Thu Mar 18 1999 Preston Brown <pbrown@redhat.com>
- moved /usr/lib/autoconf to /usr/share/autoconf (with automake)
* Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
- Injected new description and group.
* Tue Jan 12 1999 Jeff Johnson <jbj@redhat.com>
- update to 2.13.
* Fri Dec 18 1998 Cristian Gafton <gafton@redhat.com>
- build against glibc 2.1
* Mon Oct 05 1998 Cristian Gafton <gafton@redhat.com>
- requires perl
* Thu Aug 27 1998 Cristian Gafton <gafton@redhat.com>
- patch for fixing /tmp race conditions
* Sun Oct 19 1997 Erik Troan <ewt@redhat.com>
- spec file cleanups
- made a noarch package
- uses autoconf
- uses install-info
* Thu Jul 17 1997 Erik Troan <ewt@redhat.com>
- built with glibc

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"autofs-5.1.4.tar.xz": "8fce30ee51ffd528fe1a4e8374ef57f43367e1f123030e175fb1b1cf15bc1722"
}
}

85
SPECS/autofs/autofs.spec Normal file
Просмотреть файл

@ -0,0 +1,85 @@
%global debug_package %{nil}
Summary: A kernel-based automounter for Linux
Name: autofs
Version: 5.1.4
Release: 6%{?dist}
License: GPLv2+
URL: http://www.kernel.org/pub/linux/daemons/autofs
Group: System Environment/Daemons
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://www.kernel.org/pub/linux/daemons/%{name}/v5/%{name}-%{version}.tar.xz
%define sha1 autofs=c26f2e5e24814adb0572f2c01066215d11ee0782
BuildRequires: systemd
BuildRequires: rpcsvc-proto-devel
BuildRequires: libtirpc-devel
Requires: systemd
Requires: libtirpc
%description
Automounting is the process of automatically mounting and unmounting of file systems by a daemon. Autofs includes both a user-space daemon and code in the kernel that assists the daemon.
%prep
%setup -q
%build
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-libtirpc
make %{?_smp_mflags}
%install
mkdir -p -m755 %{buildroot}/lib/systemd/system
mkdir -p -m755 %{buildroot}/etc/auto.master.d
make install mandir=%{_mandir} INSTALLROOT=%{buildroot}
make -C redhat
install -m 644 redhat/autofs.service %{buildroot}/lib/systemd/system/autofs.service
rm -rf %{buildroot}/etc/rc.d
#%check
#This package does not come with a test suite.
%post
%systemd_post autofs.service
%postun
%systemd_postun_with_restart autofs.service
%preun
%systemd_preun autofs.service
%clean
rm -rf %{buildroot}/*
%files
%defattr(-,root,root)
%license COPYING
%config(noreplace) %{_sysconfdir}/auto.master
%config(noreplace) %{_sysconfdir}/auto.misc
%config(noreplace) %{_sysconfdir}/auto.net
%config(noreplace) %{_sysconfdir}/auto.smb
%config(noreplace) %{_sysconfdir}/autofs.conf
%config(noreplace) %{_sysconfdir}/sysconfig/autofs
%config(noreplace) %{_sysconfdir}/autofs_ldap_auth.conf
%{_sbindir}/automount
%{_libdir}/autofs/*
%dir %{_sysconfdir}/auto.master.d
%{_mandir}/man5/*
%{_mandir}/man8/*
/lib/systemd/system/autofs.service
%changelog
* Wed May 13 2020 Nick Samson <nisamson@microsoft.com> - 5.1.4-6
- Added %%license line automatically
* Tue May 12 2020 Nicolas Guibourge <nicolasg@microsoft.com> 5.1.4-5
- Undo specific changes for Docker build.
* Thu Apr 30 2020 Andrew Phelps <anphel@microsoft.com> 5.1.4-4
- Modify to build in Docker based environment.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 5.1.4-3
- Initial CBL-Mariner import from Photon (license: Apache2).
* Fri Sep 21 2018 Alexey Makhalov <amakhalov@vmware.com> 5.1.4-2
- Use rpcsvc-proto and libtirpc
* Thu Sep 06 2018 Anish Swaminathan <anishs@vmware.com> 5.1.4-1
- Update version to 5.1.4
* Thu Jul 06 2017 Xiaolin Li <xiaolinl@vmware.com> 5.1.3-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"autogen-5.18.16.tar.xz": "f8a13466b48faa3ba99fe17a069e71c9ab006d9b1cfabe699f8c60a47d5bb49a"
}
}

106
SPECS/autogen/autogen.spec Normal file
Просмотреть файл

@ -0,0 +1,106 @@
Summary: The Automated Text and Program Generation Tool
Name: autogen
Version: 5.18.16
Release: 5%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/autogen/
Source0: ftp://ftp.gnu.org/gnu/autogen/rel%{version}/%{name}-%{version}.tar.xz
Group: System Environment/Tools
Vendor: Microsoft Corporation
BuildRequires: guile-devel
BuildRequires: gc-devel
BuildRequires: which
Requires: guile
Requires: gc
Requires: gmp
Requires: %{name}-libopts
Distribution: Mariner
%description
AutoGen is a tool designed to simplify the creation and maintenance of programs that contain large amounts of repetitious text. It is especially valuable in programs that have several blocks of text that must be kept synchronized.
%package libopts
Summary: Automated option processing library.
License: LGPLv3+
Group: System Environment/Libraries
%description libopts
Libopts is very powerful command line option parser.
%package libopts-devel
Summary: Development files for libopts
License: LGPLv3+
Group: Development/Libraries
Requires: %{name}
Requires: %{name}-libopts
%description libopts-devel
This package contains development files for libopts.
%prep
%setup -q
%build
%configure --disable-dependency-tracking
make %{?_smp_mflags} CFLAGS="%{build_cflags} -Wno-error=format-overflow="
%install
make DESTDIR=%{buildroot} install
%check
make %{?_smp_mflags} check
%post libopts -p /sbin/ldconfig
%postun libopts -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%exclude %{_bindir}/autoopts-config
%{_libdir}/autogen/*.tlib
%{_datadir}/autogen/*
%{_mandir}/man1/*
%exclude %{_mandir}/man1/autoopts-config.1.gz
%files libopts
%{_libdir}/*.so.*
%files libopts-devel
%defattr(-,root,root)
%{_includedir}/autoopts/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_bindir}/autoopts-config
%{_datadir}/aclocal/*
%{_mandir}/man1/autoopts-config.1.gz
%{_mandir}/man3/*
%{_libdir}/*.a
%{_libdir}/*.la
%exclude /usr/share/info/
%changelog
* Sat May 09 00:20:48 PST 2020 Nick Samson <nisamson@microsoft.com> - 5.18.16-5
- Added %%license line automatically
* Thu Feb 27 2020 Henry Beberman <hebeberm@microsoft.com> 5.18.16-4
- Add compiler flags for GCC9 compatibility. License verified.
* Thu Feb 27 2020 Henry Beberman <hebeberm@microsoft.com> 5.18.16-3
- Exclude /usr/share/info from the RPM
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 5.18.16-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Wed Sep 12 2018 Anish Swaminathan <anishs@vmware.com> 5.18.16-1
- Upgrade to 5.18.16
* Mon May 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 5.18.12-2
- Adding Make Check
* Tue Apr 18 2017 Dheeraj Shetty <dheerajs@vmware.com> 5.18.12-1
- Updated version to 5.18.12
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 5.18.7-2
- GA - Bump release of all rpms
* Wed Feb 24 2016 Kumar Kaushik <kaushikk@vmware.com> 5.18.7-1
- Updated version tp 5.16.7.
* Thu Jan 21 2016 Xiaolin Li <xiaolinl@vmware.com> 5.18.6-1
- Updated to version 5.18.6
* Tue Sep 29 2015 Xiaolin Li <xiaolinl@vmware.com> 5.18.5-2
- Create a seperate libopts package.
* Thu Jun 18 2015 Divya Thaluru <dthaluru@vmware.com> 5.18.5-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"automake-1.16.1.tar.xz": "5d05bb38a23fd3312b10aea93840feec685bdf4a41146e78882848165d3ae921"
}
}

Просмотреть файл

@ -0,0 +1,66 @@
Summary: Programs for generating Makefiles
Name: automake
Version: 1.16.1
Release: 3%{?dist}
License: GPLv2+
URL: http://www.gnu.org/software/automake/
Group: System Environment/Base
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://ftp.gnu.org/gnu/automake/%{name}-%{version}.tar.xz
%define sha1 automake=1012bc79956013d53da0890f8493388a6cb20831
BuildRequires: autoconf
BuildArch: noarch
%description
Contains programs for generating Makefiles for use with Autoconf.
%prep
%setup -q
%build
sed -i 's:/\\\${:/\\\$\\{:' bin/automake.in
./configure \
--prefix=%{_prefix} \
--docdir=%{_defaultdocdir}/%{name}-%{version} \
--disable-silent-rules
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
rm -rf %{buildroot}%{_infodir}
%check
sed -i "s:./configure:LEXLIB=/usr/lib/libfl.a &:" t/lex-{clean,depend}-cxx.sh
sed -i "s|test ! -s stderr||g" t/distcheck-no-prefix-or-srcdir-override.sh
make %{?_smp_mflags} check
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_datarootdir}/aclocal/README
%{_datarootdir}/%{name}-1.16/*
%{_datarootdir}/aclocal-1.16/*
%{_defaultdocdir}/%{name}-%{version}/*
%{_mandir}/*/*
%changelog
* Sat May 09 00:21:00 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.16.1-3
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.16.1-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Thu Sep 06 2018 Anish Swaminathan <anishs@vmware.com> 1.16.1-1
- Update version to 1.16.1
* Tue Jan 02 2018 Alexey Makhalov <amakhalov@vmware.com> 1.15.1-1
- Version update
* Fri Aug 04 2017 Danut Moraru <dmoraru@vmware.com> 1.15-4
- Disable check that fails test case
* Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.15-3
- Fix arch
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.15-2
- GA - Bump release of all rpms
* Thu Jul 23 2015 Divya Thaluru <dthaluru@vmware.com> 1.15-1
- Updated to version 1.15
* Wed Jun 3 2015 Divya Thaluru <dthaluru@vmware.com> 1.14.1-2
- Adding autoconf package to build time requires packages
* Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 1.14.1-1
- Initial build. First version

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"azure-iot-sdk-c-2020.02.04.1.tar.bz2": "2f8c5d12587d44cde2e0b5c740b9a3cb1eae2d9e35de6de3383d453c1e4a63d7"
}
}

Просмотреть файл

@ -0,0 +1,107 @@
Summary: Azure IoT C SDKs and Libraries
Name: azure-iot-sdk-c
# azure-iot-sdk-c uses three different versioning schemes.
# On vcpkg, they use a date based versioning scheme, like yyyy-mm-dd.v, which corresponds to the LTS-mm_yyyy_Refv tag.
# We use yyyy.mm.dd.v since hyphens are prohibits in spec versions.
# For apt-get packages they fix the version number to 0.2.0 and increase the release number with each release.
# Since we want to control the release number as thr distribution, this scheme is not applicable for us.
# They also used to use a regular versioning scheme like 1.3.7 but they did not tag their latest LTS with a version like that.
Version: 2020.02.04.1
Release: 6%{?dist}
# Source0: https://github.com/Azure/%{name}/archive/LTS_02_2020_Ref01.tar.gz
# The below tarball includes all submodules.
# This tarball is created using the following command:
# git clone --recursive --single-branch --branch LTS_02_2020_Ref01 --depth 1 https://github.com/Azure/azure-iot-sdk-c.git
# tar cjvf azure-iot-sdk-c-2020.02.04.1.tar.bz2 azure-iot-sdk-c/
Source0: %{name}-%{version}.tar.bz2
License: MIT
Group: Applications/File
URL: https://github.com/Azure/azure-iot-sdk-c
Vendor: Microsoft Corporation
Distribution: Mariner
BuildRequires: cmake
BuildRequires: build-essential
BuildRequires: curl-devel
BuildRequires: openssl-devel
BuildRequires: util-linux-devel
Requires: util-linux
Requires: curl
Requires: openssl
%description
The Microsoft Azure IoT device libraries for C contain code that facilitates
building devices and applications that connect to and are managed by Azure IoT Hub services.
The device library consists of a set of reusable components with abstract
interfaces that enable pluggability between stock and custom modules.
To meet the wide range of device requirements in the Internet of Things space,
the C libraries are provided in source code form to support multiple form factors,
operating systems, tools sets, protocols and communications patterns widely in use today.
%global debug_package %{nil}
%prep
%setup -qn %{name}
%build
mkdir cmake
cd cmake
# Squelch warnings from being errors
export CFLAGS=" %{build_cflags} \
-Wno-error=unused-variable \
-Wno-error=missing-braces \
-Wno-error=unused-but-set-variable \
-Wno-error=strict-aliasing \
-Wno-error=unknown-pragmas \
-Wno-error=enum-compare \
-Wno-error=unused-function \
-Wno-error=maybe-uninitialized"
cmake \
-Duse_prov_client:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} ..
make %{?_smp_mflags}
%install
cd cmake
make DESTDIR=%{buildroot} install
install -d -m755 %{buildroot}%{_bindir}
install -p -m 755 provisioning_client/tools/tpm_device_provision/tpm_device_provision %{buildroot}%{_bindir}/tpm_device_provision
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root, -)
%license LICENSE
%dir %{_includedir}/azureiot
%{_includedir}/azureiot/*
%dir %{_includedir}/iothub_service_client
%{_includedir}/iothub_service_client/*
%dir %{_includedir}/umock_c
%{_includedir}/umock_c/*
%dir %{_includedir}/azure_macro_utils
%{_includedir}/azure_macro_utils/*
%dir %{_includedir}/azure_prov_client
%{_includedir}/azure_prov_client/*
%{_bindir}/tpm_device_provision
%{_lib64dir}/*
/usr/cmake/*
%changelog
* Mon Jun 22 2020 Saravanan Somasundaram <sarsoma@microsoft.com> 2020.02.04.1-6
- Removing the Conflict reference to azure-iot-sdk-c-public-preview.
* Sun May 31 2020 Henry Beberman <henry.beberman@microsoft.com> 2020.02.04.1-5
- Add -Wno-error to cflags to fix compilation with updated -Werror default.
* Sat May 09 00:20:46 PST 2020 Nick Samson <nisamson@microsoft.com> - 2020.02.04.1-4
- Added %%license line automatically
* Mon May 04 2020 Eric Li <eli@microsoft.com> 2020.02.04.1-3
- Add #Source0: and license verified.
* Wed Apr 29 2020 Emre Girgin <mrgirgin@microsoft.com> 2020.02.04.1-2
- Build the provisioning client, add tpm_device_provision to the package.
* Mon Apr 27 2020 Emre Girgin <mrgirgin@microsoft.com> 2020.02.04.1-1
- Original version for CBL-Mariner.

Просмотреть файл

@ -0,0 +1,19 @@
This patch changes the default socket location in the iotedge management
application to be in /var/lib/, the canonical location for non-debian Linux.
This saves the user from having to specify --host unix:\\<path-to>.socket every
time they use the iotedge management app.
diff --git a/iotedge/src/main.rs b/iotedge/src/main.rs
index b82f57d6..1f2f72a9 100644
--- a/iotedge/src/main.rs
+++ b/iotedge/src/main.rs
@@ -67,7 +67,7 @@ fn run() -> Result<(), Error> {
)
} else {
(
- Cow::Borrowed("unix:///var/run/iotedge/mgmt.sock"),
+ Cow::Borrowed("unix:///var/lib/iotedge/mgmt.sock"),
Cow::Borrowed(Path::new("/etc/iotedge/config.yaml")),
Cow::Borrowed(Path::new("/etc/docker/daemon.json")),
)

Просмотреть файл

@ -0,0 +1,6 @@
{
"Signatures": {
"azure-iotedge-1.0.9.1-cargo.tar.gz": "4df95d363248755839f78d9e1878466f92f03e87580ebd4d4a6289cfb31fbfc0",
"azure-iotedge-1.0.9.1.tar.gz": "ce3b9405e0df2bd2f03bee3f294dcdae39897975d51d3a982c0f013be5196974"
}
}

Просмотреть файл

@ -0,0 +1,190 @@
Summary: Azure IoT Edge Security Daemon
Name: azure-iotedge
Version: 1.0.9.1
Release: 2%{?dist}
# A buildable azure-iotedge environments needs functioning submodules that do not work from the archive download
# To recreate the tar.gz run the following
# sudo git clone https://github.com/Azure/iotedge.git -b %{version}
# pushd iotedge
# sudo git submodule update --init --recursive
# popd
# sudo mv iotedge azure-iotedge-%{version}
# sudo tar -cvf azure-iotedge-%{version}.tar.gz azure-iotedge-%{version}/
#Source0: https://github.com/Azure/iotedge/archive/%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-%{version}-cargo.tar.gz
License: MIT
Group: Applications/File
URL: https://github.com/azure/iotedge
Vendor: Microsoft Corporation
Distribution: Mariner
BuildRequires: rust >= 1.39.0
BuildRequires: cmake
BuildRequires: curl
BuildRequires: git
BuildRequires: shadow-utils
BuildRequires: systemd
Requires: libiothsm-std
Requires: openssl
Requires: moby-engine
Requires: moby-cli
Patch0: 0001-set-mgmt-socket-to-var-lib.patch
%description
Azure IoT Edge Security Daemon
Azure IoT Edge is a fully managed service that delivers cloud intelligence
locally by deploying and running artificial intelligence (AI), Azure services,
and custom logic directly on cross-platform IoT devices. Run your IoT solution
securely and at scale whether in the cloud or offline.
This package contains the IoT Edge daemon and CLI tool
%define iotedge_user iotedge
%define iotedge_group %{iotedge_user}
%define iotedge_home %{_localstatedir}/lib/iotedge
%define iotedge_logdir %{_localstatedir}/log/iotedge
%define iotedge_confdir %{_sysconfdir}/iotedge
%define iotedge_datadir %{_datadir}/iotedge
%global debug_package %{nil}
%prep
# Setup .cargo directory
mkdir -p $HOME
pushd $HOME
tar xf %{SOURCE1} --no-same-owner
popd
%setup -q -n %{_topdir}/BUILD/azure-iotedge-%{version}/edgelet
%patch0 -p1
%build
cd %{_topdir}/BUILD/azure-iotedge-%{version}/edgelet
# Remove FORTIFY_SOURCE from CFLAGS to fix compilation error
CFLAGS="`echo " %{build_cflags} " | sed 's/ -Wp,-D_FORTIFY_SOURCE=2//'`"
export CFLAGS
make %{?_smp_mflags} release
%install
export PATH=$PATH:/root/.cargo/bin/
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT unitdir=%{_unitdir} docdir=%{_docdir}/iotedge-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# Check for container runtime
if ! /usr/bin/getent group docker >/dev/null; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
echo " ERROR: No container runtime detected."
echo ""
echo " Please install a container runtime and run this install again."
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
# Create iotedge group
if ! /usr/bin/getent group iotedge >/dev/null; then
%{_sbindir}/groupadd -r %{iotedge_group}
fi
# Create iotedge user
if ! /usr/bin/getent passwd iotedge >/dev/null; then
%{_sbindir}/useradd -r -g %{iotedge_group} -c "iotedge user" -s /bin/nologin -d %{iotedge_home} %{iotedge_user}
fi
if /usr/bin/getent group docker >/dev/null; then
%{_sbindir}/usermod -a -G docker %{iotedge_user}
fi
exit 0
%post
sed -i "s/hostname: \"<ADD HOSTNAME HERE>\"/hostname: \"$(hostname)\"/g" /etc/iotedge/config.yaml
echo "==============================================================================="
echo ""
echo " Azure IoT Edge"
echo ""
echo " IMPORTANT: Please update the configuration file located at:"
echo ""
echo " /etc/iotedge/config.yaml"
echo ""
echo " with your device's provisioning information. You will need to restart the"
echo " 'iotedge' service for these changes to take effect."
echo ""
echo " To restart the 'iotedge' service, use:"
echo ""
echo " 'systemctl restart iotedge'"
echo ""
echo " This command may need to be run with sudo depending on your environment."
echo ""
echo "==============================================================================="
%systemd_post iotedge.service
%preun
%systemd_preun iotedge.service
%postun
%systemd_postun_with_restart iotedge.service
%files
%defattr(-, root, root, -)
%license ../LICENSE
# bins
%{_bindir}/iotedge
%{_bindir}/iotedged
# config
%attr(400, %{iotedge_user}, %{iotedge_group}) %config(noreplace) %{iotedge_confdir}/config.yaml
%config(noreplace) %{_sysconfdir}/logrotate.d/iotedge
# man
%{_mandir}/man1/iotedge.1.gz
%{_mandir}/man8/iotedged.8.gz
# systemd
%{_unitdir}/iotedge.service
# sockets
%attr(660, %{iotedge_user}, %{iotedge_group}) %{iotedge_home}/mgmt.sock
%attr(666, %{iotedge_user}, %{iotedge_group}) %{iotedge_home}/workload.sock
# dirs
%attr(-, %{iotedge_user}, %{iotedge_group}) %dir %{iotedge_home}
%attr(-, %{iotedge_user}, %{iotedge_group}) %dir %{iotedge_logdir}
%doc %{_docdir}/iotedge-%{version}/LICENSE.gz
%doc %{_docdir}/iotedge-%{version}/ThirdPartyNotices.gz
%doc %{_docdir}/iotedge-%{version}/trademark
%changelog
* Sun May 31 2020 Henry Beberman <henry.beberman@microsoft.com> 1.0.9.1-2
- Disable FORTIFY_SOURCE=2 to fix compilation error with hardened defaults.
* Wed May 27 2020 Andrew Phelps <anphel@microsoft.com> 1.0.9.1-1
- Update to version 1.0.9.1. Fix tarball build notes.
* Sat May 09 2020 Nick Samson <nisamson@microsoft.com> 1.0.9-8
- Added %%license line automatically
* Thu May 07 2020 Nicolas Guibourge <nicolasg@microsoft.com> 1.0.9-7
- Fix docker based build issue.
* Wed May 06 2020 Emre Girgin <mrgirgin@microsoft.com> 1.0.9-6
- Rename shadow to shadow-utils.
* Tue May 05 2020 Mohan Datla <mdatla@microsoft.com> 1.0.9-5
- Add moby-engine and moby-cli dependencies
* Wed Apr 29 2020 Mohan Datla <mdatla@microsoft.com> 1.0.9-4
- Removed dependency on docker.
* Mon Apr 27 2020 Pawel Winogrodzki <pawelwi@microsoft.com> 1.0.9-3
- Fixed 'Source0' tag.
* Mon Apr 20 2020 Andrew Phelps <anphel@microsoft.com> 1.0.9-2
- Support building offline with prepopulated .cargo directory.
* Thu Mar 19 2020 Henry Beberman <henry.beberman@microsoft.com> 1.0.9-1
- Update to 1.0.9. License verified.
* Tue Dec 3 2019 Henry Beberman <hebeberm@microsoft.com> 1.0.8.4-1
- Original version for CBL-Mariner.

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"Babel-2.6.0.tar.gz": "8cba50f48c529ca3fa18cf81fa9403be176d374ac4d60738b839122dfaaa3d23"
}
}

120
SPECS/babel/babel.spec Normal file
Просмотреть файл

@ -0,0 +1,120 @@
%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
Name: babel
Version: 2.6.0
Release: 8%{?dist}
Summary: an integrated collection of utilities that assist in internationalizing and localizing Python applications
License: BSD
Group: Development/Languages/Python
Url: https://babel.pocoo.org
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://files.pythonhosted.org/packages/be/cc/9c981b249a455fa0c76338966325fc70b7265521bad641bf2932f77712f4/Babel-%{version}.tar.gz
BuildRequires: python2
BuildRequires: python2-devel
BuildRequires: python2-libs
BuildRequires: python-setuptools
BuildRequires: pytz
BuildRequires: pytest
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3-pytz
BuildRequires: python3-pytest
BuildRequires: python3-setuptools
BuildRequires: python3-xml
%if %{with_check}
BuildRequires: curl-devel
BuildRequires: openssl-devel
BuildRequires: python-six
BuildRequires: python3-six
BuildRequires: python-attrs
BuildRequires: python3-attrs
%endif
Requires: python2
Requires: python2-libs
Requires: pytz
BuildArch: noarch
%description
Babel is an integrated collection of utilities that assist in internationalizing and localizing Python applications,
with an emphasis on web-based applications.
The functionality Babel provides for internationalization (I18n) and localization (L10N) can be separated into two different aspects:
1.Tools to build and work with gettext message catalogs.
2.A Python interface to the CLDR (Common Locale Data Repository), providing access to various locale display names, localized number and date formatting, etc.
%package -n python3-babel
Summary: an integrated collection of utilities that assist in internationalizing and localizing Python applications
Requires: python3
Requires: python3-libs
Requires: python3-pytz
%description -n python3-babel
Python 3 version.
%prep
%setup -n Babel-%{version}
rm -rf ../p3dir
cp -a . ../p3dir
%build
python2 setup.py build
pushd ../p3dir
python3 setup.py build
popd
%install
pushd ../p3dir
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
mv %{buildroot}/%{_bindir}/pybabel %{buildroot}/%{_bindir}/pybabel3
popd
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
$easy_install_2 pytest freezegun funcsigs pathlib2 pluggy utils
python2 setup.py test
pushd ../p3dir
easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
$easy_install_3 pytest freezegun funcsigs pathlib2 pluggy utils
python3 setup.py test
popd
%files
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/pybabel
%{python2_sitelib}/*
%files -n python3-babel
%defattr(-,root,root,-)
%{_bindir}/pybabel3
%{python3_sitelib}/*
%changelog
* Sat May 09 00:21:26 PST 2020 Nick Samson <nisamson@microsoft.com>
- Added %%license line automatically
* Thu Apr 30 2020 Emre Girgin <mrgirgin@microsoft.com> 2.6.0-7
- Renaming python-pytest to pytest
* Thu Apr 30 2020 Emre Girgin <mrgirgin@microsoft.com> 2.6.0-6
- Renaming python-pytz to pytz
* Wed Apr 29 2020 Emre Girgin <mrgirgin@microsoft.com> 2.6.0-5
- Renaming python-babel to babel
* Fri Apr 24 2020 Nick Samson <nisamson@microsoft.com> 2.6.0-4
- Updated Source0, URL. Removed %%define sha1. License updated. License verified.
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 2.6.0-3
- Initial CBL-Mariner import from Photon (license: Apache2).
* Tue Nov 13 2018 Tapas Kundu <tkundu@vmware.com> 2.6.0-2
- Fixed make check errors.
* Sun Sep 09 2018 Tapas Kundu <tkundu@vmware.com> 2.6.0-1
- Update to version 2.6.0
* Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.4.0-3
- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
* Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.4.0-2
- Change python to python2 and add python2 scripts to bin directory
* Tue Apr 25 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.4.0-1
- Initial

Просмотреть файл

@ -0,0 +1,27 @@
--- bash_completion 2014-03-09 17:38:14 +0000
+++ bash_completion 2014-03-13 23:26:44 +0000
@@ -536,13 +536,23 @@
# @param $2 Name of variable to return result to
_quote_readline_by_ref()
{
- if [[ $1 == \'* ]]; then
+ if [ -z "$1" ]; then
+ # avoid quoting if empty
+ printf -v $2 %s "$1"
+ elif [[ $1 == \'* ]]; then
# Leave out first character
printf -v $2 %s "${1:1}"
+ elif [[ $1 == ~* ]]; then
+ # avoid escaping first ~
+ printf -v $2 ~%q "${1:1}"
else
printf -v $2 %q "$1"
fi
+ # Replace double escaping ( \\ ) by single ( \ )
+ # This happens always when argument is already escaped at cmdline,
+ # and passed to this function as e.g.: file\ with\ spaces
+ [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
# If result becomes quoted like this: $'string', re-evaluate in order to
# drop the additional quoting. See also: http://www.mail-archive.com/
# bash-completion-devel@lists.alioth.debian.org/msg01942.html

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"bash-completion-2.7.tar.xz": "41ba892d3f427d4a686de32673f35401bc947a7801f684127120cdb13641441e"
}
}

Просмотреть файл

@ -0,0 +1,123 @@
Name: bash-completion
Version: 2.7
Release: 2%{?dist}
Summary: Programmable completion for bash
Group: Applications/Shells
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://github.com/scop/bash-completion
Source0: https://github.com/scop/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
Patch0: bash-completion-2.1-bash-4.3.patch
License: GPLv2+
Requires: bash
%global debug_package %{nil}
%description
bash-completion is a collection of shell functions that take advantage of the programmable completion feature of bash 2.04 and later.
%package devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
This package contains files need for development.
%prep
%setup -q
%patch0 -p0
%build
autoreconf -f -i
%configure
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
install -d %{buildroot}%{_sysconfdir}/profile.d
install -m644 bash_completion.sh %{buildroot}%{_sysconfdir}/profile.d/
# provided in udev since 198
rm -f %{buildroot}%{_datadir}/bash-completion/completions/udevadm
rm -f %{buildroot}%{_sysconfdir}/profile.d/bash_completion.sh
rm -f %{buildroot}%{_datadir}/bash-completion/bash_completion
rm -f %{buildroot}%{_datadir}/bash-completion/completions/rfkill
# provided in NetworkManager
rm -f %{buildroot}%{_datadir}/bash-completion/completions/nmcli
# provided in util-linux
rm -f %{buildroot}%{_datadir}/bash-completion/completions/\
{cal,chsh,dmesg,eject,hexdump,ionice,hwclock,ionice,look,mount,renice,rtcwake,su,umount}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%license COPYING
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/*
%dir %{_datadir}/bash-completion/helpers
%{_datadir}/bash-completion/helpers/perl
%{_datadir}/bash-completion/helpers/python
%doc AUTHORS COPYING
%files devel
%defattr(-,root,root)
%dir %{_datadir}/cmake/bash-completion
%{_datadir}/cmake/bash-completion/bash-completion-config*.cmake
%{_datadir}/pkgconfig/bash-completion.pc
%changelog
* Sat May 09 00:20:59 PST 2020 Nick Samson <nisamson@microsoft.com> - 2.7-2
- Added %%license line automatically
* Wed Mar 18 2020 Emre Girgin <mrgirgin@microsoft.com> 2.7-1
- Version update to 2.7. License verified.
* Wed Oct 9 2019 Andrew Phelps <anphel@microsoft.com> 2.5-1
- Initial version bringup for Mariner
* Tue Feb 07 2017 Automatic Build System <autodist@mambasoft.it> 2.5-1mamba
- automatic version update by autodist
* Wed Sep 07 2016 Automatic Build System <autodist@mambasoft.it> 2.4-1mamba
- automatic version update by autodist
* Sun May 22 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3-2mamba
- remove mount and umout provided in util-linux >= 2.28
* Sat Apr 30 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3-1mamba
- update to 2.3
* Wed Sep 03 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1-6mamba
- previous patch had not been applied
* Sat Aug 02 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1-5mamba
- fix patch for bash 4.3
- remove conclicting files for chsh provided by latest util-linux
* Mon May 05 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1-4mamba
- patch against bash 4.3 (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741479)
* Mon Apr 29 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1-3mamba
- remove completion files conflicting with util-linux since 2.23
* Mon Apr 15 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1-2mamba
- remove nmcli completion already provided by NetworkManager
* Sun Apr 14 2013 Automatic Build System <autodist@mambasoft.it> 2.1-1mamba
- update to 2.1
* Sun Mar 17 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0-2mamba
- remove udevadm completion file provided by udev >= 198
* Wed Aug 15 2012 Automatic Build System <autodist@mambasoft.it> 2.0-1mamba
- update to 2.0
* Thu May 10 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.99-1mamba
- update to 1.99
* Thu Aug 25 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3-1mamba
- update to 1.3
* Wed Feb 02 2011 Davide Madrisan <davide.madrisan@gmail.com> 1.2-1mamba
- update url
- remove files not applicable to openmamba
- add upstream patch for rpm
* Tue Feb 01 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 20060301-3mamba
- remove unuseful %dir to fix a self installation loop
* Fri Sep 26 2008 Silvan Calarco <silvan .calarco@mambasoft.it> 20060301-2mamba
- fix installation of /etc/bash_completion
- add bash_completion.sh in /etc/profile.d
- install contrib file in /etc/bash_completion.d
* Tue Sep 23 2008 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 20060301-1mamba
- package created by autospec

21
SPECS/bash/bash-4.4.patch Executable file
Просмотреть файл

@ -0,0 +1,21 @@
diff -dupr a/config-top.h b/config-top.h
--- a/config-top.h 2016-05-19 11:34:02.000000000 -0700
+++ b/config-top.h 2017-01-13 19:48:28.940934708 -0800
@@ -87,7 +87,7 @@
#define DEFAULT_BASHRC "~/.bashrc"
/* System-wide .bashrc file for interactive shells. */
-/* #define SYS_BASHRC "/etc/bash.bashrc" */
+#define SYS_BASHRC "/etc/bash.bashrc"
/* System-wide .bash_logout for login shells. */
/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
@@ -100,7 +100,7 @@
sshd and source the .bashrc if so (like the rshd behavior). This checks
for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment,
which can be fooled under certain not-uncommon circumstances. */
-/* #define SSH_SOURCE_BASHRC */
+#define SSH_SOURCE_BASHRC
/* Define if you want the case-capitalizing operators (~[~]) and the
`capcase' variable attribute (declare -c). */

Просмотреть файл

@ -0,0 +1,6 @@
{
"Signatures": {
"bash-4.4.18.tar.gz": "604d9eec5e4ed5fd2180ee44dd756ddca92e0b6aa4217bbab2b6227380317f23",
"bash_completion": "2243e372a314c975595bf22f0ea330533ff0242c7e5d17525d7c061e25ea5ae4"
}
}

377
SPECS/bash/bash.spec Executable file
Просмотреть файл

@ -0,0 +1,377 @@
Summary: Bourne-Again SHell
Name: bash
Version: 4.4.18
Release: 4%{?dist}
License: GPLv3
URL: http://www.gnu.org/software/bash/
Group: System Environment/Base
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: http://ftp.gnu.org/gnu/bash/%{name}-%{version}.tar.gz
%define sha1 bash=6cf9b3c23930ba8a721fee177d1558e5b7cb6104
Source1: bash_completion
Patch0: bash-4.4.patch
Provides: /bin/sh
Provides: /bin/bash
Provides: /usr/bin/sh
Provides: /usr/bin/bash
BuildRequires: readline
Requires: readline
Requires(post): /bin/grep
Requires(post): /bin/cp
Requires(postun): /bin/grep
Requires(postun): /bin/mv
%description
The package contains the Bourne-Again SHell
%package devel
Summary: Header and development files for bash
Requires: %{name} = %{version}
%description devel
It contains the libraries and header files to create applications
%package lang
Summary: Additional language files for bash
Group: System Environment/Base
Requires: bash >= 4.4
%description lang
These are the additional language files of bash.
%prep
%setup -q -n bash-4.4.18
%patch0 -p1
%build
%configure \
"CFLAGS=-fPIC" \
--bindir=/bin \
--htmldir=%{_defaultdocdir}/%{name}-%{version} \
--without-bash-malloc \
--with-installed-readline
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
ln -s bash %{buildroot}/bin/sh
install -vdm 755 %{buildroot}/etc
install -vdm 755 %{buildroot}/etc/profile.d
install -vdm 755 %{buildroot}/etc/skel
install -vdm 755 %{buildroot}/usr/share/bash-completion
install -m 0644 %{SOURCE1} %{buildroot}/usr/share/bash-completion
rm %{buildroot}/usr/lib/bash/Makefile.inc
# Create dircolors
cat > %{buildroot}/etc/profile.d/dircolors.sh << "EOF"
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
if [ -f "/etc/dircolors" ] ; then
eval $(dircolors -b /etc/dircolors)
if [ -f "$HOME/.dircolors" ] ; then
eval $(dircolors -b $HOME/.dircolors)
fi
fi
alias ls='ls --color=auto'
grep --help | grep color >/dev/null 2>&1
if [ $? -eq 0 ]; then
alias grep='grep --color=auto'
fi
EOF
cat > %{buildroot}/etc/profile.d/extrapaths.sh << "EOF"
if [ -d /usr/local/lib/pkgconfig ] ; then
pathappend /usr/local/lib/pkgconfig PKG_CONFIG_PATH
fi
if [ -d /usr/local/bin ]; then
pathprepend /usr/local/bin
fi
if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
pathprepend /usr/local/sbin
fi
EOF
cat > %{buildroot}/etc/profile.d/readline.sh << "EOF"
# Setup the INPUTRC environment variable.
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
INPUTRC=/etc/inputrc
fi
export INPUTRC
EOF
cat > %{buildroot}/etc/profile.d/umask.sh << "EOF"
# By default, the umask should be set.
if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then
umask 002
else
umask 022
fi
EOF
cat > %{buildroot}/etc/profile.d/i18n.sh << "EOF"
# Begin /etc/profile.d/i18n.sh
unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES \
LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
. "$XDG_CONFIG_HOME/locale.conf"
elif [ -r /etc/locale.conf ]; then
. /etc/locale.conf
fi
export LANG="${LANG:-C}"
[ -n "$LC_CTYPE" ] && export LC_CTYPE
[ -n "$LC_NUMERIC" ] && export LC_NUMERIC
[ -n "$LC_TIME" ] && export LC_TIME
[ -n "$LC_COLLATE" ] && export LC_COLLATE
[ -n "$LC_MONETARY" ] && export LC_MONETARY
[ -n "$LC_MESSAGES" ] && export LC_MESSAGES
[ -n "$LC_PAPER" ] && export LC_PAPER
[ -n "$LC_NAME" ] && export LC_NAME
[ -n "$LC_ADDRESS" ] && export LC_ADDRESS
[ -n "$LC_TELEPHONE" ] && export LC_TELEPHONE
[ -n "$LC_MEASUREMENT" ] && export LC_MEASUREMENT
[ -n "$LC_IDENTIFICATION" ] && export LC_IDENTIFICATION
# End /etc/profile.d/i18n.sh
EOF
# bash completion
cat > %{buildroot}/etc/profile.d/bash_completion.sh << "EOF"
# check for interactive bash and only bash
if [ -n "$BASH_VERSION" -a -n "$PS1" ]; then
# enable bash completion in interactive shells
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi
fi
fi
EOF
cat > %{buildroot}/etc/bash.bashrc << "EOF"
# Begin /etc/bash.bashrc
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>
# System wide aliases and functions.
# System wide environment variables and startup programs should go into
# /etc/profile. Personal environment variables and startup programs
# should go into ~/.bash_profile. Personal aliases and functions should
# go into ~/.bashrc
# Provides colored /bin/ls and /bin/grep commands. Used in conjunction
# with code in /etc/profile.
alias ls='ls --color=auto'
grep --help | grep color >/dev/null 2>&1
if [ $? -eq 0 ]; then
alias grep='grep --color=auto'
fi
# Provides prompt for non-login shells, specifically shells started
# in the X environment. [Review the LFS archive thread titled
# PS1 Environment Variable for a great case study behind this script
# addendum.]
NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
if [[ $EUID == 0 ]] ; then
PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
else
PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
fi
unset RED GREEN NORMAL
if test -n "$SSH_CONNECTION" -a -z "$PROFILEREAD"; then
. /etc/profile > /dev/null 2>&1
fi
# End /etc/bash.bashrc
EOF
cat > %{buildroot}/etc/skel/.bash_profile << "EOF"
# Begin ~/.bash_profile
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>
# Personal environment variables and startup programs.
# Personal aliases and functions should go in ~/.bashrc. System wide
# environment variables and startup programs are in /etc/profile.
# System wide aliases and functions are in /etc/bashrc.
if [ -f "$HOME/.bashrc" ] ; then
source $HOME/.bashrc
fi
if [ -d "$HOME/bin" ] ; then
pathprepend $HOME/bin
fi
# Having . in the PATH is dangerous
#if [ $EUID -gt 99 ]; then
# pathappend .
#fi
# End ~/.bash_profile
EOF
cat > %{buildroot}/etc/skel/.bashrc << "EOF"
# Begin ~/.bashrc
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# Personal aliases and functions.
# Personal environment variables and startup programs should go in
# ~/.bash_profile. System wide environment variables and startup
# programs are in /etc/profile. System wide aliases and functions are
# in /etc/bashrc.
if [ -f "/etc/bash.bashrc" ] ; then
source /etc/bash.bashrc
fi
# End ~/.bashrc
EOF
cat > %{buildroot}/etc/skel/.bash_logout << "EOF"
# Begin ~/.bash_logout
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# Personal items to perform on logout.
# End ~/.bash_logout
EOF
dircolors -p > %{buildroot}/etc/dircolors
%find_lang %{name}
rm -rf %{buildroot}/%{_infodir}
%check
make NON_ROOT_USERNAME=nobody %{?_smp_mflags} check
%post
if [ $1 -eq 1 ] ; then
if [ ! -f "/root/.bash_logout" ] ; then
cp /etc/skel/.bash_logout /root/.bash_logout
fi
if [ ! -f /etc/shells ]; then
echo "/bin/sh" >> /etc/shells
echo "/bin/bash" >> /etc/shells
echo "%{_bindir}/sh" >> /etc/shells
echo "%{_bindir}/bash" >> /etc/shells
else
grep -q '^/bin/sh$' /etc/shells || \
echo "/bin/sh" >> /etc/shells
grep -q '^/bin/bash$' /etc/shells || \
echo "/bin/bash" >> /etc/shells
grep -q '^%{_bindir}/sh$' /etc/shells || \
echo "%{_bindir}/sh" >> /etc/shells
grep -q '^%{_bindir}/bash$' /etc/shells || \
echo "%{_bindir}/bash" >> /etc/shells
fi
fi
%postun
if [ $1 -eq 0 ] ; then
if [ -f "/root/.bash_logout" ] ; then
rm -f /root/.bash_logout
fi
if [ ! -x /bin/sh ]; then
grep -v '^/bin/sh$' /etc/shells | \
grep -v '^/bin/sh$' > /etc/shells.rpm && \
mv /etc/shells.rpm /etc/shells
fi
if [ ! -x /bin/bash ]; then
grep -v '^/bin/bash$' /etc/shells | \
grep -v '^/bin/bash$' > /etc/shells.rpm && \
mv /etc/shells.rpm /etc/shells
fi
if [ ! -x %{_bindir}/sh ]; then
grep -v '^%{_bindir}/sh$' /etc/shells | \
grep -v '^%{_bindir}/sh$' > /etc/shells.rpm && \
mv /etc/shells.rpm /etc/shells
fi
if [ ! -x %{_bindir}/bash ]; then
grep -v '^%{_bindir}/bash$' /etc/shells | \
grep -v '^%{_bindir}/bash$' > /etc/shells.rpm && \
mv /etc/shells.rpm /etc/shells
fi
fi
%files
%defattr(-,root,root)
%license COPYING
/bin/*
%{_libdir}/%{name}/*
%{_sysconfdir}/
%{_defaultdocdir}/%{name}-%{version}/*
%{_defaultdocdir}/%{name}/*
%{_mandir}/*/*
/usr/share/bash-completion/
%files devel
%{_includedir}/%{name}/*
%{_libdir}/pkgconfig/*
%files lang -f %{name}.lang
%defattr(-,root,root)
%changelog
* Sat May 09 00:20:50 PST 2020 Nick Samson <nisamson@microsoft.com> - 4.4.18-4
- Added %%license line automatically
* Thu Feb 27 2020 Henry Beberman <hebeberm@microsoft.com> 4.4.18-3
- Explicitly provide /usr/bin/sh and /usr/bin/bash
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 4.4.18-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Sep 24 2018 Sujay G <gsujay@vmware.com> 4.4.18-1
- Bump bash version to 4.4.18
* Fri Jan 26 2018 Alexey Makhalov <amakhalov@vmware.com> 4.4.12-3
- Run bash_completion only for bash interactive shell
* Mon Dec 11 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.12-2
- conditionally apply grep color alias
* Mon Nov 13 2017 Xiaolin Li <xiaolinl@vmware.com> 4.4.12-1
- Upstream patch level 12 applied
* Mon Oct 02 2017 Kumar Kaushik <kaushikk@vmware.com> 4.4-6
- Adding security fix for CVE-2017-5932.
* Thu Jun 8 2017 Bo Gan <ganb@vmware.com> 4.4-5
- Fix dependency again
* Wed Jun 7 2017 Divya Thaluru <dthaluru@vmware.com> 4.4-4
- Added /usr/bin/sh and /bin/sh entries in /etc/shells
* Sun Jun 4 2017 Bo Gan <ganb@vmware.com> 4.4-3
- Fix dependency
* Thu Feb 2 2017 Divya Thaluru <dthaluru@vmware.com> 4.4-2
- Modified bash entry in /etc/shells
* Fri Jan 13 2017 Dheeraj Shetty <dheerajs@vmware.com> 4.4-1
- Upgraded version to 4.4
* Tue Jan 10 2017 Divya Thaluru <dthaluru@vmware.com> 4.3.30-7
- Added bash entry to /etc/shells
* Wed Nov 16 2016 Alexey Makhalov <amakhalov@vmware.com> 4.3.30-6
- Add readline requirements
* Fri Aug 19 2016 Alexey Makhalov <amakhalov@vmware.com> 4.3.30-5
- Enable bash completion support
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.3.30-4
- GA - Bump release of all rpms
* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 4.3.30-3
- Fixing spec file to handle rpm upgrade scenario correctly
* Thu Mar 10 2016 Divya Thaluru <dthaluru@vmware.com> 4.3.30-2
- Adding compile options to load bash.bashrc file and
loading source file during non-inetractive non-login shell
* Tue Jan 12 2016 Xiaolin Li <xiaolinl@vmware.com> 4.3.30-1
- Updated to version 4.3.30
* Wed Aug 05 2015 Kumar Kaushik <kaushikk@vmware.com> 4.3-4
- Adding post unstall section.
* Wed Jul 22 2015 Alexey Makhalov <amakhalov@vmware.com> 4.3-3
- Fix segfault in save_bash_input.
* Tue Jun 30 2015 Alexey Makhalov <amakhalov@vmware.com> 4.3-2
- /etc/profile.d permission fix. Pack /etc files into rpm
* Wed Oct 22 2014 Divya Thaluru <dthaluru@vmware.com> 4.3-1
- Initial version

1995
SPECS/bash/bash_completion Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"bc-1.07.1.tar.gz": "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a"
}
}

53
SPECS/bc/bc.spec Normal file
Просмотреть файл

@ -0,0 +1,53 @@
Summary: precision numeric processing language
Name: bc
Version: 1.07.1
Release: 3%{?dist}
License: GPLv2+
URL: https://ftp.gnu.org/gnu/bc/
Group: System Environment/base
Vendor: Microsoft Corporation
Distribution: Mariner
Source0: https://ftp.gnu.org/gnu/bc/%{name}-%{version}.tar.gz
%define sha1 bc=b4475c6d66590a5911d30f9747361db47231640a
BuildRequires: ed
%description
The Bc package contains an arbitrary precision numeric processing language.
%prep
%setup -q
%build
%configure \
--disable-silent-rules
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
install -vdm 755 %{buildroot}/%{_mandir}
rm -rf %{buildroot}%{_infodir}
%check
make %{?_smp_mflags} timetest
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/*
%{_mandir}/*/*
%changelog
* Sat May 09 00:21:27 PST 2020 Nick Samson <nisamson@microsoft.com> - 1.07.1-3
- Added %%license line automatically
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.07.1-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Mon Oct 1 2018 Sujay G <gsujay@vmware.com> 1.07.1-1
- Bump bc version to 1.07.1
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.06.95-3
- GA - Bump release of all rpms
* Tue Aug 4 2015 Kumar Kaushik <kaushikk@vmware.com> 1.06.95-2
- Adding the post uninstall section.
* Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 1.06.95-1
- initial version

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше