Hello community,

here is the log from the commit of package dtb-source for openSUSE:Factory 
checked in at 2015-12-13 09:39:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dtb-source (Old)
 and      /work/SRC/openSUSE:Factory/.dtb-source.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dtb-source"

Changes:
--------
--- /work/SRC/openSUSE:Factory/dtb-source/dtb-aarch64.changes   2015-11-08 
11:26:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dtb-source.new/dtb-aarch64.changes      
2015-12-13 09:39:47.000000000 +0100
@@ -1,0 +2,23 @@
+Mon Dec  7 15:01:16 UTC 2015 - [email protected]
+
+- add post requires for the new dtb symlink generation
+
+-------------------------------------------------------------------
+Thu Dec  3 05:09:54 UTC 2015 - [email protected]
+
+- Simplify multiversion naming
+
+-------------------------------------------------------------------
+Thu Dec  3 04:24:31 UTC 2015 - [email protected]
+
+- Mark dtb subpackages as multiversion
+
+-------------------------------------------------------------------
+Sun Nov 15 20:05:21 UTC 2015 - [email protected]
+
+- Install to kernel-specific directory
+  Prepares for multiversion dtb packages and extlinux support.
+* If /boot/dtb is not a real directory, symlink it for back compat
+- pre_checkin.pl: Run format_spec_file (for whitespace cleanup)
+
+-------------------------------------------------------------------
dtb-armv6l.changes: same change
dtb-armv7l.changes: same change
dtb-source.changes: same change

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dtb-aarch64.spec ++++++
--- /var/tmp/diff_new_pack.zzkIus/_old  2015-12-13 09:39:48.000000000 +0100
+++ /var/tmp/diff_new_pack.zzkIus/_new  2015-12-13 09:39:48.000000000 +0100
@@ -19,6 +19,7 @@
 Name:           dtb-aarch64
 BuildRequires:  kernel-source
 %define kernel_version %(rpm -q --qf "%{VERSION}" kernel-source | grep -v "is 
not")
+%define kernel_release %(rpm -q --qf "%{RELEASE}" kernel-source | grep -v "is 
not" | cut -d. -f 1)
 Version:        %kernel_version
 Release:        0
 Summary:        Device Tree files for $MACHINES
@@ -41,6 +42,8 @@
 %package -n dtb-apm-mustang
 Summary:        APM X-Gene Mustang board
 Group:          System/Boot
+Provides:       multiversion(dtb)
+Requires(post): coreutils
 
 %description -n dtb-apm-mustang
 Device Tree Files for APM X-Gene Mustang board.
@@ -48,6 +51,8 @@
 %package -n dtb-thunder-88xx
 Summary:        Cavium ThunderX CN88XX
 Group:          System/Boot
+Provides:       multiversion(dtb)
+Requires(post): coreutils
 
 %description -n dtb-thunder-88xx
 Device Tree Files for Cavium ThunderX CN88XX.
@@ -55,6 +60,8 @@
 %package -n dtb-foundation-v8
 Summary:        Foundation-V8A (compatible with Vexpress64)
 Group:          System/Boot
+Provides:       multiversion(dtb)
+Requires(post): coreutils
 
 %description -n dtb-foundation-v8
 Device Tree Files for Foundation-V8A (compatible with Vexpress64).
@@ -62,6 +69,8 @@
 %package -n dtb-rtsm_ve-aemv8a
 Summary:        RTSM VE AEMv8A board (compatible with Vexpress64)
 Group:          System/Boot
+Provides:       multiversion(dtb)
+Requires(post): coreutils
 
 %description -n dtb-rtsm_ve-aemv8a
 Device Tree Files for RTSM VE AEMv8A board (compatible with Vexpress64).
@@ -75,47 +84,81 @@
 cp -r /usr/src/linux/ .
 chmod -R ug+rw linux
 
+%define dtbdir /boot/dtb-%{kernel_version}-%{kernel_release}
+
 %install
 %if "dtb-aarch64" != "dtb-source"
 export DTC_FLAGS="-R 4 -p 0x1000"
-mkdir -p %{buildroot}/boot/dtb
+mkdir -p %{buildroot}%{dtbdir}
 
 cd linux/arch/arm64/boot/dts
 for dts in apm/apm-mustang.dts cavium/thunder-88xx.dts arm/foundation-v8.dts 
arm/rtsm_ve-aemv8a.dts ; do
        target=${dts%*.dts}
        cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I./include/ 
-P $target.dts -o $target.dts.tmp
-       install -m 700 -d %{buildroot}/boot/dtb/$(dirname $target)
-       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}/boot/dtb/$target.dtb 
$target.dts.tmp
+       install -m 700 -d %{buildroot}%{dtbdir}/$(dirname $target)
+       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}%{dtbdir}/$target.dtb 
$target.dts.tmp
 done
 cd -
 
+%post -n dtb-apm-mustang
+cd /boot
+# If /boot/dtb is a symlink, remove it, so that we can replace it.
+[ -d dtb ] && [ -L dtb ] && rm -f dtb
+# Unless /boot/dtb exists as real directory, create a symlink.
+[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb
+
+%post -n dtb-thunder-88xx
+cd /boot
+# If /boot/dtb is a symlink, remove it, so that we can replace it.
+[ -d dtb ] && [ -L dtb ] && rm -f dtb
+# Unless /boot/dtb exists as real directory, create a symlink.
+[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb
+
+%post -n dtb-foundation-v8
+cd /boot
+# If /boot/dtb is a symlink, remove it, so that we can replace it.
+[ -d dtb ] && [ -L dtb ] && rm -f dtb
+# Unless /boot/dtb exists as real directory, create a symlink.
+[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb
+
+%post -n dtb-rtsm_ve-aemv8a
+cd /boot
+# If /boot/dtb is a symlink, remove it, so that we can replace it.
+[ -d dtb ] && [ -L dtb ] && rm -f dtb
+# Unless /boot/dtb exists as real directory, create a symlink.
+[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb
+
 %files -n dtb-apm-mustang
 %defattr(-,root,root)
 %doc COPYING
-%dir /boot/dtb/
-%dir /boot/dtb/apm
-/boot/dtb/apm/apm-mustang.dtb
+%ghost /boot/dtb
+%dir %{dtbdir}
+%dir %{dtbdir}/apm
+%{dtbdir}/apm/apm-mustang.dtb
 
 %files -n dtb-thunder-88xx
 %defattr(-,root,root)
 %doc COPYING
-%dir /boot/dtb/
-%dir /boot/dtb/cavium
-/boot/dtb/cavium/thunder-88xx.dtb
+%ghost /boot/dtb
+%dir %{dtbdir}
+%dir %{dtbdir}/cavium
+%{dtbdir}/cavium/thunder-88xx.dtb
 
 %files -n dtb-foundation-v8
 %defattr(-,root,root)
 %doc COPYING
-%dir /boot/dtb/
-%dir /boot/dtb/arm
-/boot/dtb/arm/foundation-v8.dtb
+%ghost /boot/dtb
+%dir %{dtbdir}
+%dir %{dtbdir}/arm
+%{dtbdir}/arm/foundation-v8.dtb
 
 %files -n dtb-rtsm_ve-aemv8a
 %defattr(-,root,root)
 %doc COPYING
-%dir /boot/dtb/
-%dir /boot/dtb/arm
-/boot/dtb/arm/rtsm_ve-aemv8a.dtb
+%ghost /boot/dtb
+%dir %{dtbdir}
+%dir %{dtbdir}/arm
+%{dtbdir}/arm/rtsm_ve-aemv8a.dtb
 
 %endif
 

++++++ dtb-armv6l.spec ++++++
--- /var/tmp/diff_new_pack.zzkIus/_old  2015-12-13 09:39:48.000000000 +0100
+++ /var/tmp/diff_new_pack.zzkIus/_new  2015-12-13 09:39:48.000000000 +0100
@@ -19,6 +19,7 @@
 Name:           dtb-armv6l
 BuildRequires:  kernel-source
 %define kernel_version %(rpm -q --qf "%{VERSION}" kernel-source | grep -v "is 
not")
+%define kernel_release %(rpm -q --qf "%{RELEASE}" kernel-source | grep -v "is 
not" | cut -d. -f 1)
 Version:        %kernel_version
 Release:        0
 Summary:        Device Tree files for $MACHINES
@@ -39,11 +40,13 @@
 Device Tree files for $MACHINES.
 
 %package -n dtb-bcm2835
-Summary:        Raspberry PI B
+Summary:        Raspberry Pi B
 Group:          System/Boot
+Provides:       multiversion(dtb)
+Requires(post): coreutils
 
 %description -n dtb-bcm2835
-Device Tree Files for Raspberry PI B.
+Device Tree Files for Raspberry Pi B.
 
 
 
@@ -54,25 +57,35 @@
 cp -r /usr/src/linux/ .
 chmod -R ug+rw linux
 
+%define dtbdir /boot/dtb-%{kernel_version}-%{kernel_release}
+
 %install
 %if "dtb-armv6l" != "dtb-source"
 export DTC_FLAGS="-R 4 -p 0x1000"
-mkdir -p %{buildroot}/boot/dtb
+mkdir -p %{buildroot}%{dtbdir}
 
 cd linux/arch/arm/boot/dts
 for dts in bcm2835*.dts ; do
        target=${dts%*.dts}
        cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I./include/ 
-P $target.dts -o $target.dts.tmp
-       install -m 700 -d %{buildroot}/boot/dtb/$(dirname $target)
-       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}/boot/dtb/$target.dtb 
$target.dts.tmp
+       install -m 700 -d %{buildroot}%{dtbdir}/$(dirname $target)
+       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}%{dtbdir}/$target.dtb 
$target.dts.tmp
 done
 cd -
 
+%post -n dtb-bcm2835
+cd /boot
+# If /boot/dtb is a symlink, remove it, so that we can replace it.
+[ -d dtb ] && [ -L dtb ] && rm -f dtb
+# Unless /boot/dtb exists as real directory, create a symlink.
+[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} dtb
+
 %files -n dtb-bcm2835
 %defattr(-,root,root)
 %doc COPYING
-%dir /boot/dtb/
-/boot/dtb/bcm2835*.dtb
+%ghost /boot/dtb
+%dir %{dtbdir}
+%{dtbdir}/bcm2835*.dtb
 
 %endif
 

++++++ dtb-armv7l.spec ++++++
++++ 785 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/dtb-source/dtb-armv7l.spec
++++ and /work/SRC/openSUSE:Factory/.dtb-source.new/dtb-armv7l.spec

++++++ dtb-source.spec ++++++
--- /var/tmp/diff_new_pack.zzkIus/_old  2015-12-13 09:39:48.000000000 +0100
+++ /var/tmp/diff_new_pack.zzkIus/_new  2015-12-13 09:39:48.000000000 +0100
@@ -19,6 +19,7 @@
 Name:           dtb-source
 BuildRequires:  kernel-source
 %define kernel_version %(rpm -q --qf "%{VERSION}" kernel-source | grep -v "is 
not")
+%define kernel_release %(rpm -q --qf "%{RELEASE}" kernel-source | grep -v "is 
not" | cut -d. -f 1)
 Version:        %kernel_version
 Release:        0
 Summary:        Device Tree files for $MACHINES
@@ -46,17 +47,19 @@
 cp -r /usr/src/linux/ .
 chmod -R ug+rw linux
 
+%define dtbdir /boot/dtb-%{kernel_version}-%{kernel_release}
+
 %install
 %if "dtb-source" != "dtb-source"
 export DTC_FLAGS="-R 4 -p 0x1000"
-mkdir -p %{buildroot}/boot/dtb
+mkdir -p %{buildroot}%{dtbdir}
 
 cd linux/arch/arm/boot/dts
 for dts in ; do
        target=${dts%*.dts}
        cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I./include/ 
-P $target.dts -o $target.dts.tmp
-       install -m 700 -d %{buildroot}/boot/dtb/$(dirname $target)
-       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}/boot/dtb/$target.dtb 
$target.dts.tmp
+       install -m 700 -d %{buildroot}%{dtbdir}/$(dirname $target)
+       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}%{dtbdir}/$target.dtb 
$target.dts.tmp
 done
 cd -
 

++++++ dtb.spec.in ++++++
--- /var/tmp/diff_new_pack.zzkIus/_old  2015-12-13 09:39:48.000000000 +0100
+++ /var/tmp/diff_new_pack.zzkIus/_new  2015-12-13 09:39:48.000000000 +0100
@@ -19,6 +19,7 @@
 Name:           $NAME
 BuildRequires:  kernel-source
 %define kernel_version %(rpm -q --qf "%{VERSION}" kernel-source | grep -v "is 
not")
+%define kernel_release %(rpm -q --qf "%{RELEASE}" kernel-source | grep -v "is 
not" | cut -d. -f 1)
 Version:        %kernel_version
 Release:        0
 Summary:        Device Tree files for $MACHINES
@@ -47,20 +48,23 @@
 cp -r /usr/src/linux/ .
 chmod -R ug+rw linux
 
+%define dtbdir /boot/dtb-%{kernel_version}-%{kernel_release}
+
 %install
 %if "$NAME" != "dtb-source"
 export DTC_FLAGS="-R 4 -p 0x1000"
-mkdir -p %{buildroot}/boot/dtb
+mkdir -p %{buildroot}%{dtbdir}
 
 cd $DTS_folder
 for dts in $ALL_SUPPORTED_DTB; do
        target=${dts%*.dts}
        cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I./include/ 
-P $target.dts -o $target.dts.tmp
-       install -m 700 -d %{buildroot}/boot/dtb/$(dirname $target)
-       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}/boot/dtb/$target.dtb 
$target.dts.tmp
+       install -m 700 -d %{buildroot}%{dtbdir}/$(dirname $target)
+       dtc $DTC_FLAGS -I dts -O dtb -o %{buildroot}%{dtbdir}/$target.dtb 
$target.dts.tmp
 done
 cd -
 
+$SUBPKG_POST
 $SUBPKG_FILES
 %endif
 

++++++ pre_checkin.pl ++++++
--- /var/tmp/diff_new_pack.zzkIus/_old  2015-12-13 09:39:48.000000000 +0100
+++ /var/tmp/diff_new_pack.zzkIus/_new  2015-12-13 09:39:48.000000000 +0100
@@ -41,7 +41,7 @@
 
 # DTB packages names
 my @armv6l_package_list = (
-     ['dtb-bcm2835',   'bcm2835*.dts',   "Raspberry PI B"],
+     ['dtb-bcm2835',   'bcm2835*.dts',   "Raspberry Pi B"],
 );
 
 # DTB packages names
@@ -56,6 +56,7 @@
 {
     my ($main_package, $exclusive_arch, $package_list) = @_;
 
+    # open .spec and .spec.in files
     open (SPEC, ">$main_package.spec") or die "Unable to open 
$main_package.spec.\n";
     open (TEMPLATE, "$spec_in") or die "Unable to open $spec_in.\n";
 
@@ -64,6 +65,7 @@
         unless ($exclusive_arch eq 'none');
 
     my $subpkg_desc = "";
+    my $subpkg_post = "";
     my $subpkg_files = "";
     my $all_supported_dtb = "";
     my $DTS_folder = "linux/arch/arm/boot/dts";
@@ -72,7 +74,6 @@
     }
 
     foreach my $NAME (@$package_list) {
-        # open .spec and .spec.in files
         my $PKG_NAME = @{$NAME}[0];
         my $SUPPORTED_DTB = @{$NAME}[1];
         my $MACHINES = @{$NAME}[2];
@@ -81,25 +82,36 @@
             "%package -n $PKG_NAME\n" .
             "Summary:        $MACHINES\n" .
             "Group:          System/Boot\n" .
+            "Provides:       multiversion(dtb)\n" .
+            "Requires(post): coreutils\n" .
             "\n" .
             "%description -n $PKG_NAME\n" .
             "Device Tree Files for $MACHINES.\n\n";
 
+        $subpkg_post .=
+            "%post -n $PKG_NAME\n" .
+            "cd /boot\n" .
+            "# If /boot/dtb is a symlink, remove it, so that we can replace 
it.\n" .
+            "[ -d dtb ] && [ -L dtb ] && rm -f dtb\n" .
+            "# Unless /boot/dtb exists as real directory, create a symlink.\n" 
.
+            "[ -d dtb ] || ln -sf dtb-%{kernel_version}-%{kernel_release} 
dtb\n\n";
+
         my $bin_supported_dtb = $SUPPORTED_DTB;
         $bin_supported_dtb =~ s/\.dts/\.dtb/g;
 
         my $dtb_subdir = "";
         if ($bin_supported_dtb =~ /(.*)\/[^\/]+$/) {
-            $dtb_subdir = "%dir /boot/dtb/$1\n";
+            $dtb_subdir = "%dir %{dtbdir}/$1\n";
         }
 
         $subpkg_files .=
             "%files -n $PKG_NAME\n" .
             "%defattr(-,root,root)\n" .
             "%doc COPYING\n" .
-            "%dir /boot/dtb/\n" .
+            "%ghost /boot/dtb\n" .
+            "%dir %{dtbdir}\n" .
             $dtb_subdir .
-            "/boot/dtb/$bin_supported_dtb\n" .
+            "%{dtbdir}/$bin_supported_dtb\n" .
             "\n";
 
         $all_supported_dtb .= "$SUPPORTED_DTB ";
@@ -113,6 +125,7 @@
         $_ =~ s/\$DTS_folder/$DTS_folder/g;
         $_ =~ s/\$SUBPKG_DESC/$subpkg_desc/g;
         $_ =~ s/\$ALL_SUPPORTED_DTB/$all_supported_dtb/g;
+        $_ =~ s/\$SUBPKG_POST/$subpkg_post/g;
         $_ =~ s/\$SUBPKG_FILES/$subpkg_files/g;
         print SPEC $_;
     }
@@ -130,3 +143,4 @@
 generate_spec('dtb-armv7l', "armv7l armv7hl", \@armv7l_package_list);
 generate_spec('dtb-armv6l', "armv6l armv6hl", \@armv6l_package_list);
 generate_spec('dtb-aarch64', "aarch64", \@aarch64_package_list);
+system("osc service localrun format_spec_file");


Reply via email to