Unverified Commit a68c8fb2 authored by Janik's avatar Janik Committed by GitHub
Browse files

Merge pull request #240559 from christoph-heiss/pkgs/proxmox-backup-client

parents de64b63c ce105275
Loading
Loading
Loading
Loading
+0 −0

File moved.

+0 −182
Original line number Diff line number Diff line
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <thomas@lamprecht.org>
Date: Wed, 18 May 2022 08:41:14 +0200
Subject: [PATCH] re-route dependencies not available on crates.io to git repos

Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
---
 Cargo.toml | 130 +++++++++--------------------------------------------
 1 file changed, 21 insertions(+), 109 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 0c86cd1b..7d5c282b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,9 +41,6 @@ members = [
 
     "proxmox-backup-banner",
     "proxmox-backup-client",
-    "proxmox-file-restore",
-    "proxmox-restore-daemon",
-    "proxmox-rrd",
 
     "pxar-bin",
 ]
@@ -101,7 +98,6 @@ proxmox-rrd = { path = "proxmox-rrd" }
 
 # regular crates
 anyhow = "1.0"
-apt-pkg-native = "0.3.2"
 base64 = "0.13"
 bitflags = "1.2.1"
 bytes = "1.0"
@@ -114,7 +110,6 @@ flate2 = "1.0"
 foreign-types = "0.3"
 futures = "0.3"
 h2 = { version = "0.3", features = [ "stream" ] }
-handlebars = "3.0"
 hex = "0.4.3"
 http = "0.2"
 hyper = { version = "0.14", features = [ "full" ] }
@@ -152,120 +147,37 @@ walkdir = "2"
 xdg = "2.2"
 zstd = { version = "0.6", features = [ "bindgen" ] }
 
-[dependencies]
-anyhow.workspace = true
-apt-pkg-native.workspace = true
-base64.workspace = true
-bitflags.workspace = true
-bytes.workspace = true
-cidr.workspace = true
-crc32fast.workspace = true
-crossbeam-channel.workspace = true
-endian_trait.workspace = true
-flate2.workspace = true
-futures.workspace = true
-h2.workspace = true
-handlebars.workspace = true
-hex.workspace = true
-http.workspace = true
-hyper.workspace = true
-lazy_static.workspace = true
-libc.workspace = true
-log.workspace = true
-nix.workspace = true
-nom.workspace = true
-num-traits.workspace = true
-once_cell.workspace = true
-openssl.workspace = true
-pam-sys.workspace = true
-pam.workspace = true
-percent-encoding.workspace = true
-regex.workspace = true
-rustyline.workspace = true
-serde.workspace = true
-serde_json.workspace = true
-siphasher.workspace = true
-syslog.workspace = true
-termcolor.workspace = true
-thiserror.workspace = true
-tokio = { workspace = true, features = [ "fs", "io-util", "io-std", "macros", "net", "parking_lot", "process", "rt", "rt-multi-thread", "signal", "time" ] }
-tokio-openssl.workspace = true
-tokio-stream.workspace = true
-tokio-util = { workspace = true, features = [ "codec" ] }
-tower-service.workspace = true
-udev.workspace = true
-url.workspace = true
-walkdir.workspace = true
-xdg.workspace = true
-zstd.workspace = true
-
 #valgrind_request = { git = "https://github.com/edef1c/libvalgrind_request", version = "1.1.0", optional = true }
 
-proxmox-async.workspace = true
-proxmox-auth-api = { workspace = true, features = [ "api", "pam-authenticator" ] }
-proxmox-compression.workspace = true
-proxmox-http = { workspace = true, features = [ "client-trait", "proxmox-async", "rate-limited-stream" ] } # pbs-client doesn't use these
-proxmox-io.workspace = true
-proxmox-lang.workspace = true
-proxmox-ldap.workspace = true
-proxmox-metrics.workspace = true
-proxmox-rest-server = { workspace = true, features = [ "rate-limited-stream" ] }
-proxmox-router = { workspace = true, features = [ "cli", "server"] }
-proxmox-schema = { workspace = true, features = [ "api-macro" ] }
-proxmox-section-config.workspace = true
-proxmox-serde = { workspace = true, features = [ "serde_json" ] }
-proxmox-shared-memory.workspace = true
-proxmox-sortable-macro.workspace = true
-proxmox-subscription.workspace = true
-proxmox-sys = { workspace = true, features = [ "timer" ] }
-proxmox-tfa.workspace = true
-proxmox-time.workspace = true
-proxmox-uuid.workspace = true
-
-pathpatterns.workspace = true
-proxmox-acme-rs.workspace = true
-proxmox-apt.workspace = true
-proxmox-openid.workspace = true
-pxar.workspace = true
-
-pbs-api-types.workspace = true
-pbs-buildcfg.workspace = true
-pbs-client.workspace = true
-pbs-config.workspace = true
-pbs-datastore.workspace = true
-pbs-key-config.workspace = true
-pbs-tape.workspace = true
-pbs-tools.workspace = true
-proxmox-rrd.workspace = true
-
 # Local path overrides
 # NOTE: You must run `cargo update` after changing this for it to take effect!
 [patch.crates-io]
 #proxmox-acme-rs = { path = "../proxmox-acme-rs" }
-#proxmox-async = { path = "../proxmox/proxmox-async" }
-#proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
-#proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
-#proxmox-compression = { path = "../proxmox/proxmox-compression" }
-#proxmox-fuse = { path = "../proxmox-fuse" }
-#proxmox-http = { path = "../proxmox/proxmox-http" }
-#proxmox-io = { path = "../proxmox/proxmox-io" }
-#proxmox-lang = { path = "../proxmox/proxmox-lang" }
-#proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
-#proxmox-router = { path = "../proxmox/proxmox-router" }
-#proxmox-schema = { path = "../proxmox/proxmox-schema" }
-#proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
-#proxmox-serde = { path = "../proxmox/proxmox-serde" }
-#proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
-#proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
-#proxmox-sys = { path = "../proxmox/proxmox-sys" }
-#proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
-#proxmox-time = { path = "../proxmox/proxmox-time" }
-#proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
+proxmox-async = { path = "../proxmox/proxmox-async" }
+proxmox-auth-api = { path = "../proxmox/proxmox-auth-api" }
+proxmox-borrow = { path = "../proxmox/proxmox-borrow" }
+proxmox-compression = { path = "../proxmox/proxmox-compression" }
+proxmox-fuse = { path = "../proxmox-fuse" }
+proxmox-http = { path = "../proxmox/proxmox-http" }
+proxmox-io = { path = "../proxmox/proxmox-io" }
+proxmox-lang = { path = "../proxmox/proxmox-lang" }
+proxmox-rest-server = { path = "../proxmox/proxmox-rest-server" }
+proxmox-router = { path = "../proxmox/proxmox-router" }
+proxmox-schema = { path = "../proxmox/proxmox-schema" }
+proxmox-section-config = { path = "../proxmox/proxmox-section-config" }
+proxmox-serde = { path = "../proxmox/proxmox-serde" }
+proxmox-shared-memory = { path = "../proxmox/proxmox-shared-memory" }
+proxmox-sortable-macro = { path = "../proxmox/proxmox-sortable-macro" }
+proxmox-subscription = { path = "../proxmox/proxmox-subscription" }
+proxmox-sys = { path = "../proxmox/proxmox-sys" }
+proxmox-tfa = { path = "../proxmox/proxmox-tfa" }
+proxmox-time = { path = "../proxmox/proxmox-time" }
+proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
 
 #proxmox-apt = { path = "../proxmox-apt" }
 #proxmox-openid = { path = "../proxmox-openid-rs" }
 
-#pxar = { path = "../pxar" }
+pxar = { path = "../pxar" }
 
 [features]
 default = []
+0 −72
Original line number Diff line number Diff line
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <thomas@lamprecht.org>
Date: Tue, 29 Nov 2022 17:20:28 +0100
Subject: [PATCH] docs: drop all but client man pages

Signed-off-by: Thomas Lamprecht <thomas@lamprecht.org>
---
 docs/Makefile | 16 ----------------
 docs/conf.py  | 19 -------------------
 2 files changed, 35 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index b06badff..94130228 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,25 +1,9 @@
 include ../defines.mk
 
 GENERATED_SYNOPSIS := 						\
-	proxmox-tape/synopsis.rst				\
 	proxmox-backup-client/synopsis.rst			\
 	proxmox-backup-client/catalog-shell-synopsis.rst 	\
-	proxmox-backup-manager/synopsis.rst			\
-	proxmox-backup-debug/synopsis.rst			\
-	proxmox-file-restore/synopsis.rst			\
 	pxar/synopsis.rst					\
-	pmtx/synopsis.rst					\
-	pmt/synopsis.rst					\
-	config/media-pool/config.rst				\
-	config/tape/config.rst					\
-	config/tape-job/config.rst				\
-	config/user/config.rst					\
-	config/remote/config.rst				\
-	config/sync/config.rst					\
-	config/verification/config.rst				\
-	config/acl/roles.rst					\
-	config/datastore/config.rst				\
-	config/domains/config.rst
 
 MAN1_PAGES := 				\
 	pxar.1				\
diff --git a/docs/conf.py b/docs/conf.py
index 8944926e..deeb63bf 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -93,26 +93,7 @@ rst_epilog += f"\n..  |pbs-copyright| replace:: Copyright (C) {copyright}"
 man_pages = [
     # CLI
     ('proxmox-backup-client/man1', 'proxmox-backup-client', 'Command line tool for Backup and Restore', [author], 1),
-    ('proxmox-backup-manager/man1', 'proxmox-backup-manager', 'Command line tool to manage and configure the backup server.', [author], 1),
-    ('proxmox-backup-debug/man1', 'proxmox-backup-debug', 'Debugging command line tool for Backup and Restore', [author], 1),
-    ('proxmox-backup-proxy/man1', 'proxmox-backup-proxy', 'Proxmox Backup Public API Server', [author], 1),
-    ('proxmox-backup/man1', 'proxmox-backup', 'Proxmox Backup Local API Server', [author], 1),
-    ('proxmox-file-restore/man1', 'proxmox-file-restore', 'CLI tool for restoring files and directories from Proxmox Backup Server archives', [author], 1),
-    ('proxmox-tape/man1', 'proxmox-tape', 'Proxmox Tape Backup CLI Tool', [author], 1),
     ('pxar/man1', 'pxar', 'Proxmox File Archive CLI Tool', [author], 1),
-    ('pmt/man1', 'pmt', 'Control Linux Tape Devices', [author], 1),
-    ('pmtx/man1', 'pmtx', 'Control SCSI media changer devices (tape autoloaders)', [author], 1),
-    # configs
-    ('config/acl/man5', 'acl.cfg', 'Access Control Configuration', [author], 5),
-    ('config/datastore/man5', 'datastore.cfg', 'Datastore Configuration', [author], 5),
-    ('config/domains/man5', 'domains.cfg', 'Realm Configuration', [author], 5),
-    ('config/media-pool/man5', 'media-pool.cfg', 'Media Pool Configuration', [author], 5),
-    ('config/remote/man5', 'remote.cfg', 'Remote Server Configuration', [author], 5),
-    ('config/sync/man5', 'sync.cfg', 'Synchronization Job Configuration', [author], 5),
-    ('config/tape-job/man5', 'tape-job.cfg', 'Tape Job Configuration', [author], 5),
-    ('config/tape/man5', 'tape.cfg', 'Tape Drive and Changer Configuration', [author], 5),
-    ('config/user/man5', 'user.cfg', 'User Configuration', [author], 5),
-    ('config/verification/man5', 'verification.cfg', 'Verification Job Configuration', [author], 5),
 ]
 
 
+288 −305

File changed.

Preview size limit exceeded, changes collapsed.

+47 −10
Original line number Diff line number Diff line
{
  lib, fetchgit, rustPlatform, pkg-config, openssl, fuse3, libuuid, acl,
  libxcrypt, git, installShellFiles, sphinx, stdenv,
{ lib,
  fetchgit,
  rustPlatform,
  pkg-config,
  openssl,
  fuse3,
  libuuid,
  acl,
  libxcrypt,
  git,
  installShellFiles,
  sphinx,
  stdenv,
  fetchpatch,
  testers,
  proxmox-backup-client,
}:

rustPlatform.buildRustPackage rec {
  pname = "proxmox-backup-client";
  version = "2.4.1";
  version = "3.0.1";

  srcs = [
    (fetchgit {
      url = "git://git.proxmox.com/git/proxmox-backup.git";
      rev = "v${version}";
      name = "proxmox-backup";
      hash = "sha256-DWzNRi675ZP9HGc/uPvnV/FBTJUNZ4K5RtU9NFRQCcA=";
      hash = "sha256-a6dPBZBBh//iANXoPmOdgxYO0qNszOYI3QtrjQr4Cxc=";
    })
    (fetchgit {
      url = "git://git.proxmox.com/git/proxmox.git";
      rev = "5df815f660e4f3793e974eb8130224538350bb12";
      rev = "2a070da0651677411a245f1714895235b1caf584";
      name = "proxmox";
      hash = "sha256-Vn1poqkIWcR2rNiAr+ENLNthgk3pMCivzXnUX9hvZBw=";
      hash = "sha256-WH6oW2MB2yN1Y2zqOuXewI9jHqev/xLcJtb7D1J4aUE=";
    })
    (fetchgit {
      url = "git://git.proxmox.com/git/proxmox-fuse.git";
@@ -36,10 +49,28 @@ rustPlatform.buildRustPackage rec {

  sourceRoot = "proxmox-backup";

  # These patches are essentially un-upstreamable, due to being "workarounds" related to the
  # project structure.
  cargoPatches = [
    ./0001-re-route-dependencies-not-available-on-crates.io-to-.patch
    ./0002-docs-drop-all-but-client-man-pages.patch
    ./0003-docs-Add-target-path-fixup-variable.patch
    # A lot of Rust crates `proxmox-backup-client` depends on are only available through git (or
    # Debian packages). This patch redirects all these dependencies to a local, relative path, which
    # works in combination with the other three repos being checked out.
    (fetchpatch {
      name = "0001-re-route-dependencies-not-available-on-crates.io-to-.patch";
      url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-re-route-dependencies-not-available-on-crates.io-to-.patch?h=proxmox-backup-client&id=83a1f4dfcb04bd181b11954b1d9f5ddfcb72b3d0";
      hash = "sha256-2YZtjbpYSbRk6rmpjKJeIO+V0YN5PrKsISONXMj4RG0=";
    })
    # This patch prevents the generation of the man-pages for other components inside the repo,
    # which would require them too be built too. Thus avoid wasting resources and just skip them.
    (fetchpatch {
      name = "0002-docs-drop-all-but-client-man-pages.patch";
      url = "https://aur.archlinux.org/cgit/aur.git/plain/0002-docs-drop-all-but-client-man-pages.patch?h=proxmox-backup-client&id=83a1f4dfcb04bd181b11954b1d9f5ddfcb72b3d0";
      hash = "sha256-oJKQs4SwJvX5Zd0/l/vVr66aPO7Y4AC8byJHg9t1IhY=";
    })
    # `make docs` assumes that the binaries are located under `target/{debug,release}`, but due
    # to how `buildRustPackage` works, they get put under `target/$RUSTC_TARGET/{debug,release}`.
    # This patch simply fixes that up.
    ./0001-docs-Add-target-path-fixup-variable.patch
  ];

  postPatch = ''
@@ -84,9 +115,15 @@ rustPlatform.buildRustPackage rec {
  nativeBuildInputs = [ git pkg-config rustPlatform.bindgenHook installShellFiles sphinx ];
  buildInputs = [ openssl fuse3 libuuid acl libxcrypt ];

  passthru.tests.version = testers.testVersion {
    package = proxmox-backup-client;
    command = "${pname} version";
  };

  meta = with lib; {
    description = "The command line client for Proxmox Backup Server";
    homepage = "https://pbs.proxmox.com/docs/backup-client.html";
    changelog = "https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=debian/changelog;hb=refs/tags/v${version}";
    license = licenses.agpl3Only;
    maintainers = with maintainers; [ cofob christoph-heiss ];
    platforms = platforms.linux;