commit
3d8f210ee5
BIN
patch-tracking-1.0.0.tar
Normal file
BIN
patch-tracking-1.0.0.tar
Normal file
Binary file not shown.
56
patch-tracking.spec
Normal file
56
patch-tracking.spec
Normal file
@ -0,0 +1,56 @@
|
||||
%define name patch-tracking
|
||||
%define version 1.0.0
|
||||
%define release 1
|
||||
|
||||
Summary: This is a tool for automatically tracking upstream repository code patches
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: %{name}-%{version}.tar
|
||||
License: Mulan PSL v2
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
BuildArch: noarch
|
||||
Vendor: ChenYanpan <chenyanpan@huawei.com>
|
||||
Url: https://openeuler.org/zh/
|
||||
|
||||
BuildRequires: python3-setuptools
|
||||
# Requires: python3.7 python3-flask python3-sqlalchemy python3-requests
|
||||
|
||||
%description
|
||||
This is a tool for automatically tracking upstream repository code patches
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
%post
|
||||
sed -i "s|\blogging.conf\b|/etc/patch-tracking/logging.conf|" %{python3_sitelib}/patch_tracking/app.py
|
||||
sed -i "s|\bsqlite:///db.sqlite\b|sqlite:////var/patch-tracking/db.sqlite|" %{python3_sitelib}/patch_tracking/app.py
|
||||
sed -i "s|\bsettings.conf\b|/etc/patch-tracking/settings.conf|" %{python3_sitelib}/patch_tracking/app.py
|
||||
chmod +x /usr/bin/patch-tracking-cli
|
||||
chmod +x /usr/bin/patch-tracking
|
||||
chmod +x /usr/bin/generate_password
|
||||
sed -i "s|\bpatch-tracking.log\b|/var/log/patch-tracking.log|" /etc/patch-tracking/logging.conf
|
||||
|
||||
%preun
|
||||
%systemd_preun patch-tracking.service
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%{python3_sitelib}/*
|
||||
/etc/patch-tracking/logging.conf
|
||||
/etc/patch-tracking/settings.conf
|
||||
/usr/bin/patch-tracking
|
||||
/usr/bin/patch-tracking-cli
|
||||
/var/patch-tracking/db.sqlite
|
||||
/usr/bin/generate_password
|
||||
/usr/lib/systemd/system/patch-tracking.service
|
||||
Loading…
x
Reference in New Issue
Block a user