Compare commits

...

No commits in common. "c9-beta" and "c8" have entirely different histories.
c9-beta ... c8

4 changed files with 29 additions and 111 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libedit-20210216-3.1.tar.gz
SOURCES/libedit-20170329-3.1.tar.gz

View File

@ -1 +1 @@
343e3e0325b90c9be15f31734001c9dac5a1f179 SOURCES/libedit-20210216-3.1.tar.gz
7b7bde97429d96a42b0a95ed3c6bec56101ec9f0 SOURCES/libedit-20170329-3.1.tar.gz

View File

@ -1,40 +0,0 @@
diff -ur libedit-20210419-3.1/src/el.c libedit-20210522-3.1/src/el.c
--- libedit-20210419-3.1/src/el.c 2019-10-25 22:12:05.000000000 +0200
+++ libedit-20210522-3.1/src/el.c 2021-05-22 20:55:00.000000000 +0200
@@ -548,15 +548,15 @@
fp = NULL;
if (fname == NULL) {
-#ifdef HAVE_ISSETUGID
- if (issetugid())
- return -1;
- if ((fname = getenv("EDITRC")) == NULL) {
+ /* secure_getenv is guaranteed to be defined and do the right thing here */
+ /* because of the defines above which take into account issetugid, */
+ /* secure_getenv and __secure_getenv availability. */
+ if ((fname = secure_getenv("EDITRC")) == NULL) {
static const char elpath[] = "/.editrc";
size_t plen = sizeof(elpath);
- if ((ptr = getenv("HOME")) == NULL)
+ if ((ptr = secure_getenv("HOME")) == NULL)
return -1;
plen += strlen(ptr);
if ((path = el_calloc(plen, sizeof(*path))) == NULL)
@@ -565,14 +565,7 @@
elpath + (*ptr == '\0'));
fname = path;
}
-#else
- /*
- * If issetugid() is missing, always return an error, in order
- * to keep from inadvertently opening up the user to a security
- * hole.
- */
- return -1;
-#endif
+
}
if (fname[0] == '\0')
return -1;

View File

@ -1,21 +1,17 @@
%global snap 20210216
%global dir_snap 20210216
%global snap 20170329
%global dir_snap 20170329
Summary: The NetBSD Editline library
Name: libedit
Version: 3.1
Release: 38.%{snap}cvs%{?dist}
Release: 23.%{snap}cvs%{?dist}
License: BSD
URL: https://www.thrysoee.dk/editline/
Source0: https://www.thrysoee.dk/editline/%{name}-%{snap}-%{version}.tar.gz
Group: System Environment/Libraries
URL: http://www.thrysoee.dk/editline/
Source0: http://www.thrysoee.dk/editline/%{name}-%{snap}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: groff-base
BuildRequires: make
BuildRequires: ncurses-devel
# Fix reading of $HOME/.editrc and $EDITRC
Patch1: libedit-editrc.patch
%description
Libedit is an autotool- and libtoolized port of the NetBSD Editline library.
It provides generic line editing, history, and tokenization functions, similar
@ -23,38 +19,50 @@ to those found in GNU Readline.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: ncurses-devel%{?_isa}
%description devel
This package contains development files for %{name}.
%prep
%autosetup -n %{name}-%{dir_snap}-%{version} -p1
%setup -q -n %{name}-%{dir_snap}-%{version}
# Fix unused direct shared library dependencies.
sed -i "s/lncurses/ltinfo/" configure
# Suppress rpmlint error.
iconv -f ISO8859-1 -t UTF-8 -o ChangeLog.utf-8 ChangeLog
touch -r ChangeLog ChangeLog.utf-8
mv -f ChangeLog.utf-8 ChangeLog
# Replace an nroff macro that is not available, and not needed, on Linux
sed -i 's,\\\*\[Gt\],>,' doc/editline.3.roff
%build
%configure --disable-static --disable-silent-rules
%make_build
# Fix unused direct shared library dependencies.
sed -i "s/lncurses/ltinfo/" src/Makefile
# Downstream projects do not need to link with ncurses, just libedit.
sed -i "s/ -lncurses//" libedit.pc
make %{?_smp_mflags}
%install
%make_install
make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -delete
# See rhbz#1349671
rm -f $RPM_BUILD_ROOT%{_mandir}/man3/history.3*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/history.3*
%ldconfig_scriptlets
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc ChangeLog THANKS
%{_mandir}/man5/editrc.5*
%{_libdir}/%{name}.so.0
%{_libdir}/%{name}.so.0.*
%{_libdir}/%{name}.so.*
%files devel
%doc examples/fileman.c examples/tc1.c examples/wtc1.c
@ -67,56 +75,6 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man3/history.3*
%{_includedir}/editline/readline.h
%changelog
* Wed Jul 19 2023 Miroslav Lichvar <mlichvar@redhat.com> 3.1-38.20210216cvs
- Fix reading of $HOME/.editrc and $EDITRC (#2211207)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-37.20210216cvs
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.1-36.20210216cvs
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Feb 16 2021 Jerry James <loganjerry@gmail.com> - 3.1-35.20210216cvs
- New version (20210216-3.1)
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-34.20191231cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-33.20191231cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-32.20191231cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jan 3 2020 Jerry James <loganjerry@gmail.com> - 3.1-31.20191231cvs
- New version (20191231-3.1)
* Wed Dec 11 2019 Jerry James <loganjerry@gmail.com> - 3.1-30.20191211cvs
- New version (20191211-3.1)
* Sat Oct 26 2019 Jerry James <loganjerry@gmail.com> - 3.1-29.20191025cvs
- New version (20191025-3.1)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-28.20190324cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat May 11 2019 Jerry James <loganjerry@gmail.com> - 3.1-27.20190324cvs
- New version (20190324-3.1), fixes bz 1677247
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-26.20181209cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 30 2019 Jerry James <loganjerry@gmail.com> - 3.1-25.20181209cvs
- New version (20181209-3.1)
- ChangeLog is now UTF-8, so drop conversion from ISO8859-1
- Drop man page fix, fixed upstream
- Drop pkgconfig file fix, fixed upstream
- Add groff-base BR for man page generation
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-24.20170329cvs
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Mar 3 2018 Jerry James <loganjerry@gmail.com> - 3.1-23.20170329cvs
- Add gcc BR
- Build verbosely