[git-buildpackage] Configuring git-buildpackage to include files ignored by git

Mohammed Amar-Bensaber renken at shione.net
Mon Aug 26 22:48:44 CEST 2024


Hello,

I wish to package host-specific package configuration using git-buildpackage 
such as nginx, wireguard, nftables... etc. While git-buildpackage works really 
well, it seems to not allow the possibility to create non-reproducible 
packages i.e., packages that include secret files that are not tracked by git.

Here's an example describing the current behavior.

```console
$ cd repo
$ git init .
$ # Populate the repository
$ cat debian/gbp.conf         
[DEFAULT]
upstream-tag=v%(version)s
upstream-branch=debian/bookworm
debian-branch=debian/bookworm

[buildpackage]
export-dir = ../build-area
$ ls
debian files
$ cat debian/wireguard-config.install
files/etc/wireguard /etc
$ cat .gitignore
files/etc/wireguard
$ gbp buildpackage
...
   dh_prep
   dh_install
dh_install: warning: Cannot find (any matches for) "files/etc/wireguard" (tried 
in ., debian/tmp)

dh_install: warning: wireguard-config missing files: files/etc/wireguard
dh_install: error: missing files, aborting
make: *** [debian/rules:4: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 
2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i -I failed
gbp:error: 'debuild -i -I' failed: it exited with 29
```

Would it be possible to add this feature to `git-buildpackage`? While it does 
seem counter-intuitive to a tool essentially based on git, `git-buildpackage` 
offers a lot of QoL improvements that makes me believe modifying its behavior 
would be more beneficial compared to using other alternatives. 

I'd also appreciate any indications/hints on what to modify to implement this 
feature if it's not already the case.

Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.sigxcpu.org/pipermail/git-buildpackage/attachments/20240826/b6f88caf/attachment.sig>


More information about the git-buildpackage mailing list