Skip to content

Commit ad58d51

Browse files
committed
installpanda: set proper permissions on includes/man pages
Fixes: panda3d#159
1 parent 34731cd commit ad58d51

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

makepanda/installpanda.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,14 @@ def InstallPanda(destdir="", prefix="/usr", outputdir="built", libdir=GetLibDir(
233233
DeleteBuildFiles(destdir+prefix+"/include/panda3d")
234234
DeleteEmptyDirs(destdir+prefix+"/include/panda3d")
235235

236+
# Change permissions on include directory.
237+
os.chmod(destdir + prefix + "/include", 0o755)
238+
for root, dirs, files in os.walk(destdir + prefix + "/include"):
239+
for basename in dirs:
240+
os.chmod(os.path.join(root, basename), 0o755)
241+
for basename in files:
242+
os.chmod(os.path.join(root, basename), 0o644)
243+
236244
# rpmlint doesn't like this file, for some reason.
237245
if (os.path.isfile(destdir+prefix+"/share/panda3d/direct/leveleditor/copyfiles.pl")):
238246
os.remove(destdir+prefix+"/share/panda3d/direct/leveleditor/copyfiles.pl")

makepanda/makepanda.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6654,8 +6654,8 @@ def MakeInstallerLinux():
66546654
else:
66556655
InstallPanda(destdir="targetroot", prefix="/usr", outputdir=GetOutputDir(), libdir=lib_dir)
66566656
oscmd("chmod -R 755 targetroot/usr/share/panda3d")
6657-
oscmd("mkdir -p targetroot/usr/share/man/man1")
6658-
oscmd("cp doc/man/*.1 targetroot/usr/share/man/man1/")
6657+
oscmd("mkdir -m 0755 -p targetroot/usr/share/man/man1")
6658+
oscmd("install -m 0644 doc/man/*.1 targetroot/usr/share/man/man1/")
66596659

66606660
oscmd("dpkg --print-architecture > "+GetOutputDir()+"/tmp/architecture.txt")
66616661
pkg_arch = ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip()
@@ -6815,8 +6815,8 @@ def MakeInstallerOSX():
68156815
# Trailing newline is important, works around a bug in OSX
68166816
WriteFile("dstroot/tools/etc/paths.d/Panda3D", "/Developer/Panda3D/bin\n")
68176817

6818-
oscmd("mkdir -p dstroot/tools/usr/local/share/man/man1")
6819-
oscmd("cp doc/man/*.1 dstroot/tools/usr/local/share/man/man1/")
6818+
oscmd("mkdir -m 0755 -p dstroot/tools/usr/local/share/man/man1")
6819+
oscmd("install -m 0644 doc/man/*.1 dstroot/tools/usr/local/share/man/man1/")
68206820

68216821
for base in os.listdir(GetOutputDir()+"/bin"):
68226822
binname = "dstroot/tools/Developer/Panda3D/bin/" + base

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy