From 2dd2a15a7785f1233c18f32b803cd1e9339388be Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Aug 31 2017 18:17:26 +0000 Subject: Preserve mode of files when changing hashbang --- diff --git a/blueberry.spec b/blueberry.spec index 6aad716..9a4ca17 100644 --- a/blueberry.spec +++ b/blueberry.spec @@ -1,6 +1,6 @@ Name: blueberry Version: 1.1.15 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Bluetooth configuration tool License: GPLv3+ @@ -57,7 +57,9 @@ done for f in $(%{__grep} -Rl '#!.*python3') ; do %{__sed} -e 's~#!.*python3~#!/usr/bin/python2~g' < ${f} > ${f}.new /bin/touch -r ${f}.new ${f} + mode="$(%{_bindir}/stat -c '%a' ${f})" %{__mv} -f ${f}.new ${f} + %{__chmod} -c ${mode} ${f} done %endif # (0%%{?rhel} && 0%%{?rhel} >= 7) @@ -123,6 +125,9 @@ fi %changelog +* Thu Aug 31 2017 Björn Esser - 1.1.15-5 +- Preserve mode of files when changing hashbang + * Thu Aug 31 2017 Björn Esser - 1.1.15-4 - Fix regex for EPEL