Compare commits

..

21 Commits

Author SHA1 Message Date
clrbuilder 6550c61092 Update packages file for version 34100
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-12-17 00:07:32 -08:00
Patrick McCarty d2d8b886bd Restrict query to spec sections above %files
In Clear Linux OS, all package spec files define their header fields
(and other required sections, like %description) above the first %files
section. Restricting the `rpmspec` queries to sections of %files speeds
up the command significantly, most notably for `texlive`, which has the
largest spec file.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-12-14 04:01:31 +00:00
Patrick McCarty e227e8722b Use %{NVR} queryformat when possible
The `%{NVR}` format is equivalent to `%{NAME}-%{VERSION]-%{RELEASE}`.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-12-14 03:52:58 +00:00
Patrick McCarty b924031ba6 Use parameterized function for most rpmspec commands
The `rpmspec` commands usually specify the same flags aside from the
queryformat and the spec file(s) to query.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-12-14 03:49:30 +00:00
clrbuilder 0981d133b1 Update packages file for version 34080
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-12-10 00:07:08 -08:00
clrbuilder 3d195f17b2 Update packages file for version 34010
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-12-08 00:08:37 -08:00
Patrick McCarty 187098145c patchfilter: encode/decode as UTF-8 when possible
In the event a commit contains invalid UTF-8 characters, replace them
with U+FFFD by using the 'replace' error handler for decode().

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-12-04 23:18:16 +00:00
Patrick McCarty fbd176e68d Update license list for SPDX 3.11
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-11-30 07:01:52 +00:00
clrbuilder 75e48d2e12 Update packages file for version 33980
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-11-24 00:08:21 -08:00
Patrick McCarty 87bbccedf1 Add R-parallelly and R-projpred
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-11-20 18:23:58 +00:00
clrbuilder 3f52dc6afb Update packages file for version 33970
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-11-19 00:06:51 -08:00
clrbuilder c2421ce65c Update packages file for version 33960
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-11-17 00:07:35 -08:00
Patrick McCarty 410f9f4e34 Update SPDX license list
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-11-15 21:37:07 +00:00
clrbuilder 480dfd8a53 Update packages file for version 33940
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-11-10 00:07:56 -08:00
clrbuilder ec94c940d1 Update packages file for version 33920
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-11-03 00:07:41 -08:00
clrbuilder b655cd9a12 Update packages file for version 33910
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-29 00:07:16 -07:00
clrbuilder 6bc7acd818 Update packages file for version 33870
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-22 10:55:06 -07:00
clrbuilder 3dca4d2ecc Update packages file for version 33860
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-22 00:08:04 -07:00
clrbuilder 87d9c543ff Update packages file for version 33850
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-20 00:07:23 -07:00
clrbuilder 789f1ca94c Update packages file for version 33840
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-15 00:07:14 -07:00
Patrick McCarty 2b76e56f69 generateupstream: improve sha1sum invocation
Indicating end of options with `--` fixes the command invocation if the
filename begins with a hyphen.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-10-15 03:02:13 +00:00
6 changed files with 115 additions and 15 deletions
+8 -8
View File
@@ -11,7 +11,7 @@ SHELL = /bin/bash
SPECFILE = $(addsuffix .spec, $(PKG_NAME))
SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || rpmspec -D '_vendor clr' --srpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' $(SPECFILE))
SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || $(call queryspec,%{NVR}\n,$(SPECFILE)))
SRPMFILE = results/$(SRPMVERS).src.rpm
LATEST_RPMS = $(wildcard rpms/*.rpm)
@@ -46,7 +46,7 @@ upstream:
#help spdxcheck: Checks that the package license is a valid SPDX license,
#help or that it is in the exceptions list.
spdxcheck: $(SPECFILE)
@for LICENSE in `rpmspec -D '_vendor clr' --srpm -q --queryformat '%{LICENSE}\n' $(SPECFILE)`; do \
@for LICENSE in `$(call queryspec,%{LICENSE}\n,$(SPECFILE))`; do \
if ! grep -qx "$$LICENSE" $(TOPLVL)/projects/common/licenses-{spdx,exceptions,extra}; then FAIL=yes; echo "ERROR: License '$$LICENSE' is not an allowed SPDX license ID"; fi; \
done; test -z "$$FAIL"
@@ -217,12 +217,12 @@ bump:
git pull --rebase
$(MAKE) bumpnogit
git add $(SPECFILE) release
git commit -a -m "version bump from $(shell rpmspec -D '_vendor clr' --srpm -q --queryformat '%{VERSION}-%{RELEASE}\n' $(SPECFILE)) to `rpmspec -D '_vendor clr' --srpm -q --queryformat '%{VERSION}-%{RELEASE}\n' $(SPECFILE)`"
git commit -a -m "version bump from $(shell $(call queryspec,%{VERSION}-%{RELEASE}\n,$(SPECFILE))) to `$(call queryspec,%{VERSION}-%{RELEASE}\n,$(SPECFILE))`"
#help bumpnogit: Increments the release file by one and does not commit changes.
bumpnogit:
@$(MAKE) spdxcheck
oldrel=$(shell rpmspec -D '_vendor clr' --srpm -q --queryformat '%{RELEASE}\n' $(SPECFILE)); \
oldrel=$(shell $(call queryspec,%{RELEASE}\n,$(SPECFILE))); \
newrel=$$(($$oldrel + 1)); \
sed -i "s/^\(Release[[:blank:]]*:[[:blank:]]*\)$$oldrel$$/\1$$newrel/" $(SPECFILE); \
echo "$$newrel" > release;
@@ -232,7 +232,7 @@ $(__missingsources): sources
# First argument is a Clear Linux build number (e.g. 22000)
define fetch-from-srpm
tmp=$$(mktemp -d -p "."); \
srpm=$$(rpmspec --srpm -q --qf "%{NVR}.src.rpm\n" $(SPECFILE)); \
srpm=$$($(call queryspec,%{NVR}.src.rpm\n,$(SPECFILE))); \
if cd "$$tmp" && ! curl -s -S -f -L -O $(MIRROR_CURL_OPTS) $(DOWNLOAD_MIRROR)/releases/$(1)/clear/source/SRPMS/$$srpm; then \
echo "Failed to download $$srpm from Clear Linux release $(1)." >&2; \
cd .. && rm -rf "$$tmp"; \
@@ -240,7 +240,7 @@ define fetch-from-srpm
fi; \
rpm2cpio $$srpm | cpio --quiet -id; \
cd ..; \
srclist=$$(rpmspec --srpm -q --qf "[%{SOURCE}\n]" $(SPECFILE)); \
srclist=$$($(call queryspec,[%{SOURCE}\n],$(SPECFILE))); \
for s in $$srclist; do \
if ! mv --no-clobber "$$tmp"/$$s .; then \
echo "Missing source file \"$$s\" in $${srpm}." >&2; \
@@ -279,7 +279,7 @@ else
sources:
@$(MAKE) generateupstream; \
[ $$? -eq 0 ] && exit 0; \
nvr="$$(rpmspec --srpm -q --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\n' $(SPECFILE))"; \
nvr="$$($(call queryspec,%{NAME}\t%{VERSION}\t%{RELEASE}\n,$(SPECFILE)))"; \
git -C $(TOPLVL)/projects/common fetch --tags >/dev/null 2>&1; \
latest_builds=$$(git -C $(TOPLVL)/projects/common tag -l | sort -rn); \
for b in $$latest_builds; do \
@@ -498,7 +498,7 @@ generateupstream:
exit 1; \
fi; \
fi; \
echo $$(sha1sum $$filename | cut -d\ -f1)/$$filename >> upstream; \
echo $$(sha1sum -- $$filename | cut -d\ -f1)/$$filename >> upstream; \
done
@rm -f upstream.bak
@cat upstream
+8
View File
@@ -47,6 +47,14 @@ define subjectprefix
git config format.subjectPrefix "PATCH $(1)"
endef
# Query the spec file (or spec files) listed in argument 2 for the field(s)
# specified in argument 1. The fields are derived from the source rpm(s)
# generated by the specs. Queried fields that are declared within the spec file
# must be declared above the first %files section.
define queryspec
rpmspec --define='_vendor clr' --srpm --query --queryformat='$(1)' <(sed -n '1,/%files/p' $(2))
endef
# If GITOLITE_BASE_URL is defined, sets a repo's push URL for that gitolite
# instance. Accepts one argument: the path to the repo on gitolite. If
# GITOLITE_BASE_URL is not defined, no push URL is set -- the shell's null
+2 -2
View File
@@ -178,13 +178,13 @@ log: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
#help versions: Displays the version of each package in the ./packages tree.
versions: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
@for p in $(addprefix packages/,$(PKGS_LOCAL)); do \
(cd $$p; if ls *.spec &> /dev/null; then rpmspec -q --queryformat '%{NAME}-%{VERSION}\n' *.spec | head -n1; fi) ;\
(cd $$p; if ls *.spec &> /dev/null; then $(call queryspec,%{NAME}-%{VERSION}\n,*.spec) | head -n1; fi) ;\
done
#help releases: Like 'make versions', but also displays the release number.
releases: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
@for p in $(addprefix packages/,$(PKGS_LOCAL)); do \
(cd $$p; if ls *.spec &> /dev/null; then rpmspec -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' *.spec | head -n1; fi) ;\
(cd $$p; if ls *.spec &> /dev/null; then $(call queryspec,%{NVR}\n,*.spec) | head -n1; fi) ;\
done
#help provides: Is used to find out which RPM package provides some file.
+39
View File
@@ -16,6 +16,7 @@ AMDPLPA
AML
AMPAS
ANTLR-PD
ANTLR-PD-fallback
APAFML
APL-1.0
APSL-1.0
@@ -39,6 +40,7 @@ BSD-2-Clause
BSD-2-Clause-FreeBSD
BSD-2-Clause-NetBSD
BSD-2-Clause-Patent
BSD-2-Clause-Views
BSD-3-Clause
BSD-3-Clause-Attribution
BSD-3-Clause-Clear
@@ -52,6 +54,7 @@ BSD-4-Clause-UC
BSD-Protection
BSD-Source-Code
BSL-1.0
BUSL-1.1
Bahyph
Barr
Beerware
@@ -59,11 +62,15 @@ BitTorrent-1.0
BitTorrent-1.1
BlueOak-1.0.0
Borceux
CAL-1.0
CAL-1.0-Combined-Work-Exception
CATOSL-1.1
CC-BY-1.0
CC-BY-2.0
CC-BY-2.5
CC-BY-3.0
CC-BY-3.0-AT
CC-BY-3.0-US
CC-BY-4.0
CC-BY-NC-1.0
CC-BY-NC-2.0
@@ -74,6 +81,7 @@ CC-BY-NC-ND-1.0
CC-BY-NC-ND-2.0
CC-BY-NC-ND-2.5
CC-BY-NC-ND-3.0
CC-BY-NC-ND-3.0-IGO
CC-BY-NC-ND-4.0
CC-BY-NC-SA-1.0
CC-BY-NC-SA-2.0
@@ -87,8 +95,10 @@ CC-BY-ND-3.0
CC-BY-ND-4.0
CC-BY-SA-1.0
CC-BY-SA-2.0
CC-BY-SA-2.0-UK
CC-BY-SA-2.5
CC-BY-SA-3.0
CC-BY-SA-3.0-AT
CC-BY-SA-4.0
CC-PDDC
CC0-1.0
@@ -104,6 +114,9 @@ CECILL-B
CECILL-C
CERN-OHL-1.1
CERN-OHL-1.2
CERN-OHL-P-2.0
CERN-OHL-S-2.0
CERN-OHL-W-2.0
CNRI-Jython
CNRI-Python
CNRI-Python-GPL-Compatible
@@ -125,6 +138,7 @@ ECL-1.0
ECL-2.0
EFL-1.0
EFL-2.0
EPICS
EPL-1.0
EPL-2.0
EUDatagrid
@@ -142,15 +156,28 @@ Fair
Frameworx-1.0
FreeImage
GFDL-1.1
GFDL-1.1-invariants-only
GFDL-1.1-invariants-or-later
GFDL-1.1-no-invariants-only
GFDL-1.1-no-invariants-or-later
GFDL-1.1-only
GFDL-1.1-or-later
GFDL-1.2
GFDL-1.2-invariants-only
GFDL-1.2-invariants-or-later
GFDL-1.2-no-invariants-only
GFDL-1.2-no-invariants-or-later
GFDL-1.2-only
GFDL-1.2-or-later
GFDL-1.3
GFDL-1.3-invariants-only
GFDL-1.3-invariants-or-later
GFDL-1.3-no-invariants-only
GFDL-1.3-no-invariants-or-later
GFDL-1.3-only
GFDL-1.3-or-later
GL2PS
GLWTPL
GPL-1.0
GPL-1.0+
GPL-1.0-only
@@ -175,7 +202,9 @@ Glide
Glulxe
HPND
HPND-sell-variant
HTMLTIDY
HaskellReport
Hippocratic-2.1
IBM-pibs
ICU
IJG
@@ -226,6 +255,7 @@ MIT-CMU
MIT-advertising
MIT-enna
MIT-feh
MIT-open-group
MITNFA
MPL-1.0
MPL-1.1
@@ -238,12 +268,16 @@ MakeIndex
MirOS
Motosoto
MulanPSL-1.0
MulanPSL-2.0
Multics
Mup
NASA-1.3
NBPL-1.0
NCGL-UK-2.0
NCSA
NGPL
NIST-PD
NIST-PD-fallback
NLOD-1.0
NLPL
NOSL
@@ -260,6 +294,7 @@ Newsletr
Nokia
Noweb
Nunit
O-UDA-1.0
OCCT-PL
OCLC-2.0
ODC-By-1.0
@@ -270,6 +305,7 @@ OFL-1.0-no-RFN
OFL-1.1
OFL-1.1-RFN
OFL-1.1-no-RFN
OGC-1.0
OGL-Canada-2.0
OGL-UK-1.0
OGL-UK-2.0
@@ -305,7 +341,10 @@ PHP-3.0
PHP-3.01
PSF-2.0
Parity-6.0.0
Parity-7.0.0
Plexus
PolyForm-Noncommercial-1.0.0
PolyForm-Small-Business-1.0.0
PostgreSQL
Python-2.0
QPL-1.0
+57 -4
View File
@@ -88,6 +88,7 @@ R-BMS
R-BatchJobs
R-BayesFactor
R-BiasedUrn
R-BiocManager
R-BoolNet
R-BradleyTerry2
R-Brobdingnag
@@ -224,6 +225,7 @@ R-animation
R-ape
R-argparse
R-arm
R-arsenal
R-ash
R-askpass
R-assertthat
@@ -235,6 +237,7 @@ R-bazar
R-bbmle
R-bdsmatrix
R-beeswarm
R-bench
R-benchr
R-betareg
R-bibtex
@@ -254,6 +257,7 @@ R-bootstrap
R-brew
R-brglm
R-bridgesampling
R-brio
R-brms
R-broom
R-bvls
@@ -287,6 +291,7 @@ R-colourpicker
R-combinat
R-commonmark
R-compositions
R-conditionz
R-config
R-conquer
R-contfrac
@@ -296,6 +301,7 @@ R-corrgram
R-corrplot
R-covr
R-cowplot
R-cpp11
R-crayon
R-crosstalk
R-crul
@@ -558,6 +564,7 @@ R-measures
R-memisc
R-memoise
R-mi
R-mice
R-microbenchmark
R-mime
R-miniUI
@@ -613,6 +620,7 @@ R-ordinal
R-pROC
R-packrat
R-pamr
R-parallelly
R-parsedate
R-partitions
R-party
@@ -666,7 +674,9 @@ R-processx
R-prodlim
R-profdpm
R-profileModel
R-profmem
R-progress
R-projpred
R-promises
R-proto
R-protolite
@@ -700,6 +710,7 @@ R-rappdirs
R-raster
R-rasterVis
R-rbenchmark
R-rbibutils
R-rcmdcheck
R-reactR
R-reactlog
@@ -734,6 +745,7 @@ R-rjags
R-rjson
R-rjstat
R-rlang
R-rle
R-rmarkdown
R-rmatio
R-rms
@@ -792,6 +804,7 @@ R-shinyjs
R-shinystan
R-shinythemes
R-slam
R-slider
R-sm
R-smoother
R-sn
@@ -841,6 +854,7 @@ R-tensorflow
R-testit
R-testthat
R-texreg
R-textshaping
R-tfruns
R-threejs
R-tibble
@@ -882,6 +896,7 @@ R-vioplot
R-viridis
R-viridisLite
R-visNetwork
R-warp
R-webmockr
R-webshot
R-webutils
@@ -1049,10 +1064,9 @@ avahi
awesome-wm
awscli
axel
azure-appconfiguration
azure-batch
azure-cli
azure-cli-command-modules-nspkg
azure-cli-core
azure-cli-nspkg
azure-cli-telemetry
azure-common
@@ -1064,8 +1078,10 @@ azure-functions-devops-build
azure-graphrbac
azure-iot-sdk
azure-keyvault
azure-keyvault-administration
azure-keyvault-certificates
azure-keyvault-keys
azure-keyvault-nspkg
azure-keyvault-secrets
azure-loganalytics
azure-mgmt-advisor
@@ -1131,12 +1147,17 @@ azure-mgmt-signalr
azure-mgmt-sql
azure-mgmt-sqlvirtualmachine
azure-mgmt-storage
azure-mgmt-synapse
azure-mgmt-trafficmanager
azure-mgmt-web
azure-multiapi-storage
azure-nspkg
azure-storage-blob
azure-storage-common
azure-synapse-accesscontrol
azure-synapse-artifacts
azure-synapse-nspkg
azure-synapse-spark
babeltrace
babl
backcall
@@ -1163,6 +1184,7 @@ bind-utils
binutils
binwalk
bison
black
bleach
blender
blinken
@@ -1325,7 +1347,6 @@ compat-curl-gnutls-soname4
compat-enchant-soname1
compat-fuse-soname2
compat-gtksourceview-soname3
compat-hunspell-soname1.6
compat-icu4c-soname64
compat-libhandy-0.0
compat-libpng-soname12
@@ -1335,6 +1356,7 @@ compat-nettle-soname6
compat-nettle-soname7
compat-opencv-soname42
compat-protobuf-soname22
compat-python38
compat-re2-soname7
compat-readline-soname5
compat-tracker-soname2.0
@@ -1383,10 +1405,12 @@ cve-bin-tool
cxxfilt
cycler
cyrus-sasl
dacite
dapl
darkflow
darktable
dask
dataclasses
datefudge
dav1d
db
@@ -1402,6 +1426,7 @@ decorator
defusedxml
dejagnu
dejavu-fonts
deprecation
desktop-file-utils
devhelp
dfc
@@ -1430,6 +1455,7 @@ django_compressor
dkms
dlm
dlt-daemon
dm-tree
dmap2gcode
dmenu
dmidecode
@@ -1484,6 +1510,7 @@ eid-mw
eigen
elementary-xfce
elfutils
elisa
ell
emacs
emacs-x11
@@ -1599,6 +1626,7 @@ gdal
gdb
gdbm
gdk-pixbuf
gdk-pixbuf-xlib
gdl
gdm
geany
@@ -1710,6 +1738,7 @@ google-api-python-client
google-apitools
google-auth
google-auth-httplib2
google-auth-oauthlib
google-pasta
google-reauth
googleapis-common-protos
@@ -1769,6 +1798,8 @@ gvfs
gvim
gwenview
gzip
h11
h2
h5py
hamlib
hammock
@@ -1788,18 +1819,22 @@ home-assistant
home-assistant-frontend
horovod
hostname
hpack
hplip
html5lib
htop
htslib
httpcore
httpd
httplib2
httpretty
httpx
hub
hugo
humanfriendly
hunspell
hwloc
hyperframe
hyperscan
hyphen
hypothesis
@@ -1829,7 +1864,6 @@ ifaddr
iftop
igt-gpu-tools
iio-sensor-proxy
ilmbase
imageio
imagescan
imagesize
@@ -1895,6 +1929,7 @@ iwd
ixion
jack2
jansson
janus
jaraco.classes
jaraco.collections
jaraco.functools
@@ -1922,6 +1957,7 @@ jsonpatch
jsonpickle
jsonpointer
jsonschema
juk
jupyter
jupyter-nbgallery
jupyter-notebook-gist
@@ -1930,6 +1966,7 @@ jupyter_console
jupyter_core
jupyterlab
jupyterlab_launcher
jupyterlab_pygments
jupyterlab_server
kactivities
kactivities-stats
@@ -2555,6 +2592,7 @@ mingw-crt
mingw-gcc
minicom
minimodem
minuet
mistune
mixer-tools
mkfontdir
@@ -2763,6 +2801,7 @@ p11-kit
p7zip
packaging
pacrunner
paho-mqtt
paho.mqtt.c
paho.mqtt.cpp
palapeli
@@ -3141,6 +3180,7 @@ perl-Hash-Flatten
perl-Hash-Merge
perl-Hash-MoreUtils
perl-Hash-MultiValue
perl-Heap
perl-Hook-LexWrap
perl-I18N-Charset
perl-IO-AIO
@@ -3803,6 +3843,8 @@ pyflakes
pygobject
pyhs100
pylint
pyls-black
pyls-spyder
pynvim
pyotherside
pyotp
@@ -3837,6 +3879,7 @@ python-crfsuite
python-dateutil
python-digitalocean
python-distutils-extra
python-dotenv
python-future
python-gflags
python-graphviz
@@ -3960,6 +4003,7 @@ requests-mock
requests-ntlm
requests-oauthlib
requests-toolbelt
requests-unixsocket
responses
rest
restic
@@ -3970,11 +4014,13 @@ retype
rfc3986
rfc3987
rhythmbox
rich
rinutils
rjsmin
rlwrap
rng-tools
roboto
rocs
rofi
rope
rpcbind
@@ -4055,6 +4101,7 @@ smartcols
smartmontools
smmap
snappy
sniffio
snowballstemmer
socat
sof-bin
@@ -4160,6 +4207,7 @@ tcpdump
tdb
telemetrics-client
telepathy-glib
telepathy-qt
tempora
tensorboard
tensorflow
@@ -4192,11 +4240,14 @@ the_silver_searcher
thermal_daemon
thermal_monitor
thin-provisioning-tools
threadpoolctl
threadweaver
three-merge
thunar-volman
thunderbird
thunderbolt-software-user-space
tiff
tifffile
tig
tigervnc
tilix
@@ -4227,10 +4278,12 @@ traitlets
tree
twine
typed_ast
typeguard
typing_extensions
tzdata
tzlocal
ua-parser
uamqp
ucpp
udisks2
udunits
+1 -1
View File
@@ -211,7 +211,7 @@ def main():
with open (filename, "r") as myfile:
lines = myfile.readlines()
else:
output = subprocess.check_output("git format-patch -1 --stdout", shell=True).decode("latin-1")
output = subprocess.check_output("git format-patch -1 --stdout", shell=True).decode("utf-8", errors="replace")
lines = output.split("\n")
parse_patch(lines)