Compare commits
30 Commits
v1.1
...
6144945c31
Author | SHA1 | Date | |
---|---|---|---|
6144945c31 | |||
ea5c285270 | |||
9d218a005a | |||
5354160b25 | |||
4d29a63a34 | |||
e01964e86a | |||
cafa354501 | |||
07285b0cc7 | |||
fe984b1da2 | |||
e8ae210c2d | |||
e629f9561c | |||
7f1ecb9f41 | |||
fcdbff1da2 | |||
5bac010c6d | |||
d0b8d56db4 | |||
0bc98d2bf8 | |||
10e566b640 | |||
8b6c1367f0 | |||
8be0311320 | |||
aecf691938 | |||
fcc2302ac9 | |||
096b6d6f69 | |||
0d5bc034b1 | |||
92246206dc | |||
519f8d5656 | |||
cafae574a8 | |||
88643910fb | |||
ceea7ef522 | |||
d85e5aae68 | |||
e4fcd8d6cf |
57
Makefile
57
Makefile
@ -5,30 +5,30 @@ PACKAGE = autodist
|
||||
|
||||
include VERSION
|
||||
|
||||
prefix = /usr
|
||||
exec_prefix = ${prefix}
|
||||
sysconfdir = /etc
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
bindir = ${exec_prefix}/bin
|
||||
datadir = ${prefix}/share
|
||||
unitdir = ${prefix}/lib/systemd/system
|
||||
libexecdir = ${prefix}/libexec
|
||||
mandir = ${prefix}/usr/share/man
|
||||
sysconfigdir= ${sysconfdir}/sysconfig
|
||||
configdir = ${sysconfdir}/autodist
|
||||
localstatedir= /var
|
||||
piddir= /run/autodist
|
||||
cgidir = ${localstatedir}/www/cgi-bin
|
||||
htmldir = ${localstatedir}/www/html
|
||||
prefix := /usr
|
||||
exec_prefix := ${prefix}
|
||||
sysconfdir := /etc
|
||||
sbindir := ${exec_prefix}/sbin
|
||||
bindir := ${exec_prefix}/bin
|
||||
datadir := ${prefix}/share
|
||||
unitdir := ${prefix}/lib/systemd/system
|
||||
libexecdir := ${prefix}/libexec
|
||||
mandir := ${prefix}/usr/share/man
|
||||
sysconfigdir := ${sysconfdir}/sysconfig
|
||||
configdir := ${sysconfdir}/autodist
|
||||
localstatedir := /var
|
||||
piddir := /run/autodist
|
||||
cgidir := ${localstatedir}/www/cgi-bin
|
||||
htmldir := ${localstatedir}/www/html
|
||||
|
||||
srcdir = .
|
||||
DESTDIR =
|
||||
|
||||
INSTALL = /usr/bin/install
|
||||
INSTALL_PROGRAM = ${INSTALL} -m 755
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_DIR = ${INSTALL} -d -m 755
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
INSTALL := /usr/bin/install
|
||||
INSTALL_PROGRAM := ${INSTALL} -m 755
|
||||
INSTALL_DATA := ${INSTALL} -m 644
|
||||
INSTALL_DIR := ${INSTALL} -d -m 755
|
||||
INSTALL_SCRIPT := ${INSTALL_PROGRAM}
|
||||
|
||||
pck_datadir = $(datadir)/$(PACKAGE)
|
||||
pck_statedir = $(localstatedir)/$(PACKAGE)
|
||||
@ -69,14 +69,17 @@ install-dirs:
|
||||
|
||||
install-programs:
|
||||
@$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist
|
||||
@$(INSTALL_SCRIPT) autodist-git $(DESTDIR)$(bindir)/autodist-git
|
||||
@$(INSTALL_SCRIPT) autodist-inspect $(DESTDIR)$(bindir)/autodist-inspect
|
||||
@$(INSTALL_SCRIPT) autodist-launcher $(DESTDIR)$(bindir)/autodist-launcher
|
||||
@$(INSTALL_SCRIPT) autodist-repository $(DESTDIR)$(bindir)/autodist-repository
|
||||
@$(INSTALL_SCRIPT) autodist-tool $(DESTDIR)$(bindir)/autodist-tool
|
||||
@$(INSTALL_SCRIPT) autodist-upstream-updates $(DESTDIR)$(bindir)/autodist-upstream-updates
|
||||
@$(INSTALL_SCRIPT) autoport $(DESTDIR)$(bindir)/autoport
|
||||
@$(INSTALL_SCRIPT) autoport-launcher $(DESTDIR)$(bindir)/autoport-launcher
|
||||
@$(INSTALL_SCRIPT) autoport-chroot $(DESTDIR)$(sbindir)/autoport-chroot
|
||||
@$(INSTALL_SCRIPT) automaint $(DESTDIR)$(sbindir)/automaint
|
||||
@$(INSTALL_SCRIPT) autodist-repository $(DESTDIR)$(sbindir)/autodist-repository
|
||||
@$(INSTALL_SCRIPT) autodist-upstream-updates $(DESTDIR)$(sbindir)/autodist-upstream-updates
|
||||
@$(INSTALL_SCRIPT) autoport-chroot $(DESTDIR)$(bindir)/autoport-chroot
|
||||
@$(INSTALL_SCRIPT) autoport-fix-environment $(DESTDIR)$(bindir)/autoport-fix-environment
|
||||
@$(INSTALL_SCRIPT) autoport-launcher $(DESTDIR)$(bindir)/autoport-launcher
|
||||
@$(INSTALL_SCRIPT) automaint $(DESTDIR)$(bindir)/automaint
|
||||
@$(INSTALL_SCRIPT) etc/autodist/scripts/* $(DESTDIR)$(configdir)/scripts/
|
||||
@$(INSTALL_SCRIPT) autodist-cgi $(DESTDIR)$(cgidir)/autodist
|
||||
@$(INSTALL_SCRIPT) webbuild/webbuild-cgi $(DESTDIR)$(cgidir)/webbuild
|
||||
@ -85,11 +88,13 @@ install-programs:
|
||||
@$(INSTALL_SCRIPT) webbuild/webbuild-functions $(DESTDIR)$(pck_datadir)/webbuild-functions
|
||||
@$(INSTALL_SCRIPT) webbuild/webbuild-functions-private $(DESTDIR)$(pck_datadir)/webbuild-functions-private
|
||||
@$(INSTALL_SCRIPT) telegram/openmamba_bot.py $(DESTDIR)$(pck_datadir)/openmamba_bot.py
|
||||
@$(INSTALL_SCRIPT) telegram/requirements.txt $(DESTDIR)$(pck_datadir)/requirements.txt
|
||||
@$(INSTALL_SCRIPT) repology-openmamba.py $(DESTDIR)$(pck_datadir)/repology-openmamba.py
|
||||
@cp -a webbuild/html/* $(DESTDIR)$(htmldir)
|
||||
|
||||
install-data:
|
||||
@$(INSTALL_DATA) etc/autodist/config $(DESTDIR)$(configdir)/config
|
||||
@$(INSTALL_DATA) etc/autodist/config-git $(DESTDIR)$(configdir)/config-git
|
||||
@$(INSTALL_DATA) etc/autodist/blacklist $(DESTDIR)$(configdir)/blacklist
|
||||
@$(INSTALL_DATA) etc/autodist/distdb.d/* $(DESTDIR)$(configdir)/distdb.d/
|
||||
@$(INSTALL_DATA) etc/sudoers.d/autoport $(DESTDIR)$(sysconfdir)/sudoers.d/autoport
|
||||
@ -99,7 +104,7 @@ install-data:
|
||||
@$(INSTALL_SCRIPT) etc/cron.hourly/60-autodist-update $(DESTDIR)$(sysconfdir)/cron.hourly/
|
||||
@$(INSTALL_SCRIPT) etc/cron.hourly/65-autoport $(DESTDIR)$(sysconfdir)/cron.hourly/
|
||||
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-cleanold $(DESTDIR)$(sysconfdir)/cron.daily/
|
||||
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-upstream-updates $(DESTDIR)$(sysconfdir)/cron.daily/
|
||||
@$(INSTALL_SCRIPT) etc/cron.daily/45-autodist-git-sync $(DESTDIR)$(sysconfdir)/cron.daily/
|
||||
@$(INSTALL_SCRIPT) etc/logrotate.d/webbuild $(DESTDIR)$(sysconfdir)/logrotate.d/webbuild
|
||||
@$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec
|
||||
@$(INSTALL_DATA) autodist-bashrc $(DESTDIR)$(pck_statedir)/.bashrc
|
||||
|
2
autodist
2
autodist
@ -5,7 +5,7 @@
|
||||
#
|
||||
# Released under the terms of the GNU GPL release 3 license
|
||||
#
|
||||
VERSION=1.1
|
||||
VERSION=1.4.2
|
||||
me=(${0##*/} $VERSION "Tue Jan 26 2016")
|
||||
exec 3>`readlink /proc/self/fd/0`
|
||||
|
||||
|
365
autodist-git
Executable file
365
autodist-git
Executable file
@ -0,0 +1,365 @@
|
||||
#!/usr/bin/python3
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
import rpm
|
||||
import subprocess
|
||||
import tempfile
|
||||
from shutil import copyfile
|
||||
from pyrpm.spec import Spec, replace_macros
|
||||
from gitea import *
|
||||
from git import Repo
|
||||
from functools import cmp_to_key
|
||||
from configobj import ConfigObj
|
||||
|
||||
|
||||
cfg = ConfigObj(infile='/etc/autodist/config-git')
|
||||
gitea = Gitea(cfg["GITEA_URL"], cfg["GITEA_TOKEN"])
|
||||
org = Organization.request(gitea, cfg["GITEA_ORGANIZATION"])
|
||||
|
||||
# argparse options
|
||||
options = None
|
||||
|
||||
def comparePkgInfo(item1, item2):
|
||||
return rpm.labelCompare(
|
||||
(str(item1['e']), item1['v'], item1['r']),
|
||||
(str(item2['e']), item2['v'], item2['r']))
|
||||
|
||||
def giteaGetRepoTags(repo_name):
|
||||
try:
|
||||
path = f'/repos/{cfg["GITEA_ORGANIZATION"]}/{repo_name}/tags'
|
||||
return gitea.requests_get(path)
|
||||
except NotFoundException:
|
||||
return None
|
||||
|
||||
def giteaGetRepository(repo_name):
|
||||
try:
|
||||
path = f'/repos/{cfg["GITEA_ORGANIZATION"]}/{repo_name}'
|
||||
result = gitea.requests_get(path)
|
||||
return Repository.parse_response(gitea, result)
|
||||
except NotFoundException:
|
||||
return None
|
||||
|
||||
def findOrCreateRepo(pkg_name, pkg_description=None, create=True):
|
||||
# Replace '+' for repository name as it is not allowed
|
||||
repo_name = pkg_name.replace('+','Plus')
|
||||
|
||||
# Get gitea repository instance
|
||||
gitea_repo = giteaGetRepository(repo_name)
|
||||
if gitea_repo is not None:
|
||||
return gitea_repo
|
||||
|
||||
# Return None if requested to not create
|
||||
if not create:
|
||||
return None
|
||||
|
||||
# Repository does not exist -> create
|
||||
org.create_repo(
|
||||
repoName=repo_name,
|
||||
description=pkg_description,
|
||||
private=False,
|
||||
autoInit=True,
|
||||
gitignores=None,
|
||||
# license=spec.license,
|
||||
# readme=spec.description,
|
||||
issue_labels=None,
|
||||
default_branch="main",
|
||||
)
|
||||
gitea_repo = giteaGetRepository(repo_name)
|
||||
return gitea_repo
|
||||
|
||||
def commitReleaseFromDir(pkg_info, gitea_repo, repo, temp_dir):
|
||||
global options
|
||||
|
||||
src_dir = pkg_info["src"]
|
||||
|
||||
if src_dir.endswith(".src.rpm"):
|
||||
# src is a SRPM, use autospec to extract in a temporary folder
|
||||
#print(f'Extracting {pkg_info["name"]} release {pkg_info["v"]}-{pkg_info["r"]} from {pkg_info["src"]}...')
|
||||
src_temp_dir = tempfile.TemporaryDirectory()
|
||||
src_dir = src_temp_dir.name
|
||||
subprocess.run(["autospec", "-x", pkg_info["src"], f'--destdir={src_dir}'],
|
||||
stdout=subprocess.PIPE)
|
||||
# Delete binary source archives
|
||||
for pattern in [
|
||||
'*.zip','*.tar.bz2','*.tar.xz','*.tar.gz','*.tgz','*.txz','*.iso',
|
||||
'*.run','*.dll','*.bin','*.jar','*.msi']:
|
||||
for filename in glob.glob(f'{src_dir}/{pattern}'):
|
||||
os.remove(filename)
|
||||
|
||||
# Parse spec file
|
||||
spec = Spec.from_file(f'{src_dir}/{pkg_info["name"]}.spec')
|
||||
#specfiletemp_dir = tempfile.TemporaryDirectory()
|
||||
#spec = Specfile(f'{src_dir}/{pkg_info["name"]}.spec',
|
||||
# sourcedir=specfiletemp_dir.name)
|
||||
|
||||
# Get used information from specfile
|
||||
commit_text = ""
|
||||
header_split = []
|
||||
commit_user = cfg["COMMITTER_USER"]
|
||||
commit_email = cfg["COMMITTER_EMAIL"]
|
||||
for c in spec.changelog.split('\n'):
|
||||
if c == "":
|
||||
break
|
||||
if c[0:2] == "* ":
|
||||
header_split = c.split(" ")
|
||||
# Get committer name end email from changelog
|
||||
commit_user = " ".join(header_split[5:len(header_split)-2])
|
||||
commit_email = header_split[-2][1:-1]
|
||||
else:
|
||||
if commit_text != "":
|
||||
commit_text += "\n"
|
||||
if c[0:2] == "- ":
|
||||
commit_text += c[2:]
|
||||
else:
|
||||
commit_text += c
|
||||
commit_text = f'{commit_text} [release {header_split[-1]};' + \
|
||||
f'{header_split[1]} {header_split[2]} {header_split[3]} {header_split[4]}]'
|
||||
|
||||
# Remove commented sections following spec description
|
||||
spec_description = ""
|
||||
if spec.description is not None:
|
||||
for line in spec.description.split("\n"):
|
||||
if line.startswith("#"):
|
||||
break
|
||||
if spec_description != "":
|
||||
spec_description += '\n'
|
||||
spec_description += line
|
||||
spec_description = replace_macros(spec_description, spec)
|
||||
|
||||
# Set/update gitea repository description and website url
|
||||
spec_url = replace_macros(spec.url, spec)
|
||||
spec_summary = replace_macros(spec.summary, spec)
|
||||
if gitea_repo.description != spec_summary or gitea_repo.website != spec_url:
|
||||
gitea_repo.description = spec_summary
|
||||
gitea_repo.website = spec_url
|
||||
gitea_repo.commit()
|
||||
|
||||
# Check if tag already exists
|
||||
new_tag = f'{pkg_info["v"]}-{pkg_info["r"]}'.replace('~','+')
|
||||
if new_tag in repo.tags:
|
||||
if options.verbose:
|
||||
print(f'Skipping {pkg_info["name"]} release '
|
||||
f'{pkg_info["e"]}:{pkg_info["v"]}-{pkg_info["r"]}: tag {new_tag} already exists')
|
||||
return
|
||||
|
||||
# Create/update README.md
|
||||
with open(f'{temp_dir.name}/README.md', "w") as readme_file:
|
||||
readme_file.write(f"# {pkg_info['name']}\n\n{spec_description}")
|
||||
repo.index.add(['README.md'])
|
||||
|
||||
# Update files
|
||||
dir_list = os.listdir(src_dir)
|
||||
for dir_file in dir_list:
|
||||
copyfile(f'{src_dir}/{dir_file}',
|
||||
f'{temp_dir.name}/{dir_file}')
|
||||
# Add/modify files
|
||||
repo.index.add([dir_file])
|
||||
|
||||
# Remove deleted files
|
||||
temp_dir_list = os.listdir(temp_dir.name)
|
||||
for temp_dir_file in temp_dir_list:
|
||||
if temp_dir_file == ".git" or temp_dir_file == "README.md":
|
||||
continue
|
||||
if not temp_dir_file in dir_list:
|
||||
repo.index.remove([temp_dir_file], working_tree = True)
|
||||
|
||||
# Set committer user and email
|
||||
repo.config_writer().set_value("user", "name", commit_user).release()
|
||||
repo.config_writer().set_value("user", "email", commit_email).release()
|
||||
|
||||
# Commit
|
||||
print(f'Committing {pkg_info["name"]} release {new_tag}...')
|
||||
repo.index.commit(commit_text)
|
||||
|
||||
#origin = repo.remote(name='origin')
|
||||
#origin.push()
|
||||
|
||||
# Create and commit tag
|
||||
repo.create_tag(new_tag, message=f'Release {new_tag}')
|
||||
#origin.push(new_tag)
|
||||
|
||||
def findAndCommitPackageReleases(pkgname, pkgvr):
|
||||
global options
|
||||
|
||||
print(f'Processing package {pkgname} on {cfg["GITEA_URL"]}...')
|
||||
|
||||
pkgs_info = []
|
||||
|
||||
# Find from archive dir
|
||||
pkgnamere = pkgname.replace('+','\+')
|
||||
dirs = [f for f in os.listdir(f'{cfg["ARCHIVE_DIR"]}/{pkgname[0:1]}') if re.match(f'{pkgnamere}-[^-]*-[^-]*$', f)]
|
||||
for dir in dirs:
|
||||
pkg_dir = f'{cfg["ARCHIVE_DIR"]}/{pkgname[0:1]}/{dir}'
|
||||
spec = Spec.from_file(f'{pkg_dir}/{pkgname}.spec')
|
||||
parts = re.split(f'{pkgnamere}-([^-]*)-([^-]*)$', dir)
|
||||
|
||||
epoch = 0 if spec.epoch is None else int(spec.epoch)
|
||||
version = parts[1]
|
||||
release = parts[2]
|
||||
pkgs_info.append(
|
||||
{'name': pkgname, 'e': epoch, 'v': version, 'r': release, 'src': pkg_dir})
|
||||
|
||||
# Find from OLD_DIR
|
||||
dirs = [f for f in os.listdir(f'{cfg["OLD_DIR"]}') if re.match(f'{pkgnamere}_[0-9]*.[0-9]*$', f)]
|
||||
for dir in dirs:
|
||||
srpms_list = glob.glob(f'{cfg["OLD_DIR"]}/{dir}/{pkgname}-*.src.rpm')
|
||||
for srpm in srpms_list:
|
||||
parts = re.split('.*-([^-]*)-([^-]*).src.rpm$', srpm)
|
||||
epoch = subprocess.run(['rpm', '-q', '--queryformat=%{epoch}', '-p', srpm],
|
||||
stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||
# result is "(none)" if no Epoch is set
|
||||
if len(epoch) > 2:
|
||||
epoch = "0"
|
||||
version = parts[1]
|
||||
release = parts[2]
|
||||
pkgs_info.append(
|
||||
{'name': pkgname, 'e': epoch, 'v': version, 'r': release, 'src': srpm})
|
||||
|
||||
# Find from SRPMS_DIR
|
||||
srpms_list = [f for f in os.listdir(cfg["SRPMS_DIR"]) if re.match(f'{pkgnamere}-[^-]*-[^-]*$', f)]
|
||||
for srpm in srpms_list:
|
||||
src_path = f'{cfg["SRPMS_DIR"]}/{srpm}'
|
||||
parts = re.split('.*-([^-]*)-([^-]*).src.rpm$', srpm)
|
||||
epoch = subprocess.run(['rpm', '-q', '--queryformat=%{epoch}', '-p', src_path],
|
||||
stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||
# result is "(none)" if no Epoch is set
|
||||
if len(epoch) > 2:
|
||||
epoch = "0"
|
||||
version = parts[1]
|
||||
release = parts[2]
|
||||
pkgs_info.append(
|
||||
{'name': pkgname, 'e': epoch, 'v': version, 'r': release, 'src': src_path })
|
||||
|
||||
# Sort releases
|
||||
pkgs_info.sort(key=cmp_to_key(comparePkgInfo))
|
||||
|
||||
# Find or create and get repository instance
|
||||
gitea_repo = findOrCreateRepo(pkgname)
|
||||
|
||||
# Clone repository to temporary folder
|
||||
repo_url = f'{cfg["GITEA_SSH_URL"]}{gitea_repo.name}.git'
|
||||
temp_dir = tempfile.TemporaryDirectory()
|
||||
repo = Repo.clone_from(repo_url, temp_dir.name)
|
||||
|
||||
# Set to push annotated tags with commits
|
||||
repo.config_writer().set_value('push', 'followTags', 'true').release()
|
||||
|
||||
new_commits = False
|
||||
|
||||
for pkg_info in pkgs_info:
|
||||
vr = f'{pkg_info["v"]}-{pkg_info["r"]}'
|
||||
if pkgvr is not None and pkgvr != vr:
|
||||
continue
|
||||
# Check if tag already exists
|
||||
new_tag = f'{vr}'.replace('~','+')
|
||||
if new_tag in repo.tags:
|
||||
if options.verbose:
|
||||
print(f'Skipping {pkgname} release '
|
||||
f'{pkg_info["e"]}:{vr}: tag {new_tag} already exists')
|
||||
continue
|
||||
|
||||
#for line in sys.stdin:
|
||||
# line = line.rstrip()
|
||||
# break
|
||||
#exit(1)
|
||||
|
||||
#pkg_dir = f'{cfg["ARCHIVE_DIR"]}/{pkgname[0:1]}/{pkgname}-{vr}'
|
||||
commitReleaseFromDir(pkg_info, gitea_repo, repo, temp_dir)
|
||||
new_commits = True
|
||||
|
||||
if new_commits:
|
||||
print(f"Pushing commits and tags for {pkgname}...")
|
||||
origin = repo.remote(name='origin')
|
||||
origin.push()
|
||||
else:
|
||||
print(f"No new commits for {pkgname}.")
|
||||
|
||||
temp_dir.cleanup()
|
||||
|
||||
|
||||
def main():
|
||||
global options
|
||||
|
||||
parser = argparse.ArgumentParser(prog='autodist-git',
|
||||
description='RPM repository sync and management with git service.',
|
||||
epilog="Copyright (c) 2023-2024 by Silvan Calarco <silvan.calarco@mambasoft.it> - GPL v3 License")
|
||||
subparsers = parser.add_subparsers(help='sub-command help', dest='mode')
|
||||
parser.add_argument('-v', '--verbose', help="verbose output", action='store_true')
|
||||
|
||||
parser_syncpkg = subparsers.add_parser('syncpkg', help="sync a specified package")
|
||||
parser_syncpkg.add_argument('pkgname', help="name of package")
|
||||
parser_syncpkg.add_argument('pkgver', help="version of package", nargs='?')
|
||||
parser_syncpkg.add_argument('-d', '--delete', action='store_true', help="delete and recreate existing repository",
|
||||
required=False)
|
||||
|
||||
parser_syncrepo = subparsers.add_parser('syncrepo', help="sync base repository with git server")
|
||||
parser_syncrepo.add_argument('--from', dest='frompkg', help="from package name", required=False)
|
||||
parser_syncrepo.add_argument('--to', dest='topkg', help="to package name", required=False)
|
||||
parser_syncrepo.add_argument('-d', '--delete', action='store_true', help="delete and recreate existing repositories",
|
||||
required=False)
|
||||
|
||||
try:
|
||||
options = parser.parse_args()
|
||||
except:
|
||||
exit(1)
|
||||
|
||||
if options.mode == 'syncpkg':
|
||||
if options.delete:
|
||||
if options.pkgver is not None:
|
||||
print("ERROR: specifying pkgver is not allowed with -d option")
|
||||
exit(1)
|
||||
repo_name = options.pkgname.replace('+','Plus')
|
||||
gitea_repo = giteaGetRepository(repo_name)
|
||||
if gitea_repo is not None:
|
||||
print(f'Deleting repository for {options.pkgname}...')
|
||||
gitea_repo.delete()
|
||||
findAndCommitPackageReleases(options.pkgname, options.pkgver)
|
||||
|
||||
elif options.mode == 'syncrepo':
|
||||
dir_list = sorted(filter(os.path.isfile, glob.glob(f'{cfg["SRPMS_DIR"]}/*.src.rpm')))
|
||||
for dir_file in dir_list:
|
||||
parts = re.split('.*/([^/]*)-([^-]*)-([^-]*).src.rpm$', dir_file)
|
||||
pkg_name = parts[1]
|
||||
if options.topkg is not None and pkg_name > options.topkg:
|
||||
break
|
||||
if options.frompkg is not None and pkg_name < options.frompkg:
|
||||
continue
|
||||
pkg_item = { 'e': 0, 'v': parts[2].replace('~','+'), 'r': parts[3]}
|
||||
pkg_vr = f'{parts[2]}-{parts[3]}'
|
||||
# Replace '+' for repository name as it is not allowed
|
||||
repo_name = pkg_name.replace('+','Plus')
|
||||
if options.delete:
|
||||
gitea_repo = giteaGetRepository(repo_name)
|
||||
if gitea_repo is not None:
|
||||
print(f'Deleting repository for {pkg_name}...')
|
||||
gitea_repo.delete()
|
||||
repo_tags = giteaGetRepoTags(repo_name)
|
||||
found_equal = False
|
||||
found_newer = False
|
||||
found_older = False
|
||||
if repo_tags is None:
|
||||
found_newer = True
|
||||
else:
|
||||
for repo_tag in repo_tags:
|
||||
parts = re.split(f'([^-]*)-([^-]*)$', repo_tag["name"])
|
||||
tag_item = { 'e':0, 'v': parts[1], 'r': parts[2]}
|
||||
compare = comparePkgInfo(pkg_item, tag_item)
|
||||
if compare == 0:
|
||||
found_equal = True
|
||||
elif compare > 0:
|
||||
found_older = True
|
||||
elif compare < 0:
|
||||
found_newer = True
|
||||
if not found_equal:
|
||||
if repo_tags is not None:
|
||||
print(f'{pkg_name} ({pkg_vr}): needs update')
|
||||
findAndCommitPackageReleases(pkg_name, None)
|
||||
if found_newer:
|
||||
if options.verbose:
|
||||
print(f'{pkg_name} ({pkg_vr}): found_equal={found_equal} found_newer={found_newer} found_older={found_older}')
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
main()
|
35
autodist-inspect
Executable file
35
autodist-inspect
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
[ -e /etc/autodist/config ] || {
|
||||
echo "ERROR: missing configuration file /etc/autodist/config."
|
||||
exit 1
|
||||
}
|
||||
|
||||
. /etc/autodist/config
|
||||
|
||||
shopt -s nocaseglob
|
||||
checkpkg=$1
|
||||
|
||||
if [ ! "$checkpkg" ]; then
|
||||
echo "Usage:
|
||||
$0 query"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ "$LOCAL_REPS_BASE_DIR" -a -e "$LOCAL_REPS_BASE_DIR" ] || {
|
||||
echo "ERROR: LOCAL_REPS_BASE_DIR needs to be defined and local repositories to exists."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "=== distromatic sources: ==="
|
||||
head -n2 ${LOCAL_REPS_BASE_DIR}/distromatic/base/sources
|
||||
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/distromatic/base/sources
|
||||
#tail -n+2 ${PREFIX}/distromatic/base/deps-* | grep -i $checkpkg
|
||||
echo -e "\n=== distdb: ==="
|
||||
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/distdb
|
||||
echo -e "\n=== legacy: ==="
|
||||
grep -i $checkpkg ${LOCAL_REPS_BASE_DIR}/base/legacy
|
||||
for repo in base devel-makedist devel-autodist devel-misc devel-future; do
|
||||
echo -e "\n=== ${repo}: ==="
|
||||
ls ${LOCAL_REPS_BASE_DIR}/${repo}/SRPMS.base/*$checkpkg* 2>/dev/null
|
||||
ls ${LOCAL_REPS_BASE_DIR}/${repo}/RPMS.*/*$checkpkg* 2>/dev/null
|
||||
done
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# autodist repositories maintainance script
|
||||
# Copyright (c) 2007-2014 by Silvan Calarco
|
||||
# Copyright (c) 2007-2024 by Silvan Calarco
|
||||
#
|
||||
. /etc/autodist/config
|
||||
[ -r /etc/autodist/config-secret ] && . /etc/autodist/config-secret
|
||||
@ -29,7 +29,7 @@ function usage() {
|
||||
echo "$me setwarning REPOSITORY {PKG ...} -t \"TEXT\""
|
||||
echo "$me verify REPOSITORY [PKGS ...]"
|
||||
echo
|
||||
echo " -d use given repository as destination (default: devel)"
|
||||
echo " -d use given repository as destination (default: base)"
|
||||
echo " -f force operation"
|
||||
echo " -r match repositories with given regexp"
|
||||
echo " -s simulate operations to see if it would work"
|
||||
@ -576,6 +576,9 @@ function import_package() {
|
||||
}
|
||||
# fi
|
||||
|
||||
# Sync new release with autodist-git
|
||||
[ "$AUTODIST_GIT_SYNC" != "" ] && autodist-git syncpkg ${import_pkg}
|
||||
|
||||
#for i in ${pkg_obsoletes}; do
|
||||
# PKG_FILENAME="$i-$pkg_version-$pkg_release.$namearch.rpm"
|
||||
# DEST_URL_ARCH=$DEST_URL/$destrepository/RPMS.$namearch/$PKG_FILENAME
|
||||
@ -645,7 +648,7 @@ function extract_diffinfo() {
|
||||
[ $1 ] || { usage; exit 0; }
|
||||
|
||||
origrepository=
|
||||
destrepository=devel
|
||||
destrepository=base
|
||||
packages=
|
||||
command=
|
||||
simulate=0
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# autodist upstream updates - find upstream packages updates from different internet resources
|
||||
# Copyright (c) 2004-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2004-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
|
||||
#[ -r /etc/sysconfig/openmamba-central ] || {
|
||||
@ -10,7 +10,7 @@
|
||||
#}
|
||||
. /etc/autodist/config
|
||||
DISTROMATIC_PREFIX=/distribution/distromatic.html?
|
||||
DISTROMATIC_REPOSITORY=devel
|
||||
DISTROMATIC_REPOSITORY=base
|
||||
DISTDB=/etc/autodist/distdb
|
||||
BLACKLISTDB=/etc/autodist/blacklist
|
||||
DISTDBDIR=/etc/autodist/distdb.d
|
||||
@ -36,7 +36,7 @@ function usage()
|
||||
echo " -s: skip fetching and parsing upstream updates"
|
||||
echo " -u: output not up-to-date packages only"
|
||||
echo " -q: produces quite output"
|
||||
echo " -r repository: specify the distromatic base (default: devel)"
|
||||
echo " -r repository: specify the distromatic base (default: base)"
|
||||
echo " -o repository: specify the repository for output data (default: same as base repository)"
|
||||
echo
|
||||
}
|
||||
|
84
autoport
84
autoport
@ -1,14 +1,13 @@
|
||||
#!/bin/bash
|
||||
# autoport -- batch cross-build tool based on autodist
|
||||
# Copyright (C) 2011-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (C) 2011-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
# Released under the terms of the GNU GPL release 3 license
|
||||
#
|
||||
VERSION=1.1
|
||||
VERSION=1.4.2
|
||||
|
||||
BASE_ARCH=i586
|
||||
BASE_REPOSITORY=devel
|
||||
PORT_REPOSITORY=devel
|
||||
BASE_REPOSITORY=base
|
||||
PORT_REPOSITORY=base
|
||||
|
||||
. /etc/autodist/config
|
||||
|
||||
@ -17,7 +16,7 @@ me=(${0##*/} $VERSION "Sat Mar 20 2011")
|
||||
function usage() {
|
||||
echo "\
|
||||
${me[0]} ${me[1]}
|
||||
"$"Copyright (C) 2011-2020 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Copyright (C) 2011-2023 Silvan Calarco <silvan.calarco@mambasoft.it>""
|
||||
"$"Released under the terms of the GNU GPL v3 license"
|
||||
echo "
|
||||
"$"Batch port and cross-build tool based on autodist.""
|
||||
@ -242,16 +241,25 @@ function find_requirements() {
|
||||
fetch_repfiles() {
|
||||
local u
|
||||
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o $DATADIR/$PORT_REPOSITORY/srcpkglist ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
f=${DATADIR}/${PORT_REPOSITORY}/srcpkglist
|
||||
if [ ! -e ${f} -o "`find ${f} -mmin +60 2>/dev/null`" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
curl -f -L -s ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist -o ${f} ||
|
||||
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
|
||||
fi
|
||||
for a in ${AUTODIST_ARCHS[*]}; do
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o $DATADIR/$PORT_REPOSITORY/sources-${a} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o $DATADIR/$PORT_REPOSITORY/builds-${a}.sh ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
f=${DATADIR}/${PORT_REPOSITORY}/sources-${a}
|
||||
if [ ! -e ${f} -o "`find ${f} -mmin +60 2>/dev/null`" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a} -o ${f} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-${a}"
|
||||
fi
|
||||
f=${DATADIR}/${PORT_REPOSITORY}/builds-${a}.sh
|
||||
if [ ! -e ${f} -o "`find ${f} -mmin +60 2>/dev/null`" ]; then
|
||||
[ "$VERBOSE_MODE" = "1" ] && echo "Fetching $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
curl -f -L -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh -o ${f} ||
|
||||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-${a}.sh"
|
||||
fi
|
||||
done
|
||||
for u in ${AUTOPORT_UNSTAGE_ARCHS}; do
|
||||
[ "$u" = "$TARGET_ARCH" ] && {
|
||||
@ -384,10 +392,6 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
echo "Port repository is $PORT_REPOSITORY"
|
||||
echo "Release repository is $DEST_REPOSITORY"
|
||||
|
||||
# old files cleanup
|
||||
rm -f $DATADIR/$PORT_REPOSITORY/sources-*
|
||||
rm -f $DATADIR/$PORT_REPOSITORY/builds-*.sh
|
||||
|
||||
fetch_repfiles
|
||||
|
||||
[ "$AUTO_MODE" -a -e $DATAARCHDIR/last ] && . $DATAARCHDIR/last
|
||||
@ -415,7 +419,9 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
if [ "${currprovider/-devel}" == "$currprovider" ]; then
|
||||
currprovider=${currprovider}-devel
|
||||
fi
|
||||
currjobscriptargs="$currjobscriptargs --buildreq ${currprovider} >= ${port_pkg_epoch}:${port_pkg_version}-${port_pkg_release} "
|
||||
add_epoch=""
|
||||
[ "${port_pkg_epoch}" ] && add_epoch="${port_pkg_epoch}:"
|
||||
currjobscriptargs="$currjobscriptargs --buildreq ${currprovider} >= ${add_epoch}${port_pkg_version}-${port_pkg_release} "
|
||||
done
|
||||
[ "$currjobscriptargs" ] && JOB_SCRIPTARGS[$JOBNUM-1]="$currjobscriptargs"
|
||||
echo "Package dependant from $j to rebuild: ${JOB[*]}"
|
||||
@ -473,6 +479,11 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
> $DATAARCHDIR/preparedjobs
|
||||
}
|
||||
|
||||
[ -e $DATAARCHDIR/updatedjobs ] || > $DATAARCHDIR/updatedjobs
|
||||
find $DATAARCHDIR/updatedjobs -ctime 1 >/dev/null && {
|
||||
> $DATAARCHDIR/updatedjobs
|
||||
}
|
||||
|
||||
sudo autoport-fix-environment $TARGET_ARCH
|
||||
|
||||
[ "$FIX_MODE" ] && exit 0
|
||||
@ -544,6 +555,7 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
|
||||
DONT_PREPARE_THIS=
|
||||
RELEASE_UPDATED=
|
||||
grep -q ^$JOB_CURRENT\$ $DATAARCHDIR/preparedjobs && RELEASE_UPDATED=1
|
||||
for p in ${JOB_CMDLINE[*]}; do
|
||||
[ "$p" = "${JOB_CURRENT}" -o "$DONT_PREPARE_ANY" ] || continue
|
||||
[ -e ${SPECDIR}/${JOB_CURRENT}.spec ] && DONT_PREPARE_THIS="$DONT_PREPARE"
|
||||
@ -555,20 +567,11 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
else
|
||||
REPOSITORY_STRICT_ADD=""
|
||||
fi
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS"
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS"
|
||||
LANG=C LC_ALL=C autodist -p ${JOB_CURRENT} --server $PORT_REPOSITORY --repository $PORT_REPOSITORY $REPOSITORY_STRICT_ADD --severity 2 -- $STAGEOPTS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
RES=`find_source_by_provide $PORT_REPOSITORY $JOB_CURRENT`
|
||||
for j in ${RES}; do
|
||||
[ "$j" != "$JOB_CURRENT" ] && RESOLVED_JOB="$RESOLVED_JOB $j"
|
||||
done
|
||||
if [ "$RESOLVED_JOB" ]; then
|
||||
echo "(FAILED) [but scheduling $RESOLVED_JOB]"
|
||||
JOB_FAILED=(${JOB_FAILED[*]} $RESOLVED_JOB)
|
||||
else
|
||||
echo "(FAILED) "
|
||||
fi
|
||||
echo "(FAILED) "
|
||||
JOB_CANTPREPARE=(${JOB_CANTPREPARE[*]} $JOB_CURRENT)
|
||||
autoport_log ${JOB_CURRENT} prepare failed $tmpfile
|
||||
continue
|
||||
@ -592,8 +595,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
changelogadd="`echo ${SCRIPT_ARGS} | sed "s|--buildreq|,|g;s| ||g;s|^,||g"`"
|
||||
REBUILD_CHANGELOG="rebuilt by autoport with build requirements: '${changelogadd}'"
|
||||
fi
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" --- \"$SCRIPT_ARGS\""
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" --- \"$SCRIPT_ARGS\""
|
||||
LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" --- $SCRIPT_ARGS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
echo "(FAILED) "
|
||||
@ -603,11 +606,12 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
autoport_log ${JOB_CURRENT} update ok $tmpfile
|
||||
echo -n "(OK) "
|
||||
RELEASE_UPDATED=1
|
||||
echo $JOB_CURRENT >> $DATAARCHDIR/updatedjobs
|
||||
}
|
||||
elif [ "$PORT_REPOSITORY" != "$DEST_REPOSITORY" ]; then
|
||||
echo -n "update"
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -u -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"automatic port from $PORT_REPOSITORY\""
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -u -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"automatic port from $PORT_REPOSITORY\""
|
||||
LANG=C LC_ALL=C autodist -u -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"automatic port from $PORT_REPOSITORY\" --- $SCRIPT_ARGS &>$tmpfile
|
||||
cat $tmpfile >> $logfile
|
||||
[ $? -gt 0 ] && {
|
||||
@ -626,8 +630,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
continue
|
||||
}
|
||||
src_release_num=`echo $src_release | sed "s|\([0-9.]*\).*|\1|"`
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog \"$REBUILD_MILESTONE milestone rebuild\" $src_version $src_release_num${REBUILD_MILESTONE}"
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog \"$REBUILD_MILESTONE milestone rebuild\" $src_version $src_release_num${REBUILD_MILESTONE}"
|
||||
# FIXME: should be implemented in autodist
|
||||
LANG=C LC_ALL=C autospec -u ${JOB_CURRENT} -a4 --changelog "$REBUILD_MILESTONE milestone rebuild" $src_version $src_release_num${REBUILD_MILESTONE} &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
@ -665,8 +669,8 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
|
||||
SEND_REPOSITORY=$src_repository
|
||||
fi
|
||||
[ ! "$DONT_PREPARE_THIS" -a ! "$RELEASE_UPDATED" ] && NOSRPM_OPTS="--nosrpm" || NOSRPM_OPTS="--force"
|
||||
[ "$VERBOSE_MODE" ] && echo "
|
||||
%% COMMAND: LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS"
|
||||
# [ "$VERBOSE_MODE" ] && echo "
|
||||
#%% COMMAND: LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS"
|
||||
LANG=C LC_ALL=C autodist -b -s ${JOB_CURRENT} --arch $TARGET_ARCH --server $SEND_REPOSITORY --repository $PORT_REPOSITORY --severity 2 $FORCE_FLAG -- $STAGEOPTS $NOSRPM_OPTS &>$tmpfile
|
||||
[ $? -gt 0 ] && {
|
||||
if [ "$VERBOSE_MODE" ]; then
|
||||
|
@ -6,7 +6,7 @@ VENDOR="openmamba"
|
||||
curl_opts_netlink="--connect-timeout 15 --retry 3 -s"
|
||||
|
||||
packager_fullname="Automatic Build System"
|
||||
packager_email="autodist@mambasoft.it"
|
||||
packager_email="autodist@openmamba.org"
|
||||
|
||||
ftp_rw_server_num_default=0
|
||||
colorize=0
|
||||
@ -20,72 +20,58 @@ source_dir="/var/autodist/RPM/SOURCES"
|
||||
build_dir="/var/autodist/RPM/BUILD"
|
||||
tmppath_dir="/var/tmp/autodist"
|
||||
|
||||
ftp_alias[0]="devel"
|
||||
ftpurl_ro_rpms[0]="ftp://ftp.openmamba.org/pub/openmamba/devel/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[0]="ftp://ftp.openmamba.org/pub/openmamba/devel/SRPMS.base"
|
||||
ftp_rw_server[0]="ftp://ftp.openmamba.org"
|
||||
ftp_alias[0]="base"
|
||||
ftpurl_ro_rpms[0]="https://push.openmamba.org/pub/openmamba/base/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[0]="https://push.openmamba.org/pub/openmamba/base/SRPMS.base"
|
||||
ftp_rw_server[0]="https://push.openmamba.org/pub/openmamba/base"
|
||||
ftp_rw_port[0]=
|
||||
ftp_rw_passive_mode[0]=on
|
||||
ftp_rw_user[0]=
|
||||
ftp_rw_passwd[0]=
|
||||
ftp_rw_rpms_dir[0]="/RPMS.@arch@"
|
||||
ftp_rw_srpms_dir[0]="/SRPMS.base"
|
||||
arch_list[0]="i586 arm x86_64 aarch64"
|
||||
arch_noarch_upload[0]="${arch_list[0]}"
|
||||
arch_list[0]="i586 x86_64 aarch64"
|
||||
arch_noarch_upload[0]="@arch@"
|
||||
ftpdir_rw_old[0]="/old"
|
||||
|
||||
ftp_alias[1]="devel-games"
|
||||
ftpurl_ro_rpms[1]="ftp://ftp.openmamba.org/pub/openmamba/devel-games/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[1]="ftp://ftp.openmamba.org/pub/openmamba/devel-games/SRPMS.base"
|
||||
ftp_rw_server[1]="ftp://ftp.openmamba.org"
|
||||
ftp_alias[1]="devel-makedist"
|
||||
ftpurl_ro_rpms[1]="https://push.openmamba.org/pub/openmamba/devel-makedist/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[1]="https://push.openmamba.org/pub/openmamba/devel-makedist/SRPMS.base"
|
||||
ftp_rw_server[1]="https://push.openmamba.org/pub/openmamba/devel-makedist"
|
||||
ftp_rw_port[1]=
|
||||
ftp_rw_passive_mode[1]=on
|
||||
ftp_rw_user[1]=
|
||||
ftp_rw_passwd[1]=
|
||||
ftp_rw_rpms_dir[1]="/RPMS.@arch@"
|
||||
ftp_rw_srpms_dir[1]="/SRPMS.base"
|
||||
arch_list[1]="i586"
|
||||
arch_noarch_upload[1]="${arch_list[1]}"
|
||||
arch_list[1]="i586 x86_64 aarch64"
|
||||
arch_noarch_upload[1]="@arch@"
|
||||
ftpdir_rw_old[1]="/old"
|
||||
|
||||
ftp_alias[2]="devel-makedist"
|
||||
ftpurl_ro_rpms[2]="ftp://ftp.openmamba.org/pub/openmamba/devel-makedist/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[2]="ftp://ftp.openmamba.org/pub/openmamba/devel-makedist/SRPMS.base"
|
||||
ftp_rw_server[2]="ftp://ftp.openmamba.org"
|
||||
ftp_alias[2]="devel-misc"
|
||||
ftpurl_ro_rpms[2]="https://push.openmamba.org/pub/openmamba/devel-misc/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[2]="https://push.openmamba.org/pub/openmamba/devel-misc/SRPMS.base"
|
||||
ftp_rw_server[2]="https://push.openmamba.org/pub/openmamba/devel-misc"
|
||||
ftp_rw_port[2]=
|
||||
ftp_rw_passive_mode[2]=on
|
||||
ftp_rw_user[2]=
|
||||
ftp_rw_passwd[2]=
|
||||
ftp_rw_rpms_dir[2]="/RPMS.@arch@"
|
||||
ftp_rw_srpms_dir[2]="/SRPMS.base"
|
||||
arch_list[2]="i586"
|
||||
arch_noarch_upload[2]="${arch_list[2]}"
|
||||
arch_list[2]="i586 x86_64 aarch64"
|
||||
arch_noarch_upload[2]="@arch@"
|
||||
ftpdir_rw_old[2]="/old"
|
||||
|
||||
ftp_alias[3]="devel-autodist"
|
||||
ftpurl_ro_rpms[3]="ftp://ftp.openmamba.org/pub/openmamba/devel-autodist/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[3]="ftp://ftp.openmamba.org/pub/openmamba/devel-autodist/SRPMS.base"
|
||||
ftp_rw_server[3]="ftp://ftp.openmamba.org"
|
||||
ftpurl_ro_rpms[3]="https://push.openmamba.org/pub/openmamba/devel-autodist/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[3]="https://push.openmamba.org/pub/openmamba/devel-autodist/SRPMS.base"
|
||||
ftp_rw_server[3]="https://push.openmamba.org/pub/openmamba/devel-autodist"
|
||||
ftp_rw_port[3]=
|
||||
ftp_rw_passive_mode[3]=on
|
||||
ftp_rw_user[3]=
|
||||
ftp_rw_passwd[3]=
|
||||
ftp_rw_rpms_dir[3]="/RPMS.@arch@"
|
||||
ftp_rw_srpms_dir[3]="/SRPMS.base"
|
||||
arch_list[3]="i586"
|
||||
arch_noarch_upload[3]="${arch_list[3]}"
|
||||
arch_list[3]="i586 x86_64 aarch64"
|
||||
arch_noarch_upload[3]="@arch@"
|
||||
ftpdir_rw_old[3]="/old"
|
||||
|
||||
ftp_alias[4]="devel-future"
|
||||
ftpurl_ro_rpms[4]="ftp://ftp.openmamba.org/pub/openmamba/devel-future/RPMS.@arch@"
|
||||
ftpurl_ro_srpms[4]="ftp://ftp.openmamba.org/pub/openmamba/devel-future/SRPMS.base"
|
||||
ftp_rw_server[4]="ftp://ftp.openmamba.org"
|
||||
ftp_rw_port[4]=
|
||||
ftp_rw_passive_mode[4]=on
|
||||
ftp_rw_user[4]=
|
||||
ftp_rw_passwd[4]=
|
||||
ftp_rw_rpms_dir[4]="/RPMS.@arch@"
|
||||
ftp_rw_srpms_dir[4]="/SRPMS.base"
|
||||
arch_list[4]="i586"
|
||||
arch_noarch_upload[4]="${arch_list[4]}"
|
||||
ftpdir_rw_old[4]="/old"
|
||||
|
@ -11,42 +11,39 @@ SEND_SERVER=devel-autodist
|
||||
#WEBBUILD_SECRET=
|
||||
WEBBUILD_STATEDIR=/var/webbuild
|
||||
WEBBUILD_DISTROQUERY_URL="http://www.openmamba.org/cgi-bin/distroquery"
|
||||
AUTOBUILD_MAXNUM=200
|
||||
AUTOBUILD_MAXNUM=500
|
||||
AUTOBUILD_DATEFROM=20060601
|
||||
AUTOBUILD_SKIP_DAYS=28
|
||||
AUTOBUILD_SUCCESS_DAYS=3
|
||||
AUTODIST_REPOSITORY=devel-autodist
|
||||
AUTODIST_DELAYED_REPOSITORY=devel-future
|
||||
AUTODIST_REPOSITORIES=(devel devel-games devel-makedist devel-kernel devel-xorg devel-kde4 devel-autodist)
|
||||
AUTODIST_REPOSITORIES=(base devel-makedist devel-autodist devel-misc)
|
||||
AUTOPORT_UNSTAGE_ARCHS="i586"
|
||||
AUTOPORT_STAGEVARS="--define stage1=1"
|
||||
AUTOPORT_MAX_STEPS=10
|
||||
#RPMDIR=/usr/src/RPM
|
||||
AUTODIST_REBUILDOLD_MAX=20
|
||||
AUTODIST_REBUILDOLD_FROMDATE=20090101
|
||||
#AUTODIST_GIT_SYNC=1
|
||||
#
|
||||
# Set to disable autodist-repository and use local list
|
||||
#
|
||||
WEBBUILD_REPOSITORIES=(devel devel-games devel-kernel devel-kde4 devel-xorg devel-gnome devel-makedist \
|
||||
devel-java devel-misc devel-autodist devel-future devel-past \
|
||||
WEBBUILD_REPOSITORIES=(base devel-kernel devel-makedist devel-misc devel-autodist devel-future devel-past \
|
||||
milestone1 milestone1-updates milestone1-games milestone1-1.1 milestone1-makedist \
|
||||
milestone2 milestone2-games milestone2-updates milestone2-kernel milestone2-kde4 \
|
||||
milestone2-xorg milestone2-makedist milestone2-java \
|
||||
devel-contrib devel-silvan devel-stefano devel-aleph0 devel-skiver devel-fabiog devel-gil \
|
||||
devel-distservers devel-the_packagizers devel-ercolinux \
|
||||
devel-contrib-java devel-michiamophil milestone1-java milestone1-contrib)
|
||||
milestone1-java milestone1-contrib)
|
||||
#
|
||||
# Set to enable autodist-repository (you also need to disable WEBBUILD_REPOSITORIES above)
|
||||
#
|
||||
#AUTODIST_REPOSITORIES_LOCAL_REPS=(devel devel-games devel-kernel devel-kde4 devel-xorg devel-gnome devel-makedist \
|
||||
# devel-java devel-misc devel-autodist devel-future devel-past devel-embedded devel-silvan \
|
||||
#AUTODIST_REPOSITORIES_LOCAL_REPS=(base devel-kernel devel-makedist devel-misc devel-autodist \
|
||||
# devel-future devel-past \
|
||||
# milestone3 milestone3-games milestone3-updates milestone3-makedist \
|
||||
# milestone2 milestone2-games milestone2-updates milestone2-kernel milestone2-kde4 \
|
||||
# milestone2-xorg milestone2-makedist milestone2-java milestone2-kernel-next \
|
||||
# milestone1 milestone1-updates milestone1-games milestone1-1.1 milestone1-makedist)
|
||||
#AUTODIST_REPOSITORIES_REMOTE_REPS=(devel-contrib devel-stefano devel-aleph0 devel-skiver devel-fabiog devel-gil \
|
||||
# devel-distservers devel-the_packagizers devel-ercolinux \
|
||||
# devel-contrib-java devel-michiamophil milestone1-java milestone1-contrib)
|
||||
#AUTODIST_REPOSITORIES_REMOTE_REPS=(devel-contrib \
|
||||
# milestone1-java milestone1-contrib)
|
||||
#AUTODIST_REPOSITORIES_TRANSITIONAL_REP=devel-makedist
|
||||
#AUTODIST_REPOSITORIES_REMOTE_FTPUSER=
|
||||
#AUTODIST_REPOSITORIES_REMOTE_FTPPASS=
|
||||
|
12
etc/autodist/config-git
Normal file
12
etc/autodist/config-git
Normal file
@ -0,0 +1,12 @@
|
||||
REPO_DIR = "/var/ftp/pub/openmamba/base"
|
||||
ARCHIVE_DIR = "%(REPO_DIR)s/archive"
|
||||
OLD_DIR = "%(REPO_DIR)s/old"
|
||||
SRPMS_DIR = "%(REPO_DIR)s/SRPMS.base"
|
||||
|
||||
GITEA_URL = "https://src.openmamba.org"
|
||||
GITEA_SSH_URL = "ssh://gitea@src.openmamba.org:3326/rpms/"
|
||||
GITEA_TOKEN = "<replace with a valid token>"
|
||||
GITEA_ORGANIZATION = "rpms"
|
||||
|
||||
COMMITTER_USER = "autodist"
|
||||
COMMITTER_EMAIL = "autodist@openmamba.org"
|
@ -54,6 +54,7 @@ sed -i "s|^Vendor:.*|Vendor: openmamba|;
|
||||
/BuildRequires:[[:space:]]*libffmpeg-devel/d;
|
||||
/^BuildRequires:[[:space:]]*libkdegames-devel/d;
|
||||
/^BuildRequires:[[:space:]]*libkdegames5-devel/d;
|
||||
/^BuildRequires:[[:space:]]*python3.7dist/d;
|
||||
/^BuildRoot:[[:space:]]*.*/d;
|
||||
s|\(BuildRequires:[[:space:]]*\)libmysql-devel|\1libmysql5-devel|;
|
||||
s|\(BuildRequires:[[:space:]]*\)libdb42-devel|\1libdb47-devel|;
|
||||
@ -63,6 +64,7 @@ sed -i "s|^Vendor:.*|Vendor: openmamba|;
|
||||
s|^PreReq:[[:space:]]*%{__install_info}|Requires(post):%{__install_info}|;
|
||||
s|^PreReq:[[:space:]]*|Requires(pre): |;
|
||||
s|^\(Requires:[[:space:]]*kde-workspace\)$|#\1|;
|
||||
s|^%patch\([0-9][0-9]*\)|%patch \1|;
|
||||
s|http://.*.dl\.sourceforge\.net/|https://downloads.sourceforge.net/|;
|
||||
s|http://ftp.kde.org/stable/|https://download.kde.org/stable/|;
|
||||
s|ftp://ftp.kde.org/pub/kde/|https://download.kde.org/|;
|
||||
@ -71,6 +73,7 @@ sed -i "s|^Vendor:.*|Vendor: openmamba|;
|
||||
s|http[s]*://pypi.python.org/packages/source/[^/]*/|https://pypi.debian.net/|;
|
||||
s|http://ftp.gnome.org/pub/GNOME/sources/|https://download.gnome.org/sources/|;
|
||||
s|ftp://ftp.gnome.org/pub/gnome/sources/|https://download.gnome.org/sources/|" $SPECFILE
|
||||
# s|;s,.*/man/.*,&.gz,g||;
|
||||
# s|http.*.cpan.org/.*/\([^/-]*\)\(-.*\)|https://cpan.metacpan.org/modules/by-module/\1/\1\2|;
|
||||
#sed -i "s|^\(Source.*:[[:space:]]*ftp://ftp.kde.org/pub/kde/stable/.*.tar.\)bz2|\1xz|" $SPECFILE
|
||||
|
||||
|
@ -49,11 +49,12 @@ for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
[ -e /var/autoport/$a/var/tmp/autodist ] && \
|
||||
find /var/autoport/$a/var/tmp/autodist/ -mindepth 1 -maxdepth 1 -type f -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
find /var/autoport/$a/tmp/ -mindepth 1 -maxdepth 1 -type f -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
sudo -u ${AUTOPORT_CHROOT_USER[$i]} ccache -C
|
||||
autoport-chroot $a ccache -C
|
||||
elif [ "${AUTOPORT_UPDATE[$i]}" ]; then
|
||||
clean /var/autodist
|
||||
find /var/autodist-tmp/ -mindepth 1 -maxdepth 1 -ctime ${TMP_CTIME_OLD} -exec rm -rf {} \;
|
||||
sudo -u autodist ccache -C
|
||||
sudo -u autodist yarn cache clean
|
||||
elif [ "${AUTOPORT_NATIVE[$i]}" -a "${AUTOPORT_CHROOT_USER[$i]}" ]; then
|
||||
WORKINGHOME=`getent passwd ${AUTOPORT_CHROOT_USER[$i]} | cut -d: -f6`
|
||||
if [ -e $WORKINGHOME ]; then
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# autodist-upstream-updates daily cron script
|
||||
# (c) 2008-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
. /etc/autodist/config
|
||||
. /etc/sysconfig/autoport
|
||||
|
||||
if [ ! "$AUTOPORT_UPDATE_NO_DISTROMATIC" ]; then
|
||||
REPOSITORY=devel
|
||||
/usr/sbin/autodist-upstream-updates -q -h -u -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
||||
|
||||
REPOSITORY=milestone1-1.1
|
||||
/usr/sbin/autodist-upstream-updates -q -h -u -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
||||
|
||||
REPOSITORY=milestone2
|
||||
/usr/sbin/autodist-upstream-updates -q -h -u -r $REPOSITORY > $LOCAL_REPS_BASE_DIR/distromatic/$REPOSITORY/_popular.html
|
||||
fi
|
||||
|
||||
exit 0
|
12
etc/cron.daily/45-autodist-git-sync
Executable file
12
etc/cron.daily/45-autodist-git-sync
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# autodist-git-sync daily cron script
|
||||
# (c) 2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
. /etc/autodist/config
|
||||
|
||||
if [ "$AUTODIST_GIT_SYNC" == "1" ]; then
|
||||
autodist-git syncrepo
|
||||
fi
|
||||
|
||||
exit 0
|
@ -8,7 +8,7 @@
|
||||
|
||||
# FIXME: parametrize automaint call
|
||||
if [ ! "$AUTOPORT_UPDATE_NO_AUTOMAINT" ]; then
|
||||
automaint -s devel-autodist -d devel -p devel-makedist
|
||||
automaint -s devel-autodist -d base -p devel-makedist
|
||||
fi
|
||||
|
||||
for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
|
||||
|
@ -12,8 +12,8 @@ AUTOPORT_UPDATE_NO_DISTROMATIC=1
|
||||
#AUTOPORT_WEBBUILD_HOST=http://localhost/webbuild.html
|
||||
#ICECREAM_MONITOR_HOST=localhost
|
||||
|
||||
AUTOPORT_DEVEL_IMPORT_REPOSITORIES="devel-makedist devel devel-games devel-autodist devel-gnome \
|
||||
devel-kde4 devel-xorg devel-kernel devel-misc devel-java devel-future devel-past devel-contrib devel-contrib-java"
|
||||
AUTOPORT_DEVEL_IMPORT_REPOSITORIES="devel-makedist base devel-autodist \
|
||||
devel-kernel devel-misc devel-future devel-past"
|
||||
|
||||
AUTOPORT_DEVEL_RELEASE_REPOSITORIES="milestone2-makedist milestone2-kernel milestone2-kernel-next"
|
||||
|
||||
|
@ -1,18 +1,22 @@
|
||||
#!/usr/bin/python3
|
||||
#
|
||||
# repology-openmamba.py - find upstream packages updates from repology.org
|
||||
# Copyright (c) 2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2021-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
|
||||
import json, urllib.request, time, sys
|
||||
import json
|
||||
import rpm
|
||||
import sys
|
||||
import time
|
||||
import urllib.request
|
||||
|
||||
|
||||
with open("/var/ftp/pub/openmamba/devel/legacy") as f:
|
||||
with open("/var/ftp/pub/openmamba/base/legacy") as f:
|
||||
legacy_packages = f.read().splitlines()
|
||||
|
||||
with open("/var/ftp/pub/openmamba/devel/ignore") as f:
|
||||
with open("/var/ftp/pub/openmamba/base/updates-conf.json") as f:
|
||||
data = json.loads(f.read())
|
||||
ignored_packages = data["repology"]
|
||||
ignored_packages = data["repology"]["ignore"]
|
||||
|
||||
from_package = ""
|
||||
last_from_package = "NONE"
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
# openmamba bot for Telegram
|
||||
#
|
||||
# Copyright (C) 2016-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (C) 2016-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
# GPL v3 license
|
||||
|
||||
@ -25,6 +25,7 @@ logger = logging.getLogger(__name__)
|
||||
timers = dict()
|
||||
social_log_last_ids = dict()
|
||||
|
||||
reps = [ 'base', 'devel-makedist', 'devel-autodist', 'devel-kernel', 'devel-misc', 'devel-future', 'devel-past' ]
|
||||
|
||||
def start(update: Update, context: CallbackContext):
|
||||
|
||||
@ -57,9 +58,10 @@ def query(update: Update, context: CallbackContext):
|
||||
logger.info("Query of %s: %s" % (user.first_name, update.message.text))
|
||||
|
||||
response = ""
|
||||
for rep in [ 'devel', 'devel-games', 'devel-makedist', 'devel-autodist', 'devel-kernel', 'devel-misc', 'devel-kde4' ]:
|
||||
for rep in reps:
|
||||
conn = sqlite3.connect('/var/webbuild/db/%s-sources.db' % rep, check_same_thread=False)
|
||||
cursor = conn.cursor()
|
||||
print(rep)
|
||||
cursor.execute(
|
||||
'SELECT id,name,version,release,summary,url FROM sources where name like "%%%s%%" or summary like "%%%s%%" '
|
||||
'ORDER BY name="%s" DESC, name like "%s%%" DESC, name like "%%%s%%" DESC limit 10'
|
||||
@ -79,7 +81,7 @@ def details(update: Update, context: CallbackContext):
|
||||
logger.info("Details of %s: %s" % (user.first_name, update.message.text))
|
||||
|
||||
response = ""
|
||||
for rep in [ 'devel', 'devel-games', 'devel-makedist', 'devel-autodist', 'devel-kernel', 'devel-misc', 'devel-kde4' ]:
|
||||
for rep in reps:
|
||||
conn = sqlite3.connect('/var/webbuild/db/%s-sources.db' % rep, check_same_thread=False)
|
||||
cursor = conn.cursor()
|
||||
cursor.execute(
|
||||
|
@ -4,7 +4,7 @@ After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/python3 /usr/share/autodist/openmamba_bot.py
|
||||
ExecStart=/var/autodist/env/bin/python3 /usr/share/autodist/openmamba_bot.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
1
telegram/requirements.txt
Normal file
1
telegram/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
python-telegram-bot~=13.14
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# webbuild cgi script
|
||||
# Copyright (c) 2012-2020 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2012-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
. /usr/share/autodist/webbuild-functions
|
||||
. /usr/share/autodist/webbuild-functions-private
|
||||
@ -400,7 +400,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
|
||||
NOTIFIED=
|
||||
if [ "${ORIGRETCODE: -1}" == "+" ]; then
|
||||
NOTIFIED=1
|
||||
RETCODE="${ORIGRETCODE::-1}"
|
||||
RETCODE="${ORIGRETCODE/+*}"
|
||||
else
|
||||
RETCODE=$ORIGRETCODE
|
||||
fi
|
||||
@ -481,8 +481,8 @@ if [ "$REQUEST" = "repsearch" ]; then
|
||||
echo -n "<hr><b>Search results for \"$REPSEARCHTEXT\":</b><div align=left class=\"outputbox\" id=outputtop style=\"font-family:serif;color:black;background-color:#E0F2D0;\">"
|
||||
# echo -n "<pre><!-- SCROLL -->"
|
||||
REPSEARCHTEXT_FMT=`echo "${REPSEARCHTEXT}" | sed "s|[[:space:]]|+|g"`
|
||||
curl -L -s "${WEBBUILD_DISTROQUERY_URL}?query=${REPSEARCHTEXT_FMT}&search_milestone2=true&search_milestone3=true&search_devel=true\
|
||||
&search_i586=true&search_x86_64=true&search_arm=true&search_sources=true&query_compact=true&replyplain=true" | \
|
||||
curl -L -s "${WEBBUILD_DISTROQUERY_URL}?query=${REPSEARCHTEXT_FMT}&search_rolling=true&search_milestone2=true&search_milestone3=true&search_devel=true\
|
||||
&search_i586=true&search_x86_64=true&search_arm=true&search_aarch64=true&search_sources=true&query_compact=true&replyplain=true" | \
|
||||
sed "s| \(href=.\)/| \1${SITE_BASE_URL}/|g"
|
||||
# $SUDO_WRAPPER 0 local "$USER" "" "autodist-repository search -i ${REPSEARCHTEXT/-/\-}" | \
|
||||
# parse_search_output ${AUTOPORT_ARCH[$ENVIRONMENT]}
|
||||
@ -1067,7 +1067,7 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
|
||||
RET=$?
|
||||
;;
|
||||
"speccreate") if [ "$SPECCREATEURL" -a "$PACKAGE" ]; then
|
||||
FOUND_EXISTING=`curl -L -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_milestone2=true&search_milestone3=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true&searchbox=false"`
|
||||
FOUND_EXISTING=`curl -L -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_base=true&search_milestone2=true&search_milestone3=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true&searchbox=false"`
|
||||
if [ "$FOUND_EXISTING" != "" ]; then
|
||||
echo -n "<div align=left class=\"output\" id=outputtop style=\"font-family:serif;color:black;background-color:#E0F2D0;\">"
|
||||
echo "<b><font color=red>ERROR: package already exists, please update from appropriate version:</font><b>"
|
||||
@ -1903,7 +1903,7 @@ $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOS
|
||||
fi
|
||||
echo -ne "<br><pre>Patch$NEWPATCHNUM: $PACKAGE-${SPECVAR_Version}-$ADDPATCHNAME.patch</pre>"
|
||||
echo -n "<font color=gold>2) in %prep section after %setup:</font><br>"
|
||||
echo -ne "<br><pre>%patch$NEWPATCHNUM -p$l -b .${ADDPATCHNAME}</pre>"
|
||||
echo -ne "<br><pre>%patch $NEWPATCHNUM -p$l -b .${ADDPATCHNAME}</pre>"
|
||||
RET=-1
|
||||
}
|
||||
else
|
||||
|
@ -88,10 +88,11 @@ if [ "$MODE" = "specinfo" ]; then
|
||||
done < ${ENVPREFIX}${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec
|
||||
[ "$AUTOBUILDREQ_BEGIN" -a "$AUTOBUILDREQ_END" -a ! "$AUTOBUILDREQ_UNDONE" ] || \
|
||||
echo "SPECVAR_CHECK_NOAUTOBUILDREQ=1"
|
||||
$SUCMDPREFIX "rpmspec -P ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec > ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec.tmp 2>/dev/null"
|
||||
# _setup: prevent %setup macro expansion
|
||||
$SUCMDPREFIX "rpmspec -P ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec --define \"%setup _setup\" > ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec.tmp 2>/dev/null"
|
||||
if [ -e $SPECFILE.tmp ]; then
|
||||
echo "SPECVAR_Specfile=\"$SPECFILE\""
|
||||
BUILDDIR=`grep -m1 "^%setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"`
|
||||
BUILDDIR=`grep -m1 "^_setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"`
|
||||
while read line; do
|
||||
set -- $line
|
||||
[ "$1" = "%package" -o "$1" = "%description" ] && break
|
||||
|
Reference in New Issue
Block a user