Hello community, here is the log from the commit of package perl-Bootloader for openSUSE:Factory checked in at 2015-12-18 21:50:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Bootloader (Old) and /work/SRC/openSUSE:Factory/.perl-Bootloader.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Bootloader" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Bootloader/perl-Bootloader.changes 2015-12-03 13:27:51.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes 2015-12-18 21:50:28.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Dec 16 11:52:12 UTC 2015 - snwint@suse.com + +- Add initial implementation of uboot/config script +- 0.901 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.900.tar.xz New: ---- perl-Bootloader-0.901.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.UIahVY/_old 2015-12-18 21:50:29.000000000 +0100 +++ /var/tmp/diff_new_pack.UIahVY/_new 2015-12-18 21:50:29.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.900 +Version: 0.901 Release: 0 Requires: coreutils Requires: perl-base = %{perl_version} ++++++ perl-Bootloader-0.900.tar.xz -> perl-Bootloader-0.901.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.900/VERSION new/perl-Bootloader-0.901/VERSION --- old/perl-Bootloader-0.900/VERSION 2015-11-25 16:06:16.000000000 +0100 +++ new/perl-Bootloader-0.901/VERSION 2015-12-16 13:50:45.000000000 +0100 @@ -1 +1 @@ -0.900 +0.901 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.900/changelog new/perl-Bootloader-0.901/changelog --- old/perl-Bootloader-0.900/changelog 2015-11-25 16:06:16.000000000 +0100 +++ new/perl-Bootloader-0.901/changelog 2015-12-16 13:50:45.000000000 +0100 @@ -1,3 +1,6 @@ +2015-11-28: 0.901 + - Add initial implementation of uboot/config script + 2015-09-02: 0.900 - make grub_installdevice parsing more robust - continue after wrong entries in grub_install_device diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.900/uboot/config new/perl-Bootloader-0.901/uboot/config --- old/perl-Bootloader-0.900/uboot/config 1970-01-01 01:00:00.000000000 +0100 +++ new/perl-Bootloader-0.901/uboot/config 2015-12-16 13:50:45.000000000 +0100 @@ -0,0 +1,96 @@ +#!/bin/bash + +function print_entry { + local label=$1 + local zimage=$2 + local initrd=$3 + local append=$4 + local dtb=$5 + + echo "LABEL $label" + echo -e "\tLINUX $(readlink -m $zimage)" + echo -e "\tINITRD $(readlink -m $initrd)" + if [ -d $dtb ] ; then + echo -e "\tFDTDIR $(readlink -m $dtb)" + else + echo -e "\tFDT $(readlink -m $dtb)" + fi + echo -e "\tAPPEND $append" +} + +function print_header { + echo "# THIS FILE WILL BE OVERWRITTEN by perl-Bootloader" + echo -n "# Last modification on " + date + echo "# Please, use /boot/extlinux.d and /etc/default/uboot for configuration" + echo +} + +if [ ! -r /etc/default/u-boot ] ; then + echo "/etc/default/u-boot: no such file" + exit 1 +fi + +source /etc/default/u-boot + +# Find zImages +machine=`uname -m` +case "x$machine" in + xi?86 | xx86_64) + zimage=(`find /boot -maxdepth 1 -name vmlinuz-\*`) ;; + xaarch64) + zimage=(`find /boot -maxdepth 1 -name Image-\*`) ;; + *) + zimage=(`find /boot -maxdepth 1 -name zImage-\*`) ;; +esac +version=(${zimage[@]#*-}) + +# Generate filenames for initrd and dtbdir +initrd=(${version[@]/#/\/boot\/initrd-}) +dtb=(${version[@]/#/\/boot\/dtb-}) +dtb=(${dtb[@]%-*}) + +if [ ! -d /boot/extlinux.d ] ; then + echo "/boot/extlinux.d: no such directory" + exit 1 +fi +entry_file=/boot/extlinux.d/50_generated.conf +print_header > $entry_file + +echo "DEFAULT linux_0" >> $entry_file +echo "" >> $entry_file + +entry_id=0 +for ((i=0;i<${#zimage[@]};i++)) ; do + if [ -r ${initrd[$i]} -a -r ${zimage[$i]} -a -d ${dtb[$i]} ] ; then + for dtbfile in / $U_BOOT_DTB_LINUX_DEFAULT ; do + print_entry linux_$((entry_id++)) ${zimage[$i]} ${initrd[$i]} "$U_BOOT_CMDLINE_LINUX_DEFAULT" ${dtb[$i]}'/'${dtbfile} >> $entry_file + done + + if [ "x$U_BOOT_DISABLE_RECOVERY" == "x" ] ; then + for dtbfile in / $U_BOOT_DTB_LINUX_RECOVERY ; do + print_entry linux_$((entry_id++)) ${zimage[$i]} ${initrd[$i]} "$U_BOOT_CMDLINE_LINUX_RECOVERY" ${dtb[$i]}'/'${dtbfile} >> $entry_file + done + fi + fi +done + +tmp_file=$(mkdir -p /boot/extlinux && mktemp -p /boot/extlinux) +print_header > $tmp_file +configs=(`find /boot/extlinux.d -maxdepth 1 -name \*.conf | sort`) + +for ((i=0;i<${#configs[@]};i++)) ; do + echo "### ${configs[$i]}" >> $tmp_file + cat ${configs[$i]} >> $tmp_file +done + +sync + +if [ -e /boot/extlinux/extlinux.conf ] ; then + cp /boot/extlinux/extlinux.conf /boot/extlinux/extlinux.conf.old + sync +fi + +mv $tmp_file /boot/extlinux/extlinux.conf +sync +exit 0