mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 10:27:00 +02:00
dev-util/catalyst: Patch to use python3 explicitly
This commit is contained in:
parent
d904874d70
commit
227ec22a01
@ -1,3 +1,7 @@
|
|||||||
This is a fork of dev-util/catalyst package. The sole reason for
|
This is a fork of dev-util/catalyst package. The reasons for having it
|
||||||
having it here is to drop support for python 3.8 we haven't yet
|
here are:
|
||||||
packaged.
|
|
||||||
|
- Drop support for python 3.8 we haven't yet packaged.
|
||||||
|
- Add patches that move the scripts to use python3 explicitly, because
|
||||||
|
/usr/bin/python is still pointing to python2, but our portage is now
|
||||||
|
a python3 code.
|
||||||
|
@ -53,6 +53,13 @@ PDEPEND="system-bootloader? ( >=sys-apps/memtest86+-5.01-r4
|
|||||||
sys-boot/syslinux
|
sys-boot/syslinux
|
||||||
sys-boot/shim )"
|
sys-boot/shim )"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/0001-catalyst-Remove-left-over-Id.patch"
|
||||||
|
"${FILESDIR}/0002-catalyst-Remove-Maintained-by-sections.patch"
|
||||||
|
"${FILESDIR}/0003-catalyst-Remove-unnecessary-future-imports.patch"
|
||||||
|
"${FILESDIR}/0004-catalyst-Use-python3-shebangs.patch"
|
||||||
|
)
|
||||||
|
|
||||||
python_prepare_all() {
|
python_prepare_all() {
|
||||||
python_setup
|
python_setup
|
||||||
echo VERSION="${PV}" "${PYTHON}" setup.py set_version
|
echo VERSION="${PV}" "${PYTHON}" setup.py set_version
|
||||||
|
@ -0,0 +1,71 @@
|
|||||||
|
From 6aebee1b3adee0c4b3775e69614c36f9e7ba980c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matt Turner <mattst88@gentoo.org>
|
||||||
|
Date: Fri, 27 Mar 2020 23:49:05 -0700
|
||||||
|
Subject: [PATCH 1/4] catalyst: Remove left over $Id$
|
||||||
|
|
||||||
|
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
||||||
|
---
|
||||||
|
AUTHORS | 2 --
|
||||||
|
README | 2 --
|
||||||
|
TODO | 2 --
|
||||||
|
bin/catalyst | 1 -
|
||||||
|
catalyst/main.py | 1 -
|
||||||
|
5 files changed, 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/AUTHORS b/AUTHORS
|
||||||
|
index 3bf969bd..41366b8c 100644
|
||||||
|
--- a/AUTHORS
|
||||||
|
+++ b/AUTHORS
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-# $Id: 3bf969bd0798372f72ebdfc74321ac0c81174d68 $
|
||||||
|
-
|
||||||
|
The copyright for catalyst is held by the Gentoo Foundation and by each
|
||||||
|
of the individual contributors.
|
||||||
|
|
||||||
|
diff --git a/README b/README
|
||||||
|
index 530abb35..6dc6a149 100644
|
||||||
|
--- a/README
|
||||||
|
+++ b/README
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-# $Id: 530abb353ec9c8e52e5bf677fbb628339e78b241 $
|
||||||
|
-
|
||||||
|
Licensing
|
||||||
|
========================
|
||||||
|
|
||||||
|
diff --git a/TODO b/TODO
|
||||||
|
index a2ee05dd..bf397840 100644
|
||||||
|
--- a/TODO
|
||||||
|
+++ b/TODO
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-# $Id: a2ee05ddd591798b18e2ea570e2f729dd30992f7 $
|
||||||
|
-
|
||||||
|
This file is a rough list of changes that need to be made to catalyst.
|
||||||
|
|
||||||
|
Global:
|
||||||
|
diff --git a/bin/catalyst b/bin/catalyst
|
||||||
|
index 72a4cb4d..d0d3d639 100755
|
||||||
|
--- a/bin/catalyst
|
||||||
|
+++ b/bin/catalyst
|
||||||
|
@@ -5,7 +5,6 @@
|
||||||
|
# Release Engineering Team <releng@gentoo.org>
|
||||||
|
# Andrew Gaffney <agaffney@gentoo.org>
|
||||||
|
# Chris Gianelloni <wolf31o2@wolf31o2.org>
|
||||||
|
-# $Id: 72a4cb4db4d6f247a893e9744ca46f2a97859ba5 $
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
diff --git a/catalyst/main.py b/catalyst/main.py
|
||||||
|
index 01c456ea..e15d67d9 100644
|
||||||
|
--- a/catalyst/main.py
|
||||||
|
+++ b/catalyst/main.py
|
||||||
|
@@ -4,7 +4,6 @@
|
||||||
|
# Release Engineering Team <releng@gentoo.org>
|
||||||
|
# Andrew Gaffney <agaffney@gentoo.org>
|
||||||
|
# Chris Gianelloni <wolf31o2@wolf31o2.org>
|
||||||
|
-# $Id: 01c456ea99fb8fb3342e3bb0cf2c9b1a56357c65 $
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import datetime
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,108 @@
|
|||||||
|
From 44a1b09c566c05889b71fcdecedf319e162fea8e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matt Turner <mattst88@gentoo.org>
|
||||||
|
Date: Fri, 27 Mar 2020 23:52:41 -0700
|
||||||
|
Subject: [PATCH 2/4] catalyst: Remove "Maintained by" sections
|
||||||
|
|
||||||
|
They're not useful and out of date to boot.
|
||||||
|
|
||||||
|
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
||||||
|
---
|
||||||
|
bin/catalyst | 7 -------
|
||||||
|
catalyst/base/resume.py | 5 -----
|
||||||
|
catalyst/fileops.py | 5 -----
|
||||||
|
catalyst/main.py | 7 -------
|
||||||
|
catalyst/version.py | 7 -------
|
||||||
|
doc/catalyst.1.txt | 2 +-
|
||||||
|
6 files changed, 1 insertion(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bin/catalyst b/bin/catalyst
|
||||||
|
index d0d3d639..d3448fd8 100755
|
||||||
|
--- a/bin/catalyst
|
||||||
|
+++ b/bin/catalyst
|
||||||
|
@@ -1,12 +1,5 @@
|
||||||
|
#!/usr/bin/python -OO
|
||||||
|
|
||||||
|
-# Maintained in full by:
|
||||||
|
-# Catalyst Team <catalyst@gentoo.org>
|
||||||
|
-# Release Engineering Team <releng@gentoo.org>
|
||||||
|
-# Andrew Gaffney <agaffney@gentoo.org>
|
||||||
|
-# Chris Gianelloni <wolf31o2@wolf31o2.org>
|
||||||
|
-
|
||||||
|
-
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import sys
|
||||||
|
diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
|
||||||
|
index b2100735..4234f8b9 100644
|
||||||
|
--- a/catalyst/base/resume.py
|
||||||
|
+++ b/catalyst/base/resume.py
|
||||||
|
@@ -1,10 +1,5 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
-# Maintained in full by:
|
||||||
|
-# Catalyst Team <catalyst@gentoo.org>
|
||||||
|
-# Release Engineering Team <releng@gentoo.org>
|
||||||
|
-# Copyright 2013 Brian Dolbec <dolsen@gentoo.org>
|
||||||
|
-
|
||||||
|
'''resume.py
|
||||||
|
|
||||||
|
Performs autoresume tracking file operations such as
|
||||||
|
diff --git a/catalyst/fileops.py b/catalyst/fileops.py
|
||||||
|
index 878e6303..f7df4a01 100644
|
||||||
|
--- a/catalyst/fileops.py
|
||||||
|
+++ b/catalyst/fileops.py
|
||||||
|
@@ -1,8 +1,3 @@
|
||||||
|
-
|
||||||
|
-# Maintained in full by:
|
||||||
|
-# Catalyst Team <catalyst@gentoo.org>
|
||||||
|
-# Release Engineering Team <releng@gentoo.org>
|
||||||
|
-
|
||||||
|
'''fileops.py
|
||||||
|
|
||||||
|
Performs file operations such as pack/unpack,
|
||||||
|
diff --git a/catalyst/main.py b/catalyst/main.py
|
||||||
|
index e15d67d9..23093e97 100644
|
||||||
|
--- a/catalyst/main.py
|
||||||
|
+++ b/catalyst/main.py
|
||||||
|
@@ -1,10 +1,3 @@
|
||||||
|
-
|
||||||
|
-# Maintained in full by:
|
||||||
|
-# Catalyst Team <catalyst@gentoo.org>
|
||||||
|
-# Release Engineering Team <releng@gentoo.org>
|
||||||
|
-# Andrew Gaffney <agaffney@gentoo.org>
|
||||||
|
-# Chris Gianelloni <wolf31o2@wolf31o2.org>
|
||||||
|
-
|
||||||
|
import argparse
|
||||||
|
import datetime
|
||||||
|
import os
|
||||||
|
diff --git a/catalyst/version.py b/catalyst/version.py
|
||||||
|
index f0268686..fcf46fb0 100644
|
||||||
|
--- a/catalyst/version.py
|
||||||
|
+++ b/catalyst/version.py
|
||||||
|
@@ -1,10 +1,3 @@
|
||||||
|
-# Maintained in full by:
|
||||||
|
-# Catalyst Team <catalyst@gentoo.org>
|
||||||
|
-# Release Engineering Team <releng@gentoo.org>
|
||||||
|
-# Copyright: 2011 Brian Harring <ferringb@gmail.com>
|
||||||
|
-# License: BSD/GPL2
|
||||||
|
-# Copied & edited by: Brian Dolbec <dolsen@gentoo.org>
|
||||||
|
-
|
||||||
|
'''Version information and/or git version information
|
||||||
|
'''
|
||||||
|
|
||||||
|
diff --git a/doc/catalyst.1.txt b/doc/catalyst.1.txt
|
||||||
|
index 5a7a4d64..dc6c7acb 100644
|
||||||
|
--- a/doc/catalyst.1.txt
|
||||||
|
+++ b/doc/catalyst.1.txt
|
||||||
|
@@ -120,7 +120,7 @@ NOTES
|
||||||
|
stager projects, both of which were used to create pre-1.4 Gentoo releases.
|
||||||
|
|
||||||
|
*catalyst* was originally conceived and coded by both Daniel Robbins and
|
||||||
|
-John Davis. It is currently maintained by Chris Gianelloni and Eric Edgar and
|
||||||
|
+John Davis. It is currently maintained by the Catalyst Project Team and
|
||||||
|
has been mostly re-written.
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,97 @@
|
|||||||
|
From 45cf8f43116b13c4648fcb532aba93aff18670ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matt Turner <mattst88@gentoo.org>
|
||||||
|
Date: Sat, 28 Mar 2020 00:02:37 -0700
|
||||||
|
Subject: [PATCH 3/4] catalyst: Remove unnecessary future imports
|
||||||
|
|
||||||
|
Catalyst has been python 3-only for a while.
|
||||||
|
|
||||||
|
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
||||||
|
---
|
||||||
|
bin/catalyst | 2 --
|
||||||
|
bin/catalyst.git | 2 --
|
||||||
|
bin/pylint | 2 --
|
||||||
|
catalyst/log.py | 2 --
|
||||||
|
doc/make_target_table.py | 2 --
|
||||||
|
setup.py | 2 --
|
||||||
|
6 files changed, 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bin/catalyst b/bin/catalyst
|
||||||
|
index d3448fd8..228a913e 100755
|
||||||
|
--- a/bin/catalyst
|
||||||
|
+++ b/bin/catalyst
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
#!/usr/bin/python -OO
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# This block ensures that ^C interrupts are handled quietly.
|
||||||
|
diff --git a/bin/catalyst.git b/bin/catalyst.git
|
||||||
|
index eb6234b9..733ade15 100755
|
||||||
|
--- a/bin/catalyst.git
|
||||||
|
+++ b/bin/catalyst.git
|
||||||
|
@@ -5,8 +5,6 @@
|
||||||
|
|
||||||
|
"""Run catalyst from git using local modules/scripts."""
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
diff --git a/bin/pylint b/bin/pylint
|
||||||
|
index b0018278..6c718134 100755
|
||||||
|
--- a/bin/pylint
|
||||||
|
+++ b/bin/pylint
|
||||||
|
@@ -4,8 +4,6 @@
|
||||||
|
|
||||||
|
"""Run pylint with the right settings."""
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
diff --git a/catalyst/log.py b/catalyst/log.py
|
||||||
|
index d640dece..7956c28f 100644
|
||||||
|
--- a/catalyst/log.py
|
||||||
|
+++ b/catalyst/log.py
|
||||||
|
@@ -8,8 +8,6 @@ another level "notice" between warning & info, and all output goes through
|
||||||
|
the "catalyst" logger.
|
||||||
|
"""
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
import logging
|
||||||
|
import logging.handlers
|
||||||
|
import os
|
||||||
|
diff --git a/doc/make_target_table.py b/doc/make_target_table.py
|
||||||
|
index c4b49ad9..d1f97c9b 100755
|
||||||
|
--- a/doc/make_target_table.py
|
||||||
|
+++ b/doc/make_target_table.py
|
||||||
|
@@ -8,8 +8,6 @@
|
||||||
|
# source the testpath file then run "doc/make_target_table.py"
|
||||||
|
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
import glob
|
||||||
|
import locale
|
||||||
|
import os
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index c6b52dcf..c6553b5d 100755
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -1,8 +1,6 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
"""Catalyst is a release building tool used by Gentoo Linux"""
|
||||||
|
|
||||||
|
-from __future__ import print_function
|
||||||
|
-
|
||||||
|
import codecs as _codecs
|
||||||
|
from distutils.core import setup as _setup, Command as _Command
|
||||||
|
from email.utils import parseaddr as _parseaddr
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,67 @@
|
|||||||
|
From 83ce8eb9a11987c93a8c361d745b3a7444d4ad23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matt Turner <mattst88@gentoo.org>
|
||||||
|
Date: Sat, 28 Mar 2020 00:00:58 -0700
|
||||||
|
Subject: [PATCH 4/4] catalyst: Use python3 shebangs
|
||||||
|
|
||||||
|
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
||||||
|
---
|
||||||
|
bin/catalyst | 2 +-
|
||||||
|
bin/catalyst.git | 2 +-
|
||||||
|
bin/pylint | 2 +-
|
||||||
|
catalyst/base/resume.py | 2 +-
|
||||||
|
targets/stage1/build.py | 2 +-
|
||||||
|
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bin/catalyst b/bin/catalyst
|
||||||
|
index 228a913e..97cbb0f9 100755
|
||||||
|
--- a/bin/catalyst
|
||||||
|
+++ b/bin/catalyst
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python -OO
|
||||||
|
+#!/usr/bin/python3 -OO
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
diff --git a/bin/catalyst.git b/bin/catalyst.git
|
||||||
|
index 733ade15..9b3deaa1 100755
|
||||||
|
--- a/bin/catalyst.git
|
||||||
|
+++ b/bin/catalyst.git
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 1999-2015 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
diff --git a/bin/pylint b/bin/pylint
|
||||||
|
index 6c718134..98108f5f 100755
|
||||||
|
--- a/bin/pylint
|
||||||
|
+++ b/bin/pylint
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
# Copyright 1999-2015 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
|
||||||
|
index 4234f8b9..6a4ebdfa 100644
|
||||||
|
--- a/catalyst/base/resume.py
|
||||||
|
+++ b/catalyst/base/resume.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
|
'''resume.py
|
||||||
|
|
||||||
|
diff --git a/targets/stage1/build.py b/targets/stage1/build.py
|
||||||
|
index fa4fd136..4373126b 100755
|
||||||
|
--- a/targets/stage1/build.py
|
||||||
|
+++ b/targets/stage1/build.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user