Closed i-to-z closed 1 year ago
Hello piscs contributors! I forked the "develop" branch and implemented this feature request ( filed by me ): See it at https://github.com/i-to-z/piscsi/tree/issue_1376 The two files that I touched were:
The code changes are small and well described.
I created a pull request for you to merge these changes into the "develop" branch.
Here is a detailed description of this change:
The PiScsi UI has the ability to select a file and create an ISO image (in HFS and other formats), which places that file inside the iso image. Until now, for images of type HFS, it always was setting the TYPE/CREATOR resource fork attributes of the file to TEXT/Unix, which is useless: once the iso image is mounted in e.g. Macintosh OS 7.0, the OS doesn't know what "to do" with the file.
This change installs a mappings file that is used by "genisoimage" to map the file's extension to the desired TYPE/CREATOR resource fork attributes. The text file contains mappings for many "popular" file extensions.
The file is used by "genisoimage" , as described here: https://linux.die.net/man/1/genisoimage
The easyinstall.sh installer downloads the file from https://drive.google.com/uc?export=download&id=1fUHyY8puxw3cWa9mH17G-f5--JiqplAR (this is my google drive) and saves it into ~/piscsi/genisoimage_hfs_resource_fork_map/genisoimage_hfs_resource_fork_map.txt . It does that ONLY if the file is not present yet, to avoid overwriting any custom user changes made to the file. The file is just 20KB.
Ideally you (the project owners) should permanently store the file somewhere under your control, e.g. in Dropbox, where you already store file mac-hard-disk-drivers.zip
Thanks for reporting the improvement idea and filing the PR for it! This would definitely make the ISO image generation a lot more useful for Mac users, even providing a new bootstrapping path since you can embed a self-extracting archive for installing stuffit or the likes.
Now, do you know the source, authorship and license of that file extension mapping file? As a pure text file, storing it in our own git repo, or pulling it in through a submodule would be ideal.
It's interesting to note that the file may be derivative (or the other way around) of the AppleVolumes.system config file that has been distributed with Netatalk since the mid-90s.
https://github.com/Netatalk/netatalk/blob/branch-netatalk-2-3/config/AppleVolumes.system
Hi Daniel, I don't remember where I found my mapping file, it's been a while. Doing some google search did not help me.
But I compared my file with the one you found at https://github.com/Netatalk/netatalk/blob/branch-netatalk-2-3/config/AppleVolumes.system (which comes with a free GNU license).
The two files contain the same data, but some of the comments are different. These comments are not used by the genisoimage library, so these diffs are irrelevant.
So perhaps we can add something like this to it: "This file was derived from the open source file at https://github.com/Netatalk/netatalk/blob/branch-netatalk-2-3/config/AppleVolumes.system and the file was formatted to work with genisoimage".
And yes, the file is so small, it should be stored in the github repository directly. I can make this change if you give me a suitable folder name.
IANAL but I think a collection of configuration data lacks the creative element that makes them copyrightable in the first place. The code comments may be covered by copyright however.
One example of such a discussion in https://groups.drupal.org/node/17555
In addition to your idea, I suggest rewriting the code comments from scratch, and add a note that the format is based on standards defined in the genisoimage man page (including the * for defining a blanket fallback mapping, which is novel compared to the Netatalk file.)
How about we store the file in python/web
next to all the other configuration files for 3rd party apps that we rely on?
Daniel I made the changes as we discussed:
genisoimage_hfs_resource_fork_map.txt
based on the mappings at https://github.com/Netatalk/netatalk/blob/branch-netatalk-2-3/config/AppleVolumes.system.genisoimage_hfs_resource_fork_map.txt
in the project repository under python/web.easyinstall.sh
(that were downloading the file from the web), they are not needed.web.py
to find the file under python/web
.
Take a look.Looks good. Merged!
Info
Describe the issue