public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/abrt] update-2.17.8: specfile: remove no longer needed copying from old dump directory to new one.
@ 2026-08-03 10:22 Denys Vlasenko
0 siblings, 0 replies; only message in thread
From: Denys Vlasenko @ 2026-08-03 10:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/abrt
Branch : update-2.17.8
Commit : cb53a4ad192b9684a60f14f7461a0d0bfdadc64d
Author : Denys Vlasenko <dvlasenk@redhat.com>
Date : 2013-11-06T13:51:22+01:00
Stats : +0/-67 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/abrt/c/cb53a4ad192b9684a60f14f7461a0d0bfdadc64d?branch=update-2.17.8
Log:
specfile: remove no longer needed copying from old dump directory to new one.
Related to rhbz#971869.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Acked-by: Jakub Filak <jfilak@redhat.com>
---
diff --git a/abrt.spec b/abrt.spec
index 8f1f799..2c0d842 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -412,73 +412,6 @@ make check
%define abrt_gid_uid 173
getent group abrt >/dev/null || groupadd -f -g %{abrt_gid_uid} --system abrt
getent passwd abrt >/dev/null || useradd --system -g abrt -u %{abrt_gid_uid} -d /etc/abrt -s /sbin/nologin abrt
-
-OLD_LOCATION="/var/spool/abrt"
-NEW_LOCATION="/var/tmp/abrt"
-# $1 == 1 if install; 2 if upgrade
-if [ "$1" -eq 2 ]
-then
- test -d "$OLD_LOCATION" || exit 0
- mkdir -p "$NEW_LOCATION"
-
- #restorecon "$NEW_LOCATION"
- find "$OLD_LOCATION" -maxdepth 1 -type f -exec cp '{}' "$NEW_LOCATION" \;
-
- for DD in `find "$OLD_LOCATION" -maxdepth 1 -type d`
- do
- # skip dump location self
- if [ "$DD" == "$OLD_LOCATION" ]; then
- continue
- fi
-
- # skip symlinks
- if [ -L "$DD" ]; then
- continue
- fi
-
- # check if time element exists, if so then consider a directory as dump
- # directory and move it to the new location
- if [ -f "$DD/time" ]; then
- NEW_DD="$NEW_LOCATION/"`basename $DD`
-
- # to be sure we do not override anything
- if [ -d "$NEW_DD" ]; then
- continue
- fi
-
- if cp --recursive -- "$DD" "$NEW_DD"; then
- # owner of dump dir is identified by his group
- # so get the owner of dump dir
- OWNER_GID=`stat -c "%g" "$DD"`
-
- # use group's user in case where group contains only single user
- if [ $(getent passwd | cut -f3,4,5 -d: | grep -c ":$OWNER_GID:") -eq 1 ]; then
- OWNER_UID=`getent passwd | cut -f3,4,5 -d: | grep ":$OWNER_GID:" | cut -f1 -d:`
- else
- # otherwise get owner from dd's uid element
- OWNER_UID=`cat "$NEW_DD/uid"`
- fi
-
- getent passwd "$OWNER_UID" >/dev/null || {
- # if user doesn't exist pass the ownership to root
- OWNER_UID=0
- }
-
- # set new schema of ownership
- chown --recursive "$OWNER_UID":abrt "$NEW_DD" && {
- chmod 770 "$NEW_DD"
- find "$NEW_DD" -type d -exec chmod 770 '{}' \;
- find "$NEW_DD" -type f -exec chmod 660 '{}' \;
- }
- fi
- fi
- done
-fi
-
-# doesn't mather if it fails or not for any reason
-if which restorecon 1>/dev/null 2>&1; then
- restorecon -R "$NEW_LOCATION" 1>/dev/null 2>&1 || true
-fi
exit 0
%post
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-03 10:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 10:22 [rpms/abrt] update-2.17.8: specfile: remove no longer needed copying from old dump directory to new one Denys Vlasenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox