public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Denys Vlasenko <dvlasenk@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/abrt] update-2.17.9-f44: specfile: remove no longer needed copying from old dump directory to new one.
Date: Mon, 03 Aug 2026 11:04:04 GMT	[thread overview]
Message-ID: <178575504456.1.11240069937581063736.rpms-abrt-cb53a4ad192b@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/abrt
            Branch : update-2.17.9-f44
            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.9-f44

            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

                 reply	other threads:[~2026-08-03 11:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178575504456.1.11240069937581063736.rpms-abrt-cb53a4ad192b@fedoraproject.org \
    --to=dvlasenk@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox