Commit Graph

19 Commits

Author SHA1 Message Date
sasha acabec7ae0 Remove `git_check_in_repo` from genbuild.sh to fix gitian version string
This removes the git hash from gitian-build zcash version strings when
built inside gitian (when the state of the working tree is clean and
corresponds to an annotated tag).
2022-10-21 14:39:21 -07:00
Hennadii Stepanov 8294e51681 Enable ShellCheck rules
Enabled ShellCheck rules:
  SC1087
  SC2001
  SC2004
  SC2005
  SC2006
  SC2016
  SC2028
  SC2048
  SC2066 (note that IFS already contains only a line feed)
  SC2116
  SC2166
  SC2181
  SC2206
  SC2207
  SC2230
  SC2236

(cherry picked from commit bitcoin/bitcoin@1ac454a384)

Zcash: Applies more of this commit. It was partially backported in
zcash/zcash#4827, and is also partially backported here for the scripts
we actually have.
2022-08-20 03:13:52 +00:00
Luke Dashjr 7fa4df7e7a Bugfix: Detect genbuild.sh in repo correctly
(cherry picked from commit bitcoin/bitcoin@ed1fcdcac0)
2022-08-20 03:13:52 +00:00
Luke Dashjr 8dbd2edd98 Bugfix: Only use git for build info if the repository is actually the right one
Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment

(cherry picked from commit bitcoin/bitcoin@e98e3dde6a)
2022-08-20 03:13:52 +00:00
Wladimir J. van der Laan fad9fba1e1 build: Get rid of `CLIENT_DATE`
Putting the build date in the executable is a practice that has no place
in these days, now that deterministic building is increasingly common.

Continues #7732 which did this for the GUI.

(cherry picked from commit bitcoin/bitcoin@d096d22446)
2022-08-20 03:13:52 +00:00
practicalswift 8cd66cf690 Add error handling: exit if cd fails 2020-10-27 15:08:36 +00:00
Hennadii Stepanov 1d3af17140 Enable ShellCheck rules
Enabled ShellCheck rules:
  SC1087
  SC2001
  SC2004
  SC2005
  SC2006
  SC2016
  SC2028
  SC2048
  SC2066 (note that IFS already contains only a line feed)
  SC2116
  SC2166
  SC2181
  SC2206
  SC2207
  SC2230
  SC2236

Zcash: Only the changes that applied to the versions of the scripts we have.
2020-10-26 17:36:26 +00:00
practicalswift 3b1bf4b4af Add "export LC_ALL=C" to all shell scripts
Zcash: Only for shell scripts we have from upstream.
2020-10-26 17:36:26 +00:00
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Luke Dashjr 8c07c3559e Add MIT license to autogen.sh and share/genbuild.sh
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 13:59:30 +01:00
Cory Fields c1149f7371 build: if there's no recent git tag, don't spew error messages 2015-05-04 10:58:21 -04:00
Francis GASCHET 70d80cc7bf
build: Fix "too many arguments" error
Closes #5141
2014-11-04 15:59:45 +01:00
Cory Fields c65cc8cde3 build: fix release name strings for gitian builds
When building from a distdir as gitian does, checking for the .git dir
is not reliable. Instead, ask git if we're in a repo.
2014-09-19 18:18:42 -04:00
harry b1f0be0a05 build: fix: remove error output
while git not found in path, error is output to console.
2014-05-09 12:06:20 +08:00
Warren Togami 3d20cd5f61 VERSION obtained from source instead of the previous git tag.
Drawback: The version string is no longer a valid git identifier.
          For this reason the 'g' short hash prefix has been removed.

Exception: When building directly from a tag this behaves exactly like the previous behavior.
           This allows formatting release versions with precision     i.e. v0.9.2
           This also allows arbitrary topicbranch names               i.e. v0.9.1-glibc-compat
2014-04-15 21:48:44 -10:00
Wladimir J. van der Laan 2df5e3427c Fix build time when building from tarball (now really)
Don't define BUILD_DATE at all when no git version information
is available. `version.cpp` will then define it for us correctly
to the last commit date.

This has been fixed and broken many times over 0.9 history
(21cc8bd, ef1e984), please don't touch this code unless you plan
on testing all possible scenarios including gitian builds.

Fixes #3570.
2014-01-30 11:54:19 +01:00
Dmitry Smirnov ef1e984ead Provide build time when building from tarball:
When building from tarball (i.g. not from git source tree or when git
 is not available) `genbuild.sh` write undefined $TIME to "build/build.h".

 Even worse, when TIME is set in the environment then its value
 is written instead of a date.

 For me this change fixed FTBFS which I got because I had
 TIME enviroment variable set with format for time(1) utility.
2013-11-21 11:43:00 +11:00
Cory Fields 35b8af9226 autotools: switch to autotools buildsystem 2013-09-05 21:31:03 -04:00
Pieter Wuille a20c0d0f67 Build identification strings
All client version information is moved to version.cpp, which optionally
(-DHAVE_BUILD_INFO) includes build.h. build.h is automatically generated
on supporting platforms via contrib/genbuild.sh, using git describe.

The git export-subst attribute is used to put the commit id statically
in version.cpp inside generated archives, and this value is used if no
build.h is present.

The gitian descriptors are modified to use git archive instead of a
copy, to create the src/ directory in the output. This way,
src/src/version.cpp will contain the static commit id. To prevent
gitian builds from getting the "-dirty" marker in their git-describe
generated identifiers, no touching of files or running sed on the
makefile is performed anymore. This does not seem to influence
determinism.
2012-04-10 18:16:53 +02:00