From: cvs2git Date: Tue, 2 Feb 2010 22:26:32 +0000 (+0000) Subject: This commit was manufactured by cvs2git to create tag 'auto-th-rpm-4_5-36'. X-Git-Tag: auto/th/rpm-4_5-36 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=refs%2Ftags%2Fauto%2Fth%2Frpm-4_5-36;p=packages%2Frpm.git This commit was manufactured by cvs2git to create tag 'auto-th-rpm-4_5-36'. Sprout from rpm-4_5 2010-02-02 22:26:32 UTC Elan Ruusamäe '- fixed pkgconfig file; rel 36' Cherrypick from master 2009-05-20 00:09:51 UTC Elan Ruusamäe '- workaround for .jar files with stupid permissions inside': rpm-java-requires -> 1.4 rpm-libtool-deps.patch -> 1.9 rpm-popt-aliases.patch -> 1.3 rpm.platform -> 1.9 rpm.sysconfig -> 1.4 Cherrypick from rpm-4_4_9 2008-11-26 21:45:37 UTC sparky '- unambiguous -z combreloc': rpm-macros-th.patch -> 1.5.2.3 Delete: rpm-am.patch --- diff --git a/rpm-am.patch b/rpm-am.patch deleted file mode 100644 index d41be43..0000000 --- a/rpm-am.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rpm-5.1.9/rpmdb/Makefile.am.orig 2009-04-12 21:46:28.000000000 +0200 -+++ rpm-5.1.9/rpmdb/Makefile.am 2009-10-23 21:35:13.000000000 +0200 -@@ -108,7 +108,7 @@ - - install-data-local: - $(mkinstalldirs) $(DESTDIR)$(pkgincdir) -- $(pkgincHEADERS_INSTALL) $(my_DB_HEADER) $(DESTDIR)$(pkgincdir)/db.h -+ $(install_sh_DATA) $(my_DB_HEADER) $(DESTDIR)$(pkgincdir)/db.h - - clean-local: - rm -f *.o tagtbl.c diff --git a/rpm-java-requires b/rpm-java-requires new file mode 100644 index 0000000..2dfb0d5 --- /dev/null +++ b/rpm-java-requires @@ -0,0 +1,70 @@ +#!/bin/sh +# This script reads filenames from STDIN and outputs any relevant requires +# information that needs to be included in the package. +# +# Based on rpm-4.4.2/scripts/find-req.pl +# Authors: Elan Ruusamäe + +export PATH="/sbin:/usr/sbin:/bin:/usr/bin" + +javaclassversion() { + [ $# -gt 0 ] || return 1 + + local classver=$(echo "$@" | xargs -r file | grep -o 'compiled Java class data, version [0-9.]*' | awk '{print $NF}' | sort -u) + if [ -z "$classver" ]; then + return 1 + fi + + local v + for v in $classver; do + echo "java(ClassDataVersion) >= $v" + done + return 0 +} + +javajarversion() { + local jar="$1" + local ret=0 + + # check only files, symlinks could point outside buildroot + [ -f "$jar" -a ! -L "$jar" ] || return $ret + + tmp=$(mktemp -d) + unzip -q -d $tmp $jar >&2 + # workaround for .jar files with stupid permissions + chmod -R u+rwX $tmp + javaclassversion $(find $tmp -type f -name '*.class') || { + echo >&2 "ERROR: Class version could not be extracted from $jar" + ret=1 + } + rm -rf $tmp + + return $ret +} + +find_requires() { + local ret=0 + for file in $FILES; do + case $file in + *.jar) + javajarversion "$file" || ret=1 + ;; + *.class) + javaclassversion "$file" || { + echo >&2 "ERROR: Class version could not be extracted from $file" + ret=1 + } + ;; + esac + done + return $ret +} + +FILES=$(cat -) + +t=$(mktemp) +ret=0 +find_requires > $t || ret=1 +cat $t +rm -f $t +exit $ret diff --git a/rpm-libtool-deps.patch b/rpm-libtool-deps.patch new file mode 100644 index 0000000..450093f --- /dev/null +++ b/rpm-libtool-deps.patch @@ -0,0 +1,65 @@ +--- rpm-4.4.8.org/scripts/libtooldeps.sh 2005-11-12 22:20:42.000000000 +0100 ++++ rpm-4.4.8/scripts/libtooldeps.sh 2006-11-26 20:06:49.254008750 +0100 +@@ -5,15 +5,18 @@ + exit 0 + } + ++pkgname="$3" ++ + case $1 in + -P|--provides) + shift +- RPM_BUILD_ROOT="$1" ++ RPM_BUILD_ROOT="`readlink -f "$1"`" + while read possible + do + case "$possible" in + *.la) +- if grep -iq '^# Generated by ltmain.sh' "$possible" 2> /dev/null ; then ++ possible="`readlink -f "$possible" 2> /dev/null || echo "$possible"`" ++ if file "$possible" | grep -iq 'libtool library file' 2> /dev/null ; then + possible="`echo ${possible} | sed -e s,${RPM_BUILD_ROOT}/,/,`" + echo "libtool($possible)" + fi +@@ -22,21 +25,28 @@ + done + ;; + -R|--requires) +- while read possible ; do +- case "$possible" in +- *.la) +- for dep in `grep '^dependency_libs='"$possible" 2> /dev/null | \ +- sed -e "s,^dependency_libs='\(.*\)',\1,g"` +- do +- case "$dep" in +- /*.la) +- echo "libtool($dep)" ++ case $pkgname in ++ *-devel) ++ while read possible ; do ++ case "$possible" in ++ *.la) ++ for dep in `grep '^dependency_libs=' "$possible" 2> /dev/null | \ ++ sed -e "s,^dependency_libs='\(.*\)',\1,g"` ++ do ++ case "$dep" in ++ /*.la) ++ dep="`readlink -f "$dep" 2> /dev/null || echo "$dep"`" ++ echo "libtool($dep)" ++ ;; ++ esac ++ done + ;; + esac + done +- ;; +- esac +- done +- ;; ++ ;; ++ *) ++ cat > /dev/null ++ ;; ++ esac + esac + exit 0 diff --git a/rpm-macros-th.patch b/rpm-macros-th.patch new file mode 100644 index 0000000..a4963c7 --- /dev/null +++ b/rpm-macros-th.patch @@ -0,0 +1,22 @@ +--- rpm-4.4.9.org/macros.in 2008-07-24 08:52:35.205363000 +0200 ++++ rpm-4.4.9/macros.in 2008-07-24 09:01:00.351355186 +0200 +@@ -275,6 +275,9 @@ + # + #%distribution + ++# PLD Linux Release ++%pld_release th ++ + # Configurable distribution URL, same as DistURL: tag in a specfile. + # The URL will be used to supply reliable information to tools like + # rpmfind. +@@ -1468,6 +1471,9 @@ + # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed. + + %debugcflags -O0 -g -Wall ++%debugcppflags %{nil} ++%optldflags -Wl,--as-needed -Wl,-z,relro -Wl,-z,combreloc ++%optcppflags -D_FORTIFY_SOURCE=2 + + # Warning: those macros are overwritten by macros.build, + # left here for compatibility diff --git a/rpm-popt-aliases.patch b/rpm-popt-aliases.patch new file mode 100644 index 0000000..23e8154 --- /dev/null +++ b/rpm-popt-aliases.patch @@ -0,0 +1,19 @@ +--- rpm-4.4.9/rpmpopt.in 2008-03-24 22:09:33.709972364 +0200 ++++ rpm-4.4.9/rpmpopt.in 2008-04-04 18:51:45.658923774 +0300 +@@ -595,4 +595,16 @@ + rpmv alias --httpproxy --define '_httpproxy !#:+' + ++rpm alias --downgrade --oldpackage \ ++ --POPTdesc=$"Allow an upgrade to replace a newer package with an older one." ++ ++rpm alias --what-provides --whatprovides \ ++ --POPTdesc=$"find package name that contains a provided capability" ++ ++rpm alias --what-requires --whatrequires \ ++ --POPTdesc=$"find package name that contains a required capability" ++ ++rpm alias --norepackage --define '_repackage_all_erasures 0' \ ++ --POPTdesc=$"Disable re-package of the files before erasing" ++ + # \endverbatim + #*/ diff --git a/rpm.platform b/rpm.platform new file mode 100644 index 0000000..e49c24a --- /dev/null +++ b/rpm.platform @@ -0,0 +1,38 @@ +# PLD rpm macros + +%__id /bin/id +%__id_u %{__id} -u +%__chown_Rhf %{__chown} -Rhf +%__chgrp_Rhf %{__chgrp} -Rhf + +%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root:root +%_fixgroup true +%_fixperms %{__chmod} -Rf -Rf a+rX,u+w,g-w,o-w + +%_exec_prefix %{_prefix} +%_bindir %{_exec_prefix}/bin +%_sbindir %{_exec_prefix}/sbin +%_datadir %{_prefix}/share +%_sharedstatedir /var/lib +%_lib @LIB@ +%_libdir %{_exec_prefix}/%{_lib} +%_libexecdir %{_exec_prefix}/%{_lib} +%_includedir %{_prefix}/include +%_oldincludedir /usr/include +%_sysconfdir /etc +%_localstatedir /var +%_infodir /usr/share/info +%_mandir %{_prefix}/share/man +%_defaultdocdir /usr/share/doc + +%__os_install_post \ +%{__spec_install_post_strip}\ +%{__spec_install_post_chrpath}\ +%{__spec_install_post_check_so}\ +%{__spec_install_post_compress_docs}\ +%{__spec_install_post_compress_modules}\ +%{__spec_install_post_py_hardlink}\ +%{__spec_install_post_perl_clean}\ +%{__arch_install_post}\ +%{nil} + diff --git a/rpm.sysconfig b/rpm.sysconfig new file mode 100644 index 0000000..1ad0c52 --- /dev/null +++ b/rpm.sysconfig @@ -0,0 +1,15 @@ +# This file is intended for setting rpm options that cannot be set as macros +# +# NOTE: +# At this moment only few packages use this features. + +# How verbose the .rpm scripts/triggers should be? +RPM_SCRIPTVERBOSITY=5 + +# Should unused users be removed at package deinstallation? +RPM_USERDEL=yes + +# Should automatic restarts from rpm upgrades be skipped? +# You can also disable this per service, if service supports it from +# /etc/sysconfig/SERVICE +#RPM_SKIP_AUTO_RESTART=yes