rpms/libarchive/F-10 libarchive-2.5.5-ISO9660-filenames.patch, NONE, 1.1 libarchive.spec, 1.3, 1.4
Tomas Bzatek
tbzatek at fedoraproject.org
Mon Dec 8 16:29:54 UTC 2008
- Previous message (by thread): rpms/kernel/devel kernel.spec, 1.1153, 1.1154 linux-2.6-crash-driver.patch, 1.11, 1.12 linux-2.6-debug-taint-vm.patch, 1.21, 1.22 linux-2.6-defaults-pci_no_msi.patch, 1.1, 1.2 linux-2.6-acpi-clear-wake-status.patch, 1.2, NONE linux-2.6-acpi-handle-ec-init-failure.patch, 1.1, NONE linux-2.6-acpi-ignore-reset_reg_sup.patch, 1.2, NONE linux-2.6-mm-pagefault-enable-ints.patch, 1.1, NONE
- Next message (by thread): rpms/libiphone/devel libiphone.spec,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: tbzatek
Update of /cvs/extras/rpms/libarchive/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30977
Modified Files:
libarchive.spec
Added Files:
libarchive-2.5.5-ISO9660-filenames.patch
Log Message:
* Mon Dec 8 2008 Tomas Bzatek <tbzatek at redhat.com> 2.5.5-2
- Fix ";1" filenames appearing in ISO9660 images (#469512)
libarchive-2.5.5-ISO9660-filenames.patch:
--- NEW FILE libarchive-2.5.5-ISO9660-filenames.patch ---
diff --git a/libarchive/libarchive-2.5.5/libarchive/archive_read_support_format_iso9660.c b/libarchive/libarchive-2.5.5/libarchive/archive_read_support_format_iso9660.c
index 481220d..4cdf710 100644
--- a/libarchive/libarchive-2.5.5/libarchive/archive_read_support_format_iso9660.c
+++ b/libarchive/libarchive-2.5.5/libarchive/archive_read_support_format_iso9660.c
@@ -517,6 +517,8 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
{
struct file_info *file;
size_t name_len;
+ const unsigned char *rr_start, *rr_end;
+ const char *p;
int flags;
/* TODO: Sanity check that name_len doesn't exceed length, etc. */
@@ -535,13 +537,27 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
file->mtime = isodate7(isodirrec + DR_date_offset);
file->ctime = file->atime = file->mtime;
name_len = (size_t)*(const unsigned char *)(isodirrec + DR_name_len_offset);
+ p = isodirrec + DR_name_offset;
+ /* Rockridge extensions (if any) follow name. Compute this
+ * before fidgeting the name_len below. */
+ rr_start = p + name_len + (name_len & 1 ? 0 : 1) + iso9660->suspOffset;
+ rr_end = (const unsigned char *)isodirrec + *(isodirrec + DR_length_offset);
+
+ /* Chop off trailing ';1' from files. */
+ if (name_len > 2 && p[name_len - 1] == '1' && p[name_len - 2] == ';')
+ name_len -= 2;
+ /* Chop off trailing '.' from filenames. */
+ if (name_len > 1 && p[name_len - 1] == '.')
+ --name_len;
+
file->name = (char *)malloc(name_len + 1);
if (file->name == NULL) {
free(file);
return (NULL);
}
- memcpy(file->name, isodirrec + DR_name_offset, name_len);
+ memcpy(file->name, p, name_len);
file->name[name_len] = '\0';
+
flags = *(isodirrec + DR_flags_offset);
if (flags & 0x02)
file->mode = AE_IFDIR | 0700;
@@ -549,17 +565,7 @@ parse_file_info(struct iso9660 *iso9660, struct file_info *parent,
file->mode = AE_IFREG | 0400;
/* Rockridge extensions overwrite information from above. */
- {
- const unsigned char *rr_start, *rr_end;
- rr_end = (const unsigned char *)isodirrec
- + *(isodirrec + DR_length_offset);
- rr_start = (const unsigned char *)(isodirrec + DR_name_offset
- + name_len);
- if ((name_len & 1) == 0)
- rr_start++;
- rr_start += iso9660->suspOffset;
- parse_rockridge(iso9660, file, rr_start, rr_end);
- }
+ parse_rockridge(iso9660, file, rr_start, rr_end);
/* DEBUGGING: Warn about attributes I don't yet fully support. */
if ((flags & ~0x02) != 0) {
Index: libarchive.spec
===================================================================
RCS file: /cvs/extras/rpms/libarchive/F-10/libarchive.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- libarchive.spec 22 Jul 2008 12:38:12 -0000 1.3
+++ libarchive.spec 8 Dec 2008 16:29:24 -0000 1.4
@@ -1,6 +1,6 @@
Name: libarchive
Version: 2.5.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A library for handling streaming archive formats
Group: System Environment/Libraries
@@ -9,6 +9,9 @@
Source0: http://people.freebsd.org/~kientzle/libarchive/src/libarchive-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# https://bugzilla.redhat.com/show_bug.cgi?id=469512
+Patch0: libarchive-2.5.5-ISO9660-filenames.patch
+
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: sharutils
@@ -31,6 +34,7 @@
%prep
%setup -q
+%patch0 -p3 -b .iso9660-filenames
%build
@@ -72,6 +76,9 @@
%changelog
+* Mon Dec 8 2008 Tomas Bzatek <tbzatek at redhat.com> 2.5.5-2
+- Fix ";1" filenames appearing in ISO9660 images (#469512)
+
* Tue Jul 22 2008 Tomas Bzatek <tbzatek at redhat.com> 2.5.5-1
- Update to 2.5.5
- Previous message (by thread): rpms/kernel/devel kernel.spec, 1.1153, 1.1154 linux-2.6-crash-driver.patch, 1.11, 1.12 linux-2.6-debug-taint-vm.patch, 1.21, 1.22 linux-2.6-defaults-pci_no_msi.patch, 1.1, 1.2 linux-2.6-acpi-clear-wake-status.patch, 1.2, NONE linux-2.6-acpi-handle-ec-init-failure.patch, 1.1, NONE linux-2.6-acpi-ignore-reset_reg_sup.patch, 1.2, NONE linux-2.6-mm-pagefault-enable-ints.patch, 1.1, NONE
- Next message (by thread): rpms/libiphone/devel libiphone.spec,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list