Debian Bug report logs - #646031
unar: creates $HOME/GNUstep/Library directory

Package: unar; Maintainer for unar is Matt Kraai <kraai@debian.org>; Source for unar is src:unar.

Reported by: Jakub Wilk <jwilk@debian.org>

Date: Thu, 20 Oct 2011 18:03:01 UTC

Severity: minor

Tags: patch, upstream, wontfix

Forwarded to http://code.google.com/p/theunarchiver/issues/detail?id=397

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, jwilk@debian.org, Matt Kraai <kraai@debian.org>:
Bug#646031; Package theunarchiver. (Thu, 20 Oct 2011 18:03:04 GMT) Full text and rfc822 format available.

Message #3 received at submit@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: theunarchiver: creates $HOME/GNUstep/Library directory
Date: Thu, 20 Oct 2011 20:00:18 +0200
Package: theunarchiver
Version: 2.7.1-4
Severity: minor

When I unpack RAR archives with unar, it creates $HOME/GNUstep/Library 
directory:

| $ rm -rf ~/GNUstep
| $ strace -e mkdir unar test.rar
| Extracting test.rar...
| mkdir("/home/jwilk/GNUstep", 0777)      = 0
| mkdir("/home/jwilk/GNUstep/Library", 0777) = 0
|   dummy (0)... OK.

I wish it didn't clutter my home directory with useless directories...


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages theunarchiver depends on:
ii  gnustep-base-runtime  1.22.1-1      
ii  libbz2-1.0            1.0.5-7       
ii  libc6                 2.13-21       
ii  libgcc1               1:4.6.1-16    
ii  libgnustep-base1.22   1.22.1-1      
ii  libicu44              4.4.2-2       
ii  libobjc3              4.6.1-16      
ii  libssl1.0.0           1.0.0e-2      
ii  libstdc++6            4.6.1-16      
ii  zlib1g                1:1.2.5.dfsg-1

-- 
Jakub Wilk




Information forwarded to debian-bugs-dist@lists.debian.org, Matt Kraai <kraai@debian.org>:
Bug#646031; Package theunarchiver. (Thu, 20 Oct 2011 19:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Kraai <kraai@ftbfs.org>:
Extra info received and forwarded to list. Copy sent to Matt Kraai <kraai@debian.org>. (Thu, 20 Oct 2011 19:39:03 GMT) Full text and rfc822 format available.

Message #8 received at 646031@bugs.debian.org (full text, mbox):

From: Matt Kraai <kraai@ftbfs.org>
To: Jakub Wilk <jwilk@debian.org>, 646031@bugs.debian.org
Subject: Re: Bug#646031: theunarchiver: creates $HOME/GNUstep/Library directory
Date: Thu, 20 Oct 2011 12:37:06 -0700
block 646031 by 643305
thanks

On Thu, Oct 20, 2011 at 08:00:18PM +0200, Jakub Wilk wrote:
> When I unpack RAR archives with unar, it creates
> $HOME/GNUstep/Library directory:
> 
> | $ rm -rf ~/GNUstep
> | $ strace -e mkdir unar test.rar
> | Extracting test.rar...
> | mkdir("/home/jwilk/GNUstep", 0777)      = 0
> | mkdir("/home/jwilk/GNUstep/Library", 0777) = 0
> |   dummy (0)... OK.
> 
> I wish it didn't clutter my home directory with useless directories...

Thanks for reporting this issue.  It's actually been reported before
and reassigned to libgnustep-base1.22, since that's the package that
creates the directories.  To discourage further reports, I'm marking
this bug as blocked by that one.

-- 
Matt Kraai
https://ftbfs.org/kraai




Added blocking bug(s) of 646031: 643305 Request was from Matt Kraai <kraai@ftbfs.org> to control@bugs.debian.org. (Thu, 20 Oct 2011 19:39:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matt Kraai <kraai@debian.org>:
Bug#646031; Package theunarchiver. (Fri, 21 Oct 2011 10:09:31 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yavor Doganov <yavor@gnu.org>:
Extra info received and forwarded to list. Copy sent to Matt Kraai <kraai@debian.org>. (Fri, 21 Oct 2011 10:09:34 GMT) Full text and rfc822 format available.

Message #15 received at 646031@bugs.debian.org (full text, mbox):

From: Yavor Doganov <yavor@gnu.org>
To: Jakub Wilk <jwilk@debian.org>, 646031@bugs.debian.org
Cc: 643305@bugs.debian.org
Subject: Re: Bug#646031: theunarchiver: creates $HOME/GNUstep/Library directory
Date: Fri, 21 Oct 2011 13:07:48 +0300
[Message part 1 (text/plain, inline)]
tags 643305 + wontfix
notforwarded 643305
forwarded 646031 http://code.google.com/p/theunarchiver/issues/detail?id=397
tags 646031 + patch
thanks

On Thu, Oct 20, 2011 at 08:00:18PM +0200, Jakub Wilk wrote:
> Package: theunarchiver

> When I unpack RAR archives with unar, it creates
> $HOME/GNUstep/Library directory:

> I wish it didn't clutter my home directory with useless directories...

This directory is not useless, and gnustep-base makes sure to create
it as many methods rely on its existence.  In this case, unar is not
using it directly or accessing the defaults database, but it uses the
NSDate class, which needs to check the timezone upon initialization,
which in turn uses NSUserDefaults to retrieve any user-defined one,
etc, etc.

In theory, with some effort it could be possible to eradicate this
behaviour as it really smells like bad design, but right now I have
more important problems at hand than having a discussion with upstream
regarding this minor issue.

If you wonder why the directory is not hidden, it is because GNUstep
software is installed there in the USER domain.

The attached patch should do the desired cleanup, but:

- Please test extensively, it is potentially dangerous.
- There could be a race condition in the unlikely case that the same
  user is running `unar' and another GNUstep program simultaneously.
- It uses a GNUstep-specific function, so should be wrapped in
  appropriate conditionals (#ifdef GNUSTEP...) if the same code is
  compiled/run on Muck OS X.
[cleanup.patch (text/x-diff, attachment)]

Set Bug forwarded-to-address to 'http://code.google.com/p/theunarchiver/issues/detail?id=397'. Request was from Yavor Doganov <yavor@gnu.org> to control@bugs.debian.org. (Fri, 21 Oct 2011 10:09:41 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Yavor Doganov <yavor@gnu.org> to control@bugs.debian.org. (Fri, 21 Oct 2011 10:09:41 GMT) Full text and rfc822 format available.

Bug reassigned from package 'theunarchiver' to 'unar'. Request was from "Julián Moreno Patiño" <darkjunix@gmail.com> to control@bugs.debian.org. (Tue, 15 Nov 2011 04:15:02 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions theunarchiver/2.7.1-4. Request was from "Julián Moreno Patiño" <darkjunix@gmail.com> to control@bugs.debian.org. (Tue, 15 Nov 2011 04:15:03 GMT) Full text and rfc822 format available.

Changed Bug title to 'unar: creates $HOME/GNUstep/Library directory' from 'theunarchiver: creates $HOME/GNUstep/Library directory' Request was from "Julián Moreno Patiño" <darkjunix@gmail.com> to control@bugs.debian.org. (Tue, 15 Nov 2011 04:15:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matt Kraai <kraai@debian.org>:
Bug#646031; Package unar. (Wed, 11 Jan 2012 15:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
Extra info received and forwarded to list. Copy sent to Matt Kraai <kraai@debian.org>. (Wed, 11 Jan 2012 15:27:05 GMT) Full text and rfc822 format available.

Message #30 received at 646031@bugs.debian.org (full text, mbox):

From: Jakub Wilk <jwilk@debian.org>
To: 646031@bugs.debian.org
Cc: Yavor Doganov <yavor@gnu.org>
Subject: Re: Bug#646031: theunarchiver: creates $HOME/GNUstep/Library directory
Date: Wed, 11 Jan 2012 16:25:07 +0100
[Message part 1 (text/plain, inline)]
* Yavor Doganov <yavor@gnu.org>, 2011-10-21, 13:07:
>> Package: theunarchiver
>
>> When I unpack RAR archives with unar, it creates
>> $HOME/GNUstep/Library directory:
>
>> I wish it didn't clutter my home directory with useless directories...
>
>This directory is not useless, and gnustep-base makes sure to create it 
>as many methods rely on its existence.

Right. I meant that it's useless for me, because unar is the only 
GNUstep software I use, so the directory is always empty.

>The attached patch should do the desired cleanup, but:
>
>- Please test extensively, it is potentially dangerous.
>- There could be a race condition in the unlikely case that the same 
>user is running `unar' and another GNUstep program simultaneously.

I took another approach to work around this problem: I created a 
LD_PRELOAD'able library that overrides the mkdir() function.

I think the same effect could be achieved by linking antignustep.o 
directly into the unar binary. (Though I know absolutely nothing about 
Objective-C, so I could be wrong.)

-- 
Jakub Wilk
[antignustep.c (text/x-csrc, attachment)]

Added tag(s) upstream and wontfix. Request was from bts-link-upstream@lists.alioth.debian.org to control@bugs.debian.org. (Mon, 06 Feb 2012 21:24:36 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matt Kraai <kraai@debian.org>:
Bug#646031; Package unar. (Sun, 28 Jul 2013 16:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Gold <michael@bitplane.org>:
Extra info received and forwarded to list. Copy sent to Matt Kraai <kraai@debian.org>. (Sun, 28 Jul 2013 16:36:04 GMT) Full text and rfc822 format available.

Message #37 received at 646031@bugs.debian.org (full text, mbox):

From: Michael Gold <michael@bitplane.org>
To: Jakub Wilk <jwilk@debian.org>
Cc: 646031@bugs.debian.org
Subject: Re: Bug#646031: theunarchiver: creates $HOME/GNUstep/Library directory
Date: Sun, 28 Jul 2013 12:25:47 -0400
[Message part 1 (text/plain, inline)]
On Wed, Jan 11, 2012 at 16:25:07 +0100, Jakub Wilk wrote:
> >>When I unpack RAR archives with unar, it creates
> >>$HOME/GNUstep/Library directory:
...
> I took another approach to work around this problem: I created a
> LD_PRELOAD'able library that overrides the mkdir() function.
> 
> I think the same effect could be achieved by linking antignustep.o
> directly into the unar binary. (Though I know absolutely nothing
> about Objective-C, so I could be wrong.)

FYI, you can change the path by setting GNUSTEP_USER_DIR_LIBRARY in
~/.GNUstep.conf.  A setting like
  GNUSTEP_USER_DIR_LIBRARY=/var/empty/.GNUstep/Library
will make the directory go away, without any complaints from unar.

I'm attaching my .GNUstep.conf to show the possible directories and
their default layout (replacing ~/GNUstep with /var/empty/.GNUstep).

-- Michael
[GNUstep.conf (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 19:54:05 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.