hi
Short explanation. 'debdelta-upgrade' uses the installed files of
packages, and patches from a repository, to build new versions of debs
for upgrading. One requisite is then (obviously) that all local data
must be pristine; for this reason, it was not compatible with
'prelink'. That was an annoying shortcoming. Recently,
roman@khimov.ru provided me with the solution: 'prelink -u' is
guaranteed to bring back an ELF file to the previous form
(byte-by-byte identical). So I designed this simple patch that
follows.
-- debdelta-0.26/debdelta 2008-05-03 19:19:10.000000000 +0200
+++ debdelta-0.27/debdelta 2008-09-15 12:42:14.000000000 +0200
@@ -669,6 +669,8 @@
if TD[-1] != '/':
TD = TD + '/'
+ HAVE_PRELINK=os.path.exists('/usr/sbin/prelink')
+
delta=abspath(delta)
if newdeb:
newdeb=abspath(newdeb)
@@ -789,8 +791,17 @@
d=os.path.dirname(a)
if not os.path.exists(d):
os.makedirs(d)
- if VERBOSE > 3 : print ' symlinking ',divert,' to ',a
- os.symlink(divert, a)
+ #the following code idea was provided by roman@khimov.ru
+ if HAVE_PRELINK and '\x7fELF' == open(divert).read(4):
+ shutil.copyfile(divert, a)
+ if VERBOSE > 3 or DEBUG > 1:
+ print ' copying/unprelinking ',divert,' to ',a
+ os.system('/usr/sbin/prelink -u '+a)
+ else:
+ os.system('/usr/sbin/prelink -u '+a+' >/dev/null 2>&1')
+ else:
+ if VERBOSE > 3 : print ' symlinking ',divert,' to ',a
+ os.symlink(divert, a)
else:
if VERBOSE > 3 : print ' not symlinking ',divert,' to ',orig
I asked help to Roman and to pabs; we tested this patch for some days
on ~5 different hosts, and it seems to work. (It is indeed a win-win
patch: if prelink is absent, the code works exactly as before).
This patch is now part of debdelta 0.27 .
In the release guideline it was said
> [...] changes that will be
> accepted into testing during the freeze [...]
> - fixes for severity: important bugs in packages of priority: optional
> or extra, only when this can be done via unstable;
I dont clearly understand if my update is in this case, so I just ask.
Would you let it in?
a.
ps: let me tell honestly that there is not a bug in BTS that this
update formally closes. The reason is that I lazily associated this
problem to bug 374892 (that tells that debdelta is incompatible with
'localepurge'). Yes, I know I should have probably cloned that bug, so
I now may close it! :->
--
Andrea Mennucc
"The EULA sounds like it was written by a team of lawyers who want to tell
me what I can't do, and the GPL sounds like it was written by a human
being who wants me to know what I can do."
Anonymous, http://www.securityfocus.com/columnists/420
Attachment:
signature.asc
Description: Digital signature