public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pcs] eln: remove update_times_patch
@ 2026-11-20 18:17 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-20 18:17 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/pcs
            Branch : eln
            Commit : e3dda6ada8bc0b4feb4b5228c0907069d2340fc2
            Author : Michal Pospíšil <mpospisi@redhat.com>
            Date   : 2026-11-18T16:20:01-05:00
            Stats  : +0/-45 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/pcs/c/e3dda6ada8bc0b4feb4b5228c0907069d2340fc2?branch=eln

            Log:
            remove update_times_patch

The reason for this mechnainsm to exist is supposedly an issue during
builds on different architectures producing slightly different results
due to different timestamps on files where patches were applied. There
is a possibility that this is no longer needed, so I'm trying to remove
it and it can be revrted anytime.

---
diff --git a/pcs.spec b/pcs.spec
index c9a761c..6232ba6 100644
--- a/pcs.spec
+++ b/pcs.spec
@@ -314,45 +314,6 @@ Pacemaker/Corosync Configuration System (pcs) in the background.
 
 
 %prep
-# -- following is inspired by python-simplejon.el5 --
-# Update timestamps on the files touched by a patch, to avoid non-equal
-# .pyc/.pyo files across the multilib peers within a build
-
-update_times(){
-  # update_times <reference_file> <file_to_touch> ...
-  # set the access and modification times of each file_to_touch to the times
-  # of reference_file
-
-  # put all args to file_list
-  file_list=("$@")
-  # first argument is reference_file: so take it and remove from file_list
-  reference_file=${file_list[0]}
-  unset file_list[0]
-
-  for fname in ${file_list[@]}; do
-    # some files could be deleted by a patch therefore we test file for
-    # existance before touch to avoid exit with error: No such file or
-    # directory
-    # diffstat cannot create list of files without deleted files
-    test -e $fname && touch -r $reference_file $fname
-  done
-}
-
-update_times_patch(){
-  # update_times_patch <patch_file_name>
-  # set the access and modification times of each file in patch to the times
-  # of patch_file_name
-
-  patch_file_name=$1
-
-  # diffstat
-  # -l lists only the filenames. No histogram is generated.
-  # -p override the logic that strips common pathnames,
-  #    simulating the patch "-p" option. (Strip the smallest prefix containing
-  #    num leading slashes from each file name found in the patch file)
-  update_times ${patch_file_name} `diffstat -p1 -l ${patch_file_name}`
-}
-
 # documentation for setup/autosetup/autopatch:
 #   * http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
 #   * https://rpm-software-management.github.io/rpm/manual/autosetup.html
@@ -369,8 +330,6 @@ update_times_patch(){
 # patch pycurl sources
 %autosetup -T -b 23 -n %{pycurl_src_name} -N
 %autopatch -p1 -m 401
-# update_times_patch %%{PATCH401}
-update_times_patch %{PATCH401}
 
 # repackaging patched pycurl and placing it into sources next to the untouched
 # original - it cannot be replaced, because rpmbuild -bp would fail on 2nd+ try
@@ -378,14 +337,10 @@ tar -c -f %{_sourcedir}/%{pycurl_src_name}-patched.tar.gz -z ../%{pycurl_src_nam
 
 %autosetup -T -b 100 -a 101 -N -n %{ui_src_name}
 %autopatch -p1 -m 201 -M 400
-# update_times_patch %%{PATCH201}
 
 # patch pcs sources
 %autosetup -S git -n %{pcs_source_name} -N
 %autopatch -p1 -M 200
-# update_times_patch %%{PATCH1}
-update_times_patch %{PATCH1}
-update_times_patch %{PATCH2}
 
 # generate .tarball-version if building from an untagged commit, not a released version
 # autogen uses git-version-gen which uses .tarball-version for generating version number

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-20 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20 18:17 [rpms/pcs] eln: remove update_times_patch 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox