scripts: introduced tmpdir.sh
This commit is contained in:
parent
54aa57d2a3
commit
3d7945aad6
@ -473,6 +473,7 @@ fi
|
||||
%rpmattr %_rpmlibdir/shebang.*
|
||||
%rpmattr %_rpmlibdir/static.*
|
||||
%rpmattr %_rpmlibdir/symlinks.*
|
||||
%rpmattr %_rpmlibdir/tmpdir.sh
|
||||
%rpmattr %_rpmlibdir/verify-elf
|
||||
%rpmattr %_rpmlibdir/*.awk
|
||||
# set-version helpers
|
||||
|
@ -28,6 +28,7 @@ EXTRA_DIST = \
|
||||
strip_files \
|
||||
static.req static.req.files \
|
||||
symlinks.req symlinks.req.files \
|
||||
tmpdir.sh \
|
||||
verify-elf
|
||||
|
||||
installprefix = $(DESTDIR)
|
||||
@ -62,6 +63,7 @@ config_SCRIPTS = \
|
||||
strip_files \
|
||||
static.req static.req.files \
|
||||
symlinks.req symlinks.req.files \
|
||||
tmpdir.sh \
|
||||
verify-elf
|
||||
|
||||
install-data-local:
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# fixup-binconfig - /usr/bin/*-config fixups.
|
||||
#
|
||||
# Copyright (C) 2002,2004,2006,2008,2011 Dmitry V. Levin <ldv@altlinux.org>
|
||||
# Copyright (C) 2002,2004,2006,2008 Dmitry V. Levin <ldv@altlinux.org>
|
||||
#
|
||||
# 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
|
||||
@ -22,19 +22,10 @@
|
||||
. @RPMCONFIGDIR@/functions
|
||||
ValidateBuildRoot
|
||||
|
||||
exit_handler()
|
||||
{
|
||||
rm -rf -- "$WORKDIR"
|
||||
exit $1
|
||||
}
|
||||
|
||||
trap 'exit 143' HUP INT QUIT PIPE TERM
|
||||
WORKDIR="$(mktemp -dt "$PROG.XXXXXXXXXX")"
|
||||
trap 'exit_handler $?' EXIT
|
||||
|
||||
TMPFILE="$WORKDIR/tmp"
|
||||
f_saved="$WORKDIR/sav"
|
||||
f_new="$WORKDIR/new"
|
||||
. @RPMCONFIGDIR@/tmpdir.sh
|
||||
TMPFILE="$tmpdir/tmp"
|
||||
f_saved="$tmpdir/sav"
|
||||
f_new="$tmpdir/new"
|
||||
|
||||
: ${RPM_FIXUP_SKIPLIST:=}
|
||||
|
||||
|
@ -22,15 +22,8 @@
|
||||
. @RPMCONFIGDIR@/functions
|
||||
ValidateBuildRoot
|
||||
|
||||
exit_handler()
|
||||
{
|
||||
rm -f -- "$TMPFILE"
|
||||
exit $1
|
||||
}
|
||||
|
||||
trap 'exit 143' HUP INT QUIT PIPE TERM
|
||||
TMPFILE="$(mktemp -t "$PROG.XXXXXXXXXX")"
|
||||
trap 'exit_handler $?' EXIT
|
||||
. @RPMCONFIGDIR@/tmpdir.sh
|
||||
TMPFILE=$tmpdir/tmp
|
||||
|
||||
: ${RPM_FIXUP_SKIPLIST:=}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# fixup-pkgconfig - /usr/lib/pkgconfig/*.pc fixups.
|
||||
#
|
||||
# Copyright (C) 2002,2003,2004,2006,2008,2011 Dmitry V. Levin <ldv@altlinux.org>
|
||||
# Copyright (C) 2002,2003,2004,2006,2008 Dmitry V. Levin <ldv@altlinux.org>
|
||||
#
|
||||
# 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
|
||||
@ -22,15 +22,8 @@
|
||||
. @RPMCONFIGDIR@/functions
|
||||
ValidateBuildRoot
|
||||
|
||||
exit_handler()
|
||||
{
|
||||
rm -f -- "$TMPFILE"
|
||||
exit $1
|
||||
}
|
||||
|
||||
trap 'exit 143' HUP INT QUIT PIPE TERM
|
||||
TMPFILE="$(mktemp -t "$PROG.XXXXXXXXXX")"
|
||||
trap 'exit_handler $?' EXIT
|
||||
. @RPMCONFIGDIR@/tmpdir.sh
|
||||
TMPFILE=$tmpdir/tmp
|
||||
|
||||
: ${RPM_FIXUP_SKIPLIST:=}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh -efu
|
||||
#
|
||||
# Copyright (C) 2000-2006,2008,2011 Dmitry V. Levin <ldv@altlinux.org>
|
||||
# Copyright (C) 2000-2006,2008 Dmitry V. Levin <ldv@altlinux.org>
|
||||
# Copyright (C) 2007-2010 Alexey Tourbin <at@altlinux.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
@ -33,16 +33,7 @@ RPM_FINDREQ_RPATH="/$RPM_LIB $RPM_LIBDIR $("$dump_ld_config")"
|
||||
RPM_FINDREQ_RPATH="$("$dump_ld_config" '' "$RPM_BUILD_ROOT") $RPM_FINDREQ_RPATH"
|
||||
Debug "RPM_FINDREQ_RPATH=$RPM_FINDREQ_RPATH"
|
||||
|
||||
Cleanup()
|
||||
{
|
||||
rm -rf -- "$tmpdir"
|
||||
exit $1
|
||||
}
|
||||
|
||||
trap 'exit 143' HUP INT QUIT PIPE TERM
|
||||
tmpdir=$(mktemp -dt "$PROG.XXXXXXXX")
|
||||
trap 'Cleanup $?' EXIT
|
||||
|
||||
. @RPMCONFIGDIR@/tmpdir.sh
|
||||
>"$tmpdir"/lib2dep
|
||||
>"$tmpdir"/sym2lib
|
||||
>"$tmpdir"/versioned
|
||||
|
11
scripts/tmpdir.sh
Normal file
11
scripts/tmpdir.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
remove_tmpdir()
|
||||
{
|
||||
rm -rf -- "$tmpdir"
|
||||
exit $1
|
||||
}
|
||||
|
||||
trap 'exit 143' HUP INT QUIT PIPE TERM
|
||||
tmpdir=$(mktemp -dt "${0##*/}.XXXXXXXX")
|
||||
trap 'remove_tmpdir $?' EXIT
|
Loading…
Reference in New Issue
Block a user