Файловый менеджер - Редактировать - /home/u368772545/domains/remushop.com/public_html/static/img/logo/rpm.zip
Ðазад
PK �L�Z��D �D rpmrcnu �[��� #/*! \page config_rpmrc Default configuration: /usr/lib/rpm/rpmrc # \verbatim # # This is a global RPM configuration file. All changes made here will # be lost when the rpm package is upgraded. Any per-system configuration # should be added to /etc/rpmrc, while per-user configuration should # be added to ~/.rpmrc. # ############################################################# # Values for RPM_OPT_FLAGS for various platforms # "fat" binary with both archs, for Darwin optflags: fat -O2 -g -arch i386 -arch ppc optflags: i386 -O2 -g -march=i386 -mtune=i686 optflags: i486 -O2 -g -march=i486 optflags: i586 -O2 -g -march=i586 optflags: i686 -O2 -g -march=i686 optflags: pentium3 -O2 -g -march=pentium3 optflags: pentium4 -O2 -g -march=pentium4 optflags: athlon -O2 -g -march=athlon optflags: geode -Os -g -m32 -march=geode optflags: ia64 -O2 -g optflags: x86_64 -O2 -g optflags: amd64 -O2 -g optflags: ia32e -O2 -g optflags: alpha -O2 -g -mieee optflags: alphaev5 -O2 -g -mieee -mtune=ev5 optflags: alphaev56 -O2 -g -mieee -mtune=ev56 optflags: alphapca56 -O2 -g -mieee -mtune=pca56 optflags: alphaev6 -O2 -g -mieee -mtune=ev6 optflags: alphaev67 -O2 -g -mieee -mtune=ev67 optflags: sparc -O2 -g -m32 -mtune=ultrasparc optflags: sparcv8 -O2 -g -m32 -mtune=ultrasparc -mv8 optflags: sparcv9 -O2 -g -m32 -mtune=ultrasparc optflags: sparcv9v -O2 -g -m32 -mtune=niagara optflags: sparc64 -O2 -g -m64 -mtune=ultrasparc optflags: sparc64v -O2 -g -m64 -mtune=niagara optflags: m68k -O2 -g -fomit-frame-pointer optflags: ppc -O2 -g optflags: ppc8260 -O2 -g optflags: ppc8560 -O2 -g optflags: ppc32dy4 -O2 -g optflags: ppciseries -O2 -g optflags: ppcpseries -O2 -g optflags: ppc64 -O2 -g optflags: ppc64le -O2 -g optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g optflags: parisc -O2 -g -mpa-risc-1-0 optflags: hppa1.0 -O2 -g -mpa-risc-1-0 optflags: hppa1.1 -O2 -g -mpa-risc-1-0 optflags: hppa1.2 -O2 -g -mpa-risc-1-0 optflags: hppa2.0 -O2 -g -mpa-risc-1-0 optflags: mips -O2 -g optflags: mipsel -O2 -g optflags: mips64 -O2 -g optflags: mips64el -O2 -g optflags: mipsr6 -O2 -g optflags: mipsr6el -O2 -g optflags: mips64r6 -O2 -g optflags: mips64r6el -O2 -g optflags: armv3l -O2 -g -march=armv3 optflags: armv4b -O2 -g -march=armv4 optflags: armv4l -O2 -g -march=armv4 optflags: armv4tl -O2 -g -march=armv4t optflags: armv5tl -O2 -g -march=armv5t optflags: armv5tel -O2 -g -march=armv5te optflags: armv5tejl -O2 -g -march=armv5te optflags: armv6l -O2 -g -march=armv6 optflags: armv6hl -O2 -g -march=armv6 -mfloat-abi=hard -mfpu=vfp optflags: armv7l -O2 -g -march=armv7 optflags: armv7hl -O2 -g -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 optflags: armv7hnl -O2 -g -march=armv7-a -mfloat-abi=hard -mfpu=neon optflags: armv8l -O2 -g -march=armv8-a optflags: armv8hl -O2 -g -march=armv8-a -mfloat-abi=hard -mfpu=vfpv4 optflags: m68k -O2 -g -fomit-frame-pointer optflags: atarist -O2 -g -fomit-frame-pointer optflags: atariste -O2 -g -fomit-frame-pointer optflags: ataritt -O2 -g -fomit-frame-pointer optflags: falcon -O2 -g -fomit-frame-pointer optflags: atariclone -O2 -g -fomit-frame-pointer optflags: milan -O2 -g -fomit-frame-pointer optflags: hades -O2 -g -fomit-frame-pointer optflags: s390 -O2 -g optflags: s390x -O2 -g optflags: sh3 -O2 -g optflags: sh4 -O2 -g -mieee optflags: sh4a -O2 -g -mieee optflags: aarch64 -O2 -g optflags: riscv64 -O2 -g ############################################################# # Architecture colors archcolor: noarch 0 archcolor: i386 1 archcolor: alpha 2 archcolor: sparc 1 archcolor: sparc64 2 archcolor: sparcv9 2 archcolor: ppc 1 archcolor: ppc64 2 archcolor: ppc64le 2 archcolor: armv3l 1 archcolor: armv4b 1 archcolor: armv4l 1 archcolor: armv4tl 1 archcolor: armv5tel 1 archcolor: armv5tejl 1 archcolor: armv6l 1 archcolor: armv7l 1 archcolor: armv8l 1 archcolor: mips 1 archcolor: mipsel 1 archcolor: mips64 2 archcolor: mips64el 2 archcolor: mipsr6 1 archcolor: mipsr6el 1 archcolor: mips64r6 2 archcolor: mips64r6el 2 archcolor: m68k 1 archcolor: m68kmint 1 archcolor: s390 1 archcolor: s390x 2 archcolor: ia64 2 archcolor: x86_64 2 archcolor: sh3 1 archcolor: sh4 1 archcolor: aarch64 2 archcolor: riscv64 2 ############################################################# # Canonical arch names and numbers arch_canon: athlon: athlon 1 arch_canon: geode: geode 1 arch_canon: pentium4: pentium4 1 arch_canon: pentium3: pentium3 1 arch_canon: i686: i686 1 arch_canon: i586: i586 1 arch_canon: i486: i486 1 arch_canon: i386: i386 1 arch_canon: x86_64: x86_64 1 arch_canon: amd64: amd64 1 arch_canon: ia32e: ia32e 1 arch_canon: em64t: em64t 1 arch_canon: alpha: alpha 2 arch_canon: alphaev5: alphaev5 2 arch_canon: alphaev56: alphaev56 2 arch_canon: alphapca56:alphapca56 2 arch_canon: alphaev6: alphaev6 2 arch_canon: alphaev67: alphaev67 2 # We always want to prefer sparc to sparc64. arch_canon: sparc64:sparc64 2 arch_canon: sun4u: sparc64 2 arch_canon: sparc64v: sparc64v 2 arch_canon: sparc: sparc 3 arch_canon: sun4: sparc 3 arch_canon: sun4m: sparc 3 arch_canon: sun4c: sparc 3 arch_canon: sun4d: sparc 3 arch_canon: sparcv8: sparcv8 3 arch_canon: sparcv9: sparcv9 3 arch_canon: sparcv9v: sparcv9v 3 # This is really a place holder for MIPS. arch_canon: mips: mips 4 arch_canon: mipsel: mipsel 4 arch_canon: ppc: ppc 5 arch_canon: ppc8260: ppc8260 5 arch_canon: ppc8560: ppc8560 5 arch_canon: ppc32dy4: ppc32dy4 5 arch_canon: ppciseries: ppciseries 5 arch_canon: ppcpseries: ppcpseries 5 arch_canon: m68k: m68k 6 arch_canon: IP: sgi 7 arch_canon: rs6000: rs6000 8 arch_canon: ia64: ia64 9 arch_canon: mips64: mips64 11 arch_canon: mips64el: mips64el 11 arch_canon: armv3l: armv3l 12 arch_canon: armv4b: armv4b 12 arch_canon: armv4l: armv4l 12 arch_canon: armv5tl: armv5tl 12 arch_canon: armv5tel: armv5tel 12 arch_canon: armv5tejl: armv5tejl 12 arch_canon: armv6l: armv6l 12 arch_canon: armv6hl: armv6hl 12 arch_canon: armv7l: armv7l 12 arch_canon: armv7hl: armv7hl 12 arch_canon: armv7hnl: armv7hnl 12 arch_canon: armv8l: armv8l 12 arch_canon: armv8hl: armv8hl 12 arch_canon: m68kmint: m68kmint 13 arch_canon: atarist: m68kmint 13 arch_canon: atariste: m68kmint 13 arch_canon: ataritt: m68kmint 13 arch_canon: falcon: m68kmint 13 arch_canon: atariclone: m68kmint 13 arch_canon: milan: m68kmint 13 arch_canon: hades: m68kmint 13 arch_canon: s390: s390 14 arch_canon: i370: i370 14 arch_canon: s390x: s390x 15 arch_canon: ppc64: ppc64 16 arch_canon: ppc64le: ppc64le 16 arch_canon: ppc64pseries: ppc64pseries 16 arch_canon: ppc64iseries: ppc64iseries 16 arch_canon: ppc64p7: ppc64p7 16 arch_canon: sh: sh 17 arch_canon: sh3: sh3 17 arch_canon: sh4: sh4 17 arch_canon: sh4a: sh4a 17 arch_canon: xtensa: xtensa 18 arch_canon: aarch64: aarch64 19 arch_canon: mipsr6: mipsr6 20 arch_canon: mipsr6el: mipsr6el 20 arch_canon: mips64r6: mips64r6 21 arch_canon: mips64r6el: mips64r6el 21 arch_canon: riscv: riscv64 22 arch_canon: riscv64: riscv64 22 ############################################################# # Canonical OS names and numbers os_canon: Linux: Linux 1 os_canon: IRIX: Irix 2 # This is wrong os_canon: SunOS5: solaris 3 os_canon: SunOS4: SunOS 4 os_canon: AmigaOS: AmigaOS 5 os_canon: AIX: AIX 5 os_canon: HP-UX: hpux10 6 os_canon: OSF1: osf1 7 os_canon: osf4.0: osf1 7 os_canon: osf3.2: osf1 7 os_canon: FreeBSD: FreeBSD 8 os_canon: SCO_SV: SCO_SV3.2v5.0.2 9 os_canon: IRIX64: Irix64 10 os_canon: NEXTSTEP: NextStep 11 os_canon: BSD_OS: bsdi 12 os_canon: machten: machten 13 os_canon: CYGWIN32_NT: cygwin32 14 os_canon: CYGWIN32_95: cygwin32 15 os_canon: UNIX_SV: MP_RAS: 16 os_canon: MiNT: FreeMiNT 17 os_canon: OS/390: OS/390 18 os_canon: VM/ESA: VM/ESA 19 os_canon: Linux/390: OS/390 20 os_canon: Linux/ESA: VM/ESA 20 os_canon: Darwin: darwin 21 os_canon: MacOSX: macosx 21 ############################################################# # For a given uname().machine, the default build arch buildarchtranslate: osfmach3_i686: i386 buildarchtranslate: osfmach3_i586: i386 buildarchtranslate: osfmach3_i486: i386 buildarchtranslate: osfmach3_i386: i386 buildarchtranslate: athlon: i386 buildarchtranslate: geode: i386 buildarchtranslate: pentium4: i386 buildarchtranslate: pentium3: i386 buildarchtranslate: i686: i386 buildarchtranslate: i586: i386 buildarchtranslate: i486: i386 buildarchtranslate: i386: i386 buildarchtranslate: alphaev5: alpha buildarchtranslate: alphaev56: alpha buildarchtranslate: alphapca56: alpha buildarchtranslate: alphaev6: alpha buildarchtranslate: alphaev67: alpha buildarchtranslate: sun4c: sparc buildarchtranslate: sun4d: sparc buildarchtranslate: sun4m: sparc buildarchtranslate: sparcv8: sparc buildarchtranslate: sparcv9: sparc buildarchtranslate: sparcv9v: sparc buildarchtranslate: sun4u: sparc64 buildarchtranslate: sparc64v: sparc64 buildarchtranslate: osfmach3_ppc: ppc buildarchtranslate: powerpc: ppc buildarchtranslate: powerppc: ppc buildarchtranslate: ppc8260: ppc buildarchtranslate: ppc8560: ppc buildarchtranslate: ppc32dy4: ppc buildarchtranslate: ppciseries: ppc buildarchtranslate: ppcpseries: ppc buildarchtranslate: ppc64iseries: ppc64 buildarchtranslate: ppc64pseries: ppc64 buildarchtranslate: ppc64p7: ppc64 buildarchtranslate: ppc64le: ppc64le buildarchtranslate: armv3l: armv3l buildarchtranslate: armv4b: armv4b buildarchtranslate: armv4l: armv4l buildarchtranslate: armv4tl: armv4tl buildarchtranslate: armv5tl: armv5tl buildarchtranslate: armv5tel: armv5tel buildarchtranslate: armv5tejl: armv5tejl buildarchtranslate: armv6l: armv6l buildarchtranslate: armv6hl: armv6hl buildarchtranslate: armv7l: armv7l buildarchtranslate: armv7hl: armv7hl buildarchtranslate: armv7hnl: armv7hnl buildarchtranslate: armv8l: armv8l buildarchtranslate: armv8hl: armv8hnl buildarchtranslate: mips: mips buildarchtranslate: mipsel: mipsel buildarchtranslate: mips64: mips64 buildarchtranslate: mips64el: mips64el buildarchtranslate: mipsr6: mipsr6 buildarchtranslate: mipsr6el: mipsr6el buildarchtranslate: mips64r6: mips64r6 buildarchtranslate: mips64r6el: mips64r6el buildarchtranslate: m68k: m68k buildarchtranslate: atarist: m68kmint buildarchtranslate: atariste: m68kmint buildarchtranslate: ataritt: m68kmint buildarchtranslate: falcon: m68kmint buildarchtranslate: atariclone: m68kmint buildarchtranslate: milan: m68kmint buildarchtranslate: hades: m68kmint buildarchtranslate: s390: s390 buildarchtranslate: s390x: s390x buildarchtranslate: ia64: ia64 buildarchtranslate: x86_64: x86_64 buildarchtranslate: amd64: x86_64 buildarchtranslate: ia32e: x86_64 buildarchtranslate: sh3: sh3 buildarchtranslate: sh4: sh4 buildarchtranslate: sh4a: sh4 buildarchtranslate: aarch64: aarch64 buildarchtranslate: riscv: riscv64 buildarchtranslate: riscv64: riscv64 ############################################################# # Architecture compatibility arch_compat: alphaev67: alphaev6 arch_compat: alphaev6: alphapca56 arch_compat: alphapca56: alphaev56 arch_compat: alphaev56: alphaev5 arch_compat: alphaev5: alpha arch_compat: alpha: axp noarch arch_compat: athlon: i686 arch_compat: geode: i686 arch_compat: pentium4: pentium3 arch_compat: pentium3: i686 arch_compat: i686: i586 arch_compat: i586: i486 arch_compat: i486: i386 arch_compat: i386: noarch fat arch_compat: osfmach3_i686: i686 osfmach3_i586 arch_compat: osfmach3_i586: i586 osfmach3_i486 arch_compat: osfmach3_i486: i486 osfmach3_i386 arch_compat: osfmach3_i386: i486 arch_compat: osfmach3_ppc: ppc arch_compat: powerpc: ppc arch_compat: powerppc: ppc arch_compat: ppc8260: ppc arch_compat: ppc8560: ppc arch_compat: ppc32dy4: ppc arch_compat: ppciseries: ppc arch_compat: ppcpseries: ppc arch_compat: ppc64: ppc arch_compat: ppc: rs6000 arch_compat: rs6000: noarch fat arch_compat: ppc64pseries: ppc64 arch_compat: ppc64iseries: ppc64 arch_compat: ppc64p7: ppc64 arch_compat: ppc64le: noarch fat arch_compat: sun4c: sparc arch_compat: sun4d: sparc arch_compat: sun4m: sparc arch_compat: sun4u: sparc64 arch_compat: sparc64v: sparc64 arch_compat: sparc64: sparcv9 arch_compat: sparcv9v: sparcv9 arch_compat: sparcv9: sparcv8 arch_compat: sparcv8: sparc arch_compat: sparc: noarch arch_compat: mips: noarch arch_compat: mipsel: noarch arch_compat: mips64: mips arch_compat: mips64el: mipsel arch_compat: mipsr6: noarch arch_compat: mipsr6el: noarch arch_compat: mips64r6: mipsr6 arch_compat: mips64r6el: mipsr6el arch_compat: hppa2.0: hppa1.2 arch_compat: hppa1.2: hppa1.1 arch_compat: hppa1.1: hppa1.0 arch_compat: hppa1.0: parisc arch_compat: parisc: noarch arch_compat: armv4b: noarch arch_compat: armv8l: armv7l arch_compat: armv7l: armv6l arch_compat: armv6l: armv5tejl arch_compat: armv5tejl: armv5tel arch_compat: armv5tel: armv5tl arch_compat: armv5tl: armv4tl arch_compat: armv4tl: armv4l arch_compat: armv4l: armv3l arch_compat: armv3l: noarch arch_compat: armv8hl: armv7hl arch_compat: armv7hnl: armv7hl arch_compat: armv7hl: armv6hl arch_compat: armv6hl: noarch arch_compat: m68k: noarch arch_compat: atarist: m68kmint noarch arch_compat: atariste: m68kmint noarch arch_compat: ataritt: m68kmint noarch arch_compat: falcon: m68kmint noarch arch_compat: atariclone: m68kmint noarch arch_compat: milan: m68kmint noarch arch_compat: hades: m68kmint noarch arch_compat: i370: noarch arch_compat: s390: noarch arch_compat: s390x: s390 noarch arch_compat: ia64: noarch arch_compat: x86_64: amd64 em64t athlon noarch arch_compat: amd64: x86_64 em64t athlon noarch arch_compat: ia32e: x86_64 em64t athlon noarch arch_compat: sh3: noarch arch_compat: sh4: noarch arch_compat: sh4a: sh4 arch_compat: aarch64: noarch arch_compat: riscv: noarch arch_compat: riscv64: noarch os_compat: IRIX64: IRIX os_compat: solaris2.7: solaris2.3 solaris2.4 solaris2.5 solaris2.6 os_compat: solaris2.6: solaris2.3 solaris2.4 solaris2.5 os_compat: solaris2.5: solaris2.3 solaris2.4 os_compat: solaris2.4: solaris2.3 os_compat: hpux11.00: hpux10.30 os_compat: hpux10.30: hpux10.20 os_compat: hpux10.20: hpux10.10 os_compat: hpux10.10: hpux10.01 os_compat: hpux10.01: hpux10.00 os_compat: hpux10.00: hpux9.07 os_compat: hpux9.07: hpux9.05 os_compat: hpux9.05: hpux9.04 os_compat: osf4.0: osf3.2 osf1 os_compat: ncr-sysv4.3: ncr-sysv4.2 os_compat: FreeMiNT: mint MiNT TOS os_compat: MiNT: FreeMiNT mint TOS os_compat: mint: FreeMiNT MiNT TOS os_compat: TOS: FreeMiNT MiNT mint os_compat: BSD_OS: bsdi os_compat: bsdi4.0: bsdi os_compat: Darwin: MacOSX buildarch_compat: ia64: noarch buildarch_compat: aarch64: noarch buildarch_compat: riscv: noarch buildarch_compat: riscv64: noarch buildarch_compat: athlon: i686 buildarch_compat: geode: i586 buildarch_compat: pentium4: pentium3 buildarch_compat: pentium3: i686 buildarch_compat: i686: i586 buildarch_compat: i586: i486 buildarch_compat: i486: i386 buildarch_compat: i386: noarch fat buildarch_compat: sun4c: noarch buildarch_compat: sun4d: noarch buildarch_compat: sun4m: noarch buildarch_compat: sun4u: noarch buildarch_compat: sparc64v: sparc64 buildarch_compat: sparc64: sparcv9v buildarch_compat: sparcv9v: sparcv9 buildarch_compat: sparcv9: sparcv8 buildarch_compat: sparcv8: sparc buildarch_compat: sparc: noarch buildarch_compat: alphaev67: alphaev6 buildarch_compat: alphaev6: alphapca56 buildarch_compat: alphapca56: alphaev56 buildarch_compat: alphaev56: alphaev5 buildarch_compat: alphaev5: alpha buildarch_compat: alpha: noarch buildarch_compat: m68k: noarch buildarch_compat: ppc8260: noarch buildarch_compat: ppc8560: noarch buildarch_compat: ppc32dy4: noarch buildarch_compat: ppciseries: noarch buildarch_compat: ppcpseries: noarch buildarch_compat: ppc: noarch fat buildarch_compat: ppc64: noarch fat buildarch_compat: ppc64le: noarch fat buildarch_compat: ppc64pseries: ppc64 buildarch_compat: ppc64iseries: ppc64 buildarch_compat: ppc64p7: ppc64 buildarch_compat: mips: noarch buildarch_compat: mipsel: noarch buildarch_compat: mips64: noarch buildarch_compat: mips64el: noarch buildarch_compat: mipsr6: noarch buildarch_compat: mipsr6el: noarch buildarch_compat: mips64r6: noarch buildarch_compat: mips64r6el: noarch buildarch_compat: armv4b: noarch buildarch_compat: armv8l: armv7l buildarch_compat: armv7l: armv6l buildarch_compat: armv6l: armv5tejl buildarch_compat: armv5tejl: armv5tel armv5tl buildarch_compat: armv5tel: armv4tl armv5tl buildarch_compat: armv5tl: armv4tl buildarch_compat: armv4tl: armv4l buildarch_compat: armv4l: armv3l buildarch_compat: armv3l: noarch buildarch_compat: armv8hcnl: armv8hnl buildarch_compat: armv8hnl: armv8hl buildarch_compat: armv8hnl: armv7hnl buildarch_compat: armv8hl: armv7hl buildarch_compat: armv7hnl: armv7hl buildarch_compat: armv7hl: armv6hl buildarch_compat: armv6hl: noarch buildarch_compat: hppa2.0: hppa1.2 buildarch_compat: hppa1.2: hppa1.1 buildarch_compat: hppa1.1: hppa1.0 buildarch_compat: hppa1.0: parisc buildarch_compat: parisc: noarch buildarch_compat: atarist: m68kmint noarch buildarch_compat: atariste: m68kmint noarch buildarch_compat: ataritt: m68kmint noarch buildarch_compat: falcon: m68kmint noarch buildarch_compat: atariclone: m68kmint noarch buildarch_compat: milan: m68kmint noarch buildarch_compat: hades: m68kmint noarch buildarch_compat: s390: noarch buildarch_compat: s390x: noarch buildarch_compat: ia64: noarch buildarch_compat: x86_64: noarch buildarch_compat: amd64: x86_64 buildarch_compat: ia32e: x86_64 buildarch_compat: sh3: noarch buildarch_compat: sh4: noarch buildarch_compat: sh4a: sh4 # \endverbatim #*/ PK �L�Zd��o� � tgpgnu ȯ�� #!/usr/bin/sh for pkg in $* do if [ "$pkg" = "" ] || [ ! -e "$pkg" ]; then echo "no package supplied" 1>&2 exit 1 fi plaintext=`mktemp ${TMPDIR:-/tmp}/tgpg-$$.XXXXXX` detached=`mktemp ${TMPDIR:-/tmp}/tgpg-$$.XXXXXX` # --- Extract detached signature rpm -qp -vv --qf '%{siggpg:armor}' $pkg > $detached # --- Figger the offset of header+payload in the package leadsize=96 o=`expr $leadsize + 8` set `od -j $o -N 8 -t u1 $pkg` il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5` dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9` sigsize=`expr 8 + 16 \* $il + $dl` o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8` # --- Extract header+payload dd if=$pkg ibs=$o skip=1 2>/dev/null > $plaintext # --- Verify DSA signature using gpg gpg --batch -vv --debug 0xfc02 --verify $detached $plaintext # --- Clean up rm -f $detached $plaintext done PK �L�Z��>� � brp-boot-efi-timesnu ȯ�� #!/usr/bin/bash -eu # If using normal root, avoid changing anything. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi if [[ ! -d "$RPM_BUILD_ROOT//boot/efi" ]] ; then exit 0 fi update() { local path="$1" local ctime=$(stat -c "%Z" "${path}") # we always want to touch it once... if [[ $((${ctime} % 2)) -eq 0 ]] ; then let ++ctime fi while [[ $((${ctime} % 2)) -eq 1 ]] ; do let ++ctime touch -h -c -d "@${ctime}" "${path}" ctime=$(stat -c "%Z" "${path}") done } declare -a dirs dirs=() || : cd "$RPM_BUILD_ROOT" while IFS= read -r -d $'\0' f; do if [[ -d "${f}" ]] ; then dirs[${#dirs[@]}]="${f}" else update "${f}" fi done < <(find ./boot/efi/ -print0) # sort the directory list lexicographically, longest-first, so a parent dir's # updated mtime won't be clobbered by the child dir being updated, if some day # someone actually makes that matter. # # I don't think we actually have to do this on linux, but # $RPM_BUILD_ROOT//boot/efi/ isn't going to have but so many files on # it. let i=0 || : let j=1 while [[ ${i} -lt ${#dirs[@]} ]] && [[ ${j} -lt ${#dirs[@]} ]] ; do if [[ "${dirs[$i]}" < "${dirs[$j]}" ]] ; then tmp="${dirs[$i]}" dirs[$i]="${dirs[$j]}" dirs[$j]="${tmp}" else let ++j fi if [[ ${j} -ge ${#dirs[@]} ]] ; then let ++i let ++j fi done # and now just process them just like files. if [[ ${#dirs[@]} -gt 0 ]] ; then for dir in "${dirs[@]}" ; do update "${dir}" done fi PK �L�Z}�[� � cmake.provnu ȯ�� #!/usr/bin/python3 # -*- coding:utf-8 -*- # # Copyright (C) 2015 Daniel Vrátil <dvratil@redhat.com> # Copyright (C) 2017 Daniel Vrátil <dvratil@fedoraproject.org> # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Library General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # import sys import re import glob class CMakeParser: def __init__(self, filelist = None): if filelist == None: filelist = sys.stdin paths = map(lambda x: x.rstrip(), filelist.readlines()) for path in paths: modulePath, cmakeModule, lowercase = self.parseCmakeModuleConfig(path) if modulePath and cmakeModule: version = self.resolveCMakeModuleVersion(modulePath, cmakeModule, lowercase) if version: string = "cmake(" + cmakeModule + ") = " + version else: string = "cmake(" + cmakeModule + ")" if string == string.lower(): print(string) else: # Temporarily print both variants to satisfy requires # by the old version of this generator which made mistakes print(string) print(string.lower()) def parseCmakeModuleConfig(self, configFile): paths = configFile.rsplit("/", 3) modulePath = "%s/cmake/%s" % (paths[0], paths[2]) cfgFile = paths[3] if cfgFile.endswith("Config.cmake"): return (modulePath, cfgFile[0:-len("Config.cmake")], False) elif cfgFile.endswith("-config.cmake"): return (modulePath, cfgFile[0:-len("-config.cmake")], True) else: return (None, None, False) def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase): versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule) try: f = open(versionFile, 'r') except: return None for line in f: line = line.strip() # set(PACKAGE_VERSION <version>) version = re.match(r"^set[\ ]*\([\ ]*PACKAGE_VERSION[\ ]+[\"]*([0-9\.]+)[\"]*[\ ]*[.]*\)", line) if version: return version.groups(1)[0] return None if __name__ == "__main__": parser = CMakeParser() PK �L�Z���7) ) rpmdb_dumpnu ȯ�� #!/usr/bin/sh /usr/bin/rpmdb --exportdb PK �L�ZM��P/ P/ rpmpopt-4.16.1.3nu �[��� #/*! \page config_rpmpopt Default configuration: /usr/lib/rpm/rpmpopt-4.16.1.3 # \verbatim # # This file *should not be modified*. Local customizations # belong in /etc/popt, not here. This file will be replaced # whenever a new version of RPM is installed. # # Note: Not all popt aliases are documented. This is a decision on my # part as to which are the more important aliases. Feel free to clip # a copy of the alias/exec here and place in /etc/popt or ~/.popt with # your own words added. It's easier than arguing about how many options # fit on the head of an executable :-) # rpm alias --scripts --qf '\ %|PRETRANS?{pretrans scriptlet\ %|PRETRANSPROG?{ (using[ %{PRETRANSPROG}])}|:\n%{PRETRANS}\n}:\ {%|PRETRANSPROG?{pretrans program:[ %{PRETRANSPROG}]\n}|}|\ \ %|PREIN?{preinstall scriptlet\ %|PREINPROG?{ (using[ %{PREINPROG}])}|:\n%{PREIN}\n}:\ {%|PREINPROG?{preinstall program:[ %{PREINPROG}]\n}|}|\ \ %|POSTIN?{postinstall scriptlet\ %|POSTINPROG?{ (using[ %{POSTINPROG}])}|:\n%{POSTIN}\n}:\ {%|POSTINPROG?{postinstall program:[ %{POSTINPROG}]\n}|}|\ \ %|PREUN?{preuninstall scriptlet\ %|PREUNPROG?{ (using[ %{PREUNPROG}])}|:\n%{PREUN}\n}:\ {%|PREUNPROG?{preuninstall program:[ %{PREUNPROG}]\n}|}|\ \ %|POSTUN?{postuninstall scriptlet\ %|POSTUNPROG?{ (using[ %{POSTUNPROG}])}|:\n%{POSTUN}\n}:\ {%|POSTUNPROG?{postuninstall program:[ %{POSTUNPROG}]\n}|}|\ \ %|POSTTRANS?{posttrans scriptlet\ %|POSTTRANSPROG?{ (using[ %{POSTTRANSPROG}])}|:\n%{POSTTRANS}\n}:\ {%|POSTTRANSPROG?{posttrans program:[ %{POSTTRANSPROG}]\n}|}|\ \ %|VERIFYSCRIPT?{verify scriptlet\ %|VERIFYSCRIPTPROG?{ (using[ %{VERIFYSCRIPTPROG}])}|:\n%{VERIFYSCRIPT}\n}:\ {%|VERIFYSCRIPTPROG?{verify program:[ %{VERIFYSCRIPTPROG}]\n}|}|\ ' \ --POPTdesc=$"list install/erase scriptlets from package(s)" rpm alias --setperms -q --qf '[\[ -L %{FILENAMES:shescape} \] || \ \[ -n %{FILELINKTOS:shescape} \] || \ ( \[ $((%{FILEFLAGS} & 2#1001000)) != 0 \] && \[ ! -e %{FILENAMES:shescape} \] ) || \ chmod %7{FILEMODES:octal} %{FILENAMES:shescape}\n]' \ --pipe "grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | sh" \ --POPTdesc=$"set permissions of files in a package" rpm alias --setugids -q --qf \ '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape} %{FILEFLAGS}\n]' \ --pipe "(echo 'ch() { ( \[ $(($4 & 2#1001000)) != 0 \] && \[ ! -e \"$3\" \] ) || \ (chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\";) }'; \ grep '^ch '|grep -v \(none\))|sh" \ --POPTdesc=$"set user/group ownership of files in a package" rpm alias --setcaps -q --qf \ "[if \[ -f %{FILENAMES:shescape} -a ! -L %{FILENAMES:shescape} \]; then\n\ %|FILECAPS?{ if \[ -n %{FILECAPS:shescape} \]; then\n\ setcap %{FILECAPS:shescape} %{FILENAMES:shescape}\n\ el}:{ }|if \[ -n \"\$(getcap %{FILENAMES:shescape})\" \]; then\n\ setcap -r %{FILENAMES:shescape}\n\ fi\n\ fi\n]" \ --pipe "sh" \ --POPTdesc=$"set capabilities of files in a package" rpm alias --restore -q --qf \ '[ rpm --setugids %{NAME:shescape}; \ rpm --setperms %{NAME:shescape}; \ rpm --setcaps %{NAME:shescape}; \n]' --pipe "sh" \ --POPTdesc=$"restore file/directory permissions" rpm alias --conflicts --qf \ "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \ --POPTdesc=$"list capabilities this package conflicts with" rpm alias --obsoletes --qf \ "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \ --POPTdesc=$"list other packages removed by installing this package" rpm alias --provides --qf \ "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \ --POPTdesc=$"list capabilities that this package provides" rpm alias -P --provides rpm alias --requires --qf \ "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires rpm alias --recommends --qf \ "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \ --POPTdesc=$"list capabilities recommended by package(s)" rpm alias --suggests --qf \ "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \ --POPTdesc=$"list capabilities suggested by package(s)" rpm alias --supplements --qf \ "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \ --POPTdesc=$"list capabilities supplemented by package(s)" rpm alias --enhances --qf \ "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \ --POPTdesc=$"list capabilities enhanced by package(s)" rpm alias --info --qf '\ Name : %{NAME}\n\ %|EPOCH?{Epoch : %{EPOCH}\n}|\ Version : %{VERSION}\n\ Release : %{RELEASE}\n\ %|DISTTAG?{DistTag : %{DISTTAG}\n}|\ Architecture: %{ARCH}\n\ Install Date: %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n\ Group : %{GROUP}\n\ Size : %{LONGSIZE}\n\ %|LICENSE?{License : %{LICENSE}}|\n\ Signature : %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|\n\ Source RPM : %{SOURCERPM}\n\ Build Date : %{BUILDTIME:date}\n\ Build Host : %{BUILDHOST}\n\ %|PREFIXES?{Relocations : [%{PREFIXES} ]\n}|\ %|PACKAGER?{Packager : %{PACKAGER}\n}|\ %|VENDOR?{Vendor : %{VENDOR}\n}|\ %|URL?{URL : %{URL}\n}|\ %|BUGURL?{Bug URL : %{BUGURL}\n}|\ Summary : %{SUMMARY}\n\ Description :\n%{DESCRIPTION}\n' \ --POPTdesc=$"list descriptive information from package(s)" rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ --POPTdesc=$"list change logs for this package" rpm alias --changes --qf '[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]' \ --POPTdesc=$"list changes for this package with full time stamps" rpm alias --xml --qf '[%{*:xml}\n]' \ --POPTdesc=$"list metadata in xml" rpm alias --triggerscripts --qf '\ [trigger%{TRIGGERTYPE} scriptlet (using %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n\ %{TRIGGERSCRIPTS}\n]' rpm alias --triggers --triggerscripts \ --POPTdesc=$"list trigger scriptlets from package(s)" rpm alias --filetriggerscripts --qf '\ [filetrigger%{FILETRIGGERTYPE} scriptlet (using %{FILETRIGGERSCRIPTPROG}) -- \ %{FILETRIGGERCONDS}\n%{FILETRIGGERSCRIPTS}\n]\ [transfiletrigger%{TRANSFILETRIGGERTYPE} scriptlet (using %{TRANSFILETRIGGERSCRIPTPROG}) -- \ %{TRANSFILETRIGGERCONDS}\n%{TRANSFILETRIGGERSCRIPTS}\n]' rpm alias --filetriggers --filetriggerscripts \ --POPTdesc=$"list filetrigger scriptlets from package(s)" rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \ --pipe "LC_NUMERIC=C sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \ --POPTdesc=$"list package(s) by install time, most recent first" rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \ --POPTdesc=$"list duplicated packages" rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]' \ --POPTdesc=$"list all files from each package" rpm alias --fileclass --qf '[%{FILENAMES}\t%{FILECLASS}\n]' \ --POPTdesc=$"list file names with their classes" rpm alias --filecolor --qf '[%{FILENAMES}\t%{FILECOLORS}\n]' \ --POPTdesc=$"list file names with their colors" rpm alias --fileprovide --qf '[%{FILENAMES}\t%{FILEPROVIDE}\n]' \ --POPTdesc=$"list file names with their provides" rpm alias --filerequire --qf '[%{FILENAMES}\t%{FILEREQUIRE}\n]' \ --POPTdesc=$"list file names with requires" rpm alias --filecaps --qf '[%{FILENAMES}\t%|FILECAPS?{%{FILECAPS}}|\n]' \ --POPTdesc=$"list file names with their POSIX1.e capabilities" # colon separated i18n domains to use as PO catalogue lookaside for # retrieving header group/description/summary. rpm alias --i18ndomains --define '_i18ndomains !#:+' rpm alias --color --define '_color_output !#:+' #============================================================================== # [--httpport <port>] "port number of http proxy" rpm alias --httpport --define '_httpport !#:+' # [--httpproxy <host>] "hostname or IP of http proxy" rpm alias --httpproxy --define '_httpproxy !#:+' # [--trace] "trace macro expansion" rpm alias --trace --eval '%trace' # Minimally preserve commonly used switches from cli split-up rpm exec --addsign rpmsign --addsign rpm exec --delsign rpmsign --delsign rpm exec --resign rpmsign --resign #rpm exec --signfiles rpmsign --signfiles rpm exec --checksig rpmkeys --checksig rpm exec -K rpmkeys --checksig rpm exec --import rpmkeys --import rpm exec --initdb rpmdb --initdb rpm exec --rebuilddb rpmdb --rebuilddb rpm exec --verifydb rpmdb --verifydb rpm exec --specfile rpmspec -q #============================================================================== rpmbuild alias --httpport --define '_httpport !#:+' rpmbuild alias --httpproxy --define '_httpproxy !#:+' rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \ --POPTdesc=$"enable configure <option> for build" \ --POPTargs=$"<option>" rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \ --POPTdesc=$"disable configure <option> for build" \ --POPTargs=$"<option>" rpmbuild alias --scm --define '__scm !#:+' \ --POPTdesc=$"shortcut for '--define=\"__scm <scm>\"'" \ --POPTargs=$"<scm>" # Build policies enabled from command line. Last policy applies. rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \ --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \ --POPTargs=$"<policy>" # Print error on rpmbuild --sign rpmbuild alias --sign --eval "%{error:rpmbuild --sign is no longer supported. Use the rpmsign command instead!}" --POPTdesc=$"Obsolete, use command rpmsign instead!" rpmbuild alias --trace --eval '%trace' \ --POPTdesc=$"trace macro expansion" rpmbuild alias --nodebuginfo --define 'debug_package %{nil}' \ --POPTdesc=$"do not generate debuginfo for this package" rpmsign alias --key-id --define '_gpg_name !#:+' \ --POPTdesc=$"key id/name to sign with" \ --POPTargs=$"<id>" rpmsign alias --digest-algo --define '_gpg_digest_algo !#:+' \ --POPTdesc=$"override default digest algorithm (eg sha1/sha256)" \ --POPTargs=$"<algorithm>" rpmspec alias --conflicts --qf \ "[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \ --POPTdesc=$"list capabilities this package conflicts with" rpmspec alias --obsoletes --qf \ "[%|VERBOSE?{%{OBSOLETEFLAGS:deptype}: }:{}|%{OBSOLETENEVRS}\n]" \ --POPTdesc=$"list other packages removed by installing this package" rpmspec alias --provides --qf \ "[%|VERBOSE?{%{PROVIDEFLAGS:deptype}: }:{}|%{PROVIDENEVRS}\n]" \ --POPTdesc=$"list capabilities that this package provides" rpmspec alias --requires --qf \ "[%|VERBOSE?{%{REQUIREFLAGS:deptype}: }:{}|%{REQUIRENEVRS}\n]" \ --POPTdesc=$"list capabilities required by package(s)" rpmspec alias --buildconflicts --srpm --conflicts \ --POPTdesc=$"list capabilities conflicting with build of this package" rpmspec alias --buildrequires --srpm --requires \ --POPTdesc=$"list capabilities required to build this package" rpmspec alias --httpport --define '_httpport !#:+' rpmspec alias --httpproxy --define '_httpproxy !#:+' rpmspec alias --with --define "_with_!#:+ --with-!#:+" \ --POPTdesc=$"enable configure <option> for build" \ --POPTargs=$"<option>" rpmspec alias --without --define "_without_!#:+ --without-!#:+" \ --POPTdesc=$"disable configure <option> for build" \ --POPTargs=$"<option>" rpmspec alias --scm --define '__scm !#:+' \ --POPTdesc=$"shortcut for '--define=\"__scm <scm>\"'" \ --POPTargs=$"<scm>" # Build policies enabled from command line. Last policy applies. rpmspec alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \ --POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \ --POPTargs=$"<policy>" rpmspec alias --trace --eval '%trace' \ --POPTdesc=$"trace macro expansion" rpmspec alias --nodebuginfo --define 'debug_package %{nil}' \ --POPTdesc=$"do not generate debuginfo for this package" # \endverbatim #*/ PK �L�Z��U�. . redhat/brp-strip-ltonu ȯ�� #!/usr/bin/sh # If using normal root, avoid changing anything. if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi STRIP=${1:-strip} NCPUS=${RPM_BUILD_NCPUS:-1} case `uname -a` in Darwin*) exit 0 ;; *) ;; esac # Strip ELF binaries find "$RPM_BUILD_ROOT" -type f -name '*.[ao]' \! -regex "$RPM_BUILD_ROOT/*usr/lib/debug.*" -print0 | \ eu-elfclassify --not-program --not-library --not-linux-kernel-module --stdin0 --print0 | xargs -0 -r -P$NCPUS -n32 sh -c "$STRIP -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 \"\$@\"" ARG0 PK �L�Zh�� redhat/rpmrcnu �[��� include: /usr/lib/rpm/rpmrc optflags: i386 %{__global_compiler_flags} -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection optflags: i486 %{__global_compiler_flags} -m32 -march=i486 -fasynchronous-unwind-tables -fstack-clash-protection optflags: i586 %{__global_compiler_flags} -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection optflags: i686 %{__global_compiler_flags} -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection optflags: athlon %{__global_compiler_flags} -m32 -march=athlon -fasynchronous-unwind-tables -fstack-clash-protection optflags: ia64 %{__global_compiler_flags} optflags: x86_64 %{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection optflags: alpha %{__global_compiler_flags} -mieee optflags: alphaev5 %{__global_compiler_flags} -mieee -mcpu=ev5 optflags: alphaev56 %{__global_compiler_flags} -mieee -mcpu=ev56 optflags: alphapca56 %{__global_compiler_flags} -mieee -mcpu=pca56 optflags: alphaev6 %{__global_compiler_flags} -mieee -mcpu=ev6 optflags: alphaev67 %{__global_compiler_flags} -mieee -mcpu=ev67 optflags: sparc %{__global_compiler_flags} -m32 -mcpu=v7 -mtune=ultrasparc optflags: sparcv8 %{__global_compiler_flags} -m32 -mcpu=v8 optflags: sparcv9 %{__global_compiler_flags} -m32 -mcpu=ultrasparc optflags: sparcv9v %{__global_compiler_flags} -m32 -mcpu=niagara optflags: sparc64 %{__global_compiler_flags} -m64 -mcpu=ultrasparc optflags: sparc64v %{__global_compiler_flags} -m64 -mcpu=niagara optflags: m68k %{__global_compiler_flags} optflags: ppc %{__global_compiler_flags} -m32 -fasynchronous-unwind-tables optflags: ppciseries %{__global_compiler_flags} -m32 optflags: ppcpseries %{__global_compiler_flags} -m32 optflags: ppc64 %{__global_compiler_flags} -m64 -fasynchronous-unwind-tables -fstack-clash-protection optflags: ppc64p7 %{__global_compiler_flags} -m64 -O3 -mcpu=power7 -mtune=power7 -fasynchronous-unwind-tables -fstack-clash-protection optflags: ppc64le %{__global_compiler_flags} -m64 %{__cflags_arch_ppc64le} -fasynchronous-unwind-tables -fstack-clash-protection optflags: ppc64iseries %{__global_compiler_flags} -m64 optflags: ppc64pseries %{__global_compiler_flags} -m64 optflags: ppc8260 %{__global_compiler_flags} -m32 optflags: ppc8560 %{__global_compiler_flags} -m32 optflags: parisc %{__global_compiler_flags} -mpa-risc-1-0 optflags: hppa1.0 %{__global_compiler_flags} -mpa-risc-1-0 optflags: hppa1.1 %{__global_compiler_flags} -mpa-risc-1-0 optflags: hppa1.2 %{__global_compiler_flags} -mpa-risc-1-0 optflags: hppa2.0 %{__global_compiler_flags} -mpa-risc-1-0 optflags: mips %{__global_compiler_flags} -march=mips32r2 -mfpxx optflags: mipsel %{__global_compiler_flags} -march=mips32r2 -mfpxx optflags: mips64 %{__global_compiler_flags} -march=mips64r2 -mabi=64 optflags: mips64el %{__global_compiler_flags} -march=mips64r2 -mabi=64 optflags: mipsr6 %{__global_compiler_flags} -march=mips32r6 optflags: mipsr6el %{__global_compiler_flags} -march=mips32r6 optflags: mips64r6 %{__global_compiler_flags} -march=mips64r6 optflags: mips64r6el %{__global_compiler_flags} -march=mips64r6 optflags: armv3l %{__global_compiler_flags} -fsigned-char -march=armv3 optflags: armv4b %{__global_compiler_flags} -fsigned-char -march=armv4 optflags: armv4l %{__global_compiler_flags} -fsigned-char -march=armv4 optflags: armv4tl %{__global_compiler_flags} -march=armv4t optflags: armv5tel %{__global_compiler_flags} -march=armv5te -mfloat-abi=soft optflags: armv5tejl %{__global_compiler_flags} -march=armv5te -mfloat-abi=soft optflags: armv6l %{__global_compiler_flags} -march=armv6 -mfloat-abi=soft optflags: armv6hl %{__global_compiler_flags} -march=armv6 -mfpu=vfp -mfloat-abi=hard optflags: armv6hnl %{__global_compiler_flags} -march=armv6 -mfpu=neon -mfloat-abi=hard optflags: armv7l %{__global_compiler_flags} -march=armv7-a -mfloat-abi=soft optflags: armv7hl %{__global_compiler_flags} -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard optflags: armv7hnl %{__global_compiler_flags} -march=armv7-a -mfpu=neon -mfloat-abi=hard optflags: atarist %{__global_compiler_flags} optflags: atariste %{__global_compiler_flags} optflags: ataritt %{__global_compiler_flags} optflags: falcon %{__global_compiler_flags} optflags: atariclone %{__global_compiler_flags} optflags: milan %{__global_compiler_flags} optflags: hades %{__global_compiler_flags} optflags: s390 %{__global_compiler_flags} -m31 %{__cflags_arch_s390x} -fasynchronous-unwind-tables optflags: s390x %{__global_compiler_flags} -m64 %{__cflags_arch_s390x} -fasynchronous-unwind-tables -fstack-clash-protection optflags: aarch64 %{__global_compiler_flags} -fasynchronous-unwind-tables %[ "%{toolchain}" == "gcc" ? "-fstack-clash-protection" : "" ] optflags: riscv64 %{__global_compiler_flags} -fasynchronous-unwind-tables %[ "%{toolchain}" == "gcc" ? "-fstack-clash-protection" : "" ] # set build arch to fedora buildarches on hardware capable of running it # saves having to do rpmbuild --target= buildarchtranslate: athlon: i686 buildarchtranslate: geode: i686 buildarchtranslate: pentium4: i686 buildarchtranslate: pentium3: i686 buildarchtranslate: i686: i686 buildarchtranslate: i586: i586 buildarchtranslate: sparcv9: sparcv9 buildarchtranslate: sparcv9v: sparcv9 buildarchtranslate: armv5tejl: armv5tel buildarchtranslate: armv6l: armv5tel buildarchtranslate: armv7l: armv5tel buildarchtranslate: armv7hl: armv7hl buildarchtranslate: armv7hnl: armv7hl PK �L�Z�Ls_V _V redhat/compileall2.pynu �[��� """Module/script to byte-compile all .py files to .pyc files. When called as a script with arguments, this compiles the directories given as arguments recursively; the -l option prevents it from recursing into directories. Without arguments, if compiles all modules on sys.path, without recursing into subdirectories. (Even though it should do so for packages -- for now, you'll have to deal with packages separately.) See module py_compile for details of the actual byte-compilation. License: Compileall2 is an enhanced copy of Python's compileall module and it follows Python licensing. For more info see: https://www.python.org/psf/license/ """ import os import sys import importlib.util import py_compile import struct import filecmp from functools import partial from pathlib import Path # Python 3.7 and higher PY37 = sys.version_info[0:2] >= (3, 7) # Python 3.6 and higher PY36 = sys.version_info[0:2] >= (3, 6) # Python 3.5 and higher PY35 = sys.version_info[0:2] >= (3, 5) # Python 3.7 and above has a different structure and length # of pyc files header. Also, multiple ways how to invalidate pyc file was # introduced in Python 3.7. These cases are covered by variables here or by PY37 # variable itself. if PY37: pyc_struct_format = '<4sll' pyc_header_lenght = 12 pyc_header_format = (pyc_struct_format, importlib.util.MAGIC_NUMBER, 0) else: pyc_struct_format = '<4sl' pyc_header_lenght = 8 pyc_header_format = (pyc_struct_format, importlib.util.MAGIC_NUMBER) __all__ = ["compile_dir","compile_file","compile_path"] def optimization_kwarg(opt): """Returns opt as a dictionary {optimization: opt} for use as **kwarg for Python >= 3.5 and empty dictionary for Python 3.4""" if PY35: return dict(optimization=opt) else: # `debug_override` is a way how to enable optimized byte-compiled files # (.pyo) in Python <= 3.4 if opt: return dict(debug_override=False) else: return dict() def _walk_dir(dir, maxlevels, quiet=0): if PY36 and quiet < 2 and isinstance(dir, os.PathLike): dir = os.fspath(dir) else: dir = str(dir) if not quiet: print('Listing {!r}...'.format(dir)) try: names = os.listdir(dir) except OSError: if quiet < 2: print("Can't list {!r}".format(dir)) names = [] names.sort() for name in names: if name == '__pycache__': continue fullname = os.path.join(dir, name) if not os.path.isdir(fullname): yield fullname elif (maxlevels > 0 and name != os.curdir and name != os.pardir and os.path.isdir(fullname) and not os.path.islink(fullname)): yield from _walk_dir(fullname, maxlevels=maxlevels - 1, quiet=quiet) def compile_dir(dir, maxlevels=None, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default `sys.getrecursionlimit()`) ddir: the directory that will be prepended to the path to the file as it is compiled into each byte-code file. force: if True, force compilation, even if timestamps are up-to-date quiet: full output with False or 0, errors only with 1, no output with 2 legacy: if True, produce legacy pyc paths instead of PEP 3147 paths optimize: int or list of optimization levels or -1 for level of the interpreter. Multiple levels leads to multiple compiled files each with one optimization level. workers: maximum number of parallel workers invalidation_mode: how the up-to-dateness of the pyc will be checked stripdir: part of path to left-strip from source file path prependdir: path to prepend to beggining of original file path, applied after stripdir limit_sl_dest: ignore symlinks if they are pointing outside of the defined path hardlink_dupes: hardlink duplicated pyc files """ ProcessPoolExecutor = None if ddir is not None and (stripdir is not None or prependdir is not None): raise ValueError(("Destination dir (ddir) cannot be used " "in combination with stripdir or prependdir")) if ddir is not None: stripdir = dir prependdir = ddir ddir = None if workers is not None: if workers < 0: raise ValueError('workers must be greater or equal to 0') elif workers != 1: try: # Only import when needed, as low resource platforms may # fail to import it from concurrent.futures import ProcessPoolExecutor except ImportError: workers = 1 if maxlevels is None: maxlevels = sys.getrecursionlimit() files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels) success = True if workers is not None and workers != 1 and ProcessPoolExecutor is not None: workers = workers or None with ProcessPoolExecutor(max_workers=workers) as executor: results = executor.map(partial(compile_file, ddir=ddir, force=force, rx=rx, quiet=quiet, legacy=legacy, optimize=optimize, invalidation_mode=invalidation_mode, stripdir=stripdir, prependdir=prependdir, limit_sl_dest=limit_sl_dest), files) success = min(results, default=True) else: for file in files: if not compile_file(file, ddir, force, rx, quiet, legacy, optimize, invalidation_mode, stripdir=stripdir, prependdir=prependdir, limit_sl_dest=limit_sl_dest, hardlink_dupes=hardlink_dupes): success = False return success def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False): """Byte-compile one file. Arguments (only fullname is required): fullname: the file to byte-compile ddir: if given, the directory name compiled in to the byte-code file. force: if True, force compilation, even if timestamps are up-to-date quiet: full output with False or 0, errors only with 1, no output with 2 legacy: if True, produce legacy pyc paths instead of PEP 3147 paths optimize: int or list of optimization levels or -1 for level of the interpreter. Multiple levels leads to multiple compiled files each with one optimization level. invalidation_mode: how the up-to-dateness of the pyc will be checked stripdir: part of path to left-strip from source file path prependdir: path to prepend to beggining of original file path, applied after stripdir limit_sl_dest: ignore symlinks if they are pointing outside of the defined path. hardlink_dupes: hardlink duplicated pyc files """ if ddir is not None and (stripdir is not None or prependdir is not None): raise ValueError(("Destination dir (ddir) cannot be used " "in combination with stripdir or prependdir")) success = True if PY36 and quiet < 2 and isinstance(fullname, os.PathLike): fullname = os.fspath(fullname) else: fullname = str(fullname) name = os.path.basename(fullname) dfile = None if ddir is not None: if not PY36: ddir = str(ddir) dfile = os.path.join(ddir, name) if stripdir is not None: fullname_parts = fullname.split(os.path.sep) stripdir_parts = stripdir.split(os.path.sep) ddir_parts = list(fullname_parts) for spart, opart in zip(stripdir_parts, fullname_parts): if spart == opart: ddir_parts.remove(spart) dfile = os.path.join(*ddir_parts) if prependdir is not None: if dfile is None: dfile = os.path.join(prependdir, fullname) else: dfile = os.path.join(prependdir, dfile) if isinstance(optimize, int): optimize = [optimize] if hardlink_dupes: raise ValueError(("Hardlinking of duplicated bytecode makes sense " "only for more than one optimization level.")) if rx is not None: mo = rx.search(fullname) if mo: return success if limit_sl_dest is not None and os.path.islink(fullname): if Path(limit_sl_dest).resolve() not in Path(fullname).resolve().parents: return success opt_cfiles = {} if os.path.isfile(fullname): for opt_level in optimize: if legacy: opt_cfiles[opt_level] = fullname + 'c' else: if opt_level >= 0: opt = opt_level if opt_level >= 1 else '' opt_kwarg = optimization_kwarg(opt) cfile = (importlib.util.cache_from_source( fullname, **opt_kwarg)) opt_cfiles[opt_level] = cfile else: cfile = importlib.util.cache_from_source(fullname) opt_cfiles[opt_level] = cfile head, tail = name[:-3], name[-3:] if tail == '.py': if not force: try: mtime = int(os.stat(fullname).st_mtime) expect = struct.pack(*(pyc_header_format + (mtime,))) for cfile in opt_cfiles.values(): with open(cfile, 'rb') as chandle: actual = chandle.read(pyc_header_lenght) if expect != actual: break else: return success except OSError: pass if not quiet: print('Compiling {!r}...'.format(fullname)) try: for index, opt_level in enumerate(sorted(optimize)): cfile = opt_cfiles[opt_level] if PY37: ok = py_compile.compile(fullname, cfile, dfile, True, optimize=opt_level, invalidation_mode=invalidation_mode) else: ok = py_compile.compile(fullname, cfile, dfile, True, optimize=opt_level) if index > 0 and hardlink_dupes: previous_cfile = opt_cfiles[optimize[index - 1]] if previous_cfile == cfile and optimize[0] not in (1, 2): # Python 3.4 has only one .pyo file for -O and -OO so # we hardlink it only if there is a .pyc file # with the same content previous_cfile = opt_cfiles[optimize[0]] if previous_cfile != cfile and filecmp.cmp(cfile, previous_cfile, shallow=False): os.unlink(cfile) os.link(previous_cfile, cfile) except py_compile.PyCompileError as err: success = False if quiet >= 2: return success elif quiet: print('*** Error compiling {!r}...'.format(fullname)) else: print('*** ', end='') # escape non-printable characters in msg msg = err.msg.encode(sys.stdout.encoding, errors='backslashreplace') msg = msg.decode(sys.stdout.encoding) print(msg) except (SyntaxError, UnicodeError, OSError) as e: success = False if quiet >= 2: return success elif quiet: print('*** Error compiling {!r}...'.format(fullname)) else: print('*** ', end='') print(e.__class__.__name__ + ':', e) else: if ok == 0: success = False return success def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=None): """Byte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default True) maxlevels: max recursion level (default 0) force: as for compile_dir() (default False) quiet: as for compile_dir() (default 0) legacy: as for compile_dir() (default False) optimize: as for compile_dir() (default -1) invalidation_mode: as for compiler_dir() """ success = True for dir in sys.path: if (not dir or dir == os.curdir) and skip_curdir: if quiet < 2: print('Skipping current directory') else: success = success and compile_dir( dir, maxlevels, None, force, quiet=quiet, legacy=legacy, optimize=optimize, invalidation_mode=invalidation_mode, ) return success def main(): """Script main program.""" import argparse parser = argparse.ArgumentParser( description='Utilities to support installing Python libraries.') parser.add_argument('-l', action='store_const', const=0, default=None, dest='maxlevels', help="don't recurse into subdirectories") parser.add_argument('-r', type=int, dest='recursion', help=('control the maximum recursion level. ' 'if `-l` and `-r` options are specified, ' 'then `-r` takes precedence.')) parser.add_argument('-f', action='store_true', dest='force', help='force rebuild even if timestamps are up to date') parser.add_argument('-q', action='count', dest='quiet', default=0, help='output only error messages; -qq will suppress ' 'the error messages as well.') parser.add_argument('-b', action='store_true', dest='legacy', help='use legacy (pre-PEP3147) compiled file locations') parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None, help=('directory to prepend to file paths for use in ' 'compile-time tracebacks and in runtime ' 'tracebacks in cases where the source file is ' 'unavailable')) parser.add_argument('-s', metavar='STRIPDIR', dest='stripdir', default=None, help=('part of path to left-strip from path ' 'to source file - for example buildroot. ' '`-d` and `-s` options cannot be ' 'specified together.')) parser.add_argument('-p', metavar='PREPENDDIR', dest='prependdir', default=None, help=('path to add as prefix to path ' 'to source file - for example / to make ' 'it absolute when some part is removed ' 'by `-s` option. ' '`-d` and `-p` options cannot be ' 'specified together.')) parser.add_argument('-x', metavar='REGEXP', dest='rx', default=None, help=('skip files matching the regular expression; ' 'the regexp is searched for in the full path ' 'of each file considered for compilation')) parser.add_argument('-i', metavar='FILE', dest='flist', help=('add all the files and directories listed in ' 'FILE to the list considered for compilation; ' 'if "-", names are read from stdin')) parser.add_argument('compile_dest', metavar='FILE|DIR', nargs='*', help=('zero or more file and directory names ' 'to compile; if no arguments given, defaults ' 'to the equivalent of -l sys.path')) parser.add_argument('-j', '--workers', default=1, type=int, help='Run compileall concurrently') parser.add_argument('-o', action='append', type=int, dest='opt_levels', help=('Optimization levels to run compilation with. ' 'Default is -1 which uses optimization level of ' 'Python interpreter itself (specified by -O).')) parser.add_argument('-e', metavar='DIR', dest='limit_sl_dest', help='Ignore symlinks pointing outsite of the DIR') parser.add_argument('--hardlink-dupes', action='store_true', dest='hardlink_dupes', help='Hardlink duplicated pyc files') if PY37: invalidation_modes = [mode.name.lower().replace('_', '-') for mode in py_compile.PycInvalidationMode] parser.add_argument('--invalidation-mode', choices=sorted(invalidation_modes), help=('set .pyc invalidation mode; defaults to ' '"checked-hash" if the SOURCE_DATE_EPOCH ' 'environment variable is set, and ' '"timestamp" otherwise.')) args = parser.parse_args() compile_dests = args.compile_dest if args.rx: import re args.rx = re.compile(args.rx) if args.limit_sl_dest == "": args.limit_sl_dest = None if args.recursion is not None: maxlevels = args.recursion else: maxlevels = args.maxlevels if args.opt_levels is None: args.opt_levels = [-1] if len(args.opt_levels) == 1 and args.hardlink_dupes: parser.error(("Hardlinking of duplicated bytecode makes sense " "only for more than one optimization level.")) if args.ddir is not None and ( args.stripdir is not None or args.prependdir is not None ): parser.error("-d cannot be used in combination with -s or -p") # if flist is provided then load it if args.flist: try: with (sys.stdin if args.flist=='-' else open(args.flist)) as f: for line in f: compile_dests.append(line.strip()) except OSError: if args.quiet < 2: print("Error reading file list {}".format(args.flist)) return False if args.workers is not None: args.workers = args.workers or None if PY37 and args.invalidation_mode: ivl_mode = args.invalidation_mode.replace('-', '_').upper() invalidation_mode = py_compile.PycInvalidationMode[ivl_mode] else: invalidation_mode = None success = True try: if compile_dests: for dest in compile_dests: if os.path.isfile(dest): if not compile_file(dest, args.ddir, args.force, args.rx, args.quiet, args.legacy, invalidation_mode=invalidation_mode, stripdir=args.stripdir, prependdir=args.prependdir, optimize=args.opt_levels, limit_sl_dest=args.limit_sl_dest, hardlink_dupes=args.hardlink_dupes): success = False else: if not compile_dir(dest, maxlevels, args.ddir, args.force, args.rx, args.quiet, args.legacy, workers=args.workers, invalidation_mode=invalidation_mode, stripdir=args.stripdir, prependdir=args.prependdir, optimize=args.opt_levels, limit_sl_dest=args.limit_sl_dest, hardlink_dupes=args.hardlink_dupes): success = False return success else: return compile_path(legacy=args.legacy, force=args.force, quiet=args.quiet, invalidation_mode=invalidation_mode) except KeyboardInterrupt: if args.quiet < 2: print("\n[interrupted]") return False return True if __name__ == '__main__': exit_status = int(not main()) sys.exit(exit_status) PK �L�ZW�i� � redhat/find-providesnu ȯ�� #!/usr/bin/bash # This script reads filenames from STDIN and outputs any relevant provides # information that needs to be included in the package. if [ "$1" ] then package_name="$1" fi filelist=`sed "s/['\"]/\\\&/g"` [ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --provides # # --- any other extra find-provides scripts for i in /usr/lib/rpm/redhat/find-provides.d/*.prov do [ -x $i ] && (echo $filelist | tr '[:blank:]' \\n | $i | sort -u) done # # --- Kernel module imported symbols # # Since we don't (yet) get passed the name of the package being built, we # cheat a little here by looking first for a kernel, then for a kmod. # is_kmod=1 for f in $filelist; do if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*)\.ko(\.gz|\.bz2|\.xz)?$:\2:p') ] then is_kernel=1; fi if [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ] then unset is_kmod; fi done if [ ! "$is_kernel" ] || [ "$package_name" == "kernel" ] then unset is_kmod fi [ -x /usr/lib/rpm/redhat/find-provides.ksyms ] && [ "$is_kmod" ] && printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-provides.ksyms exit 0 PK �L�Zy$�t t redhat/rpmsortnu ȯ�� #! /usr/bin/perl -w # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. use Getopt::Long qw(:config gnu_getopt); sub rpm_cmp_versions { my ($evr1, $evr2) = @_; sub _rpm_cmp { my ($s1, $s2) = @_; return defined $s1 <=> defined $s2 unless defined $s1 && defined $s2; my ($r, $x1, $x2); do { $s1 =~ s/^[^a-zA-Z0-9]+//; $s2 =~ s/^[^a-zA-Z0-9]+//; if ($s1 =~ /^\d/ || $s2 =~ /^\d/) { $s1 =~ s/^0*(\d*)//; $x1 = $1; $s2 =~ s/^0*(\d*)//; $x2 = $1; $r = length $x1 <=> length $x2 || $x1 cmp $x2; } else { $s1 =~ s/^([a-zA-Z]*)//; $x1 = $1; $s2 =~ s/^([a-zA-Z]*)//; $x2 = $1; return 0 if $x1 eq '' && $x2 eq ''; $r = $x1 cmp $x2; } } until $r; return $r; } my ($e1, $v1, $r1) = $evr1 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; my ($e2, $v2, $r2) = $evr2 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/; my $r = _rpm_cmp($e1 || 0, $e2 || 0); $r = _rpm_cmp($v1, $v2) unless $r; $r = _rpm_cmp($r1, $r2) unless $r; return $r; } my $reorder = sub { return @_ }; my $key = 0; GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } }, "k|key=i" => \$key) or do { print STDERR "Usage\n"; exit 1; }; if ($key == 0) { # Sort by entire lines map { print } &$reorder(sort { rpm_cmp_versions($a, $b) } <>); } else { # Sort by field $key my @data = map { [(split)[$key-1], $_] } <>; map { print } &$reorder(map { $_->[1] } sort { rpm_cmp_versions($a->[0], $b->[0]) } @data); } PK �L�Z�ӵ~} } redhat/brp-mangle-shebangsnu ȯ�� #!/usr/bin/bash -eu # If using normal root, avoid changing anything. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi exclude_files="" exclude_files_from="" exclude_shebangs="" exclude_shebangs_from="" usage() { local verbose=$1 && shift local outfile=$1 && shift local status=$1 && shift ( echo 'usage: brp-mangle-shebangs [--files <regexp>] [--files-from <file>] [--shebangs <regexp>] [--shebangs-from <file>]' if [ "${verbose}" == "yes" ]; then echo ' --files: extended regexp of files to ignore' echo ' --files-from: file containing a list of extended regexps of files to ignore' echo ' --shebangs: extended regexp of shebangs to ignore' echo ' --shebangs-from: file containing a list of extended regexps of shebangs to ignore' fi ) >>${outfile} exit ${status} } while [ $# -gt 0 ] ; do case "$1" in --files) exclude_files="${2}" shift ;; --files=*) exclude_files="${1##--files=}" ;; --files-from) exclude_files_from="${2}" shift ;; --files-from=*) exclude_files_from="${1##--files-from=}" ;; --shebangs) exclude_shebangs="${2}" shift ;; --shebangs=*) exclude_shebangs="${1##--shebangs=}" ;; --shebangs-from) exclude_shebangs_from="${2}" shift ;; --shebangs-from=*) exclude_shebangs_from="${1##--shebangs-from=}" ;; --help|--usage|"-?"|-h) usage yes /dev/stdout 0 ;; *) echo "Unknown option \"${1}\"" 1>&2 usage no /dev/stderr 1 ;; esac shift done cd "$RPM_BUILD_ROOT" # Large packages such as kernel can have thousands of executable files. # We take care to not fork/exec thousands of "file"s and "grep"s, # but run just two of them. # (Take care to exclude filenames which would mangle "file" output). find -executable -type f ! -path '*:*' ! -path $'*\n*' \ | file -N --mime-type -f - \ | grep -P ".+(?=: (text/|application/javascript))" \ | { fail=0 while IFS= read -r line; do f=${line%%:*} # Remove the dot path="${f#.}" if [ -n "$exclude_files" ]; then echo "$path" | grep -q -E "$exclude_files" && continue fi if [ -n "$exclude_files_from" ]; then echo "$path" | grep -q -E -f "$exclude_files_from" && continue fi if ! read shebang_line < "$f"; then echo >&2 "*** WARNING: Cannot read the first line from $f, removing executable bit" ts=$(stat -c %y "$f") chmod -x "$f" touch -d "$ts" "$f" continue fi orig_shebang="${shebang_line#\#!}" if [ "$orig_shebang" = "$shebang_line" ]; then echo >&2 "*** WARNING: $f is executable but has no shebang, removing executable bit" ts=$(stat -c %y "$f") chmod -x "$f" touch -d "$ts" "$f" continue fi # Trim spaces while shebang="${orig_shebang// / }"; [ "$shebang" != "$orig_shebang" ]; do orig_shebang="$shebang" done # Treat "#! /path/to " as "#!/path/to" orig_shebang="${orig_shebang# }" shebang="$orig_shebang" if [ -z "$shebang" ]; then echo >&2 "*** WARNING: $f is executable but has empty shebang, removing executable bit" ts=$(stat -c %y "$f") chmod -x "$f" touch -d "$ts" "$f" continue fi if [ -n "${shebang##/*}" ]; then echo >&2 "*** ERROR: $f has shebang which doesn't start with '/' ($shebang)" fail=1 continue fi if ! { echo "$shebang" | grep -q -P "^/(?:usr/)?(?:bin|sbin)/"; }; then continue fi # Replace "special" env shebang: # /whatsoever/env /whatever/foo → /whatever/foo shebang=$(echo "$shebang" | sed -r -e 's@^(.+)/env /(.+)$@/\2@') # /whatsoever/env foo → /whatsoever/foo shebang=$(echo "$shebang" | sed -r -e 's@^(.+/)env (.+)$@\1\2@') # If the shebang now starts with /bin, change it to /usr/bin # https://bugzilla.redhat.com/show_bug.cgi?id=1581757 shebang=$(echo "$shebang" | sed -r -e 's@^/bin/@/usr/bin/@') # Replace ambiguous python with python2 py_shebang=$(echo "$shebang" | sed -r -e 's@/usr/bin/python(\s|$)@/usr/bin/python2\1@') if [ "$shebang" != "$py_shebang" ]; then echo >&2 "*** ERROR: ambiguous python shebang in $path: #!$orig_shebang. Change it to python3 (or python2) explicitly." fail=1 elif [ "#!$shebang" != "#!$orig_shebang" ]; then echo "mangling shebang in $path from $orig_shebang to #!$shebang" ts=$(stat -c %y "$f") sed -i -e "1c #!$shebang" "$f" touch -d "$ts" "$f" fi done exit $fail } PK �L�Z�z@� � redhat/brp-ldconfignu ȯ�� #!/usr/bin/sh -efu # Force creating of DSO symlinks. # If using normal root, avoid changing anything. if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then exit 0 fi # Create an empty config file for ldconfig to shut up a warning config=$(mktemp -p "$RPM_BUILD_ROOT") /sbin/ldconfig -f $(basename "$config") -N -r "$RPM_BUILD_ROOT" rm -f "$config" # TODO: warn if it created new symlinks and guide people. PK �L�Z�v�G6 6 &