Dietmar Maurer
590305368d
rust-proxmox: bump version to 0.1.9-1
2020-01-27 18:07:46 +01:00
Dietmar Maurer
f50a627f34
api/cli/command.rs: implement both sync and async versions.
2020-01-27 18:01:16 +01:00
Dietmar Maurer
e8560b67f2
src/api/cli/command.rs - handle_nested_command: fix help output
2020-01-27 11:09:14 +01:00
Thomas Lamprecht
a14c7b170f
fix denglisch: s/rest/remaining/
...
"rest" as word means "to relax" in english, not the "remaining
stuff", so swap rest out with remaining/remainder, respectively.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-23 13:56:34 +01:00
Wolfgang Bumiller
0f01c52013
bump proxmox to 0.1.8 to depend on api macro 0.1.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-23 13:17:56 +01:00
Wolfgang Bumiller
a5373a9679
bump api-macro
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-23 13:16:50 +01:00
Wolfgang Bumiller
edebbf920a
fix property sorting
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-23 13:15:59 +01:00
Wolfgang Bumiller
d07286c7a3
sys: doc update
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-22 08:56:51 +01:00
Wolfgang Bumiller
fe5ab619fb
sys: hide io_assert macro for now
...
too risky since errno-changing calls before it can ruin the
result
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-22 08:54:54 +01:00
Wolfgang Bumiller
3312a7ad1b
build fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 12:30:13 +01:00
Wolfgang Bumiller
b6c670b2db
remove valgrind feature for now and bump to 0.1.7
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 12:24:23 +01:00
Wolfgang Bumiller
74911020cf
Merge remote-tracking branch 'proxdev/master'
2020-01-21 12:20:36 +01:00
Wolfgang Bumiller
436bf05e0b
merge api, sys and tools into proxmox directly
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 12:15:42 +01:00
Wolfgang Bumiller
93cf522dd8
Add make dinstall target
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 11:29:39 +01:00
Wolfgang Bumiller
ccc6924e6a
formatting fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-21 11:28:12 +01:00
Dietmar Maurer
89a1cac269
bump proxmox-api version
2020-01-21 11:18:58 +01:00
Dietmar Maurer
26d5d3e680
src/cli/command.rs: avoid creating a tokio runtime by making run_cli_command async
2020-01-21 10:46:41 +01:00
Wolfgang Bumiller
2ef0e795a7
sys: double-parse fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-17 13:32:21 +01:00
Wolfgang Bumiller
df5eb296cc
sys: mountinfo parsing fixups
...
* include the failing line on errors
* don't fail on the final empty line...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-17 13:30:28 +01:00
Wolfgang Bumiller
3d9fdb5634
bump sys crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-16 11:36:41 +01:00
Wolfgang Bumiller
eeb8e7f839
sys: read_for_pid -> read_from_pid, drop deprecated functions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-16 11:33:42 +01:00
Wolfgang Bumiller
b4a0e64821
explicitly run 'cargo +nightly fmt'
...
drop rust-toolchain file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-16 10:43:00 +01:00
Wolfgang Bumiller
8690d1918d
add Cargo.lock to .gitignore
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 17:10:13 +01:00
Wolfgang Bumiller
95ab7b6865
build.sh: point to system compiler via rust-toolchain
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 16:25:14 +01:00
Wolfgang Bumiller
0ecf1abf3c
proxmox: fix proxmox-sys dependency version
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 15:56:06 +01:00
Dietmar Maurer
dc40196c32
bump package versions
2020-01-15 15:39:47 +01:00
Wolfgang Bumiller
4dc4bb91ad
bump proxmox-sys to 0.1.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 15:34:26 +01:00
Wolfgang Bumiller
b9e7824bd3
README: Remove 'Versioning', add 'Steps for Releases'
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 14:26:06 +01:00
Wolfgang Bumiller
f22b693800
macro: silence some warnings in tests
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 14:10:58 +01:00
Dietmar Maurer
17980fe62d
proxmox-api/src/cli/format.rs: improve generate_usage_str()
...
List all arguments, and reduce empty lines.
2020-01-15 14:09:34 +01:00
Wolfgang Bumiller
66d117f422
improve build.sh
...
set $CARGO and $RUSTC env vars to also work for users with
rustup paths in their $PATH.
Replace $(pwd) with $PWD
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 13:11:06 +01:00
Fabian Grünbichler
a94de245f0
build: switch to debcargo
...
to autogenerate crate (build)-dependencies, and correct Provides
statements.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-15 12:02:47 +01:00
Wolfgang Bumiller
a01491036c
sys: add pid module with PidFd type
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-15 10:57:11 +01:00
Wolfgang Bumiller
20fe5e1781
sys: derive Clone and Debug for mount_info::Entry and MountInfo
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 15:18:09 +01:00
Wolfgang Bumiller
bd4a6c5b8b
sys: use a BTreeMap for MountInfo internally
...
Since the only reasonable access is by mount "id" and they
don't need to be consecutive (but they are numeric), use a
BTreeMap for MountInfo.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 15:15:52 +01:00
Wolfgang Bumiller
4e27ec9eb1
sys: export MountInfo in procfs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 14:56:03 +01:00
Wolfgang Bumiller
775c96f934
sys: more helpers for MountInfo
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 14:54:51 +01:00
Wolfgang Bumiller
40da8098df
sys: add /proc/self/mountinfo parsing
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 14:41:21 +01:00
Wolfgang Bumiller
e128fc879f
sys: Add TryFrom<Pid> for PidStat
...
Since nix's Pid type is a strong type, we can add a TryFrom
implementation here as well.
This can later also have the equivalent TryFrom<PidFd>
variant.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 12:05:04 +01:00
Wolfgang Bumiller
42a155668e
sys: change PidStat API
...
Rather than standalone functions, `PidStat` now provides a
`read_for_pid` and `parse` method. Both are public.
One side effect is that the documentation of PidStat's
contents are on the same page as the ways to retrieve it.
Additionally, we deprecate `read_proc_starttime` as it was
reading the entire contents to then filter out one value, in
order to promote caching.
The standalone `read_proc_pid_stat` method is now also
deprecated.
Once we add pid-fds the API will feel cleaner this way.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 12:01:06 +01:00
Wolfgang Bumiller
e3b41dc815
sys: extend proc_pid_stat parsing
...
Rename `ProcFsPidStat` to `PidStat`. It's already in a
procfs submodule anyway. (We have currently no public users
of this type by name.)
Further add pid, ppid and num_threads to PidStat.
Public API change.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 11:49:33 +01:00
Wolfgang Bumiller
39c5d8641b
take a reference to the dirfd in Fd::openat
...
Otherwise we cannot pass references to it unless the AsRawFd
implementation was made for the reference itself rather than
the type.
Note that while this changes the public API, we have no
users outside of this crate yet and no public releases,
so I'm not doing a major version bump.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-14 11:24:32 +01:00
Wolfgang Bumiller
2a43a45763
fixup provides list
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 14:26:12 +01:00
Wolfgang Bumiller
02c7ca5163
finish version bump
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 14:21:39 +01:00
Wolfgang Bumiller
eae447156b
bump proxmox to 0.1.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 14:14:11 +01:00
Wolfgang Bumiller
66d9d43cd4
bump api-macro to 0.1.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 11:29:15 +01:00
Wolfgang Bumiller
1992abf96e
api-macro: even more documentation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 11:28:00 +01:00
Wolfgang Bumiller
0f630a4cb8
api-macro: more documentation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 11:23:48 +01:00
Wolfgang Bumiller
5b652dbad8
api-macro: schema tests for async fns
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 11:01:55 +01:00
Wolfgang Bumiller
943bc4de52
api-macro: more tests
...
Note that this one tests the fact that we do not do output
schema validation!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-08 10:58:27 +01:00