Update of /cvsroot/fink/fink/10.4
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv28970
Modified Files:
ChangeLog dpkg.info dpkg.patch
Added Files:
dpkg-base-files.info
Log Message:
sync with stable
Index: dpkg.patch
===================================================================
RCS file: /cvsroot/fink/fink/10.4/dpkg.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dpkg.patch 14 Apr 2009 03:11:00 -0000 1.6
+++ dpkg.patch 9 Nov 2010 07:29:13 -0000 1.7
@@ -2634,3 +2634,159 @@
fprintf(stderr, _("dpkg: warning - %s returned error exit status
%d\n"),description,n);
else
ohshit(_("subprocess %s returned error exit status
%d"),description,n);
+diff -Nurd dpkg-1.10.21.orig/main/help.c dpkg-1.10.21/main/help.c
+--- dpkg-1.10.21.orig/main/help.c 2003-10-25 16:03:21.000000000 +0400
++++ dpkg-1.10.21/main/help.c 2009-12-20 02:37:43.000000000 -0400
+@@ -180,7 +187,7 @@
+ }
+ if (f_debug & dbg_scripts) {
+ fprintf(stderr,"D0%05o: fork/exec %s (",dbg_scripts,path);
+- while (*argv) fprintf(stderr," %s",*argv++);
++ while (*++argv) fprintf(stderr," %s",*argv);
+ fputs(" )\n",stderr);
+ }
+ instdirl= strlen(instdir);
+@@ -256,17 +263,75 @@
+ static int do_script(const char *pkg, const char *scriptname, const char
*scriptpath, struct stat *stab, char *const arglist[], const char *desc, const
char *name, int warn) {
+ const char *scriptexec;
+ int c1, r;
++ if (scriptpath) // if NULL, just want wrapper side-effect, no actual .deb
script present
+ setexecute(scriptpath,stab);
+
+ c1= m_fork();
+ if (!c1) {
+ const char **narglist;
++ /* FINK LOCAL begin */
++ const char **full_narglist;
++ char *path_wrapper;
++ struct stat stab_wrapper;
++ const char *null_script_path = ""; // must be blank string (NULL is
end-of-array sentinel)
++ /* FINK LOCAL end */
+ for (r=0; arglist[r]; r++) ;
+- narglist=nfmalloc((r+1)*sizeof(char*));
++ // narglist=nfmalloc((r+1)*sizeof(char*));
++ /* FINK LOCAL begin */
++ full_narglist=nfmalloc((r+2)*sizeof(char*)); // leave space for
wrapper-script-name, add NULL terminator
++ narglist=full_narglist+1; // orig pointer points to orig array
++ /* FINK LOCAL end */
+ for (r=1; arglist[r-1]; r++)
+ narglist[r]= arglist[r];
++ if (scriptpath) { // FINK LOCAL
+ scriptexec= preexecscript(scriptpath,narglist);
++ } else { scriptexec = null_script_path; }; // FINK LOCAL was called with
no actual script path to run
+ narglist[0]= scriptexec;
++ /* FINK LOCAL begin */
++ // try to set up with wrapper
++#define FINK_DPKG_SCRIPT_DIR "@PREFIX@/lib/fink/dpkg-base-files"
++ // determine wrapper-script pathname
++ asprintf(&path_wrapper, "%s/%s", FINK_DPKG_SCRIPT_DIR, scriptname);
++ if (path_wrapper == NULL) {
++ ohshite(_("dpkg - error: could not allocate for fink script wrapper for
%s.\n"), scriptpath);
++ } else {
++ if (!stat(path_wrapper, &stab_wrapper)) {
++ if ((stab_wrapper.st_mode & 0555) == 0555) {
++ // only use it if it exists and is chmod a+rx
++ debug(dbg_scripts,"Wrapper script '%s' will be used around '%s'",
path_wrapper, scriptpath);
++ // it's good! set wrapper as actual runnable thing in narglist array
++ narglist=full_narglist;
++ scriptexec= preexecscript(path_wrapper,narglist);
++ narglist[0]= scriptexec;
++
++ /*
++ Global wrapper needs way to introspect name of package
++ being manipulated. Normal .deb scripts could have this
++ hard-coded in their script because this info is known at
++ the time the .deb is constructed. Pass the name as an
++ env var to the wrapper.
++ */
++ setenv("FINK_PACKAGE_NAME", pkg, 1);
++ } else {
++ debug(dbg_scripts,"Wrapper script '%s' wrong perms", path_wrapper);
++ if (scriptpath) {
++ debug(dbg_scripts,"...falling back to real script '%s'",
scriptpath);
++ } else {
++ debug(dbg_scripts,"...skipping over because no real script '%s'",
scriptpath);
++ exit(0);
++ }
++ }
++ } else {
++ debug(dbg_scripts,"Wrapper script '%s' does not exist", path_wrapper);
++ if (scriptpath) {
++ debug(dbg_scripts,"...falling back to real script '%s'", scriptpath);
++ } else {
++ debug(dbg_scripts,"...skipping over because no real script '%s'",
scriptpath);
++ exit(0);
++ }
++ }
++ }
++ /* FINK LOCAL end */
+ execv(scriptexec,narglist);
+ ohshite(desc,name);
+ }
+@@ -294,8 +359,13 @@
+ if (stat(scriptpath,&stab)) {
+ if (errno == ENOENT) {
+ debug(dbg_scripts,"maintainer_script_installed nonexistent
%s",scriptname);
+- return 0;
+- }
++// return 0;
++ /* FINK LOCAL begin */
++ // always call do_script (fink adds side-effects), but pass NULL if no
actual script
++ scriptpath = NULL;
++// }
++ } else
++ /* FINK LOCAL end */
+ ohshite(_("unable to stat installed %s script
`%.250s'"),description,scriptpath);
+ }
+ do_script(pkg->name, scriptname, scriptpath, &stab, arglist, _("unable to
execute %s"), buf, 0);
+@@ -320,8 +390,14 @@
+ if (stat(cidir,&stab)) {
+ if (errno == ENOENT) {
+ debug(dbg_scripts,"maintainer_script_new nonexistent %s
`%s'",scriptname,cidir);
+- return 0;
+- }
++// return 0;
++ // }
++ /* FINK LOCAL begin */
++ // always call do_script (fink adds side-effects), but pass NULL if no
actual script
++ cidir = NULL;
++// }
++ } else
++ /* FINK LOCAL end */
+ ohshite(_("unable to stat new %s script `%.250s'"),description,cidir);
+ }
+ do_script(pkgname, scriptname, cidir, &stab, arglist, _("unable to execute
new %s"), buf, 0);
+@@ -348,16 +424,19 @@
+ if (errno == ENOENT) {
+ debug(dbg_scripts,"maintainer_script_alternative nonexistent %s `%s'",
+ scriptname,oldscriptpath);
+- return 0;
+- }
++ /* FINK LOCAL begin */
++ // always call do_script (fink adds side-effects), but pass NULL if no
actual script
++ oldscriptpath = NULL;
++ } else {
++ /* FINK LOCAL end */
+ fprintf(stderr,
+ _("dpkg: warning - unable to stat %s `%.250s': %s\n"),
+ buf,oldscriptpath,strerror(errno));
+- } else {
++ }
++ }
+ if (!do_script(pkg->name, scriptname, oldscriptpath, &stab, arglist,
_("unable to execute %s"), buf, PROCWARN))
+ return 1;
+ ensure_diversions();
+- }
+ fprintf(stderr, _("dpkg - trying script from the new package instead
...\n"));
+
+ arglist= buildarglist(scriptname,
+@@ -367,6 +446,9 @@
+ strcpy(cidirrest,scriptname);
+ sprintf(buf,_("new %s script"),description);
+
++ // FINK if old-pkg fails, don't want to allow "success" of new
++ // solely because wrapper worked in new-pkg: loses important
++ // error-state that *should* fail loudly
+ if (stat(cidir,&stab)) {
+ if (errno == ENOENT)
+ ohshit(_("there is no script in the new version of the package - giving
up"));
--- NEW FILE: dpkg-base-files.info ---
Package: dpkg-base-files
Version: 0.3
Revision: 1
Depends: dpkg (>= 1.10.21-1229)
Source: mirror:custom:fink/%n-%v.tar.gz
Essential: yes
Source-MD5: b2cbd67423d5dde4de56fb8a23ef8dfa
CompileScript: ./setup.sh %p
InstallScript: ./install.sh %i
#
PostInstScript: <<
if [ "$1" = "configure" ]; then
echo "Cleaning up all installed .la files (this may take a
moment)"
for libdir in "%p/lib" "%p/opt" "%p/Applications" "%p/Library";
do
if [ -d "$libdir" ]; then
echo ' find "'$libdir'" -name '"'"'*.la'"'"'
-and -type f -print0 | xargs -0 perl -pi -e
"s/^(dependency_libs)=.*/\1='"''"'/" || true'
find "$libdir" -name '*.la' -and -type f
-print0 | xargs -0 perl -pi -e "s/^(dependency_libs)=.*/\1=''/" || true
else
echo ' skipping "'$libdir'" (nothing installed
there)'
fi
done
fi
<<
#
Description: Support scripts for dpkg
DescDetail: <<
The dpkg-base-files package contains files that dpkg uses:
* global-deb-scripts
* During package installation, clear the dependency_libs entry in
all .la files being installed
<<
DescPackaging: <<
Dependency on "dpkg that runs these scripts" needed so that
other packages can Depends on %N and know that the scripts
will be run.
<<
License: GPL
Maintainer: Fink Core Group <[email protected]>
CustomMirror: <<
Primary: http://superb-west.dl.sourceforge.net/sourceforge/
Secondary: http://easynews.dl.sourceforge.net/sourceforge/
nam-US: http://superb-west.dl.sourceforge.net/sourceforge/
eur: http://eu.dl.sourceforge.net/sourceforge/
<<
Index: dpkg.info
===================================================================
RCS file: /cvsroot/fink/fink/10.4/dpkg.info,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- dpkg.info 14 Apr 2009 03:11:00 -0000 1.11
+++ dpkg.info 9 Nov 2010 07:29:13 -0000 1.12
@@ -1,6 +1,6 @@
Package: dpkg
Version: 1.10.21
-Revision: 1228
+Revision: 1229
GCC: 4.0
BuildDepends: fink (>= 0.24.12)
Depends: libgettext3-shlibs, libiconv (>= 1.11-1), gzip, tar,
libncurses5-shlibs (>= 5.4-20041023-1006)
@@ -12,7 +12,7 @@
Source2: mirror:sourceforge:fink/gettext-0.14.5.tar.gz
Source2-MD5: e2f6581626a22a0de66dce1d81d00de3
PatchFile: %n.patch
-PatchFile-MD5: d6d9c1fa417f4a8b4e6d749ff3cdde78
+PatchFile-MD5: d5979f532b44157110630fea3bf7e2f1
PatchScript: <<
cd %b/..; sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p0
cd %b/../gettext-0.14.5/build-aux; perl -pi -e 's/.*chmod.*777.*$//g'
ltmain.sh
@@ -36,6 +36,7 @@
/usr/bin/make install DESTDIR=%d
install -c -p -m 644 origin.fink %i/etc/dpkg/origins/fink
rm -rf %i/lib/dpkg/methods/*
+ mkdir -p -m0755 %i/lib/fink/dpkg-base-files
<<
Description: The Debian package manager
DescDetail: <<
@@ -99,6 +100,13 @@
Filesystem may be case-insensitive, so do case-insensitive check for
"dpkg -i" replacing files in an already-installed other package
+
+Patched off-by-one bug in main/help.c:preexecscript argv processing
+(backported from upstream dpkg-1.13.16)
+
+Patched to use %p/lib/fink/dpkg-base-files/ wrappers for .deb scripts
+(for use with the dpkg-base-files module)
+NB: wrapper runs even if no .deb script.
<<
#
PostInstScript: <<
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/10.4/ChangeLog,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ChangeLog 24 Oct 2010 01:16:23 -0000 1.32
+++ ChangeLog 9 Nov 2010 07:29:13 -0000 1.33
@@ -1,3 +1,7 @@
+2010-11-09 Dave Morrison <[email protected]>
+
+ * dpkg.info, dpkg.patch, dpkg-base-files.info: sync with stable
+
2010-10-23 Dave Morrison <[email protected]>
* apt.info, apt.patch, base-files.info, bzip2.info, debianutils.info,
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs