Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.16 #5

Merged
merged 52 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9d32918
separate into sub modules
umjammer May 29, 2020
f9daf31
update about fuse
umjammer May 29, 2020
75de69c
bump version
umjammer May 29, 2020
c98f17b
fix dependencies
umjammer May 29, 2020
c56ee8e
rename
umjammer Jun 4, 2020
f8d5b19
[vavi-net-fuse]
umjammer Jun 4, 2020
4cb5fb0
remove redundancies
umjammer Jun 5, 2020
bab9da4
bump version
umjammer Jun 5, 2020
4ee29c7
bump version
umjammer Jun 5, 2020
56f782c
clean up codes
umjammer Jun 10, 2020
392a1ed
bump version
umjammer Jun 10, 2020
4afd825
add "-f" option when umount
umjammer Jun 17, 2020
a789cbb
add single thread read/write functionality
umjammer Jun 17, 2020
cd74979
ad-hoc fix about position
umjammer Jun 17, 2020
4b743cd
make all work
umjammer Jun 17, 2020
bb471ef
bump version
umjammer Jun 17, 2020
982d7c1
bump version
umjammer Jun 19, 2020
76de59a
bump version
umjammer Jun 25, 2020
de85cae
rename a package
umjammer Oct 19, 2020
10940ca
update settings
umjammer Nov 12, 2020
fb6b88b
rename package name
umjammer Oct 29, 2021
cb427c8
[fuse] reduce logs
umjammer Nov 24, 2021
87d2601
💄
umjammer Feb 6, 2022
d71973c
update about junit
umjammer Feb 6, 2022
d305cd9
[fuse:jnrfuse] fix date time for file attributes
umjammer Feb 6, 2022
bfece77
update meta files
umjammer Mar 1, 2022
ce3c909
bump version
umjammer Mar 10, 2022
7b1edb2
[fuse] make test work
umjammer Mar 12, 2022
7a37377
update settings
umjammer Sep 11, 2022
b1ca6fb
follow ide advices
umjammer Sep 11, 2022
7426f61
clean up
umjammer Sep 18, 2022
37269a3
update about env (appledouble)
umjammer Sep 18, 2022
1f17fb4
[fuse:jnr] fix seeking
umjammer Sep 18, 2022
496c6c9
[fuse:jnr] fix non blocking mode
umjammer Sep 18, 2022
513d6c9
[fuse] add testing large file
umjammer Sep 18, 2022
aa0a930
update settings
umjammer Sep 18, 2022
12ce559
update settings
umjammer Oct 24, 2022
fbf76d5
[fuse] make test robust more
umjammer Oct 24, 2022
901ca1d
update settings
umjammer Nov 13, 2022
dac02c5
[fuse] clean up
umjammer Nov 14, 2022
4a0a832
bump version
umjammer Nov 14, 2022
df3ab92
fix dependencies
umjammer Nov 14, 2022
183f8ac
update settings
umjammer Aug 30, 2023
270a4a6
[fuse] catch up with some specs. change
umjammer Feb 8, 2024
8f89a10
[commons] move into vavi-nio-file-base
umjammer Feb 8, 2024
4b7d06f
update settings
umjammer Feb 9, 2024
347dadd
bump version
umjammer Feb 9, 2024
1a95112
prepare to merge vavi-net-fuse
umjammer Feb 27, 2024
bff0008
Merge branch 'vavi-net-fuse' into 0.0.16
umjammer Feb 27, 2024
00b8567
update settings
umjammer Feb 27, 2024
2685224
bump version
umjammer Feb 27, 2024
011319f
🥺
umjammer Feb 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
Expand All @@ -30,11 +34,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -44,8 +48,22 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: |
mkdir -p $FUSE_MOUNT_POINT
mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}
FUSE_MOUNT_POINT: tmp/fuse

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -59,4 +77,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
19 changes: 13 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven
name: Java CI

on:
push:
Expand All @@ -16,18 +16,25 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check w/o SNAPSHOT when "bump version"
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 1.8
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml
run: |
mkdir -p $FUSE_MOUNT_POINT
mvn -B package --file pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}
FUSE_MOUNT_POINT: tmp/fuse
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
tmp
local.properties
22 changes: 0 additions & 22 deletions README.md

This file was deleted.

2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk17
1 change: 1 addition & 0 deletions local.properties.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fuse.mountPoint=/Users/you/mnt/fuse
130 changes: 94 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,86 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>vavi</groupId>
<artifactId>vavi-nio-file</artifactId>
<version>0.0.15</version>
<artifactId>vavi-nio-file-fuse</artifactId>
<version>0.0.16</version>

<name>vavi-nio-file</name>
<issueManagement>
<url>https://github.com/umjammer/vavi-nio-file/issues</url>
</issueManagement>
<name>vavi-nio-file-fuse</name>
<url>https://github.com/umjammer/vavi-nio-file-fuse</url>
<scm>
<url>https://github.com/umjammer/vavi-nio-file</url>
<url>https://github.com/umjammer/vavi-nio-file-fuse</url>
</scm>
<url>https://github.com/umjammer/vavi-nio-file</url>
<description>java nio file basics</description>
<issueManagement>
<url>https://github.com/umjammer/vavi-nio-file-fuse/issues</url>
</issueManagement>

<profiles>
<profile>
<id>local</id>
<activation>
<file>
<exists>${basedir}/local.properties</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/local.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<includes>
<include>**/Main4</include>
</includes>
<environmentVariables>
<FUSE_MOUNT_POINT>${fuse.mountPoint}</FUSE_MOUNT_POINT>
</environmentVariables>
<argLine>
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
-Djna.library.path=/usr/local/lib
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<release>17</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
<executions>
<execution>
<goals>
Expand All @@ -39,15 +89,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<argLine>-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties</argLine>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -63,18 +104,40 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.1</version>
<version>5.10.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency> <!-- fuse jnr -->
<groupId>com.github.umjammer</groupId> <!-- co.paralleluniverse / com.github.umjammer -->
<artifactId>javafs</artifactId>
<version>0.1.7v</version>
</dependency>
<dependency> <!-- fuse jna -->
<groupId>com.github.umjammer</groupId> <!-- net.fuse-jna / com.github.umjammer -->
<artifactId>fuse-jna</artifactId>
<version>1.0.5v</version>
</dependency>
<dependency> <!-- fuse jnr -->
<groupId>com.github.serceman</groupId>
<artifactId>jnr-fuse</artifactId>
<version>0.5.7</version>
</dependency>

<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
<version>1.1.8</version>
<version>1.1.10</version>
</dependency>

<dependency>
<groupId>com.github.umjammer</groupId> <!-- com.github.fge / com.github.umjammer -->
<artifactId>vavi-nio-file-base</artifactId>
<version>0.0.14v</version>
</dependency>

<dependency>
Expand All @@ -92,22 +155,17 @@
<artifactId>junit-platform-commons</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<!--
if you want to write sub class test of this base test,
you should include this dependency in your pom.xml
-->
<groupId>com.rainerhahnekamp</groupId>
<artifactId>sneakythrow</artifactId>
<version>1.2.0</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.jimfs</groupId>
<artifactId>jimfs</artifactId>
<version>1.2</version>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
50 changes: 50 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[![Release](https://jitpack.io/v/umjammer/vavi-nio-file-fuse.svg)](https://jitpack.io/#umjammer/vavi-nio-file-fuse)
[![Java CI](https://github.com/umjammer/vavi-nio-file-fuse/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-nio-file-fuse/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-nio-file-fuse/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-nio-file-fuse/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-17-b07219)

# vavi-nio-file-fuse

integrated fuse filesystem mounter.

this is the api, implementation is provided as SPI.

## Providers

| fs | list | upload | download | copy | move | rm | mkdir | cache | watch | library |
|--------------------|------|--------|----------|------|------|----|-------|-------|-------|---------|
| javafs | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | | [javafs](https://github.com/umjammer/javafs) |
| fuse-jna | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | | [fuse-jna](https://github.com/EtiennePerot/fuse-jna) |
| jnr-fuse | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | - | | [jnr-fuse](https://github.com/SerCeMan/jnr-fuse) |

## Install

### maven

* https://jitpack.io/#umjammer/vavi-nio-file-fuse

### jdk argument

* `-Djna.library.path=/usr/local/lib`

## Usage

```java
URI uri = URI.create("googledrive:///?id=you@gmail.com");
FileSystems fs = FileSystems.newFileSystem(uri, Collections.emptyMap());

Fuse.getFuse().mount(fs, "/your/mout/point", Collections.emptyMap());
```

## Workaround

* if the test goes wrong, update macfuse and reboot the mac

## TODO

* ~~https://github.com/cryptomator/fuse-nio-adapter~~
* spotlight
* https://stackoverflow.com/a/2335565
* https://wiki.samba.org/index.php/Spotlight_with_Elasticsearch_Backend
* https://gitlab.com/samba-team/samba/-/blob/master/source3/rpcclient/cmd_spotlight.c
* `Path#toFile()` UnsupportedOperationException ... mount fs as fuse then `toFile`
Loading