[Pkg-octave-commit] [octave] 01/01: d/p/octave-pkgbuilddir.patch: New patch
Rafael Laboissière
rlaboiss-guest at moszumanska.debian.org
Sun Feb 14 15:10:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
rlaboiss-guest pushed a commit to branch master
in repository octave.
commit 088e63416bac8175e29ae647703b8c67f17a82c7
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date: Sun Feb 14 13:06:02 2016 -0200
d/p/octave-pkgbuilddir.patch: New patch
This patch replaces the patch enable_dirs_in_pkg. It introduces a
better change in pkg/private/install.m that allows packages to be
built in place and avoid unreproducible builds due to temporary build
directories appearing in the .oct files.
Gbp-Dch: Full
---
debian/patches/enable_dirs_in_pkg | 55 ---------------------------------
debian/patches/octave-pkgbuilddir.patch | 47 ++++++++++++++++++++++++++++
debian/patches/series | 2 +-
3 files changed, 48 insertions(+), 56 deletions(-)
diff --git a/debian/patches/enable_dirs_in_pkg b/debian/patches/enable_dirs_in_pkg
deleted file mode 100644
index 3a84955..0000000
--- a/debian/patches/enable_dirs_in_pkg
+++ /dev/null
@@ -1,55 +0,0 @@
-Description: Allow installation of already extracted packages with pkg.m
-Forwarded: not-needed
-Author: Thomas Weber <tweber at debian.org>
---- a/scripts/pkg/private/install.m
-+++ b/scripts/pkg/private/install.m
-@@ -75,25 +75,32 @@
- endif
-
- ## Uncompress the package.
-- if (verbose)
-- printf ("untar (%s, %s)\n", tgz, tmpdir);
-- endif
-- untar (tgz, tmpdir);
--
-- ## Get the name of the directories produced by tar.
-- [dirlist, err, msg] = readdir (tmpdir);
-- if (err)
-- error ("couldn't read directory produced by tar: %s", msg);
-- endif
-+ if (!exist(tgz, "dir"))
-+ if (verbose)
-+ printf ("untar (%s, %s)\n", tgz, tmpdir);
-+ endif
-+ untar (tgz, tmpdir);
-
-- if (length (dirlist) > 3)
-- error ("bundles of packages are not allowed");
-- endif
-- endif
-+ ## Get the name of the directories produced by tar.
-+ [dirlist, err, msg] = readdir (tmpdir);
-+ if (err)
-+ error ("couldn't read directory produced by tar: %s", msg);
-+ endif
-
-- ## The filename pointed to an uncompressed package to begin with.
-- if (exist (tgz, "dir"))
-- dirlist = {".", "..", tgz};
-+ if (length (dirlist) > 3)
-+ error ("bundles of packages are not allowed");
-+ endif
-+ else
-+ ## we are dealing with a directory, so just copy the files
-+ if (verbose)
-+ printf ("Copying directory (%s, %s)\n", tgz, tmpdir);
-+ endif
-+ [status, msg, msgid] = copyfile (tgz, tmpdir);
-+ if (!status)
-+ disp(msg);
-+ endif
-+ dirlist = {".", "..", tgz};
-+ endif
- endif
-
- if (exist (tgz, "file") || exist (tgz, "dir"))
diff --git a/debian/patches/octave-pkgbuilddir.patch b/debian/patches/octave-pkgbuilddir.patch
new file mode 100644
index 0000000..a015136
--- /dev/null
+++ b/debian/patches/octave-pkgbuilddir.patch
@@ -0,0 +1,47 @@
+Description: Allow an unpacked source package to be compiled in place
+Author: Rafael Laboissiere <rafael at laboissiere.net>
+Origin: vendor, http://pkgs.fedoraproject.org/cgit/rpms/octave.git/tree/octave-pkgbuilddir.patch
+Forwarded: not-needed
+Last-Update: 2016-02-13
+
+diff -up octave-4.0.0-rc1/scripts/pkg/private/install.m.pkgbuilddir octave-4.0.0-rc1/scripts/pkg/private/install.m
+--- octave-4.0.0-rc1/scripts/pkg/private/install.m.pkgbuilddir 2015-03-05 08:13:28.000000000 -0700
++++ octave-4.0.0-rc1/scripts/pkg/private/install.m 2015-03-05 20:43:45.762854275 -0700
+@@ -62,7 +62,10 @@ function install (files, handle_deps, au
+ for i = 1:length (files)
+ tgz = files{i};
+
+- if (exist (tgz, "file"))
++ ## The filename pointed to an uncompressed package to begin with.
++ if (exist (tgz, "dir"))
++ dirlist = {".", "..", tgz};
++ elseif (exist (tgz, "file"))
+ ## Create a temporary directory.
+ tmpdir = tempname ();
+ tmpdirs{end+1} = tmpdir;
+@@ -91,17 +94,16 @@ function install (files, handle_deps, au
+ endif
+ endif
+
+- ## The filename pointed to an uncompressed package to begin with.
+- if (exist (tgz, "dir"))
+- dirlist = {".", "..", tgz};
+- endif
+-
+- if (exist (tgz, "file") || exist (tgz, "dir"))
++ if (exist (tgz, "file"))
+ ## The two first entries of dirlist are "." and "..".
+- if (exist (tgz, "file"))
+- packdir = fullfile (tmpdir, dirlist{3});
++ if (exist (tgz, "dir"))
++ if (tgz(1) == '/')
++ packdir = tgz;
++ else
++ packdir = fullfile (pwd (), dirlist{3});
++ endif
+ else
+- packdir = fullfile (pwd (), dirlist{3});
++ packdir = fullfile (tmpdir, dirlist{3});
+ endif
+ packdirs{end+1} = packdir;
+
diff --git a/debian/patches/series b/debian/patches/series
index e4ec420..0c274c3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,4 @@
-enable_dirs_in_pkg
+octave-pkgbuilddir.patch
drop_versioned_binaries.diff
install_libraries_publically
no_pdf_in_print.diff
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave.git
More information about the Pkg-octave-commit
mailing list