Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
61a47480a7
!48 [sync] PR-45: add sw_64 support
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-05-14 01:06:43 +00:00
Hailiang
cd01403f71 add sw_64 support
(cherry picked from commit 94915840e8478fce6966df02a5978185753bff70)
2025-05-13 15:01:45 +08:00
openeuler-ci-bot
8c40ff2d71
!39 [sync] PR-38: License compliance rectification
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-07-24 00:36:11 +00:00
starlet-dx
2e05ffef0d License compliance rectification
(cherry picked from commit 61a7a248f8f66e8bd18c12a2fa1a931ac31fb571)
2024-07-22 17:30:00 +08:00
openeuler-ci-bot
d789a07fac
!34 Upgrade to version 47.20230709git
From: @wk333 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-08-30 08:23:21 +00:00
wk333
e632e228e8 Upgrade to version 0-47.20230709git 2023-08-25 09:48:37 +08:00
openeuler-ci-bot
2f96cc4128
!27 Upgrade to version 0-43.20220212git
From: @wang--ge 
Reviewed-by: @licihua 
Signed-off-by: @licihua
2022-06-27 09:17:43 +00:00
wang--ge
b1a3eb7a42 upgrade to version 0-43.20220212git 2022-06-22 08:47:28 +08:00
openeuler-ci-bot
281d9706ed
!14 Fix CVE-2018-17942
From: @starlet-dx 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-02-23 06:16:46 +00:00
starlet-dx
f48866cfcc Fix CVE-2018-17942 2022-02-23 11:24:34 +08:00
6 changed files with 266 additions and 7 deletions

33
check-module.1 Normal file
View File

@ -0,0 +1,33 @@
.TH CHECK-MODULE 1 "2006-06-01" "0.0.20060601" "GNU Portability Library"
.SH NAME
check-module \- program to check gnulib modules.
.SH SYNOPSIS
.B check-module [OPTIONS] FILE...
.SH DESCRIPTION
The GNU portability library is a macro system and C declarations and definitions for commonly-used API elements and abstracted system behaviors. It can be used to improve portability and other functionality in your programs.
.PP
.B check-module
reads a module description file and derives the set of files included directly by any .c or .h file listed in the `Files:' section. First, it takes the union of all such sets for any dependent modules. Then, it compares that set with the set derived from the names listed in the various Files: sections.
.PP
.SH OPTIONS
.TP
.B \-h, \-\-help
Show summary of options.
.TP
.B \-v, \-\-version
Show version of program.
.SH BUGS
Report bugs to <bug-gnulib@gnu.org>.
.SH SEE ALSO
.BR gnulib (1).
.SH AUTHOR
check-module was written by the Free Software Foundation and others (sources of various origins).
.PP
This manual page was written by Daniel Baumann <daniel@debian.org>, for the Debian project (but may be used by others).

Binary file not shown.

BIN
gnulib-bad1faa.tar.gz Normal file

Binary file not shown.

182
gnulib-tool.1 Normal file
View File

@ -0,0 +1,182 @@
.TH GNULIB\-TOOL 1 "2006-06-01" "0.0.20060601" "GNU Portability Library"
.SH NAME
gnulib\-tool \- program for authors or maintainers which want to import modules
from gnulib into their packages.
.SH SYNOPSIS
.B gnulib\-tool
\-\-list
.PP
.B gnulib\-tool
\-\-import [module1 ... moduleN]
.PP
.B gnulib\-tool
\-\-update
.PP
.B gnulib\-tool
\-\-create-testdir \-\-dir=directory module1 ... moduleN
.PP
.B gnulib\-tool
\-\-create-megatestdir \-\-dir=directory [module1 ... moduleN]
.PP
.B gnulib\-tool
\-\-test \-\-dir=directory module1 ... moduleN
.PP
.B gnulib\-tool
\-\-megatest \-\-dir=directory [module1 ... moduleN]
.PP
.B gnulib\-tool
\-\-extract-description module
.PP
.B gnulib\-tool
\-\-extract-filelist module
.PP
.B gnulib\-tool
\-\-extract-dependencies module
.PP
.B gnulib\-tool
\-\-extract-autoconf-snippet module
.PP
.B gnulib\-tool
\-\-extract-automake-snippet module
.PP
.B gnulib\-tool
\-\-extract-include-directive module
.PP
.B gnulib\-tool
\-\-extract-license module
.PP
.B gnulib\-tool
\-\-extract-maintainer module
.PP
.B gnulib\-tool
\-\-extract-tests-module module
.SH DESCRIPTION
The GNU portability library is a macro system and C declarations and definitions
for commonly-used API elements and abstracted system behaviors. It can be used
to improve portability and other functionality in your programs.
.PP
.SH OPTIONS
Operation modes:
.TP
.B \-\-list
print the available module names.
.TP
.B \-\-import
import the given modules into the current package; if no modules are specified,
update the current package from the current gnulib.
.TP
.B \-\-update
update the current package, restore files omitted from CVS.
.TP
.B \-\-create-testdir
create a scratch package with the given modules.
.TP
.B \-\-create-megatestdir
create a mega scratch package with the given modules one by one and all
together.
.TP
.B \-\-test
test the combination of the given modules (recommended to use CC="gcc \-Wall"
here).
.TP
.B \-\-megatest
test the given modules one by one and all together (recommended to use CC="gcc
\-Wall" here).
.TP
.B \-\-extract-description
extract the description.
.TP
.B \-\-extract-filelist
extract the list of files.
.TP
.B \-\-extract-dependencies
extract the dependencies.
.TP
.B \-\-extract-autoconf-snippet
extract the snippet for configure.ac.
.TP
.B \-\-extract-automake-snippet
extract the snippet for lib/Makefile.am.
.TP
.B \-\-extract-include-directive
extract the #include directive.
.TP
.B \-\-extract-license
report the license terms of the source files under lib/.
.TP
.B \-\-extract-maintainer
report the maintainer(s) inside gnulib.
.TP
.B \-\-extract-tests-module
report the unit test module, if it exists.
.PP
Options:
.TP
.B \-\-dir=DIRECTORY
specify the target directory. For \-\-import, this specifies where your
configure.ac can be found. Defaults to current directory.
.TP
.B \-\-lib=LIBRARY
Specify the library name. Defaults to 'libgnu'.
.TP
.B \-\-source-base=DIRECTORY
Directory relative \-\-dir where source code is placed (default "lib"), for
\-\-import.
.TP
.B \-\-m4-base=DIRECTORY
Directory relative \-\-dir where *.m4 macros are placed (default "m4"), for
\-\-import.
.TP
.B \-\-tests-base=DIRECTORY
Directory relative \-\-dir where unit tests are placed (default "tests"), for
\-\-import.
.TP
.B \-\-aux-dir=DIRECTORY
Directory relative \-\-dir where auxiliary build tools are placed (default
"build-aux").
.TP
.B \-\-with-tests
Include unit tests for the included modules.
.TP
.B \-\-avoid=MODULE
Avoid including the given MODULE. Useful if you have code that provides
equivalent functionality. This option can be repeated.
.TP
.B \-\-lgpl
Abort if modules aren't available under the LGPL. Also modify license template
from GPL to LGPL.
.TP
.B \-\-libtool
Use libtool rules, for \-\-import.
.TP
.B \-\-macro-prefix=PREFIX
Specify the prefix of the macros 'gl_EARLY' and 'gl_INIT'. Default is 'gl'.
.TP
.B \-\-no-changelog
don't update or create ChangeLog files.
.TP
.B \-\-dry-run
For \-\-import, only print what would have been done.
.TP
.B -s, \-\-symbolic, \-\-symlink
Make symbolic links instead of copying files.
.PP
.TP
.B \-h, \-\-help
Show summary of options.
.SH BUGS
Report bugs to <bug-gnulib@gnu.org>.
.SH SEE ALSO
.BR check-module (1).
.SH AUTHOR
gnulib was written by the Free Software Foundation and others (sources of various origins).
.PP
This manual page was written by Daniel Baumann <daniel@debian.org>, for the Debian project (but may be used by others).

View File

@ -1,11 +1,19 @@
%global commit bad1faa7f5fd21a315c45cc6327cfc9874f499fb
%global githead %(printf %%.7s %commit)
%global gitdate 20230709
Name: gnulib Name: gnulib
Version: 0 Version: 0
Release: 28.20180720git Release: 49.%{gitdate}git
Summary: The GNU Portability Library Summary: The GNU Portability Library
License: Public Domain and BSD and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2 and LGPLv2+ and LGPLv3+ License: Public Domain and BSD-3-Clause and GPL-2.0-or-later and GPL-3.0-only and GPL-3.0-or-later and LGPL-2.0-only and LGPL-2.1-or-later and LGPL-3.0-or-later
URL: https://www.gnu.org/software/gnulib URL: https://www.gnu.org/software/gnulib
Source0: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=68df637;sf=tgz;name=gnulib-68df637.tar.gz#/gnulib-68df637.tar.gz Source0: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=%{githead};sf=tgz;name=gnulib-%{githead}.tar.gz#/gnulib-%{githead}.tar.gz
BuildRequires: perl-generators texinfo java-devel gettext-devel bison gperf libtool help2man git gcc_secure Source1: https://erislabs.net/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=debian/manpages/check-module.1
Source2: https://erislabs.net/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f=debian/manpages/gnulib-tool.1
Patch0: test-u8-strstr-alarm.diff
BuildRequires: perl-generators texinfo gettext-devel bison gperf libtool help2man git make ncurses-devel
BuildRequires: gcc_secure java-11-openjdk-devel
%description %description
Gnulib is a central location for common GNU code, intended to be Gnulib is a central location for common GNU code, intended to be
@ -23,7 +31,7 @@ This package contains development files for gnulib.
%package help %package help
Summary: Provides documentation for gnulib modules Summary: Provides documentation for gnulib modules
License: GFDL and GPLv2+ License: GFDL-1.1-or-later and GPL-2.0-or-later
Requires(post): info Requires(post): info
Requires(preun): info Requires(preun): info
Requires: gnulib-devel = %{version}-%{release} Requires: gnulib-devel = %{version}-%{release}
@ -36,7 +44,11 @@ Obsoletes: git-merge-changelog < %{version}-%{release}
This package contains help docs for gnulib. And Provides ChangeLog files. This package contains help docs for gnulib. And Provides ChangeLog files.
%prep %prep
%autosetup -n gnulib-68df637 -p1 -Sgit %autosetup -n gnulib-%{githead} -p1 -Sgit
%ifarch sw_64
/usr/bin/cp -fv /usr/lib/rpm/%{_vendor}/config.guess build-aux/
/usr/bin/cp -fv /usr/lib/rpm/%{_vendor}/config.sub build-aux/
%endif
toRemove="lib-symbol-visibility havelib .*-obsolete localcharset gettext-h gettext alloca-opt alloca " toRemove="lib-symbol-visibility havelib .*-obsolete localcharset gettext-h gettext alloca-opt alloca "
@ -49,6 +61,8 @@ done
rm lib/javaversion.class rm lib/javaversion.class
./gnulib-tool --create-testdir --dir=build-gnulib-root git-merge-changelog ./gnulib-tool --create-testdir --dir=build-gnulib-root git-merge-changelog
cp lib/timevar.def build-tests/gllib/
%build %build
cd build-gnulib-root cd build-gnulib-root
%configure --prefix=%_prefix %configure --prefix=%_prefix
@ -60,7 +74,9 @@ cd build-tests
%make_build %make_build
cd - cd -
javac -d lib -source 1.3 -target 1.3 lib/javaversion.java home_path=`ls /usr/lib/jvm | grep java-11-openjdk`
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/${home_path}
javac -d lib -source 11 -target 11 lib/javaversion.java
%make_build MODULES.html %make_build MODULES.html
sed -i -r 's#HREF="(lib|m4|modules)#HREF="%{_datadir}/gnulib/\1#g' MODULES.html sed -i -r 's#HREF="(lib|m4|modules)#HREF="%{_datadir}/gnulib/\1#g' MODULES.html
sed -i "/^[ ]*gnulib_dir=/s#\`[^\`]*\`#%{_datadir}/gnulib#" gnulib-tool sed -i "/^[ ]*gnulib_dir=/s#\`[^\`]*\`#%{_datadir}/gnulib#" gnulib-tool
@ -114,6 +130,21 @@ fi
%license doc/COPYINGv2 %license doc/COPYINGv2
%changelog %changelog
* Thu May 08 2025 mahailiang <mahailiang@uniontech.com> - 0-49.20230709git
- add sw_64 support
* Thu Jul 18 2024 yaoxin <yao_xin001@hoperun.com> - 0-48.20230709git
- License compliance rectification
* Fri Aug 25 2023 wangkai <13474090681@163.com> - 0-47.20230709git
- Upgrade to version 47.20230709git
* Tue Jun 21 2022 Ge Wang <wangge20@h-partners.com> - 0-43.20220212git
- Upgrade to version 43.20220212git
* Wed Feb 23 2022 yaoxin <yaoxin30@huawei.com> - 0-29.20180720git
- Fix CVE-2018-17942
* Sun Mar 21 2021 lingsheng <lingsheng@huawei.com> - 0-28.20180720git * Sun Mar 21 2021 lingsheng <lingsheng@huawei.com> - 0-28.20180720git
- Add gcc_secure to fix test_localeconv fail - Add gcc_secure to fix test_localeconv fail

13
test-u8-strstr-alarm.diff Normal file
View File

@ -0,0 +1,13 @@
diff --git gnulib-68df637/tests/unistr/test-u8-strstr.c~ gnulib-68df637/tests/unistr/test-u8-strstr.c
index 9fbf28e6e5..2e90d32a50 100644
--- gnulib-68df637/tests/unistr/test-u8-strstr.c
+++ gnulib-68df637/tests/unistr/test-u8-strstr.c
@@ -41,7 +41,7 @@ main (void)
same system that we did the check to ensure it has linear
performance characteristics. */
signal (SIGALRM, SIG_DFL);
- alarm (5);
+ alarm (25);
#endif
test_u_strstr ();