github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/contrib/containers-common/containers-common.spec.in (about) 1 # Below definitions are used to deliver config files from a particular branch 2 # of c/image, c/common, c/storage vendored in all of Buildah, Podman and Skopeo. 3 # These vendored components must have the same version. If it is not the case, 4 # pick the oldest version on c/image, c/common, c/storage vendored in 5 # Buildah/Podman/Skopeo. 6 %global skopeo_branch main 7 %global image_branch IMAGE_BRANCH 8 %global common_branch COMMON_BRANCH 9 %global storage_branch STORAGE_BRANCH 10 %global shortnames_branch main 11 12 %global github_containers https://raw.githubusercontent.com/containers 13 14 Epoch: 4 15 Name: containers-common 16 Version: COMMON_BRANCH 17 Release: %autorelease 18 Summary: Common configuration and documentation for containers 19 License: ASL 2.0 20 BuildArch: noarch 21 BuildRequires: go-md2man 22 Provides: skopeo-containers = %{epoch}:%{version}-%{release} 23 Requires: (container-selinux >= 2:2.162.1 if selinux-policy) 24 Requires: oci-runtime 25 Requires: container-network-stack 26 Recommends: netavark 27 Recommends: fuse-overlayfs 28 Recommends: slirp4netns 29 Source1: %{github_containers}/common/%{common_branch}/docs/containers.conf.5.md 30 Source2: %{github_containers}/common/%{common_branch}/pkg/config/containers.conf 31 Source3: %{github_containers}/common/%{common_branch}/pkg/seccomp/seccomp.json 32 Source4: %{github_containers}/common/%{common_branch}/pkg/subscriptions/mounts.conf 33 Source5: %{github_containers}/image/%{image_branch}/docs/containers-auth.json.5.md 34 Source6: %{github_containers}/image/%{image_branch}/docs/containers-certs.d.5.md 35 Source7: %{github_containers}/image/%{image_branch}/docs/containers-policy.json.5.md 36 Source8: %{github_containers}/image/%{image_branch}/docs/containers-registries.conf.5.md 37 Source9: %{github_containers}/image/%{image_branch}/docs/containers-registries.conf.d.5.md 38 Source10: %{github_containers}/image/%{image_branch}/docs/containers-registries.d.5.md 39 Source11: %{github_containers}/image/%{image_branch}/docs/containers-signature.5.md 40 Source12: %{github_containers}/image/%{image_branch}/docs/containers-transports.5.md 41 Source13: %{github_containers}/image/%{image_branch}/registries.conf 42 Source14: %{github_containers}/common/%{common_branch}/docs/containers-mounts.conf.5.md 43 Source15: %{github_containers}/shortnames/%{shortnames_branch}/shortnames.conf 44 Source16: %{github_containers}/skopeo/%{skopeo_branch}/default.yaml 45 Source17: %{github_containers}/skopeo/%{skopeo_branch}/default-policy.json 46 Source18: %{github_containers}/storage/%{storage_branch}/docs/containers-storage.conf.5.md 47 Source19: %{github_containers}/storage/%{storage_branch}/storage.conf 48 Source20: RPM-GPG-KEY-redhat-release 49 Source21: registry.access.redhat.com.yaml 50 Source22: registry.redhat.io.yaml 51 Source23: %{github_containers}/common/%{common_branch}/docs/Containerfile.5.md 52 Source24: %{github_containers}/common/%{common_branch}/docs/containerignore.5.md 53 Source25: %{github_containers}/common/%{common_branch}/docs/links/.containerignore.5 54 55 %description 56 This package contains common configuration files and documentation for container 57 tools ecosystem, such as Podman, Buildah and Skopeo. 58 59 It is required because the most of configuration files and docs come from projects 60 which are vendored into Podman, Buildah, Skopeo, etc. but they are not packaged 61 separately. 62 63 %prep 64 cp %{SOURCE1} . 65 cp %{SOURCE2} . 66 cp %{SOURCE3} . 67 cp %{SOURCE4} . 68 cp %{SOURCE5} . 69 cp %{SOURCE6} . 70 cp %{SOURCE7} . 71 cp %{SOURCE8} . 72 cp %{SOURCE9} . 73 cp %{SOURCE10} . 74 cp %{SOURCE11} . 75 cp %{SOURCE12} . 76 cp %{SOURCE13} . 77 cp %{SOURCE14} . 78 cp %{SOURCE15} 000-shortnames.conf 79 cp %{SOURCE16} . 80 cp %{SOURCE17} policy.json 81 cp %{SOURCE18} . 82 cp %{SOURCE19} . 83 cp %{SOURCE20} . 84 cp %{SOURCE21} . 85 cp %{SOURCE22} . 86 cp %{SOURCE23} . 87 cp %{SOURCE24} . 88 cp %{SOURCE25} . 89 90 %build 91 mkdir -p man5 92 for FILE in $(ls *.5.md); do 93 go-md2man -in $FILE -out man5/$(basename $FILE .md) 94 done 95 96 cp man5/containerignore.5 man5/.containerignore.5 97 98 %install 99 # install config and policy files for registries 100 install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d} 101 install -dp %{buildroot}%{_sharedstatedir}/containers/sigstore 102 install -Dp -m0644 default.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d 103 install -Dp -m0644 storage.conf -t %{buildroot}%{_datadir}/containers 104 install -Dp -m0644 registries.conf -t %{buildroot}%{_sysconfdir}/containers 105 install -Dp -m0644 000-shortnames.conf -t %{buildroot}%{_sysconfdir}/containers/registries.conf.d 106 install -Dp -m0644 policy.json -t %{buildroot}%{_sysconfdir}/containers 107 install -Dp -m0644 RPM-GPG-KEY-redhat-release -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg 108 install -Dp -m0644 registry.access.redhat.com.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d 109 install -Dp -m0644 registry.redhat.io.yaml -t %{buildroot}%{_sysconfdir}/containers/registries.d 110 111 # install manpages 112 for FILE in $(ls -a man5 | grep 5); do 113 install -Dp -m0644 man5/$FILE -t %{buildroot}%{_mandir}/man5 114 done 115 116 # install config files for mounts, containers and seccomp 117 install -m0644 mounts.conf %{buildroot}%{_datadir}/containers/mounts.conf 118 install -m0644 seccomp.json %{buildroot}%{_datadir}/containers/seccomp.json 119 install -m0644 containers.conf %{buildroot}%{_datadir}/containers/containers.conf 120 121 # install secrets patch directory 122 install -d -p -m 755 %{buildroot}/%{_datadir}/rhel/secrets 123 # rhbz#1110876 - update symlinks for subscription management 124 ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement 125 ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm 126 ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo 127 128 %post 129 if [[ ! -f %{_mandir}/man5/Dockerfile.5.gz ]]; then 130 echo .so %{_mandir}/man5/Containerfile.5 > %{_mandir}/man5/Dockerfile.5 131 gzip %{_mandir}/man5/Dockerfile.5 132 fi 133 if [[ ! -f %{_mandir}/man5/dockerignore.5.gz ]]; then 134 echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/dockerignore.5 135 gzip %{_mandir}/man5/dockerignore.5 136 fi 137 if [[ ! -f %{_mandir}/man5/.dockerignore.5.gz ]]; then 138 echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/.dockerignore.5 139 gzip %{_mandir}/man5/.dockerignore.5 140 fi 141 142 %files 143 %dir %{_sysconfdir}/containers 144 %dir %{_sysconfdir}/containers/certs.d 145 %dir %{_sysconfdir}/containers/oci 146 %dir %{_sysconfdir}/containers/oci/hooks.d 147 %dir %{_sysconfdir}/containers/registries.conf.d 148 %dir %{_sysconfdir}/containers/registries.d 149 %config(noreplace) %{_sysconfdir}/containers/policy.json 150 %config(noreplace) %{_sysconfdir}/containers/registries.conf 151 %config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf 152 %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 153 %config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml 154 %{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml 155 %{_sysconfdir}/containers/registries.d/registry.access.redhat.com.yaml 156 %ghost %{_sysconfdir}/containers/storage.conf 157 %ghost %{_sysconfdir}/containers/containers.conf 158 %dir %{_sharedstatedir}/containers/sigstore 159 %ghost %{_mandir}/man5/Dockerfile.5.gz 160 %ghost %{_mandir}/man5/dockerignore.5.gz 161 %ghost %{_mandir}/man5/.dockerignore.5.gz 162 %{_mandir}/man5/Containerfile.5.gz 163 %{_mandir}/man5/containerignore.5.gz 164 %{_mandir}/man5/.containerignore.5.gz 165 %{_mandir}/man5/containers*.5.gz 166 %dir %{_datadir}/containers 167 %{_datadir}/containers/storage.conf 168 %{_datadir}/containers/containers.conf 169 %{_datadir}/containers/mounts.conf 170 %{_datadir}/containers/seccomp.json 171 %dir %{_datadir}/rhel/secrets 172 %{_datadir}/rhel/secrets/* 173 174 %changelog 175 %autochangelog