From 2e59f88d76e6a1f4c57756dd020de535d5ebb8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=91=D0=BE=D1=80=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Tue, 26 May 2026 17:11:13 +0200 Subject: [PATCH] working commit --- .githook/pre-commit | 29 + .gitignore | 24 + Containerfile | 26 + LICENSE.txt | 439 +++ Makefile.am | 186 ++ Makefile.in | 1081 ++++++ README.md | 3 + aclocal.m4 | 977 ++++++ app/config/config.go | 159 + app/config/variant.go.in | 10 + app/handler/aaafunc.go | 66 + app/handler/connect.go | 27 + app/handler/handler.go | 41 + app/handler/notfound.go | 15 + app/handler/response.go | 36 + app/handler/service.go | 15 + app/logger/logger.go | 84 + app/logger/logger_test.go | 33 + app/proxoper/connect.go | 23 + app/proxoper/operator.go | 21 + app/router/bindobj.go | 57 + app/router/context.go | 150 + app/router/corsmw.go | 36 + app/router/loggingmw.go | 31 + app/router/pathc.go | 72 + app/router/pathc_test.go | 49 + app/router/recovermw.go | 43 + app/router/router.go | 166 + app/router/router_test.go | 195 ++ app/server/server.go | 418 +++ app/service/service.go | 136 + app/servoper/operator.go | 21 + app/servoper/service.go | 20 + cmd/mproxyctl/main.go | 22 + cmd/mproxyctl/util/util.go | 49 + cmd/mproxyd/main.go | 24 + cmd/mproxyd/starter/starter.go | 75 + config.guess | 1815 ++++++++++ config.sub | 2354 +++++++++++++ configure | 5139 +++++++++++++++++++++++++++++ configure.ac | 256 ++ debian/.gitignore | 4 + debian/README.Debian | 1 + debian/changelog.in | 5 + debian/compat | 1 + debian/control.in | 15 + debian/files | 5 + debian/mproxy-control.install | 2 + debian/mproxy-control.postinst | 2 + debian/mproxy-control.postrm | 2 + debian/mproxy-control.preinst | 20 + debian/mproxy-control.prerm | 2 + debian/mproxy-service.install | 6 + debian/mproxy-service.postinst | 6 + debian/mproxy-service.postrm | 3 + debian/mproxy-service.preinst | 20 + debian/mproxy-service.prerm | 7 + debian/patches/series | 1 + debian/rules | 13 + debian/source/format | 1 + debian/source/include-binaries | 0 debian/watch | 1 + docs/helm-chart-manifest.json.txt | 22 + docs/mstore.drawio | 85 + docs/mstore.png | Bin 0 -> 35764 bytes docs/podman-manifest.json.txt | 32 + etc/mproxy/mproxyd.crt | 54 + etc/mproxy/mproxyd.key | 5 + etc/mproxy/mproxyd.yaml | 5 + go.mod | 118 + go.sum | 384 +++ initrc/.gitignore | 3 + initrc/mproxyd | 24 + initrc/mproxyd.in | 24 + initrc/mproxyd.service | 12 + initrc/mproxyd.service.in | 12 + install-sh | 541 +++ mans/Makefile.am | 29 + mans/Makefile.in | 585 ++++ mans/makeman-mstorectl.go | 49 + mans/makeman-mstored.go | 48 + mans/mproxyctl.1 | 23 + mans/mproxyd.8 | 31 + missing | 236 ++ pkg/auxhttp/basic.go | 52 + pkg/auxhttp/crange.go | 93 + pkg/auxpwd/passwd.go | 107 + pkg/auxpwd/passwd_test.go | 43 + pkg/auxtool/cleandir.go | 37 + pkg/auxtool/fileex.go | 31 + pkg/auxtool/randstr.go | 22 + pkg/auxtool/tmpfile.go | 22 + pkg/auxtool/unixnow.go | 13 + pkg/auxutar/utar.go | 151 + pkg/auxuuid/uuid.go | 14 + pkg/auxx509/x509cert.go | 66 + pkg/auxx509/x509cert_test.go | 18 + pkg/client/attic/file.go | 417 +++ pkg/servcli/client.go | 131 + pkg/servcli/httpcall.go | 56 + pkg/servcli/referer.go | 77 + pkg/servcli/servhello.go | 36 + pkg/terms/terms.go | 28 + 103 files changed, 18276 insertions(+) create mode 100755 .githook/pre-commit create mode 100644 .gitignore create mode 100644 Containerfile create mode 100644 LICENSE.txt create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 README.md create mode 100644 aclocal.m4 create mode 100644 app/config/config.go create mode 100644 app/config/variant.go.in create mode 100644 app/handler/aaafunc.go create mode 100644 app/handler/connect.go create mode 100644 app/handler/handler.go create mode 100644 app/handler/notfound.go create mode 100644 app/handler/response.go create mode 100644 app/handler/service.go create mode 100644 app/logger/logger.go create mode 100644 app/logger/logger_test.go create mode 100644 app/proxoper/connect.go create mode 100644 app/proxoper/operator.go create mode 100644 app/router/bindobj.go create mode 100644 app/router/context.go create mode 100644 app/router/corsmw.go create mode 100644 app/router/loggingmw.go create mode 100644 app/router/pathc.go create mode 100644 app/router/pathc_test.go create mode 100644 app/router/recovermw.go create mode 100644 app/router/router.go create mode 100644 app/router/router_test.go create mode 100644 app/server/server.go create mode 100644 app/service/service.go create mode 100644 app/servoper/operator.go create mode 100644 app/servoper/service.go create mode 100644 cmd/mproxyctl/main.go create mode 100644 cmd/mproxyctl/util/util.go create mode 100644 cmd/mproxyd/main.go create mode 100644 cmd/mproxyd/starter/starter.go create mode 100755 config.guess create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100644 debian/.gitignore create mode 100644 debian/README.Debian create mode 100644 debian/changelog.in create mode 100644 debian/compat create mode 100644 debian/control.in create mode 100644 debian/files create mode 100644 debian/mproxy-control.install create mode 100755 debian/mproxy-control.postinst create mode 100755 debian/mproxy-control.postrm create mode 100755 debian/mproxy-control.preinst create mode 100755 debian/mproxy-control.prerm create mode 100644 debian/mproxy-service.install create mode 100755 debian/mproxy-service.postinst create mode 100755 debian/mproxy-service.postrm create mode 100755 debian/mproxy-service.preinst create mode 100755 debian/mproxy-service.prerm create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/include-binaries create mode 100644 debian/watch create mode 100644 docs/helm-chart-manifest.json.txt create mode 100644 docs/mstore.drawio create mode 100644 docs/mstore.png create mode 100644 docs/podman-manifest.json.txt create mode 100644 etc/mproxy/mproxyd.crt create mode 100644 etc/mproxy/mproxyd.key create mode 100644 etc/mproxy/mproxyd.yaml create mode 100644 go.mod create mode 100644 go.sum create mode 100644 initrc/.gitignore create mode 100644 initrc/mproxyd create mode 100644 initrc/mproxyd.in create mode 100644 initrc/mproxyd.service create mode 100644 initrc/mproxyd.service.in create mode 100755 install-sh create mode 100644 mans/Makefile.am create mode 100644 mans/Makefile.in create mode 100644 mans/makeman-mstorectl.go create mode 100644 mans/makeman-mstored.go create mode 100644 mans/mproxyctl.1 create mode 100644 mans/mproxyd.8 create mode 100755 missing create mode 100644 pkg/auxhttp/basic.go create mode 100644 pkg/auxhttp/crange.go create mode 100644 pkg/auxpwd/passwd.go create mode 100644 pkg/auxpwd/passwd_test.go create mode 100644 pkg/auxtool/cleandir.go create mode 100644 pkg/auxtool/fileex.go create mode 100644 pkg/auxtool/randstr.go create mode 100644 pkg/auxtool/tmpfile.go create mode 100644 pkg/auxtool/unixnow.go create mode 100644 pkg/auxutar/utar.go create mode 100644 pkg/auxuuid/uuid.go create mode 100644 pkg/auxx509/x509cert.go create mode 100644 pkg/auxx509/x509cert_test.go create mode 100644 pkg/client/attic/file.go create mode 100644 pkg/servcli/client.go create mode 100644 pkg/servcli/httpcall.go create mode 100644 pkg/servcli/referer.go create mode 100644 pkg/servcli/servhello.go create mode 100644 pkg/terms/terms.go diff --git a/.githook/pre-commit b/.githook/pre-commit new file mode 100755 index 0000000..144bbc0 --- /dev/null +++ b/.githook/pre-commit @@ -0,0 +1,29 @@ +#!/bin/sh +MAX_SIZE=1024 # 1 MB limit in KB +for file in $(git diff --cached --name-only --diff-filter=ACM); do + if [ ! -e "$file" ]; then continue; fi + size=$(du -k "$file" | cut -f1) + if [ $size -gt $MAX_SIZE ]; then + echo "Error: File $file is larger than the allowed size of $((MAX_SIZE / 1024)) MB." + exit 1 + fi +done + +status=0 + +for file in $(git diff --cached --name-only | grep -E '\.go$'); do + badfile=$(gofmt -l "$file") + if test -n "$badfile" ; then + echo "Error: file needs gofmt: $badfile" + status=1 + fi +done + +# If any files were not formatted, exit with a non-zero status to abort the commit. +if [ "$status" -ne 0 ]; then + echo "git pre-commit check failed: some Go files are not formatted." + exit 1 +fi + + +exit 0 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df83a18 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +*~ +autom4te.cache +Makefile +config.status +config.log +cmd/mbased/mbased +cmd/mbasectl/mbasectl +*.db +*.db-shm +*.db-wal +*.tar.* +*.tmp.* +*.tar +*.bin +tmp +mbased +mbasectl +DIST +*.tar.gz +*.deb +*.rpm +mbased.service +variant.go +initrc/mbased diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..7e55a2e --- /dev/null +++ b/Containerfile @@ -0,0 +1,26 @@ +FROM alpine:3.23 AS builder + +RUN apk --no-cache add make binutils gcc libc-dev automake autoconf curl +RUN curl -o /usr/local/lib/go.tar.gz https://dl.google.com/go/go1.26.2.linux-amd64.tar.gz +RUN cd /usr/local/lib && tar xzf go.tar.gz +RUN cd /usr/local/bin && ln -sf ../lib/go/bin/* . + +WORKDIR /app/src/ +COPY go.mod go.sum . +COPY . . + +RUN ./configure --prefix=/app +RUN make all install +RUN make clean +RUN rm -rf /app/src + +FROM alpine:3.23 AS runner + +COPY --from=builder /app /app +RUN chmod 1777 /var +RUN mkdir -p /app/etc/mbase +RUN touch /app/etc/mbase/mbased.yaml +WORKDIR /app + +#USER daemon:daemon +ENTRYPOINT ["/app/sbin/mbased", "--asDaemon=false"] diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..6419476 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,439 @@ + +Attribution-NonCommercial-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International +Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-NonCommercial-ShareAlike 4.0 International Public License +("Public License"). To the extent this Public License may be +interpreted as a contract, You are granted the Licensed Rights in +consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the +Licensor receives from making the Licensed Material available under +these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-NC-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution, NonCommercial, and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. NonCommercial means not primarily intended for or directed towards + commercial advantage or monetary compensation. For purposes of + this Public License, the exchange of the Licensed Material for + other material subject to Copyright and Similar Rights by digital + file-sharing or similar means is NonCommercial provided there is + no payment of monetary compensation in connection with the + exchange. + + l. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + m. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + n. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part, for NonCommercial purposes only; and + + b. produce, reproduce, and Share Adapted Material for + NonCommercial purposes only. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties, including when + the Licensed Material is used other than for NonCommercial + purposes. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-NC-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database for NonCommercial purposes + only; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + including for purposes of Section 3(b); and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..7107ee9 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,186 @@ + +AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo + +SUBDIRS = mans + +GOFLAGS= -v +bin_PROGRAMS = mproxyctl +sbin_PROGRAMS = mproxyd + +mproxyctl_SOURCES = \ + cmd/mproxyctl/main.go + +EXTRA_mproxyctl_SOURCES = \ + cmd/mproxyctl/util/util.go + +mproxyd_SOURCES = cmd/mproxyd/main.go + +EXTRA_mproxyd_SOURCES = cmd/mproxyd/starter/starter.go + +mproxyctl$(EXEEXT): $(mproxyctl_SOURCES) $(EXTRA_mproxyctl_SOURCES) $(EXTRA_mbased_SOURCES) + env CGO_ENABLED=0 $(GO) build $(GOFLAGS) -o mproxyctl$(EXEEXT) $(mproxyctl_SOURCES) + +mproxyd$(EXEEXT): $(mproxyd_SOURCES) $(EXTRA_mproxyd_SOURCES) + env CGO_ENABLED=1 $(GO) build $(GOFLAGS) -o mproxyd$(EXEEXT) $(mproxyd_SOURCES) + +run: $(mproxyd_SOURCES) + cd cmd/mproxyd && env CGO_ENABLED=1 $(GO) run . --asDaemon=false --port=443 + +CWD=$(shell pwd) + +EXTRA_mproxyd_SOURCES += \ + app/config/config.go \ + app/config/variant.go \ + app/handler/aaafunc.go \ + app/handler/account.go \ + app/handler/grant.go \ + app/handler/handler.go \ + app/handler/notfound.go \ + app/handler/response.go \ + app/handler/service.go \ + app/locker/locker.go \ + app/logger/logger.go \ + app/router/bindobj.go \ + app/router/context.go \ + app/router/corsmw.go \ + app/router/loggingmw.go \ + app/router/pathc.go \ + app/router/recovermw.go \ + app/router/router.go \ + app/server/server.go \ + app/server/listen.go \ + app/service/service.go \ + \ + app/servoper/operator.go \ + app/servoper/service.go \ + \ + pkg/auxhttp/basic.go \ + pkg/auxhttp/crange.go \ + pkg/auxpwd/passwd.go \ + pkg/auxtool/cleandir.go \ + pkg/auxtool/fileex.go \ + pkg/auxtool/randstr.go \ + pkg/auxtool/tmpfile.go \ + pkg/auxtool/unixnow.go \ + pkg/auxutar/utar.go \ + pkg/auxuuid/uuid.go \ + pkg/auxx509/x509cert.go \ + pkg/terms/terms.go + + +EXTRA_DIST = vendor/* \ + \ + Containerfile \ + go.mod \ + go.sum \ + LICENSE.txt \ + README.md \ + DEVEL.md \ + \ + debian/changelog.in \ + debian/compat \ + debian/control.in \ + debian/files \ + debian/.gitignore \ + debian/mproxy-control.install \ + debian/mproxy-control.postinst \ + debian/mproxy-control.postrm \ + debian/mproxy-control.preinst \ + debian/mproxy-control.prerm \ + debian/mproxy-service.install \ + debian/mproxy-service.postinst \ + debian/mproxy-service.postrm \ + debian/mproxy-service.preinst \ + debian/mproxy-service.prerm \ + debian/patches/series \ + debian/README.Debian \ + debian/rules \ + debian/source/format \ + debian/source/include-binaries \ + debian/watch \ + \ + initrc/.gitignore \ + initrc/mproxyd.in \ + initrc/mproxyd.service.in \ + \ + app/router/pathc_test.go \ + app/router/router_test.go \ + pkg/auxpwd/passwd_test.go \ + pkg/auxx509/x509cert_test.go + +format: + @dirs=$$($(FIND) $(CWD)/app $(CWD)/cmd $(CWD)/pkg \ + -name '*.go' | $(XARGS) -n1 dirname | $(SORT) | $(UNIQ)); \ + for dir in $$dirs;do \ + (echo "====$$dir===="; cd $$dir && $(GO) fmt .); \ + done + +DIST_DIR= $(shell pwd)/DIST +BUILD_DIR= $(shell pwd)/BUILD + +IMAGE_REPO = localhost +IMAGE_NAME = $(PACKAGE_NAME):$(PACKAGE_VERSION) +IMAGE_TARNAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION).img +IMAGE_CONTAINERFILE = Containerfile + +image:: build-image +build-image: clean +# $(GO) mod vendor + mkdir -p $(DIST_DIR) + $(SUDO) $(PODMAN) build -t $(IMAGE_REPO)/$(IMAGE_NAME) -f $(IMAGE_CONTAINERFILE) . + rm -f $(DIST_DIR)/$(IMAGE_TARNAME) + $(SUDO) $(PODMAN) image save $(IMAGE_REPO)/$(IMAGE_NAME) --format oci-archive \ + -o $(DIST_DIR)/$(IMAGE_TARNAME) + username=$$(whoami); \ + $(SUDO) chown $$username $(DIST_DIR)/$(IMAGE_TARNAME) +# rm -rf vendor + +$(DIST_ARCHIVES): dist + +package:: debian-package +debian-package: $(DIST_ARCHIVES) + mkdir -p $(BUILD_DIR) + mv $(DIST_ARCHIVES) $(BUILD_DIR) + cd $(BUILD_DIR) && $(AMTAR) -xf $(DIST_ARCHIVES) + cd $(BUILD_DIR)/$(distdir) && ./configure --prefix=/usr + cd $(BUILD_DIR)/$(distdir) && $(MAKE) clean + cd $(BUILD_DIR)/$(distdir) && $(DPKGSOURCE) -i --before-build . + cd $(BUILD_DIR)/$(distdir) && $(DBUILDPACKAGE) -nc -us -uc -ui -i -b + mkdir -p $(DIST_DIR) + $(CP) $(BUILD_DIR)/*.deb $(DIST_DIR) + rm -rf $(BUILD_DIR) + +FREEBSD_LOCALBASE = /usr/local +FREEBSD_RCDIR = $(FREEBSD_LOCALBASE)/etc/rc.d +LINUX_SYSTEMDDIR = /lib/systemd/system + +install-data-local: + test -z $(DESTDIR)$(srv_confdir) || $(MKDIR_P) $(DESTDIR)$(srv_confdir) + test -z $(DESTDIR)$(srv_logdir) || $(MKDIR_P) $(DESTDIR)$(srv_logdir) + test -z $(DESTDIR)$(srv_rundir) || $(MKDIR_P) $(DESTDIR)$(srv_rundir) + test -z $(DESTDIR)$(srv_datadir) || $(MKDIR_P) $(DESTDIR)$(srv_datadir) +if FREEBSD_OS + test -z $(DESTDIR)$(FREEBSD_RCDIR) || $(MKDIR_P) $(DESTDIR)$(FREEBSD_RCDIR) + $(INSTALL_DATA) initrc/mproxyd $(DESTDIR)$(FREEBSD_RCDIR) + chmod a+x $(DESTDIR)$(FREEBSD_RCDIR)/mproxyd +endif +if LINUX_OS +if SYSTEMD + test -z $(DESTDIR)$(LINUX_SYSTEMDDIR) || $(MKDIR_P) $(DESTDIR)$(LINUX_SYSTEMDDIR) + $(INSTALL_DATA) initrc/mproxyd.service $(DESTDIR)$(LINUX_SYSTEMDDIR) +endif +endif + +clean-local: + $(FIND) $(CWD) -name '*~' | $(XARGS) rm -f + rm -rf autom4te.cache + rm -f cmd/mproxyd/mproxyd + rm -f cmd/mproxyctl/mproxyctl +# rm -rf tmp/ + +distclean-local: + rm -rf autom4te.cache + rm -rf $(DIST_DIR) + rm -rf tmp/ + + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..11def6f --- /dev/null +++ b/Makefile.in @@ -0,0 +1,1081 @@ +# Makefile.in generated by automake 1.17 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2024 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = mproxyctl$(EXEEXT) +sbin_PROGRAMS = mproxyd$(EXEEXT) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = app/config/variant.go initrc/mproxyd.service \ + initrc/mproxyd debian/control debian/changelog +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" +PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) +am_mproxyctl_OBJECTS = +mproxyctl_OBJECTS = $(am_mproxyctl_OBJECTS) +mproxyctl_LDADD = $(LDADD) +am_mproxyd_OBJECTS = +mproxyd_OBJECTS = $(am_mproxyd_OBJECTS) +mproxyd_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__maybe_remake_depfiles = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(mproxyctl_SOURCES) $(EXTRA_mproxyctl_SOURCES) \ + $(mproxyd_SOURCES) $(EXTRA_mproxyd_SOURCES) +DIST_SOURCES = $(mproxyctl_SOURCES) $(EXTRA_mproxyctl_SOURCES) \ + $(mproxyd_SOURCES) $(EXTRA_mproxyd_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir distdir-am dist dist-all distcheck +am__extra_recursive_targets = docs-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/app/config/variant.go.in \ + $(top_srcdir)/debian/changelog.in \ + $(top_srcdir)/debian/control.in \ + $(top_srcdir)/initrc/mproxyd.in \ + $(top_srcdir)/initrc/mproxyd.service.in README.md config.guess \ + config.sub install-sh missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ + ; rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = -9 +DIST_TARGETS = dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = \ + find . \( -type f -a \! \ + \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASENAME = @BASENAME@ +CP = @CP@ +CPIO = @CPIO@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUILDPACKAGE = @DBUILDPACKAGE@ +DEFS = @DEFS@ +DPKGSOURCE = @DPKGSOURCE@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ETAGS = @ETAGS@ +FIND = @FIND@ +GO = @GO@ +HAVE_GO = @HAVE_GO@ +HELM = @HELM@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PODMAN = @PODMAN@ +ROOT_GROUP = @ROOT_GROUP@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SORT = @SORT@ +STRIP = @STRIP@ +SUDO = @SUDO@ +SWAG = @SWAG@ +UNIQ = @UNIQ@ +VERSION = @VERSION@ +XARGS = @XARGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__rm_f_notfound = @am__rm_f_notfound@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +srv_confdir = @srv_confdir@ +srv_datadir = @srv_datadir@ +srv_devel_mode = @srv_devel_mode@ +srv_libdir = @srv_libdir@ +srv_logdir = @srv_logdir@ +srv_rundir = @srv_rundir@ +srv_sharedir = @srv_sharedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo +SUBDIRS = mans +GOFLAGS = -v +mproxyctl_SOURCES = \ + cmd/mproxyctl/main.go + +EXTRA_mproxyctl_SOURCES = \ + cmd/mproxyctl/util/util.go + +mproxyd_SOURCES = cmd/mproxyd/main.go +EXTRA_mproxyd_SOURCES = cmd/mproxyd/starter/starter.go \ + app/config/config.go app/config/variant.go \ + app/handler/aaafunc.go app/handler/account.go \ + app/handler/grant.go app/handler/handler.go \ + app/handler/notfound.go app/handler/response.go \ + app/handler/service.go app/locker/locker.go \ + app/logger/logger.go app/router/bindobj.go \ + app/router/context.go app/router/corsmw.go \ + app/router/loggingmw.go app/router/pathc.go \ + app/router/recovermw.go app/router/router.go \ + app/server/server.go app/server/listen.go \ + app/service/service.go app/servoper/operator.go \ + app/servoper/service.go pkg/auxhttp/basic.go \ + pkg/auxhttp/crange.go pkg/auxpwd/passwd.go \ + pkg/auxtool/cleandir.go pkg/auxtool/fileex.go \ + pkg/auxtool/randstr.go pkg/auxtool/tmpfile.go \ + pkg/auxtool/unixnow.go pkg/auxutar/utar.go pkg/auxuuid/uuid.go \ + pkg/auxx509/x509cert.go pkg/terms/terms.go +CWD = $(shell pwd) +EXTRA_DIST = vendor/* \ + \ + Containerfile \ + go.mod \ + go.sum \ + LICENSE.txt \ + README.md \ + DEVEL.md \ + \ + debian/changelog.in \ + debian/compat \ + debian/control.in \ + debian/files \ + debian/.gitignore \ + debian/mproxy-control.install \ + debian/mproxy-control.postinst \ + debian/mproxy-control.postrm \ + debian/mproxy-control.preinst \ + debian/mproxy-control.prerm \ + debian/mproxy-service.install \ + debian/mproxy-service.postinst \ + debian/mproxy-service.postrm \ + debian/mproxy-service.preinst \ + debian/mproxy-service.prerm \ + debian/patches/series \ + debian/README.Debian \ + debian/rules \ + debian/source/format \ + debian/source/include-binaries \ + debian/watch \ + \ + initrc/.gitignore \ + initrc/mproxyd.in \ + initrc/mproxyd.service.in \ + \ + app/router/pathc_test.go \ + app/router/router_test.go \ + pkg/auxpwd/passwd_test.go \ + pkg/auxx509/x509cert_test.go + +DIST_DIR = $(shell pwd)/DIST +BUILD_DIR = $(shell pwd)/BUILD +IMAGE_REPO = localhost +IMAGE_NAME = $(PACKAGE_NAME):$(PACKAGE_VERSION) +IMAGE_TARNAME = $(PACKAGE_NAME)-$(PACKAGE_VERSION).img +IMAGE_CONTAINERFILE = Containerfile +FREEBSD_LOCALBASE = /usr/local +FREEBSD_RCDIR = $(FREEBSD_LOCALBASE)/etc/rc.d +LINUX_SYSTEMDDIR = /lib/systemd/system +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +app/config/variant.go: $(top_builddir)/config.status $(top_srcdir)/app/config/variant.go.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +initrc/mproxyd.service: $(top_builddir)/config.status $(top_srcdir)/initrc/mproxyd.service.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +initrc/mproxyd: $(top_builddir)/config.status $(top_srcdir)/initrc/mproxyd.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +debian/control: $(top_builddir)/config.status $(top_srcdir)/debian/control.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +debian/changelog: $(top_builddir)/config.status $(top_srcdir)/debian/changelog.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files + +clean-binPROGRAMS: + -$(am__rm_f) $(bin_PROGRAMS) +install-sbinPROGRAMS: $(sbin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-sbinPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && $(am__rm_f) $$files + +clean-sbinPROGRAMS: + -$(am__rm_f) $(sbin_PROGRAMS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +docs-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + $(am__remove_distdir) + $(AM_V_at)$(MKDIR_P) "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(PROGRAMS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-local \ + clean-sbinPROGRAMS mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-local distclean-tags + +docs: docs-recursive + +docs-am: docs-local + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-data-local + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-sbinPROGRAMS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-binPROGRAMS \ + clean-cscope clean-generic clean-local clean-sbinPROGRAMS \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + dist-zstd distcheck distclean distclean-compile \ + distclean-generic distclean-local distclean-tags \ + distcleancheck distdir distuninstallcheck docs-am docs-local \ + dvi dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-sbinPROGRAMS install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-sbinPROGRAMS + +.PRECIOUS: Makefile + + +mproxyctl$(EXEEXT): $(mproxyctl_SOURCES) $(EXTRA_mproxyctl_SOURCES) $(EXTRA_mbased_SOURCES) + env CGO_ENABLED=0 $(GO) build $(GOFLAGS) -o mproxyctl$(EXEEXT) $(mproxyctl_SOURCES) + +mproxyd$(EXEEXT): $(mproxyd_SOURCES) $(EXTRA_mproxyd_SOURCES) + env CGO_ENABLED=1 $(GO) build $(GOFLAGS) -o mproxyd$(EXEEXT) $(mproxyd_SOURCES) + +run: $(mproxyd_SOURCES) + cd cmd/mproxyd && env CGO_ENABLED=1 $(GO) run . --asDaemon=false --port=443 + +format: + @dirs=$$($(FIND) $(CWD)/app $(CWD)/cmd $(CWD)/pkg \ + -name '*.go' | $(XARGS) -n1 dirname | $(SORT) | $(UNIQ)); \ + for dir in $$dirs;do \ + (echo "====$$dir===="; cd $$dir && $(GO) fmt .); \ + done + +image:: build-image +build-image: clean +# $(GO) mod vendor + mkdir -p $(DIST_DIR) + $(SUDO) $(PODMAN) build -t $(IMAGE_REPO)/$(IMAGE_NAME) -f $(IMAGE_CONTAINERFILE) . + rm -f $(DIST_DIR)/$(IMAGE_TARNAME) + $(SUDO) $(PODMAN) image save $(IMAGE_REPO)/$(IMAGE_NAME) --format oci-archive \ + -o $(DIST_DIR)/$(IMAGE_TARNAME) + username=$$(whoami); \ + $(SUDO) chown $$username $(DIST_DIR)/$(IMAGE_TARNAME) +# rm -rf vendor + +$(DIST_ARCHIVES): dist + +package:: debian-package +debian-package: $(DIST_ARCHIVES) + mkdir -p $(BUILD_DIR) + mv $(DIST_ARCHIVES) $(BUILD_DIR) + cd $(BUILD_DIR) && $(AMTAR) -xf $(DIST_ARCHIVES) + cd $(BUILD_DIR)/$(distdir) && ./configure --prefix=/usr + cd $(BUILD_DIR)/$(distdir) && $(MAKE) clean + cd $(BUILD_DIR)/$(distdir) && $(DPKGSOURCE) -i --before-build . + cd $(BUILD_DIR)/$(distdir) && $(DBUILDPACKAGE) -nc -us -uc -ui -i -b + mkdir -p $(DIST_DIR) + $(CP) $(BUILD_DIR)/*.deb $(DIST_DIR) + rm -rf $(BUILD_DIR) + +install-data-local: + test -z $(DESTDIR)$(srv_confdir) || $(MKDIR_P) $(DESTDIR)$(srv_confdir) + test -z $(DESTDIR)$(srv_logdir) || $(MKDIR_P) $(DESTDIR)$(srv_logdir) + test -z $(DESTDIR)$(srv_rundir) || $(MKDIR_P) $(DESTDIR)$(srv_rundir) + test -z $(DESTDIR)$(srv_datadir) || $(MKDIR_P) $(DESTDIR)$(srv_datadir) +@FREEBSD_OS_TRUE@ test -z $(DESTDIR)$(FREEBSD_RCDIR) || $(MKDIR_P) $(DESTDIR)$(FREEBSD_RCDIR) +@FREEBSD_OS_TRUE@ $(INSTALL_DATA) initrc/mproxyd $(DESTDIR)$(FREEBSD_RCDIR) +@FREEBSD_OS_TRUE@ chmod a+x $(DESTDIR)$(FREEBSD_RCDIR)/mproxyd +@LINUX_OS_TRUE@@SYSTEMD_TRUE@ test -z $(DESTDIR)$(LINUX_SYSTEMDDIR) || $(MKDIR_P) $(DESTDIR)$(LINUX_SYSTEMDDIR) +@LINUX_OS_TRUE@@SYSTEMD_TRUE@ $(INSTALL_DATA) initrc/mproxyd.service $(DESTDIR)$(LINUX_SYSTEMDDIR) + +clean-local: + $(FIND) $(CWD) -name '*~' | $(XARGS) rm -f + rm -rf autom4te.cache + rm -f cmd/mproxyd/mproxyd + rm -f cmd/mproxyctl/mproxyctl +# rm -rf tmp/ + +distclean-local: + rm -rf autom4te.cache + rm -rf $(DIST_DIR) + rm -rf tmp/ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/README.md b/README.md new file mode 100644 index 0000000..354b0f4 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# mproxy + + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..d2eb02b --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,977 @@ +# generated automatically by aclocal 1.17 -*- Autoconf -*- + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, +[m4_warning([this file was generated for autoconf 2.72. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.17' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.17], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.17])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- + +# Copyright (C) 2012-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_EXTRA_RECURSIVE_TARGETS +# -------------------------- +# Define the list of user recursive targets. This macro exists only to +# be traced by Automake, which will ensure that a proper definition of +# user-defined recursive targets (and associated rules) is propagated +# into all the generated Makefiles. +# TODO: We should really reject non-literal arguments here... +AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + +AC_REQUIRE([_AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +AC_REQUIRE([_AM_PROG_RM_F]) +AC_REQUIRE([_AM_PROG_XARGS_N]) + +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_RM_F +# --------------- +# Check whether 'rm -f' without any arguments works. +# https://bugs.gnu.org/10828 +AC_DEFUN([_AM_PROG_RM_F], +[am__rm_f_notfound= +AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) +AC_SUBST(am__rm_f_notfound) +]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SLEEP_FRACTIONAL_SECONDS +# ---------------------------- +AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl +AC_CACHE_CHECK([whether sleep supports fractional seconds], + am_cv_sleep_fractional_seconds, [dnl +AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], + [am_cv_sleep_fractional_seconds=no]) +])]) + +# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION +# ----------------------------------- +# Determine the filesystem's resolution for file modification +# timestamps. The coarsest we know of is FAT, with a resolution +# of only two seconds, even with the most recent "exFAT" extensions. +# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one +# nanosecond, matching clock_gettime. However, it is probably not +# possible to delay execution of a shell script for less than one +# millisecond, due to process creation overhead and scheduling +# granularity, so we don't check for anything finer than that. (See below.) +AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl +AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) +AC_CACHE_CHECK([filesystem timestamp resolution], + am_cv_filesystem_timestamp_resolution, [dnl +# Default to the worst case. +am_cv_filesystem_timestamp_resolution=2 + +# Only try to go finer than 1 sec if sleep can do it. +# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, +# - 1 sec is not much of a win compared to 2 sec, and +# - it takes 2 seconds to perform the test whether 1 sec works. +# +# Instead, just use the default 2s on platforms that have 1s resolution, +# accept the extra 1s delay when using $sleep in the Automake tests, in +# exchange for not incurring the 2s delay for running the test for all +# packages. +# +am_try_resolutions= +if test "$am_cv_sleep_fractional_seconds" = yes; then + # Even a millisecond often causes a bunch of false positives, + # so just try a hundredth of a second. The time saved between .001 and + # .01 is not terribly consequential. + am_try_resolutions="0.01 0.1 $am_try_resolutions" +fi + +# In order to catch current-generation FAT out, we must *modify* files +# that already exist; the *creation* timestamp is finer. Use names +# that make ls -t sort them differently when they have equal +# timestamps than when they have distinct timestamps, keeping +# in mind that ls -t prints the *newest* file first. +rm -f conftest.ts? +: > conftest.ts1 +: > conftest.ts2 +: > conftest.ts3 + +# Make sure ls -t actually works. Do 'set' in a subshell so we don't +# clobber the current shell's arguments. (Outer-level square brackets +# are removed by m4; they're present so that m4 does not expand +# ; be careful, easy to get confused.) +if ( + set X `[ls -t conftest.ts[12]]` && + { + test "$[]*" != "X conftest.ts1 conftest.ts2" || + test "$[]*" != "X conftest.ts2 conftest.ts1"; + } +); then :; else + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + _AS_ECHO_UNQUOTED( + ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], + [AS_MESSAGE_LOG_FD]) + AC_MSG_FAILURE([ls -t produces unexpected output. +Make sure there is not a broken ls alias in your environment.]) +fi + +for am_try_res in $am_try_resolutions; do + # Any one fine-grained sleep might happen to cross the boundary + # between two values of a coarser actual resolution, but if we do + # two fine-grained sleeps in a row, at least one of them will fall + # entirely within a coarse interval. + echo alpha > conftest.ts1 + sleep $am_try_res + echo beta > conftest.ts2 + sleep $am_try_res + echo gamma > conftest.ts3 + + # We assume that 'ls -t' will make use of high-resolution + # timestamps if the operating system supports them at all. + if (set X `ls -t conftest.ts?` && + test "$[]2" = conftest.ts3 && + test "$[]3" = conftest.ts2 && + test "$[]4" = conftest.ts1); then + # + # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, + # because we don't need to test make. + make_ok=true + if test $am_try_res != 1; then + # But if we've succeeded so far with a subsecond resolution, we + # have one more thing to check: make. It can happen that + # everything else supports the subsecond mtimes, but make doesn't; + # notably on macOS, which ships make 3.81 from 2006 (the last one + # released under GPLv2). https://bugs.gnu.org/68808 + # + # We test $MAKE if it is defined in the environment, else "make". + # It might get overridden later, but our hope is that in practice + # it does not matter: it is the system "make" which is (by far) + # the most likely to be broken, whereas if the user overrides it, + # probably they did so with a better, or at least not worse, make. + # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html + # + # Create a Makefile (real tab character here): + rm -f conftest.mk + echo 'conftest.ts1: conftest.ts2' >conftest.mk + echo ' touch conftest.ts2' >>conftest.mk + # + # Now, running + # touch conftest.ts1; touch conftest.ts2; make + # should touch ts1 because ts2 is newer. This could happen by luck, + # but most often, it will fail if make's support is insufficient. So + # test for several consecutive successes. + # + # (We reuse conftest.ts[12] because we still want to modify existing + # files, not create new ones, per above.) + n=0 + make=${MAKE-make} + until test $n -eq 3; do + echo one > conftest.ts1 + sleep $am_try_res + echo two > conftest.ts2 # ts2 should now be newer than ts1 + if $make -f conftest.mk | grep 'up to date' >/dev/null; then + make_ok=false + break # out of $n loop + fi + n=`expr $n + 1` + done + fi + # + if $make_ok; then + # Everything we know to check worked out, so call this resolution good. + am_cv_filesystem_timestamp_resolution=$am_try_res + break # out of $am_try_res loop + fi + # Otherwise, we'll go on to check the next resolution. + fi +done +rm -f conftest.ts? +# (end _am_filesystem_timestamp_resolution) +])]) + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) +# This check should not be cached, as it may vary across builds of +# different projects. +AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +am_build_env_is_sane=no +am_has_slept=no +rm -f conftest.file +for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[]*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + test "$[]2" = conftest.file + ); then + am_build_env_is_sane=yes + break + fi + # Just in case. + sleep "$am_cv_filesystem_timestamp_resolution" + am_has_slept=yes +done + +AC_MSG_RESULT([$am_build_env_is_sane]) +if test "$am_build_env_is_sane" = no; then + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi + +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl + ( sleep "$am_cv_filesystem_timestamp_resolution" ) & + am_sleep_pid=$! +]) +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SILENT_RULES +# ---------------- +# Enable less verbose build rules support. +AC_DEFUN([_AM_SILENT_RULES], +[AM_DEFAULT_VERBOSITY=1 +AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls +dnl to AM_SILENT_RULES to change the default value. +AC_CONFIG_COMMANDS_PRE([dnl +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; +esac +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +])dnl +]) + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or +# empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_REQUIRE([_AM_SILENT_RULES]) +AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])]) + +# Copyright (C) 2001-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test x$am_uid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) + elif test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test x$gm_gid = xunknown; then + AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) + elif test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +# Copyright (C) 2022-2024 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_XARGS_N +# ---------------- +# Check whether 'xargs -n' works. It should work everywhere, so the fallback +# is not optimized at all as we never expect to use it. +AC_DEFUN([_AM_PROG_XARGS_N], +[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl +AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 +3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) +AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl + am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' +])dnl +AC_SUBST(am__xargs_n) +]) + diff --git a/app/config/config.go b/app/config/config.go new file mode 100644 index 0000000..b77a650 --- /dev/null +++ b/app/config/config.go @@ -0,0 +1,159 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package config + +import ( + "fmt" + "io/ioutil" + "os" + "path/filepath" + + "mproxy/pkg/auxx509" + + yaml "go.yaml.in/yaml/v4" +) + +type Service struct { + Address string `json:"address" yaml:"address"` + Port uint32 `json:"port" yaml:"port"` +} + +type Database struct { + Basepath string `json:"basepath" yaml:"basepath"` +} + +type Storage struct { + Basepath string `json:"basepath" yaml:"basepath"` +} + +type Config struct { + Service Service `json:"service" yaml:"service"` + Database Database `json:"database" yaml:"database"` + Storage Storage `json:"storage" yaml:"storage"` + AsDaemon bool `json:"asDaemon" yaml:"asDaemon"` + Logpath string `json:"logpath" yaml:"logpath"` + Runpath string `json:"runpath" yaml:"runpath"` + Version string `json:"version" yaml:"version"` + Certpath string `json:"certpath,omitempty" yaml:"certpath,omitempty"` + Keypath string `json:"keypath,omitempty" yaml:"keypath,omitempty"` + X509Cert string `json:"-" yaml:"-"` + X509Key string `json:"-" yaml:"-"` + Datadir string `json:"datadir" yaml:"datadir"` + Hostname string `json:"hostname" yaml:"hostname"` + Hostnames []string `json:"hostnames" yaml:"hostnames"` + LogLimit int64 `json:"logLimit" yaml:"logLimit"` + RunUser string `json:"runUser" yaml:"runUser"` +} + +func NewConfig() *Config { + logfile := fmt.Sprintf("%s.log", srvname) + logpath := filepath.Join(logdir, logfile) + + runfile := fmt.Sprintf("%s.pid", srvname) + runpath := filepath.Join(rundir, runfile) + + //certpath := fmt.Sprintf("%s.crt", srvname) + //certpath = filepath.Join(confdir, certpath) + + //keypath := fmt.Sprintf("%s.crt", srvname) + //keypath = filepath.Join(confdir, keypath) + + return &Config{ + Service: Service{ + Address: "0.0.0.0", + Port: 1025, + }, + Database: Database{ + Basepath: datadir, + }, + Storage: Storage{ + Basepath: datadir, + }, + AsDaemon: false, + Logpath: logpath, + Runpath: runpath, + Version: version, + Datadir: datadir, + //Certpath: certpath, + //Keypath: keypath, + Hostnames: make([]string, 0), + LogLimit: 1024 * 1024 * 10, // 10 Mb + RunUser: "daemon", + } +} + +func (conf *Config) String() string { + confbytes, _ := yaml.Marshal(conf) + return string(confbytes) +} + +func (conf *Config) ReadConfigfile() error { + conffile := fmt.Sprintf("%s.yaml", srvname) + confpath := filepath.Join(confdir, conffile) + + confdata, err := ioutil.ReadFile(confpath) + if err != nil { + return err + } + err = yaml.Unmarshal(confdata, conf) + if err != nil { + return err + } + return err +} + +func (conf *Config) ReadX509Cert() error { + var err error + if conf.Certpath != "" && conf.Keypath != "" { + if !filepath.IsAbs(conf.Certpath) { + conf.Certpath = filepath.Join(confdir, conf.Certpath) + } + certBytes, err := os.ReadFile(conf.Certpath) + if err != nil { + return err + } + if !filepath.IsAbs(conf.Keypath) { + conf.Keypath = filepath.Join(confdir, conf.Keypath) + } + keyBytes, err := os.ReadFile(conf.Keypath) + if err != nil { + return err + } + conf.X509Cert = string(certBytes) + conf.X509Key = string(keyBytes) + return err + } + /* + if conf.X509Cert != "" && conf.X509Key != "" { + x509Cert, err := base64.StdEncoding.DecodeString(conf.X509Cert) + if err != nil { + return err + } + conf.X509Cert = string(x509Cert) + x509Key, err := base64.StdEncoding.DecodeString(conf.X509Key) + if err != nil { + return err + } + conf.X509Key = string(x509Key) + } + */ + if conf.X509Cert == "" || conf.X509Key == "" { + if conf.Hostname == "" { + conf.Hostname, err = os.Hostname() + if err != nil { + return err + } + } + certBytes, keyBytes, err := auxx509.CreateSelfSignedCert(conf.Hostname, conf.Hostnames...) + if err != nil { + return err + } + conf.X509Cert = string(certBytes) + conf.X509Key = string(keyBytes) + return err + + } + + return err +} diff --git a/app/config/variant.go.in b/app/config/variant.go.in new file mode 100644 index 0000000..2854366 --- /dev/null +++ b/app/config/variant.go.in @@ -0,0 +1,10 @@ +package config + +const ( + confdir = "@srv_confdir@" + rundir = "@srv_rundir@" + logdir = "@srv_logdir@" + datadir = "@srv_datadir@" + version = "@PACKAGE_VERSION@" + srvname = "@PACKAGE_NAME@d" +) diff --git a/app/handler/aaafunc.go b/app/handler/aaafunc.go new file mode 100644 index 0000000..6f4bc14 --- /dev/null +++ b/app/handler/aaafunc.go @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package handler + +import ( + "context" + "fmt" + + "mproxy/app/router" + "mproxy/pkg/auxhttp" +) + +const ( + authTag = "authpass" + userTag = "accountID" +) + +func (hand *Handler) AuthMiddleware(next router.Handler) router.Handler { + var handlerFunc router.HandlerFunc + + handlerFunc = func(rctx *router.Context) { + success, err := hand.CheckAccess(rctx) + if success { + rctx.SetBool(authTag, true) + } + if err != nil { + hand.logg.Errorf("Authorization middleware error: %v", err) + } + next.ServeHTTP(rctx) + } + return handlerFunc +} + +// Authentification +func (hand *Handler) CheckAccess(rctx *router.Context) (bool, error) { + var err error + var success bool + var username string + var password string + + authHeader := rctx.GetHeader("Proxy-Authorization") + hand.logg.Debugf("Proxy-Authorization: [%s]", authHeader) + if authHeader != "" { + username, password, err = auxhttp.ParseBasicAuth(authHeader) + if err != nil { + return success, err + } + success, err := hand.ValidatePassword(rctx.Ctx, username, password) + if err != nil { + return false, err + } + if !success { + err = fmt.Errorf("Incorrect username or password") + return false, err + } + return success, err + } + return success, err +} + +func (hand *Handler) ValidatePassword(ctx context.Context, username, password string) (bool, error) { + var err error + valid := true + return valid, err +} diff --git a/app/handler/connect.go b/app/handler/connect.go new file mode 100644 index 0000000..e320848 --- /dev/null +++ b/app/handler/connect.go @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package handler + +import ( + "net/http" + + "mproxy/app/proxoper" + "mproxy/app/router" +) + +func (hand *Handler) ConnectTo(rctx *router.Context) { + hostaddr, _ := rctx.GetSubpath("hostaddr") + params := &proxoper.ConnectToParams{ + Hostaddr: hostaddr, + } + ctx := rctx.GetContext() + _, err := hand.prop.ConnectTo(ctx, params) + if err != nil { + hand.logg.Errorf("ConnectTo error: %v", err) + rctx.SetStatus(http.StatusInternalServerError) + return + } + rctx.SetStatus(http.StatusOK) + return +} diff --git a/app/handler/handler.go b/app/handler/handler.go new file mode 100644 index 0000000..9b91fa5 --- /dev/null +++ b/app/handler/handler.go @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package handler + +import ( + "mproxy/app/logger" + "mproxy/app/router" + + "mproxy/app/proxoper" + "mproxy/app/servoper" + + yaml "go.yaml.in/yaml/v4" +) + +type HandlerParams struct { + ServOper *servoper.Operator + ProxOper *proxoper.Operator +} + +type Handler struct { + logg *logger.Logger + seop *servoper.Operator + prop *proxoper.Operator +} + +func NewHandler(params *HandlerParams) (*Handler, error) { + var err error + hand := &Handler{ + seop: params.ServOper, + prop: params.ProxOper, + } + hand.logg = logger.NewLoggerWithSubject("handler") + return hand, err +} + +func (hand *Handler) DumpHeaders(label string, rctx *router.Context) { + headers := rctx.GetHeaders() + yamlData, _ := yaml.Marshal(headers) + hand.logg.Debugf("%s:\n%s\n", label, string(yamlData)) +} diff --git a/app/handler/notfound.go b/app/handler/notfound.go new file mode 100644 index 0000000..9b08d4e --- /dev/null +++ b/app/handler/notfound.go @@ -0,0 +1,15 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package handler + +import ( + "net/http" + + "mproxy/app/router" +) + +func (hand *Handler) NotFound(rctx *router.Context) { + hand.logg.Warningf("Route for [%s %s] not found", rctx.Request.Method, rctx.Request.URL.String()) + rctx.SetStatus(http.StatusNotFound) +} diff --git a/app/handler/response.go b/app/handler/response.go new file mode 100644 index 0000000..38c1071 --- /dev/null +++ b/app/handler/response.go @@ -0,0 +1,36 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package handler + +import ( + "net/http" + + "mproxy/app/router" +) + +type Response[T any] struct { + Error bool `json:"error" yaml:"error"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Result T `json:"result,omitempty" yaml:"result,result"` +} + +func NewResponse[T any]() *Response[T] { + return &Response[T]{} +} + +func (hand *Handler) SendResult(rctx *router.Context, result any) { + response := &Response[any]{ + Error: false, + Result: result, + } + rctx.SendJSON(http.StatusOK, response) +} + +func (hand *Handler) SendError(rctx *router.Context, err error) { + response := &Response[any]{ + Error: true, + Message: err.Error(), + } + rctx.SendJSON(http.StatusOK, response) +} diff --git a/app/handler/service.go b/app/handler/service.go new file mode 100644 index 0000000..7998aa8 --- /dev/null +++ b/app/handler/service.go @@ -0,0 +1,15 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package handler + +import ( + "mproxy/app/router" + "mproxy/app/servoper" +) + +func (hand *Handler) SendHello(rctx *router.Context) { + params := &servoper.SendHelloParams{} + res, _ := hand.seop.SendHello(params) + hand.SendResult(rctx, res) +} diff --git a/app/logger/logger.go b/app/logger/logger.go new file mode 100644 index 0000000..a025f4c --- /dev/null +++ b/app/logger/logger.go @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package logger + +import ( + "bytes" + "fmt" + "io" + "os" + "sync" + "time" +) + +var ( + mtx sync.Mutex + output io.WriteCloser = os.Stderr +) + +type Logger struct { + subject string + writer io.WriteCloser + mtx *sync.Mutex +} + +func NewLoggerWithSubject(subj string) *Logger { + return &Logger{ + subject: subj, + writer: output, + mtx: &mtx, + } +} + +func NewLogger() *Logger { + return &Logger{ + writer: output, + mtx: &mtx, + } +} + +func SetWriter(newOut io.WriteCloser) { + mtx.Lock() + output = newOut + mtx.Unlock() +} + +func (logg *Logger) SetWriter(newOut io.WriteCloser) { + mtx.Lock() + logg.writer = newOut + var newMtx sync.Mutex + logg.mtx = &newMtx + mtx.Unlock() +} + +func (logg *Logger) Debugf(message string, args ...any) { + logg.printf("debug", message, args...) +} + +func (logg *Logger) Infof(message string, args ...any) { + logg.printf("info", message, args...) +} + +func (logg *Logger) Warningf(message string, args ...any) { + logg.printf("warning", message, args...) +} + +func (logg *Logger) Errorf(message string, args ...any) { + logg.printf("error", message, args...) +} + +func (logg *Logger) printf(level, message string, args ...any) { + timestamp := time.Now().Format(time.RFC3339) + buffer := bytes.NewBuffer([]byte{}) + if logg.subject != "" { + fmt.Fprintf(buffer, "%s %s.%s: ", timestamp, logg.subject, level) + } else { + fmt.Fprintf(buffer, "%s %s: ", timestamp, level) + } + fmt.Fprintf(buffer, message, args...) + fmt.Fprintf(buffer, "\n") + logg.mtx.Lock() + fmt.Fprint(output, buffer.String()) + logg.mtx.Unlock() +} diff --git a/app/logger/logger_test.go b/app/logger/logger_test.go new file mode 100644 index 0000000..da05a0c --- /dev/null +++ b/app/logger/logger_test.go @@ -0,0 +1,33 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package logger + +import ( + "io/ioutil" + "testing" +) + +func TestLogger(t *testing.T) { + logg := NewLogger("test") + logg.Debugf("foo: %s", "bar") +} + +func BenchmarkLoggerL(b *testing.B) { + SetWriter(ioutil.Discard) + logg := NewLogger("test") + for i := 0; i < b.N; i++ { + logg.Debugf("foo: %s", "bar") + } +} + +func BenchmarkLoggerP(b *testing.B) { + SetWriter(ioutil.Discard) + logg := NewLogger("test") + b.ResetTimer() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + logg.Debugf("foo: %s", "bar") + } + }) +} diff --git a/app/proxoper/connect.go b/app/proxoper/connect.go new file mode 100644 index 0000000..d5c606a --- /dev/null +++ b/app/proxoper/connect.go @@ -0,0 +1,23 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package proxoper + +import ( + "context" + "io" +) + +type ConnectToParams struct { + Hostaddr string +} + +type ConnectToResult struct { + Stream io.Writer +} + +func (oper *Operator) ConnectTo(ctx context.Context, param *ConnectToParams) (*ConnectToResult, error) { + var err error + res := &ConnectToResult{} + return res, err +} diff --git a/app/proxoper/operator.go b/app/proxoper/operator.go new file mode 100644 index 0000000..62775f9 --- /dev/null +++ b/app/proxoper/operator.go @@ -0,0 +1,21 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package proxoper + +import ( + "mproxy/app/logger" +) + +type OperatorParams struct{} + +type Operator struct { + logg *logger.Logger +} + +func NewOperator(params *OperatorParams) (*Operator, error) { + var err error + oper := &Operator{} + oper.logg = logger.NewLoggerWithSubject("proxoper") + return oper, err +} diff --git a/app/router/bindobj.go b/app/router/bindobj.go new file mode 100644 index 0000000..823c765 --- /dev/null +++ b/app/router/bindobj.go @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "reflect" + "strconv" +) + +// The code reflect string-string map to taged structure +// Limited, used only base types +// Don't ask me how it works. I'm only writer ;) + +func bindObj(obj interface{}, kvmap map[string]string, sTag string) error { + var err error + vElem := reflect.ValueOf(obj).Elem() + sElem := reflect.TypeOf(obj).Elem() + for i := 0; i < vElem.NumField(); i++ { + vField := vElem.Field(i) + tag := sElem.Field(i).Tag.Get(sTag) + if tag != "" { + sVal, exists := kvmap[tag] + if exists { + switch vField.Kind() { + case reflect.String: + vField.SetString(sVal) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + iVal, err := strconv.ParseInt(sVal, 10, 64) + if err != nil { + return err + } + vField.SetInt(iVal) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + iVal, err := strconv.ParseUint(sVal, 10, 64) + if err != nil { + return err + } + vField.SetUint(iVal) + case reflect.Bool: + bVal, err := strconv.ParseBool(sVal) + if err != nil { + return err + } + vField.SetBool(bVal) + case reflect.Float32, reflect.Float64: + fVal, err := strconv.ParseFloat(sVal, 64) + if err != nil { + return err + } + vField.SetFloat(fVal) + } + } + } + } + return err +} diff --git a/app/router/context.go b/app/router/context.go new file mode 100644 index 0000000..ece21c7 --- /dev/null +++ b/app/router/context.go @@ -0,0 +1,150 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "bytes" + "context" + "encoding/json" + "io" + "net/http" + "net/url" + "strconv" +) + +type Context struct { + Ctx context.Context + Request *http.Request + Writer http.ResponseWriter + PathMap map[string]string + Bools map[string]bool + Strings map[string]string + StatusCode int +} + +func NewContext(writer http.ResponseWriter, request *http.Request) *Context { + rctx := &Context{ + Writer: writer, + Request: request, + Ctx: request.Context(), + PathMap: make(map[string]string), + Bools: make(map[string]bool), + Strings: make(map[string]string), + } + return rctx +} + +// Aux maps +func (rctx *Context) SetBool(key string, value bool) { + rctx.Bools[key] = value +} + +func (rctx *Context) GetBool(key string) (bool, bool) { + exists, value := rctx.Bools[key] + return exists, value +} + +func (rctx *Context) SetString(key string, value string) { + rctx.Strings[key] = value +} + +func (rctx *Context) GetString(key string) (string, bool) { + value, exists := rctx.Strings[key] + return value, exists +} + +// Request +func (rctx *Context) GetSubpath(key string) (string, bool) { + value, exists := rctx.PathMap[key] + return value, exists +} + +func (rctx *Context) URL() *url.URL { + return rctx.Request.URL +} + +func (rctx *Context) GetQuery(key string) string { + return rctx.Request.URL.Query().Get(key) +} + +func (rctx *Context) GetHeader(key string) string { + return rctx.Request.Header.Get(key) +} + +func (rctx *Context) GetHeaders() http.Header { + return rctx.Request.Header +} + +func (rctx *Context) GetContext() context.Context { + return rctx.Request.Context() +} + +// Binding +const emptyJSON = "{}" + +func (rctx *Context) BindJSON(obj any) error { + buffer := bytes.NewBuffer(nil) + _, err := io.Copy(buffer, rctx.Request.Body) + if err != nil { + return err + } + reqBody := buffer.Bytes() + if len(reqBody) == 0 { + reqBody = []byte(emptyJSON) + } + err = json.Unmarshal(reqBody, obj) + if err != nil { + return err + } + return err +} + +func (rctx *Context) BindQuery(obj any) error { + qMap := make(map[string]string) + for key, val := range rctx.Request.URL.Query() { + if len(val) == 1 { + qMap[key] = val[0] + } + } + return bindObj(obj, qMap, "param") +} + +// Response +func (rctx *Context) SetHeader(key, value string) { + rctx.Writer.Header().Set(key, value) +} + +func (rctx *Context) SetStatus(httpStatus int) { + rctx.StatusCode = httpStatus + rctx.Writer.WriteHeader(httpStatus) +} + +func (rctx *Context) SendJSON(statusCode int, payload any) { + rctx.StatusCode = statusCode + buffer := bytes.NewBuffer(nil) + json.NewEncoder(buffer).Encode(payload) + rctx.Writer.Header().Set("Content-Type", "application/json") + size := strconv.FormatInt(int64(len(buffer.Bytes())), 10) + rctx.Writer.Header().Set("Content-Length", size) + rctx.Writer.WriteHeader(statusCode) + rctx.Writer.Write(buffer.Bytes()) +} + +func (rctx *Context) SendText(statusCode int, payload string) { + rctx.StatusCode = statusCode + size := strconv.FormatInt(int64(len(payload)), 10) + rctx.Writer.Header().Set("Content-Type", "text/plain") + rctx.Writer.Header().Set("Content-Length", size) + rctx.Writer.WriteHeader(statusCode) + rctx.Writer.Write([]byte(payload)) +} + +func (rctx *Context) SendBytes(statusCode int, ctype string, payload []byte) { + rctx.StatusCode = statusCode + size := strconv.FormatInt(int64(len(payload)), 10) + rctx.Writer.Header().Set("Content-Type", ctype) + rctx.Writer.Header().Set("Content-Length", size) + rctx.Writer.WriteHeader(statusCode) + rctx.Writer.Write(payload) +} diff --git a/app/router/corsmw.go b/app/router/corsmw.go new file mode 100644 index 0000000..d552cb5 --- /dev/null +++ b/app/router/corsmw.go @@ -0,0 +1,36 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +func NewCorsMiddleware() MiddlewareFunc { + mw := func(next Handler) Handler { + return newCorsHandler(next) + } + return mw +} + +type corsHandler struct { + next Handler +} + +func newCorsHandler(next Handler) *corsHandler { + return &corsHandler{ + next: next, + } +} + +func (hand corsHandler) ServeHTTP(ctx *Context) { + origin := ctx.Request.Header.Get("Origin") + if origin != "" { + ctx.SetHeader("Access-Control-Allow-Origin", origin) + ctx.SetHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE, PATCH") + ctx.SetHeader("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization") + ctx.SetHeader("Access-Control-Max-Age", "86400") + ctx.SetHeader("Access-Control-Allow-Credentials", "true") + } + if ctx.Request.Method == "OPTIONS" { + return + } + hand.next.ServeHTTP(ctx) +} diff --git a/app/router/loggingmw.go b/app/router/loggingmw.go new file mode 100644 index 0000000..0c5e650 --- /dev/null +++ b/app/router/loggingmw.go @@ -0,0 +1,31 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +func NewLoggingMiddleware(print func(string, ...any)) MiddlewareFunc { + mw := func(next Handler) Handler { + return newLoggingHandler(next, print) + } + return mw +} + +type loggingHandler struct { + next Handler + printFunc func(string, ...any) +} + +func newLoggingHandler(next Handler, print func(string, ...any)) *loggingHandler { + return &loggingHandler{ + next: next, + printFunc: print, + } +} + +func (logging loggingHandler) ServeHTTP(rctx *Context) { + logging.next.ServeHTTP(rctx) + cl := rctx.Writer.Header().Get("Content-Length") + logging.printFunc("%s %s %s %s %s %d", rctx.Request.RemoteAddr, + rctx.Request.Method, rctx.Request.URL.String(), + rctx.Request.Proto, cl, rctx.StatusCode) +} diff --git a/app/router/pathc.go b/app/router/pathc.go new file mode 100644 index 0000000..fab8e11 --- /dev/null +++ b/app/router/pathc.go @@ -0,0 +1,72 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "fmt" + "strings" +) + +const ( + compContextPlain int = iota + compContextRegex + + startRegex byte = '{' + stopRegex byte = '}' + + defaultRegexp = `[a-zA-Z0-9_\.]+` +) + +func pathCompiler(path string) (string, error) { + var err error + res := make([]byte, 0) + var pos int = compContextPlain + var depth int = 0 + pattern := make([]byte, 0) + for _, b := range []byte(path) { + switch pos { + case compContextPlain: + switch b { + case stopRegex: + depth -= 1 + res = append(res, b) + case startRegex: + depth += 1 + pos = compContextRegex // pattern started + pattern = make([]byte, 0) + default: + res = append(res, b) + } + case compContextRegex: + switch b { + case startRegex: + depth += 1 + case stopRegex: + depth -= 1 + if depth == 0 { + pattern = convertRegexp(pattern) + res = append(res, pattern...) + pos = compContextPlain // pattern ended + } + default: + pattern = append(pattern, b) + } + } + } + if depth != 0 { + err = fmt.Errorf("Unbalanced brackets into pattern") + } + return string(res), err +} + +func convertRegexp(src []byte) []byte { + var res string + const patternSeps = ":" + parts := strings.SplitN(string(src), patternSeps, 2) + if len(parts) == 1 { + parts = append(parts, defaultRegexp) + } + res = fmt.Sprintf("(?<%s>%s)", parts[0], parts[1]) + return []byte(res) +} diff --git a/app/router/pathc_test.go b/app/router/pathc_test.go new file mode 100644 index 0000000..3e2feee --- /dev/null +++ b/app/router/pathc_test.go @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "fmt" + "regexp" + "testing" + + "github.com/stretchr/testify/require" +) + +func tDebugf(msg string, args ...any) { + fmt.Printf("debug: ") + fmt.Printf(msg, args...) + fmt.Printf("\n") +} + +func TestPatchCompilerA(t *testing.T) { + var err error + srcPath := `/v1/file/{collection:[a-zA-Z]+}/{name}` + reSource, err := pathCompiler(srcPath) + require.NoError(t, err) + + tDebugf("re: %s\n", reSource) + + re, err := regexp.Compile(reSource) + require.NoError(t, err) + reqPath := `/v1/file/foo/bare` + match := re.MatchString(reqPath) + require.True(t, match) + + submatch := re.FindStringSubmatch(reqPath) + subnames := re.SubexpNames() + + submap := make(map[string]string) + for i, val := range subnames { + tDebugf("subname: %d = %s", i, val) + } + for i, val := range submatch { + key := subnames[i] + if key != "" { + submap[key] = val + } + tDebugf("sub: %d = %s", i, val) + } + tDebugf("submap: %v", submap) +} diff --git a/app/router/recovermw.go b/app/router/recovermw.go new file mode 100644 index 0000000..423d50a --- /dev/null +++ b/app/router/recovermw.go @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "net/http" + "runtime/debug" + "time" +) + +func NewRecoveryMiddleware(print func(string, ...any)) MiddlewareFunc { + mw := func(next Handler) Handler { + return newRecoveryHandler(next, print) + } + return mw +} + +type recoveryHandler struct { + next Handler + print func(string, ...any) +} + +func newRecoveryHandler(next Handler, print func(string, ...any)) *recoveryHandler { + return &recoveryHandler{ + next: next, + print: print, + } +} + +func (hand recoveryHandler) ServeHTTP(rctx *Context) { + exitFunc := func() { + err := recover() + if err != nil { + rctx.Writer.WriteHeader(http.StatusInternalServerError) + stack := string(debug.Stack()) + timestamp := time.Now().Format(time.RFC3339) + hand.print("%s %v ; %s\n", timestamp, err, stack) + } + } + defer exitFunc() + hand.next.ServeHTTP(rctx) +} diff --git a/app/router/router.go b/app/router/router.go new file mode 100644 index 0000000..f5d8633 --- /dev/null +++ b/app/router/router.go @@ -0,0 +1,166 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "fmt" + "net/http" + "regexp" +) + +type MiddlewareFunc func(next Handler) Handler + +type Handler interface { + ServeHTTP(rctx *Context) +} + +type HandlerFunc func(rctx *Context) + +func (handlerFunc HandlerFunc) ServeHTTP(rctx *Context) { + handlerFunc(rctx) +} + +type Router struct { + headHandler Handler + routeHandler *Selector +} + +func NewRouter() *Router { + selector := NewSelector() + return &Router{ + routeHandler: selector, + headHandler: selector, + } +} + +func (rout *Router) Use(mwFunc MiddlewareFunc) { + rout.headHandler = mwFunc(rout.headHandler) +} + +func (rout *Router) Selector() *Selector { + return rout.routeHandler +} + +func (rout *Router) AddRoute(method, path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute(method, path, handlerFunc) +} + +func (rout *Router) Head(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("HEAD", path, handlerFunc) +} + +func (rout *Router) Get(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("GET", path, handlerFunc) +} + +func (rout *Router) Post(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("POST", path, handlerFunc) +} + +func (rout *Router) Put(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("PUT", path, handlerFunc) +} + +func (rout *Router) Patch(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("PATCH", path, handlerFunc) +} + +func (rout *Router) Delete(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("DELETE", path, handlerFunc) +} + +func (rout *Router) Connect(path string, handlerFunc HandlerFunc) { + rout.routeHandler.AddRoute("CONNECT", path, handlerFunc) +} + +func (rout *Router) ServeHTTP(writer http.ResponseWriter, req *http.Request) { + rctx := NewContext(writer, req) + rout.headHandler.ServeHTTP(rctx) +} + +func (rout *Router) NotFound(handlerFunc HandlerFunc) { + rout.routeHandler.notFound = handlerFunc +} + +type Selector struct { + Routes []*Route + notFound Handler +} + +func NewSelector() *Selector { + notFound := HandlerFunc(func(ctx *Context) { + http.NotFound(ctx.Writer, ctx.Request) + }) + return &Selector{ + Routes: make([]*Route, 0), + notFound: notFound, + } +} + +const globalRoutePattern = `^%s$` + +func (hand *Selector) AddRoute(method, path string, handlerFunc HandlerFunc) error { + var err error + rawPath := path + path, err = pathCompiler(path) + if err != nil { + return err + } + + path = fmt.Sprintf(globalRoutePattern, path) + re, err := regexp.Compile(path) + if err != nil { + return err + } + + route := &Route{ + Method: method, + Path: path, + RawPath: rawPath, + Handler: handlerFunc, + Regexp: re, + } + hand.Routes = append(hand.Routes, route) + return err +} + +func (hand *Selector) ServeHTTP(rctx *Context) { + realHandler := hand.notFound + for _, route := range hand.Routes { + match := route.Match(rctx.Request) + if !match { + continue + } + subvals := route.Regexp.FindStringSubmatch(rctx.Request.URL.Path) + subkeys := route.Regexp.SubexpNames() + for i, val := range subvals { + key := subkeys[i] + if key != "" { + rctx.PathMap[key] = val + } + } + realHandler = route.Handler + break + } + realHandler.ServeHTTP(rctx) +} + +type Route struct { + Method string + Regexp *regexp.Regexp + Path string + RawPath string + Handler HandlerFunc +} + +func (route Route) Match(req *http.Request) bool { + if req.Method != route.Method { + return false + } + match := route.Regexp.MatchString(req.URL.Path) + if match { + return true + } + return false +} diff --git a/app/router/router_test.go b/app/router/router_test.go new file mode 100644 index 0000000..fdef75f --- /dev/null +++ b/app/router/router_test.go @@ -0,0 +1,195 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package router + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestRouterStatus(t *testing.T) { + + reqPath := "/hello" + handler := NewRouter() + helloHandler := func(rctx *Context) { + rctx.SetStatus(http.StatusOK) + } + handler.Get(reqPath, helloHandler) + + request, err := http.NewRequest("GET", reqPath, nil) + require.NoError(t, err) + + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, request) + require.Equal(t, http.StatusOK, recorder.Code) + + fmt.Printf("Response code: %d\n", recorder.Code) +} + +func TestRouterSendText(t *testing.T) { + testText := "hello, world" + reqPath := "/hello" + rout := NewRouter() + helloHandler := func(rctx *Context) { + rctx.SendText(http.StatusOK, testText) + } + rout.Get(reqPath, helloHandler) + + request, err := http.NewRequest("GET", reqPath, nil) + require.NoError(t, err) + + recorder := httptest.NewRecorder() + rout.ServeHTTP(recorder, request) + fmt.Printf("Response code: %d\n", recorder.Code) + require.Equal(t, http.StatusOK, recorder.Code) + + bodyReader := recorder.Body + bodyBytes, err := io.ReadAll(bodyReader) + + fmt.Printf("Response body: %s\n", string(bodyBytes)) + require.Equal(t, string(bodyBytes), testText) +} + +func TestRouterSendJSON(t *testing.T) { + + type testStruct struct { + Message string `json:"message"` + Code int64 `json:"code"` + } + testVar := testStruct{ + Message: "hello, world", + Code: 123, + } + testData, err := json.Marshal(testVar) + require.NoError(t, err) + + reqPath := "/hello" + handler := NewRouter() + + helloHandler := func(rctx *Context) { + rctx.SendJSON(http.StatusOK, &testVar) + } + handler.Get(reqPath, helloHandler) + + request, err := http.NewRequest("GET", reqPath, nil) + require.NoError(t, err) + + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, request) + fmt.Printf("Response code: %d\n", recorder.Code) + require.Equal(t, http.StatusOK, recorder.Code) + + bodyReader := recorder.Body + bodyBytes, err := io.ReadAll(bodyReader) + require.NoError(t, err) + bodyBytes = bytes.Trim(bodyBytes, "\n\r") + + fmt.Printf("Response body: %s\n", string(bodyBytes)) + require.Equal(t, string(testData), string(bodyBytes)) +} + +func TestRouterBindJSON(t *testing.T) { + + type testStruct struct { + Message string `json:"message"` + Code int64 `json:code"` + } + testVar := testStruct{ + Message: "hello, world", + Code: 123, + } + testData, err := json.Marshal(testVar) + require.NoError(t, err) + buffer := bytes.NewBuffer(testData) + + reqPath := "/hello" + handler := NewRouter() + + helloHandler := func(rctx *Context) { + handVar := testStruct{} + rctx.BindJSON(&handVar) + fmt.Printf("Received message: %s - %d\n", handVar.Message, handVar.Code) + require.Equal(t, handVar.Code, int64(123)) + rctx.SendJSON(http.StatusOK, &handVar) + } + handler.Post(reqPath, helloHandler) + + request, err := http.NewRequest("POST", reqPath, buffer) + require.NoError(t, err) + + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, request) + + fmt.Printf("Response code: %d\n", recorder.Code) + require.Equal(t, http.StatusOK, recorder.Code) + + bodyReader := recorder.Body + bodyBytes, err := io.ReadAll(bodyReader) + require.NoError(t, err) + bodyBytes = bytes.Trim(bodyBytes, "\n\r") + + fmt.Printf("Response body: %s\n", string(bodyBytes)) + require.Equal(t, string(testData), string(bodyBytes)) +} + +func TestRouterBindParams(t *testing.T) { + + reqPath := "/hello" + handler := NewRouter() + + helloHandler := func(rctx *Context) { + type Params struct { + Name string `param:"name"` + Code int64 `param:"code"` + } + params := &Params{} + rctx.BindQuery(params) + fmt.Printf("Received name: %s\n", params.Name) + fmt.Printf("Received code: %d\n", params.Code) + rctx.SendText(http.StatusOK, "hello") + } + handler.Get(reqPath, helloHandler) + + reqPath = reqPath + `?name=world&code=123` + request, err := http.NewRequest("GET", reqPath, nil) + require.NoError(t, err) + + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, request) + + fmt.Printf("Response code: %d\n", recorder.Code) + require.Equal(t, http.StatusOK, recorder.Code) + + bodyReader := recorder.Body + bodyBytes, err := io.ReadAll(bodyReader) + require.NoError(t, err) + bodyBytes = bytes.Trim(bodyBytes, "\n\r") + + fmt.Printf("Response body: %s\n", string(bodyBytes)) +} + +func BenchmarkLoggerL(b *testing.B) { + reqPath := "/hello" + helloHandler := func(rctx *Context) { + rctx.SetStatus(http.StatusOK) + } + handler := NewRouter() + handler.Get(reqPath, helloHandler) + + request, err := http.NewRequest("GET", reqPath, nil) + require.NoError(b, err) + + for i := 0; i < b.N; i++ { + recorder := httptest.NewRecorder() + handler.ServeHTTP(recorder, request) + require.Equal(b, http.StatusOK, recorder.Code) + } +} diff --git a/app/server/server.go b/app/server/server.go new file mode 100644 index 0000000..0c5eeee --- /dev/null +++ b/app/server/server.go @@ -0,0 +1,418 @@ +/* + * Copyright 2026 Oleg Borodin + * + * +*/ + +package server + +import ( + "context" + "fmt" + "net" + "os" + "os/signal" + "os/user" + "path/filepath" + "strconv" + "sync" + "syscall" + "time" + + "mproxy/app/config" + "mproxy/app/handler" + "mproxy/app/logger" + "mproxy/app/service" + "mproxy/pkg/auxtool" + + "mproxy/app/proxoper" + "mproxy/app/servoper" +) + +type Server struct { + conf *config.Config + seop *servoper.Operator + prop *proxoper.Operator + svc *service.Service + hand *handler.Handler + logg *logger.Logger + ctx context.Context + cancel context.CancelFunc + wg sync.WaitGroup + logf *os.File + //x509cert []byte + //x509key []byte + listen net.Listener +} + +func NewServer() (*Server, error) { + var err error + srv := &Server{} + srv.logg = logger.NewLoggerWithSubject("server") + srv.ctx, srv.cancel = context.WithCancel(context.Background()) + return srv, err +} + +func (srv *Server) Handler() *handler.Handler { + return srv.hand +} + +func (srv *Server) Service() *service.Service { + return srv.svc +} + +func (srv *Server) SetLogdir(dir string) { + srv.conf.Logpath = dir +} + +func (srv *Server) SetRundir(dir string) { + srv.conf.Runpath = dir +} + +func (srv *Server) SetDatadir(dir string) { + srv.conf.Database.Basepath = dir + srv.conf.Storage.Basepath = dir + srv.conf.Datadir = dir +} + +func (srv *Server) SetPort(port uint32) { + srv.conf.Service.Port = port +} + +func (srv *Server) SetAsDaemon(asDaemon bool) { + srv.conf.AsDaemon = asDaemon +} + +func (srv *Server) Configure() error { + var err error + //srv.logg.Infof("Configuration server") + srv.conf = config.NewConfig() + if err != nil { + return err + } + err = srv.conf.ReadConfigfile() + if err != nil { + srv.logg.Warningf("Error loading config file: %v", err) + err = nil + } + err = srv.conf.ReadX509Cert() + if err != nil { + return err + } + return err +} + +func (srv *Server) Build() error { + var err error + //srv.logg.Infof("Server building") + + currUser, err := user.Current() + if err != nil { + err = fmt.Errorf("Error getting current user: %v\n", err) + return err + } + cuid64, err := strconv.ParseInt(currUser.Uid, 10, 64) + if err != nil { + return err + } + cgid64, err := strconv.ParseInt(currUser.Gid, 10, 64) + if err != nil { + return err + } + euid := int(cuid64) + egid := int(cgid64) + if cuid64 == 0 { + usr, err := user.Lookup(srv.conf.RunUser) + if err != nil { + return err + } + uid64, err := strconv.ParseInt(usr.Uid, 10, 64) + if err != nil { + return err + } + gid64, err := strconv.ParseInt(usr.Gid, 10, 64) + if err != nil { + return err + } + euid = int(uid64) + egid = int(gid64) + } + // Creating datadir + datadir := srv.conf.Datadir + if !auxtool.DirExists(datadir) { // TODO: check access to dir + //srv.logg.Infof("Creating data directory %s ", datadir) + err = os.MkdirAll(datadir, 0750) + if err != nil { + return err + } + } + err = os.Chown(datadir, euid, egid) + if err != nil { + return err + } + + if srv.conf.AsDaemon { + logdir := filepath.Dir(srv.conf.Logpath) + //srv.logg.Infof("Creating log directory %s", logdir) + err = os.MkdirAll(logdir, 0750) + if err != nil { + return err + } + err = os.Chown(logdir, euid, egid) + if err != nil { + return err + } + rundir := filepath.Dir(srv.conf.Runpath) + //srv.logg.Infof("Creating run directory %s", rundir) + err = os.MkdirAll(rundir, 0750) + if err != nil { + return err + } + err = os.Chown(rundir, euid, egid) + if err != nil { + return err + } + // Redirect stderr and stout + logFile, err := os.OpenFile(srv.conf.Logpath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0640) + if err != nil { + return err + } + err = syscall.Dup2(int(logFile.Fd()), int(os.Stdout.Fd())) + if err != nil { + return err + } + err = syscall.Dup2(int(logFile.Fd()), int(os.Stderr.Fd())) + if err != nil { + return err + } + srv.logf = logFile + } + + confDump := srv.conf.String() + srv.logg.Infof("Current server configuration is:\n%s\n", confDump) + + if cuid64 == 0 { + // Change effective user and group + err = syscall.Setgid(egid) + if err != nil { + return err + } + err = syscall.Setuid(euid) + if err != nil { + return err + } + } + //return fmt.Errorf("Debug break") + + uidstr := strconv.FormatInt(int64(syscall.Geteuid()), 10) + usr, err := user.LookupId(uidstr) + if err != nil { + return err + } + srv.logg.Warningf("Now run as user: %s", usr.Username) + + // Creating service operator + srv.logg.Infof("Creating operator") + servoperParams := &servoper.OperatorParams{} + srv.seop, err = servoper.NewOperator(servoperParams) + if err != nil { + return err + } + // Creating proxy operator + srv.logg.Infof("Creating operator") + proxoperParams := &proxoper.OperatorParams{} + srv.prop, err = proxoper.NewOperator(proxoperParams) + if err != nil { + return err + } + // Creating handler + srv.logg.Infof("Creating handler") + handlerParams := &handler.HandlerParams{ + ServOper: srv.seop, + ProxOper: srv.prop, + } + srv.hand, err = handler.NewHandler(handlerParams) + if err != nil { + return err + } + // Creating service + serviceParams := &service.ServiceParams{ + Handler: srv.hand, + X509cert: srv.conf.X509Cert, + X509key: srv.conf.X509Key, + Address: srv.conf.Service.Address, + Portnum: srv.conf.Service.Port, + } + srv.logg.Infof("Creating service") + srv.svc, err = service.NewService(serviceParams) + if err != nil { + return err + } + // Building service + err = srv.svc.Build() + if err != nil { + return err + } + return err +} + +func (srv *Server) Run() error { + var err error + + if srv.conf.AsDaemon { + // Redirect stdin + nullFile, err := os.OpenFile("/dev/null", os.O_RDWR, 0) + if err != nil { + return err + } + err = syscall.Dup2(int(nullFile.Fd()), int(os.Stdin.Fd())) + if err != nil { + return err + } + // Write process ID + pidFile, err := os.OpenFile(srv.conf.Runpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0640) + if err != nil { + return err + } + defer pidFile.Close() + currPid := os.Getpid() + _, err = pidFile.WriteString(strconv.Itoa(currPid)) + if err != nil { + return err + } + // Start log rotator + srv.Rotator() + } + + currUser, err := user.Current() + if err != nil { + return err + } + srv.logg.Infof("Server started with user: %s", currUser.Username) + uidstr := strconv.FormatInt(int64(syscall.Geteuid()), 10) + usr, err := user.LookupId(uidstr) + if err != nil { + return err + } + srv.logg.Infof("Server run with user: %s", usr.Username) + + svcDone := make(chan error, 1) + // Service run + srv.logg.Infof("Start service") + startService := func(svc *service.Service, done chan error) { + err = svc.Run() + if err != nil { + srv.logg.Errorf("Service error: %v", err) + done <- err + } + } + go startService(srv.svc, svcDone) + + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + var signal os.Signal + + select { + case signal = <-sigs: + srv.logg.Infof("Services stopped by signal: %v", signal) + srv.cancel() + srv.svc.Stop() + srv.wg.Wait() + case err = <-svcDone: + srv.logg.Infof("Service stopped by service error: %v", err) + srv.cancel() + srv.svc.Stop() + srv.wg.Wait() + } + return err +} + +func (srv *Server) PseudoFork() error { + const successExit int = 0 + var keyEnv string = "IMX0LTSELMRF8K" + var err error + + _, isChild := os.LookupEnv(keyEnv) + switch { + case !isChild: + os.Setenv(keyEnv, "TRUE") + + procAttr := syscall.ProcAttr{} + cwd, err := os.Getwd() + if err != nil { + return err + } + var sysFiles = make([]uintptr, 3) + sysFiles[0] = uintptr(syscall.Stdin) + sysFiles[1] = uintptr(syscall.Stdout) + sysFiles[2] = uintptr(syscall.Stderr) + + procAttr.Files = sysFiles + procAttr.Env = os.Environ() + procAttr.Dir = cwd + + _, err = syscall.ForkExec(os.Args[0], os.Args, &procAttr) + if err != nil { + return err + } + os.Exit(successExit) + case isChild: + _, err = syscall.Setsid() + if err != nil { + return err + } + } + os.Unsetenv(keyEnv) + return err +} + +func (srv *Server) Daemonize() error { + var err error + if srv.conf.AsDaemon { + // Restart process process + err = srv.PseudoFork() + if err != nil { + return err + } + } + return err +} + +func (srv *Server) Rotator() { + srv.wg.Add(1) + var counter uint64 + logFunc := func() { + for { + counter += 1 + select { + case <-srv.ctx.Done(): + srv.wg.Done() + srv.logg.Infof("Log file rotator done") + return + default: + } + if (counter % 60) == 1 { + stat, err := srv.logf.Stat() + if err == nil && stat.Size() > srv.conf.LogLimit { + srv.logg.Infof("Rotate log file") + countFiles := 3 + for i := 1; i < countFiles; i++ { + nextName := fmt.Sprintf("%s.%d", srv.conf.Logpath, i+1) + prevName := fmt.Sprintf("%s.%d", srv.conf.Logpath, i) + os.Rename(prevName, nextName) + } + os.Rename(srv.conf.Logpath, srv.conf.Logpath+".1") + logFile, err := os.OpenFile(srv.conf.Logpath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0640) + if err == nil { + syscall.Dup2(int(logFile.Fd()), int(os.Stdout.Fd())) + syscall.Dup2(int(logFile.Fd()), int(os.Stderr.Fd())) + srv.logf.Close() + srv.logf = logFile + } + } + } + time.Sleep(1 * time.Second) + } + } + go logFunc() +} diff --git a/app/service/service.go b/app/service/service.go new file mode 100644 index 0000000..af56141 --- /dev/null +++ b/app/service/service.go @@ -0,0 +1,136 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package service + +import ( + "context" + "crypto/tls" + "fmt" + "net" + "net/http" + "time" + + "mproxy/app/handler" + "mproxy/app/logger" + "mproxy/app/router" +) + +type ServiceParams struct { + Handler *handler.Handler + Address string + Portnum uint32 + X509cert string + X509key string +} + +type Service struct { + hand *handler.Handler + rout *router.Router + logg *logger.Logger + hsrv *http.Server + + address string + portnum uint32 + listen net.Listener + x509cert string + x509key string + protocol string +} + +func NewService(params *ServiceParams) (*Service, error) { + var err error + svc := &Service{ + hand: params.Handler, + address: params.Address, + portnum: params.Portnum, + x509cert: params.X509cert, + x509key: params.X509key, + protocol: "TCP", + } + svc.logg = logger.NewLoggerWithSubject("service") + return svc, err +} + +func (svc *Service) Build() error { + var err error + svc.logg.Infof("Service build ") + + svc.rout = router.NewRouter() + + svc.rout.Use(router.NewRecoveryMiddleware(svc.logg.Errorf)) + svc.rout.Use(router.NewLoggingMiddleware(svc.logg.Infof)) + svc.rout.Use(router.NewCorsMiddleware()) + svc.rout.Use(svc.hand.AuthMiddleware) + + svc.rout.Get(`/v3/api/service/hello`, svc.hand.SendHello) + svc.rout.Connect(`{hostaddr}`, svc.hand.ConnectTo) + + svc.rout.NotFound(svc.hand.NotFound) + + selector := svc.rout.Selector() + for _, item := range selector.Routes { + svc.logg.Infof("%s\t%s", item.Method, item.RawPath) + } + + const useTLS = true + if useTLS { + tlsCert, err := tls.X509KeyPair([]byte(svc.x509cert), []byte(svc.x509key)) + + if err != nil { + return err + } + + tlsConfig := tls.Config{ + Certificates: []tls.Certificate{tlsCert}, + ClientAuth: tls.NoClientCert, + InsecureSkipVerify: true, + } + + listenAddress := fmt.Sprintf("%s:%d", svc.address, svc.portnum) + svc.listen, err = tls.Listen(svc.protocol, listenAddress, &tlsConfig) + if err != nil { + return err + } + + } else { + listenAddress := fmt.Sprintf("%s:%d", svc.address, svc.portnum) + svc.listen, err = net.Listen(svc.protocol, listenAddress) + if err != nil { + return err + } + } + + svc.logg.Infof("Service listening at %v", svc.listen.Addr()) + svc.hsrv = &http.Server{ + Handler: svc.rout, + } + return err +} + +func (svc *Service) Run() error { + var err error + svc.logg.Infof("Service run") + err = svc.hsrv.Serve(svc.listen) + if err == http.ErrServerClosed { + svc.logg.Warningf("Service Closed") + err = nil + } + if err != nil { + return err + } + return err +} + +func (svc *Service) Stop() { + if svc.hsrv != nil { + svc.logg.Infof("Service stop") + downWaiting := 10 * time.Second + ctx, cancel := context.WithTimeout(context.Background(), downWaiting) + defer cancel() + err := svc.hsrv.Shutdown(ctx) + if err != nil { + svc.logg.Errorf("Error service shutdown: %v", err) + } + } +} diff --git a/app/servoper/operator.go b/app/servoper/operator.go new file mode 100644 index 0000000..2b1370d --- /dev/null +++ b/app/servoper/operator.go @@ -0,0 +1,21 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package servoper + +import ( + "mproxy/app/logger" +) + +type OperatorParams struct{} + +type Operator struct { + logg *logger.Logger +} + +func NewOperator(params *OperatorParams) (*Operator, error) { + var err error + oper := &Operator{} + oper.logg = logger.NewLoggerWithSubject("servoper") + return oper, err +} diff --git a/app/servoper/service.go b/app/servoper/service.go new file mode 100644 index 0000000..b688430 --- /dev/null +++ b/app/servoper/service.go @@ -0,0 +1,20 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package servoper + +type SendHelloParams struct{} + +type SendHelloResult struct { + Message string `json:"message"` + Alive bool `json:"alive"` +} + +func (oper *Operator) SendHello(param *SendHelloParams) (*SendHelloResult, error) { + var err error + res := &SendHelloResult{ + Alive: true, + Message: "hello", + } + return res, err +} diff --git a/cmd/mproxyctl/main.go b/cmd/mproxyctl/main.go new file mode 100644 index 0000000..bbe67b9 --- /dev/null +++ b/cmd/mproxyctl/main.go @@ -0,0 +1,22 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package main + +import ( + "mproxy/cmd/mproxyctl/util" + "os" +) + +func main() { + var err error + util := util.NewUtil() + err = util.Build() + if err != nil { + os.Exit(1) + } + err = util.Exec(os.Args[1:]) + if err != nil { + os.Exit(1) + } +} diff --git a/cmd/mproxyctl/util/util.go b/cmd/mproxyctl/util/util.go new file mode 100644 index 0000000..b553a4b --- /dev/null +++ b/cmd/mproxyctl/util/util.go @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package util + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/spf13/cobra" +) + +type Util struct { + rootCmd *cobra.Command +} + +func NewUtil() *Util { + return &Util{} +} + +func (util *Util) GetRooCmd() *cobra.Command { + return util.rootCmd +} + +func (util *Util) Build() error { + var err error + execName := filepath.Base(os.Args[0]) + rootCmd := &cobra.Command{ + Use: execName, + Short: "\nOperation with artefacts: files, images, service accounts and grants", + SilenceUsage: true, + } + rootCmd.CompletionOptions.DisableDefaultCmd = true + util.rootCmd = rootCmd + + return err +} + +func (util *Util) Exec(args []string) error { + var err error + util.rootCmd.SetArgs(args) + err = util.rootCmd.Execute() + return err +} + +func (util *Util) Hello(cmd *cobra.Command, args []string) { + fmt.Println("hello, world!") +} diff --git a/cmd/mproxyd/main.go b/cmd/mproxyd/main.go new file mode 100644 index 0000000..c742297 --- /dev/null +++ b/cmd/mproxyd/main.go @@ -0,0 +1,24 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package main + +import ( + "os" + + "mproxy/app/logger" + "mproxy/cmd/mproxyd/starter" + + _ "mproxy/app/handler" +) + +func main() { + log := logger.NewLoggerWithSubject("main") + sta := starter.NewStarter() + err := sta.Exec() + if err != nil { + log.Errorf("%v", err) + os.Exit(1) + } + os.Exit(0) +} diff --git a/cmd/mproxyd/starter/starter.go b/cmd/mproxyd/starter/starter.go new file mode 100644 index 0000000..a022d5e --- /dev/null +++ b/cmd/mproxyd/starter/starter.go @@ -0,0 +1,75 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package starter + +import ( + "os" + "path/filepath" + + "mproxy/app/server" + + "github.com/spf13/cobra" +) + +type Starter struct { + runAsDaemon bool + port uint32 + cmd *cobra.Command + srv *server.Server +} + +func NewStarter() *Starter { + execName := filepath.Base(os.Args[0]) + sta := &Starter{} + cmd := &cobra.Command{ + Use: execName, + Short: "\nArtifact storage service", + SilenceUsage: true, + RunE: sta.run, + } + cmd.CompletionOptions.DisableDefaultCmd = true + cmd.Flags().BoolVarP(&sta.runAsDaemon, "asDaemon", "D", true, "Run service as daemon") + cmd.Flags().Uint32VarP(&sta.port, "port", "P", 1025, "Service port") + + sta.cmd = cmd + return sta +} + +func (sta *Starter) GetCmd() *cobra.Command { + return sta.cmd +} + +func (sta *Starter) run(cmd *cobra.Command, args []string) error { + var err error + srv, err := server.NewServer() + if err != nil { + return err + } + err = srv.Configure() + if err != nil { + return err + } + srv.SetAsDaemon(sta.runAsDaemon) + srv.SetPort(sta.port) + + err = srv.Daemonize() + if err != nil { + return err + } + + err = srv.Build() + if err != nil { + return err + } + err = srv.Run() + if err != nil { + return err + } + sta.srv = srv + return err +} + +func (sta *Starter) Exec() error { + return sta.cmd.Execute() +} diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..48a6846 --- /dev/null +++ b/config.guess @@ -0,0 +1,1815 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2024 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2024-07-27' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to . + + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system '$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2024 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try '$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# Just in case it came from the environment. +GUESS= + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still +# use 'HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c17 c99 c89 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case $UNAME_SYSTEM in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #if defined(__ANDROID__) + LIBC=android + #else + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu + #elif defined(__LLVM_LIBC__) + LIBC=llvm + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif + #endif + EOF + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case $UNAME_VERSION in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + GUESS=$machine-${os}${release}${abi-} + ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; + *:MidnightBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; + *:ekkoBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; + *:SolidBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; + *:OS108:*:*) + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; + macppc:MirBSD:*:*) + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; + *:MirBSD:*:*) + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; + *:Sortix:*:*) + GUESS=$UNAME_MACHINE-unknown-sortix + ;; + *:Twizzler:*:*) + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; + *:Redox:*:*) + GUESS=$UNAME_MACHINE-unknown-redox + ;; + mips:OSF1:*.*) + GUESS=mips-dec-osf1 + ;; + alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; + Amiga*:UNIX_System_V:4.0:*) + GUESS=m68k-unknown-sysv4 + ;; + *:[Aa]miga[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; + *:[Mm]orph[Oo][Ss]:*:*) + GUESS=$UNAME_MACHINE-unknown-morphos + ;; + *:OS/390:*:*) + GUESS=i370-ibm-openedition + ;; + *:z/VM:*:*) + GUESS=s390-ibm-zvmoe + ;; + *:OS400:*:*) + GUESS=powerpc-ibm-os400 + ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + GUESS=arm-unknown-riscos + ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + GUESS=hppa1.1-hitachi-hiuxmpp + ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; + NILE*:*:*:dcosx) + GUESS=pyramid-pyramid-svr4 + ;; + DRS?6000:unix:4.0:6*) + GUESS=sparc-icl-nx6 + ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; + s390x:SunOS:*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; + sun4H:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; + sun4*:SunOS:*:*) + case `/usr/bin/arch -k` in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like '4.1.3-JL'. + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; + sun3*:SunOS:*:*) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case `/bin/arch` in + sun3) + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; + sun4) + GUESS=sparc-sun-sunos$UNAME_RELEASE + ;; + esac + ;; + aushp:SunOS:*:*) + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; + m68k:machten:*:*) + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; + powerpc:machten:*:*) + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; + RISC*:Mach:*:*) + GUESS=mips-dec-mach_bsd4.3 + ;; + RISC*:ULTRIX:*:*) + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; + VAX*:ULTRIX*:*:*) + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; + Motorola:PowerMAX_OS:*:*) + GUESS=powerpc-motorola-powermax + ;; + Motorola:*:4.3:PL8-*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + GUESS=powerpc-harris-powermax + ;; + Night_Hawk:Power_UNIX:*:*) + GUESS=powerpc-harris-powerunix + ;; + m88k:CX/UX:7*:*) + GUESS=m88k-harris-cxux7 + ;; + m88k:*:4*:R4*) + GUESS=m88k-motorola-sysv4 + ;; + m88k:*:3*:R3*) + GUESS=m88k-motorola-sysv3 + ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 + then + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x + then + GUESS=m88k-dg-dgux$UNAME_RELEASE + else + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE + fi + else + GUESS=i586-dg-dgux$UNAME_RELEASE + fi + ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + GUESS=m88k-dolphin-sysv3 + ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + GUESS=m88k-motorola-sysv3 + ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + GUESS=m88k-tektronix-sysv3 + ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + GUESS=m68k-tektronix-bsd + ;; + *:IRIX*:*:*) + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + GUESS=i386-ibm-aix + ;; + ia64:AIX:*:*) + if test -x /usr/bin/oslevel ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + int + main () + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + GUESS=$SYSTEM_NAME + else + GUESS=rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + GUESS=rs6000-ibm-aix3.2.4 + else + GUESS=rs6000-ibm-aix3.2 + fi + ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if test -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE + fi + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; + *:AIX:*:*) + GUESS=rs6000-ibm-aix + ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + GUESS=romp-ibm-bsd4.4 + ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + GUESS=rs6000-bull-bosx + ;; + DPX/2?00:B.O.S.:*:*) + GUESS=m68k-bull-sysv3 + ;; + 9000/[34]??:4.3bsd:1.*:*) + GUESS=m68k-hp-bsd + ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + GUESS=m68k-hp-bsd4.4 + ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if test -x /usr/bin/getconf; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case $sc_kernel_bits in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if test "$HP_ARCH" = ""; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int + main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if test "$HP_ARCH" = hppa2.0w + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + GUESS=unknown-hitachi-hiuxwe2 + ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + GUESS=hppa1.1-hp-bsd + ;; + 9000/8??:4.3bsd:*:*) + GUESS=hppa1.0-hp-bsd + ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + GUESS=hppa1.0-hp-mpeix + ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + GUESS=hppa1.1-hp-osf + ;; + hp8??:OSF1:*:*) + GUESS=hppa1.0-hp-osf + ;; + i*86:OSF1:*:*) + if test -x /usr/sbin/sysversion ; then + GUESS=$UNAME_MACHINE-unknown-osf1mk + else + GUESS=$UNAME_MACHINE-unknown-osf1 + fi + ;; + parisc*:Lites*:*:*) + GUESS=hppa1.1-hp-lites + ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + GUESS=c1-convex-bsd + ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + GUESS=c34-convex-bsd + ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + GUESS=c38-convex-bsd + ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + GUESS=c4-convex-bsd + ;; + CRAY*Y-MP:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; + CRAY*T3E:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; + CRAY*SV1:*:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; + *:UNICOS/mp:*:*) + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; + sparc*:BSD/OS:*:*) + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; + *:BSD/OS:*:*) + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi + else + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf + fi + ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; + i*:CYGWIN*:*) + GUESS=$UNAME_MACHINE-pc-cygwin + ;; + *:MINGW64*:*) + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; + *:MINGW*:*) + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; + *:MSYS*:*) + GUESS=$UNAME_MACHINE-pc-msys + ;; + i*:PW*:*) + GUESS=$UNAME_MACHINE-pc-pw32 + ;; + *:SerenityOS:*:*) + GUESS=$UNAME_MACHINE-pc-serenity + ;; + *:Interix*:*) + case $UNAME_MACHINE in + x86) + GUESS=i586-pc-interix$UNAME_RELEASE + ;; + authenticamd | genuineintel | EM64T) + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; + IA64) + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; + esac ;; + i*:UWIN*:*) + GUESS=$UNAME_MACHINE-pc-uwin + ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + GUESS=x86_64-pc-cygwin + ;; + prep*:SunOS:5.*:*) + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; + *:GNU:*:*) + # the GNU system + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; + *:Minix:*:*) + GUESS=$UNAME_MACHINE-unknown-minix + ;; + aarch64:Linux:*:*) + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __ARM_EABI__ + #ifdef __ARM_PCS_VFP + ABI=eabihf + #else + ABI=eabi + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; + esac + fi + GUESS=$CPU-unknown-linux-$LIBCABI + ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi + else + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf + fi + fi + ;; + avr32*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + cris:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + crisv32:Linux:*:*) + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; + e2k:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + frv:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + hexagon:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:Linux:*:*) + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; + ia64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + k1om:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + kvx:cos:*:*) + GUESS=$UNAME_MACHINE-unknown-cos + ;; + kvx:mbr:*:*) + GUESS=$UNAME_MACHINE-unknown-mbr + ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m32r*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + m68*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + openrisc*:Linux:*:*) + GUESS=or1k-unknown-linux-$LIBC + ;; + or32:Linux:*:* | or1k*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + padre:Linux:*:*) + GUESS=sparc-unknown-linux-$LIBC + ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + GUESS=hppa64-unknown-linux-$LIBC + ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; + esac + ;; + ppc64:Linux:*:*) + GUESS=powerpc64-unknown-linux-$LIBC + ;; + ppc:Linux:*:*) + GUESS=powerpc-unknown-linux-$LIBC + ;; + ppc64le:Linux:*:*) + GUESS=powerpc64le-unknown-linux-$LIBC + ;; + ppcle:Linux:*:*) + GUESS=powerpcle-unknown-linux-$LIBC + ;; + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + s390:Linux:*:* | s390x:Linux:*:*) + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; + sh64*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sh*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + tile*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + vax:Linux:*:*) + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; + x86_64:Linux:*:*) + set_cc_for_build + CPU=$UNAME_MACHINE + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + ABI=64 + sed 's/^ //' << EOF > "$dummy.c" + #ifdef __i386__ + ABI=x86 + #else + #ifdef __ILP32__ + ABI=x32 + #endif + #endif +EOF + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` + eval "$cc_set_abi" + case $ABI in + x86) CPU=i686 ;; + x32) LIBCABI=${LIBC}x32 ;; + esac + fi + GUESS=$CPU-pc-linux-$LIBCABI + ;; + xtensa*:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + GUESS=i386-sequent-sysv4 + ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; + i*86:OS/2:*:*) + # If we were able to find 'uname', then EMX Unix compatibility + # is probably installed. + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; + i*86:XTS-300:*:STOP) + GUESS=$UNAME_MACHINE-unknown-stop + ;; + i*86:atheos:*:*) + GUESS=$UNAME_MACHINE-unknown-atheos + ;; + i*86:syllable:*:*) + GUESS=$UNAME_MACHINE-pc-syllable + ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; + i*86:*DOS:*:*) + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL + fi + ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL + else + GUESS=$UNAME_MACHINE-pc-sysv32 + fi + ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + GUESS=i586-pc-msdosdjgpp + ;; + Intel:Mach:3*:*) + GUESS=i386-pc-mach3 + ;; + paragon:*:*:*) + GUESS=i860-intel-osf1 + ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 + fi + ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + GUESS=m68010-convergent-sysv + ;; + mc68k:UNIX:SYSTEM5:3.51m) + GUESS=m68k-convergent-sysv + ;; + M680?0:D-NIX:5.3:*) + GUESS=m68k-diab-dnix + ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; + mc68030:UNIX_System_V:4.*:*) + GUESS=m68k-atari-sysv4 + ;; + TSUNAMI:LynxOS:2.*:*) + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; + rs6000:LynxOS:2.*:*) + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; + SM[BE]S:UNIX_SV:*:*) + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; + RM*:ReliantUNIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + RM*:SINIX-*:*:*) + GUESS=mips-sni-sysv4 + ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 + else + GUESS=ns32k-sni-sysv + fi + ;; + PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort + # says + GUESS=i586-unisys-sysv4 + ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + GUESS=hppa1.1-stratus-sysv4 + ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + GUESS=i860-stratus-sysv4 + ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=$UNAME_MACHINE-stratus-vos + ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + GUESS=hppa1.1-stratus-vos + ;; + mc68*:A/UX:*:*) + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; + news*:NEWS-OS:6*:*) + GUESS=mips-sony-newsos6 + ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if test -d /usr/nec; then + GUESS=mips-nec-sysv$UNAME_RELEASE + else + GUESS=mips-unknown-sysv$UNAME_RELEASE + fi + ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + GUESS=powerpc-be-beos + ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + GUESS=powerpc-apple-beos + ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + GUESS=i586-pc-beos + ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + GUESS=i586-pc-haiku + ;; + ppc:Haiku:*:*) # Haiku running on Apple PowerPC + GUESS=powerpc-apple-haiku + ;; + *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) + GUESS=$UNAME_MACHINE-unknown-haiku + ;; + SX-4:SUPER-UX:*:*) + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; + SX-5:SUPER-UX:*:*) + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; + SX-6:SUPER-UX:*:*) + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; + SX-7:SUPER-UX:*:*) + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; + SX-8:SUPER-UX:*:*) + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; + SX-8R:SUPER-UX:*:*) + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; + SX-ACE:SUPER-UX:*:*) + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; + Power*:Rhapsody:*:*) + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; + *:Rhapsody:*:*) + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; + arm64:Darwin:*:*) + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; + *:QNX:*:4*) + GUESS=i386-pc-qnx + ;; + NEO-*:NONSTOP_KERNEL:*:*) + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; + NSE-*:NONSTOP_KERNEL:*:*) + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; + NSR-*:NONSTOP_KERNEL:*:*) + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; + NSV-*:NONSTOP_KERNEL:*:*) + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; + NSX-*:NONSTOP_KERNEL:*:*) + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; + *:NonStop-UX:*:*) + GUESS=mips-compaq-nonstopux + ;; + BS2000:POSIX*:*:*) + GUESS=bs2000-siemens-sysv + ;; + DS/*:UNIX_System_V:*:*) + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "${cputype-}" = 386; then + UNAME_MACHINE=i386 + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype + fi + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; + *:TOPS-10:*:*) + GUESS=pdp10-unknown-tops10 + ;; + *:TENEX:*:*) + GUESS=pdp10-unknown-tenex + ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + GUESS=pdp10-dec-tops20 + ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + GUESS=pdp10-xkl-tops20 + ;; + *:TOPS-20:*:*) + GUESS=pdp10-unknown-tops20 + ;; + *:ITS:*:*) + GUESS=pdp10-unknown-its + ;; + SEI:*:*:SEIUX) + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; + *:DragonFly:*:*) + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; + esac ;; + *:XENIX:*:SysV) + GUESS=i386-pc-xenix + ;; + i*86:skyos:*:*) + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; + i*86:rdos:*:*) + GUESS=$UNAME_MACHINE-pc-rdos + ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; + *:AROS:*:*) + GUESS=$UNAME_MACHINE-unknown-aros + ;; + x86_64:VMkernel:*:*) + GUESS=$UNAME_MACHINE-unknown-esx + ;; + amd64:Isilon\ OneFS:*:*) + GUESS=x86_64-unknown-onefs + ;; + *:Unleashed:*:*) + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad + ;; +esac + +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +int +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case $UNAME_MACHINE:$UNAME_SYSTEM in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF +fi + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..4aaae46 --- /dev/null +++ b/config.sub @@ -0,0 +1,2354 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2024 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale + +timestamp='2024-05-27' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2024 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try '$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + cloudabi*-eabi* \ + | kfreebsd*-gnu* \ + | knetbsd*-gnu* \ + | kopensolaris*-gnu* \ + | linux-* \ + | managarm-* \ + | netbsd*-eabi* \ + | netbsd*-gnu* \ + | nto-qnx* \ + | os2-emx* \ + | rtmk-nova* \ + | storm-chaos* \ + | uclinux-gnu* \ + | uclinux-uclibc* \ + | windows-* ) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac + ;; + *-*) + case $field1-$field2 in + # Shorthands that happen to contain a single dash + convex-c[12] | convex-c3[248]) + basic_machine=$field2-convex + basic_os= + ;; + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Do not treat sunos as a manufacturer + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + # Manufacturers + 3100* \ + | 32* \ + | 3300* \ + | 3600* \ + | 7300* \ + | acorn \ + | altos* \ + | apollo \ + | apple \ + | atari \ + | att* \ + | axis \ + | be \ + | bull \ + | cbm \ + | ccur \ + | cisco \ + | commodore \ + | convergent* \ + | convex* \ + | cray \ + | crds \ + | dec* \ + | delta* \ + | dg \ + | digital \ + | dolphin \ + | encore* \ + | gould \ + | harris \ + | highlevel \ + | hitachi* \ + | hp \ + | ibm* \ + | intergraph \ + | isi* \ + | knuth \ + | masscomp \ + | microblaze* \ + | mips* \ + | motorola* \ + | ncr* \ + | news \ + | next \ + | ns \ + | oki \ + | omron* \ + | pc533* \ + | rebel \ + | rom68k \ + | rombug \ + | semi \ + | sequent* \ + | siemens \ + | sgi* \ + | siemens \ + | sim \ + | sni \ + | sony* \ + | stratus \ + | sun \ + | sun[234]* \ + | tektronix \ + | tti* \ + | ultra \ + | unicom* \ + | wec \ + | winbond \ + | wrs) + basic_machine=$field1-$field2 + basic_os= + ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + basic_os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + basic_os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + basic_os=tops20 + ;; + delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) + cpu=m68k + vendor=motorola + ;; + # This used to be dpx2*, but that gets the RS6000-based + # DPX/20 and the x86-based DPX/2-100 wrong. See + # https://oldskool.silicium.org/stations/bull_dpx20.htm + # https://www.feb-patrimoine.com/english/bull_dpx2.htm + # https://www.feb-patrimoine.com/english/unix_and_bull.htm + dpx2 | dpx2[23]00 | dpx2[23]xx) + cpu=m68k + vendor=bull + ;; + dpx2100 | dpx21xx) + cpu=i386 + vendor=bull + ;; + dpx20) + cpu=rs6000 + vendor=bull + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $basic_os in + irix*) + ;; + *) + basic_os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + basic_os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + basic_os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + saved_IFS=$IFS + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if test x"$basic_os" != x +then + +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just +# set os. +obj= +case $basic_os in + gnu/linux*) + kernel=linux + os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` + ;; + os2-emx) + kernel=os2 + os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` + ;; + nto-qnx*) + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; + *-*) + saved_IFS=$IFS + IFS="-" read kernel os <&2 + fi + ;; + *) + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 + ;; +esac + +case $obj in + aout* | coff* | elf* | pe*) + ;; + '') + # empty is fine + ;; + *) + echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 + exit 1 + ;; +esac + +# Here we handle the constraint that a (synthetic) cpu and os are +# valid only in combination with each other and nowhere else. +case $cpu-$os in + # The "javascript-unknown-ghcjs" triple is used by GHC; we + # accept it here in order to tolerate that, but reject any + # variations. + javascript-ghcjs) + ;; + javascript-* | *-ghcjs) + echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os-$obj in + linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ + | linux-mlibc*- | linux-musl*- | linux-newlib*- \ + | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) + ;; + uclinux-uclibc*- | uclinux-gnu*- ) + ;; + managarm-mlibc*- | managarm-kernel*- ) + ;; + windows*-msvc*-) + ;; + -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ + | -uclibc*- ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; + *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; + *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 + ;; + kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) + ;; + vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; + nto-qnx*-) + ;; + os2-emx-) + ;; + rtmk-nova-) + ;; + *-eabi*- | *-gnueabi*-) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format + ;; + -*-) + # Blank kernel with real OS is always fine. + ;; + --*) + # Blank kernel and OS with real machine code file format is always fine. + ;; + *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 + exit 1 + ;; +esac + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) + vendor=acorn + ;; + *-sunos* | *-solaris*) + vendor=sun + ;; + *-cnk* | *-aix*) + vendor=ibm + ;; + *-beos*) + vendor=be + ;; + *-hpux*) + vendor=hp + ;; + *-mpeix*) + vendor=hp + ;; + *-hiux*) + vendor=hitachi + ;; + *-unos*) + vendor=crds + ;; + *-dgux*) + vendor=dg + ;; + *-luna*) + vendor=omron + ;; + *-genix*) + vendor=ns + ;; + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) + vendor=ibm + ;; + s390-* | s390x-*) + vendor=ibm + ;; + *-ptx*) + vendor=sequent + ;; + *-tpf*) + vendor=ibm + ;; + *-vxsim* | *-vxworks* | *-windiss*) + vendor=wrs + ;; + *-aux*) + vendor=apple + ;; + *-hms*) + vendor=hitachi + ;; + *-mpw* | *-macos*) + vendor=apple + ;; + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) + vendor=atari + ;; + *-vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..3889618 --- /dev/null +++ b/configure @@ -0,0 +1,5139 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.72 for mproxy 0.0.1. +# +# +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else case e in #( + e) case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as 'sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed 'exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : + +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac +fi +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null +then : + as_have_required=yes +else case e in #( + e) as_have_required=no ;; +esac +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : + +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$as_shell as_have_required=yes + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : + break 2 +fi +fi + done;; + esac + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi ;; +esac +fi + + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed 'exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + else + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi ;; +esac +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else case e in #( + e) as_fn_append () + { + eval $1=\$$1\$2 + } ;; +esac +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else case e in #( + e) as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } ;; +esac +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + t clear + :clear + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated + +# Sed expression to map a string onto a valid variable name. +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='mproxy' +PACKAGE_TARNAME='mproxy' +PACKAGE_VERSION='0.0.1' +PACKAGE_STRING='mproxy 0.0.1' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_default_prefix=/usr/local +ac_subst_vars='LTLIBOBJS +LIBOBJS +srv_datadir +srv_libdir +srv_sharedir +srv_rundir +srv_logdir +srv_confdir +srv_devel_mode +SYSTEMD_FALSE +SYSTEMD_TRUE +LINUX_OS_FALSE +LINUX_OS_TRUE +FREEBSD_OS_FALSE +FREEBSD_OS_TRUE +ROOT_GROUP +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +CP +SWAG +DPKGSOURCE +DBUILDPACKAGE +HELM +PODMAN +BASENAME +CPIO +SUDO +UNIQ +SORT +XARGS +FIND +GO +HAVE_GO +am__xargs_n +am__rm_f_notfound +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +CSCOPE +ETAGS +CTAGS +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_devel_mode +with_confdir +with_logdir +with_rundir +with_sharedir +with_libdir +with_datadir +' + ac_precious_vars='build_alias +host_alias +target_alias' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: '$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: '$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: '$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: '$ac_useropt'" + ac_useropt_orig=$ac_useropt + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: '$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +'configure' configures mproxy 0.0.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print 'checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for '--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or '..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/mproxy] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of mproxy 0.0.1:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-devel-mode Enable developmend mode + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-confdir=PATH set configuration dir to PATH (default: + $SRV_CONFDIR) + --with-logdir=PATH set path for logdir (default: $SRV_LOGDIR) + --with-rundir=PATH set path for rundir (default: $SRV_RUNDIR) + --with-sharedir=PATH set share directory (default: $SRV_SHAREDIR) + --with-libdir=PATH set lib directory (default: $SRV_LIBDIR) + --with-datadir=PATH set path for datadir (default: $SRV_DATADIR) + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +mproxy configure 0.0.1 +generated by GNU Autoconf 2.72 + +Copyright (C) 2023 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by mproxy $as_me 0.0.1, which was +generated by GNU Autoconf 2.72. Invocation command line was + + $ $0$ac_configure_args_raw + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" + # Save into config.log some information that might help in debugging. + { + echo + + printf "%s\n" "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + printf "%s\n" "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + printf "%s\n" "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + printf "%s\n" "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + printf "%s\n" "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +printf "%s\n" "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h + +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + ac_site_files="$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" +else + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +fi + +for ac_site_file in $ac_site_files +do + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See 'config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub missing install-sh" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +am__api_version='1.17' + + + + # Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + ;; +esac +fi + if test ${ac_cv_path_install+y}; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5 +printf %s "checking whether sleep supports fractional seconds... " >&6; } +if test ${am_cv_sleep_fractional_seconds+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if sleep 0.001 2>/dev/null +then : + am_cv_sleep_fractional_seconds=yes +else case e in #( + e) am_cv_sleep_fractional_seconds=no ;; +esac +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5 +printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; } + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5 +printf %s "checking filesystem timestamp resolution... " >&6; } +if test ${am_cv_filesystem_timestamp_resolution+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) # Default to the worst case. +am_cv_filesystem_timestamp_resolution=2 + +# Only try to go finer than 1 sec if sleep can do it. +# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, +# - 1 sec is not much of a win compared to 2 sec, and +# - it takes 2 seconds to perform the test whether 1 sec works. +# +# Instead, just use the default 2s on platforms that have 1s resolution, +# accept the extra 1s delay when using $sleep in the Automake tests, in +# exchange for not incurring the 2s delay for running the test for all +# packages. +# +am_try_resolutions= +if test "$am_cv_sleep_fractional_seconds" = yes; then + # Even a millisecond often causes a bunch of false positives, + # so just try a hundredth of a second. The time saved between .001 and + # .01 is not terribly consequential. + am_try_resolutions="0.01 0.1 $am_try_resolutions" +fi + +# In order to catch current-generation FAT out, we must *modify* files +# that already exist; the *creation* timestamp is finer. Use names +# that make ls -t sort them differently when they have equal +# timestamps than when they have distinct timestamps, keeping +# in mind that ls -t prints the *newest* file first. +rm -f conftest.ts? +: > conftest.ts1 +: > conftest.ts2 +: > conftest.ts3 + +# Make sure ls -t actually works. Do 'set' in a subshell so we don't +# clobber the current shell's arguments. (Outer-level square brackets +# are removed by m4; they're present so that m4 does not expand +# ; be careful, easy to get confused.) +if ( + set X `ls -t conftest.ts[12]` && + { + test "$*" != "X conftest.ts1 conftest.ts2" || + test "$*" != "X conftest.ts2 conftest.ts1"; + } +); then :; else + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} +as_fn_error $? "ls -t produces unexpected output. +Make sure there is not a broken ls alias in your environment. +See 'config.log' for more details" "$LINENO" 5; } +fi + +for am_try_res in $am_try_resolutions; do + # Any one fine-grained sleep might happen to cross the boundary + # between two values of a coarser actual resolution, but if we do + # two fine-grained sleeps in a row, at least one of them will fall + # entirely within a coarse interval. + echo alpha > conftest.ts1 + sleep $am_try_res + echo beta > conftest.ts2 + sleep $am_try_res + echo gamma > conftest.ts3 + + # We assume that 'ls -t' will make use of high-resolution + # timestamps if the operating system supports them at all. + if (set X `ls -t conftest.ts?` && + test "$2" = conftest.ts3 && + test "$3" = conftest.ts2 && + test "$4" = conftest.ts1); then + # + # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, + # because we don't need to test make. + make_ok=true + if test $am_try_res != 1; then + # But if we've succeeded so far with a subsecond resolution, we + # have one more thing to check: make. It can happen that + # everything else supports the subsecond mtimes, but make doesn't; + # notably on macOS, which ships make 3.81 from 2006 (the last one + # released under GPLv2). https://bugs.gnu.org/68808 + # + # We test $MAKE if it is defined in the environment, else "make". + # It might get overridden later, but our hope is that in practice + # it does not matter: it is the system "make" which is (by far) + # the most likely to be broken, whereas if the user overrides it, + # probably they did so with a better, or at least not worse, make. + # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html + # + # Create a Makefile (real tab character here): + rm -f conftest.mk + echo 'conftest.ts1: conftest.ts2' >conftest.mk + echo ' touch conftest.ts2' >>conftest.mk + # + # Now, running + # touch conftest.ts1; touch conftest.ts2; make + # should touch ts1 because ts2 is newer. This could happen by luck, + # but most often, it will fail if make's support is insufficient. So + # test for several consecutive successes. + # + # (We reuse conftest.ts[12] because we still want to modify existing + # files, not create new ones, per above.) + n=0 + make=${MAKE-make} + until test $n -eq 3; do + echo one > conftest.ts1 + sleep $am_try_res + echo two > conftest.ts2 # ts2 should now be newer than ts1 + if $make -f conftest.mk | grep 'up to date' >/dev/null; then + make_ok=false + break # out of $n loop + fi + n=`expr $n + 1` + done + fi + # + if $make_ok; then + # Everything we know to check worked out, so call this resolution good. + am_cv_filesystem_timestamp_resolution=$am_try_res + break # out of $am_try_res loop + fi + # Otherwise, we'll go on to check the next resolution. + fi +done +rm -f conftest.ts? +# (end _am_filesystem_timestamp_resolution) + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5 +printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; } + +# This check should not be cached, as it may vary across builds of +# different projects. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +printf %s "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +am_build_env_is_sane=no +am_has_slept=no +rm -f conftest.file +for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + test "$2" = conftest.file + ); then + am_build_env_is_sane=yes + break + fi + # Just in case. + sleep "$am_cv_filesystem_timestamp_resolution" + am_has_slept=yes +done + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5 +printf "%s\n" "$am_build_env_is_sane" >&6; } +if test "$am_build_env_is_sane" = no; then + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi + +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1 +then : + +else case e in #( + e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) & + am_sleep_pid=$! + ;; +esac +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was 's,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + + +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + + + if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + *'BusyBox '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + ;; +esac +fi + + test -d ./--version && rmdir ./--version + if test ${ac_cv_path_mkdir+y}; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use plain mkdir -p, + # in the hope it doesn't have the bugs of ancient mkdir. + MKDIR_P='mkdir -p' + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi ;; +esac +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make ;; +esac +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + SET_MAKE= +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +AM_DEFAULT_VERBOSITY=1 +# Check whether --enable-silent-rules was given. +if test ${enable_silent_rules+y} +then : + enableval=$enable_silent_rules; +fi + +am_make=${MAKE-make} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if printf "%s\n" 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } +AM_BACKSLASH='\' + +am__rm_f_notfound= +if (rm -f && rm -fr && rm -rf) 2>/dev/null +then : + +else case e in #( + e) am__rm_f_notfound='""' ;; +esac +fi + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5 +printf %s "checking xargs -n works... " >&6; } +if test ${am_cv_xargs_n_works+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 +3" +then : + am_cv_xargs_n_works=yes +else case e in #( + e) am_cv_xargs_n_works=no ;; +esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5 +printf "%s\n" "$am_cv_xargs_n_works" >&6; } +if test "$am_cv_xargs_n_works" = yes +then : + am__xargs_n='xargs -n' +else case e in #( + e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }' + ;; +esac +fi + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='mproxy' + VERSION='0.0.1' + + +printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h + + +printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 +printf %s "checking how to create a pax tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_pax-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x pax -w "$$tardir"' + am__tar_='pax -L -x pax -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H pax -L' + am__tar_='find "$tardir" -print | cpio -o -H pax -L' + am__untar='cpio -i -H pax -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_pax}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + if test ${am_cv_prog_tar_pax+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) am_cv_prog_tar_pax=$_am_tool ;; +esac +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 +printf "%s\n" "$am_cv_prog_tar_pax" >&6; } + + + + + +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + + + + + + + + +PACKAGE=mproxy + +# Extract the first word of "go", so it can be a program name with args. +set dummy go; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_HAVE_GO+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -n "$HAVE_GO"; then + ac_cv_prog_HAVE_GO="$HAVE_GO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_GO="true" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_GO" && ac_cv_prog_HAVE_GO="false" +fi ;; +esac +fi +HAVE_GO=$ac_cv_prog_HAVE_GO +if test -n "$HAVE_GO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_GO" >&5 +printf "%s\n" "$HAVE_GO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test "x$HAVE_GO" = "xfalse"; then + as_fn_error $? "Requested program go not found" "$LINENO" 5 +fi + +# Extract the first word of "go", so it can be a program name with args. +set dummy go; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GO+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $GO in + [\\/]* | ?:[\\/]*) + ac_cv_path_GO="$GO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GO="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +GO=$ac_cv_path_GO +if test -n "$GO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GO" >&5 +printf "%s\n" "$GO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "find", so it can be a program name with args. +set dummy find; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_FIND+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $FIND in + [\\/]* | ?:[\\/]*) + ac_cv_path_FIND="$FIND" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_FIND="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +FIND=$ac_cv_path_FIND +if test -n "$FIND"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 +printf "%s\n" "$FIND" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "xargs", so it can be a program name with args. +set dummy xargs; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_XARGS+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $XARGS in + [\\/]* | ?:[\\/]*) + ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_XARGS="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +XARGS=$ac_cv_path_XARGS +if test -n "$XARGS"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5 +printf "%s\n" "$XARGS" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "sort", so it can be a program name with args. +set dummy sort; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SORT+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $SORT in + [\\/]* | ?:[\\/]*) + ac_cv_path_SORT="$SORT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SORT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +SORT=$ac_cv_path_SORT +if test -n "$SORT"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5 +printf "%s\n" "$SORT" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +# Extract the first word of "uniq", so it can be a program name with args. +set dummy uniq; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_UNIQ+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $UNIQ in + [\\/]* | ?:[\\/]*) + ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_UNIQ="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +UNIQ=$ac_cv_path_UNIQ +if test -n "$UNIQ"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5 +printf "%s\n" "$UNIQ" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +for ac_prog in sudo false +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SUDO+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $SUDO in + [\\/]* | ?:[\\/]*) + ac_cv_path_SUDO="$SUDO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SUDO="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +SUDO=$ac_cv_path_SUDO +if test -n "$SUDO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SUDO" >&5 +printf "%s\n" "$SUDO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$SUDO" && break +done + +for ac_prog in cpio false +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_CPIO+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $CPIO in + [\\/]* | ?:[\\/]*) + ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_CPIO="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +CPIO=$ac_cv_path_CPIO +if test -n "$CPIO"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5 +printf "%s\n" "$CPIO" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$CPIO" && break +done + +for ac_prog in basename +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_BASENAME+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $BASENAME in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_BASENAME="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +BASENAME=$ac_cv_path_BASENAME +if test -n "$BASENAME"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 +printf "%s\n" "$BASENAME" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$BASENAME" && break +done + + +for ac_prog in podman true +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PODMAN+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $PODMAN in + [\\/]* | ?:[\\/]*) + ac_cv_path_PODMAN="$PODMAN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PODMAN="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +PODMAN=$ac_cv_path_PODMAN +if test -n "$PODMAN"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PODMAN" >&5 +printf "%s\n" "$PODMAN" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$PODMAN" && break +done + +for ac_prog in helm true +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_HELM+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $HELM in + [\\/]* | ?:[\\/]*) + ac_cv_path_HELM="$HELM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_HELM="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +HELM=$ac_cv_path_HELM +if test -n "$HELM"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HELM" >&5 +printf "%s\n" "$HELM" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$HELM" && break +done + +for ac_prog in dpkg-buildpackage true +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DBUILDPACKAGE+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $DBUILDPACKAGE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DBUILDPACKAGE="$DBUILDPACKAGE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DBUILDPACKAGE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +DBUILDPACKAGE=$ac_cv_path_DBUILDPACKAGE +if test -n "$DBUILDPACKAGE"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DBUILDPACKAGE" >&5 +printf "%s\n" "$DBUILDPACKAGE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$DBUILDPACKAGE" && break +done + +for ac_prog in dpkg-source true +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_DPKGSOURCE+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $DPKGSOURCE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DPKGSOURCE="$DPKGSOURCE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_DPKGSOURCE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +DPKGSOURCE=$ac_cv_path_DPKGSOURCE +if test -n "$DPKGSOURCE"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DPKGSOURCE" >&5 +printf "%s\n" "$DPKGSOURCE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$DPKGSOURCE" && break +done + +for ac_prog in swag true +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_SWAG+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $SWAG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWAG="$SWAG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_SWAG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +SWAG=$ac_cv_path_SWAG +if test -n "$SWAG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SWAG" >&5 +printf "%s\n" "$SWAG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$SWAG" && break +done + + + +for ac_prog in gcp cp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_CP+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $CP in + [\\/]* | ?:[\\/]*) + ac_cv_path_CP="$CP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_CP="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac ;; +esac +fi +CP=$ac_cv_path_CP +if test -n "$CP"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 +printf "%s\n" "$CP" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$CP" && break +done + +if test -z "$CP"; then + as_fn_error $? "Requested program cp not found" "$LINENO" 5 +fi + + + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +case $host_os in + *freebsd* ) + ROOT_GROUP="wheel" + + if true; then + FREEBSD_OS_TRUE= + FREEBSD_OS_FALSE='#' +else + FREEBSD_OS_TRUE='#' + FREEBSD_OS_FALSE= +fi + + if false; then + LINUX_OS_TRUE= + LINUX_OS_FALSE='#' +else + LINUX_OS_TRUE='#' + LINUX_OS_FALSE= +fi + + OSNAME=freebsd + ROOT_GROUP=wheel + ;; + *linux* ) + ROOT_GROUP="root" + + if false; then + FREEBSD_OS_TRUE= + FREEBSD_OS_FALSE='#' +else + FREEBSD_OS_TRUE='#' + FREEBSD_OS_FALSE= +fi + + if true; then + LINUX_OS_TRUE= + LINUX_OS_FALSE='#' +else + LINUX_OS_TRUE='#' + LINUX_OS_FALSE= +fi + + OSNAME=linux + ROOT_GROUP=root + ;; +esac + + if false; then + SYSTEMD_TRUE= + SYSTEMD_FALSE='#' +else + SYSTEMD_TRUE='#' + SYSTEMD_FALSE= +fi + +if test -d /lib/systemd/system; then + if true; then + SYSTEMD_TRUE= + SYSTEMD_FALSE='#' +else + SYSTEMD_TRUE='#' + SYSTEMD_FALSE= +fi + +fi + + +test "x$prefix" == "xNONE" && prefix=$ac_default_prefix +test "x$libexecdir" == "xNONE" && libexecdir=${prefix}/lib + + + +# Check whether --enable-devel-mode was given. +if test ${enable_devel_mode+y} +then : + enableval=$enable_devel_mode; +fi + + + + +printf "%s\n" "#define srv_devel_mode \"false\"" >>confdefs.h + +srv_devel_mode="false" + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRCDIR=`pwd` + enable_devel_mode=yes + +fi + + +SRV_CONFDIR="${prefix}/etc/${PACKAGE}" + + +# Check whether --with-confdir was given. +if test ${with_confdir+y} +then : + withval=$with_confdir; if test ! -z "$withval" ; then + case $withval in + /*) + SRV_CONFDIR="$withval" + ;; + *) + as_fn_error $? "You must specify an absolute path to --with-confdir=PATH" "$LINENO" 5 + ;; + esac + fi +fi + + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRV_CONFDIR="${SRCDIR}/etc/${PACKAGE}" + sysconfdir="${SRCDIR}/etc/${PACKAGE}" + +else case e in #( + e) + test "x$SRV_CONFDIR" == "x/usr/etc/${PACKAGE}" && SRV_CONFDIR="/etc/${PACKAGE}" + test "x$prefix" == "x/usr" && sysconfdir="/etc" + ;; +esac +fi + + +printf "%s\n" "#define SRV_CONFDIR \"$SRV_CONFDIR\"" >>confdefs.h + +srv_confdir="$SRV_CONFDIR" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: srv_confdir set as ${SRV_CONFDIR}" >&5 +printf "%s\n" "$as_me: srv_confdir set as ${SRV_CONFDIR}" >&6;} + + +SRV_LOGDIR="/var/log/${PACKAGE}" + + +# Check whether --with-logdir was given. +if test ${with_logdir+y} +then : + withval=$with_logdir; if test ! -z "$withval" ; then + case $withval in + /*) + SRV_LOGDIR="$withval" + ;; + *) + as_fn_error $? "You must specify an absolute path to --with-logdir=PATH" "$LINENO" 5 + ;; + esac + fi +fi + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRV_LOGDIR="${SRCDIR}/tmp/log" + +fi + + +printf "%s\n" "#define SRV_LOGDIR \"$SRV_LOGDIR\"" >>confdefs.h + +srv_logdir="$SRV_LOGDIR" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: srv_logdir set as ${SRV_LOGDIR}" >&5 +printf "%s\n" "$as_me: srv_logdir set as ${SRV_LOGDIR}" >&6;} + + +SRV_RUNDIR="/var/run/${PACKAGE}" + + +# Check whether --with-rundir was given. +if test ${with_rundir+y} +then : + withval=$with_rundir; if test ! -z "$withval" ; then + case $withval in + /*) + SRV_RUNDIR="$withval" + ;; + *) + as_fn_error $? "You must specify an absolute path to --with-rundir=PATH" "$LINENO" 5 + ;; + esac + fi +fi + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRV_RUNDIR="${SRCDIR}/tmp/run" + +fi + + + +printf "%s\n" "#define SRV_RUNDIR \"$SRV_RUNDIR\"" >>confdefs.h + +srv_rundir="$SRV_RUNDIR" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: srv_rundir set as ${SRV_RUNDIR}" >&5 +printf "%s\n" "$as_me: srv_rundir set as ${SRV_RUNDIR}" >&6;} + + +SRV_SHAREDIR="${prefix}/share/$PACKAGE" + + +# Check whether --with-sharedir was given. +if test ${with_sharedir+y} +then : + withval=$with_sharedir; if test ! -z "$with_sharedir" ; then + case $with_sharedir in + /*) + SRV_SHAREDIR="$withval" + ;; + *) + as_fn_error $? "You must specify an absolute path to --with-sharedir=PATH" "$LINENO" 5 + ;; + esac + fi +fi + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRV_SHAREDIR="${SRCDIR}/share" + +fi + + + +printf "%s\n" "#define SRV_SHAREDIR \"$SRV_SHAREDIR\"" >>confdefs.h + +srv_sharedir="$SRV_SHAREDIR" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: srv_sharedir set as ${SRV_SHAREDIR}" >&5 +printf "%s\n" "$as_me: srv_sharedir set as ${SRV_SHAREDIR}" >&6;} + + +SRV_LIBDIR="${prefix}/lib/$PACKAGE" + + +# Check whether --with-libdir was given. +if test ${with_libdir+y} +then : + withval=$with_libdir; if test ! -z "$withval" ; then + case $withval in + /*) + SRV_LIBDIR="$withval" + ;; + *) + as_fn_error $? "You must specify an absolute path to --with-libdir=PATH" "$LINENO" 5 + ;; + esac + fi +fi + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRV_LIBDIR="${SRCDIR}/sysagent" + +fi + + +printf "%s\n" "#define SRV_LIBDIR \"$SRV_LIBDIR\"" >>confdefs.h + +srv_libdir="$SRV_LIBDIR" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: srv_libdir set as ${SRV_LIBDIR}" >&5 +printf "%s\n" "$as_me: srv_libdir set as ${SRV_LIBDIR}" >&6;} + + + +SRV_DATADIR="/var/lib/${PACKAGE}" + + +# Check whether --with-datadir was given. +if test ${with_datadir+y} +then : + withval=$with_datadir; if test ! -z "$withval" ; then + case $withval in + /*) + SRV_DATADIR="$withval" + ;; + *) + as_fn_error $? "You must specify an absolute path to --with-datadir=PATH" "$LINENO" 5 + ;; + esac + fi +fi + + +if test "x$enable_devel_mode" = "xyes" +then : + + SRV_DATADIR="${SRCDIR}/tmp/data" + +fi + + +printf "%s\n" "#define SRV_DATADIR \"$SRV_DATADIR\"" >>confdefs.h + +srv_datadir="$SRV_DATADIR" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: srv_datadir set as ${SRV_DATADIR}" >&5 +printf "%s\n" "$as_me: srv_datadir set as ${SRV_DATADIR}" >&6;} + + + + + +ac_config_files="$ac_config_files Makefile app/config/variant.go initrc/mproxyd.service initrc/mproxyd debian/control debian/changelog mans/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # 'set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # 'set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[][ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +printf %s "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 +printf "%s\n" "done" >&6; } +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; +esac +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi + + +if test -z "${FREEBSD_OS_TRUE}" && test -z "${FREEBSD_OS_FALSE}"; then + as_fn_error $? "conditional \"FREEBSD_OS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LINUX_OS_TRUE}" && test -z "${LINUX_OS_FALSE}"; then + as_fn_error $? "conditional \"LINUX_OS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${FREEBSD_OS_TRUE}" && test -z "${FREEBSD_OS_FALSE}"; then + as_fn_error $? "conditional \"FREEBSD_OS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${LINUX_OS_TRUE}" && test -z "${LINUX_OS_FALSE}"; then + as_fn_error $? "conditional \"LINUX_OS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SYSTEMD_TRUE}" && test -z "${SYSTEMD_FALSE}"; then + as_fn_error $? "conditional \"SYSTEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SYSTEMD_TRUE}" && test -z "${SYSTEMD_FALSE}"; then + as_fn_error $? "conditional \"SYSTEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else case e in #( + e) case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as 'sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else case e in #( + e) as_fn_append () + { + eval $1=\$$1\$2 + } ;; +esac +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else case e in #( + e) as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } ;; +esac +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated + +# Sed expression to map a string onto a valid variable name. +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by mproxy $as_me 0.0.1, which was +generated by GNU Autoconf 2.72. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +'$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to the package provider." + +_ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config='$ac_cs_config_escaped' +ac_cs_version="\\ +mproxy config.status 0.0.1 +configured by $0, generated by GNU Autoconf 2.72, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2023 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + printf "%s\n" "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + printf "%s\n" "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + printf "%s\n" "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + printf "%s\n" "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "app/config/variant.go") CONFIG_FILES="$CONFIG_FILES app/config/variant.go" ;; + "initrc/mproxyd.service") CONFIG_FILES="$CONFIG_FILES initrc/mproxyd.service" ;; + "initrc/mproxyd") CONFIG_FILES="$CONFIG_FILES initrc/mproxyd" ;; + "debian/control") CONFIG_FILES="$CONFIG_FILES debian/control" ;; + "debian/changelog") CONFIG_FILES="$CONFIG_FILES debian/changelog" ;; + "mans/Makefile") CONFIG_FILES="$CONFIG_FILES mans/Makefile" ;; + + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to '$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with './config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain ':'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is 'configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`printf "%s\n" "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when '$srcdir' = '.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..61a99e4 --- /dev/null +++ b/configure.ac @@ -0,0 +1,256 @@ +AC_INIT([mproxy],[0.0.1]) +AM_INIT_AUTOMAKE([foreign subdir-objects tar-pax]) +AC_PREFIX_DEFAULT(/usr/local) + +PACKAGE=mproxy + +AC_CHECK_PROG(HAVE_GO, go, true, false) +if test "x$HAVE_GO" = "xfalse"; then + AC_MSG_ERROR([Requested program go not found]) +fi + +AC_PATH_PROG([GO],[go]) +AC_PATH_PROG([FIND],[find]) +AC_PATH_PROG([XARGS],[xargs]) +AC_PATH_PROG([SORT],[sort]) +AC_PATH_PROG([UNIQ],[uniq]) +AC_PATH_PROGS([SUDO],[sudo false]) +AC_PATH_PROGS([CPIO],[cpio false]) +AC_PATH_PROGS([BASENAME],[basename]) + +AC_PATH_PROGS([PODMAN],[podman true]) +AC_PATH_PROGS([HELM],[helm true]) +AC_PATH_PROGS([DBUILDPACKAGE],[dpkg-buildpackage true]) +AC_PATH_PROGS([DPKGSOURCE],[dpkg-source true]) +AC_PATH_PROGS([SWAG],[swag true]) + + +AC_PATH_PROGS([CP],[gcp cp]) +if test -z "$CP"; then + AC_MSG_ERROR([Requested program cp not found]) +fi + +AC_PROG_INSTALL +AC_PROG_MKDIR_P +AC_CANONICAL_HOST + +case $host_os in + *freebsd* ) + AC_SUBST(ROOT_GROUP, "wheel") + AM_CONDITIONAL(FREEBSD_OS, true) + AM_CONDITIONAL(LINUX_OS, false) + OSNAME=freebsd + ROOT_GROUP=wheel + ;; + *linux* ) + AC_SUBST(ROOT_GROUP, "root") + AM_CONDITIONAL(FREEBSD_OS, false) + AM_CONDITIONAL(LINUX_OS, true) + OSNAME=linux + ROOT_GROUP=root + ;; +esac + +AM_CONDITIONAL(SYSTEMD, false) +if test -d /lib/systemd/system; then + AM_CONDITIONAL(SYSTEMD, true) +fi + + +test "x$prefix" == "xNONE" && prefix=$ac_default_prefix +test "x$libexecdir" == "xNONE" && libexecdir=${prefix}/lib + + +dnl -------------------------------------------------------------------------------------- + +AC_ARG_ENABLE([devel-mode], + AS_HELP_STRING([--enable-devel-mode], [Enable developmend mode])) + + +AC_DEFINE_UNQUOTED(srv_devel_mode, "false", [developmend mode]) +AC_SUBST(srv_devel_mode, "false") + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRCDIR=`pwd` + enable_devel_mode=yes +]) + +dnl -------------------------------------------------------------------------------------- + +SRV_CONFDIR="${prefix}/etc/${PACKAGE}" + +AC_ARG_WITH(confdir, + AS_HELP_STRING([--with-confdir=PATH],[set configuration dir to PATH (default: $SRV_CONFDIR)]), + [ if test ! -z "$withval" ; then + case $withval in + /*) + SRV_CONFDIR="$withval" + ;; + *) + AC_MSG_ERROR(You must specify an absolute path to --with-confdir=PATH) + ;; + esac + fi ]) + + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRV_CONFDIR="${SRCDIR}/etc/${PACKAGE}" + sysconfdir="${SRCDIR}/etc/${PACKAGE}" +], [ + test "x$SRV_CONFDIR" == "x/usr/etc/${PACKAGE}" && SRV_CONFDIR="/etc/${PACKAGE}" + test "x$prefix" == "x/usr" && sysconfdir="/etc" +]) + +AC_DEFINE_UNQUOTED(SRV_CONFDIR, "$SRV_CONFDIR", [location of configuration files for ${PACKAGE}]) +AC_SUBST(srv_confdir, "$SRV_CONFDIR") + +AC_MSG_NOTICE(srv_confdir set as ${SRV_CONFDIR}) + +dnl -------------------------------------------------------------------------------------- + +SRV_LOGDIR="/var/log/${PACKAGE}" + +AC_ARG_WITH(logdir, + AS_HELP_STRING([--with-logdir=PATH],[set path for logdir (default: $SRV_LOGDIR)]), + [ if test ! -z "$withval" ; then + case $withval in + /*) + SRV_LOGDIR="$withval" + ;; + *) + AC_MSG_ERROR(You must specify an absolute path to --with-logdir=PATH) + ;; + esac + fi]) + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRV_LOGDIR="${SRCDIR}/tmp/log" +]) + +AC_DEFINE_UNQUOTED(SRV_LOGDIR, "$SRV_LOGDIR", [location of ${PACKAGE} logdir]) +AC_SUBST(srv_logdir, "$SRV_LOGDIR") + +AC_MSG_NOTICE(srv_logdir set as ${SRV_LOGDIR}) + +dnl -------------------------------------------------------------------------------------- + +SRV_RUNDIR="/var/run/${PACKAGE}" + +AC_ARG_WITH(rundir, + AS_HELP_STRING([--with-rundir=PATH],[set path for rundir (default: $SRV_RUNDIR)]), + [ if test ! -z "$withval" ; then + case $withval in + /*) + SRV_RUNDIR="$withval" + ;; + *) + AC_MSG_ERROR(You must specify an absolute path to --with-rundir=PATH) + ;; + esac + fi ]) + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRV_RUNDIR="${SRCDIR}/tmp/run" +]) + + +AC_DEFINE_UNQUOTED(SRV_RUNDIR, "$SRV_RUNDIR", [location of rundir]) +AC_SUBST(srv_rundir, "$SRV_RUNDIR") + +AC_MSG_NOTICE(srv_rundir set as ${SRV_RUNDIR}) + +dnl -------------------------------------------------------------------------------------- + +SRV_SHAREDIR="${prefix}/share/$PACKAGE" + +AC_ARG_WITH(sharedir, + AS_HELP_STRING([--with-sharedir=PATH],[set share directory (default: $SRV_SHAREDIR)]), + [ if test ! -z "$with_sharedir" ; then + case $with_sharedir in + /*) + SRV_SHAREDIR="$withval" + ;; + *) + AC_MSG_ERROR(You must specify an absolute path to --with-sharedir=PATH) + ;; + esac + fi ]) + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRV_SHAREDIR="${SRCDIR}/share" +]) + + +AC_DEFINE_UNQUOTED(SRV_SHAREDIR, "$SRV_SHAREDIR", [location of share dir]) +AC_SUBST(srv_sharedir, "$SRV_SHAREDIR") + +AC_MSG_NOTICE(srv_sharedir set as ${SRV_SHAREDIR}) + +dnl -------------------------------------------------------------------------------------- + +SRV_LIBDIR="${prefix}/lib/$PACKAGE" + +AC_ARG_WITH(libdir, + AS_HELP_STRING([--with-libdir=PATH],[set lib directory (default: $SRV_LIBDIR)]), + [ if test ! -z "$withval" ; then + case $withval in + /*) + SRV_LIBDIR="$withval" + ;; + *) + AC_MSG_ERROR(You must specify an absolute path to --with-libdir=PATH) + ;; + esac + fi ]) + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRV_LIBDIR="${SRCDIR}/sysagent" +]) + +AC_DEFINE_UNQUOTED(SRV_LIBDIR, "$SRV_LIBDIR", [location of lib dir]) +AC_SUBST(srv_libdir, "$SRV_LIBDIR") + +AC_MSG_NOTICE(srv_libdir set as ${SRV_LIBDIR}) + +dnl -------------------------------------------------------------------------------------- + + +SRV_DATADIR="/var/lib/${PACKAGE}" + +AC_ARG_WITH(datadir, + AS_HELP_STRING([--with-datadir=PATH],[set path for datadir (default: $SRV_DATADIR)]), + [ if test ! -z "$withval" ; then + case $withval in + /*) + SRV_DATADIR="$withval" + ;; + *) + AC_MSG_ERROR(You must specify an absolute path to --with-datadir=PATH) + ;; + esac + fi]) + +AS_IF([test "x$enable_devel_mode" = "xyes"], [ + SRV_DATADIR="${SRCDIR}/tmp/data" +]) + +AC_DEFINE_UNQUOTED(SRV_DATADIR, "$SRV_DATADIR", [location of ${PACKAGE} datadir]) +AC_SUBST(srv_datadir, "$SRV_DATADIR") + +AC_MSG_NOTICE(srv_datadir set as ${SRV_DATADIR}) + +dnl -------------------------------------------------------------------------------------- + + +AM_EXTRA_RECURSIVE_TARGETS([docs]) + +AC_CONFIG_FILES([ +Makefile +app/config/variant.go +initrc/mproxyd.service +initrc/mproxyd +debian/control +debian/changelog +mans/Makefile +]) +AC_OUTPUT diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..9ddabd1 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,4 @@ +changelog +control +*~ +tmp diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..2c9c7cd --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1 @@ +mbase for Debian diff --git a/debian/changelog.in b/debian/changelog.in new file mode 100644 index 0000000..a2c96cf --- /dev/null +++ b/debian/changelog.in @@ -0,0 +1,5 @@ +mbase (@PACKAGE_VERSION@-1) unstable; urgency=low + + * Release. + + -- Oleg Borodin Sun, 29 Oct 2017 18:57:56 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 0000000..c5ae0f0 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,15 @@ +Source: mbase +Section: utils +Priority: extra +Maintainer: borodin@unix7.org +Build-Depends: debhelper (>=8) +Standards-Version: @PACKAGE_VERSION@ +Homepage: http://wiki.unix7.org + +Package: mbase-control +Description: mbase +Architecture: amd64 + +Package: mbase-service +Description: mbase +Architecture: amd64 diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..451059e --- /dev/null +++ b/debian/files @@ -0,0 +1,5 @@ +mstore-control-dbgsym_2.11.0-1_amd64.deb debug optional automatic=yes +mstore-control_2.11.0-1_amd64.deb utils extra +mstore-service-dbgsym_2.11.0-1_amd64.deb debug optional automatic=yes +mstore-service_2.11.0-1_amd64.deb utils extra +mstore_2.11.0-1_amd64.buildinfo utils extra diff --git a/debian/mproxy-control.install b/debian/mproxy-control.install new file mode 100644 index 0000000..7acd345 --- /dev/null +++ b/debian/mproxy-control.install @@ -0,0 +1,2 @@ +usr/bin/mstorectl + diff --git a/debian/mproxy-control.postinst b/debian/mproxy-control.postinst new file mode 100755 index 0000000..f6eb068 --- /dev/null +++ b/debian/mproxy-control.postinst @@ -0,0 +1,2 @@ +#!/bin/sh -e + diff --git a/debian/mproxy-control.postrm b/debian/mproxy-control.postrm new file mode 100755 index 0000000..f6eb068 --- /dev/null +++ b/debian/mproxy-control.postrm @@ -0,0 +1,2 @@ +#!/bin/sh -e + diff --git a/debian/mproxy-control.preinst b/debian/mproxy-control.preinst new file mode 100755 index 0000000..1057534 --- /dev/null +++ b/debian/mproxy-control.preinst @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 diff --git a/debian/mproxy-control.prerm b/debian/mproxy-control.prerm new file mode 100755 index 0000000..f6eb068 --- /dev/null +++ b/debian/mproxy-control.prerm @@ -0,0 +1,2 @@ +#!/bin/sh -e + diff --git a/debian/mproxy-service.install b/debian/mproxy-service.install new file mode 100644 index 0000000..4cce349 --- /dev/null +++ b/debian/mproxy-service.install @@ -0,0 +1,6 @@ +usr/sbin/mstored +lib/systemd/system/mstored.service +var/run/mstore +var/log/mstore +etc/mstore + diff --git a/debian/mproxy-service.postinst b/debian/mproxy-service.postinst new file mode 100755 index 0000000..55b29c7 --- /dev/null +++ b/debian/mproxy-service.postinst @@ -0,0 +1,6 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ] ; then + # Initial installation + systemctl preset mstored.service >/dev/null 2>&1 || : +fi diff --git a/debian/mproxy-service.postrm b/debian/mproxy-service.postrm new file mode 100755 index 0000000..c3c7ae1 --- /dev/null +++ b/debian/mproxy-service.postrm @@ -0,0 +1,3 @@ +#!/bin/sh -e + +systemctl daemon-reload >/dev/null 2>&1 || : diff --git a/debian/mproxy-service.preinst b/debian/mproxy-service.preinst new file mode 100755 index 0000000..1057534 --- /dev/null +++ b/debian/mproxy-service.preinst @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 diff --git a/debian/mproxy-service.prerm b/debian/mproxy-service.prerm new file mode 100755 index 0000000..f69fc81 --- /dev/null +++ b/debian/mproxy-service.prerm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + # Package removal, not upgrade + systemctl --no-reload disable mstored.service > /dev/null 2>&1 || : + systemctl stop mstored.service > /dev/null 2>&1 || : +fi diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..4a97dfa --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +# You must remove unused comment lines for the released package. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..68211e7 --- /dev/null +++ b/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +export GO111MODULE=on +export GOPROXY=https://proxy.golang.org + +%: + dh $@ + +override_dh_auto_configure: + ./configure --prefix=/usr + + +#EOF diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..46ebe02 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) \ No newline at end of file diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 0000000..e69de29 diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..9e7c0da --- /dev/null +++ b/debian/watch @@ -0,0 +1 @@ +version=3 diff --git a/docs/helm-chart-manifest.json.txt b/docs/helm-chart-manifest.json.txt new file mode 100644 index 0000000..fd37df0 --- /dev/null +++ b/docs/helm-chart-manifest.json.txt @@ -0,0 +1,22 @@ + +MimeType: application/vnd.oci.image.manifest.v1+json + +{ + "schemaVersion": 2, + "config": { + "mediaType": "application/vnd.cncf.helm.config.v1+json", + "digest": "sha256:33e3759271a3c6dc018541cfb73653c267df6f8ee28ce68e38c72e22196a1d87", + "size": 126 + }, + "layers": [{ + "mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip", + "digest": "sha256:93dc97d49c453a7ce3af622cf7ef698548045e0c09907c6a021018f6eac6c31a", + "size": 1528 + }], + "annotations": { + "org.opencontainers.image.created": "2026-02-25T19:59:44+02:00", + "org.opencontainers.image.description": "mStore service", + "org.opencontainers.image.title": "mstore", + "org.opencontainers.image.version": "0.2.0" + } +} diff --git a/docs/mstore.drawio b/docs/mstore.drawio new file mode 100644 index 0000000..cb16faa --- /dev/null +++ b/docs/mstore.drawio @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/mstore.png b/docs/mstore.png new file mode 100644 index 0000000000000000000000000000000000000000..9e12d4ba9004e17f253cfc44ce4f643274641c16 GIT binary patch literal 35764 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 literal 0 HcmV?d00001 diff --git a/docs/podman-manifest.json.txt b/docs/podman-manifest.json.txt new file mode 100644 index 0000000..fc42b05 --- /dev/null +++ b/docs/podman-manifest.json.txt @@ -0,0 +1,32 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.oci.image.manifest.v1+json", + "config": { + "mediaType": "application/vnd.oci.image.config.v1+json", + "digest": "sha256:2f99832d1fc23ae7c8a35d5aa0b9d7a78a1876d69f9453d5d6e8701ac86c171c", + "size": 1357 + }, + "layers": [{ + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:7319607d119c259e90382101fb3ed98ad62e29ed817338183b3775dcfb358140", + "size": 3731518 + }, { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:1fccc5cb3c84a43c9dec4d89f1383471b41e1c4b9d4f271e3c952839f76634f5", + "size": 15791440 + }, { + "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", + "digest": "sha256:8cc3f2f15e1a38f6b733038dd9b3b27a88d4882a78a3235416f792dd9deca7af", + "size": 173 + }], + "annotations": { + "com.docker.official-images.bashbrew.arch": "amd64", + "org.opencontainers.image.base.digest": "sha256:b0cb30c51c47cdfde647364301758b14c335dea2fddc9490d4f007d67ecb2538", + "org.opencontainers.image.base.name": "docker.io/library/alpine:3.20", + "org.opencontainers.image.created": "2026-01-28T01:18:13Z", + "org.opencontainers.image.revision": "b3f87708e5052e29737a251b2e9865e182dafe0c", + "org.opencontainers.image.source": "https://github.com/alpinelinux/docker-alpine.git#b3f87708e5052e29737a251b2e9865e182dafe0c:x86_64", + "org.opencontainers.image.url": "https://hub.docker.com/_/alpine", + "org.opencontainers.image.version": "3.20.9" + } +} diff --git a/etc/mproxy/mproxyd.crt b/etc/mproxy/mproxyd.crt new file mode 100644 index 0000000..b4ae410 --- /dev/null +++ b/etc/mproxy/mproxyd.crt @@ -0,0 +1,54 @@ +-----BEGIN CERTIFICATE----- +MIIEojCCBCmgAwIBAgISBpbPr7WFeCJ3U8QDioKGHkQiMAoGCCqGSM49BAMDMDIx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQDEwJF +ODAeFw0yNjAyMTIwOTExMDVaFw0yNjA1MTMwOTExMDRaMBgxFjAUBgNVBAMTDWRl +di51bml4Ny5vcmcwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATZnNwUA6M5kqmq +36oRkUTC+fSPlLiLDs3Vz6fPdYBWIokPKG+UqAS4WjfXXQEPwqGeoef0b5elB7dg +6GjwOhJio4IDNzCCAzMwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUF +BwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFBme/mBwOaT6f4yzzCBc4i/NPQBY +MB8GA1UdIwQYMBaAFI8NE6L2Ln7RUGwzGDhdWY4jcpHKMDIGCCsGAQUFBwEBBCYw +JDAiBggrBgEFBQcwAoYWaHR0cDovL2U4LmkubGVuY3Iub3JnLzCCATUGA1UdEQSC +ASwwggEogg1haXIudW5peDcub3JnghJhaXJmb3JjZS51bml4Ny5vcmeCDWRldi51 +bml4Ny5vcmeCDWVkdS51bml4Ny5vcmeCEGVkdW1heC51bml4Ny5vcmeCDWdpdC51 +bml4Ny5vcmeCDWhhbS51bml4Ny5vcmeCDmhhc2gudW5peDcub3JnggxoZC51bml4 +Ny5vcmeCDm1haWwudW5peDcub3Jnggxtdy51bml4Ny5vcmeCDG14LnVuaXg3Lm9y +Z4IOcGlraS51bml4Ny5vcmeCDHJtLnVuaXg3Lm9yZ4IQc3RvcmV4LnVuaXg3Lm9y +Z4INdzEyLnVuaXg3Lm9yZ4INdzEzLnVuaXg3Lm9yZ4IOd2lraS51bml4Ny5vcmeC +DXd3dy51bml4Ny5vcmcwEwYDVR0gBAwwCjAIBgZngQwBAgEwLQYDVR0fBCYwJDAi +oCCgHoYcaHR0cDovL2U4LmMubGVuY3Iub3JnLzM1LmNybDCCAQsGCisGAQQB1nkC +BAIEgfwEgfkA9wB1AGQRxGykEuyniRyiAi4AvKtPKAfUHjUnq+r+1QPJfc3wAAAB +nFFT2U0AAAQDAEYwRAIgbuNiYUqwgxi9Oycm2D6h8sclWLcBXHtqFWpwJT3dwbgC +IBBjMRcAmxZKE9PIgFqMvosPNQ7AAkbEfudVtqNkfwXJAH4Apcl4kl1XRheChw3Y +iWYLXFVki30AQPLsB2hR0YhpGfcAAAGcUVPcHQAIAAAFADH4c7UEAwBHMEUCIQDz +p9aYuw9jAZjxM8U3Qq7M4vFpp0GZDm80tpTdKYNjjwIgQ/e/lWg6uqQsjBytcaOG +IVXPEyB0n8fflOf+Ekh51DUwCgYIKoZIzj0EAwMDZwAwZAIwRrEAdYBcRU46Pold +w4VjUGnGsYEUqlsjrmn4awY01YGWknPaX5sTAI3hTuA32eOUAjA1dSANAAyO+icj +1ZiPZUGFjaMdkEu6Y/Ge8aueAUItNj9eF0ahlgZEnSlhHrswoZo= +-----END CERTIFICATE----- + +-----BEGIN CERTIFICATE----- +MIIEVjCCAj6gAwIBAgIQY5WTY8JOcIJxWRi/w9ftVjANBgkqhkiG9w0BAQsFADBP +MQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFy +Y2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMTAeFw0yNDAzMTMwMDAwMDBa +Fw0yNzAzMTIyMzU5NTlaMDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBF +bmNyeXB0MQswCQYDVQQDEwJFODB2MBAGByqGSM49AgEGBSuBBAAiA2IABNFl8l7c +S7QMApzSsvru6WyrOq44ofTUOTIzxULUzDMMNMchIJBwXOhiLxxxs0LXeb5GDcHb +R6EToMffgSZjO9SNHfY9gjMy9vQr5/WWOrQTZxh7az6NSNnq3u2ubT6HTKOB+DCB +9TAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMB +MBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFI8NE6L2Ln7RUGwzGDhdWY4j +cpHKMB8GA1UdIwQYMBaAFHm0WeZ7tuXkAXOACIjIGlj26ZtuMDIGCCsGAQUFBwEB +BCYwJDAiBggrBgEFBQcwAoYWaHR0cDovL3gxLmkubGVuY3Iub3JnLzATBgNVHSAE +DDAKMAgGBmeBDAECATAnBgNVHR8EIDAeMBygGqAYhhZodHRwOi8veDEuYy5sZW5j +ci5vcmcvMA0GCSqGSIb3DQEBCwUAA4ICAQBnE0hGINKsCYWi0Xx1ygxD5qihEjZ0 +RI3tTZz1wuATH3ZwYPIp97kWEayanD1j0cDhIYzy4CkDo2jB8D5t0a6zZWzlr98d +AQFNh8uKJkIHdLShy+nUyeZxc5bNeMp1Lu0gSzE4McqfmNMvIpeiwWSYO9w82Ob8 +otvXcO2JUYi3svHIWRm3+707DUbL51XMcY2iZdlCq4Wa9nbuk3WTU4gr6LY8MzVA +aDQG2+4U3eJ6qUF10bBnR1uuVyDYs9RhrwucRVnfuDj29CMLTsplM5f5wSV5hUpm +Uwp/vV7M4w4aGunt74koX71n4EdagCsL/Yk5+mAQU0+tue0JOfAV/R6t1k+Xk9s2 +HMQFeoxppfzAVC04FdG9M+AC2JWxmFSt6BCuh3CEey3fE52Qrj9YM75rtvIjsm/1 +Hl+u//Wqxnu1ZQ4jpa+VpuZiGOlWrqSP9eogdOhCGisnyewWJwRQOqK16wiGyZeR +xs/Bekw65vwSIaVkBruPiTfMOo0Zh4gVa8/qJgMbJbyrwwG97z/PRgmLKCDl8z3d +tA0Z7qq7fta0Gl24uyuB05dqI5J1LvAzKuWdIjT1tP8qCoxSE/xpix8hX2dt3h+/ +jujUgFPFZ0EVZ0xSyBNRF3MboGZnYXFUxpNjTWPKpagDHJQmqrAcDmWJnMsFY3jS +u1igv3OefnWjSQ== +-----END CERTIFICATE----- diff --git a/etc/mproxy/mproxyd.key b/etc/mproxy/mproxyd.key new file mode 100644 index 0000000..8229adc --- /dev/null +++ b/etc/mproxy/mproxyd.key @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIOqwKQF1VWp3lSiIgD5E1ZNGXf/IlBLwEp8F+YooRiuGoAoGCCqGSM49 +AwEHoUQDQgAE2ZzcFAOjOZKpqt+qEZFEwvn0j5S4iw7N1c+nz3WAViKJDyhvlKgE +uFo3110BD8KhnqHn9G+XpQe3YOho8DoSYg== +-----END EC PRIVATE KEY----- diff --git a/etc/mproxy/mproxyd.yaml b/etc/mproxy/mproxyd.yaml new file mode 100644 index 0000000..2e06593 --- /dev/null +++ b/etc/mproxy/mproxyd.yaml @@ -0,0 +1,5 @@ +certpath: mbased.crt +keypath: mbased.key +runUser: root + + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ed3124e --- /dev/null +++ b/go.mod @@ -0,0 +1,118 @@ +module mproxy + +go 1.25.7 + +require ( + github.com/dustin/go-humanize v1.0.1 + github.com/google/go-containerregistry v0.21.3 + github.com/google/uuid v1.6.0 + github.com/jmoiron/sqlx v1.4.0 + github.com/mattn/go-sqlite3 v1.14.38 + github.com/opencontainers/go-digest v1.0.0 + github.com/opencontainers/image-spec v1.1.1 + github.com/spf13/cobra v1.10.2 + github.com/spf13/viper v1.21.0 + github.com/stretchr/testify v1.11.1 + go.yaml.in/yaml/v4 v4.0.0-rc.4 + helm.sh/helm/v4 v4.1.3 + sigs.k8s.io/yaml v1.6.0 +) + +require ( + github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect + github.com/MakeNowJust/heredoc v1.0.0 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/ProtonMail/go-crypto v1.3.0 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/chai2010/gettext-go v1.0.2 // indirect + github.com/cloudflare/circl v1.6.3 // indirect + github.com/containerd/stargz-snapshotter/estargz v0.18.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/docker/cli v29.3.0+incompatible // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker-credential-helpers v0.9.3 // indirect + github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect + github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect + github.com/extism/go-sdk v1.7.1 // indirect + github.com/fluxcd/cli-utils v0.37.2-flux.1 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/go-errors/errors v1.5.1 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-openapi/jsonpointer v0.21.1 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.1 // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.13.0 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/gnostic-models v0.7.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect + github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.18.4 // indirect + github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect + github.com/mailru/easyjson v0.9.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/moby/term v0.5.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect + github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/peterbourgon/diskv v2.0.1+incompatible // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sagikazarmark/locafero v0.11.0 // indirect + github.com/sirupsen/logrus v1.9.4 // indirect + github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect + github.com/spf13/afero v1.15.0 // indirect + github.com/spf13/cast v1.10.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect + github.com/tetratelabs/wazero v1.11.0 // indirect + github.com/vbatts/tar-split v0.12.2 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/xlab/treeprint v1.2.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.47.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/oauth2 v0.36.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/term v0.39.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.12.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.2 // indirect + k8s.io/api v0.35.1 // indirect + k8s.io/apiextensions-apiserver v0.35.1 // indirect + k8s.io/apimachinery v0.35.1 // indirect + k8s.io/cli-runtime v0.35.1 // indirect + k8s.io/client-go v0.35.1 // indirect + k8s.io/component-base v0.35.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect + k8s.io/kubectl v0.35.1 // indirect + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect + oras.land/oras-go/v2 v2.6.0 // indirect + sigs.k8s.io/controller-runtime v0.23.1 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/kustomize/api v0.21.1 // indirect + sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..0492b53 --- /dev/null +++ b/go.sum @@ -0,0 +1,384 @@ +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= +github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBiRGFrw= +github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= +github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= +github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8= +github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4= +github.com/containerd/stargz-snapshotter/estargz v0.18.2 h1:yXkZFYIzz3eoLwlTUZKz2iQ4MrckBxJjkmD16ynUTrw= +github.com/containerd/stargz-snapshotter/estargz v0.18.2/go.mod h1:XyVU5tcJ3PRpkA9XS2T5us6Eg35yM0214Y+wvrZTBrY= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= +github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/distribution/distribution/v3 v3.0.0 h1:q4R8wemdRQDClzoNNStftB2ZAfqOiN6UX90KJc4HjyM= +github.com/distribution/distribution/v3 v3.0.0/go.mod h1:tRNuFoZsUdyRVegq8xGNeds4KLjwLCRin/tTo6i1DhU= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/cli v29.3.0+incompatible h1:z3iWveU7h19Pqx7alZES8j+IeFQZ1lhTwb2F+V9SVvk= +github.com/docker/cli v29.3.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8= +github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a h1:UwSIFv5g5lIvbGgtf3tVwC7Ky9rmMFBp0RMs+6f6YqE= +github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a/go.mod h1:C8DzXehI4zAbrdlbtOByKX6pfivJTBiV9Jjqv56Yd9Q= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= +github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= +github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= +github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= +github.com/extism/go-sdk v1.7.1 h1:lWJos6uY+tRFdlIHR+SJjwFDApY7OypS/2nMhiVQ9Sw= +github.com/extism/go-sdk v1.7.1/go.mod h1:IT+Xdg5AZM9hVtpFUA+uZCJMge/hbvshl8bwzLtFyKA= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fluxcd/cli-utils v0.37.2-flux.1 h1:tQ588ghtRN+E+kHq415FddfqA9v4brn/1WWgrP6rQR0= +github.com/fluxcd/cli-utils v0.37.2-flux.1/go.mod h1:LcWSu1NYET8d8U7O326RhEm5JkQXCMK6ITu4G1CT02c= +github.com/foxcpp/go-mockdns v1.2.0 h1:omK3OrHRD1IWJz1FuFBCFquhXslXoF17OvBS6JPzZF0= +github.com/foxcpp/go-mockdns v1.2.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= +github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= +github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= +github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= +github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-containerregistry v0.21.3 h1:Xr+yt3VvwOOn/5nJzd7UoOhwPGiPkYW0zWDLLUXqAi4= +github.com/google/go-containerregistry v0.21.3/go.mod h1:D5ZrJF1e6dMzvInpBPuMCX0FxURz7GLq2rV3Us9aPkc= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= +github.com/hashicorp/golang-lru/arc/v2 v2.0.5 h1:l2zaLDubNhW4XO3LnliVj0GXO3+/CGNJAg1dcN2Fpfw= +github.com/hashicorp/golang-lru/arc/v2 v2.0.5/go.mod h1:ny6zBSQZi2JxIeYcv7kt2sH2PXJtirBN7RDhRpxPkxU= +github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= +github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca h1:T54Ema1DU8ngI+aef9ZhAhNGQhcRTrWxVeG07F+c/Rw= +github.com/ianlancetaylor/demangle v0.0.0-20240805132620-81f5be970eca/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c= +github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/mattn/go-sqlite3 v1.14.38 h1:tDUzL85kMvOrvpCt8P64SbGgVFtJB11GPi2AdmITgb4= +github.com/mattn/go-sqlite3 v1.14.38/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/miekg/dns v1.1.57 h1:Jzi7ApEIzwEPLHWRcafCN9LZSBbqQpxjt/wpgvg7wcM= +github.com/miekg/dns v1.1.57/go.mod h1:uqRjCRUuEAA6qsOiJvDd+CFo/vW+y5WR6SNmHE55hZk= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= +github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI= +github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= +github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q= +github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/otlptranslator v1.0.0 h1:s0LJW/iN9dkIH+EnhiD3BlkkP5QVIUVEoIwkU+A6qos= +github.com/prometheus/otlptranslator v1.0.0/go.mod h1:vRYWnXvI6aWGpsdY/mOT/cbeVRBlPWtBNDb7kGR3uKM= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 h1:EaDatTxkdHG+U3Bk4EUr+DZ7fOGwTfezUiUJMaIcaho= +github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5/go.mod h1:fyalQWdtzDBECAQFBJuQe5bzQ02jGd5Qcbgb97Flm7U= +github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 h1:EfpWLLCyXw8PSM2/XNJLjI3Pb27yVE+gIAfeqp8LUCc= +github.com/redis/go-redis/extra/redisotel/v9 v9.0.5/go.mod h1:WZjPDy7VNzn77AAfnAfVjZNvfJTYfPetfZk5yoSTLaQ= +github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= +github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= +github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= +github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= +github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 h1:ZF+QBjOI+tILZjBaFj3HgFonKXUcwgJ4djLb6i42S3Q= +github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834/go.mod h1:m9ymHTgNSEjuxvw8E7WWe4Pl4hZQHXONY8wE6dMLaRk= +github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= +github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= +github.com/vbatts/tar-split v0.12.2 h1:w/Y6tjxpeiFMR47yzZPlPj/FcPLpXbTUi/9H7d3CPa4= +github.com/vbatts/tar-split v0.12.2/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/bridges/prometheus v0.65.0 h1:I/7S/yWobR3QHFLqHsJ8QOndoiFsj1VgHpQiq43KlUI= +go.opentelemetry.io/contrib/bridges/prometheus v0.65.0/go.mod h1:jPF6gn3y1E+nozCAEQj3c6NZ8KY+tvAgSVfvoOJUFac= +go.opentelemetry.io/contrib/exporters/autoexport v0.65.0 h1:2gApdml7SznX9szEKFjKjM4qGcGSvAybYLBY319XG3g= +go.opentelemetry.io/contrib/exporters/autoexport v0.65.0/go.mod h1:0QqAGlbHXhmPYACG3n5hNzO5DnEqqtg4VcK5pr22RI0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb7sGddAr30RRS6xjKy7AZ2JtTOPA3oolgVSw8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= +go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms= +go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.16.0 h1:ZVg+kCXxd9LtAaQNKBxAvJ5NpMf7LpvEr4MIZqb0TMQ= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.16.0/go.mod h1:hh0tMeZ75CCXrHd9OXRYxTlCAdxcXioWHFIpYw2rZu8= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.16.0 h1:djrxvDxAe44mJUrKataUbOhCKhR3F8QCyWucO16hTQs= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.16.0/go.mod h1:dt3nxpQEiSoKvfTVxp3TUg5fHPLhKtbcnN3Z1I1ePD0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.40.0 h1:NOyNnS19BF2SUDApbOKbDtWZ0IK7b8FJ2uAGdIWOGb0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.40.0/go.mod h1:VL6EgVikRLcJa9ftukrHu/ZkkhFBSo1lzvdBC9CF1ss= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.40.0 h1:9y5sHvAxWzft1WQ4BwqcvA+IFVUJ1Ya75mSAUnFEVwE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.40.0/go.mod h1:eQqT90eR3X5Dbs1g9YSM30RavwLF725Ris5/XSXWvqE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 h1:wVZXIWjQSeSmMoxF74LzAnpVQOAFDo3pPji9Y4SOFKc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0/go.mod h1:khvBS2IggMFNwZK/6lEeHg/W57h/IX6J4URh57fuI40= +go.opentelemetry.io/otel/exporters/prometheus v0.62.0 h1:krvC4JMfIOVdEuNPTtQ0ZjCiXrybhv+uOHMfHRmnvVo= +go.opentelemetry.io/otel/exporters/prometheus v0.62.0/go.mod h1:fgOE6FM/swEnsVQCqCnbOfRV4tOnWPg7bVeo4izBuhQ= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.16.0 h1:ivlbaajBWJqhcCPniDqDJmRwj4lc6sRT+dCAVKNmxlQ= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.16.0/go.mod h1:u/G56dEKDDwXNCVLsbSrllB2o8pbtFLUC4HpR66r2dc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0 h1:ZrPRak/kS4xI3AVXy8F7pipuDXmDsrO8Lg+yQjBLjw0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0/go.mod h1:3y6kQCWztq6hyW8Z9YxQDDm0Je9AJoFar2G0yDcmhRk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.40.0 h1:MzfofMZN8ulNqobCmCAVbqVL5syHw+eB2qPRkCMA/fQ= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.40.0/go.mod h1:E73G9UFtKRXrxhBsHtG00TB5WxX57lpsQzogDkqBTz8= +go.opentelemetry.io/otel/log v0.16.0 h1:DeuBPqCi6pQwtCK0pO4fvMB5eBq6sNxEnuTs88pjsN4= +go.opentelemetry.io/otel/log v0.16.0/go.mod h1:rWsmqNVTLIA8UnwYVOItjyEZDbKIkMxdQunsIhpUMes= +go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g= +go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc= +go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= +go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= +go.opentelemetry.io/otel/sdk/log v0.16.0 h1:e/b4bdlQwC5fnGtG3dlXUrNOnP7c8YLVSpSfEBIkTnI= +go.opentelemetry.io/otel/sdk/log v0.16.0/go.mod h1:JKfP3T6ycy7QEuv3Hj8oKDy7KItrEkus8XJE6EoSzw4= +go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= +go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw= +go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +go.yaml.in/yaml/v4 v4.0.0-rc.4 h1:UP4+v6fFrBIb1l934bDl//mmnoIZEDK0idg1+AIvX5U= +go.yaml.in/yaml/v4 v4.0.0-rc.4/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= +golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= +golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 h1:merA0rdPeUV3YIIfHHcH4qBkiQAc1nfCKSI7lB4cV2M= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409/go.mod h1:fl8J1IvUjCilwZzQowmw2b7HQB2eAuYBabMXzWurF+I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= +helm.sh/helm/v4 v4.1.3 h1:Abfmb+oJUtxoaXDyB2Jhw1zRk3hT6aFfHta+AXb8Lno= +helm.sh/helm/v4 v4.1.3/go.mod h1:5dSo8rRgn3OTkDAc/k0Ipw5/Q+BlqKIKZwa0XwSiINI= +k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q= +k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM= +k8s.io/apiextensions-apiserver v0.35.1 h1:p5vvALkknlOcAqARwjS20kJffgzHqwyQRM8vHLwgU7w= +k8s.io/apiextensions-apiserver v0.35.1/go.mod h1:2CN4fe1GZ3HMe4wBr25qXyJnJyZaquy4nNlNmb3R7AQ= +k8s.io/apimachinery v0.35.1 h1:yxO6gV555P1YV0SANtnTjXYfiivaTPvCTKX6w6qdDsU= +k8s.io/apimachinery v0.35.1/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/cli-runtime v0.35.1 h1:uKcXFe8J7AMAM4Gm2JDK4mp198dBEq2nyeYtO+JfGJE= +k8s.io/cli-runtime v0.35.1/go.mod h1:55/hiXIq1C8qIJ3WBrWxEwDLdHQYhBNRdZOz9f7yvTw= +k8s.io/client-go v0.35.1 h1:+eSfZHwuo/I19PaSxqumjqZ9l5XiTEKbIaJ+j1wLcLM= +k8s.io/client-go v0.35.1/go.mod h1:1p1KxDt3a0ruRfc/pG4qT/3oHmUj1AhSHEcxNSGg+OA= +k8s.io/component-base v0.35.1 h1:XgvpRf4srp037QWfGBLFsYMUQJkE5yMa94UsJU7pmcE= +k8s.io/component-base v0.35.1/go.mod h1:HI/6jXlwkiOL5zL9bqA3en1Ygv60F03oEpnuU1G56Bs= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= +k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/kubectl v0.35.1 h1:zP3Er8C5i1dcAFUMh9Eva0kVvZHptXIn/+8NtRWMxwg= +k8s.io/kubectl v0.35.1/go.mod h1:cQ2uAPs5IO/kx8R5s5J3Ihv3VCYwrx0obCXum0CvnXo= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= +oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= +sigs.k8s.io/controller-runtime v0.23.1 h1:TjJSM80Nf43Mg21+RCy3J70aj/W6KyvDtOlpKf+PupE= +sigs.k8s.io/controller-runtime v0.23.1/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/kustomize/api v0.21.1 h1:lzqbzvz2CSvsjIUZUBNFKtIMsEw7hVLJp0JeSIVmuJs= +sigs.k8s.io/kustomize/api v0.21.1/go.mod h1:f3wkKByTrgpgltLgySCntrYoq5d3q7aaxveSagwTlwI= +sigs.k8s.io/kustomize/kyaml v0.21.1 h1:IVlbmhC076nf6foyL6Taw4BkrLuEsXUXNpsE+ScX7fI= +sigs.k8s.io/kustomize/kyaml v0.21.1/go.mod h1:hmxADesM3yUN2vbA5z1/YTBnzLJ1dajdqpQonwBL1FQ= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 h1:2WOzJpHUBVrrkDjU4KBT8n5LDcj824eX0I5UKcgeRUs= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/initrc/.gitignore b/initrc/.gitignore new file mode 100644 index 0000000..dba3372 --- /dev/null +++ b/initrc/.gitignore @@ -0,0 +1,3 @@ +*~ +istored +istored.service diff --git a/initrc/mproxyd b/initrc/mproxyd new file mode 100644 index 0000000..9a4c68c --- /dev/null +++ b/initrc/mproxyd @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $Id$ +# +# PROVIDE: mbased +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="mbased" +rcvar="mbased_enable" + +pidfile="/home/ziggi/Projects/mproxy/tmp/run/mbased.pid" +command="/usr/local/sbin/${name}" +command_args="--asDaemon=true" +procname="/usr/local/sbin/${name}" + +load_rc_config ${name} + +: ${mbased_enable:="NO"} + +run_rc_command "$1" +#EOF + diff --git a/initrc/mproxyd.in b/initrc/mproxyd.in new file mode 100644 index 0000000..40eaf2c --- /dev/null +++ b/initrc/mproxyd.in @@ -0,0 +1,24 @@ +#!/bin/sh +# +# $Id$ +# +# PROVIDE: mbased +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="mbased" +rcvar="mbased_enable" + +pidfile="@srv_rundir@/mbased.pid" +command="@prefix@/sbin/${name}" +command_args="--asDaemon=true" +procname="@prefix@/sbin/${name}" + +load_rc_config ${name} + +: ${mbased_enable:="NO"} + +run_rc_command "$1" +#EOF + diff --git a/initrc/mproxyd.service b/initrc/mproxyd.service new file mode 100644 index 0000000..7e682d9 --- /dev/null +++ b/initrc/mproxyd.service @@ -0,0 +1,12 @@ +[Unit] +Description=mbased + +[Service] +Type=forking +PIDFile=/home/ziggi/Projects/mproxy/tmp/run/mbased.pid +ExecStart=/usr/local/sbin/mbased --asDaemon=true --port=443 +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target + diff --git a/initrc/mproxyd.service.in b/initrc/mproxyd.service.in new file mode 100644 index 0000000..765c1dd --- /dev/null +++ b/initrc/mproxyd.service.in @@ -0,0 +1,12 @@ +[Unit] +Description=mbased + +[Service] +Type=forking +PIDFile=@srv_rundir@/mbased.pid +ExecStart=@prefix@/sbin/mbased --asDaemon=true --port=443 +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target + diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..b1d7a6f --- /dev/null +++ b/install-sh @@ -0,0 +1,541 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2024-06-19.01; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +tab=' ' +nl=' +' +IFS=" $tab$nl" + +# Set DOITPROG to "echo" to test this script. + +doit=${DOITPROG-} +doit_exec=${doit:-exec} + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. + -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -p) cpprog="$cpprog -p";; + + -s) stripcmd=$stripprog;; + + -S) backupsuffix="$2" + shift;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi + + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibility with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/mans/Makefile.am b/mans/Makefile.am new file mode 100644 index 0000000..12281d5 --- /dev/null +++ b/mans/Makefile.am @@ -0,0 +1,29 @@ + +AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo + +dist_man1_MANS = \ + mproxyctl.1 \ + mproxyctl-accounts.1 \ + mproxyctl-accounts-create.1 \ + mproxyctl-accounts-delete.1 \ + mproxyctl-accounts-get.1 \ + mproxyctl-accounts-list.1 \ + mproxyctl-accounts-update.1 \ + mproxyctl-grants.1 \ + mproxyctl-grants-create.1 \ + mproxyctl-grants-delete.1 \ + mproxyctl-grants-get.1 \ + mproxyctl-grants-list.1 \ + mproxyctl-grants-update.1 + + +dist_man8_MANS = \ + mproxyd.8 + +man: + $(GO) run makeman-mstorectl.go + $(GO) run makeman-mstored.go + +EXTRA_DIST = \ + makeman-mstorectl.go \ + makeman-mstored.go diff --git a/mans/Makefile.in b/mans/Makefile.in new file mode 100644 index 0000000..5ebe271 --- /dev/null +++ b/mans/Makefile.in @@ -0,0 +1,585 @@ +# Makefile.in generated by automake 1.17 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2024 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +am__rm_f = rm -f $(am__rm_f_notfound) +am__rm_rf = rm -rf $(am__rm_f_notfound) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = mans +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +depcomp = +am__maybe_remake_depfiles = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ + } +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(dist_man1_MANS) $(dist_man8_MANS) +am__extra_recursive_targets = docs-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(dist_man1_MANS) $(dist_man8_MANS) \ + $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASENAME = @BASENAME@ +CP = @CP@ +CPIO = @CPIO@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUILDPACKAGE = @DBUILDPACKAGE@ +DEFS = @DEFS@ +DPKGSOURCE = @DPKGSOURCE@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ETAGS = @ETAGS@ +FIND = @FIND@ +GO = @GO@ +HAVE_GO = @HAVE_GO@ +HELM = @HELM@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PODMAN = @PODMAN@ +ROOT_GROUP = @ROOT_GROUP@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SORT = @SORT@ +STRIP = @STRIP@ +SUDO = @SUDO@ +SWAG = @SWAG@ +UNIQ = @UNIQ@ +VERSION = @VERSION@ +XARGS = @XARGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__rm_f_notfound = @am__rm_f_notfound@ +am__tar = @am__tar@ +am__untar = @am__untar@ +am__xargs_n = @am__xargs_n@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +srv_confdir = @srv_confdir@ +srv_datadir = @srv_datadir@ +srv_devel_mode = @srv_devel_mode@ +srv_libdir = @srv_libdir@ +srv_logdir = @srv_logdir@ +srv_rundir = @srv_rundir@ +srv_sharedir = @srv_sharedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo +dist_man1_MANS = \ + mproxyctl.1 \ + mproxyctl-accounts.1 \ + mproxyctl-accounts-create.1 \ + mproxyctl-accounts-delete.1 \ + mproxyctl-accounts-get.1 \ + mproxyctl-accounts-list.1 \ + mproxyctl-accounts-update.1 \ + mproxyctl-grants.1 \ + mproxyctl-grants-create.1 \ + mproxyctl-grants-delete.1 \ + mproxyctl-grants-get.1 \ + mproxyctl-grants-list.1 \ + mproxyctl-grants-update.1 + +dist_man8_MANS = \ + mproxyd.8 + +EXTRA_DIST = \ + makeman-mstorectl.go \ + makeman-mstored.go + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mans/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign mans/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-man1: $(dist_man1_MANS) + @$(NORMAL_INSTALL) + @list1='$(dist_man1_MANS)'; \ + list2=''; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-man8: $(dist_man8_MANS) + @$(NORMAL_INSTALL) + @list1='$(dist_man8_MANS)'; \ + list2=''; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ + done; } + +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list='$(dist_man8_MANS)'; test -n "$(man8dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) +docs-local: +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -$(am__rm_f) $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +docs: docs-am + +docs-am: docs-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 install-man8 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 uninstall-man8 + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir docs-am \ + docs-local dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-man8 install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-man \ + uninstall-man1 uninstall-man8 + +.PRECIOUS: Makefile + + +man: + $(GO) run makeman-mstorectl.go + $(GO) run makeman-mstored.go + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# Tell GNU make to disable its built-in pattern rules. +%:: %,v +%:: RCS/%,v +%:: RCS/% +%:: s.% +%:: SCCS/s.% diff --git a/mans/makeman-mstorectl.go b/mans/makeman-mstorectl.go new file mode 100644 index 0000000..775e5a5 --- /dev/null +++ b/mans/makeman-mstorectl.go @@ -0,0 +1,49 @@ +package main + +import ( + "fmt" + "os" + "time" + + "github.com/spf13/cobra/doc" + + "mproxy/cmd/mproxyctl/util" +) + +func run() error { + var err error + os.Args[0] = "mproxyctl" + util := util.NewUtil() + err = util.Build() + if err != nil { + return err + } + + cmd := util.GetRooCmd() + now := time.Now() + header := &doc.GenManHeader{ + Title: "mproxyctl", + Section: "1", + Manual: "User commands", + Source: "mproxyctl command", + Date: &now, + } + opts := doc.GenManTreeOptions{ + Header: header, + Path: "./", + CommandSeparator: "-", + } + err = doc.GenManTreeFromOpts(cmd, opts) + if err != nil { + return err + } + return err +} + +func main() { + err := run() + if err != nil { + fmt.Printf("err: %v\n", err) + } + +} diff --git a/mans/makeman-mstored.go b/mans/makeman-mstored.go new file mode 100644 index 0000000..ce0a8e9 --- /dev/null +++ b/mans/makeman-mstored.go @@ -0,0 +1,48 @@ +package main + +import ( + "fmt" + "os" + "time" + + "github.com/spf13/cobra/doc" + + "mproxy/cmd/mproxyd/starter" +) + +func run() error { + var err error + os.Args[0] = "mproxyd" + util := starter.NewStarter() + if err != nil { + return err + } + + cmd := util.GetCmd() + now := time.Now() + header := &doc.GenManHeader{ + Title: "mproxyd", + Section: "8", + Manual: "User commands", + Source: "mproxyd command", + Date: &now, + } + opts := doc.GenManTreeOptions{ + Header: header, + Path: "./", + CommandSeparator: "-", + } + err = doc.GenManTreeFromOpts(cmd, opts) + if err != nil { + return err + } + return err +} + +func main() { + err := run() + if err != nil { + fmt.Printf("err: %v\n", err) + } + +} diff --git a/mans/mproxyctl.1 b/mans/mproxyctl.1 new file mode 100644 index 0000000..1c60454 --- /dev/null +++ b/mans/mproxyctl.1 @@ -0,0 +1,23 @@ +.nh +.TH "mproxyctl" "1" "May 2026" "mproxyctl command" "User commands" + +.SH NAME +mproxyctl - +Operation with artefacts: files, images, service accounts and grants + + +.SH SYNOPSIS +\fBmproxyctl [flags]\fP + + +.SH DESCRIPTION +Operation with artefacts: files, images, service accounts and grants + + +.SH OPTIONS +\fB-h\fP, \fB--help\fP[=false] + help for mproxyctl + + +.SH HISTORY +26-May-2026 Auto generated by spf13/cobra diff --git a/mans/mproxyd.8 b/mans/mproxyd.8 new file mode 100644 index 0000000..33f78fb --- /dev/null +++ b/mans/mproxyd.8 @@ -0,0 +1,31 @@ +.nh +.TH "mproxyd" "8" "May 2026" "mproxyd command" "User commands" + +.SH NAME +mproxyd - +Artifact storage service + + +.SH SYNOPSIS +\fBmproxyd [flags]\fP + + +.SH DESCRIPTION +Artifact storage service + + +.SH OPTIONS +\fB-D\fP, \fB--asDaemon\fP[=true] + Run service as daemon + +.PP +\fB-h\fP, \fB--help\fP[=false] + help for mproxyd + +.PP +\fB-P\fP, \fB--port\fP=1025 + Service port + + +.SH HISTORY +26-May-2026 Auto generated by spf13/cobra diff --git a/missing b/missing new file mode 100755 index 0000000..7e7d78e --- /dev/null +++ b/missing @@ -0,0 +1,236 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU and other programs. + +scriptversion=2024-06-07.14; # UTC + +# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# 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, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: +aclocal autoconf autogen autoheader autom4te automake autoreconf +bison flex help2man lex makeinfo perl yacc + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing (GNU Automake) $scriptversion" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake|autoreconf) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + *) + : + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + autoheader_deps="'acconfig.h'" + automake_deps="'Makefile.am'" + aclocal_deps="'acinclude.m4'" + case $normalized_program in + aclocal*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$configure_deps." + ;; + autoconf*) + echo "You should only need it if you modified $configure_deps." + ;; + autogen*) + echo "You should only need it if you modified a '.def' or '.tpl' file." + echo "You may want to install the GNU AutoGen package:" + echo "<$gnu_software_URL/autogen/>" + ;; + autoheader*) + echo "You should only need it if you modified $autoheader_deps or" + echo "$configure_deps." + ;; + automake*) + echo "You should only need it if you modified $automake_deps or" + echo "$configure_deps." + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + ;; + autoreconf*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$automake_deps or $autoheader_deps or $automake_deps or" + echo "$configure_deps." + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + perl*) + echo "You should only need it to run GNU Autoconf, GNU Automake, " + echo " assorted other tools, or if you modified a Perl source file." + echo "You may want to install the Perl 5 language interpreter:" + echo "<$perl_URL>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac + program_details "$normalized_program" +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/pkg/auxhttp/basic.go b/pkg/auxhttp/basic.go new file mode 100644 index 0000000..b32240d --- /dev/null +++ b/pkg/auxhttp/basic.go @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Oleg Borodin + * + * +*/ + +package auxhttp + +import ( + "encoding/base64" + "fmt" + "strings" +) + +func EncodeBasicAuth(username, password string) string { + auth := username + ":" + password + return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) +} + +func ParseBasicAuth(basicFields string) (string, string, error) { + var err error + var username string + var password string + if basicFields == "" { + err := fmt.Errorf("Empty auth field") + return username, password, err + } + authFields := strings.SplitN(basicFields, " ", 2) + if len(authFields) < 2 { + err = fmt.Errorf("Cannot split auth field: %s", basicFields) + return username, password, err + } + authType := strings.TrimSpace(authFields[0]) + if strings.ToLower(authType) != strings.ToLower("Basic") { + err = fmt.Errorf("Not basic auth type") + return username, password, err + } + authPairEncoded := authFields[1] + pairEncoded, err := base64.StdEncoding.DecodeString(authPairEncoded) + if err != nil { + err = fmt.Errorf("Cannon decode auth pair") + return username, password, err + } + authPair := strings.SplitN(string(pairEncoded), ":", 2) + if len(authPair) != 2 { + err = fmt.Errorf("Wrong auth pair") + return username, password, err + } + username = authPair[0] + password = authPair[1] + return username, password, err +} diff --git a/pkg/auxhttp/crange.go b/pkg/auxhttp/crange.go new file mode 100644 index 0000000..924945b --- /dev/null +++ b/pkg/auxhttp/crange.go @@ -0,0 +1,93 @@ +/* + * Copyright 2026 Oleg Borodin + * + * +*/ + +package auxhttp + +import ( + "fmt" + "strconv" + "strings" +) + +func ParseOCIContentRange(ref string) (int64, int64, error) { + var start, end int64 + var err error + + startstop := strings.TrimSpace(ref) + tmp := strings.SplitN(startstop, "-", 2) + if len(tmp) != 2 { + err = fmt.Errorf("Wrong Content-Range definition, strange range def %v", startstop) + return start, end, err + } + startstr := tmp[0] + endstr := tmp[1] + + start, err = strconv.ParseInt(startstr, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Range definition, strange start %s", startstr) + return start, end, err + } + end, err = strconv.ParseInt(endstr, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Range definition, strange end %s", endstr) + return start, end, err + } + return start, end, err +} + +func ParseContentRange(ref string) (int64, int64, int64, error) { + var start, end, total int64 + var err error + + const bytesUnit = "bytes" + + tmp := strings.SplitN(ref, " ", 2) + if len(tmp) != 2 { + err := fmt.Errorf("Wrong Content-Range definition, len is only %d", len(tmp)) + return start, end, total, err + } + unit := strings.ToLower(tmp[0]) + if unit != bytesUnit { + err = fmt.Errorf("Wrong Content-Range definition, strange length def %s", unit) + return start, end, total, err + } + ranger := strings.TrimSpace(tmp[1]) + + tmp = strings.Split(ranger, "/") + if len(tmp) != 2 { + err = fmt.Errorf("Wrong Content-Range definition, dont found total") + return start, end, total, err + } + totalstr := tmp[1] + if totalstr == "*" { + total = 0 + } else { + total, err = strconv.ParseInt(totalstr, 10, 64) + if err != nil { + return start, end, total, err + } + } + startstop := tmp[0] + tmp = strings.SplitN(startstop, "-", 2) + if len(tmp) != 2 { + err = fmt.Errorf("Wrong Content-Range definition, strange range def %v", startstop) + return start, end, total, err + } + startstr := tmp[0] + endstr := tmp[1] + + start, err = strconv.ParseInt(startstr, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Range definition, strange start %s", startstr) + return start, end, total, err + } + end, err = strconv.ParseInt(endstr, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Range definition, strange end %s", endstr) + return start, end, total, err + } + return start, end, total, err +} diff --git a/pkg/auxpwd/passwd.go b/pkg/auxpwd/passwd.go new file mode 100644 index 0000000..71f9d4c --- /dev/null +++ b/pkg/auxpwd/passwd.go @@ -0,0 +1,107 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxpwd + +import ( + "crypto/sha256" + "crypto/sha512" + "encoding/hex" + "fmt" + "math/rand" + "strings" + "time" +) + +var rnd *rand.Rand + +const ( + sha256Prefix = "sha256pwd" + sha512Prefix = "sha512pwd" + saltSize = 16 +) + +func init() { + src := rand.NewSource(time.Now().UnixNano()) + rnd = rand.New(src) +} + +func MakeSHA256Hash(passwd []byte) string { + var res string + salt := hex.EncodeToString(randomBytes(saltSize)) + passwdString := hex.EncodeToString(passwd) + passwdString = fmt.Sprintf("%s%s", passwdString, salt) + + hasher := sha256.New() + hasher.Write([]byte(passwdString)) + checksum := hex.EncodeToString(hasher.Sum(nil)) + + res = fmt.Sprintf("%s:%s:%s", sha256Prefix, salt, checksum) + return res +} + +func MakeSHA512Hash(passwd []byte) string { + var res string + salt := hex.EncodeToString(randomBytes(saltSize)) + passwdString := hex.EncodeToString(passwd) + passwdString = fmt.Sprintf("%s%s", passwdString, salt) + + hasher := sha512.New() + hasher.Write([]byte(passwdString)) + checksum := hex.EncodeToString(hasher.Sum(nil)) + + res = fmt.Sprintf("%s:%s:%s", sha512Prefix, salt, checksum) + return res +} + +func PasswordMatch(passwd []byte, hash string) bool { + hashComponents := strings.Split(hash, ":") + if len(hashComponents) != 3 { + return false + } + method := hashComponents[0] + salt := hashComponents[1] + controlChecksum := hashComponents[2] + + switch method { + case sha256Prefix: + passwdString := hex.EncodeToString(passwd) + passwdString = fmt.Sprintf("%s%s", passwdString, salt) + hasher := sha256.New() + hasher.Write([]byte(passwdString)) + checksum := hex.EncodeToString(hasher.Sum(nil)) + if checksum != controlChecksum { + return false + } + case sha512Prefix: + passwdString := hex.EncodeToString(passwd) + passwdString = fmt.Sprintf("%s%s", passwdString, salt) + hasher := sha512.New() + hasher.Write([]byte(passwdString)) + checksum := hex.EncodeToString(hasher.Sum(nil)) + if checksum != controlChecksum { + return false + } + default: + return false + } + return true +} + +func randomString(n int) string { + const letters = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + arr := make([]byte, n) + lettersArrayLen := len(letters) + for i := range arr { + arr[i] = letters[rnd.Intn(lettersArrayLen)] + } + return string(arr) +} + +func randomBytes(n int) []byte { + arr := make([]byte, n) + for i := range arr { + arr[i] = byte(rnd.Intn(256) & 0xFF) + } + return arr +} diff --git a/pkg/auxpwd/passwd_test.go b/pkg/auxpwd/passwd_test.go new file mode 100644 index 0000000..0bedfef --- /dev/null +++ b/pkg/auxpwd/passwd_test.go @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxpwd + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestPasswd256(t *testing.T) { + password := []byte("123456789") + wrongPasswd := []byte("qwerty") + + hash := MakeSHA256Hash(password) + fmt.Printf("%s\n", hash) + { + match := PasswordMatch(password, hash) + require.Equal(t, true, match) + } + { + match := PasswordMatch(wrongPasswd, hash) + require.NotEqual(t, true, match) + } +} + +func TestPasswd512(t *testing.T) { + password := []byte("123456781") + wrongPasswd := []byte("qwerty") + + hash := MakeSHA512Hash(password) + fmt.Printf("%s\n", hash) + { + match := PasswordMatch(password, hash) + require.Equal(t, true, match) + } + { + match := PasswordMatch(wrongPasswd, hash) + require.NotEqual(t, true, match) + } +} diff --git a/pkg/auxtool/cleandir.go b/pkg/auxtool/cleandir.go new file mode 100644 index 0000000..897fc34 --- /dev/null +++ b/pkg/auxtool/cleandir.go @@ -0,0 +1,37 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxtool + +import ( + "os" + "path/filepath" + "strings" +) + +// Clean only overbase elements of dir path if possible +func CleanDirs(basedir, datadir string) { + separator := string(os.PathSeparator) + + basedir = filepath.Clean(separator + basedir) + datadir = filepath.Clean(separator + datadir) + + items := strings.Split(datadir, separator) + for i := len(items); i > 0; i-- { + p := filepath.Join(items[0:i]...) + p = filepath.Clean(separator + p) + if p == basedir { + break + } + fileInfo, err := os.Stat(p) + if err != nil { + return + } + if fileInfo.IsDir() { + err = os.Remove(p) + if err != nil { + return + } + } + } +} diff --git a/pkg/auxtool/fileex.go b/pkg/auxtool/fileex.go new file mode 100644 index 0000000..b6d1815 --- /dev/null +++ b/pkg/auxtool/fileex.go @@ -0,0 +1,31 @@ +package auxtool + +import ( + "os" +) + +func FileExists(name string) bool { + fileStat, err := os.Stat(name) + if err != nil { + if os.IsNotExist(err) { + return false + } + } + if fileStat.IsDir() { + return false + } + return true +} + +func DirExists(name string) bool { + fileStat, err := os.Stat(name) + if err != nil { + if os.IsNotExist(err) { + return false + } + } + if fileStat == nil { + return false + } + return fileStat.IsDir() +} diff --git a/pkg/auxtool/randstr.go b/pkg/auxtool/randstr.go new file mode 100644 index 0000000..2929bc7 --- /dev/null +++ b/pkg/auxtool/randstr.go @@ -0,0 +1,22 @@ +/* + * Copyright 2026 Oleg Borodin + * + * +*/ +/* + */ + +package auxtool + +import ( + "math/rand" +) + +func RandomString(n int) string { + const letters = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + arr := make([]byte, n) + for i := range arr { + arr[i] = letters[rand.Intn(len(letters))] + } + return string(arr) +} diff --git a/pkg/auxtool/tmpfile.go b/pkg/auxtool/tmpfile.go new file mode 100644 index 0000000..6376a89 --- /dev/null +++ b/pkg/auxtool/tmpfile.go @@ -0,0 +1,22 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxtool + +import ( + "encoding/hex" + "fmt" + "math/rand" + "time" +) + +func init() { + rand.Seed(time.Now().UnixNano()) +} + +func MakeTmpFilename(prefix string) string { + randBytes := make([]byte, 6) + rand.Read(randBytes) + suffix := hex.EncodeToString(randBytes) + return fmt.Sprintf("%s.tmp.%s", prefix, suffix) +} diff --git a/pkg/auxtool/unixnow.go b/pkg/auxtool/unixnow.go new file mode 100644 index 0000000..c4e6ae4 --- /dev/null +++ b/pkg/auxtool/unixnow.go @@ -0,0 +1,13 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxtool + +import ( + "time" +) + +func TimeNow() string { + return time.Now().Format(time.RFC3339) + +} diff --git a/pkg/auxutar/utar.go b/pkg/auxutar/utar.go new file mode 100644 index 0000000..4d49ed9 --- /dev/null +++ b/pkg/auxutar/utar.go @@ -0,0 +1,151 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxutar + +import ( + "archive/tar" + "io" + "os" + "path/filepath" + "strings" + "time" +) + +func Archive(srcdir, dstpath string) error { + var err error + srcdir = filepath.Clean(srcdir) + dstpath = filepath.Clean(dstpath) + + err = os.MkdirAll(filepath.Dir(dstpath), 0750) + if err != nil { + return err + } + tarFile, err := os.OpenFile(dstpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0640) + if err != nil { + return err + } + defer tarFile.Close() + + tarWriter := tar.NewWriter(tarFile) + defer tarWriter.Close() + + walker := func(filename string, fileInfo os.FileInfo, err error) error { + if err != nil { + return err + } + if !fileInfo.Mode().IsRegular() { + return nil + } + header, err := tar.FileInfoHeader(fileInfo, fileInfo.Name()) + if err != nil { + return err + } + header.Name = strings.TrimPrefix(filename, filepath.Clean(srcdir)) + header.Name = strings.TrimPrefix(header.Name, string(filepath.Separator)) + err = tarWriter.WriteHeader(header) + if err != nil { + return err + } + wrapfunc := func() error { + file, err := os.Open(filename) + if err != nil { + return err + } + defer file.Close() + _, err = io.Copy(tarWriter, file) + if err != nil { + return err + } + return err + } + err = wrapfunc() + if err != nil { + return err + } + return nil + } + err = filepath.Walk(srcdir, walker) + if err != nil { + return err + } + return err +} + +func Unarchive(filename, dstdir string) error { + var err error + err = os.MkdirAll(dstdir, 0755) + if err != nil { + return err + } + file, err := os.OpenFile(filename, os.O_RDONLY, 0) + if err != nil { + return err + } + defer file.Close() + + tarReader := tar.NewReader(file) + for { + header, err := tarReader.Next() + switch { + case err == io.EOF: + return nil + case err != nil: + return err + case header == nil: + continue + } + target := filepath.Join(dstdir, header.Name) + target = filepath.Clean(target) + + fileInfo := header.FileInfo() + switch header.Typeflag { + case tar.TypeDir: + _, err := os.Stat(target) + if os.IsNotExist(err) { + err = nil + err := os.MkdirAll(target, fileInfo.Mode()) + if err != nil { + return err + } + } + if err != nil { + return err + } + case tar.TypeReg: + wrapfunc := func() error { + dir := filepath.Dir(target) + _, err := os.Stat(dir) + if os.IsNotExist(err) { + err := os.MkdirAll(dir, 0750) + if err != nil { + return err + } + } + file, err := os.OpenFile(target, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, fileInfo.Mode()) + if err != nil { + return err + } + defer file.Close() + _, err = io.Copy(file, tarReader) + if err != nil { + return err + } + return err + } + err = wrapfunc() + if err != nil { + return err + } + } + err = os.Chtimes(target, time.Now(), fileInfo.ModTime()) + if err != nil { + return err + } + err = file.Chmod(fileInfo.Mode()) + if err != nil { + return err + } + } + return err +} diff --git a/pkg/auxuuid/uuid.go b/pkg/auxuuid/uuid.go new file mode 100644 index 0000000..b84c925 --- /dev/null +++ b/pkg/auxuuid/uuid.go @@ -0,0 +1,14 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxuuid + +import ( + "github.com/google/uuid" +) + +const ZeroUUID string = "00000000-0000-0000-0000-000000000000" + +func NewUUID() string { + return uuid.New().String() +} diff --git a/pkg/auxx509/x509cert.go b/pkg/auxx509/x509cert.go new file mode 100644 index 0000000..756500f --- /dev/null +++ b/pkg/auxx509/x509cert.go @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxx509 + +import ( + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "fmt" + "math/big" + "time" +) + +func CreateSelfSignedCert(subject string, dnsNames ...string) ([]byte, []byte, error) { + var err error + certPem := make([]byte, 0) + keyPem := make([]byte, 0) + + now := time.Now() + + const yearsAfter int = 10 + const keySize int = 2048 + + key, err := rsa.GenerateKey(rand.Reader, keySize) + if err != nil { + err := fmt.Errorf("Can't create a private key: %v", err) + return certPem, keyPem, err + + } + keyPemBlock := pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: x509.MarshalPKCS1PrivateKey(key), + } + keyPem = pem.EncodeToMemory(&keyPemBlock) + + names := make([]string, 0) + names = append(names, subject) + names = append(names, dnsNames...) + tml := x509.Certificate{ + SerialNumber: big.NewInt(now.Unix()), + NotBefore: now, + NotAfter: now.AddDate(yearsAfter, 0, 0), + Subject: pkix.Name{ + CommonName: subject, + }, + DNSNames: names, + BasicConstraintsValid: true, + } + certBytes, err := x509.CreateCertificate(rand.Reader, &tml, &tml, &key.PublicKey, key) + if err != nil { + return certPem, keyPem, fmt.Errorf("Can't create a certificate: %v", err) + + } + certPemBlock := pem.Block{ + Type: "CERTIFICATE", + Bytes: certBytes, + } + certPem = pem.EncodeToMemory(&certPemBlock) + if err != nil { + return certPem, keyPem, err + } + return certPem, keyPem, err +} diff --git a/pkg/auxx509/x509cert_test.go b/pkg/auxx509/x509cert_test.go new file mode 100644 index 0000000..f907bb1 --- /dev/null +++ b/pkg/auxx509/x509cert_test.go @@ -0,0 +1,18 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package auxx509 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestCert(t *testing.T) { + caCert, caKey, err := CreateSelfSignedCert("test1") + require.NoError(t, err) + fmt.Println(string(caCert)) + fmt.Println(string(caKey)) +} diff --git a/pkg/client/attic/file.go b/pkg/client/attic/file.go new file mode 100644 index 0000000..ae6c221 --- /dev/null +++ b/pkg/client/attic/file.go @@ -0,0 +1,417 @@ +/* + * Copyright 2026 Oleg Borodin + * + * This work is published and licensed under a Creative Commons + * Attribution-NonCommercial-NoDerivatives 4.0 International License. + * + * Distribution of this work is permitted, but commercial use and + * modifications are strictly prohibited. + */ +package client + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "os" + "path/filepath" + "strconv" + + "mproxy/pkg/auxhttp" + "mproxy/pkg/descr" +) + +func (cli *Client) FileInfo(ctx context.Context, fileuri string) (bool, *descr.File, error) { + var exists bool + var err error + file := &descr.File{} + fileuri, username, password, err := repackServiceURI(fileuri) + if err != nil { + return exists, file, err + } + fileuri, err = convertFileURI(fileuri) + if err != nil { + return exists, file, err + } + req, err := http.NewRequestWithContext(ctx, http.MethodHead, fileuri, nil) + if err != nil { + return exists, file, err + } + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + resp, err := client.Do(req) + if err != nil { + return exists, file, err + } + defer resp.Body.Close() + if resp.StatusCode == http.StatusOK { + file.Collection = resp.Header.Get("Content-Collection") + file.Name = resp.Header.Get("Content-Name") + contentSize := resp.Header.Get("Content-Size") + size, err := strconv.ParseInt(contentSize, 10, 64) + if err != nil { + return exists, file, err + } + file.Size = size + file.Type = resp.Header.Get("Content-Type") + file.Checksum = resp.Header.Get("Content-Digest") + exists = true + } + return exists, file, err +} + +func (cli *Client) PutFile(ctx context.Context, filename, fileuri string) error { + var err error + fileuri, username, password, err := repackServiceURI(fileuri) + if err != nil { + return err + } + fileuri, err = convertFileURI(fileuri) + if err != nil { + return err + } + file, err := os.Open(filename) + if err != nil { + return err + } + defer file.Close() + + req, err := http.NewRequestWithContext(ctx, http.MethodPut, fileuri, file) + if err != nil { + return err + } + fileinfo, err := os.Stat(filename) + if err != nil { + return err + } + filesize := fileinfo.Size() + + req.ContentLength = filesize + req.Header.Set("Content-Type", "application/octet-stream") + req.Header.Set("Content-Size", strconv.FormatInt(filesize, 10)) + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + if resp.StatusCode != http.StatusOK { + err := fmt.Errorf("Received wrong status code: %s", resp.Status) + return err + } + return err +} + +func (cli *Client) GetFile(ctx context.Context, fileuri, filename string) (int64, error) { + var err error + var size int64 + + fileuri, username, password, err := repackServiceURI(fileuri) + if err != nil { + return size, err + } + fileuri, err = convertFileURI(fileuri) + if err != nil { + return size, err + } + req, err := http.NewRequestWithContext(ctx, http.MethodGet, fileuri, nil) + if err != nil { + return size, err + } + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + resp, err := client.Do(req) + if err != nil { + return size, err + } + defer resp.Body.Close() + + contentLength := resp.Header.Get("Content-Length") + if contentLength == "" { + err = fmt.Errorf("Empty Content-Length received") + return size, err + } + if resp.StatusCode != http.StatusOK { + err := fmt.Errorf("Received wrong status code: %s", resp.Status) + return size, err + } + declSize, err := strconv.ParseInt(contentLength, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Length value: %v", err) + return size, err + } + dirname := filepath.Dir(filename) + err = os.MkdirAll(dirname, 0750) + if err != nil { + return size, err + } + file, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE, 0640) + if err != nil { + return size, err + } + size, err = io.Copy(file, resp.Body) + if err != nil { + return size, err + } + if size != declSize { + err := fmt.Errorf("Mismatch Content-Length and recorded filesize") + return size, err + } + return size, err +} + +func (cli *Client) DeleteFile(ctx context.Context, fileuri string) error { + var err error + + fileuri, username, password, err := repackServiceURI(fileuri) + if err != nil { + return err + } + fileuri, err = convertFileURI(fileuri) + if err != nil { + return err + } + req, err := http.NewRequestWithContext(ctx, http.MethodDelete, fileuri, nil) + if err != nil { + return err + } + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + err := fmt.Errorf("Received wrong status code: %s", resp.Status) + return err + } + return err +} + +func (cli *Client) ListFiles(ctx context.Context, catalogURI, usePathAs string) ([]descr.File, error) { + var err error + res := make([]descr.File, 0) + + catalogURI, username, password, err := repackServiceURI(catalogURI) + if err != nil { + return res, err + } + catalogURI, err = convertFilesURI(catalogURI) + if err != nil { + return res, err + } + // Add values + values := url.Values{} + if usePathAs != "" { + values.Add("pathAs", string(usePathAs)) + } + encodedValues := values.Encode() + if encodedValues != "" { + catalogURI = catalogURI + "?" + encodedValues + } + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, catalogURI, nil) + if err != nil { + return res, err + } + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + resp, err := client.Do(req) + if err != nil { + return res, err + } + defer resp.Body.Close() + + contentLength := resp.Header.Get("Content-Length") + if contentLength == "" { + err = fmt.Errorf("Empty Content-Length received") + return res, err + } + if resp.StatusCode != http.StatusOK { + err := fmt.Errorf("Received wrong status code: %s", resp.Status) + return res, err + } + declSize, err := strconv.ParseInt(contentLength, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Length value: %v", err) + return res, err + } + respBuffer := bytes.NewBuffer(nil) + size, err := io.Copy(respBuffer, resp.Body) + if err != nil { + return res, err + } + respBytes := respBuffer.Bytes() + if size != declSize { + err := fmt.Errorf("Mismatch Content-Length and recorded filesize") + return res, err + } + err = json.Unmarshal(respBytes, &res) + if err != nil { + return res, err + } + return res, err +} + +func (cli *Client) ListCollections(ctx context.Context, catalogURI, usePathAs string) ([]string, error) { + var err error + res := make([]string, 0) + + catalogURI, username, password, err := repackServiceURI(catalogURI) + if err != nil { + return res, err + } + catalogURI, err = convertCollectionsURI(catalogURI) + if err != nil { + return res, err + } + + // Add values + values := url.Values{} + if usePathAs != "" { + values.Add("pathAs", string(usePathAs)) + } + encodedValues := values.Encode() + if encodedValues != "" { + catalogURI = catalogURI + "?" + encodedValues + } + + req, err := http.NewRequestWithContext(ctx, http.MethodGet, catalogURI, nil) + if err != nil { + return res, err + } + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + resp, err := client.Do(req) + if err != nil { + return res, err + } + defer resp.Body.Close() + + contentLength := resp.Header.Get("Content-Length") + if contentLength == "" { + err = fmt.Errorf("Empty Content-Length received") + return res, err + } + if resp.StatusCode != http.StatusOK { + err := fmt.Errorf("Received wrong status code: %s", resp.Status) + return res, err + } + declSize, err := strconv.ParseInt(contentLength, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Length value: %v", err) + return res, err + } + respBuffer := bytes.NewBuffer(nil) + size, err := io.Copy(respBuffer, resp.Body) + if err != nil { + return res, err + } + respBytes := respBuffer.Bytes() + if size != declSize { + err := fmt.Errorf("Mismatch Content-Length and recorded filesize") + return res, err + } + err = json.Unmarshal(respBytes, &res) + if err != nil { + return res, err + } + return res, err +} + +func (cli *Client) DeleteCollection(ctx context.Context, catalogURI, usePathAs string, dryRun bool) ([]descr.File, error) { + var err error + res := make([]descr.File, 0) + + catalogURI, username, password, err := repackServiceURI(catalogURI) + if err != nil { + return res, err + } + catalogURI, err = convertCollectionURI(catalogURI) + if err != nil { + return res, err + } + // Add values + values := url.Values{} + if usePathAs != "" { + values.Add("pathAs", string(usePathAs)) + } + if dryRun { + values.Add("dryRun", "true") + } + encodedValues := values.Encode() + if encodedValues != "" { + catalogURI = catalogURI + "?" + encodedValues + } + + req, err := http.NewRequestWithContext(ctx, http.MethodDelete, catalogURI, nil) + if err != nil { + return res, err + } + if username != "" && password != "" { + basic := auxhttp.EncodeBasicAuth(username, password) + req.Header.Add("Authorization", basic) + } + client := makeHTTPClient(cli.skipTLSVerify) + resp, err := client.Do(req) + if err != nil { + return res, err + } + defer resp.Body.Close() + + contentLength := resp.Header.Get("Content-Length") + if contentLength == "" { + err = fmt.Errorf("Empty Content-Length received") + return res, err + } + if resp.StatusCode != http.StatusOK { + err := fmt.Errorf("Received wrong status code: %s", resp.Status) + return res, err + } + declSize, err := strconv.ParseInt(contentLength, 10, 64) + if err != nil { + err = fmt.Errorf("Wrong Content-Length value: %v", err) + return res, err + } + respBuffer := bytes.NewBuffer(nil) + size, err := io.Copy(respBuffer, resp.Body) + if err != nil { + return res, err + } + respBytes := respBuffer.Bytes() + if size != declSize { + err := fmt.Errorf("Mismatch Content-Length and recorded filesize") + return res, err + } + err = json.Unmarshal(respBytes, &res) + if err != nil { + return res, err + } + return res, err +} diff --git a/pkg/servcli/client.go b/pkg/servcli/client.go new file mode 100644 index 0000000..9960bcd --- /dev/null +++ b/pkg/servcli/client.go @@ -0,0 +1,131 @@ +package servcli + +import ( + "crypto/tls" + "encoding/base64" + "net/http" +) + +type Client struct { + httpClient *http.Client + userAgent string +} + +func NewClient(transport http.RoundTripper, mwFuncs ...MiddlewareFunc) *Client { + if transport == nil { + transport = NewDefaultTransport() + } + for _, mwFunc := range mwFuncs { + transport = mwFunc(transport) + } + httpClient := &http.Client{ + Transport: transport, + } + + return &Client{ + httpClient: httpClient, + userAgent: "ociClient/1.0", + } +} + +func (cli *Client) SetTransport(transport http.RoundTripper) { + cli.httpClient.Transport = transport +} + +type MiddlewareFunc func(next http.RoundTripper) http.RoundTripper + +func (cli *Client) UseMiddleware(mwFunc MiddlewareFunc) { + cli.httpClient.Transport = mwFunc(cli.httpClient.Transport) +} + +// BasicAuthMiddleware +func NewBasicAuthMiddleware(user, pass string) MiddlewareFunc { + return func(next http.RoundTripper) http.RoundTripper { + return newBasicAuthMW(next, user, pass) + } +} + +type BasicAuthMW struct { + user, pass string + next http.RoundTripper +} + +func newBasicAuthMW(next http.RoundTripper, user, pass string) *BasicAuthMW { + return &BasicAuthMW{ + user: user, + pass: pass, + next: next, + } +} + +func (tran BasicAuthMW) RoundTrip(req *http.Request) (*http.Response, error) { + if tran.user != "" && tran.pass != "" { + pair := base64.StdEncoding.EncodeToString([]byte(tran.user + ":" + tran.pass)) + req.Header.Set("Authorization", "Basic "+pair) + } + return tran.next.RoundTrip(req) +} + +// BearerAuthMiddleware +func NewBearerAuthMiddleware(token string) MiddlewareFunc { + return func(next http.RoundTripper) http.RoundTripper { + return newBearerAuthMW(next, token) + } +} + +type BearerAuthMW struct { + token string + next http.RoundTripper +} + +func newBearerAuthMW(next http.RoundTripper, token string) *BearerAuthMW { + return &BearerAuthMW{ + token: token, + next: next, + } +} + +func (tran BearerAuthMW) RoundTrip(req *http.Request) (*http.Response, error) { + req.Header.Set("Authorization", "Bearer "+tran.token) + return tran.next.RoundTrip(req) +} + +// DefaultTransport +type DefaultTransport struct { + transport http.RoundTripper +} + +func NewDefaultTransport() *DefaultTransport { + return &DefaultTransport{ + transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + }, + } +} + +func (wrap *DefaultTransport) RoundTrip(req *http.Request) (*http.Response, error) { + return wrap.transport.RoundTrip(req) +} + +// ExampleMiddleware +func NewExampleMiddleware() MiddlewareFunc { + return func(next http.RoundTripper) http.RoundTripper { + return newExampleTransport(next) + } +} + +type ExampleTransport struct { + next http.RoundTripper +} + +func newExampleTransport(next http.RoundTripper) *ExampleTransport { + return &ExampleTransport{ + next: next, + } +} + +func (tran ExampleTransport) RoundTrip(req *http.Request) (*http.Response, error) { + return tran.next.RoundTrip(req) +} diff --git a/pkg/servcli/httpcall.go b/pkg/servcli/httpcall.go new file mode 100644 index 0000000..5cf5784 --- /dev/null +++ b/pkg/servcli/httpcall.go @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Oleg Borodin + */ +package servcli + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "strconv" +) + +func (cli *Client) doHTTPCall(ctx context.Context, host, obj, oper string, req []byte) ([]byte, error) { + var err error + var res []byte + + reader := bytes.NewReader(req) + ref, err := NewReferer(host, obj, oper) + if err != nil { + return res, err + } + httpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, ref.Point(), reader) + if err != nil { + return res, err + } + httpReq.Header.Set("User-Agent", cli.userAgent) + httpReq.Header.Set("Accept", "*/*") + httpResp, err := cli.httpClient.Do(httpReq) + if err != nil { + return res, err + } + defer httpResp.Body.Close() + if httpResp.StatusCode != http.StatusOK { + err := fmt.Errorf("Unexpected response code: %s", httpResp.Status) + return res, err + } + contentLength := httpResp.Header.Get("Content-Length") + if contentLength == "" { + err := fmt.Errorf("Content-Length header is missing") + return res, err + } + blobSize, err := strconv.ParseInt(contentLength, 10, 64) + if err != nil { + return res, err + } + buffer := bytes.NewBuffer(nil) + recSize, err := io.Copy(buffer, httpResp.Body) + if blobSize != recSize { + err := fmt.Errorf("Mismatch declared and actual body size, %d and %d", blobSize, recSize) + return res, err + } + res = buffer.Bytes() + return res, err +} diff --git a/pkg/servcli/referer.go b/pkg/servcli/referer.go new file mode 100644 index 0000000..ad4fc6e --- /dev/null +++ b/pkg/servcli/referer.go @@ -0,0 +1,77 @@ +package servcli + +import ( + "net/url" + "path" + "strings" +) + +type Referer struct { + urlobj *url.URL + user, pass string + obj, oper string +} + +func NewReferer(hostname, object, operation string) (*Referer, error) { + ref := &Referer{ + obj: object, + oper: operation, + } + if !strings.Contains(hostname, "://") { + hostname = "https://" + hostname + } + urlobj, err := url.Parse(hostname) + if err != nil { + return ref, err + } + if urlobj.User != nil { + ref.user = urlobj.User.Username() + ref.pass, _ = urlobj.User.Password() + urlobj.User = nil + } + urlobj.Path = "/" + ref.urlobj = urlobj + return ref, err +} + +func ParseHostinfo(hostname string) (*Referer, error) { + ref := &Referer{} + if !strings.Contains(hostname, "://") { + hostname = "https://" + hostname + } + urlobj, err := url.Parse(hostname) + if err != nil { + return ref, err + } + if urlobj.User != nil { + ref.user = urlobj.User.Username() + ref.pass, _ = urlobj.User.Password() + urlobj.User = nil + } + urlobj.Path = "/" + ref.urlobj = urlobj + return ref, err +} + +func (ref *Referer) Host() string { + return ref.urlobj.Host +} + +func (ref *Referer) Raw() string { + return path.Join(ref.urlobj.Host, "/v3/api/", ref.obj, ref.oper) +} + +func (ref *Referer) Point() string { + curl := ref.urlobj.JoinPath("/v3/api/", ref.obj, ref.oper) + return curl.String() +} + +func (ref *Referer) Userinfo() (string, string) { + return ref.user, ref.pass +} + +func (ref *Referer) SetUserinfo(user, pass string) { + if user != "" && pass != "" { + ref.user, ref.pass = user, pass + } +} diff --git a/pkg/servcli/servhello.go b/pkg/servcli/servhello.go new file mode 100644 index 0000000..51d5d35 --- /dev/null +++ b/pkg/servcli/servhello.go @@ -0,0 +1,36 @@ +package servcli + +import ( + "context" + "encoding/json" + "errors" + + "mproxy/app/handler" + "mproxy/app/servoper" +) + +func (cli *Client) ServiceHello(ctx context.Context, host string) (bool, error) { + var res bool + var err error + + params := servoper.SendHelloParams{} + reqdata, err := json.Marshal(params) + if err != nil { + return res, err + } + resdata, err := cli.doHTTPCall(ctx, host, "service", "hello", reqdata) + if err != nil { + return res, err + } + response := handler.Response[servoper.SendHelloResult]{} + err = json.Unmarshal(resdata, &response) + if err != nil { + return res, err + } + if response.Error { + err = errors.New(response.Message) + return res, err + } + res = response.Result.Alive + return res, err +} diff --git a/pkg/terms/terms.go b/pkg/terms/terms.go new file mode 100644 index 0000000..9dd3df1 --- /dev/null +++ b/pkg/terms/terms.go @@ -0,0 +1,28 @@ +/* + * Copyright 2026 Oleg Borodin + * + * +*/ + +package terms + +const ( + xxxAsFinePath string = "asFinePath" + xxxAsPrefix string = "asPrefix" + xxxAsRegexp string = "asRegexp" +) + +const ( + AnonimousUsername string = "anonymous" + AnonymousID string = "0000000-0000-0000-0000-000000000001" + ServerUsername string = "server" + ServerID string = "0000000-0000-0000-0000-000000000002" + InitUsername string = "mproxy" + InitID string = "0000000-0000-0000-0000-000000000005" +) + +const ( + // Accounts, grants + RightReadAccounts string = "readAccounts" // GetAccount, ListAccounts + RightWriteAccounts string = "writeAccounts" // CreateAccount, UpdateAccount, DeleteAccount +)