-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openrsync: init at unstable-2022-05-08 #206395
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built and tested successfully on x86_64-linux
and aarch64-linux
.
But it fails to build on darwin:
clang -g -W -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wno-unused-parameter -c -o receiver.o receiver.c
receiver.c:63:19: error: use of undeclared identifier 'UTIME_NOW'
ts[0].tv_nsec = UTIME_NOW;
^
receiver.c:66:7: warning: implicit declaration of function 'futimens' is invalid in C99 [-Wimplicit-function-declaration]
if (futimens(fd, ts) == -1) {
^
receiver.c:124:19: error: use of undeclared identifier 'UTIME_NOW'
ts[0].tv_nsec = UTIME_NOW;
^
receiver.c:127:7: warning: implicit declaration of function 'utimensat' is invalid in C99 [-Wimplicit-function-declaration]
if (utimensat(rootfd, path, ts, AT_SYMLINK_NOFOLLOW) == -1) {
^
2 warnings and 2 errors generated.
make: *** [<builtin>: receiver.o] Error 1
So meta.platforms
can't be platforms.unix
. Maybe you want something like platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd;
I hoped it would build :) Changed. Maybe it doesn't even build on free/netbsd and it builds on some other obscure unix (see the links I just added), but at least tier 1-2 platforms are correct now. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
# https://github.com/kristapsdz/openrsync#portability | ||
# https://github.com/kristapsdz/oconfigure#readme | ||
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# https://github.com/kristapsdz/openrsync#portability | |
# https://github.com/kristapsdz/oconfigure#readme | |
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd; | |
platforms = platforms.unix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuperSandro2000 it doesn't build on darwin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then this should be linux. Currently we don't consider bsd because they don't have any real support in nixpkgs right now.
maintainers = with maintainers; [ fgaz ]; | ||
# https://github.com/kristapsdz/openrsync#portability | ||
# https://github.com/kristapsdz/oconfigure#readme | ||
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The utimensat issue is x86_64-darwin only since the SDK was too old. We can also test if darwin.apple_sdk_11_0.callPackage
helps.
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd; | |
platforms = platforms.unix; | |
broken = stdenv.isDarwin && stdenv.isx86_64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
darwin.apple_sdk_11_0.callPackage
fixed it
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes