[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging git submodule as multi upstream tarballs?



Hi Ryan,

On Wed, Jun 21, 2023 at 03:07:24PM -0500, Ryan Pavlik wrote:
> I'm not sure if uscan can do it, 

I did get it working but it's exceedingly cludgy. I have to use mode=git
for the second component since uscan can't just download master.tar.gz
AFACT (it's at a static location not linked from a page). I also have to
set the version to "ignore" instead of "same" as the generated git commit
based version is obviously not going to match the main project tag.

Further I have to disable the uupdate hook since 1) it would have to be
attached to the second component to work properly but 2) it gets passed the
generated git version which again doesn't match the main tarball so it
barfs as it can't find the orig.tar.

What a mess.

So I have this now:

    version=4
    opts=filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%,\
        https://github.com/YosysHQ/prjtrellis/tags \
        (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian
    
    opts=mode=git,\
    component=database \
    https://github.com/YosysHQ/prjtrellis-db.git \
    HEAD ignore


> but for meshlab, as they don't tag the submodule when they release the
> main project, I have a script that updates the submodule commit using the
> github API. It's more clunky than I'd like, but I am not sure exactly how
> to fix this. It parses the version out of debian/changelog to find the
> main repo revision.
> https://salsa.debian.org/science-team/meshlab/-/blob/master/debian/get-orig-source.sh

I was looking for an API endpoint to get the submodule commit actually,
this way at least I don't have to do a temp clone just to get it. This is
super useful, thanks!

--Daniel


Reply to: