From b980be85780193308e24eec10c7c7e96a059adac26a59a48a9e68adb8da732eb Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 29 Nov 2023 13:52:15 +0000 Subject: [PATCH] Accepting request 1129823 from home:lnussel:branches:Base:System - don't install config file, dialog has built in defaults anyway - add support for /usr/etc (dialog-1.3-usretc.diff) OBS-URL: https://build.opensuse.org/request/show/1129823 OBS-URL: https://build.opensuse.org/package/show/Base:System/dialog?expand=0&rev=57 --- dialog-1.2-20121230.dif | 6 +- dialog-1.3-usretc.diff | 18 +++++ dialog.changes | 6 ++ dialog.rc | 141 ---------------------------------------- dialog.spec | 10 ++- 5 files changed, 31 insertions(+), 150 deletions(-) create mode 100644 dialog-1.3-usretc.diff delete mode 100644 dialog.rc diff --git a/dialog-1.2-20121230.dif b/dialog-1.2-20121230.dif index 1b533d9..5268b0e 100644 --- a/dialog-1.2-20121230.dif +++ b/dialog-1.2-20121230.dif @@ -1,7 +1,7 @@ -Index: util.c +Index: dialog-1.3-20230209/util.c =================================================================== ---- util.c.orig -+++ util.c +--- dialog-1.3-20230209.orig/util.c ++++ dialog-1.3-20230209/util.c @@ -2406,8 +2406,10 @@ dlg_move_window(WINDOW *win, int height, #ifdef HAVE_COLOR if (p->shadow != 0) { diff --git a/dialog-1.3-usretc.diff b/dialog-1.3-usretc.diff new file mode 100644 index 0000000..6f9df64 --- /dev/null +++ b/dialog-1.3-usretc.diff @@ -0,0 +1,18 @@ +Index: dialog-1.3-20230209/rc.c +=================================================================== +--- dialog-1.3-20230209.orig/rc.c ++++ dialog-1.3-20230209/rc.c +@@ -576,8 +576,11 @@ dlg_parse_rc(void) + if (rc_file == NULL) { /* step (b) failed? */ + /* try step (c) */ + strcpy(str, GLOBALRC); +- if ((rc_file = fopen(filename = str, "rt")) == NULL) +- return 0; /* step (c) failed, use default values */ ++ if ((rc_file = fopen(filename = str, "rt")) == NULL) { ++ sprintf(str, "/usr/%s", GLOBALRC); ++ if ((rc_file = fopen(filename = str, "rt")) == NULL) ++ return 0; /* step (c) failed, use default values */ ++ } + } + + DLG_TRACE(("# opened rc file \"%s\"\n", filename)); diff --git a/dialog.changes b/dialog.changes index ca090dc..3f9edcd 100644 --- a/dialog.changes +++ b/dialog.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 23 09:54:41 UTC 2023 - Ludwig Nussel + +- don't install config file, dialog has built in defaults anyway +- add support for /usr/etc (dialog-1.3-usretc.diff) + ------------------------------------------------------------------- Mon Jun 19 07:11:06 UTC 2023 - Dr. Werner Fink diff --git a/dialog.rc b/dialog.rc deleted file mode 100644 index 15f952c..0000000 --- a/dialog.rc +++ /dev/null @@ -1,141 +0,0 @@ -# -# Run-time configuration file for dialog, matches openSuSE color scheme. -# -# Types of values: -# -# Number - -# String - "string" -# Boolean - -# Attribute - (foreground,background,highlight?) - -# Set aspect-ration. -aspect = 0 - -# Set separator (for multiple widgets output). -separate_widget = "" - -# Set tab-length (for textbox tab-conversion). -tab_len = 8 - -# Make tab-traversal for checklist, etc., include the list. -visit_items = OFF - -# Shadow dialog boxes? This also turns on color. -use_shadow = ON - -# Turn color support ON or OFF -use_colors = ON - -# Screen color -screen_color = (CYAN,BLUE,ON) - -# Shadow color -shadow_color = (BLACK,BLACK,ON) - -# Dialog box color -dialog_color = (BLACK,WHITE,OFF) - -# Dialog box title color -title_color = (YELLOW,WHITE,ON) - -# Dialog box border color -border_color = (WHITE,WHITE,ON) - -# Active button color -button_active_color = (WHITE,BLUE,ON) - -# Inactive button color -button_inactive_color = dialog_color - -# Active button key color -button_key_active_color = button_active_color - -# Inactive button key color -button_key_inactive_color = (RED,WHITE,OFF) - -# Active button label color -button_label_active_color = (YELLOW,BLUE,ON) - -# Inactive button label color -button_label_inactive_color = (BLACK,WHITE,ON) - -# Input box color -inputbox_color = dialog_color - -# Input box border color -inputbox_border_color = dialog_color - -# Search box color -searchbox_color = dialog_color - -# Search box title color -searchbox_title_color = title_color - -# Search box border color -searchbox_border_color = border_color - -# File position indicator color -position_indicator_color = title_color - -# Menu box color -menubox_color = dialog_color - -# Menu box border color -menubox_border_color = border_color - -# Item color -item_color = dialog_color - -# Selected item color -item_selected_color = button_active_color - -# Tag color -tag_color = title_color - -# Selected tag color -tag_selected_color = button_label_active_color - -# Tag key color -tag_key_color = button_key_inactive_color - -# Selected tag key color -tag_key_selected_color = (RED,BLUE,ON) - -# Check box color -check_color = dialog_color - -# Selected check box color -check_selected_color = button_active_color - -# Up arrow color -uarrow_color = (GREEN,WHITE,ON) - -# Down arrow color -darrow_color = uarrow_color - -# Item help-text color -itemhelp_color = (WHITE,BLACK,OFF) - -# Active form text color -form_active_text_color = button_active_color - -# Form text color -form_text_color = (WHITE,CYAN,ON) - -# Readonly form item color -form_item_readonly_color = (CYAN,WHITE,ON) - -# Dialog box gauge color -gauge_color = (BLUE,WHITE,ON) - -# Dialog box border2 color -border2_color = dialog_color - -# Input box border2 color -inputbox_border2_color = dialog_color - -# Search box border2 color -searchbox_border2_color = dialog_color - -# Menu box border2 color -menubox_border2_color = dialog_color diff --git a/dialog.spec b/dialog.spec index bf7d60a..218ebd1 100644 --- a/dialog.spec +++ b/dialog.spec @@ -28,11 +28,11 @@ URL: http://invisible-island.net/dialog/ Source0: https://www.invisible-island.net/archives/%{name}/%{name}-%{version}-%{src_date}.tgz Source1: https://www.invisible-island.net/archives/%{name}/%{name}-%{version}-%{src_date}.tgz.asc Source2: %{name}.keyring -Source3: dialog.rc Source4: dialog-rpmlintrc # PATCH-FIX-OPENSUSE : fix shadow during resizing terminal Patch0: dialog-1.2-20121230.dif Patch2: dialog-gcc-warnings.patch +Patch3: dialog-1.3-usretc.diff BuildRequires: libtool BuildRequires: ncurses-devel BuildRequires: pkgconfig @@ -69,9 +69,7 @@ Examples of using menus and dialog boxes in shell scripts. %lang_package %prep -%setup -q -n %{name}-%{version}-%{src_date} -%patch0 -%patch2 -p1 +%autosetup -n %{name}-%{version}-%{src_date} %build CC=gcc @@ -113,7 +111,7 @@ rm -rf %{buildroot}%{_datadir}/locale/mg/ # Malagasy (Malayalam??) rm -rf %{buildroot}%{_datadir}/locale/rm/ # Rhaeto-Romance mkdir %{buildroot}/etc -install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dialogrc +> %{buildroot}%{_sysconfdir}/dialogrc %find_lang %{name} xz CHANGES @@ -128,7 +126,7 @@ xz CHANGES %else %doc CHANGES.xz README VERSION COPYING %endif -%config(noreplace) %{_sysconfdir}/dialogrc +%ghost %config(noreplace) %{_sysconfdir}/dialogrc %{_bindir}/dialog %{_mandir}/man1/dialog.1%{ext_man}