-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inherited from Copr basecode, namely starting from fedora-copr/copr#3299
- Loading branch information
Showing
12 changed files
with
1,449 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0-1 dist-git-client/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /usr/bin/python3 | ||
|
||
""" | ||
From within a git checkout, try to download files from dist-git lookaside cache. | ||
""" | ||
|
||
from dist_git_client import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#! /bin/sh | ||
|
||
# Run copr-disgit-client script directly from git, TESTING ONLY SCRIPT! | ||
# Copyright (C) 2020 Red Hat, Inc. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along | ||
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
absdir="$(dirname "$(readlink -f "$0")")" | ||
export PYTHONPATH="$absdir${PYTHONPATH+:$PYTHONPATH}" | ||
python3 "$absdir/bin/dist-git-client" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# SPEC file overview: | ||
# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/#con_rpm-spec-file-overview | ||
# Fedora packaging guidelines: | ||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/ | ||
|
||
|
||
Name: dist-git-client | ||
Version: 1.0 | ||
Release: 1%{?dist} | ||
Summary: Get sources for RPM builds from DistGit repositories | ||
BuildArch: noarch | ||
|
||
License: GPL-2.0-or-later | ||
URL: https://github.com/release-engineering/dist-git.git | ||
Source0: %name-%version.tar.gz | ||
|
||
Requires: curl | ||
Requires: /usr/bin/git | ||
|
||
BuildRequires: python3-pytest | ||
BuildRequires: python3-rpm-macros | ||
BuildRequires: /usr/bin/argparse-manpage | ||
BuildRequires: /usr/bin/git | ||
|
||
%if 0%{?fedora} || 0%{?rhel} > 9 | ||
Requires: python3-rpmautospec | ||
BuildRequires: python3-rpmautospec | ||
%endif | ||
|
||
%description | ||
A simple, configurable python utility that is able to clone package sources from | ||
a DistGit repository, download sources from the corresponding lookaside cache | ||
locations, and generate source RPMs. | ||
|
||
The utility is able to automatically map the .git/config clone URL into the | ||
corresponding DistGit instance configuration. | ||
|
||
|
||
%prep | ||
%setup -q | ||
|
||
|
||
%build | ||
|
||
|
||
|
||
%install | ||
install -d %{buildroot}%{_bindir} | ||
install -d %{buildroot}%{_mandir}/man1 | ||
install -d %{buildroot}%{_sysconfdir}/dist-git-client | ||
install -d %{buildroot}%{python3_sitelib} | ||
install -p -m 755 bin/dist-git-client %buildroot%_bindir | ||
argparse-manpage --pyfile dist_git_client.py \ | ||
--function _get_argparser \ | ||
--author "Copr Team" \ | ||
--author-email "[email protected]" \ | ||
--url %url --project-name Copr \ | ||
> %{buildroot}%{_mandir}/man1/dist-git-client.1 | ||
install -p -m 644 etc/default.ini \ | ||
%{buildroot}%{_sysconfdir}/dist-git-client | ||
install -p -m 644 dist_git_client.py %{buildroot}%{python3_sitelib} | ||
|
||
|
||
%check | ||
PYTHON=python3 ./run_tests.sh -vv --no-coverage | ||
|
||
|
||
%files | ||
%license LICENSE | ||
%_bindir/dist-git-client | ||
%_mandir/man1/dist-git-client.1* | ||
%dir %_sysconfdir/dist-git-client | ||
%config %_sysconfdir/dist-git-client/default.ini | ||
%python3_sitelib/dist_git_client.* | ||
%python3_sitelib/__pycache__/dist_git_client* | ||
|
||
|
||
%changelog | ||
* Thu Jun 06 2024 Pavel Raiskup <[email protected]> 1.1-0 | ||
- new package built with tito |
Oops, something went wrong.