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

cabal-install randomly misses part of its man page #6475

Closed
bmwiedemann opened this issue Jan 4, 2020 · 2 comments
Closed

cabal-install randomly misses part of its man page #6475

bmwiedemann opened this issue Jan 4, 2020 · 2 comments

Comments

@bmwiedemann
Copy link

Describe the bug
While working on reproducible builds for openSUSE, I found that
our cabal-install-3.0.0.0 binary package varies in every build
from the included cabal.1 man page
created by ./Setup build -v

The cabal-install-2.4.0.0 package was still building reproducibly in 2019-08-16

To Reproduce
Steps to reproduce the behavior:

# on openSUSE or Debian:
$ osc checkout openSUSE:Factory/cabal-install && cd $_
for i in 1 2 3 ; do
  osc build --keep-pkg=RPMS --noservice
  rpm -qpvl RPMS/cabal-install-3.0.0.0-*.x86_64.rpm | grep cabal.1.gz | tee -a output-log.txt
done
cat output-log.txt

# actual results:
-rw-r--r--    1 root    root                    21803 Jan  4 21:21 /usr/share/man/man1/cabal.1.gz
-rw-r--r--    1 root    root                    29319 Jan  4 21:27 /usr/share/man/man1/cabal.1.gz
-rw-r--r--    1 root    root                    33865 Jan  4 21:32 /usr/share/man/man1/cabal.1.gz


# or try manually:
for i in $(seq 1 3) ; do
  ghc --make -no-user-package-db Setup
  ./Setup configure
  ./Setup build
  md5sum dist/build/cabal/cabal.1 | tee -a output-log.txt
# 0c2c1f943e5c65348838e78a2e1645ca
# d41d8cd98f00b204e9800998ecf8427e
  wc dist/build/cabal/cabal.1
# 51656 121199 829384 dist/build/cabal/cabal.1
  ./Setup clean
  rm -f Setup
done

Expected behavior
Build output should be deterministic (aka reproducible).

System information

  • Operating system: openSUSE Tumbleweed 2020-01-01
  • ghc 8.8.1

Additional context

https://reproducible-builds.org/

@phadej
Copy link
Collaborator

phadej commented Jan 4, 2020

I think we should drop generation of man page using Setup.hs...

@phadej
Copy link
Collaborator

phadej commented Feb 21, 2020

man page is not generated due build process. Use cabal man --raw to get raw troff source, if you need it in distro packaging.

The generation should be deterministic, yet if it isn't please open a new issue with attached differing man page sources.

Done in #6548

@phadej phadej closed this as completed Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants