Eric Blake
2021-Nov-08 19:46 UTC
[Libguestfs] [PATCH libnbd 1/2] golang: Create distribution for a proxy server
On Sun, Nov 07, 2021 at 06:35:50PM +0200, Nir Soffer wrote:> Add make-dist.sh script, creating a distribution tree for a proxy > server[1]. The created tree must be served by the web server serving the > libnbd module, for example: > > https://download.libguestfs.org/libnbd-golang >...> +echo "{\"Version\": \"$version\"}" > $module_dir/@latest > +echo "{\"Version\": \"$version\"}" > $v_dir/$version.info > + > +# This is not entirely corect. This file should have a list of allcorrect> +# version avaialable, here we create only single version. This shouldversions available> +# really be done on the server by appending the new version to the list > +# file. > +echo $version > $v_dir/listWould using >> instead of > work, or would it risk creating a list that has too many (potentially duplicate) entries?> + > +cp go.mod $v_dir/$version.mod > +mv $version.zip $v_dir > + > +# Create tarball to upload and extract on the webserver. It should be > +# extracted in the directory pointed by the "go-import" meta tag. > +tar cvzf libnbd-golang-$version.tar.gz libguestfs.org > + > +rm -rf libguestfs.org > -- > 2.31.1 >-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Nir Soffer
2021-Nov-08 19:55 UTC
[Libguestfs] [PATCH libnbd 1/2] golang: Create distribution for a proxy server
On Mon, Nov 8, 2021 at 9:46 PM Eric Blake <eblake at redhat.com> wrote:> > On Sun, Nov 07, 2021 at 06:35:50PM +0200, Nir Soffer wrote: > > Add make-dist.sh script, creating a distribution tree for a proxy > > server[1]. The created tree must be served by the web server serving the > > libnbd module, for example: > > > > https://download.libguestfs.org/libnbd-golang > > > ... > > +echo "{\"Version\": \"$version\"}" > $module_dir/@latest > > +echo "{\"Version\": \"$version\"}" > $v_dir/$version.info > > + > > +# This is not entirely corect. This file should have a list of all > > correct > > > +# version avaialable, here we create only single version. This should > > versions availableThis is already pushed with the errors, but it is removed by: https://listman.redhat.com/archives/libguestfs/2021-November/msg00084.html> > +# really be done on the server by appending the new version to the list > > +# file. > > +echo $version > $v_dir/list > > Would using >> instead of > work, or would it risk creating a list > that has too many (potentially duplicate) entries?Yes >> is the right way, but this cannot work in build time. If must done on the server so it will include all the version published by the server. In general old versions should never be deleted from the server, in case someone pinned a project to a specific version. Looking in https://download.libguestfs.org/libnbd/, I don't think we have any issue with keeping all published versions. Nir