Compare commits

...

55 Commits

Author SHA1 Message Date
Robert Dower f98964d9b9 archive repository 2025-08-07 13:28:46 -07:00
Arjan van de Ven c65c2663b4 update packages file 2025-07-11 15:12:11 +00:00
Arjan van de Ven fc7ba03d0e update packages file 2025-07-02 18:21:17 +00:00
Arjan van de Ven 8b81fa9be0 update packages file 2025-06-25 23:47:09 +00:00
Arjan van de Ven 1c5b29f61b update packages file 2025-06-24 13:53:13 +00:00
Arjan van de Ven dc69bff43e update packages file 2025-06-12 16:49:24 +00:00
Arjan van de Ven 57186b17e5 update packages file 2025-06-11 23:14:53 +00:00
Arjan van de Ven 6f6ca85feb update packages file 2025-06-06 16:20:59 +00:00
Arjan van de Ven 884b4283cb update packages file 2025-05-29 16:25:51 +00:00
Arjan van de Ven cf423b235d update packages file 2025-05-29 00:16:30 +00:00
Arjan van de Ven 5ba591d007 update packages file 2025-05-23 06:23:45 +00:00
Brett T. Warden e005f2164e Make catchup- a little bit more flexible with tag names
We support tag names like
${package}-${version}
${package}-v${version}
${version}
v${version}

Now add support for things like
${package}-foo-bar-${version}
foo-bar-${version}

for example:
vulkan-sdk-1.3.275.0 for SPIRV-Headers
2025-04-30 13:31:19 -07:00
Arjan van de Ven 5ed7435295 update packages file 2025-04-24 19:10:13 +00:00
Arjan van de Ven 0215deaf60 update packages file 2025-04-22 18:26:19 +00:00
Arjan van de Ven 3bea87a841 update packages file 2025-04-17 16:25:14 +00:00
Arjan van de Ven 1d363fd932 update packages file 2025-04-15 16:10:10 +00:00
Arjan van de Ven 05ccbbe7a7 update packages file 2025-04-10 16:35:03 +00:00
Arjan van de Ven b4b4a84dbb update packages file 2025-03-25 18:25:21 +00:00
Arjan van de Ven 8e2a825ca8 update packages file 2025-03-20 23:10:10 +00:00
Arjan van de Ven e8c53e4a2e update packages file 2025-03-17 15:39:42 +00:00
Arjan van de Ven 5d1521256e update packages file 2025-03-11 16:33:54 +00:00
Arjan van de Ven c43ccd01e8 update packages file 2025-03-06 19:44:36 +00:00
Arjan van de Ven f80b262ad7 update packages file 2025-03-05 07:49:33 +00:00
Arjan van de Ven 2b6b813c0a update packages file 2025-02-27 22:27:51 +00:00
Arjan van de Ven ec9fa3b778 update packages file 2025-02-25 19:01:23 +00:00
Arjan van de Ven e473e2bce8 update packages file 2025-02-18 18:30:50 +00:00
Arjan van de Ven d5dc76d31e update packages file 2025-02-13 18:17:21 +00:00
Arjan van de Ven f825b6b7fc update packages file 2025-02-12 07:05:01 +00:00
Arjan van de Ven 4627d7a47d update packages file 2025-02-04 18:21:27 +00:00
Arjan van de Ven 8b2e15fa59 update packages file 2025-01-28 17:50:13 +00:00
Arjan van de Ven ec3903192a update packages file 2025-01-24 00:07:48 +00:00
Arjan van de Ven da6bc31e4a update packages file 2025-01-17 14:49:29 +00:00
Arjan van de Ven c360ffe52c update packages file 2025-01-09 19:17:51 +00:00
Arjan van de Ven f092f66d8d update packages file 2024-12-19 06:03:26 +00:00
Brett T. Warden 704e8c90b8 Cleanup parsing of version from specfile in catchup targets
Make sure we only parse %{version} one time while doing a catchup.
2024-12-05 17:11:40 -08:00
Brett T. Warden 1ca80a16a3 Implement catchup targets
Implement a new target 'catchup' that will backport upstream commits
from the current package version to HEAD.
Implement a new target 'catchup-<commit|tag>' that will backport
upstream commits up to the target, as resolvable by git. This powers
'catchup'.
Rework the target 'backport-<commit>' to clone and use the upstream
git repository instead of using GitHub URLs. This also simplifies the
resolution of targets to full commit hashes, as needed to ensure unique
patch names and entries in 'series'.

'make catchup' will backport all the patches to catch this package up to
the upstream's HEAD
'make catchup-v5.0' will backport all the patches to catch this package
up to tag "v5.0" upstream.
'make catchup-ffdcba' will backport all the patches between this
package's current version and the upstream commit ffdcba.
'make backport-ffdcba' will backport ONLY upstream commit ffdcba.

All targets will produce patches named "backport-<commit>.patch", where
<commit> is the full SHA1 commit hash, regardless of whether you used an
abbreviated hash (or a tag, for catchup-%).

Patches are added to 'series' in chronological order, unless they're
already anywhere in that file.
2024-12-05 16:00:31 -08:00
Arjan van de Ven 27e359bda0 update packages file 2024-12-05 19:57:20 +00:00
Brett T. Warden 3db02dd609 Implement backport-<commit> target
For packages with a GitHub repo configured in options.conf, allow
downloading and applying backport patches via the 'backport-<commit>'
target. If given an abbreviated commit ID, it will still create a
backport-<commit>.patch file with the full commit hash, plus add it (if
it does not already exist) to the end of the series file.

Because this handles a single commit at a time, this should be wrappable
by a future Makefile target that applies individual commits to catch up
to a target tag, for example.
2024-12-02 16:13:06 -08:00
Arjan van de Ven 5866d7afbf update packages file 2024-11-25 21:15:54 +00:00
Arjan van de Ven 437d1ee01a update packages file 2024-11-13 17:16:18 +00:00
Arjan van de Ven cb5d78bb2f update packages file 2024-11-05 04:43:02 +00:00
William Douglas 9bfaefc491 Add support for multiple Cargo.toml files
Some projects store multiple Cargo.toml files, let vendor handle all
of them (might be worth having some config for certain Cargo.toml
paths to skip in the future though).

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-10-31 10:30:24 -07:00
Arjan van de Ven 64a20fa5c2 update packages file 2024-10-24 18:55:47 +00:00
Arjan van de Ven e0b152250f use gz not xz 2024-10-22 15:39:37 +00:00
Arjan van de Ven 70ca088ce6 update packages file 2024-10-18 19:19:02 +00:00
Arjan van de Ven a3c7b734fa packages update 2024-10-17 15:08:53 +00:00
Arjan van de Ven 7ff8c3a6d5 update packages file 2024-10-15 13:47:25 +00:00
William Douglas bdac11063e bump target: Stash repo first
In order to prevent content that wasn't committed from working its way
into a build, stash prior to doing the rest of the bump.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-10-10 11:47:15 -07:00
Arjan van de Ven 52f73c1530 packages update 2024-09-20 15:00:40 +00:00
Arjan van de Ven 072d9b81a2 packages update 2024-09-11 17:01:52 +00:00
Brett T. Warden 85a3e1cd32 Add libpng-2.0 license 2024-09-11 08:38:47 -07:00
William Douglas 3bf41ad9c9 Update vendor script to always use the latest tag
Sometimes vendor repos get tagged but the package fails to update for
another reason. In this case the repo wouldn't have the new vendor
ARCHIVE set and new attempts to build would use the old vendor archive
causing failures. Force using the latest vendor tag as generally this
is what we want (if we get a bad vendor tag somehow, it should mean a
new tag needs to be created to replace it anyway).

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-09-06 13:12:13 -07:00
Arjan van de Ven 92b3d682ec udpate 2024-08-22 18:35:05 +00:00
Arjan van de Ven ce873b4b19 packages update 2024-08-20 15:16:40 +00:00
Arjan van de Ven 463112629b packages update 2024-08-13 15:18:01 +00:00
5 changed files with 263 additions and 64 deletions
+73
View File
@@ -223,6 +223,7 @@ scanlicense:
#help the variable BUMP_MSG is set, its value is used as the commit summary.
#help Otherwise a generic commit summary is used.
bump:
git stash
git pull --rebase
$(MAKE) bumpnogit
git add $(SPECFILE) release
@@ -581,6 +582,78 @@ cloc: $(SRPMFILE)
@$(MOCK) --clean --scrub=chroot --uniqueext=$(PKG_NAME)
cat results/cloc.txt
#help catchup: Backport the commits from the current version to the upstream HEAD (not release).
#help Only works if giturl is defined and the current package version can be mapped to a git tag.
catchup:
$(MAKE) catchup-HEAD
#help catchup-<commit|tag>: Backport the commits from the current version to the specified commit or tag.
#help Only works if giturl is defined and the current package version can be mapped to a git tag.
catchup-%:
@target=$*; \
giturl=$$(grep -E '^giturl\s*=\s*\S+' options.conf | sed 's/giturl\s*=\s*//' 2>/dev/null); \
if [[ -z "$${giturl}" ]]; then \
echo "Error: giturl not defined in options.conf"; \
exit 1; \
fi; \
mkdir -p results; \
if [[ -d results/$(PKG_NAME) ]]; then \
echo "Reusing existing repository..."; \
git -C results/$(PKG_NAME) fetch origin; \
else \
echo "Cloning upstream repository..."; \
git -C results clone "$${giturl}" $(PKG_NAME); \
fi; \
if ! git -C results/$(PKG_NAME) rev-parse --verify --quiet "$${target}" >/dev/null; then \
echo "Error: Target commit/tag $${target} not found"; \
exit 1; \
fi; \
version=$$(rpm -q --qf '%{VERSION}\n' --specfile $(SPECFILE) | head -1); \
echo "Version: $${version}"; \
current_tag=$$(git -C results/$(PKG_NAME) tag --list | grep -E "^($(PKG_NAME)-)?(.+-|v)?$${version}$$") || { \
echo "Error: No tag found for current package version"; \
exit 1; \
}; \
echo "Catching up from $${current_tag} to $${target}"; \
for commit in $$(git -C results/$(PKG_NAME) log --reverse --pretty=oneline $${current_tag}..$${target} | cut -d' ' -f1); do \
$(MAKE) backport-$${commit}; \
done;
#help backport-<commit>: Retrieve a commit from the upstream git repository and save it as a backport patch.
#help The giturl is read from options.conf.
backport-%:
@commit=$*; \
echo "Backporting commit: $${commit}"; \
giturl=$$(grep -E '^giturl\s*=\s*\S+' options.conf | sed 's/giturl\s*=\s*//' 2>/dev/null); \
if [[ -z "$${giturl}" ]]; then \
echo "Error: giturl not defined in options.conf"; \
exit 1; \
fi; \
mkdir -p results; \
if [[ -d results/$(PKG_NAME) ]]; then \
echo "Reusing existing repository..."; \
git -C results/$(PKG_NAME) fetch origin; \
else \
echo "Cloning upstream repository..."; \
git -C results clone "$${giturl}" $(PKG_NAME); \
fi; \
full_commit=$$(git -C results/$(PKG_NAME) show --pretty=oneline $${commit} 2>/dev/null | head -1 | cut -d' ' -f 1); \
if [[ -z "$${full_commit}" ]]; then \
echo "Error: Commit for $${commit} not found"; \
exit 1; \
fi; \
patch=backport-$${full_commit}.patch; \
git -C results/$(PKG_NAME) format-patch -1 --stdout $${full_commit} > $${patch}; \
if [[ -s $${patch} ]]; then \
echo "$${patch} created"; \
grep -qE "^$${patch}$$" series 2>/dev/null || echo "$${patch}" >> series; \
else \
rm -f $${patch}; \
echo "Error: Failed to create backport patch"; \
exit 1; \
fi \
.PHONY: whatrequires
#help whatrequires: Output a list of packages that directly depend on this one,
#help showing the subpackage-level breakdown. Each line of output has the format
+7
View File
@@ -1,3 +1,10 @@
## DISCONTINUATION OF PROJECT.
This project will no longer be maintained by Intel.
Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.
Contact: webadmin@linux.intel.com
# Developer tooling framework for Clear Linux
This repository includes scripts, configuration files, and makefiles that
+1
View File
@@ -5,3 +5,4 @@ GFDL-1.3+
MIT-Opengroup
WXwindows
w3c
libpng-2.0
+152 -38
View File
File diff suppressed because it is too large Load Diff
+30 -26
View File
@@ -50,16 +50,17 @@ def setup_content(url):
def setup_cargo_vendor(path):
cargo_paths = []
for dirpath, _, files in os.walk(path):
for fname in files:
if fname == "Cargo.toml":
return dirpath
return False
cargo_paths.append(os.path.join(dirpath, fname))
return cargo_paths
def update_cargo_vendor(path, name, git):
def update_cargo_vendor(tmpdir, cargo_paths, name, git):
git_uri = os.path.join(git, name)
vendor_path = os.path.join(path, 'vendor')
vendor_path = os.path.join(tmpdir, 'vendor')
subprocess.run(f"git clone {git_uri} {vendor_path}", shell=True, check=True,
stdout=subprocess.DEVNULL)
vendor_git = os.path.join(vendor_path, '.git')
@@ -69,20 +70,26 @@ def update_cargo_vendor(path, name, git):
stdout=subprocess.DEVNULL)
subprocess.run(f"git remote add origin {git_uri}", cwd=vendor_path,
shell=True, check=True, stdout=subprocess.DEVNULL)
backup_vendor_git = os.path.join(path, 'clear-linux-vendor-git')
subprocess.run(f"cp -a {vendor_git} {backup_vendor_git}", cwd=path,
backup_vendor_git = os.path.join(tmpdir, 'clear-linux-vendor-git')
subprocess.run(f"cp -a {vendor_git} {backup_vendor_git}", cwd=tmpdir,
shell=True, check=True, stdout=subprocess.DEVNULL)
shutil.rmtree(vendor_path)
cargo_vendors = subprocess.run('cargo vendor', cwd=path, shell=True,
vendor_cmd = 'cargo vendor ' + ' '.join([f"-s {x}" for x in cargo_paths[:-1]])
vendor_cmd += f" --manifest-path {cargo_paths[-1]}"
cargo_vendors = subprocess.run(vendor_cmd, cwd=tmpdir, shell=True,
check=True, stdout=subprocess.PIPE,
universal_newlines=True).stdout
with open(os.path.join(vendor_path, ".gitattributes"), "w", encoding='utf8') as gafile:
gafile.write("* text=false\n")
subprocess.run(f"cp -a {backup_vendor_git} {vendor_git}", cwd=path,
subprocess.run(f"cp -a {backup_vendor_git} {vendor_git}", cwd=tmpdir,
shell=True, check=True, stdout=subprocess.DEVNULL)
repo = Repo(vendor_path)
if not (len(repo.untracked_files) > 0 or repo.is_dirty()):
return False, ""
# Always use the newest tag as sometimes a new tag will
# be created but the package won't be updated to use it
# for a different failure reason.
tag = sorted(repo.tags, key=lambda x: x.name, reverse=True)[0]
return tag, cargo_vendors
subprocess.run('git add .', cwd=vendor_path, shell=True, check=True,
stdout=subprocess.DEVNULL)
subprocess.run('git commit -m "vendor update"', cwd=vendor_path,
@@ -107,11 +114,11 @@ def update_cargo_sources(name, tag, cargo_vendors):
with open('Makefile', encoding='utf8') as mfile:
for line in mfile.readlines():
if line.startswith('ARCHIVES'):
if re.search(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.xz', line):
new_archives = re.sub(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.xz',
f"{archive_replace}-{tag}.tar.xz", line)
if re.search(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.gz', line):
new_archives = re.sub(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.gz',
f"{archive_replace}-{tag}.tar.gz", line)
else:
new_archives = f"{line[:-1]} {archive_replace}-{tag}.tar.xz ./vendor\n"
new_archives = f"{line[:-1]} {archive_replace}-{tag}.tar.gz ./vendor\n"
print(new_archives.replace('ARCHIVES = ', '', 1))
makefile.append(new_archives)
else:
@@ -124,11 +131,11 @@ def update_cargo_sources(name, tag, cargo_vendors):
with open('options.conf', encoding='utf8') as ofile:
for line in ofile.readlines():
if line.startswith('archives'):
if re.search(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.xz', line):
new_archives = re.sub(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.xz',
f"{archive_match}-{tag}.tar.xz", line)
if re.search(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.gz', line):
new_archives = re.sub(archive_match + r'[a-zA-Z0-9_\-.]+\.tar\.gz',
f"{archive_match}-{tag}.tar.gz", line)
else:
new_archives = f"{line[:-1]} {archive_match}-{tag}.tar.xz ./vendor\n"
new_archives = f"{line[:-1]} {archive_match}-{tag}.tar.gz ./vendor\n"
options.append(new_archives)
else:
options.append(line)
@@ -139,7 +146,6 @@ def update_cargo_sources(name, tag, cargo_vendors):
def main():
updated = False
args = get_args()
vtype = vendor_check()
@@ -149,14 +155,12 @@ def main():
tdir = setup_content(args.url)
if vtype == 'cargo':
vdir = setup_cargo_vendor(tdir)
if vdir:
tag, cargo_vendors = update_cargo_vendor(vdir, args.name, args.git)
if tag:
update_cargo_sources(args.name, tag, cargo_vendors)
updated = True
if not updated:
print(args.archives)
cargo_paths = setup_cargo_vendor(tdir)
if len(cargo_paths) == 0:
print(args.archives)
else:
tag, cargo_vendors = update_cargo_vendor(tdir, cargo_paths, args.name, args.git)
update_cargo_sources(args.name, tag, cargo_vendors)
shutil.rmtree(tdir)