Tiny Core Base > TCB Bugs

tce.install, tce-load, submitqc ...

<< < (2/2)

Paul_123:
That touch command is the only command that I have ever seen fail due to an extension jumbling up the permissions of /usr/local/tce.installed

Normally I would say adding a sudo in a script is not a good idea if we can avoid it, but there is already 13 sudo commands in tce-load.   What's the harm in one more.

polikuo:

--- Quote from: patrikg on August 28, 2023, 02:46:41 PM ---Why setting up the rights after untar ??

--- End quote ---
Actually, the command used in tce-load is

--- Code: ---yes "$FORCE" | sudo /bin/cp -ais /tmp/tcloop/"$APPNAME"/* / 2>/dev/null
--- End code ---
The $FORCE variable is "n" in normal mode, thus doesn't overwrite an existing file.
If you load an app with force flag (tce-load -f -i app), the variable switch to "y".


--- Quote from: Paul_123 on August 28, 2023, 08:05:10 PM ---That touch command is the only command that I have ever seen fail due to an extension jumbling up the permissions of /usr/local/tce.installed

Normally I would say adding a sudo in a script is not a good idea if we can avoid it, but there is already 13 sudo commands in tce-load.   What's the harm in one more.

--- End quote ---

I totally agree with you.
What's the harm if it saves you more trouble.

curaga:
Yes, adding sudo to the touch for the next release should be fine. But submitqc should also be fixed.

polikuo:
Hi, I'm still working on fixing submitqc
The script doesn't seem to handle the ownership of the top directory very well.
Just a few line so you could get the idea.

--- Code: ---$ ls -l /tmp/tcloop/
drwxr-xr-x    3 tc       staff           26 Aug  9 09:55 mylocale
drwxr-xr-x    3 tc       staff           26 Mar 16  2014 wifi
drwxr-xr-x    4 root     staff           37 May  6 23:40 wireless-6.1.25-piCore-v7
drwxr-xr-x    4 root     root            37 May  1 01:44 openssl
$ busybox ls -ld /
drwxrwxr-x   17 root     root           380 Jan  1  1970 /

--- End code ---

The / is immune to changes, even if you load a file that has tc:staff at the top.

Suggestion ?
Should we care about it or should I just get rid of that from the check list ?

jazzbiker:
Hi polikuo,


--- Code: ---tc@box:~$ ls -ld /
drwxr-xr-x   17 tc       staff          380 Apr 12 18:43 /
tc@box:~$ uname -a
Linux box 6.1.2-tinycore #612 SMP Mon Jan  2 16:44:20 UTC 2023 i686 GNU/Linux

--- End code ---
Where are You?

EDIT: Well, I think no matter what TC You are running, the matter is whether Your onboot.lst is empty or not. In my case it is not empty, and number of extensions are installed during tce-setup called from tc-config as root.

Navigation

[0] Message Index

[*] Previous page

Go to full version