diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 3b7e039df8eadfcec27aa5c343879cc52e5f5d5f..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# dpkg - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 28663487b0118ac5ebe85f96db420500a6c41a35..5f7ed352dc58b439d91be13c2eeb01197c1ad7c1 100644 --- a/README.md +++ b/README.md @@ -1,39 +1 @@ # dpkg - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/dpkg-fix-logrotate.patch b/dpkg-fix-logrotate.patch new file mode 100644 index 0000000000000000000000000000000000000000..0a315d1f4cd81a2b31d45055cea8794945825543 --- /dev/null +++ b/dpkg-fix-logrotate.patch @@ -0,0 +1,17 @@ +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 +-} + diff --git a/dpkg-log-Change-logfile-permission-to-satisfy-with-s.patch b/dpkg-log-Change-logfile-permission-to-satisfy-with-s.patch new file mode 100644 index 0000000000000000000000000000000000000000..f528ae53c1faac117de799a6014ed0478d647b38 --- /dev/null +++ b/dpkg-log-Change-logfile-permission-to-satisfy-with-s.patch @@ -0,0 +1,38 @@ +From 5ee4bdf24d9c61c42f781a89e09584468386fa02 Mon Sep 17 00:00:00 2001 +From: zhengchuan +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 + + diff --git a/dpkg.spec b/dpkg.spec new file mode 100644 index 0000000000000000000000000000000000000000..22140e2c8019e4c45cf31fd78d51668af8becdc7 --- /dev/null +++ b/dpkg.spec @@ -0,0 +1,203 @@ +Name: dpkg +Version: 1.18.25 +Release: 9 +Summary: Package maintenance system for Debian Linux + +License: GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD +URL: https://tracker.debian.org/pkg/dpkg +Source0: http://ftp.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.xz + +BuildRequires: zlib-devel bzip2-devel libselinux-devel gettext ncurses-devel +BuildRequires: autoconf automake doxygen gettext-devel gcc-c++ libtool +BuildRequires: flex fakeroot xz-devel dotconf-devel po4a >= 0.43 +BuildRequires: perl-interpreter +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-Time-Piece +BuildRequires: perl(Digest) +BuildRequires: perl(Test::More) +BuildRequires: perl(IPC::Cmd) +BuildRequires: perl(Digest::SHA) +BuildRequires: perl(IO::String) +Requires(post): coreutils + +Patch1: dpkg-fix-logrotate.patch +Patch2: dpkg-log-Change-logfile-permission-to-satisfy-with-s.patch + +%description +Dpkg is a tool to install, build, remove and manageDebian packages. The +primary and more user-friendly front-end for dpkg is aptitude. + +%package devel +Summary: Development package for dpkg +Provides: dpkg-static = %{version}-%{release} + +%description devel +The development package for dpkg. + +%package dev +Summary: Debian package development tools +Requires: dpkg-perl = %{version}-%{release} binutils bzip2 lzma +Requires: make patch xz perl(MIME::Lite) +Obsoletes: dpkg-devel < 1.16 +BuildArch: noarch + +%description dev +Debian package development tools for dpdk. + +%package perl +Summary: Dpkg perl modules pacakge +Requires: dpkg = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Digest::SHA) perl(Digest::SHA1) perl(Digest::SHA3) +Requires: perl-TimeDate perl-Time-Piece perl(Digest::MD5) +BuildArch: noarch + +%description perl +This package contains dpdk perl modules. + +%package help +Summary: Help documents for dpkg +%description help +The help documents for dpkg. + +%prep +%autosetup -n %{name}-%{version} -p1 + +cat << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ + sed -e '/perl(Dselect::Ftp)/d' -e '/perl(extra)/d' -e '/perl(file)/d' -e '/perl(dpkg-gettext.pl)/d' -e '/perl(controllib.pl)/d' -e '/perl(in)/d' +EOF + +%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req +chmod +x %{__perl_requires} + +sed -i 's/^use --/may use --/' scripts/dpkg-source.pl + +%build +autoreconf +%configure --disable-linker-optimisations \ + --with-admindir=%{_localstatedir}/lib/dpkg \ + --with-libselinux \ + --without-libmd \ + --with-libz \ + --with-liblzma \ + --with-libbz2 + +%make_build + +%install +%make_install + +mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d +install -pm0644 debian/dpkg.cfg %{buildroot}/%{_sysconfdir}/dpkg +install -pm0644 debian/dselect.cfg %{buildroot}/%{_sysconfdir}/dpkg +install -pm0644 debian/shlibs.default %{buildroot}/%{_sysconfdir}/dpkg +install -pm0644 debian/shlibs.override %{buildroot}/%{_sysconfdir}/dpkg +install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name} + +%find_lang dpkg +%find_lang dpkg-dev +%find_lang dselect + +%check +make VERBOSE=1 TESTSUITEFLAGS=--verbose TEST_PARALLEL=4 check || : + +%post +cd ${DPKG_ADMINDIR:-/var/lib/dpkg} +for file in diversions statoverride status; do +if [ ! -f "$file" ]; then + touch "$file" +fi +done + +touch /var/log/dpkg.log +chmod 640 /var/log/dpkg.log +chown root:root /var/log/dpkg.log 2>/dev/null || chown 0:0 /var/log/dpkg.log + +%files -f dpkg.lang -f dselect.lang +%license debian/copyright +%dir %{_sysconfdir}/dpkg +%dir %{_sysconfdir}/dpkg/dpkg.cfg.d +%dir %{_sysconfdir}/dpkg/dselect.cfg.d +%config(noreplace) %{_sysconfdir}/dpkg/dpkg.cfg +%config(noreplace) %{_sysconfdir}/logrotate.d/dpkg +%config(noreplace) %{_sysconfdir}/dpkg/dselect.cfg +%{_bindir}/dpkg +%{_bindir}/dpkg-deb +%{_bindir}/dpkg-divert +%{_bindir}/dpkg-maintscript-helper +%{_bindir}/dpkg-query +%{_bindir}/dpkg-split +%{_bindir}/dpkg-statoverride +%{_bindir}/dpkg-trigger +%{_bindir}/dselect +%{_sbindir}/start-stop-daemon +%dir %{_datadir}/dpkg +%{_datadir}/dpkg/abitable +%{_datadir}/dpkg/cputable +%{_datadir}/dpkg/ostable +%{_datadir}/dpkg/tupletable +%dir %{_localstatedir}/lib/dpkg +%dir %{_localstatedir}/lib/dpkg/alternatives +%dir %{_localstatedir}/lib/dpkg/info +%dir %{_localstatedir}/lib/dpkg/parts +%dir %{_localstatedir}/lib/dpkg/updates +%dir %{_localstatedir}/lib/dpkg/methods + +%exclude %{_libdir}/libdpkg.la +%exclude %{_bindir}/update-alternatives +%exclude %{_sysconfdir}/alternatives/ +%exclude %{_sbindir}/install-info + +%{perl_vendorlib}/Dselect +%{_libexecdir}/dpkg/methods + +%files devel +%{_libdir}/libdpkg.a +%{_libdir}/pkgconfig/libdpkg.pc +%{_includedir}/dpkg/*.h + +%files dev -f dpkg-dev.lang +%config(noreplace) %{_sysconfdir}/dpkg/shlibs.default +%config(noreplace) %{_sysconfdir}/dpkg/shlibs.override +%{_bindir}/dpkg-architecture +%{_bindir}/dpkg-buildpackage +%{_bindir}/dpkg-buildflags +%{_bindir}/dpkg-checkbuilddeps +%{_bindir}/dpkg-distaddfile +%{_bindir}/dpkg-genbuildinfo +%{_bindir}/dpkg-genchanges +%{_bindir}/dpkg-gencontrol +%{_bindir}/dpkg-gensymbols +%{_bindir}/dpkg-mergechangelogs +%{_bindir}/dpkg-name +%{_bindir}/dpkg-parsechangelog +%{_bindir}/dpkg-scanpackages +%{_bindir}/dpkg-scansources +%{_bindir}/dpkg-shlibdeps +%{_bindir}/dpkg-source +%{_bindir}/dpkg-vendor +%{_datadir}/dpkg/*.mk + +%files perl +%{perl_vendorlib}/Dpkg* +%{_datadir}/dpkg/*.specs + +%files help +%doc debian/changelog README AUTHORS THANKS TODO +%doc dselect/methods/multicd/README.multicd +%doc debian/usertags debian/dpkg.cron.daily +%doc AUTHORS THANKS debian/usertags doc/README.api +%doc doc/frontend.txt doc/triggers.txt +%{_mandir}/* +%exclude %{_mandir}/it/man1/ +%exclude %{_mandir}/it/man5/ +%exclude %{_mandir}/pl/man1/ +%exclude %{_mandir}/man1/update-alternatives.1 +%exclude %{_mandir}/*/man1/update-alternatives.1 + +%changelog +* Wed Sep 11 2019 openEuler Buildteam - 1.18.25-9 +- Package init diff --git a/dpkg_1.18.25.tar.xz b/dpkg_1.18.25.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..b8a34c817cf2ae7dab4e4e09a1b87704dcf2f727 Binary files /dev/null and b/dpkg_1.18.25.tar.xz differ