- take isohybrid from 4.05 (bnc #708043)
OBS-URL: https://build.opensuse.org/package/show/system:install:head/syslinux?expand=0&rev=35
This commit is contained in:
parent
b2a3e9a447
commit
642a17fa6c
@ -1,94 +0,0 @@
|
|||||||
#
|
|
||||||
# spec file for package syslinux
|
|
||||||
#
|
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
||||||
#
|
|
||||||
# All modifications and additions to the file contributed by third parties
|
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
|
||||||
# upon. The license for this file, and modifications and additions to the
|
|
||||||
# file, is the same license as for the pristine package itself (unless the
|
|
||||||
# license for the pristine package is not an Open Source License, in which
|
|
||||||
# case the license is the MIT License). An "Open Source License" is a
|
|
||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
|
||||||
# published by the Open Source Initiative.
|
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: syslinux
|
|
||||||
ExclusiveArch: %ix86 x86_64
|
|
||||||
BuildRequires: libpng-devel nasm netpbm python xz
|
|
||||||
Url: http://syslinux.zytor.com/
|
|
||||||
License: GPLv2+
|
|
||||||
Group: System/Boot
|
|
||||||
Requires: mtools
|
|
||||||
AutoReqProv: on
|
|
||||||
Summary: Boot Loader for Linux
|
|
||||||
Version: 4.04
|
|
||||||
Release: 6
|
|
||||||
Source: %{name}-%{version}.tar.bz2
|
|
||||||
Source1: isolinux-config
|
|
||||||
Source2: README.gfxboot
|
|
||||||
Patch0: %{name}-%{version}-iso9660.diff
|
|
||||||
Patch1: %{name}-%{version}-cwd.diff
|
|
||||||
Patch2: %{name}-%{version}-noinitrd.diff
|
|
||||||
Patch3: %{name}-%{version}-mboot_bootif.diff
|
|
||||||
Patch4: %{name}-%{version}-isohybrid-hex-option-parsing.diff
|
|
||||||
Patch5: %{name}-%{version}-md5pass.diff
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
|
||||||
SYSLINUX is a boot loader for the Linux operating system which operates
|
|
||||||
off an MS-DOS or Windows FAT file system. It is intended to simplify
|
|
||||||
first-time installation of Linux and for creation of rescue and other
|
|
||||||
special purpose boot disks.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
|
||||||
--------
|
|
||||||
H. Peter Anvin <hpa@zytor.com>
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
cp %{SOURCE2} .
|
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
|
||||||
make spotless
|
|
||||||
make
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
make install-all \
|
|
||||||
INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_bindir} \
|
|
||||||
LIBDIR=%{_datadir} INCDIR=%{_includedir} MANDIR=%{_mandir}
|
|
||||||
# install -s -m 755 unix/syslinux $RPM_BUILD_ROOT/%{_bindir}/syslinux-nomtools
|
|
||||||
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}
|
|
||||||
# install -m 755 keytab-lilo.pl syslinux2ansi.pl $RPM_BUILD_ROOT/%{_datadir}/syslinux
|
|
||||||
rm -rf $RPM_BUILD_ROOT/%{_datadir}/syslinux/com32
|
|
||||||
rm -rf $RPM_BUILD_ROOT/boot
|
|
||||||
rm -rf $RPM_BUILD_ROOT/tftpboot
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc doc/*.txt
|
|
||||||
%doc README* NEWS
|
|
||||||
%doc %{_mandir}/man1/*
|
|
||||||
%{_bindir}/*
|
|
||||||
%{_datadir}/syslinux
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
@ -1,56 +1,57 @@
|
|||||||
diff --git a/utils/isohybrid.c b/utils/isohybrid.c
|
diff --git a/utils/isohybrid.c b/utils/isohybrid.c
|
||||||
index 7ee9a7f..e6c50ef 100644
|
index 7ee9a7f..8a60531 100644
|
||||||
--- a/utils/isohybrid.c
|
--- a/utils/isohybrid.c
|
||||||
+++ b/utils/isohybrid.c
|
+++ b/utils/isohybrid.c
|
||||||
@@ -135,32 +135,32 @@ check_option(int argc, char *argv[])
|
@@ -108,6 +108,7 @@ printh(void)
|
||||||
|
int
|
||||||
|
check_option(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
+ char *err = NULL;
|
||||||
|
int n = 0, ind = 0;
|
||||||
|
|
||||||
|
const char optstr[] = ":h:s:e:o:t:i:fcp?vV";
|
||||||
|
@@ -135,32 +136,38 @@ check_option(int argc, char *argv[])
|
||||||
switch (n)
|
switch (n)
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
- if (!sscanf(optarg, "%hu", &head) || head < 1 || head > 256)
|
- if (!sscanf(optarg, "%hu", &head) || head < 1 || head > 256)
|
||||||
+ if (!sscanf(optarg, "%hi", &head) || head < 1 || head > 256)
|
+ head = strtoul(optarg, &err, 0);
|
||||||
|
+ if (head < 1 || head > 256)
|
||||||
errx(1, "invalid head: `%s', 1 <= head <= 256", optarg);
|
errx(1, "invalid head: `%s', 1 <= head <= 256", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
- if (!sscanf(optarg, "%hhu", §or) || sector < 1 || sector > 63)
|
- if (!sscanf(optarg, "%hhu", §or) || sector < 1 || sector > 63)
|
||||||
+ if (!sscanf(optarg, "%hhi", §or) || sector < 1 || sector > 63)
|
+ sector = strtoul(optarg, &err, 0);
|
||||||
|
+ if (sector < 1 || sector > 63)
|
||||||
errx(1, "invalid sector: `%s', 1 <= sector <= 63", optarg);
|
errx(1, "invalid sector: `%s', 1 <= sector <= 63", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
- if (!sscanf(optarg, "%hhu", &entry) || entry < 1 || entry > 4)
|
- if (!sscanf(optarg, "%hhu", &entry) || entry < 1 || entry > 4)
|
||||||
+ if (!sscanf(optarg, "%hhi", &entry) || entry < 1 || entry > 4)
|
+ entry = strtoul(optarg, &err, 0);
|
||||||
|
+ if (entry < 1 || entry > 4)
|
||||||
errx(1, "invalid entry: `%s', 1 <= entry <= 4", optarg);
|
errx(1, "invalid entry: `%s', 1 <= entry <= 4", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'o':
|
case 'o':
|
||||||
- if (!sscanf(optarg, "%hhu", &offset) || offset > 64)
|
- if (!sscanf(optarg, "%hhu", &offset) || offset > 64)
|
||||||
+ if (!sscanf(optarg, "%hhi", &offset) || offset > 64)
|
+ offset = strtoul(optarg, &err, 0);
|
||||||
|
+ if (*err || offset > 64)
|
||||||
errx(1, "invalid offset: `%s', 0 <= offset <= 64", optarg);
|
errx(1, "invalid offset: `%s', 0 <= offset <= 64", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
- if (!sscanf(optarg, "%hu", &type) || type > 255)
|
- if (!sscanf(optarg, "%hu", &type) || type > 255)
|
||||||
+ if (!sscanf(optarg, "%hi", &type) || type > 255)
|
+ type = strtoul(optarg, &err, 0);
|
||||||
|
+ if (*err || type > 255)
|
||||||
errx(1, "invalid type: `%s', 0 <= type <= 255", optarg);
|
errx(1, "invalid type: `%s', 0 <= type <= 255", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
- if (!sscanf(optarg, "%u", &id))
|
- if (!sscanf(optarg, "%u", &id))
|
||||||
+ if (!sscanf(optarg, "%i", &id))
|
+ id = strtoul(optarg, &err, 0);
|
||||||
|
+ if (*err)
|
||||||
errx(1, "invalid id: `%s'", optarg);
|
errx(1, "invalid id: `%s'", optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
diff --git a/utils/isohybrid.h b/utils/isohybrid.h
|
|
||||||
index 826e90c..eecf1ca 100644
|
|
||||||
--- a/utils/isohybrid.h
|
|
||||||
+++ b/utils/isohybrid.h
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#define VERSION "0.11"
|
|
||||||
+#define VERSION "0.12"
|
|
||||||
#define BUFSIZE 2048
|
|
||||||
#define MBRSIZE 432
|
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 26 11:46:59 CEST 2011 - snwint@suse.de
|
||||||
|
|
||||||
|
- take isohybrid from 4.05 (bnc #708043)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 21 16:36:27 CEST 2011 - snwint@suse.de
|
Tue Jun 21 16:36:27 CEST 2011 - snwint@suse.de
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user