Skip to content
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

Merged
merged 1 commit into from
Dec 29, 2022
Merged

openrsync: init at unstable-2022-05-08 #206395

merged 1 commit into from
Dec 29, 2022

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented Dec 16, 2022

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Copy link
Member

@deejayem deejayem left a 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;

@fgaz
Copy link
Member Author

fgaz commented Dec 16, 2022

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.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/742

Comment on lines 25 to 27
# https://github.com/kristapsdz/openrsync#portability
# https://github.com/kristapsdz/oconfigure#readme
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# https://github.com/kristapsdz/openrsync#portability
# https://github.com/kristapsdz/oconfigure#readme
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd;
platforms = platforms.unix;

Copy link
Member

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.

Copy link
Member

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;
Copy link
Member

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.

Suggested change
platforms = with platforms; linux ++ freebsd ++ netbsd ++ openbsd;
platforms = platforms.unix;
broken = stdenv.isDarwin && stdenv.isx86_64;

Copy link
Member Author

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

@fgaz fgaz merged commit 904f07f into NixOS:master Dec 29, 2022
@fgaz fgaz deleted the openrsync/init branch December 29, 2022 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants