GithubHelp home page GithubHelp logo

importpatches's Introduction

importpatches's People

Contributors

encukou avatar frenzymadness avatar hroncok avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hroncok encukou

importpatches's Issues

RFE: Automated exportpatches tool, reverse of importpatches

I'd like to be able to construct the content of a git branch from dist-git. If done nicely, we can automate creating tags in https://github.com/fedora-python/cpython whenever Koji build happens - that way we could stop caring about the tags and branch content manually and the entire workflow would be much simplicifed.

My idea for exportpatches is that it will:

  1. look for the Python version in the spec file and git reset --hard to the appropriate @python/cpython v%{version} git tag
  2. git am the patches from the spec file, one by one, ideally using --committer-date-is-author-date for a reproducible commit hash -- he commit messages are included in the patches, so we don't parse them from the specfile comments -- we only use the spec to get the list of patch files
  3. create the fedora-%{version}-%{release} tag (release might as well contain the dist tag, so we can apply this behavior to diverged patches, like 251) and push it to @fedora-python/cpython (if enabled)
  4. git reset --hard the fedora-%{version}to what we have just created and push force that one (if enabled)

I'd like to have this reproducible. When a new patch is added on top, we want a new commit on top, not an entirely fresh set of commits. I believe --committer-date-is-author-date should make that happen, but will see. Also when run from different machines, the commit hashes should remain identical.

When the 189 patch trailer is not in the spec, don't add it

In here, https://src.fedoraproject.org/rpms/python3.6/c/ca58751035496b75ebc1a5dd46ebdbecca825a14?branch=rawhide @frenzymadness removed:

-# The following versions of setuptools/pip are bundled when this patch is not applied.
-# The versions are written in Lib/ensurepip/__init__.py, this patch removes them.
-# When the bundled setuptools/pip wheel is updated, the patch no longer applies cleanly.
-# In such cases, the patch needs to be amended and the versions updated here:
-%global pip_version 18.1
-%global setuptools_version 40.6.2

At that time, I have not considered the removal a problem. It made sense.

However, now @stratakis adds a new patch to python3.6 and improtpatches add this blurb back.

Maybe importpatches could skip adding this blurb when:

  • patch 189 is unchanged
  • the blurb was not there before improtpatches run

WDYT?

Inconsistent output with git 2.29+ (index abbrev length)

I have git 2.29 installed. When I run imprtpatches on a repo where I expect no difference, I get:

diff --git a/00001-rpath.patch b/00001-rpath.patch
index aad3612..e0792a4 100644
--- a/00001-rpath.patch
+++ b/00001-rpath.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard
  1 file changed, 9 insertions(+)
 
 diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
-index 4d7a6de740..353086a648 100644
+index 4d7a6de740ab3a647a6a2157c0e1dae4b7a10fd4..353086a648db13b85791299cd7483724892f260e 100644
 --- a/Lib/distutils/unixccompiler.py
 +++ b/Lib/distutils/unixccompiler.py
 @@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler):
diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch
index d78e1a6..d7fd3be 100644
--- a/00111-no-static-lib.patch
+++ b/00111-no-static-lib.patch
@@ -21,7 +21,7 @@ Co-authored-by: Miro Hrončok <[email protected]>
  1 file changed, 2 insertions(+), 19 deletions(-)
 
 diff --git a/Makefile.pre.in b/Makefile.pre.in
-index 921bd08ea5..ddc55fa410 100644
+index 921bd08ea505d6c2e58e973aa5a4de5f46e2dfdd..ddc55fa41002d3aedf79df466f4fd7522be27e46 100644
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
 @@ -576,7 +576,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
diff --git a/00189-use-rpm-wheels.patch b/00189-use-rpm-wheels.patch
index 58c417f..0318a21 100644
--- a/00189-use-rpm-wheels.patch
+++ b/00189-use-rpm-wheels.patch
@@ -12,7 +12,7 @@ We might eventually pursuit upstream support, but it's low prio
  1 file changed, 22 insertions(+), 11 deletions(-)
 
 diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
-index cb2882e336..984e587ea0 100644
+index cb2882e3360fcf25ba802a4788000fb6f2649d92..984e587ea03ee8df80e8f3b513e6210137b4f4ff 100644
 --- a/Lib/ensurepip/__init__.py
 +++ b/Lib/ensurepip/__init__.py
 @@ -1,3 +1,5 @@
diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch
index 1d87214..59aae86 100644
--- a/00251-change-user-install-location.patch
+++ b/00251-change-user-install-location.patch
@@ -15,7 +15,7 @@ Downstream only: Awaiting resources to work on upstream PEP
  2 files changed, 21 insertions(+), 3 deletions(-)
 
 diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
-index aaa300efa9..f8d453912a 100644
+index aaa300efa96e6e2c2ebcd0a73cd9a4ceba1d30df..f8d453912af40653d8577f7a150caf2b53eca2c9 100644
 --- a/Lib/distutils/command/install.py
 +++ b/Lib/distutils/command/install.py
 @@ -419,8 +419,19 @@ class install(Command):
@@ -41,7 +41,7 @@ index aaa300efa9..f8d453912a 100644
              else:
                  if self.exec_prefix is None:
 diff --git a/Lib/site.py b/Lib/site.py
-index 4d3b869fff..aee20de308 100644
+index 4d3b869fff77a0e5d5b22e3867182da94df2c994..aee20de308b3f8cd1c8cb21f27c937f34a3a2543 100644
 --- a/Lib/site.py
 +++ b/Lib/site.py
 @@ -364,8 +364,15 @@ def getsitepackages(prefixes=None):
diff --git a/00328-pyc-timestamp-invalidation-mode.patch b/00328-pyc-timestamp-invalidation-mode.patch
index 011e0f6..463ca05 100644
--- a/00328-pyc-timestamp-invalidation-mode.patch
+++ b/00328-pyc-timestamp-invalidation-mode.patch
@@ -19,7 +19,7 @@ Ideally, we should talk to upstream and explain why we don't want this
  2 files changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/Lib/py_compile.py b/Lib/py_compile.py
-index 0f9b59025c..59dc3fe50b 100644
+index 0f9b59025cee384de3ca66ec8bada37850226a86..59dc3fe50b5a494938d3feba12a3e1c21b3d95fe 100644
 --- a/Lib/py_compile.py
 +++ b/Lib/py_compile.py
 @@ -70,7 +70,8 @@ class PycInvalidationMode(enum.Enum):
@@ -33,7 +33,7 @@ index 0f9b59025c..59dc3fe50b 100644
      else:
          return PycInvalidationMode.TIMESTAMP
 diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
-index b58f28a4bc..7ede33d6c9 100644
+index b58f28a4bc8885542b4ef95d80c7fe956e972b4b..7ede33d6c9ee7db564f163e370097c3034a9ab40 100644
 --- a/Lib/test/test_py_compile.py
 +++ b/Lib/test/test_py_compile.py
 @@ -19,6 +19,7 @@ def without_source_date_epoch(fxn):

I wonder whether there is a compatibility option to use shorter hashes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.