WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: empty.tcz bug ?  (Read 8425 times)

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
empty.tcz bug ?
« on: June 19, 2010, 06:02:38 PM »
well i can't decide wheter this is really a bug or maybe empty tcz shouldn't be allowed

but when you load an empty extension a symlink in root directory of filesystem is created:  "*" to "/tmp/tcloop/extname/*"

i have first discovered this for compiletc.tcz then created an empty test extension to verify it

tc 3.0a7

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: empty.tcz bug ?
« Reply #1 on: July 01, 2010, 10:37:10 AM »
I see this too when compiletc is loaded. Adding the /usr/local/tce.installed/compiletc file should fix this.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: empty.tcz bug ?
« Reply #2 on: July 01, 2010, 10:57:10 AM »
Yeah, including a single file to an empty meta extension would be the best way to go I think, like the /usr/local/tce.installed/compiletc mentioned.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: empty.tcz bug ?
« Reply #3 on: October 29, 2010, 01:18:10 PM »
This bug is still present for compiletc.

Perhaps a test in the extension audit script to make sure the extension is not empty? If it is empty, recreate it with /usr/local/tce.installed/extensionname.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: empty.tcz bug ?
« Reply #4 on: October 29, 2010, 01:26:16 PM »
I think it is reasonable for a test for an empty .tcz and recreating it with /usr/local/tce.installed/extname if found as empty.  I am not at my box, but I will look and make sure a non-executable tce.installed entry present in extensions won't cause issue.  I will add it to the audit routine as a .tcz should have at least one file in it.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: empty.tcz bug ?
« Reply #5 on: October 29, 2010, 01:58:51 PM »
the file could be an empty executable to avoid throwing errors
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: empty.tcz bug ?
« Reply #6 on: October 29, 2010, 02:02:50 PM »
Actually, the audit script already checks for tce.installed file and if there sets it to 755 perms if not already.  But perhaps better not to have an empty executable. 

Maybe better to add an empty file /usr/local/share/extname/extname so as to not interfere with tce.installed, as that is a common place for extension files to be copied to system and such.


Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: empty.tcz bug ?
« Reply #7 on: October 29, 2010, 05:36:52 PM »
I can't see any harm in using an "empty executable" like '/usr/local/tce.installed/extension' as the following little test seems to proof (at least to myself):
Code: [Select]
tc@box:~$ touch x
tc@box:~$ chmod 755 x
tc@box:~$ ls -l x
-rwxr-xr-x    1 tc       staff            0 Oct 29 20:39 x
tc@box:~$ ./x
tc@box:~$ echo $?
0

Offline SvOlli

  • Full Member
  • ***
  • Posts: 193
  • Linux Developer
Re: empty.tcz bug ?
« Reply #8 on: October 29, 2010, 07:35:30 PM »
Why not create a symlink to /bin/true?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: empty.tcz bug ?
« Reply #9 on: October 29, 2010, 09:36:08 PM »
Actually, just creating an empty directory will suffice for not creating the * symlink.  Perhaps the /usr directory can be created in these empty extensions to save having to deal with /usr/local/tce.installed, and this way no new files are created to take up inodes.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: empty.tcz bug ?
« Reply #10 on: February 21, 2011, 10:13:35 AM »
What's the current state of this?
I don't understand the whole code, has anything been decided for the future?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: empty.tcz bug ?
« Reply #11 on: February 21, 2011, 12:27:00 PM »
The current code umounts an empty extension, thus saving one loop and in fact making an empty extension preferable to a dummy file/dir.

Whether the /* file still appears I'm not sure.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: empty.tcz bug ?
« Reply #12 on: February 21, 2011, 12:45:25 PM »
Hi curaga
I installed compiletc on January 15,2011 and /* still appears.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: empty.tcz bug ?
« Reply #13 on: February 21, 2011, 01:01:00 PM »
/* can also appear with incomplete/corrupt downloads (e.g. with Appbrowser).
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: empty.tcz bug ?
« Reply #14 on: February 22, 2011, 07:32:38 AM »
Thanks :)
*/