fix lfs patch
This commit is contained in:
parent
e032091115
commit
edfc3dd796
142
cpio-2.6-lfs.patch
Normal file
142
cpio-2.6-lfs.patch
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
--- cpio-2.6/src/extern.h.lfs 2004-09-08 10:49:57.000000000 +0000
|
||||||
|
+++ cpio-2.6/src/extern.h 2005-01-14 14:10:09.006784175 +0000
|
||||||
|
@@ -161,13 +161,13 @@
|
||||||
|
void tape_empty_output_buffer P_((int out_des));
|
||||||
|
void disk_empty_output_buffer P_((int out_des));
|
||||||
|
void swahw_array P_((char *ptr, int count));
|
||||||
|
-void tape_buffered_write P_((char *in_buf, int out_des, long num_bytes));
|
||||||
|
+void tape_buffered_write P_((char *in_buf, int out_des, off_t num_bytes));
|
||||||
|
void tape_buffered_read P_((char *in_buf, int in_des, long num_bytes));
|
||||||
|
int tape_buffered_peek P_((char *peek_buf, int in_des, int num_bytes));
|
||||||
|
void tape_toss_input P_((int in_des, long num_bytes));
|
||||||
|
-void copy_files_tape_to_disk P_((int in_des, int out_des, long num_bytes));
|
||||||
|
-void copy_files_disk_to_tape P_((int in_des, int out_des, long num_bytes, char *filename));
|
||||||
|
-void copy_files_disk_to_disk P_((int in_des, int out_des, long num_bytes, char *filename));
|
||||||
|
+void copy_files_tape_to_disk P_((int in_des, int out_des, off_t num_bytes));
|
||||||
|
+void copy_files_disk_to_tape P_((int in_des, int out_des, off_t num_bytes, char *filename));
|
||||||
|
+void copy_files_disk_to_disk P_((int in_des, int out_des, off_t num_bytes, char *filename));
|
||||||
|
void warn_if_file_changed P_((char *file_name, unsigned long old_file_size,
|
||||||
|
unsigned long old_file_mtime));
|
||||||
|
void create_all_directories P_((char *name));
|
||||||
|
--- cpio-2.6/src/util.c.lfs 2004-09-08 10:44:49.000000000 +0000
|
||||||
|
+++ cpio-2.6/src/util.c 2005-01-14 14:30:33.448133098 +0000
|
||||||
|
@@ -207,7 +207,7 @@
|
||||||
|
Exit with an error if end of file is reached. */
|
||||||
|
|
||||||
|
static int
|
||||||
|
-disk_fill_input_buffer (int in_des, int num_bytes)
|
||||||
|
+disk_fill_input_buffer (int in_des, off_t num_bytes)
|
||||||
|
{
|
||||||
|
in_buff = input_buffer;
|
||||||
|
num_bytes = (num_bytes < DISK_IO_BLOCK_SIZE) ? num_bytes : DISK_IO_BLOCK_SIZE;
|
||||||
|
@@ -227,9 +227,9 @@
|
||||||
|
When `out_buff' fills up, flush it to file descriptor OUT_DES. */
|
||||||
|
|
||||||
|
void
|
||||||
|
-tape_buffered_write (char *in_buf, int out_des, long num_bytes)
|
||||||
|
+tape_buffered_write (char *in_buf, int out_des, off_t num_bytes)
|
||||||
|
{
|
||||||
|
- register long bytes_left = num_bytes; /* Bytes needing to be copied. */
|
||||||
|
+ register off_t bytes_left = num_bytes; /* Bytes needing to be copied. */
|
||||||
|
register long space_left; /* Room left in output buffer. */
|
||||||
|
|
||||||
|
while (bytes_left > 0)
|
||||||
|
@@ -254,9 +254,9 @@
|
||||||
|
When `out_buff' fills up, flush it to file descriptor OUT_DES. */
|
||||||
|
|
||||||
|
void
|
||||||
|
-disk_buffered_write (char *in_buf, int out_des, long num_bytes)
|
||||||
|
+disk_buffered_write (char *in_buf, int out_des, off_t num_bytes)
|
||||||
|
{
|
||||||
|
- register long bytes_left = num_bytes; /* Bytes needing to be copied. */
|
||||||
|
+ register off_t bytes_left = num_bytes; /* Bytes needing to be copied. */
|
||||||
|
register long space_left; /* Room left in output buffer. */
|
||||||
|
|
||||||
|
while (bytes_left > 0)
|
||||||
|
@@ -407,9 +407,9 @@
|
||||||
|
write_nuls_to_file (long num_bytes, int out_des,
|
||||||
|
void (*writer) (char *in_buf, int out_des, long num_bytes))
|
||||||
|
{
|
||||||
|
- long blocks;
|
||||||
|
+ off_t blocks;
|
||||||
|
long extra_bytes;
|
||||||
|
- long i;
|
||||||
|
+ off_t i;
|
||||||
|
|
||||||
|
blocks = num_bytes / 512;
|
||||||
|
extra_bytes = num_bytes % 512;
|
||||||
|
@@ -428,10 +428,10 @@
|
||||||
|
NUM_BYTES is the number of bytes to copy. */
|
||||||
|
|
||||||
|
void
|
||||||
|
-copy_files_tape_to_disk (int in_des, int out_des, long num_bytes)
|
||||||
|
+copy_files_tape_to_disk (int in_des, int out_des, off_t num_bytes)
|
||||||
|
{
|
||||||
|
- long size;
|
||||||
|
- long k;
|
||||||
|
+ off_t size;
|
||||||
|
+ off_t k;
|
||||||
|
|
||||||
|
while (num_bytes > 0)
|
||||||
|
{
|
||||||
|
@@ -458,13 +458,13 @@
|
||||||
|
NUM_BYTES is the number of bytes to copy. */
|
||||||
|
|
||||||
|
void
|
||||||
|
-copy_files_disk_to_tape (int in_des, int out_des, long num_bytes,
|
||||||
|
+copy_files_disk_to_tape (int in_des, int out_des, off_t num_bytes,
|
||||||
|
char *filename)
|
||||||
|
{
|
||||||
|
- long size;
|
||||||
|
- long k;
|
||||||
|
+ off_t size;
|
||||||
|
+ off_t k;
|
||||||
|
int rc;
|
||||||
|
- long original_num_bytes;
|
||||||
|
+ off_t original_num_bytes;
|
||||||
|
|
||||||
|
original_num_bytes = num_bytes;
|
||||||
|
|
||||||
|
@@ -476,10 +476,10 @@
|
||||||
|
num_bytes : DISK_IO_BLOCK_SIZE))
|
||||||
|
{
|
||||||
|
if (rc > 0)
|
||||||
|
- error (0, 0, _("File %s shrunk by %ld bytes, padding with zeros"),
|
||||||
|
+ error (0, 0, _("File %s shrunk by %lld bytes, padding with zeros"),
|
||||||
|
filename, num_bytes);
|
||||||
|
else
|
||||||
|
- error (0, 0, _("Read error at byte %ld in file %s, padding with zeros"),
|
||||||
|
+ error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
|
||||||
|
original_num_bytes - num_bytes, filename);
|
||||||
|
write_nuls_to_file (num_bytes, out_des, tape_buffered_write);
|
||||||
|
break;
|
||||||
|
@@ -505,12 +505,12 @@
|
||||||
|
NUM_BYTES is the number of bytes to copy. */
|
||||||
|
|
||||||
|
void
|
||||||
|
-copy_files_disk_to_disk (int in_des, int out_des, long num_bytes,
|
||||||
|
+copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes,
|
||||||
|
char *filename)
|
||||||
|
{
|
||||||
|
- long size;
|
||||||
|
- long k;
|
||||||
|
- long original_num_bytes;
|
||||||
|
+ off_t size;
|
||||||
|
+ off_t k;
|
||||||
|
+ off_t original_num_bytes;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
original_num_bytes = num_bytes;
|
||||||
|
@@ -520,10 +520,10 @@
|
||||||
|
if (rc = disk_fill_input_buffer (in_des, num_bytes))
|
||||||
|
{
|
||||||
|
if (rc > 0)
|
||||||
|
- error (0, 0, _("File %s shrunk by %ld bytes, padding with zeros"),
|
||||||
|
+ error (0, 0, _("File %s shrunk by %lld bytes, padding with zeros"),
|
||||||
|
filename, num_bytes);
|
||||||
|
else
|
||||||
|
- error (0, 0, _("Read error at byte %ld in file %s, padding with zeros"),
|
||||||
|
+ error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
|
||||||
|
original_num_bytes - num_bytes, filename);
|
||||||
|
write_nuls_to_file (num_bytes, out_des, disk_buffered_write);
|
||||||
|
break;
|
15
cpio.spec
15
cpio.spec
@ -6,18 +6,14 @@
|
|||||||
Summary: A GNU archiving program.
|
Summary: A GNU archiving program.
|
||||||
Name: cpio
|
Name: cpio
|
||||||
Version: 2.6
|
Version: 2.6
|
||||||
Release: 1
|
Release: 2
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/Archiving
|
Group: Applications/Archiving
|
||||||
URL: http://www.gnu.org/software/cpio/
|
URL: http://www.gnu.org/software/cpio/
|
||||||
Source: ftp://ftp.gnu.org/gnu/cpio/cpio-%{version}.tar.gz
|
Source: ftp://ftp.gnu.org/gnu/cpio/cpio-%{version}.tar.gz
|
||||||
Patch0: cpio-2.6-rh.patch
|
Patch0: cpio-2.6-rh.patch
|
||||||
#Patch10: cpio-2.4.2-freebsd.patch
|
|
||||||
#Patch11: cpio-2.4.2-bug56346.patch
|
|
||||||
#Patch12: cpio-2.5-i18n-0.1.patch
|
|
||||||
Patch13: cpio-2.5-nolibnsl.patch
|
Patch13: cpio-2.5-nolibnsl.patch
|
||||||
Patch14: cpio-2.5-lfs.patch
|
Patch14: cpio-2.6-lfs.patch
|
||||||
#Patch15: cpio-2.5-time.patch
|
|
||||||
|
|
||||||
%ifnos linux
|
%ifnos linux
|
||||||
Prereq: /sbin/rmt
|
Prereq: /sbin/rmt
|
||||||
@ -43,12 +39,8 @@ Install cpio if you need a program to manage file archives.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .rh
|
%patch0 -p1 -b .rh
|
||||||
#%patch10 -p1 -b .fbsd
|
|
||||||
#%patch11 -p1 -b .multilink
|
|
||||||
##%patch12 -p1 -b .i18n
|
|
||||||
%patch13 -p1 -b .nolibnsl
|
%patch13 -p1 -b .nolibnsl
|
||||||
%patch14 -p1 -b .lfs
|
%patch14 -p1 -b .lfs
|
||||||
#%patch15 -p1 -b .time
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -97,6 +89,9 @@ fi
|
|||||||
%{_datadir}/locale/*
|
%{_datadir}/locale/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 14 2005 Peter Vrabec<pvrabec@redhat.com>
|
||||||
|
- new fixed version of lfs patch (#144688)
|
||||||
|
|
||||||
* Thu Jan 13 2005 Peter Vrabec <pvrabec@redhat.com>
|
* Thu Jan 13 2005 Peter Vrabec <pvrabec@redhat.com>
|
||||||
- upgrade to cpio-2.6
|
- upgrade to cpio-2.6
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user