Commit Graph

29 Commits

Author SHA1 Message Date
Jan Tojnar
c0d2951fa6
Merge branch 'master' into staging-next 2021-01-15 17:46:46 +01:00
Ben Siraphob
8c5d37129f pkgs/tools: stdenv.lib -> lib 2021-01-15 17:12:36 +07:00
Atemu
579b25b5a8 squashfsTools: unconditionally build with lz4Support
Can't think of a reason to not enable that.
2021-01-10 12:56:46 +01:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Robin Gloster
2157dcd141
treewide: installFlags is a list 2019-12-30 13:22:43 +01:00
Ruud van Asseldonk
f6e8ee7533 squashfsTools: use updated Darwin patch
This new patch is the patch between 4.4, and commit [1], a pull request
at [2] to upsteam Mac and BSD compatibility. That pull request is
itself a rebase of an older pull request for an earlier version of
squashfs-tools. I squashed all commits between 4.4 and [1], apart from
the BSD-specific ones, and exported the new patch from that. Attached
below is the git diff --ignore-space-change between squashfs-tools 4.4
with the previous patch applied, and with the new patch applied.

[1]: 7d31beec53e6245d3405d6ef2b96e9811ae07044
[2]: https://github.com/plougher/squashfs-tools/pull/69

---

diff --git a/squashfs-tools/info.c b/squashfs-tools/info.c
index 8efefe6..5c2f835 100644
--- a/squashfs-tools/info.c
+++ b/squashfs-tools/info.c
@@ -159,7 +159,7 @@ void *info_thrd(void *arg)
 			case EINTR:
 				continue;
 			default:
-				BAD_ERROR("sigwaitfailed "
+				BAD_ERROR("sigwait failed "
 					"because %s\n", strerror(errno));
 			}
 		}
diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
index 67d86a5..3607448 100644
--- a/squashfs-tools/mksquashfs.c
+++ b/squashfs-tools/mksquashfs.c
@@ -35,7 +35,10 @@
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifdef linux
+#ifndef linux
+#include <sys/sysctl.h>
+#else
+#include <sys/sysinfo.h>
 #include <sys/sysmacros.h>
 #endif
 #include <fcntl.h>
@@ -52,7 +55,6 @@
 #include <sys/wait.h>
 #include <limits.h>
 #include <ctype.h>
-#include <sys/sysinfo.h>

 #ifndef FNM_EXTMATCH /* glibc extension */
 	#define FNM_EXTMATCH 0
@@ -5191,7 +5193,17 @@ int parse_mode(char *arg, mode_t *res)

 int get_physical_memory()
 {
+	/*
+	 * Long longs are used here because with PAE, a 32-bit
+	 * machine can have more than 4GB of physical memory
+	 *
+	 * sysconf(_SC_PHYS_PAGES) relies on /proc being mounted.
+	 * If it fails use sysinfo, if that fails return 0
+	 */
+	long long num_pages = sysconf(_SC_PHYS_PAGES);
+	long long page_size = sysconf(_SC_PAGESIZE);
 	int phys_mem;
+
 #ifndef linux
 	#ifdef HW_MEMSIZE
 		#define SYSCTL_PHYSMEM HW_MEMSIZE
@@ -5221,16 +5233,6 @@ int get_physical_memory()
 	}
   #undef SYSCTL_PHYSMEM
 #else
-	/*
-	 * Long longs are used here because with PAE, a 32-bit
-	 * machine can have more than 4GB of physical memory
-	 *
-	 * sysconf(_SC_PHYS_PAGES) relies on /proc being mounted.
-	 * If it fails use sysinfo, if that fails return 0
-	 */
-	long long num_pages = sysconf(_SC_PHYS_PAGES);
-	long long page_size = sysconf(_SC_PAGESIZE);
-
 	if(num_pages == -1 || page_size == -1) {
 		struct sysinfo sys;
 		int res = sysinfo(&sys);
diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
index 88d0b5c..1beefef 100644
--- a/squashfs-tools/mksquashfs.h
+++ b/squashfs-tools/mksquashfs.h
@@ -24,7 +24,6 @@
  * mksquashfs.h
  *
  */
-#include <pthread.h>

 struct dir_info {
 	char			*pathname;
diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c
index f8fd529..48e6b27 100644
--- a/squashfs-tools/pseudo.c
+++ b/squashfs-tools/pseudo.c
@@ -30,7 +30,6 @@
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
-#include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
index 00615ce..c1a6183 100644
--- a/squashfs-tools/unsquashfs.c
+++ b/squashfs-tools/unsquashfs.c
@@ -38,7 +38,6 @@
 #include <sys/sysinfo.h>
 #include <sys/sysmacros.h>
 #endif
-
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
@@ -1085,7 +1084,7 @@ int create_inode(char *pathname, struct inode *i)
 			break;
 		case SQUASHFS_SYMLINK_TYPE:
 		case SQUASHFS_LSYMLINK_TYPE: {
-			struct timespec times[2] = {
+			struct timeval times[2] = {
 				{ i->time, 0 },
 				{ i->time, 0 }
 			};
@@ -1104,8 +1103,7 @@ int create_inode(char *pathname, struct inode *i)
 				goto failed;
 			}

-			res = utimensat(AT_FDCWD, pathname, times,
-					AT_SYMLINK_NOFOLLOW);
+			res = lutimes(pathname, times);
 			if(res == -1) {
 				EXIT_UNSQUASH_STRICT("create_inode: failed to set time on "
 					"%s, because %s\n", pathname,
2019-09-10 21:02:51 +02:00
Ruud van Asseldonk
14d2c3669f squashfsTools: make Darwin patch apply to 4.4
I took the patch, and applied it on top of the previous squashfs-tools
commit that we packaged. It applied cleanly. Then I rebased that on top
of master, and resolved the conflicts. I'm not sure I resolved them
correctly though, I don't have access to Darwin. Somebody needs to
review this.
2019-09-07 19:16:57 +02:00
Ruud van Asseldonk
a60ee9a74c squashfsTools: make alignment patch apply to 4.4
I took the patch, and applied it on top of the previous squashfs-tools
commit that we packaged (which required editing one line in the patch,
as it assumed to be applied on top of the reproducibility patches). Then
I rebased that on top of master, resolved one conflict, and I formatted
a new patch for this.
2019-09-07 18:58:31 +02:00
Ruud van Asseldonk
442cf4f783 squashfsTools: 4.4dev_20180612 -> 4.4
A new release has been made upstream. Reproducibility issues were fixed
in that release, so we no longer need those patches. For a full overview
of the changes, see the 4.4-specific readme at [1].

The alignment patch no longer applies cleanly; I disabled it for now,
and I will try to restore it in a follow-up commit.

[1]: 52eb4c279c/README-4.4
2019-09-07 16:12:07 +02:00
volth
08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Charles Duffy
f15d9d5123 squashfsTools: Fix 4k-align patch (regression in 4.4dev)
The 4k-align squashfs patch was broken in the update to squashfs 4.4dev,
such that the patch was no longer actually applied in full (command line
option not even parsed).
2019-07-08 14:01:57 +02:00
danbst
2aafeedd15 squashfs: 4.4dev -> 4.4dev-20180612
This squashfstools release finally has `zstd` support.
2018-12-27 15:13:48 +02:00
Charles Duffy
9eefb443f3 squashfsTools: incorporate 4k-alignment option patch (#49200) 2018-11-17 15:44:19 +00:00
Matthew Bauer
6cd5863060 squashfs: support darwin 2018-06-01 15:47:27 -04:00
Ruud van Asseldonk
f0353d417f squashfsTools: update package metadata
I am adding myself as maintainer here for lack of a better candidate,
but I am not experienced with Nix, and I am not a squashfs expert
either.
2018-05-09 13:22:45 +02:00
Ruud van Asseldonk
9c50f53065 squashfsTools: apply reproducibility patches
Without these patches, the output of mksquashfs is not reproducible.
The patches are taken from https://github.com/squashfskit/squashfskit,
a fork of squashfs-tools, licensed under the GPL2 or later like
squashfs-tools itself.
2018-05-08 15:12:31 +02:00
Joachim Fasting
4653160057
squashfsTools: optional lz4 support 2016-09-15 15:37:03 +02:00
Joachim Fasting
a9fa582c5b
squashfsTools: use fetchFromGitHub 2016-09-15 15:37:03 +02:00
Eelco Dolstra
65221567c1 glibc: Include a copy of libgcc_s.so.1
This prevents failures like "libgcc_s.so.1 must be installed for
pthread_cancel to work" that occur because Glibc assumes libgcc_s.so.1
to be in Glibc's libdir.

This solution is pretty hacky, because the libgcc_s.so.1 from
bootstrap-tools might be too old. So if we update GCC, programs might
end up using an outdated libgcc_s.so.1. Ideally, we would build
libgcc_s.so.1 *before* Glibc, which might not be impossible...

Fixes #3548.
2014-11-11 10:23:26 +01:00
Domen Kožar
c01af09401 squashfs: -lgcc_s 2014-10-22 15:06:05 +02:00
Domen Kožar
b3a4c3c2d0 squashfs: 4.3 -> 4.4, hopefully fixes http://hydra.nixos.org/build/16422733 2014-10-22 14:36:56 +02:00
Aristid Breitkreuz
56fa7ec87f squashfsTools: update from 4.2 to 4.3, potentially fixes CVE-2012-4024, CVE-2012-4025 2014-10-08 20:23:25 +02:00
Eelco Dolstra
4d5ba15ea9 openssh: Update to 6.2p1 2013-04-12 15:27:13 +02:00
Eelco Dolstra
c44e954bdc * Fix the squashfs build (it links against xz, so xz has
to be in the buildInputs).  While at it, update to 
  version 4.2.  "attr" is no longer needed as a dependency.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31744
2012-01-20 17:43:50 +00:00
Eelco Dolstra
d4d7931a62 * Cleanup: remove obsolete references to ‘xz’, which is in stdenv now.
svn path=/nixpkgs/branches/stdenv-updates/; revision=31678
2012-01-18 20:53:01 +00:00
Rob Vermaas
b7f536027d enable lzma support in squashfs-tools
svn path=/nixpkgs/trunk/; revision=25602
2011-01-17 19:41:05 +00:00
Armijn Hemel
fea2d56f09 update to 4.1, lzma support not yet added
svn path=/nixpkgs/trunk/; revision=23986
2010-09-28 16:40:34 +00:00
Eelco Dolstra
c726012afe * Refactoring: move most filesystem utilities / FUSE filesystems to
tools/filesystems.  Previously they were all over the place.

svn path=/nixpkgs/trunk/; revision=18809
2009-12-04 15:39:49 +00:00