Skip to content

Commit ba9c5b9

Browse files
committed
Remove creation of libudev symlink in installers on Linux (Issue cztomczak#148).
Debian package installer still needs fixes - Chromium SVN links don't work anymore.
1 parent 0595762 commit ba9c5b9

File tree

5 files changed

+11
-54
lines changed

5 files changed

+11
-54
lines changed

src/linux/installer/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/cefpython3-*/
22
/deb_archive/
3+
*.tar.gz

src/linux/installer/debian.postinst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,6 @@ chmod 666 /usr/share/pyshared/cefpython3/debug.log
1414
chmod 666 /usr/share/pyshared/cefpython3/examples/debug.log
1515
chmod 666 /usr/share/pyshared/cefpython3/examples/wx/debug.log
1616

17-
# Check if libudev.so.0 exists and if not, create
18-
# a symbolic link to libudev.so.1. See issues 145
19-
# and 105 in the CEFPython Issue Tracker.
20-
# -- Sequence of these dirs does matter, on first
21-
# -- match searching should be stopped.
22-
declare -a libdirs=("/lib/x86_64-linux-gnu" "/usr/lib64"
23-
"/lib/i386-linux-gnu" "/usr/lib")
24-
for libdir in "${libdirs[@]}"
25-
do
26-
libudev_1="$libdir/libudev.so.1"
27-
libudev_0="$libdir/libudev.so.0"
28-
if [ -f $libudev_1 ] && ! [ -f $libudev_0 ];
29-
then
30-
echo "ln -sf $libudev_1 $libudev_0"
31-
ln -sf "$libudev_1" "$libudev_0"
32-
break
33-
fi
34-
done
35-
3617
# This creates symbolic links in /usr/lib/pymodules/.../cefpython3/
3718
# for all the files. This is no more required, as in make-deb.py
3819
# we're modify the deb archive and moving the /usr/lib/pyshared/.../

src/linux/installer/deps.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
gconf-service
22
libasound2 (>= 1.0.23)
33
libatk1.0-0 (>= 1.12.4)
4-
libc6 (>= 2.11)
4+
libc6 (>= 2.12)
55
libcairo2 (>= 1.6.0)
6-
libcap2 (>= 2.10)
76
libcups2 (>= 1.4.0)
87
libdbus-1-3 (>= 1.2.14)
98
libexpat1 (>= 1.95.8)
109
libfontconfig1 (>= 2.8.0)
1110
libfreetype6 (>= 2.3.9)
1211
libgcc1 (>= 1:4.1.1)
1312
libgconf-2-4 (>= 2.31.1)
14-
libgcrypt11 (>= 1.4.5)
1513
libgdk-pixbuf2.0-0 (>= 2.22.0)
16-
libglib2.0-0 (>= 2.18.0)
14+
libglib2.0-0 (>= 2.26.0)
1715
libgtk2.0-0 (>= 2.24.0)
1816
libnspr4 (>= 1.8.0.10)
19-
libnss3 (>= 3.14.3)
20-
libpango1.0-0 (>= 1.22.0)
17+
libnss3 (>= 3.12.4)
18+
libpango1.0-0 (>= 1.14.0)
2119
libstdc++6 (>= 4.6)
2220
libx11-6 (>= 2:1.4.99.1)
2321
libxcomposite1 (>= 1:0.3-1)
22+
libxcursor1 (>> 1.1.2)
2423
libxdamage1 (>= 1:1.1)
2524
libxext6
2625
libxfixes3
2726
libxi6 (>= 2:1.2.99.4)
27+
libxrandr2 (>= 2:1.2.99.2)
2828
libxrender1
2929
libxss1
3030
libxtst6

src/linux/installer/find-deps.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def get_branch():
5959
return branch
6060

6161
def get_chromium_revision(branch):
62+
# TODO: revision not needed anymore, see new GIT link in get_chrome_deps()
6263
url = "http://src.chromium.org/viewvc" \
6364
"/chrome/branches/%s/src/chrome/VERSION" % branch
6465
contents = fetch_url(url)
@@ -70,6 +71,8 @@ def get_chromium_revision(branch):
7071
return revision
7172

7273
def get_chrome_deps(revision):
74+
# TODO: new GIT link: https://chromium.googlesource.com/chromium ..
75+
# /src/+/51.0.2704.104/chrome/installer/linux/debian/expected_deps_x64
7376
# Currently works only with SVN up to Chrome revision 293233.
7477
base_url = "http://src.chromium.org/svn/trunk/src" \
7578
"/chrome/installer/linux/debian"
@@ -162,26 +165,14 @@ def package_exists(package):
162165
def get_final_deps(chrome_deps, cef_deps):
163166
final_deps = chrome_deps
164167
chrome_deps_names = []
165-
chrome_libudev0_dep = ""
166168
for chrome_dep in chrome_deps:
167169
chrome_dep_name = get_chrome_dep_name(chrome_dep)
168170
chrome_deps_names.append(chrome_dep_name)
169-
if chrome_dep_name == "libudev0":
170-
chrome_libudev0_dep = chrome_dep
171171
for cef_dep in cef_deps:
172172
if cef_dep not in chrome_deps_names:
173173
final_deps.append(cef_dep)
174174
log("Found %d CEF deps that were not listed in Chrome deps" % \
175175
(len(final_deps)-len(chrome_deps)) )
176-
# See Issue 145. libudev.so.0 may be missing and postinstall
177-
# script creates a symlink. Not sure how Google Chrome can
178-
# have libudev0 in deps and deb package can install fine.
179-
if chrome_libudev0_dep and chrome_libudev0_dep in final_deps:
180-
log("Removing '%s' from final deps (Issue 145)" % chrome_libudev0_dep)
181-
final_deps.remove(chrome_libudev0_dep)
182-
if "libudev0" in final_deps:
183-
log("Removing 'libudev0' from final deps (Issue 145)")
184-
final_deps.remove("libudev0")
185176
log("Found %d final deps:" % len(final_deps))
186177
print("-" * 80)
187178
print("\n".join(final_deps))

src/linux/installer/setup.py.template

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,7 @@ def post_install():
2020
""" Post install tasks """
2121
print("[setup.py] post_install()")
2222

23-
# Check if libudev.so.0 exists and if not, create
24-
# a symbolic link to libudev.so.1. See issues 145
25-
# and 105 in the CEFPython Issue Tracker.
26-
# -- Sequence of these dirs does matter, on first
27-
# -- match searching should be stopped.
28-
libdirs = ["/lib/x86_64-linux-gnu", "/usr/lib64",
29-
"/lib/i386-linux-gnu", "/usr/lib"]
30-
for libdir in libdirs:
31-
if os.path.exists(libdir+"/libudev.so.1") \
32-
and not os.path.exists(libdir+"/libudev.so.0"):
33-
libudev1 = "%s/libudev.so.1" % libdir
34-
libudev0 = "%s/libudev.so.0" % libdir
35-
print("[setup.py] ln -sf %s %s" % (libudev1, libudev0))
36-
subprocess.call("ln -sf %s %s" % (libudev1, libudev0), shell=True)
37-
break
38-
39-
# Find package directory.
23+
# Find package directory.
4024
# Do not import from local cefpython3/ directory.
4125
del sys.path[0]
4226
sys.path.append('')

0 commit comments

Comments
 (0)