From owner-freebsd-stable@FreeBSD.ORG Mon May 28 17:59:19 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 493B4106568B for ; Mon, 28 May 2012 17:59:19 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id DEA918FC15 for ; Mon, 28 May 2012 17:59:18 +0000 (UTC) Received: by yhgm50 with SMTP id m50so2146036yhg.13 for ; Mon, 28 May 2012 10:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to; bh=aqot/5/N0XoQTJsngXOObiR6ON3ShE9g9QWgdslqSM0=; b=R4bYFN4neEj8S7eGjIFoTwB5aX8rl5YqW4Qv+1BOykpBRRrZxaeE1tdYunq+1EH/WB I6D7kzVXGYynBef+KLO+Z2U9oPr+2iiXanDh2nkgZrStoJmdu2/4xQNTNMN/KEoWWcd4 LnRVy7FpHS6f28O8TbORBxY13itgNlc7P8Kpc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:x-gm-message-state; bh=aqot/5/N0XoQTJsngXOObiR6ON3ShE9g9QWgdslqSM0=; b=oUOwr4e+y+vP08SSoU+cNKUBri8cHlQpaoyXIlc7B2kwlo52PCbEpt1DeITi0RoRel qoO6+ITe3b/2kW8xGS9yAlSa6iTdZLej5iH6OFN+F1LwIW5uKIor/zvz5yvlSGKfk4wV 46d8BPGjDsKs92nkjs9zt6kXwsAvhTHTJG58H3WeHISJ19nVv2kTxJJ/MZTBzMH3RIIr lU24g8Uk9U90KitDWGVI97oalZL9GrnaZE2xVg0YlnIDUmwVInLZ80M7aHPeqxFjA+Wk 1aCQUPOYS+xWFGkh0V0tVEAGlqHD7LdGYpWaqjnwS8Prf7s+pls6WXl0ZfK2cEML/7pB d9Og== Received: by 10.50.186.196 with SMTP id fm4mr5073561igc.34.1338227957993; Mon, 28 May 2012 10:59:17 -0700 (PDT) Received: from DataIX.net (24-247-238-117.dhcp.aldl.mi.charter.com. [24.247.238.117]) by mx.google.com with ESMTPS id vx5sm6446270igb.6.2012.05.28.10.59.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 May 2012 10:59:17 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q4SHxDIA033160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 May 2012 13:59:13 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q4SHxDSh033159; Mon, 28 May 2012 13:59:13 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Mon, 28 May 2012 13:59:13 -0400 From: Jason Hellenthal To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20120528175913.GC10333@DataIX.net> References: <20120526202432.GA265@DataIX.net> <20120528010146.GA40399@DataIX.net> <86r4u4b4u4.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86r4u4b4u4.fsf@ds4.des.no> X-Gm-Message-State: ALoCoQl1Ri9KV3JdNqQbd8z6b0GRZhR08T9ihrsnY/VDcpd+m5pSNKODF2A+H27Fc6Bq1GqXBUw/ Cc: stable@freebsd.org, ed@freebsd.org, rdivacky@freebsd.org, miwi@freebsd.org Subject: Re: /usr/bin/unzip not being installed on 8.3-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2012 17:59:19 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Here is the unzip diff from stable/8 -> head On Mon, May 28, 2012 at 07:20:03PM +0200, Dag-Erling Smørgrav wrote: > Jason Hellenthal writes: > > Could someone MFC this to stable/8 please... > > Is unzip in stable/8 identical to unzip in head and stable/9? If not, > this should be addressed first. Otherwise, there is a good chance that > many ports will fail to build. > > DES > -- > Dag-Erling Smørgrav - des@des.no -- - (2^(N-1)) --EeQfGwPcQSOJBaQU Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="unzip.diff" Content-Transfer-Encoding: 8bit Index: unzip.1 =================================================================== --- unzip.1 (.../stable/8/usr.bin/unzip) (revision 236186) +++ unzip.1 (.../head/usr.bin/unzip) (revision 236186) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007-2008 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -38,7 +38,6 @@ .Ar zipfile .Sh DESCRIPTION .\" ... -.Pp The following options are available: .Bl -tag -width Fl .It Fl a @@ -121,6 +120,10 @@ and .Fl u may be specified. +If specified filename is +.Qq - , +then data is read from +.Va stdin . .Sh ENVIRONMENT If the .Ev UNZIP_DEBUG Index: unzip.c =================================================================== --- unzip.c (.../stable/8/usr.bin/unzip) (revision 236186) +++ unzip.c (.../head/usr.bin/unzip) (revision 236186) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2009 Joerg Sonnenberger - * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2007-2008 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -426,7 +426,7 @@ fprintf(stderr, "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", *path); - if (fgets(buf, sizeof(buf), stdin) == 0) { + if (fgets(buf, sizeof(buf), stdin) == NULL) { clearerr(stdin); printf("NULL\n(EOF or read error, " "treating as \"[N]one\"...)\n"); @@ -868,10 +868,14 @@ int fd, ret; uintmax_t total_size, file_count, error_count; - if ((fd = open(fn, O_RDONLY)) < 0) + if (strcmp(fn, "-") == 0) + fd = STDIN_FILENO; + else if ((fd = open(fn, O_RDONLY)) < 0) error("%s", fn); - a = archive_read_new(); + if ((a = archive_read_new()) == NULL) + error("archive_read_new failed"); + ac(archive_read_support_format_zip(a)); ac(archive_read_open_fd(a, fd, 8192)); @@ -929,7 +933,7 @@ ac(archive_read_close(a)); (void)archive_read_finish(a); - if (close(fd) != 0) + if (fd != STDIN_FILENO && close(fd) != 0) error("%s", fn); if (t_opt) { Index: Makefile =================================================================== --- Makefile (.../stable/8/usr.bin/unzip) (revision 236186) +++ Makefile (.../head/usr.bin/unzip) (revision 236186) @@ -1,7 +1,6 @@ # $FreeBSD$ PROG = unzip -WARNS ?= 6 CSTD = c99 DPADD = ${LIBARCHIVE} ${LIBZ} LDADD = -larchive -lz Index: . =================================================================== --- . (.../stable/8/usr.bin/unzip) (revision 236186) +++ . (.../head/usr.bin/unzip) (revision 236186) Property changes on: . ___________________________________________________________________ Deleted: svn:mergeinfo Reverse-merged /head/sys/usr.bin/unzip:r196863 Reverse-merged /head/usr.bin/unzip:r196045-201385,201387-207627,207842,207844,208320,212770,213738,213814,216591,223132,223152,223947,224271,224641,227006,227755,228857,230555,234206,235252 Reverse-merged /vendor/resolver/dist/usr.bin/unzip:r1540-186085 Reverse-merged /user/luigi/ipfw3-r8/usr.bin/unzip:r204833-205419 --EeQfGwPcQSOJBaQU--