Skip to contentSkip to conversation

where is coccinelle these days on Ubuntu?

rfh Junio C Hamano 2 participants 5 messages Feb 5, 2021 – Feb 10, 2021

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Junio C Hamano

This is probably something that is very obvious for GitHub folks or a debian person, but does anybody know what made it suddenly wrong that we have been doing to obtain coccinelle?

https://github.com/git/git/runs/1835560289?check_suite_focus=true#step:3:108

Not obvious to me, but I did happen to notice it last night when waiting on some workflows to finish on ttaylorr/git.

From a quick search, it looks like coccinelle was moved to the "universe" repository, at least in the Azure mirrors (which is what GitHub Actions uses):

http://azure.archive.ubuntu.com/ubuntu/pool/universe/c/coccinelle/

I just pushed the patch below the scissors line to my fork, and I'll watch the static analysis build to see if it works again:

    https://github.com/ttaylorr/git/actions/runs/539049631

--- >8 ---

Subject: [PATCH] ci/install-dependencies.sh: install coccinelle from universe

The apt package "coccinelle" moved to the universe repository in the package mirrors that are used by GitHub Actions. This causes coccinelle to be reported as missing, since it is no longer available in the main repository.

Since universe isn't sourced by default, add it as an apt repository before updating and installing coccinelle.

---
 ci/install-dependencies.sh | 1 +
 1 file changed, 1 insertion(+)
ci/install-dependencies.sh +1 -0
index 0b1184e04a..0350538d52 100755
@@ -61,6 +61,7 @@ osx-clang|osx-gcc)
 	esac
 	;;
 StaticAnalysis)
+	sudo add-apt-repository universe
 	sudo apt-get -q update
 	sudo apt-get -q -y install coccinelle libcurl4-openssl-dev libssl-dev \
 		libexpat-dev gettext make

--
2.30.0.667.g81c0cbc6fd

#2 lore raw
Quoted 5 lines · Taylor Blau

From a quick search, it looks like coccinelle was moved to the "universe" repository, at least in the Azure mirrors (which is what GitHub Actions uses):

http://azure.archive.ubuntu.com/ubuntu/pool/universe/c/coccinelle/

Unfortunately the pool/ system does not tell us which suite a package is available in (that's the whole point of it, as it lets them share the packages across suites without moving things around).

Looking for the package availability

https://packages.ubuntu.com/search?keywords=coccinelle

seems to tell me about these:

xenial (16.04LTS) (devel): semantic patching tool for C [universe] 1.0.4.deb-2: amd64 arm64 armhf i386 powerpc ppc64el s390x

bionic (18.04LTS) (devel): semantic patching tool for C [universe] 1.0.4.deb-3build4: amd64 arm64 armhf i386 ppc64el s390x

groovy (20.10) (devel): semantic patching tool for C [universe] 1.0.8.deb-4: amd64 arm64 armhf ppc64el s390x

hirsute (devel): semantic patching tool for C [universe] 1.0.8.deb-5build1: amd64 arm64 armhf ppc64el s390x

but it does not seem to produce hits in any of the [focal], [focal-updates], and [focal-backports] suites, which the actions thing seem to be using X-<.

Hmph...

#3 lore raw
Quoted 11 lines · Junio C Hamano
Quoted 5 lines · Taylor Blau

From a quick search, it looks like coccinelle was moved to the "universe" repository, at least in the Azure mirrors (which is what GitHub Actions uses):

http://azure.archive.ubuntu.com/ubuntu/pool/universe/c/coccinelle/

Unfortunately the pool/ system does not tell us which suite a package is available in (that's the whole point of it, as it lets them share the packages across suites without moving things around).

OK. I'm learning about this as I go, so this is helpful to know it's not good practice to pin a specific suite.

Quoted 5 lines

Looking for the package availability

https://packages.ubuntu.com/search?keywords=coccinelle

seems to tell me about these:

It seems that there isn't a coccinelle package available for focal yet. That's odd, since (1) focal is a LTS release, and (2) there *is* a coccinelle package on groovy, which is newer than focal. Here's a piece of mail from the coccinelle list that says there's no release yet.

    https://systeme.lip6.fr/pipermail/cocci/2020-June/007768.html

Our static-analysis build runs on 'ubuntu-latest', which I understand is in the process of being upgraded from bionic to focal (I was pointed to
https://github.com/actions/virtual-environments/issues/1816 internally as a spot to learn more about this.)

Double checking the latest successful static-analysis build, indeed it was on 18.04:

    https://github.com/git/git/runs/1811069070?check_suite_focus=true
Quoted 1 line

Hmph...

So, I guess we could continue to run on 18.04 until there is a focal coccinelle. Below would be the way to do that...

Thanks,
Taylor

--- >8 ---

Subject: [PATCH] .github/workflows/main.yml: run static-analysis on bionic

GitHub Actions is transitioning workflow steps that run on 'ubuntu-latest' from 18.04 to 20.04 [1].

This works fine in all steps except the static-analysis one, since Coccinelle isn't available on Ubuntu focal (it is only available in the universe suite).

Until Coccinelle can be installed from 20.04's main suite, pin the static-analysis build to run on 18.04, where it can be installed by default.

[1]: https://github.com/actions/virtual-environments/issues/1816

---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/main.yml +1 -1
index f6885e88ee..a3fbbe6398 100644
@@ -340,7 +340,7 @@ jobs:
     if: needs.ci-config.outputs.enabled == 'yes'
     env:
       jobname: StaticAnalysis
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-18.04
     steps:
     - uses: actions/checkout@v1
     - run: ci/install-dependencies.sh

--
2.30.0.667.g81c0cbc6fd

#4 lore raw
Quoted 5 lines · Taylor Blau

So, I guess we could continue to run on 18.04 until there is a focal coccinelle. Below would be the way to do that...

Thanks,
Taylor

Thanks. Let's merge this down to 'next', 'master' and then to 'maint'.