Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
740b6889dc
!50 [sync] PR-48: add sw_64 support
From: @openeuler-sync-bot 
Reviewed-by: @desert-sailor 
Signed-off-by: @desert-sailor
2025-03-14 01:49:22 +00:00
Hailiang
3f867a7a80 add sw_64 support
(cherry picked from commit 7673f592b7776acfb3dcabff2144cacb3140ef73)
2025-03-14 09:27:52 +08:00
openeuler-ci-bot
6c8cac2dfa
!45 delete add-loongarch-support-for-dpkg.patch
From: @hailianguniontech 
Reviewed-by: @desert-sailor 
Signed-off-by: @desert-sailor
2025-03-12 00:48:48 +00:00
Hailiang
e3b0d5c1cb delete add-loongarch-support-for-dpkg.patch 2025-02-11 14:58:21 +08:00
openeuler-ci-bot
eecec9c2cb
!35 Update to version 1.21.22
From: @desert-sailor 
Reviewed-by: @pipifather 
Signed-off-by: @pipifather
2024-01-18 08:35:43 +00:00
desert-sailor
739afdf3d7 Update to version 1.21.22 2024-01-17 16:51:27 +08:00
openeuler-ci-bot
cbeb6ba989
!31 Do not define the clamp macro when compiling C++ code
From: @chen-jan 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
2023-07-20 09:15:28 +00:00
chen-jan
3c3086c182 Do not define the clamp macro when compiling C++ code 2023-07-20 10:47:25 +08:00
openeuler-ci-bot
c9b3cadaa2
!26 add loongarch support for dpkg
From: @zhangwenlong01 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2023-03-14 03:46:10 +00:00
Wenlong Zhang
82dbf534bf add loongarch support for dpkg 2023-03-10 09:47:10 +08:00
7 changed files with 90 additions and 390 deletions

View File

@ -1,324 +0,0 @@
From faa4c92debe45412bfcf8a44f26e827800bb24be Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Tue, 3 May 2022 02:09:32 +0200
Subject: Dpkg::Source::Archive: Prevent directory traversal for in-place
extracts
For untrusted v2 and v3 source package formats that include a debian.tar
archive, when we are extracting it, we do that as an in-place extraction,
which can lead to directory traversal situations on specially crafted
orig.tar and debian.tar tarballs.
GNU tar replaces entries on the filesystem by the entries present on
the tarball, but it will follow symlinks when the symlink pathname
itself is not present as an actual directory on the tarball.
This means we can create an orig.tar where there's a symlink pointing
out of the source tree root directory, and then a debian.tar that
contains an entry within that symlink as if it was a directory, without
a directory entry for the symlink pathname itself, which will be
extracted following the symlink outside the source tree root.
This is currently noted as expected in GNU tar documentation. But even
if there was a new extraction mode avoiding this problem we'd need such
new version. Using perl's Archive::Tar would solve the problem, but
switching to such different pure perl implementation, could cause
compatibility or performance issues.
What we do is when we are requested to perform an in-place extract, we
instead still use a temporary directory, then walk that directory and
remove any matching entry in the destination directory, replicating what
GNU tar would do, but in addition avoiding the directory traversal issue
for symlinks. Which should work with any tar implementation and be safe.
Reported-by: Max Justicz <max@justi.cz>
Stable-Candidates: 1.18.x 1.19.x 1.20.x
Fixes: commit 0c0057a27fecccab77d2b3cffa9a7d172846f0b4 (1.14.17)
Fixes: CVE-2022-1664
(cherry picked from commit 7a6c03cb34d4a09f35df2f10779cbf1b70a5200b)
---
scripts/Dpkg/Source/Archive.pm | 122 +++++++++++++++++++++++++++++++---------
scripts/t/Dpkg_Source_Archive.t | 110 +++++++++++++++++++++++++++++++++++-
2 files changed, 204 insertions(+), 28 deletions(-)
diff --git a/scripts/Dpkg/Source/Archive.pm b/scripts/Dpkg/Source/Archive.pm
index 33c181b20..2ddd04af8 100644
--- a/scripts/Dpkg/Source/Archive.pm
+++ b/scripts/Dpkg/Source/Archive.pm
@@ -21,9 +21,11 @@ use warnings;
our $VERSION = '0.01';
use Carp;
+use Errno qw(ENOENT);
use File::Temp qw(tempdir);
use File::Basename qw(basename);
use File::Spec;
+use File::Find;
use Cwd;
use Dpkg ();
@@ -110,19 +112,13 @@ sub extract {
my %spawn_opts = (wait_child => 1);
# Prepare destination
- my $tmp;
- if ($opts{in_place}) {
- $spawn_opts{chdir} = $dest;
- $tmp = $dest; # So that fixperms call works
- } else {
- my $template = basename($self->get_filename()) . '.tmp-extract.XXXXX';
- unless (-e $dest) {
- # Kludge so that realpath works
- mkdir($dest) or syserr(g_('cannot create directory %s'), $dest);
- }
- $tmp = tempdir($template, DIR => Cwd::realpath("$dest/.."), CLEANUP => 1);
- $spawn_opts{chdir} = $tmp;
+ my $template = basename($self->get_filename()) . '.tmp-extract.XXXXX';
+ unless (-e $dest) {
+ # Kludge so that realpath works
+ mkdir($dest) or syserr(g_('cannot create directory %s'), $dest);
}
+ my $tmp = tempdir($template, DIR => Cwd::realpath("$dest/.."), CLEANUP => 1);
+ $spawn_opts{chdir} = $tmp;
# Prepare stuff that handles the input of tar
$self->ensure_open('r', delete_sig => [ 'PIPE' ]);
@@ -145,22 +141,94 @@ sub extract {
# have to be calculated using mount options and other madness.
fixperms($tmp) unless $opts{no_fixperms};
- # Stop here if we extracted in-place as there's nothing to move around
- return if $opts{in_place};
-
- # Rename extracted directory
- opendir(my $dir_dh, $tmp) or syserr(g_('cannot opendir %s'), $tmp);
- my @entries = grep { $_ ne '.' && $_ ne '..' } readdir($dir_dh);
- closedir($dir_dh);
- my $done = 0;
- erasedir($dest);
- if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) {
- rename("$tmp/$entries[0]", $dest)
- or syserr(g_('unable to rename %s to %s'),
- "$tmp/$entries[0]", $dest);
+ # If we are extracting "in-place" do not remove the destination directory.
+ if ($opts{in_place}) {
+ my $canon_basedir = Cwd::realpath($dest);
+ # On Solaris /dev/null points to /devices/pseudo/mm@0:null.
+ my $canon_devnull = Cwd::realpath('/dev/null');
+ my $check_symlink = sub {
+ my $pathname = shift;
+ my $canon_pathname = Cwd::realpath($pathname);
+ if (not defined $canon_pathname) {
+ return if $! == ENOENT;
+
+ syserr(g_("pathname '%s' cannot be canonicalized"), $pathname);
+ }
+ return if $canon_pathname eq $canon_devnull;
+ return if $canon_pathname eq $canon_basedir;
+ return if $canon_pathname =~ m{^\Q$canon_basedir/\E};
+ warning(g_("pathname '%s' points outside source root (to '%s')"),
+ $pathname, $canon_pathname);
+ };
+
+ my $move_in_place = sub {
+ my $relpath = File::Spec->abs2rel($File::Find::name, $tmp);
+ my $destpath = File::Spec->catfile($dest, $relpath);
+
+ my ($mode, $atime, $mtime);
+ lstat $File::Find::name
+ or syserr(g_('cannot get source pathname %s metadata'), $File::Find::name);
+ ((undef) x 2, $mode, (undef) x 5, $atime, $mtime) = lstat _;
+ my $src_is_dir = -d _;
+
+ my $dest_exists = 1;
+ if (not lstat $destpath) {
+ if ($! == ENOENT) {
+ $dest_exists = 0;
+ } else {
+ syserr(g_('cannot get target pathname %s metadata'), $destpath);
+ }
+ }
+ my $dest_is_dir = -d _;
+ if ($dest_exists) {
+ if ($dest_is_dir && $src_is_dir) {
+ # Refresh the destination directory attributes with the
+ # ones from the tarball.
+ chmod $mode, $destpath
+ or syserr(g_('cannot change directory %s mode'), $File::Find::name);
+ utime $atime, $mtime, $destpath
+ or syserr(g_('cannot change directory %s times'), $File::Find::name);
+
+ # We should do nothing, and just walk further tree.
+ return;
+ } elsif ($dest_is_dir) {
+ rmdir $destpath
+ or syserr(g_('cannot remove destination directory %s'), $destpath);
+ } else {
+ $check_symlink->($destpath);
+ unlink $destpath
+ or syserr(g_('cannot remove destination file %s'), $destpath);
+ }
+ }
+ # If we are moving a directory, we do not need to walk it.
+ if ($src_is_dir) {
+ $File::Find::prune = 1;
+ }
+ rename $File::Find::name, $destpath
+ or syserr(g_('cannot move %s to %s'), $File::Find::name, $destpath);
+ };
+
+ find({
+ wanted => $move_in_place,
+ no_chdir => 1,
+ dangling_symlinks => 0,
+ }, $tmp);
} else {
- rename($tmp, $dest)
- or syserr(g_('unable to rename %s to %s'), $tmp, $dest);
+ # Rename extracted directory
+ opendir(my $dir_dh, $tmp) or syserr(g_('cannot opendir %s'), $tmp);
+ my @entries = grep { $_ ne '.' && $_ ne '..' } readdir($dir_dh);
+ closedir($dir_dh);
+
+ erasedir($dest);
+
+ if (scalar(@entries) == 1 && ! -l "$tmp/$entries[0]" && -d _) {
+ rename("$tmp/$entries[0]", $dest)
+ or syserr(g_('unable to rename %s to %s'),
+ "$tmp/$entries[0]", $dest);
+ } else {
+ rename($tmp, $dest)
+ or syserr(g_('unable to rename %s to %s'), $tmp, $dest);
+ }
}
erasedir($tmp);
}
diff --git a/scripts/t/Dpkg_Source_Archive.t b/scripts/t/Dpkg_Source_Archive.t
index 7b70da68e..09496aeea 100644
--- a/scripts/t/Dpkg_Source_Archive.t
+++ b/scripts/t/Dpkg_Source_Archive.t
@@ -16,12 +16,120 @@
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More tests => 4;
+use Test::Dpkg qw(:paths);
+
+use File::Spec;
+use File::Path qw(make_path rmtree);
BEGIN {
use_ok('Dpkg::Source::Archive');
}
+use Dpkg;
+
+my $tmpdir = 't.tmp/Dpkg_Source_Archive';
+
+rmtree($tmpdir);
+
+sub test_touch
+{
+ my ($name, $data) = @_;
+
+ open my $fh, '>', $name
+ or die "cannot touch file $name\n";
+ print { $fh } $data if $data;
+ close $fh;
+}
+
+sub test_path_escape
+{
+ my $name = shift;
+
+ my $treedir = File::Spec->rel2abs("$tmpdir/$name-tree");
+ my $overdir = File::Spec->rel2abs("$tmpdir/$name-overlay");
+ my $outdir = "$tmpdir/$name-out";
+ my $expdir = "$tmpdir/$name-exp";
+
+ # This is the base directory, where we are going to be extracting stuff
+ # into, which include traps.
+ make_path("$treedir/subdir-a");
+ test_touch("$treedir/subdir-a/file-a");
+ test_touch("$treedir/subdir-a/file-pre-a");
+ make_path("$treedir/subdir-b");
+ test_touch("$treedir/subdir-b/file-b");
+ test_touch("$treedir/subdir-b/file-pre-b");
+ symlink File::Spec->abs2rel($outdir, $treedir), "$treedir/symlink-escape";
+ symlink File::Spec->abs2rel("$outdir/nonexistent", $treedir), "$treedir/symlink-nonexistent";
+ symlink "$treedir/file", "$treedir/symlink-within";
+ test_touch("$treedir/supposed-dir");
+
+ # This is the overlay directory, which we'll pack and extract over the
+ # base directory.
+ make_path($overdir);
+ make_path("$overdir/subdir-a/aa");
+ test_touch("$overdir/subdir-a/aa/file-aa", 'aa');
+ test_touch("$overdir/subdir-a/file-a", 'a');
+ make_path("$overdir/subdir-b/bb");
+ test_touch("$overdir/subdir-b/bb/file-bb", 'bb');
+ test_touch("$overdir/subdir-b/file-b", 'b');
+ make_path("$overdir/symlink-escape");
+ test_touch("$overdir/symlink-escape/escaped-file", 'escaped');
+ test_touch("$overdir/symlink-nonexistent", 'nonexistent');
+ make_path("$overdir/symlink-within");
+ make_path("$overdir/supposed-dir");
+ test_touch("$overdir/supposed-dir/supposed-file", 'something');
+
+ # Generate overlay tar.
+ system($Dpkg::PROGTAR, '-cf', "$overdir.tar", '-C', $overdir, qw(
+ subdir-a subdir-b
+ symlink-escape/escaped-file symlink-nonexistent symlink-within
+ supposed-dir
+ )) == 0
+ or die "cannot create overlay tar archive\n";
+
+ # This is the expected directory, which we'll be comparing against.
+ make_path($expdir);
+ system('cp', '-a', $overdir, $expdir) == 0
+ or die "cannot copy overlay hierarchy into expected directory\n";
+
+ # Store the expected and out reference directories into a tar to compare
+ # its structure against the result reference.
+ system($Dpkg::PROGTAR, '-cf', "$expdir.tar", '-C', $overdir, qw(
+ subdir-a subdir-b
+ symlink-escape/escaped-file symlink-nonexistent symlink-within
+ supposed-dir
+ ), '-C', $treedir, qw(
+ subdir-a/file-pre-a
+ subdir-b/file-pre-b
+ )) == 0
+ or die "cannot create expected tar archive\n";
+
+ # This directory is supposed to remain empty, anything inside implies a
+ # directory traversal.
+ make_path($outdir);
+
+ my $warnseen;
+ local $SIG{__WARN__} = sub { $warnseen = $_[0] };
+
+ # Perform the extraction.
+ my $tar = Dpkg::Source::Archive->new(filename => "$overdir.tar");
+ $tar->extract($treedir, in_place => 1);
+
+ # Store the result into a tar to compare its structure against a reference.
+ system($Dpkg::PROGTAR, '-cf', "$treedir.tar", '-C', $treedir, '.');
+
+ # Check results
+ ok(length $warnseen && $warnseen =~ m/points outside source root/,
+ 'expected warning seen');
+ ok(system($Dpkg::PROGTAR, '--compare', '-f', "$expdir.tar", '-C', $treedir) == 0,
+ 'expected directory matches');
+ ok(! -e "$outdir/escaped-file",
+ 'expected output directory is empty, directory traversal');
+}
+
+test_path_escape('in-place');
+
# TODO: Add actual test cases.
1;
--
cgit v1.2.3

50
add-support-sw_64.patch Normal file
View File

@ -0,0 +1,50 @@
From bd21d7b775c68a2c195785f4e5ec35e437e53a5e Mon Sep 17 00:00:00 2001
From: mahailiang <mahailiang@uniontech.com>
Date: Tue, 11 Feb 2025 14:11:43 +0800
Subject: [PATCH] add support sw_64
---
build-aux/config.guess | 3 +++
build-aux/config.sub | 1 +
data/cputable | 1 +
3 files changed, 5 insertions(+)
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 7f76b62..f67c66a 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1039,6 +1039,9 @@ EOF
loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
+ sw64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
m32r*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index dba16e8..1f8c5c3 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1209,6 +1209,7 @@ case $cpu-$vendor in
| lm32 \
| loongarch32 | loongarch64 | loongarchx32 \
| m32c | m32r | m32rle \
+ | sw_64 \
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
| m88110 | m88k | maxq | mb | mcore | mep | metag \
diff --git a/data/cputable b/data/cputable
index 7b1ee2c..e4c8663 100644
--- a/data/cputable
+++ b/data/cputable
@@ -54,4 +54,5 @@ sh4 sh4 sh4 32 little
sh4eb sh4eb sh4eb 32 big
sparc sparc sparc 32 big
sparc64 sparc64 sparc64 64 big
+sw_64 sw_64 sw_64 64 little
tilegx tilegx tilegx 64 little
--
2.43.0

View File

@ -1,17 +0,0 @@
diff -up ./debian/dpkg.logrotate.orig ./debian/dpkg.logrotate
--- ./debian/dpkg.logrotate.orig 2013-06-30 10:04:23.369382622 +0300
+++ ./debian/dpkg.logrotate 2013-06-30 10:04:39.268407865 +0300
@@ -7,12 +7,3 @@
notifempty
create 644 root root
}
-/var/log/alternatives.log {
- monthly
- rotate 12
- compress
- delaycompress
- missingok
- notifempty
- create 644 root root
-}

View File

@ -1,38 +0,0 @@
From 5ee4bdf24d9c61c42f781a89e09584468386fa02 Mon Sep 17 00:00:00 2001
From: zhengchuan <zhengchuan@huawei.com>
Date: Fri, 2 Aug 2019 17:28:53 +0800
Subject: [PATCH] dpkg log: Change logfile permission to satisfy with safty
---
debian/dpkg.logrotate | 2 +-
debian/dpkg.postinst | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/dpkg.logrotate b/debian/dpkg.logrotate
index cf36f08..c57052b 100644
--- a/debian/dpkg.logrotate
+++ b/debian/dpkg.logrotate
@@ -5,5 +5,5 @@
delaycompress
missingok
notifempty
- create 644 root root
+ create 640 root root
}
diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst
index 9771d7f..674e0fd 100755
--- a/debian/dpkg.postinst
+++ b/debian/dpkg.postinst
@@ -19,7 +19,7 @@ create_database() {
create_logfile() {
logfile=/var/log/dpkg.log
touch $logfile
- chmod 644 $logfile
+ chmod 640 $logfile
chown root:root $logfile 2>/dev/null || chown 0:0 $logfile
}
--
1.7.12.4

View File

@ -1,16 +1,18 @@
%global enable_dev_package 0 %global enable_dev_package 1
Name: dpkg Name: dpkg
Version: 1.18.25 Version: 1.21.22
Release: 12 Release: 3
Summary: Package maintenance system for Debian Linux Summary: Package maintenance system for Debian Linux
License: GPL-2.0-only and GPL-2.0-or-later and LGPL-2.0-or-later and Public Domain and BSD-2-Clause License: GPL-2.0-only and GPL-2.0-or-later and LGPL-2.0-or-later and Public Domain and BSD-2-Clause
URL: https://tracker.debian.org/pkg/dpkg URL: https://tracker.debian.org/pkg/dpkg
Source0: http://ftp.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.xz Source0: http://ftp.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.xz
Patch1: add-support-sw_64.patch
BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel
BuildRequires: autoconf automake doxygen gettext-devel gcc-c++ libtool BuildRequires: autoconf automake doxygen gettext-devel gcc-c++ libtool
BuildRequires: flex fakeroot xz-devel dotconf-devel po4a >= 0.43 BuildRequires: libzstd-devel make libmd-devel
BuildRequires: flex fakeroot xz-devel dotconf-devel po4a >= 0.59
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: perl-devel BuildRequires: perl-devel
BuildRequires: perl-generators BuildRequires: perl-generators
@ -19,12 +21,12 @@ BuildRequires: perl(Digest)
BuildRequires: perl(Test::More) BuildRequires: perl(Test::More)
BuildRequires: perl(IPC::Cmd) BuildRequires: perl(IPC::Cmd)
BuildRequires: perl(Digest::SHA) BuildRequires: perl(Digest::SHA)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(IO::String) BuildRequires: perl(IO::String)
BuildRequires: perl(Tie::Handle)
BuildRequires: fakeroot
Requires(post): coreutils Requires(post): coreutils
Patch1: dpkg-fix-logrotate.patch
Patch2: dpkg-log-Change-logfile-permission-to-satisfy-with-s.patch
Patch3: CVE-2022-1664.patch
%description %description
Dpkg is a tool to install, build, remove and manageDebian packages. The Dpkg is a tool to install, build, remove and manageDebian packages. The
@ -83,10 +85,11 @@ sed -i 's/^use --/may use --/' scripts/dpkg-source.pl
autoreconf autoreconf
%configure --disable-linker-optimisations \ %configure --disable-linker-optimisations \
--with-admindir=%{_localstatedir}/lib/dpkg \ --with-admindir=%{_localstatedir}/lib/dpkg \
--runstatedir=/run \
--with-libselinux \ --with-libselinux \
--without-libmd \
--with-libz \ --with-libz \
--with-liblzma \ --with-liblzma \
--with-libzstd \
--with-libbz2 --with-libbz2
%make_build %make_build
@ -135,14 +138,20 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%{_bindir}/dpkg-query %{_bindir}/dpkg-query
%{_bindir}/dpkg-split %{_bindir}/dpkg-split
%{_bindir}/dpkg-statoverride %{_bindir}/dpkg-statoverride
%{_bindir}/dpkg-realpath
%{_bindir}/dpkg-trigger %{_bindir}/dpkg-trigger
%{_bindir}/dselect %{_bindir}/dselect
%{_sbindir}/start-stop-daemon %{_sbindir}/start-stop-daemon
%{_sbindir}/dpkg-fsys-usrunmess
%{_libexecdir}/dpkg/dpkg-db-backup
%dir %{_datadir}/dpkg %dir %{_datadir}/dpkg
%{_datadir}/dpkg/abitable %{_datadir}/dpkg/abitable
%{_datadir}/dpkg/cputable %{_datadir}/dpkg/cputable
%{_datadir}/dpkg/ostable %{_datadir}/dpkg/ostable
%{_datadir}/dpkg/tupletable %{_datadir}/dpkg/tupletable
%{_datadir}/polkit-1/actions/org.dpkg.pkexec.update-alternatives.policy
%{_datadir}/doc/dpkg/*
%{_datadir}/dpkg/sh/dpkg-error.sh
%dir %{_localstatedir}/lib/dpkg %dir %{_localstatedir}/lib/dpkg
%dir %{_localstatedir}/lib/dpkg/alternatives %dir %{_localstatedir}/lib/dpkg/alternatives
%dir %{_localstatedir}/lib/dpkg/info %dir %{_localstatedir}/lib/dpkg/info
@ -175,6 +184,7 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%exclude %{_bindir}/dpkg-source %exclude %{_bindir}/dpkg-source
%exclude %{_bindir}/dpkg-vendor %exclude %{_bindir}/dpkg-vendor
%exclude %{_datadir}/dpkg/*.mk %exclude %{_datadir}/dpkg/*.mk
%exclude %{_datadir}/zsh/vendor-completions/_dpkg-parsechangelog
%exclude /etc/dpkg/shlibs.* %exclude /etc/dpkg/shlibs.*
%exclude /usr/share/locale/ca/LC_MESSAGES/dpkg-dev.mo %exclude /usr/share/locale/ca/LC_MESSAGES/dpkg-dev.mo
%exclude /usr/share/locale/de/LC_MESSAGES/dpkg-dev.mo %exclude /usr/share/locale/de/LC_MESSAGES/dpkg-dev.mo
@ -183,6 +193,8 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%exclude /usr/share/locale/pl/LC_MESSAGES/dpkg-dev.mo %exclude /usr/share/locale/pl/LC_MESSAGES/dpkg-dev.mo
%exclude /usr/share/locale/ru/LC_MESSAGES/dpkg-dev.mo %exclude /usr/share/locale/ru/LC_MESSAGES/dpkg-dev.mo
%exclude /usr/share/locale/sv/LC_MESSAGES/dpkg-dev.mo %exclude /usr/share/locale/sv/LC_MESSAGES/dpkg-dev.mo
%exclude /usr/share/locale/nl/LC_MESSAGES/dpkg-dev.mo
%exclude /usr/share/locale/pt/LC_MESSAGES/dpkg-dev.mo
%endif %endif
%{perl_vendorlib}/Dselect %{perl_vendorlib}/Dselect
@ -192,9 +204,11 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%{_libdir}/libdpkg.a %{_libdir}/libdpkg.a
%{_libdir}/pkgconfig/libdpkg.pc %{_libdir}/pkgconfig/libdpkg.pc
%{_includedir}/dpkg/*.h %{_includedir}/dpkg/*.h
%{_datadir}/aclocal/dpkg-*.m4
%if %{enable_dev_package} %if %{enable_dev_package}
%files dev -f dpkg-dev.lang %files dev -f dpkg-dev.lang
%doc doc/README.feature-removal-schedule doc/README.api doc/spec
%config(noreplace) %{_sysconfdir}/dpkg/shlibs.default %config(noreplace) %{_sysconfdir}/dpkg/shlibs.default
%config(noreplace) %{_sysconfdir}/dpkg/shlibs.override %config(noreplace) %{_sysconfdir}/dpkg/shlibs.override
%{_bindir}/dpkg-architecture %{_bindir}/dpkg-architecture
@ -215,6 +229,7 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%{_bindir}/dpkg-source %{_bindir}/dpkg-source
%{_bindir}/dpkg-vendor %{_bindir}/dpkg-vendor
%{_datadir}/dpkg/*.mk %{_datadir}/dpkg/*.mk
%{_datadir}/zsh/vendor-completions/_dpkg-parsechangelog
%endif %endif
%files perl %files perl
@ -223,10 +238,9 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%files help %files help
%doc debian/changelog README TODO %doc debian/changelog README TODO
%doc dselect/methods/multicd/README.multicd
%doc debian/dpkg.cron.daily %doc debian/dpkg.cron.daily
%doc AUTHORS THANKS debian/usertags doc/README.api %doc AUTHORS THANKS doc/README.api
%doc doc/frontend.txt doc/triggers.txt
%{_mandir}/* %{_mandir}/*
%exclude %{_mandir}/it/man1/ %exclude %{_mandir}/it/man1/
%exclude %{_mandir}/it/man5/ %exclude %{_mandir}/it/man5/
@ -237,6 +251,21 @@ chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log
%endif %endif
%changelog %changelog
* Wed Mar 12 2025 mahailiang <mahailiang@uniontech.com> - 1.21.22-3
- add sw_64 support
* Tue Feb 11 2025 mahailiang <mahailiang@uniontech.com> - 1.21.22-2
- delete add-loongarch-support-for-dpkg.patch
* Fri Jan 12 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.21.22-1
- Update version to 1.21.22
* Thu Jul 20 2023 chenchen <chen_aka_jan@163.com> - 1.18.25-14
- Do not define the clamp macro when compiling C++ code
* Fri Mar 10 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 1.18.25-13
- add loongarch support for dpkg
* Fri May 27 2022 houyingchao <houyingchao@h-partners.com> - 1.18.25-12 * Fri May 27 2022 houyingchao <houyingchao@h-partners.com> - 1.18.25-12
- Fix CVE-2022-1664 - Fix CVE-2022-1664

Binary file not shown.

BIN
dpkg_1.21.22.tar.xz Normal file

Binary file not shown.