Skip to content

Commit

Permalink
Separate linux-specific components (#18)
Browse files Browse the repository at this point in the history
Both makes the project cleaner and allows targeting Mac OS / Windows sometime in the future

* Move linux-specific files into sub-directory
* Patch up paths in various files to reflect moves
* Modify travis.yml to invoke linux Docker file from repo root
  • Loading branch information
danstiner committed Jan 29, 2018
1 parent d339b30 commit a4ea430
Show file tree
Hide file tree
Showing 65 changed files with 16 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .bumpversion.cfg
Expand Up @@ -3,11 +3,11 @@ current_version = 0.2.0
commit = True
tag = True

[bumpversion:file:system-daemon/Cargo.toml]
[bumpversion:file:linux/system-daemon/Cargo.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:system-daemon/softu2f-system-daemon.spec]
[bumpversion:file:linux/system-daemon/softu2f-system-daemon.spec]
search = Version: {current_version}
replace = Version: {new_version}

Expand All @@ -19,19 +19,19 @@ replace = version = "{new_version}"
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:linux-uhid-tokio/Cargo.toml]
[bumpversion:file:linux/uhid-tokio/Cargo.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:user-daemon/Cargo.toml]
[bumpversion:file:linux/user-daemon/Cargo.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:user-daemon/softu2f-user-daemon.spec]
[bumpversion:file:linux/user-daemon/softu2f-user-daemon.spec]
search = Version: {current_version}
replace = Version: {new_version}

[bumpversion:file:softu2f.spec]
[bumpversion:file:linux/softu2f.spec]
search = Version: {current_version}
replace = Version: {new_version}

2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -4,7 +4,7 @@ services:
- docker

before_install:
- docker build -t danstiner/softu2f-linux .
- docker build -t danstiner/softu2f-linux -f linux/Dockerfile .

script:
- docker run -t danstiner/softu2f-linux cargo test --all
2 changes: 1 addition & 1 deletion Cargo.toml → linux/Cargo.toml
@@ -1,5 +1,5 @@
[workspace]
members = ["u2f-core", "u2fhid-protocol", "linux-uhid-sys", "linux-uhid-tokio", "linux-uhid-tokio/example", "user-daemon", "system-daemon"]
members = ["uhid-sys", "uhid-tokio", "uhid-tokio/example", "user-daemon", "system-daemon"]

[profile.release]
lto = true
Expand Down
9 changes: 3 additions & 6 deletions Dockerfile → linux/Dockerfile
@@ -1,9 +1,6 @@
# Run from repository root, for example: `docker build -t danstiner/softu2f-linux -f linux/Dockerfile .`
FROM rust:latest

RUN apt-get update && apt-get install -y clang-3.9 libdbus-1-dev libssl-dev libsystemd-dev protobuf-compiler

WORKDIR /app
COPY . .

COPY . /app
WORKDIR /app/linux
RUN cargo build

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions system-daemon/Cargo.toml → linux/system-daemon/Cargo.toml
Expand Up @@ -27,10 +27,10 @@ tokio-uds = "0.1.7"
users = "0.6.0"

[dependencies.linux-uhid-tokio]
path = "../linux-uhid-tokio"
path = "../uhid-tokio"

[dependencies.u2fhid-protocol]
path = "../u2fhid-protocol/"
path = "../../u2fhid-protocol/"

[[bin]]
name = "softu2f-system-daemon"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -16,4 +16,4 @@ tokio-io = "0.1.3"
tokio-proto = "0.1.1"

[dependencies.linux-uhid-sys]
path = "../linux-uhid-sys"
path = "../uhid-sys"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions user-daemon/Cargo.toml → linux/user-daemon/Cargo.toml
Expand Up @@ -23,10 +23,10 @@ tokio-uds = "0.1.7"
path = "../system-daemon"

[dependencies.u2f-core]
path = "../u2f-core"
path = "../../u2f-core"

[dependencies.u2fhid-protocol]
path = "../u2fhid-protocol"
path = "../../u2fhid-protocol"

[dev-dependencies]
tempdir = "0.3.5"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a4ea430

Please sign in to comment.