poprawka grub.spec
likon
likon_pc at o2.pl
Wed Aug 27 19:46:13 CEST 2003
Przy instalacji terazniejszego gruba uzywajac grub-install /dev/hda
wyskakuje blad ze nie ma pewnych plikow w katalogu /boot/grub/i386-pld
musialem to recznei wszystko przekopiowac i wziolem sie za przerobke
speca i patchy.
Co do patchy to bylo tak ze
Patch0:
%{name}-install.in.patch
Patch1: %{name}-installcopyonly.patch
patch 1 patchowal to co zrobil patch 0
pozatym patch 1 tworzyl funkcje copy_images i
jak widac przy instalacji gruba musza byc skopiowane pewne pliki co daje
nam wlasnie funkcja copy_images jednak zostala ona wywolywana dopiero po
kodzie:
if test -f "$pkgdatadir/stage1";
then
:
else
echo "${pkgdatadir}/stage1: Not found."
1>&2
exit
1
fi
if test -f "$pkgdatadir/stage2";
then
:
else
echo "${pkgdatadir}/stage2: Not found."
1>&2
exit
1
fi
co powodowalo ze pliki nie mogly zostac skopiowane bo program wywalal
sie na powyzszym kodzie bo poprostu plikow nie bylo. Pozwolilem sobie
wyrzucic patch 0 i zmodyfikowac patch1 tak aby nie patchowal patcha 0
tylko juz na odrazu nanosil poprawki zmienilem tez troszke jego kod.
A wiec wywalilem patch 0 a patch 1 zmodyfikowalem w duzej czesci i
nazwalem go tak samo, takze przesylam tu caly patch, ktory nalezy
podmienic ze starym. Teraz juz wszystko jest ok.
Zmienilem rowniez male wpisyw w specu powniewaz pewne pliki powinny byc
umieszczone w /boot/grub/i386-pld a byly w /boot/grub co powodowalo
bledy w grub-install.
Ok to na tyle, jesli jest all ok to prosilbym o wrzucenie tego do cvsu.
Pozdro
Likon
-------------- next part --------------
diff -uraN grub-0.93.orig/util/grub-install.in grub-0.93/util/grub-install.in
--- grub-0.93.orig/util/grub-install.in 2002-05-20 13:21:50.000000000 +0200
+++ grub-0.93/util/grub-install.in 2003-08-27 19:16:44.000000000 +0200
@@ -39,6 +39,7 @@
force_lba=
recheck=no
debug=no
+justcopy=no
# look for secure tempfile creation wrappers on this platform
if test -x /bin/tempfile; then
@@ -208,6 +209,17 @@
echo "$tmp_fname"
}
+copy_images() {
+ # Copy the GRUB images to the GRUB directory.
+ for file in ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5; do
+ rm -f $file || exit 1
+ done
+ for file in \
+ ${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5; do
+ cp -f $file ${grubdir} || exit 1
+ done
+}
+
# Check the arguments.
for option in "$@"; do
case "$option" in
@@ -225,6 +237,8 @@
force_lba="--force-lba" ;;
--recheck)
recheck=yes ;;
+ --just-copy)
+ justcopy=yes ;;
# This is an undocumented feature...
--debug)
debug=yes ;;
@@ -243,12 +257,6 @@
esac
done
-if test "x$install_device" = x; then
- echo "install_device not specified." 1>&2
- usage
- exit 1
-fi
-
# If the debugging feature is enabled, print commands.
if test $debug = yes; then
set -x
@@ -271,6 +279,20 @@
grubdir=${bootdir}/grub
device_map=${grubdir}/device.map
+# if they just want the images copied, copy the images and then exit
+if test $justcopy = yes; then
+ copy_images
+ exit 0
+else
+ copy_images
+fi
+
+if test "x$install_device" = x; then
+ echo "install_device not specified." 1>&2
+ usage
+ exit 1
+fi
+
# Check if GRUB is installed
if test -f "$grub_shell"; then
:
@@ -378,15 +400,6 @@
exit 1
fi
-# Copy the GRUB images to the GRUB directory.
-for file in ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5; do
- rm -f $file || exit 1
-done
-for file in \
- ${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5; do
- cp -f $file ${grubdir} || exit 1
-done
-
# Make sure that GRUB reads the same images as the host OS.
test -n "$mkimg" && img_file=`$mkimg`
test -n "$mklog" && log_file=`$mklog`
-------------- next part --------------
--- grub.spec.orig 2003-08-27 19:32:31.000000000 +0200
+++ grub.spec 2003-08-27 19:27:25.000000000 +0200
@@ -8,7 +8,7 @@
Summary(pt_BR): Gerenciador de inicializaçăo GRUB
Name: grub
Version: 0.93
-Release: 1
+Release: 2
License: GPL
Group: Base
Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz
@@ -18,7 +18,7 @@
Source3: %{name}_functions.sh
Source4: %{name}-splash.xpm.gz
# Source4-md5: 2842e2955603e3b6d722690b3cdd48a9
-Patch0: %{name}-install.in.patch
+#Patch0: %{name}-install.in.patch
Patch1: %{name}-installcopyonly.patch
Patch2: %{name}-addsyncs.patch
Patch3: %{name}-automake16.patch
@@ -81,9 +81,9 @@
%prep
%setup -q
-%patch0 -p1
+#%patch0 -p1
%patch1 -p1
-#%patch2 -p1
+#%%patch2 -p1
%patch3 -p1
%patch4 -p0
%patch5 -p0
@@ -115,9 +115,6 @@
%{__make} install DESTDIR=$RPM_BUILD_ROOT
-mv -f $RPM_BUILD_ROOT%{_datadir}/grub/%{_arch}-*/* \
- $RPM_BUILD_ROOT%{_datadir}/grub/
-
install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/grub/menu.lst
install %{SOURCE2} $RPM_BUILD_ROOT%{_sbindir}/rebootin
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-boot
@@ -136,7 +133,7 @@
%defattr(644,root,root,755)
%doc TODO BUGS NEWS ChangeLog docs/menu.lst
%dir %{_datadir}/grub
-%{_datadir}/grub/*stage*
+%{_datadir}/grub/%{_arch}-*/*stage*
%{_datadir}/grub/splash.xpm.gz
%config(noreplace) %verify(not mtime md5 size) %{_datadir}/grub/menu.lst
%attr(754,root,root) %{_bindir}/*
More information about the pld-devel-pl
mailing list