Hello community, here is the log from the commit of package rear for openSUSE:Factory checked in at 2015-11-06 00:04:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rear (Old) and /work/SRC/openSUSE:Factory/.rear.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rear" Changes: -------- --- /work/SRC/openSUSE:Factory/rear/rear.changes 2015-10-28 17:30:43.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rear.new/rear.changes 2015-11-06 00:04:22.000000000 +0100 @@ -1,0 +2,18 @@ +Tue Nov 3 15:00:49 CET 2015 - [email protected] + +- Create a separate directory /usr/share/rear/conf/examples/ for + example config files, see https://github.com/rear/rear/pull/681 + and install the SUSE example config files there - i.e.: + /usr/share/rear/conf/examples/SLE11-ext3-example.conf + /usr/share/rear/conf/examples/SLE12-btrfs-example.conf + /usr/share/rear/conf/examples/SLE12-SP1-btrfs-example.conf + +------------------------------------------------------------------- +Wed Oct 28 15:27:59 CET 2015 - [email protected] + +- rear1172a-gpt_sync_mbr.patch adds support for the + SUSE specific gpt_sync_mbr partitioning + see https://github.com/rear/rear/issues/544 + (bsc#950610). + +------------------------------------------------------------------- New: ---- rear1172a-gpt_sync_mbr.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rear.spec ++++++ --- /var/tmp/diff_new_pack.mOu1xK/_old 2015-11-06 00:04:24.000000000 +0100 +++ /var/tmp/diff_new_pack.mOu1xK/_new 2015-11-06 00:04:24.000000000 +0100 @@ -62,6 +62,10 @@ # and https://bugzilla.suse.com/show_bug.cgi?id=946006 # and https://fate.suse.com/318701 Patch121: SLE12-SP1-btrfs.patch +# Patch200 rear1172a-gpt_sync_mbr.patch adds support for the SUSE specific gpt_sync_mbr partitioning +# see https://github.com/rear/rear/issues/544 +# and https://bugzilla.suse.com/show_bug.cgi?id=950610 +Patch200: rear1172a-gpt_sync_mbr.patch # Rear contains only bash scripts plus documentation so that on first glance it could be "BuildArch: noarch" # but actually it is not "noarch" because it only works on those architectures that are explicitly supported. # Of course the rear bash scripts can be installed on any architecture just as any binaries can be installed on any architecture. @@ -244,6 +248,10 @@ # and https://bugzilla.suse.com/show_bug.cgi?id=946006 # and https://fate.suse.com/318701 %patch121 -p1 +# Patch200 rear1172a-gpt_sync_mbr.patch adds support for the SUSE specific gpt_sync_mbr partitioning +# see https://github.com/rear/rear/issues/544 +# and https://bugzilla.suse.com/show_bug.cgi?id=950610 +%patch200 -p1 # Add a specific os.conf to not depend on LSB dependencies # (otherwise it calls "lsb_release" in /usr/share/rear/lib/config-functions.sh) # for the suse_version values see the listing at @@ -291,15 +299,18 @@ %install make install DESTDIR="%{buildroot}" +# Create a separate directory /usr/share/rear/conf/examples/ for example config files +# see https://github.com/rear/rear/pull/681 +mkdir %{buildroot}%{_datadir}/rear/conf/examples/ # Source11 SLE11-ext3-example.conf is a working example for SLE11 with default ext3 filesystem -# that gets installed as /usr/share/rear/conf/SLE11-ext3-example.conf -install -m 644 %{SOURCE11} %{buildroot}%{_datadir}/rear/conf/SLE11-ext3-example.conf +# that gets installed as /usr/share/rear/conf/examples/SLE11-ext3-example.conf +install -m 644 %{SOURCE11} %{buildroot}%{_datadir}/rear/conf/examples/SLE11-ext3-example.conf # Source12 SLE12-btrfs-example.conf is a working example for SLE12 with default btrfs subvolumes -# that gets installed as /usr/share/rear/conf/SLE12-btrfs-example.conf -install -m 644 %{SOURCE12} %{buildroot}%{_datadir}/rear/conf/SLE12-btrfs-example.conf +# that gets installed as /usr/share/rear/conf/examples/SLE12-btrfs-example.conf +install -m 644 %{SOURCE12} %{buildroot}%{_datadir}/rear/conf/examples/SLE12-btrfs-example.conf # Source121 SLE12-SP1-btrfs-example.conf is a working example for SLE12-SP1 with default btrfs subvolumes -# that gets installed as /usr/share/rear/conf/SLE12-SP1-btrfs-example.conf -install -m 644 %{SOURCE121} %{buildroot}%{_datadir}/rear/conf/SLE12-SP1-btrfs-example.conf +# that gets installed as /usr/share/rear/conf/examples/SLE12-SP1-btrfs-example.conf +install -m 644 %{SOURCE121} %{buildroot}%{_datadir}/rear/conf/examples/SLE12-SP1-btrfs-example.conf %files %defattr(-,root,root,-) ++++++ rear1172a-gpt_sync_mbr.patch ++++++ diff -rp -U8 rear-1.17.2.SLE12-SP1-btrfs/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh rear-1.17.2.SLE12-SP1-btrfs.gpt_sync_mbr/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh --- rear-1.17.2.SLE12-SP1-btrfs/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh 2015-06-08 09:50:38.000000000 +0200 +++ rear-1.17.2.SLE12-SP1-btrfs.gpt_sync_mbr/usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh 2015-11-03 14:51:36.000000000 +0100 @@ -100,33 +100,36 @@ create_partitions() { Log "No partitions on device $device." return 0 fi if [[ -z "$label" ]] ; then label="gpt" ### msdos label types are detected earlier. fi + # For 'gpt_sync_mbr' labeled disks create_partitions was called e.g. as + # create_partitions /dev/sda gpt_sync_mbr + # so that $label is not empty but still set to 'gpt_sync_mbr' here. cat >> "$LAYOUT_CODE" <<EOF LogPrint "Creating partitions for disk $device ($label)" my_udevsettle parted -s $device mklabel $label >&2 my_udevsettle EOF local block_size device_size sysfs_name if [[ -b $device ]] ; then sysfs_name=$(get_sysfs_name "$device") if [[ "$sysfs_name" ]] && [[ -d "/sys/block/$sysfs_name" ]] ; then block_size=$( get_block_size "$sysfs_name" ) device_size=$( get_disk_size "$sysfs_name" ) ### GPT disks need 33 LBA blocks at the end of the disk - if [[ "$label" == "gpt" ]] ; then + if [[ "$label" == "gpt" || "$label" == "gpt_sync_mbr" ]] ; then device_size=$(( device_size - 33*block_size )) if [[ "$MIGRATION_MODE" ]] ; then Log "Size reductions of GPT partitions probably needed." fi fi fi fi @@ -218,17 +221,17 @@ EOF ( echo "my_udevsettle" echo "parted -s $device set $number $flag on >&2" echo "my_udevsettle" ) >> $LAYOUT_CODE done # Explicitly name GPT partitions. - if [[ "$label" = "gpt" ]] && [[ "$name" != "rear-noname" ]] ; then + if [[ "$label" = "gpt" || "$label" == "gpt_sync_mbr" ]] && [[ "$name" != "rear-noname" ]] ; then ( echo "my_udevsettle" echo "parted -s $device name $number '\"$name\"' >&2" echo "my_udevsettle" ) >> $LAYOUT_CODE fi done < <(grep "^part $device " $LAYOUT_FILE) diff -rp -U8 rear-1.17.2.SLE12-SP1-btrfs/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh rear-1.17.2.SLE12-SP1-btrfs.gpt_sync_mbr/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh --- rear-1.17.2.SLE12-SP1-btrfs/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh 2015-08-03 14:14:39.000000000 +0200 +++ rear-1.17.2.SLE12-SP1-btrfs.gpt_sync_mbr/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh 2015-10-28 14:16:13.000000000 +0100 @@ -108,17 +108,17 @@ extract_partitions() { ### set to primary until flags are known declare type="primary" sed -i /^$partition_nr\ /s/$/\ primary/ $TMP_DIR/partitions fi done < $TMP_DIR/partitions-data fi ### find partition name for gpt disks. - if [[ "$disk_label" = "gpt" ]] ; then + if [[ "$disk_label" = "gpt" || "$disk_label" == "gpt_sync_mbr" ]] ; then if [[ "$FEATURE_PARTED_MACHINEREADABLE" ]] ; then while read partition_nr size start junk ; do type=$(grep "^$partition_nr:" $TMP_DIR/parted | cut -d ":" -f "6") if [[ -z "$type" ]] ; then type="rear-noname" fi type=$(echo "$type" | sed -e 's/ /0x20/g') # replace spaces with 0x20 in name field sed -i /^$partition_nr\ /s/$/\ $type/ $TMP_DIR/partitions @@ -251,15 +251,19 @@ Log "Saving disk partitions." for disk in /sys/block/* ; do blockd=${disk#/sys/block/} if [[ $blockd = hd* || $blockd = sd* || $blockd = cciss* || $blockd = vd* || $blockd = xvd* ]] ; then devname=$(get_device_name $disk) devsize=$(get_disk_size ${disk#/sys/block/}) disktype=$(parted -s $devname print | grep -E "Partition Table|Disk label" | cut -d ":" -f "2" | tr -d " ") + echo "# Disk $devname" + echo "# Format: disk <devname> <size(bytes)> <partition label type>" echo "disk $devname $devsize $disktype" + echo "# Partitions on $devname" + echo "# Format: part <device> <partition size(bytes)> <partition start(bytes)> <partition type|name> <flags> /dev/<partition>" extract_partitions "$devname" fi done ) >> $DISKLAYOUT_FILE
