[arch-commits] Commit in pacman/trunk (PKGBUILD pacman-4.2.0-roundup.patch)

Allan McRae allan at archlinux.org
Sun Dec 28 09:07:13 UTC 2014


    Date: Sunday, December 28, 2014 @ 10:07:13
  Author: allan
Revision: 228108

upgpkg: pacman 4.2.0-5

acutally update the patch...

Modified:
  pacman/trunk/PKGBUILD
  pacman/trunk/pacman-4.2.0-roundup.patch

----------------------------+
 PKGBUILD                   |    4 -
 pacman-4.2.0-roundup.patch |  161 +++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 157 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-12-28 03:39:45 UTC (rev 228107)
+++ PKGBUILD	2014-12-28 09:07:13 UTC (rev 228108)
@@ -5,7 +5,7 @@
 
 pkgname=pacman
 pkgver=4.2.0
-pkgrel=4
+pkgrel=5
 pkgdesc="A library-based package manager with dependency support"
 arch=('i686' 'x86_64')
 url="http://www.archlinux.org/pacman/"
@@ -30,7 +30,7 @@
          '2db6c94709bb30cc614a176ecf8badb1'
          'de74a13618347f08ae4a9637f74471c4'
          '0d07f2a750ba20d114c3adc799d371de'
-         'e98459a565bb4e199695f9c319d7d52d')
+         '8b8e478e3b6f785f6fb0029f792cea38')
 validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD')  # Allan McRae <allan at archlinux.org>
 
 prepare() {

Modified: pacman-4.2.0-roundup.patch
===================================================================
--- pacman-4.2.0-roundup.patch	2014-12-28 03:39:45 UTC (rev 228107)
+++ pacman-4.2.0-roundup.patch	2014-12-28 09:07:13 UTC (rev 228108)
@@ -29,6 +29,32 @@
  #########################################################################
  # ARCHITECTURE, COMPILE FLAGS
  #########################################################################
+diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
+index d232bcc..9af5e84 100644
+--- a/lib/libalpm/log.c
++++ b/lib/libalpm/log.c
+@@ -52,7 +52,7 @@ int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix,
+ 		int fd;
+ 		do {
+ 			fd = open(handle->logfile, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC,
+-					0000);
++					0644);
+ 		} while(fd == -1 && errno == EINTR);
+ 		if(fd >= 0) {
+ 			handle->logstream = fdopen(fd, "a");
+diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
+index e2997f6..d9ed3d3 100644
+--- a/lib/libalpm/package.c
++++ b/lib/libalpm/package.c
+@@ -574,7 +574,7 @@ int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr)
+ 	newpkg->installdate = pkg->installdate;
+ 	STRDUP(newpkg->packager, pkg->packager, goto cleanup);
+ 	STRDUP(newpkg->md5sum, pkg->md5sum, goto cleanup);
+-	STRDUP(newpkg->sha256sum, pkg->md5sum, goto cleanup);
++	STRDUP(newpkg->sha256sum, pkg->sha256sum, goto cleanup);
+ 	STRDUP(newpkg->arch, pkg->arch, goto cleanup);
+ 	newpkg->size = pkg->size;
+ 	newpkg->isize = pkg->isize;
 diff --git a/scripts/makepkg-template.pl.in b/scripts/makepkg-template.pl.in
 index 6e6d944..d9da167 100755
 --- a/scripts/makepkg-template.pl.in
@@ -43,12 +69,94 @@
  		}
  		$values{$key} = $val;
 diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
-index 33dff24..60276f6 100644
+index 33dff24..18b2822 100644
 --- a/scripts/makepkg.sh.in
 +++ b/scripts/makepkg.sh.in
-@@ -2896,7 +2896,7 @@ get_vcsclient() {
+@@ -1317,47 +1317,41 @@ verify_integrity_sums() {
+ 	fi
  }
  
+-have_sources() {
+-	local a
+-
+-	(( ${#source[*]} )) && return 0
++check_checksums() {
++	local integ a
++	declare -A correlation
++	(( SKIPCHECKSUMS )) && return 0
+ 
++	# Initialize a map which we'll use to verify that every source array has at
++	# least some kind of checksum array associated with it.
++	(( ${#source[*]} )) && correlation['source']=1
+ 	case $1 in
+ 		all)
+ 			for a in "${arch[@]}"; do
+-				array_build _ source_"$a" && return 0
++				array_build _ source_"$a" && correlation["source_$a"]=1
+ 			done
+ 			;;
+ 		*)
+-			array_build _ source_"$CARCH" && return 0
++			array_build _ source_"$CARCH" && correlation["source_$CARCH"]=1
+ 			;;
+ 	esac
+ 
+-	return 1
+-}
+-
+-check_checksums() {
+-	(( SKIPCHECKSUMS )) && return 0
+-	have_sources "$1" || return 0
+-
+-	local correlation=0
+-	local integ a
+ 	for integ in "${known_hash_algos[@]}"; do
+-		verify_integrity_sums "$integ" && correlation=1
++		verify_integrity_sums "$integ" && unset "correlation[source]"
+ 
+ 		case $1 in
+ 			all)
+ 				for a in "${arch[@]}"; do
+-					verify_integrity_sums "$integ" "$a" && correlation=1
++					verify_integrity_sums "$integ" "$a" && unset "correlation[source_$a]"
+ 				done
+ 				;;
+ 			*)
+-				verify_integrity_sums "$integ" "$CARCH" && correlation=1
++				verify_integrity_sums "$integ" "$CARCH" && unset "correlation[source_$CARCH]"
+ 				;;
+ 		esac
+ 	done
+ 
+-	if (( ! correlation )); then
++	if (( ${#correlation[*]} )); then
+ 		error "$(gettext "Integrity checks are missing.")"
+ 		exit 1 # TODO: error code
+ 	fi
+@@ -1627,7 +1621,10 @@ merge_arch_attrs() {
+ 
+ source_buildfile() {
+ 	source_safe "$@"
+-	merge_arch_attrs
++
++	if (( !SOURCEONLY )); then
++		merge_arch_attrs
++	fi
+ }
+ 
+ run_function_safe() {
+@@ -2142,8 +2139,6 @@ write_pkginfo() {
+ 	local size="$(@DUPATH@ @DUFLAGS@)"
+ 	size="$(( ${size%%[^0-9]*} * 1024 ))"
+ 
+-	merge_arch_attrs
+-
+ 	msg2 "$(gettext "Generating %s file...")" ".PKGINFO"
+ 	printf "# Generated by makepkg %s\n" "$makepkg_version"
+ 	printf "# using %s\n" "$(fakeroot -v)"
+@@ -2896,7 +2891,7 @@ get_vcsclient() {
+ }
+ 
  check_vcs_software() {
 -	local ret=0
 +	local all_sources all_deps deps ret=0
@@ -55,7 +163,7 @@
  
  	if (( SOURCEONLY == 1 )); then
  		# we will not download VCS sources
-@@ -2908,7 +2908,17 @@ check_vcs_software() {
+@@ -2908,7 +2903,17 @@ check_vcs_software() {
  		return $ret
  	fi
  
@@ -74,16 +182,16 @@
  		local proto=$(get_protocol "$netfile")
  
  		case $proto in
-@@ -2921,7 +2931,7 @@ check_vcs_software() {
+@@ -2921,7 +2926,7 @@ check_vcs_software() {
  					uninstalled="$(set +E; check_deps $client)" || exit 1
  					# if not installed, check presence in depends or makedepends
  					if [[ -n "$uninstalled" ]] && (( ! NODEPS || ( VERIFYSOURCE && !DEP_BIN ) )); then
 -						if ! in_array "$client" ${depends[@]} ${makedepends[@]}; then
-+						if ! in_array "$client" ${alldeps[@]}; then
++						if ! in_array "$client" ${all_deps[@]}; then
  							error "$(gettext "Cannot find the %s package needed to handle %s sources.")" \
  									"$client" "${proto%%+*}"
  							ret=1
-@@ -3435,7 +3445,7 @@ CARCH=${_CARCH:-$CARCH}
+@@ -3435,7 +3440,7 @@ CARCH=${_CARCH:-$CARCH}
  if (( ! INFAKEROOT )); then
  	if (( EUID == 0 )); then
  		error "$(gettext "Running %s as root is not allowed as it can cause permanent,\n\
@@ -92,3 +200,44 @@
  		exit 1 # $E_USER_ABORT
  	fi
  else
+@@ -3597,7 +3602,7 @@ if (( SOURCEONLY )); then
+ 		download_sources allarch
+ 	elif ( (( ! SKIPCHECKSUMS )) || \
+ 			( (( ! SKIPPGPCHECK )) && source_has_signatures ) ); then
+-		download_sources novcs
++		download_sources allarch novcs
+ 	fi
+ 	check_source_integrity all
+ 	cd_safe "$startdir"
+diff --git a/scripts/pacman-db-upgrade.sh.in b/scripts/pacman-db-upgrade.sh.in
+index 7bb277b..7d01bce 100644
+--- a/scripts/pacman-db-upgrade.sh.in
++++ b/scripts/pacman-db-upgrade.sh.in
+@@ -19,6 +19,9 @@
+ #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ #
+ 
++# Avoid creating world-unreadable files
++umask 022
++
+ # gettext initialization
+ export TEXTDOMAIN='pacman-scripts'
+ export TEXTDOMAINDIR='@localedir@'
+@@ -167,6 +170,8 @@ if [[ -z "$db_version" ]]; then
+ 	fi
+ 
+ 	# pacman 4.1 to 4.2 upgrade - remove directory symlink support
++	msg "$(gettext "Pre-4.2 database format detected - upgrading...")"
++
+ 	dirlist=()
+ 
+ 	unset GREP_OPTIONS
+@@ -180,8 +185,6 @@ if [[ -z "$db_version" ]]; then
+ 		done)
+ 
+ 	if [[ ${#dirlist[@]} != 0 ]]; then
+-		msg "$(gettext "Pre-4.2 database format detected - upgrading...")"
+-
+ 		pacroot="$(resolve_dir "$pacroot")"
+ 
+ 		for dir in "${dirlist[@]}"; do



More information about the arch-commits mailing list