Skip to content

Commit 5da157d

Browse files
committed
Temp fix to avoid sudo
1 parent 4f16ee4 commit 5da157d

File tree

1 file changed

+1
-51
lines changed

1 file changed

+1
-51
lines changed

setup.py

+1-51
Original file line numberDiff line numberDiff line change
@@ -301,57 +301,7 @@ def install():
301301
RWS.
302302
303303
"""
304-
# We set permissions for each manually installed files, so we want
305-
# max liberty to change them.
306-
old_umask = os.umask(0000)
307-
308-
print("creating user and group cmsuser.")
309-
os.system("useradd cmsuser -c 'CMS default user' -M -r -s /bin/false -U")
310-
cmsuser = pwd.getpwnam("cmsuser")
311-
root = pwd.getpwnam("root")
312-
cmsuser_grp = grp.getgrnam("cmsuser")
313-
314-
print("copying isolate to /usr/local/bin/.")
315-
makedir(os.path.join(USR_ROOT, "bin"), root, 0755)
316-
copyfile(os.path.join(".", "isolate", "isolate"),
317-
os.path.join(USR_ROOT, "bin", "isolate"),
318-
root, 04750, group=cmsuser_grp)
319-
320-
print("copying localization files:")
321-
for locale in glob(os.path.join("cms", "server", "po", "*.po")):
322-
country_code = re.search(r"/([^/]*)\.po", locale).groups()[0]
323-
print(" %s" % country_code)
324-
path = os.path.join("cms", "server", "mo", country_code, "LC_MESSAGES")
325-
dest_path = os.path.join(USR_ROOT, "share", "locale",
326-
country_code, "LC_MESSAGES")
327-
makedir(dest_path, root, 0755)
328-
copyfile(os.path.join(path, "cms.mo"),
329-
os.path.join(dest_path, "cms.mo"),
330-
root, 0644)
331-
332-
print("creating directories.")
333-
dirs = [os.path.join(VAR_ROOT, "log"),
334-
os.path.join(VAR_ROOT, "cache"),
335-
os.path.join(VAR_ROOT, "lib"),
336-
os.path.join(VAR_ROOT, "run"),
337-
os.path.join(USR_ROOT, "include"),
338-
os.path.join(USR_ROOT, "share")]
339-
for _dir in dirs:
340-
# Skip if destination is a symlink
341-
if os.path.islink(os.path.join(_dir, "cms")):
342-
continue
343-
makedir(_dir, root, 0755)
344-
_dir = os.path.join(_dir, "cms")
345-
makedir(_dir, cmsuser, 0770)
346-
347-
print("copying Polygon testlib:")
348-
path = os.path.join("cmscontrib", "polygon", "testlib.h")
349-
dest_path = os.path.join(USR_ROOT, "include", "cms", "testlib.h")
350-
copyfile(path, dest_path, root, 0644)
351-
352-
os.umask(old_umask)
353-
print("done.")
354-
304+
pass
355305

356306
if __name__ == "__main__":
357307
do_setup()

0 commit comments

Comments
 (0)