Skip to content

Commit

Permalink
all: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Oct 6, 2023
1 parent 126525c commit d3b4070
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Test
description: Lints and tests siapfsd
description: Lints and tests fsd

runs:
using: composite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
- name: Build
env:
CGO_ENABLED: 1
run: go build -o bin/ ./cmd/siapfsd
run: go build -o bin/ ./cmd/fsd
32 changes: 16 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ jobs:
GOARCH: amd64
run: |
mkdir -p release
ZIP_OUTPUT=release/siapfsd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/siapfsd
ZIP_OUTPUT=release/fsd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/fsd
cp README.md LICENSE bin/
zip -qj $ZIP_OUTPUT bin/*
- name: Build arm64
Expand All @@ -87,13 +87,13 @@ jobs:
CC: aarch64-linux-gnu-gcc
run: |
mkdir -p release
ZIP_OUTPUT=release/siapfsd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/siapfsd
ZIP_OUTPUT=release/fsd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/fsd
cp README.md LICENSE bin/
zip -qj $ZIP_OUTPUT bin/*
- uses: actions/upload-artifact@v3
with:
name: siapfsd
name: fsd
path: release/
build-mac:
runs-on: macos-latest
Expand Down Expand Up @@ -149,11 +149,11 @@ jobs:
GOOS: darwin
GOARCH: amd64
run: |
ZIP_OUTPUT=release/siapfsd_${GOOS}_${GOARCH}.zip
ZIP_OUTPUT=release/fsd_${GOOS}_${GOARCH}.zip
mkdir -p release
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/siapfsd
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/fsd
cp README.md LICENSE bin/
/usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/siapfsd
/usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/fsd
ditto -ck bin $ZIP_OUTPUT
xcrun notarytool submit -k ~/private_keys/AuthKey_$APPLE_API_KEY.p8 -d $APPLE_API_KEY -i $APPLE_API_ISSUER --wait --timeout 10m $ZIP_OUTPUT
- name: Build arm64
Expand All @@ -169,16 +169,16 @@ jobs:
GOOS: darwin
GOARCH: arm64
run: |
ZIP_OUTPUT=release/siapfsd_${GOOS}_${GOARCH}.zip
ZIP_OUTPUT=release/fsd_${GOOS}_${GOARCH}.zip
mkdir -p release
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/siapfsd
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/fsd
cp README.md LICENSE bin/
/usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/siapfsd
/usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/fsd
ditto -ck bin $ZIP_OUTPUT
xcrun notarytool submit -k ~/private_keys/AuthKey_$APPLE_API_KEY.p8 -d $APPLE_API_KEY -i $APPLE_API_ISSUER --wait --timeout 10m $ZIP_OUTPUT
- uses: actions/upload-artifact@v3
with:
name: siapfsd
name: fsd
path: release/
build-windows:
runs-on: windows-latest
Expand All @@ -201,12 +201,12 @@ jobs:
shell: bash
run: |
mkdir -p release
ZIP_OUTPUT=release/siapfsd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/siapfsd
azuresigntool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v bin/siapfsd.exe
ZIP_OUTPUT=release/fsd_${GOOS}_${GOARCH}.zip
go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/fsd
azuresigntool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v bin/fsd.exe
cp README.md LICENSE bin/
7z a $ZIP_OUTPUT ./bin/*
- uses: actions/upload-artifact@v3
with:
name: siapfsd
name: fsd
path: release/
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to `siapfsd`
# Contributing to `fsd`

Thank you for considering contributing to `siapfsd`! We welcome your contributions
Thank you for considering contributing to `fsd`! We welcome your contributions
and appreciate your effort in helping improve the project. To ensure a smooth
and efficient collaboration, we have outlined some best practices for
contributing. Please follow these guidelines to maintain clarity and
Expand All @@ -10,7 +10,7 @@ For users new to GitHub, we recommend reading the [GitHub Flow](https://guides.g

## Fork the repository

To get started, fork the `siapfsd` repository to your GitHub account. This will
To get started, fork the `fsd` repository to your GitHub account. This will
create a copy of the repository under your own account, allowing you to freely
make changes without affecting the original project.

Expand Down Expand Up @@ -46,7 +46,7 @@ concisely describes the purpose of the change.
Before submitting a pull request, run the linter and tests to ensure that your
changes do not break any existing functionality. If you are adding new
functionality, include tests to verify that the new code works as expected.
`siapfsd` uses [golangci-lint](https://golangci-lint.run/usage/install/) to lint.
`fsd` uses [golangci-lint](https://golangci-lint.run/usage/install/) to lint.

### Run tests

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY . .

# Build the Go application
RUN go generate ./...
RUN go build -o bin/ -tags='netgo timetzdata' -trimpath -a -ldflags '-s -w' ./cmd/siapfsd
RUN go build -o bin/ -tags='netgo timetzdata' -trimpath -a -ldflags '-s -w' ./cmd/fsd

FROM debian:stable-slim

Expand All @@ -27,4 +27,4 @@ EXPOSE 8081/tcp
VOLUME ["/data"]

# Run the application
CMD ["siapfsd", "-dir", "/data"]
CMD ["fsd", "-dir", "/data"]
4 changes: 2 additions & 2 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ package build

import "time"

// Commit returns the commit hash of siapfsd
// Commit returns the commit hash of fsd
func Commit() string {
return commit
}

// Version returns the version of siapfsd
// Version returns the version of fsd
func Version() string {
return version
}
Expand Down
2 changes: 1 addition & 1 deletion build/gen.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build ignore

// This script generates meta.go which contains version info for the siapfsd binary. It can be run with `go generate`.
// This script generates meta.go which contains version info for the fsd binary. It can be run with `go generate`.
package main

import (
Expand Down
4 changes: 2 additions & 2 deletions cmd/siapfsd/ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/ipfs/kubo/plugin/loader"
"github.com/ipfs/kubo/repo"
"github.com/ipfs/kubo/repo/fsrepo"
"go.sia.tech/fsd/ipfs/blockstore"
"go.sia.tech/fsd/persist/badger"
"go.sia.tech/renterd/worker"
"go.sia.tech/siapfs/ipfs/blockstore"
"go.sia.tech/siapfs/persist/badger"
)

func setupPlugins(externalPluginsPath string) error {
Expand Down
14 changes: 7 additions & 7 deletions cmd/siapfsd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"syscall"

"github.com/ipfs/kubo/repo/fsrepo"
"go.sia.tech/fsd/build"
"go.sia.tech/fsd/config"
shttp "go.sia.tech/fsd/http"
"go.sia.tech/fsd/persist/badger"
"go.sia.tech/jape"
"go.sia.tech/renterd/worker"
"go.sia.tech/siapfs/build"
"go.sia.tech/siapfs/config"
shttp "go.sia.tech/siapfs/http"
"go.sia.tech/siapfs/persist/badger"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"gopkg.in/yaml.v3"
Expand All @@ -42,7 +42,7 @@ var (

// mustLoadConfig loads the config file.
func mustLoadConfig(dir string, log *zap.Logger) {
configPath := filepath.Join(dir, "siapfsd.yml")
configPath := filepath.Join(dir, "fsd.yml")

// If the config file doesn't exist, don't try to load it.
if _, err := os.Stat(configPath); os.IsNotExist(err) {
Expand Down Expand Up @@ -105,7 +105,7 @@ func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGINT)
defer cancel()

ds, err := badger.OpenDatabase(filepath.Join(dir, "siapfsd.badgerdb"), log.Named("badger"))
ds, err := badger.OpenDatabase(filepath.Join(dir, "fsd.badgerdb"), log.Named("badger"))
if err != nil {
log.Fatal("failed to open badger database", zap.Error(err))
}
Expand Down Expand Up @@ -159,7 +159,7 @@ func main() {
}
}()

log.Info("siapfsd started",
log.Info("fsd started",
zap.String("apiAddress", apiListener.Addr().String()),
zap.String("gatewayAddress", gatewayListener.Addr().String()),
zap.String("version", build.Version()),
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type (
Password string `yaml:"password"`
}

// Config contains the configuration for siapfsd
// Config contains the configuration for fsd
Config struct {
Renterd Renterd `yaml:"renterd"`
IPFS IPFS `yaml:"ipfs"`
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module go.sia.tech/siapfs
module go.sia.tech/fsd

go 1.21

Expand Down
4 changes: 2 additions & 2 deletions http/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"net/http"

"github.com/ipfs/go-cid"
"go.sia.tech/fsd/config"
"go.sia.tech/fsd/ipfs"
"go.sia.tech/jape"
"go.sia.tech/renterd/api"
"go.sia.tech/renterd/worker"
"go.sia.tech/siapfs/config"
"go.sia.tech/siapfs/ipfs"
"go.uber.org/zap"
)

Expand Down
4 changes: 2 additions & 2 deletions http/ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/ipfs/boxo/coreiface/path"
"github.com/ipfs/boxo/files"
"github.com/ipfs/go-cid"
"go.sia.tech/fsd/config"
"go.sia.tech/fsd/ipfs"
"go.sia.tech/jape"
"go.sia.tech/siapfs/config"
"go.sia.tech/siapfs/ipfs"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/renterd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"net/url"

"go.sia.tech/siapfs/config"
"go.sia.tech/fsd/config"
)

func downloadObject(ctx context.Context, renterd config.Renterd, key string, offset, length uint64) (io.ReadCloser, error) {
Expand Down
2 changes: 1 addition & 1 deletion ipfs/blockstore/renterd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"net/url"

"go.sia.tech/siapfs/config"
"go.sia.tech/fsd/config"
)

// downloadObject downloads an object from renterd
Expand Down
4 changes: 2 additions & 2 deletions ipfs/blockstore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/ipfs/boxo/blockstore"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"go.sia.tech/siapfs/config"
"go.sia.tech/siapfs/persist/badger"
"go.sia.tech/fsd/config"
"go.sia.tech/fsd/persist/badger"
)

// A Store implements the IPFS blockstore interface
Expand Down
2 changes: 1 addition & 1 deletion persist/badger/cids.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/dgraph-io/badger/v4"
"github.com/ipfs/go-cid"
"go.sia.tech/siapfs/ipfs"
"go.sia.tech/fsd/ipfs"
)

// HasBlock returns true if the CID is in the store
Expand Down

0 comments on commit d3b4070

Please sign in to comment.