File openSUSE-repos-20230209.87a5e9e.obscpio of Package openSUSE-repos
07070100000000000081A400000000000000000000000163E4E1D800000AE1000000000000000000000000000000000000002A00000000openSUSE-repos-20230209.87a5e9e/README.md# openSUSE-repos
**Definitions for openSUSE repository management via zypp-services.**
This feature was originally requested as part of https://code.opensuse.org/leap/features/issue/91
See official [docs](https://doc.opensuse.org/projects/libzypp/HEAD/zypp-services.html#services-usecase-4) for zypp-services for more details.
## Example manual usage of zypper as
```
$ tree /somewhere # zypp expects repo/repoindex.xml
/somewhere
└── repo
└── repoindex.xml
$ zypper addservice /somewhere openSUSE # Use openSUSE prefix for all reposistories managed by service
$ zypper ref -s # optionally force refresh services
```
## Cleanup of distribution repositories not managed by zypp-services
You might want to remove old duplicate entries in */etc/zypp/repos.d/*.
Repositories managed by zypp-services can be easily identified as they will have openSUSE: prefix (or any other that you have chosen).
```
$ ls -la /etc/zypp/repos.d/ | grep -v openSUSE: # skip service managed repos
openSUSE-20220923-0.repo download.opensuse.org-oss.repo
repo-debug.repo download.opensuse.org-tumbleweed.repo
repo-source.repo
```
**Cleanup of old distribution repositories on a freshly installed openSUSE Tumbleweed**
```
$ sudo rm -f /etc/zypp/repos.d/download.opensuse.org-non-oss.repo \
/etc/zypp/repos.d/openSUSE-*-0.repo \
/etc/zypp/repos.d/download.opensuse.org-oss.repo \
/etc/zypp/repos.d/repo-debug.repo \
/etc/zypp/repos.d/download.opensuse.org-tumbleweed.repo \
/etc/zypp/repos.d/repo-source.repo
```
**Cleanup of old distribution repositories on a freshly installed openSUSE Leap 15.X**
```
$ sudo rm -f /etc/zypp/repos.d/repo-backports-debug-update.repo \
/etc/zypp/repos.d/repo-backports-update.repo \
/etc/zypp/repos.d/repo-sle-debug-update.repo \
/etc/zypp/repos.d/repo-sle-update.repo
```
## How to contribute?
Package is developed in [GitHub/openSUSE](https://github.com/openSUSE/openSUSE-repos/).
Package needs to be manually updated in [OBS](https://build.opensuse.org/package/show/Base:System/openSUSE-repos) once changes are merged in GitHub.
Make sure to install osc and required obs services by openSUSE-repos package
```
$ sudo zypper in openSUSE-release-tools obs-service-tar
```
Fork the repository in OBS, fetch latest request and make a submit request.
```
$ osc bco Base:System/openSUSE-repos
cd home:i*:branches:Base:System/openSUSE-repos
osc service runall
osc addremove
osc commit # changelog can be reviewed by osc vc
osc sr # submit request back to Base:System
```
Don't forget to send changes back to Tumbleweed and Leap once changes are merged to Base:System.
```
$ osc sr Base:System openSUSE-repos openSUSE:Factory
$ osc sr openSUSE:Factory openSUSE-repos openSUSE:Leap:15.5 # once merged to Factory
```
That's all. Happy Hacking
07070100000001000041ED00000000000000000000000163E4E1D800000000000000000000000000000000000000000000002500000000openSUSE-repos-20230209.87a5e9e/dist07070100000002000041ED00000000000000000000000163E4E1D800000000000000000000000000000000000000000000002D00000000openSUSE-repos-20230209.87a5e9e/dist/package07070100000003000081A400000000000000000000000163E4E1D800001A82000000000000000000000000000000000000004100000000openSUSE-repos-20230209.87a5e9e/dist/package/openSUSE-repos.spec#
# spec file
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 Neal Gompa <ngompa13@gmail.com>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global debug_package %{nil}
%if "@BUILD_FLAVOR@" == ""
ExclusiveArch: do_not_build
%endif
%global flavor @BUILD_FLAVOR@%nil
%if 0%{?is_opensuse} && 0%{?suse_version} >= 1550
# Tumbleweed
%if "%flavor" == "openSUSE-repos-Tumbleweed"
%define theme Tumbleweed
%define branding tumbleweed
%endif
%if "%flavor" == "openSUSE-repos-MicroOS"
%define theme MicroOS
%define branding microos
%endif
%endif
%if 0%{?sle_version}
# Leap
%if 0%{?is_leapmicro}
%if "%flavor" == "openSUSE-repos-LeapMicro"
%define theme LeapMicro
%define branding leap-micro
%endif
%else
%if "%flavor" == "openSUSE-repos-Leap"
%define theme Leap
%define branding leap
%endif
%endif
%endif
%if "%{?theme}" == ""
ExclusiveArch: do_not_build
%endif
%if "@BUILD_FLAVOR@" == ""
Name: openSUSE-repos
%else
Name: openSUSE-repos-%{theme}
%endif
Version: 0
Release: 0
Summary: openSUSE package repositories
License: MIT
Group: System/Management
URL: https://github.com/openSUSE/openSUSE-repos
Source: openSUSE-repos-%{version}.tar.xz
#boo#1203715
BuildRequires: -post-build-checks
Requires: zypper
Conflicts: otherproviders(openSUSE-repos)
Provides: openSUSE-repos
%if "%{?theme}" == "Tumbleweed"
Obsoletes: openSUSE-repos-Leap
Obsoletes: openSUSE-repos-LeapMicro
%endif
%if "%{?theme}" == "MicroOS"
Obsoletes: openSUSE-repos-Leap
Obsoletes: openSUSE-repos-LeapMicro
%endif
%description
Definitions for openSUSE repository management via zypp-services
%files
%dir %{_datadir}/zypp/local/
%dir %{_datadir}/zypp/local/service
%dir %{_datadir}/zypp/local/service/openSUSE
%dir %{_datadir}/zypp/local/service/openSUSE/repo
%ghost %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%ghost %{_sysconfdir}/zypp/services.d/openSUSE.service
%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%if "%{theme}" == "Tumbleweed"
%ifarch %{ix86} x86_64
%{_datadir}/zypp/local/service/openSUSE/repo/opensuse-%{branding}-repoindex.xml
%else
%{_datadir}/zypp/local/service/openSUSE/repo/opensuse-%{branding}-ports-repoindex.xml
%endif
%endif
%if "%{theme}" == "MicroOS"
%ifarch x86_64 aarch64
%{_datadir}/zypp/local/service/openSUSE/repo/opensuse-%{branding}-repoindex.xml
%endif
%endif
%if "%{theme}" == "LeapMicro"
%ifarch x86_64 aarch64
%{_datadir}/zypp/local/service/openSUSE/repo/opensuse-%{branding}-repoindex.xml
%endif
%endif
%if "%{theme}" == "Leap"
%ifarch %{ix86} x86_64 aarch64 ppc64le s390x
%{_datadir}/zypp/local/service/openSUSE/repo/opensuse-%{branding}-repoindex.xml
%else
%{_datadir}/zypp/local/service/openSUSE/repo/opensuse-%{branding}-ports-repoindex.xml
%endif
%endif
%prep
%setup -q -n openSUSE-repos-%{version}
%build
# Nothing to build
%install
mkdir -p %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
mkdir -p %{buildroot}%{_sysconfdir}/zypp/vars.d/
# Setup for primary arches
%if "%{theme}" == "Tumbleweed"
%ifarch %{ix86} x86_64
install opensuse-%{branding}-repoindex.xml -pm 0644 %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
%else ifarch aarch64 %{arm} %{power64} ppc s390x riscv64
install opensuse-%{branding}-ports-repoindex.xml -pm 0644 %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
%endif
%endif
%if "%{theme}" == "MicroOS"
%ifarch x86_64 aarch64
install opensuse-%{branding}-repoindex.xml -pm 0644 %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
%endif
%endif
%if "%{theme}" == "LeapMicro"
%ifarch x86_64 aarch64
install opensuse-%{branding}-repoindex.xml -pm 0644 %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
%endif
%endif
%if "%{theme}" == "Leap"
%ifarch %{ix86} x86_64 aarch64 ppc64le s390x
install opensuse-%{branding}-repoindex.xml -pm 0644 %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
%else
install opensuse-%{branding}-ports-repoindex.xml -pm 0644 %{buildroot}%{_datadir}/zypp/local/service/openSUSE/repo
%endif
%endif
%ifarch %{ix86}
echo "x86" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch x86_64
echo "x86_64" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch aarch64
echo "aarch64" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch armv6l armv6hl
echo "armv6hl" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch armv7l armv7hl
echo "armv7hl" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch ppc ppc64 ppc64le
echo "ppc" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch riscv64
echo "riscv" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%ifarch s390x
echo "zsystems" > %{buildroot}%{_sysconfdir}/zypp/vars.d/DIST_ARCH
%endif
%post
%if "%{theme}" == "Tumbleweed"
%ifarch %{ix86} x86_64
ln -sf opensuse-%{branding}-repoindex.xml %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%else
ln -sf opensuse-%{branding}-ports-repoindex.xml %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%endif
%endif
%if "%{theme}" == "MicroOS"
%ifarch x86_64 aarch64
ln -sf opensuse-%{branding}-repoindex.xml %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%endif
%endif
%if "%{theme}" == "LeapMicro"
%ifarch x86_64 aarch64
ln -sf opensuse-%{branding}-repoindex.xml %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%endif
%endif
%if "%{theme}" == "Leap"
%ifarch %{ix86} x86_64 aarch64 ppc64le s390x
ln -sf opensuse-%{branding}-repoindex.xml %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%else
ln -sf opensuse-%{branding}-ports-repoindex.xml %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
%endif
%endif
# We hereby declare that running this will not influence existing transaction
ZYPP_READONLY_HACK=1 zypper addservice %{_datadir}/zypp/local/service/openSUSE openSUSE
%postun
if [ "$1" = 0 ] ; then
# We hereby declare that running this will not influence existing transaction
ZYPP_READONLY_HACK=1 zypper removeservice openSUSE
if [ -L "%{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml" ] ; then
rm -f %{_datadir}/zypp/local/service/openSUSE/repo/repoindex.xml
fi
fi
%changelog
07070100000004000081A400000000000000000000000163E4E1D8000003D2000000000000000000000000000000000000004200000000openSUSE-repos-20230209.87a5e9e/opensuse-leap-micro-repoindex.xml<repoindex ttl="0"
disturl="https://download.opensuse.org"
distsub="leap-micro/"
distver="${releasever}"
debugenable="false"
sourceenable="false">
<repo url="%{disturl}/distribution/%{distsub}%{distver}/product/repo/Leap-Micro-%{distver}-$DIST_ARCH-Media1"
alias="repo-main"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/distribution/%{distsub}%{distver}/product/repo/Leap-Micro-%{distver}-$DIST_ARCH-Media2"
alias="repo-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/distribution/%{distsub}%{distver}/product/repo/Leap-Micro-%{distver}-$DIST_ARCH-Media3"
alias="repo-source"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/sle"
alias="repo-sle-update"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
</repoindex>
07070100000005000081A400000000000000000000000163E4E1D800000393000000000000000000000000000000000000004200000000openSUSE-repos-20230209.87a5e9e/opensuse-leap-ports-repoindex.xml<repoindex ttl="0"
disturl="https://download.opensuse.org"
distsub="leap/"
distver="${releasever}"
debugenable="false"
sourceenable="false">
<repo url="%{disturl}/ports/$DIST_ARCH/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/ports/$DIST_ARCH/source/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss-source"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/ports/$DIST_ARCH/debug/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="http://codecs.opensuse.org/openh264/openSUSE_Leap"
alias="repo-openh264"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
</repoindex>
07070100000006000081A400000000000000000000000163E4E1D800000A03000000000000000000000000000000000000003C00000000openSUSE-repos-20230209.87a5e9e/opensuse-leap-repoindex.xml<repoindex ttl="0"
disturl="https://download.opensuse.org"
distsub="leap/"
distver="${releasever}"
debugenable="false"
sourceenable="false">
<repo url="%{disturl}/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/source/distribution/%{distsub}%{distver}/repo/oss"
alias="repo-oss-source"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/distribution/%{distsub}%{distver}/repo/non-oss"
alias="repo-non-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/distribution/%{distsub}%{distver}/repo/non-oss"
alias="repo-non-oss-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="http://codecs.opensuse.org/openh264/openSUSE_Leap"
alias="repo-openh264"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/oss"
alias="update-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/update/%{distsub}%{distver}/oss"
alias="update-oss-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/non-oss"
alias="update-non-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/update/%{distsub}%{distver}/non-oss"
alias="update-non-oss-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/backports"
alias="update-backports"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/backports_debug"
alias="update-backports-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}%{distver}/sle"
alias="update-sle"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/update/%{distsub}%{distver}/sle"
alias="update-sle-debug"
name="%{alias} (%{distver})"
enabled="false"
autorefresh="true"/>
</repoindex>
07070100000007000081A400000000000000000000000163E4E1D8000003E8000000000000000000000000000000000000003F00000000openSUSE-repos-20230209.87a5e9e/opensuse-microos-repoindex.xml<repoindex ttl="0"
disturl="https://download.opensuse.org"
distsub="tumbleweed/"
debugenable="false"
sourceenable="false">
<repo url="%{disturl}/%{distsub}/repo/oss"
alias="repo-oss"
name="%{alias}"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/%{distsub}/repo/oss"
alias="repo-oss-debug"
name="%{alias}"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/source/%{distsub}/repo/oss"
alias="repo-oss-source"
name="%{alias}"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/%{distsub}/repo/non-oss"
alias="repo-non-oss"
name="%{alias}"
enabled="true"
autorefresh="true"/>
<repo url="http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed"
alias="repo-openh264"
name="%{alias}"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}"
alias="update-tumbleweed"
name="%{alias}"
enabled="true"
autorefresh="true"/>
</repoindex>
07070100000008000081A400000000000000000000000163E4E1D8000003D5000000000000000000000000000000000000004800000000openSUSE-repos-20230209.87a5e9e/opensuse-tumbleweed-ports-repoindex.xml<repoindex ttl="0"
disturl="https://download.opensuse.org"
distsub="tumbleweed/"
debugenable="false"
sourceenable="false">
<repo url="%{disturl}/ports/$DIST_ARCH/%{distsub}/repo/oss"
alias="repo-oss"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/ports/$DIST_ARCH/debug/%{distsub}/repo/oss"
alias="repo-oss-debug"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/ports/$DIST_ARCH/source/%{distsub}/repo/oss"
alias="repo-oss-source"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed"
alias="repo-openh264"
name="%{alias} (%{distver})"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/ports/$DIST_ARCH/update/%{distsub}"
alias="update-tumbleweed"
name="%{alias}"
enabled="true"
autorefresh="true"/>
</repoindex>
07070100000009000081A400000000000000000000000163E4E1D8000003E8000000000000000000000000000000000000004200000000openSUSE-repos-20230209.87a5e9e/opensuse-tumbleweed-repoindex.xml<repoindex ttl="0"
disturl="https://download.opensuse.org"
distsub="tumbleweed/"
debugenable="false"
sourceenable="false">
<repo url="%{disturl}/%{distsub}/repo/oss"
alias="repo-oss"
name="%{alias}"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/debug/%{distsub}/repo/oss"
alias="repo-oss-debug"
name="%{alias}"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/source/%{distsub}/repo/oss"
alias="repo-oss-source"
name="%{alias}"
enabled="false"
autorefresh="true"/>
<repo url="%{disturl}/%{distsub}/repo/non-oss"
alias="repo-non-oss"
name="%{alias}"
enabled="true"
autorefresh="true"/>
<repo url="http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed"
alias="repo-openh264"
name="%{alias}"
enabled="true"
autorefresh="true"/>
<repo url="%{disturl}/update/%{distsub}"
alias="update-tumbleweed"
name="%{alias}"
enabled="true"
autorefresh="true"/>
</repoindex>
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!37 blocks