[gentoo-commits] repo/gentoo:master commit in: sys-devel/prelink/files/, sys-devel/prelink/

2020-06-04 Thread Sergei Trofimovich
commit: 846d4eae241320579e3ca95a947d40e283ea6eab
Author: Andrew Udvare  gmail  com>
AuthorDate: Tue Jun  2 05:58:43 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Jun  4 20:52:56 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=846d4eae

sys-devel/prelink: add systemd timer

Signed-off-by: Andrew Udvare  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16047
Signed-off-by: Sergei Trofimovich  gentoo.org>

 sys-devel/prelink/files/prelink.service |  6 ++
 sys-devel/prelink/files/prelink.timer   | 10 ++
 ...elink-.ebuild => prelink-20151030-r1.ebuild} | 17 -
 sys-devel/prelink/prelink-.ebuild   |  3 ++-
 4 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/sys-devel/prelink/files/prelink.service 
b/sys-devel/prelink/files/prelink.service
new file mode 100644
index 000..dcdbf813a0e
--- /dev/null
+++ b/sys-devel/prelink/files/prelink.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Perform system-wide prelinking
+
+[Service]
+Type=oneshot
+ExecStart=/etc/cron.daily/prelink

diff --git a/sys-devel/prelink/files/prelink.timer 
b/sys-devel/prelink/files/prelink.timer
new file mode 100644
index 000..5d58d437158
--- /dev/null
+++ b/sys-devel/prelink/files/prelink.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Daily system-wide prelinking
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
+
+[Install]
+WantedBy=timers.target

diff --git a/sys-devel/prelink/prelink-.ebuild 
b/sys-devel/prelink/prelink-20151030-r1.ebuild
similarity index 79%
copy from sys-devel/prelink/prelink-.ebuild
copy to sys-devel/prelink/prelink-20151030-r1.ebuild
index 705ff619963..596f57b3912 100644
--- a/sys-devel/prelink/prelink-.ebuild
+++ b/sys-devel/prelink/prelink-20151030-r1.ebuild
@@ -6,14 +6,16 @@ EAPI="7"
 MY_PN="${PN}-cross"
 MY_P="${MY_PN}-${PV}"
 
-inherit autotools flag-o-matic git-r3
+inherit autotools flag-o-matic systemd
 
 DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in 
faster load times"
 HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ 
https://people.redhat.com/jakub/prelink;
-EGIT_REPO_URI="https://git.yoctoproject.org/git/prelink-cross;
+SRC_URI="https://git.yoctoproject.org/cgit/cgit.cgi/${MY_PN}/snapshot/${MY_P}.tar.bz2
+   doc? ( https://people.redhat.com/jakub/prelink/prelink.pdf )"
 
 LICENSE="GPL-2"
 SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
 IUSE="doc selinux"
 
 RDEPEND=">=dev-libs/elfutils-0.100
@@ -22,6 +24,8 @@ RDEPEND=">=dev-libs/elfutils-0.100
 DEPEND="${RDEPEND}
sys-libs/binutils-libs"
 
+S=${WORKDIR}/${MY_P}
+
 PATCHES=(
"${FILESDIR}"/${PN}-20130503-prelink-conf.patch
"${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
@@ -41,16 +45,10 @@ src_configure() {
econf $(use_enable selinux)
 }
 
-src_test() {
-   # prelink tests check exact library lists.
-   # LD_PRELOADed libraries break the assumption.
-   SANDBOX_ON=0 LD_PRELOAD= emake check VERBOSE=1
-}
-
 src_install() {
default
 
-   use doc && dodoc doc/prelink.pdf
+   use doc && dodoc "${DISTDIR}"/prelink.pdf
 
insinto /etc
doins doc/prelink.conf
@@ -58,6 +56,7 @@ src_install() {
exeinto /etc/cron.daily
newexe "${FILESDIR}"/prelink.cron prelink
newconfd "${FILESDIR}"/prelink.confd prelink
+   systemd_dounit "${FILESDIR}"/prelink.{service,timer}
 }
 
 pkg_postinst() {

diff --git a/sys-devel/prelink/prelink-.ebuild 
b/sys-devel/prelink/prelink-.ebuild
index 705ff619963..dfe534db619 100644
--- a/sys-devel/prelink/prelink-.ebuild
+++ b/sys-devel/prelink/prelink-.ebuild
@@ -6,7 +6,7 @@ EAPI="7"
 MY_PN="${PN}-cross"
 MY_P="${MY_PN}-${PV}"
 
-inherit autotools flag-o-matic git-r3
+inherit autotools flag-o-matic git-r3 systemd
 
 DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in 
faster load times"
 HOMEPAGE="https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/ 
https://people.redhat.com/jakub/prelink;
@@ -58,6 +58,7 @@ src_install() {
exeinto /etc/cron.daily
newexe "${FILESDIR}"/prelink.cron prelink
newconfd "${FILESDIR}"/prelink.confd prelink
+   systemd_dounit "${FILESDIR}"/prelink.{service,timer}
 }
 
 pkg_postinst() {



[gentoo-commits] repo/gentoo:master commit in: sys-devel/prelink/files/

2020-05-21 Thread Sergei Trofimovich
commit: ea5297138e101b1058f021bec3d26f8b2e14b057
Author: Michael Mair-Keimberger  gmail  com>
AuthorDate: Wed May 20 15:44:28 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu May 21 08:22:46 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea529713

sys-devel/prelink: remove unused patch

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Michael Mair-Keimberger  gmail.com>
Signed-off-by: Sergei Trofimovich  gentoo.org>

 sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch | 12 
 1 file changed, 12 deletions(-)

diff --git a/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch 
b/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch
deleted file mode 100644
index 896101040b5..000
--- a/sys-devel/prelink/files/prelink-armhf-dynamic-linker.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp prelink_orig/src/arch-arm.c prelink/src/arch-arm.c
 prelink_orig/src/arch-arm.c2011-08-26 03:20:49.0 -0400
-+++ prelink/src/arch-arm.c 2012-11-28 23:59:28.030164736 -0500
-@@ -832,7 +832,7 @@ PL_ARCH = {
-   .R_COPY = R_ARM_COPY,
-   .R_RELATIVE = R_ARM_RELATIVE,
-   .rtype_class_valid = RTYPE_CLASS_VALID,
--  .dynamic_linker = "/lib/ld-linux.so.3",
-+  .dynamic_linker = "/lib/ld-linux-armhf.so.3",
-   .adjust_dyn = arm_adjust_dyn,
-   .adjust_rel = arm_adjust_rel,
-   .adjust_rela = arm_adjust_rela,



[gentoo-commits] repo/gentoo:master commit in: sys-devel/prelink/files/

2019-08-23 Thread Sergei Trofimovich
commit: d1be2b4aae769dc42b8dee38ebac5439458207ff
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Aug 23 06:48:10 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Aug 23 06:49:01 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1be2b4a

sys-devel/prelink: ignore warnings from 'ldd /sbin/init'

/sbin/init might not exist at all. Let's not generate
text output in this case.

Reported-by: Anthony Parsons
Closes: https://bugs.gentoo.org/678348
Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich  gentoo.org>

 sys-devel/prelink/files/prelink.cron | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-devel/prelink/files/prelink.cron 
b/sys-devel/prelink/files/prelink.cron
index a3edc429fee..067fc2ea97a 100644
--- a/sys-devel/prelink/files/prelink.cron
+++ b/sys-devel/prelink/files/prelink.cron
@@ -55,7 +55,7 @@ fi
 echo /usr/sbin/prelink -av $PRELINK_OPTS > ${log}
 /usr/sbin/prelink -av $PRELINK_OPTS >> ${log} 2>&1 \
   || echo Prelink failed with return value $? >> ${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
+# Restart init if needed (and if exists)
+[ -n "$(find `ldd /sbin/init 2>/dev/null | awk 'NF == 4 { print $3 }'` 
/sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
 
 exit 0



[gentoo-commits] repo/gentoo:master commit in: sys-devel/prelink/files/, sys-devel/prelink/

2016-01-04 Thread Mike Frysinger
commit: 4f0828759b7a0efbded6036ad144b94ba6fc2acd
Author: Mike Frysinger  gentoo  org>
AuthorDate: Tue Jan  5 00:27:06 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Tue Jan  5 00:38:22 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f082875

sys-devel/prelink: clean up files in /var

We don't need the state/log files to exist ahead of time (as the cronjob
will create them on demand), so punt them entirely to clean things up.

Also update to EAPI=5 while we're here, and punt an old unused patch.

 .../files/prelink-20061201-prelink-conf.patch  | 31 -
 sys-devel/prelink/prelink-20130503-r1.ebuild   | 79 ++
 2 files changed, 79 insertions(+), 31 deletions(-)

diff --git a/sys-devel/prelink/files/prelink-20061201-prelink-conf.patch 
b/sys-devel/prelink/files/prelink-20061201-prelink-conf.patch
deleted file mode 100644
index 9397088..000
--- a/sys-devel/prelink/files/prelink-20061201-prelink-conf.patch
+++ /dev/null
@@ -1,31 +0,0 @@
 doc/prelink.conf.orig  2008-08-29 08:18:59.0 -0400
-+++ doc/prelink.conf   2008-08-29 08:21:48.0 -0400
-@@ -16,8 +16,11 @@
- -b *.a
- -b *.js
- -b /lib/modules
---b /usr/lib/locale
---b /usr/X11R6/lib{,64}/X11/xfig
-+-b /usr/lib{,32,64}/locale
-+-b /usr/lib{,32,64}/wine
-+-b /usr/lib{,32,64}/valgrind
-+-b /usr/X11R6/lib{,32,64}/X11/xfig
-+-b /usr/src
- -l /bin
- -l /usr/bin
- -l /sbin
-@@ -27,9 +30,9 @@
- -l /usr/games
- -l /usr/libexec
- -l /var/ftp/bin
---l /lib{,64}
---l /usr/lib{,64}
---l /usr/X11R6/lib{,64}
---l /usr/kerberos/lib{,64}
-+-l /lib{,32,64}
-+-l /usr/lib{,32,64}
-+-l /usr/X11R6/lib{,32,64}
-+-l /usr/kerberos/lib{,32,64}
- -l /usr/X11R6/LessTif
---l /var/ftp/lib{,64}
-+-l /var/ftp/lib{,32,64}

diff --git a/sys-devel/prelink/prelink-20130503-r1.ebuild 
b/sys-devel/prelink/prelink-20130503-r1.ebuild
new file mode 100644
index 000..7e13d8d
--- /dev/null
+++ b/sys-devel/prelink/prelink-20130503-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Modifies ELFs to avoid runtime symbol resolutions resulting in 
faster load times"
+HOMEPAGE="https://people.redhat.com/jakub/prelink;
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+#SRC_URI="https://people.redhat.com/jakub/prelink/${P}.tar.bz2;
+
+# if not available on jakub's dev space extract the distfile with rpm2tarbz2 
from
+# 
https://mirrors.kernel.org/fedora/development/rawhide/source/SRPMS/p/prelink-[ver].src.rpm
+#
+# track http://pkgs.fedoraproject.org/cgit/prelink.git/ for updates
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 -arm ~ppc ~ppc64 ~x86"
+IUSE="selinux"
+
+DEPEND=">=dev-libs/elfutils-0.100[static-libs(+)]
+   selinux? ( sys-libs/libselinux[static-libs(+)] )
+   !dev-libs/libelf
+   >=sys-libs/glibc-2.8"
+RDEPEND="${DEPEND}
+   >=sys-devel/binutils-2.18"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+   epatch "${FILESDIR}"/${PN}-20130503-prelink-conf.patch
+   epatch "${FILESDIR}"/${PN}-20130503-libiberty-md5.patch
+   epatch "${FILESDIR}"/${PN}-armhf-dynamic-linker.patch
+
+   sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die 
#469126
+
+   sed -i -e '/^CC=/s: : -Wl,--disable-new-dtags :' testsuite/functions.sh 
#100147
+   # >=binutils-2.22 --no-copy-dt-needed-entries is the default
+   # --copy-dt-needed-entries was renamed from --add-needed in 2.21, use 
the
+   # former so we don't have to bump the dep
+   sed -i \
+   -e '/CCLINK=/s:CCLINK="$(CC):& -Wl,--add-needed :' \
+   -e '/CXXLINK=/s:CXXLINK="$(CXX):& -Wl,--add-needed :' \
+   testsuite/Makefile.am
+
+   has_version 'dev-libs/elfutils[threads]' && append-ldflags -pthread
+
+   eautoreconf # prevent maintainer mode
+
+   # have to do this after eautoreconf or automake barfs on the trailing
+   # backslash of the previous line
+   sed -i -e 's:undosyslibs.sh::' testsuite/Makefile.in #254201
+
+   export 
ac_cv_{header_selinux_selinux_h,lib_selinux_is_selinux_enabled}=$(usex selinux)
+}
+
+src_install() {
+   default
+
+   insinto /etc
+   doins doc/prelink.conf
+
+   exeinto /etc/cron.daily
+   newexe "${FILESDIR}"/prelink.cron prelink
+   newconfd "${FILESDIR}"/prelink.confd prelink
+}
+
+pkg_postinst() {
+   if [ -z "${REPLACING_VERSIONS}" ] ; then
+   elog "You may wish to read the Gentoo Linux Prelink Guide, 
which can be"
+   elog "found online at:"
+   elog "https://wiki.gentoo.org/wiki/Prelink;
+   elog "Please edit /etc/conf.d/prelink to enable and configure 
prelink"
+   fi
+}