threads / discuss / 55110

[rfh] where is coccinelle these days on Ubuntu?

Subject: [rfh] where is coccinelle these days on Ubuntu?

## tl;dr

5 messages between Feb 5, 2021 and Feb 10, 2021.

replies: 4people: 2as markdown or json

Junio C Hamano· Feb 5, 2021, 01:34 UTC · lore

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
Taylor Blau· Feb 5, 2021, 01:53 UTC · re: Junio C Hamano · lore

Re: [rfh] where is coccinelle these days on Ubuntu?

On Thu, Feb 04, 2021 at 05:34:42PM -0800, Junio C Hamano wrote:
Show 5 quoted lines
> 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.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 ci/install-dependencies.sh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 0b1184e04a..0350538d52 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -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
Junio C Hamano· Feb 6, 2021, 18:49 UTC · re: Taylor Blau · lore

Re: [rfh] where is coccinelle these days on Ubuntu?

Taylor Blau <me@ttaylorr.com> writes:
Show 5 quoted lines
> 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...
Taylor Blau· Feb 8, 2021, 21:22 UTC · re: Junio C Hamano · lore

Re: [rfh] where is coccinelle these days on Ubuntu?

On Sat, Feb 06, 2021 at 10:49:08AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> > 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.

Show 5 quoted 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
> 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
Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f6885e88ee..a3fbbe6398 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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
Junio C Hamano· Feb 10, 2021, 00:12 UTC · re: Taylor Blau · lore

Re: [rfh] where is coccinelle these days on Ubuntu?

Taylor Blau <me@ttaylorr.com> writes:
Show 5 quoted lines
> 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'.

← back to recent threads