NetBSD Problem Report #49959

From www@NetBSD.org  Wed Jun 10 07:30:19 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D4E7AA65B7
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 10 Jun 2015 07:30:19 +0000 (UTC)
Message-Id: <20150610073016.86517A65BC@mollari.NetBSD.org>
Date: Wed, 10 Jun 2015 07:30:16 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: Cannot bootstrap due to pkg_install build errors on Linux
X-Send-Pr-Version: www-1.0

>Number:         49959
>Category:       pkg
>Synopsis:       Cannot bootstrap due to pkg_install build errors on Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kamil
>State:          dead
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 10 07:35:00 +0000 2015
>Closed-Date:    Fri Aug 05 15:19:38 +0000 2016
>Last-Modified:  Fri Aug 05 15:19:38 +0000 2016
>Originator:     Kamil Rytarowski
>Release:        CentOS Linux 7 (Core)
>Organization:
>Environment:
Linux 3.10.0-229.1.2.el7.x86_64 #1 SMP Fri Mar 27 03:04:26 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>Description:
pkg_install uses deprecated API functions from libarchive.
>How-To-Repeat:
1. Get CentOS 7
2. Get pkgsrc-current
3. Try to boostrap
>Fix:
Patch just tested for building the sources (boostrapping)

Index: pkg_install/files/add/perform.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/add/perform.c,v
retrieving revision 1.106
diff -u -r1.106 perform.c
--- pkg_install/files/add/perform.c	30 Dec 2014 15:13:20 -0000	1.106
+++ pkg_install/files/add/perform.c	8 Jun 2015 09:38:27 -0000
@@ -828,7 +828,7 @@
 	if (!NoRecord)
 		pkgdb_close();
 	archive_write_close(writer);
-	archive_write_finish(writer);
+	archive_write_close(writer);

 	return r;
 }
@@ -1547,7 +1547,7 @@
 	free_plist(&pkg->plist);
 	free_meta_data(pkg);
 	if (pkg->archive)
-		archive_read_finish(pkg->archive);
+		archive_read_close(pkg->archive);
 	free(pkg->other_version);
 	free(pkg->pkgname);
 clean_find_archive:
Index: pkg_install/files/admin/main.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/admin/main.c,v
retrieving revision 1.64
diff -u -r1.64 main.c
--- pkg_install/files/admin/main.c	2 Jan 2015 14:26:16 -0000	1.64
+++ pkg_install/files/admin/main.c	8 Jun 2015 09:38:27 -0000
@@ -609,7 +609,7 @@
 				rc = 1;
 			free(archive_name);
 			if (!pkg)
-				archive_read_finish(pkg);
+				archive_read_close(pkg);
 		}
 		return rc;
 	} else if (strcasecmp(argv[0], "x509-sign-package") == 0) {
Index: pkg_install/files/create/build.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/create/build.c,v
retrieving revision 1.16
diff -u -r1.16 build.c
--- pkg_install/files/create/build.c	30 Dec 2014 15:13:20 -0000	1.16
+++ pkg_install/files/create/build.c	8 Jun 2015 09:38:27 -0000
@@ -250,20 +250,20 @@
 	}

 	if (strcmp(CompressionType, "bzip2") == 0)
-		archive_write_set_compression_bzip2(archive);
+		archive_write_add_filter_bzip2(archive);
 	else if (strcmp(CompressionType, "gzip") == 0)
-		archive_write_set_compression_gzip(archive);
+		archive_write_add_filter_gzip(archive);
 	else if (strcmp(CompressionType, "xz") == 0)
-		archive_write_set_compression_xz(archive);
+		archive_write_add_filter_xz(archive);
 	else if (strcmp(CompressionType, "none") == 0)
-		archive_write_set_compression_none(archive);
+		archive_write_add_filter_none(archive);
 	else
 		errx(1, "Unspported compression type for -F: %s",
 		    CompressionType);

 	archive_name = xasprintf("%s.%s", pkg, suffix);

-	if (archive_write_open_file(archive, archive_name))
+	if (archive_write_open_filename(archive, archive_name))
 		errx(2, "cannot create archive: %s", archive_error_string(archive));

 	free(archive_name);
@@ -326,7 +326,7 @@

 	if (archive_write_close(archive))
 		errx(2, "cannot finish archive: %s", archive_error_string(archive));
-	archive_write_finish(archive);
+	archive_write_close(archive);

 	free(initial_cwd);
 }
Index: pkg_install/files/info/perform.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/info/perform.c,v
retrieving revision 1.62
diff -u -r1.62 perform.c
--- pkg_install/files/info/perform.c	30 Dec 2014 15:13:20 -0000	1.62
+++ pkg_install/files/info/perform.c	8 Jun 2015 09:38:27 -0000
@@ -358,7 +358,7 @@
 		free(pkgname);

 		meta = read_meta_data_from_archive(archive, entry);
-		archive_read_finish(archive);
+		archive_read_close(archive);
 		if (!IS_URL(pkg))
 			binpkgfile = pkg;
 #endif
Index: pkg_install/files/lib/pkg_io.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/pkg_io.c,v
retrieving revision 1.11
diff -u -r1.11 pkg_io.c
--- pkg_install/files/lib/pkg_io.c	20 Apr 2010 00:39:13 -0000	1.11
+++ pkg_install/files/lib/pkg_io.c	8 Jun 2015 09:38:27 -0000
@@ -146,13 +146,13 @@
 	*archive_name = fetchStringifyURL(url);

 	a = archive_read_new();
-	archive_read_support_compression_all(a);
+	archive_read_support_filter_all(a);
 	archive_read_support_format_all(a);
 	if (archive_read_open(a, f, fetch_archive_open, fetch_archive_read,
 	    fetch_archive_close)) {
 		free(*archive_name);
 		*archive_name = NULL;
-		archive_read_finish(a);
+		archive_read_close(a);
 		return NULL;
 	}

@@ -169,7 +169,7 @@

 	if (!IS_URL(url)) {
 		a = archive_read_new();
-		archive_read_support_compression_all(a);
+		archive_read_support_filter_all(a);
 		archive_read_support_format_all(a);
 		if (archive_read_open_filename(a, url, 1024)) {
 			archive_read_close(a);
Index: pkg_install/files/lib/pkg_signature.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/pkg_signature.c,v
retrieving revision 1.11
diff -u -r1.11 pkg_signature.c
--- pkg_install/files/lib/pkg_signature.c	11 Sep 2013 14:10:05 -0000	1.11
+++ pkg_install/files/lib/pkg_signature.c	8 Jun 2015 09:38:27 -0000
@@ -159,7 +159,7 @@
 {
 	struct signature_archive *state = cookie;

-	archive_read_finish(state->archive);
+	archive_read_close(state->archive);
 	free_signature_int(state);
 	return 0;
 }
@@ -330,7 +330,7 @@
 	r = read_file_from_archive(archive_name, *archive, entry, HASH_FNAME,
 	    &hash_file, &hash_len);
 	if (r == -1) {
-		archive_read_finish(*archive);
+		archive_read_close(*archive);
 		*archive = NULL;
 		free(state);
 		goto no_valid_signature;
@@ -345,7 +345,7 @@
 	r = read_file_from_archive(archive_name, *archive, entry, SIGNATURE_FNAME,
 	    &signature_file, &signature_len);
 	if (r == -1) {
-		archive_read_finish(*archive);
+		archive_read_close(*archive);
 		*archive = NULL;
 		free(state);
 		free(hash_file);
@@ -356,7 +356,7 @@
 			    entry, GPG_SIGNATURE_FNAME,
 			    &signature_file, &signature_len);
 		if (r == -1) {
-			archive_read_finish(*archive);
+			archive_read_close(*archive);
 			*archive = NULL;
 			free(state);
 			free(hash_file);
@@ -400,12 +400,12 @@
 	state->archive = *archive;

 	a = archive_read_new();
-	archive_read_support_compression_all(a);
+	archive_read_support_filter_all(a);
 	archive_read_support_format_all(a);
 	if (archive_read_open(a, state, NULL, verify_signature_read_cb,
 	    verify_signature_close_cb)) {
 		warnx("Can't open signed package file");
-		archive_read_finish(a);
+		archive_read_close(a);
 		goto no_valid_signature;
 	}
 	*archive = a;
@@ -449,12 +449,12 @@
 	int r;

 	a = archive_read_new();
-	archive_read_support_compression_all(a);
+	archive_read_support_filter_all(a);
 	archive_read_support_format_all(a);
 	if (archive_read_open_fd(a, fd, 1024)) {
 		warnx("Cannot open binary package: %s",
 		    archive_error_string(a));
-		archive_read_finish(a);
+		archive_read_close(a);
 		return NULL;
 	}

@@ -462,17 +462,17 @@
 	if (r != ARCHIVE_OK) {
 		warnx("Cannot extract package name: %s",
 		    r == ARCHIVE_EOF ? "EOF" : archive_error_string(a));
-		archive_read_finish(a);
+		archive_read_close(a);
 		return NULL;
 	}
 	if (strcmp(archive_entry_pathname(entry), "+CONTENTS") != 0) {
 		warnx("Invalid binary package, doesn't start with +CONTENTS");
-		archive_read_finish(a);
+		archive_read_close(a);
 		return NULL;
 	}
 	if (archive_entry_size(entry) > SSIZE_MAX - 1) {
 		warnx("+CONTENTS too large to process");
-		archive_read_finish(a);
+		archive_read_close(a);
 		return NULL;
 	}

@@ -482,12 +482,12 @@
 	if (archive_read_data(a, buf, len) != len) {
 		warnx("Short read when extracing +CONTENTS");
 		free(buf);
-		archive_read_finish(a);
+		archive_read_close(a);
 		return NULL;
 	}
 	buf[len] = '\0';

-	archive_read_finish(a);
+	archive_read_close(a);

 	parse_plist(&plist, buf);
 	free(buf);
@@ -579,7 +579,7 @@
 	archive_entry_set_size(sign_entry, signature_len);

 	pkg = archive_write_new();
-	archive_write_set_compression_none(pkg);
+	archive_write_add_filter_none(pkg);
 	archive_write_set_format_ar_bsd(pkg);
 	archive_write_open_filename(pkg, output);

@@ -608,7 +608,7 @@
 	archive_write_finish_entry(pkg);
 	archive_entry_free(entry);

-	archive_write_finish(pkg);
+	archive_write_close(pkg);

 	close(fd);

@@ -673,7 +673,7 @@
 	archive_entry_set_size(sign_entry, signature_len);

 	pkg = archive_write_new();
-	archive_write_set_compression_none(pkg);
+	archive_write_add_filter_none(pkg);
 	archive_write_set_format_ar_bsd(pkg);
 	archive_write_open_filename(pkg, output);

@@ -702,7 +702,7 @@
 	archive_write_finish_entry(pkg);
 	archive_entry_free(entry);

-	archive_write_finish(pkg);
+	archive_write_close(pkg);

 	close(fd);

Index: pkg_install/files/lib/vulnerabilities-file.c
===================================================================
RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/vulnerabilities-file.c,v
retrieving revision 1.7
diff -u -r1.7 vulnerabilities-file.c
--- pkg_install/files/lib/vulnerabilities-file.c	16 Jun 2010 23:02:49 -0000	1.7
+++ pkg_install/files/lib/vulnerabilities-file.c	8 Jun 2015 09:38:27 -0000
@@ -353,7 +353,7 @@
 	if ((a = archive_read_new()) == NULL)
 		errx(EXIT_FAILURE, "memory allocation failed");

-	if (archive_read_support_compression_all(a) != ARCHIVE_OK ||
+	if (archive_read_support_filter_all(a) != ARCHIVE_OK ||
 	    archive_read_support_format_raw(a) != ARCHIVE_OK ||
 	    archive_read_open_memory(a, buf, len) != ARCHIVE_OK)
 		errx(EXIT_FAILURE, "Cannot open pkg_vulnerabilies buffer: %s",
@@ -384,7 +384,7 @@
 	if ((a = archive_read_new()) == NULL)
 		errx(EXIT_FAILURE, "memory allocation failed");

-	if (archive_read_support_compression_all(a) != ARCHIVE_OK ||
+	if (archive_read_support_filter_all(a) != ARCHIVE_OK ||
 	    archive_read_support_format_raw(a) != ARCHIVE_OK ||
 	    archive_read_open_fd(a, fd, 65536) != ARCHIVE_OK)
 		errx(EXIT_FAILURE, "Cannot open ``%s'': %s", path,

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->agc
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Wed, 10 Jun 2015 08:11:48 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build errors on
 Linux
Date: Wed, 10 Jun 2015 10:26:15 +0200

 On Wed, Jun 10, 2015 at 07:35:00AM +0000, n54@gmx.com wrote:
 > Index: pkg_install/files/add/perform.c
 > ===================================================================
 > RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/add/perform.c,v
 > retrieving revision 1.106
 > diff -u -r1.106 perform.c
 > --- pkg_install/files/add/perform.c	30 Dec 2014 15:13:20 -0000	1.106
 > +++ pkg_install/files/add/perform.c	8 Jun 2015 09:38:27 -0000
 > @@ -828,7 +828,7 @@
 >  	if (!NoRecord)
 >  		pkgdb_close();
 >  	archive_write_close(writer);
 > -	archive_write_finish(writer);
 > +	archive_write_close(writer);
 >  
 >  	return r;
 >  }

 This looks wrong. Why call archive_write_close twice on the same argument?
  Thomas

From: "Kamil Rytarowski" <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build errors on
 Linux
Date: Wed, 10 Jun 2015 17:42:13 +0200

 finish() shall be replaced with free(), not with close().

 New patch attached

 Index: pkg_install/files/add/perform.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/add/perform.c,v
 retrieving revision 1.106
 diff -u -r1.106 perform.c
 --- pkg_install/files/add/perform.c	30 Dec 2014 15:13:20 -0000	1.106
 +++ pkg_install/files/add/perform.c	8 Jun 2015 09:38:27 -0000
 @@ -828,7 +828,7 @@
  	if (!NoRecord)
  		pkgdb_close();
  	archive_write_close(writer);
 -	archive_write_finish(writer);
 +	archive_write_free(writer);

  	return r;
  }
 @@ -1547,7 +1547,7 @@
  	free_plist(&pkg->plist);
  	free_meta_data(pkg);
  	if (pkg->archive)
 -		archive_read_finish(pkg->archive);
 +		archive_read_free(pkg->archive);
  	free(pkg->other_version);
  	free(pkg->pkgname);
  clean_find_archive:
 Index: pkg_install/files/admin/main.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/admin/main.c,v
 retrieving revision 1.64
 diff -u -r1.64 main.c
 --- pkg_install/files/admin/main.c	2 Jan 2015 14:26:16 -0000	1.64
 +++ pkg_install/files/admin/main.c	8 Jun 2015 09:38:27 -0000
 @@ -609,7 +609,7 @@
  				rc = 1;
  			free(archive_name);
  			if (!pkg)
 -				archive_read_finish(pkg);
 +				archive_read_free(pkg);
  		}
  		return rc;
  	} else if (strcasecmp(argv[0], "x509-sign-package") == 0) {
 Index: pkg_install/files/create/build.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/create/build.c,v
 retrieving revision 1.16
 diff -u -r1.16 build.c
 --- pkg_install/files/create/build.c	30 Dec 2014 15:13:20 -0000	1.16
 +++ pkg_install/files/create/build.c	8 Jun 2015 09:38:27 -0000
 @@ -250,20 +250,20 @@
  	}

  	if (strcmp(CompressionType, "bzip2") == 0)
 -		archive_write_set_compression_bzip2(archive);
 +		archive_write_add_filter_bzip2(archive);
  	else if (strcmp(CompressionType, "gzip") == 0)
 -		archive_write_set_compression_gzip(archive);
 +		archive_write_add_filter_gzip(archive);
  	else if (strcmp(CompressionType, "xz") == 0)
 -		archive_write_set_compression_xz(archive);
 +		archive_write_add_filter_xz(archive);
  	else if (strcmp(CompressionType, "none") == 0)
 -		archive_write_set_compression_none(archive);
 +		archive_write_add_filter_none(archive);
  	else
  		errx(1, "Unspported compression type for -F: %s",
  		    CompressionType);

  	archive_name = xasprintf("%s.%s", pkg, suffix);

 -	if (archive_write_open_file(archive, archive_name))
 +	if (archive_write_open_filename(archive, archive_name))
  		errx(2, "cannot create archive: %s", archive_error_string(archive));

  	free(archive_name);
 @@ -326,7 +326,7 @@

  	if (archive_write_close(archive))
  		errx(2, "cannot finish archive: %s", archive_error_string(archive));
 -	archive_write_finish(archive);
 +	archive_write_free(archive);

  	free(initial_cwd);
  }
 Index: pkg_install/files/info/perform.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/info/perform.c,v
 retrieving revision 1.62
 diff -u -r1.62 perform.c
 --- pkg_install/files/info/perform.c	30 Dec 2014 15:13:20 -0000	1.62
 +++ pkg_install/files/info/perform.c	8 Jun 2015 09:38:27 -0000
 @@ -358,7 +358,7 @@
  		free(pkgname);

  		meta = read_meta_data_from_archive(archive, entry);
 -		archive_read_finish(archive);
 +		archive_read_free(archive);
  		if (!IS_URL(pkg))
  			binpkgfile = pkg;
  #endif
 Index: pkg_install/files/lib/pkg_io.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/pkg_io.c,v
 retrieving revision 1.11
 diff -u -r1.11 pkg_io.c
 --- pkg_install/files/lib/pkg_io.c	20 Apr 2010 00:39:13 -0000	1.11
 +++ pkg_install/files/lib/pkg_io.c	8 Jun 2015 09:38:27 -0000
 @@ -146,13 +146,13 @@
  	*archive_name = fetchStringifyURL(url);

  	a = archive_read_new();
 -	archive_read_support_compression_all(a);
 +	archive_read_support_filter_all(a);
  	archive_read_support_format_all(a);
  	if (archive_read_open(a, f, fetch_archive_open, fetch_archive_read,
  	    fetch_archive_close)) {
  		free(*archive_name);
  		*archive_name = NULL;
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		return NULL;
  	}

 @@ -169,7 +169,7 @@

  	if (!IS_URL(url)) {
  		a = archive_read_new();
 -		archive_read_support_compression_all(a);
 +		archive_read_support_filter_all(a);
  		archive_read_support_format_all(a);
  		if (archive_read_open_filename(a, url, 1024)) {
  			archive_read_close(a);
 Index: pkg_install/files/lib/pkg_signature.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/pkg_signature.c,v
 retrieving revision 1.11
 diff -u -r1.11 pkg_signature.c
 --- pkg_install/files/lib/pkg_signature.c	11 Sep 2013 14:10:05 -0000	1.11
 +++ pkg_install/files/lib/pkg_signature.c	8 Jun 2015 09:38:27 -0000
 @@ -159,7 +159,7 @@
  {
  	struct signature_archive *state = cookie;

 -	archive_read_finish(state->archive);
 +	archive_read_free(state->archive);
  	free_signature_int(state);
  	return 0;
  }
 @@ -330,7 +330,7 @@
  	r = read_file_from_archive(archive_name, *archive, entry, HASH_FNAME,
  	    &hash_file, &hash_len);
  	if (r == -1) {
 -		archive_read_finish(*archive);
 +		archive_read_free(*archive);
  		*archive = NULL;
  		free(state);
  		goto no_valid_signature;
 @@ -345,7 +345,7 @@
  	r = read_file_from_archive(archive_name, *archive, entry, SIGNATURE_FNAME,
  	    &signature_file, &signature_len);
  	if (r == -1) {
 -		archive_read_finish(*archive);
 +		archive_read_free(*archive);
  		*archive = NULL;
  		free(state);
  		free(hash_file);
 @@ -356,7 +356,7 @@
  			    entry, GPG_SIGNATURE_FNAME,
  			    &signature_file, &signature_len);
  		if (r == -1) {
 -			archive_read_finish(*archive);
 +			archive_read_free(*archive);
  			*archive = NULL;
  			free(state);
  			free(hash_file);
 @@ -400,12 +400,12 @@
  	state->archive = *archive;

  	a = archive_read_new();
 -	archive_read_support_compression_all(a);
 +	archive_read_support_filter_all(a);
  	archive_read_support_format_all(a);
  	if (archive_read_open(a, state, NULL, verify_signature_read_cb,
  	    verify_signature_close_cb)) {
  		warnx("Can't open signed package file");
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		goto no_valid_signature;
  	}
  	*archive = a;
 @@ -449,12 +449,12 @@
  	int r;

  	a = archive_read_new();
 -	archive_read_support_compression_all(a);
 +	archive_read_support_filter_all(a);
  	archive_read_support_format_all(a);
  	if (archive_read_open_fd(a, fd, 1024)) {
  		warnx("Cannot open binary package: %s",
  		    archive_error_string(a));
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		return NULL;
  	}

 @@ -462,17 +462,17 @@
  	if (r != ARCHIVE_OK) {
  		warnx("Cannot extract package name: %s",
  		    r == ARCHIVE_EOF ? "EOF" : archive_error_string(a));
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		return NULL;
  	}
  	if (strcmp(archive_entry_pathname(entry), "+CONTENTS") != 0) {
  		warnx("Invalid binary package, doesn't start with +CONTENTS");
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		return NULL;
  	}
  	if (archive_entry_size(entry) > SSIZE_MAX - 1) {
  		warnx("+CONTENTS too large to process");
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		return NULL;
  	}

 @@ -482,12 +482,12 @@
  	if (archive_read_data(a, buf, len) != len) {
  		warnx("Short read when extracing +CONTENTS");
  		free(buf);
 -		archive_read_finish(a);
 +		archive_read_free(a);
  		return NULL;
  	}
  	buf[len] = '\0';

 -	archive_read_finish(a);
 +	archive_read_free(a);

  	parse_plist(&plist, buf);
  	free(buf);
 @@ -579,7 +579,7 @@
  	archive_entry_set_size(sign_entry, signature_len);

  	pkg = archive_write_new();
 -	archive_write_set_compression_none(pkg);
 +	archive_write_add_filter_none(pkg);
  	archive_write_set_format_ar_bsd(pkg);
  	archive_write_open_filename(pkg, output);

 @@ -608,7 +608,7 @@
  	archive_write_finish_entry(pkg);
  	archive_entry_free(entry);

 -	archive_write_finish(pkg);
 +	archive_write_free(pkg);

  	close(fd);

 @@ -673,7 +673,7 @@
  	archive_entry_set_size(sign_entry, signature_len);

  	pkg = archive_write_new();
 -	archive_write_set_compression_none(pkg);
 +	archive_write_add_filter_none(pkg);
  	archive_write_set_format_ar_bsd(pkg);
  	archive_write_open_filename(pkg, output);

 @@ -702,7 +702,7 @@
  	archive_write_finish_entry(pkg);
  	archive_entry_free(entry);

 -	archive_write_finish(pkg);
 +	archive_write_free(pkg);

  	close(fd);

 Index: pkg_install/files/lib/vulnerabilities-file.c
 ===================================================================
 RCS file: /home/kamil/netbsd-cvs/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/vulnerabilities-file.c,v
 retrieving revision 1.7
 diff -u -r1.7 vulnerabilities-file.c
 --- pkg_install/files/lib/vulnerabilities-file.c	16 Jun 2010 23:02:49 -0000	1.7
 +++ pkg_install/files/lib/vulnerabilities-file.c	8 Jun 2015 09:38:27 -0000
 @@ -353,7 +353,7 @@
  	if ((a = archive_read_new()) == NULL)
  		errx(EXIT_FAILURE, "memory allocation failed");

 -	if (archive_read_support_compression_all(a) != ARCHIVE_OK ||
 +	if (archive_read_support_filter_all(a) != ARCHIVE_OK ||
  	    archive_read_support_format_raw(a) != ARCHIVE_OK ||
  	    archive_read_open_memory(a, buf, len) != ARCHIVE_OK)
  		errx(EXIT_FAILURE, "Cannot open pkg_vulnerabilies buffer: %s",
 @@ -384,7 +384,7 @@
  	if ((a = archive_read_new()) == NULL)
  		errx(EXIT_FAILURE, "memory allocation failed");

 -	if (archive_read_support_compression_all(a) != ARCHIVE_OK ||
 +	if (archive_read_support_filter_all(a) != ARCHIVE_OK ||
  	    archive_read_support_format_raw(a) != ARCHIVE_OK ||
  	    archive_read_open_fd(a, fd, 65536) != ARCHIVE_OK)
  		errx(EXIT_FAILURE, "Cannot open ``%s'': %s", path,

Responsible-Changed-From-To: agc->kamil
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 31 Oct 2015 17:34:33 +0000
Responsible-Changed-Why:
Kamil, you can submit your own patch :)


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build errors on
 Linux
Date: Sun, 1 May 2016 04:44:48 +0000

 On Wed, Jun 10, 2015 at 07:35:00AM +0000, n54@gmx.com wrote:
  > @@ -828,7 +828,7 @@
  >  	if (!NoRecord)
  >  		pkgdb_close();
  >  	archive_write_close(writer);
  > -	archive_write_finish(writer);
  > +	archive_write_close(writer);

 surely calling archive_write_close() twice isn't what you intended...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: kamil@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	n54@gmx.com
Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build errors on
 Linux
Date: Sun, 1 May 2016 20:49:44 +0200

 On Sun, May 01, 2016 at 04:45:01AM +0000, David Holland wrote:
 >  On Wed, Jun 10, 2015 at 07:35:00AM +0000, n54@gmx.com wrote:
 >   > @@ -828,7 +828,7 @@
 >   >  	if (!NoRecord)
 >   >  		pkgdb_close();
 >   >  	archive_write_close(writer);
 >   > -	archive_write_finish(writer);
 >   > +	archive_write_close(writer);
 >  
 >  surely calling archive_write_close() twice isn't what you intended...

 I have a correct patch around, but the motivation for not committing it
 was avoiding work for in-tree pkg_install. The original issue of incorrect
 warning sets on Linux has long been fixed.

 Joerg

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build errors on
 Linux
Date: Sun, 1 May 2016 21:35:28 +0200

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --wXbBkEdXHk7QRpaQL9arNDMkhauwCQcGu
 Content-Type: multipart/mixed; boundary="7hG1PRFu1MMQbCfNEubstlfPdSoCOd4TN"
 From: Kamil Rytarowski <n54@gmx.com>
 To: gnats-bugs@NetBSD.org
 Message-ID: <0fb79f40-e7ef-8ad6-af22-01b9f80fdac8@gmx.com>
 Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build errors on
  Linux
 References: <pr-pkg-49959@gnats.netbsd.org>
  <20150610073016.86517A65BC@mollari.NetBSD.org>
  <20160501185500.BA4C17AA95@mollari.NetBSD.org>
 In-Reply-To: <20160501185500.BA4C17AA95@mollari.NetBSD.org>

 --7hG1PRFu1MMQbCfNEubstlfPdSoCOd4TN
 Content-Type: text/plain; charset=windows-1252
 Content-Transfer-Encoding: quoted-printable



 On 01.05.2016 20:55, Joerg Sonnenberger wrote:
 > The following reply was made to PR pkg/49959; it has been noted by GNAT=
 S.
 >=20
 > From: Joerg Sonnenberger <joerg@bec.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: kamil@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
 > 	n54@gmx.com
 > Subject: Re: pkg/49959: Cannot bootstrap due to pkg_install build error=
 s on
 >  Linux
 > Date: Sun, 1 May 2016 20:49:44 +0200
 >=20
 >  On Sun, May 01, 2016 at 04:45:01AM +0000, David Holland wrote:
 >  >  On Wed, Jun 10, 2015 at 07:35:00AM +0000, n54@gmx.com wrote:
 >  >   > @@ -828,7 +828,7 @@
 >  >   >  	if (!NoRecord)
 >  >   >  		pkgdb_close();
 >  >   >  	archive_write_close(writer);
 >  >   > -	archive_write_finish(writer);
 >  >   > +	archive_write_close(writer);
 >  > =20
 >  >  surely calling archive_write_close() twice isn't what you intended.=
 =2E.
 > =20
 >  I have a correct patch around, but the motivation for not committing i=
 t
 >  was avoiding work for in-tree pkg_install. The original issue of incor=
 rect
 >  warning sets on Linux has long been fixed.
 > =20
 >  Joerg
 > =20
 >=20

 I think I resent a correct patch to the mailing list with corrected
 function calls, but since the ArchLinux user is gone for now I'm
 considering the status of this report on my side as "dead".


 --7hG1PRFu1MMQbCfNEubstlfPdSoCOd4TN--

 --wXbBkEdXHk7QRpaQL9arNDMkhauwCQcGu
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2

 iQIcBAEBCAAGBQJXJlqSAAoJEEuzCOmwLnZs9DQQAIP0JZvELQrXrJs6KS20waa1
 wF9Jn5ZXgKF7tRBUKTUMgDL3HvKwAHMyZUIcjrYcBRths3nRnEpKt9xjnb4QHqvF
 nph5twg81uCMb84ODMWdZZfXVHvX4a1fWmIsxicvrQ7NbZqZbBvaSNNjOtZ8Pxh8
 qTNeSJblvJsqDdZLpKjxLQoO2sHv0MTVnn2kot0fphEwSMs/+VHOEbgpSPyN1/Yy
 YReAPxIJG1RYWTkmlpgQtOqgr7u3BTrvJ5LQkeZAh467U0JFD2V9pcz0qrh4C+KR
 dtlJhhRwurYDesVE60BTob8crlmwrp9jNQH0/R49pKG3+yv3oEfGzSZ5MxlzTdJN
 nJJeXPLRkZrXdFbPloECcP4pNvMybvAXi+/NIk8GV0kyq5QwfdRcBv8YqvjVW1uH
 cD5aTbMFVTp693iaInL4mrebXZZjWje4as3MW/Mn6hySaXUQk7zxAyD7br3eueKn
 Cb4l69BcyU+aGtanaqDOea9nNnutHnvg+x7/m7GTwS+Yxx8d8EZWc+jHMa6p4DT4
 wrvca9YnaniE7cnRXZRadAcn3AS/Rl7JwK5PtlhOtOky5VvyxUIuW9cydJsnQjBs
 apywk3xIiVBbo6MA5npOvCr4W+u5RwfeCibN4ToHnSpQdgtuxlz4v7+7jYdDycXX
 08KP9PH/OP1Q3gd7GEQx
 =586a
 -----END PGP SIGNATURE-----

 --wXbBkEdXHk7QRpaQL9arNDMkhauwCQcGu--

State-Changed-From-To: open->dead
State-Changed-By: kamil@NetBSD.org
State-Changed-When: Fri, 05 Aug 2016 17:19:38 +0200
State-Changed-Why:
The user reporting this is now gone.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.