* Re: How to use guix hash --serializer?
2022-01-04 19:48 ` Mortimer Cladwell
@ 2022-01-04 19:57 ` Tobias Geerinckx-Rice
2022-01-04 19:58 ` Mortimer Cladwell
2022-01-04 20:17 ` zimoun
2 siblings, 0 replies; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-01-04 19:57 UTC (permalink / raw)
To: Mortimer Cladwell; +Cc: Timothy Sample, help-guix
[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]
Hi Mortimer,
This is no bug:
> expected hash:
> 1ykbpz6pqx0bkvfp3c60qfb9r0xvpmrs0ldlxm2qw0zd8f67lmaj
> actual hash:
> 10nfjllq28jrzxd4dfqm6xzx8f2g1m6p2vivzihxc7d3ac1imnk2
It really means you're not hashing what you think you're hashing
and it won't matter which arguments you give ‘guix hash’: garbage
in, garbage out :-)
You probably have untracked files laying around. Reset your local
checkout, or start again:
/tmp λ git clone git://github.com/mbcladwell/shinyln.git
Cloning into 'shinyln'...
remote: Enumerating objects: 74, done.
remote: Counting objects: 100% (74/74), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 74 (delta 34), reused 59 (delta 19), pack-reused 0
Receiving objects: 100% (74/74), 34.75 KiB | 444.00 KiB/s, done.
Resolving deltas: 100% (34/34), done.
/tmp λ cd shinyln
/tmp/shinyln master λ git reset --hard
9f06568ffa61953ab48c93e1623d88b4e672af42
HEAD is now at 9f06568 removed chmod statement
/tmp/shinyln master λ guix hash -S nar -x .
10nfjllq28jrzxd4dfqm6xzx8f2g1m6p2vivzihxc7d3ac1imnk2
The ‘-S git’ bug you found does not affect this.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How to use guix hash --serializer?
2022-01-04 19:48 ` Mortimer Cladwell
2022-01-04 19:57 ` Tobias Geerinckx-Rice
@ 2022-01-04 19:58 ` Mortimer Cladwell
2022-01-04 20:17 ` zimoun
2 siblings, 0 replies; 14+ messages in thread
From: Mortimer Cladwell @ 2022-01-04 19:58 UTC (permalink / raw)
To: Timothy Sample; +Cc: help-guix
So I am seeing the result for guix hash -S . which is wrong, but when the
bug is fixed I will get the results for
guix hash -S -x .
Is that what you are implying?
Thanks
Mortimer
On Tue, Jan 4, 2022 at 2:48 PM Mortimer Cladwell <mbcladwell@gmail.com>
wrote:
> Thanks Tim, Simon, but that does not work for me.
>
> ====nar==============
> mbc@HP8300:~/projects$ guix hash -S nar -x ./shinyln
> 1ykbpz6pqx0bkvfp3c60qfb9r0xvpmrs0ldlxm2qw0zd8f67lmaj
> mbc@HP8300:~/projects$ cd shinyln/
> mbc@HP8300:~/projects/shinyln$ guix hash -S nar -x .
> 1ykbpz6pqx0bkvfp3c60qfb9r0xvpmrs0ldlxm2qw0zd8f67lmaj
>
> ====git==================
> mbc@HP8300:~/projects/shinyln$ guix hash -S git -x .
> 0lai57r0p11q041b3flriv56j6n8lizwb69yv7j396yiivkspv3x
> mbc@HP8300:~/projects/shinyln$ cd ..
> mbc@HP8300:~/projects$ guix hash -S git -x ./shinyln
> 0lai57r0p11q041b3flriv56j6n8lizwb69yv7j396yiivkspv3x
>
> ====error during packaging=============
> building /gnu/store/2a2016wffiy0cwvayvsz64r1f88k05mg-git-checkout.drv...
> \r:sha256 hash mismatch for
> /gnu/store/w2sl6n4jnbhzs8qp1k4lff35h1yml2c4-git-checkout:
> expected hash: 1ykbpz6pqx0bkvfp3c60qfb9r0xvpmrs0ldlxm2qw0zd8f67lmaj
> actual hash: 10nfjllq28jrzxd4dfqm6xzx8f2g1m6p2vivzihxc7d3ac1imnk2
>
> So seems like it doesn't matter whether I am inside or outside the
> directory I get the same hash (reasonable).
> Neither git nor nar provide the correct hash
>
> FYI from https://guix.gnu.org/manual/en/html_node/Invoking-guix-hash.html
> at the bottom explaining --exclude-vcs:
>
> $ git clone http://example.org/foo.git
> $ cd foo
> $ guix hash -rx .
>
> Suggests (to me) that you go inside the directory to calculate hash, though as above seems not to matter.
>
> Thanks
>
> Mortimer
>
>
>
>
>
>
>
> On Tue, Jan 4, 2022 at 2:09 PM Timothy Sample <samplet@ngyro.com> wrote:
>
>> Hi zimoun,
>>
>> zimoun <zimon.toutoune@gmail.com> writes:
>>
>> > Indeed,
>> >
>> > $ guix hash -S git foo -x
>> > 0czq9304mdv9f2j6a8cdi9855sl8w595p06c1m8bn9pg391lhcal
>> > $ guix hash -S git foo
>> > 0czq9304mdv9f2j6a8cdi9855sl8w595p06c1m8bn9pg391lhcal
>> >
>> > Hum, I will check if it is expected.
>>
>> I’m pretty sure it’s a bug. Fortunately, with Disarchive 0.4.0, the
>> following (untested) patch should fix it:
>>
>>
>> Hope that helps!
>>
>>
>> -- Tim
>>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How to use guix hash --serializer?
2022-01-04 19:48 ` Mortimer Cladwell
2022-01-04 19:57 ` Tobias Geerinckx-Rice
2022-01-04 19:58 ` Mortimer Cladwell
@ 2022-01-04 20:17 ` zimoun
2022-01-04 20:44 ` Mortimer Cladwell
2 siblings, 1 reply; 14+ messages in thread
From: zimoun @ 2022-01-04 20:17 UTC (permalink / raw)
To: Mortimer Cladwell, Timothy Sample; +Cc: help-guix
Hi Mortimer,
On Tue, 04 Jan 2022 at 14:48, Mortimer Cladwell <mbcladwell@gmail.com> wrote:
> mbc@HP8300:~/projects$ cd shinyln/
> mbc@HP8300:~/projects/shinyln$ guix hash -S nar -x .
> 1ykbpz6pqx0bkvfp3c60qfb9r0xvpmrs0ldlxm2qw0zd8f67lmaj
Could you report:
git --no-pager log -1 --oneline
git status
?
> FYI from https://guix.gnu.org/manual/en/html_node/Invoking-guix-hash.html
> at the bottom explaining --exclude-vcs:
>
> $ git clone http://example.org/foo.git
> $ cd foo
> $ guix hash -rx .
>
> Suggests (to me) that you go inside the directory to calculate hash,
> though as above seems not to matter.
Yes, indeed. I tried outside without fulling checking. :-)
Cheers,
simon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How to use guix hash --serializer?
2022-01-04 20:17 ` zimoun
@ 2022-01-04 20:44 ` Mortimer Cladwell
2022-01-04 20:57 ` Tobias Geerinckx-Rice
2022-01-04 21:02 ` zimoun
0 siblings, 2 replies; 14+ messages in thread
From: Mortimer Cladwell @ 2022-01-04 20:44 UTC (permalink / raw)
To: zimoun; +Cc: help-guix
Thanks Tobias you are correct.
My project is ~/projects/shinyln
I repeat your suggestion of cloning a second copy into ~temp/shinyln, cd,
git reset etc.
I then compare the contents of the two 'clone' directories, see below
looks like the difference, other than make/git related files are four empty
directories doc, scripts, shinyln and tests, so appears empty directories
are not allowed?
----------------------------------------------------------------
Hi Simon,
mbc@HP8300:~/projects/shinyln$ git --no-pager log -1 --oneline
git status
9f06568 (HEAD -> master, origin/master) removed chmod statement
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
-----------------------------------------------------------------
Thanks!
=================================================================
output of
find /home/mbc/projects/shinyln -type d -printf "%P\n" | sort > file1
find /home/mbc/temp/shinyln -type d -printf "%P\n" | sort | diff - file1
mbc@HP8300:~/temp$ cat file1
autom4te.cache
build-aux
doc
.git
.git/branches
.git/hooks
.git/info
.git/logs
.git/logs/refs
.git/logs/refs/heads
.git/logs/refs/remotes
.git/logs/refs/remotes/origin
.git/objects
.git/objects/02
.git/objects/07
.git/objects/09
.git/objects/0a
.git/objects/0c
.git/objects/0d
.git/objects/10
.git/objects/12
.git/objects/15
.git/objects/17
.git/objects/18
.git/objects/1a
.git/objects/1e
.git/objects/20
.git/objects/23
.git/objects/26
.git/objects/29
.git/objects/2e
.git/objects/31
.git/objects/32
.git/objects/36
.git/objects/3e
.git/objects/40
.git/objects/48
.git/objects/4c
.git/objects/66
.git/objects/68
.git/objects/69
.git/objects/6d
.git/objects/72
.git/objects/75
.git/objects/76
.git/objects/7f
.git/objects/81
.git/objects/82
.git/objects/84
.git/objects/85
.git/objects/89
.git/objects/8b
.git/objects/8d
.git/objects/9b
.git/objects/9e
.git/objects/9f
.git/objects/a1
.git/objects/a3
.git/objects/a4
.git/objects/aa
.git/objects/b0
.git/objects/b5
.git/objects/b7
.git/objects/ba
.git/objects/bc
.git/objects/c8
.git/objects/ce
.git/objects/d3
.git/objects/d4
.git/objects/d6
.git/objects/d8
.git/objects/d9
.git/objects/df
.git/objects/e6
.git/objects/e9
.git/objects/ea
.git/objects/f2
.git/objects/ff
.git/objects/info
.git/objects/pack
.git/refs
.git/refs/heads
.git/refs/remotes
.git/refs/remotes/origin
.git/refs/tags
scripts
shinyln
tests
On Tue, Jan 4, 2022 at 3:21 PM zimoun <zimon.toutoune@gmail.com> wrote:
> Hi Mortimer,
>
> On Tue, 04 Jan 2022 at 14:48, Mortimer Cladwell <mbcladwell@gmail.com>
> wrote:
>
> > mbc@HP8300:~/projects$ cd shinyln/
> > mbc@HP8300:~/projects/shinyln$ guix hash -S nar -x .
> > 1ykbpz6pqx0bkvfp3c60qfb9r0xvpmrs0ldlxm2qw0zd8f67lmaj
>
> Could you report:
>
> git --no-pager log -1 --oneline
> git status
>
> ?
>
> > FYI from
> https://guix.gnu.org/manual/en/html_node/Invoking-guix-hash.html
> > at the bottom explaining --exclude-vcs:
> >
> > $ git clone http://example.org/foo.git
> > $ cd foo
> > $ guix hash -rx .
> >
> > Suggests (to me) that you go inside the directory to calculate hash,
> > though as above seems not to matter.
>
> Yes, indeed. I tried outside without fulling checking. :-)
>
>
> Cheers,
> simon
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How to use guix hash --serializer?
2022-01-04 20:44 ` Mortimer Cladwell
@ 2022-01-04 20:57 ` Tobias Geerinckx-Rice
2022-01-04 21:02 ` zimoun
1 sibling, 0 replies; 14+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-01-04 20:57 UTC (permalink / raw)
To: Mortimer Cladwell; +Cc: zimoun, help-guix
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
Martimer,
Mortimer Cladwell 写道:
> looks like the difference, other than make/git related files are
> four empty
> directories doc, scripts, shinyln and tests, so appears empty
> directories
> are not allowed?
They are allowed but they change the hash, just as any other
difference would.
Missing or extraneous directories are no less meaningful than
files or permissions, etc., and can easily cause the build to fail
(‘cd: blah: No such file or directory’, ‘mkdir: cannot create foo:
File exists’) or otherwise behave very differently.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How to use guix hash --serializer?
2022-01-04 20:44 ` Mortimer Cladwell
2022-01-04 20:57 ` Tobias Geerinckx-Rice
@ 2022-01-04 21:02 ` zimoun
2022-01-04 21:16 ` Mortimer Cladwell
1 sibling, 1 reply; 14+ messages in thread
From: zimoun @ 2022-01-04 21:02 UTC (permalink / raw)
To: Mortimer Cladwell; +Cc: help-guix
Hi,
On Tue, 04 Jan 2022 at 15:44, Mortimer Cladwell <mbcladwell@gmail.com> wrote:
> looks like the difference, other than make/git related files are four empty
> directories doc, scripts, shinyln and tests, so appears empty directories
> are not allowed?
“guix hash” hashes all the bytes, not only the bytes tracked by Git.
> mbc@HP8300:~/projects/shinyln$ git --no-pager log -1 --oneline
> git status
> 9f06568 (HEAD -> master, origin/master) removed chmod statement
> On branch master
> Your branch is up to date with 'origin/master'.
>
> nothing to commit, working tree clean
Oh, empty directories is not shown by “git status” and no option to
display them, if I read correctly. Ah, I did not known.
Cheers,
simon
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: How to use guix hash --serializer?
2022-01-04 21:02 ` zimoun
@ 2022-01-04 21:16 ` Mortimer Cladwell
0 siblings, 0 replies; 14+ messages in thread
From: Mortimer Cladwell @ 2022-01-04 21:16 UTC (permalink / raw)
To: zimoun; +Cc: help-guix
Thanks Tobias.
I guess my thinking is that if you have a command line switch like -x that
"excludes version control system directories" it could also exclude empty
directories.
Mortimer
On Tue, Jan 4, 2022 at 4:07 PM zimoun <zimon.toutoune@gmail.com> wrote:
> Hi,
>
> On Tue, 04 Jan 2022 at 15:44, Mortimer Cladwell <mbcladwell@gmail.com>
> wrote:
>
> > looks like the difference, other than make/git related files are four
> empty
> > directories doc, scripts, shinyln and tests, so appears empty directories
> > are not allowed?
>
> “guix hash” hashes all the bytes, not only the bytes tracked by Git.
>
>
> > mbc@HP8300:~/projects/shinyln$ git --no-pager log -1 --oneline
> > git status
> > 9f06568 (HEAD -> master, origin/master) removed chmod statement
> > On branch master
> > Your branch is up to date with 'origin/master'.
> >
> > nothing to commit, working tree clean
>
> Oh, empty directories is not shown by “git status” and no option to
> display them, if I read correctly. Ah, I did not known.
>
> Cheers,
> simon
>
^ permalink raw reply [flat|nested] 14+ messages in thread