- Support .copr/Makefile for 'SCM / make srpm' COPR package
- Use genrpm.sh to generate srpm and optionally build it
- Use generic substitution syntax in specfile
This change includes:
1. Move shared library `shadowsocks-libev.so.*` to an package `libshadowsocks-libev`
and rename package `shadowsocks-libev-devel` to `libshadowsocks-libev-devel`
to reconcile with the deb packages.
2. Add a new package `shadowsocks-libev-zsh-completion`.
3. Run `setcap` after installation (similar to #1119).
4. Remove ss-nat because it is designed for OpenWrt/LEDE.
5. Auto restart instantiated services after update and stop/disable instantiated
services after uninstallation.
As discussed with @librehat in #1604, maintaining a separate set of systemd
files for RPM distributions will be convenient to build on Copr.
This patch will also change some lines in rpm/genrpm.sh to archive the
source code using `git archive` because the old logic doesn't respect
`.gitignore`.
This patch is going to replace the group name 'nogroup' with 'nobody' in
debian/shadowsocks-libev.service, and move file
'/etc/default/shadowsocks-libev' to '/etc/sysconfig/shadowsocks-libev'.
This is implemented by creating a text patch file. Not sure whether
there is a better approach.
1. add missing build and runtime dependencies
2. change minimal version requirement for libsodium to 1.0.4, which
should work fine with ss-libev and EPEL7 users will not have to compile a
later version.
3. add more entries to .gitignore
Here are the problems existing in the old RPM packaging scripts:
1. The old `genrpm.sh` is designed to build RPMs for all versions of
shadowsocks-libev with an option '-v'.
This increases the complexity because we need to keep it compatible
with old versions.
2. I have to modify the script manually in order to build RPMs from
non-release commit or dirty workspace.
The new script will only build RPMs and SRPMs from current workspace,
not commit.
The version-release number will be determined automatically from the
`git describe` command.
* auto select latest version
* bash-completion comes with version 2.6.0
* version greater than 2.6.2 need submodules packed
* adjust version check order
1. add missing build and runtime dependencies
2. change minimal version requirement for libsodium to 1.0.4, which
should work fine with ss-libev and EPEL7 users will not have to compile a
later version.
3. add more entries to .gitignore
Here are the problems existing in the old RPM packaging scripts:
1. The old `genrpm.sh` is designed to build RPMs for all versions of
shadowsocks-libev with an option '-v'.
This increases the complexity because we need to keep it compatible
with old versions.
2. I have to modify the script manually in order to build RPMs from
non-release commit or dirty workspace.
The new script will only build RPMs and SRPMs from current workspace,
not commit.
The version-release number will be determined automatically from the
`git describe` command.
* auto select latest version
* bash-completion comes with version 2.6.0
* version greater than 2.6.2 need submodules packed
* adjust version check order
Tests show that EL6 is too old to support `%elif` statement (which is very stupid).
And revert dependency `openssl-libs` to `openssl` because of
inconsistent names in EL6.