unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74133: Some minor patches for the python script
@ 2024-10-31 11:02 Nikolaos Chatzikonstantinou
  2024-10-31 11:06 ` bug#74133: Wrong files attached Nikolaos Chatzikonstantinou
  0 siblings, 1 reply; 2+ messages in thread
From: Nikolaos Chatzikonstantinou @ 2024-10-31 11:02 UTC (permalink / raw)
  To: 74133

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

Hello,

From a quick discussion on IRC I've decided to contribute the
following two patches. The first is stylistic but the second is
something that was requested. Note that I've already assigned
copyright to the FSF for my contributions to Emacs.

Regards,
Nikolaos Chatzikonstantinou

[-- Attachment #2: 0002-download-zst-msys2-sources-before-gzip.patch.asc.asc --]
[-- Type: text/plain, Size: 228 bytes --]

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQT+qiF+WQ7fQkkAb/UJFDAFinzxjQUCZyNjjQAKCRAJFDAFinzx
jdQKAQCKXqJFxzoPveIrln/stYDBT5jBHTIXqj9QUtQcqWT/dwEA6Xr0/yOuqTou
7tes6FR5eMuanAqiRZ8ajRhyJzA0eA4=
=cWPQ
-----END PGP SIGNATURE-----

[-- Attachment #3: 0002-download-zst-msys2-sources-before-gzip.patch.asc --]
[-- Type: text/plain, Size: 1426 bytes --]

-----BEGIN PGP MESSAGE-----

owJ4nI1Vz28bRRR2Q4rUkUAgaA5ISK+OEDbxrNdrx04sQpyatLQoP4gLCCJkze7O
boZ4d1Y7s3Htthw4ISQQPSGuCAmpCIkDHIAbEhK9wIFbL/0DEAckClIPEW9tbxOo
UL2ydj1v3/ve9715b/ajRx7KkblTT5on37/6xwcnvnz4ol0xTdOiruyHPclcOlSa
BmqgLKpkEjtcUZt7MubUH4rIiJh29vx5+/BcLAPwLJNXa+6SV1/yrGXOmWWzBjNt
r97wzJrFuF1vuFbNgQ0ZQodHUGmAaTZHP7BMs0JSmCZsin3ZY1JBe4/pIS5CpVmo
RSgTeD50UmO1Umv5ARM9w5HBC+RFpnkTLu0lJahWYMvRCGfVwKw3a4vNxSpQs2aa
pJPYb3NHN2F3e+1S+yWwytZbkCkFVAojpTBRCmOlkColhLmBCMuhLrsCS2InoueW
R3fq8oiiizKiARR8pvd43B1DFFNOHKKYHwiZKHLAYyVQO1MqCbgLGqUA6/UmGUGz
2Malgj6f5AWUh+FKcddALKFAKBLKNKrPBgoRODhM8RJiIkrAgWGkDHsDYAdYHmb3
OIgwFWfA6ykVIWOhxZCTVG+GPiIVuuNA4cEow734PqJqzYNIjzgZhFJKYLqCXIUl
WBhdaUwFPIGAuIWhz90S1JGb4rHG/KqwUCyBBS7v8fGaFglxhecBpb5APuXpMtrT
+RERuvwy2LbpeQ1etWzPMEzLcrjNucs8wDloLC6mUqfNTFDk1NlbLaBWtdSAhdG9
1SIggkjGGrwkdLSUPXXPIiMeMy1jAoR66aCpxI5iiS2qMhdnjzv7XZnoKNFkYQqn
ErSx07i7PXZZj+MRPszPQ3syb0hgfWOt3elurF3c2um+tr7TubC1uZK3lvJj+ma9
tIz88VGpogLcOg/+1f8FVKyKTQLZheidvsAzA0IW4ISlrcbT/CweHHlF+343fQ8r
sPHq5vn1bmen3d1++XzH8LkuZG9L2Z8i8l7IYnGE0sZegfyVa/TKNUPFjoE2A415
A8c5YP9BmMxk8Sj9ZArvx/CHD4IgNAPJjpWsEhPQ4jGm8aB5tPqfGKR9LIRfdjgO
4f0792CgcXIYq8RTINSF/JsiikTo5yfaj7dHN2ADmxfy6RFEl8EwyjxgjqKjgqS7
SrHJ/T7t12s0LU/q91wepwWIZVSXjUVC3ktmc3Mk9/TcmdnDG2feeePR22cv5OSd
7GNzcib9buTIqccyy+43J3J3bt69SWdeeWrz9BfP/vXt4x/++PEPzZ8+/X72979X
V7/68yzJHRa7d3+9/l3xl91nbv28Gnx++rPfSteXzt2Y+XruXcP45ImZfwADiz7i
=WHoO
-----END PGP MESSAGE-----

[-- Attachment #4: 0001-add-docstrings.patch.asc --]
[-- Type: text/plain, Size: 228 bytes --]

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQT+qiF+WQ7fQkkAb/UJFDAFinzxjQUCZyNjiQAKCRAJFDAFinzx
jcNLAP9DtWVlcVWKjTMvhRZcXrvowjLOz3RloUHR7ELTNDhgngEA58GWtwFxwOCj
T1FD+wKU0gqk/SAAZbeO39whYY3uogY=
=dGP+
-----END PGP SIGNATURE-----

[-- Attachment #5: 0001-add-docstrings.patch --]
[-- Type: text/x-patch, Size: 1998 bytes --]

From 62a534d527b79a5ff62b73940e8f604f8db1f325 Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Date: Thu, 31 Oct 2024 06:37:31 -0400
Subject: [PATCH 1/2] add docstrings

* admin/nt/dist-build/build-dep-zips.py: Change some top-level comments
to docstrings.
---
 admin/nt/dist-build/build-dep-zips.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py
index 0b1cc4d8695..bb0ff7e32bf 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -62,8 +62,8 @@ def check_output_maybe(*args,**kwargs):
     else:
         return check_output(*args,**kwargs)
 
-## DLL Capture
 def gather_deps():
+    """DLL Capture"""
 
     os.mkdir("x86_64")
     os.chdir("x86_64")
@@ -78,13 +78,13 @@ def gather_deps():
                        shell=True)
     os.chdir("../")
 
-## Return all Emacs dependencies
 def full_dll_dependency():
+    """Return all Emacs dependencies"""
     deps = [dll_dependency(dep) for dep in DLL_REQ]
     return set(sum(deps, []) + DLL_REQ)
 
-## Dependencies for a given DLL
 def dll_dependency(dll):
+    """Dependencies for a given DLL"""
     output = check_output(["/mingw64/bin/ntldd", "--recursive",
                            "/mingw64/bin/{}*.dll".format(dll)]).decode("utf-8")
     ## munge output
@@ -141,8 +141,8 @@ def immediate_deps(pkgs):
     return dependencies
 
 
-## Extract all the msys2 packages that are dependencies of our direct dependencies
 def extract_deps():
+    """Extract all the msys2 packages that are dependencies of our direct dependencies"""
 
     print( "Extracting deps" )
 
@@ -178,8 +178,8 @@ def download_source(tarball):
                     "{}".format(tarball))
 
 
-## Fetch all the source code
 def gather_source(deps):
+    """Fetch all the source code"""
 
     if not os.path.exists("emacs-src-cache"):
         os.mkdir("emacs-src-cache")
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#74133: Wrong files attached
  2024-10-31 11:02 bug#74133: Some minor patches for the python script Nikolaos Chatzikonstantinou
@ 2024-10-31 11:06 ` Nikolaos Chatzikonstantinou
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolaos Chatzikonstantinou @ 2024-10-31 11:06 UTC (permalink / raw)
  To: 74133

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

Is there ever a time where gpg does not embarass me?

Re-attaching the correct files...

Regards,
Nikolaos Chatzikonstantinou

[-- Attachment #2: 0002-download-zst-msys2-sources-before-gzip.patch.asc --]
[-- Type: text/plain, Size: 228 bytes --]

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQT+qiF+WQ7fQkkAb/UJFDAFinzxjQUCZyNkpgAKCRAJFDAFinzx
jef9AP9MCzzUzy0yajHU2BAA2K2kgxP8wX5PMrNEILIaqicXqQD/Q4epjVEpCD4a
AX2V1/pFAVrVJaSkH2qx1gBieM/k3gQ=
=759y
-----END PGP SIGNATURE-----

[-- Attachment #3: 0001-add-docstrings.patch --]
[-- Type: text/x-patch, Size: 1998 bytes --]

From 62a534d527b79a5ff62b73940e8f604f8db1f325 Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Date: Thu, 31 Oct 2024 06:37:31 -0400
Subject: [PATCH 1/2] add docstrings

* admin/nt/dist-build/build-dep-zips.py: Change some top-level comments
to docstrings.
---
 admin/nt/dist-build/build-dep-zips.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py
index 0b1cc4d8695..bb0ff7e32bf 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -62,8 +62,8 @@ def check_output_maybe(*args,**kwargs):
     else:
         return check_output(*args,**kwargs)
 
-## DLL Capture
 def gather_deps():
+    """DLL Capture"""
 
     os.mkdir("x86_64")
     os.chdir("x86_64")
@@ -78,13 +78,13 @@ def gather_deps():
                        shell=True)
     os.chdir("../")
 
-## Return all Emacs dependencies
 def full_dll_dependency():
+    """Return all Emacs dependencies"""
     deps = [dll_dependency(dep) for dep in DLL_REQ]
     return set(sum(deps, []) + DLL_REQ)
 
-## Dependencies for a given DLL
 def dll_dependency(dll):
+    """Dependencies for a given DLL"""
     output = check_output(["/mingw64/bin/ntldd", "--recursive",
                            "/mingw64/bin/{}*.dll".format(dll)]).decode("utf-8")
     ## munge output
@@ -141,8 +141,8 @@ def immediate_deps(pkgs):
     return dependencies
 
 
-## Extract all the msys2 packages that are dependencies of our direct dependencies
 def extract_deps():
+    """Extract all the msys2 packages that are dependencies of our direct dependencies"""
 
     print( "Extracting deps" )
 
@@ -178,8 +178,8 @@ def download_source(tarball):
                     "{}".format(tarball))
 
 
-## Fetch all the source code
 def gather_source(deps):
+    """Fetch all the source code"""
 
     if not os.path.exists("emacs-src-cache"):
         os.mkdir("emacs-src-cache")
-- 
2.39.5


[-- Attachment #4: 0002-download-zst-msys2-sources-before-gzip.patch --]
[-- Type: text/x-patch, Size: 1555 bytes --]

From f20e34d8f68f29eea2ba7a0bf67f042aeb67d24c Mon Sep 17 00:00:00 2001
From: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Date: Thu, 31 Oct 2024 06:45:53 -0400
Subject: [PATCH 2/2] download zst msys2 sources before gzip

admin/nt/dist-build/build-dep-zips.py (gather_source): The previous
version assumed that all source tarballs were gzip compressed. This is
not always the case, as some are only available in zst. We prioritize
zst compression and only if not available we attempt gzip.
---
 admin/nt/dist-build/build-dep-zips.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py
index bb0ff7e32bf..022cebeedaf 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -23,7 +23,7 @@
 import functools
 import operator
 
-from subprocess import check_output
+from subprocess import check_output, CalledProcessError
 
 ## Constants
 EMACS_MAJOR_VERSION="28"
@@ -206,9 +206,13 @@ def gather_source(deps):
         ## Switch names if necessary
         pkg_name = MUNGE_SRC_PKGS.get(pkg_name,pkg_name)
 
+        tarzst = "{}-{}.src.tar.zst".format(pkg_name,pkg_version)
         tarball = "{}-{}.src.tar.gz".format(pkg_name,pkg_version)
 
-        download_source(tarball)
+        try:
+            download_source(tarzst)
+        except CalledProcessError:
+            download_source(tarball)
 
     print("Zipping")
     check_output_maybe("zip -9 ../emacs-{}-{}deps-mingw-w64-src.zip *"
-- 
2.39.5


[-- Attachment #5: 0001-add-docstrings.patch.asc --]
[-- Type: text/plain, Size: 228 bytes --]

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQT+qiF+WQ7fQkkAb/UJFDAFinzxjQUCZyNkowAKCRAJFDAFinzx
jUWuAP9SFHzmmr7C2hr+OOtUGIlf4gqWFjjE55VklLNcWnwWWgEA0HoMm22xRMgi
sa2dYlCYnm7HAZXyZRy/BuhISK8dYQQ=
=lKo6
-----END PGP SIGNATURE-----

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-31 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 11:02 bug#74133: Some minor patches for the python script Nikolaos Chatzikonstantinou
2024-10-31 11:06 ` bug#74133: Wrong files attached Nikolaos Chatzikonstantinou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).