[Debian-iot-maintainers] RFS: ocf-spec-core

Carsten Schoenert c.schoenert at t-online.de
Sun Mar 8 19:25:20 GMT 2020


Hello David,

Am 08.03.20 um 19:21 schrieb David Suarez:
> Ping ...
> 
> El dom., 23 feb. 2020 20:19, David Suarez <david.sephirot at gmail.com>
> escribió:
> 
>> Hi,
>>
>> I just uploaded the ocf-spec-core core package to salsa.d.o. [0]
>>
>> The release in changelog is marked as UNRELEASED (I dunno if team
>> prefers to points to upload distribution before review).

it's up to you as maintainer how you handle this. There is no strict
policy about this. You just need to ensure that you do not accidentally
upload a version which should have get uploaded. ;)

This can be done by using UNRELEASED here (the DAK would reject such an
upload) or you just keep care to create the new changelog entry right
before you planning to do an upload.

As you have chosen git-buildpackage as helper around the packaging I'd
suggest to do the creation of the final changelog entry by also using
git-buildpackage. I've normally do this:

  $ gbp dch -aR

The options you using are the same if you would just use dch, gbp is
just a wrapper around this.

You can add the following lines to gbp.conf, so gbp will add then also
the various commit IDs to the changelog entries.

> [dch]
> id-length = 7

Have a look at other used configure options in gbp.conf files in the
debian/ folder.

>> For installing the swagger specs I stick to
>> '/usr/share/ofc/datamodels' dir. The next related packages of
>> specifications will install them on it.

That's fine for now.

>> I enabled the gitlab CI using the configuration provided by salsa-ci-team

Some more specific things.

You have added an override for dh_auto_install but you basically run
just a copy call here. This isn't needed as we have sequencer files that
do this, they are needed to be named [binary-package-name].install. So
instead of having a copy call in debian/rules you should use the
.install file here. For this package here you would need just one line
now. The required folder(s) will get created automatically.

> $ cat debian/ocf-spec-core.install 
> swagger2.0/*.swagger.json usr/share/ofc/datamodels

Doing this the override in d/rules is now only containing the chmod
command. And yes, this is somehow needed. But not in the dh_auto_install
step. For fixing permissions there is the helper dh_fixperms used.

But one more thing you need to have in mind here. Some shells on other
platforms can't handle the wildcard sign * and your package would
getting FTBFS than, so you will need to do this differently. Using find
will work on all platforms, so I'd do it this way finally.

> diff --git a/debian/rules b/debian/rules
> index be0389a..2ab173c 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -7,7 +7,6 @@
>  %:
>         dh $@
>  
> -override_dh_auto_install:
> -       mkdir -p debian/ocf-spec-core/usr/share/ofc/datamodels
> -       cp -a swagger2.0/*.swagger.json debian/ocf-spec-core/usr/share/ofc/datamodels
> -       chmod ugo-x swagger2.0/*.swagger.json debian/ocf-spec-core/usr/share/ofc/datamodels/*
> +override_dh_fixperms:
> +       dh_fixperms
> +       find debian/ocf-spec-core/usr/share/ofc/datamodels -type f -exec chmod 644 {} \;

And one more generic suggestion, I'd like to point to DEP 14. Maybe you
already know about this.

https://dep-team.pages.debian.net/deps/dep14/

Consider a branch renaming from master to debian/sid. No package upload
did happen yet so it's easy now to squash existing data and do a clean
new upload if you agree. If you have problems doing this I can help out
here of course.

-- 
Regards
Carsten Schoenert



More information about the Debian-iot-maintainers mailing list