[gnutls-devel] GnuTLS | Use packit to automate fedora upstream release (!1575)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Mon Apr 25 21:58:12 CEST 2022




Daiki Ueno started a new discussion on .packit.yaml: https://gitlab.com/gnutls/gnutls/-/merge_requests/1575#note_923416438

> +
> +upstream_project_url: https://gitlab.com/gnutls/gnutls
> +upstream_package_name: gnutls
> +downstream_package_name: gnutls
> +
> +actions:
> +  post-upstream-clone:
> +    - "wget https://src.fedoraproject.org/rpms/gnutls/raw/main/f/gnutls.spec"
> +    - "wget https://src.fedoraproject.org/rpms/gnutls/raw/main/f/gnutls-3.2.7-rpath.patch"
> +    - "wget https://src.fedoraproject.org/rpms/gnutls/raw/main/f/gnutls-3.6.7-no-now-guile.patch"
> +  get-current-version:
> +    - "git describe --abbrev=0"
> +  create-archive:
> +    - bash -c "export gnutls_short_version=$(echo $PACKIT_PROJECT_VERSION | grep -m1 -o \"[0-9]*\.[0-9]*\" | head -1) &&
> +      wget https://www.gnupg.org/ftp/gcrypt/gnutls/v${gnutls_short_version}/gnutls-${PACKIT_PROJECT_VERSION}.tar.xz &&
> +      wget https://www.gnupg.org/ftp/gcrypt/gnutls/v${gnutls_short_version}/gnutls-${PACKIT_PROJECT_VERSION}.tar.xz.sig"

OK, sorry, my suggestion to remove `bash -c` was wrong: according to the packit [documentation](https://packit.dev/docs/actions/), anything that requires shell feature needs to be wrapped with `bash -c`.

One minor thing I would suggest is to use `expr STRING : REGEXP` to calculate the short version, something like:
```yaml
- bash -c "wget https://www.gnupg.org/ftp/gcrypt/gnutls/v$(expr $PACKIT_PROJECT_VERSION : '^\([0-9]*\.[0-9]*\)').tar.xz"
- bash -c "wget https://www.gnupg.org/ftp/gcrypt/gnutls/v$(expr $PACKIT_PROJECT_VERSION : '^\([0-9]*\.[0-9]*\)').tar.xz.sig"
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1575#note_923416438
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220425/08582012/attachment-0001.html>


More information about the Gnutls-devel mailing list