Compare commits

..

60 Commits

Author SHA1 Message Date
clrbuilder 3a87e928c5 Update packages file for version 30080
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-25 12:02:17 +00:00
clrbuilder 5ba1a7e1e3 Update packages file for version 30070
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-24 18:03:08 +00:00
clrbuilder ba02bc2a4f Update packages file for version 30060
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-24 12:02:30 +00:00
clrbuilder 0ef90a4704 Update packages file for version 30050
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-23 15:45:31 +00:00
clrbuilder 0b39553aa6 Update packages file for version 30040
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-21 18:03:19 +00:00
Tan, Yew Wayne 7cd52ed2fd ltsutils: Fix PackageRepo.getNVR for package names that contain '-'
Refactor unit tests, add test case for MySQL-python package
2019-06-21 09:12:15 -07:00
Tan, Yew Wayne a379bdd1e5 ltsutils: prompt: Timeout after 60 seconds
Signed-off-by: Tan, Yew Wayne <yew.wayne.tan@intel.com>
2019-06-21 09:12:15 -07:00
Tan, Yew Wayne b8eaa3c103 ltsutils: make lts-koji: Modify koji target for building on LTS infrastructure
Differences:
- Restrict to submit from an active branch instead of master branch
- git pull --rebase from matching remote LTS branch if available
- Add "-lts" suffix to git tag
- Assume koji buildtag name is identical to branch name

Signed-off-by: Tan, Yew Wayne <yew.wayne.tan@intel.com>
2019-06-21 09:12:15 -07:00
Tan, Yew Wayne 0664274e0a ltsutils: make lts-build: Build RPM or reuse existing build
Todo: can-reuse-binary simply compares package versions to determine if
Koji builds can be shared between branches. Work is in progress to
implement ABI compatiblity testing.

Signed-off-by: Tan, Yew Wayne <yew.wayne.tan@intel.com>
2019-06-21 09:12:15 -07:00
Tan, Yew Wayne 69cee2fcd7 LTS package maintenance utility (ltsutils): initial commit
This tooling is designed to automate 2 main tasks that are part of
the package maintenance workflow of Clear Linux LTS. These tasks are:
- Back-porting of a patch (e.g. security fix) to older branches.
- (Not implemented yet) Building RPMs with the intent of sharing binaries of
  older LTS branches to newer branches whenever possible.

2 new targets are defined in Makefile.common.lts:
- lts-show: Show a summary of active LTS branches
- lts-backport: Attempt to fast-forward the previous active branch to the current branch

"Active" branches correspond to LTS releases that currently have support.
They are listed in a flat file "active-branches" in "lts" directory, from
oldest to newest. New entries are added by Clear Linux LTS developers as
new releases become available, and entries removed as releases become
obsolete.

Note: For CVE patching, the tool is not aware of CVE severity levels or
the minimum supported severity level of each LTS branch. For now it is
the user's responsibility to know when a CVE does not apply to older
branches and stop calling "make lts-backport".

Signed-off-by: Tan, Yew Wayne <yew.wayne.tan@intel.com>
2019-06-21 09:12:15 -07:00
clrbuilder 19d7dfcc56 Update packages file for version 30030
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-21 12:02:15 +00:00
clrbuilder 25e60b8d7f Update packages file for version 30020
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-20 18:02:35 +00:00
clrbuilder c6749e0569 Update packages file for version 30010
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-19 20:21:46 +00:00
Geoffroy Van Cutsem 79b17335fa Really set 'latest_builds' to the latest value of the day
Consider the following scenario:
* System being set-up on day 0 (by running user-setup.sh script)
* The github.com/clearlinux/common repo is cloned under projects/common
* Fast-forward in the future
* Clone a package for which there is no reachable upstream URL
	(e.g. clr-power-tweaks or clr-systemd-config
* Run 'make sources'
That operation will fail because it will search for the src.rpm files starting
with the Clear Linux build determined by looking up the latest tag in the
project/common repo (and the latest is the one from day 0). So it will only find
older versions of those src.rpm, and will eventually fail.

This patch adds a line that fetches all the latest tags from the upstream
projects/common repo so the 'latest_builds' variable is *really* set to the
latest of the day.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-06-19 11:03:00 -07:00
clrbuilder 18503d7ff9 Update packages file for version 30000
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-19 15:32:37 +00:00
clrbuilder d4a14d4b51 Update packages file for version 29990
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-19 12:02:34 +00:00
Patrick McCarty 67f9a85781 toplevel: simplify clean-pkgs-dir command
Create a PKGS_ORPHANED list containing all orphaned package repos (i.e.
package repos for packages not listed in projects/common/packages,
excluding the local compatibility packages/common directory), and use
that list for the `clean-pkgs-dir` command.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-18 17:30:19 -07:00
clrbuilder 2ab93bc546 Update packages file for version 29980
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-18 18:06:21 +00:00
clrbuilder 0697a48265 Update packages file for version 29970
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-18 12:02:24 +00:00
clrbuilder 3488d9df0b Update packages file for version 29960
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-17 17:58:32 +00:00
clrbuilder 7eda6b13d5 Update packages file for version 29950
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-17 11:58:06 +00:00
clrbuilder 22cf4d9aaa Update packages file for version 29940
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-14 17:57:53 +00:00
Arjan van de Ven abf88fe302 add some more boilerplate patterns 2019-06-14 14:48:13 +00:00
Arjan van de Ven e7d86e5ace make it clear there's no point in submitting routine stuff for review
as it only slows things down
2019-06-14 14:41:28 +00:00
clrbuilder 0ca8a71a6a Update packages file for version 29930
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-14 11:57:34 +00:00
clrbuilder c594d50d97 Update packages file for version 29920
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-13 17:58:36 +00:00
clrbuilder 923b813833 Update packages file for version 29910
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-13 11:57:26 +00:00
Thiago Macieira facfc57d55 Update message for the for-review.txt on how to recreate
People SHOULD update commit messages if it's not a simple bump or
version update.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-12 16:05:52 -07:00
clrbuilder 9e0d404e52 Update packages file for version 29900
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-12 17:58:01 +00:00
clrbuilder 9d954cb33a Update packages file for version 29890
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-12 11:57:25 +00:00
Patrick McCarty 158c743fde Rename typed-ast -> typed_ast
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-11 20:48:41 -07:00
clrbuilder c5969bbd83 Update packages file for version 29880
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-11 17:58:21 +00:00
clrbuilder cb01f2b9ef Update packages file for version 29850
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-10 11:58:23 +00:00
clrbuilder c58e39da50 Update packages file for version 29840
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-07 17:58:47 +00:00
clrbuilder 26dea91314 Update packages file for version 29830
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-07 12:01:05 +00:00
clrbuilder efa4e1bcf8 Update packages file for version 29820
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-06 17:59:00 +00:00
clrbuilder 9fba303a7b Update packages file for version 29800
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-05 20:28:24 +00:00
clrbuilder eefffcb4cd Update packages file for version 29780
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-05 04:24:22 +00:00
clrbuilder ae59dd4aa9 Update packages file for version 29770
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-06-04 21:01:00 +00:00
Patrick McCarty 9ed6cf64eb Add notice about for-review.txt; make compatible with git send-email
The for-review.txt files were being generated with `git show` and thus
not compatible with `git send-email`. Use `git format-patch` instead to
fix this issue.

Also add a more prominent notice about the existence of for-review.txt
and its intended purpose.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-03 15:17:49 -07:00
clrbuilder 1e1a52e948 Update packages file for version 29680
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-29 13:05:05 +00:00
clrbuilder b9d3725172 Update packages file for version 29660
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-28 13:41:13 +00:00
clrbuilder d2c0eea1d2 Update packages file for version 29620
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-24 11:58:40 +00:00
clrbuilder 038007f64a Update packages file for version 29600
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-23 11:58:43 +00:00
clrbuilder 930a8bd3f7 Update packages file for version 29590
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-22 19:40:13 +00:00
clrbuilder 33c27808a6 Update packages file for version 29570
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-22 11:59:13 +00:00
Patrick McCarty f9b7f544be scratch-wait: explicitly specify the wait option
We always want the koji CLI to wait for `make scratch-wait`, regardless
of the environment koji detects it is being run under.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-05-22 00:44:24 -07:00
clrbuilder 6fe60137f4 Update packages file for version 29530
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-21 11:58:35 +00:00
clrbuilder b32e466635 Update packages file for version 29520
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-20 17:59:07 +00:00
clrbuilder 755bd91716 Update packages file for version 29510
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-20 11:59:04 +00:00
clrbuilder d2b615d14b Update packages file for version 29500
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-18 19:01:47 +00:00
clrbuilder 71b5075a7b Update packages file for version 29480
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-17 18:36:33 +00:00
clrbuilder fd6bcb7b24 Update packages file for version 29410
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-14 12:00:16 +00:00
clrbuilder 771b704606 Update packages file for version 29400
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-13 18:00:17 +00:00
clrbuilder b3ea1cd421 Update packages file for version 29390
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-13 11:59:22 +00:00
clrbuilder 752274f532 Update packages file for version 29380
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-12 00:18:48 +00:00
clrbuilder 1addfd447d Update packages file for version 29360
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-10 12:02:05 +00:00
clrbuilder 8546a126bd Update packages file for version 29340
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-09 11:59:29 +00:00
clrbuilder 280d5471d7 Update packages file for version 29320
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-08 20:28:09 +00:00
clrbuilder 025c9a74f1 Update packages file for version 29310
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2019-05-08 16:33:20 +00:00
14 changed files with 779 additions and 15 deletions
+17 -3
View File
@@ -186,8 +186,18 @@ autospec: preautospec-checks pullrebase localreponotice clean-old-content
bash update_changelog.sh ; \
git commit --amend --no-edit Change* ; \
fi
git diff | grep -q index || python3 $(TOPLVL)/projects/common/patchfilter.py > for-review.txt ;
git diff | grep -q index || python3 $(TOPLVL)/projects/common/patchfilter.py ;
@$(MAKE) -s for-review.txt
@printf "\n**\n"
@printf "** NOTICE: A patch with changes is available in the file for-review.txt\n"
@printf "** To recreate (e.g., after git commit --amend), run make for-review.txt\n"
@printf "** To submit for review: git send-email --to <recipient> for-review.txt\n"
@printf "**\n\n"
#help for-review.txt: Creates the for-review.txt file, which is
#help a minimized version of the Git commit, suitable for code review.
for-review.txt:
git diff | grep -q index || python3 $(TOPLVL)/projects/common/patchfilter.py > for-review.txt
.PHONY: for-review.txt
#help autospecnogit: Runs autospec, but does not create a commit
autospecnogit:
@@ -269,6 +279,7 @@ sources:
@$(MAKE) generateupstream; \
[ $$? -eq 0 ] && exit 0; \
nvr="$$(rpmspec --srpm -q --qf '%{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 \
url="$(DOWNLOAD_MIRROR)/releases/$$b/clear/source/package-sources"; \
@@ -320,7 +331,7 @@ scratch: $(SPECFILE) upstream $(SRPMFILE) kojidef
#help scratch-wait: Performs scratch-build on package.
scratch-wait: $(SPECFILE) upstream $(SRPMFILE) kojidef
$(KOJI_CMD) build --scratch $(KOJI_TAG) $(SRPMFILE)
$(KOJI_CMD) build --scratch --wait $(KOJI_TAG) $(SRPMFILE)
#help koji-nowait: Same as 'make koji', but do not block
koji-nowait:
@@ -492,6 +503,9 @@ cloc: $(SRPMFILE)
@$(MOCK) --clean --scrub=chroot --uniqueext=$(PKG_NAME)
cat results/cloc.txt
# Define LTS-specific targets in a separate makefile
-include $(TOPLVL)/projects/common/Makefile.common.lts
# Define site local common targets in a separate makefile
-include $(TOPLVL)/projects/common/Makefile.common.site_local
+90
View File
@@ -0,0 +1,90 @@
#-*-makefile-*-
LTSUTILS = python $(TOPLVL)/projects/common/lts/main.py $(PKG_NAME)
#help lts-show: Display a summary of active LTS branches.
lts-show:
@$(LTSUTILS) sanity-check
@while read b; do \
if git show-ref $$b > /dev/null; then \
echo $$b $$(git log --oneline -1 $$b); \
else \
echo $$b Not found; \
fi; \
done < $(TOPLVL)/projects/common/lts/active-branches
#help lts-backport: Fast-forward the previous active branch to the current
#help branch.
lts-backport:
@$(LTSUTILS) sanity-check
@newer=$$(git symbolic-ref HEAD); \
newer=$${newer#refs/heads/}; \
if ! $(LTSUTILS) prev-branch --checkout; then \
echo Could not check out previous active branch.; \
exit 0; \
fi; \
if $(LTSUTILS) is-same-version $$newer; then \
$(LTSUTILS) fast-forward $$newer; \
else \
echo Most likely a patch needs to be manually re-applied for this version.; \
echo Alternatively, use \"git merge --ff-only $$newer\" to upgrade the package version.; \
fi
#help lts-build: Build RPM in Koji, or reuse existing build from older LTS
#help branch.
lts-build:
@$(LTSUTILS) sanity-check
@tag=$$(git tag --points-at); \
if [[ -z $$tag ]]; then \
echo This commit does not have a tag.; \
echo Proceeding to run \"make lts-koji\".; \
$(LTSUTILS) prompt || exit; \
$(MAKE) lts-koji; \
exit; \
fi; \
older=$$($(LTSUTILS) prev-branch); \
if [[ -z $$older ]]; then \
echo Could not determine previous active branch.; \
exit 1; \
fi; \
current=$$($(LTSUTILS) current-branch); \
if [[ $$(git rev-parse $$older) != $$(git rev-parse $$current) ]]; then \
echo Previous branch and current branch have different commits.; \
for b in $$older $$current; do echo $$b $$(git log --oneline -1 $$b); done; \
echo Proceeding to run \"make lts-koji\".; \
$(LTSUTILS) prompt || exit; \
$(MAKE) lts-koji; \
exit; \
fi; \
if $(LTSUTILS) can-reuse-binary $$older; then \
echo Reusing binary from $$older.; \
$(KOJI_CMD) tag-build $$current $(SRPMVERS); \
else \
echo Could not reuse binary from $$older.; \
echo Proceeding to run \"make bump lts-koji\".; \
$(LTSUTILS) prompt || exit; \
$(MAKE) bump lts-koji; \
fi
@$(LTSUTILS) next-branch --checkout
#help lts-koji: Same as "koji" but for working on LTS branches. Should not
#help be called directly, use lts-build instead.
lts-koji: prekoji-checks kojidef
@$(LTSUTILS) sanity-check
@$(MAKE) spdxcheck
@$(MAKE) checkblacklist
@current=$$($(LTSUTILS) current-branch); \
if ! grep $$current $(TOPLVL)/projects/common/lts/active-branches; then \
echo "Error: Must be on an active branch to submit to koji" >&2; \
exit 1; \
fi; \
if ! git diff --quiet HEAD ${SPECFILE}; then \
echo "Error: All changes to ${SPECFILE} must be committed first" >&2; \
exit 1; \
fi; \
if git rev-parse --verify --quiet origin/$$current > /dev/null; then \
git pull --rebase; \
fi
git tag $(SRPMVERS)-lts
git push origin $$($(LTSUTILS) current-branch) refs/tags/$(SRPMVERS)-lts
$(KOJI_CMD) build $$KOJI_NOWAIT $$($(LTSUTILS) current-branch) $(PKG_BASE_URL)/$(PKG_NAME)?#$(SRPMVERS)-lts
+9 -7
View File
@@ -11,6 +11,7 @@ SHELL = /bin/bash
PKGS = $(shell cat $(PACKAGES_FILE))
PKGS_LOCAL = $(sort $(filter ${PKGS},$(subst packages/,,$(wildcard packages/*))))
PKGS_ORPHANED = $(sort $(filter-out common ${PKGS},$(subst packages/,,$(wildcard packages/*))))
proj_PKGS = $(addprefix proj_,$(PROJ_PKGS))
clone_PKGS = $(addprefix clone_,$(PKGS))
@@ -128,11 +129,9 @@ pull: ${PULL_PKGS}
#help clean-pkgs-dir: For packages that are no longer present in the distro,
#help removes the associated package repos from the ./packages tree
clean-pkgs-dir: $(PACKAGES_FILE)
@for p in `ls packages`; do \
if ! grep -wq "^$$p$$" "$<" && [ "$$p" != common ]; then \
echo "Removing $$p from packages, it is no longer in common/packages."; \
rm -rf packages/$$p; \
fi \
@for p in ${PKGS_ORPHANED}; do \
echo "Removing $$p from packages, it is no longer in common/packages."; \
rm -rf packages/$$p; \
done
@echo "packages directory cleaned";
@@ -229,8 +228,11 @@ autospecnew: preautospecnew-checks localreponotice
if [ $$? -eq 0 ]; then \
$(MAKE) link-new-rpms PKG_REPO_DIR="${TOPLVL}/packages/${NAME}"; \
$(TOPLVL)/projects/common/checkblacklist.sh $(TOPLVL)/projects/common/blacklist $(TOPLVL)/packages/${NAME}/results/*.rpm; \
python3 $(TOPLVL)/projects/common/patchfilter.py <(git -C $(TOPLVL)/packages/$(NAME) show) > $(TOPLVL)/packages/$(NAME)/for-review.txt; \
python3 $(TOPLVL)/projects/common/patchfilter.py <(git -C $(TOPLVL)/packages/$(NAME) show); \
python3 $(TOPLVL)/projects/common/patchfilter.py <(git -C $(TOPLVL)/packages/$(NAME) format-patch -1 --stdout) > $(TOPLVL)/packages/$(NAME)/for-review.txt; \
printf "\n**\n"; \
printf "** NOTICE: A patch with changes is available in the file $(TOPLVL)/packages/$(NAME)/for-review.txt\n"; \
printf "** Please look through this file and if you are unsure, please submit for code review with git send-email\n"; \
printf "**\n\n"; \
fi; \
else \
echo "$(NAME) already exists at $(TOPLVL)/packages/$(NAME)"; \
+5
View File
@@ -0,0 +1,5 @@
TEST = test.test_ltsutils
.PHONY: test
test:
PYTHONPATH=. python -m unittest -v -k .Test $(TEST)
+19
View File
@@ -0,0 +1,19 @@
# LTS package maintenance utility
This tooling is designed to automate 2 main tasks that are part of
the package maintenance workflow of Clear Linux LTS. These tasks are:
- Back-porting of a patch (e.g. security fix) to older branches.
- Building RPMs with the intent of sharing binaries of older LTS branches to
newer branches whenever possible.
There should be no need to run this tool directly. Instead use the following
targets defined in Makefile.common.lts:
- lts-show: Show a summary of active LTS branches
- lts-backport: Attempt to fast-forward the previous active branch to the current branch
- lts-build: Build RPM in Koji, or reuse existing build from older branch
"Active" branches correspond to LTS releases that currently have support.
They are listed in a flat file "active-branches" in "lts" directory, from
oldest to newest. New entries are added by Clear Linux LTS developers as
new releases become available, and entries removed as releases become
obsolete.
View File
View File
+52
View File
@@ -0,0 +1,52 @@
import pathlib
from subprocess import PIPE, CalledProcessError
from .shell import Shell
class PackageRepo:
'''Represents a package repository. Most methods are wrappers of git commands.'''
class UnknownCurrentBranchException(Exception): pass
class InvalidBranchException(Exception): pass
def __init__(self, name, path):
self.name = name
self.path = pathlib.Path(path)
self.sh = Shell(self.path)
def getNVR(self, commit='HEAD'):
with self.sh.popen(['git', 'show', '{}:{}.spec'.format(commit, self.name)], stdout=PIPE) as specfile:
nvr = self.sh.run('rpmspec --srpm -q --queryformat %{NVR} /dev/stdin', stdin=specfile.stdout)
return tuple(nvr.stdout.strip().rsplit('-', maxsplit=2))
def checkoutBranch(self, branch, allow_remote=False):
# allow_remote=True allows checking out a new remote-tracking branch
if not allow_remote and not self.hasBranch(branch):
raise self.InvalidBranchException(branch)
self.sh.run_args(['git', 'checkout', branch], capture_output=False)
def fastForwardBranch(self, old, new):
self.checkoutBranch(old)
if not self.hasBranch(new):
raise self.InvalidBranchException(new)
self.sh.run_args(['git', 'merge', '--ff-only', new], capture_output=False)
def getActiveBranches(self):
toplvl = pathlib.Path(self.path) / '../..'
common = toplvl / 'projects/common'
active_branches = common / 'lts/active-branches'
with active_branches.open() as f:
return [line.rstrip() for line in f]
def getCurrentBranch(self):
try:
head = self.sh.run('git symbolic-ref HEAD').stdout.strip()
except CalledProcessError:
raise self.UnknownCurrentBranchException
refs_heads = 'refs/heads/'
assert head.startswith(refs_heads)
head = head[len(refs_heads):]
return head
def hasBranch(self, branch):
p = self.sh.run_args(['git', 'rev-parse', 'refs/heads/'+branch], check=False)
return p.returncode == 0
+27
View File
@@ -0,0 +1,27 @@
import subprocess, shlex
class Shell:
# Default options passed to subprocess.run. May be customized per-instance.
cwd = None
check = True
capture_output = True
text = True
def __init__(self, cwd=None):
if cwd: self.cwd = cwd
def run_args(self, args, **kwargs):
kwargs1 = {
'check': self.check,
'capture_output': self.capture_output,
'text': self.text,
'cwd': self.cwd
}
kwargs1.update(kwargs)
return subprocess.run(args, **kwargs1)
def run(self, cmd, **kwargs):
return self.run_args(shlex.split(cmd), **kwargs)
def popen(self, args, **kwargs):
return subprocess.Popen(args, cwd=self.cwd, **kwargs)
+161
View File
@@ -0,0 +1,161 @@
#!/usr/bin/python
import sys,argparse
from ltsutils.package_repo import PackageRepo
def log(msg, **kwargs):
print(msg, file=sys.stderr)
def init_parser():
main = argparse.ArgumentParser()
main.add_argument('package_name', nargs=1)
subparsers = main.add_subparsers(dest='command', metavar='command', required=True)
# Package maintenance commands
p = subparsers.add_parser('prev-branch',
help='show previous branch')
p.add_argument('--checkout', action='store_true', help='checkout the branch')
p = subparsers.add_parser('next-branch',
help='show next branch')
p.add_argument('--checkout', action='store_true', help='checkout the branch')
p = subparsers.add_parser('current-branch',
help='show current branch')
p = subparsers.add_parser('is-same-version',
help='return true if package version is the same as the given branch')
p.add_argument('branch', nargs=1)
p = subparsers.add_parser('fast-forward',
help='fast-forward current branch to a newer branch')
p.add_argument('branch', nargs=1)
# RPM build commands
p = subparsers.add_parser('can-reuse-binary',
help='check if binary from another branch can be used in current branch')
p.add_argument('branch', nargs=1)
# Other commands
p = subparsers.add_parser('prompt',
help='prompt user to continue and return appropriate exit code')
p = subparsers.add_parser('sanity-check',
help='run sanity checks for data consistency')
return main
def prev_branch(args, repo):
active_branches = repo.getActiveBranches()
current = repo.getCurrentBranch()
i = active_branches.index(current)
if i == 0:
log('Already on oldest active branch.')
return False
prev = active_branches[i-1]
print(prev)
if args.checkout:
repo.checkoutBranch(prev, allow_remote=True)
def next_branch(args, repo):
active_branches = repo.getActiveBranches()
current = repo.getCurrentBranch()
i = active_branches.index(current)
if i == len(active_branches)-1:
log('Already on newest active branch.')
return False
next_ = active_branches[i+1]
print(next_)
if args.checkout:
repo.checkoutBranch(next_, allow_remote=False)
def current_branch(args, repo):
current = repo.getCurrentBranch()
print(current)
def is_same_version(args, other):
current = repo.getCurrentBranch()
other = args.branch[0]
assert repo.hasBranch(other), 'Branch %s not found' % other
v1, v2 = [repo.getNVR('refs/heads/'+b)[1] for b in (current, other)]
if v1 != v2:
log('Current version {} does not match version {} on branch {}'.format(v1, v2, other))
return v1 == v2
def fast_forward(args, repo):
current = repo.getCurrentBranch()
newer = args.branch[0]
log('Fast-forwarding {} to {}'.format(current, newer))
repo.fastForwardBranch(current, newer)
def sanity_check(args, repo):
ok = True
# HEAD must point to a branch
try:
current = repo.getCurrentBranch()
except PackageRepo.UnknownCurrentBranchException:
log('Unknown current branch. Has a branch been checked out?')
current = None
ok = False
# active-branches file must not be empty
active_branches = repo.getActiveBranches()
if not len(active_branches):
log('No active branches defined. Is active-branches file empty?')
ok = False
# current branch must be an active branch
elif current and current not in active_branches:
log('%s is not an active LTS branch.' % current)
ok = False
return ok
def can_reuse_binary(args, repo):
# Just compare versions for now
# TODO: ABI compatibility testing
current = repo.getCurrentBranch()
older = args.branch[0]
v1, v2 = [repo.getNVR('refs/heads/'+b)[1] for b in (older, current)]
return v1 == v2
def prompt(args, repo):
import selectors
timeout = 60
while True:
print('Continue? (y/N): ', end='', flush=True)
with selectors.DefaultSelector() as sel:
sel.register(sys.stdin, selectors.EVENT_READ)
events = sel.select(timeout)
if not len(events):
print('Timed out after {}s.'.format(timeout))
return False
else:
s = sys.stdin.readline().rstrip('\n')
if s in ('Y', 'y', 'N', 'n', ''):
break
if s in ('Y', 'y'):
return True
else:
print('Cancelled.')
return False
if __name__=='__main__':
args = init_parser().parse_args()
repo = PackageRepo(args.package_name[0], '.')
commands = {
'prev-branch': prev_branch,
'next-branch': next_branch,
'current-branch': current_branch,
'is-same-version': is_same_version,
'fast-forward': fast_forward,
'can-reuse-binary': can_reuse_binary,
'prompt': prompt,
'sanity-check': sanity_check,
}
ret = commands[args.command](args, repo)
if ret is not None:
exit(0 if ret else 1)
View File
+97
View File
@@ -0,0 +1,97 @@
import unittest
import os, pathlib, tempfile, logging
import subprocess, functools
from ltsutils.package_repo import PackageRepo
import ltsutils.shell
run = functools.partial(subprocess.run, check=True)
class Package:
def __init__(self, name):
self.name = name
self.repo_url = 'https://github.com/clearlinux-pkgs/{}.git'.format(name)
class LTSUtilsTestCase(unittest.TestCase):
toplvl = pathlib.Path('../../..')
packages = toplvl / 'packages'
def cloneOrExtractRepo(self):
tmpdir = pathlib.Path('/var/tmp/common-lts-test')
tmpdir.mkdir(mode=0o700, exist_ok=True)
tarball = tmpdir / '{}.tar.gz'.format(self.package.name)
if tarball.exists():
run(['tar', 'xf', tarball, '-C', self.workdir])
else:
run(['git', 'clone', self.package.repo_url, self.workdir])
run(['tar', 'czf', tarball, '-C', self.workdir, '.'])
def setUp(self):
self._tmpdir = tempfile.TemporaryDirectory(prefix='test-{}-'.format(self.package.name), dir=self.packages)
self.workdir = pathlib.Path(self._tmpdir.name)
self.cloneOrExtractRepo()
self.repo = PackageRepo(self.package.name, self.workdir)
self._sh = ltsutils.shell.Shell(self.workdir)
self._sh.capture_output = False
def sh(self, cmd):
return self._sh.run(cmd)
def sh_stdout(self, cmd):
return self._sh.run(cmd, capture_output=True).stdout.rstrip()
def tearDown(self):
self._tmpdir.cleanup()
class PackageRepoTestCase(LTSUtilsTestCase):
def setUp(self):
super().setUp()
self.L1 = self.package.L1
self.L2 = self.package.L2
self.sh('git branch L1 %s' % self.L1)
self.sh('git branch L2 %s' % self.L2)
def testGetNVR(self):
raise NotImplementedError
def testHasBranch(self):
self.assertTrue(self.repo.hasBranch('L2'))
self.assertFalse(self.repo.hasBranch('L3'))
def testCheckoutBranch(self):
self.repo.checkoutBranch('L2')
self.assertEqual(self.sh_stdout('git rev-parse HEAD'), self.L2)
self.assertRaises(PackageRepo.InvalidBranchException, self.repo.checkoutBranch, 'L3')
def testFastForward(self):
self.repo.fastForwardBranch('L1', 'L2')
self.assertEqual(self.sh_stdout('git rev-parse L1'), self.L2)
self.assertEqual(self.sh_stdout('git rev-parse L2'), self.L2)
def testGetCurrentBranch(self):
self.repo.checkoutBranch('L2')
b = self.repo.getCurrentBranch()
self.assertEqual(b, 'L2')
self.sh('git checkout --detach L2')
self.assertRaises(PackageRepo.UnknownCurrentBranchException, self.repo.getCurrentBranch)
class TestNano(PackageRepoTestCase):
package = Package('nano')
package.L1 = '3dcfa09f5217eedf6ec7539af7e243655d3abdb6' # 3.2-54
package.L2 = 'b8243dd54e8feb16a11474f848b8735f5591cf12' # 3.2-55
def testGetNVR(self):
nvr = self.repo.getNVR(self.L2)
self.assertEqual(nvr, ('nano', '3.2', '55'))
class TestMySQL_Python(PackageRepoTestCase):
package = Package('MySQL-python')
package.L1 = '386163d8fc9c857c7194c4e958374af4c4f071ed' # 1.2.5-31
package.L2 = 'f85bc5ec2141384f45f224d4464a0a44a981a4d4' # 1.2.5-33
def testGetNVR(self):
nvr = self.repo.getNVR(self.L2)
self.assertEqual(nvr, ('MySQL-python', '1.2.5', '33'))
+289 -4
View File
@@ -308,6 +308,7 @@ R-desc
R-devtools
R-dfoptim
R-dichromat
R-diffobj
R-diffusionMap
R-digest
R-dimRed
@@ -387,6 +388,9 @@ R-fitdistrplus
R-flashClust
R-flexmix
R-flexsurv
R-fontBitstreamVera
R-fontLiberation
R-fontquiver
R-forcats
R-foreach
R-forecast
@@ -407,6 +411,7 @@ R-gbm
R-gbutils
R-gclus
R-gdata
R-gdtools
R-geepack
R-geiger
R-generics
@@ -457,6 +462,7 @@ R-ica
R-igraph
R-import
R-ineq
R-influenceR
R-ini
R-inline
R-inum
@@ -502,6 +508,7 @@ R-lme4
R-lmerTest
R-lmtest
R-locfit
R-logcondens
R-logspline
R-loo
R-lpSolve
@@ -722,6 +729,7 @@ R-rstan
R-rstanarm
R-rstantools
R-rstudio
R-rstudio-server
R-rstudioapi
R-rsvg
R-runjags
@@ -875,6 +883,7 @@ SDL_image
SDL_mixer
SDL_net
SDL_ttf
SFCGAL
SFML
SPIRV-Headers
SPIRV-Tools
@@ -888,6 +897,7 @@ SuiteSparse
Tempita
Theano
Thunar
UCD
UkPostcodeParser
Unidecode
Uranium
@@ -975,10 +985,14 @@ aniso8601
ansible
anyjson
apache-ant
apache-flink
apache-hadoop
apache-kafka
apache-libcloud
apache-maven
apache-spark
apache-tomcat
apache-tomcat-dep
apache-zookeeper
apipkg
appdirs
@@ -991,8 +1005,11 @@ argcomplete
argon2
argon2_cffi
argparse
aria2
ark
armadillo
arp-scan
arpack-ng
artikulate
asciidoc
asciinema
@@ -1149,6 +1166,8 @@ cantor
capnproto
caribou
case
cassandra
cassandra-dep
castellan
casync
catch2
@@ -1265,6 +1284,7 @@ compat-efivar-soname0
compat-enchant-soname1
compat-exiv2-soname26
compat-fuse-soname2
compat-gdal-soname20
compat-gegl
compat-gegl-0.3
compat-glew-soname1
@@ -1276,6 +1296,7 @@ compat-hdf5-soname10
compat-hwloc-soname5
compat-hyperscan-soname4
compat-icu4c-soname61
compat-icu4c-soname63
compat-ilmbase-soname23
compat-intel-gmmlib-soname1
compat-ipset-soname10
@@ -1302,6 +1323,7 @@ compat-poppler-soname78
compat-poppler-soname82
compat-poppler-soname83
compat-poppler-soname86
compat-proj-soname13
compat-protobuf-soname14
compat-protobuf-soname15
compat-python36
@@ -1520,6 +1542,7 @@ dpdk
dracut
dragon
drkonqi
dssi
dstat
dtc
dtopt
@@ -1537,6 +1560,7 @@ edk2
efibootmgr
efitools
efivar
efl
eigen
elasticsearch
elasticsearch-dep
@@ -1546,9 +1570,11 @@ elfutils
elixir
ell
emacs
emacs-x11
embree
empy
enchant
enlightenment
entrypoints
enum34
envs
@@ -1559,12 +1585,14 @@ epydoc
eternalegypt
ethtool
etr
evdev
eventlet
eventviews
evince
evolution
evolution-data-server
evolution-ews
evtest
execnet
exempi
exiv2
@@ -1616,16 +1644,20 @@ flatpak
flatpak-builder
fldigi
flex
flink-dep
flmsg
flnet
fltk
fluidsynth
folks
font-util
fontconfig
fontforge
fonttools
fossil
fox
frameworkintegration
freedv
freeglut
freeipmi
freetype
@@ -1637,7 +1669,6 @@ funcparserlib
funcsigs
functools32
fuse
futures
futurist
fwupd
fwupdate
@@ -1649,6 +1680,8 @@ gawk
gc
gcab
gcc
gcc7
gcc8
gcompris-qt
gcr
gcs-oauth2-boto-plugin
@@ -1675,6 +1708,7 @@ gftp
ghc
ghostscript
gimp
girara
git
git-gui
gitdb2
@@ -1707,6 +1741,7 @@ gnome-applets
gnome-autoar
gnome-backgrounds
gnome-bluetooth
gnome-boxes
gnome-calculator
gnome-calendar
gnome-characters
@@ -1728,6 +1763,7 @@ gnome-music
gnome-online-accounts
gnome-panel
gnome-photos
gnome-screensaver
gnome-screenshot
gnome-session
gnome-settings-daemon
@@ -1757,6 +1793,7 @@ google-api-python-client
google-apitools
google-auth
google-auth-httplib2
google-pasta
google-reauth
googletest
gparted
@@ -1764,6 +1801,7 @@ gperf
gperftools
gpgme
gphoto2
gpm
gpredict
gptfdisk
gradle
@@ -1783,6 +1821,7 @@ grilo-plugins
groff
grpcio
grub
gsequencer
gsettings-desktop-schemas
gsl
gsm
@@ -1819,6 +1858,7 @@ hadoop-dep
hamlib
hammock
haproxy
hardinfo
hardlink
harfbuzz
haskell-random
@@ -1830,6 +1870,7 @@ helloworld
helm
help2man
hexchat
hexedit
hgtools
hicolor-icon-theme
hiredis
@@ -1862,6 +1903,8 @@ iasimage
ibus
ibus-libpinyin
ibus-table
ibus-typing-booster
ibus-unikey
icalendar
icdiff
iceauth
@@ -1879,6 +1922,7 @@ imageio
imagesize
imapfilter
imlib2
importlib_metadata
indent
infiniband-diags
inflection
@@ -1886,6 +1930,7 @@ influxdb
iniparse
init-rdahead
inkscape
innoextract
inotify-tools
intel-cmt-cat
intel-compute-runtime
@@ -1943,6 +1988,7 @@ jedi-vim
jeepney
jemalloc
jmespath
joblib
joe
josepy
jq
@@ -1956,6 +2002,7 @@ jsonpath-rw-ext
jsonpointer
jsonrpc-glib
jsonschema
junit-xml
jupyter
jupyter-nbgallery
jupyter-notebook-gist
@@ -2019,6 +2066,7 @@ kde-dev-utils
kde-gtk-config
kdebugsettings
kdeclarative
kdeconnect-kde
kdecoration
kded
kdeedu-data
@@ -2196,6 +2244,7 @@ kwrited
kxmlgui
kxmlrpcclient
kyotocabinet
ladspa_sdk
lark-parser
latencytop
latexcodec
@@ -2210,6 +2259,7 @@ ldb
ldc
ledmon
lensfun
leptonica
less
leveldb
lftp
@@ -2240,6 +2290,7 @@ libaio
libappindicator
libarchive
libarchive-c
libass
libassuan
libasyncns
libatasmart
@@ -2256,6 +2307,7 @@ libcdio
libcdr
libcgroup
libchamplain
libclc
libcmis
libcomps
libconfig
@@ -2306,6 +2358,7 @@ libgit2-glib
libglade
libgnome-keyring
libgnomekbd
libgovirt
libgpg-error
libgphoto2
libgravatar
@@ -2320,6 +2373,7 @@ libidn
libidn2
libindicator
libinput
libinstpatch
libiscsi
libisofs
libite
@@ -2360,6 +2414,7 @@ libmtp
libmwaw
libmypaint
libndp
libnetfilter_acct
libnetfilter_conntrack
libnetfilter_cthelper
libnetfilter_cttimeout
@@ -2404,6 +2459,7 @@ libsamplerate
libsass
libseccomp
libsecret
libshout
libsigc++
libsigsegv
libsmbios
@@ -2429,6 +2485,7 @@ libtheora
libtirpc
libtk-img
libtool
libtorrent-rasterbar
libudev0-shim
libuev
libuninameslist
@@ -2478,6 +2535,7 @@ linecache2
links
linux
linux-aws
linux-current
linux-firmware
linux-firmware-ipu
linux-gce
@@ -2492,6 +2550,7 @@ linux-kvm
linux-libc-headers
linux-lts2017
linux-lts2018
linux-mainline
linux-networktest
linux-oracle
linux-preempt-rt
@@ -2522,6 +2581,8 @@ lua
lua52
lualgi
luarocks
lutris
lv2
lxml
lxqt-about
lxqt-admin
@@ -2549,6 +2610,7 @@ make
makedepend
man-db
man-pages
man-pages-posix
marble
mariadb
mash
@@ -2616,6 +2678,7 @@ mpc
mpfr
mpg123
mpi4py
mpir
mpmath
mpv
mraa
@@ -2628,6 +2691,7 @@ msrestazure
mstflint
mtd-utils
mtdev
mtools
mtr
multidict
multimon-ng
@@ -2640,6 +2704,179 @@ musl
mutagen
mutt
mutter
mvn-aether-core
mvn-animal-sniffer
mvn-antlr
mvn-antlr4-runtime
mvn-apache
mvn-apache-jar-resource-bundle
mvn-apache-rat
mvn-asm
mvn-autolink
mvn-avalon-framework
mvn-beanshell
mvn-biz.aQute.bndlib
mvn-bndlib
mvn-build-helper-maven-plugin
mvn-buildnumber-maven-plugin
mvn-cdi-api
mvn-checker-compat-qual
mvn-checkstyle
mvn-codehaus-jackson
mvn-commons-beanutils
mvn-commons-cli
mvn-commons-codec
mvn-commons-collections
mvn-commons-compress
mvn-commons-digester
mvn-commons-httpclient
mvn-commons-io
mvn-commons-jxpath
mvn-commons-lang
mvn-commons-lang3
mvn-commons-logging
mvn-commons-parent
mvn-commons-validator
mvn-decentxml
mvn-doxia
mvn-doxia-sitetools
mvn-doxia-tools
mvn-enforcer
mvn-error_prone_annotations
mvn-extra-enforcer-rules
mvn-file-management
mvn-google
mvn-google-collections
mvn-guava
mvn-guice
mvn-hamcrest
mvn-httpcomponents-client
mvn-httpcomponents-core
mvn-j2objc-annotations
mvn-jackson-annotations
mvn-jackson-core
mvn-jackson-databind
mvn-jansi
mvn-java-boot-classpath-detector
mvn-javax.inject
mvn-jaxb-impl
mvn-jdom
mvn-jersey-apache-client4
mvn-jersey-core
mvn-jersey-json
mvn-jetty
mvn-jetty-parent
mvn-jetty-util
mvn-jsch
mvn-jsch.agentproxy.connector-factory
mvn-jsch.agentproxy.core
mvn-jsch.agentproxy.pageant
mvn-jsch.agentproxy.sshagent
mvn-jsch.agentproxy.svnkit-trilead-ssh2
mvn-jsch.agentproxy.usocket-jna
mvn-jsch.agentproxy.usocket-nc
mvn-jsoup
mvn-jsr250-api
mvn-jsr305
mvn-jsr311-api
mvn-junit
mvn-kxml2
mvn-logback-classic
mvn-logback-core
mvn-maven
mvn-maven-aether-provider
mvn-maven-archiver
mvn-maven-artifact
mvn-maven-artifact-manager
mvn-maven-builder-support
mvn-maven-bundle-plugin
mvn-maven-compat
mvn-maven-core
mvn-maven-embedder
mvn-maven-error-diagnostics
mvn-maven-model
mvn-maven-model-builder
mvn-maven-monitor
mvn-maven-parent
mvn-maven-plugin-api
mvn-maven-plugin-descriptor
mvn-maven-plugin-parameter-documenter
mvn-maven-plugin-registry
mvn-maven-plugin-testing
mvn-maven-plugin-tools
mvn-maven-profile
mvn-maven-project
mvn-maven-reporting-api
mvn-maven-reporting-exec
mvn-maven-reporting-impl
mvn-maven-repository-metadata
mvn-maven-resolver
mvn-maven-resolver-provider
mvn-maven-scm
mvn-maven-scm-provider-svnjava
mvn-maven-settings
mvn-maven-shared
mvn-maven-slf4j-provider
mvn-maven-surefire
mvn-maven-toolchain
mvn-mockito-core
mvn-modello
mvn-mojo-parent
mvn-mvnplugins
mvn-nekohtml
mvn-nexus-maven-plugins
mvn-nexus-public
mvn-objenesis
mvn-openhtmltopdf-parent
mvn-org.apache.felix.bundlerepository
mvn-org.eclipse.sisu.inject
mvn-org.eclipse.sisu.plexus
mvn-org.osgi.compendium
mvn-org.osgi.core
mvn-oro
mvn-ow2
mvn-pdfbox
mvn-plexus
mvn-plexus-archiver
mvn-plexus-build-api
mvn-plexus-cipher
mvn-plexus-classworlds
mvn-plexus-cli
mvn-plexus-compiler
mvn-plexus-containers
mvn-plexus-i18n
mvn-plexus-interactivity
mvn-plexus-interpolation
mvn-plexus-io
mvn-plexus-languages
mvn-plexus-resources
mvn-plexus-utils
mvn-plexus-velocity
mvn-protobuf-java
mvn-servlet-api
mvn-siesta
mvn-sisu
mvn-sisu-maven-plugin
mvn-slf4j
mvn-snakeyaml
mvn-snappy
mvn-sonatype-aether
mvn-sonatype-plexus-sec-dispatcher
mvn-spice-zapper
mvn-sqljet
mvn-sslext
mvn-struts
mvn-trilead-ssh2
mvn-tycho
mvn-validation-api
mvn-velocity
mvn-wagon
mvn-xbean-reflect
mvn-xercesImpl
mvn-xercesMinimal
mvn-xml-apis
mvn-xmlunit
mvn-xmlunit-core
mxnet
mycroft-core
mypaint-brushes
@@ -2669,6 +2906,7 @@ net-tools
netaddr
netbase
netcdf
netdata
netdisco
netifaces
netkit-telnet
@@ -2687,6 +2925,7 @@ nghttp2
nginx
nginx-mainline
nicstat
nim
ninja
nload
nlopt
@@ -2734,6 +2973,7 @@ ocl-icd
octave
offlineimap
oiio
okteta
okular
olefile
onig
@@ -2898,6 +3138,7 @@ perl-B-Hooks-OP-Check
perl-B-Keywords
perl-BSD-Resource
perl-Biblio-EndnoteStyle
perl-Bit-Vector
perl-Browser-Open
perl-Business-ISBN
perl-Business-ISBN-Data
@@ -2915,6 +3156,8 @@ perl-CSS-DOM
perl-CSS-Minifier-XS
perl-CSS-Tiny
perl-Cache-Simple-TimedExpiry
perl-Cairo
perl-Cairo-GObject
perl-Calendar-Simple
perl-Canary-Stability
perl-Capture-Tiny
@@ -2974,6 +3217,7 @@ perl-Curses
perl-DBD-Pg
perl-DBD-SQLite
perl-DBD-SQLite2
perl-DBD-mysql
perl-DBI
perl-DBICx-TestDatabase
perl-DBIx-Class
@@ -3003,6 +3247,7 @@ perl-Data-Serializer
perl-Data-Structure-Util
perl-Data-Uniqid
perl-Data-Validate-IP
perl-Date-Manip
perl-DateTime
perl-DateTime-Format-Builder
perl-DateTime-Format-DateParse
@@ -3064,6 +3309,7 @@ perl-ExtUtils-Config
perl-ExtUtils-Depends
perl-ExtUtils-Helpers
perl-ExtUtils-InstallPaths
perl-ExtUtils-PkgConfig
perl-FCGI-ProcManager
perl-Feed-Find
perl-Fennec-Lite
@@ -3111,7 +3357,11 @@ perl-Geo-IPfree
perl-Getopt-Euclid
perl-Getopt-Tabular
perl-Git-Version-Compare
perl-Glib
perl-Glib-Object-Introspection
perl-Graph
perl-Gtk3
perl-Gtk3-WebKit
perl-Guard
perl-HTML-Clean
perl-HTML-Encoding
@@ -3174,6 +3424,7 @@ perl-Inline-C
perl-JSON
perl-JSON-MaybeXS
perl-JSON-RPC
perl-JSON-XS
perl-JavaScript-Minifier-XS
perl-LWP-MediaTypes
perl-LWP-Protocol-https
@@ -3258,6 +3509,7 @@ perl-Moose
perl-MooseX-Role-Parameterized
perl-MooseX-Role-WithOverloading
perl-Mozilla-CA
perl-Net-Bluetooth
perl-Net-CIDR-Lite
perl-Net-DBus
perl-Net-DNS
@@ -3337,6 +3589,7 @@ perl-Role-Basic
perl-Role-Tiny
perl-Roman
perl-Router-Simple
perl-SGLMSpm
perl-SMTP-Server
perl-SQL-Abstract
perl-SQL-Translator
@@ -3414,6 +3667,7 @@ perl-Test-MockTime
perl-Test-More-UTF8
perl-Test-Most
perl-Test-Needs
perl-Test-NeedsDisplay
perl-Test-NoWarnings
perl-Test-Number-Delta
perl-Test-Output
@@ -3442,6 +3696,7 @@ perl-Text-Brew
perl-Text-CSV
perl-Text-CSV-Encoded
perl-Text-CSV_XS
perl-Text-CharWidth
perl-Text-Diff
perl-Text-FindIndent
perl-Text-Format
@@ -3457,6 +3712,7 @@ perl-Text-TabularDisplay
perl-Text-Template
perl-Text-Trim
perl-Text-Unidecode
perl-Text-WrapI18N
perl-Text-Wrapper
perl-Tie-Cycle
perl-Tie-IxHash
@@ -3480,10 +3736,12 @@ perl-URI-Escape-XS
perl-URI-Fetch
perl-URI-Find
perl-UUID-Tiny
perl-Unicode-LineBreak
perl-Unicode-Map
perl-Variable-Magic
perl-WWW-Form-UrlEncoded-XS
perl-WWW-RobotRules
perl-X11-IdleTime
perl-X11-Protocol
perl-XML-Atom
perl-XML-Feed
@@ -3532,6 +3790,7 @@ persistent
pesign
pexpect
phonon
phonon-vlc
phoronix-test-suite
php
php-imagick
@@ -3575,6 +3834,7 @@ plasma-workspace-wallpapers
pluggy
ply
plzip
pm-graph
pmdk
polkit
polkit-kde-agent
@@ -3586,6 +3846,7 @@ portaudio
portend
positional
posix_ipc
postgis
postgresql
potrace
povray
@@ -3659,6 +3920,7 @@ pygtkglext
pyhs100
pyinotify
pykerberos
pykwalify
pylama
pyliblzma
pylint
@@ -3704,6 +3966,7 @@ python-crfsuite
python-dateutil
python-dateutil-legacypython
python-designateclient
python-distutils-extra
python-dldt
python-editor
python-future
@@ -3761,11 +4024,13 @@ pywbem
pyxattr
pyxdg
pyzmq
qbittorrent
qca-qt5
qemu
qemu-guest-additions
qemu-lite
qgit
qhull
qml-box2d
qpdf
qpid-python
@@ -3816,8 +4081,11 @@ quazip
quilt
qwt
rabbitmq-c
rabbitmq-java-client
rabbitmq-java-client-dep
rabbitmq-server
radvd
rage
ragel
raptor2
rasqal
@@ -3873,9 +4141,10 @@ rsync
rsyslog
rt-tests
rtkit
rtmpdump
rtslib-fb
rttr
ruamel-yaml
ruamel.yaml
ruby
runc
rust-std32
@@ -3894,6 +4163,7 @@ sbc
sbsigntools
scala
scala-dep
scdoc
scene-alembic
scikit-build
scikit-image
@@ -3921,11 +4191,13 @@ setproctitle
setserial
setuptools
setuptools-legacy
setuptools-markdown
setuptools_scm
setuptools_scm_git_archive
setxkbmap
sg3_utils
shadow
shapelib
shared-mime-info
sharutils
shell
@@ -4006,6 +4278,7 @@ stellarium
step
stestr
stevedore
stoken
stow
strace
stress-ng
@@ -4057,6 +4330,7 @@ telemetrics-client
telepathy-glib
telepathy-logger
telepathy-qt
tempest
tempest-lib
template-glib
tempora
@@ -4068,8 +4342,11 @@ tensorflow-probability
termcolor
terminado
terminaltables
terminology
terminus-font
tesseract
test-generator
testdisk
testpath
testrepository
testresources
@@ -4124,12 +4401,13 @@ tracker-miners
traitlets
tree
trollius
typed-ast
typed_ast
typing
typing_extensions
tzdata
tzlocal
ua-parser
uamqp
ucpp
udisks2
udunits
@@ -4183,6 +4461,7 @@ volk
volume_key
voluptuous
voluptuous-serialize
vpnc
vsqlite
vte
waffle
@@ -4204,6 +4483,7 @@ weechat
weston
wget
wheel
wheelhouse-uploader
which
whois
widgetsnbextension
@@ -4211,9 +4491,11 @@ wine
winpdb
wireless-regdb-master
wireshark
wmctrl
woff2
wok
wol
wordpress
wpa_supplicant
wrapt
wsgi_intercept
@@ -4241,7 +4523,6 @@ xdg-user-dirs-gtk
xdg-utils
xdotool
xdpyinfo
xemacs
xerces-c
xf86-input-evdev
xf86-input-libinput
@@ -4278,6 +4559,7 @@ xkbcomp
xkeyboard-config
xkill
xlog
xmlb
xmlrpc-c
xmlsec1
xmlstarlet
@@ -4320,14 +4602,17 @@ yum
yum-metadata-parser
zVMCloudConnector
zake
zathura
zc.lockfile
zenity
zeroconf
zeroconf-ioslave
zict
zip
zipp
zlib
znc
zoneminder
zookeeper-dep
zope.component
zope.configuration
+13 -1
View File
@@ -195,7 +195,7 @@ def main():
with open (filename, "r") as myfile:
lines = myfile.readlines()
else:
output = subprocess.check_output("git show", shell=True).decode("latin-1")
output = subprocess.check_output("git format-patch -1 --stdout", shell=True).decode("latin-1")
lines = output.split("\n")
parse_patch(lines)
@@ -225,6 +225,14 @@ def main():
zap_line_in_file_start(".spec", "Source99 :")
zap_line_in_file_start(".spec", "Source0 :")
zap_line_in_file_start(".spec", "export SOURCE_DATE_EPOCH")
zap_line_in_file_start(".spec", "export GCC_IGNORE_WERROR=1")
zap_line_in_file_start(".spec", "export AR=gcc-ar")
zap_line_in_file_start(".spec", "export RANLIB=gcc-ranlib")
zap_line_in_file_start(".spec", "export NM=gcc-nm")
zap_line_in_file_start(".spec", "export CFLAGS=\"$CFLAGS -O3 -ffat-lto-objects -flto=4 \"")
zap_line_in_file_start(".spec", "export FCFLAGS=\"$CFLAGS -O3 -ffat-lto-objects -flto=4 \"")
zap_line_in_file_start(".spec", "export FFLAGS=\"$CFLAGS -O3 -ffat-lto-objects -flto=4 \"")
zap_line_in_file_start(".spec", "export CXXFLAGS=\"$CXXFLAGS -O3 -ffat-lto-objects -flto=4 \"")
zap_line_in_file_start(".spec", "%setup -q -n ")
zap_line_in_file_start(".spec", "URL :")
zap_line_in_file_start(".spec", "Version :")
@@ -236,6 +244,7 @@ def main():
zap_line_in_file_start(".spec", "data components for the")
zap_line_in_file_start(".spec", "locales components for the")
zap_line_in_file_start(".spec", "license components for the")
zap_line_in_file_start(".spec", "doc components for the")
zap_line_in_file_start(".spec", "Group: Default")
zap_line_in_file_start(".spec", "export http_proxy=http://127.0.0.1:9/")
zap_line_in_file_start(".spec", "export https_proxy=http://127.0.0.1:9/")
@@ -246,13 +255,16 @@ def main():
zap_line_in_file_start(".spec", "Group: Binaries")
zap_line_in_file_start(".spec", "Group: Data")
zap_line_in_file_start(".spec", "Group: Libraries")
zap_line_in_file_start(".spec", "Group: Documentation")
zap_line_in_file_start(".spec", "export LANG=C")
zap_line_in_file_start(".spec", "%description lib")
zap_line_in_file_start(".spec", "%description bin")
zap_line_in_file_start(".spec", "%description data")
zap_line_in_file_start(".spec", "%description doc")
zap_line_in_file_start(".spec", "%description locales")
zap_line_in_file_start(".spec", "%description dev")
zap_line_in_file_start(".spec", "%description license")
zap_line_in_file_start(".spec", "%package doc")
zap_line_in_file_start("b/Makefile", "URL =")
zap_line_in_file_start("b/Makefile", "PKG_NAME :=")