diff --git a/srcpkgs/xbps-static/template b/srcpkgs/xbps-static/template index bd5532a8988..cb4bcf18e1a 100644 --- a/srcpkgs/xbps-static/template +++ b/srcpkgs/xbps-static/template @@ -3,7 +3,7 @@ # NOTE: keep this package synchronized with "srcpkgs/xbps". pkgname=xbps-static version=0.43.1 -revision=2 +revision=3 build_style=configure short_desc="The XBPS package system utilities - static binaries" maintainer="Juan RP " diff --git a/srcpkgs/xbps/patches/0003-Use-a-sane-umask-2-before-unpacking-package-files.patch b/srcpkgs/xbps/patches/0003-Use-a-sane-umask-2-before-unpacking-package-files.patch new file mode 100644 index 00000000000..36482f65337 --- /dev/null +++ b/srcpkgs/xbps/patches/0003-Use-a-sane-umask-2-before-unpacking-package-files.patch @@ -0,0 +1,52 @@ +From 91b7b2fd5ac354e1f4fa2e1f04247242aeebbf23 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Sun, 11 Jan 2015 11:01:09 +0100 +Subject: [PATCH] Use a sane umask(2) before unpacking package files. + +See https://github.com/voidlinux/void-packages/issues/835 +for more information. +--- + NEWS | 3 +++ + lib/package_unpack.c | 8 +++++++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/lib/package_unpack.c b/lib/package_unpack.c +index 237883f..d655cee 100644 +--- lib/package_unpack.c ++++ lib/package_unpack.c +@@ -1,5 +1,5 @@ + /*- +- * Copyright (c) 2008-2014 Juan Romero Pardines. ++ * Copyright (c) 2008-2015 Juan Romero Pardines. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -502,6 +502,7 @@ xbps_unpack_binary_pkg(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod) + const char *pkgver; + char *bpkg = NULL; + int pkg_fd = -1, rv = 0; ++ mode_t myumask; + + assert(xbps_object_type(pkg_repod) == XBPS_TYPE_DICTIONARY); + +@@ -529,6 +530,8 @@ xbps_unpack_binary_pkg(struct xbps_handle *xhp, xbps_dictionary_t pkg_repod) + archive_read_support_compression_xz(ar); + archive_read_support_format_tar(ar); + ++ myumask = umask(022); ++ + pkg_fd = open(bpkg, O_RDONLY|O_CLOEXEC); + if (pkg_fd == -1) { + rv = errno; +@@ -594,5 +597,8 @@ out: + if (bpkg) + free(bpkg); + ++ /* restore */ ++ umask(myumask); ++ + return rv; + } +-- +2.2.1 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index a39697d54aa..e458c54b545 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -1,7 +1,7 @@ # Template file for 'xbps' pkgname=xbps version=0.43.1 -revision=2 +revision=3 bootstrap=yes build_style=configure short_desc="The XBPS package system utilities"