Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: xenodius on January 02, 2021, 03:15:58 PM

Title: Changing modified dates in /usr/local/lib
Post by: xenodius on January 02, 2021, 03:15:58 PM
Is there any way to make libs read/write after booting or to execute a script before the drive is unmounted?
Been getting this error while compiling some python packages on piCore 12 armv7l:
Code: [Select]
  File "/usr/local/lib/python3.8/zipfile.py", line 360, in __init__
    raise ValueError('ZIP does not support timestamps before 1980')
ValueError: ZIP does not support timestamps before 1980

And sure enough the file's last modified date is 1969-- most are 2021, including all python .tcz extensions in ../tce/optional. I tried this, but everything is read-only:
Code: [Select]
tc@box:/usr/local/lib/python3.8$ mostrecent="`ls -t | head -n1`"
tc@box:/usr/local/lib/python3.8$ sudo touch -r "$mostrecent" *
-> touch: cannot touch 'EVERY_FILE_HERE': Read-only file system

Chmod doesn't work either. Date returns a recent date/time persistently, updating the date was one of the first things I did on this image.
Title: Re: Changing modified dates in /usr/local/lib
Post by: Greg Erskine on January 02, 2021, 03:58:40 PM
Temporary fix...

Set copy2fs boot code, or do something like:

Code: [Select]
$ cd /usr/local/lib/python3.8/
$ la zipfile.py
lrwxrwxrwx    1 root     root            38 Jan  1  1970 zipfile.py -> /tmp/tcloop/python3.8/usr/local/lib/python3.8/zipfile.py
$ sudo unlink zipfile.py
$ sudo cp  /tmp/tcloop/python3.8/usr/local/lib/python3.8/zipfile.py .
$ la zipfile.py
-rwxr-xr-x    1 root     root          4101 Nov  6 07:02 zipfile.py
$ cd /opt
$ vi .filetool.lst <== add "usr/local/lib/python3.8/zipfile.py"
$ sudo filetool.sh -b

(edited example, so there is probably a typo or two, but it may give you an idea)
Title: Re: Changing modified dates in /usr/local/lib
Post by: xenodius on January 03, 2021, 07:14:10 AM
Thankyou, while copy2fs didn't seem to change any dates I was surprisingly able to simply copy the directory to /tmp/py and back as a temp fix, which is all I really need to make the packages.