X7ROOT File Manager
Current Path:
/usr/lib/rpm
usr
/
lib
/
rpm
/
📁
..
📄
appdata.prov
(333 B)
📄
brp-compress
(1.41 KB)
📄
brp-java-gcjcompile
(1.38 KB)
📄
brp-python-bytecompile
(2.96 KB)
📄
brp-python-hardlink
(658 B)
📄
brp-strip
(509 B)
📄
brp-strip-comment-note
(741 B)
📄
brp-strip-shared
(706 B)
📄
brp-strip-static-archive
(411 B)
📄
check-buildroot
(1.21 KB)
📄
check-files
(1.02 KB)
📄
check-prereqs
(418 B)
📄
check-rpaths
(1.01 KB)
📄
check-rpaths-worker
(4.93 KB)
📄
config.guess
(44.24 KB)
📄
config.sub
(34.62 KB)
📄
debugedit
(33.01 KB)
📄
desktop-file.prov
(602 B)
📄
elfdeps
(15.31 KB)
📁
fileattrs
📄
find-debuginfo.sh
(14.42 KB)
📄
find-lang.sh
(5.77 KB)
📄
find-provides
(1.52 KB)
📄
find-requires
(3.43 KB)
📄
fontconfig.prov
(489 B)
📄
gstreamer1.prov
(954 B)
📄
javadoc.req
(76 B)
📄
kabi.sh
(428 B)
📄
libtooldeps.sh
(718 B)
📄
macros
(37.33 KB)
📁
macros.d
📄
macros.perl
(473 B)
📄
macros.php
(192 B)
📄
macros.python
(906 B)
📄
maven.prov
(3.67 KB)
📄
maven.req
(7.75 KB)
📄
mkinstalldirs
(3.41 KB)
📄
mono-find-provides
(1.08 KB)
📄
mono-find-requires
(1.87 KB)
📄
ocaml-find-provides.sh
(1.62 KB)
📄
ocaml-find-requires.sh
(2.08 KB)
📄
osgi.prov
(3.51 KB)
📄
osgi.req
(3.79 KB)
📄
osgideps.pl
(10.33 KB)
📄
perl.prov
(5.72 KB)
📄
perl.req
(11.48 KB)
📄
perldeps.pl
(32.13 KB)
📄
pkgconfigdeps.sh
(1.25 KB)
📁
platform
📄
postscriptdriver.prov
(7.08 KB)
📄
pythondeps.sh
(875 B)
📁
redhat
📄
rpm.daily
(296 B)
📄
rpm.log
(61 B)
📄
rpm.supp
(688 B)
📄
rpm2cpio.sh
(1.3 KB)
📄
rpmdb_dump
(15.33 KB)
📄
rpmdb_load
(27.51 KB)
📄
rpmdb_loadcvt
(1.43 KB)
📄
rpmdb_recover
(11.33 KB)
📄
rpmdb_stat
(15.26 KB)
📄
rpmdb_upgrade
(11.23 KB)
📄
rpmdb_verify
(11.25 KB)
📄
rpmdeps
(11.52 KB)
📄
rpmpopt-4.11.3
(9.51 KB)
📄
rpmrc
(15.01 KB)
📄
script.req
(322 B)
📄
sepdebugcrcfix
(15.24 KB)
📄
tcl.req
(2.02 KB)
📄
tgpg
(929 B)
Editing: brp-python-bytecompile
#!/bin/bash errors_terminate=$2 # If using normal root, avoid changing anything. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi # Figure out how deep we need to descend. We could pick an insanely high # number and hope it's enough, but somewhere, somebody's sure to run into it. depth=`(find "$RPM_BUILD_ROOT" -type f -name "*.py" -print0 ; echo /) | \ xargs -0 -n 1 dirname | sed 's,[^/],,g' | sort -u | tail -n 1 | wc -c` if [ -z "$depth" -o "$depth" -le "1" ]; then exit 0 fi # .pyc/.pyo files embed a "magic" value, identifying the ABI version of Python # bytecode that they are for. # # The files below RPM_BUILD_ROOT could be targeting multiple versions of # python (e.g. a single build that emits several subpackages e.g. a # python26-foo subpackage, a python31-foo subpackage etc) # # Support this by assuming that below each /usr/lib/python$VERSION/, all # .pyc/.pyo files are to be compiled for /usr/bin/python$VERSION. # # For example, below /usr/lib/python2.6/, we're targeting /usr/bin/python2.6 # and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1 shopt -s nullglob for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]$"`; do python_binary=/usr/bin/$(basename $python_libdir) real_libdir=${python_libdir/$RPM_BUILD_ROOT/} echo "Bytecompiling .py files below $python_libdir using $python_binary" # Generate normal (.pyc) byte-compiled files. $python_binary -c 'import compileall, sys; sys.exit(not compileall.compile_dir("'"$python_libdir"'", '"$depth"', "'"$real_libdir"'", force=1, quiet=1))' if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then # One or more of the files had a syntax error exit 1 fi # Generate optimized (.pyo) byte-compiled files. $python_binary -O -c 'import compileall, sys; sys.exit(not compileall.compile_dir("'"$python_libdir"'", '"$depth"', "'"$real_libdir"'", force=1, quiet=1))' if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then # One or more of the files had a syntax error exit 1 fi done # If we don't have a python interpreter, avoid changing anything. default_python=${1:-/usr/bin/python} if [ ! -x "$default_python" ]; then exit 0 fi # Handle other locations in the filesystem using the default python # implementation: # Generate normal (.pyc) byte-compiled files. $default_python -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]"'"), quiet=1))' if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then # One or more of the files had a syntax error exit 1 fi # Generate optimized (.pyo) byte-compiled files. $default_python -O -c 'import compileall, re, sys; sys.exit(not compileall.compile_dir("'"$RPM_BUILD_ROOT"'", '"$depth"', "/", 1, re.compile(r"'"/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]"'"), quiet=1))' > /dev/null if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then # One or more of the files had a syntax error exit 1 fi exit 0
Upload File
Create Folder