diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 7edde7fc..ea04dfb8 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -122,14 +122,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token with: tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + name: Release ${{ github.ref }} body: | Changes in this Release - - **ADDED** `put` commmand to complement `get` commmand - - **CHANGED** `--get-config-path` option has been removed from `upsync`; use `put` instead. - - **CHANGED** `--get-config-path` option for `get` renamed to `--source-path` - - **FIXED** Automatic resolving of `--target-path` for `downsync` and `get` now resolves to a folder in the local directory - - **UPDATED** Updated longtail to 0.3.2 + - **CHANGED** set block extension to ".lsb" for fsblockstore in remote stores + - **UPDATED** Updated longtail to 0.3.3 draft: false prerelease: false - name: Download Linux artifacts diff --git a/commands/cmd_clonestore.go b/commands/cmd_clonestore.go index dda568fc..8ea7937f 100644 --- a/commands/cmd_clonestore.go +++ b/commands/cmd_clonestore.go @@ -543,7 +543,7 @@ func cloneStore( var sourceCompressBlockStore longtaillib.Longtail_BlockStoreAPI if len(localCachePath) > 0 { - localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), enableFileMapping) + localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), "", enableFileMapping) cacheBlockStore = longtaillib.CreateCacheBlockStore(jobs, localIndexStore, sourceRemoteIndexStore) diff --git a/commands/cmd_cp.go b/commands/cmd_cp.go index 3442b86b..cf5eb8a7 100644 --- a/commands/cmd_cp.go +++ b/commands/cmd_cp.go @@ -61,7 +61,7 @@ func cpVersionIndex( if localCachePath == "" { compressBlockStore = longtaillib.CreateCompressBlockStore(remoteIndexStore, creg) } else { - localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), enableFileMapping) + localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), "", enableFileMapping) cacheBlockStore = longtaillib.CreateCacheBlockStore(jobs, localIndexStore, remoteIndexStore) diff --git a/commands/cmd_downsync.go b/commands/cmd_downsync.go index a33b1877..18b196bc 100644 --- a/commands/cmd_downsync.go +++ b/commands/cmd_downsync.go @@ -151,7 +151,7 @@ func downsync( if localCachePath == "" { compressBlockStore = longtaillib.CreateCompressBlockStore(remoteIndexStore, creg) } else { - localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), enableFileMapping) + localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), "", enableFileMapping) cacheBlockStore = longtaillib.CreateCacheBlockStore(jobs, localIndexStore, remoteIndexStore) diff --git a/commands/cmd_ls.go b/commands/cmd_ls.go index 9d8c78b3..f8dd86aa 100644 --- a/commands/cmd_ls.go +++ b/commands/cmd_ls.go @@ -57,7 +57,7 @@ func ls( fakeBlockStoreFS := longtaillib.CreateInMemStorageAPI() defer fakeBlockStoreFS.Dispose() - fakeBlockStore := longtaillib.CreateFSBlockStore(jobs, fakeBlockStoreFS, "store", false) + fakeBlockStore := longtaillib.CreateFSBlockStore(jobs, fakeBlockStoreFS, "store", "", false) defer fakeBlockStoreFS.Dispose() storeIndex, err := longtaillib.CreateStoreIndex( diff --git a/commands/cmd_printVersionUsage.go b/commands/cmd_printVersionUsage.go index 270a3d8f..f8cf9b85 100644 --- a/commands/cmd_printVersionUsage.go +++ b/commands/cmd_printVersionUsage.go @@ -53,7 +53,7 @@ func printVersionUsage( indexStore = remoteIndexStore } else { localFS = longtaillib.CreateFSStorageAPI() - localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), false) + localIndexStore = longtaillib.CreateFSBlockStore(jobs, localFS, longtailutils.NormalizePath(localCachePath), "", false) cacheBlockStore = longtaillib.CreateCacheBlockStore(jobs, localIndexStore, remoteIndexStore) diff --git a/longtaillib/longtail/liblongtail_darwin_x64.a b/longtaillib/longtail/liblongtail_darwin_x64.a index ff770672..e9fcb942 100644 Binary files a/longtaillib/longtail/liblongtail_darwin_x64.a and b/longtaillib/longtail/liblongtail_darwin_x64.a differ diff --git a/longtaillib/longtail/liblongtail_linux_x64.a b/longtaillib/longtail/liblongtail_linux_x64.a index c8751352..333f33f9 100644 Binary files a/longtaillib/longtail/liblongtail_linux_x64.a and b/longtaillib/longtail/liblongtail_linux_x64.a differ diff --git a/longtaillib/longtail/liblongtail_win32_x64.a b/longtaillib/longtail/liblongtail_win32_x64.a index 1a18bde8..4ca97a66 100644 Binary files a/longtaillib/longtail/liblongtail_win32_x64.a and b/longtaillib/longtail/liblongtail_win32_x64.a differ diff --git a/longtaillib/longtaillib.go b/longtaillib/longtaillib.go index b9586cec..c699df62 100644 --- a/longtaillib/longtaillib.go +++ b/longtaillib/longtaillib.go @@ -990,14 +990,21 @@ func (asyncCompleteAPI *Longtail_AsyncFlushAPI) OnComplete(err error) { } // CreateFSBlockStore() ... -func CreateFSBlockStore(jobAPI Longtail_JobAPI, storageAPI Longtail_StorageAPI, contentPath string, enableFileMapping bool) Longtail_BlockStoreAPI { +func CreateFSBlockStore(jobAPI Longtail_JobAPI, storageAPI Longtail_StorageAPI, contentPath string, blockExtension string, enableFileMapping bool) Longtail_BlockStoreAPI { cContentPath := C.CString(contentPath) defer C.free(unsafe.Pointer(cContentPath)) + + var cBlockExtension *C.char + if blockExtension != "" { + cBlockExtension = C.CString(blockExtension) + defer C.free(unsafe.Pointer(cBlockExtension)) + } + cFileMapping := C.int(0) if enableFileMapping { cFileMapping = C.int(1) } - return Longtail_BlockStoreAPI{cBlockStoreAPI: C.Longtail_CreateFSBlockStoreAPI(jobAPI.cJobAPI, storageAPI.cStorageAPI, cContentPath, nil, cFileMapping)} + return Longtail_BlockStoreAPI{cBlockStoreAPI: C.Longtail_CreateFSBlockStoreAPI(jobAPI.cJobAPI, storageAPI.cStorageAPI, cContentPath, cBlockExtension, cFileMapping)} } // CreateCacheBlockStore() ... diff --git a/longtaillib/longtaillib_test.go b/longtaillib/longtaillib_test.go index 2c6d0402..3afbc7a6 100644 --- a/longtaillib/longtaillib_test.go +++ b/longtaillib/longtaillib_test.go @@ -323,7 +323,7 @@ func TestFSBlockStore(t *testing.T) { defer storageAPI.Dispose() jobAPI := CreateBikeshedJobAPI(uint32(runtime.NumCPU()), 0) defer jobAPI.Dispose() - blockStoreAPI := CreateFSBlockStore(jobAPI, storageAPI, "content", false) + blockStoreAPI := CreateFSBlockStore(jobAPI, storageAPI, "content", "", false) defer blockStoreAPI.Dispose() blake3 := CreateBlake3HashAPI() defer blake3.Dispose() @@ -1127,7 +1127,7 @@ func TestRewriteVersion(t *testing.T) { t.Errorf("TestRewriteVersion() CreateStoreIndex() %s", err) } defer storeIndex.Dispose() - blockStorageAPI := CreateFSBlockStore(jobAPI, storageAPI, "block_store", false) + blockStorageAPI := CreateFSBlockStore(jobAPI, storageAPI, "block_store", "", false) defer blockStorageAPI.Dispose() compressionRegistry := CreateZStdCompressionRegistry() compressionRegistry.Dispose() diff --git a/remotestore/remotestore.go b/remotestore/remotestore.go index d29c9c2e..34e7e95a 100644 --- a/remotestore/remotestore.go +++ b/remotestore/remotestore.go @@ -1909,8 +1909,8 @@ func CreateBlockStoreForURI( err := fmt.Errorf("azure Gen2 storage not yet implemented for path %s", uri) return longtaillib.Longtail_BlockStoreAPI{}, errors.Wrap(err, fname) case "file": - return longtaillib.CreateFSBlockStore(jobAPI, longtaillib.CreateFSStorageAPI(), blobStoreURL.Path[1:], enableFileMapping), nil + return longtaillib.CreateFSBlockStore(jobAPI, longtaillib.CreateFSStorageAPI(), blobStoreURL.Path[1:], ".lsb", enableFileMapping), nil } } - return longtaillib.CreateFSBlockStore(jobAPI, longtaillib.CreateFSStorageAPI(), uri, enableFileMapping), nil + return longtaillib.CreateFSBlockStore(jobAPI, longtaillib.CreateFSStorageAPI(), uri, ".lsb", enableFileMapping), nil }