summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-10-21 00:41:09 +0000
committerCoprDistGit <infra@openeuler.org>2024-10-21 00:41:09 +0000
commit10a88589d948bb44a2695ecb88633c8ce63e950f (patch)
tree88080814c25ab27e73a51b571789315f6bf0ad7d
parent42618e75656fc8c7340fb590fe3daa330c69bb5d (diff)
automatic import of xzopeneuler20.03_LTS_SP4
-rw-r--r--.gitignore1
-rw-r--r--colorxzgrep.csh5
-rw-r--r--colorxzgrep.sh4
-rw-r--r--sources1
-rw-r--r--xz-5213-547-562-libtool.patch37
-rw-r--r--xz.spec194
6 files changed, 242 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..23b889f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/xz-5.4.7.tar.xz
diff --git a/colorxzgrep.csh b/colorxzgrep.csh
new file mode 100644
index 0000000..a3964dc
--- /dev/null
+++ b/colorxzgrep.csh
@@ -0,0 +1,5 @@
+/usr/libexec/grepconf.sh -c
+if ( $status == 1 ) exit
+alias xzgrep 'xzgrep --color=auto'
+alias xzfgrep 'xzfgrep --color=auto'
+alias xzegrep 'xzegrep --color=auto'
diff --git a/colorxzgrep.sh b/colorxzgrep.sh
new file mode 100644
index 0000000..4a91d70
--- /dev/null
+++ b/colorxzgrep.sh
@@ -0,0 +1,4 @@
+/usr/libexec/grepconf.sh -c || return
+alias xzgrep='xzgrep --color=auto' 2>/dev/null
+alias xzegrep='xzegrep --color=auto' 2>/dev/null
+alias xzfgrep='xzfgrep --color=auto' 2>/dev/null
diff --git a/sources b/sources
new file mode 100644
index 0000000..a242820
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+315da7794c37ba347aaef7c58cadd3dd xz-5.4.7.tar.xz
diff --git a/xz-5213-547-562-libtool.patch b/xz-5213-547-562-libtool.patch
new file mode 100644
index 0000000..3073645
--- /dev/null
+++ b/xz-5213-547-562-libtool.patch
@@ -0,0 +1,37 @@
+# Fix shared library building in XZ Utils 5.2.13, 5.4.7, and 5.6.2
+#
+# The releases were made with a development version of GNU Libtool
+# (2.5.0+1+g38c166c8). The benefit is that there tend to be fixes that
+# aren't in a stable release yet. At the same time there is a higher
+# risk of new bugs. Unfortunately there was a bug that breaks building
+# of shared libraries on some systems like mips64.
+#
+# This patch was made by taking the upstream commit to m4/libtool.m4
+# and then running "autoconf" to update the generated "configure".
+# This patch only modifies "configure" so that the changed timestamps
+# won't cause the build system to regenerate more files, which would
+# only work if one has all Autotools packages installed.
+#
+# https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=9a4a02615c9e7cbcfd690ed31874822a7d6aaea2
+# https://lore.kernel.org/distributions/3299713.44csPzL39Z@pinacolada/
+
+diff -rup xz-5.6.2.orig/configure xz-5.6.2/configure
+--- xz-5.6.2.orig/configure
++++ xz-5.6.2/configure
+@@ -9475,7 +9475,7 @@ do
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+- ac_cv_prog_FILECMD=":"
++ ac_cv_prog_FILECMD="file"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+@@ -9483,6 +9483,7 @@ done
+ done
+ IFS=$as_save_IFS
+
++ test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":"
+ fi ;;
+ esac
+ fi
diff --git a/xz.spec b/xz.spec
new file mode 100644
index 0000000..4d80b21
--- /dev/null
+++ b/xz.spec
@@ -0,0 +1,194 @@
+Name: xz
+Version: 5.4.7
+Release: 1
+Summary: A free general-purpose data compreession software with LZMA2 algorithm
+License: GPL-3.0-only
+URL: http://tukaani.org/xz
+Source0: http://tukaani.org/%{name}/%{name}-%{version}.tar.xz
+Source1: colorxzgrep.sh
+Source2: colorxzgrep.csh
+
+# https://github.com/tukaani-project/xz/releases/tag/v5.4.7
+# https://github.com/tukaani-project/xz/releases/download/v5.4.7/xz-5213-547-562-libtool.patch
+Patch0: xz-5213-547-562-libtool.patch
+
+BuildRequires: perl-interpreter gcc
+
+Requires: %{name} = %{version}-%{release}
+Requires: grep >= 2.20-5
+
+%description
+XZ Utils is free general-purpose data compression software with a high compression ratio.
+XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
+
+The core of the XZ Utils compression code is based on LZMA SDK, but it has been modified quite a lot to be suitable for XZ Utils.
+The primary compression algorithm is currently LZMA2, which is used inside the .xz container format. With typical files, XZ Utils create 30% smaller output than gzip and 15% smaller output than bzip2.
+
+%package devel
+Summary: Libraries & headers for xz
+Requires: %{name} = %{version}-%{release}
+Provides: xz-static
+Obsoletes: xz-static
+
+%description devel
+This package mainly includes the following contents: static library,
+the header file, example, tests use case, other development and use of content.
+
+%package lzma-compat
+Summary: Old LZMA format compatibility binaries
+Requires: %{name} = %{version}-%{release}
+Provides: lzma = %{version}
+Obsoletes: lzma < %{version}
+
+%description lzma-compat
+This package contains the compatibility binaries for older LZMA.
+
+%package libs
+Summary: Libraries for xz
+Obsoletes: %{name}-compat-libs < %{version}-%{release}
+
+%description libs
+Libraries for decoding files compressed with LZMA or XZ utils.
+
+%package_help
+
+%prep
+%autosetup -n %{name}-%{version} -p1
+
+%build
+%configure
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+%make_build
+
+%install
+%make_install
+%delete_la
+
+# config color alias for xz*grep
+%global profiledir %{_sysconfdir}/profile.d
+mkdir -p %{buildroot}%{profiledir}
+install -p -m 644 %{SOURCE1} %{buildroot}%{profiledir}
+install -p -m 644 %{SOURCE2} %{buildroot}%{profiledir}
+
+%find_lang %name
+
+%check
+LD_LIBRARY_PATH=$PWD/src/liblzma/.libs %make_build check
+
+%files -f %{name}.lang
+%doc %{_pkgdocdir}
+%license COPYING*
+%{_bindir}/*xz*
+%{profiledir}/*
+%exclude %_pkgdocdir/examples*
+
+%files libs
+%{_libdir}/lib*.so.5*
+
+%files lzma-compat
+%{_bindir}/*lz*
+
+%files devel
+%dir %{_includedir}/lzma
+%doc %_pkgdocdir/examples*
+%{_includedir}/lzma/*.h
+%{_includedir}/lzma.h
+
+%{_libdir}/pkgconfig/liblzma.pc
+%{_libdir}/liblzma.a
+%{_libdir}/*.so
+
+%files help
+%{_mandir}/man1/*
+%lang(de) %{_mandir}/de/man1/*
+%lang(fr) %{_mandir}/fr/man1/*
+%lang(ko) %{_mandir}/ko/man1/*
+%lang(ro) %{_mandir}/ro/man1/*
+%lang(uk) %{_mandir}/uk/man1/*
+%lang(pt_BR) %{_mandir}/pt_BR/man1/*
+
+%changelog
+* Thu Aug 01 2024 Funda Wang <fundawang@yeah.net> - 5.4.7-1
+- Update to 5.4.7
+
+* Tue Apr 30 2024 kouwenqi <kouwenqi@kylinos.cn> - 5.4.4-2
+- liblzma: Add overflow check for Unpadded size in lzma_index_append
+
+* Fri Aug 4 2023 dillon chen <dillon.chen@gmail.com> - 5.4.4-1
+- update version to 5.4.4
+
+* Wed Jun 21 2023 dillon chen <dillon.chen@gmail.com> -5.4.3-1
+- upgrade package version to 5.4.3
+
+* Mon Jan 30 2023 wangjunqi <wangjunqi@kylinos.cn> - 5.4.1-1
+- upgrade package version to 5.4.1
+
+* Wed Jan 11 2023 renhongxun <renhongxun@h-partners.com> - 5.2.10-1
+- Type:Bump version
+- ID:NA
+- SUG:NA
+- DESC:upgrade to 5.2.10
+
+* Sat Oct 29 2022 hkgy <kaguyahatu@outlook.com> - 5.2.7-1
+- Type:Bump version
+- ID:NA
+- SUG:NA
+- DESC:update to 5.2.7
+
+* Fri Sep 23 2022 wangjiang <wangjiang37@h-partners.com> - 5.2.5-3
+- Type:enhancement
+- CVE:NA
+- SUG:NA
+- DESC:config color alias for xz*grep
+
+* Fri Apr 15 2022 liudabo <liudabo1@h-partners.com> - 5.2.5-2
+- Type:CVE
+- ID:CVE-2022-1271
+- SUG:NA
+- DESC:Fix CVE-2022-1271
+
+* Thu Jul 23 2020 shixuantong <shixuantong@huawei.com> - 5.2.5-1
+- Type:NA
+- ID:NA
+- SUG:NA
+- DESC:update to 5.2.5-1
+
+* Sat Mar 21 2020 shenyangyang<shenyangyang4@huawei.com> - 5.2.4-10
+- Type:enhancement
+- ID:NA
+- SUG:NA
+- DESC:Split xz-lzma-compat subpackage
+
+* Mon Feb 24 2020 chengquan<chengquan3@huawei.com> - 5.2.4-9
+- Type:enhancement
+- ID:NA
+- SUG:NA
+- DESC:Split libs subpackage for xz
+
+* Fri Feb 21 2020 chengquan<chengquan3@huawei.com> - 5.2.4-8
+- Type:bugfix
+- ID:NA
+- SUG:NA
+- DESC:Add necessary BuildRequire
+
+* Mon Jan 20 2020 JeanLeo<liujianliu.liu@huawei.com> - 5.2.4-7
+- Type:bugfix
+- ID:NA
+- SUG:NA
+- DESC:correct patch info
+
+* Mon Jan 20 2020 JeanLeo<liujianliu.liu@huawei.com> - 5.2.4-6
+- Type:bugfix
+- ID:NA
+- SUG:NA
+- DESC:revert the deleted patch
+
+* Sat Jan 18 2020 JeanLeo<liujianliu.liu@huawei.com> - 5.2.4-5
+- Type:bugfix
+- ID:NA
+- SUG:NA
+- DESC:remove useless file or patch
+
+* Mon Sep 2 2019 dongjian<dongjian13@huawei.com> - 5.2.4-4
+- Rebuild the xz and fix description