Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:ARM:Rings:1-MinimalX
ca-certificates
ca-certificates-2+git20240805.fd24d50.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ca-certificates-2+git20240805.fd24d50.obscpio of Package ca-certificates
07070100000000000081A400000000000000000000000166B0933C000000D6000000000000000000000000000000000000003400000000ca-certificates-2+git20240805.fd24d50/.editorconfig# http://EditorConfig.org root = true [**] indent_style = tab indent_size = 4 tab_width = 8 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [Makefile] indent_size = 8 07070100000001000041ED00000000000000000000000366B0933C00000000000000000000000000000000000000000000002E00000000ca-certificates-2+git20240805.fd24d50/.github07070100000002000041ED00000000000000000000000266B0933C00000000000000000000000000000000000000000000003800000000ca-certificates-2+git20240805.fd24d50/.github/workflows07070100000003000081A400000000000000000000000166B0933C00000349000000000000000000000000000000000000003F00000000ca-certificates-2+git20240805.fd24d50/.github/workflows/ci.yml--- name: CI on: push: branches: - "master" pull_request: jobs: format: name: Ensure code is black formatted runs-on: ubuntu-latest steps: - name: checkout source code uses: actions/checkout@v2 - name: set up Python uses: actions/setup-python@v2 - name: install dependencies run: pip install --user poetry && poetry install - name: run tests run: poetry run black --check --diff *py tests: name: Test containers runs-on: ubuntu-latest steps: - name: checkout source code uses: actions/checkout@v2 - name: set up Python uses: actions/setup-python@v2 - name: install dependencies run: pip install --user poetry && poetry install - name: run tests run: poetry run pytest -vv -n $(nproc) 07070100000004000081A400000000000000000000000166B0933C00004657000000000000000000000000000000000000002E00000000ca-certificates-2+git20240805.fd24d50/COPYING GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) 19yy <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. 07070100000005000081A400000000000000000000000166B0933C000004D6000000000000000000000000000000000000002F00000000ca-certificates-2+git20240805.fd24d50/MakefileDESTDIR= prefix=/usr sbindir=$(prefix)/sbin datadir=$(prefix)/share pkglibdir=$(prefix)/lib/ca-certificates pkgdatadir=$(datadir)/ca-certificates mandir=$(datadir)/man systemdsystemunitdir=$(prefix)/lib/systemd/system all: install: install -D -m 755 update-ca-certificates $(DESTDIR)$(sbindir)/update-ca-certificates install -D -m 644 update-ca-certificates.8 $(DESTDIR)$(mandir)/man8/update-ca-certificates.8 install -D -m 644 ca-certificates.path $(DESTDIR)$(systemdsystemunitdir)/ca-certificates.path install -D -m 644 ca-certificates.service $(DESTDIR)$(systemdsystemunitdir)/ca-certificates.service install -D -m 644 ca-certificates-setup.service $(DESTDIR)$(systemdsystemunitdir)/ca-certificates-setup.service install -D -m 755 java.run $(DESTDIR)$(pkglibdir)/update.d/50java.run install -D -m 755 openssl.run $(DESTDIR)$(pkglibdir)/update.d/70openssl.run install -D -m 755 etc_ssl.run $(DESTDIR)$(pkglibdir)/update.d/80etc_ssl.run # certbundle.run must be run after etc_ssl.run as it uses a timestamp from it install -D -m 755 certbundle.run $(DESTDIR)$(pkglibdir)/update.d/99certbundle.run package: obs/mkpackage clean: .PHONY: all install clean package 07070100000006000081A400000000000000000000000166B0933C000008CB000000000000000000000000000000000000002D00000000ca-certificates-2+git20240805.fd24d50/READMEca-certificates =============== Utilities for system wide CA certificate installation update-ca-certificates is intended to keep the certificate stores of various components in sync with the system CA certificates. The canonical source of CA certificates is what p11-kit knows about. By default p11-kit looks into /usr/share/pki/trust/ resp /etc/pki/trust/ but there could be other plugins that serve as source for certificates as well. Supported Certificate Stores ============================ update-ca-certificate supports a number of legacy certificate stores for applications that don't talk to p11-kit directly yet. It does so by generating the certificate stores in /var/lib/ca-certificates and having symlinks from the locations where applications expect those files. - /etc/ssl/certs: Hashed directory readable by openSSL. Only for legacy applications. Only contains CA certificates for server-auth purpose. Avoid using this in applications. - /etc/ssl/ca-bundle.pem: Concatenated bundle of CA certificates with server-auth purpose. Avoid using this in applications. - java-cacerts: Key store fore Java. Only filled with CA certificates with purpose server-auth. - openssl: hashed directory with CA certificates of all purposes. Your system openSSL knows how to read that, don't hardcode the path! Call SSL_CTX_set_default_verify_paths() instead. Differences to previous versions on openSUSE ============================================ - Packages are expected to install their CA certificates in /usr/share/pki/trust/anchors or /usr/share/pki/trust (no extra subdir) instead of /usr/share/ca-certificates/<vendor> now. The anchors subdirectory is for regular pem files, the directory one above for pem files in openssl's 'trusted' format. - /etc/ca-certificates.conf is no longer supported. Just symlink the certificates you don't want to /etc/pki/trust/blacklist. Differences to Debian ===================== - /etc/ca-certificates.conf is not supported. - Hook scripts don't receive the list of changed certificates on stdin. That allows scripts to have their own method to determine changes. - The command line arguments -v and -f are passed to hook scripts. - All stores are created via hook scripts. 07070100000007000081A400000000000000000000000166B0933C000007CC000000000000000000000000000000000000003300000000ca-certificates-2+git20240805.fd24d50/Testsuite.md# Testsuite `update-ca-certificates` has a simple container based test suite implemented in Python using [pytest](https://pytest.org) and [testinfra](https://testinfra.readthedocs.io/). ## Prerequisites - Python >= 3.6.2 - [Poetry](https://python-poetry.org/) - [Podman](https://podman.io/) ## Running the tests First, initialize the virtualenv and install the dependencies via `poetry install`. Now you can run the tests: ```ShellSession $ poetry run pytest -vv -n $(nproc) $ # only run the tests on Leap: $ poetry run pytest -vv -n $(nproc) --container leap $ # run only a certain test function $ poetry run pytest -vv -k prints_help -n $(nproc) ``` ## Writing tests Tests are implemented as python functions using `testinfra` with a bit of pytest magic sprinkled on top of them: ```python def test_runs_in_container(container): container.run("touch /foobar") assert container.file("/foobar").exists ``` The parameter `container` is a pytest fixture defined in `conftest.py`. It starts a container (by default openSUSE Tumbleweed) at the start of the test suite run, copies the `update-ca-certificates` script into the container to `/bin/update-ca-certificates`, gives each test a connection to the container and destroys it after the run. Additionally the `pytest_generate_tests` function in `conftest.py` ensures that each test is automagically run for all available containers (Tumbleweed, Leap and SLE). This can be toggled via the `--container` flag passed to pytest. E.g. `pytest --container leap sle` will only run the tests on Leap and SLE containers, whereas `pytest --container my.registry.name/path/to/my/image:42` will run the tests only inside the container image available under `my.registry.name/path/to/my/image:42`. Note, that for efficiency, the container connection is shared by all test function that use the same image. This means that if you **must** undo any mutation that you performed during your tests, to not cause failures in subsequent tests. 07070100000008000081A400000000000000000000000166B0933C00000160000000000000000000000000000000000000004400000000ca-certificates-2+git20240805.fd24d50/ca-certificates-setup.service[Unit] Description=Initialize ca-certificates cache in /var/lib/ca-certificates Documentation=man:update-ca-certificates(7) RequiresMountsFor=/var ConditionPathExists=!/var/lib/ca-certificates/pem Wants=local-fs.target Before=ca-certificates.service [Service] Type=oneshot ExecStart=/usr/sbin/update-ca-certificates [Install] WantedBy=sysinit.target 07070100000009000081A400000000000000000000000166B0933C0000011D000000000000000000000000000000000000003B00000000ca-certificates-2+git20240805.fd24d50/ca-certificates.path[Unit] Description=Watch for changes in CA certificates After=local-fs.target [Path] Unit=ca-certificates.service PathExists=/etc/pki/trust/.updated PathChanged=/etc/pki/trust PathChanged=/etc/pki/trust/anchors PathChanged=/etc/pki/trust/blacklist [Install] WantedBy=default.target 0707010000000A000081A400000000000000000000000166B0933C000000B3000000000000000000000000000000000000003E00000000ca-certificates-2+git20240805.fd24d50/ca-certificates.service[Unit] Description=Update system wide CA certificates Wants=local-fs.target [Service] Type=oneshot ExecStart=/usr/sbin/update-ca-certificates [Install] WantedBy=default.target 0707010000000B000081A400000000000000000000000166B0933C00001374000000000000000000000000000000000000003B00000000ca-certificates-2+git20240805.fd24d50/ca-certificates.spec# # spec file for package ca-certificates # # Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %if 0%{?_build_in_place} %define git_version %(git log '-n1' '--date=format:%Y%m%d' '--no-show-signature' "--pretty=format:+git%cd.%h") BuildRequires: git-core %else # this is required for obs' source validator. It's # 20-files-present-and-referenced ignores all conditionals. So the # definition of git_version actually happens always. %define git_version %{nil} %endif # the ca bundle file was meant as compat option for e.g. # proprietary packages. It's not meant to be used at all. # unfortunately glib-networking has such a complicated abstraction # on top of gnutls that we have to live with the bundle for now %bcond_without cabundle BuildRequires: p11-kit-devel Name: ca-certificates %define ssletcdir %{_sysconfdir}/ssl %define cabundle /var/lib/ca-certificates/ca-bundle.pem %define sslcerts %{ssletcdir}/certs Version: 2%{git_version} Release: 0 Summary: Utilities for system wide CA certificate installation License: GPL-2.0-or-later Group: Productivity/Networking/Security Source0: ca-certificates-%{version}.tar BuildRoot: %{_tmppath}/%{name}-%{version}-build URL: https://github.com/openSUSE/ca-certificates # Requires: /usr/bin/readlink Requires: p11-kit Requires: p11-kit-tools >= 0.23.1 # needed for post Requires(post): p11-kit-tools /usr/bin/readlink Recommends: ca-certificates-mozilla # no need for a separate Java package anymore. The bundle is # created by C code. Obsoletes: java-ca-certificates = 1 Provides: java-ca-certificates = %version-%release BuildArch: noarch %description Update-ca-certificates is intended to keep the certificate stores of SSL libraries like OpenSSL or GnuTLS in sync with the system's CA certificate store that is managed by p11-kit. %prep %setup -q %build %install %if %{without cabundle} rm -f certbundle.run %endif %make_install install -d -m 755 %{buildroot}%{trustdir_cfg}/{anchors,blacklist} install -d -m 755 %{buildroot}%{trustdir_static}/{anchors,blacklist} install -d -m 755 %{buildroot}%{ssletcdir} install -d -m 755 %{buildroot}/etc/ca-certificates/update.d install -d -m 755 %{buildroot}%{_prefix}/lib/ca-certificates/update.d install -d -m 555 %{buildroot}/var/lib/ca-certificates/pem install -d -m 555 %{buildroot}/var/lib/ca-certificates/openssl install -d -m 755 %{buildroot}/%{_prefix}/lib/systemd/system ln -s ../../var/lib/ca-certificates/pem %{buildroot}%{sslcerts} %if %{with cabundle} install -D -m 444 /dev/null %{buildroot}/%{cabundle} ln -s %{cabundle} %{buildroot}%{ssletcdir}/ca-bundle.pem %endif install -D -m 444 /dev/null %{buildroot}/var/lib/ca-certificates/java-cacerts %pre %service_add_pre ca-certificates.path ca-certificates.service ca-certificates-setup.service %post # force rebuilding all certificate stores. update-ca-certificates -f || true %service_add_post ca-certificates.path ca-certificates.service ca-certificates-setup.service %preun %service_del_preun ca-certificates.path ca-certificates.service ca-certificates-setup.service %postun if [ "$1" -eq 0 ]; then rm -rf /var/lib/ca-certificates/pem /var/lib/ca-certificates/openssl fi %service_del_postun ca-certificates.path ca-certificates.service ca-certificates-setup.service %clean rm -rf %{buildroot} %files %defattr(-, root, root) %license COPYING %doc README %dir %{pkidir_cfg} %dir %{trustdir_cfg} %dir %{trustdir_cfg}/anchors %dir %{trustdir_cfg}/blacklist %dir %{pkidir_static} %dir %{trustdir_static} %dir %{trustdir_static}/anchors %dir %{trustdir_static}/blacklist %dir %ssletcdir %sslcerts %ghost /var/lib/ca-certificates/java-cacerts %dir /etc/ca-certificates %dir /etc/ca-certificates/update.d %dir %{_prefix}/lib/ca-certificates %dir %{_prefix}/lib/ca-certificates/update.d %{_prefix}/lib/systemd/system/* %dir /var/lib/ca-certificates %dir /var/lib/ca-certificates/pem %dir /var/lib/ca-certificates/openssl %{_sbindir}/update-ca-certificates %{_mandir}/man8/update-ca-certificates.8* %{_prefix}/lib/ca-certificates/update.d/*java.run %{_prefix}/lib/ca-certificates/update.d/*etc_ssl.run %{_prefix}/lib/ca-certificates/update.d/*openssl.run # %if %{with cabundle} %{ssletcdir}/ca-bundle.pem %ghost %{cabundle} %{_prefix}/lib/ca-certificates/update.d/*certbundle.run %endif %changelog 0707010000000C000081ED00000000000000000000000166B0933C00000508000000000000000000000000000000000000003500000000ca-certificates-2+git20240805.fd24d50/certbundle.run#!/bin/bash # vim: syntax=sh set -e [ -d "$statedir" ] cafile="$destdir/$statedir/ca-bundle.pem" cadir="$destdir/$statedir/pem" for i in "$@"; do if [ "$i" = "-f" ]; then fresh=1 elif [ "$i" = "-v" ]; then verbose=1 fi done if [ -z "$fresh" -a "$cafile" -nt "$cadir" ]; then exit 0 fi [ -z "$verbose" ] || echo "creating $cafile ..." trust extract --format=pem-bundle --purpose=server-auth --filter=ca-anchors --overwrite $cafile.tmp cat - $cafile.tmp > "$cafile.new" <<EOF # # automatically created by $0. Do not edit! # # Use of this file is deprecated and should only be used as last # resort by applications that do not support p11-kit or reading /etc/ssl/certs. # You should avoid hardcoding any paths in applications anyways though. Use # functions that know the operating system defaults instead: # # - openssl: SSL_CTX_set_default_verify_paths() # - gnutls: gnutls_certificate_set_x509_system_trust(cred) # EOF rm -f $cafile.tmp mv -f "$cafile.new" "$cafile" if ! test -e $destdir/etc/ssl/ca-bundle.pem && ! test -L $destdir/etc/ssl/ca-bundle.pem; then [ -z "$verbose" ] || echo "restoring $destdir/etc/ssl/ca-bundle.pem ..." install -d -m 0755 $destdir/etc/ssl ln -s ../../var/lib/ca-certificates/ca-bundle.pem $destdir/etc/ssl/ca-bundle.pem fi 0707010000000D000081A400000000000000000000000166B0933C000008AF000000000000000000000000000000000000003200000000ca-certificates-2+git20240805.fd24d50/conftest.pyimport subprocess from os import path import pytest import testinfra TUMBLEWEED_CONTAINER = ["registry.opensuse.org/opensuse/tumbleweed:latest"] LEAP_CONTAINERS = [ "registry.opensuse.org/opensuse/leap:15.3", "registry.opensuse.org/opensuse/leap:15.2", ] SLE_CONTAINERS = [ "registry.suse.com/suse/sle15:15.3", "registry.suse.com/suse/sle15:15.2", "registry.suse.com/suse/sle15:15.1", "registry.suse.com/suse/sles12sp5:latest", ] CONTAINER_IMAGES = TUMBLEWEED_CONTAINER + LEAP_CONTAINERS + SLE_CONTAINERS CONTAINER_IMAGE_CHOICES = { "tumbleweed": TUMBLEWEED_CONTAINER, "leap": LEAP_CONTAINERS, "sle": SLE_CONTAINERS, } def pytest_addoption(parser): parser.addoption( "--container", help="container images to run the tests against", nargs="+", default=CONTAINER_IMAGES, ) def pytest_generate_tests(metafunc): if "container" in metafunc.fixturenames: containers = metafunc.config.getoption("container") images = [] distros = list(CONTAINER_IMAGE_CHOICES.keys()) for opt in containers: if opt in distros: for img in CONTAINER_IMAGE_CHOICES[opt]: images.append(img) else: images.append(opt) metafunc.parametrize("container", images, indirect=True) @pytest.fixture(scope="session") def container(request): container_url = getattr(request, "param", TUMBLEWEED_CONTAINER[0]) container_id = ( subprocess.check_output( [ "podman", "run", "-d", "-it", container_url, "/bin/sh", ] ) .decode() .strip() ) subprocess.check_call( [ "podman", "cp", path.abspath( path.join( path.dirname(__file__), "update-ca-certificates", ) ), container_id + ":" + "/bin/update-ca-certificates", ], ) yield testinfra.get_host(f"podman://{container_id}") subprocess.check_call(["podman", "rm", "-f", container_id]) 0707010000000E000081ED00000000000000000000000166B0933C000007AD000000000000000000000000000000000000003200000000ca-certificates-2+git20240805.fd24d50/etc_ssl.run#!/bin/bash -e # vim:syntax=sh # # Copyright (c) 2010,2013 SUSE Linux Products GmbH # Copyright (c) 2020 SUSE LLC # Author: Ludwig Nussel # # update /etc/ssl/certs for compatibility with legacy applications # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, # USA. # [ -d "$statedir" ] etccertsdir="${destdir}/etc/ssl/certs" pemdir="$statedir/pem" help_and_exit() { cat <<-EOF USAGE: $0 [OPTIONS] OPTIIONS: --verbose, -v verbose output --fresh, -f start from scratch --help, -h this screen EOF exit 0 } case "$1" in -v|--verbose) verbose='-v'; shift ;; -f|--fresh) fresh='-f'; shift ;; -h|--help) help_and_exit ;; -*) echo "invalid option: $1" >&2; exit 1 ;; esac install -d -m 0755 "${destdir}$pemdir" trust extract --purpose=server-auth --filter=ca-anchors --format=pem-directory-hash -f "${destdir}$pemdir" # fix up /etc/ssl/certs if it's not a link pointing to /var/lib/ca-certificates/pem if ! [ -L "$etccertsdir" -a "`readlink $etccertsdir`" = "../..$pemdir" ]; then echo "Warning: $etccertsdir needs to be a link to ../..$pemdir, fixing" >&2 if [ -d "$etccertsdir" ]; then mv -Tv --backup=numbered "$etccertsdir" "$etccertsdir.old" fi install -d -m 0755 "${etccertsdir%/*}" ln -Tsv --backup=numbered "../..$pemdir" "$etccertsdir" fi 0707010000000F000081ED00000000000000000000000166B0933C000001AE000000000000000000000000000000000000002F00000000ca-certificates-2+git20240805.fd24d50/java.run#!/bin/bash set -e [ -d "$statedir" ] cafile="$destdir/$statedir/java-cacerts" cafile_gcj="$destdir/$statedir/gcj-cacerts" for i in "$@"; do if [ "$i" = "-f" ]; then fresh=1 elif [ "$i" = "-v" ]; then verbose=1 fi done [ -z "$verbose" ] || echo "creating $cafile ..." trust extract --format=java-cacerts --purpose=server-auth --filter=ca-anchors --overwrite $cafile.new mv $cafile.new $cafile # vim: syntax=sh 07070100000010000081ED00000000000000000000000166B0933C0000016D000000000000000000000000000000000000003200000000ca-certificates-2+git20240805.fd24d50/openssl.run#!/bin/bash set -e [ -d "$statedir" ] cadir="$destdir/$statedir/openssl" for i in "$@"; do if [ "$i" = "-f" ]; then fresh=1 elif [ "$i" = "-v" ]; then verbose=1 fi done [ -z "$verbose" ] || echo "creating $cadir ..." install -d -m 0755 -p "$cadir" trust extract --format=openssl-directory --filter=ca-anchors --overwrite $cadir # vim: syntax=sh 07070100000011000081A400000000000000000000000166B0933C000061B6000000000000000000000000000000000000003200000000ca-certificates-2+git20240805.fd24d50/poetry.lock[[package]] name = "apipkg" version = "1.5" description = "apipkg: namespace control and lazy-import mechanism" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "appdirs" version = "1.4.4" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = "*" [[package]] name = "atomicwrites" version = "1.4.0" description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" version = "21.2.0" description = "Classes Without Boilerplate" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] [[package]] name = "black" version = "21.5b1" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.6.2" [package.dependencies] appdirs = "*" click = ">=7.1.2" dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} mypy-extensions = ">=0.4.3" pathspec = ">=0.8.1,<1" regex = ">=2020.1.8" toml = ">=0.10.1" typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.6.0)", "aiohttp-cors"] python2 = ["typed-ast (>=1.4.2)"] [[package]] name = "click" version = "8.0.1" description = "Composable command line interface toolkit" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" version = "0.4.4" description = "Cross-platform colored terminal text." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "dataclasses" version = "0.8" description = "A backport of the dataclasses module for Python 3.6" category = "dev" optional = false python-versions = ">=3.6, <3.7" [[package]] name = "execnet" version = "1.8.0" description = "execnet: rapid multi-Python deployment" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] apipkg = ">=1.4" [package.extras] testing = ["pre-commit"] [[package]] name = "importlib-metadata" version = "4.1.0" description = "Read metadata from Python packages" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" category = "dev" optional = false python-versions = "*" [[package]] name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." category = "dev" optional = false python-versions = "*" [[package]] name = "packaging" version = "20.9" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] pyparsing = ">=2.0.2" [[package]] name = "pathspec" version = "0.8.1" description = "Utility library for gitignore style pattern matching of file paths." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] [[package]] name = "py" version = "1.10.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pyparsing" version = "2.4.7" description = "Python parsing module" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" version = "6.2.4" description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<1.0.0a1" py = ">=1.8.2" toml = "*" [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] name = "pytest-forked" version = "1.3.0" description = "run tests in isolated forked subprocesses" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] py = "*" pytest = ">=3.10" [[package]] name = "pytest-testinfra" version = "6.3.0" description = "Test infrastructures" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] pytest = "!=3.0.2" [package.extras] ansible = ["ansible"] paramiko = ["paramiko"] salt = ["salt"] winrm = ["pywinrm"] [[package]] name = "pytest-xdist" version = "2.2.1" description = "pytest xdist plugin for distributed testing and loop-on-failing modes" category = "dev" optional = false python-versions = ">=3.5" [package.dependencies] execnet = ">=1.1" pytest = ">=6.0.0" pytest-forked = "*" [package.extras] psutil = ["psutil (>=3.0)"] testing = ["filelock"] [[package]] name = "regex" version = "2021.4.4" description = "Alternative regular expression module, to replace re." category = "dev" optional = false python-versions = "*" [[package]] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "typed-ast" version = "1.4.3" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false python-versions = "*" [[package]] name = "typing-extensions" version = "3.10.0.0" description = "Backported and Experimental Type Hints for Python 3.5+" category = "dev" optional = false python-versions = "*" [[package]] name = "zipp" version = "3.4.1" description = "Backport of pathlib-compatible object wrapper for zip files" category = "dev" optional = false python-versions = ">=3.6" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" python-versions = ">= 3.6.2" content-hash = "7fe3942c35b714b1a76c90a9b1a1f2c119ddbef977db712170806bfabd029cbe" [metadata.files] apipkg = [ {file = "apipkg-1.5-py2.py3-none-any.whl", hash = "sha256:58587dd4dc3daefad0487f6d9ae32b4542b185e1c36db6993290e7c41ca2b47c"}, {file = "apipkg-1.5.tar.gz", hash = "sha256:37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6"}, ] appdirs = [ {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, ] attrs = [ {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, ] black = [ {file = "black-21.5b1-py3-none-any.whl", hash = "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008"}, {file = "black-21.5b1.tar.gz", hash = "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1"}, ] click = [ {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] dataclasses = [ {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, ] execnet = [ {file = "execnet-1.8.0-py2.py3-none-any.whl", hash = "sha256:7a13113028b1e1cc4c6492b28098b3c6576c9dccc7973bfe47b342afadafb2ac"}, {file = "execnet-1.8.0.tar.gz", hash = "sha256:b73c5565e517f24b62dea8a5ceac178c661c4309d3aa0c3e420856c072c411b4"}, ] importlib-metadata = [ {file = "importlib_metadata-4.1.0-py3-none-any.whl", hash = "sha256:227b5fae29e4e51343000c1d43e4213f6e3bc6b995c39b6cf6e434dc8026a815"}, {file = "importlib_metadata-4.1.0.tar.gz", hash = "sha256:daff3ed4f1e4545d7e60d606e989b1727f482de5da7e4fc6b387f4cd5bca8ece"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] packaging = [ {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, ] pathspec = [ {file = "pathspec-0.8.1-py2.py3-none-any.whl", hash = "sha256:aa0cb481c4041bf52ffa7b0d8fa6cd3e88a2ca4879c533c9153882ee2556790d"}, {file = "pathspec-0.8.1.tar.gz", hash = "sha256:86379d6b86d75816baba717e64b1a3a3469deb93bb76d613c9ce79edc5cb68fd"}, ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] py = [ {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ {file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"}, {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, ] pytest-forked = [ {file = "pytest-forked-1.3.0.tar.gz", hash = "sha256:6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca"}, {file = "pytest_forked-1.3.0-py2.py3-none-any.whl", hash = "sha256:dc4147784048e70ef5d437951728825a131b81714b398d5d52f17c7c144d8815"}, ] pytest-testinfra = [ {file = "pytest-testinfra-6.3.0.tar.gz", hash = "sha256:3ee1817983b11f04489141058c2f99018daa26d21bc1bc759b6a22c7938aea55"}, {file = "pytest_testinfra-6.3.0-py3-none-any.whl", hash = "sha256:bbd1423b5938435f71be717842969f10d77b7d0e048b655a91e9f21e58a52237"}, ] pytest-xdist = [ {file = "pytest-xdist-2.2.1.tar.gz", hash = "sha256:718887296892f92683f6a51f25a3ae584993b06f7076ce1e1fd482e59a8220a2"}, {file = "pytest_xdist-2.2.1-py3-none-any.whl", hash = "sha256:2447a1592ab41745955fb870ac7023026f20a5f0bfccf1b52a879bd193d46450"}, ] regex = [ {file = "regex-2021.4.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:619d71c59a78b84d7f18891fe914446d07edd48dc8328c8e149cbe0929b4e000"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:47bf5bf60cf04d72bf6055ae5927a0bd9016096bf3d742fa50d9bf9f45aa0711"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:281d2fd05555079448537fe108d79eb031b403dac622621c78944c235f3fcf11"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:bd28bc2e3a772acbb07787c6308e00d9626ff89e3bfcdebe87fa5afbfdedf968"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:7c2a1af393fcc09e898beba5dd59196edaa3116191cc7257f9224beaed3e1aa0"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c38c71df845e2aabb7fb0b920d11a1b5ac8526005e533a8920aea97efb8ec6a4"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:96fcd1888ab4d03adfc9303a7b3c0bd78c5412b2bfbe76db5b56d9eae004907a"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:ade17eb5d643b7fead300a1641e9f45401c98eee23763e9ed66a43f92f20b4a7"}, {file = "regex-2021.4.4-cp36-cp36m-win32.whl", hash = "sha256:e8e5b509d5c2ff12f8418006d5a90e9436766133b564db0abaec92fd27fcee29"}, {file = "regex-2021.4.4-cp36-cp36m-win_amd64.whl", hash = "sha256:11d773d75fa650cd36f68d7ca936e3c7afaae41b863b8c387a22aaa78d3c5c79"}, {file = "regex-2021.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d3029c340cfbb3ac0a71798100ccc13b97dddf373a4ae56b6a72cf70dfd53bc8"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:18c071c3eb09c30a264879f0d310d37fe5d3a3111662438889ae2eb6fc570c31"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:4c557a7b470908b1712fe27fb1ef20772b78079808c87d20a90d051660b1d69a"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:01afaf2ec48e196ba91b37451aa353cb7eda77efe518e481707e0515025f0cd5"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:3a9cd17e6e5c7eb328517969e0cb0c3d31fd329298dd0c04af99ebf42e904f82"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:90f11ff637fe8798933fb29f5ae1148c978cccb0452005bf4c69e13db951e765"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:919859aa909429fb5aa9cf8807f6045592c85ef56fdd30a9a3747e513db2536e"}, {file = "regex-2021.4.4-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:339456e7d8c06dd36a22e451d58ef72cef293112b559010db3d054d5560ef439"}, {file = "regex-2021.4.4-cp37-cp37m-win32.whl", hash = "sha256:67bdb9702427ceddc6ef3dc382455e90f785af4c13d495f9626861763ee13f9d"}, {file = "regex-2021.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:32e65442138b7b76dd8173ffa2cf67356b7bc1768851dded39a7a13bf9223da3"}, {file = "regex-2021.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1e1c20e29358165242928c2de1482fb2cf4ea54a6a6dea2bd7a0e0d8ee321500"}, {file = "regex-2021.4.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:314d66636c494ed9c148a42731b3834496cc9a2c4251b1661e40936814542b14"}, {file = "regex-2021.4.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6d1b01031dedf2503631d0903cb563743f397ccaf6607a5e3b19a3d76fc10480"}, {file = "regex-2021.4.4-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:741a9647fcf2e45f3a1cf0e24f5e17febf3efe8d4ba1281dcc3aa0459ef424dc"}, {file = "regex-2021.4.4-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:4c46e22a0933dd783467cf32b3516299fb98cfebd895817d685130cc50cd1093"}, {file = "regex-2021.4.4-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:e512d8ef5ad7b898cdb2d8ee1cb09a8339e4f8be706d27eaa180c2f177248a10"}, {file = "regex-2021.4.4-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:980d7be47c84979d9136328d882f67ec5e50008681d94ecc8afa8a65ed1f4a6f"}, {file = "regex-2021.4.4-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:ce15b6d103daff8e9fee13cf7f0add05245a05d866e73926c358e871221eae87"}, {file = "regex-2021.4.4-cp38-cp38-win32.whl", hash = "sha256:a91aa8619b23b79bcbeb37abe286f2f408d2f2d6f29a17237afda55bb54e7aac"}, {file = "regex-2021.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:c0502c0fadef0d23b128605d69b58edb2c681c25d44574fc673b0e52dce71ee2"}, {file = "regex-2021.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:598585c9f0af8374c28edd609eb291b5726d7cbce16be6a8b95aa074d252ee17"}, {file = "regex-2021.4.4-cp39-cp39-manylinux1_i686.whl", hash = "sha256:ee54ff27bf0afaf4c3b3a62bcd016c12c3fdb4ec4f413391a90bd38bc3624605"}, {file = "regex-2021.4.4-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7d9884d86dd4dd489e981d94a65cd30d6f07203d90e98f6f657f05170f6324c9"}, {file = "regex-2021.4.4-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:bf5824bfac591ddb2c1f0a5f4ab72da28994548c708d2191e3b87dd207eb3ad7"}, {file = "regex-2021.4.4-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:563085e55b0d4fb8f746f6a335893bda5c2cef43b2f0258fe1020ab1dd874df8"}, {file = "regex-2021.4.4-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9c3db21af35e3b3c05764461b262d6f05bbca08a71a7849fd79d47ba7bc33ed"}, {file = "regex-2021.4.4-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:3916d08be28a1149fb97f7728fca1f7c15d309a9f9682d89d79db75d5e52091c"}, {file = "regex-2021.4.4-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:fd45ff9293d9274c5008a2054ecef86a9bfe819a67c7be1afb65e69b405b3042"}, {file = "regex-2021.4.4-cp39-cp39-win32.whl", hash = "sha256:fa4537fb4a98fe8fde99626e4681cc644bdcf2a795038533f9f711513a862ae6"}, {file = "regex-2021.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:97f29f57d5b84e73fbaf99ab3e26134e6687348e95ef6b48cfd2c06807005a07"}, {file = "regex-2021.4.4.tar.gz", hash = "sha256:52ba3d3f9b942c49d7e4bc105bb28551c44065f139a65062ab7912bef10c9afb"}, ] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] typed-ast = [ {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ] typing-extensions = [ {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, {file = "typing_extensions-3.10.0.0.tar.gz", hash = "sha256:50b6f157849174217d0656f99dc82fe932884fb250826c18350e159ec6cdf342"}, ] zipp = [ {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, ] 07070100000012000081A400000000000000000000000166B0933C0000022F000000000000000000000000000000000000003500000000ca-certificates-2+git20240805.fd24d50/pyproject.toml[tool.poetry] name = "ca-certificates" version = "2" description = "Utilities for system wide CA certificate installation" authors = ["Ludwig Nussel <ludwig.nussel@suse.de>"] license = "GPL-2.0" [tool.poetry.dependencies] python = ">= 3.6.2" [tool.poetry.dev-dependencies] pytest-testinfra = "^6.3.0" pytest = "^6.2.4" black = "^21.5b1" pytest-xdist = "^2.2.1" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.black] line-length = 79 target-version = ['py36'] [tool.pytest.ini_options] xfail_strict = true 07070100000013000081A400000000000000000000000166B0933C00001488000000000000000000000000000000000000004500000000ca-certificates-2+git20240805.fd24d50/test_update_ca_certificates.pyimport pytest HOOKSDIR1 = "/etc/ca-certificates/update.d" HOOKSDIR2 = "/usr/lib/ca-certificates/update.d" HOOK_ARGS_PATH = "/hook_args" LISTENER_SCRIPT_DEST = HOOKSDIR2 + "/foo.run" LISTENER_SCRIPT = ( r"""#!/bin/bash echo "\$@" > """ + HOOK_ARGS_PATH ) BAR_HOOK = "bar.run" def copy_listener_script(container_connection): if container_connection.file(HOOK_ARGS_PATH).exists: container_connection.run_expect([0], "rm " + HOOK_ARGS_PATH) if not container_connection.file(LISTENER_SCRIPT_DEST).exists: container_connection.run_expect( [0], "\n".join( ( "cat << EOF > " + LISTENER_SCRIPT_DEST, LISTENER_SCRIPT, "EOF", ) ), ) container_connection.run_expect( [0], "chmod +x " + LISTENER_SCRIPT_DEST ) def test_does_nothing_under_transactional_update(container): container.run_expect([0], "echo foo > /etc/pki/trust/.updated") container.run_expect( [0], "TRANSACTIONAL_UPDATE=1 /bin/update-ca-certificates" ) assert container.file("/etc/pki/trust/.updated").exists assert container.file("/etc/pki/trust/.updated").content_string == "" def test_prints_help(container): assert ( container.run_expect([0], "/bin/update-ca-certificates --help").stdout == """USAGE: /bin/update-ca-certificates [OPTIONS] OPTIONS: --verbose, -v verbose output --root <Directory> Root directory to use (default: /) --fresh, -f start from scratch --help, -h this screen """ ) def test_reports_invalid_options(container): res = container.run_expect([1], "/bin/update-ca-certificates --foobar") assert res.stdout == "" assert res.stderr == "invalid option: --foobar\n" @pytest.mark.parametrize( "flag", [ "", "-f", "-v", "-v -f", "-f -v", ], ) def test_runs_the_hooks_in_hookdirs(container, flag): copy_listener_script(container) res = container.run_expect([0], "/bin/update-ca-certificates " + flag) if "-v" in flag: assert "running " + LISTENER_SCRIPT_DEST + " .." in res.stdout passed_flags = ( " ".join( filter(None, (f if f in flag else None for f in ("-f", "-v"))) ) + "\n" ) assert container.file(HOOK_ARGS_PATH).content_string == passed_flags assert not container.file("/etc/pki/trust/.updated").exists def test_prefers_hooks_in_etc(container): for hookdir in (HOOKSDIR1, HOOKSDIR2): dest = hookdir + "/" + BAR_HOOK container.run_expect([0], 'echo "#!/bin/bash" >' + dest) container.run_expect([0], "chmod +x " + dest) res = container.run_expect([0], "/bin/update-ca-certificates -v") assert "running " + HOOKSDIR1 + "/" + BAR_HOOK + " .." in res.stdout assert "running " + HOOKSDIR2 + "/" + BAR_HOOK + " .." not in res.stdout for hookdir in (HOOKSDIR1, HOOKSDIR2): container.run_expect([0], "rm " + hookdir + "/" + BAR_HOOK) @pytest.mark.parametrize("hookdir", [HOOKSDIR1, HOOKSDIR2]) def test_ignores_directories(container, hookdir): dest = hookdir + "/" + BAR_HOOK container.run_expect([0], "mkdir " + dest) res = container.run_expect([0], "/bin/update-ca-certificates -v") assert "running " + dest + " .." not in res.stdout container.run_expect([0], "rmdir " + dest) @pytest.mark.parametrize("hookdir", [HOOKSDIR1, HOOKSDIR2]) def test_does_not_execute_files_not_called_dot_run(container, hookdir): dest = hookdir + "/" + "run" container.run_expect([0], "touch " + dest) res = container.run_expect([0], "/bin/update-ca-certificates -v") assert "running " + dest + " .." not in res.stdout container.run_expect([0], "rm " + dest) @pytest.mark.parametrize("hookdir", [HOOKSDIR1, HOOKSDIR2]) def test_ignores_hooks_in_subdirectories(container, hookdir): subdir = hookdir + "/" + "test" dest = subdir + "/" + BAR_HOOK container.run_expect([0], "mkdir " + subdir) container.run_expect([0], 'echo "#!/bin/bash" >' + dest) container.run_expect([0], "chmod +x " + dest) container.run_expect([0], dest) res = container.run_expect([0], "/bin/update-ca-certificates -v") assert "running " + dest + " .." not in res.stdout container.run_expect([0], "rm -rf " + subdir) def test_runs_hooks_in_sorted_order(container): hooks = [HOOKSDIR1 + "/" + hook for hook in ("10foo.run", "20bar.run")] for hook in hooks: container.run_expect([0], 'echo "#!/bin/bash" >' + hook) container.run_expect([0], "chmod +x " + hook) container.run_expect([0], hook) res = container.run_expect([0], "/bin/update-ca-certificates -v") for hook in hooks: assert "running " + hook + " .." in res.stdout container.run_expect([0], "rm " + hook) assert res.stdout.index(hooks[0]) < res.stdout.index(hooks[1]) def test_skips_hooks_symlinked_to_dev_null(container): HOOK = HOOKSDIR1 + "/50foobar.run" container.run_expect([0], "ln -sf /dev/null " + HOOK) res = container.run_expect([0], "/bin/update-ca-certificates -v") assert "skipping " + HOOK in res.stdout 07070100000014000081ED00000000000000000000000166B0933C00000B10000000000000000000000000000000000000003D00000000ca-certificates-2+git20240805.fd24d50/update-ca-certificates#!/bin/bash # # update-ca-certificates # # Copyright (c) 2010,2013 SUSE Linux Products GmbH # Copyright (c) 2020,2021 SUSE LLC # Author: Ludwig Nussel # # Inspired by Debian's update-ca-certificates # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, # USA. # statedir='/var/lib/ca-certificates' hooksdir1='/etc/ca-certificates/update.d' hooksdir2='/usr/lib/ca-certificates/update.d' verbose= destdir=/ fresh= export statedir help_and_exit() { cat <<-EOF USAGE: $0 [OPTIONS] OPTIONS: --verbose, -v verbose output --root <Directory> Root directory to use (default: $destdir) --fresh, -f start from scratch --help, -h this screen EOF exit 0 } args=("$@") while [ $# -gt 0 ]; do param="$1" arg="$2" test "$arg" = "${arg#-}" || arg= shift case "$param" in -v|--verbose) verbose='-v' ;; -f|--fresh) fresh='-f' ;; -r|--root) destdir="$arg"; shift if [ -z "$destdir" ]; then echo "-r option requires parameter <directory>" exit 1 fi ;; -h|--help) help_and_exit ;; -*) echo "invalid option: $param" >&2; exit 1 ;; esac done # set sane umask umask 0222; case "${TRANSACTIONAL_UPDATE,,*}" in true|yes|1) [ -z "$verbose" ] || echo "transactional update in progress, not running any scripts" >&2 > /etc/pki/trust/.updated exit 0 ;; esac rm -f /etc/pki/trust/.updated export destdir install -d -m 0755 "$destdir/$statedir" # serialize calls if we can if [ -z "$_CA_CERTIFICATES_LOCKED" -a -x /usr/bin/flock ]; then export _CA_CERTIFICATES_LOCKED="1" set -- "${args[@]}" exec /usr/bin/flock "$destdir/$statedir" "$0" "$@" echo "failed to lock $destdir/$statedir\n" >&2 exit 1 fi function find_hooks { shopt -s nullglob for hooksdir in $hooksdir1 $hooksdir2; do for f in "$hooksdir"/*.run; do if [ -L "$f" ] || [ -f "$f" ]; then echo "${f##*/}" "$f" fi done done } while read s f; do if [ -L "$f" -a "`readlink "$f"`" = "/dev/null" ]; then [ -z "$verbose" ] || echo "skipping $f" continue else [ -z "$verbose" ] || echo "running $f .." fi "$f" $fresh $verbose done < <(find_hooks|sort -k 1,1 -u) chmod 0555 "$destdir/$statedir" 07070100000015000081A400000000000000000000000166B0933C00000935000000000000000000000000000000000000003F00000000ca-certificates-2+git20240805.fd24d50/update-ca-certificates.8.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH UPDATE-CA-CERTIFICATES 8 "27 April 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp <n> insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME update-ca-certificates \- update system CA certificates .SH SYNOPSIS .B update-ca-certificates .RI [ options ] .SH DESCRIPTION \fBupdate-ca-certificates\fP is intended to keep the certificate stores of various components in sync with the system CA certificates. .PP The canonical source of CA certificates is what p11-kit knows about. By default p11-kit looks into /usr/share/pki/anchors resp /etc/pki/trust/anchors but there could be other plugins that serve as source for certificates as well. .PP To blacklist certificates symlinks to the respective certificates can be placed in /etc/pki/trust/blacklist .PP \fBupdate-ca-certificates\fP invokes custom hooks in /usr/lib/ca-certificates/update.d/*.run and /etc/ca-certificates/update.d/*.run to generate various certificate storages as used by different programs. The command line options used for invoking update-ca-certificates are passed to the hooks as well. .SH OPTIONS A summary of options is included below. .TP .B \-h, \-\-help Show summary of options. .TP .B \-v, \-\-verbose Be verbose. Output \fBc_rehash\fP. .TP .B \-r, \-\-root <Directory> Root Directory to use (defaults to / if not specified). .TP .B \-f, \-\-fresh Fresh updates. Don't update stores incrementally but create from scratch. .SH FILES .TP .I /usr/share/pki/trust/anchors Directory of CA certificate trust anchors. .TP .I /usr/share/pki/trust/blacklist Directory of blacklisted CA certificates .TP .I /etc/pki/trust/anchors Directory of CA certificate trust anchors for use by the admin .TP .I /etc/pki/trust/blacklist Directory of blacklisted CA certificates for use by the admin .SH SEE ALSO .BR c_rehash (1), 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!150 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor