diff --git a/sources b/sources index aaec6e5..0ffd756 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (x11-ssh-askpass-1.2.4.1.tar.gz) = 293c0bc623400d3359a920eca491930daa110685936cfcaf9eea07e439fc29de64413f4df4a18523cd8fdfce44794c55d7e3abafb904e8e90891b22d38f01a2f +8f2e41f3f7eaa8543a2440454637f3c3 x11-ssh-askpass-1.2.4.1.tar.gz diff --git a/x11-ssh-askpass-1.2.4.1-gcc-14.x-warnings.patch b/x11-ssh-askpass-1.2.4.1-gcc-14.x-warnings.patch deleted file mode 100644 index eb98a6c..0000000 --- a/x11-ssh-askpass-1.2.4.1-gcc-14.x-warnings.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up x11-ssh-askpass-1.2.4.1/dynlist.c.orig x11-ssh-askpass-1.2.4.1/dynlist.c ---- x11-ssh-askpass-1.2.4.1/dynlist.c.orig 2024-06-03 10:49:57.507301439 -0400 -+++ x11-ssh-askpass-1.2.4.1/dynlist.c 2024-06-03 10:58:55.209151568 -0400 -@@ -92,7 +92,7 @@ int append_to_buf(char **buf, unsigned c - { - return(APPEND_FAILURE); - } -- *buf_rnd = tmp_buf; -+ *buf_rnd = (unsigned char *) tmp_buf; - #ifdef DEBUG - printf("-->Allocated buffer of size %d\n", *buflen); - #endif /* DEBUG */ -diff -up x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c.orig x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c ---- x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c.orig 2024-06-03 10:49:57.507301439 -0400 -+++ x11-ssh-askpass-1.2.4.1/x11-ssh-askpass.c 2024-06-03 10:54:21.186737584 -0400 -@@ -38,6 +38,7 @@ - #include - #include - #include -+#include - - /* For (get|set)rlimit() ... */ - #include -@@ -1453,7 +1454,9 @@ initRandom() - unsigned int seed; - - if (fd!=-1) { -- read(fd, &seed, sizeof seed); -+ if (read(fd, &seed, sizeof seed) == -1) { -+ warn("read"); -+ } - close(fd); - } - diff --git a/x11-ssh-askpass.spec b/x11-ssh-askpass.spec index d495e08..fc76dc9 100644 --- a/x11-ssh-askpass.spec +++ b/x11-ssh-askpass.spec @@ -1,39 +1,25 @@ -%global appdefaultsdir /usr/share/X11/app-defaults +%global __alternatives /usr/sbin/alternatives +%global appdefaultsdir /usr/share/X11/app-defaults -Name: x11-ssh-askpass -Version: 1.2.4.1 -Release: 43%{?dist} -Summary: A passphrase dialog for X and not only for OpenSSH -License: LicenseRef-Fedora-Public-Domain +%{!?release_func:%global release_func() %1%{?dist}} -# The original site has disappeared, but the source itself has -# reappeared on github. The original site was: -# -# http://www.jmknoble.net/software/x11-ssh-askpass/ -# -# We will use the github mirror of the original source from now on. -%global forgeurl https://github.com/sigmavirus24/x11-ssh-askpass/ -%global tag %{version} -%global archivename %{name}-%{tag} -%global archiveext tar.gz -%global archiveurl %{forgeurl}/archive/refs/tags/%{tag}.%{archiveext} -%forgemeta +Name: x11-ssh-askpass +Version: 1.2.4.1 +Release: %release_func 30 +Summary: A passphrase dialog for X and not only for OpenSSH -URL: %{forgeurl} -Source0: %{forgesource} -Source1: x11-ssh-askpass.csh -Source2: x11-ssh-askpass.sh -Patch0: x11-ssh-askpass-1.2.4-random.patch -Patch1: x11-ssh-askpass-1.2.4.1-gcc-14.x-warnings.patch -Provides: openssh-askpass-x11 +License: Public Domain +URL: http://www.jmknoble.net/software/x11-ssh-askpass/ +Source0: http://www.jmknoble.net/software/x11-ssh-askpass/%name-%version.tar.gz +Source10: x11-ssh-askpass.csh +Source11: x11-ssh-askpass.sh +Patch0: x11-ssh-askpass-1.2.4-random.patch -BuildRequires: make -BuildRequires: gcc -BuildRequires: imake -BuildRequires: libXt-devel -BuildRequires: coreutils -BuildRequires: sed +Provides: openssh-askpass-x11 + +BuildRequires: gcc +BuildRequires: imake libXt-devel %description x11-ssh-askpass is a lightweight passphrase dialog for OpenSSH or @@ -46,79 +32,33 @@ its user interface. This reduces its dependencies on external libraries (such as GNOME or Perl/Tk). See the README for further information. %prep -%forgeautosetup +%setup -q +%patch0 -p1 -b .random +%global makeflags XAPPLOADDIR='%appdefaultsdir' %build -env LDFLAGS='-Wl,--as-needed' %configure --libexecdir=%{_libexecdir}/openssh --with-app-defaults-dir=%{appdefaultsdir} +export LDFLAGS='-Wl,--as-needed' +%configure --libexecdir=%_libexecdir/openssh xmkmf -# Modernize the features.h macros -sed -i -e 's|-D_XOPEN_SOURCE||g' Makefile -sed -i -e 's|-D_BSD_SOURCE|-D_DEFAULT_SOURCE|g' Makefile -make includes -%make_build +make includes %makeflags +make %{?_smp_mflags} %makeflags %install -%make_install install.man DESTDIR=%{buildroot} +make install install.man DESTDIR=$RPM_BUILD_ROOT %makeflags -install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/%(basename %{SOURCE1}) -install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/%(basename %{SOURCE2}) +mkdir -p $RPM_BUILD_ROOT%_sysconfdir/profile.d +install -p -m0644 %SOURCE10 %SOURCE11 $RPM_BUILD_ROOT%_sysconfdir/profile.d/ -rm -f %{buildroot}%{_libexecdir}/openssh/ssh-askpass -rm -f %{buildroot}%{_mandir}/man1/ssh-askpass.1x* +rm -f $RPM_BUILD_ROOT{%_libexecdir/openssh,%_mandir/man1}/ssh-askpass* %files %doc ChangeLog README TODO *.ad -%config(noreplace) %{_sysconfdir}/profile.d/x11-ssh-askpass.csh -%config(noreplace) %{_sysconfdir}/profile.d/x11-ssh-askpass.sh -%{appdefaultsdir}/SshAskpass -%dir %{_libexecdir}/openssh -%{_libexecdir}/openssh/x11-ssh-askpass -%{_mandir}/man1/x11-ssh-askpass.1x.gz +%config(noreplace) %_sysconfdir/profile.d/* +%appdefaultsdir/* +%_libexecdir/openssh +%_mandir/*/* %changelog -* Fri Jul 25 2025 Fedora Release Engineering - 1.2.4.1-43 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sun Jan 19 2025 Fedora Release Engineering - 1.2.4.1-42 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jul 20 2024 Fedora Release Engineering - 1.2.4.1-41 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jun 03 2024 David Cantrell - 1.2.4.1-40 -- Modernize the spec file with newer macros -- Pull source from github using forge macros since the original site - has disappeared -- Patched for latest glibc and gcc to handle warnings -- Use SPDX license expression for the License tag - -* Sat Jan 27 2024 Fedora Release Engineering - 1.2.4.1-39 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 1.2.4.1-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Jan 21 2023 Fedora Release Engineering - 1.2.4.1-37 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 1.2.4.1-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 1.2.4.1-35 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Dec 20 2021 David Cantrell - 1.2.4.1-34 -- Reformatting of the spec file and rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 1.2.4.1-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 1.2.4.1-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.2.4.1-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - * Fri Jan 31 2020 Fedora Release Engineering - 1.2.4.1-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild