[packages/lde] Rel 7
arekm
arekm at pld-linux.org
Mon Mar 9 19:07:48 CET 2026
commit e3890afaa40baa4ae0f0b354beff193c32a1f5ec
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Mar 9 19:07:36 2026 +0100
Rel 7
lde-modern-fixes.patch | 248 +++++++++++++++++++++++++++++++++++++++++++++++++
lde.spec | 5 +-
2 files changed, 252 insertions(+), 1 deletion(-)
---
diff --git a/lde.spec b/lde.spec
index 96ea311..cf84679 100644
--- a/lde.spec
+++ b/lde.spec
@@ -2,12 +2,14 @@ Summary: Linux Disk Editor
Summary(pl.UTF-8): Edytor systemów plików
Name: lde
Version: 2.6.1
-Release: 6
+Release: 7
License: GPL
Group: Applications/System
Source0: http://dl.sourceforge.net/lde/%{name}-%{version}.tar.gz
# Source0-md5: 7cd3a798cafc07d084db240fd1d1c830
Patch0: %{name}-fix.patch
+# Fixes for format-security, implicit declarations, gpm and GCC 14 compatibility
+Patch1: %{name}-modern-fixes.patch
URL: http://lde.sourceforge.net/
BuildRequires: bison
BuildRequires: gpm-devel
@@ -29,6 +31,7 @@ zwykły tryb binarny.
%prep
%setup -q -n %{name}
%patch -P0 -p1
+%patch -P1 -p1
%build
%configure \
diff --git a/lde-modern-fixes.patch b/lde-modern-fixes.patch
new file mode 100644
index 0000000..4e97841
--- /dev/null
+++ b/lde-modern-fixes.patch
@@ -0,0 +1,248 @@
+diff -ur orig-patched/lde/macros/Makefile.in lde/macros/Makefile.in
+--- orig-patched/lde/macros/Makefile.in 2002-01-12 07:28:08.000000000 +0100
++++ lde/macros/Makefile.in 2026-03-09 18:58:50.966356883 +0100
+@@ -78,10 +78,10 @@
+ $(program_name): dummy.src
+
+ dummy.src:
+- ( cd src ; $(MAKE) -f Makefile all )
++ ( cd src ; $(MAKE) -f Makefile all LDE_CURSES_SRC="$(@CURSES_PREFIX at CURSES_SRC)" LDE_CURSES_OBJ="$(@CURSES_PREFIX at CURSES_OBJ)" CPP="$(CC) -E" )
+
+ dummy.cr:
+- ( cd crash_recovery ; $(MAKE) -f Makefile all )
++ ( cd crash_recovery ; $(MAKE) -f Makefile all CPP="$(CC) -E" )
+
+ clean:
+ ( cd src ; $(MAKE) -f Makefile clean )
+@@ -96,8 +96,8 @@
+ dep: depend
+
+ depend:
+- ( cd src ; $(MAKE) -f Makefile depend )
+- ( cd crash_recovery ; $(MAKE) -f Makefile depend )
++ ( cd src ; $(MAKE) -f Makefile depend LDE_CURSES_SRC="$(@CURSES_PREFIX at CURSES_SRC)" CPP="$(CC) -E" )
++ ( cd crash_recovery ; $(MAKE) -f Makefile depend CPP="$(CC) -E" )
+
+ install: $(program_name)
+ ${INSTALL_PROGRAM} $(program_name) $(sbindir)/$(program_name)
+diff -ur orig-patched/lde/src/lde.h lde/src/lde.h
+--- orig-patched/lde/src/lde.h 2003-12-03 19:07:20.000000000 +0100
++++ lde/src/lde.h 2026-03-09 19:06:03.869690083 +0100
+@@ -211,7 +211,7 @@
+ };
+
+ /* File system specific commands */
+-struct {
++typedef struct _FS_cmd {
+ /* Check if inode is marked in use */
+ int (*inode_in_use)(unsigned long n);
+ /* Check if data zone/block is marked in use */
+@@ -231,7 +231,10 @@
+ unsigned long (*map_inode)(unsigned long n);
+ /* Map block number in file chain to physical block on disk */
+ int (*map_block)(unsigned long zone_index[], unsigned long blknr, unsigned long *mapped_block);
+-} FS_cmd;
++} _FS_cmd;
++
++extern _FS_cmd FS_cmd;
++
+
+ /* Flags */
+ struct _lde_flags {
+diff -ur orig-patched/lde/src/main_lde.c lde/src/main_lde.c
+--- orig-patched/lde/src/main_lde.c 2003-12-07 06:55:47.000000000 +0100
++++ lde/src/main_lde.c 2026-03-09 19:03:18.163023468 +0100
+@@ -79,8 +79,11 @@
+ struct sbinfo sb2, *sb = &sb2;
+ struct fs_constants *fsc = NULL;
+
++_FS_cmd FS_cmd;
++
+ char *badblocks_directory = NULL;
+
++
+ int CURR_DEVICE = 0;
+ volatile struct _lde_flags lde_flags =
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
+diff -ur orig-patched/lde/src/nc_inode.c lde/src/nc_inode.c
+--- orig-patched/lde/src/nc_inode.c 2003-12-07 02:35:53.000000000 +0100
++++ lde/src/nc_inode.c 2026-03-09 19:00:04.466356860 +0100
+@@ -111,7 +111,7 @@
+ for (i=0;(inode_labels[i].sb_entry>=0);i++)
+ if ( (char *)fsc->inode + i )
+ if (inode_labels[i].text != NULL)
+- mvwprintw(workspace,inode_labels[i].row,inode_labels[i].col,inode_labels[i].text);
++ mvwprintw(workspace,inode_labels[i].row,inode_labels[i].col,"%s",inode_labels[i].text);
+
+ /* Special cases */
+ if (fsc->INDIRECT)
+@@ -180,7 +180,7 @@
+ /* Now display it again in a longer format */
+ if (fsc->inode->i_mode) {
+ sprintf(f_mode,"%07lo",imode);
+- mvwprintw(workspace,2,6,entry_type(imode));
++ mvwprintw(workspace,2,6,"%s",entry_type(imode));
+ }
+
+ if (fsc->inode->i_links_count) {
+diff -ur orig-patched/lde/src/nc_lde.c lde/src/nc_lde.c
+--- orig-patched/lde/src/nc_lde.c 2003-12-07 06:55:47.000000000 +0100
++++ lde/src/nc_lde.c 2026-03-09 18:54:58.743023597 +0100
+@@ -34,7 +34,7 @@
+ #ifdef HAVE_LIBGPM
+ # include <gpm.h>
+ # undef getch /* Supress warning about redefinition */
+-# define getch Gpm_Getch
++# define getch Gpm_Getchar
+ #endif
+
+ /* Create globals declared extern in nc_lde.h */
+@@ -229,7 +229,7 @@
+ werase(header);
+ sprintf(echo_string,"%s v%s : %s : %s",
+ program_name,LDE_VERSION,fsc->text_name,device_name);
+- mvwprintw(header,0,(COLS-strlen(echo_string))/2-1,echo_string);
++ mvwprintw(header,0,(COLS-strlen(echo_string))/2-1,"%s",echo_string);
+ update_header();
+ #endif
+ }
+@@ -338,10 +338,10 @@
+ for (c=0; c < window_length; c++) {
+ if (c==highlight)
+ wattron(win,WHITE_ON_RED);
+- mvwprintw(win,c,0,menu[c].description);
++ mvwprintw(win,c,0,"%s",menu[c].description);
+ if (c==highlight)
+ wattroff(win,WHITE_ON_RED);
+- mvwprintw(win,c,width,text_key(menu[c].action_code,keys,0));
++ mvwprintw(win,c,width,"%s",text_key(menu[c].action_code,keys,0));
+ }
+ wmove(bigwin,1,1);
+ wrefresh(bigwin);
+@@ -397,9 +397,9 @@
+
+ /* Make sure the right menu choice is highlighted */
+ if (highlight != last_highlight) {
+- mvwprintw(win,last_highlight,0,menu[last_highlight].description);
++ mvwprintw(win,last_highlight,0,"%s",menu[last_highlight].description);
+ wattron(win,WHITE_ON_RED);
+- mvwprintw(win,highlight,0,menu[highlight].description);
++ mvwprintw(win,highlight,0,"%s",menu[highlight].description);
+ wattroff(win,WHITE_ON_RED);
+ wmove(win,highlight,0);
+ wrefresh(win);
+@@ -490,7 +490,7 @@
+ wattron(bigwin,WHITE_ON_BLUE);
+ for (i=1;i<win_col-1;i++)
+ mvwaddch(bigwin,1,i,' ');
+- mvwprintw(bigwin,1,(win_col-strlen(banner))/2-1,banner);
++ mvwprintw(bigwin,1,(win_col-strlen(banner))/2-1,"%s",banner);
+ wattroff(bigwin,WHITE_ON_BLUE);
+ }
+
+@@ -501,8 +501,8 @@
+ window_size -= fancy + banner_size;
+
+ for (i=0; i<window_size; i++) {
+- mvwprintw(win,i,fancy,three_text_keys(help_text[i+window_offset].action_code, kmap));
+- mvwprintw(win,i,fancy+HELP_KEY_SIZE,help_text[i+window_offset].description);
++ mvwprintw(win,i,fancy,"%s",three_text_keys(help_text[i+window_offset].action_code, kmap));
++ mvwprintw(win,i,fancy+HELP_KEY_SIZE,"%s",help_text[i+window_offset].description);
+ }
+ wmove(win,i,fancy);
+
+@@ -532,8 +532,8 @@
+ }
+
+ if (i>=0) {
+- mvwprintw(win,i,fancy,three_text_keys(help_text[i+window_offset].action_code, kmap));
+- mvwprintw(win,i,fancy+HELP_KEY_SIZE,help_text[i+window_offset].description);
++ mvwprintw(win,i,fancy,"%s",three_text_keys(help_text[i+window_offset].action_code, kmap));
++ mvwprintw(win,i,fancy+HELP_KEY_SIZE,"%s",help_text[i+window_offset].description);
+ wmove(win,i,fancy);
+ wrefresh(win);
+ }
+@@ -585,7 +585,7 @@
+ wattron(bigwin,WHITE_ON_BLUE);
+ for (i=1;i<win_col-1;i++)
+ mvwaddch(bigwin,1,i,' ');
+- mvwprintw(bigwin,1,(win_col-strlen(banner))/2-1,banner);
++ mvwprintw(bigwin,1,(win_col-strlen(banner))/2-1,"%s",banner);
+ wattroff(bigwin,WHITE_ON_BLUE);
+ }
+
+@@ -596,7 +596,7 @@
+ window_size -= fancy + banner_size;
+
+ for (i=0; i<window_size; i++)
+- mvwprintw(win,i,fancy,help_text[i+window_offset]);
++ mvwprintw(win,i,fancy,"%s",help_text[i+window_offset]);
+ wmove(win,i,fancy);
+
+ wrefresh(bigwin);
+@@ -625,7 +625,7 @@
+ }
+
+ if (i>=0) {
+- mvwprintw(win,i,fancy,help_text[i+window_offset]);
++ mvwprintw(win,i,fancy,"%s",help_text[i+window_offset]);
+ wmove(win,i,fancy);
+ wrefresh(win);
+ }
+diff -ur orig-patched/lde/src/swiped/cnews/getdate.y lde/src/swiped/cnews/getdate.y
+--- orig-patched/lde/src/swiped/cnews/getdate.y 2026-03-09 18:58:28.532131138 +0100
++++ lde/src/swiped/cnews/getdate.y 2026-03-09 18:56:00.113023580 +0100
+@@ -12,6 +12,7 @@
+ #endif
+ #include <ctype.h>
+ #include <time.h>
++#include <string.h>
+
+ time_t lde_getdate(char *p);
+
+@@ -43,9 +44,11 @@
+ static time_t monthadd(time_t sdate, time_t relmonth);
+ static time_t daylcorr(time_t future, time_t now);
+ static int lookup(char *id);
++static int yylex(void);
+
+ %}
+
++
+ %%
+ timedate: /* empty */
+ | timedate item;
+@@ -68,19 +71,19 @@
+ {hh = $1; mm = $3; merid = $4;}
+ | NUMBER ':' NUMBER NUMBER
+ {hh = $1; mm = $3; merid = 24;
+- tdaylight = STANDARD; ourzone = $4%100 + 60*$4/100;}
++ daylight = STANDARD; ourzone = $4%100 + 60*$4/100;}
+ | NUMBER ':' NUMBER ':' NUMBER
+ {hh = $1; mm = $3; ss = $5; merid = 24;}
+ | NUMBER ':' NUMBER ':' NUMBER MERIDIAN
+ {hh = $1; mm = $3; ss = $5; merid = $6;}
+ | NUMBER ':' NUMBER ':' NUMBER NUMBER
+ {hh = $1; mm = $3; ss = $5; merid = 24;
+- tdaylight = STANDARD; ourzone = $6%100 + 60*$6/100;};
++ daylight = STANDARD; ourzone = $6%100 + 60*$6/100;};
+
+ zone: ZONE
+- {ourzone = $1; tdaylight = STANDARD;}
++ {ourzone = $1; daylight = STANDARD;}
+ | DAYZONE
+- {ourzone = $1; tdaylight = DAYLIGHT;};
++ {ourzone = $1; daylight = DAYLIGHT;};
+
+ dyspec: DAY
+ {dayord = 1; dayreq = $1;}
+@@ -199,7 +202,8 @@
+
+ static char *lptr;
+
+-yylex()
++static int
++yylex(void)
+ {
+ extern int yylval;
+ int sign;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lde.git/commitdiff/e3890afaa40baa4ae0f0b354beff193c32a1f5ec
More information about the pld-cvs-commit
mailing list