Closed avahahn closed 5 months ago
I have pared this code down as much as we could, any ideas on continuing to reduce this codebase are welcome.
Can you amend the commit messages to include specifically what wasn't brought over? I can see that the .github/workflows folder was omitted (but we'll probably want to use parts of it at a later date).
Thanks!
I have pared this code down as much as we could, any ideas on continuing to reduce this codebase are welcome.
If you would like a smaller code base, you could exclude the SDK portion. The SDK is just generated code from OpenAPI. The CLI itself only uses a very small part of the SDK (in fact I had to refactor it to use the SDK). Perhaps these could be separated as projects.
In Unit we stick to an 80 character line limit for pretty much everything, would be good if the cli followed suit, at the very least the README and makefiles.
I have pared this code down as much as we could, any ideas on continuing to reduce this codebase are welcome.
If you would like a smaller code base, you could exclude the SDK portion. The SDK is just generated code from OpenAPI. The CLI itself only uses a very small part of the SDK (in fact I had to refactor it to use the SDK). Perhaps these could be separated as projects.
Yeah. not including stuff that is auto generated sounds like the right thing to do...
Although I'm unsure if this is a little premature, it also sort of assumes things, like using rust (which I don't remember actually being discussed...)
having the generated API libraries present and up is a huge value add for anyone looking to extend this software. There should absolutely be a client library for our configuration API up and this is a good offering. That said, I can absolutely modify the codegen process to apply a better formatted documentation comment.
@dekobon @ac000
having the generated API libraries present and up is a huge value add for anyone looking to extend this software. There should absolutely be a client library for our configuration API up and this is a good offering.
What if the SDK was a separate repository that got built and a crate was pushed to cargo.io using CI?
What if the SDK was a separate repository that got built and a crate was pushed to cargo.io using CI?
I do very much like the idea of having it build and published to cargo.io. Setting up a mono-repo is a goal of ours. Leaving out the API library seems silly to me personally when we have both the API itself and our consumer of it in the same repository.
What if the SDK was a separate repository that got built and a crate was pushed to cargo.io using CI?
I do very much like the idea of having it build and published to cargo.io. Setting up a mono-repo is a goal of ours. Leaving out the API library seems silly to me personally when we have both the API itself and our consumer of it in the same repository.
No strong opinions here. Monorepo is fine.
In Unit we stick to an 80 character line limit for pretty much everything, would be good if the cli followed suit, at the very least the README and makefiles.
It looks like the rustfmt default is 100 characters
Although, I am a 80 character limit fan generally, with Rust it does start to make it harder to read.
When/if you merge, do you mind adding me as at least as a Co-author in the Git check in?
When/if you merge, do you mind adding me as at least as a Co-author in the Git check in?
I would be happy to add you as a co-author! I will update that initial commit to include your name.
In Unit we stick to an 80 character line limit for pretty much everything, would be good if the cli followed suit, at the very least the README and makefiles.
When/if you merge, do you mind adding me as at least as a Co-author in the Git check in?
Can you amend the commit messages to include specifically what wasn't brought over?
These tasks should all be complete.
In Unit we stick to an 80 character line limit for pretty much everything, would be good if the cli followed suit, at the very least the README and makefiles.
It looks like the rustfmt default is 100 characters
Although, I am a 80 character limit fan generally, with Rust it does start to make it harder to read.
Heh, I give you (from the Unit repository root)
$ cat .rustfmt.toml
max_width = 80
What if the SDK was a separate repository that got built and a crate was pushed to cargo.io using CI?
I do very much like the idea of having it build and published to cargo.io. Setting up a mono-repo is a goal of ours.
Personally, I'm weary of having a monorepo.
I don't mind providing auto-generated stuff, but does it need to be in the repository?
With the monrepo, I do worry that the repository will become a jumbled mess and dumping ground, it may grow tentacles...
I would also be concerned that it may become harder to prevent the commit history from going down the toilet.
Lastly, Unit is not a fast moving project, it can a while for even simple things to make it through review and be merged. I fear that it may be too slow for what you want to do. That's also partly why I put unit-wasm in its own repository, so it could move at a faster pace...
assumes things, like using rust
Memory safety is our future, and given our performance profile, that means Rust.
For the CLI, our primary constraint is easy cross-compilation of statically linked binaries. That means we're pretty much limited to Rust or Go... and @dekobon had already built out a pretty decent CLI as a hobby project, so we might as well start where we're ahead.
Unit is not a fast moving project
We need to be, and it's in our power to be. :)
Memory safety is our future, and given our performance profile, that means Rust.
Hi Ava, some questions.
This still includes all the auto-generated stuff right? Could we do an initial commit without it and maybe we can find a more suitable place to serve them from...
Is this supposed to be in a usable state? I.e should I be able to build unitctl
?
I went into the cli/
directory and tried a couple of things
$ make
/bin/bash: line 1: toolchain: command not found
all Build all available platform targets [see: list-targets]
cargo-release Releases a new version to crates.io
changelog Outputs the changes since the last version committed
checksums Generates checksums for all packages
clean Cleanup everything
commitsar Run git commit linter
container-shell Run tests inside container
list-targets List all available platform targets
manpage Builds man page
openapi-clean Clean up generated OpenAPI files
release-notes Build release notes
test Run tests
version Outputs the current version
version-release Change from a pre-release to full release version
version-update Prompts for a new version
$ make list-targets
/bin/bash: line 1: toolchain: command not found
Looks like I'm missing the toolchain
command. A search with dnf shows some results but nothing obvious,
What would be the target to just build the cli so that I can just run it directly on my local system?
What is the commitsar
thing about?
Unitctl is very much usable right now. I have added a section to the readme that illustrates how to build unitctl from source.
In the meantime I can remove the commit formatting tooling (commitsar) as well as the changelog target.
I am currently looking into what a hypothetical path forward would be to remove the autogenerated API library from this commit and put it in a new repository.
Unitctl is very much usable right now. I have added a section to the readme that illustrates how to build unitctl from source.
Thanks, I'll take a look.
In the meantime I can remove the commit formatting tooling (commitsar) as well as the changelog target.
Sounds good.
I am currently looking into what a hypothetical path forward would be to remove the autogenerated API library from this commit and put it in a new repository.
There's a lot of stuff here. I think if we can start out with the bare minimum, it'll ease review...
I still have the missing toolchain
issue, any idea's what it is? or where I get it from?
Hmm, it's not something to do with cargo is it?
I still have the missing
toolchain
issue, any idea's what it is? or where I get it from?Hmm, it's not something to do with cargo is it?
My latest edit to the makefile should shed some clarity on that. The makefile was written in a way that assumed Rustup would be present. Toolchain is a subcommand of Rustup.
As of last commit now you will get an error when Rustup is not present... before the makefile assumes it can use it.
As of last commit now you will get an error when Rustup is not present... before the makefile assumes it can use it.
No, I don't use rustup, I have have rust and cargo installed via packages. I think we should allow that to work... it does for the existing wasm/rust stuff...
I agree, but let's defer that to a follow-up that you or I handle, since we're the weirdos that manage our Rust toolchains separately.
I agree, but let's defer that to a follow-up that you or I handle, since we're the weirdos that manage our Rust toolchains separately.
Heh, I wouldn't say using the distribution provided packages is weird...
It will make it harder to review it... hopefully I can at least temporarily hack around it...
Keeping the existing Rustup code makes it trivial to cross compile for all the different architectures we aim to support. While cargo does have third party plugins offering similar functionality, wouldnt it be better to use an official Rust project for this?
Keeping the existing Rustup code makes it trivial to cross compile for all the different architectures we aim to support. While cargo does have third party plugins offering similar functionality, wouldnt it be better to use an official Rust project for this?
But if all I want to do is build the thing for this machine...
After staring at the files changed tab for a while... this is a wholesale import of a complete project, akin to vendoring a dependency, and I'm not sure it's feasible to review it like a normal, incremental code contribution. We should investigate generating the openapi client on demand, but beyond that... I think we're just going to have to bite the bullet, merge, and deal with any cleanup as we run across it.
With the above Makefile fixes and a quick hack I have, oh and I had to install the perl-IPC-Cmd
package (seems to make heavy use of perl during the build process...)
$ make list-targets
x86_64-unknown-linux-gnu
$ make x86_64-unknown-linux-gnu
▶ building unitctl with flags [--quiet --release --bin unitctl --target x86_64-unknown-linux-gnu]
$
Looks like it did something... (took a while...)
After staring at the files changed tab for a while... this is a wholesale import of a complete project, akin to vendoring a
Which makes me wonder if it makes sense to include a whole 'nother project in another project...
The autogenerated code is now generated only when needed, and is added to .gitignore.
With the above Makefile fixes and a quick hack I have, oh and I had to install the
perl-IPC-Cmd
package (seems to make heavy use of perl during the build process...)$ make list-targets x86_64-unknown-linux-gnu $ make x86_64-unknown-linux-gnu ▶ building unitctl with flags [--quiet --release --bin unitctl --target x86_64-unknown-linux-gnu] $
Looks like it did something... (took a while...)
Oh no, I certainly never intended to make anyone install perl. Does some underlying cargo command rely on it? Or is it part of the openssl build?
I'm really curious about where that came from.
As for the make list-targets
command, it seems to be only using sed:
$ V=1 make list-targets
echo aarch64-unknown-linux-gnu | /usr/bin/sed -e 's/ /\n/g'
aarch64-unknown-linux-gnu
Oh no, I certainly never intended to make anyone install perl. Does some underlying cargo command rely on it? Or is it part of the openssl build?
I do recall seeing openssl mentioned...
I'm really curious about where that came from.
I'll get the full error for you...
As for the
make list-targets
command, it seems to be only using sed:$ V=1 make list-targets echo aarch64-unknown-linux-gnu | /usr/bin/sed -e 's/ /\n/g' aarch64-unknown-linux-gnu
It wants to call rustup in order to get the targets, this is what I hacked to get it building without rustup
diff --git a/cli/GNUmakefile b/cli/GNUmakefile
index efa17013..3b941bc3 100644
--- a/cli/GNUmakefile
+++ b/cli/GNUmakefile
@@ -7,15 +7,10 @@ endif
GREP ?= $(shell command -v ggrep 2> /dev/null || command -v grep 2> /dev/null)
SED ?= $(shell command -v gsed 2> /dev/null || command -v sed 2> /dev/null)
AWK ?= $(shell command -v gawk 2> /dev/null || command -v awk 2> /dev/null)
-RUSTUP ?= $(shell command -v rustup 2> /dev/null)
-ifeq ($(RUSTUP),)
-$(error Please install Rustup)
-endif
RPM_ARCH := $(shell uname -m)
VERSION ?= $(shell $(GREP) -Po '^version\s+=\s+"\K.*?(?=")' $(CURDIR)/unitctl/Cargo.toml)
SRC_REPO := https://github.com/nginxinc/unit-rust-sdk
-DEFAULT_TARGET ?= $(shell $(RUSTUP) toolchain list | $(GREP) '(default)' | cut -d' ' -f1 | cut -d- -f2-)
SHELL := /bin/bash
OUTPUT_BINARY ?= unitctl
PACKAGE_NAME ?= unitctl
@@ -33,13 +28,10 @@ ifeq ($(uname -s),darwin)
$(GREP) '(installed)' | \
$(GREP) 'apple' | \
cut -d' ' -f1))
-else ifeq ($(uname -s),linux)
- TARGETS := $(sort $(shell $(RUSTUP) target list | \
- $(GREP) '(installed)' | \
- $(GREP) 'linux' | \
- cut -d' ' -f1))
+else ifeq ($(shell uname -s),Linux)
+ TARGETS := x86_64-unknown-linux-gnu
else
- TARGETS := $(DEFAULT_TARGET)
+ TARGETS :=
endif
RELEASE_BUILD_FLAGS ?= --quiet --release --bin $(OUTPUT_BINARY)
@dekobon here you go...
$ make x86_64-unknown-linux-gnu
▶ building unitctl with flags [--quiet --release --bin unitctl --target x86_64-unknown-linux-gnu]
error: failed to run custom build command for `openssl-sys v0.9.98`
Caused by:
process didn't exit successfully: `/home/andrew/src/unit/cli/target/release/build/openssl-sys-2bcc23f67dde8702/build-script-main` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
AR_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
AR_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
ARFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
ARFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
cargo:rerun-if-env-changed=RANLIB_x86_64-unknown-linux-gnu
RANLIB_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=RANLIB_x86_64_unknown_linux_gnu
RANLIB_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_RANLIB
HOST_RANLIB = None
cargo:rerun-if-env-changed=RANLIB
RANLIB = None
cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64-unknown-linux-gnu
RANLIBFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64_unknown_linux_gnu
RANLIBFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_RANLIBFLAGS
HOST_RANLIBFLAGS = None
cargo:rerun-if-env-changed=RANLIBFLAGS
RANLIBFLAGS = None
running cd "/home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="cc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"
--- stderr
Can't locate IPC/Cmd.pm in @INC (you may need to install the IPC::Cmd module) (@INC entries checked: /home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/build/src/util/perl /usr/local/lib64/perl5/5.38 /usr/local/share/perl5/5.38 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 /home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/build/src/external/perl/Text-Template-1.56/lib) at /home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/build/src/util/perl/OpenSSL/config.pm line 19.
BEGIN failed--compilation aborted at /home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/build/src/util/perl/OpenSSL/config.pm line 19.
Compilation failed in require at ./Configure line 23.
BEGIN failed--compilation aborted at ./Configure line 23.
thread 'main' panicked at /home/andrew/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.2.1+3.2.0/src/lib.rs:611:9:
Error configuring OpenSSL build:
Command: cd "/home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="cc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/home/andrew/src/unit/cli/target/x86_64-unknown-linux-gnu/release/build/openssl-sys-81a352bc9185622c/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"
Exit status: exit status: 2
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
make: *** [GNUmakefile:62: x86_64-unknown-linux-gnu] Error 101
It wants to call rustup in order to get the targets, this is what I hacked to get it building without rustup
I am opposed to this change. We have already identified that we want to be building and releasing this for multiple architectures, and the code to do that works perfectly. Why would we instead merge a hobbled version of it that only builds for x86_64 Linux?
You are creating more work in both the short and long term just so that you don't have to use a standard Rust toolchain. Installing Rustup is as simple as reviewing their script and running it. It stays out of your way until you want to manage additional toolchains.
By the way, I dont have any additional perl packages (beyond what ships by default) installed on my Arch box, my Debian box, or my OSX machine, and the build works on all three of them. Perhaps you could share some information on what environment you are testing this in.
By the way, I dont have any additional perl packages (beyond what ships by default) installed on my Arch box, my Debian box, or my OSX machine, and the build works on all three of them. Perhaps you could share some information on what environment you are testing this in.
I suspect there is something about the environment where it is not using the the vendored version of openssl
and it is trying to build it.
Anyways, I agree with @avahahn here. I tried for about 3 months to use a non-rustup distro of rust and ran into nothing but problems. Rustup also has nice features that allow us to easily cross-compile.
It wants to call rustup in order to get the targets, this is what I hacked to get it building without rustup
I am opposed to this change. We have already identified that we want to be building and releasing this for multiple architectures, and the code to do that works perfectly. Why would we instead merge a hobbled version of it that only builds for x86_64 Linux?
Huh? It was a HACK.
I was simply showing @dekobon what I had to do get it building as he seemed surprised that it didn't just work...
I'll be very clear
I was in no way suggesting such a thing be actually merged, give me some credit.
Hopefully that's cleared up.
@dekobon
My environment is nothing fancy.
Fedora 39 (x86-64) with the following relevant packages...
rust-std-static-1.77.2-1.fc39.x86_64
rust-1.77.2-1.fc39.x86_64
rustfmt-1.77.2-1.fc39.x86_64
rust-std-static-wasm32-wasi-1.77.2-1.fc39.noarch
cargo-1.77.2-1.fc39.x86_64
openssl-pkcs11-0.4.12-4.fc39.x86_64
openssl-libs-3.1.1-4.fc39.x86_64
openssl-3.1.1-4.fc39.x86_64
openssl-devel-3.1.1-4.fc39.x86_64
openssl1.1-1.1.1q-5.fc39.x86_64
perl-srpm-macros-1-51.fc39.noarch
perl-Digest-SHA-6.04-501.fc39.x86_64
perl-Digest-1.20-500.fc39.noarch
perl-Digest-HMAC-1.04-8.fc39.noarch
perl-GSSAPI-0.28-43.fc39.x86_64
perl-Digest-MD5-2.58-500.fc39.x86_64
perl-Authen-SASL-2.1700-1.fc39.noarch
perl-Data-Dumper-2.188-501.fc39.x86_64
perl-libnet-3.15-501.fc39.noarch
perl-URI-5.21-1.fc39.noarch
perl-Text-Tabs+Wrap-2023.0511-3.fc39.noarch
perl-Time-Local-1.350-3.fc39.noarch
perl-Mozilla-CA-20230801-1.fc39.noarch
perl-IO-Socket-IP-0.42-1.fc39.noarch
perl-File-Path-2.18-500.fc39.noarch
perl-Net-SSLeay-1.92-10.fc39.x86_64
perl-Pod-Escapes-1.07-500.fc39.noarch
perl-IO-Socket-SSL-2.083-3.fc39.noarch
perl-Term-ANSIColor-5.01-501.fc39.noarch
perl-File-Temp-0.231.100-500.fc39.noarch
perl-Term-Cap-1.18-500.fc39.noarch
perl-Pod-Simple-3.45-4.fc39.noarch
perl-HTTP-Tiny-0.088-3.fc39.noarch
perl-Socket-2.037-3.fc39.x86_64
perl-podlators-5.01-500.fc39.noarch
perl-Pod-Perldoc-3.28.01-501.fc39.noarch
perl-Text-ParseWords-3.31-500.fc39.noarch
perl-Pod-Usage-2.03-500.fc39.noarch
perl-MIME-Base64-3.16-500.fc39.x86_64
perl-Scalar-List-Utils-1.63-500.fc39.x86_64
perl-constant-1.33-501.fc39.noarch
perl-parent-0.241-500.fc39.noarch
perl-Storable-3.32-500.fc39.x86_64
perl-Getopt-Long-2.54-500.fc39.noarch
perl-Carp-1.54-500.fc39.noarch
perl-Exporter-5.77-500.fc39.noarch
perl-PathTools-3.89-500.fc39.x86_64
perl-Encode-3.19-500.fc39.x86_64
perl-Try-Tiny-0.31-6.fc39.noarch
perl-Compress-Raw-Zlib-2.206-1.fc39.x86_64
perl-Module-Runtime-0.016-20.fc39.noarch
perl-version-0.99.30-1.fc39.x86_64
perl-Dist-CheckConflicts-0.11-28.fc39.noarch
perl-HTML-Tagset-3.20-54.fc39.noarch
perl-Params-Util-1.102-12.fc39.x86_64
perl-Time-HiRes-1.9775-500.fc39.x86_64
perl-CPAN-Meta-Requirements-2.143-4.fc39.noarch
perl-Module-Implementation-0.09-37.fc39.noarch
perl-CPAN-Meta-YAML-0.018-501.fc39.noarch
perl-Carp-Clan-6.08-15.fc39.noarch
perl-Clone-0.46-4.fc39.x86_64
perl-Date-ISO8601-0.005-18.fc39.noarch
perl-Devel-StackTrace-2.04-16.fc39.noarch
perl-Error-0.17029-13.fc39.noarch
perl-LWP-MediaTypes-6.04-15.fc39.noarch
perl-Module-Load-0.36-500.fc39.noarch
perl-Net-SMTP-SSL-1.04-21.fc39.noarch
perl-Sub-Install-0.929-3.fc39.noarch
perl-TimeDate-2.33-11.fc39.noarch
perl-MailTools-2.21-14.fc39.noarch
perl-XML-NamespaceSupport-1.12-20.fc39.noarch
perl-XML-SAX-Base-1.09-20.fc39.noarch
perl-YAML-1.30-16.fc39.noarch
perl-threads-2.36-500.fc39.x86_64
perl-Math-BigInt-1.9998.39-2.fc39.noarch
perl-Math-BigRat-0.2624-500.fc39.noarch
perl-JSON-4.10-3.fc39.noarch
perl-JSON-PP-4.16-501.fc39.noarch
perl-HTTP-Date-6.06-2.fc39.noarch
perl-File-Listing-6.16-1.fc39.noarch
perl-HTTP-CookieJar-0.014-3.fc39.noarch
perl-CPAN-Meta-2.150010-500.fc39.noarch
perl-threads-shared-1.68-500.fc39.x86_64
perl-Thread-Queue-3.14-500.fc39.noarch
perl-Types-Serialiser-1.01-9.fc39.noarch
perl-JSON-XS-4.03-11.fc39.x86_64
perl-Email-Valid-1.203-2.fc39.noarch
perl-Data-OptList-0.114-2.fc39.noarch
perl-Bit-Vector-7.4-31.fc39.x86_64
perl-Date-Calc-6.4-25.fc39.noarch
perl-Archive-Zip-1.68-12.fc39.noarch
perl-JSON-Parse-0.62-5.fc39.x86_64
perl-ExtUtils-Command-7.70-501.fc39.noarch
perl-ExtUtils-Manifest-1.75-3.fc39.noarch
perl-ExtUtils-ParseXS-3.51-500.fc39.noarch
perl-Class-Data-Inheritable-0.09-6.fc39.noarch
perl-Exception-Class-1.45-8.fc39.noarch
perl-Class-Inspector-1.36-14.fc39.noarch
perl-Class-Method-Modifiers-2.15-2.fc39.noarch
perl-Role-Tiny-2.002004-9.fc39.noarch
perl-Class-Singleton-1.6-9.fc39.noarch
perl-Class-XSAccessor-1.19-31.fc39.x86_64
perl-Compress-Raw-Bzip2-2.206-1.fc39.x86_64
perl-IO-Compress-2.206-1.fc39.noarch
perl-Net-HTTP-6.23-2.fc39.noarch
perl-Crypt-RC4-2.02-35.fc39.noarch
perl-Digest-MD4-1.9-36.fc39.x86_64
perl-Digest-Perl-MD5-1.9-29.fc39.noarch
perl-DynaLoader-Functions-0.004-2.fc39.noarch
perl-Devel-CallChecker-0.009-3.fc39.x86_64
perl-Params-Classify-0.015-20.fc39.x86_64
perl-DateTime-TimeZone-SystemV-0.010-19.fc39.noarch
perl-DateTime-TimeZone-Tzfile-0.011-19.fc39.noarch
perl-HTML-Selector-XPath-0.28-1.fc39.noarch
perl-IO-HTML-1.004-11.fc39.noarch
perl-IO-String-1.08-48.fc39.noarch
perl-IO-stringy-2.113-12.fc39.noarch
perl-OLE-Storage_Lite-0.22-2.fc39.noarch
perl-Jcode-2.07-41.fc39.noarch
perl-Lexical-SealRequireHints-0.012-3.fc39.x86_64
perl-Lexical-Var-0.010-3.fc39.x86_64
perl-Exporter-Tiny-1.006002-2.fc39.noarch
perl-List-MoreUtils-XS-0.430-11.fc39.x86_64
perl-List-MoreUtils-0.430-9.fc39.noarch
perl-File-ShareDir-1.118-9.fc39.noarch
perl-MRO-Compat-0.15-7.fc39.noarch
perl-NTLM-1.09-36.fc39.noarch
perl-Package-Generator-1.106-29.fc39.noarch
perl-Sub-Exporter-0.990-1.fc39.noarch
perl-Sub-Exporter-Progressive-0.001013-22.fc39.noarch
perl-Package-Stash-XS-0.30-5.fc39.x86_64
perl-Package-Stash-0.40-5.fc39.noarch
perl-PadWalker-2.5-10.fc39.x86_64
perl-Devel-Caller-2.07-3.fc39.x86_64
perl-Devel-LexAlias-0.05-34.fc39.x86_64
perl-PerlIO-utf8_strict-0.010-4.fc39.x86_64
perl-File-Slurper-0.014-3.fc39.noarch
perl-IO-Compress-Brotli-0.004001-10.fc39.x86_64
perl-Readonly-2.05-22.fc39.noarch
perl-Ref-Util-XS-0.117-20.fc39.x86_64
perl-Ref-Util-0.204-18.fc39.noarch
perl-String-Util-1.34-2.fc39.noarch
perl-Sub-Identify-0.14-24.fc39.x86_64
perl-TermReadKey-2.38-18.fc39.x86_64
perl-Text-Balanced-2.06-500.fc39.noarch
perl-Parse-RecDescent-1.967015-20.fc39.noarch
perl-Text-Template-1.61-3.fc39.noarch
perl-UNIVERSAL-isa-1.20171012-17.fc39.noarch
perl-Text-CSV_XS-1.52-1.fc39.x86_64
perl-UNIVERSAL-require-0.19-8.fc39.noarch
perl-Variable-Magic-0.63-4.fc39.x86_64
perl-WWW-RobotRules-6.02-37.fc39.noarch
perl-XML-Parser-2.46-15.fc39.x86_64
perl-XML-Dumper-0.81-47.fc39.noarch
perl-XML-XPathEngine-0.14-28.fc39.noarch
perl-XString-0.005-10.fc39.x86_64
perl-Test-Harness-3.48-1.fc39.noarch
perl-B-Hooks-EndOfScope-0.26-7.fc39.noarch
perl-namespace-clean-0.27-24.fc39.noarch
perl-namespace-autoclean-0.29-16.fc39.noarch
perl-Encode-Locale-1.05-27.fc39.noarch
perl-HTTP-Message-6.44-3.fc39.noarch
perl-HTML-Tree-5.07-24.fc39.noarch
perl-HTML-TreeBuilder-XPath-0.14-35.fc39.noarch
perl-HTTP-Cookies-6.10-10.fc39.noarch
perl-HTML-Element-Extended-1.18-29.fc39.noarch
perl-HTML-TableExtract-2.15-15.fc39.noarch
perl-HTML-TokeParser-Simple-3.16-30.fc39.noarch
perltidy-20230912-1.fc39.noarch
perl-Eval-Closure-0.14-21.fc39.noarch
perl-Params-ValidationCompiler-0.31-3.fc39.noarch
perl-Specio-0.48-4.fc39.noarch
perl-DateTime-Locale-1.39-2.fc39.noarch
perl-DateTime-1.59-5.fc39.x86_64
perl-DateTime-Format-Strptime-1.79-8.fc39.noarch
perl-HTTP-Negotiate-6.01-36.fc39.noarch
perl-ExtUtils-Install-2.22-500.fc39.noarch
perl-ExtUtils-MakeMaker-7.70-501.fc39.noarch
perl-Spreadsheet-WriteExcel-2.40-28.fc39.noarch
perl-Data-Dump-1.25-8.fc39.noarch
perl-Unicode-Map-0.112-61.fc39.x86_64
perl-XML-SAX-1.02-13.fc39.noarch
perl-XML-LibXML-2.0209-2.fc39.x86_64
perl-HTML-TreeBuilder-LibXML-0.26-29.fc39.noarch
perl-Web-Scraper-0.38-28.fc39.noarch
perl-Cpanel-JSON-XS-4.37-4.fc39.x86_64
perl-CGI-4.59-1.fc39.noarch
perl-Mail-AuthenticationResults-2.20230112-3.fc39.noarch
perl-Devel-PPPort-3.71-501.fc39.x86_64
perl-Number-Misc-1.2-23.fc39.noarch
perl-Image-ExifTool-12.70-1.fc39.noarch
perl-NDBM_File-1.16-502.fc39.x86_64
perl-vars-1.05-502.fc39.noarch
perl-libs-5.38.2-502.fc39.x86_64
perl-DynaLoader-1.54-502.fc39.x86_64
perl-Fcntl-1.15-502.fc39.x86_64
perl-File-Basename-2.86-502.fc39.noarch
perl-Symbol-1.09-502.fc39.noarch
perl-POSIX-2.13-502.fc39.x86_64
perl-locale-1.10-502.fc39.noarch
perl-interpreter-5.38.2-502.fc39.x86_64
perl-overloading-0.02-502.fc39.noarch
perl-SelectSaver-1.02-502.fc39.noarch
perl-Class-Struct-0.68-502.fc39.noarch
perl-Errno-1.37-502.fc39.x86_64
perl-if-0.61.000-502.fc39.noarch
perl-mro-1.28-502.fc39.x86_64
perl-overload-1.37-502.fc39.noarch
perl-File-stat-1.13-502.fc39.noarch
perl-IO-1.52-502.fc39.x86_64
perl-FileHandle-2.05-502.fc39.noarch
perl-IPC-Open3-1.22-502.fc39.noarch
perl-File-Copy-2.41-502.fc39.noarch
perl-Math-Complex-1.62-502.fc39.noarch
perl-Time-Piece-1.3401-502.fc39.x86_64
perl-B-1.88-502.fc39.x86_64
perl-Pod-Html-1.34-502.fc39.noarch
perl-macros-5.38.2-502.fc39.noarch
perl-Sys-Hostname-1.25-502.fc39.x86_64
perl-AutoSplit-5.74-502.fc39.noarch
perl-File-Find-1.43-502.fc39.noarch
perl-AutoLoader-5.74-502.fc39.noarch
perl-Benchmark-1.24-502.fc39.noarch
perl-English-1.11-502.fc39.noarch
perl-File-Compare-1.100.700-502.fc39.noarch
perl-Getopt-Std-1.13-502.fc39.noarch
perl-Hash-Util-FieldHash-1.26-502.fc39.x86_64
perl-I18N-Langinfo-0.22-502.fc39.x86_64
perl-Term-ReadLine-1.17-502.fc39.noarch
perl-Tie-4.6-502.fc39.noarch
perl-autouse-1.11-502.fc39.noarch
perl-base-2.27-502.fc39.noarch
perl-lib-0.65-502.fc39.x86_64
perl-subs-1.04-502.fc39.noarch
perl-Date-Manip-6.93-1.fc39.noarch
perl-Spreadsheet-ParseExcel-0.6600-1.fc39.x86_64
perl-Finance-Quote-1.5900-1.fc39.noarch
perl-common-sense-3.7.5-15.fc39.x86_64
perl-DateTime-TimeZone-2.62-1.fc39.noarch
perl-Text-Unidecode-1.30-22.fc39.noarch
perl-Filter-1.64-501.fc39.x86_64
perl-encoding-3.00-500.fc39.x86_64
perl-open-1.13-502.fc39.noarch
perl-XML-XPath-1.48-4.fc39.noarch
perl-Git-2.44.0-1.fc39.noarch
perl-LWP-Protocol-https-6.14-1.fc39.noarch
perl-libwww-perl-6.77-1.fc39.noarch
perl-HTML-Parser-3.82-1.fc39.x86_64
perl-Hash-Util-0.30-502.fc39.x86_64
perl-FindBin-1.53-502.fc39.noarch
perl-Spreadsheet-XLSX-0.18-1.fc39.noarch
That doesn't include the perl packages that needed to also be installed
perl-ExtUtils-MM-Utils-2:7.70-501.fc39.noarch
perl-I18N-LangTags-0.45-502.fc39.noarch
perl-IPC-Cmd-2:1.04-501.fc39.noarch
perl-Locale-Maketext-1.33-501.fc39.noarch
perl-Locale-Maketext-Simple-1:0.21-502.fc39.noarch
perl-Module-CoreList-1:5.20240320-1.fc39.noarch
perl-Module-Load-Conditional-0.74-500.fc39.noarch
perl-Module-Metadata-1.000038-3.fc39.noarch
perl-Params-Check-1:0.38-500.fc39.noarch
Seems on rpm based distros's you need to have installed the perl-core package, which I guess I hadn't...
Perhaps we can try swapping out the openssl
dependency and use rust-tls
instead.
Please fix all the issues shown by
$ git diff --check master..cli-monorepo
Mainly trailing whitespace and cli/.gitignore needs running through dos2unix(1)
I have following commit hook in
~/.config/git/hooks/pre-commit
#!/usr/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
That will prevent you from even committing anything with whitespace issues.
What is cli/unitctl/www/
intended for?
it also introduces a couple of other licenses , BSD 3 Clause and MIT. IANAL, but I think they are compatible with each other as well as the Apache 2.0 license...
What is
cli/unitctl/www/
intended for?
It's for the unitctl ui
subcommand. Since we have an OpenAPI spec we get this nifty UI for free.
OK, thanks for the explanation.
There is an OpenAPI UI described and documented at https://unit.nginx.org/controlapi/#openapi-specification
I'm not sure this duplication is warranted but maybe it is a better way to achieve the same goal?
I am happy to pull out the openapi UI. I think our existing openapi UI offering needs to be better documented for sure. Once I get the CLI working with docker deployments (and making them) (a future changeset) I think it might be worth integrating the existing docker container as something deployable from CLI as well.
There are a few benefits of the UI in unitctl over the bash based cli tool:
There are a few benefits of the UI in unitctl over the bash based cli tool:
I think in this case neither CLI has to maintain this logic. It looks like we have a docker container in the link that Liam posted. If we can get that image built and hosted then I can get the CLI to download and deploy that.
Then the OpenAPI UI is owned by its own component, which is ideal in my opinion.
This PR adds the CLI project at rust-unit-sdk into this repository. As pursuant to the previously identified requirements the following remain true:
NOTE: This PR does not contain the final functionality desired from our CLI project, rather just the existing work from @dekobon. More PRs will be made later to meet requirements for our CLI.
Although @tarynmusgrave and I have pared this code down as much as we could, any ideas on continuing to reduce this codebase are welcome.