Re: groff 1.24.1 has a race condition in the install target

"G. Branden Robinson" <[email protected]> Sun, 10 May 2026 08:25:53 -0500
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260510132553.4ssb6m73lwohh5f2@illithid>
Hi Santiago,

At 2026-05-10T14:55:36+0200, Santiago Vila wrote:
> While building (the Debian package of) groff 1.24.1 in a Debian
> unstable chroot, I got this error:
> 
>  /usr/bin/install -c -m 644 ../../tmac/tty.tmac ../../tmac/tty-char.tmac '/<<PKGBUILDDIR>>/debian/tmp/usr/share/groff/1.24.1/tmac'
>  /usr/bin/install -c -m 644 ../../tmac/tty.tmac ../../tmac/tty-char.tmac '/<<PKGBUILDDIR>>/debian/tmp/usr/share/groff/1.24.1/tmac'
> install: cannot create regular file '/<<PKGBUILDDIR>>/debian/tmp/usr/share/groff/1.24.1/tmac/tty.tmac': File exists
> 
> Seems like a race condition to me, where one "install -c" tries to
> work at the same time the other is *still* writing to the same file.

Hmm, yeah, looks that way.  I envy the number of cores you must have. :)

(On the other hand, my build-helper scripts don't run the "install"
target with "-j"...maybe they should start.)

> I believe this is the origin of those two threads:
> 
> - Target dist_grottytmac_DATA in src/devices/grotty/grotty.am lines 26-30 (unconditional)
> - Target dist_gxditviewtmac_DATA in src/devices/xditview/xditview.am lines 63-67 (conditional)
> 
> So I guess one of the two should be dropped.

I'll look into this, but yes, if that's right then it's the latter that
should go.  "tty-char.tmac" is not (g)xditview's business.  It's
grotty(1)'s.

Thanks for the report!

Regards,
Branden
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmoAh1cACgkQ0Z6cfXEm
bc64Pw//WDgGYxu3ZR0C5sNAFeqOTOAkOGTvI0qpNcYgm2ecRAn5V8qIuaU6Tb3w
F32jNaF92MfIaNOe6gHU4M/zgtfnAcZbGaFhH8OENtAi0XYRY7m2emoTHYNSWEj0
MdB+PqhkvYR8acfo1WWCLqb5JcN5yA10mFSsGsCAtWQMGpoBWGpsJoG5TqGfTne/
lvHrQ10o33X+7eCkJc8Nz4sYjohWHU/rs4PUpjTMW0JnmHzsV3jN8ubbJeWS/o3A
6wgDhYtFfnG2VY0Xg/ExMGXpJY1GqPgWYBsf7To+FdzneP06C83Q8qmJ3kkvAMEC
62bP5FetrZ8kf6BeMtzmlBTae2ReW1gqKh6+LPk7HOkV8HMaza1weaa5OTGyIXyd
h2LzG7/KdvyUwzQC238kHkyIoWrqoGIrnS14FgLtftJ+U4rMr6TT8OCOcXvpPkHC
6CpuPcCeMUf/7IWNPdz+MvIU/UpjUNrDNc7VDwzOAfKCSIrtq853B8UAXIXqJ+Qq
RGIdrdhzWAalCC7zianWmp9XFsAnjguz1uMUP+2+/+1KH4W3PN2rX68YabPg4Cdf
OuSDRVjHbWfuzHepQE1uMBpOyKnLulsTMwaUm/y7FCXaVw0hQWM6QdBhXObRdtLV
LHwMM8ud191/dSTR4rQLvKP1RvQCikDBEzW0N9MKRvAig1VWCkw=
=rOSy
-----END PGP SIGNATURE-----