diff --git a/containers/docker-ci/Dockerfile b/containers/docker-ci/Dockerfile index 808bdf44..250c2bb5 100644 --- a/containers/docker-ci/Dockerfile +++ b/containers/docker-ci/Dockerfile @@ -55,13 +55,12 @@ RUN cd /etc/pki/ca-trust/source/anchors/ && \ mkdir -p /usr/local/lib64/python3.8/ && \ ln -s /opt/app-root/lib64/python3.8/site-packages /usr/local/lib64/python3.8/ -# Apply patch for typecode, extractcode, packagedcode -# TODO: rpm.patch need an update together with the rpm parser +# Apply patches for typecode, extractcode, packagedcode COPY ./containers/patches/* /opt/app-root/lib64/python3.8/site-packages/ WORKDIR /opt/app-root/lib64/python3.8/site-packages/ RUN patch -p0 < magic2.patch && \ - patch -p0 < extract.patch - # patch -p0 < rpm.patch + patch -p0 < extract.patch && \ + patch -p0 < rpm.patch WORKDIR /opt/app-root/src USER 1001 diff --git a/containers/docker-openlcs/Dockerfile b/containers/docker-openlcs/Dockerfile index 54329fe5..ac3b93dc 100644 --- a/containers/docker-openlcs/Dockerfile +++ b/containers/docker-openlcs/Dockerfile @@ -59,12 +59,12 @@ RUN cd /etc/pki/ca-trust/source/anchors/ && \ chmod a+x -R "${HOME}"/containers/docker-openlcs/bin/* && \ chown -R 1001:0 "${HOME}" -# Apply patch for typecode, extractcode, packagedcode +# Apply patches for typecode, extractcode, packagedcode COPY ./containers/patches/* /opt/app-root/lib64/python3.8/site-packages/ WORKDIR /opt/app-root/lib64/python3.8/site-packages/ RUN patch -p0 < magic2.patch && \ - patch -p0 < extract.patch - # patch -p0 < rpm.patch + patch -p0 < extract.patch && \ + patch -p0 < rpm.patch WORKDIR "${HOME}" USER 1001 diff --git a/containers/patches/extract.patch b/containers/patches/extract.patch index 8fef63c8..e1025fa1 100644 --- a/containers/patches/extract.patch +++ b/containers/patches/extract.patch @@ -1,5 +1,5 @@ ---- extractcode/extract.py 2022-03-24 21:42:00.778077190 +0800 -+++ extractcode/extract_mod.py 2022-03-24 21:42:00.778077190 +0800 +--- extractcode/extract.py 2023-01-09 16:18:26.325216293 +0800 ++++ extractcode/extract_mod.py 2023-02-08 15:59:53.481604363 +0800 @@ -127,6 +127,13 @@ processed_events_append = processed_events.append for event in extract_events: diff --git a/containers/patches/magic2.patch b/containers/patches/magic2.patch index e11b4606..2c1e8809 100644 --- a/containers/patches/magic2.patch +++ b/containers/patches/magic2.patch @@ -1,5 +1,5 @@ ---- typecode/magic2.py 2022-01-26 17:22:18.330889855 +0800 -+++ typecode/magic2_mod.py 2022-01-26 17:22:08.812841583 +0800 +--- typecode/magic2.py 2023-01-09 16:18:25.849212368 +0800 ++++ typecode/magic2_mod.py 2023-02-08 15:49:28.718765445 +0800 @@ -29,6 +29,7 @@ # SOFTWARE. @@ -7,4 +7,4 @@ +import ctypes.util import glob import os - + import sys diff --git a/containers/patches/rpm.patch b/containers/patches/rpm.patch index e7f3c980..9471acae 100644 --- a/containers/patches/rpm.patch +++ b/containers/patches/rpm.patch @@ -1,15 +1,15 @@ ---- packagedcode/rpm.py 2022-04-01 12:38:24.375524865 +0800 -+++ packagedcode/rpm.py.mod 2022-04-01 16:29:21.394860116 +0800 -@@ -94,7 +94,7 @@ - # note: the order of the named tuple is the sort order. - # But for creation we put the rarely used epoch last - def __new__(self, version, release=None, epoch=None): +--- packagedcode/rpm.py 2023-01-10 09:23:48.750055521 +0800 ++++ packagedcode/rpm_mod.py 2023-02-08 15:45:31.010924345 +0800 +@@ -99,7 +99,7 @@ + note: the sort order of the named tuple is the sort order. + But for creation we put the rarely used epoch last with a default to None. + """ - if epoch and epoch.strip() and not epoch.isdigit(): + if epoch and not isinstance(epoch, int): raise ValueError('Invalid epoch: must be a number or empty.') if not version: raise ValueError('Version is required: {}'.format(repr(version))) -@@ -111,7 +111,7 @@ +@@ -116,7 +116,7 @@ vr = self.version if self.epoch: