Bug 231827 - unzip sync with NetBSD upstream
Summary: unzip sync with NetBSD upstream
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: Yoshihiro Takahashi
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-09-30 17:11 UTC by Alex Kozlov
Modified: 2021-01-19 15:04 UTC (History)
2 users (show)

See Also:


Attachments
sync with NetBSD upstream (1.26 KB, text/plain)
2018-09-30 17:11 UTC, Alex Kozlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kozlov freebsd_committer 2018-09-30 17:11:24 UTC
Created attachment 197636 [details]
sync with NetBSD upstream

Sync unzip in the base with upstream from NetBSD (rev1.24):

- Ignore malformed directory entries as created by Dropbox ("/")
- Use getline() instead of getdelim()
- Always overwrite symlinks on extraction, ever if they're newer than entries in the archive
- Use libarchive 3.x interface: check result for archive_read_free() and don't call archive_read_close() manually
Comment 1 Dag-Erling Smørgrav freebsd_committer 2018-10-30 13:42:58 UTC
I don't maintain unzip.
Comment 2 Martin Matuska freebsd_committer 2018-11-25 01:17:43 UTC
I am OK with the changes, you can add me to Reviewed by:
Comment 3 Alex Kozlov freebsd_committer 2018-11-26 11:59:09 UTC
Thanks. I don't have src bit though. Can I commit this pr with Approved by: mm
or you prefer to do it yourself?
Comment 4 commit-hook freebsd_committer 2021-01-02 01:52:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=0cdfa4956424dc816944a84568a4d9900b68f5e3

commit 0cdfa4956424dc816944a84568a4d9900b68f5e3
Author:     Yoshihiro Takahashi <nyan@FreeBSD.org>
AuthorDate: 2021-01-02 01:50:08 +0000
Commit:     Yoshihiro Takahashi <nyan@FreeBSD.org>
CommitDate: 2021-01-02 01:50:08 +0000

    unzip: Sync with NetBSD upstream.

    - Ignore malformed directory entries as created by Dropbox ("/").
      (rev 1.24)
    - Use libarchive 3.x interface: check result for archive_read_free()
      and don't call archive_read_close manually. (rev 1.23)
    - Always overwrite symlinks on extraction, ever if they're newer than
      entries in archive.
    - Use getline() rather than getdelim().

    PR:             231827
    Submitted by:   ak
    Reviewed by:    mm
    Obtained from:  NetBSD
    MFC after:      2 weeks

 usr.bin/unzip/unzip.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Comment 5 commit-hook freebsd_committer 2021-01-19 12:25:17 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=c735bf1ae3874ce1e9cfa718b95aad628b91f030

commit c735bf1ae3874ce1e9cfa718b95aad628b91f030
Author:     Yoshihiro Takahashi <nyan@FreeBSD.org>
AuthorDate: 2021-01-02 01:50:08 +0000
Commit:     Yoshihiro Takahashi <nyan@FreeBSD.org>
CommitDate: 2021-01-19 12:20:53 +0000

    unzip: Sync with NetBSD upstream.

    - Ignore malformed directory entries as created by Dropbox ("/").
      (rev 1.24)
    - Use libarchive 3.x interface: check result for archive_read_free()
      and don't call archive_read_close manually. (rev 1.23)
    - Always overwrite symlinks on extraction, ever if they're newer than
      entries in archive.
    - Use getline() rather than getdelim().

    PR:             231827
    Submitted by:   ak
    Reviewed by:    mm
    Obtained from:  NetBSD

    (cherry picked from commit 0cdfa4956424dc816944a84568a4d9900b68f5e3)

 usr.bin/unzip/unzip.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Comment 6 Yoshihiro Takahashi freebsd_committer 2021-01-19 15:04:49 UTC
Commited.  Thanks.