From: "Max R. Carrara" <m.carrara@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 pve-storage-plugin-examples 2/2] plugin-sshfs: package the SSHFS example plugin
Date: Fri, 4 Jul 2025 18:20:11 +0200 [thread overview]
Message-ID: <20250704162011.402195-3-m.carrara@proxmox.com> (raw)
In-Reply-To: <20250704162011.402195-1-m.carrara@proxmox.com>
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
---
Makefile | 1 +
plugin-sshfs/Makefile | 71 +++++++++++++++++++++++++++++++
plugin-sshfs/debian/changelog | 5 +++
plugin-sshfs/debian/control | 22 ++++++++++
plugin-sshfs/debian/copyright | 20 +++++++++
plugin-sshfs/debian/rules | 8 ++++
plugin-sshfs/debian/source/format | 1 +
plugin-sshfs/debian/triggers | 1 +
8 files changed, 129 insertions(+)
create mode 100644 plugin-sshfs/Makefile
create mode 100644 plugin-sshfs/debian/changelog
create mode 100644 plugin-sshfs/debian/control
create mode 100644 plugin-sshfs/debian/copyright
create mode 100755 plugin-sshfs/debian/rules
create mode 100644 plugin-sshfs/debian/source/format
create mode 100644 plugin-sshfs/debian/triggers
diff --git a/Makefile b/Makefile
index 1e422cc..b5c787a 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@
SUBDIRS := \
backup-provider-borg \
backup-provider-directory \
+ plugin-sshfs \
.PHONY: deb dsc sbuild clean
deb:
diff --git a/plugin-sshfs/Makefile b/plugin-sshfs/Makefile
new file mode 100644
index 0000000..7a181dc
--- /dev/null
+++ b/plugin-sshfs/Makefile
@@ -0,0 +1,71 @@
+# Makes useful Debian-specific variables available
+include /usr/share/dpkg/default.mk
+
+# --- Useful variables for convenience
+
+# Note that variables can be overridden, e.g. `make install DESTDIR='./foo'`
+DESTDIR=
+PACKAGE=libpve-storage-plugin-sshfs-perl
+
+BINDIR=${DESTDIR}/usr/bin
+PERLLIBDIR=${DESTDIR}/usr/share/perl5
+MAN1DIR=${DESTDIR}/usr/share/man/man1
+MAN8DIR=${DESTDIR}/usr/share/man/man8
+CRONDAILYDIR=${DESTDIR}/etc/cron.daily
+INITDBINDIR=${DESTDIR}/etc/init.d
+SERVICEDIR=${DESTDIR}/lib/systemd/system
+BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/
+ZSHCOMPLDIR=${DESTDIR}/usr/share/zsh/vendor-completions/
+HARADIR=${DESTDIR}/usr/share/cluster
+DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
+PODDIR=${DESTDIR}/usr/share/doc/${PACKAGE}/pod
+USRSHARE=${DESTDIR}/usr/share/${PACKAGE}
+
+# Directory where our custom plugin has to go
+PLUGINDIR=${PERLLIBDIR}/PVE/Storage/Custom
+
+export VERSION = $(DEB_VERSION_UPSTREAM_REVISION)
+
+BUILDDIR = $(PACKAGE)-$(DEB_VERSION_UPSTREAM)
+
+DSC=$(PACKAGE)_$(DEB_VERSION).dsc
+DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_HOST_ARCH).deb
+
+# --- Targets
+
+$(BUILDDIR):
+ rm -rf $@ $@.tmp
+ mkdir $@.tmp
+ rsync -a * $@.tmp
+ # You can add additional commands instead of this comment if you need to
+ # e.g. create additional files inside the build directory etc.
+ mv $@.tmp $@
+
+# Creates a .deb package for installation
+.PHONY: deb
+deb: $(DEB)
+$(DEB): $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
+ lintian $(DEB)
+
+# Creates a .dsc (Debian source) package
+.PHONY: dsc
+dsc:
+ rm -rf $(BUILDDIR) $(DSC)
+ $(MAKE) $(DSC)
+ lintian $(DSC)
+
+$(DSC): $(BUILDDIR)
+ cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
+
+# Target used to place files and directories at expected locations, with expected permissions
+.PHONY: install
+install:
+ install -D -m 0644 src/PVE/Storage/Custom/SSHFSPlugin.pm $(PLUGINDIR)/SSHFSPlugin.pm
+
+# Used to clean up your builds
+.PHONY: clean
+clean:
+ rm -f $(PACKAGE)*.tar* *.deb *.dsc *.build *.buildinfo *.changes
+ rm -rf dest $(PACKAGE)-[0-9]*/
+
diff --git a/plugin-sshfs/debian/changelog b/plugin-sshfs/debian/changelog
new file mode 100644
index 0000000..bd243c5
--- /dev/null
+++ b/plugin-sshfs/debian/changelog
@@ -0,0 +1,5 @@
+libpve-storage-plugin-sshfs-perl (1.0.0) UNRELEASED; urgency=medium
+
+ * Initial release.
+
+ -- Proxmox Support Team <support@proxmox.com> Wed, 09 Apr 2025 16:13:26 +0200
diff --git a/plugin-sshfs/debian/control b/plugin-sshfs/debian/control
new file mode 100644
index 0000000..67317b0
--- /dev/null
+++ b/plugin-sshfs/debian/control
@@ -0,0 +1,22 @@
+Source: libpve-storage-plugin-sshfs-perl
+Section: perl
+Priority: optional
+Maintainer: Proxmox Support Team <support@proxmox.com>
+Rules-Requires-Root: no
+Build-Depends:
+ debhelper-compat (= 13),
+ libpve-storage-perl (>= 8.3.3),
+ lintian,
+ perl,
+ rsync,
+Standards-Version: 4.6.2
+
+Package: libpve-storage-plugin-sshfs-perl
+Architecture: any
+Depends:
+ ${misc:Depends},
+ ${perl:Depends},
+ libpve-storage-perl (>= 8.3.3),
+ sshfs (>= 3.7.3),
+Description: SSHFS storage plugin for Proxmox Virtual Environment.
+ Used to demonstrate plugin development.
diff --git a/plugin-sshfs/debian/copyright b/plugin-sshfs/debian/copyright
new file mode 100644
index 0000000..291a5c8
--- /dev/null
+++ b/plugin-sshfs/debian/copyright
@@ -0,0 +1,20 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://git.proxmox.com/?p=pve-storage-plugin-examples.git;a=summary
+
+Files:
+ *
+Copyright: 2025 Proxmox Server Solutions GmbH <support@proxmox.com>
+License: AGPL-3+
+ 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 <http://www.gnu.org/licenses/>.
+
diff --git a/plugin-sshfs/debian/rules b/plugin-sshfs/debian/rules
new file mode 100755
index 0000000..7f90d5d
--- /dev/null
+++ b/plugin-sshfs/debian/rules
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+# Output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+%:
+ dh $@
+
diff --git a/plugin-sshfs/debian/source/format b/plugin-sshfs/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/plugin-sshfs/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/plugin-sshfs/debian/triggers b/plugin-sshfs/debian/triggers
new file mode 100644
index 0000000..59dd688
--- /dev/null
+++ b/plugin-sshfs/debian/triggers
@@ -0,0 +1 @@
+activate-noawait pve-api-updates
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-04 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 16:20 [pve-devel] [PATCH v2 pve-storage-plugin-examples 0/2] SSHFS Example Storage Plugin Max R. Carrara
2025-07-04 16:20 ` [pve-devel] [PATCH v2 pve-storage-plugin-examples 1/2] plugin-sshfs: add example for custom storage plugin for SSHFS Max R. Carrara
2025-07-04 16:20 ` Max R. Carrara [this message]
2025-09-08 8:26 ` [pve-devel] applied: [PATCH v2 pve-storage-plugin-examples 0/2] SSHFS Example Storage Plugin Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250704162011.402195-3-m.carrara@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.