From 85a72ee189b6c2ca35df0ece35653c1d5ec1790a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Wed, 11 May 2022 22:44:12 +0700 Subject: [PATCH] - set repos.d dir under /etc/dnf and add PLD Th repos --- dnf.spec | 56 +++++++++++++++++++++++++++++++++++++++++++++- pld-archive.repo | 11 +++++++++ pld-debuginfo.repo | 21 +++++++++++++++++ pld-multilib.repo | 21 +++++++++++++++++ pld.repo | 41 +++++++++++++++++++++++++++++++++ repos.d.patch | 16 +++++++++++++ 6 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 pld-archive.repo create mode 100644 pld-debuginfo.repo create mode 100644 pld-multilib.repo create mode 100644 pld.repo create mode 100644 repos.d.patch diff --git a/dnf.spec b/dnf.spec index be96e3c..d9b4f57 100644 --- a/dnf.spec +++ b/dnf.spec @@ -17,7 +17,12 @@ Group: Base License: GPL v2 (parts on GPL v2+ or GPL) Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz # Source0-md5: 21880d44905d6aa67ab6bee1e86380b3 +Source1: pld.repo +Source2: pld-archive.repo +Source3: pld-debuginfo.repo +Source4: pld-multilib.repo Patch0: install.patch +Patch1: repos.d.patch URL: https://github.com/rpm-software-management/dnf BuildRequires: bash-completion-devel BuildRequires: cmake >= 2.4 @@ -117,6 +122,7 @@ Warstwa zgodności z YUM-em dla DNF-a. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build install -d build @@ -132,7 +138,7 @@ cd build %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d},yum} \ +install -d $RPM_BUILD_ROOT%{_sysconfdir}/{yum,%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d,repos.d}} \ -d $RPM_BUILD_ROOT{%{_localstatedir}/log/,%{_var}/cache/dnf} \ -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf-plugins/__pycache__ @@ -150,9 +156,54 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf} ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d} ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d} +ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/repos.d,yum/repos.d} ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars} ln -s dnf $RPM_BUILD_ROOT%{_bindir}/yum +%ifarch i686 ppc sparc alpha athlon aarch64 %{arm} + %define ftp_arch %{_target_cpu} +%endif +%ifarch pentium2 pentium3 pentium4 + %define ftp_arch i686 +%endif +%ifarch %{x8664} + %define ftp_arch x86_64 + %define ftp_alt_arch i686 + %define ftp_alt2_arch x32 +%endif +%ifarch x32 + %define ftp_arch x32 + %define ftp_alt_arch x86_64 + %define ftp_alt2_arch i686 +%endif + +%define pld_repo %{SOURCE1} +%define pld_archive_repo %{SOURCE2} +%define pld_debuginfo_repo %{SOURCE3} + +%ifarch %{x8664} x32 + %define pld_multilib_repo %{SOURCE4} + %define pld_multilib2_repo %{SOURCE4} +%endif + +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.repo + +%if 0%{?pld_multilib_repo:1} + %{__sed} 's|%%ARCH%%|%{ftp_alt_arch}|g' < %{pld_multilib_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.repo +%endif + +%if 0%{?pld_multilib2_repo:1} + %{__sed} 's|%%ARCH%%|%{ftp_alt2_arch}|g' < %{pld_multilib_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt2_arch}.repo +%endif + +%if 0%{?pld_debuginfo_repo:1} +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_debuginfo_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-debuginfo.repo +%endif + +%if 0%{?pld_archive_repo:1} +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_archive_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-archive.repo +%endif + %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf @@ -186,8 +237,10 @@ rm -rf $RPM_BUILD_ROOT %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/plugins %dir %{_sysconfdir}/%{name}/protected.d +%dir %{_sysconfdir}/%{name}/repos.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/repos.d/*.repo %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} %{_mandir}/man5/dnf.conf.5* @@ -230,6 +283,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{_sysconfdir}/yum %{_sysconfdir}/yum/pluginconf.d %{_sysconfdir}/yum/protected.d +%{_sysconfdir}/yum/repos.d %{_sysconfdir}/yum/vars %{_mandir}/man1/yum-aliases.1* %{_mandir}/man5/yum.conf.5.* diff --git a/pld-archive.repo b/pld-archive.repo new file mode 100644 index 0000000..67358f5 --- /dev/null +++ b/pld-archive.repo @@ -0,0 +1,11 @@ +# PLD Linux + +[th-archive-arch] +name=PLD Linux (Th) Archive - Architecture specific +baseurl=https://ftp.th.pld-linux.org/dists/th/PLD/$arch/RPMS/ +enabled=0 + +[th-archive-noarch] +name=PLD Linux (Th) Archive - Architecture independent +baseurl=https://ftp.th.pld-linux.org/dists/th/PLD/noarch/RPMS/ +enabled=0 diff --git a/pld-debuginfo.repo b/pld-debuginfo.repo new file mode 100644 index 0000000..db00d2e --- /dev/null +++ b/pld-debuginfo.repo @@ -0,0 +1,21 @@ +# PLD Linux + +[th-debuginfo] +name=PLD Linux (Th) Debuginfo +baseurl=https://ftp.th.pld-linux.org/dists/th/PLD/$arch/debuginfo/ +enabled=0 + +[th-ready-debuginfo] +name=PLD Linux (Th) Debuginfo (ready) +baseurl=https://ftp.th.pld-linux.org/dists/th/ready/$arch/debuginfo/ +enabled=0 + +[th-test-debuginfo] +name=PLD Linux (Th) Debuginfo (test) +baseurl=https://ftp.th.pld-linux.org/dists/th/test/$arch/debuginfo/ +enabled=0 + +[th-obsolete-debuginfo] +name=PLD Linux (Th) Debuginfo (obsolete) +baseurl=https://ftp.th.pld-linux.org/dists/th/obsolete/$arch/debuginfo/ +enabled=0 diff --git a/pld-multilib.repo b/pld-multilib.repo new file mode 100644 index 0000000..b22d5b0 --- /dev/null +++ b/pld-multilib.repo @@ -0,0 +1,21 @@ +# PLD Linux + +[th-%ARCH%] +name=PLD Linux (Th) %ARCH% +baseurl=https://ftp.th.pld-linux.org/dists/th/PLD/%ARCH%/RPMS/ +enabled=0 + +[th-ready-%ARCH%] +name=PLD Linux (Th) (ready) %ARCH% +baseurl=https://ftp.th.pld-linux.org/dists/th/ready/%ARCH%/RPMS/ +enabled=0 + +[th-test-%ARCH%] +name=PLD Linux (Th) (test) %ARCH% +baseurl=https://ftp.th.pld-linux.org/dists/th/test/%ARCH%/RPMS/ +enabled=0 + +[th-obsolete-%ARCH%] +name=PLD Linux (Th) (obsolete) %ARCH% +baseurl=https://ftp.th.pld-linux.org/dists/th/obsolete/%ARCH%/RPMS/ +enabled=0 diff --git a/pld.repo b/pld.repo new file mode 100644 index 0000000..93651b6 --- /dev/null +++ b/pld.repo @@ -0,0 +1,41 @@ +# PLD Linux + +[th-arch] +name=PLD Linux (Th) - Architecture specific +baseurl=https://ftp.th.pld-linux.org/dists/th/PLD/%ARCH%/RPMS/ +enabled=1 + +[th-noarch] +name=PLD Linux (Th) - Architecture independent +baseurl=https://ftp.th.pld-linux.org/dists/th/PLD/noarch/RPMS/ +enabled=1 + +[th-ready-arch] +name=PLD Linux (Th) (ready) - Architecture specific +baseurl=https://ftp.th.pld-linux.org/dists/th/ready/%ARCH%/RPMS/ +enabled=0 + +[th-ready-noarch] +name=PLD Linux (Th) (ready) - Architecture independent +baseurl=https://ftp.th.pld-linux.org/dists/th/ready/noarch/RPMS/ +enabled=0 + +[th-test-arch] +name=PLD Linux (Th) (test) - Architecture specific +baseurl=https://ftp.th.pld-linux.org/dists/th/test/%ARCH%/RPMS/ +enabled=0 + +[th-test-noarch] +name=PLD Linux (Th) (test) - Architecture independent +baseurl=https://ftp.th.pld-linux.org/dists/th/test/noarch/RPMS/ +enabled=0 + +[th-obsolete-arch] +name=PLD Linux (Th) (obsolete) - Architecture specific +baseurl=https://ftp.th.pld-linux.org/dists/th/obsolete/%ARCH%/RPMS/ +enabled=0 + +[th-obsolete-noarch] +name=PLD Linux (Th) (obsolete) - Architecture independent +baseurl=https://ftp.th.pld-linux.org/dists/th/obsolete/noarch/RPMS/ +enabled=0 diff --git a/repos.d.patch b/repos.d.patch new file mode 100644 index 0000000..c5c720d --- /dev/null +++ b/repos.d.patch @@ -0,0 +1,16 @@ +--- dnf-4.6.1/etc/dnf/dnf-strict.conf~ 2021-03-02 21:05:07.000000000 +0700 ++++ dnf-4.6.1/etc/dnf/dnf-strict.conf 2022-05-11 22:11:53.447481432 +0700 +@@ -1,4 +1,5 @@ + [main] ++reposdir=/etc/dnf/repos.d + gpgcheck=1 + installonly_limit=3 + clean_requirements_on_remove=True +--- dnf-4.6.1/etc/dnf/dnf.conf~ 2021-03-02 21:05:07.000000000 +0700 ++++ dnf-4.6.1/etc/dnf/dnf.conf 2022-05-11 22:11:47.577573922 +0700 +@@ -1,4 +1,5 @@ + [main] ++reposdir=/etc/dnf/repos.d + gpgcheck=1 + installonly_limit=3 + clean_requirements_on_remove=True -- 2.44.0