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

lkl: 2017-10-18 -> 2017-11-10, make-disk-image: do not fake time for cptofs #31537

Merged
merged 3 commits into from Nov 12, 2017

Conversation

orivej
Copy link
Contributor

@orivej orivej commented Nov 11, 2017

Motivation for this change

New LKL has fixed lkl/linux#393, so we can partially revert f5b3f2c. I've confirmed that /nix/store paths in the resulting image are dated 1970-01-01 00:00:01.

@copumpkin Should we remove faketime for mkfs? What purpose does it serve?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
    • nixos/tests/ec2.nix
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@dezgeg
Copy link
Contributor

dezgeg commented Nov 11, 2017

I presume faketime on mkfs affects the timestamp of /lost+found. But IIRC it's impossible to make binary-reproducible ext4 images no matter flags you pass to mkfs (unless the situation has changed).

@orivej
Copy link
Contributor Author

orivej commented Nov 11, 2017

Good guess! Note that now the files other than those in the /nix/store have recent times:

   Date      Time    Attr         Size   Compressed  Name                                                                                                                                                                           
------------------- ----- ------------ ------------  ------------------------                                                                                                                                                       
1970-01-01 00:00:01 D....                            lost+found                                                                                                                                                                     
2017-11-11 20:30:10 D....                            bin                                                                                                                                                                            
2017-11-11 20:29:45 D....                            dev                                                                                                                                                                            
2017-11-11 20:30:26 D....                            etc                                                                                                                                                                            
2017-11-11 20:29:45 D....                            home                                                                                                                                                                           
2017-11-11 20:29:45 D....                            nix                                                                                                                                                                            
2017-11-11 20:29:45 D....                            proc                                                                                                                                                                           
2017-11-11 20:30:10 D....                            root                                                                                                                                                                           
2017-11-11 20:30:26 D....                            run                                                                                                                                                                            
2017-11-11 20:29:45 D....                            sys
2017-11-11 20:30:27 D....                            tmp
2017-11-11 20:29:45 D....                            var
2017-11-11 20:30:26 D....                            boot
2017-11-11 20:30:10 .....           65         4096  bin/sh
2017-11-11 20:30:10 .....            0            0  etc/NIXOS
2017-11-11 20:30:26 D....                            etc/nixos
2017-11-11 20:30:02 D....                            nix/store
2017-11-11 20:29:45 D....                            nix/var
1970-01-01 00:00:01 D....                            nix/store/p7i8r2icyrdd21gpy7ljbxqdxaz7mv03-unit-serial-getty-.service
1970-01-01 00:00:01 D....                            nix/store/bx6nz9yxm99gli10280l7apy5dkc3vh1-bzip2-1.0.6.0.1-man
1970-01-01 00:00:01 D....                            nix/store/i9xmmmsxhk4rpmc3flvk00jdwyjf9fyf-nixos-system-unnamed-18.03.git.b888ee7

I'm going to remove faketime then.

@orivej
Copy link
Contributor Author

orivej commented Nov 11, 2017

Done.

Since lkl/linux#394 cptofs preserves the source time,
which is 1970-01-01T00:00:01Z for /nix/store and recent for other files.

This reverts commit f5b3f2c.
@orivej
Copy link
Contributor Author

orivej commented Nov 11, 2017

After a part of ec2 tests (nix-build nixos/tests/ec2.nix) pass, I'm seeing this failure both with the current master and with this PR: https://gist.github.com/orivej/64a9ad44da2140f10f8ef303b26e035a . It seems related to this comment:

# These are used in the configure-from-userdata tests for EC2. Httpd and valgrind are requested
# directly by the configuration we set, and libxslt.bin is used indirectly as a build dependency
# of the derivation for dbus configuration files.
apacheHttpd valgrind.doc libxslt.bin
Could you reproduce it and help with the fix?

@orivej orivej merged commit f7bb8d2 into NixOS:master Nov 12, 2017
@dezgeg
Copy link
Contributor

dezgeg commented Nov 12, 2017

I cherry-picked this to 17.09 because the faketime was apparently breaking the OVA build. Really strange.

@copumpkin
Copy link
Member

I've been meaning to look into the EC2 test for a while, but I don't really have a machine that can virtualize linux nicely, so it's hard for me to experiment for now. I'm guessing we just need to make sure some of its dependencies are in the store, but it's hard to tell what it wants from the log.

@orivej orivej deleted the lkl branch November 13, 2017 00:38
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.

Preserving file times when copying with cptofs
4 participants