1560 Commits

Author SHA1 Message Date
Kovid Goyal
9350caab4e
Fix invocation of setup.py in git hooks 2018-07-27 17:36:25 +05:30
Kovid Goyal
626d5aa1ce
Infrastructure for author name mapping 2018-07-17 15:32:58 +05:30
Joel Goguen
1c25ba0042 Exclude execute from umask
If the umask is set up to exlude execute, the installer will set up
calibre to be unreadable by any user other than the installing user.
When installing as `root`, a starting umask of `0o077` results in the
installer choosing a new umask of `0o033`, which means the calibre
install directory (and child directories) are installed with permissions
`0o744`, so only the installing user can actually use the resulting
calibre install.

To test, start with a system umask of `0o077` and run the installer
script as root:

```
% sudo sh ./setup/linux-installer.sh
Using python executable: /usr/bin/python3
WARNING: Your current umask disallows reading of files by some users, this can cause system breakage when running the installer because of bugs in common system utilities.
Should the installer (f)ix the umask, (i)gnore it or (a)bort [f/i/a Default is abort]: f
umask changed to: 022
Installing to /opt/calibre
Downloading tarball signature securely...
Using previously downloaded calibre-3.26.1-x86_64.txz
Extracting files to /opt/calibre ...
Extracting application files...
Creating symlinks...
	Symlinking /opt/calibre/ebook-edit to /usr/bin/ebook-edit
	Symlinking /opt/calibre/calibre-debug to /usr/bin/calibre-debug
	Symlinking /opt/calibre/web2disk to /usr/bin/web2disk
	Symlinking /opt/calibre/calibre-parallel to /usr/bin/calibre-parallel
	Symlinking /opt/calibre/calibredb to /usr/bin/calibredb
	Symlinking /opt/calibre/lrs2lrf to /usr/bin/lrs2lrf
	Symlinking /opt/calibre/calibre to /usr/bin/calibre
	Symlinking /opt/calibre/ebook-convert to /usr/bin/ebook-convert
	Symlinking /opt/calibre/calibre-server to /usr/bin/calibre-server
	Symlinking /opt/calibre/ebook-viewer to /usr/bin/ebook-viewer
	Symlinking /opt/calibre/calibre-smtp to /usr/bin/calibre-smtp
	Symlinking /opt/calibre/ebook-meta to /usr/bin/ebook-meta
	Symlinking /opt/calibre/ebook-device to /usr/bin/ebook-device
	Symlinking /opt/calibre/fetch-ebook-metadata to /usr/bin/fetch-ebook-metadata
	Symlinking /opt/calibre/ebook-polish to /usr/bin/ebook-polish
	Symlinking /opt/calibre/lrfviewer to /usr/bin/lrfviewer
	Symlinking /opt/calibre/calibre-customize to /usr/bin/calibre-customize
	Symlinking /opt/calibre/lrf2lrs to /usr/bin/lrf2lrs
	Symlinking /opt/calibre/markdown-calibre to /usr/bin/markdown-calibre
Setting up command-line completion...
Installing zsh completion to: /usr/share/zsh/site-functions/_calibre
Installing bash completion to: /usr/share/bash-completion/completions/calibre
Setting up desktop integration...
Creating un-installer: /usr/bin/calibre-uninstall
Run "calibre" to start calibre
```

And the resulting directory:
```
% ls -ld /opt/calibre
drwxr-xr-x. 5 root root 4.0K Jun 22 10:53 /opt/calibre/
```

Also verify the Python version, starting with no `/opt/calibre` and a system umask of `0o077`:
```
% sudo python3 ./setup/linux-installer.py
WARNING: Your current umask disallows reading of files by some users, this can cause system breakage when running the installer because of bugs in common system utilities.
Should the installer (f)ix the umask, (i)gnore it or (a)bort [f/i/a Default is abort]: f
umask changed to: 022
Installing to /opt/calibre
Downloading tarball signature securely...
Using previously downloaded calibre-3.26.1-x86_64.txz
Extracting files to /opt/calibre ...
Extracting application files...
Creating symlinks...
	Symlinking /opt/calibre/calibre-customize to /usr/bin/calibre-customize
	Symlinking /opt/calibre/calibre-smtp to /usr/bin/calibre-smtp
	Symlinking /opt/calibre/calibredb to /usr/bin/calibredb
	Symlinking /opt/calibre/calibre to /usr/bin/calibre
	Symlinking /opt/calibre/ebook-polish to /usr/bin/ebook-polish
	Symlinking /opt/calibre/ebook-meta to /usr/bin/ebook-meta
	Symlinking /opt/calibre/calibre-server to /usr/bin/calibre-server
	Symlinking /opt/calibre/markdown-calibre to /usr/bin/markdown-calibre
	Symlinking /opt/calibre/fetch-ebook-metadata to /usr/bin/fetch-ebook-metadata
	Symlinking /opt/calibre/lrf2lrs to /usr/bin/lrf2lrs
	Symlinking /opt/calibre/calibre-parallel to /usr/bin/calibre-parallel
	Symlinking /opt/calibre/ebook-convert to /usr/bin/ebook-convert
	Symlinking /opt/calibre/ebook-viewer to /usr/bin/ebook-viewer
	Symlinking /opt/calibre/web2disk to /usr/bin/web2disk
	Symlinking /opt/calibre/calibre-debug to /usr/bin/calibre-debug
	Symlinking /opt/calibre/ebook-device to /usr/bin/ebook-device
	Symlinking /opt/calibre/lrfviewer to /usr/bin/lrfviewer
	Symlinking /opt/calibre/ebook-edit to /usr/bin/ebook-edit
	Symlinking /opt/calibre/lrs2lrf to /usr/bin/lrs2lrf
Setting up command-line completion...
Installing zsh completion to: /usr/share/zsh/site-functions/_calibre
Installing bash completion to: /usr/share/bash-completion/completions/calibre
Setting up desktop integration...
Creating un-installer: /usr/bin/calibre-uninstall
Run "calibre" to start calibre

% ls -ld /opt/calibre
drwxr-xr-x. 5 root root 4.0K Jun 22 10:55 /opt/calibre/
```

After each, verify calibre starts as a non-root user.
2018-06-22 10:49:26 -07:00
Kovid Goyal
4df998fdd2
Ignore 404s on private bugs 2018-06-18 13:24:33 +05:30
Kovid Goyal
e8fdd7a83c
Migrate git hooks to py3 2018-06-12 18:01:55 +05:30
Kovid Goyal
cd7e8891bd
Fix python invocation in git hooks 2018-06-10 07:33:54 +05:30
Kovid Goyal
73029303d6
Dont use a set literal in the installer since there are apparently people still running linux installations with python 2.6 2018-06-09 07:05:03 +05:30
Kovid Goyal
499578beaa
Try to get unicode_names compiling on ancient compilers 2018-05-01 11:31:21 +05:30
Kovid Goyal
eaffdbb884
... 2018-05-01 11:18:40 +05:30
Kovid Goyal
5d95d13935
Edit Book: Fix names for some control characters not being displayed in the status bar
Uses the unicode names database I created for kitty. Much more
comprehensive than the one in ICU.
2018-05-01 10:23:50 +05:30
Kovid Goyal
f04b5eea20
Remove use of command -v from linux-installer.sh 2018-04-30 08:29:59 +05:30
Kovid Goyal
7a150c065e
Add a shebang for linux-installer.sh 2018-04-29 15:11:46 +05:30
Kovid Goyal
54c81eec15
Simplify passing arguments to linux-installer.py 2018-04-29 14:57:59 +05:30
Kovid Goyal
db936049cd
Add a shell script wrapper for the linux installer
Needed because Ubuntu 18.04 has decided, in its infinite wisdom to
have no default python executable, which makes it impossible to run
polyglot python scripts.
2018-04-28 10:05:18 +05:30
Kovid Goyal
9679a1c4f3
pep8 2018-04-28 08:52:46 +05:30
Kovid Goyal
2373a38005
Linux installer: Fix umask question not working with the recommended install command because stdin is a pipe 2018-04-14 15:44:02 +05:30
Kovid Goyal
baee2d2546
Content server: When updating interface data do not transmit translations if they have not been changed. Saves ~30-60KB bandwidth when using non-English interface language. 2018-03-24 10:50:24 +05:30
Kovid Goyal
73cd57bebb
DRYer 2018-03-10 09:07:38 +05:30
Kovid Goyal
53e5d1a748
Fix #1754698 [SIP_DIR no longer works to specify pyqt_sip_dir](https://bugs.launchpad.net/calibre/+bug/1754698) 2018-03-10 09:04:54 +05:30
Kovid Goyal
2beeb537b4
Ensure no spaces around fosshub API key 2018-03-09 16:41:00 +05:30
Kovid Goyal
5697f8f282
More robust timeout retry handling 2018-02-02 15:43:55 +05:30
Kovid Goyal
3dfd846b7b
Retry after sleeping on URL fetch timeout in plugins mirror script 2018-02-02 13:14:04 +05:30
Kovid Goyal
594c52a7af
Double plugin mirror download timeout 2018-02-01 13:06:34 +05:30
Kovid Goyal
3f9c5a8719
Move the search query parser tests into their own module and integrate with the calibre testing system 2018-01-18 10:03:30 +05:30
Kovid Goyal
5ac2ae511f
Also check for the C1 control chars 2018-01-05 12:35:51 +05:30
Kovid Goyal
0053ee6456
Add a check for ASCII control codes in translation files 2018-01-05 12:31:57 +05:30
Conrad Meyer
712edec636 Compatibility improvements for FreeBSD systems
Don't exclude libmtp on FreeBSD systems.

Don't exclude libusb on FreeBSD systems.  Our libusb has a different include
path structure and libname than Linux, but compiles fine once those are
corrected.

Correct path to py-sip on FreeBSD.  We install it to a different directory
than build_environment.py was looking in.
2017-12-26 13:01:13 -08:00
Kovid Goyal
631ca6393e
Linux installer: A nicer error message if the user tries to run the installer on an ARM machine 2017-12-04 12:32:36 +05:30
Kovid Goyal
b6312f1f12
Move various win API calls into native code
Faster, more robust. Should fix #1728196
2017-10-28 13:07:38 +05:30
Kovid Goyal
09d25c21e8
Update website translations on publish 2017-08-24 10:35:08 +05:30
Kovid Goyal
31e693cd09
Reduce the threshold for website translations to be included 2017-08-24 00:18:46 +05:30
Kovid Goyal
b6ef1092ce
Also write lang names to website locales zip file 2017-08-23 10:57:21 +05:30
Kovid Goyal
d554fbeb81
Compile the website translations 2017-08-23 09:46:27 +05:30
Kovid Goyal
f6b8381018
Ensure build is run before publish proceeds 2017-08-04 08:57:08 +05:30
Kovid Goyal
dfe2f5e04f
Dont use installed calibre when running sphinx-build 2017-07-04 21:51:42 +05:30
Kovid Goyal
9ccbf1ef8f
... 2017-07-04 17:54:22 +05:30
Kovid Goyal
81460e6cfc
More robust parallel use of sphinx-build2 2017-07-04 17:52:49 +05:30
Kovid Goyal
a0ac9cfddb
Use calibre available languages not manual languages when generating man pages 2017-07-04 13:19:20 +05:30
Kovid Goyal
556c32b6b8
Add man pages to the source tarball 2017-07-04 13:06:33 +05:30
Kovid Goyal
fa191ab55a
Create a setup.py command: man_pages to generate man pages in all languages 2017-07-04 12:28:59 +05:30
Kovid Goyal
9f4bf26b9d
Dont mute curl on the unix ci server 2017-07-02 10:17:46 +05:30
Kovid Goyal
9768d16334
Forgot that on macOS qmake generates .dylib files 2017-06-26 16:20:53 +05:30
Kovid Goyal
2291b2d2a0
Build the headless QPA backend on macOS as well 2017-06-26 14:56:58 +05:30
Kovid Goyal
7de2e366cf
A spot of refactoring 2017-06-22 09:00:49 +05:30
Kovid Goyal
cad405d413
Make the Support calibre button in the User manual translateable 2017-06-21 00:08:23 +05:30
Kovid Goyal
af6d043375
Switch to using msgfmt to check for format errors in translated strings
It catches more than pofilter with fewer false positives.
2017-06-18 10:26:24 +05:30
Kovid Goyal
08308ee14d
Fix python brace format check not being done by pofilter 2017-06-17 18:39:41 +05:30
Kovid Goyal
d305656bb4
Remove the vendored unrar code 2017-06-17 13:56:37 +05:30
Kovid Goyal
346b3b4368
Extarct strings from the calibre website for translation 2017-06-12 11:48:23 +05:30
Kovid Goyal
f863d3b46a
Try using node+rapydscript on appveyor as well 2017-06-10 11:22:17 +05:30