Skip to content

Commit 424f994

Browse files
remove legacy sparsecp
sparsecp gets only used in qmextract, which is part of the old backup method (pre PVE 2.3). Do not remove qmextract for now people could still have backups from < PVE 2.3 around. They could be restored manually, but we shouldn't make restoring complicated. Thus replace sparsecp with `cp sparse=always`. Signed-off-by: Thomas Lamprecht <[email protected]>
1 parent 3fad64a commit 424f994

File tree

4 files changed

+3
-274
lines changed

4 files changed

+3
-274
lines changed

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ all:
3636
dinstall: deb
3737
dpkg -i ${DEB}
3838

39-
sparsecp: sparsecp.c utils.c
40-
gcc ${CFLAGS} -o sparsecp sparsecp.c
41-
4239
qm.bash-completion:
4340
PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::qm; PVE::CLI::qm->generate_bash_completions();" >$@.tmp
4441
mv $@.tmp $@
@@ -47,7 +44,7 @@ qmrestore.bash-completion:
4744
PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::qmrestore; PVE::CLI::qmrestore->generate_bash_completions();" >$@.tmp
4845
mv $@.tmp $@
4946

50-
PKGSOURCES=qm qm.1 qmrestore qmrestore.1 qmextract sparsecp qm.conf.5 qm.bash-completion qmrestore.bash-completion
47+
PKGSOURCES=qm qm.1 qmrestore qmrestore.1 qmextract qm.conf.5 qm.bash-completion qmrestore.bash-completion
5148

5249
.PHONY: install
5350
install: ${PKGSOURCES}
@@ -69,7 +66,6 @@ install: ${PKGSOURCES}
6966
install -m 0755 pve-bridge ${DESTDIR}${VARLIBDIR}/pve-bridge
7067
install -m 0755 pve-bridge-hotplug ${DESTDIR}${VARLIBDIR}/pve-bridge-hotplug
7168
install -m 0755 pve-bridgedown ${DESTDIR}${VARLIBDIR}/pve-bridgedown
72-
install -s -m 0755 sparsecp ${DESTDIR}${LIBDIR}
7369
install -D -m 0644 modules-load.conf ${DESTDIR}/etc/modules-load.d/qemu-server.conf
7470
install -m 0755 qmextract ${DESTDIR}${LIBDIR}
7571
install -m 0644 qm.1 ${DESTDIR}/${MAN1DIR}

qmextract

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ sub extract_archive {
191191
exec 'dd', 'ibs=256K', 'obs=256K', "of=$path";
192192
die "couldn't exec dd: $!\n";
193193
} else {
194-
exec '/usr/lib/qemu-server/sparsecp', $path;
195-
die "couldn't exec sparsecp: $!\n";
194+
exec '/bin/cp', '--sparse=always', '/dev/stdin', $path;
195+
die "couldn't exec cp: $!\n";
196196
}
197197
}
198198

sparsecp.c

Lines changed: 0 additions & 132 deletions
This file was deleted.

utils.c

Lines changed: 0 additions & 135 deletions
This file was deleted.

0 commit comments

Comments
 (0)