Initial commit

This commit is contained in:
crt0mega 2023-10-24 20:04:17 +02:00
commit 4577fbbfa9
Signed by: crt0mega
GPG Key ID: 7F512C892B9C60CD
11 changed files with 437 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
debian/debhelper*
debian/.debhelper
debian/*.log
debian/*.debhelper
debian/*.substvars
debian/debhelper-build-stamp
debian/pfsshell
debian/files
.pc

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "src"]
path = src
url = https://github.com/ps2homebrew/pfsshell

147
debian/changelog vendored Normal file
View File

@ -0,0 +1,147 @@
pfsshell (1.1.2~git-1) UNRELEASED; urgency=medium
[ crt0mega ]
* Initial release. (Closes: #nnnn) <nnnn is the bug number of your ITP>
[ uyjulian ]
* Initial commit
* 64-bit support works partially
* Add remove partition support
* Silenced all warnings
* type cleanup
* Squashed a bug relating to directories
* made some changes to docs and makefiles
* massive cleanup
* sync with latest ps2sdk and fix size calculation
* update to ps2sdk f87ce7ba7b6173ea633c10659bf18fa90e295cbc
* update hdlfs from HDLGameInstaller v0.809A
* pfs update
* Mega commit (cleanup, correct time, 64bit, static lib)
* Cleanup
* PFS/APA/iomanX module update
* remove unused code + cleanup
* Autodetect O_BINARY
* include cleanup
* updated hdlfs and fixed compile of atad.c
* Few compile fixes
* macOS fixes for getting size of device and formatting PFS Patch thanks to Michael Nickerson
* Modules updated
[ Michael Nickerson ]
* Fix months being off-by-one
[ U-KUUSHINSAI-SAN\techy ]
* 64bit seek and off_t. Manual sector size and count check
* Hardcode traditional block size. Use _FILE_OFFSET_BITS 64.
[ Edward Matijevic ]
* Fix compilation issues.
Solution to issue #3, as posted in issue #3 by TheMuso.
I have taken ParzivalWolfram's changes and have squashed them into one commit.
[ uyjulian ]
* Use libtool instead of ar
* Sync and cleanup changes with apa, pfs, iomanX, and hdlfs
* Improve documentation
* Fix MinGW build
* Build MinGW as static by default
* Add documentation for building
* Fix build when not Darwin
* Use printf instead of echo
* Revert "Merge github.com:techyzen101/pfsshell"
This reverts commit 872a37ff80bfe6ec31c1f665e970ac1cddafc628, reversing
changes made to 25a1225f06145962acf914120f7bce55cd9a16bb.
* Support for getting size of disk on Win32
* Use proper argument for CloseHandle
* Define _FILE_OFFSET_BITS to 64
* Fix build for POSIX systems
* Switch buildsystem to Meson
* clang-format
* Re-add proper semaphore support
* Add unnamed semaphore support for non Darwin system
* Support installing executable in meson buildsystem Closes #13
* Add information about transfering files to Quick start section of README.md
* Meson: move compiler flags to default_options
* Silence additional warnings
* Automatically generate archive for win32
* Add version to meson build file
* Meson: use pthread on linux
* Version v1.1.0
[ Velocet ]
* Added UNC path retrieval on Windows
[ uyjulian ]
* Allow removal of partitions beginning with __
* Build libps2hdd shared library
* Bump version
* Add continuous integration
[ Bignaux Ronan ]
* Add a simple test case
* Fix missing newline in Command List (shell.c)
[ uyjulian ]
* Use JST instead of local time for fresh timestamp
* Use the correct gmtime function on win32
* C standard and MSCRT are different in gmtime_s
* Specify pfs.irx arguments in _init_pfs caller
* Add FUSE interface 'pfsfuse'
[ AKuHAK ]
* Some source control improvements
* Improved testing
* Added pfsfuse artifacts
* Improved ls command added optional -l flag that prints verbose output added datetime calculation for partitions added last symbol for faster recognizing of file/partition type
* Removed mkfs option mkpart merged with mkfs initialize merged with mkfs
* Added support for drives/images smaller than 40Gb mkpart now supports any size size should end with M or G literal (MiB/GiB), preceding with any number mkpart will not erase already existing partitions
* FUSE: implemented statvfs (except inodes) this fixes an error "No free space on device" "df" command now shows correct information
* Documentation and small fixes
* FUSE: fixed typo in chmod Added ftruncate method. Now you can edit files directly in partition Added fsync method to prevent file corruption. Created private lseek method (not used in current fuse revision).
[ Bignaux Ronan ]
* Add -Wno-format-security to cflags.
Will ensure compiling on hardened plateform
[ Matías Israelson ]
* Update README.md
[ Alexander López-Parrado ]
* Added native Windows port of pfsfuse
[ AKuHAK ]
* added <fstype> argument to mkpart mkpart errors now are more informative #31 clang-format a bit adjusted
* ls -l command now prints starting sector fixed github workflow
* Bump github actions
[ uyjulian ]
* Correct types of iomanX functions
* Move sysclib include somewhere non-intrusive
* Replace malloc.h include with stdlib.h include
* Move loadcore include somewhere else
[ Jean-Philip Desjardins ]
* Fix named semaphore init value.
[ uyjulian ]
* CI/macOS: use coreutils instead of truncate
* Define XXX_POSIX_VER
* Replace `IOMANX_` definitions with `FIO_` definitions
* replace `iomanx_` with `iomanX_`
* Fix last commit
* Implementation of `host:` filesystem
* Host adapter fixes for win32
* Make atad_device_path into a setter function
* Allow pass param to apa
* Add pfs2tar tool
* Make pfs2tar an option
* Explicitly initialize apa with arguments
* Simplify apa and pfs init
* Formatting
[ Brandon ]
* Updated documentation to include list of commands
---------
Co-authored-by: nfract <nfractt@gmail.com>
-- crt0mega <crt0mega@c-r-t.tk> Tue, 24 Oct 2023 19:49:25 +0200

22
debian/control vendored Normal file
View File

@ -0,0 +1,22 @@
Source: pfsshell
Section: utils
Priority: optional
Maintainer: crt0mega <crt0mega@c-r-t.tk>
Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13),
Standards-Version: 4.6.2
Homepage: https://github.com/ps2homebrew/pfsshell
#Vcs-Browser: https://salsa.debian.org/debian/pfsshell
#Vcs-Git: https://salsa.debian.org/debian/pfsshell.git
Package: pfsshell
Architecture: any
Multi-Arch: foreign
Depends:
${shlibs:Depends},
${misc:Depends},
Description: PFS (PlayStation File System) shell for POSIX-based systems
This tool allows you to browse and transfer files to and from PFS filesystems using the command
line. This tool is useful for transferring configuration and media files used by programs such
as Open PS2 Loader and SMS.

43
debian/copyright vendored Normal file
View File

@ -0,0 +1,43 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: <url://example.com>
Upstream-Name: pfsshell
Upstream-Contact: <preferred name and address to reach the upstream project>
Files:
src/*
Copyright:
2023
<years> <likewise for another author>
License: GPL-2.0+
Files:
debian/*
Copyright:
2023 crt0mega <crt0mega@c-r-t.tk>
License: GPL-2.0+
License: GPL-2.0+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
Comment:
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid picking licenses with terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
#
# If you need, there are some extra license texts available in two places:
# /usr/share/debhelper/dh_make/licenses/
# /usr/share/common-licenses/

174
debian/pfsshell.1 vendored Normal file
View File

@ -0,0 +1,174 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "README" "" "October 2023" ""
This tool allows you to browse and transfer files to and from PFS filesystems using the command line\. This tool is useful for transferring configuration and media files used by programs such as Open PS2 Loader and SMS\.
.SH "Quickstart"
Binaries for Win32 are available here: \fIhttps://github\.com/ps2homebrew/pfsshell/releases\fR To start the program, provide the path to it on the command line:
.IP "" 4
.nf
/path/to/pfsshell
.fi
.IP "" 0
.P
You will get a prompt similar to the following:
.IP "" 4
.nf
>
.fi
.IP "" 0
.P
To get a list of commands, type in the following:
.IP "" 4
.nf
> help
.fi
.IP "" 0
.P
To select a device which can be a disk image or block device, type in the following:
.IP "" 4
.nf
> device /path/to/device
.fi
.IP "" 0
.P
On the Windows systems, the block devices can be used by using the UNC path\. To get the UNC path, use this command:
.P
\fBcmd wmic diskdrive get Caption,DeviceID,InterfaceType\fR
.P
Once a device is selected, the prompt will change to the following:
.IP "" 4
.nf
#
.fi
.IP "" 0
.P
To mount a partition (for example, the \fB+OPL\fR partition), type in the following:
.IP "" 4
.nf
# mount +OPL
.fi
.IP "" 0
.P
The prompt will change to the following:
.IP "" 4
.nf
+OPL:/#
.fi
.IP "" 0
.P
To get a list of files or partitions, type in the following:
.IP "" 4
.nf
+OPL:/# ls
or
+OPL:/# ls \-l
.fi
.IP "" 0
.P
To transfer a file from the current directory of the PFS partition to the current directory of the process, type in the following:
.IP "" 4
.nf
+OPL:/# get example\.txt
.fi
.IP "" 0
.P
To transfer a file from the current directory of the process to the current directory of the PFS partition, type in the following:
.IP "" 4
.nf
+OPL:/# put example\.txt
.fi
.IP "" 0
.P
Once you are finished looking around in the partition, type in the following:
.IP "" 4
.nf
+OPL:/# umount
.fi
.IP "" 0
.P
Once you are finished with the program, type in the following:
.IP "" 4
.nf
# exit
.fi
.IP "" 0
.SH "List of commands"
Commands marked with DESTRUCTIVE could potentially wipe or remove important information\. Remember to make backups if using these commands\.
.P
\fBDevice Selection & Initialization\fR
.IP "" 4
.nf
lcd [path] \- print/change the local working directory
device <device> \- select the PS2 HDD device
initialize \- blank and create a partition on a PS2 HDD device (DESTRUCTIVE)
.fi
.IP "" 0
.P
\fBPartition Editing\fR
.IP "" 4
.nf
ls \- list partitions (only when no partition mounted)
mkpart <part_name> <size> \- create a new partition (IMPORTANT size must be power of 2)
mkfs <part_name> \- blank and create PFS on a new partition (DESTRUCTIVE)
mount <part_name> \- mount a partition
unmount \- unmount the active partition
rmpart <part_name> \- remove a partition (DESTRUCTIVE)
.fi
.IP "" 0
.P
\fBFile & Folder Editing\fR
.IP "" 4
.nf
pwd \- print the current PS2 HDD directory
ls \- list folders/files (only when partition mounted)
cd <dir_name> \- change directory
mkdir <dir_name> \- create a new directory
rmdir <dir_name> \- delete an existing directory
pwd \- print the current PS2 HDD directory
get <file_name> \- copy a file from PS2 HDD to the working directory
put <file_name> \- copy a file from the working directory to the PS2 HDD
rm <file_name> \- delete a file
rename <curr_name> <new_name> \- rename a file or directory
.fi
.IP "" 0
.SH "pfsfuse"
\fBpfsfuse\fR provides an ability to mount partition into host filesystem (like network folder)\. \fBpfsfuse\fR supports physically connected drives, raw drive images as regular files, and an NBD network server from OPL\. Your system has to support fuse\. For example, in the Linux \fBfuse\fR package should be installed, on the MacOS \fBmacfuse\fR can be used\. The Unix users can use the following command for mounting the partition:
.P
\fBsh mkdir \-p mountpoint pfsfuse \-\-partition=+OPL /path/to/device mountpoint/ df \-h mountpoint/ # will show information about free space\fR
.P
\fBmountpoint\fR is accessible like a normal folder\. Once you are finished looking around in the partition, type in the following:
.IP "" 4
.nf
umount mountpoint
.fi
.IP "" 0
.P
Note: for full access without root, use the argument \fB\-o allow_other\fR when mounting\.
.SS "pfsfuse\-win32"
Windows port uses Dokan FUSE wrapper \fIhttps://github\.com/dokan\-dev/dokany\fR implementation as a base\. Before using \fBpfsfuse\fR on Windows you should install Dokany\. Installation instructions \fIhttps://github\.com/dokan\-dev/dokany/wiki/Installation\fR\. After successful installation, you can use \fBpfsfuse\fR by pasting command in command line (CMD) or PowerShell with elevated privileges (run as administrator): \fBsh pfsfuse\.exe \-\-partition=+OPL \e\e\.\ePHYSICALDRIVE2 M \-o volname=+OPL or pfsfuse\.exe \-\-partition=+OPL D:\eps2image\.bin M \-o volname=+OPL\fR
.P
Where \fBM\fR \- is drive letter (please choose unused driver letter)\. \fB\-o volname=+OPL\fR \- will be volume name in File Explorer\. For unmounting, please locate dokanctl\.exe and launch the following command in the elevated command prompt: \fBsh dokanctl\.exe /u M\fR Where \fBM\fR \- is mounted point drive letter\.
.SH "NBD server support"
The latest Open PS2 Loader revisions have a built\-in NBD server\. \fBpfsshell/pfsfuse\fR have full support for an NBD block device, once an NBD server is mounted in the host filesystem\.
.SH "Building"
This project can be built by using the Meson build system\. For more information about the system, please visit the following location: \fIhttps://mesonbuild\.com/\fR
.SH "Original project"
The original project was created by Wizard of Oz\. More information about the original project can be found at the following location: \fIhttp://web\.archive\.org/web/20061220090822/http://hdldump\.ps2\-scene\.org/\fR
.SH "License"
This project as a whole is licensed under the GNU General Public License GPL version 2\. Please read the \fBCOPYING\fR file for more information\. The APA, PFS, and iomanX libraries are licensed under The Academic Free License version 2\. Please read the \fBCOPYING\.AFLv2\fR file for more information\.

1
debian/pfsshell.manpages vendored Normal file
View File

@ -0,0 +1 @@
debian/pfsshell.1

26
debian/rules vendored Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# See FEATURE AREAS in dpkg-buildflags(1).
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# See ENVIRONMENT in dpkg-buildflags(1).
# Package maintainers to append CFLAGS.
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# Package maintainers to append LDFLAGS.
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@ --sourcedirectory=src --buildsystem=meson
# dh_make generated override targets.
# This is an example for Cmake (see <https://bugs.debian.org/641051>).
#override_dh_auto_configure:
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

10
debian/upstream/metadata.ex vendored Normal file
View File

@ -0,0 +1,10 @@
# Example file for upstream/metadata.
# See https://wiki.debian.org/UpstreamMetadata for more info/fields.
# Below an example based on a github project.
# Bug-Database: https://github.com/<user>/pfsshell/issues
# Bug-Submit: https://github.com/<user>/pfsshell/issues/new
# Changelog: https://github.com/<user>/pfsshell/blob/master/CHANGES
# Documentation: https://github.com/<user>/pfsshell/wiki
# Repository-Browse: https://github.com/<user>/pfsshell
# Repository: https://github.com/<user>/pfsshell.git

1
src Submodule

@ -0,0 +1 @@
Subproject commit 57af531b43026ccadaf531097c8936e188953035