Ostatnio natknąłem się na pld'ziane rc-boot (lepiej późno niż wcale;)) i po przeczytaniu wątku na temat nietypowego zastosowania rescuecd przyszło mi do głowy parę rzeczy które można obejrzeć w załącznikach.
Zanim wrzucę chciałem zapytać czy ktoś ma coś przeciwko? Czy coś może zrobić inaczej/lepiej? -- Pozdrawiam, Kamil Dziedzic
TYPE=Linux ROOT=/dev/ram0 KERNEL=/boot/memtest86+.vmlinuz
--- memtest86+.spec 13 Feb 2007 06:46:53 -0000 1.17 +++ memtest86+.spec 1 Jan 2008 16:22:40 -0000 @@ -6,11 +6,12 @@ Summary(uk.UTF-8): Тест пам'яті для x86-архітектури Name: memtest86+ Version: 1.70 -Release: 1 +Release: 2 License: GPL Group: Applications/System Source0: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz # Source0-md5: ee447fa46b75cf98538fa60667eb079d +Source1: %{name}.image Patch0: %{name}-i686-ld.patch URL: http://www.memtest.org/ ExclusiveArch: %{ix86} @@ -60,6 +61,19 @@ Також може використовуватися для створення завантажувальної тест-дискети. +%package -n rc-boot-image-memtest86+ +Summary: memtest86+ image for rc-boot +Summary(pl.UTF-8): Obraz memtest86+ dla rc-boot +Group: Base +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: rc-boot + +%description -n rc-boot-image-memtest86+ +memtest86+ image for rc-boot. + +%description -n rc-boot-image-memtest86+ -l pl.UTF-8 +Obraz memtest86+ dla rc-boot. + %prep %setup -q #%patch0 -p1 @@ -72,17 +86,34 @@ %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/boot -install memtest.bin $RPM_BUILD_ROOT/boot/memtest86+ +install -d $RPM_BUILD_ROOT/etc/sysconfig/rc-boot/images +install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-boot/images/%{name} + +install -d $RPM_BUILD_ROOT/boot +install memtest.bin $RPM_BUILD_ROOT/boot/%{name}.vmlinuz %clean rm -rf $RPM_BUILD_ROOT +%postun -n rc-boot-image-memtest86+ +if [ -x /sbin/rc-boot ]; then + /sbin/rc-boot 1>&2 || : +fi + +%post -n rc-boot-image-memtest86+ +if [ -x /sbin/rc-boot ]; then + /sbin/rc-boot 1>&2 || : +fi + %files %defattr(644,root,root,755) %doc README -/boot/memtest86+ +/boot/%{name}.vmlinuz + +%files -n rc-boot-image-memtest86+ +%defattr(644,root,root,755) +%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-boot/images/%{name} %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog @@ -138,4 +169,3 @@ Revision 1.1 2004/02/20 11:55:33 areq - init PLD spec (based on memtest86.spec) -
TYPE=Linux ROOT=auto KERNEL=/boot/vmlinuz INITRD=/boot/initrd
--- rc-boot.spec 12 Feb 2007 22:09:12 -0000 1.26
+++ rc-boot.spec 1 Jan 2008 16:21:39 -0000
@@ -3,15 +3,17 @@
Summary(pl.UTF-8): Skrypty do zarządzania bootloaderami
Name: rc-boot
Version: 1.1
-Release: 5
+Release: 6
License: GPL
Group: Base
Source0: %{name}-%{version}.tar.gz
# Source0-md5: 2a6e4d604d938ab7567e419c21725d88
-Conflicts: lilo < 22.0.2-2
-Conflicts: grub < 0.90-2
+Source1: PLD.image
+Patch0: %{name}-prefer-PLD.patch
Requires: bootloader
Requires: sed
+Conflicts: grub < 0.90-2
+Conflicts: lilo < 22.0.2-2
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -23,14 +25,29 @@
%description -l pl.UTF-8
Skrypty do zarządzania bootloaderami.
+%package -n rc-boot-image-PLD
+Summary: PLD image for rc-boot
+Summary(pl.UTF-8): Obraz PLD dla rc-boot
+Group: Base
+Requires: rc-boot
+
+%description -n rc-boot-image-PLD
+PLD image for rc-boot.
+
+%description -n rc-boot-image-PLD -l pl.UTF-8
+Obraz PLD dla rc-boot.
+
%prep
%setup -q
+%patch0 -p1
mv doc/Assum{tp,pt}ions # typo ;)
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/sbin,%{_sysconfdir}/images,%{_mandir}/man8}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-boot/images/PLD
+
install src/rc-boot $RPM_BUILD_ROOT/sbin
install doc/config $RPM_BUILD_ROOT%{_sysconfdir}
install doc/rc-boot.8 $RPM_BUILD_ROOT%{_mandir}/man8
@@ -38,6 +55,16 @@
%clean
rm -rf $RPM_BUILD_ROOT
+%postun -n rc-boot-image-PLD
+if [ -x /sbin/rc-boot ]; then
+ /sbin/rc-boot 1>&2 || :
+fi
+
+%post -n rc-boot-image-PLD
+if [ -x /sbin/rc-boot ]; then
+ /sbin/rc-boot 1>&2 || :
+fi
+
%files
%defattr(644,root,root,755)
%doc doc/{Assumptions,Authors,BUGS,README,config,image}
@@ -47,6 +74,10 @@
%attr(750,root,root) %dir %{_sysconfdir}/images
%{_mandir}/man8/*
+%files -n rc-boot-image-PLD
+%defattr(644,root,root,755)
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-boot/images/PLD
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <[EMAIL PROTECTED]>
TYPE=Linux ROOT=/dev/ram0 KERNEL=/boot/rescuecd.vmlinuz INITRD=/boot/rescuecd.initrd
# $Revision:$, $Date:$
Summary: PLD RescueCD
Name: rescuecd
Version: 2.90
Release: 1
License: GPL v2
Group: Applications/System
%ifarch %{ix86}
Source0:
http://rescuecd.pld-linux.org/download/PLDRescueCD-%{version}/x86/RCDx86_%(echo
%{version} | tr -d .).iso
# Source0-md5: e05fbd740be1f34c434d42da7e04bdce
Source1:
http://rescuecd.pld-linux.org/download/PLDRescueCD-%{version}/x86/rcdmod
# Source1-md5: 7c59799486d3cdf009acc0f5c75fefe4
%endif
%ifarch %{x8664}
Source2:
http://rescuecd.pld-linux.org/download/PLDRescueCD-%{version}/x86_64/RCDx64_%(echo
%{version} | tr -d .).iso
# Source2-md5: e05fbd740be1f34c434d42da7e04bdce
Source3:
http://rescuecd.pld-linux.org/download/PLDRescueCD-%{version}/x86_64/rcdmod
# Source3-md5: 7c59799486d3cdf009acc0f5c75fefe4
%endif
Source4: %{name}.image
URL: http://rescuecd.pld-linux.org/
BuildRequires: /usr/bin/isoinfo
ExclusiveArch: %{ix86} %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
PLD RescueCD
%package -n rc-boot-image-rescuecd
Summary: rescuecd image for rc-boot
Summary(pl.UTF-8): Obraz rescuecd dla rc-boot
Group: Base
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: rc-boot
%description -n rc-boot-image-rescuecd
rescuecd image for rc-boot.
%description -n rc-boot-image-rescuecd -l pl.UTF-8
Obraz rescuecd dla rc-boot.
%prep
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/sysconfig/rc-boot/images
install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-boot/images/%{name}
install -d $RPM_BUILD_ROOT/boot
%ifarch %{ix86}
isoinfo -R -i %{SOURCE0} -x /rescue.cpi > $RPM_BUILD_ROOT/boot/%{name}.initrd
isoinfo -R -i %{SOURCE0} -x /boot/isolinux/vmlinuz >
$RPM_BUILD_ROOT/boot/%{name}.vmlinuz
%endif
%ifarch %{x8664}
isoinfo -R -i %{SOURCE2} -x /rescue.cpi > $RPM_BUILD_ROOT/boot/%{name}.initrd
isoinfo -R -i %{SOURCE2} -x /boot/isolinux/vmlinuz >
$RPM_BUILD_ROOT/boot/%{name}.vmlinuz
%endif
install -d $RPM_BUILD_ROOT%{_bindir}
%ifarch %{ix86}
install %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}
%endif
%ifarch %{x8664}
install %{SOURCE3} $RPM_BUILD_ROOT/%{_bindir}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%postun -n rc-boot-image-rescuecd
if [ -x /sbin/rc-boot ]; then
/sbin/rc-boot 1>&2 || :
fi
%post -n rc-boot-image-rescuecd
if [ -x /sbin/rc-boot ]; then
/sbin/rc-boot 1>&2 || :
fi
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/rcdmod
/boot/%{name}.initrd
/boot/%{name}.vmlinuz
%files -n rc-boot-image-rescuecd
%defattr(644,root,root,755)
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size)
/etc/sysconfig/rc-boot/images/%{name}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <[EMAIL PROTECTED]>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log:$--- rc-boot-1.1/src/rc-boot 2002-08-20 16:22:48.000000000 +0000
+++ rc-boot-1.1/src/rc-boot 2008-01-01 16:04:59.000000000 +0000
@@ -248,8 +248,14 @@
done
if [ "$DEFAULT" = "" ] ; then
- DEFAULT=$first
- msg "$first taken as defult image"
+ IM_File=${CONFIG_DIR}/images/PLD
+ if [ -f ${IM_File} ] && load_image ${IM_File} ; then
+ DEFAULT=$NAME
+ msg "$NAME taken as defult image"
+ else
+ DEFAULT=$first
+ msg "$first taken as defult image"
+ fi
elif [ "$def" = nok ] ; then
die "cannot found default image ($DEFAULT) in $CONFIG_DIR/images"
fi
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ pld-devel-pl mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl
