Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions SPECS/clonezilla/clonezilla.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Jingkun Zheng <zhengjingkun@iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

Name: clonezilla
Version: 5.19.21
Release: %autorelease
Summary: Partition and disk imaging and cloning tool
License: GPL-2.0-or-later
URL: https://clonezilla.org/
VCS: git:https://gitlab.com/stevenshiau/clonezilla.git
#!RemoteAsset: sha256:c0d0f858a95c745e84aaebd5e1caf901cc78732c195944ee5d2e9fde4c8daed6
Source: https://github.com/stevenshiau/clonezilla/archive/refs/tags/v%{version}.tar.gz
BuildArch: noarch

BuildRequires: bash
BuildRequires: findutils
BuildRequires: grep
BuildRequires: make

Recommends: btrfs-progs
Recommends: cifs-utils
Recommends: cryptsetup
Recommends: curl
Recommends: dhcpcd
Recommends: dosfstools
Recommends: f2fs-tools
Recommends: lvm2
Recommends: mdadm
Recommends: nmap
Recommends: partimage
Recommends: pigz
Recommends: smartmontools
Recommends: squashfs-tools
Recommends: xfsprogs
Recommends: xorriso

Requires: bash
Requires: bc
Requires: bzip2
Requires: coreutils
Requires: dialog
Requires: drbl >= 5.11.23
Requires: e2fsprogs
Requires: findutils
Requires: gawk
Requires: gptfdisk
Requires: grep
Requires: gzip
Requires: jq
Requires: lz4
Requires: lzop
Requires: ntfs-3g
Requires: parted
Requires: partclone >= 0.3.52
Requires: pbzip2
Requires: perl
Requires: perl(Logfile::Rotate)
Requires: procps-ng
Requires: psmisc
Requires: python3
Requires: sed
Requires: tar
Requires: udpcast
Requires: util-linux
Requires: wget
Requires: xz
Requires: zstd

%description
Clonezilla is a partition and disk imaging and cloning tool. It is based
on DRBL, Partclone and udpcast and can save and restore only the used
blocks of a partition.

Clonezilla supports many file systems, including ext2/3/4, XFS, Btrfs,
NTFS, FAT, exFAT, F2FS and HFS+, and can clone a single machine or many
machines at once over multicast.

%prep
%autosetup -n %{name}-%{version}

%build
%make_build

%install
make install DESTDIR=%{buildroot}
mv %{buildroot}%{_prefix}/sbin/* %{buildroot}%{_bindir}/
rmdir %{buildroot}%{_prefix}/sbin

%check
#no check

%files
%doc README
%doc %{_datadir}/clonezilla/doc
%license LICENSE
%{_bindir}/*
%{_datadir}/drbl/postrun/ocs
%{_datadir}/drbl/prerun/ocs
%{_datadir}/drbl/samples
%{_datadir}/drbl/sbin/ocs-chnthn-functions
%{_datadir}/drbl/sbin/ocs-functions
%{_datadir}/drbl/sbin/set-netboot-1st-efi-nvram
%{_datadir}/drbl/setup/files/gparted
%{_datadir}/drbl/setup/files/ocs
%{_datadir}/drbl/setup/files/riscv64
%{_mandir}/man8/ocs-onthefly.8*
%{_mandir}/man8/ocs-sr.8*
%config(noreplace) %{_sysconfdir}/drbl/drbl-ocs.conf

%changelog
%autochangelog
91 changes: 91 additions & 0 deletions SPECS/drbl/drbl.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Jingkun Zheng <zhengjingkun@iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

Name: drbl
Version: 5.11.23
Release: %autorelease
Summary: Diskless Remote Boot in Linux
License: GPL-2.0-only
URL: https://drbl.org/
VCS: git:https://github.com/stevenshiau/drbl.git
#!RemoteAsset: sha256:3d5e0f6d037aeca26f2451648f58cf2c04c0a7403ea0a0f31b6642b0b2da52e9
Source: https://github.com/stevenshiau/drbl/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildArch: noarch

BuildRequires: bash
BuildRequires: findutils
BuildRequires: grep
BuildRequires: make
BuildRequires: perl

Recommends: curl
Recommends: nmap
Recommends: openssh-server
Recommends: rsync
Recommends: tftp-server
Recommends: wget

Requires: bash
Requires: coreutils
Requires: gawk
Requires: grep
Requires: ipcalc
Requires: perl
Requires: procps-ng
Requires: psmisc
Requires: sed
Requires: util-linux

%description
DRBL (Diskless Remote Boot in Linux) provides a diskless or systemless
environment for client machines. It uses distributed hardware resources
and makes it possible for clients to fully access local hardware.

DRBL is the framework Clonezilla is built on. It also contains the
clonezilla command line tools used to save and restore partitions over the
network.

%prep
%autosetup

%build
%make_build drbl-sbin-link languages

%install
make install DESTDIR=%{buildroot}
mv %{buildroot}%{_prefix}/sbin/* %{buildroot}%{_bindir}/
rmdir %{buildroot}%{_prefix}/sbin

%check
%make_build -C lang check

%files
%doc README
%doc %{_datadir}/drbl/doc
%license LICENSE
%{_bindir}/*
%{_datadir}/drbl/bin
%{_datadir}/drbl/image
%{_datadir}/drbl/lang
%{_datadir}/drbl/pkg
%{_datadir}/drbl/pki
%{_datadir}/drbl/postrun/drbl
%{_datadir}/drbl/prerun/drbl
%{_datadir}/drbl/sbin
%{_datadir}/drbl/setup/files/DBN
%{_datadir}/drbl/setup/files/LinuxMint
%{_datadir}/drbl/setup/files/RH
%{_datadir}/drbl/setup/files/SUSE
%{_datadir}/drbl/setup/files/Ubuntu
%{_datadir}/drbl/setup/files/boinc
%{_datadir}/drbl/setup/files/misc
%{_datadir}/drbl/setup/rpm-md-repos
%{_datadir}/drbl/setup/yum-repos
%{_datadir}/gdm/themes/drbl-gdm
%config(noreplace) %{_sysconfdir}/drbl/*

%changelog
%autochangelog
91 changes: 91 additions & 0 deletions SPECS/partclone/partclone.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Jingkun Zheng <zhengjingkun@iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

Name: partclone
Version: 0.3.52
Release: %autorelease
Summary: File system aware partition imaging tool
# Partclone's own code is GPL-2.0-or-later. The bundled btrfs, xfs and f2fs
# libraries and the helper programs add more licenses:
# btrfs: GPL-2.0-only, GPL-2.0-or-later, GPL-2.0-only WITH Linux-syscall-note,
# GPL-2.0-only OR MIT, BSD-2-Clause, BSD-3-Clause,
# CC0-1.0 OR OpenSSL OR Apache-2.0, LGPL-2.1-or-later
# xfs: GPL-2.0-only, LGPL-2.1-only
# f2fs: GPL-2.0-only
# ntfsfixboot: GPL-3.0-or-later
# gettext.h: LGPL-2.0-or-later
License: BSD-2-Clause AND BSD-3-Clause AND (CC0-1.0 OR OpenSSL OR Apache-2.0) AND GPL-2.0-only AND (GPL-2.0-only OR MIT) AND (GPL-2.0-only WITH Linux-syscall-note) AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later
URL: https://partclone.org/
VCS: git:https://github.com/Thomas-Tsai/partclone.git
#!RemoteAsset: sha256:15fcfafb42fea1fdbc9a022b2dc8cc49f60d49fee969b41ef3d05d944471dc12
Source: https://github.com/Thomas-Tsai/partclone/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildSystem: autotools

BuildOption(conf): --enable-apfs
BuildOption(conf): --enable-btrfs
BuildOption(conf): --enable-exfat
BuildOption(conf): --enable-extfs
BuildOption(conf): --enable-f2fs
BuildOption(conf): --enable-fat
BuildOption(conf): --enable-hfsp
BuildOption(conf): --enable-minix
BuildOption(conf): --enable-ncursesw
BuildOption(conf): --enable-ntfs
BuildOption(conf): --enable-xfs
BuildOption(conf): --enable-zfs
BuildOption(build): MAN_STYLESHEET=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
BuildOption(install): MAN_STYLESHEET=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: docbook-dtds
BuildRequires: docbook-xsl
BuildRequires: gettext-devel
BuildRequires: pkgconfig(com_err)
BuildRequires: libtool
BuildRequires: libxslt
BuildRequires: make
BuildRequires: pkgconf-pkg-config
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(ext2fs)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(libntfs-3g)
BuildRequires: pkgconfig(liburcu)
BuildRequires: pkgconfig(libxxhash)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(ncursesw)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(zlib)

%description
Partclone provides utilities to back up and restore the used blocks of a
partition. Unlike a raw disk image, only the blocks in use are copied,
which keeps images small. Existing file system libraries are used to read
and write the file system, so the image is compatible with the original
file system after a restore.

Supported file systems include ext2/3/4, XFS, Btrfs, ZFS, NTFS,
FAT12/16/32, exFAT, F2FS, HFS+, APFS and Minix.

%conf -p
autoreconf -fiv

%install -a
%find_lang %{name} --generate-subpackages

%check
%make_build check

%files -f %{name}.lang
%doc AUTHORS NEWS README.md
%license COPYING
%{_bindir}/partclone.*
%{_datadir}/bash-completion/completions/partclone
%{_mandir}/man8/partclone.*

%changelog
%autochangelog
42 changes: 42 additions & 0 deletions SPECS/partimage/2000-Fix-gzFile-type-for-modern-zlib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Fix the build with zlib 1.2.6 and newer, where gzFile is already a pointer
type and casting its address produces a type mismatch.

Backported from the Debian partimage package
(debian/patches/01-ftbfs-zlib.patch), original author Mònica Ramírez Arceda
<monica@probeta.net>, Debian bug #662596.

diff --git a/src/client/imagefile.cpp b/src/client/imagefile.cpp
index dd83411..62d0f72 100644
--- a/src/client/imagefile.cpp
+++ b/src/client/imagefile.cpp
@@ -783,7 +783,7 @@ void CImage::openWriting()
else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
{
showDebug(1, "open gzip\n");
- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
+ m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h");
if (m_gzImageFile == NULL)
{
showDebug(1, "error:%d %s\n", errno, strerror(errno));
@@ -1098,7 +1098,7 @@ void CImage::openReading(CVolumeHeader *vh /* = NULL */)
}
else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
{
- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");
+ m_gzImageFile = gzdopen(m_nFdImage, "rb");
if (m_gzImageFile == NULL)
THROW(ERR_ERRNO, errno);
else
diff --git a/src/client/imagefile.h b/src/client/imagefile.h
index 4ba8910..6adb098 100644
--- a/src/client/imagefile.h
+++ b/src/client/imagefile.h
@@ -41,7 +41,7 @@ class CImage
COptions m_options;

FILE *m_fImageFile;
- gzFile *m_gzImageFile;
+ gzFile m_gzImageFile;
BZFILE *m_bzImageFile;

int m_nFdImage;
Loading
Loading