Your message dated Wed, 17 Jun 2026 14:56:28 +0000
with message-id <[email protected]>
and subject line Bug#1138790: fixed in ucf 3.0054
has caused the Debian Bug report #1138790,
regarding why were ucf_helper_functions.sh removed?
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1138790: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1138790
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ucf
Version: 3.0053
Severity: minor
Hi,
in ucf (3.0044) unstable, you did:
Remove unused ucf_helper_functions.sh and examples/ChangeLog.
Why were ucf_helper_functions.sh removed from ucf? This is intended to
be used by ucf consumers such as aide (see #930130 when it was added).
In fact, the aide package has been using the code for a decade now.
The code was submitted to ucf by me a decade ago after being implemented
and tested inside aide. Since getting the code into the ucf package
proper already took years, and I wanted to be able to backport aide, I
kept aide using its own copy of the file.
When I was preparing aide to finally migrate to using the code from
inside ucf, I was somewhat surprised to see it removed again two years
ago.
Was it your intention to reduce ucf's usefulness, or you just not
understand what this code does when you did your first upload of ucf? I
am pretty sure that I submitted docs years ago, were they gone when you
reviewed the code? Since the aide package uses this, I can confirm the
code is not obsolete and is in perfect working order with ucf and could
be used in other packages had it not been removed.
I am attaching a current version of ucf_helper_functions.sh that is more
shellcheck compatible. Please consider adding the code again. It wil now
be another three or four release until aide can actually make use of the
file delivered with ucf_helper_functions.sh since at least trixie was
unfortunately released without.
It you have any questions about the code, please don't hesitate to get
in touch with me, the original author.
Greetings
Marc
-- System Information:
Debian Release: forky/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'oldstable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'),
(500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 7.0.10+deb14-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages ucf depends on:
ii debconf [debconf-2.0] 1.5.92
ii libtext-wrapi18n-perl 0.06-11
ii procps 2:4.0.4-9+b2
ii sensible-utils 0.0.26
ucf recommends no packages.
ucf suggests no packages.
-- debconf information excluded
#!/bin/bash
UCF="ucf --three-way --debconf-ok"
# rename ucf-conffile. This was mostly stolen from cacti.postinst after
# a short discussion on debian-mentors, see
# http://lists.debian.org/debian-mentors/2013/07/msg00027.html
# and the following thread. Thanks to Paul Gevers
rename_ucf_file() {
local oldname
local newname
# override UCF_FORCE_CONFFNEW with an empty local variable
local UCF_FORCE_CONFFNEW
oldname="$1"
newname="$2"
if [[ ! -e "${newname}" ]] ; then
if [[ -e "${oldname}" ]]; then
mv "${oldname}" "${newname}"
fi
# ucf doesn't offer a documented way to do this, so we need to
# peddle around with undocumented ucf internals.
sed -i "s|${oldname}|${newname}|" /var/lib/ucf/hashfile
ucfr --purge "${PKGNAME}" "${oldname}"
ucfr "${PKGNAME}" "${newname}"
# else: Don't do anything, leave old file in place
fi
ucfr "${PKGNAME}" "${newname}"
}
generate_directory_structure() {
local pkgdir
local locdir
pkgdir="$1"
locdir="$2"
# generate empty directory structure
(cd "${pkgdir}" && find . -type d -print0 ) | \
(cd "${locdir}" && xargs -0 mkdir -p --)
}
# handle a single ucf_conffile by first checking whether the file might be
# accociated with a different package. If so, we keep our hands off the file
# so that a different package can safely hijack our conffiles.
# to hijack a file, simply ucfr it to a package before the ucf processing
# code.
# If the file is either unassociated or already associated with us, call ucf
# proper and register the file as ours.
handle_single_ucf_file()
{
local pkgfile
local locfile
if [[ -n "${UCF_HELPER_FUNCTIONS_DEBUG:-}" ]]; then
set -x
fi
pkgfile="$1"
locfile="$2"
export DEBIAN_FRONTEND
PKG="$(ucfq --with-colons "${locdir}/${file}" | head -n 1 | cut
--delimiter=: --fields=2 )"
# skip conffile if it is associated with a different package.
# This allows other packages to safely hijack our conffiles.
if [[ -z "${PKG}" ]] || [[ "${PKG}" = "${PKGNAME}" ]]; then
${UCF} "${pkgfile}" "${locdir}/${file}"
ucfr "${PKGNAME}" "${locdir}/${file}"
fi
set +x
}
# checks whether a file was deleted in the package and handle it on the local
# system appropriately: If the local file differs from what we had previously,
# we just unregister it and leave it on the system (preserving local changes),
# otherwise we remove it.
# this also removes conffiles that are zero-size after the
# ucf run, which might happen if the local admin has
# deleted a conffile that has changed in the package.
handle_deleted_ucf_file()
{
local locfile
local locdir
local pkgdir
if [[ -n "${UCF_HELPER_FUNCTIONS_DEBUG:-}" ]]; then
set -x
fi
locfile="$1"
pkgdir="$2"
locdir="$3"
# compute the name of the reference file in $pkgdir
reffile="$(echo "${locfile}" | sed "s|${locdir}|${pkgdir}|")"
if ! [[ -e "${reffile}" ]]; then
# if the reference file does not exist, then it was removed in the
package
# do as if the file was replaced with an empty file
${UCF} /dev/null "${locfile}"
if [[ -s "${locfile}" ]]; then
# the file has non-zero size after the ucf run. local admin must
# have decided to keep the file with contents. Done here.
:
else
# the file has zero size and can be removed
# remove the file itself ('') and all possible backup/reference
extensions
for ext in '' '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist
.ucf-new .ucf-old .ucf-dist; do
rm -f "${locfile}${ext}"
done
fi
# unregister the file anyhow since the package doesn't know about it
any more
ucf --purge "${locfile}"
ucfr --purge "${PKGNAME}" "${locfile}"
fi
set +x
}
handle_all_ucf_files() {
local pkgdir
local locdir
pkgdir="$1"
locdir="$2"
generate_directory_structure "${pkgdir}" "${locdir}"
# handle regular ucf-conffiles by iterating through all conffiles
# that come with the package
for file in $(find "${pkgdir}" -type f -printf '%P\n' ); do
handle_single_ucf_file "${pkgdir}/${file}" "${locdir}/${file}"
done
# handle ucf-conffiles that were deleted in our package by iterating
# through all ucf-conffiles that are registered for the package
for locfile in $(ucfq --with-colons "${PKGNAME}" | cut --delimiter=:
--fields=1); do
handle_deleted_ucf_file "${locfile}" "${pkgdir}" "${locdir}"
done
}
# vim:sw=4:sts=4:et:
--- End Message ---
--- Begin Message ---
Source: ucf
Source-Version: 3.0054
Done: Mark Hindley <[email protected]>
We believe that the bug you reported is fixed in the latest version of
ucf, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Mark Hindley <[email protected]> (supplier of updated ucf package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Wed, 17 Jun 2026 15:08:03 +0100
Source: ucf
Architecture: source
Version: 3.0054
Distribution: experimental
Urgency: medium
Maintainer: Mark Hindley <[email protected]>
Changed-By: Mark Hindley <[email protected]>
Closes: 1138790
Changes:
ucf (3.0054) experimental; urgency=medium
.
[ Mark Hindley ]
* ucf,ucfr: preserve COWDANCER_* environment variables.
* d/control: bump Standards Version (no changes).
* ucf_library.sh: add warn() to print to stderr.
* ufc:
- use warn() for --no-action output to avoid interaction with debconf.
- do not load debconf module at all under --no-action.
* ucfr:
- don't choke on missing registry when called with --no-action.
* t/:
- fix testsuite: git ignores empty directories, so create expected
subdirs if necessary.
- basic_noaction: convert output to reproducible relative paths.
- record the exit status in the expected test output
- distinguish testsuite reports.
* t/run:
- also capture and diff stderr.
* t/run_rootless: don't rely on ucf being installed.
* ucf_helper_functions.sh: add DPKG_ROOT support.
* man/ucf_helper_functions.sh.5: escape fullstop at beginning of line.
* Add shellcheck directives to find dynamically sourced files.
* Makefile: add ucf_helper_functions.sh to check and shellcheck recipes.
* d/tests: add t/run_rootless as autopkgtest.
.
[ Johannes Schauer Marin Rodrigues ]
* ucf,ucfr: keep LD_LIBRARY_PATH and LD_PRELOAD
* Support $DPKG_ROOT in ucf and ucfr utilities
* ucfq: add support for --root and $DPKG_ROOT
* add tests for DPKG_ROOT
.
[ Nick Rosbrook ]
* Makefile: quote version string during replacement (LP: #2142754)
.
[ Marc Haber ]
* add ucf_helper_functions.sh and man page (Closes: #1138790)
* t/run: bind-mount /dev/null so that cp -p succeeds in unshare.
Checksums-Sha1:
02a7bc511a912228eba2b947c8161fe182a8d696 1565 ucf_3.0054.dsc
4297b6cf83cff17f46e600131b5178f949b37492 81704 ucf_3.0054.tar.xz
66c8438717b14b2e01948a429b8276a0f98ad0a6 5364 ucf_3.0054_amd64.buildinfo
Checksums-Sha256:
1414926a7a64ad684c30bf7679a971b1bcf707c77c9bb369572897c3906ed602 1565
ucf_3.0054.dsc
bd9b881b9c00a36929901173cd043c01095a7ae38e7dc41ae69863e77a914eb6 81704
ucf_3.0054.tar.xz
a5d2479a79982799122f7c8c14a3e0aee101c39c85a8a4a23f5c2489a8db340f 5364
ucf_3.0054_amd64.buildinfo
Files:
f2ab67b87c1e90cdb2ecc3787bdad9c5 1565 utils standard ucf_3.0054.dsc
518513bfe7c4a41e4e49309f057dc5e0 81704 utils standard ucf_3.0054.tar.xz
8af48d1629404d51b1d644be69aa9656 5364 utils standard ucf_3.0054_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEUGwVpCsK9aCoVCPu0opFvzKH1kkFAmoyrqgACgkQ0opFvzKH
1kkbrRAAiJO3Mh+Zmesg4CaEu9xwrNhzofabwfQFxZ2IS5RYh3xe1wHkx1uQ88n9
fMbN7WKEGdsH5wdH4+8OVJ2URpYDB9CtXlGst9cX/2AmO1N/Ba9SocLm650mYsRd
d9Jltj63dnQApBU0DtqsuLEdIGDa4aHyQuOjD92Usil0/wp7HTV/whOriMTHqPN0
i+1AiB/jHfMnajBBeGoLtOXPyrD7EyfvJ/2lEMta1uymQ45Lz+a8VSL331YN+O3l
Hj696cb5CymwM/9Z7ZVJ8f4nfWTrnqNz9laU6wRzrmijq4ci13sAT6HxLr+bkSjI
aHdU8yn+9a/ErMebp5AYlWsvtXN0lZBDVoe5i9Fwn6C2FbJ+Xt+aH7Cl+B2+OJTs
UOuiKabQTUIcMkJ0VJDvFhwMb3ywgG/F2p/vpemUk1Qap7IxOe7vtH7bvo8sTI55
VQlwiOu+7noYKSiVkgTA8c16hnaABC/yQsUyuspAYHIHDjA3+7qb2nDhalRKvhdE
qnRa4J44rsBoJlKtM/9U5iV/lb+Nc5RszrQW9uwx5OrfWTg8hBLtZ5twL9stEvlR
zUJoRhYVv8FVfyn+lZj4prCEFjt5EzIUYhew4XPu58CLv+zxcKrAzyIJSKaVgyz1
9d5+TLapcXhPUX1xxD0jEsfVM8aRYfLx6M5wzXoi6b0g8aSdvQI=
=Puw2
-----END PGP SIGNATURE-----
pgpne2GV3d1nC.pgp
Description: PGP signature
--- End Message ---