[botan-devel] Current github code doesn't install - install.py script problem

Uri Blumenthal uri at mit.edu
Thu Jul 9 23:18:52 EDT 2015


On Jul 9, 2015, at 17:33 , Simon Warta | Kullo <simon at kullo.net<mailto:simon at kullo.net>> wrote:

Hi Uri,

thanks for spotting that out!

:-)

combine_relnotes has been a script that collected changelog information
from many files, sorted them and wrote everything into one file. Since
1.11.18 this is not necessary any more, because everything is already in
one file.

Good! :-)

The install script installs docs to /share, which is a nice thing to
have, isn't it?

Well, on one hand - yes it is great to be able to get the docs. But on the other hand, some installations are space-constrained, and may not want to spend an extra megabyte or so to keep the docs online.

My preference here would be to have an option of installing the docs to $PREFIX/share - but not forcing the docs to be installed regardless of whether the user wants/needs them or not. For example, I seldom use HTML-based docs, so I personally wouldn’t keep them in /share. I would add a make target “install-docs”, and would not make that target a-must for a successful install. It was rather frustrating to be unable to use the library because some docs that I don’t care about anyway didn’t get installed. :-)

Speaking of which.

I keep a lot of the docs I need/use on a separate drive in PDF or LaTeX. It’s my workflow, I’m not suggesting it’s better than what somebody else is using. The point is - when sphinx formats the docs (from the source code) to LaTeX, in several places the lines exceed the page width and get truncated. It confused me at first, but then I realized that it’s the consequence of treating “Verbatim” the .c++ source files that contain unpleasantly long lines. I’m going to track down as many of those as I can, and manually correct (by inserting line breaks in the source code :). Would that change be accepted, and what’s the best way to submit it?

We'll add `make install` to the CI as soon as possible to avoid this kind of errors in the future.

Great! Thanks!

Am 08.07.2015 um 00:23 schrieb Uri Blumenthal:
src/scripts/install.py script tries to import combine_relnotes.py script, which is not present in github. As a result, unless you comment those three lines that refer to combine_relnotes out, "make install" fails. Like:

$ sudo make install
sphinx-build -c ./src/build-data/sphinx -b latex ./doc/manual build/docs/manual
Running Sphinx v1.3.1
WARNING: the config value 'latex_show_urls' has type `bool', defaults to `str.'
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing botan.tex... contents index building python firststep secmem rng filters pubkey x509 ocsp tls credentials_manager aead bigint lowlevel kdf pbkdf passhash cryptobox srp fpe compression versions ffi
resolving references...
writing... done
copying TeX support files...
done
build succeeded, 1 warning.
./src/scripts/install.py --destdir=/opt/local --build-dir="build" --bindir=bin --libdir=lib --docdir=doc --includedir=include
Traceback (most recent call last):
 File "./src/scripts/install.py", line 22, in <module>
   import combine_relnotes
ImportError: No module named combine_relnotes
make: *** [install] Error 1

As a side note, the first build of docs in latex format emitted this:

sphinx-build -c ./src/build-data/sphinx -b latex ./doc/manual build/docs/manual
Running Sphinx v1.3.1
WARNING: the config value 'latex_show_urls' has type `bool', defaults to `str.'
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 25 added, 0 changed, 0 removed
reading sources... [100%] x509
/Users/ur20980/Src/botan/doc/manual/tls.rst:197: WARNING: Error when parsing function declaration:
If no return type {
Invalid definition: Expected identifier in nested name. [error at 353]
 TLS::Client( output_fn output, data_cb data, alert_cb alert, handshake_cb handshake_complete, TLS::Session_Manager& session_manager, Credentials_Manager& credendials_manager, const TLS::Policy& policy, RandomNumberGenerator& rng, const Server_Information& server_info, const Protocol_Version offer_version, const std::vector<std::string>& app_protocols,
 -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
} else if return type {
If declId, parameters, and qualifiers {
Invalid definition: Expected identifier in nested name. [error at 11]
 TLS::Client( output_fn output, data_cb data, alert_cb alert, handshake_cb handshake_complete, TLS::Session_Manager& session_manager, Credentials_Manager& credendials_manager, const TLS::Policy& policy, RandomNumberGenerator& rng, const Server_Information& server_info, const Protocol_Version offer_version, const std::vector<std::string>& app_protocols,
 -----------^
} else If parenthesis in noptr-declarator {
Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 23]
 TLS::Client( output_fn output, data_cb data, alert_cb alert, handshake_cb handshake_complete, TLS::Session_Manager& session_manager, Credentials_Manager& credendials_manager, const TLS::Policy& policy, RandomNumberGenerator& rng, const Server_Information& server_info, const Protocol_Version offer_version, const std::vector<std::string>& app_protocols,
 -----------------------^
}
}
/Users/ur20980/Src/botan/doc/manual/tls.rst:197: WARNING: Error when parsing function declaration:
If no return type {
Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 7]
 size_t reserved_io_buffer_size)
 -------^
} else if return type {
Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 30]
 size_t reserved_io_buffer_size)
 ------------------------------^
}
/Users/ur20980/Src/botan/doc/manual/tls.rst:287: WARNING: Error when parsing function declaration:
If no return type {
Invalid definition: Expected identifier in nested name. [error at 362]
 TLS::Server( std::function<void, const byte*, size_t> output_fn, std::function<void, const byte*, size_t> data_cb, std::function<TLS::Alert, const byte*, size_t> alert_cb, TLS::Session_Manager& session_manager, Credentials_Manager& creds, const TLS::Policy& policy, RandomNumberGenerator& rng, std::function<std::string, std::vector<std::string> > proto_chooser,
 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
} else if return type {
If declId, parameters, and qualifiers {
Invalid definition: Expected identifier in nested name. [error at 11]
 TLS::Server( std::function<void, const byte*, size_t> output_fn, std::function<void, const byte*, size_t> data_cb, std::function<TLS::Alert, const byte*, size_t> alert_cb, TLS::Session_Manager& session_manager, Credentials_Manager& creds, const TLS::Policy& policy, RandomNumberGenerator& rng, std::function<std::string, std::vector<std::string> > proto_chooser,
 -----------^
} else If parenthesis in noptr-declarator {
Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 54]
 TLS::Server( std::function<void, const byte*, size_t> output_fn, std::function<void, const byte*, size_t> data_cb, std::function<TLS::Alert, const byte*, size_t> alert_cb, TLS::Session_Manager& session_manager, Credentials_Manager& creds, const TLS::Policy& policy, RandomNumberGenerator& rng, std::function<std::string, std::vector<std::string> > proto_chooser,
 ------------------------------------------------------^
}
}
/Users/ur20980/Src/botan/doc/manual/tls.rst:287: WARNING: Error when parsing function declaration:
If no return type {
Invalid definition: Expected identifier in nested name, got keyword: const [error at 5]
 const std::vector<std::string>& protocols, bool is_datagram = false, bool reserved_io_buffer_size)
 -----^
} else if return type {
Invalid definition: Expecting "(" in parameters_and_qualifiers. [error at 41]
 const std::vector<std::string>& protocols, bool is_datagram = false, bool reserved_io_buffer_size)
 -----------------------------------------^
}
/Users/ur20980/Src/botan/doc/manual/tls.rst:3: SEVERE: Duplicate ID: "TLS::Session".
/Users/ur20980/Src/botan/doc/manual/tls.rst:745: WARNING: Type must be either just a name or a typedef-like declaration.
Just a name error: Invalid definition: Expected identifier in nested name, got keyword: enum [error at 4]
 enum Version_Code
 ----^
Typedef-like expression error: Invalid definition: Expected identifier in nested name, got keyword: enum [error at 4]
 enum Version_Code
 ----^
/Users/ur20980/Src/botan/doc/manual/tls.rst:3: SEVERE: Duplicate ID: "TLS::Protocol_Version::latest_tls_version".
/Users/ur20980/Src/botan/doc/manual/tls.rst:3: SEVERE: Duplicate ID: "TLS::Protocol_Version::latest_dtls_version".
/Users/ur20980/Src/botan/doc/manual/x509.rst:5: SEVERE: Duplicate ID: "X509_Certificate::subject_dnC".
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing botan.tex... contents index building python firststep secmem rng filters pubkey x509 ocsp tls credentials_manager aead bigint lowlevel kdf pbkdf passhash cryptobox srp fpe compression versions ffi
resolving references...
writing... done
copying TeX support files...
done
build succeeded, 10 warnings.
./src/scripts/install.py --destdir=/opt/local --build-dir="build" --bindir=bin --libdir=lib --docdir=doc --includedir=include
Traceback (most recent call last):
 File "./src/scripts/install.py", line 22, in <module>
   import combine_relnotes
ImportError: No module named combine_relnotes


P.S. WTF is "combine_relnotes"?

P.P.S. Why is "install" dependent on docs?
_______________________________________________
botan-devel mailing list
botan-devel at randombit.net<mailto:botan-devel at randombit.net>
http://lists.randombit.net/mailman/listinfo/botan-devel



--
Simon Warta
Co-Founder / CEO Kullo
https://kullo.net/

Telefon: 0175-1930541
E-Mail: simon at kullo.net
Kullo: simon#kullo.net

Kullo GmbH
Kranzplatz 5-6
65183 Wiesbaden

Vertretungsberechtigte Geschäftsführer:
Simon Warta, Daniel Seither

Registergericht: Amtsgericht Wiesbaden
Registernummer: HRB 27626

Umsatzsteuer-Identifikationsnummer gemäß §27 a Umsatzsteuergesetz:
DE294537976

Standort Berlin:
Kullo GmbH
c/o Beuth Hochschule
Kurfürstenstraße 141
10785 Berlin
_______________________________________________
botan-devel mailing list
botan-devel at randombit.net
http://lists.randombit.net/mailman/listinfo/botan-devel

--
Uri Blumenthal
uri at mit.edu<mailto:uri at mit.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20150710/3bab0dff/attachment-0001.html>


More information about the botan-devel mailing list