| 1 |
This patch fixes issues during package build with ebuild supporting
|
| 2 |
installation for Python versions: sed substitutions in common.py and location
|
| 3 |
of ufw script in Python ABIs which have prefix different than /usr.
|
| 4 |
Also makes .mo files not to be installed in wrong paths.
|
| 5 |
|
| 6 |
More info about the first issue:
|
| 7 |
with support for multiple Python versions in the ebuild, seems the
|
| 8 |
file isn't copied from staging/ to build-*/lib/ufw/ after being
|
| 9 |
modified. That's why the copy needs to be done "manually" here.
|
| 10 |
The issue occurs with "setup.py build -b build-XXX" followed by
|
| 11 |
"setup.py build -b build-XXX install".
|
| 12 |
|
| 13 |
probably related: https://bugs.launchpad.net/ufw/+bug/819600
|
| 14 |
--- setup.py
|
| 15 |
+++ setup.py
|
| 16 |
@@ -90,6 +90,8 @@
|
| 17 |
"-i",
|
| 18 |
"s%#SHARE_DIR#%" + real_sharedir + "%g",
|
| 19 |
os.path.join('staging', file)])
|
| 20 |
+ self.copy_file(os.path.join('staging', file),
|
| 21 |
+ os.path.join(self.build_base, "lib", "ufw"))
|
| 22 |
|
| 23 |
# Now byte-compile everything
|
| 24 |
super(Install, self).run()
|
| 25 |
@@ -99,7 +101,8 @@
|
| 26 |
if self.root != None:
|
| 27 |
prefix = self.root + real_prefix
|
| 28 |
|
| 29 |
- script = os.path.join(prefix, 'sbin', 'ufw')
|
| 30 |
+ # PyPy (and Jython?) has different prefix. Without the change the binary would end up in a wrong path.
|
| 31 |
+ script = os.path.join(self.root, 'usr', 'sbin', 'ufw')
|
| 32 |
manpage = os.path.join(prefix, 'share', 'man', 'man8', 'ufw.8')
|
| 33 |
manpage_f = os.path.join(prefix, 'share', 'man', 'man8', \
|
| 34 |
'ufw-framework.8')
|
| 35 |
@@ -147,7 +150,6 @@
|
| 36 |
self.mkpath(i18ndir)
|
| 37 |
if len(os.listdir('locales/mo')) == 0:
|
| 38 |
subprocess.call(["make", "mo"])
|
| 39 |
- self.copy_tree('locales/mo', i18ndir)
|
| 40 |
|
| 41 |
# Install configuration files
|
| 42 |
confdir = real_confdir
|