add packaging 09/182509/2
authorAnas Nashif <anas.nashif@intel.com>
Tue, 6 Nov 2012 22:03:25 +0000 (14:03 -0800)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 26 Jun 2018 13:11:25 +0000 (15:11 +0200)
Change-Id: I0d4f5da523c1789147f2355caf81b305b766dfc3

packaging/squashfs-64k.patch [new file with mode: 0644]
packaging/squashfs.spec [new file with mode: 0644]

diff --git a/packaging/squashfs-64k.patch b/packaging/squashfs-64k.patch
new file mode 100644 (file)
index 0000000..e72f29d
--- /dev/null
@@ -0,0 +1,24 @@
+--- squashfs-tools/mksquashfs.c.orig   2011-11-03 19:57:06.000000000 +0100
++++ squashfs-tools/mksquashfs.c        2011-11-03 19:58:50.000000000 +0100
+@@ -4871,7 +4871,7 @@
+                       ERROR("-force-uid uid\t\tset all file uids to uid\n");
+                       ERROR("-force-gid gid\t\tset all file gids to gid\n");
+                       ERROR("-nopad\t\t\tdo not pad filesystem to a multiple "
+-                              "of 4K\n");
++                              "of 64K\n");
+                       ERROR("-keep-as-directory\tif one source directory is "
+                               "specified, create a root\n");
+                       ERROR("\t\t\tdirectory containing that directory, "
+@@ -5339,9 +5339,9 @@
+       SQUASHFS_INSWAP_SUPER_BLOCK(&sBlk); 
+       write_destination(fd, SQUASHFS_START, sizeof(sBlk), &sBlk);
+-      if(!nopad && (i = bytes & (4096 - 1))) {
+-              char temp[4096] = {0};
+-              write_destination(fd, bytes, 4096 - i, temp);
++      if(!nopad && (i = bytes & (65536 - 1))) {
++              char temp[65536] = {0};
++              write_destination(fd, bytes, 65536 - i, temp);
+       }
+       close(fd);
diff --git a/packaging/squashfs.spec b/packaging/squashfs.spec
new file mode 100644 (file)
index 0000000..01fbab9
--- /dev/null
@@ -0,0 +1,37 @@
+Name:           squashfs
+Version:        4.3
+Release:        0
+License:        GPL-2.0+
+Summary:        A Read-Only File System with Efficient Compression
+Url:            http://squashfs.sourceforge.net/
+Group:          System/Filesystems
+Source0:        %{name}%{version}.tar.gz
+Patch0:         squashfs-64k.patch
+BuildRequires:  attr-devel
+BuildRequires:  lzma-devel
+BuildRequires:  lzo-devel
+BuildRequires:  zlib-devel
+Supplements:    filesystem(squashfs)
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+
+%description
+This package contains the userland utilities to create and read
+squashfs images.
+
+%prep
+%setup -n squashfs%{version}
+%patch0
+
+%build
+sed -i -e "s#-O2#%{optflags}#g" squashfs-tools/Makefile
+make %{?_smp_mflags} -C squashfs-tools XZ_SUPPORT=1 LZO_SUPPORT=1
+
+%install
+mkdir -p %{buildroot}/usr/bin
+install -m 755 squashfs-tools/{un,mk}squashfs %{buildroot}/usr/bin
+
+%files
+%defattr(-,root,root)
+/usr/bin/*squashfs
+
+%changelog