David Runge pushed to branch main at Arch Linux / Packaging / Packages / cri-o


Commits:
4ccc5133 by Sohrab Behdani at 2025-10-27T22:02:10+01:00
Fix CNI plugin directory path in CRI-O packaging

The CRI-O package was configured to use `/usr/lib/cni/bin` instead of 
`/opt/cni/bin`,
which can cause CRI-O to fail to find plugins installed in the default CNI 
location.
This patch adjusts the configuration to match Arch Linux’s packaging 
conventions.

Fixes https://gitlab.archlinux.org/archlinux/packaging/packages/cri-o/-/issues/5

- - - - -


3 changed files:

- .SRCINFO
- + 00-plugins-path.conf
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -29,15 +29,19 @@ pkgbase = cri-o
        options = !lto
        options = emptydirs
        backup = etc/crio/crio.conf
+       backup = etc/crio/crio.conf.d/00-plugins-path.conf
        source = 
cri-o-1.34.1.tar.gz::https://github.com/cri-o/cri-o/archive/v1.34.1.tar.gz
        source = modules-cri-o.conf
        source = sysctl-cri-o.conf
+       source = 00-plugins-path.conf
        sha512sums = 
d56af52b61778245853dbfca5d43e3f9a61a374683fdb7fbf4a1a2e334adac4816a867710f562393e5cbaae876714303c84f1abb77efe2cad1e963afb56656a6
        sha512sums = 
85ee1310cb36c85c42b4068a9549a3ef72b856cd61b2c1036c3e871ef43a69ed80b43599ad94ce5b069ddd823e730596bb3d3875d4ba8cd77c4cc1985335ffff
        sha512sums = 
fbcc3c29d5d3dedf56ea96577dec50cb2656b4a22f5a82bf2d600ae20c6b113d35d5db116bac5520398d47a22d40835f56b86433c5713924060e1a7018d297ec
+       sha512sums = 
cf68692463d72e5ca5c66417bab8b3d52792b44ddbfb8de7175f21ac41ccdd262b2761515120bc4a1100f471c42b6158f24ca629a2ac63fa6dbd1699a27de7cc
        b2sums = 
457c7d8e45fa02e83c96dc4bba3cd82b15a925aeea24db1b56968fa13b4384356e50203aaff8c02f234b47de7a36f8eec956379347830cec1a53f1ec1f131c85
        b2sums = 
2771c64b45876d728fc139aa90754df8aadb07e14a7e1126a1488dfcbad7ebcbca923cb0230c4b87acdc6dad8243af2ad06ef4ce587d5c71fc200e40835d8b8d
        b2sums = 
c8a2133df6575c54eb9bd0a89a0c6c764c0cd456bff7338c4a2e1ef4f70a5a778d5a05c335fcf2491ed55e15fc36c677853c0bc8ab66d673f1950fa2c7695f6e
+       b2sums = 
d0ba7dc9fac6909c5d12e705a26597691b3fa5c7358e274eca440b386dba23cbfaa1495c6611f47d433e248fc4a0843f3890af448662e2f6d60c940d4591bcab
 
 pkgname = cri-o
        depends = cni-plugins


=====================================
00-plugins-path.conf
=====================================
@@ -0,0 +1,2 @@
+[crio.network]
+plugin_dirs = ["/opt/cni/bin", "/usr/lib/cni/bin"]


=====================================
PKGBUILD
=====================================
@@ -39,6 +39,7 @@ optdepends=(
 provides=(container-runtime)
 backup=(
   etc/crio/crio.conf
+  etc/crio/crio.conf.d/00-plugins-path.conf
 )
 options=(
   !lto  # With LTO the resulting package is not reproducible (but we want full 
RELRO and PIE)
@@ -49,13 +50,16 @@ source=(
   
$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
   modules-$pkgname.conf
   sysctl-$pkgname.conf
+  00-plugins-path.conf
 )
 
sha512sums=('d56af52b61778245853dbfca5d43e3f9a61a374683fdb7fbf4a1a2e334adac4816a867710f562393e5cbaae876714303c84f1abb77efe2cad1e963afb56656a6'
             
'85ee1310cb36c85c42b4068a9549a3ef72b856cd61b2c1036c3e871ef43a69ed80b43599ad94ce5b069ddd823e730596bb3d3875d4ba8cd77c4cc1985335ffff'
-            
'fbcc3c29d5d3dedf56ea96577dec50cb2656b4a22f5a82bf2d600ae20c6b113d35d5db116bac5520398d47a22d40835f56b86433c5713924060e1a7018d297ec')
+            
'fbcc3c29d5d3dedf56ea96577dec50cb2656b4a22f5a82bf2d600ae20c6b113d35d5db116bac5520398d47a22d40835f56b86433c5713924060e1a7018d297ec'
+            
'cf68692463d72e5ca5c66417bab8b3d52792b44ddbfb8de7175f21ac41ccdd262b2761515120bc4a1100f471c42b6158f24ca629a2ac63fa6dbd1699a27de7cc')
 
b2sums=('457c7d8e45fa02e83c96dc4bba3cd82b15a925aeea24db1b56968fa13b4384356e50203aaff8c02f234b47de7a36f8eec956379347830cec1a53f1ec1f131c85'
         
'2771c64b45876d728fc139aa90754df8aadb07e14a7e1126a1488dfcbad7ebcbca923cb0230c4b87acdc6dad8243af2ad06ef4ce587d5c71fc200e40835d8b8d'
-        
'c8a2133df6575c54eb9bd0a89a0c6c764c0cd456bff7338c4a2e1ef4f70a5a778d5a05c335fcf2491ed55e15fc36c677853c0bc8ab66d673f1950fa2c7695f6e')
+        
'c8a2133df6575c54eb9bd0a89a0c6c764c0cd456bff7338c4a2e1ef4f70a5a778d5a05c335fcf2491ed55e15fc36c677853c0bc8ab66d673f1950fa2c7695f6e'
+        
'd0ba7dc9fac6909c5d12e705a26597691b3fa5c7358e274eca440b386dba23cbfaa1495c6611f47d433e248fc4a0843f3890af448662e2f6d60c940d4591bcab')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -66,8 +70,6 @@ prepare() {
       vendor/github.com/containers/conmon/runner/config/config_unix.go
   # make sure that /usr/bin is used in systemd units
   sed -e 's|/usr/local|/usr|g' -i contrib/systemd/*.service
-  # set the correct default PATH for cni-plugins
-  sed -e 's|/opt/cni/bin/|/usr/lib/cni/|g' -i pkg/config/config_unix.go
 }
 
 build() {
@@ -98,6 +100,8 @@ package() {
   install -vDm 644 ../modules-$pkgname.conf 
"$pkgdir/usr/lib/modules-load.d/cri-o.conf"
   # sysctl
   install -vDm 644 ../sysctl-$pkgname.conf 
"$pkgdir/usr/lib/sysctl.d/90-cri-o.conf"
+  # Dropin config for CNI plugins
+  install -vDm 644 ../00-plugins-path.conf -t 
"$pkgdir/etc/crio/crio.conf.d/00-plugins-path.conf"
   # docs
   install -vDm 644 -t "$pkgdir/usr/share/doc/$pkgname/" \
     {CONTRIBUTING,README,awesome,code-of-conduct,install,transfer,tutorial}.md



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/cri-o/-/commit/4ccc5133140ae6fe417c4267b86a7d2a35954ccd

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/cri-o/-/commit/4ccc5133140ae6fe417c4267b86a7d2a35954ccd
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to