diff --git a/Cargo.toml b/Cargo.toml index c2272d9e..9208737d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "proxmox", "proxmox-api-macro", + "proxmox-borrow", "proxmox-http", "proxmox-sortable-macro", "proxmox-tfa", diff --git a/Makefile b/Makefile index 0339c779..caf25dc8 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CRATES = \ proxmox \ proxmox-api-macro \ + proxmox-borrow \ proxmox-http \ proxmox-sortable-macro \ proxmox-tfa \ diff --git a/proxmox-borrow/Cargo.toml b/proxmox-borrow/Cargo.toml new file mode 100644 index 00000000..fe412c81 --- /dev/null +++ b/proxmox-borrow/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "proxmox-borrow" +version = "1.0.0" +authors = ["Proxmox Support Team "] +edition = "2018" +license = "AGPL-3" +description = "contains the Tied type to tie a value with a lifetime to the value it borrows from" + +exclude = [ "debian" ] + +[dependencies] diff --git a/proxmox-borrow/debian/changelog b/proxmox-borrow/debian/changelog new file mode 100644 index 00000000..91121f80 --- /dev/null +++ b/proxmox-borrow/debian/changelog @@ -0,0 +1,5 @@ +rust-proxmox-borrow (1.0.0-1) stable; urgency=medium + + * initial split out of `librust-proxmox-dev` + + -- Proxmox Support Team Mon, 04 Oct 2021 11:38:53 +0200 diff --git a/proxmox-borrow/debian/control b/proxmox-borrow/debian/control new file mode 100644 index 00000000..c9a46c36 --- /dev/null +++ b/proxmox-borrow/debian/control @@ -0,0 +1,32 @@ +Source: rust-proxmox-borrow +Section: rust +Priority: optional +Build-Depends: debhelper (>= 12), + dh-cargo (>= 24), + cargo:native , + rustc:native , + libstd-rust-dev +Maintainer: Proxmox Support Team +Standards-Version: 4.5.1 +Vcs-Git: git://git.proxmox.com/git/proxmox.git +Vcs-Browser: https://git.proxmox.com/?p=proxmox.git +Rules-Requires-Root: no + +# FIXME (packages."(name)".section) debcargo auto-generated summaries are very long, consider overriding + +Package: librust-proxmox-borrow-dev +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends} +Provides: + librust-proxmox-borrow+default-dev (= ${binary:Version}), + librust-proxmox-borrow-1-dev (= ${binary:Version}), + librust-proxmox-borrow-1+default-dev (= ${binary:Version}), + librust-proxmox-borrow-1.0-dev (= ${binary:Version}), + librust-proxmox-borrow-1.0+default-dev (= ${binary:Version}), + librust-proxmox-borrow-1.0.0-dev (= ${binary:Version}), + librust-proxmox-borrow-1.0.0+default-dev (= ${binary:Version}) +Description: Contains the Tied type to tie a value with a lifetime to the value it borrows from - Rust source code + This package contains the source for the Rust proxmox-borrow crate, packaged by + debcargo for use with cargo and dh-cargo. diff --git a/proxmox-borrow/debian/copyright b/proxmox-borrow/debian/copyright new file mode 100644 index 00000000..5661ef60 --- /dev/null +++ b/proxmox-borrow/debian/copyright @@ -0,0 +1,16 @@ +Copyright (C) 2021 Proxmox Server Solutions GmbH + +This software is written by Proxmox Server Solutions GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero 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 Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . diff --git a/proxmox-borrow/debian/debcargo.toml b/proxmox-borrow/debian/debcargo.toml new file mode 100644 index 00000000..b7864cdb --- /dev/null +++ b/proxmox-borrow/debian/debcargo.toml @@ -0,0 +1,7 @@ +overlay = "." +crate_src_path = ".." +maintainer = "Proxmox Support Team " + +[source] +vcs_git = "git://git.proxmox.com/git/proxmox.git" +vcs_browser = "https://git.proxmox.com/?p=proxmox.git" diff --git a/proxmox/src/tools/borrow.rs b/proxmox-borrow/src/lib.rs similarity index 98% rename from proxmox/src/tools/borrow.rs rename to proxmox-borrow/src/lib.rs index 3ea4d6c2..2db78741 100644 --- a/proxmox/src/tools/borrow.rs +++ b/proxmox-borrow/src/lib.rs @@ -32,7 +32,7 @@ use std::mem::ManuallyDrop; /// //} /// /// // Instead we use: -/// use proxmox::tools::borrow::Tied; +/// use proxmox_borrow::Tied; /// struct Usage { /// tied: Tied>, /// } diff --git a/proxmox/src/tools/mod.rs b/proxmox/src/tools/mod.rs index 56672ce9..c7aa2c09 100644 --- a/proxmox/src/tools/mod.rs +++ b/proxmox/src/tools/mod.rs @@ -6,7 +6,6 @@ use anyhow::*; use lazy_static::lazy_static; pub mod as_any; -pub mod borrow; pub mod byte_buffer; pub mod common_regex; pub mod constnamedbitmap;