Skip to content

Commit

Permalink
- Supporting i586 linux image kernel Clonezilla live because Debian S…
Browse files Browse the repository at this point in the history
…id now provides i586 linux-image instead of i486 one..
  • Loading branch information
stevenshiau committed Nov 12, 2014
1 parent 0efee0f commit cb4982a
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bin/get-latest-ocs-live-ver
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ query_branch() {
if [ -z "$cz_ver" ]; then
# Backup plan if version is not found on sf.net download page.
wget --quiet -O $cz_tmp $nchc_clonezilla_url/$i
cz_ver="$(LC_ALL=C grep -iEo "clonezilla-live-([0-9A-Za-z]|-|\.)*.iso" $cz_tmp | grep -Ev "(http|\?|\&|%)" | pkg-ver-latest | sed -r -e "s/^clonezilla-live-//g" -e "s/-(486|686|i486|i686|amd64)//g" -e "s/\.iso//g" -e "s/-nk$//g")"
cz_ver="$(LC_ALL=C grep -iEo "clonezilla-live-([0-9A-Za-z]|-|\.)*.iso" $cz_tmp | grep -Ev "(http|\?|\&|%)" | pkg-ver-latest | sed -r -e "s/^clonezilla-live-//g" -e "s/-(486|586|686|i486|i586|i686|amd64)//g" -e "s/\.iso//g" -e "s/-nk$//g")"
fi
[ -e "$cz_tmp" ] && rm -f $cz_tmp
}
Expand Down
7 changes: 5 additions & 2 deletions clonezilla.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Summary: Opensource Clone System (ocs), clonezilla
Name: clonezilla
Version: 3.12.5
Version: 3.12.6
Release: drbl1
License: GPL
Group: Development/Clonezilla
Source0: %{name}-%{version}.tar.bz2
URL: http://clonezilla.org
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: bash, perl, drbl >= 2.11.1, partimage >= 0.6.7, psmisc, udpcast, partclone >= 0.2.73, ntfsprogs >= 1.13.1
Requires: bash, perl, drbl >= 2.11.4, partimage >= 0.6.7, psmisc, udpcast, partclone >= 0.2.73, ntfsprogs >= 1.13.1

%description
Clonezilla, based on DRBL, partclone, and udpcast, allows you to do bare metal backup and recovery. Two types of Clonezilla are available, Clonezilla live and Clonezilla SE (Server Edition). Clonezilla live is suitable for single machine backup and restore. While Clonezilla SE is for massive deployment, it can clone many (40 plus!) computers simultaneously.
Expand Down Expand Up @@ -37,6 +37,9 @@ make install DESTDIR=$RPM_BUILD_ROOT/
/etc/drbl/*

%changelog
* Wed Nov 12 2014 Steven Shiau <steven _at_ nchc org tw> 3.12.6-drbl1
- Supporting i586 linux image kernel Clonezilla live because Debian Sid now provides i586 linux-image instead of i486 one..

* Sun Nov 09 2014 Steven Shiau <steven _at_ nchc org tw> 3.12.5-drbl1
- Program ocs-run was improved by better way to detect systemd as init.

Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
clonezilla (3.12.6-drbl1) unstable; urgency=low

* Supporting i586 linux image kernel Clonezilla live because Debian
Sid now provides i586 linux-image instead of i486 one.

-- Steven Shiau <[email protected]> Wed, 12 Nov 2014 11:36:23 +0800

clonezilla (3.12.5-drbl1) unstable; urgency=low

* Program ocs-run was improved by better way to detect systemd as
Expand Down
7 changes: 7 additions & 0 deletions doc/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ http://clonezilla.org
http://clonezilla.sourceforge.net
http://clonezilla.nchc.org.tw

clonezilla (3.12.6-drbl1) unstable; urgency=low

* Supporting i586 linux image kernel Clonezilla live because Debian
Sid now provides i586 linux-image instead of i486 one.

-- Steven Shiau <[email protected]> Wed, 12 Nov 2014 11:36:23 +0800

clonezilla (3.12.5-drbl1) unstable; urgency=low

* Program ocs-run was improved by better way to detect systemd as
Expand Down
6 changes: 3 additions & 3 deletions sbin/create-debian-live
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ debian_type="minbase"
DEBIAN_DIST_DEF="wheezy"
pkgs="$PKG_FROM_DBN_WHICH_OCS_LIVE_NEED drbl $PKG_FROM_DRBL_FOR_CLONEZILLA_LIVE"
categories_default="main"
cpu_flavor_default="486"
cpu_flavor_default="586"
bootstrap_default="debootstrap"

# The files in dir $ocs_live_script_dir/ will be copied to the dir /live-hook-dir in dir chroot. The file "ocs-live-hook" is in $ocs_live_script_dir
Expand Down Expand Up @@ -50,7 +50,7 @@ USAGE() {
echo "-bt, --bootstrap BOOTSTRAP Specify the bootsrap type as BOOTSTRAP (cdebootstrap or debootstrap). If not specified, $bootstrap_default will be used."
echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-d, --debian-dist [stable|testing|unstable|lenny|squeeze|wheezy|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 486, 686 or amd64. If it's not assigned, $cpu_flavor_default will be used."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586, 686 or amd64. If it's not assigned, $cpu_flavor_default will be used."
echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def."
echo "-i, --assign-version-no NO Assign the version no as NO instead of date."
echo "-k, --live-kernel-pkg KERNEL_VER Assign kernel version as KERNEL_VER (KERNEL VER package must exist in repository. Ex. if KERNEL_VER is 2.6.20-1-486, then linux-image-2.6.20-1-486, squashfs-modules-2.6.20-1-486, and unionfs-modules-2.6.20-1-486 will be used."
Expand Down Expand Up @@ -124,7 +124,7 @@ build_it() {

# For OS arch, we can build amd64 Debian on i386 Debian or vice versus.
case "$cpu_flavor" in
686*|486*) os_arch="i386";;
686*|586*|486*) os_arch="i386";;
amd64) os_arch="amd64";;
esac
$pref lb config --architectures $os_arch
Expand Down
6 changes: 3 additions & 3 deletions sbin/create-drbl-live
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ debian_type="minbase"
DEBIAN_DIST_DEF="sid"
pkgs="$PKG_FROM_DBN_WHICH_OCS_LIVE_NEED drbl $PKG_FROM_DBN $PKG_FROM_DRBL"
categories_default="main"
cpu_flavor_default="486"
cpu_flavor_default="586"
bootstrap_default="debootstrap"

# The files in dir $ocs_live_script_dir/ will be copied to the dir live-hook-dir in dir chroot. The file "drbl-live-hook" is in $ocs_live_script_dir
Expand Down Expand Up @@ -51,7 +51,7 @@ USAGE() {
echo "-bt, --bootstrap BOOTSTRAP Specify the bootsrap type as BOOTSTRAP (cdebootstrap or debootstrap). If not specified, $bootstrap_default will be used."
echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-d, --debian-dist [stable|testing|unstable|lenny|squeeze|wheezy|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 486 or 686. If it's not assigned, $cpu_flavor_default will be used."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586 or 686. If it's not assigned, $cpu_flavor_default will be used."
echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def."
echo "-n, --live-kernel-pkg KERNEL_VER Assign kernel version as KERNEL_VER (KERNEL VER package must exist in repository. Ex. if KERNEL_VER is 2.6.20-1-486, then linux-image-2.6.20-1-486, squashfs-modules-2.6.20-1-486, and unionfs-modules-2.6.20-1-486 will be used."
echo "-i, --assign-version-no NO Assign the version no as NO instead of date."
Expand Down Expand Up @@ -926,7 +926,7 @@ if [ "$use_existing_stage1_iso" = "no" ]; then

# For OS arch, we can build amd64 Debian on i386 Debian or vice versus.
case "$cpu_flavor" in
686*|486*) os_arch="i386";;
686*|586*|486*) os_arch="i386";;
amd64) os_arch="amd64";;
esac
$pref lb config --architectures $os_arch
Expand Down
4 changes: 2 additions & 2 deletions sbin/create-drbl-live-by-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ live_branch_default="unstable"
# Use "apt-cache search --names-only ^task-" to get the list.
# Ref: http://live.debian.net/manual/stable/html/live-manual.en.html#346
de_type_default="task-xfce-desktop"
cpu_flavor_default="486"
cpu_flavor_default="586"
bootstrap_default="debootstrap"
categories_default="main"

Expand Down Expand Up @@ -59,7 +59,7 @@ USAGE() {
echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-d, --debian-dist [stable|testing|unstable|etch|lenny|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned."
echo "-e, --drbl-live-branch [s|stable|t|testing|u|unstable|e|experimental] specifies the DRBL live branch to be used in Live CD. Default is stable."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 486 or 686. If it's not assigned, $cpu_flavor will be used."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586 or 686. If it's not assigned, $cpu_flavor will be used."
echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def."
echo "-k, --package FILE Specify package FILE to be installed in Live CD."
echo "-i, --assign-version-no NO Assign the version no as NO instead of date."
Expand Down
6 changes: 3 additions & 3 deletions sbin/create-gparted-live
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ font_pkgs="fonts-arphic-uming ttf-kochi-gothic"
# Use dhcp*-client$ for dhcp3-client, dhcp-client, and isc-dhcp-client (yes, debian will select 'dhcp-client' for regex 'dhcp*-client', then select 'isc-dhcp-client' for regex 'dhcp*-client'. With "$" in the end means we do not want "isc-dhcp-client-dbg"
pkgs="console-data console-setup console-common kbd file eject user-setup grub-pc fluxbox idesk deborphan man testdisk mc less lxterminal zenity xbase-clients feh netpbm nano bogl-bterm xresprobe mdetect lxrandr sdparm hdparm discover lsscsi pciutils ifupdown dhcp*-client$ cryptsetup gpart smartmontools vim-tiny gdisk fsarchiver mdadm dmraid sudo hicolor-icon-theme netbase ssh pppoeconf ethtool whiptail lshw cpufrequtils open-iscsi tree cifs-utils nilfs-tools netsurf gptsync net-tools iproute2 iw pcmanfm leafpad tcplay f2fs-tools partclone partimage screen rsync iputils-ping telnet traceroute bc lsof psmisc dnsutils wget ftp bzip2 xz-utils zip unzip w3m gsmartcontrol $debian_pkgs_for_gparted $Xorg_pkgs $font_pkgs"
categories_default="main"
cpu_flavor_default="486"
cpu_flavor_default="586"
bootstrap_default="debootstrap"

# The files in dir in $ocs_live_include_dir will be included to the live-hook-dir/. Here we need some functions in ocs/live-hook so we include files in that dir.
Expand Down Expand Up @@ -66,7 +66,7 @@ USAGE() {
echo "-bt, --bootstrap BOOTSTRAP Specify the bootsrap type as BOOTSTRAP (cdebootstrap or debootstrap). If not specified, $bootstrap_default will be used."
echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-d, --debian-dist [stable|testing|unstable|lenny|squeeze|wheezy|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 486, 686 or amd64. If it's not assigned, $cpu_flavor_default will be used."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 586, 686 or amd64. If it's not assigned, $cpu_flavor_default will be used."
echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def."
echo "-n, --live-kernel-pkg KERNEL_VER Assign kernel version as KERNEL_VER (KERNEL VER package must exist in repository. Ex. if KERNEL_VER is 2.6.20-1-486, then linux-image-2.6.20-1-486, squashfs-modules-2.6.20-1-486, and unionfs-modules-2.6.20-1-486 will be used."
echo "-i, --assign-version-no NO Assign the version no as NO instead of date."
Expand Down Expand Up @@ -937,7 +937,7 @@ if [ "$use_existing_stage1_iso" = "no" ]; then

# For OS arch, we can build amd64 Debian on i386 Debian or vice versus.
case "$cpu_flavor" in
686*|486*) os_arch="i386";;
686*|586*|486*) os_arch="i386";;
amd64) os_arch="amd64";;
esac
$pref lb config --architectures $os_arch
Expand Down
2 changes: 1 addition & 1 deletion sbin/ocs-img-2-vdk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ USAGE() {
echo "To run $ocs:"
echo "$ocs [OPTION] IMAGE_NAME VDISK_IMAGE_NAME"
echo "Options:"
echo "-a, --iso-arch ARCH: Force to use the CPU arch for the iso file. E.g. if i686-pae is assigned, the i686-pae version of Clonezilla live will be downloaded and use for KVM. Available arch are: i386, amd64 for Ubuntu-based (alternative) branch, and i486, i686-pae, amd64 for Debian-based (regular) release. //NOTE// (1) By using this, the original file name assigned in the option '-i' will be changed as appropriate file name. (2) If the host machine is x86 arch, then it's recommended to use x86 for the virtual machine, not x86-64. Otherwise the performance will be bad."
echo "-a, --iso-arch ARCH: Force to use the CPU arch for the iso file. E.g. if i686-pae is assigned, the i686-pae version of Clonezilla live will be downloaded and use for KVM. Available arch are: i386, amd64 for Ubuntu-based (alternative) branch, and i486, i586, i686-pae, amd64 for Debian-based (regular) release. //NOTE// (1) By using this, the original file name assigned in the option '-i' will be changed as appropriate file name. (2) If the host machine is x86 arch, then it's recommended to use x86 for the virtual machine, not x86-64. Otherwise the performance will be bad."
echo "-b, --batch-mode Run image checking in batch mode"
echo "-c, --create-vmdk Besides qcow2 virtual disk , create the vmdk (compat6) format disk file, too."
echo "-i, --iso-url ISO_URL: Use the ISO_URL (e.g. http://downloads.sourceforge.net/clonezilla/clonezilla-live-2.1.2-35-i686-pae.iso or file:///usr/share/iso/clonezilla-live-2.1.2-35-amd64.iso) instead of the one assigned in drbl-ocs.conf. $0 will download clonezilla-live iso file from ISO_URL then use the as the OS of KVM when running Clonezilla job. //NOTE// Use iso file name only, not the zip one."
Expand Down
2 changes: 1 addition & 1 deletion scripts/sbin/ocs-functions
Original file line number Diff line number Diff line change
Expand Up @@ -10169,7 +10169,7 @@ get_latest_kernel_ver_in_repository() {
# Package: linux-image-3.10-2-686-pae-dbg
# Package: linux-image-3.10-2-686-pae
# Package: linux-image-3.10-2-486
kver="$(LC_ALL=C zgrep -E '^Package: linux-image-(2\.6\.|3\.)[[:digit:]]+.*-' $ktmp/Packages.gz | sort -r -V | uniq | head -n 1 | sed -r -e 's|^Package: linux-image-||g' -e 's|[^[:digit:]]*-generic$||g' -e 's|[^[:digit:]]*-lowlatency$||g' -e 's|[^[:digit:]]*-amd64||g' -e 's|[^[:digit:]]*-686.*||g' -e 's|[^[:digit:]]*-486.*||g')"
kver="$(LC_ALL=C zgrep -E '^Package: linux-image-(2\.6\.|3\.)[[:digit:]]+.*-' $ktmp/Packages.gz | sort -r -V | uniq | head -n 1 | sed -r -e 's|^Package: linux-image-||g' -e 's|[^[:digit:]]*-generic$||g' -e 's|[^[:digit:]]*-lowlatency$||g' -e 's|[^[:digit:]]*-amd64||g' -e 's|[^[:digit:]]*-686.*||g' -e 's|[^[:digit:]]*-586.*||g' -e 's|[^[:digit:]]*-486.*||g')"

if [ -z "$kver" ]; then
# Clean Packages.gz to avoid wget using another name like Packages.gz.1 then search the next again
Expand Down

0 comments on commit cb4982a

Please sign in to comment.