[xv] Apply patches from multi-vendor collaboration effort
by Paul Howarth
commit f49d6306bf2a5aee735af3ac711c54d17fdc1fc0
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:45:46 2022 +0000
Apply patches from multi-vendor collaboration effort
https://github.com/jasper-software/xv
- Ignore multiple APP1 data structs; libjpeg can't write them
- Fix segfault seen with some corrupt GIF file
- Report errors from libjpeg
- In file selection box, do not move cursor if no filename is there
- Add fix for colormap in 8-bit JPEG mode
- Add more thorough version of CLK_TCK patch
xv.spec | 39 +++++++++++++++++++++++++++++++++++++--
1 file changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/xv.spec b/xv.spec
index 727eeb9..c3277db 100644
--- a/xv.spec
+++ b/xv.spec
@@ -3,7 +3,7 @@
Name: xv
Version: %{vprog}.jumbopatch.%{vjumbo}
-Release: 39%{?dist}
+Release: 40%{?dist}
Summary: Interactive image display program for X
Summary(de.UTF-8): X-basierender Bild-Viewer für praktische sämtliche Grafiken
Summary(es.UTF-8): Visualizador de imágenes para X para cuasi todos los formatos de imágenes
@@ -39,7 +39,12 @@ Patch13: xv-3.10a-20220127-jasper.patch
Patch14: xv-3.10a-c99isms.patch
Patch15: xv-3.10a-utf8-docs.patch
Patch16: xv-3.10a-LDFLAGS.patch
-
+Patch17: xv-3.10a-multi-APP1.patch
+Patch18: xv-3.10a-corrupt-GIF.patch
+Patch19: xv-3.10a-libjpeg-messages.patch
+Patch20: xv-3.10a-dirw.patch
+Patch21: xv-3.10a-jpeg8.patch
+Patch22: xv-3.10a-ticks.patch
BuildRequires: gcc
BuildRequires: libtiff-devel
BuildRequires: libpng-devel
@@ -177,6 +182,28 @@ rm ../%{name}-%{vprog}-jumbo-fix-enh-patch-%{vjumbo}.txt
# Honour LDFLAGS if present in the environment
%patch16 -p2
+# Ignore multiple APP1 data structs; libjpeg can't write them
+%patch17 -p2
+
+# Fix segfault seen with some corrupt GIF file
+%patch18 -p2
+
+# Report errors from libjpeg
+%patch19 -p2
+
+# In file selection box, do not move cursor if no filename is there
+# [Novell BZ #506573]
+%patch20 -p2
+
+# In libjpeg the numbers of out_color_components and color_components are
+# different for quantize_colors, i.e. color_components is the colormap
+# (normally 1) [Novell BZ #412491]
+%patch21 -p2
+
+# More thorough version of CLK_TCK patch (patch4)
+# [Novell BZ #237214]
+%patch22 -p2
+
# Fix compiler options, install directories; enable JPEG 2000 support
%patch0 -p1
@@ -281,6 +308,14 @@ done
%doc %{_docdir}/%{name}-%{vprog}/manuals/
%changelog
+* Mon Feb 28 2022 Paul Howarth <paul(a)city-fan.org> - 3.10a.jumbopatch.20070520-40
+- Ignore multiple APP1 data structs; libjpeg can't write them
+- Fix segfault seen with some corrupt GIF file
+- Report errors from libjpeg
+- In file selection box, do not move cursor if no filename is there
+- Add fix for colormap in 8-bit JPEG mode
+- Add more thorough version of CLK_TCK patch
+
* Wed Feb 16 2022 Paul Howarth <paul(a)city-fan.org> - 3.10a.jumbopatch.20070520-39
- Fix Jasper support to use proper library APIs (patch from Michael Adams,
Jasper upstream maintainer)
2 years, 10 months
[xv] Applied the following patch from OpenSUSE: xv-3.10a-ticks.dif
by Paul Howarth
commit 30968e3b6a405d5107cb9c02e4e9a5f3e722154b
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:37:48 2022 +0000
Applied the following patch from OpenSUSE: xv-3.10a-ticks.dif
More thorough version of CLK_TCK patch [Novell BZ #237214].
xv-3.10a-ticks.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
---
diff --git a/xv-3.10a-ticks.patch b/xv-3.10a-ticks.patch
new file mode 100644
index 0000000..b7ccacf
--- /dev/null
+++ b/xv-3.10a-ticks.patch
@@ -0,0 +1,48 @@
+From 5a432144018ba3df6125b1956756a84c09f42c17 Mon Sep 17 00:00:00 2001
+From: Michael Adams <mdadams(a)ece.uvic.ca>
+Date: Sat, 19 Feb 2022 08:15:31 -0800
+Subject: [PATCH 6/6] Applied the following patch from OpenSUSE:
+ xv-3.10a-ticks.dif
+
+---
+ src/xvevent.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/xvevent.c b/src/xvevent.c
+index 13cdf47..48a1f0d 100644
+--- a/src/xvevent.c
++++ b/src/xvevent.c
+@@ -89,6 +89,7 @@ int EventLoop()
+ #ifdef USE_TICKS
+ clock_t waitsec_ticks=0L, orgtime_ticks=0L, curtime_ticks;
+ clock_t elapsed_ticks=0L, remaining_interval;
++ clock_t clock_ticks = sysconf(_SC_CLK_TCK);
+ #else
+ time_t orgtime=0L, curtime;
+ #endif
+@@ -135,7 +136,7 @@ int EventLoop()
+ all pending events (ie, drawing the image the first time)
+ have been dealt with: START WAITING */
+ #ifdef USE_TICKS
+- waitsec_ticks = (clock_t)(waitsec * CLK_TCK);
++ waitsec_ticks = (clock_t)(waitsec * clock_ticks);
+ orgtime_ticks = times(NULL); /* unclear if NULL valid, but OK on Linux */
+ #else
+ orgtime = time(NULL);
+@@ -181,11 +182,11 @@ int EventLoop()
+ } else
+ elapsed_ticks = curtime_ticks - orgtime_ticks;
+ remaining_interval = waitsec_ticks - elapsed_ticks;
+- if (remaining_interval >= (clock_t)(1 * CLK_TCK))
++ if (remaining_interval >= (clock_t)(1 * clock_ticks))
+ sleep(1);
+ else {
+ /* less than one second remaining: do delay in msec, then return */
+- Timer((remaining_interval * 1000L) / CLK_TCK); /* can't overflow */
++ Timer((remaining_interval * 1000L) / clock_ticks); /* can't overflow */
+ return waitloop? NEXTLOOP : NEXTQUIT;
+ }
+ #else
+--
+2.35.1
+
2 years, 10 months
[xv] Added the following patch from OpenSUSE: xv-3.10a-jpeg8.dif
by Paul Howarth
commit 8ed060d374d1a4388c34a5be958fe1da83be33da
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:37:15 2022 +0000
Added the following patch from OpenSUSE: xv-3.10a-jpeg8.dif
In libjpeg the numbers of out_color_components and color_components are
different for quantize_colors, i.e. color_components is the colormap
(normally 1) [Novell BZ #412491].
xv-3.10a-jpeg8.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
---
diff --git a/xv-3.10a-jpeg8.patch b/xv-3.10a-jpeg8.patch
new file mode 100644
index 0000000..9599386
--- /dev/null
+++ b/xv-3.10a-jpeg8.patch
@@ -0,0 +1,61 @@
+From b4ada5122c93789800e9ae7ff4dc671db4c4d2c3 Mon Sep 17 00:00:00 2001
+From: Michael Adams <mdadams(a)ece.uvic.ca>
+Date: Sat, 19 Feb 2022 08:09:46 -0800
+Subject: [PATCH 5/6] Added the following patch from OpenSUSE:
+ xv-3.10a-jpeg8.dif
+
+---
+ src/xvjpeg.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/xvjpeg.c b/src/xvjpeg.c
+index 2594db4..65063e3 100644
+--- a/src/xvjpeg.c
++++ b/src/xvjpeg.c
+@@ -511,7 +511,7 @@ int LoadJFIF(fname, pinfo, quick)
+ JSAMPROW rowptr[1];
+ FILE *fp;
+ const char *colorspace_name = "Color";
+- byte *pic, *pic_end;
++ byte *pic;
+ long filesize;
+ int i,w,h,bperpix,bperline,count;
+
+@@ -625,6 +625,7 @@ L2:
+ * if CONV24_BEST, or other, ask for 24-bit image and hand it to XV
+ */
+ cinfo.desired_number_of_colors = 256;
++ cinfo.colormap = NULL;
+
+ if (conv24 == CONV24_FAST || conv24 == CONV24_SLOW) {
+ cinfo.quantize_colors = TRUE;
+@@ -662,7 +663,6 @@ L2:
+ fbasename);
+ goto L1;
+ }
+- pic_end = pic + count;
+
+ jpeg_start_decompress(&cinfo);
+
+@@ -679,7 +679,8 @@ L2:
+
+ /* Convert CMYK to RGB color space */
+
+- if (bperpix > 3) {
++ if (cinfo.out_color_components > 3) {
++ const byte *pic_end = pic + count;
+ register byte *p = pic;
+
+ /* According to documentation accompanying the IJG JPEG Library, it appears
+@@ -732,7 +733,7 @@ L2:
+ pinfo->colType = F_FULLCOLOR;
+
+ if (cinfo.quantize_colors) {
+- switch (bperpix) {
++ switch (cinfo.out_color_components) {
+ case 3:
+ for (i = 0; i < cinfo.actual_number_of_colors; i++) {
+ pinfo->r[i] = cinfo.colormap[0][i];
+--
+2.35.1
+
2 years, 10 months
[xv] Applied the following patch from OpenSUSE: xv-3.10a-dirw.dif
by Paul Howarth
commit 6f96c07f35aad5403a539fe94ea4e37c37e2c08f
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:36:28 2022 +0000
Applied the following patch from OpenSUSE: xv-3.10a-dirw.dif
In the file selection box, do not move the cursor if no filename is
there [Novell BZ #506573].
xv-3.10a-dirw.patch | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
---
diff --git a/xv-3.10a-dirw.patch b/xv-3.10a-dirw.patch
new file mode 100644
index 0000000..fde4e04
--- /dev/null
+++ b/xv-3.10a-dirw.patch
@@ -0,0 +1,28 @@
+From dea8967483b00f67d311c44c6d184098c2904fa5 Mon Sep 17 00:00:00 2001
+From: Michael Adams <mdadams(a)ece.uvic.ca>
+Date: Sat, 19 Feb 2022 08:05:00 -0800
+Subject: [PATCH] Applied the following patch from OpenSUSE:
+ xv-3.10a-dirw.dif
+
+---
+ src/xvdir.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/xvdir.c b/src/xvdir.c
+index 28e1fb3..c947b69 100644
+--- a/src/xvdir.c
++++ b/src/xvdir.c
+@@ -556,6 +556,10 @@ int x,y;
+ if (XTextWidth(mfinfo, &filename[stPos], 1+pos-stPos) > tx)
+ break;
+ }
++
++ if (pos == 0)
++ return -1;
++
+ /* if we are more than halfway past this char, put the insertion point after it */
+ dx = tx - XTextWidth(mfinfo, &filename[stPos], pos-stPos);
+ if (dx > XTextWidth(mfinfo, &filename[pos], 1)/2)
+--
+2.35.1
+
2 years, 10 months
[xv] Report error messages from libjpeg
by Paul Howarth
commit 06b2e3f7fba36054677da4d95539318483cc04c8
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:35:56 2022 +0000
Report error messages from libjpeg
xv-3.10a-libjpeg-messages.patch | 99 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
---
diff --git a/xv-3.10a-libjpeg-messages.patch b/xv-3.10a-libjpeg-messages.patch
new file mode 100644
index 0000000..db695a7
--- /dev/null
+++ b/xv-3.10a-libjpeg-messages.patch
@@ -0,0 +1,99 @@
+From 9d7ed2a203a3453d9dcd675643cec33384ae0a9f Mon Sep 17 00:00:00 2001
+From: Stuart Henderson <stu(a)spacehopper.org>
+Date: Fri, 18 Feb 2022 20:39:36 +0000
+Subject: [PATCH] report error messages from libjpeg
+
+---
+ src/xv.h | 5 +++--
+ src/xvdir.c | 11 ++++++++---
+ src/xvjpeg.c | 6 ++++--
+ 3 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/src/xv.h b/src/xv.h
+index 5d380dc..c53734c 100644
+--- a/src/xv.h
++++ b/src/xv.h
+@@ -162,7 +162,7 @@
+ #ifndef VMS
+ # include <errno.h>
+ # ifndef __NetBSD__
+-# if !(defined __GLIBC__ && __GLIBC__ >= 2)
++# if !(defined(__GLIBC__) && __GLIBC__ >= 2) && !defined(__OpenBSD__)
+ extern int errno; /* SHOULD be in errno.h, but often isn't */
+ extern char *sys_errlist[]; /* this too... */
+ # endif
+@@ -1722,7 +1722,8 @@ char *GetDirFullName PARM((void));
+ void SetDirSaveMode PARM((int, int));
+ int Globify PARM((char *));
+ FILE *OpenOutFile PARM((const char *));
+-int CloseOutFile PARM((FILE *, const char *, int));
++int CloseOutFileWhy PARM((FILE *, const char *, int, const char *));
++#define CloseOutFile(fp, name, fail) CloseOutFileWhy((fp), (name), (fail), NULL)
+
+ byte *GenSavePic PARM((int*, int*,int*, int*, int*,
+ byte**, byte**, byte**));
+diff --git a/src/xvdir.c b/src/xvdir.c
+index 56c25a2..28e1fb3 100644
+--- a/src/xvdir.c
++++ b/src/xvdir.c
+@@ -1879,18 +1879,23 @@ FILE *OpenOutFile(filename)
+
+
+ /***************************************/
+-int CloseOutFile(fp, filename, failed)
++int CloseOutFileWhy(fp, filename, failed, why)
+ FILE *fp;
+ const char *filename;
+ int failed;
++ const char *why;
+ {
+ char buf[64];
+
+ /* close output file, and if piping, deal... Returns '0' if everything OK */
+
+ if (failed) { /* failure during format-specific output routine */
+- char str[512];
+- sprintf(str,"Couldn't write file '%s'.", outFName);
++ char str[2048];
++ if (why)
++ snprintf(str, 2048, "Couldn't write file '%s' (%s).", outFName,
++ why);
++ else
++ snprintf(str, 2048, "Couldn't write file '%s'.", outFName);
+ ErrPopUp(str, "\nBummer!");
+ unlink(outFName); /* couldn't properly write file: delete it */
+ return 1;
+diff --git a/src/xvjpeg.c b/src/xvjpeg.c
+index 44cdf09..2594db4 100644
+--- a/src/xvjpeg.c
++++ b/src/xvjpeg.c
+@@ -87,6 +87,8 @@ static int colorType;
+ static DIAL qDial, smDial;
+ static BUTT jbut[J_NBUTTS];
+
++char errbuffer[JMSG_LENGTH_MAX];
++
+
+
+
+@@ -418,7 +420,7 @@ static void writeJPEG()
+
+ if (pfree) free(inpix);
+
+- if (CloseOutFile(fp, filename, rv) == 0) DirBox(0);
++ if (CloseOutFileWhy(fp, filename, rv, errbuffer) == 0) DirBox(0);
+ SetCursors(-1);
+ }
+
+@@ -444,7 +446,7 @@ METHODDEF void xv_error_exit(cinfo)
+ my_error_ptr myerr;
+
+ myerr = (my_error_ptr) cinfo->err;
+- (*cinfo->err->output_message)(cinfo); /* display error message */
++ (*cinfo->err->format_message)(cinfo, errbuffer); /* fmt error message */
+ longjmp(myerr->setjmp_buffer, 1); /* return from error */
+ }
+
+--
+2.35.1
+
2 years, 10 months
[xv] Fix segv seen with some corrupt gif file
by Paul Howarth
commit 3eceeb9a67b9f2e92832a3f81d95d4efc5f209c4
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:34:44 2022 +0000
Fix segv seen with some corrupt gif file
This has been carried in OpenBSD ports for years (added in
https://github.com/openbsd/ports/commit/9282bea250be7880aba70f1100813c618...).
Unfortunately I don't have more details about the original problem.
xv-3.10a-corrupt-GIF.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
---
diff --git a/xv-3.10a-corrupt-GIF.patch b/xv-3.10a-corrupt-GIF.patch
new file mode 100644
index 0000000..cd70532
--- /dev/null
+++ b/xv-3.10a-corrupt-GIF.patch
@@ -0,0 +1,46 @@
+From 8cac4efc53400cb82afc8c5048940d930243bd3d Mon Sep 17 00:00:00 2001
+From: Stuart Henderson <stu(a)spacehopper.org>
+Date: Fri, 18 Feb 2022 20:43:10 +0000
+Subject: [PATCH] fix segv seen with some corrupt gif file
+
+This has been carried in OpenBSD ports for years (added in
+https://github.com/openbsd/ports/commit/9282bea250be7880aba70f1100813c618231f32b)
+unfortunately I don't have more details about the original problem.
+---
+ src/xvgif.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/xvgif.c b/src/xvgif.c
+index 7bdb3d1..c2b9746 100644
+--- a/src/xvgif.c
++++ b/src/xvgif.c
+@@ -75,6 +75,7 @@ static boolean Interlace, HasGlobalColormap;
+ static byte *RawGIF; /* The heap array to hold it, raw */
+ static byte *Raster; /* The raster data stream, unblocked */
+ static byte *pic8;
++static size_t rasterSize;
+
+ /* The hash table used by the decompressor */
+ static int Prefix[4096];
+@@ -145,7 +146,8 @@ int LoadGIF(fname, pinfo)
+
+ /* the +256's are so we can read truncated GIF files without fear of
+ segmentation violation */
+- if (!(dataptr = RawGIF = (byte *) calloc((size_t) filesize+256, (size_t) 1)))
++ rasterSize = filesize+256;
++ if (!(Raster = (byte *) calloc(rasterSize, (size_t) 1)))
+ FatalError("LoadGIF: not enough memory to read GIF file");
+
+ if (!(Raster = (byte *) calloc((size_t) filesize+256,(size_t) 1)))
+@@ -796,6 +798,8 @@ static int readCode()
+ int RawCode, ByteOffset;
+
+ ByteOffset = BitOffset / 8;
++ if (ByteOffset >= rasterSize-2)
++ return 0;
+ RawCode = Raster[ByteOffset] + (Raster[ByteOffset + 1] << 8);
+ if (CodeSize >= 8)
+ RawCode += ( ((int) Raster[ByteOffset + 2]) << 16);
+--
+2.35.1
+
2 years, 10 months
[xv] Ignore multiple APP1 data structs, libjpeg can't write them
by Paul Howarth
commit 8be00636cdd3aa00374cbb3167d0666156e66885
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:33:50 2022 +0000
Ignore multiple APP1 data structs, libjpeg can't write them
Nikon D7100 generates JPEG files with multiple APP1 structs;
they can be read OK with xv but if the file is edited, an attempt
to save it will fail. Sample files (marked "camera original")
showing the problem at https://www.kenrockwell.com/nikon/d7100.htm
e.g. https://www.kenrockwell.com/nikon/d7100/sample-images/D71_0346.JPG
xv-3.10a-multi-APP1.patch | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
---
diff --git a/xv-3.10a-multi-APP1.patch b/xv-3.10a-multi-APP1.patch
new file mode 100644
index 0000000..d098728
--- /dev/null
+++ b/xv-3.10a-multi-APP1.patch
@@ -0,0 +1,35 @@
+From 21c277662800edd9fd3ab7f6da76fd526bd9b687 Mon Sep 17 00:00:00 2001
+From: Stuart Henderson <stu(a)spacehopper.org>
+Date: Thu, 17 Feb 2022 10:46:34 +0000
+Subject: [PATCH] ignore multiple APP1 data structs, libjpeg can't write
+ them
+
+Nikon D7100 generates JPEG files with multiple APP1 structs;
+they can be read OK with xv but if the file is edited, an attempt
+to save it will fail. Sample files (marked "camera original")
+showing the problem at https://www.kenrockwell.com/nikon/d7100.htm
+e.g. https://www.kenrockwell.com/nikon/d7100/sample-images/D71_0346.JPG
+---
+ src/xvjpeg.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/xvjpeg.c b/src/xvjpeg.c
+index b569811..44cdf09 100644
+--- a/src/xvjpeg.c
++++ b/src/xvjpeg.c
+@@ -851,7 +851,11 @@ METHODDEF boolean xv_process_app1(cinfo)
+ exifInfo = (byte *) malloc((size_t) length);
+ exifInfoSize = 0;
+ }
+- else exifInfo = (byte *) realloc(exifInfo, exifInfoSize + length);
++ else {
++ /* one APP1 data struct only, ignore extra stuff */
++ while (length-- > 0)
++ (void)j_getc(cinfo);
++ }
+ if (!exifInfo) FatalError("out of memory in xv_process_app1 (EXIF info)");
+
+ sp = exifInfo + exifInfoSize;
+--
+2.35.1
+
2 years, 10 months
[rpmfusion-nonfree-appstream-data/f35] regenerated
by Ankur Sinha
commit 889f220807b2589f9f584eb71e6a04fb05536e4d
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Mon Feb 28 12:03:54 2022 +0000
regenerated
rpmfusion-nonfree-appstream-data.spec | 5 +++-
update-appdata-rpmfusion-nonfree.sh | 50 +++++++++++++++++++++--------------
2 files changed, 34 insertions(+), 21 deletions(-)
---
diff --git a/rpmfusion-nonfree-appstream-data.spec b/rpmfusion-nonfree-appstream-data.spec
index 2473a5b..8d59d75 100644
--- a/rpmfusion-nonfree-appstream-data.spec
+++ b/rpmfusion-nonfree-appstream-data.spec
@@ -3,7 +3,7 @@
Name: %{reponame}-%{repoversion}-appstream-data
Version: 35
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Appstream metadata for the RPM Fusion nonfree repository
BuildArch: noarch
@@ -39,6 +39,9 @@ DESTDIR=%{buildroot} appstream-util install %{SOURCE0} %{SOURCE1}
%dir %{_datadir}/app-info/xmls
%changelog
+* Mon Feb 28 2022 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 35-2
+- regenerated
+
* Fri Nov 05 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 35-1
- Regenerated
diff --git a/update-appdata-rpmfusion-nonfree.sh b/update-appdata-rpmfusion-nonfree.sh
index c2e912a..1b8bd9a 100755
--- a/update-appdata-rpmfusion-nonfree.sh
+++ b/update-appdata-rpmfusion-nonfree.sh
@@ -1,37 +1,46 @@
#!/bin/bash
+RAWHIDE="37"
RELEASE=""
-URL=""
-#URL1=""
+URL_DEV=""
+URL_RELEASE=""
+TEMPDIR="rpmfusion-nonfree"
main ()
{
+ rm -rf rpmfusion-nonfree
mkdir rpmfusion-nonfree/ -pv
cd rpmfusion-nonfree || exit -1
-#
- if [ "$RELEASE" = "36" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/development/rawh..."
- elif [ "$RELEASE" = "35" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/releases/35/Ever..."
- elif [ "$RELEASE" = "34" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/releases/34/Ever..."
- #URL1="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/updates/33/x86_64/*"
+
+ if [ $RELEASE -le $RAWHIDE ] && [ $RELEASE -ge $((RAWHIDE - 3)) ]; then
+ if [ "$RELEASE" = "$RAWHIDE" ]; then
+ RELEASE="rawhide"
+ fi
+
+ URL_DEV="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/development/${RE..."
+ URL_RELEASE="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/releases/${RELEA..."
+
+ echo "Regenerating for $RELEASE"
+ rsync -avPh "$URL_RELEASE" . || rsync -avPh "$URL_DEV" .
+ else
+ echo "Please check if ${RELEASE} is currently supported. Rawhide is at ${RAWHIDE}."
+ exit -1
fi
- rsync -avPh --delete "$URL" .
-# rsync -avPh --delete --exclude debug "$URL1" ./Packages/
+ if ! command -v appstream-builder > /dev/null
+ then
+ echo "appstream-builder not installed. Installing now."
+ sudo dnf install /usr/bin/appstream-builder -y
+ fi
- rm -rf repo*
-# rm -rf Packages/repo*
-# createrepo -d Packages/
-# repomanage -o --space ./Packages/ | xargs rm
-# rm -rf Packages/repo*
-#
- appstream-builder --verbose --include-failed --max-threads=6 --log-dir=./logs/ \
+ appstream-builder --verbose --include-failed --max-threads=6 --log-dir=./logs/ \
--packages-dir=./Packages/ --temp-dir=./tmp/ --output-dir=./appstream-data/ \
--basename="rpmfusion-nonfree-$RELEASE" --origin="rpmfusion-nonfree-$RELEASE" \
--enable-hidpi --veto-ignore=missing-parents
echo "Generated files are present in the appstream-data directory"
+ echo "To import new sources, run:"
+ echo "rfpkg new-sources ${TEMPDIR}/appstream-data/rpmfusion-nonfree-${RELEASE}-icons.tar.gz ${TEMPDIR}/appstream-data/rpmfusion-nonfree-${RELEASE}.xml.gz"
+
}
usage ()
@@ -39,7 +48,7 @@ usage ()
echo "$0 -r <release>"
echo "- update appdata for rpmfusion nonfree repository"
echo "options:"
- echo "-r <release> one of 34, 35 and 36"
+ echo "-r <release> one of [$RAWHIDE, $((RAWHIDE -3))]"
}
@@ -54,6 +63,7 @@ do
case $OPTION in
r)
RELEASE=$OPTARG
+
main
;;
h)
2 years, 10 months
[rpmfusion-free-appstream-data/f35] regenerate
by Ankur Sinha
commit 27841143a6be55c2babea6b467eb559faf9a168a
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Mon Feb 28 11:56:37 2022 +0000
regenerate
rpmfusion-free-appstream-data.spec | 5 +++-
sources | 2 +-
update-appdata-rpmfusion-free.sh | 48 +++++++++++++++++++++-----------------
3 files changed, 32 insertions(+), 23 deletions(-)
---
diff --git a/rpmfusion-free-appstream-data.spec b/rpmfusion-free-appstream-data.spec
index c353c8c..4ffd4fd 100644
--- a/rpmfusion-free-appstream-data.spec
+++ b/rpmfusion-free-appstream-data.spec
@@ -3,7 +3,7 @@
Name: %{reponame}-%{repoversion}-appstream-data
Version: 35
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Appstream metadata for the RPM Fusion free repository
BuildArch: noarch
@@ -40,6 +40,9 @@ DESTDIR=%{buildroot} appstream-util install %{SOURCE0} %{SOURCE1}
%dir %{_datadir}/app-info/xmls
%changelog
+* Mon Feb 28 2022 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 35-2
+- regenerate
+
* Wed Nov 03 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 35-1
- Regenerate
diff --git a/sources b/sources
index 9955262..a377e10 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (rpmfusion-free-35-icons.tar.gz) = 6161055c61f8aa6ddb8552c196c20175c06064f1db640ec0fb80ab8f630e687b8bb8d6d754b7693daae5e169a7f3655ccd20bf7191e41af73009680bfe0c11c3
+SHA512 (rpmfusion-free-35-icons.tar.gz) = 8dd19ffbcd9494e97ec70aa6252d6f00421a25a098e6f15c82d59732128df42199b5f233df441bec7c154a1fde8e3b4ad5bd0b222c0825cb76cd1ef5f9ea4d0b
SHA512 (rpmfusion-free-35.xml.gz) = eaefada197f714b54de9552c340e891d005bc1e9ab828bdc425590289a4cbe31c68ae5eb5fd8e3f46e745247bf630b4645aad9f797b94f537af941585745f8ac
diff --git a/update-appdata-rpmfusion-free.sh b/update-appdata-rpmfusion-free.sh
index 9583870..5385e5b 100755
--- a/update-appdata-rpmfusion-free.sh
+++ b/update-appdata-rpmfusion-free.sh
@@ -1,41 +1,46 @@
#!/bin/bash
+RAWHIDE="37"
RELEASE=""
-URL=""
-#URL1=""
+URL_DEV=""
+URL_RELEASE=""
+TEMPDIR="rpmfusion-free"
main ()
{
+ rm -rf rpmfusion-free
mkdir rpmfusion-free/ -pv
cd rpmfusion-free || exit -1
- if [ "$RELEASE" = "36" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/development/rawhide..."
- elif [ "$RELEASE" = "35" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/releases/35/Everyth..."
- elif [ "$RELEASE" = "34" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/releases/34/Everyth..."
- #URL1="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/updates/32/x86_64/*"
- elif [ "$RELEASE" = "33" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/releases/31/Everyth..."
- #URL1="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/updates/31/x86_64/*"
+ if [ $RELEASE -le $RAWHIDE ] && [ $RELEASE -ge $((RAWHIDE - 3)) ]; then
+ if [ "$RELEASE" = "$RAWHIDE" ]; then
+ RELEASE="rawhide"
+ fi
+ URL_DEV="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/development/${RELEA..."
+ URL_RELEASE="rsync://download1.rpmfusion.org/rpmfusion/free/fedora/releases/${RELEASE}..."
+
+ echo "Regenerating for $RELEASE"
+ rsync -avPh "$URL_RELEASE" . || rsync -avPh "$URL_DEV" .
+ else
+ echo "Please check if ${RELEASE} is currently supported. Rawhide is at ${RAWHIDE}."
+ exit -1
fi
- rsync -avPh "$URL" .
-# rsync -avPh --exclude debug "$URL1" ./Packages/
+ if ! command -v appstream-builder > /dev/null
+ then
+ echo "appstream-builder not installed. Installing now."
+ sudo dnf install /usr/bin/appstream-builder -y
+ fi
- rm -rf repo*
-# rm -rf Packages/repo*
-# createrepo -d Packages/
-# repomanage -o --space ./Packages/ | xargs rm
-# rm -rf Packages/repo*
-#
appstream-builder --verbose --include-failed --max-threads=6 --log-dir=./logs/ \
--packages-dir=./Packages/ --temp-dir=./tmp/ --output-dir=./appstream-data/ \
--basename="rpmfusion-free-$RELEASE" --origin="rpmfusion-free-$RELEASE" \
--enable-hidpi --veto-ignore=missing-parents
echo "Generated files are present in the appstream-data directory"
+ echo "To import new sources, run:"
+ echo "rfpkg new-sources ${TEMPDIR}/appstream-data/rpmfusion-free-${RELEASE}-icons.tar.gz ${TEMPDIR}/appstream-data/rpmfusion-free-${RELEASE}.xml.gz"
+
}
usage ()
@@ -43,7 +48,7 @@ usage ()
echo "$0 -r <release>"
echo "- update appdata for rpmfusion free repository"
echo "options:"
- echo "-r <release> one of 33, 34, 35 and 36"
+ echo "-r <release> one of [$RAWHIDE, $((RAWHIDE -3))]"
}
@@ -58,6 +63,7 @@ do
case $OPTION in
r)
RELEASE=$OPTARG
+
main
;;
h)
2 years, 10 months
[rpmfusion-nonfree-appstream-data/f36] feat: regenerate
by Ankur Sinha
commit 9832f2e7c8f7dafeab208907cc3d4b342f6637ce
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Mon Feb 28 11:55:36 2022 +0000
feat: regenerate
rpmfusion-nonfree-appstream-data.spec | 5 +++-
sources | 4 +--
update-appdata-rpmfusion-nonfree.sh | 50 +++++++++++++++++++++--------------
3 files changed, 36 insertions(+), 23 deletions(-)
---
diff --git a/rpmfusion-nonfree-appstream-data.spec b/rpmfusion-nonfree-appstream-data.spec
index a95926d..a9d46f4 100644
--- a/rpmfusion-nonfree-appstream-data.spec
+++ b/rpmfusion-nonfree-appstream-data.spec
@@ -3,7 +3,7 @@
Name: %{reponame}-%{repoversion}-appstream-data
Version: 36
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Appstream metadata for the RPM Fusion nonfree repository
BuildArch: noarch
@@ -39,6 +39,9 @@ DESTDIR=%{buildroot} appstream-util install %{SOURCE0} %{SOURCE1}
%dir %{_datadir}/app-info/xmls
%changelog
+* Mon Feb 28 2022 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 36-2
+- regenerate
+
* Fri Nov 05 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 36-1
- Regenerate for F36/rawhide
diff --git a/sources b/sources
index 0c70191..49360da 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (rpmfusion-nonfree-36-icons.tar.gz) = c727c55f4a793101e8ab3c162db7d08ddc8dc66cf2757b959171e75cc979d2c542bb2ee219017bd7d3fbe84cb4d805f719284830114e9f8cf51321093d3703f5
-SHA512 (rpmfusion-nonfree-36.xml.gz) = 675c3abfbfa7ef9dcd9cba3cff5faac79947fd55d691af10cad2f40b79dda5ae04b0cf15e04e4a2ac7df5e112fa0247685cbab790dc23a4cc602b7fb4ed0d5ac
+SHA512 (rpmfusion-nonfree-36-icons.tar.gz) = 0a839a89fc7b0a78d71e457e2199046ab34f18dd358ca29b9a357b66c881b664ef57a5f5843637ef9c2dac06f999c63517946281598d9631a3836d210005020a
+SHA512 (rpmfusion-nonfree-36.xml.gz) = 2cec47612c4bd3f9bd720b127ff32ad949a06e88c1cdb9132e93534ec7a599f5f532056d444c9fb58d35985460a70ddf247942133b11d78284447cb10ddb8270
diff --git a/update-appdata-rpmfusion-nonfree.sh b/update-appdata-rpmfusion-nonfree.sh
index c2e912a..1b8bd9a 100755
--- a/update-appdata-rpmfusion-nonfree.sh
+++ b/update-appdata-rpmfusion-nonfree.sh
@@ -1,37 +1,46 @@
#!/bin/bash
+RAWHIDE="37"
RELEASE=""
-URL=""
-#URL1=""
+URL_DEV=""
+URL_RELEASE=""
+TEMPDIR="rpmfusion-nonfree"
main ()
{
+ rm -rf rpmfusion-nonfree
mkdir rpmfusion-nonfree/ -pv
cd rpmfusion-nonfree || exit -1
-#
- if [ "$RELEASE" = "36" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/development/rawh..."
- elif [ "$RELEASE" = "35" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/releases/35/Ever..."
- elif [ "$RELEASE" = "34" ]; then
- URL="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/releases/34/Ever..."
- #URL1="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/updates/33/x86_64/*"
+
+ if [ $RELEASE -le $RAWHIDE ] && [ $RELEASE -ge $((RAWHIDE - 3)) ]; then
+ if [ "$RELEASE" = "$RAWHIDE" ]; then
+ RELEASE="rawhide"
+ fi
+
+ URL_DEV="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/development/${RE..."
+ URL_RELEASE="rsync://download1.rpmfusion.org/rpmfusion/nonfree/fedora/releases/${RELEA..."
+
+ echo "Regenerating for $RELEASE"
+ rsync -avPh "$URL_RELEASE" . || rsync -avPh "$URL_DEV" .
+ else
+ echo "Please check if ${RELEASE} is currently supported. Rawhide is at ${RAWHIDE}."
+ exit -1
fi
- rsync -avPh --delete "$URL" .
-# rsync -avPh --delete --exclude debug "$URL1" ./Packages/
+ if ! command -v appstream-builder > /dev/null
+ then
+ echo "appstream-builder not installed. Installing now."
+ sudo dnf install /usr/bin/appstream-builder -y
+ fi
- rm -rf repo*
-# rm -rf Packages/repo*
-# createrepo -d Packages/
-# repomanage -o --space ./Packages/ | xargs rm
-# rm -rf Packages/repo*
-#
- appstream-builder --verbose --include-failed --max-threads=6 --log-dir=./logs/ \
+ appstream-builder --verbose --include-failed --max-threads=6 --log-dir=./logs/ \
--packages-dir=./Packages/ --temp-dir=./tmp/ --output-dir=./appstream-data/ \
--basename="rpmfusion-nonfree-$RELEASE" --origin="rpmfusion-nonfree-$RELEASE" \
--enable-hidpi --veto-ignore=missing-parents
echo "Generated files are present in the appstream-data directory"
+ echo "To import new sources, run:"
+ echo "rfpkg new-sources ${TEMPDIR}/appstream-data/rpmfusion-nonfree-${RELEASE}-icons.tar.gz ${TEMPDIR}/appstream-data/rpmfusion-nonfree-${RELEASE}.xml.gz"
+
}
usage ()
@@ -39,7 +48,7 @@ usage ()
echo "$0 -r <release>"
echo "- update appdata for rpmfusion nonfree repository"
echo "options:"
- echo "-r <release> one of 34, 35 and 36"
+ echo "-r <release> one of [$RAWHIDE, $((RAWHIDE -3))]"
}
@@ -54,6 +63,7 @@ do
case $OPTION in
r)
RELEASE=$OPTARG
+
main
;;
h)
2 years, 10 months