From lchen@zen.lhaven.homeip.net  Fri Mar 14 00:04:01 2014
Return-Path: <lchen@zen.lhaven.homeip.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id D80744CD
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Mar 2014 00:04:01 +0000 (UTC)
Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A81F2145
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Mar 2014 00:04:00 +0000 (UTC)
Received: from ip70-179-144-228.fv.ks.cox.net ([70.179.144.228] helo=zen.lhaven.homeip.net)
	by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256)
	(Exim 4.72)
	(envelope-from <lchen@zen.lhaven.homeip.net>)
	id 1WOFbO-000CNI-82
	for FreeBSD-gnats-submit@freebsd.org; Fri, 14 Mar 2014 00:03:54 +0000
Received: from zen.lhaven.homeip.net (localhost [127.0.0.1])
	by zen.lhaven.homeip.net (8.14.8/8.14.7) with ESMTP id s2E03qG9080266;
	Thu, 13 Mar 2014 19:03:52 -0500 (CDT)
	(envelope-from lchen@zen.lhaven.homeip.net)
Received: (from lchen@localhost)
	by zen.lhaven.homeip.net (8.14.8/8.14.7/Submit) id s2E03lmN080265;
	Thu, 13 Mar 2014 19:03:47 -0500 (CDT)
	(envelope-from lchen)
Message-Id: <201403140003.s2E03lmN080265@zen.lhaven.homeip.net>
Date: Thu, 13 Mar 2014 19:03:47 -0500 (CDT)
From: Lawrence "The Dreamer" Chen <beastie@tardisi.com>
Reply-To: Lawrence "The Dreamer" Chen <beastie@tardisi.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: deskutils/parcellite: doesn't work, thinks I'm Linux?
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         187559
>Category:       ports
>Synopsis:       deskutils/parcellite: doesn't work, thinks I'm Linux?
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    nemysis
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 14 00:10:00 UTC 2014
>Closed-Date:    Fri Mar 14 01:24:30 UTC 2014
>Last-Modified:  Wed Mar 26 18:10:02 UTC 2014
>Originator:     Lawrence "The Dreamer" Chen
>Release:        FreeBSD 9.2-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD zen.lhaven.homeip.net 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 03:25:02 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	
	parcellite not working as expected and seems to be looking for Linux
	/proc?
>How-To-Repeat:
	
	With the previous version:

	% echo "hello world" | parcellite
	Xlib:  extension "RANDR" missing on display ":0".
	% parcellite -c
	Xlib:  extension "RANDR" missing on display ":0".

	(parcellite:75327): GLib-WARNING **: goption.c:2199: ignoring no-arg, optional-arg or filename flags (8) on option of arg-type 0 in entry (null):daemon

	(parcellite:75327): GLib-WARNING **: goption.c:2199: ignoring no-arg, optional-arg or filename flags (8) on option of arg-type 0 in entry (null):no-icon

	(parcellite:75327): GLib-WARNING **: goption.c:2199: ignoring no-arg, optional-arg or filename flags (8) on option of arg-type 0 in entry (null):clipboard

	(parcellite:75327): GLib-WARNING **: goption.c:2199: ignoring no-arg, optional-arg or filename flags (8) on option of arg-type 0 in entry (null):primary
	hello world
	%

	With latest version:

 	% echo "hello world" | parcellite
	Xlib:  extension "RANDR" missing on display ":0.0".
	Unable to open '/proc/75790/environ' for PID 75790
	Unable to access 'XDG_SESSION_COOKIE' for pid 75790
	Unable to open '/proc/75790/environ' for PID 75790
	Unable to access 'XDG_SEAT' for pid 75790
	Unable to open '/proc/75790/environ' for PID 75790
	Unable to access 'DISPLAY' for pid 75790
	tracker
	** (parcellite:75790): WARNING **: Binding '<Ctrl><Alt>H' failed!


	** (parcellite:75790): WARNING **: Binding '<Ctrl><Alt>X' failed!


	** (parcellite:75790): WARNING **: Binding '<Ctrl><Alt>A' failed!

	[command does not return]^C
	% parcellite -c
	Xlib:  extension "RANDR" missing on display ":0.0".
	Unable to open '/proc/75860/environ' for PID 75860
	Unable to access 'XDG_SESSION_COOKIE' for pid 75860
	Unable to open '/proc/75860/environ' for PID 75860
	Unable to access 'XDG_SEAT' for pid 75860
	Unable to open '/proc/75860/environ' for PID 75860
	Unable to access 'DISPLAY' for pid 75860

	tracker
	** (parcellite:75860): WARNING **: Binding '<Ctrl><Alt>H' failed!


	** (parcellite:75860): WARNING **: Binding '<Ctrl><Alt>X' failed!


	** (parcellite:75860): WARNING **: Binding '<Ctrl><Alt>A' failed!

	[command does not return]^C
	%

	Note: "tracker" is what was in my clipboard before running the above.

>Fix:

	

	Probably need to patch the "get_value_from_env()" routine in
	${WRKSRC}/src/utils.c to work on FreeBSD.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->nemysis 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Mar 14 00:10:08 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187559 

From: Rusmir Dusko <nemysis@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: "Lawrence \"The Dreamer\" Chen" <beastie@tardisi.com>
Subject: Re: ports/187559: deskutils/parcellite: doesn't work, thinks I'm
 Linux?
Date: Fri, 14 Mar 2014 02:12:52 +0100

 Added information about /proc and linprocfs in files/pkg-message-in.
 
 -- 
 Best regards,
 Rusmir Dusko
State-Changed-From-To: open->closed 
State-Changed-By: nemysis 
State-Changed-When: Fri Mar 14 01:24:29 UTC 2014 
State-Changed-Why:  
Added information about /proc and linprocfs in files/pkg-message-in 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187559 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187559: commit references a PR
Date: Fri, 14 Mar 2014 01:32:02 +0000 (UTC)

 Author: nemysis
 Date: Fri Mar 14 01:31:55 2014
 New Revision: 348145
 URL: http://svnweb.freebsd.org/changeset/ports/348145
 QAT: https://qat.redports.org/buildarchive/r348145/
 
 Log:
   - Remove TODO from DOCS
   - Add pkg-message, information about GNU/Linux
   
   PR:		ports/187559
   Submitted by:	Lawrence "The Dreamer" Chen <beastie@tardisi.com>
 
 Added:
   head/deskutils/parcellite/files/pkg-message.in   (contents, props changed)
 Modified:
   head/deskutils/parcellite/Makefile
 
 Modified: head/deskutils/parcellite/Makefile
 ==============================================================================
 --- head/deskutils/parcellite/Makefile	Fri Mar 14 00:46:12 2014	(r348144)
 +++ head/deskutils/parcellite/Makefile	Fri Mar 14 01:31:55 2014	(r348145)
 @@ -18,7 +18,7 @@ USES=		gmake pkgconfig
  GNU_CONFIGURE=	yes
  USE_GNOME=	gtk20
  
 -PORTDOCS=	AUTHORS ChangeLog README TODO
 +PORTDOCS=	AUTHORS ChangeLog README
  
  OPTIONS_DEFINE= DOCS NLS
  OPTIONS_SUB=	yes
 @@ -26,6 +26,8 @@ OPTIONS_SUB=	yes
  NLS_CONFIGURE_ENABLE=	nls
  NLS_USES=	gettext
  
 +SUB_FILES=	pkg-message
 +
  .include <bsd.port.options.mk>
  
  post-patch:
 
 Added: head/deskutils/parcellite/files/pkg-message.in
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/deskutils/parcellite/files/pkg-message.in	Fri Mar 14 01:31:55 2014	(r348145)
 @@ -0,0 +1,21 @@
 +################################################################################
 +
 +Parcellite has been installed.
 +
 +This program will attempt to obtain some system information by accessing files
 +in procfs and linprocfs. You must mount procfs and linprocfs filesystem for this
 +to work correctly.
 +This can be accomplished by adding the following line to your /etc/fstab file:
 +
 +# Device                Mountpoint              FStype        Options Dump Pass
 +proc                    /proc                  procfs         rw      0    0
 +linprocfs               /compat/linux/proc      linprocfs     rw      0    0
 +
 +and then, as root, executing the command:
 +
 +mount /proc
 +
 +kldload linprocfs
 +mount /compat/linux/proc
 +
 +################################################################################
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: The BSD Dreamer <beastie@tardisi.com>
To: Rusmir Dusko <nemysis@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/187559: deskutils/parcellite: doesn't work, thinks I'm
 =?UTF-8?Q?Linux=3F?=
Date: Wed, 26 Mar 2014 11:44:56 -0500

 On 2014-03-13 20:12, Rusmir Dusko wrote:
 > Added information about /proc and linprocfs in files/pkg-message-in.
 
 This doesn't fix the problem...I already had linprocfs mounted as 
 /compat/linux/proc
 
 The problem is parcellite is looking at /proc
 
 With this patch to make it use /compat/linux/proc instead, it is at least 
 somewhat usable.
 
 % cat patch.shar | parcellite
 Xlib:  extension "RANDR" missing on display ":0".
 Unable to load pref 'key_input'
 Unable to load pref 'restore_empty'
 Unable to load pref 'rc_edit'
 Unable to load pref 'nonprint_disp'
 Unable to load pref 'multi_user'
 dividerbevel.pas(19,12) Fatal: Can't find unit LResources used by 
 DividerBevellc
 
 The last line was previous clipboard content. Not sure it's supposed to do 
 that in this version now, but I think it's not supposed to.
 
 Ctrl-V
 ======
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	files/patch-src__utils.c
 #
 echo x - files/patch-src__utils.c
 sed 's/^X//' >files/patch-src__utils.c << 'ab2e48d8e66368c3640e4e3f94b8e4fc'
 X--- src/utils.c.orig	2013-10-15 12:39:04.000000000 -0500
 X+++ src/utils.c	2014-03-23 08:43:07.366873700 -0500
 X@@ -200,7 +200,7 @@
 X {
 X 	struct stat st;
 X 	char path[255];
 X-	snprintf(path, 254, "/proc/%ld", (long)pid);
 X+	snprintf(path, 254, "/compat/linux/proc/%ld", (long)pid);
 X 	if(0 != stat(path,&st) ){
 X 		g_fprintf(stderr,"Can't stat '%s'\n",path);
 X 		perror("");
 X@@ -273,11 +273,11 @@
 X 		return rtn;
 X 	}
 X 	*value=NULL;
 X-	if(NULL == (envf=(g_malloc(strlen("/proc/9999999/environ"))))) {
 X+	if(NULL == 
 (envf=(g_malloc(strlen("/compat/linux/proc/9999999/environ"))))) {
 X 		g_fprintf(stderr,"Unable to allocate for environ file name.\n");
 X 		return rtn;
 X 	}
 X-	g_sprintf(envf,"/proc/%ld/environ",pid);
 X+	g_sprintf(envf,"/compat/linux/proc/%ld/environ",pid);
 X 	if(0 != access(envf,  R_OK)){/**doesn't exist, or not our process  */
 X 		g_fprintf(stderr,"Unable to open '%s' for PID %ld\n",envf,pid);
 X 		goto error;
 X@@ -476,8 +476,8 @@
 X   char buf[PATH_MAX];
 X 	int instances=0;
 X
 X-  if (!(dir = opendir("/proc"))) {
 X-  	perror("can't open /proc");
 X+  if (!(dir = opendir("/compat/linux/proc"))) {
 X+  	perror("can't open /compat/linux/proc");
 X     return -1;
 X   }
 X
 X@@ -489,7 +489,7 @@
 X         continue;
 X     }
 X     /* try to open the cmdline file */
 X-    snprintf(buf, sizeof(buf), "/proc/%ld/cmdline", lpid);
 X+    snprintf(buf, sizeof(buf), "/compat/linux/proc/%ld/cmdline", lpid);
 X
 X     if ((fp= fopen(buf, "r"))) {
 X       if (fgets(buf, sizeof(buf), fp) != NULL) {
 ab2e48d8e66368c3640e4e3f94b8e4fc
 exit
 
 
 -- 
    Name: Lawrence "The Dreamer" Chen    Call: W0LKC
   Snail: 1530 College Ave, A5          Email: beastie@tardisi.com
          Manhattan, KS 66502-2768       Blog: http://lawrencechen.net

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187559: commit references a PR
Date: Wed, 26 Mar 2014 18:08:34 +0000 (UTC)

 Author: nemysis
 Date: Wed Mar 26 18:08:31 2014
 New Revision: 349276
 URL: http://svnweb.freebsd.org/changeset/ports/349276
 QAT: https://qat.redports.org/buildarchive/r349276/
 
 Log:
   - Bump PORTREVISION for fixng GNU/Linux compatibility,
     add REINPLACE
   
   PR:		ports/187559
   Submitted by:	Lawrence "The Dreamer" Chen <beastie@tardisi.com>
 
 Modified:
   head/deskutils/parcellite/Makefile
 
 Modified: head/deskutils/parcellite/Makefile
 ==============================================================================
 --- head/deskutils/parcellite/Makefile	Wed Mar 26 17:54:08 2014	(r349275)
 +++ head/deskutils/parcellite/Makefile	Wed Mar 26 18:08:31 2014	(r349276)
 @@ -3,6 +3,7 @@
  
  PORTNAME=	parcellite
  PORTVERSION=	1.1.7
 +PORTREVISION=	1
  PORTEPOCH=	1
  CATEGORIES=	deskutils
  MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 @@ -31,6 +32,9 @@ SUB_FILES=	pkg-message
  .include <bsd.port.options.mk>
  
  post-patch:
 +	@${REINPLACE_CMD} -e 's|"/proc/|"/compat/linux/proc/|; \
 +		s|"/proc"|"/compat/linux/proc"|' \
 +		${WRKSRC}/src/utils.c
  .if ${PORT_OPTIONS:MNLS}
  	@${REINPLACE_CMD} -e 's|$$(DATADIRNAME)/locale|share/locale|' \
  		${WRKSRC}/po/Makefile.in.in
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
