Bug 249075 - x11/xclip: fix xclip-pastefile
Summary: x11/xclip: fix xclip-pastefile
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-03 09:43 UTC by Tomohiro Hosaka
Modified: 2021-03-19 06:48 UTC (History)
3 users (show)

See Also:


Attachments
patch (1.26 KB, patch)
2020-09-19 09:16 UTC, Tomohiro Hosaka
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomohiro Hosaka 2020-09-03 09:43:57 UTC
tar is used in the xclip-pastefile.
I get the following error:

    # xclip-pastefile
    tar: Error opening archive: Failed to open '/dev/sa0'

    It will be fixed below.
    --- xclip-pastefile.orig	2016-09-13 07:09:12 UTC
    +++ xclip-pastefile
    @@ -4,4 +4,4 @@ if [ "x$1" != "x" ]; then
        echo "Usage: $0" >&2
        exit 1
    fi
    -xclip -selection secondary -o | gunzip -c | tar xv
    +xclip -selection secondary -o | gunzip -c | tar xv -f -

According to the Makefile style, is the below suitable?

    --- Makefile.orig	2020-09-03 18:40:55.121010000 +0900
    +++ Makefile	2020-09-03 18:35:11.439860000 +0900
    @@ -27,6 +27,7 @@

    post-patch:
            ${REINPLACE_CMD} 's,mktemp,mktemp -t xclip,' ${WRKSRC}/xclip-copyfile
    +	${REINPLACE_CMD} 's,tar xv,tar xv -f -,' ${WRKSRC}/xclip-pastefile

    post-install:
            ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xclip

thanks.
Comment 1 Dmitri Goutnik freebsd_committer 2020-09-03 21:01:46 UTC
(In reply to Tomohiro Hosaka from comment #0)
Hi,

Thanks for the patch. Looks like this was already fixed upstream [1] but the fix didn't make it into xclip-0.13. Would you mind updating PR to pull the patch from Github?

Also, since this port is currently unmaintained, how do you feel about taking over the maintainership?

[1] https://github.com/astrand/xclip/commit/db74a39e15f1a75bb1f828103ae7a8d2b4d8ccc3
Comment 2 Tomohiro Hosaka 2020-09-19 09:16:59 UTC
Created attachment 218069 [details]
patch

Hi,

Thanks for your advice.

I followed the advice.

There is no problem changing the maintainer.

Thanks,
Comment 3 Nuno Teixeira freebsd_committer 2020-10-31 11:00:59 UTC
(In reply to Dmitri Goutnik from comment #1)

Hello,

I was about to adopt this port but I see your PR.

What do you think about:

- no need to add GH_PROJECT because it is equal to PORTNAME

- using files/patches instead of REINPLACE_CMDs?
  . copy {WRKSRC}/xclip-copyfile to {WRKSRC}/xclip-copyfile.orig
  . copy {WRKSRC}/xclip-pastefile to {WRKSRC}/xclip-pastefile.orig
  . edit and make changes in {WRKSRC}/xclip-copyfile and {WRKSRC}/xclip-pastefile
  . run 'make makepatch' on port root to auto-generate patches
  . remove: post-patch and REINPLACE_CMD lines from Makefile

- add license file:
  LICENSE_FILE=   ${WRKSRC}/COPYING

- install README file because it contains more info and examples:
  PORTDOCS=       README
  OPTIONS_DEFINE=         DOCS

  do-install-DOCS-on:
        @${MKDIR} ${STAGEDIR}${DOCSDIR}
        ${INSTALL_MAN} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

Thanks,

Nuno Teixeira
Comment 4 Dmitry Marakasov freebsd_committer 2021-03-17 18:25:23 UTC
Assign to current maintainer.
Comment 5 Nuno Teixeira freebsd_committer 2021-03-18 14:25:50 UTC
Patch already committed in ports r568742.
Comment 6 Nuno Teixeira freebsd_committer 2021-03-18 14:34:28 UTC
Coorect review r564845
Comment 7 Nuno Teixeira freebsd_committer 2021-03-19 06:48:49 UTC
Committed in https://svnweb.freebsd.org/ports?view=revision&revision=560395