Skip to content

Commit

Permalink
0.13 release (jstaf#297)
Browse files Browse the repository at this point in the history
* update spec and debian files for 0.13

* fix changelog format

* go 1.15 compatibility for older os versions
  • Loading branch information
jstaf authored Nov 2, 2022
1 parent b7979a2 commit b96e638
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
5 changes: 3 additions & 2 deletions cmd/common/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package common

import (
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -34,7 +35,7 @@ func LoadConfig(path string) *Config {
LogLevel: "debug",
}

conf, err := os.ReadFile(path)
conf, err := ioutil.ReadFile(path)
if err != nil {
log.Warn().
Err(err).
Expand Down Expand Up @@ -66,5 +67,5 @@ func (c Config) WriteConfig(path string) {
if err != nil {
log.Error().Err(err).Msg("Could not marshal config!")
}
os.WriteFile(path, out, 0600)
ioutil.WriteFile(path, out, 0600)
}
6 changes: 5 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ onedriver (0.13.0-1) focal; urgency=low
* The GUI has been rewritten in golang for ease of maintenance and code sharing with
the rest of the onedriver application.
* onedriver can now be configured with a config file at "~/.config/onedriver/config.yml".
* There is now a configuration menu in the GUI. You can now set a couple configuration
options that were previously only possible with "systemctl edit".
* The onedriver CLI now stores its cache in the same path that the GUI expects,
meaning that invoking the onedriver filesystem directly and via the GUI will share the
cache as long as the mountpoint is the same.
* onedriver now prefers multipart downloads for files >10MB instead of a single massive
GET request. This should significantly improve reliability when working with large files.

-- Jeff Stafford <jeff.stafford@protonmail.com> Sat, Sep 24 16:00:00 -0400
-- Jeff Stafford <jeff.stafford@protonmail.com> Tue, 1 Nov 2022 22:00:00 -0400

onedriver (0.12.0-1) focal; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: onedriver
Section: utils
Priority: optional
Maintainer: Jeff Stafford <jeff.stafford@protonmail.com>
Build-Depends: golang (>= 1.12), gcc, pkg-config, libwebkit2gtk-4.0-dev, git, debhelper
Build-Depends: golang (>= 1.15), gcc, pkg-config, libwebkit2gtk-4.0-dev, git, debhelper
Standards-Version: 4.4.1
Homepage: https://github.com/jstaf/onedriver
#Vcs-Browser: https://github.com/jstaf/onedriver
Expand Down
4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ override_dh_auto_clean:

override_dh_auto_build:
# GOCACHE will be for a nonexistent user in pbuilder otherwise
GOCACHE=/tmp/go-cache go build -mod=vendor \
GOCACHE=/tmp/go-cache go build -v -mod=vendor \
-ldflags="-X github.com/jstaf/onedriver/cmd/common.commit=$(shell cat .commit)" \
./cmd/onedriver
GOCACHE=/tmp/go-cache go build -mod=vendor \
GOCACHE=/tmp/go-cache go build -v -mod=vendor \
-ldflags="-X github.com/jstaf/onedriver/cmd/common.commit=$(shell cat .commit)" \
./cmd/onedriver-launcher
gzip resources/onedriver.1
Expand Down
15 changes: 10 additions & 5 deletions onedriver.spec
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Suggests: systemd

%description
Onedriver is a native Linux filesystem for Microsoft Onedrive. Files and
metadata are downloaded on-demand with the goal of having no local state to
break.
metadata are downloaded on-demand instead of syncing the entire drive to
your local computer.

%prep
%autosetup
Expand All @@ -45,8 +45,8 @@ break.
# done via sed because #cgo flags appear to ignore #ifdef
sed -i 's/webkit2gtk-4.0/webkit2gtk-4.1/g' fs/graph/oauth2_gtk.go
%endif
go build -mod=vendor -ldflags="-X github.com/jstaf/onedriver/cmd/common.commit=$(cat .commit)" ./cmd/onedriver
go build -mod=vendor -ldflags="-X github.com/jstaf/onedriver/cmd/common.commit=$(cat .commit)" ./cmd/onedriver-launcher
go build -v -mod=vendor -ldflags="-X github.com/jstaf/onedriver/cmd/common.commit=$(cat .commit)" ./cmd/onedriver
go build -v -mod=vendor -ldflags="-X github.com/jstaf/onedriver/cmd/common.commit=$(cat .commit)" ./cmd/onedriver-launcher
gzip resources/onedriver.1

%install
Expand All @@ -59,6 +59,7 @@ mkdir -p %{buildroot}/usr/share/man/man1
cp %{name} %{buildroot}/%{_bindir}
cp %{name}-launcher %{buildroot}/%{_bindir}
cp resources/%{name}.png %{buildroot}/usr/share/icons/%{name}
cp resources/%{name}-128.png %{buildroot}/usr/share/icons/%{name}
cp resources/%{name}.svg %{buildroot}/usr/share/icons/%{name}
cp resources/%{name}.desktop %{buildroot}/usr/share/applications
cp resources/%{name}@.service %{buildroot}/usr/lib/systemd/user
Expand All @@ -79,13 +80,17 @@ cp resources/%{name}.1.gz %{buildroot}/usr/share/man/man1
%attr(644, root, root) /usr/share/man/man1/%{name}.1.gz

%changelog
* Sat Sep 24 2022 Jeff Stafford <jeff.stafford@protonmail.com> - 0.13.0
* Tue Nov 1 2022 Jeff Stafford <jeff.stafford@protonmail.com> - 0.13.0
- The GUI has been rewritten in golang for ease of maintenance and code sharing with
the rest of the onedriver application.
- onedriver can now be configured with a config file at "~/.config/onedriver/config.yml".
- There is now a configuration menu in the GUI. You can now set a couple configuration
options that were previously only possible with "systemctl edit".
- The onedriver CLI now stores its cache in the same path that the GUI expects,
meaning that invoking the onedriver filesystem directly and via the GUI will share the
cache as long as the mountpoint is the same.
- onedriver now prefers multipart downloads for files >10MB instead of a single massive
GET request. This should significantly improve reliability when working with large files.

* Tue Nov 2 2021 Jeff Stafford <jeff.stafford@protonmail.com> - 0.12.0
- Major internal rewrite - onedriver now talks directly to the kernel instead of using
Expand Down

0 comments on commit b96e638

Please sign in to comment.