From aa36c651944cbeeb60cca49ddfe900fc4794ff08 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 11 May 2026 16:15:48 +0800 Subject: [PATCH] windows crlf, and changed aarch64 to musl --- .cargo/config.toml | 11 +++++------ .gitattributes | 4 ++++ Cargo.lock | 2 +- Cargo.toml | 2 +- Makefile | 8 ++++---- 5 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 .gitattributes diff --git a/.cargo/config.toml b/.cargo/config.toml index 78becd1..641dd54 100755 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,14 +1,13 @@ [target.x86_64-unknown-linux-musl] linker = "musl-gcc" -[target.aarch64-unknown-linux-gnu] -linker = "aarch64-linux-gnu-gcc" -ar = "aarch64-linux-gnu-gcc" -strip = { path = "aarch64-linux-gnu-strip" } -# ranlib = "aarch64-linux-gnu-ranlib" +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-musl-gcc" +ar = "aarch64-linux-musl-gcc" +strip = { path = "aarch64-linux-musl-strip" } [target.x86_64-pc-windows-gnu] linker = "x86_64-w64-mingw32-gcc" # [build] -# target = "x86_64-unknown-linux-gnu" \ No newline at end of file +# target = "x86_64-unknown-linux-gnu" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..626c86b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +debian/postinst text eol=lf +debian/postrm text eol=lf +*.sh text eol=lf +*.service text eol=lf diff --git a/Cargo.lock b/Cargo.lock index 48ff953..bd6f174 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2272,7 +2272,7 @@ dependencies = [ [[package]] name = "punchnet" -version = "1.2.1" +version = "1.2.4" dependencies = [ "ahash", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index 2b3103b..3effc6e 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "punchnet" -version = "1.2.1" +version = "1.2.4" edition = "2021" [dependencies] diff --git a/Makefile b/Makefile index 3c36462..24d0e2b 100755 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ libtun-so-clang: libtun-so: rm libtuntap.* && cd src/network && gcc -fPIC -shared -o libtuntap.so tuntap.c && cp libtuntap.so ../.. && cd - -libtun-so-aarch64: - rm libtuntap.* && cd src/network && aarch64-linux-gnu-gcc -fPIC -shared -o libtuntap.so tuntap.c && cp libtuntap.so ../.. && cd - +libtun-aarch64-musl: + rm -rf libtuntap.* && touch libtuntap.so && cd src/network && aarch64-linux-musl-gcc -c tuntap.c -o libtuntap.o && aarch64-linux-musl-ar rcs libtuntap.a libtuntap.o && cp libtuntap.a ../.. && cd - pack: tar -czvf punchnet.tar.gz punchnet punchnet.service libtuntap.so install.sh @@ -40,6 +40,6 @@ deb-musl: libtun-musl deb: libtun-so RUSTFLAGS="-L ." cargo deb --deb-revision="1-dynamic" -deb-aarch64: libtun-so-aarch64 - RUSTFLAGS="-L ." cargo deb --target aarch64-unknown-linux-gnu +deb-aarch64-musl: libtun-aarch64-musl + RUSTFLAGS="-L ." cargo deb --target aarch64-unknown-linux-musl --deb-revision="1-static"