automatic update by autodist [release 20130503-1mamba;Wed Jul 24 2013]

This commit is contained in:
Automatic Build System 2024-01-06 10:30:17 +01:00
parent cc883ffc76
commit 5e6c1a6dde
5 changed files with 251 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# prelink
ELF prelinking utility to speed up dynamic linking.

prelink.conf Normal file
View File

@ -0,0 +1,32 @@
# This config file contains a list of directories both with binaries
# and libraries prelink should consider by default.
# If a directory name is prefixed with `-l ', the directory hierarchy
# will be walked as long as filesystem boundaries are not crossed.
# If a directory name is prefixed with `-h ', symbolic links in a
# directory hierarchy are followed.
# Directories or files with `-b ' prefix will be blacklisted.
# `-c ' is used to source additional config file snippets.
-c /etc/prelink.conf.d/*.conf
-b *.la
-b *.png
-b *.py
-b *.pl
-b *.pm
-b *.sh
-b *.xml
-b *.xslt
-b *.a
-b *.js
-b /lib/modules
-b /usr/lib/locale
-l /bin
-l /usr/bin
-l /sbin
-l /usr/sbin
-l /usr/kerberos/bin
-l /usr/games
-l /usr/libexec
-l /var/ftp/bin
-l /lib{,64}
-l /usr/lib{,64}
-l /var/ftp/lib{,64}

prelink.cron Normal file
View File

@ -0,0 +1,51 @@
. /etc/sysconfig/prelink
renice +19 -p $$ >/dev/null 2>&1
if [ "$PRELINKING" != yes ]; then
if [ -f /etc/prelink.cache ]; then
echo /usr/sbin/prelink -uav > /var/log/prelink/prelink.log
/usr/sbin/prelink -uav >> /var/log/prelink/prelink.log 2>&1 \
|| echo Prelink failed with return value $? >> /var/log/prelink/prelink.log
rm -f /etc/prelink.cache
# Restart init if needed
[ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
exit 0
if [ ! -f /etc/prelink.cache -o -f /var/lib/prelink/force ] \
|| grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then
# If cache does not exist or is from older prelink versions or
# if we were asked to explicitely, force full prelinking
rm -f /etc/prelink.cache /var/lib/prelink/force
date > /var/lib/prelink/full
cp -a /var/lib/prelink/{full,quick}
-a "`find /var/lib/prelink/full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \
= /var/lib/prelink/full ]; then
# If no more than PRELINK_NONRPM_CHECK_INTERVAL days elapsed from last prelink
# (be it full or quick) and no packages have been upgraded via rpm since then,
# don't do anything.
[ "`find /var/lib/prelink/quick -mtime -${PRELINK_NONRPM_CHECK_INTERVAL:-7} 2>/dev/null`" \
-a -f /var/lib/rpm/Packages \
-a /var/lib/rpm/Packages -ot /var/lib/prelink/quick ] && exit 0
date > /var/lib/prelink/quick
# If prelink without -q has been run in the last
# PRELINK_FULL_TIME_INTERVAL days, just use quick mode
date > /var/lib/prelink/full
cp -a /var/lib/prelink/{full,quick}
echo /usr/sbin/prelink -av $PRELINK_OPTS > /var/log/prelink/prelink.log
/usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink/prelink.log 2>&1 \
|| echo Prelink failed with return value $? >> /var/log/prelink/prelink.log
# Restart init if needed
[ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
exit 0

prelink.spec Normal file
View File

@ -0,0 +1,129 @@
Name: prelink
Version: 20130503
Release: 1mamba
Summary: ELF prelinking utility to speed up dynamic linking
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <>
# SOURCE1: see doc/prelink.conf
Source1: prelink.conf
Source2: prelink.cron
Source3: prelink.sysconfig
License: GPL
BuildRequires: libelf-devel
BuildRequires: libselinux-devel
BuildRequires: transfig
BuildRequires: tetex
BuildRequires: tetex-latex
BuildRoot: %{_tmppath}/%{name}-%{version}-root
ELF prelinking utility to speed up dynamic linking.
%package doc
Summary: Documentation for the prelink tool
Group: Documentation
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description doc
ELF prelinking utility to speed up dynamic linking.
This package includes pdf documentation for for prelink.
%setup -q -n %{name}
%configure \
--disable-shared \
#% ifnarch arm
#make -C testsuite check-harder
#make -C testsuite check-cycle
#% endif
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -d %{buildroot}%{_sysconfdir}/{cron.daily,sysconfig,prelink.conf.d}
install -m644 %{S:1} %{buildroot}%{_sysconfdir}/prelink.conf
install -m755 %{S:2} %{buildroot}%{_sysconfdir}/cron.daily/prelink
install -m644 %{S:3} %{buildroot}%{_sysconfdir}/sysconfig/prelink
install -d %{buildroot}/var/lib/prelink
touch %{buildroot}/var/lib/prelink/full
touch %{buildroot}/var/lib/prelink/quick
touch %{buildroot}/var/lib/prelink/force
install -d %{buildroot}/var/log/prelink
touch %{buildroot}/var/log/prelink/prelink.log
#install -d %{buildroot}%{_sysconfdir}/rpm
#cat > %{buildroot}%{_sysconfdir}/rpm/macros.prelink <<"EOF"
## rpm-4.1 verifies prelinked libraries using a prelink undo helper.
## Note: The 2nd token is used as argv[0] and "library" is a
## placeholder that will be deleted and replaced with the appropriate
## library file path.
##%%__prelink_undo_cmd /usr/sbin/prelink prelink -y library
#chmod 644 %{buildroot}%{_sysconfdir}/rpm/macros.prelink
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
touch /var/lib/prelink/force
exit 0
%config(noreplace) %{_sysconfdir}/prelink.conf
%config(noreplace) %{_sysconfdir}/sysconfig/prelink
%dir %attr(0755,root,root) %{_sysconfdir}/prelink.conf.d
%dir /var/lib/prelink
%attr(0644,root,root) %ghost %config(missingok,noreplace) /var/lib/prelink/full
%attr(0644,root,root) %ghost %config(missingok,noreplace) /var/lib/prelink/quick
%attr(0644,root,root) %ghost %config(missingok,noreplace) /var/lib/prelink/force
%dir /var/log/prelink
%attr(0644,root,root) %ghost %config(missingok,noreplace) /var/log/prelink/prelink.log
%files doc
%doc doc/prelink.pdf
* Wed Jul 24 2013 Automatic Build System <> 20130503-1mamba
- automatic update by autodist
* Fri Oct 14 2011 Automatic Build System <> 20111012-1mamba
- automatic version update by autodist
* Wed Dec 22 2010 Davide Madrisan <> 20100106-1mamba
- update to 20100106
- move files from /var/lib/misc to /var/lib/prelink/
- own /var/log/prelink
* Mon Jun 29 2009 Silvan Calarco <> 20061201-3mamba
- specfile updated and rebuilt
* Fri Feb 23 2007 Silvan Calarco <> 20061201-2qilnx
- prelink cron: add support for PRELINK_NOINITCHECK to disable relaunching init
* Fri Jan 19 2007 Davide Madrisan <> 20061201-1qilnx
- update to version 20061201 by autospec
* Fri Dec 23 2005 Davide Madrisan <> 20050610-1qilnx
- package created by autospec

prelink.sysconfig Normal file
View File

@ -0,0 +1,37 @@
# Set this to no to disable prelinking altogether
# (if you change this from yes to no prelink -ua
# will be run next night to undo prelinking)
# Options to pass to prelink
# -m Try to conserve virtual memory by allowing overlapping
# assigned virtual memory slots for libraries which
# never appear together in one binary
# -R Randomize virtual memory slot assignments for libraries.
# This makes it slightly harder for various buffer overflow
# attacks, since library addresses will be different on each
# host using -R.
# How often should full prelink be run (in days)
# Normally, prelink will be run in quick mode, every
# $PRELINK_FULL_TIME_INTERVAL days it will be run
# in normal mode. Comment it out if it should be run
# in normal mode always.
# How often should prelink run (in days) even if
# no packages have been upgraded via rpm.
# If $PRELINK_FULL_TIME_INTERVAL days have not elapsed
# yet since last normal mode prelinking, last
# quick mode prelinking happened less than
# and no packages have been upgraded by rpm
# since last quick mode prelinking, prelink
# will not do anything.
# Change to
# if you want to disable the rpm database timestamp
# check (especially if you don't use rpm/up2date/yum/apt-rpm
# exclusively to upgrade system libraries and/or binaries).