[med-svn] [Git][med-team/conda-package-handling][master] 7 commits: New upstream version 1.7.0
Andreas Tille
gitlab at salsa.debian.org
Mon Jun 22 10:49:53 BST 2020
Andreas Tille pushed to branch master at Debian Med / conda-package-handling
Commits:
fcf79bf4 by Andreas Tille at 2020-06-22T11:37:25+02:00
New upstream version 1.7.0
- - - - -
5b812adc by Andreas Tille at 2020-06-22T11:37:25+02:00
routine-update: New upstream version
- - - - -
202190ef by Andreas Tille at 2020-06-22T11:37:26+02:00
Update upstream source from tag 'upstream/1.7.0'
Update to upstream version '1.7.0'
with Debian dir 62b3438bc229c901081212015e7c2f9838dd28d2
- - - - -
2e759a33 by Andreas Tille at 2020-06-22T11:37:26+02:00
routine-update: Standards-Version: 4.5.0
- - - - -
5e95560d by Andreas Tille at 2020-06-22T11:37:26+02:00
routine-update: debhelper-compat 13
- - - - -
bcd9a05a by Andreas Tille at 2020-06-22T11:41:09+02:00
Update patches
- - - - -
be001709 by Andreas Tille at 2020-06-22T11:46:43+02:00
Close bug and upload to unstable
- - - - -
10 changed files:
- .travis.yml
- debian/changelog
- debian/control
- debian/patches/series
- − debian/patches/set_alarm_clock_in_test_to_later_date.patch
- + news/fix_null_pointer
- src/conda_package_handling/_version.py
- src/conda_package_handling/archive_utils_c.c
- src/conda_package_handling/archive_utils_cy.pyx
- tests/test_api.py
Changes:
=====================================
.travis.yml
=====================================
@@ -2,26 +2,44 @@
dist: xenial
language: python
-python:
- - "2.7"
- - "3.7"
-
+matrix:
+ include:
+ - python: 2.7
+ - arch: amd64
+ python: 3.7
+ - arch: arm64
+ python: 3.7
+env:
+ global:
+ - SUDO=""
install:
- - wget https://repo.anaconda.com/pkgs/misc/conda-execs/conda-4.7.5-linux-64.exe -O conda.exe
- - chmod +x conda.exe
- - export CONDA_ALWAYS_YES=1
- - ./conda.exe create -p $HOME/miniconda python=$TRAVIS_PYTHON_VERSION conda conda-build pytest six pytest-cov pytest-mock
+ - if [[ "${TRAVIS_CPU_ARCH}" == "arm64" ]]; then
+ SUDO=sudo;
+ wget -q "https://github.com/Archiconda/build-tools/releases/download/0.2.3/Archiconda3-0.2.3-Linux-aarch64.sh" -O archiconda.sh;
+ chmod +x archiconda.sh;
+ export CONDA_ALWAYS_YES=1;
+ bash archiconda.sh -b -p $HOME/miniconda;
+ export PATH="$HOME/miniconda/bin:$PATH";
+ $SUDO cp -r $HOME/miniconda/bin/* /usr/bin/;
+ $SUDO conda install python=3.7 conda conda-build pytest six pytest-cov pytest-mock;
+ else
+ SUDO="";
+ wget https://repo.anaconda.com/pkgs/misc/conda-execs/conda-4.7.5-linux-64.exe -O conda.exe;
+ chmod +x conda.exe;
+ export CONDA_ALWAYS_YES=1;
+ ./conda.exe create -p $HOME/miniconda python=$TRAVIS_PYTHON_VERSION conda conda-build pytest six pytest-cov pytest-mock;
+ fi
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda install futures;
fi
- - conda build conda.recipe --no-test
- - conda install --use-local conda-package-handling
- - conda info -a
+ - $SUDO conda build conda.recipe --no-test
+ - $SUDO conda install --use-local conda-package-handling
+ - $SUDO conda info -a
script:
# rebuilding the recipe with our new CPH installed tests it a bit deeper than the test suite.
- - conda build conda.recipe
+ - $SUDO conda build conda.recipe
- pytest -v --color=yes --cov=conda_package_handling tests
after_success:
- conda install codecov
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+conda-package-handling (1.7.0-1) unstable; urgency=medium
+
+ * New upstream version
+ Closes: #963334
+ * Standards-Version: 4.5.0 (routine-update)
+ * debhelper-compat 13 (routine-update)
+
+ -- Andreas Tille <tille at debian.org> Mon, 22 Jun 2020 11:45:00 +0200
+
conda-package-handling (1.6.0-2) unstable; urgency=medium
* Add missing copyrights
=====================================
debian/control
=====================================
@@ -3,7 +3,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
Uploaders: Andreas Tille <tille at debian.org>
Section: science
Priority: optional
-Build-Depends: debhelper-compat (= 12),
+Build-Depends: debhelper-compat (= 13),
dh-python,
cython3,
python3-dev,
@@ -12,7 +12,7 @@ Build-Depends: debhelper-compat (= 12),
python3-pytest <!nocheck>,
python3-tqdm <!nocheck>,
python3-pytest-mock <!nocheck>,
-Standards-Version: 4.4.1
+Standards-Version: 4.5.0
Vcs-Browser: https://salsa.debian.org/med-team/conda-package-handling
Vcs-Git: https://salsa.debian.org/med-team/conda-package-handling.git
Homepage: https://github.com/conda/conda-package-handling
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,2 @@
fix_linking.patch
fix_test.patch
-set_alarm_clock_in_test_to_later_date.patch
=====================================
debian/patches/set_alarm_clock_in_test_to_later_date.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Thu, 26 Dec 2019 08:22:21 +0100
-Description: Upstream is aware about a failure and seems to intend fixing
- it. Leave them a bit more time ....
-
---- a/tests/test_api.py
-+++ b/tests/test_api.py
-@@ -183,7 +183,7 @@ def test_create_package_with_uncommon_co
- assert stat.st_nlink == 1
-
-
-- at pytest.mark.skipif(datetime.now() <= datetime(2019, 12, 1), reason="Don't understand why this doesn't behave. Punt.")
-+ at pytest.mark.skipif(datetime.now() <= datetime(2020, 6, 1), reason="Don't understand why this doesn't behave. Punt.")
- def test_secure_refusal_to_extract_abs_paths(testing_workdir):
- with tarfile.open('pinkie.tar.bz2', 'w:bz2') as tf:
- open('thebrain', 'w').close()
=====================================
news/fix_null_pointer
=====================================
@@ -0,0 +1,4 @@
+Bug fixes:
+----------
+
+* Avoid segfaulting on incomplete archives
=====================================
src/conda_package_handling/_version.py
=====================================
@@ -23,9 +23,9 @@ def get_keywords():
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
- git_refnames = " (tag: 1.6.0)"
- git_full = "5b7dbf7bba75c1bb95be058d9c5a60bf85aebb47"
- git_date = "2019-09-20 15:30:59 -0500"
+ git_refnames = " (HEAD -> master, tag: 1.7.0, tag: 1.6.1)"
+ git_full = "7c4a4717a6d3a15fd41058d8864df2a750b20322"
+ git_date = "2020-05-06 10:49:55 +0200"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
=====================================
src/conda_package_handling/archive_utils_c.c
=====================================
@@ -10,6 +10,13 @@
#define O_BINARY 0
#endif
+const char * checked_strdup(const char * err) {
+ if (err == NULL) {
+ return NULL;
+ }
+ return strdup(err);
+}
+
struct archive * prepare_gnutar_archive(
const char *outname, const char *filtername, const char *opts, const char **err_str)
{
@@ -22,25 +29,25 @@ struct archive * prepare_gnutar_archive(
return a;
}
if (archive_write_set_format_gnutar(a) < ARCHIVE_OK) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
archive_write_close(a);
archive_write_free(a);
return NULL;
}
if (archive_write_add_filter_by_name(a, filtername) < ARCHIVE_OK) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
archive_write_close(a);
archive_write_free(a);
return NULL;
}
if (archive_write_set_options(a, opts) < ARCHIVE_OK) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
archive_write_close(a);
archive_write_free(a);
return NULL;
}
if (archive_write_open_filename(a, outname) < ARCHIVE_OK) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
archive_write_close(a);
archive_write_free(a);
return NULL;
@@ -78,23 +85,23 @@ static int add_file(
return 1;
}
if (archive_read_disk_set_behavior(disk, flags) < ARCHIVE_OK) {
- *err_str = archive_error_string(disk);
+ *err_str = checked_strdup(archive_error_string(disk));
return 1;
}
if (archive_read_disk_open(disk, filename) < ARCHIVE_OK) {
- *err_str = archive_error_string(disk);
+ *err_str = checked_strdup(archive_error_string(disk));
return 1;
}
if (archive_read_next_header2(disk, entry) < ARCHIVE_OK) {
- *err_str = archive_error_string(disk);
+ *err_str = checked_strdup(archive_error_string(disk));
return 1;
}
if (archive_read_disk_descend(disk) < ARCHIVE_OK) {
- *err_str = archive_error_string(disk);
+ *err_str = checked_strdup(archive_error_string(disk));
return 1;
}
if (archive_write_header(a, entry) < ARCHIVE_OK) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
return 1;
}
fd = open(filename, O_RDONLY | O_BINARY);
@@ -105,7 +112,7 @@ static int add_file(
}
close(fd);
if (archive_write_finish_entry(a) < ARCHIVE_OK) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
return 1;
}
archive_read_close(disk);
@@ -127,7 +134,7 @@ static int copy_data(struct archive *ar, struct archive *aw)
return (ARCHIVE_OK);
if (r < ARCHIVE_OK)
return (r);
- r = archive_write_data_block(aw, buff, size, offset);
+ r = archive_write_data_block(aw, buff, size, (int)offset);
if (r < ARCHIVE_OK) {
return (r);
}
@@ -142,7 +149,7 @@ static int extract_file_c(const char *filename, const char **err_str) {
int r;
if (!err_str) {
- return NULL;
+ return 0;
}
/* attributes we want to restore. */
flags = ARCHIVE_EXTRACT_TIME;
@@ -160,7 +167,7 @@ static int extract_file_c(const char *filename, const char **err_str) {
archive_write_disk_set_options(ext, flags);
archive_write_disk_set_standard_lookup(ext);
if ((r = archive_read_open_filename(a, filename, 10240))) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
return 1;
}
for (;;) {
@@ -168,24 +175,27 @@ static int extract_file_c(const char *filename, const char **err_str) {
if (r == ARCHIVE_EOF)
break;
if (r < ARCHIVE_WARN) {
- *err_str = archive_error_string(a);
+ *err_str = checked_strdup(archive_error_string(a));
return 1;
}
r = archive_write_header(ext, entry);
if (r < ARCHIVE_OK) {
- *err_str = archive_error_string(ext);
+ *err_str = checked_strdup(archive_error_string(ext));
return 1;
}
else if (archive_entry_size(entry) > 0) {
r = copy_data(a, ext);
if (r < ARCHIVE_WARN) {
- *err_str = archive_error_string(ext);
+ *err_str = checked_strdup(archive_error_string(ext));
+ if (*err_str == NULL) {
+ *err_str = checked_strdup(archive_error_string(a));
+ }
return 1;
}
}
r = archive_write_finish_entry(ext);
if (r < ARCHIVE_WARN) {
- *err_str = archive_error_string(ext);
+ *err_str = checked_strdup(archive_error_string(ext));
return 1;
}
}
=====================================
src/conda_package_handling/archive_utils_cy.pyx
=====================================
@@ -16,6 +16,7 @@ def extract_file(tarball):
cdef const char *err_str = NULL
result = extract_file_c(tarball, &err_str)
if result:
+ assert err_str != NULL
return 1, <bytes> err_str
return 0, b''
=====================================
tests/test_api.py
=====================================
@@ -183,7 +183,7 @@ def test_create_package_with_uncommon_conditions_captures_all_content(testing_wo
assert stat.st_nlink == 1
- at pytest.mark.skipif(datetime.now() <= datetime(2019, 12, 1), reason="Don't understand why this doesn't behave. Punt.")
+ at pytest.mark.skipif(datetime.now() <= datetime(2020, 12, 1), reason="Don't understand why this doesn't behave. Punt.")
def test_secure_refusal_to_extract_abs_paths(testing_workdir):
with tarfile.open('pinkie.tar.bz2', 'w:bz2') as tf:
open('thebrain', 'w').close()
View it on GitLab: https://salsa.debian.org/med-team/conda-package-handling/-/compare/512c7a3c3d4e245022b2804837fed42cc38da023...be0017096a2e52ffe12be7723c726e34dac7dd10
--
View it on GitLab: https://salsa.debian.org/med-team/conda-package-handling/-/compare/512c7a3c3d4e245022b2804837fed42cc38da023...be0017096a2e52ffe12be7723c726e34dac7dd10
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200622/81747d58/attachment-0001.html>
More information about the debian-med-commit
mailing list